File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,11 @@ const STYLE_ATTRIBUTE = 'data-appwrite-studio-style';
1111const BLOCK_START_BASE_OFFSET = 48 ;
1212const INLINE_START_BASE_OFFSET = 8 ;
1313const CACHE_BUSTER = new Date ( ) . getTime ( ) ;
14- const CDN_URL =
14+ export const CDN_URL =
1515 'https://esm.sh/@imagine.dev/web-components@0/web-components?bundle=false&deps=react@19.1.0,react-dom@19.1.0&cache=' +
1616 CACHE_BUSTER ;
17+ export const CDN_CSS_URL =
18+ 'https://esm.sh/@imagine.dev/web-components@0/imagine-web-components.css?cache=' + CACHE_BUSTER ;
1719const DEV_OVERRIDE_WEB_COMPONENTS = env ?. PUBLIC_AI_OVERRIDE_WEB_COMPONENTS === 'true' ;
1820
1921let component : HTMLElement | null = null ;
Original file line number Diff line number Diff line change 2525 import { isSmallViewport , updateViewport } from ' $lib/stores/viewport' ;
2626 import { feedback } from ' $lib/stores/feedback' ;
2727 import { ProfileMode , resolvedProfile } from ' $lib/profiles/index.svelte' ;
28+ import { CDN_CSS_URL , CDN_URL } from ' $lib/studio/studio-widget' ;
2829
2930 function resolveTheme(theme : AppStore [' themeInUse' ]) {
3031 switch (theme ) {
185186 {/if }
186187
187188 <link rel ="stylesheet" href ={` ${base }/css/profiles/${resolvedProfile .id }.css ` } />
189+
190+ {#if resolvedProfile .id === ProfileMode .STUDIO }
191+ <link rel ="preload" as ="style" type ="text/css" href ={CDN_CSS_URL } />
192+ <link rel ="preload" as ="script" type ="text/javascript" href ={CDN_URL } />
193+ {/if }
188194</svelte:head >
189195
190196<Root theme ={resolveTheme ($app .themeInUse )}>
You can’t perform that action at this time.
0 commit comments