@@ -34,7 +34,6 @@ import type {
34
34
InstanceType ,
35
35
JoinWaitlistParams ,
36
36
ListenerCallback ,
37
- LoadedClerk ,
38
37
NavigateOptions ,
39
38
OrganizationListProps ,
40
39
OrganizationProfileProps ,
@@ -68,7 +67,6 @@ import type {
68
67
} from '@clerk/types' ;
69
68
70
69
import type { MountComponentRenderer } from '../ui/Components' ;
71
- import { UI } from '../ui/new' ;
72
70
import {
73
71
ALLOWED_PROTOCOLS ,
74
72
buildURL ,
@@ -155,12 +153,7 @@ const defaultOptions: ClerkOptions = {
155
153
signUpForceRedirectUrl : undefined ,
156
154
} ;
157
155
158
- function clerkIsLoaded ( clerk : ClerkInterface ) : clerk is LoadedClerk {
159
- return ! ! clerk . client ;
160
- }
161
-
162
156
export class Clerk implements ClerkInterface {
163
- public __experimental_ui ?: UI ;
164
157
public static mountComponentRenderer ?: MountComponentRenderer ;
165
158
166
159
public static version : string = __PKG_VERSION__ ;
@@ -353,16 +346,6 @@ export class Clerk implements ClerkInterface {
353
346
} else {
354
347
this . #loaded = await this . #loadInNonStandardBrowser( ) ;
355
348
}
356
-
357
- if ( BUILD_ENABLE_NEW_COMPONENTS ) {
358
- if ( clerkIsLoaded ( this ) ) {
359
- this . __experimental_ui = new UI ( {
360
- router : this . #options. __experimental_router ,
361
- clerk : this ,
362
- options : this . #options,
363
- } ) ;
364
- }
365
- }
366
349
} ;
367
350
368
351
#isCombinedSignInOrUpFlow( ) : boolean {
@@ -578,19 +561,15 @@ export class Clerk implements ClerkInterface {
578
561
} ;
579
562
580
563
public mountSignIn = ( node : HTMLDivElement , props ?: SignInProps ) : void => {
581
- if ( props ?. __experimental ?. newComponents && this . __experimental_ui ) {
582
- this . __experimental_ui . mount ( 'SignIn' , node , props ) ;
583
- } else {
584
- this . assertComponentsReady ( this . #componentControls) ;
585
- void this . #componentControls. ensureMounted ( { preloadHint : 'SignIn' } ) . then ( controls =>
586
- controls . mountComponent ( {
587
- name : 'SignIn' ,
588
- appearanceKey : 'signIn' ,
589
- node,
590
- props,
591
- } ) ,
592
- ) ;
593
- }
564
+ this . assertComponentsReady ( this . #componentControls) ;
565
+ void this . #componentControls. ensureMounted ( { preloadHint : 'SignIn' } ) . then ( controls =>
566
+ controls . mountComponent ( {
567
+ name : 'SignIn' ,
568
+ appearanceKey : 'signIn' ,
569
+ node,
570
+ props,
571
+ } ) ,
572
+ ) ;
594
573
this . telemetry ?. record (
595
574
eventPrebuiltComponentMounted ( 'SignIn' , {
596
575
...props ,
@@ -609,19 +588,15 @@ export class Clerk implements ClerkInterface {
609
588
} ;
610
589
611
590
public mountSignUp = ( node : HTMLDivElement , props ?: SignUpProps ) : void => {
612
- if ( props ?. __experimental ?. newComponents && this . __experimental_ui ) {
613
- this . __experimental_ui . mount ( 'SignUp' , node , props ) ;
614
- } else {
615
- this . assertComponentsReady ( this . #componentControls) ;
616
- void this . #componentControls. ensureMounted ( { preloadHint : 'SignUp' } ) . then ( controls =>
617
- controls . mountComponent ( {
618
- name : 'SignUp' ,
619
- appearanceKey : 'signUp' ,
620
- node,
621
- props,
622
- } ) ,
623
- ) ;
624
- }
591
+ this . assertComponentsReady ( this . #componentControls) ;
592
+ void this . #componentControls. ensureMounted ( { preloadHint : 'SignUp' } ) . then ( controls =>
593
+ controls . mountComponent ( {
594
+ name : 'SignUp' ,
595
+ appearanceKey : 'signUp' ,
596
+ node,
597
+ props,
598
+ } ) ,
599
+ ) ;
625
600
this . telemetry ?. record ( eventPrebuiltComponentMounted ( 'SignUp' , props ) ) ;
626
601
} ;
627
602
0 commit comments