@clerk/clerk-react 5.60.2 → 5.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _clerk_shared_types from '@clerk/shared/types';
2
- import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, TaskResetPasswordProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, UseSignInReturn, UseSignUpReturn } from '@clerk/shared/types';
2
+ import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, UseSignInReturn, UseSignUpReturn } from '@clerk/shared/types';
3
3
  import React, { ReactNode, PropsWithChildren } from 'react';
4
4
  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-CFOQkf-D.mjs';
5
5
  export { B as BrowserClerk, e as ClerkProp, H as HeadlessBrowserClerk } from './types-CFOQkf-D.mjs';
@@ -153,6 +153,10 @@ declare const TaskResetPassword: {
153
153
  (props: Without<WithClerkProp<TaskResetPasswordProps & FallbackProp>, "clerk">): React.JSX.Element | null;
154
154
  displayName: string;
155
155
  };
156
+ declare const TaskSetupMFA: {
157
+ (props: Without<WithClerkProp<TaskSetupMFAProps & FallbackProp>, "clerk">): React.JSX.Element | null;
158
+ displayName: string;
159
+ };
156
160
 
157
161
  declare const SignInButton: {
158
162
  (props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<SignInButtonProps>>, "clerk">): React.JSX.Element | null;
@@ -280,4 +284,4 @@ declare const useSignIn: () => UseSignInReturn;
280
284
  */
281
285
  declare const useSignUp: () => UseSignUpReturn;
282
286
 
283
- 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 };
287
+ export { APIKeys, ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, TaskChooseOrganization, TaskResetPassword, TaskSetupMFA, UserAvatar, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _clerk_shared_types from '@clerk/shared/types';
2
- import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, TaskResetPasswordProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, UseSignInReturn, UseSignUpReturn } from '@clerk/shared/types';
2
+ import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, UseSignInReturn, UseSignUpReturn } from '@clerk/shared/types';
3
3
  import React, { ReactNode, PropsWithChildren } from 'react';
4
4
  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-CFOQkf-D.js';
5
5
  export { B as BrowserClerk, e as ClerkProp, H as HeadlessBrowserClerk } from './types-CFOQkf-D.js';
@@ -153,6 +153,10 @@ declare const TaskResetPassword: {
153
153
  (props: Without<WithClerkProp<TaskResetPasswordProps & FallbackProp>, "clerk">): React.JSX.Element | null;
154
154
  displayName: string;
155
155
  };
156
+ declare const TaskSetupMFA: {
157
+ (props: Without<WithClerkProp<TaskSetupMFAProps & FallbackProp>, "clerk">): React.JSX.Element | null;
158
+ displayName: string;
159
+ };
156
160
 
157
161
  declare const SignInButton: {
158
162
  (props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<SignInButtonProps>>, "clerk">): React.JSX.Element | null;
@@ -280,4 +284,4 @@ declare const useSignIn: () => UseSignInReturn;
280
284
  */
281
285
  declare const useSignUp: () => UseSignUpReturn;
282
286
 
283
- 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 };
287
+ export { APIKeys, ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, TaskChooseOrganization, TaskResetPassword, TaskSetupMFA, UserAvatar, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp };
package/dist/index.js CHANGED
@@ -68,6 +68,7 @@ __export(src_exports, {
68
68
  SignedOut: () => SignedOut,
69
69
  TaskChooseOrganization: () => TaskChooseOrganization,
70
70
  TaskResetPassword: () => TaskResetPassword,
71
+ TaskSetupMFA: () => TaskSetupMFA,
71
72
  UserAvatar: () => UserAvatar,
72
73
  UserButton: () => UserButton,
73
74
  UserProfile: () => UserProfile,
@@ -1155,6 +1156,27 @@ var TaskResetPassword = withClerk(
1155
1156
  },
1156
1157
  { component: "TaskResetPassword", renderWhileLoading: true }
1157
1158
  );
1159
+ var TaskSetupMFA = withClerk(
1160
+ ({ clerk, component, fallback, ...props }) => {
1161
+ const mountingStatus = useWaitForComponentMount(component);
1162
+ const shouldShowFallback = mountingStatus === "rendering" || !clerk.loaded;
1163
+ const rendererRootProps = {
1164
+ ...shouldShowFallback && fallback && { style: { display: "none" } }
1165
+ };
1166
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, shouldShowFallback && fallback, clerk.loaded && /* @__PURE__ */ import_react13.default.createElement(
1167
+ ClerkHostRenderer,
1168
+ {
1169
+ component,
1170
+ mount: clerk.mountTaskSetupMFA,
1171
+ unmount: clerk.unmountTaskSetupMFA,
1172
+ updateProps: clerk.__unstable__updateProps,
1173
+ props,
1174
+ rootProps: rendererRootProps
1175
+ }
1176
+ ));
1177
+ },
1178
+ { component: "TaskSetupMFA", renderWhileLoading: true }
1179
+ );
1158
1180
 
