UNPKG

@baseplate-dev/project-builder-web

Version:

Web interface for constructing project builder JSON

3 lines (2 loc) 2.01 kB
import{i}from"./_virtual___federation_fn_import-DOo8C-zl.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{b}from"./index-DiAhmW9l.js";const{monorepoSettingsSchema:u}=await i("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:h,useProjectDefinition:x,useResettableForm:f}=await i("@baseplate-dev/project-builder-lib/web"),{FormActionBar:g,InputFieldController:t,SectionList:j,SectionListSection:F,SectionListSectionContent:S,SectionListSectionHeader:v,SectionListSectionTitle:w}=await i("@baseplate-dev/ui-components");function C(){const{definition:l,saveDefinitionWithFeedback:a}=x(),n=l.settings.monorepo??{appsFolder:"apps",librariesFolder:"libs"},s=f({resolver:b(u),defaultValues:n}),{handleSubmit:c,control:o,reset:p}=s,r=c(d=>a(m=>{m.settings.monorepo=d}));return h({control:o,reset:p,onSubmit:r}),e.jsxs("form",{className:"relative h-full max-h-full pb-(--action-bar-height)",onSubmit:r,children:[e.jsxs("div",{className:"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6",children:[e.jsxs("div",{className:"sticky top-0 border-b bg-background py-6",children:[e.jsx("h1",{children:"Monorepo Configuration"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Configure the folder structure for your monorepo packages."})]}),e.jsx(j,{children:e.jsxs(F,{children:[e.jsx(v,{children:e.jsx(w,{children:"Folder Configuration"})}),e.jsxs(S,{className:"flex max-w-md flex-col gap-4",children:[e.jsx(t,{name:"appsFolder",label:"Apps Folder",description:'Folder where apps are located. Apps will be placed in {appsFolder}/{app-name}, e.g. "apps" results in apps/backend, apps/web',control:o,placeholder:"e.g. apps"}),e.jsx(t,{name:"librariesFolder",label:"Libraries Folder",description:'Folder where libraries are located. Libraries will be placed in {librariesFolder}/{library-name}, e.g. "libs" results in libs/my-lib',control:o,placeholder:"e.g. libs"})]})]})})]}),e.jsx(g,{form:s})]})}export{C as component}; //# sourceMappingURL=monorepo-B_6E0vGh.js.map