@clerk/clerk-react
Advanced tools
Comparing version 5.22.12 to 5.22.13-snapshot.v20250211113352
@@ -1,1 +0,2 @@ | ||
export { EmailLinkErrorCode, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError } from '@clerk/shared/error'; | ||
export { isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, EmailLinkErrorCode, } from '@clerk/shared/error'; | ||
//# sourceMappingURL=errors.d.ts.map |
@@ -1,224 +0,6 @@ | ||
import * as _clerk_types from '@clerk/types'; | ||
import { Without, SignInProps, SignUpProps, CreateOrganizationProps, OrganizationListProps, WaitlistProps, UserProfileProps, UserButtonProps, OrganizationProfileProps, OrganizationSwitcherProps, SignOutOptions, SignInResource, SignUpResource, EmailAddressResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, StartEmailLinkFlowParams, UseSignInReturn, UseSignUpReturn } from '@clerk/types'; | ||
import React, { ReactNode, PropsWithChildren } from 'react'; | ||
import { W as WithClerkProp, U as UserProfilePageProps, a as UserProfileLinkProps, b as UserButtonActionProps, c as UserButtonLinkProps, O as OrganizationProfilePageProps, d as OrganizationProfileLinkProps, S as SignInButtonProps, e as SignUpButtonProps, f as SignInWithMetamaskButtonProps, C as ClerkProviderProps } from './useAuth-DOW6TYyu.js'; | ||
export { A as AuthenticateWithRedirectCallback, B as BrowserClerk, h as ClerkLoaded, i as ClerkLoading, g as ClerkProp, H as HeadlessBrowserClerk, P as Protect, p as ProtectProps, n as RedirectToCreateOrganization, o as RedirectToOrganizationProfile, R as RedirectToSignIn, l as RedirectToSignUp, m as RedirectToUserProfile, k as SignedIn, j as SignedOut, q as useAuth } from './useAuth-DOW6TYyu.js'; | ||
export { useClerk, useOrganization, useOrganizationList, useReverification, useSession, useSessionList, useUser } from '@clerk/shared/react'; | ||
type FallbackProp = { | ||
/** | ||
* An optional element to render while the component is mounting. | ||
*/ | ||
fallback?: ReactNode; | ||
}; | ||
type UserProfileExportType = typeof _UserProfile & { | ||
Page: typeof UserProfilePage; | ||
Link: typeof UserProfileLink; | ||
}; | ||
type UserButtonExportType = typeof _UserButton & { | ||
UserProfilePage: typeof UserProfilePage; | ||
UserProfileLink: typeof UserProfileLink; | ||
MenuItems: typeof MenuItems; | ||
Action: typeof MenuAction; | ||
Link: typeof MenuLink; | ||
/** | ||
* The `<Outlet />` component can be used in conjunction with `asProvider` in order to control rendering | ||
* of the `<UserButton />` without affecting its configuration or any custom pages that could be mounted | ||
* @experimental This API is experimental and may change at any moment. | ||
*/ | ||
__experimental_Outlet: typeof UserButtonOutlet; | ||
}; | ||
type UserButtonPropsWithoutCustomPages = Without<UserButtonProps, 'userProfileProps' | '__experimental_asStandalone'> & { | ||
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance'>; | ||
/** | ||
* Adding `asProvider` will defer rendering until the `<Outlet />` component is mounted. | ||
* This API is experimental and may change at any moment. | ||
* @experimental | ||
* @default undefined | ||
*/ | ||
__experimental_asProvider?: boolean; | ||
}; | ||
type OrganizationProfileExportType = typeof _OrganizationProfile & { | ||
Page: typeof OrganizationProfilePage; | ||
Link: typeof OrganizationProfileLink; | ||
}; | ||
type OrganizationSwitcherExportType = typeof _OrganizationSwitcher & { | ||
OrganizationProfilePage: typeof OrganizationProfilePage; | ||
OrganizationProfileLink: typeof OrganizationProfileLink; | ||
/** | ||
* The `<Outlet />` component can be used in conjunction with `asProvider` in order to control rendering | ||
* of the `<OrganizationSwitcher />` without affecting its configuration or any custom pages that could be mounted | ||
* @experimental This API is experimental and may change at any moment. | ||
*/ | ||
__experimental_Outlet: typeof OrganizationSwitcherOutlet; | ||
}; | ||
type OrganizationSwitcherPropsWithoutCustomPages = Without<OrganizationSwitcherProps, 'organizationProfileProps' | '__experimental_asStandalone'> & { | ||
organizationProfileProps?: Pick<OrganizationProfileProps, 'appearance'>; | ||
/** | ||
* Adding `asProvider` will defer rendering until the `<Outlet />` component is mounted. | ||
* This API is experimental and may change at any moment. | ||
* @experimental | ||
* @default undefined | ||
*/ | ||
__experimental_asProvider?: boolean; | ||
}; | ||
declare const SignIn: { | ||
(props: Without<WithClerkProp<SignInProps & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const SignUp: { | ||
(props: Without<WithClerkProp<SignUpProps & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare function UserProfilePage({ children }: PropsWithChildren<UserProfilePageProps>): React.JSX.Element; | ||
declare function UserProfileLink({ children }: PropsWithChildren<UserProfileLinkProps>): React.JSX.Element; | ||
declare const _UserProfile: { | ||
(props: Without<WithClerkProp<PropsWithChildren<Without<UserProfileProps, "customPages">> & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const UserProfile: UserProfileExportType; | ||
declare const _UserButton: { | ||
(props: Without<WithClerkProp<PropsWithChildren<UserButtonPropsWithoutCustomPages> & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare function MenuItems({ children }: PropsWithChildren): React.JSX.Element; | ||
declare function MenuAction({ children }: PropsWithChildren<UserButtonActionProps>): React.JSX.Element; | ||
declare function MenuLink({ children }: PropsWithChildren<UserButtonLinkProps>): React.JSX.Element; | ||
declare function UserButtonOutlet(outletProps: Without<UserButtonProps, 'userProfileProps'>): React.JSX.Element; | ||
declare const UserButton: UserButtonExportType; | ||
declare function OrganizationProfilePage({ children }: PropsWithChildren<OrganizationProfilePageProps>): React.JSX.Element; | ||
declare function OrganizationProfileLink({ children }: PropsWithChildren<OrganizationProfileLinkProps>): React.JSX.Element; | ||
declare const _OrganizationProfile: { | ||
(props: Without<WithClerkProp<PropsWithChildren<Without<OrganizationProfileProps, "customPages">> & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const OrganizationProfile: OrganizationProfileExportType; | ||
declare const CreateOrganization: { | ||
(props: Without<WithClerkProp<CreateOrganizationProps & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const _OrganizationSwitcher: { | ||
(props: Without<WithClerkProp<PropsWithChildren<OrganizationSwitcherPropsWithoutCustomPages> & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare function OrganizationSwitcherOutlet(outletProps: Without<OrganizationSwitcherProps, 'organizationProfileProps'>): React.JSX.Element; | ||
declare const OrganizationSwitcher: OrganizationSwitcherExportType; | ||
declare const OrganizationList: { | ||
(props: Without<WithClerkProp<OrganizationListProps & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const GoogleOneTap: { | ||
(props: Without<WithClerkProp<_clerk_types.SignInForceRedirectUrl & _clerk_types.SignUpForceRedirectUrl & { | ||
cancelOnTapOutside?: boolean; | ||
itpSupport?: boolean; | ||
fedCmSupport?: boolean; | ||
appearance?: _clerk_types.SignInTheme; | ||
} & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const Waitlist: { | ||
(props: Without<WithClerkProp<WaitlistProps & FallbackProp>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const SignInButton: { | ||
(props: _clerk_types.Without<WithClerkProp<SignInButtonProps>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const SignUpButton: { | ||
(props: _clerk_types.Without<WithClerkProp<SignUpButtonProps>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
type SignOutButtonProps = { | ||
redirectUrl?: string; | ||
signOutOptions?: SignOutOptions; | ||
children?: React.ReactNode; | ||
}; | ||
declare const SignOutButton: { | ||
(props: _clerk_types.Without<React.PropsWithChildren<WithClerkProp<SignOutButtonProps>>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const SignInWithMetamaskButton: { | ||
(props: _clerk_types.Without<WithClerkProp<SignInWithMetamaskButtonProps>, "clerk">): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const ClerkProvider: React.ComponentType<ClerkProviderProps>; | ||
type UseEmailLinkSignInReturn = CreateEmailLinkFlowReturn<SignInStartEmailLinkFlowParams, SignInResource>; | ||
type UseEmailLinkSignUpReturn = CreateEmailLinkFlowReturn<StartEmailLinkFlowParams, SignUpResource>; | ||
type UseEmailLinkEmailAddressReturn = CreateEmailLinkFlowReturn<StartEmailLinkFlowParams, EmailAddressResource>; | ||
declare function useEmailLink(resource: SignInResource): UseEmailLinkSignInReturn; | ||
declare function useEmailLink(resource: SignUpResource): UseEmailLinkSignUpReturn; | ||
declare function useEmailLink(resource: EmailAddressResource): UseEmailLinkEmailAddressReturn; | ||
/** | ||
* The `useSignIn()` hook provides access to the [`SignIn`](https://clerk.com/docs/references/javascript/sign-in/sign-in) object, which allows you to check the current state of a sign-in attempt and manage the sign-in flow. You can use this to create a [custom sign-in flow](https://clerk.com/docs/custom-flows/overview#sign-in-flow). | ||
* | ||
* @example | ||
* ### Check the current state of a sign-in | ||
* | ||
* The following example uses the `useSignIn()` hook to access the [`SignIn`](https://clerk.com/docs/references/javascript/sign-in/sign-in) object, which contains the current sign-in attempt status and methods to create a new sign-in attempt. The `isLoaded` property is used to handle the loading state. | ||
* | ||
* ```tsx {{ filename: 'src/pages/SignInPage.tsx' }} | ||
* import { useSignIn } from '@clerk/clerk-react' | ||
* | ||
* export default function SignInPage() { | ||
* const { isLoaded, signIn } = useSignIn() | ||
* | ||
* if (!isLoaded) { | ||
* // Handle loading state | ||
* return null | ||
* } | ||
* | ||
* return <div>The current sign-in attempt status is {signIn?.status}.</div> | ||
* } | ||
* ``` | ||
* | ||
* @example | ||
* ### Create a custom sign-in flow with `useSignIn()` | ||
* | ||
* The `useSignIn()` hook can also be used to build fully custom sign-in flows, if Clerk's prebuilt components don't meet your specific needs or if you require more control over the authentication flow. Different sign-in flows include email and password, email and phone codes, email links, and multifactor (MFA). To learn more about using the `useSignIn()` hook to create custom flows, see the [custom flow guides](https://clerk.com/docs/custom-flows/overview). | ||
* | ||
* ``` | ||
* ``` | ||
*/ | ||
declare const useSignIn: () => UseSignInReturn; | ||
/** | ||
* The `useSignUp()` hook provides access to the [`SignUp`](https://clerk.com/docs/references/javascript/sign-up/sign-up) object, which allows you to check the current state of a sign-up attempt and manage the sign-up flow. You can use this to create a [custom sign-up flow](https://clerk.com/docs/custom-flows/overview#sign-up-flow). | ||
* | ||
* @example | ||
* ### Check the current state of a sign-up | ||
* | ||
* The following example uses the `useSignUp()` hook to access the [`SignUp`](https://clerk.com/docs/references/javascript/sign-up/sign-up) object, which contains the current sign-up attempt status and methods to create a new sign-up attempt. The `isLoaded` property is used to handle the loading state. | ||
* | ||
* ```tsx {{ filename: 'src/pages/SignUpPage.tsx' }} | ||
* import { useSignUp } from '@clerk/clerk-react' | ||
* | ||
* export default function SignUpPage() { | ||
* const { isLoaded, signUp } = useSignUp() | ||
* | ||
* if (!isLoaded) { | ||
* // Handle loading state | ||
* return null | ||
* } | ||
* | ||
* return <div>The current sign-up attempt status is {signUp?.status}.</div> | ||
* } | ||
* ``` | ||
* | ||
* @example | ||
* ### Create a custom sign-up flow with `useSignUp()` | ||
* | ||
* The `useSignUp()` hook can also be used to build fully custom sign-up flows, if Clerk's prebuilt components don't meet your specific needs or if you require more control over the authentication flow. Different sign-up flows include email and password, email and phone codes, email links, and multifactor (MFA). To learn more about using the `useSignUp()` hook to create custom flows, see the [custom flow guides](https://clerk.com/docs/custom-flows/overview). | ||
* | ||
* ```tsx | ||
* ``` | ||
*/ | ||
declare const useSignUp: () => UseSignUpReturn; | ||
export { ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp }; | ||
import './polyfills'; | ||
export * from './components'; | ||
export * from './contexts'; | ||
export * from './hooks'; | ||
export type { BrowserClerk, ClerkProp, HeadlessBrowserClerk, ClerkProviderProps } from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,16 +0,6 @@ | ||
import { ErrorThrowerOptions } from '@clerk/shared/error'; | ||
export { M as MultisessionAppSupport, u as useDerivedAuth } from './useAuth-DOW6TYyu.js'; | ||
import { RoutingOptions } from '@clerk/types'; | ||
export { buildClerkJsScriptAttributes, clerkJsScriptUrl, setClerkJsLoadingErrorPackageName } from '@clerk/shared/loadClerkJsScript'; | ||
import 'react'; | ||
/** | ||
* Overrides options of the internal errorThrower (eg setting packageName prefix). | ||
* | ||
* @internal | ||
*/ | ||
declare function setErrorThrowerOptions(options: ErrorThrowerOptions): void; | ||
declare function useRoutingProps<T extends RoutingOptions>(componentName: string, props: T, routingOptions?: RoutingOptions): T; | ||
export { setErrorThrowerOptions, useRoutingProps }; | ||
export { setErrorThrowerOptions } from './errors/errorThrower'; | ||
export { MultisessionAppSupport } from './components/controlComponents'; | ||
export { useRoutingProps } from './hooks/useRoutingProps'; | ||
export { useDerivedAuth } from './hooks/useAuth'; | ||
export { clerkJsScriptUrl, buildClerkJsScriptAttributes, setClerkJsLoadingErrorPackageName, } from '@clerk/shared/loadClerkJsScript'; | ||
//# sourceMappingURL=internal.d.ts.map |
{ | ||
"name": "@clerk/clerk-react", | ||
"version": "5.22.12", | ||
"version": "5.22.13-snapshot.v20250211113352", | ||
"description": "Clerk React library", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
"import": { | ||
"types": "./dist/index.d.mts", | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.mjs" | ||
@@ -39,3 +39,3 @@ }, | ||
"import": { | ||
"types": "./dist/internal.d.mts", | ||
"types": "./dist/internal.d.ts", | ||
"default": "./dist/internal.mjs" | ||
@@ -50,3 +50,3 @@ }, | ||
"import": { | ||
"types": "./dist/errors.d.mts", | ||
"types": "./dist/errors.d.ts", | ||
"default": "./dist/errors.mjs" | ||
@@ -69,9 +69,9 @@ }, | ||
"tslib": "2.4.1", | ||
"@clerk/types": "^4.45.1", | ||
"@clerk/shared": "^2.21.0" | ||
"@clerk/shared": "^2.21.1-snapshot.v20250211113352", | ||
"@clerk/types": "^4.45.2-snapshot.v20250211113352" | ||
}, | ||
"devDependencies": { | ||
"@types/semver": "^7.5.8", | ||
"@clerk/localizations": "3.10.5", | ||
"@clerk/themes": "2.2.17" | ||
"@clerk/localizations": "3.10.6-snapshot.v20250211113352", | ||
"@clerk/themes": "2.2.18-snapshot.v20250211113352" | ||
}, | ||
@@ -91,7 +91,7 @@ "peerDependencies": { | ||
"postbuild": "node ../../scripts/subpath-workaround.mjs react", | ||
"clean": "rimraf ./dist", | ||
"build:declarations": "tsc -p tsconfig.declarations.json", | ||
"dev": "tsup --watch", | ||
"dev:publish": "pnpm dev --env.publish", | ||
"lint": "eslint src", | ||
"lint:attw": "attw --pack .", | ||
"lint:attw": "attw --pack . --ignore-rules false-cjs", | ||
"lint:publint": "publint", | ||
@@ -98,0 +98,0 @@ "publish:local": "pnpm yalc push --replace --sig", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
673531
109
6441
320119
1