@@ -15,7 +15,7 @@ interface PlaygroundProvider {
1515 id : string // Provider identifier
1616 name : string
1717 domains : string [ ] // Associated domains
18- path ?: string
18+ paths ?: string [ ]
1919 icon ?: string // Provider icon name
2020}
2121
@@ -81,9 +81,28 @@ const PLAYGROUND_PROVIDERS: PlaygroundProvider[] = [
8181 id : 'typescript-playground' ,
8282 name : 'TypeScript Playground' ,
8383 domains : [ 'typescriptlang.org' ] ,
84- path : '/play' ,
84+ paths : [ '/play' ] ,
8585 icon : 'typescript' ,
8686 } ,
87+ {
88+ id : 'solid-playground' ,
89+ name : 'Solid Playground' ,
90+ domains : [ 'playground.solidjs.com' ] ,
91+ icon : 'solid' ,
92+ } ,
93+ {
94+ id : 'svelte-playground' ,
95+ name : 'Svelte Playground' ,
96+ domains : [ 'svelte.dev' ] ,
97+ paths : [ '/repl' , '/playground' ] ,
98+ icon : 'svelte' ,
99+ } ,
100+ {
101+ id : 'tailwind-playground' ,
102+ name : 'Tailwind Play' ,
103+ domains : [ 'play.tailwindcss.com' ] ,
104+ icon : 'tailwindcss' ,
105+ } ,
87106]
88107
89108/**
@@ -98,7 +117,7 @@ function matchPlaygroundProvider(url: string): PlaygroundProvider | null {
98117 for ( const domain of provider . domains ) {
99118 if (
100119 ( hostname === domain || hostname . endsWith ( `.${ domain } ` ) ) &&
101- ( ! provider . path || parsed . pathname . startsWith ( provider . path ) )
120+ ( ! provider . paths || provider . paths . some ( path => parsed . pathname . startsWith ( path ) ) )
102121 ) {
103122 return provider
104123 }
0 commit comments