@@ -691,7 +691,9 @@ export class Clerk implements ClerkInterface {
691691 }
692692 this . assertComponentsReady ( this . #clerkUI) ;
693693 const component = 'SignIn' ;
694- void this . #clerkUI. then ( ui => ui . ensureMounted ( ) ) . then ( controls => controls . openModal ( 'signIn' , props || { } ) ) ;
694+ void this . #clerkUI
695+ . then ( ui => ui . ensureMounted ( { preloadHint : component } ) )
696+ . then ( controls => controls . openModal ( 'signIn' , props || { } ) ) ;
695697
696698 const additionalData = { withSignUp : props ?. withSignUp ?? this . #isCombinedSignInOrUpFlow( ) } ;
697699 this . telemetry ?. record ( eventPrebuiltComponentOpened ( component , props , additionalData ) ) ;
@@ -865,7 +867,9 @@ export class Clerk implements ClerkInterface {
865867 return ;
866868 }
867869 this . assertComponentsReady ( this . #clerkUI) ;
868- void this . #clerkUI. then ( ui => ui . ensureMounted ( ) ) . then ( controls => controls . openModal ( 'signUp' , props || { } ) ) ;
870+ void this . #clerkUI
871+ . then ( ui => ui . ensureMounted ( { preloadHint : 'SignUp' } ) )
872+ . then ( controls => controls . openModal ( 'signUp' , props || { } ) ) ;
869873
870874 this . telemetry ?. record ( eventPrebuiltComponentOpened ( 'SignUp' , props ) ) ;
871875 } ;
@@ -884,7 +888,9 @@ export class Clerk implements ClerkInterface {
884888 return ;
885889 }
886890 this . assertComponentsReady ( this . #clerkUI) ;
887- void this . #clerkUI. then ( ui => ui . ensureMounted ( ) ) . then ( controls => controls . openModal ( 'userProfile' , props || { } ) ) ;
891+ void this . #clerkUI
892+ . then ( ui => ui . ensureMounted ( { preloadHint : 'UserProfile' } ) )
893+ . then ( controls => controls . openModal ( 'userProfile' , props || { } ) ) ;
888894
889895 const additionalData = ( props ?. customPages ?. length || 0 ) > 0 ? { customPages : true } : undefined ;
890896 this . telemetry ?. record ( eventPrebuiltComponentOpened ( 'UserProfile' , props , additionalData ) ) ;
@@ -920,7 +926,7 @@ export class Clerk implements ClerkInterface {
920926
921927 this . assertComponentsReady ( this . #clerkUI) ;
922928 void this . #clerkUI
923- . then ( ui => ui . ensureMounted ( ) )
929+ . then ( ui => ui . ensureMounted ( { preloadHint : 'OrganizationProfile' } ) )
924930 . then ( controls => controls . openModal ( 'organizationProfile' , props || { } ) ) ;
925931
926932 this . telemetry ?. record ( eventPrebuiltComponentOpened ( 'OrganizationProfile' , props ) ) ;
@@ -947,7 +953,7 @@ export class Clerk implements ClerkInterface {
947953
948954 this . assertComponentsReady ( this . #clerkUI) ;
949955 void this . #clerkUI
950- . then ( ui => ui . ensureMounted ( ) )
956+ . then ( ui => ui . ensureMounted ( { preloadHint : 'CreateOrganization' } ) )
951957 . then ( controls => controls . openModal ( 'createOrganization' , props || { } ) ) ;
952958
953959 this . telemetry ?. record ( eventPrebuiltComponentOpened ( 'CreateOrganization' , props ) ) ;
@@ -959,7 +965,9 @@ export class Clerk implements ClerkInterface {
959965
960966 public openWaitlist = ( props ?: WaitlistProps ) : void => {
961967 this . assertComponentsReady ( this . #clerkUI) ;
962- void this . #clerkUI. then ( ui => ui . ensureMounted ( ) ) . then ( controls => controls . openModal ( 'waitlist' , props || { } ) ) ;
968+ void this . #clerkUI
969+ . then ( ui => ui . ensureMounted ( { preloadHint : 'Waitlist' } ) )
970+ . then ( controls => controls . openModal ( 'waitlist' , props || { } ) ) ;
963971
964972 this . telemetry ?. record ( eventPrebuiltComponentOpened ( 'Waitlist' , props ) ) ;
965973 } ;
0 commit comments