@clerk/react 6.0.0-snapshot.v20251203203405 → 6.0.0-snapshot.v20251204175016
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-EDVV4QQ6.mjs → chunk-ZXC453V5.mjs} +15 -15
- package/dist/chunk-ZXC453V5.mjs.map +1 -0
- package/dist/experimental.d.mts +1 -1
- package/dist/experimental.d.ts +1 -1
- package/dist/experimental.js +14 -14
- package/dist/experimental.js.map +1 -1
- package/dist/experimental.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{types-B2PyH8vw.d.mts → types-Bjumu7Zt.d.mts} +1 -1
- package/dist/{types-B2PyH8vw.d.ts → types-Bjumu7Zt.d.ts} +1 -1
- package/dist/{useAuth-PQ5yhSW8.d.mts → useAuth-C6dUCIl3.d.mts} +1 -1
- package/dist/{useAuth-C4krT3ZR.d.ts → useAuth-hGxwSzMQ.d.ts} +1 -1
- package/package.json +4 -4
- package/dist/chunk-EDVV4QQ6.mjs.map +0 -1
|
@@ -561,7 +561,7 @@ var SignIn = withClerk(
|
|
|
561
561
|
component,
|
|
562
562
|
mount: clerk.mountSignIn,
|
|
563
563
|
unmount: clerk.unmountSignIn,
|
|
564
|
-
updateProps: clerk.
|
|
564
|
+
updateProps: clerk.__internal_updateProps,
|
|
565
565
|
props,
|
|
566
566
|
rootProps: rendererRootProps
|
|
567
567
|
}
|
|
@@ -582,7 +582,7 @@ var SignUp = withClerk(
|
|
|
582
582
|
component,
|
|
583
583
|
mount: clerk.mountSignUp,
|
|
584
584
|
unmount: clerk.unmountSignUp,
|
|
585
|
-
updateProps: clerk.
|
|
585
|
+
updateProps: clerk.__internal_updateProps,
|
|
586
586
|
props,
|
|
587
587
|
rootProps: rendererRootProps
|
|
588
588
|
}
|
|
@@ -617,7 +617,7 @@ var _UserProfile = withClerk(
|
|
|
617
617
|
component,
|
|
618
618
|
mount: clerk.mountUserProfile,
|
|
619
619
|
unmount: clerk.unmountUserProfile,
|
|
620
|
-
updateProps: clerk.
|
|
620
|
+
updateProps: clerk.__internal_updateProps,
|
|
621
621
|
props: { ...props, customPages },
|
|
622
622
|
rootProps: rendererRootProps
|
|
623
623
|
},
|
|
@@ -661,7 +661,7 @@ var _UserButton = withClerk(
|
|
|
661
661
|
const passableProps = {
|
|
662
662
|
mount: clerk.mountUserButton,
|
|
663
663
|
unmount: clerk.unmountUserButton,
|
|
664
|
-
updateProps: clerk.
|
|
664
|
+
updateProps: clerk.__internal_updateProps,
|
|
665
665
|
props: { ...props, userProfileProps, customMenuItems }
|
|
666
666
|
};
|
|
667
667
|
const portalProps = {
|
|
@@ -740,7 +740,7 @@ var _OrganizationProfile = withClerk(
|
|
|
740
740
|
component,
|
|
741
741
|
mount: clerk.mountOrganizationProfile,
|
|
742
742
|
unmount: clerk.unmountOrganizationProfile,
|
|
743
|
-
updateProps: clerk.
|
|
743
|
+
updateProps: clerk.__internal_updateProps,
|
|
744
744
|
props: { ...props, customPages },
|
|
745
745
|
rootProps: rendererRootProps
|
|
746
746
|
},
|
|
@@ -766,7 +766,7 @@ var CreateOrganization = withClerk(
|
|
|
766
766
|
component,
|
|
767
767
|
mount: clerk.mountCreateOrganization,
|
|
768
768
|
unmount: clerk.unmountCreateOrganization,
|
|
769
|
-
updateProps: clerk.
|
|
769
|
+
updateProps: clerk.__internal_updateProps,
|
|
770
770
|
props,
|
|
771
771
|
rootProps: rendererRootProps
|
|
772
772
|
}
|
|
@@ -802,7 +802,7 @@ var _OrganizationSwitcher = withClerk(
|
|
|
802
802
|
const passableProps = {
|
|
803
803
|
mount: clerk.mountOrganizationSwitcher,
|
|
804
804
|
unmount: clerk.unmountOrganizationSwitcher,
|
|
805
|
-
updateProps: clerk.
|
|
805
|
+
updateProps: clerk.__internal_updateProps,
|
|
806
806
|
props: { ...props, organizationProfileProps },
|
|
807
807
|
rootProps: rendererRootProps,
|
|
808
808
|
component
|
|
@@ -849,7 +849,7 @@ var OrganizationList = withClerk(
|
|
|
849
849
|
component,
|
|
850
850
|
mount: clerk.mountOrganizationList,
|
|
851
851
|
unmount: clerk.unmountOrganizationList,
|
|
852
|
-
updateProps: clerk.
|
|
852
|
+
updateProps: clerk.__internal_updateProps,
|
|
853
853
|
props,
|
|
854
854
|
rootProps: rendererRootProps
|
|
855
855
|
}
|
|
@@ -870,7 +870,7 @@ var GoogleOneTap = withClerk(
|
|
|
870
870
|
component,
|
|
871
871
|
open: clerk.openGoogleOneTap,
|
|
872
872
|
close: clerk.closeGoogleOneTap,
|
|
873
|
-
updateProps: clerk.
|
|
873
|
+
updateProps: clerk.__internal_updateProps,
|
|
874
874
|
props,
|
|
875
875
|
rootProps: rendererRootProps
|
|
876
876
|
}
|
|
@@ -891,7 +891,7 @@ var Waitlist = withClerk(
|
|
|
891
891
|
component,
|
|
892
892
|
mount: clerk.mountWaitlist,
|
|
893
893
|
unmount: clerk.unmountWaitlist,
|
|
894
|
-
updateProps: clerk.
|
|
894
|
+
updateProps: clerk.__internal_updateProps,
|
|
895
895
|
props,
|
|
896
896
|
rootProps: rendererRootProps
|
|
897
897
|
}
|
|
@@ -915,7 +915,7 @@ var PricingTable = withClerk(
|
|
|
915
915
|
component,
|
|
916
916
|
mount: clerk.mountPricingTable,
|
|
917
917
|
unmount: clerk.unmountPricingTable,
|
|
918
|
-
updateProps: clerk.
|
|
918
|
+
updateProps: clerk.__internal_updateProps,
|
|
919
919
|
props,
|
|
920
920
|
rootProps: rendererRootProps
|
|
921
921
|
}
|
|
@@ -936,7 +936,7 @@ var APIKeys = withClerk(
|
|
|
936
936
|
component,
|
|
937
937
|
mount: clerk.mountAPIKeys,
|
|
938
938
|
unmount: clerk.unmountAPIKeys,
|
|
939
|
-
updateProps: clerk.
|
|
939
|
+
updateProps: clerk.__internal_updateProps,
|
|
940
940
|
props,
|
|
941
941
|
rootProps: rendererRootProps
|
|
942
942
|
}
|
|
@@ -957,7 +957,7 @@ var UserAvatar = withClerk(
|
|
|
957
957
|
component,
|
|
958
958
|
mount: clerk.mountUserAvatar,
|
|
959
959
|
unmount: clerk.unmountUserAvatar,
|
|
960
|
-
updateProps: clerk.
|
|
960
|
+
updateProps: clerk.__internal_updateProps,
|
|
961
961
|
props,
|
|
962
962
|
rootProps: rendererRootProps
|
|
963
963
|
}
|
|
@@ -978,7 +978,7 @@ var TaskChooseOrganization = withClerk(
|
|
|
978
978
|
component,
|
|
979
979
|
mount: clerk.mountTaskChooseOrganization,
|
|
980
980
|
unmount: clerk.unmountTaskChooseOrganization,
|
|
981
|
-
updateProps: clerk.
|
|
981
|
+
updateProps: clerk.__internal_updateProps,
|
|
982
982
|
props,
|
|
983
983
|
rootProps: rendererRootProps
|
|
984
984
|
}
|
|
@@ -1008,4 +1008,4 @@ export {
|
|
|
1008
1008
|
UserAvatar,
|
|
1009
1009
|
TaskChooseOrganization
|
|
1010
1010
|
};
|
|
1011
|
-
//# sourceMappingURL=chunk-
|
|
1011
|
+
//# sourceMappingURL=chunk-ZXC453V5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/uiComponents.tsx","../src/utils/childrenUtils.tsx","../src/utils/isConstructor.ts","../src/utils/useMaxAllowedInstancesGuard.tsx","../src/utils/useCustomElementPortal.tsx","../src/utils/useCustomPages.tsx","../src/utils/componentValidation.ts","../src/utils/useCustomMenuItems.tsx","../src/utils/useWaitForComponentMount.ts","../src/components/ClerkHostRenderer.tsx"],"sourcesContent":["import type {\n APIKeysProps,\n CreateOrganizationProps,\n GoogleOneTapProps,\n OrganizationListProps,\n OrganizationProfileProps,\n OrganizationSwitcherProps,\n PricingTableProps,\n SignInProps,\n SignUpProps,\n TaskChooseOrganizationProps,\n UserAvatarProps,\n UserButtonProps,\n UserProfileProps,\n WaitlistProps,\n Without,\n} from '@clerk/shared/types';\nimport { logErrorInDevMode } from '@clerk/shared/utils';\nimport type { PropsWithChildren, ReactNode } from 'react';\nimport React, { createContext, createElement, useContext } from 'react';\n\nimport {\n organizationProfileLinkRenderedError,\n organizationProfilePageRenderedError,\n userButtonMenuActionRenderedError,\n userButtonMenuItemsRenderedError,\n userButtonMenuLinkRenderedError,\n userProfileLinkRenderedError,\n userProfilePageRenderedError,\n} from '../errors/messages';\nimport type {\n CustomPortalsRendererProps,\n MountProps,\n OrganizationProfileLinkProps,\n OrganizationProfilePageProps,\n UserButtonActionProps,\n UserButtonLinkProps,\n UserProfileLinkProps,\n UserProfilePageProps,\n WithClerkProp,\n} from '../types';\nimport {\n useOrganizationProfileCustomPages,\n useSanitizedChildren,\n useUserButtonCustomMenuItems,\n useUserProfileCustomPages,\n} from '../utils';\nimport { useWaitForComponentMount } from '../utils/useWaitForComponentMount';\nimport { ClerkHostRenderer } from './ClerkHostRenderer';\nimport { withClerk } from './withClerk';\n\ntype FallbackProp = {\n /**\n * An optional element to render while the component is mounting.\n */\n fallback?: ReactNode;\n};\n\ntype UserProfileExportType = typeof _UserProfile & {\n Page: typeof UserProfilePage;\n Link: typeof UserProfileLink;\n};\n\ntype UserButtonExportType = typeof _UserButton & {\n UserProfilePage: typeof UserProfilePage;\n UserProfileLink: typeof UserProfileLink;\n MenuItems: typeof MenuItems;\n Action: typeof MenuAction;\n Link: typeof MenuLink;\n /**\n * The `<Outlet />` component can be used in conjunction with `asProvider` in order to control rendering\n * of the `<UserButton />` without affecting its configuration or any custom pages that could be mounted\n * @experimental This API is experimental and may change at any moment.\n */\n __experimental_Outlet: typeof UserButtonOutlet;\n};\n\ntype UserButtonPropsWithoutCustomPages = Without<\n UserButtonProps,\n 'userProfileProps' | '__experimental_asStandalone'\n> & {\n userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance' | 'apiKeysProps'>;\n /**\n * Adding `asProvider` will defer rendering until the `<Outlet />` component is mounted.\n *\n * @experimental This API is experimental and may change at any moment.\n * @default undefined\n */\n __experimental_asProvider?: boolean;\n};\n\ntype OrganizationProfileExportType = typeof _OrganizationProfile & {\n Page: typeof OrganizationProfilePage;\n Link: typeof OrganizationProfileLink;\n};\n\ntype OrganizationSwitcherExportType = typeof _OrganizationSwitcher & {\n OrganizationProfilePage: typeof OrganizationProfilePage;\n OrganizationProfileLink: typeof OrganizationProfileLink;\n /**\n * The `<Outlet />` component can be used in conjunction with `asProvider` in order to control rendering\n * of the `<OrganizationSwitcher />` without affecting its configuration or any custom pages that could be mounted\n *\n * @experimental This API is experimental and may change at any moment.\n */\n __experimental_Outlet: typeof OrganizationSwitcherOutlet;\n};\n\ntype OrganizationSwitcherPropsWithoutCustomPages = Without<\n OrganizationSwitcherProps,\n 'organizationProfileProps' | '__experimental_asStandalone'\n> & {\n organizationProfileProps?: Pick<OrganizationProfileProps, 'appearance'>;\n /**\n * Adding `asProvider` will defer rendering until the `<Outlet />` component is mounted.\n *\n * @experimental This API is experimental and may change at any moment.\n * @default undefined\n */\n __experimental_asProvider?: boolean;\n};\n\nconst CustomPortalsRenderer = (props: CustomPortalsRendererProps) => {\n return (\n <>\n {props?.customPagesPortals?.map((portal, index) => createElement(portal, { key: index }))}\n {props?.customMenuItemsPortals?.map((portal, index) => createElement(portal, { key: index }))}\n </>\n );\n};\n\nexport const SignIn = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<SignInProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountSignIn}\n unmount={clerk.unmountSignIn}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'SignIn', renderWhileLoading: true },\n);\n\nexport const SignUp = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<SignUpProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountSignUp}\n unmount={clerk.unmountSignUp}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'SignUp', renderWhileLoading: true },\n);\n\nexport function UserProfilePage({ children }: PropsWithChildren<UserProfilePageProps>) {\n logErrorInDevMode(userProfilePageRenderedError);\n return <>{children}</>;\n}\n\nexport function UserProfileLink({ children }: PropsWithChildren<UserProfileLinkProps>) {\n logErrorInDevMode(userProfileLinkRenderedError);\n return <>{children}</>;\n}\n\nconst _UserProfile = withClerk(\n ({\n clerk,\n component,\n fallback,\n ...props\n }: WithClerkProp<PropsWithChildren<Without<UserProfileProps, 'customPages'>> & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n const { customPages, customPagesPortals } = useUserProfileCustomPages(props.children);\n return (\n <>\n {shouldShowFallback && fallback}\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountUserProfile}\n unmount={clerk.unmountUserProfile}\n updateProps={(clerk as any).__internal_updateProps}\n props={{ ...props, customPages }}\n rootProps={rendererRootProps}\n >\n <CustomPortalsRenderer customPagesPortals={customPagesPortals} />\n </ClerkHostRenderer>\n </>\n );\n },\n { component: 'UserProfile', renderWhileLoading: true },\n);\n\nexport const UserProfile: UserProfileExportType = Object.assign(_UserProfile, {\n Page: UserProfilePage,\n Link: UserProfileLink,\n});\n\nconst UserButtonContext = createContext<MountProps>({\n mount: () => {},\n unmount: () => {},\n updateProps: () => {},\n});\n\nconst _UserButton = withClerk(\n ({\n clerk,\n component,\n fallback,\n ...props\n }: WithClerkProp<PropsWithChildren<UserButtonPropsWithoutCustomPages> & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n const { customPages, customPagesPortals } = useUserProfileCustomPages(props.children, {\n allowForAnyChildren: !!props.__experimental_asProvider,\n });\n const userProfileProps = { ...props.userProfileProps, customPages };\n const { customMenuItems, customMenuItemsPortals } = useUserButtonCustomMenuItems(props.children, {\n allowForAnyChildren: !!props.__experimental_asProvider,\n });\n const sanitizedChildren = useSanitizedChildren(props.children);\n\n const passableProps = {\n mount: clerk.mountUserButton,\n unmount: clerk.unmountUserButton,\n updateProps: (clerk as any).__internal_updateProps,\n props: { ...props, userProfileProps, customMenuItems },\n };\n const portalProps = {\n customPagesPortals: customPagesPortals,\n customMenuItemsPortals: customMenuItemsPortals,\n };\n\n return (\n <UserButtonContext.Provider value={passableProps}>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n {...passableProps}\n hideRootHtmlElement={!!props.__experimental_asProvider}\n rootProps={rendererRootProps}\n >\n {/*This mimics the previous behaviour before asProvider existed*/}\n {props.__experimental_asProvider ? sanitizedChildren : null}\n <CustomPortalsRenderer {...portalProps} />\n </ClerkHostRenderer>\n )}\n </UserButtonContext.Provider>\n );\n },\n { component: 'UserButton', renderWhileLoading: true },\n);\n\nexport function MenuItems({ children }: PropsWithChildren) {\n logErrorInDevMode(userButtonMenuItemsRenderedError);\n return <>{children}</>;\n}\n\nexport function MenuAction({ children }: PropsWithChildren<UserButtonActionProps>) {\n logErrorInDevMode(userButtonMenuActionRenderedError);\n return <>{children}</>;\n}\n\nexport function MenuLink({ children }: PropsWithChildren<UserButtonLinkProps>) {\n logErrorInDevMode(userButtonMenuLinkRenderedError);\n return <>{children}</>;\n}\n\nexport function UserButtonOutlet(outletProps: Without<UserButtonProps, 'userProfileProps'>) {\n const providerProps = useContext(UserButtonContext);\n\n const portalProps = {\n ...providerProps,\n props: {\n ...providerProps.props,\n ...outletProps,\n },\n } satisfies MountProps;\n\n return <ClerkHostRenderer {...portalProps} />;\n}\n\nexport const UserButton: UserButtonExportType = Object.assign(_UserButton, {\n UserProfilePage,\n UserProfileLink,\n MenuItems,\n Action: MenuAction,\n Link: MenuLink,\n __experimental_Outlet: UserButtonOutlet,\n});\n\nexport function OrganizationProfilePage({ children }: PropsWithChildren<OrganizationProfilePageProps>) {\n logErrorInDevMode(organizationProfilePageRenderedError);\n return <>{children}</>;\n}\n\nexport function OrganizationProfileLink({ children }: PropsWithChildren<OrganizationProfileLinkProps>) {\n logErrorInDevMode(organizationProfileLinkRenderedError);\n return <>{children}</>;\n}\n\nconst _OrganizationProfile = withClerk(\n ({\n clerk,\n component,\n fallback,\n ...props\n }: WithClerkProp<PropsWithChildren<Without<OrganizationProfileProps, 'customPages'>> & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n const { customPages, customPagesPortals } = useOrganizationProfileCustomPages(props.children);\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountOrganizationProfile}\n unmount={clerk.unmountOrganizationProfile}\n updateProps={(clerk as any).__internal_updateProps}\n props={{ ...props, customPages }}\n rootProps={rendererRootProps}\n >\n <CustomPortalsRenderer customPagesPortals={customPagesPortals} />\n </ClerkHostRenderer>\n )}\n </>\n );\n },\n { component: 'OrganizationProfile', renderWhileLoading: true },\n);\n\nexport const OrganizationProfile: OrganizationProfileExportType = Object.assign(_OrganizationProfile, {\n Page: OrganizationProfilePage,\n Link: OrganizationProfileLink,\n});\n\nexport const CreateOrganization = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<CreateOrganizationProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountCreateOrganization}\n unmount={clerk.unmountCreateOrganization}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'CreateOrganization', renderWhileLoading: true },\n);\n\nconst OrganizationSwitcherContext = createContext<MountProps>({\n mount: () => {},\n unmount: () => {},\n updateProps: () => {},\n});\n\nconst _OrganizationSwitcher = withClerk(\n ({\n clerk,\n component,\n fallback,\n ...props\n }: WithClerkProp<PropsWithChildren<OrganizationSwitcherPropsWithoutCustomPages> & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n const { customPages, customPagesPortals } = useOrganizationProfileCustomPages(props.children, {\n allowForAnyChildren: !!props.__experimental_asProvider,\n });\n const organizationProfileProps = { ...props.organizationProfileProps, customPages };\n const sanitizedChildren = useSanitizedChildren(props.children);\n\n const passableProps = {\n mount: clerk.mountOrganizationSwitcher,\n unmount: clerk.unmountOrganizationSwitcher,\n updateProps: (clerk as any).__internal_updateProps,\n props: { ...props, organizationProfileProps },\n rootProps: rendererRootProps,\n component,\n };\n\n /**\n * Prefetch organization list\n */\n clerk.__experimental_prefetchOrganizationSwitcher();\n\n return (\n <OrganizationSwitcherContext.Provider value={passableProps}>\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n {...passableProps}\n hideRootHtmlElement={!!props.__experimental_asProvider}\n >\n {/*This mimics the previous behaviour before asProvider existed*/}\n {props.__experimental_asProvider ? sanitizedChildren : null}\n <CustomPortalsRenderer customPagesPortals={customPagesPortals} />\n </ClerkHostRenderer>\n )}\n </>\n </OrganizationSwitcherContext.Provider>\n );\n },\n { component: 'OrganizationSwitcher', renderWhileLoading: true },\n);\n\nexport function OrganizationSwitcherOutlet(\n outletProps: Without<OrganizationSwitcherProps, 'organizationProfileProps'>,\n) {\n const providerProps = useContext(OrganizationSwitcherContext);\n\n const portalProps = {\n ...providerProps,\n props: {\n ...providerProps.props,\n ...outletProps,\n },\n } satisfies MountProps;\n\n return <ClerkHostRenderer {...portalProps} />;\n}\n\nexport const OrganizationSwitcher: OrganizationSwitcherExportType = Object.assign(_OrganizationSwitcher, {\n OrganizationProfilePage,\n OrganizationProfileLink,\n __experimental_Outlet: OrganizationSwitcherOutlet,\n});\n\nexport const OrganizationList = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<OrganizationListProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountOrganizationList}\n unmount={clerk.unmountOrganizationList}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'OrganizationList', renderWhileLoading: true },\n);\n\nexport const GoogleOneTap = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<GoogleOneTapProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n open={clerk.openGoogleOneTap}\n close={clerk.closeGoogleOneTap}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'GoogleOneTap', renderWhileLoading: true },\n);\n\nexport const Waitlist = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<WaitlistProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountWaitlist}\n unmount={clerk.unmountWaitlist}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'Waitlist', renderWhileLoading: true },\n);\n\nexport const PricingTable = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<PricingTableProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component, {\n // This attribute is added to the PricingTable root element after we've successfully fetched the plans asynchronously.\n selector: '[data-component-status=\"ready\"]',\n });\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountPricingTable}\n unmount={clerk.unmountPricingTable}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'PricingTable', renderWhileLoading: true },\n);\n\n/**\n * @experimental This component is in early access and may change in future releases.\n */\nexport const APIKeys = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<APIKeysProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountAPIKeys}\n unmount={clerk.unmountAPIKeys}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'ApiKeys', renderWhileLoading: true },\n);\n\nexport const UserAvatar = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<UserAvatarProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountUserAvatar}\n unmount={clerk.unmountUserAvatar}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'UserAvatar', renderWhileLoading: true },\n);\n\nexport const TaskChooseOrganization = withClerk(\n ({ clerk, component, fallback, ...props }: WithClerkProp<TaskChooseOrganizationProps & FallbackProp>) => {\n const mountingStatus = useWaitForComponentMount(component);\n const shouldShowFallback = mountingStatus === 'rendering' || !clerk.loaded;\n\n const rendererRootProps = {\n ...(shouldShowFallback && fallback && { style: { display: 'none' } }),\n };\n\n return (\n <>\n {shouldShowFallback && fallback}\n {clerk.loaded && (\n <ClerkHostRenderer\n component={component}\n mount={clerk.mountTaskChooseOrganization}\n unmount={clerk.unmountTaskChooseOrganization}\n updateProps={(clerk as any).__internal_updateProps}\n props={props}\n rootProps={rendererRootProps}\n />\n )}\n </>\n );\n },\n { component: 'TaskChooseOrganization', renderWhileLoading: true },\n);\n","import React from 'react';\n\nimport { errorThrower } from '../errors/errorThrower';\nimport { multipleChildrenInButtonComponent } from '../errors/messages';\n\nexport const assertSingleChild =\n (children: React.ReactNode) =>\n (\n name:\n | 'SignInButton'\n | 'SignUpButton'\n | 'SignOutButton'\n | 'SignInWithMetamaskButton'\n | 'CheckoutButton'\n | 'SubscriptionDetailsButton'\n | 'PlanDetailsButton',\n ) => {\n try {\n return React.Children.only(children);\n } catch {\n return errorThrower.throw(multipleChildrenInButtonComponent(name));\n }\n };\n\nexport const normalizeWithDefaultValue = (children: React.ReactNode | undefined, defaultText: string) => {\n if (!children) {\n children = defaultText;\n }\n if (typeof children === 'string') {\n children = <button>{children}</button>;\n }\n return children;\n};\n\nexport const safeExecute =\n (cb: unknown) =>\n (...args: any) => {\n if (cb && typeof cb === 'function') {\n return cb(...args);\n }\n };\n","export function isConstructor<T>(f: any): f is T {\n return typeof f === 'function';\n}\n","import React from 'react';\n\nimport { errorThrower } from '../errors/errorThrower';\n\nconst counts = new Map<string, number>();\n\nexport function useMaxAllowedInstancesGuard(name: string, error: string, maxCount = 1): void {\n React.useEffect(() => {\n const count = counts.get(name) || 0;\n if (count == maxCount) {\n return errorThrower.throw(error);\n }\n counts.set(name, count + 1);\n\n return () => {\n counts.set(name, (counts.get(name) || 1) - 1);\n };\n }, []);\n}\n\nexport function withMaxAllowedInstancesGuard<P>(\n WrappedComponent: P,\n name: string,\n error: string,\n): P & { displayName: string } {\n // @ts-expect-error - simplified types to preserve generics in P\n const displayName = WrappedComponent.displayName || WrappedComponent.name || name || 'Component';\n const Hoc = (props: P) => {\n useMaxAllowedInstancesGuard(name, error);\n // @ts-expect-error - simplified types to preserve generics in P\n return <WrappedComponent {...(props as any)} />;\n };\n Hoc.displayName = `withMaxAllowedInstancesGuard(${displayName})`;\n // @ts-expect-error - simplified types to preserve generics in P\n return Hoc;\n}\n","import type React from 'react';\nimport { useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport type UseCustomElementPortalParams = {\n component: React.ReactNode;\n id: number;\n};\n\nexport type UseCustomElementPortalReturn = {\n portal: () => React.JSX.Element;\n mount: (node: Element) => void;\n unmount: () => void;\n id: number;\n};\n\n// This function takes a component as prop, and returns functions that mount and unmount\n// the given component into a given node\nexport const useCustomElementPortal = (elements: UseCustomElementPortalParams[]) => {\n const [nodeMap, setNodeMap] = useState<Map<string, Element | null>>(new Map());\n\n return elements.map(el => ({\n id: el.id,\n mount: (node: Element) => setNodeMap(prev => new Map(prev).set(String(el.id), node)),\n unmount: () =>\n setNodeMap(prev => {\n const newMap = new Map(prev);\n newMap.set(String(el.id), null);\n return newMap;\n }),\n portal: () => {\n const node = nodeMap.get(String(el.id));\n return node ? createPortal(el.component, node) : null;\n },\n }));\n};\n","import type { CustomPage } from '@clerk/shared/types';\nimport { logErrorInDevMode } from '@clerk/shared/utils';\nimport type { ReactElement } from 'react';\nimport React from 'react';\n\nimport {\n MenuItems,\n OrganizationProfileLink,\n OrganizationProfilePage,\n UserProfileLink,\n UserProfilePage,\n} from '../components/uiComponents';\nimport { customLinkWrongProps, customPagesIgnoredComponent, customPageWrongProps } from '../errors/messages';\nimport type { UserProfilePageProps } from '../types';\nimport { isThatComponent } from './componentValidation';\nimport type { UseCustomElementPortalParams, UseCustomElementPortalReturn } from './useCustomElementPortal';\nimport { useCustomElementPortal } from './useCustomElementPortal';\n\nexport const useUserProfileCustomPages = (\n children: React.ReactNode | React.ReactNode[],\n options?: UseCustomPagesOptions,\n) => {\n const reorderItemsLabels = ['account', 'security'];\n return useCustomPages(\n {\n children,\n reorderItemsLabels,\n LinkComponent: UserProfileLink,\n PageComponent: UserProfilePage,\n MenuItemsComponent: MenuItems,\n componentName: 'UserProfile',\n },\n options,\n );\n};\n\nexport const useOrganizationProfileCustomPages = (\n children: React.ReactNode | React.ReactNode[],\n options?: UseCustomPagesOptions,\n) => {\n const reorderItemsLabels = ['general', 'members'];\n return useCustomPages(\n {\n children,\n reorderItemsLabels,\n LinkComponent: OrganizationProfileLink,\n PageComponent: OrganizationProfilePage,\n componentName: 'OrganizationProfile',\n },\n options,\n );\n};\n\ntype UseCustomPagesParams = {\n children: React.ReactNode | React.ReactNode[];\n LinkComponent: any;\n PageComponent: any;\n MenuItemsComponent?: any;\n reorderItemsLabels: string[];\n componentName: string;\n};\n\ntype UseCustomPagesOptions = {\n allowForAnyChildren: boolean;\n};\n\ntype CustomPageWithIdType = UserProfilePageProps & { children?: React.ReactNode };\n\n/**\n * Exclude any children that is used for identifying Custom Pages or Custom Items.\n * Passing:\n * ```tsx\n * <UserProfile.Page/>\n * <OrganizationProfile.Link/>\n * <MyComponent>\n * <UserButton.MenuItems/>\n * ```\n * Gives back\n * ```tsx\n * <MyComponent>\n * ````\n */\nexport const useSanitizedChildren = (children: React.ReactNode) => {\n const sanitizedChildren: React.ReactNode[] = [];\n\n const excludedComponents: any[] = [\n OrganizationProfileLink,\n OrganizationProfilePage,\n MenuItems,\n UserProfilePage,\n UserProfileLink,\n ];\n\n React.Children.forEach(children, child => {\n if (!excludedComponents.some(component => isThatComponent(child, component))) {\n sanitizedChildren.push(child);\n }\n });\n\n return sanitizedChildren;\n};\n\nconst useCustomPages = (params: UseCustomPagesParams, options?: UseCustomPagesOptions) => {\n const { children, LinkComponent, PageComponent, MenuItemsComponent, reorderItemsLabels, componentName } = params;\n const { allowForAnyChildren = false } = options || {};\n const validChildren: CustomPageWithIdType[] = [];\n\n React.Children.forEach(children, child => {\n if (\n !isThatComponent(child, PageComponent) &&\n !isThatComponent(child, LinkComponent) &&\n !isThatComponent(child, MenuItemsComponent)\n ) {\n if (child && !allowForAnyChildren) {\n logErrorInDevMode(customPagesIgnoredComponent(componentName));\n }\n return;\n }\n\n const { props } = child as ReactElement;\n\n const { children, label, url, labelIcon } = props;\n\n if (isThatComponent(child, PageComponent)) {\n if (isReorderItem(props, reorderItemsLabels)) {\n // This is a reordering item\n validChildren.push({ label });\n } else if (isCustomPage(props)) {\n // this is a custom page\n validChildren.push({ label, labelIcon, children, url });\n } else {\n logErrorInDevMode(customPageWrongProps(componentName));\n return;\n }\n }\n\n if (isThatComponent(child, LinkComponent)) {\n if (isExternalLink(props)) {\n // This is an external link\n validChildren.push({ label, labelIcon, url });\n } else {\n logErrorInDevMode(customLinkWrongProps(componentName));\n return;\n }\n }\n });\n\n const customPageContents: UseCustomElementPortalParams[] = [];\n const customPageLabelIcons: UseCustomElementPortalParams[] = [];\n const customLinkLabelIcons: UseCustomElementPortalParams[] = [];\n\n validChildren.forEach((cp, index) => {\n if (isCustomPage(cp)) {\n customPageContents.push({ component: cp.children, id: index });\n customPageLabelIcons.push({ component: cp.labelIcon, id: index });\n return;\n }\n if (isExternalLink(cp)) {\n customLinkLabelIcons.push({ component: cp.labelIcon, id: index });\n }\n });\n\n const customPageContentsPortals = useCustomElementPortal(customPageContents);\n const customPageLabelIconsPortals = useCustomElementPortal(customPageLabelIcons);\n const customLinkLabelIconsPortals = useCustomElementPortal(customLinkLabelIcons);\n\n const customPages: CustomPage[] = [];\n const customPagesPortals: React.ComponentType[] = [];\n\n validChildren.forEach((cp, index) => {\n if (isReorderItem(cp, reorderItemsLabels)) {\n customPages.push({ label: cp.label });\n return;\n }\n if (isCustomPage(cp)) {\n const {\n portal: contentPortal,\n mount,\n unmount,\n } = customPageContentsPortals.find(p => p.id === index) as UseCustomElementPortalReturn;\n const {\n portal: labelPortal,\n mount: mountIcon,\n unmount: unmountIcon,\n } = customPageLabelIconsPortals.find(p => p.id === index) as UseCustomElementPortalReturn;\n customPages.push({ label: cp.label, url: cp.url, mount, unmount, mountIcon, unmountIcon });\n customPagesPortals.push(contentPortal);\n customPagesPortals.push(labelPortal);\n return;\n }\n if (isExternalLink(cp)) {\n const {\n portal: labelPortal,\n mount: mountIcon,\n unmount: unmountIcon,\n } = customLinkLabelIconsPortals.find(p => p.id === index) as UseCustomElementPortalReturn;\n customPages.push({ label: cp.label, url: cp.url, mountIcon, unmountIcon });\n customPagesPortals.push(labelPortal);\n return;\n }\n });\n\n return { customPages, customPagesPortals };\n};\n\nconst isReorderItem = (childProps: any, validItems: string[]): boolean => {\n const { children, label, url, labelIcon } = childProps;\n return !children && !url && !labelIcon && validItems.some(v => v === label);\n};\n\nconst isCustomPage = (childProps: any): boolean => {\n const { children, label, url, labelIcon } = childProps;\n return !!children && !!url && !!labelIcon && !!label;\n};\n\nconst isExternalLink = (childProps: any): boolean => {\n const { children, label, url, labelIcon } = childProps;\n return !children && !!url && !!labelIcon && !!label;\n};\n","import React from 'react';\n\nexport const isThatComponent = (v: any, component: React.ReactNode): v is React.ReactNode => {\n return !!v && React.isValidElement(v) && (v as React.ReactElement)?.type === component;\n};\n","import type { CustomMenuItem } from '@clerk/shared/types';\nimport { logErrorInDevMode } from '@clerk/shared/utils';\nimport type { ReactElement } from 'react';\nimport React from 'react';\n\nimport { MenuAction, MenuItems, MenuLink, UserProfileLink, UserProfilePage } from '../components/uiComponents';\nimport {\n customMenuItemsIgnoredComponent,\n userButtonIgnoredComponent,\n userButtonMenuItemLinkWrongProps,\n userButtonMenuItemsActionWrongsProps,\n} from '../errors/messages';\nimport type { UserButtonActionProps, UserButtonLinkProps } from '../types';\nimport { isThatComponent } from './componentValidation';\nimport type { UseCustomElementPortalParams, UseCustomElementPortalReturn } from './useCustomElementPortal';\nimport { useCustomElementPortal } from './useCustomElementPortal';\n\nexport const useUserButtonCustomMenuItems = (\n children: React.ReactNode | React.ReactNode[],\n options?: { allowForAnyChildren?: boolean },\n) => {\n const reorderItemsLabels = ['manageAccount', 'signOut'];\n return useCustomMenuItems({\n children,\n reorderItemsLabels,\n MenuItemsComponent: MenuItems,\n MenuActionComponent: MenuAction,\n MenuLinkComponent: MenuLink,\n UserProfileLinkComponent: UserProfileLink,\n UserProfilePageComponent: UserProfilePage,\n allowForAnyChildren: options?.allowForAnyChildren ?? false,\n });\n};\n\ntype UseCustomMenuItemsParams = {\n children: React.ReactNode | React.ReactNode[];\n MenuItemsComponent?: any;\n MenuActionComponent?: any;\n MenuLinkComponent?: any;\n UserProfileLinkComponent?: any;\n UserProfilePageComponent?: any;\n reorderItemsLabels: string[];\n allowForAnyChildren?: boolean;\n};\n\ntype CustomMenuItemType = UserButtonActionProps | UserButtonLinkProps;\n\nconst useCustomMenuItems = ({\n children,\n MenuItemsComponent,\n MenuActionComponent,\n MenuLinkComponent,\n UserProfileLinkComponent,\n UserProfilePageComponent,\n reorderItemsLabels,\n allowForAnyChildren = false,\n}: UseCustomMenuItemsParams) => {\n const validChildren: CustomMenuItemType[] = [];\n const customMenuItems: CustomMenuItem[] = [];\n const customMenuItemsPortals: React.ComponentType[] = [];\n\n React.Children.forEach(children, child => {\n if (\n !isThatComponent(child, MenuItemsComponent) &&\n !isThatComponent(child, UserProfileLinkComponent) &&\n !isThatComponent(child, UserProfilePageComponent)\n ) {\n if (child && !allowForAnyChildren) {\n logErrorInDevMode(userButtonIgnoredComponent);\n }\n return;\n }\n\n // Ignore UserProfileLinkComponent and UserProfilePageComponent\n if (isThatComponent(child, UserProfileLinkComponent) || isThatComponent(child, UserProfilePageComponent)) {\n return;\n }\n\n // Menu items children\n const { props } = child as ReactElement;\n\n React.Children.forEach(props.children, child => {\n if (!isThatComponent(child, MenuActionComponent) && !isThatComponent(child, MenuLinkComponent)) {\n if (child) {\n logErrorInDevMode(customMenuItemsIgnoredComponent);\n }\n\n return;\n }\n\n const { props } = child as ReactElement;\n\n const { label, labelIcon, href, onClick, open } = props;\n\n if (isThatComponent(child, MenuActionComponent)) {\n if (isReorderItem(props, reorderItemsLabels)) {\n // This is a reordering item\n validChildren.push({ label });\n } else if (isCustomMenuItem(props)) {\n const baseItem = {\n label,\n labelIcon,\n };\n\n if (onClick !== undefined) {\n validChildren.push({\n ...baseItem,\n onClick,\n });\n } else if (open !== undefined) {\n validChildren.push({\n ...baseItem,\n open: open.startsWith('/') ? open : `/${open}`,\n });\n } else {\n // Handle the case where neither onClick nor open is defined\n logErrorInDevMode('Custom menu item must have either onClick or open property');\n return;\n }\n } else {\n logErrorInDevMode(userButtonMenuItemsActionWrongsProps);\n return;\n }\n }\n\n if (isThatComponent(child, MenuLinkComponent)) {\n if (isExternalLink(props)) {\n validChildren.push({ label, labelIcon, href });\n } else {\n logErrorInDevMode(userButtonMenuItemLinkWrongProps);\n return;\n }\n }\n });\n });\n\n const customMenuItemLabelIcons: UseCustomElementPortalParams[] = [];\n const customLinkLabelIcons: UseCustomElementPortalParams[] = [];\n validChildren.forEach((mi, index) => {\n if (isCustomMenuItem(mi)) {\n customMenuItemLabelIcons.push({ component: mi.labelIcon, id: index });\n }\n if (isExternalLink(mi)) {\n customLinkLabelIcons.push({ component: mi.labelIcon, id: index });\n }\n });\n\n const customMenuItemLabelIconsPortals = useCustomElementPortal(customMenuItemLabelIcons);\n const customLinkLabelIconsPortals = useCustomElementPortal(customLinkLabelIcons);\n\n validChildren.forEach((mi, index) => {\n if (isReorderItem(mi, reorderItemsLabels)) {\n customMenuItems.push({\n label: mi.label,\n });\n }\n if (isCustomMenuItem(mi)) {\n const {\n portal: iconPortal,\n mount: mountIcon,\n unmount: unmountIcon,\n } = customMenuItemLabelIconsPortals.find(p => p.id === index) as UseCustomElementPortalReturn;\n const menuItem: CustomMenuItem = {\n label: mi.label,\n mountIcon,\n unmountIcon,\n };\n\n if ('onClick' in mi) {\n menuItem.onClick = mi.onClick;\n } else if ('open' in mi) {\n menuItem.open = mi.open;\n }\n customMenuItems.push(menuItem);\n customMenuItemsPortals.push(iconPortal);\n }\n if (isExternalLink(mi)) {\n const {\n portal: iconPortal,\n mount: mountIcon,\n unmount: unmountIcon,\n } = customLinkLabelIconsPortals.find(p => p.id === index) as UseCustomElementPortalReturn;\n customMenuItems.push({\n label: mi.label,\n href: mi.href,\n mountIcon,\n unmountIcon,\n });\n customMenuItemsPortals.push(iconPortal);\n }\n });\n\n return { customMenuItems, customMenuItemsPortals };\n};\n\nconst isReorderItem = (childProps: any, validItems: string[]): boolean => {\n const { children, label, onClick, labelIcon } = childProps;\n return !children && !onClick && !labelIcon && validItems.some(v => v === label);\n};\n\nconst isCustomMenuItem = (childProps: any): childProps is UserButtonActionProps => {\n const { label, labelIcon, onClick, open } = childProps;\n return !!labelIcon && !!label && (typeof onClick === 'function' || typeof open === 'string');\n};\n\nconst isExternalLink = (childProps: any): childProps is UserButtonLinkProps => {\n const { label, href, labelIcon } = childProps;\n return !!href && !!labelIcon && !!label;\n};\n","import { useEffect, useRef, useState } from 'react';\n\nconst createAwaitableMutationObserver = (\n globalOptions: MutationObserverInit & {\n isReady: (el: HTMLElement | null, selector: string) => boolean;\n },\n) => {\n const isReady = globalOptions?.isReady;\n\n return (options: { selector: string; root?: HTMLElement | null; timeout?: number }) =>\n new Promise<void>((resolve, reject) => {\n const { root = document?.body, selector, timeout = 0 } = options;\n\n if (!root) {\n reject(new Error('No root element provided'));\n return;\n }\n\n let elementToWatch: HTMLElement | null = root;\n if (selector) {\n elementToWatch = root?.querySelector(selector);\n }\n\n // Initial readiness check\n if (isReady(elementToWatch, selector)) {\n resolve();\n return;\n }\n\n // Set up a MutationObserver to detect when the element has children\n const observer = new MutationObserver(mutationsList => {\n for (const mutation of mutationsList) {\n if (!elementToWatch && selector) {\n elementToWatch = root?.querySelector(selector);\n }\n\n if (\n (globalOptions.childList && mutation.type === 'childList') ||\n (globalOptions.attributes && mutation.type === 'attributes')\n ) {\n if (isReady(elementToWatch, selector)) {\n observer.disconnect();\n resolve();\n return;\n }\n }\n }\n });\n\n observer.observe(root, globalOptions);\n\n // Set up an optional timeout to reject the promise if the element never gets child nodes\n if (timeout > 0) {\n setTimeout(() => {\n observer.disconnect();\n reject(new Error(`Timeout waiting for ${selector}`));\n }, timeout);\n }\n });\n};\n\nconst waitForElementChildren = createAwaitableMutationObserver({\n childList: true,\n subtree: true,\n isReady: (el, selector) => !!el?.childElementCount && el?.matches?.(selector) && el.childElementCount > 0,\n});\n\n/**\n * Detect when a Clerk component has mounted by watching DOM updates to an element with a `data-clerk-component=\"${component}\"` property.\n */\nexport function useWaitForComponentMount(\n component?: string,\n options?: { selector: string },\n): 'rendering' | 'rendered' | 'error' {\n const watcherRef = useRef<Promise<void>>();\n const [status, setStatus] = useState<'rendering' | 'rendered' | 'error'>('rendering');\n\n useEffect(() => {\n if (!component) {\n throw new Error('Clerk: no component name provided, unable to detect mount.');\n }\n\n if (typeof window !== 'undefined' && !watcherRef.current) {\n const defaultSelector = `[data-clerk-component=\"${component}\"]`;\n const selector = options?.selector;\n watcherRef.current = waitForElementChildren({\n selector: selector\n ? // Allows for `[data-clerk-component=\"xxxx\"][data-some-attribute=\"123\"] .my-class`\n defaultSelector + selector\n : defaultSelector,\n })\n .then(() => {\n setStatus('rendered');\n })\n .catch(() => {\n setStatus('error');\n });\n }\n }, [component, options?.selector]);\n\n return status;\n}\n","import { without } from '@clerk/shared/object';\nimport { isDeeplyEqual } from '@clerk/shared/react';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport type { MountProps, OpenProps } from '../types';\n\nconst isMountProps = (props: any): props is MountProps => {\n return 'mount' in props;\n};\n\nconst isOpenProps = (props: any): props is OpenProps => {\n return 'open' in props;\n};\n\nconst stripMenuItemIconHandlers = (\n menuItems?: Array<{\n mountIcon?: (el: HTMLDivElement) => void;\n unmountIcon?: (el: HTMLDivElement) => void;\n [key: string]: any;\n }>,\n) => {\n return menuItems?.map(({ mountIcon, unmountIcon, ...rest }) => rest);\n};\n\n// README: <ClerkHostRenderer/> should be a class pure component in order for mount and unmount\n// lifecycle props to be invoked correctly. Replacing the class component with a\n// functional component wrapped with a React.memo is not identical to the original\n// class implementation due to React intricacies such as the useEffect’s cleanup\n// seems to run AFTER unmount, while componentWillUnmount runs BEFORE.\n\n// More information can be found at https://clerk.slack.com/archives/C015S0BGH8R/p1624891993016300\n\n// The function Portal implementation is commented out for future reference.\n\n// const Portal = React.memo(({ props, mount, unmount }: MountProps) => {\n// const portalRef = React.createRef<HTMLDivElement>();\n\n// useEffect(() => {\n// if (portalRef.current) {\n// mount(portalRef.current, props);\n// }\n// return () => {\n// if (portalRef.current) {\n// unmount(portalRef.current);\n// }\n// };\n// }, []);\n\n// return <div ref={portalRef} />;\n// });\n\n// Portal.displayName = 'ClerkPortal';\n\n/**\n * Used to orchestrate mounting of Clerk components in a host React application.\n * Components are rendered into a specific DOM node using mount/unmount methods provided by the Clerk class.\n */\nexport class ClerkHostRenderer extends React.PureComponent<\n PropsWithChildren<\n (MountProps | OpenProps) & {\n component?: string;\n hideRootHtmlElement?: boolean;\n rootProps?: JSX.IntrinsicElements['div'];\n }\n >\n> {\n private rootRef = React.createRef<HTMLDivElement>();\n\n componentDidUpdate(_prevProps: Readonly<MountProps | OpenProps>) {\n if (!isMountProps(_prevProps) || !isMountProps(this.props)) {\n return;\n }\n\n // Remove children and customPages from props before comparing\n // children might hold circular references which deepEqual can't handle\n // and the implementation of customPages relies on props getting new references\n const prevProps = without(_prevProps.props, 'customPages', 'customMenuItems', 'children');\n const newProps = without(this.props.props, 'customPages', 'customMenuItems', 'children');\n\n // instead, we simply use the length of customPages to determine if it changed or not\n const customPagesChanged = prevProps.customPages?.length !== newProps.customPages?.length;\n const customMenuItemsChanged = prevProps.customMenuItems?.length !== newProps.customMenuItems?.length;\n\n // Strip out mountIcon and unmountIcon handlers since they're always generated as new function references,\n // which would cause unnecessary re-renders in deep equality checks\n const prevMenuItemsWithoutHandlers = stripMenuItemIconHandlers(_prevProps.props.customMenuItems);\n const newMenuItemsWithoutHandlers = stripMenuItemIconHandlers(this.props.props.customMenuItems);\n\n if (\n !isDeeplyEqual(prevProps, newProps) ||\n !isDeeplyEqual(prevMenuItemsWithoutHandlers, newMenuItemsWithoutHandlers) ||\n customPagesChanged ||\n customMenuItemsChanged\n ) {\n if (this.rootRef.current) {\n this.props.updateProps({ node: this.rootRef.current, props: this.props.props });\n }\n }\n }\n\n componentDidMount() {\n if (this.rootRef.current) {\n if (isMountProps(this.props)) {\n this.props.mount(this.rootRef.current, this.props.props);\n }\n\n if (isOpenProps(this.props)) {\n this.props.open(this.props.props);\n }\n }\n }\n\n componentWillUnmount() {\n if (this.rootRef.current) {\n if (isMountProps(this.props)) {\n this.props.unmount(this.rootRef.current);\n }\n if (isOpenProps(this.props)) {\n this.props.close();\n }\n }\n }\n\n render() {\n const { hideRootHtmlElement = false } = this.props;\n const rootAttributes = {\n ref: this.rootRef,\n ...this.props.rootProps,\n ...(this.props.component && { 'data-clerk-component': this.props.component }),\n };\n\n return (\n <>\n {!hideRootHtmlElement && <div {...rootAttributes} />}\n {this.props.children}\n </>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAAS,qBAAAA,0BAAyB;AAElC,OAAOC,UAAS,eAAe,eAAe,kBAAkB;;;ACnBhE,OAAO,WAAW;AAKX,IAAM,oBACX,CAAC,aACD,CACE,SAQG;AACH,MAAI;AACF,WAAO,MAAM,SAAS,KAAK,QAAQ;AAAA,EACrC,QAAQ;AACN,WAAO,aAAa,MAAM,kCAAkC,IAAI,CAAC;AAAA,EACnE;AACF;AAEK,IAAM,4BAA4B,CAAC,UAAuC,gBAAwB;AACvG,MAAI,CAAC,UAAU;AACb,eAAW;AAAA,EACb;AACA,MAAI,OAAO,aAAa,UAAU;AAChC,eAAW,oCAAC,gBAAQ,QAAS;AAAA,EAC/B;AACA,SAAO;AACT;AAEO,IAAM,cACX,CAAC,OACD,IAAI,SAAc;AAChB,MAAI,MAAM,OAAO,OAAO,YAAY;AAClC,WAAO,GAAG,GAAG,IAAI;AAAA,EACnB;AACF;;;ACxCK,SAAS,cAAiB,GAAgB;AAC/C,SAAO,OAAO,MAAM;AACtB;;;ACFA,OAAOC,YAAW;AAIlB,IAAM,SAAS,oBAAI,IAAoB;AAEhC,SAAS,4BAA4B,MAAc,OAAe,WAAW,GAAS;AAC3F,EAAAC,OAAM,UAAU,MAAM;AACpB,UAAM,QAAQ,OAAO,IAAI,IAAI,KAAK;AAClC,QAAI,SAAS,UAAU;AACrB,aAAO,aA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AAG,MAAM,MAAqD;AAC3F,UAAM,iBAAiB,yBAAyB,SAAS;AACzD,UAAM,qBAAqB,mBAAmB,eAAe,CAAC,MAAM;AAEpE,UAAM,oBAAoB;AAAA,MACxB,GAAI,sBAAsB,YAAY,EAAE,OAAO,EAAE,SAAS,OAAO,EAAE;AAAA,IACrE;AAEA,WACE,gBAAAA,OAAA,cAAAA,OAAA,gBACG,sBAAsB,UACtB,MAAM,UACL,gBAAAA,OAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO,MAAM;AAAA,QACb,SAAS,MAAM;AAAA,QACf,aAAc,MAAc;AAAA,QAC5B;AAAA,QACA,WAAW;AAAA;AAAA,IACb,CAEJ;AAAA,EAEJ;AAAA,EACA,EAAE,WAAW,cAAc,oBAAoB,KAAK;AACtD;AAEO,IAAM,yBAAyB;AAAA,EACpC,CAAC,EAAE,OAAO,WAAW,UAAU,GAAG,MAAM,MAAiE;AACvG,UAAM,iBAAiB,yBAAyB,SAAS;AACzD,UAAM,qBAAqB,mBAAmB,eAAe,CAAC,MAAM;AAEpE,UAAM,oBAAoB;AAAA,MACxB,GAAI,sBAAsB,YAAY,EAAE,OAAO,EAAE,SAAS,OAAO,EAAE;AAAA,IACrE;AAEA,WACE,gBAAAA,OAAA,cAAAA,OAAA,gBACG,sBAAsB,UACtB,MAAM,UACL,gBAAAA,OAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO,MAAM;AAAA,QACb,SAAS,MAAM;AAAA,QACf,aAAc,MAAc;AAAA,QAC5B;AAAA,QACA,WAAW;AAAA;AAAA,IACb,CAEJ;AAAA,EAEJ;AAAA,EACA,EAAE,WAAW,0BAA0B,oBAAoB,KAAK;AAClE;","names":["logErrorInDevMode","React","React","React","React","React","React","children","logErrorInDevMode","React","React","logErrorInDevMode","child","props","isReorderItem","isExternalLink","useState","React","React","logErrorInDevMode"]}
|
package/dist/experimental.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _clerk_shared_types from '@clerk/shared/types';
|
|
|
2
2
|
import { __experimental_CheckoutButtonProps, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
3
3
|
export { __experimental_CheckoutButtonProps as CheckoutButtonProps, __experimental_PlanDetailsButtonProps as PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps as SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { W as WithClerkProp } from './types-
|
|
5
|
+
import { W as WithClerkProp } from './types-Bjumu7Zt.mjs';
|
|
6
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
7
|
import '@clerk/shared/ui';
|
|
8
8
|
import '@clerk/ui/internal';
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _clerk_shared_types from '@clerk/shared/types';
|
|
|
2
2
|
import { __experimental_CheckoutButtonProps, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
3
3
|
export { __experimental_CheckoutButtonProps as CheckoutButtonProps, __experimental_PlanDetailsButtonProps as PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps as SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { W as WithClerkProp } from './types-
|
|
5
|
+
import { W as WithClerkProp } from './types-Bjumu7Zt.js';
|
|
6
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
7
|
import '@clerk/shared/ui';
|
|
8
8
|
import '@clerk/ui/internal';
|
package/dist/experimental.js
CHANGED
|
@@ -431,7 +431,7 @@ var SignIn = withClerk(
|
|
|
431
431
|
component,
|
|
432
432
|
mount: clerk.mountSignIn,
|
|
433
433
|
unmount: clerk.unmountSignIn,
|
|
434
|
-
updateProps: clerk.
|
|
434
|
+
updateProps: clerk.__internal_updateProps,
|
|
435
435
|
props,
|
|
436
436
|
rootProps: rendererRootProps
|
|
437
437
|
}
|
|
@@ -452,7 +452,7 @@ var SignUp = withClerk(
|
|
|
452
452
|
component,
|
|
453
453
|
mount: clerk.mountSignUp,
|
|
454
454
|
unmount: clerk.unmountSignUp,
|
|
455
|
-
updateProps: clerk.
|
|
455
|
+
updateProps: clerk.__internal_updateProps,
|
|
456
456
|
props,
|
|
457
457
|
rootProps: rendererRootProps
|
|
458
458
|
}
|
|
@@ -487,7 +487,7 @@ var _UserProfile = withClerk(
|
|
|
487
487
|
component,
|
|
488
488
|
mount: clerk.mountUserProfile,
|
|
489
489
|
unmount: clerk.unmountUserProfile,
|
|
490
|
-
updateProps: clerk.
|
|
490
|
+
updateProps: clerk.__internal_updateProps,
|
|
491
491
|
props: { ...props, customPages },
|
|
492
492
|
rootProps: rendererRootProps
|
|
493
493
|
},
|
|
@@ -531,7 +531,7 @@ var _UserButton = withClerk(
|
|
|
531
531
|
const passableProps = {
|
|
532
532
|
mount: clerk.mountUserButton,
|
|
533
533
|
unmount: clerk.unmountUserButton,
|
|
534
|
-
updateProps: clerk.
|
|
534
|
+
updateProps: clerk.__internal_updateProps,
|
|
535
535
|
props: { ...props, userProfileProps, customMenuItems }
|
|
536
536
|
};
|
|
537
537
|
const portalProps = {
|
|
@@ -610,7 +610,7 @@ var _OrganizationProfile = withClerk(
|
|
|
610
610
|
component,
|
|
611
611
|
mount: clerk.mountOrganizationProfile,
|
|
612
612
|
unmount: clerk.unmountOrganizationProfile,
|
|
613
|
-
updateProps: clerk.
|
|
613
|
+
updateProps: clerk.__internal_updateProps,
|
|
614
614
|
props: { ...props, customPages },
|
|
615
615
|
rootProps: rendererRootProps
|
|
616
616
|
},
|
|
@@ -636,7 +636,7 @@ var CreateOrganization = withClerk(
|
|
|
636
636
|
component,
|
|
637
637
|
mount: clerk.mountCreateOrganization,
|
|
638
638
|
unmount: clerk.unmountCreateOrganization,
|
|
639
|
-
updateProps: clerk.
|
|
639
|
+
updateProps: clerk.__internal_updateProps,
|
|
640
640
|
props,
|
|
641
641
|
rootProps: rendererRootProps
|
|
642
642
|
}
|
|
@@ -672,7 +672,7 @@ var _OrganizationSwitcher = withClerk(
|
|
|
672
672
|
const passableProps = {
|
|
673
673
|
mount: clerk.mountOrganizationSwitcher,
|
|
674
674
|
unmount: clerk.unmountOrganizationSwitcher,
|
|
675
|
-
updateProps: clerk.
|
|
675
|
+
updateProps: clerk.__internal_updateProps,
|
|
676
676
|
props: { ...props, organizationProfileProps },
|
|
677
677
|
rootProps: rendererRootProps,
|
|
678
678
|
component
|
|
@@ -719,7 +719,7 @@ var OrganizationList = withClerk(
|
|
|
719
719
|
component,
|
|
720
720
|
mount: clerk.mountOrganizationList,
|
|
721
721
|
unmount: clerk.unmountOrganizationList,
|
|
722
|
-
updateProps: clerk.
|
|
722
|
+
updateProps: clerk.__internal_updateProps,
|
|
723
723
|
props,
|
|
724
724
|
rootProps: rendererRootProps
|
|
725
725
|
}
|
|
@@ -740,7 +740,7 @@ var GoogleOneTap = withClerk(
|
|
|
740
740
|
component,
|
|
741
741
|
open: clerk.openGoogleOneTap,
|
|
742
742
|
close: clerk.closeGoogleOneTap,
|
|
743
|
-
updateProps: clerk.
|
|
743
|
+
updateProps: clerk.__internal_updateProps,
|
|
744
744
|
props,
|
|
745
745
|
rootProps: rendererRootProps
|
|
746
746
|
}
|
|
@@ -761,7 +761,7 @@ var Waitlist = withClerk(
|
|
|
761
761
|
component,
|
|
762
762
|
mount: clerk.mountWaitlist,
|
|
763
763
|
unmount: clerk.unmountWaitlist,
|
|
764
|
-
updateProps: clerk.
|
|
764
|
+
updateProps: clerk.__internal_updateProps,
|
|
765
765
|
props,
|
|
766
766
|
rootProps: rendererRootProps
|
|
767
767
|
}
|
|
@@ -785,7 +785,7 @@ var PricingTable = withClerk(
|
|
|
785
785
|
component,
|
|
786
786
|
mount: clerk.mountPricingTable,
|
|
787
787
|
unmount: clerk.unmountPricingTable,
|
|
788
|
-
updateProps: clerk.
|
|
788
|
+
updateProps: clerk.__internal_updateProps,
|
|
789
789
|
props,
|
|
790
790
|
rootProps: rendererRootProps
|
|
791
791
|
}
|
|
@@ -806,7 +806,7 @@ var APIKeys = withClerk(
|
|
|
806
806
|
component,
|
|
807
807
|
mount: clerk.mountAPIKeys,
|
|
808
808
|
unmount: clerk.unmountAPIKeys,
|
|
809
|
-
updateProps: clerk.
|
|
809
|
+
updateProps: clerk.__internal_updateProps,
|
|
810
810
|
props,
|
|
811
811
|
rootProps: rendererRootProps
|
|
812
812
|
}
|
|
@@ -827,7 +827,7 @@ var UserAvatar = withClerk(
|
|
|
827
827
|
component,
|
|
828
828
|
mount: clerk.mountUserAvatar,
|
|
829
829
|
unmount: clerk.unmountUserAvatar,
|
|
830
|
-
updateProps: clerk.
|
|
830
|
+
updateProps: clerk.__internal_updateProps,
|
|
831
831
|
props,
|
|
832
832
|
rootProps: rendererRootProps
|
|
833
833
|
}
|
|
@@ -848,7 +848,7 @@ var TaskChooseOrganization = withClerk(
|
|
|
848
848
|
component,
|
|
849
849
|
mount: clerk.mountTaskChooseOrganization,
|
|
850
850
|
unmount: clerk.unmountTaskChooseOrganization,
|
|
851
|
-
updateProps: clerk.
|
|
851
|
+
updateProps: clerk.__internal_updateProps,
|
|
852
852
|
props,
|
|
853
853
|
rootProps: rendererRootProps
|
|
854
854
|
}
|