1159
1181
  // src/components/controlComponents.tsx
1160
1182
  var import_deprecated = require("@clerk/shared/deprecated");
@@ -1888,7 +1910,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
1888
1910
  }
1889
1911
  var SDK_METADATA = {
1890
1912
  name: "@clerk/clerk-react",
1891
- version: "5.60.2",
1913
+ version: "5.61.0",
1892
1914
  environment: process.env.NODE_ENV
1893
1915
  };
1894
1916
  var _status, _domain, _proxyUrl, _publishableKey, _eventBus, _stateProxy, _instance, _IsomorphicClerk_instances, waitForClerkJS_fn;
@@ -1924,6 +1946,7 @@ var _IsomorphicClerk = class _IsomorphicClerk {
1924
1946
  this.premountOAuthConsentNodes = /* @__PURE__ */ new Map();
1925
1947
  this.premountTaskChooseOrganizationNodes = /* @__PURE__ */ new Map();
1926
1948
  this.premountTaskResetPasswordNodes = /* @__PURE__ */ new Map();
1949
+ this.premountTaskSetupMFANodes = /* @__PURE__ */ new Map();
1927
1950
  // A separate Map of `addListener` method calls to handle multiple listeners.
1928
1951
  this.premountAddListenerCalls = /* @__PURE__ */ new Map();
1929
1952
  this.loadedListeners = [];
@@ -2212,6 +2235,9 @@ var _IsomorphicClerk = class _IsomorphicClerk {
2212
2235
  this.premountTaskResetPasswordNodes.forEach((props, node) => {
2213
2236
  clerkjs.mountTaskResetPassword(node, props);
2214
2237
  });
2238
+ this.premountTaskSetupMFANodes.forEach((props, node) => {
2239
+ clerkjs.mountTaskSetupMFA(node, props);
2240
+ });
2215
2241
  if (typeof this.clerkjs.status === "undefined") {
2216
2242
  __privateGet(this, _eventBus).emit(import_clerkEventBus.clerkEvents.Status, "ready");
2217
2243
  }
@@ -2628,6 +2654,20 @@ var _IsomorphicClerk = class _IsomorphicClerk {
2628
2654
  this.premountTaskResetPasswordNodes.delete(node);
2629
2655
  }
2630
2656
  };
2657
+ this.mountTaskSetupMFA = (node, props) => {
2658
+ if (this.clerkjs && this.loaded) {
2659
+ this.clerkjs.mountTaskSetupMFA(node, props);
2660
+ } else {
2661
+ this.premountTaskSetupMFANodes.set(node, props);
2662
+ }
2663
+ };
2664
+ this.unmountTaskSetupMFA = (node) => {
2665
+ if (this.clerkjs && this.loaded) {
2666
+ this.clerkjs.unmountTaskSetupMFA(node);
2667
+ } else {
2668
+ this.premountTaskSetupMFANodes.delete(node);
2669
+ }
2670
+ };
2631
2671
  this.addListener = (listener) => {
2632
2672
  if (this.clerkjs) {
2633
2673
  return this.clerkjs.addListener(listener);
@@ -3346,6 +3386,7 @@ setErrorThrowerOptions({ packageName: "@clerk/clerk-react" });
3346
3386
  SignedOut,
3347
3387
  TaskChooseOrganization,
3348
3388
  TaskResetPassword,
3389
+ TaskSetupMFA,
3349
3390
  UserAvatar,
3350
3391
  UserButton,
3351
3392
  UserProfile,