@@ -90,14 +90,20 @@ export const add = new Command()
9090 }
9191
9292 let itemType : z . infer < typeof registryItemTypeSchema > | undefined
93+ let shouldInstallBaseStyle = true
9394 if ( components . length > 0 ) {
9495 const [ registryItem ] = await getRegistryItems ( [ components [ 0 ] ] , {
9596 config : initialConfig ,
9697 } )
9798 itemType = registryItem ?. type
99+ shouldInstallBaseStyle =
100+ itemType !== "registry:theme" && itemType !== "registry:style"
98101
99102 if ( isUniversalRegistryItem ( registryItem ) ) {
100- await addComponents ( components , initialConfig , options )
103+ await addComponents ( components , initialConfig , {
104+ ...options ,
105+ baseStyle : shouldInstallBaseStyle ,
106+ } )
101107 return
102108 }
103109
@@ -170,11 +176,12 @@ export const add = new Command()
170176 force : true ,
171177 defaults : false ,
172178 skipPreflight : false ,
173- silent : options . silent || ! hasNewRegistries ,
179+ silent : options . silent && ! hasNewRegistries ,
174180 isNewProject : false ,
175181 srcDir : options . srcDir ,
176182 cssVariables : options . cssVariables ,
177- baseStyle : itemType !== "registry:theme" ,
183+ baseStyle : shouldInstallBaseStyle ,
184+ baseColor : shouldInstallBaseStyle ? undefined : "neutral" ,
178185 components : options . components ,
179186 } )
180187 initHasRun = true
@@ -209,7 +216,8 @@ export const add = new Command()
209216 isNewProject : true ,
210217 srcDir : options . srcDir ,
211218 cssVariables : options . cssVariables ,
212- baseStyle : itemType !== "registry:theme" ,
219+ baseStyle : shouldInstallBaseStyle ,
220+ baseColor : shouldInstallBaseStyle ? undefined : "neutral" ,
213221 components : options . components ,
214222 } )
215223 initHasRun = true
@@ -238,7 +246,7 @@ export const add = new Command()
238246 if ( ! initHasRun ) {
239247 await addComponents ( options . components , config , {
240248 ...options ,
241- baseStyle : itemType !== "registry:theme" ,
249+ baseStyle : shouldInstallBaseStyle ,
242250 } )
243251 }
244252
0 commit comments