@@ -33,10 +33,11 @@ declare module '@nuxt/schema' {
3333 }
3434}
3535
36- type ComponentNames = keyof typeof import ( 'maz-ui/components' )
36+ type MazUiComponentNames = keyof typeof import ( 'maz-ui/components' )
37+ type FormBuilderComponentNames = keyof typeof import ( '@maz-ui/forms/components' )
3738
3839const COMPONENT_NAMES : Omit <
39- Record < ComponentNames , true > ,
40+ Record < MazUiComponentNames , true > ,
4041 'useMazDialogConfirm'
4142> = {
4243 MazAccordion : true ,
@@ -102,12 +103,12 @@ const COMPONENT_NAMES: Omit<
102103 MazPopover : true ,
103104}
104105
105- const FORM_BUILDER_COMPONENT_NAMES = {
106- MazFormBuilder : true ,
107- MazFormErrorSummary : true ,
108- MazFormField : true ,
109- MazFormSection : true ,
110- MazFormWizard : true ,
106+ const FORM_BUILDER_COMPONENT_NAMES : Omit < Record < FormBuilderComponentNames , true > , 'useMazDialogConfirm' > = {
107+ FormBuilder : true ,
108+ FormErrorSummary : true ,
109+ FormField : true ,
110+ FormSection : true ,
111+ // FormWizard : true,
111112} as const
112113
113114const _dirname = dirname ( fileURLToPath ( import . meta. url ) )
@@ -251,22 +252,32 @@ export default defineNuxtModule<MazUiNuxtOptions>({
251252 if ( moduleOptions . formBuilder . autoImport ) {
252253 for ( const name of Object . keys ( FORM_BUILDER_COMPONENT_NAMES ) ) {
253254 addComponent ( {
254- name,
255- filePath : '@maz-ui/forms' ,
255+ name : `Maz ${ name } ` ,
256+ filePath : '@maz-ui/forms/components ' ,
256257 export : name ,
257258 } )
258259 }
259260
260261 addImports ( {
261262 name : 'useFormBuilder' ,
262- from : '@maz-ui/forms' ,
263+ from : '@maz-ui/forms/composables ' ,
263264 as : `use${ capitalize ( autoImportPrefix ) } FormBuilder` ,
264265 } )
265266
266- addImports ( {
267- name : 'defineFormSchema' ,
268- from : '@maz-ui/forms' ,
269- } )
267+ addImports ( [
268+ {
269+ name : `define${ capitalize ( autoImportPrefix ) } FormSchema` ,
270+ from : '@maz-ui/forms/utils' ,
271+ } ,
272+ {
273+ name : `define${ capitalize ( autoImportPrefix ) } FormSection` ,
274+ from : '@maz-ui/forms/utils' ,
275+ } ,
276+ {
277+ name : `define${ capitalize ( autoImportPrefix ) } FormField` ,
278+ from : '@maz-ui/forms/utils' ,
279+ } ,
280+ ] )
270281 }
271282
272283 // Plugins
0 commit comments