@chaibuilder/sdk 1.2.42 → 1.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/AddBlocks-Bb-K6Y0Z.cjs +1 -0
  2. package/dist/{AddBlocks--7JKHvJX.js → AddBlocks-QCb-vIta.js} +57 -56
  3. package/dist/CanvasArea-Hqy_21xf.js +1215 -0
  4. package/dist/CanvasArea-xvT325mp.cjs +57 -0
  5. package/dist/{ChaiBuilderEditor-GronwWg6.cjs → ChaiBuilderEditor-AIXWnz29.cjs} +44 -44
  6. package/dist/{ChaiBuilderEditor-f4SJU7kK.js → ChaiBuilderEditor-NnMEdW3k.js} +6627 -6635
  7. package/dist/{CurrentPage-hq3wJX-B.cjs → CurrentPage-n_oOiHx5.cjs} +1 -1
  8. package/dist/{CurrentPage-S5EFVi8y.js → CurrentPage-rkdt2mNr.js} +3 -3
  9. package/dist/{ListTree-un8hNvIi.js → ListTree-PuZP9LQu.js} +3 -3
  10. package/dist/{ListTree-PbmMwEnK.cjs → ListTree-z0FeSAsc.cjs} +1 -1
  11. package/dist/{PagesPanel-2zdTxUbm.cjs → PagesPanel-4ftrFiS0.cjs} +1 -1
  12. package/dist/{PagesPanel-f0XKYnEj.js → PagesPanel-TYArrNU6.js} +4 -4
  13. package/dist/{ProjectPanel-RMEd0gwn.cjs → ProjectPanel-2scMInUn.cjs} +1 -1
  14. package/dist/{ProjectPanel-vbBl5OmU.js → ProjectPanel-qY_Bnqjm.js} +4 -4
  15. package/dist/{Settings-Lsp-FmFS.js → Settings-k9Ll55Wc.js} +965 -892
  16. package/dist/Settings-kbUR5-xt.cjs +1 -0
  17. package/dist/SidePanels-ZHxoiJ7y.cjs +1 -0
  18. package/dist/{SidePanels-zU4GsqbI.js → SidePanels-eOnxPSSw.js} +151 -151
  19. package/dist/{ThemeConfiguration-1rD36g89.js → ThemeConfiguration-TINcg8VX.js} +5 -5
  20. package/dist/{ThemeConfiguration-76oEQ5z0.cjs → ThemeConfiguration-fRsktVs4.cjs} +1 -1
  21. package/dist/{Topbar--M5IjXGt.js → Topbar--KrJ6nJg.js} +2 -2
  22. package/dist/{Topbar-7bRZS3P8.cjs → Topbar-tgFkKz7R.cjs} +1 -1
  23. package/dist/UILibrariesPanel-2HyAEVLE.cjs +1 -0
  24. package/dist/{UILibrariesPanel-EaMt1AzV.js → UILibrariesPanel-sleogb55.js} +55 -56
  25. package/dist/{UnsplashImages-o7mUozj7.js → UnsplashImages-P7_2yEo-.js} +9 -9
  26. package/dist/{UnsplashImages-eq44FmxF.cjs → UnsplashImages-azP_HIqG.cjs} +1 -1
  27. package/dist/{UploadImages-o4teNCqv.cjs → UploadImages-nnszHoZa.cjs} +1 -1
  28. package/dist/{UploadImages-s52Hvpts.js → UploadImages-ovzzQW6b.js} +7 -7
  29. package/dist/{add-page-modal-eoOwcRKz.js → add-page-modal-SmBfx0LH.js} +4 -4
  30. package/dist/{add-page-modal-7FLXbRFp.cjs → add-page-modal-nDBqhemF.cjs} +1 -1
  31. package/dist/atoms-ZOWyNoiC.js +6 -0
  32. package/dist/atoms-a0H_593V.cjs +1 -0
  33. package/dist/{confirm-alert-rFmTdGxh.cjs → confirm-alert-75rfTsgE.cjs} +1 -1
  34. package/dist/{confirm-alert-o0OjZdvp.js → confirm-alert-yipdBkkj.js} +2 -2
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +1 -1
  37. package/dist/core.js +2 -2
  38. package/dist/{delete-page-modal-OU79XN8M.js → delete-page-modal-HIul7JBc.js} +3 -3
  39. package/dist/{delete-page-modal-sG2uFkT0.cjs → delete-page-modal-lO-dULGW.cjs} +1 -1
  40. package/dist/email-blocks.cjs +1 -1
  41. package/dist/email-blocks.js +30 -30
  42. package/dist/email.cjs +1 -1
  43. package/dist/email.d.ts +1 -1
  44. package/dist/email.js +2 -2
  45. package/dist/empty-slot-Lsxjts7Q.js +6 -0
  46. package/dist/empty-slot-Sy930lX6.cjs +1 -0
  47. package/dist/{form--h34bK4z.js → form-cZPoXqTP.js} +5 -5
  48. package/dist/{form-SuV0Z9nJ.cjs → form-yq_mbR58.cjs} +1 -1
  49. package/dist/{index-7hLL3kv4.js → index-Vu40oRWp.js} +2 -2
  50. package/dist/{index-3mF2lq-B.cjs → index-q_bEEzdK.cjs} +1 -1
  51. package/dist/lib.cjs +1 -1
  52. package/dist/lib.js +3 -3
  53. package/dist/{page-viewer-9-Dy66-a.cjs → page-viewer-3ZqrDjrz.cjs} +1 -1
  54. package/dist/{page-viewer-tfXRwkWz.js → page-viewer-ZOVAaE9q.js} +4 -4
  55. package/dist/{project-general-setting-ZjAN2VZX.js → project-general-setting-2iNlm_kN.js} +8 -8
  56. package/dist/{project-general-setting-ZbNwglNP.cjs → project-general-setting-IIxWGrU2.cjs} +1 -1
  57. package/dist/{project-seo-setting-vqWoo5Ev.cjs → project-seo-setting-46PdN9FR.cjs} +1 -1
  58. package/dist/{project-seo-setting-gAXZ15Wb.js → project-seo-setting-FX0cbkrO.js} +3 -3
  59. package/dist/{single-page-detail-ISRJ-Ebt.js → single-page-detail-4v8ojQss.js} +5 -5
  60. package/dist/{single-page-detail-a4nAhK0N.cjs → single-page-detail-MsBTVx9h.cjs} +1 -1
  61. package/dist/studio.cjs +1 -1
  62. package/dist/studio.d.ts +1 -1
  63. package/dist/studio.js +3 -3
  64. package/dist/style.css +1 -1
  65. package/dist/ui.cjs +1 -1
  66. package/dist/ui.d.ts +3 -3
  67. package/dist/ui.js +50 -50
  68. package/dist/{useCanvasSettings-EyxD8eas.cjs → useCanvasSettings-A7Qj0z4L.cjs} +1 -1
  69. package/dist/{useCanvasSettings-fsSISbZ6.js → useCanvasSettings-QH5zCmxD.js} +1 -1
  70. package/dist/utils-K3Zk762G.cjs +1 -0
  71. package/dist/{Class-6Hz2KzYb.js → utils-iMv3T4WT.js} +16 -15
  72. package/dist/web-blocks.cjs +4 -4
  73. package/dist/web-blocks.js +237 -238
  74. package/package.json +2 -2
  75. package/dist/AddBlocks-HZaa1NM6.cjs +0 -1
  76. package/dist/CanvasArea-CTmYdaUo.cjs +0 -55
  77. package/dist/CanvasArea-myZvxQCj.js +0 -1199
  78. package/dist/Class-Zc8hpE7f.cjs +0 -1
  79. package/dist/Settings-UqeNroki.cjs +0 -1
  80. package/dist/SidePanels-DimF3tJV.cjs +0 -1
  81. package/dist/UILibrariesPanel-1F_Kcnkm.cjs +0 -1
  82. package/dist/empty-slot-ZBlsQi6m.js +0 -15
  83. package/dist/empty-slot-nzYOgZuS.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("lodash-es"),i=require("./jsx-runtime-Z_BpKhVy.cjs"),c=require("@react-email/components"),s=require("@chaibuilder/runtime"),d=require("./empty-slot-nzYOgZuS.cjs"),l=require("./controls-jWJDao88.cjs"),a=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");const m=({blockProps:e,styles:t,children:o,inBuilder:r})=>{let n=o;return o||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{blockProps:{},styles:{},inBuilder:r})),i.jsxRuntimeExports.jsx(c.Container,{...e,...t,children:n})};s.registerChaiBlock(m,{type:"Email/Container",label:"Container",group:"basic",category:"core",canAcceptBlock:()=>!0,canMove:()=>!0,canDelete:()=>!1,canDuplicate:()=>!1,canBeNested:e=>!e});const x=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(c.Section,{...e,...t,children:o});s.registerChaiBlock(x,{type:"Email/Section",label:"Section",group:"basic",category:"core",icon:a.ImageIcon,props:{align:l.y({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0});const g=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(c.Row,{...e,...t,children:o});s.registerChaiBlock(g,{type:"Email/Row",label:"Row",group:"basic",category:"core",icon:a.ImageIcon,blocks:[{_type:"Email/Row",_id:"a"},{_type:"Email/Column",_id:"b",_parent:"a"}],props:{styles:l.S({default:""})},canAcceptBlock:e=>e==="Email/Column"});const h=({blockProps:e,styles:t,children:o,align:r})=>{let n=o;return o||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{blockProps:{},styles:{}})),i.jsxRuntimeExports.jsx(c.Column,{...e,...t,align:r,children:n})};s.registerChaiBlock(h,{type:"Email/Column",label:"Column",group:"basic",category:"core",icon:a.ImageIcon,props:{styles:l.S({default:""}),align:l.y({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0,canBeNested:e=>e==="Email/Row"});const k=({level:e,blockProps:t,styles:o,content:r})=>i.jsxRuntimeExports.jsx(c.Heading,{as:e,...t,...o,children:r}),b=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("h1",{...e,...t,children:o});s.registerChaiBlock(k,{type:"Email/Heading",label:"Heading",group:"basic",category:"core",icon:a.HeadingIcon,builderComponent:b,props:{content:l.l({title:"Content",default:"Enter your heading here..."}),styles:l.S({default:"text-xl"}),level:l.y({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]})},canAcceptBlock:e=>["Email/Link","Email/RawText"].includes(e)});const B=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx(c.Text,{...e,...t,children:o}),y=({content:e,blockProps:t,styles:o})=>i.jsxRuntimeExports.jsx("p",{...t,...o,children:e});s.registerChaiBlock(B,{type:"Email/Text",label:"Text",group:"basic",category:"core",icon:a.TextIcon,builderComponent:y,props:{content:l.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim."}),styles:l.S({default:""})},canAcceptBlock:e=>["Email/Link","Email/RawText"].includes(e)});const C=({content:e})=>e,j=({content:e,blockProps:t})=>i.jsxRuntimeExports.jsx("span",{...t,children:e});s.registerChaiBlock(C,{type:"Email/RawText",label:"Raw Text",group:"basic",category:"core",icon:a.TextIcon,hidden:!0,builderComponent:j,props:{content:l.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. "})}});const E=({blockProps:e,styles:t,link:o,content:r})=>i.jsxRuntimeExports.jsx(c.Button,{...e,...t,href:o.href,children:r}),f=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("button",{type:"button",...e,...t,children:o});s.registerChaiBlock(E,{type:"Email/Button",label:"Button",group:"basic",category:"core",builderComponent:f,props:{content:l.l({title:"Content",default:"Click me"}),link:l.T({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.S({default:"bg-primary text-white px-4 py-2 rounded-md"})}});const R=({blockProps:e,styles:t,href:o,content:r,target:n,children:u})=>i.jsxRuntimeExports.jsx(c.Link,{...e,...t,href:o,target:n,children:u||r}),v=({blockProps:e,styles:t,content:o,children:r})=>{let n=r;return r||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{blockProps:{},styles:{}})),i.jsxRuntimeExports.jsx("span",{...e,...t,children:n||o})};s.registerChaiBlock(R,{type:"Email/Link",label:"Link",group:"basic",category:"core",icon:a.Link1Icon,blocks:[{_id:"a",_type:"Link"},{_id:"b",_parent:"a",_type:"RawText",content:"I am a link."}],builderComponent:v,props:{content:l.l({title:"Content",default:"I am a link."}),link:l.T({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.S({default:"font-bold text-blue-500"})},canAcceptBlock:()=>!0});const w=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(c.Preview,{...e,...t,children:o}),I=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:o});s.registerChaiBlock(w,{type:"Email/Preview",label:"Preview",group:"basic",category:"core",builderComponent:I,canAcceptBlock:()=>!0,canDuplicate:()=>!1,props:{content:l.g({default:"Preview content",title:"Content"})}});const S=({blockProps:e,content:t})=>i.jsxRuntimeExports.jsx(c.Markdown,{children:t,...e});s.registerChaiBlock(S,{type:"Email/Markdown",label:"Markdown",group:"basic",category:"core",props:{content:l.g({default:"# This is a ~~strikethrough~~",title:"Markdown"})}});const T=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx(c.Img,{...e,...t,src:r,alt:o,width:n,height:u}),L=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx("img",{...e,...t,src:r,alt:o,width:n,height:u});s.registerChaiBlock(T,{type:"Email/Image",label:"Image",group:"basic",category:"core",icon:a.ImageIcon,builderComponent:L,props:{styles:l.S({default:"w-full"}),image:l.q({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.l({title:"Alt",default:""}),width:l.l({title:"Width",default:""}),height:l.l({title:"Height",default:""})}});const q=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx(c.Hr,{...e,...t}),H=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx("hr",{...e,...t});s.registerChaiBlock(q,{type:"Email/Divider",label:"Divider",group:"basic",category:"core",icon:a.DividerHorizontalIcon,builderComponent:H,props:{styles:l.S({default:"w-full h-2"})}});const _=({blockProps:e,styles:t,code:o,lineNumbers:r,theme:n,language:u})=>i.jsxRuntimeExports.jsx(c.CodeBlock,{...e,...t,code:o,linenumbers:r,theme:n,language:u}),A=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:i.jsxRuntimeExports.jsx("code",{children:o})});s.registerChaiBlock(_,{type:"Email/CodeBlock",label:"Code Block",group:"basic",category:"core",hidden:!0,icon:a.CodeSandboxLogoIcon,builderComponent:A,props:{styles:l.S({default:""}),code:l.g({title:"Code",default:"console.log('Hello, world!');"}),theme:l.l({title:"Theme",default:"dracula"}),lineNumbers:l.r({title:"Line number",default:!1}),language:l.y({title:"Language",default:"javascript",binding:!1,options:[{value:"javascript",title:"JavaScript"},{value:"html",title:"HTML"},{value:"css",title:"CSS"}]})}});const P=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx(c.CodeInline,{...e,...t,children:o}),D=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("code",{...e,...t,children:o});s.registerChaiBlock(P,{type:"Email/CodeInline",label:"Code Inline",group:"basic",category:"core",icon:a.CodeSandboxLogoIcon,builderComponent:D,props:{styles:l.S({default:""}),code:l.g({title:"Code",default:"console.log('Hello, world!');"})}});const M=p.noop;exports.loadEmailBlocks=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("lodash-es"),i=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("@react-email/components"),c=require("@chaibuilder/runtime"),d=require("./empty-slot-Sy930lX6.cjs"),l=require("./controls-jWJDao88.cjs"),a=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");const m=({blockProps:e,styles:t,children:o,inBuilder:r})=>{let n=o;return o||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{inBuilder:r})),i.jsxRuntimeExports.jsx(s.Container,{...e,...t,children:n})};c.registerChaiBlock(m,{type:"Email/Container",label:"Container",group:"basic",category:"core",canAcceptBlock:()=>!0,canMove:()=>!0,canDelete:()=>!1,canDuplicate:()=>!1,canBeNested:e=>!e});const x=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(s.Section,{...e,...t,children:o});c.registerChaiBlock(x,{type:"Email/Section",label:"Section",group:"basic",category:"core",icon:a.ImageIcon,props:{align:l.y({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0});const g=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(s.Row,{...e,...t,children:o});c.registerChaiBlock(g,{type:"Email/Row",label:"Row",group:"basic",category:"core",icon:a.ImageIcon,blocks:[{_type:"Email/Row",_id:"a"},{_type:"Email/Column",_id:"b",_parent:"a"}],props:{styles:l.S({default:""})},canAcceptBlock:e=>e==="Email/Column"});const h=({blockProps:e,styles:t,children:o,align:r})=>{let n=o;return o||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{})),i.jsxRuntimeExports.jsx(s.Column,{...e,...t,align:r,children:n})};c.registerChaiBlock(h,{type:"Email/Column",label:"Column",group:"basic",category:"core",icon:a.ImageIcon,props:{styles:l.S({default:""}),align:l.y({title:"Align",default:"",options:[{value:"",title:"None"},{value:"left",title:"left"},{value:"center",title:"center"},{value:"right",title:"right"}]})},canAcceptBlock:()=>!0,canBeNested:e=>e==="Email/Row"});const k=({level:e,blockProps:t,styles:o,content:r})=>i.jsxRuntimeExports.jsx(s.Heading,{as:e,...t,...o,children:r}),b=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("h1",{...e,...t,children:o});c.registerChaiBlock(k,{type:"Email/Heading",label:"Heading",group:"basic",category:"core",icon:a.HeadingIcon,builderComponent:b,props:{content:l.l({title:"Content",default:"Enter your heading here..."}),styles:l.S({default:"text-xl"}),level:l.y({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]})},canAcceptBlock:e=>["Email/Link","Email/RawText"].includes(e)});const B=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx(s.Text,{...e,...t,children:o}),C=({content:e,blockProps:t,styles:o})=>i.jsxRuntimeExports.jsx("p",{...t,...o,children:e});c.registerChaiBlock(B,{type:"Email/Text",label:"Text",group:"basic",category:"core",icon:a.TextIcon,builderComponent:C,props:{content:l.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim."}),styles:l.S({default:""})},canAcceptBlock:e=>["Email/Link","Email/RawText"].includes(e)});const j=({content:e})=>e,y=({content:e,blockProps:t})=>i.jsxRuntimeExports.jsx("span",{...t,children:e});c.registerChaiBlock(j,{type:"Email/RawText",label:"Raw Text",group:"basic",category:"core",icon:a.TextIcon,hidden:!0,builderComponent:y,props:{content:l.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. "})}});const E=({blockProps:e,styles:t,link:o,content:r})=>i.jsxRuntimeExports.jsx(s.Button,{...e,...t,href:o.href,children:r}),f=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("button",{type:"button",...e,...t,children:o});c.registerChaiBlock(E,{type:"Email/Button",label:"Button",group:"basic",category:"core",builderComponent:f,props:{content:l.l({title:"Content",default:"Click me"}),link:l.T({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.S({default:"bg-primary text-white px-4 py-2 rounded-md"})}});const R=({blockProps:e,styles:t,href:o,content:r,target:n,children:u})=>i.jsxRuntimeExports.jsx(s.Link,{...e,...t,href:o,target:n,children:u||r}),v=({blockProps:e,styles:t,content:o,children:r})=>{let n=r;return r||(n=i.jsxRuntimeExports.jsx(d.EmptySlot,{})),i.jsxRuntimeExports.jsx("span",{...e,...t,children:n||o})};c.registerChaiBlock(R,{type:"Email/Link",label:"Link",group:"basic",category:"core",icon:a.Link1Icon,blocks:[{_id:"a",_type:"Link"},{_id:"b",_parent:"a",_type:"RawText",content:"I am a link."}],builderComponent:v,props:{content:l.l({title:"Content",default:"I am a link."}),link:l.T({title:"Link",default:{href:"https://chaibuilder.com",target:"_blank",type:"url"}}),styles:l.S({default:"font-bold text-blue-500"})},canAcceptBlock:()=>!0});const w=({blockProps:e,styles:t,children:o})=>i.jsxRuntimeExports.jsx(s.Preview,{...e,...t,children:o}),I=({blockProps:e,styles:t,content:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:o});c.registerChaiBlock(w,{type:"Email/Preview",label:"Preview",group:"basic",category:"core",builderComponent:I,canAcceptBlock:()=>!0,canDuplicate:()=>!1,props:{content:l.g({default:"Preview content",title:"Content"})}});const S=({blockProps:e,content:t})=>i.jsxRuntimeExports.jsx(s.Markdown,{children:t,...e});c.registerChaiBlock(S,{type:"Email/Markdown",label:"Markdown",group:"basic",category:"core",props:{content:l.g({default:"# This is a ~~strikethrough~~",title:"Markdown"})}});const T=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx(s.Img,{...e,...t,src:r,alt:o,width:n,height:u}),L=({blockProps:e,styles:t,alt:o,image:r,width:n,height:u})=>i.jsxRuntimeExports.jsx("img",{...e,...t,src:r,alt:o,width:n,height:u});c.registerChaiBlock(T,{type:"Email/Image",label:"Image",group:"basic",category:"core",icon:a.ImageIcon,builderComponent:L,props:{styles:l.S({default:"w-full"}),image:l.q({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.l({title:"Alt",default:""}),width:l.l({title:"Width",default:""}),height:l.l({title:"Height",default:""})}});const q=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx(s.Hr,{...e,...t}),H=({blockProps:e,styles:t})=>i.jsxRuntimeExports.jsx("hr",{...e,...t});c.registerChaiBlock(q,{type:"Email/Divider",label:"Divider",group:"basic",category:"core",icon:a.DividerHorizontalIcon,builderComponent:H,props:{styles:l.S({default:"w-full h-2"})}});const _=({blockProps:e,styles:t,code:o,lineNumbers:r,theme:n,language:u})=>i.jsxRuntimeExports.jsx(s.CodeBlock,{...e,...t,code:o,linenumbers:r,theme:n,language:u}),A=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("div",{...e,...t,children:i.jsxRuntimeExports.jsx("code",{children:o})});c.registerChaiBlock(_,{type:"Email/CodeBlock",label:"Code Block",group:"basic",category:"core",hidden:!0,icon:a.CodeSandboxLogoIcon,builderComponent:A,props:{styles:l.S({default:""}),code:l.g({title:"Code",default:"console.log('Hello, world!');"}),theme:l.l({title:"Theme",default:"dracula"}),lineNumbers:l.r({title:"Line number",default:!1}),language:l.y({title:"Language",default:"javascript",binding:!1,options:[{value:"javascript",title:"JavaScript"},{value:"html",title:"HTML"},{value:"css",title:"CSS"}]})}});const D=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx(s.CodeInline,{...e,...t,children:o}),M=({blockProps:e,styles:t,code:o})=>i.jsxRuntimeExports.jsx("code",{...e,...t,children:o});c.registerChaiBlock(D,{type:"Email/CodeInline",label:"Code Inline",group:"basic",category:"core",icon:a.CodeSandboxLogoIcon,builderComponent:M,props:{styles:l.S({default:""}),code:l.g({title:"Code",default:"console.log('Hello, world!');"})}});const N=p.noop;exports.loadEmailBlocks=N;
@@ -1,20 +1,20 @@
1
- import { noop as k } from "lodash-es";
1
+ import { noop as f } from "lodash-es";
2
2
  import { j as o } from "./jsx-runtime-WbnYoNE9.js";
3
- import { Container as f, Section as y, Row as x, Column as B, Heading as C, Text as v, Button as j, Link as w, Preview as E, Markdown as I, Img as L, Hr as T, CodeBlock as H, CodeInline as R } from "@react-email/components";
3
+ import { Container as k, Section as x, Row as y, Column as B, Heading as C, Text as v, Button as j, Link as w, Preview as E, Markdown as I, Img as L, Hr as T, CodeBlock as H, CodeInline as R } from "@react-email/components";
4
4
  import { registerChaiBlock as r } from "@chaibuilder/runtime";
5
- import { E as m } from "./empty-slot-ZBlsQi6m.js";
6
- import { y as d, S as a, l as s, g as u, T as g, q as _, r as A } from "./controls-VTdJhdSz.js";
7
- import { ImageIcon as p, HeadingIcon as S, TextIcon as h, Link1Icon as P, DividerHorizontalIcon as D, CodeSandboxLogoIcon as b } from "@radix-ui/react-icons";
5
+ import { E as m } from "./empty-slot-Lsxjts7Q.js";
6
+ import { y as d, S as a, l as u, g as s, T as g, q as _, r as A } from "./controls-VTdJhdSz.js";
7
+ import { ImageIcon as p, HeadingIcon as S, TextIcon as h, Link1Icon as D, DividerHorizontalIcon as M, CodeSandboxLogoIcon as b } from "@radix-ui/react-icons";
8
8
  import "./_commonjsHelpers-UyOWmZb0.js";
9
9
  import "react";
10
10
  import "./Functions-7jnEwJyw.js";
11
11
  import "clsx";
12
12
  import "tailwind-merge";
13
- const M = ({ blockProps: e, styles: t, children: l, inBuilder: i }) => {
13
+ const N = ({ blockProps: e, styles: t, children: l, inBuilder: i }) => {
14
14
  let n = l;
15
- return l || (n = /* @__PURE__ */ o.jsx(m, { blockProps: {}, styles: {}, inBuilder: i })), /* @__PURE__ */ o.jsx(f, { ...e, ...t, children: n });
15
+ return l || (n = /* @__PURE__ */ o.jsx(m, { inBuilder: i })), /* @__PURE__ */ o.jsx(k, { ...e, ...t, children: n });
16
16
  };
17
- r(M, {
17
+ r(N, {
18
18
  type: "Email/Container",
19
19
  label: "Container",
20
20
  group: "basic",
@@ -25,8 +25,8 @@ r(M, {
25
25
  canDuplicate: () => !1,
26
26
  canBeNested: (e) => !e
27
27
  });
28
- const N = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(y, { ...e, ...t, children: l });
29
- r(N, {
28
+ const P = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(x, { ...e, ...t, children: l });
29
+ r(P, {
30
30
  type: "Email/Section",
31
31
  label: "Section",
32
32
  group: "basic",
@@ -46,7 +46,7 @@ r(N, {
46
46
  },
47
47
  canAcceptBlock: () => !0
48
48
  });
49
- const $ = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(x, { ...e, ...t, children: l });
49
+ const $ = ({ blockProps: e, styles: t, children: l }) => /* @__PURE__ */ o.jsx(y, { ...e, ...t, children: l });
50
50
  r($, {
51
51
  type: "Email/Row",
52
52
  label: "Row",
@@ -64,7 +64,7 @@ r($, {
64
64
  });
65
65
  const q = ({ blockProps: e, styles: t, children: l, align: i }) => {
66
66
  let n = l;
67
- return l || (n = /* @__PURE__ */ o.jsx(m, { blockProps: {}, styles: {} })), /* @__PURE__ */ o.jsx(B, { ...e, ...t, align: i, children: n });
67
+ return l || (n = /* @__PURE__ */ o.jsx(m, {})), /* @__PURE__ */ o.jsx(B, { ...e, ...t, align: i, children: n });
68
68
  };
69
69
  r(q, {
70
70
  type: "Email/Column",
@@ -97,7 +97,7 @@ r(z, {
97
97
  icon: S,
98
98
  builderComponent: J,
99
99
  props: {
100
- content: s({ title: "Content", default: "Enter your heading here..." }),
100
+ content: u({ title: "Content", default: "Enter your heading here..." }),
101
101
  styles: a({ default: "text-xl" }),
102
102
  level: d({
103
103
  title: "Level",
@@ -124,7 +124,7 @@ r(U, {
124
124
  icon: h,
125
125
  builderComponent: V,
126
126
  props: {
127
- content: u({
127
+ content: s({
128
128
  title: "Content",
129
129
  default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim."
130
130
  }),
@@ -142,7 +142,7 @@ r(W, {
142
142
  hidden: !0,
143
143
  builderComponent: F,
144
144
  props: {
145
- content: u({
145
+ content: s({
146
146
  title: "Content",
147
147
  default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. "
148
148
  })
@@ -156,21 +156,21 @@ r(G, {
156
156
  category: "core",
157
157
  builderComponent: K,
158
158
  props: {
159
- content: s({ title: "Content", default: "Click me" }),
159
+ content: u({ title: "Content", default: "Click me" }),
160
160
  link: g({ title: "Link", default: { href: "https://chaibuilder.com", target: "_blank", type: "url" } }),
161
161
  styles: a({ default: "bg-primary text-white px-4 py-2 rounded-md" })
162
162
  }
163
163
  });
164
164
  const O = ({ blockProps: e, styles: t, href: l, content: i, target: n, children: c }) => /* @__PURE__ */ o.jsx(w, { ...e, ...t, href: l, target: n, children: c || i }), Q = ({ blockProps: e, styles: t, content: l, children: i }) => {
165
165
  let n = i;
166
- return i || (n = /* @__PURE__ */ o.jsx(m, { blockProps: {}, styles: {} })), /* @__PURE__ */ o.jsx("span", { ...e, ...t, children: n || l });
166
+ return i || (n = /* @__PURE__ */ o.jsx(m, {})), /* @__PURE__ */ o.jsx("span", { ...e, ...t, children: n || l });
167
167
  };
168
168
  r(O, {
169
169
  type: "Email/Link",
170
170
  label: "Link",
171
171
  group: "basic",
172
172
  category: "core",
173
- icon: P,
173
+ icon: D,
174
174
  blocks: [
175
175
  {
176
176
  _id: "a",
@@ -185,7 +185,7 @@ r(O, {
185
185
  ],
186
186
  builderComponent: Q,
187
187
  props: {
188
- content: s({ title: "Content", default: "I am a link." }),
188
+ content: u({ title: "Content", default: "I am a link." }),
189
189
  link: g({ title: "Link", default: { href: "https://chaibuilder.com", target: "_blank", type: "url" } }),
190
190
  styles: a({ default: "font-bold text-blue-500" })
191
191
  },
@@ -201,7 +201,7 @@ r(X, {
201
201
  canAcceptBlock: () => !0,
202
202
  canDuplicate: () => !1,
203
203
  props: {
204
- content: u({ default: "Preview content", title: "Content" })
204
+ content: s({ default: "Preview content", title: "Content" })
205
205
  }
206
206
  });
207
207
  const Z = ({ blockProps: e, content: t }) => /* @__PURE__ */ o.jsx(I, { children: t, ...e });
@@ -211,7 +211,7 @@ r(Z, {
211
211
  group: "basic",
212
212
  category: "core",
213
213
  props: {
214
- content: u({ default: "# This is a ~~strikethrough~~", title: "Markdown" })
214
+ content: s({ default: "# This is a ~~strikethrough~~", title: "Markdown" })
215
215
  }
216
216
  });
217
217
  const ee = ({ blockProps: e, styles: t, alt: l, image: i, width: n, height: c }) => /* @__PURE__ */ o.jsx(L, { ...e, ...t, src: i, alt: l, width: n, height: c }), te = ({ blockProps: e, styles: t, alt: l, image: i, width: n, height: c }) => /* @__PURE__ */ o.jsx("img", { ...e, ...t, src: i, alt: l, width: n, height: c });
@@ -228,9 +228,9 @@ r(ee, {
228
228
  title: "Image",
229
229
  default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
230
230
  }),
231
- alt: s({ title: "Alt", default: "" }),
232
- width: s({ title: "Width", default: "" }),
233
- height: s({ title: "Height", default: "" })
231
+ alt: u({ title: "Alt", default: "" }),
232
+ width: u({ title: "Width", default: "" }),
233
+ height: u({ title: "Height", default: "" })
234
234
  }
235
235
  });
236
236
  const le = ({ blockProps: e, styles: t }) => /* @__PURE__ */ o.jsx(T, { ...e, ...t }), oe = ({ blockProps: e, styles: t }) => /* @__PURE__ */ o.jsx("hr", { ...e, ...t });
@@ -239,7 +239,7 @@ r(le, {
239
239
  label: "Divider",
240
240
  group: "basic",
241
241
  category: "core",
242
- icon: D,
242
+ icon: M,
243
243
  builderComponent: oe,
244
244
  props: {
245
245
  styles: a({ default: "w-full h-2" })
@@ -256,8 +256,8 @@ r(ie, {
256
256
  builderComponent: ne,
257
257
  props: {
258
258
  styles: a({ default: "" }),
259
- code: u({ title: "Code", default: "console.log('Hello, world!');" }),
260
- theme: s({ title: "Theme", default: "dracula" }),
259
+ code: s({ title: "Code", default: "console.log('Hello, world!');" }),
260
+ theme: u({ title: "Theme", default: "dracula" }),
261
261
  lineNumbers: A({
262
262
  title: "Line number",
263
263
  default: !1
@@ -285,10 +285,10 @@ r(re, {
285
285
  builderComponent: ae,
286
286
  props: {
287
287
  styles: a({ default: "" }),
288
- code: u({ title: "Code", default: "console.log('Hello, world!');" })
288
+ code: s({ title: "Code", default: "console.log('Hello, world!');" })
289
289
  }
290
290
  });
291
- const xe = k;
291
+ const ye = f;
292
292
  export {
293
- xe as loadEmailBlocks
293
+ ye as loadEmailBlocks
294
294
  };
package/dist/email.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs");require("./core.cjs");const r=require("@radix-ui/react-icons"),q=require("lodash-es"),n=require("./ChaiBuilderEditor-GronwWg6.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("react-i18next");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lucide-react");const o=[{title:"Mobile",content:"Mobile email client",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{}),width:400},{title:"Email Client",content:"Content as seen inside an email client",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{className:"rotate-90"}),width:700}],s=i=>{const u={...i,filterChaiBlock:t=>q.includes(t.type,"Email/"),importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:o};return e.jsxRuntimeExports.jsx(n.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs");require("./core.cjs");const r=require("@radix-ui/react-icons"),q=require("lodash-es"),n=require("./ChaiBuilderEditor-AIXWnz29.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("react-i18next");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./utils-K3Zk762G.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lucide-react");const o=[{title:"Mobile",content:"Mobile email client",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{}),width:400},{title:"Email Client",content:"Content as seen inside an email client",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{className:"rotate-90"}),width:700}],s=i=>{const u={...i,filterChaiBlock:t=>q.includes(t.type,"Email/"),importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:o};return e.jsxRuntimeExports.jsx(n.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=s;
package/dist/email.d.ts CHANGED
@@ -57,7 +57,7 @@ declare interface ChaiBuilderEditorProps {
57
57
  uploadMediaCallback?: (file: File) => Promise<{
58
58
  url: string;
59
59
  }>;
60
- askAiCallBack?: (prompt: string, blocks: ChaiBlock[]) => Promise<AskAiResponse>;
60
+ askAiCallBack?: (type: "styles" | "content", prompt: string, blocks: ChaiBlock[]) => Promise<AskAiResponse>;
61
61
  saveAiContextCallback?: (content: string) => Promise<true | Error>;
62
62
  aiContext?: string;
63
63
  getExternalPredefinedBlock?: (block: PredefinedBlock) => Promise<PredefinedBlock & {
package/dist/email.js CHANGED
@@ -2,7 +2,7 @@ import { j as i } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import "./core.js";
3
3
  import { MobileIcon as t } from "@radix-ui/react-icons";
4
4
  import { includes as p } from "lodash-es";
5
- import { C as e } from "./ChaiBuilderEditor-f4SJU7kK.js";
5
+ import { C as e } from "./ChaiBuilderEditor-NnMEdW3k.js";
6
6
  import "./_commonjsHelpers-UyOWmZb0.js";
7
7
  import "react";
8
8
  import "react-i18next";
@@ -19,9 +19,9 @@ import "tailwind-merge";
19
19
  import "@chaibuilder/runtime";
20
20
  import "@react-hookz/web";
21
21
  import "./MODIFIERS-cBT31iqE.js";
22
+ import "./utils-iMv3T4WT.js";
22
23
  import "@radix-ui/react-toggle";
23
24
  import "class-variance-authority";
24
- import "./Class-6Hz2KzYb.js";
25
25
  import "@radix-ui/react-switch";
26
26
  import "@radix-ui/react-slot";
27
27
  import "@radix-ui/react-accordion";
@@ -0,0 +1,6 @@
1
+ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
+ import { c as n } from "./Functions-7jnEwJyw.js";
3
+ const i = ({ className: t = "", inBuilder: l }) => l ? /* @__PURE__ */ e.jsx("div", { className: n("pointer-events-none flex h-20 flex-col items-center justify-center p-2", t), children: /* @__PURE__ */ e.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2", children: /* @__PURE__ */ e.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300" }) }) }) : null;
4
+ export {
5
+ i as E
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./Functions-N3yhPYKY.cjs"),l=({className:t="",inBuilder:n})=>n?e.jsxRuntimeExports.jsx("div",{className:s.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",t),children:e.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300"})})}):null;exports.EmptySlot=l;
@@ -1,8 +1,8 @@
1
1
  import { j as u } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import x from "@rjsf/core";
3
- import $ from "@rjsf/validator-ajv8";
4
- import { includes as h, get as a, set as b, first as F } from "lodash-es";
5
- import { a_ as P, a$ as E, b0 as O, b1 as S } from "./ChaiBuilderEditor-f4SJU7kK.js";
3
+ import b from "@rjsf/validator-ajv8";
4
+ import { includes as h, get as a, set as $, first as F } from "lodash-es";
5
+ import { a$ as P, b0 as E, b1 as O, b2 as S } from "./ChaiBuilderEditor-NnMEdW3k.js";
6
6
  const d = (i, l = "") => {
7
7
  switch (i.type) {
8
8
  case "singular":
@@ -61,7 +61,7 @@ const d = (i, l = "") => {
61
61
  if (h(["slot", "styles"], t.type))
62
62
  return;
63
63
  const s = a(t, "i18n", !1) ? `${o}-${l}` : o;
64
- e.items.properties[s] = y(t, l), b(e.items, "title", a(t, "itemTitle", `${r} item`));
64
+ e.items.properties[s] = y(t, l), $(e.items, "title", a(t, "itemTitle", `${r} item`));
65
65
  }), e;
66
66
  default:
67
67
  return {};
@@ -113,7 +113,7 @@ const d = (i, l = "") => {
113
113
  uiSchema: e,
114
114
  schema: r,
115
115
  formData: c,
116
- validator: $,
116
+ validator: b,
117
117
  onChange: o,
118
118
  disabled: n
119
119
  }
@@ -1 +1 @@
1
- "use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./ChaiBuilderEditor-GronwWg6.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[c&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
1
+ "use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./ChaiBuilderEditor-AIXWnz29.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[c&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
@@ -20,7 +20,7 @@ import * as b from "react";
20
20
  import H0, { lazy as A2, useCallback as g2, useState as M2, Suspense as u0, useEffect as s0 } from "react";
21
21
  import "./core.js";
22
22
  import { FileTextIcon as p0, GearIcon as V0, EyeClosedIcon as f0, EyeOpenIcon as m0 } from "@radix-ui/react-icons";
23
- import { u as L0, G as Y2, B as X2, A as x0, a as w0, b as B0, c as C0, d as O0, e as A0, f as S0, g as y0, h as b0, C as P0 } from "./ChaiBuilderEditor-f4SJU7kK.js";
23
+ import { u as L0, G as Y2, B as X2, A as x0, a as w0, b as B0, c as C0, d as O0, e as A0, f as S0, g as y0, h as b0, C as P0 } from "./ChaiBuilderEditor-NnMEdW3k.js";
24
24
  import { toast as h1, Toaster as F0 } from "sonner";
25
25
  import { useTranslation as D0 } from "react-i18next";
26
26
  import { sortBy as R0, filter as k0, has as T0, set as E0, capitalize as N0, get as b2, omit as I0, size as P2 } from "lodash-es";
@@ -2043,7 +2043,7 @@ const k4 = () => {
2043
2043
  ] })
2044
2044
  ] })
2045
2045
  ] });
2046
- }, W4 = () => /* @__PURE__ */ i.jsx(I4, { children: /* @__PURE__ */ i.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ i.jsx(Q0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), U4 = A2(() => import("./PagesPanel-f0XKYnEj.js")), j4 = A2(() => import("./ProjectPanel-vbBl5OmU.js")), Q4 = A2(() => import("./CurrentPage-S5EFVi8y.js")), K4 = () => /* @__PURE__ */ i.jsx("h2", { children: "Your Logo" }), G4 = () => {
2046
+ }, W4 = () => /* @__PURE__ */ i.jsx(I4, { children: /* @__PURE__ */ i.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ i.jsx(Q0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), U4 = A2(() => import("./PagesPanel-TYArrNU6.js")), j4 = A2(() => import("./ProjectPanel-qY_Bnqjm.js")), Q4 = A2(() => import("./CurrentPage-rkdt2mNr.js")), K4 = () => /* @__PURE__ */ i.jsx("h2", { children: "Your Logo" }), G4 = () => {
2047
2047
  const { mutate: a } = y4();
2048
2048
  return b0("editable", !0) ? /* @__PURE__ */ i.jsx(X2, { onClick: a, className: "bg-blue-600 text-white", children: "Publish" }) : null;
2049
2049
  }, q4 = (a) => {