@chaibuilder/sdk 1.2.50 → 1.2.51

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 (68) hide show
  1. package/dist/{AddBlocks-IX7HKzSe.js → AddBlocks-LyEjf6h0.js} +2 -2
  2. package/dist/{AddBlocks-zwZ63DdP.cjs → AddBlocks-hOFqmmXZ.cjs} +1 -1
  3. package/dist/{CanvasArea-URgoG1jc.cjs → CanvasArea-luy5nUGR.cjs} +2 -2
  4. package/dist/{CanvasArea-ehmBje_E.js → CanvasArea-mhINqS0c.js} +3 -3
  5. package/dist/{ChaiBuilderEditor-ZRHqW7Gd.cjs → ChaiBuilderEditor-H173PF4T.cjs} +1 -1
  6. package/dist/{ChaiBuilderEditor-3xIN-AP_.js → ChaiBuilderEditor-KEwDa8Bl.js} +7 -15
  7. package/dist/{CodeEditor-0F7Dz3AB.js → CodeEditor-XaHQMfpT.js} +2 -2
  8. package/dist/{CodeEditor-1vu-qNgT.cjs → CodeEditor-jh9xwRXT.cjs} +1 -1
  9. package/dist/{CurrentPage-HOPNdQZ-.cjs → CurrentPage-RUx7wvBt.cjs} +1 -1
  10. package/dist/{CurrentPage-qhBjm7th.js → CurrentPage-UzajS1xZ.js} +3 -3
  11. package/dist/{ListTree-sTwXvXST.js → ListTree-BWBPjCzR.js} +1 -1
  12. package/dist/{ListTree-DkbFFDXB.cjs → ListTree-S6pMJlmj.cjs} +1 -1
  13. package/dist/{PagesPanel-kdl4A0IN.cjs → PagesPanel-LBW-4mVM.cjs} +1 -1
  14. package/dist/{PagesPanel-5iVsbDP1.js → PagesPanel-p-h6o26u.js} +4 -4
  15. package/dist/{ProjectPanel-mXPBI-TU.cjs → ProjectPanel-PQv2uVj2.cjs} +1 -1
  16. package/dist/{ProjectPanel-c8oTzhQd.js → ProjectPanel-o0OWWnYQ.js} +4 -4
  17. package/dist/Settings-DclX-cDC.cjs +1 -0
  18. package/dist/{Settings-0uSGoECC.js → Settings-zm-cF9rZ.js} +6 -6
  19. package/dist/{SidePanels-kKram02Q.cjs → SidePanels-0w036NaZ.cjs} +1 -1
  20. package/dist/{SidePanels-YLWdBer9.js → SidePanels-TOHaLWC6.js} +2 -2
  21. package/dist/{ThemeConfiguration-8W1CM4tW.cjs → ThemeConfiguration-MBuJmbDn.cjs} +1 -1
  22. package/dist/{ThemeConfiguration-AAGFJieC.js → ThemeConfiguration-wJA_aBly.js} +1 -1
  23. package/dist/{Topbar-nX9Muoem.js → Topbar-Rh7dWuJD.js} +1 -1
  24. package/dist/{Topbar-CLNUPx7K.cjs → Topbar-u5HAh7Mg.cjs} +1 -1
  25. package/dist/{UILibrariesPanel-fKn2nlgI.js → UILibrariesPanel-3-cWabRt.js} +1 -1
  26. package/dist/{UILibrariesPanel-cp0Mkaq_.cjs → UILibrariesPanel-xOys8g8A.cjs} +1 -1
  27. package/dist/{UnsplashImages-56HoW_ZA.cjs → UnsplashImages-Kymq8i6b.cjs} +1 -1
  28. package/dist/{UnsplashImages-zTZa3LjG.js → UnsplashImages-dhU2-pHY.js} +1 -1
  29. package/dist/{UploadImages-okNGjkXb.cjs → UploadImages-WpaiIEbj.cjs} +1 -1
  30. package/dist/{UploadImages-SnfaTrlz.js → UploadImages-dr_gpAea.js} +1 -1
  31. package/dist/{add-page-modal-Y2RY3x01.cjs → add-page-modal-vmUMNu7F.cjs} +1 -1
  32. package/dist/{add-page-modal-uDoO0zws.js → add-page-modal-zwq1hL_o.js} +4 -4
  33. package/dist/{confirm-alert-9XiVxCc0.js → confirm-alert-73tjkqtD.js} +1 -1
  34. package/dist/{confirm-alert-aD7AMK_6.cjs → confirm-alert-fK62IiTF.cjs} +1 -1
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.js +1 -1
  37. package/dist/{delete-page-modal-7sfoFf9r.js → delete-page-modal-DPNxHWfi.js} +3 -3
  38. package/dist/{delete-page-modal-ieJ367JA.cjs → delete-page-modal-G_aMq7K4.cjs} +1 -1
  39. package/dist/email.cjs +1 -1
  40. package/dist/email.js +1 -1
  41. package/dist/{form-KWYHDVIf.cjs → form-YMuxx9Ju.cjs} +1 -1
  42. package/dist/{form-PQSmqcIl.js → form-_tKI6ugY.js} +1 -1
  43. package/dist/html-to-json-9uiQ2Dp2.cjs +1 -0
  44. package/dist/html-to-json-ofq1N3tB.js +186 -0
  45. package/dist/{index-VOrp9ZpX.cjs → index-9gfJqJ6E.cjs} +1 -1
  46. package/dist/{index-i2kgLkjC.js → index-vpfLlP7N.js} +3 -3
  47. package/dist/lib.cjs +1 -1
  48. package/dist/lib.js +1 -1
  49. package/dist/{page-viewer-qkwZJ6e-.js → page-viewer-UZMtWQDj.js} +4 -4
  50. package/dist/{page-viewer-aoro5JxT.cjs → page-viewer-WQgFhgp5.cjs} +1 -1
  51. package/dist/{project-general-setting-arXitV5_.cjs → project-general-setting-Yh4fQsQH.cjs} +1 -1
  52. package/dist/{project-general-setting-3gkaXq1F.js → project-general-setting-Zz7qcIW7.js} +4 -4
  53. package/dist/{project-seo-setting-kjtUt-er.cjs → project-seo-setting-_gNPOTsp.cjs} +1 -1
  54. package/dist/{project-seo-setting-X8pykTmc.js → project-seo-setting-wFOVAoC2.js} +2 -2
  55. package/dist/{single-page-detail-ZXZX6Xmw.js → single-page-detail-1Vveonuh.js} +5 -5
  56. package/dist/{single-page-detail-UsWG0gfh.cjs → single-page-detail-EMxzuAe1.cjs} +1 -1
  57. package/dist/studio.cjs +1 -1
  58. package/dist/studio.js +3 -3
  59. package/dist/ui.cjs +1 -1
  60. package/dist/ui.js +1 -1
  61. package/dist/{useCodeEditor-yl5V3Hte.js → useCodeEditor-2KOfsFsx.js} +1 -1
  62. package/dist/{useCodeEditor-CtjbxWLf.cjs → useCodeEditor-gE1NWoNH.cjs} +1 -1
  63. package/dist/web-blocks.cjs +1 -1
  64. package/dist/web-blocks.js +4 -4
  65. package/package.json +1 -1
  66. package/dist/Settings-3kBSStO6.cjs +0 -1
  67. package/dist/html-to-json-GJ6RioQf.js +0 -221
  68. package/dist/html-to-json-O1OpqICe.cjs +0 -1
@@ -3,13 +3,13 @@ import k, { createElement as S, useState as b, useEffect as E } from "react";
3
3
  import { has as F, isFunction as H, first as h, omit as N, filter as g, groupBy as L, uniq as D, map as B, includes as z, isEmpty as C, reject as y, values as v } from "lodash-es";
4
4
  import { useAtom as x } from "jotai";
5
5
  import { useTranslation as A } from "react-i18next";
6
- import { m as w, K as I, z as M, af as P, ab as q, ac as O, ad as K, bk as R, bl as G, bm as J, bn as U, aC as V, ba as W, bo as Y, B as Q, bp as X, bq as Z, br as $, h as T, ah as ee, ai as te, aj as _, bf as se, b5 as oe, b6 as re, b7 as ae, b8 as le } from "./ChaiBuilderEditor-3xIN-AP_.js";
6
+ import { m as w, K as I, z as M, af as P, ab as q, ac as O, ad as K, bk as R, bl as G, bm as J, bn as U, aC as V, ba as W, bo as Y, B as Q, bp as X, bq as Z, br as $, h as T, ah as ee, ai as te, aj as _, bf as se, b5 as oe, b6 as re, b7 as ae, b8 as le } from "./ChaiBuilderEditor-KEwDa8Bl.js";
7
7
  import { BoxIcon as ie } from "@radix-ui/react-icons";
8
8
  import { syncBlocksWithDefaults as ce, useChaiBlocks as ne } from "@chaibuilder/runtime";
9
9
  import { useFeature as de } from "flagged";
10
10
  import { O as j } from "./MODIFIERS-fd5XOmum.js";
11
11
  import { d as me } from "./atoms-ZOWyNoiC.js";
12
- import { g as pe } from "./html-to-json-GJ6RioQf.js";
12
+ import { g as pe } from "./html-to-json-ofq1N3tB.js";
13
13
  import "./_commonjsHelpers-UyOWmZb0.js";
14
14
  import "clsx";
15
15
  import "react-dom";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),t=require("lodash-es"),h=require("jotai"),E=require("react-i18next"),s=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs"),b=require("@radix-ui/react-icons"),R=require("@chaibuilder/runtime"),T=require("flagged"),q=require("./MODIFIERS-mVmfEGgo.cjs"),N=require("./atoms-a0H_593V.cjs"),k=require("./html-to-json-O1OpqICe.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.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");require("./index-ecnGWzh9.cjs");require("himalaya");const y=({block:r})=>{const[,i]=h.useAtom(N.draggedBlockAtom),{type:l,icon:c,label:d}=r,{addCoreBlock:p,addPredefinedBlock:j}=s.useAddBlock(),[o,g]=s.useSelectedBlockIds(),[,f]=s.useHighlightBlockId(),[,x]=h.useAtom(s.activePanelAtom),a=()=>{if(t.has(r,"blocks")){const m=t.isFunction(r.blocks)?r.blocks():r.blocks;j(R.syncBlocksWithDefaults(m),t.first(o))}else p(r,t.first(o));x(q.OUTLINE_KEY)},n=T.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:a,type:"button",onDragStart:m=>{m.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),m.dataTransfer.setDragImage(new Image,0,0),i(t.omit(r,["component","icon"])),setTimeout(()=>{g([]),f(null),x(q.OUTLINE_KEY)},200)},draggable:"true",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(n?"cursor-grab":"cursor-pointer"),children:[u.createElement(c||b.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:d||l})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:d||l})})]})})},B=()=>{const{t:r}=E.useTranslation(),[i,l]=u.useState(""),{addPredefinedBlock:c}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,p]=h.useAtom(s.activePanelAtom),j=()=>{const o=k.getBlocksFromHTML(i);c([...o],t.first(d)||null),l(""),p(q.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:o=>o&&o.focus(),onChange:o=>l(o.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>j(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},v=()=>{const{t:r}=E.useTranslation(),[i,l]=u.useState("core"),[c,d]=u.useState("basic"),p=R.useChaiBlocks(),[,j]=h.useAtom(s.showPredefinedBlockCategoryAtom),o=s.useBuilderProp("importHTMLSupport",!0),g=s.useBuilderProp("filterChaiBlock",()=>!0),f=t.filter(p,g),x=t.groupBy(f,"category"),a=t.uniq(t.map(x.core,"group"));return u.useEffect(()=>{!t.includes(a,c)&&!t.isEmpty(a)&&!t.isEmpty(c)&&d(t.first(a))},[a,c]),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-72 flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:r("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r(i==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:n=>{j(""),l(n)},value:i,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(o?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),o?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),i==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:u.Children.toArray(t.map(a,n=>t.reject(t.filter(t.values(x.core),{group:n}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:n,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:n,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:n}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:u.Children.toArray(t.reject(t.filter(t.values(x.core),{group:n}),{hidden:!0}).map(m=>e.jsxRuntimeExports.jsx(y,{block:m})))})})]})}):null))})}),i==="html"&&o?e.jsxRuntimeExports.jsx(B,{}):null]})};exports.default=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),t=require("lodash-es"),h=require("jotai"),E=require("react-i18next"),s=require("./ChaiBuilderEditor-H173PF4T.cjs"),b=require("@radix-ui/react-icons"),R=require("@chaibuilder/runtime"),T=require("flagged"),q=require("./MODIFIERS-mVmfEGgo.cjs"),N=require("./atoms-a0H_593V.cjs"),k=require("./html-to-json-9uiQ2Dp2.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.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");require("./index-ecnGWzh9.cjs");require("himalaya");const y=({block:r})=>{const[,i]=h.useAtom(N.draggedBlockAtom),{type:l,icon:c,label:d}=r,{addCoreBlock:p,addPredefinedBlock:j}=s.useAddBlock(),[o,g]=s.useSelectedBlockIds(),[,f]=s.useHighlightBlockId(),[,x]=h.useAtom(s.activePanelAtom),a=()=>{if(t.has(r,"blocks")){const m=t.isFunction(r.blocks)?r.blocks():r.blocks;j(R.syncBlocksWithDefaults(m),t.first(o))}else p(r,t.first(o));x(q.OUTLINE_KEY)},n=T.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:a,type:"button",onDragStart:m=>{m.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),m.dataTransfer.setDragImage(new Image,0,0),i(t.omit(r,["component","icon"])),setTimeout(()=>{g([]),f(null),x(q.OUTLINE_KEY)},200)},draggable:"true",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(n?"cursor-grab":"cursor-pointer"),children:[u.createElement(c||b.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:d||l})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:d||l})})]})})},B=()=>{const{t:r}=E.useTranslation(),[i,l]=u.useState(""),{addPredefinedBlock:c}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,p]=h.useAtom(s.activePanelAtom),j=()=>{const o=k.getBlocksFromHTML(i);c([...o],t.first(d)||null),l(""),p(q.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:o=>o&&o.focus(),onChange:o=>l(o.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>j(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},v=()=>{const{t:r}=E.useTranslation(),[i,l]=u.useState("core"),[c,d]=u.useState("basic"),p=R.useChaiBlocks(),[,j]=h.useAtom(s.showPredefinedBlockCategoryAtom),o=s.useBuilderProp("importHTMLSupport",!0),g=s.useBuilderProp("filterChaiBlock",()=>!0),f=t.filter(p,g),x=t.groupBy(f,"category"),a=t.uniq(t.map(x.core,"group"));return u.useEffect(()=>{!t.includes(a,c)&&!t.isEmpty(a)&&!t.isEmpty(c)&&d(t.first(a))},[a,c]),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-72 flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:r("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r(i==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:n=>{j(""),l(n)},value:i,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(o?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),o?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),i==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:u.Children.toArray(t.map(a,n=>t.reject(t.filter(t.values(x.core),{group:n}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:n,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:n,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:n}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:u.Children.toArray(t.reject(t.filter(t.values(x.core),{group:n}),{hidden:!0}).map(m=>e.jsxRuntimeExports.jsx(y,{block:m})))})})]})}):null))})}),i==="html"&&o?e.jsxRuntimeExports.jsx(B,{}):null]})};exports.default=v;
@@ -1,4 +1,4 @@
1
- "use strict";var oe=Object.defineProperty;var re=(o,s,e)=>s in o?oe(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;var I=(o,s,e)=>(re(o,typeof s!="symbol"?s+"":s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),c=require("lodash-es"),R=require("@radix-ui/react-icons"),i=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs"),U=require("react-i18next"),k=require("jotai"),ie=require("lucide-react"),Y=require("react-dom"),w=require("prop-types"),le=require("react-quill"),M=require("./atoms-a0H_593V.cjs"),ce=require("@floating-ui/dom"),G=require("@floating-ui/react-dom"),ae=require("@react-hookz/web"),de=require("flagged"),ue=require("@tailwindcss/typography"),pe=require("@tailwindcss/forms"),xe=require("@tailwindcss/aspect-ratio"),he=require("tailwindcss-palette-generator"),me=require("tailwind-merge"),T=require("./MODIFIERS-mVmfEGgo.cjs"),ge=require("@chaibuilder/runtime"),J=require("./useCodeEditor-CtjbxWLf.cjs"),fe=require("react-wrap-balancer"),je=require("re-resizable");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tree-model");require("./utils-D_vtk3zK.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-hotkeys-hook");require("./index-ecnGWzh9.cjs");const ve=()=>{const{hasUndo:o,hasRedo:s,undo:e,redo:t}=i.useUndoManager();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(i.Button,{disabled:!o(),size:"sm",onClick:e,className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(R.ResetIcon,{})}),r.jsxRuntimeExports.jsx(i.Button,{disabled:!s(),onClick:t,size:"sm",className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(R.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function ye(){const[o,s]=i.useDarkMode();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(R.SunIcon,{className:"size-4 shrink-0"}),r.jsxRuntimeExports.jsx(i.Switch,{id:"dark-mode-switch",checked:o,onCheckedChange:()=>{s(!o)},className:`${o?"bg-violet-600":"bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:r.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${o?"translate-x-5":"translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})}),r.jsxRuntimeExports.jsx(i.FaMoon,{className:"size-4 ml-3 shrink-0"})]})}const X=({landscape:o=!1})=>r.jsxRuntimeExports.jsxs("svg",{className:o?"rotate-90":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",xmlSpace:"preserve",width:13,height:13,children:[r.jsxRuntimeExports.jsx("g",{strokeWidth:0}),r.jsxRuntimeExports.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round"}),r.jsxRuntimeExports.jsx("path",{d:"M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",style:{fill:"#000"}})]}),$e=[{title:"mobile_xs_title",content:"mobile_xs_content",breakpoint:"xs",icon:r.jsxRuntimeExports.jsx(R.MobileIcon,{}),width:400},{title:"mobile_sm_title",content:"mobile_sm_content",breakpoint:"sm",icon:r.jsxRuntimeExports.jsx(R.MobileIcon,{className:"rotate-90"}),width:640},{title:"tablet_md_title",content:"tablet_md_content",breakpoint:"md",icon:r.jsxRuntimeExports.jsx(X,{}),width:800},{title:"tablet_lg_title",content:"tablet_lg_content",breakpoint:"lg",icon:r.jsxRuntimeExports.jsx(X,{landscape:!0}),width:1024},{title:"desktop_xl_title",content:"desktop_xl_content",breakpoint:"xl",icon:r.jsxRuntimeExports.jsx(R.LaptopIcon,{}),width:1420},{title:"large_desktop_2xl_title",content:"large_desktop_2xl_content",breakpoint:"2xl",icon:r.jsxRuntimeExports.jsx(R.DesktopIcon,{}),width:1920}],Z=({title:o,content:s,currentBreakpoint:e,breakpoint:t,width:n,icon:u,onClick:a})=>{const{t:l}=U.useTranslation();return r.jsxRuntimeExports.jsxs(i.HoverCard,{children:[r.jsxRuntimeExports.jsx(i.HoverCardTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx(i.Button,{onClick:()=>a(n),size:"sm",variant:t===e?"secondary":"ghost",children:u})}),r.jsxRuntimeExports.jsx(i.HoverCardContent,{className:"w-52 border-border",children:r.jsxRuntimeExports.jsx("div",{className:"flex justify-between space-x-4",children:r.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[r.jsxRuntimeExports.jsx("h4",{className:"text-sm font-semibold",children:l(o)}),r.jsxRuntimeExports.jsx("p",{className:"text-xs",children:l(s)})]})})})]})},be=()=>{const[,o,s]=i.useCanvasWidth(),[e,t]=i.useSelectedBreakpoints(),{t:n}=U.useTranslation(),u=i.useBuilderProp("breakpoints",$e),a=l=>{e.includes(l)?e.length>2&&t(e.filter(p=>p!==l)):t(p=>[...p,l])};return u.length<4?r.jsxRuntimeExports.jsx("div",{className:"flex items-center rounded-md",children:c.map(u,l=>x.createElement(Z,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o}))}):r.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md",children:[c.map(u.filter(l=>c.includes(e,c.toUpper(l.breakpoint))),l=>x.createElement(Z,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o})),r.jsxRuntimeExports.jsxs(i.DropdownMenu,{children:[r.jsxRuntimeExports.jsx(i.DropdownMenuTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx("span",{className:"cursor-pointer px-2.5 hover:opacity-80",children:r.jsxRuntimeExports.jsx(R.DotsVerticalIcon,{className:"scale-90 transform"})})}),r.jsxRuntimeExports.jsxs(i.DropdownMenuContent,{className:"w-56 border-border text-xs",children:[r.jsxRuntimeExports.jsx(i.DropdownMenuLabel,{children:n("Breakpoints")}),r.jsxRuntimeExports.jsx(i.DropdownMenuSeparator,{}),c.map(u,l=>r.jsxRuntimeExports.jsx(i.DropdownMenuCheckboxItem,{disabled:l.breakpoint==="xs",onCheckedChange:()=>a(c.toUpper(l.breakpoint)),checked:c.includes(e,c.toUpper(l.breakpoint)),children:n(l.title)},l.breakpoint))]})]})]})},ke=()=>{const{t:o}=U.useTranslation(),{setNewBlocks:s}=i.useBlocksStoreUndoableActions(),[,e]=i.useSelectedBlockIds(),[,t]=i.useSelectedStylingBlocks(),n=x.useCallback(()=>{s([]),e([]),t([])},[s]);return r.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:r.jsxRuntimeExports.jsxs(i.AlertDialog,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsxs(i.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[r.jsxRuntimeExports.jsx(R.EraserIcon,{})," ",o("clear")]})}),r.jsxRuntimeExports.jsxs(i.AlertDialogContent,{className:"border-border",children:[r.jsxRuntimeExports.jsxs(i.AlertDialogHeader,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogTitle,{children:o("clear_canvas_title")}),r.jsxRuntimeExports.jsx(i.AlertDialogDescription,{children:o("clear_canvas_description")})]}),r.jsxRuntimeExports.jsxs(i.AlertDialogFooter,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogCancel,{children:o("cancel")}),r.jsxRuntimeExports.jsx(i.AlertDialogAction,{onClick:n,children:o("yes")})]})]})]})})},Ee=()=>{const[o,s]=k.useAtom(i.aiAssistantActiveAtom);return i.useBuilderProp("askAiCallBack",null)?r.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxRuntimeExports.jsxs(i.Label,{htmlFor:"ai-assistant",className:"flex items-center gap-x-1 text-sm text-yellow-600",children:[r.jsxRuntimeExports.jsx(ie.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),r.jsxRuntimeExports.jsx(i.Switch,{className:"scale-90",checked:o,onCheckedChange:t=>{s(t)},id:"ai-assitantt"})]}):null},Re=()=>{const o=i.useBuilderProp("darkMode",!0),[s]=i.useCanvasZoom();return r.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[r.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[r.jsxRuntimeExports.jsx(be,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),o?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(ye,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"})]}):null,r.jsxRuntimeExports.jsxs("div",{className:"flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400",children:[r.jsxRuntimeExports.jsx(R.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",r.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[c.round(s,0),"%"]})]}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(ve,{})]}),r.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[r.jsxRuntimeExports.jsx(ke,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(Ee,{})]})]})},we=`<!doctype html>
1
+ "use strict";var oe=Object.defineProperty;var re=(o,s,e)=>s in o?oe(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;var I=(o,s,e)=>(re(o,typeof s!="symbol"?s+"":s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),c=require("lodash-es"),R=require("@radix-ui/react-icons"),i=require("./ChaiBuilderEditor-H173PF4T.cjs"),U=require("react-i18next"),k=require("jotai"),ie=require("lucide-react"),Y=require("react-dom"),w=require("prop-types"),le=require("react-quill"),M=require("./atoms-a0H_593V.cjs"),ce=require("@floating-ui/dom"),G=require("@floating-ui/react-dom"),ae=require("@react-hookz/web"),de=require("flagged"),ue=require("@tailwindcss/typography"),pe=require("@tailwindcss/forms"),xe=require("@tailwindcss/aspect-ratio"),he=require("tailwindcss-palette-generator"),me=require("tailwind-merge"),T=require("./MODIFIERS-mVmfEGgo.cjs"),ge=require("@chaibuilder/runtime"),J=require("./useCodeEditor-gE1NWoNH.cjs"),fe=require("react-wrap-balancer"),je=require("re-resizable");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tree-model");require("./utils-D_vtk3zK.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-hotkeys-hook");require("./index-ecnGWzh9.cjs");const ve=()=>{const{hasUndo:o,hasRedo:s,undo:e,redo:t}=i.useUndoManager();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(i.Button,{disabled:!o(),size:"sm",onClick:e,className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(R.ResetIcon,{})}),r.jsxRuntimeExports.jsx(i.Button,{disabled:!s(),onClick:t,size:"sm",className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(R.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function ye(){const[o,s]=i.useDarkMode();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(R.SunIcon,{className:"size-4 shrink-0"}),r.jsxRuntimeExports.jsx(i.Switch,{id:"dark-mode-switch",checked:o,onCheckedChange:()=>{s(!o)},className:`${o?"bg-violet-600":"bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:r.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${o?"translate-x-5":"translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})}),r.jsxRuntimeExports.jsx(i.FaMoon,{className:"size-4 ml-3 shrink-0"})]})}const X=({landscape:o=!1})=>r.jsxRuntimeExports.jsxs("svg",{className:o?"rotate-90":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",xmlSpace:"preserve",width:13,height:13,children:[r.jsxRuntimeExports.jsx("g",{strokeWidth:0}),r.jsxRuntimeExports.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round"}),r.jsxRuntimeExports.jsx("path",{d:"M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",style:{fill:"#000"}})]}),$e=[{title:"mobile_xs_title",content:"mobile_xs_content",breakpoint:"xs",icon:r.jsxRuntimeExports.jsx(R.MobileIcon,{}),width:400},{title:"mobile_sm_title",content:"mobile_sm_content",breakpoint:"sm",icon:r.jsxRuntimeExports.jsx(R.MobileIcon,{className:"rotate-90"}),width:640},{title:"tablet_md_title",content:"tablet_md_content",breakpoint:"md",icon:r.jsxRuntimeExports.jsx(X,{}),width:800},{title:"tablet_lg_title",content:"tablet_lg_content",breakpoint:"lg",icon:r.jsxRuntimeExports.jsx(X,{landscape:!0}),width:1024},{title:"desktop_xl_title",content:"desktop_xl_content",breakpoint:"xl",icon:r.jsxRuntimeExports.jsx(R.LaptopIcon,{}),width:1420},{title:"large_desktop_2xl_title",content:"large_desktop_2xl_content",breakpoint:"2xl",icon:r.jsxRuntimeExports.jsx(R.DesktopIcon,{}),width:1920}],Z=({title:o,content:s,currentBreakpoint:e,breakpoint:t,width:n,icon:u,onClick:a})=>{const{t:l}=U.useTranslation();return r.jsxRuntimeExports.jsxs(i.HoverCard,{children:[r.jsxRuntimeExports.jsx(i.HoverCardTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx(i.Button,{onClick:()=>a(n),size:"sm",variant:t===e?"secondary":"ghost",children:u})}),r.jsxRuntimeExports.jsx(i.HoverCardContent,{className:"w-52 border-border",children:r.jsxRuntimeExports.jsx("div",{className:"flex justify-between space-x-4",children:r.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[r.jsxRuntimeExports.jsx("h4",{className:"text-sm font-semibold",children:l(o)}),r.jsxRuntimeExports.jsx("p",{className:"text-xs",children:l(s)})]})})})]})},be=()=>{const[,o,s]=i.useCanvasWidth(),[e,t]=i.useSelectedBreakpoints(),{t:n}=U.useTranslation(),u=i.useBuilderProp("breakpoints",$e),a=l=>{e.includes(l)?e.length>2&&t(e.filter(p=>p!==l)):t(p=>[...p,l])};return u.length<4?r.jsxRuntimeExports.jsx("div",{className:"flex items-center rounded-md",children:c.map(u,l=>x.createElement(Z,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o}))}):r.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md",children:[c.map(u.filter(l=>c.includes(e,c.toUpper(l.breakpoint))),l=>x.createElement(Z,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o})),r.jsxRuntimeExports.jsxs(i.DropdownMenu,{children:[r.jsxRuntimeExports.jsx(i.DropdownMenuTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx("span",{className:"cursor-pointer px-2.5 hover:opacity-80",children:r.jsxRuntimeExports.jsx(R.DotsVerticalIcon,{className:"scale-90 transform"})})}),r.jsxRuntimeExports.jsxs(i.DropdownMenuContent,{className:"w-56 border-border text-xs",children:[r.jsxRuntimeExports.jsx(i.DropdownMenuLabel,{children:n("Breakpoints")}),r.jsxRuntimeExports.jsx(i.DropdownMenuSeparator,{}),c.map(u,l=>r.jsxRuntimeExports.jsx(i.DropdownMenuCheckboxItem,{disabled:l.breakpoint==="xs",onCheckedChange:()=>a(c.toUpper(l.breakpoint)),checked:c.includes(e,c.toUpper(l.breakpoint)),children:n(l.title)},l.breakpoint))]})]})]})},ke=()=>{const{t:o}=U.useTranslation(),{setNewBlocks:s}=i.useBlocksStoreUndoableActions(),[,e]=i.useSelectedBlockIds(),[,t]=i.useSelectedStylingBlocks(),n=x.useCallback(()=>{s([]),e([]),t([])},[s]);return r.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:r.jsxRuntimeExports.jsxs(i.AlertDialog,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsxs(i.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[r.jsxRuntimeExports.jsx(R.EraserIcon,{})," ",o("clear")]})}),r.jsxRuntimeExports.jsxs(i.AlertDialogContent,{className:"border-border",children:[r.jsxRuntimeExports.jsxs(i.AlertDialogHeader,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogTitle,{children:o("clear_canvas_title")}),r.jsxRuntimeExports.jsx(i.AlertDialogDescription,{children:o("clear_canvas_description")})]}),r.jsxRuntimeExports.jsxs(i.AlertDialogFooter,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogCancel,{children:o("cancel")}),r.jsxRuntimeExports.jsx(i.AlertDialogAction,{onClick:n,children:o("yes")})]})]})]})})},Ee=()=>{const[o,s]=k.useAtom(i.aiAssistantActiveAtom);return i.useBuilderProp("askAiCallBack",null)?r.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxRuntimeExports.jsxs(i.Label,{htmlFor:"ai-assistant",className:"flex items-center gap-x-1 text-sm text-yellow-600",children:[r.jsxRuntimeExports.jsx(ie.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),r.jsxRuntimeExports.jsx(i.Switch,{className:"scale-90",checked:o,onCheckedChange:t=>{s(t)},id:"ai-assitantt"})]}):null},Re=()=>{const o=i.useBuilderProp("darkMode",!0),[s]=i.useCanvasZoom();return r.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[r.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[r.jsxRuntimeExports.jsx(be,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),o?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(ye,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"})]}):null,r.jsxRuntimeExports.jsxs("div",{className:"flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400",children:[r.jsxRuntimeExports.jsx(R.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",r.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[c.round(s,0),"%"]})]}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(ve,{})]}),r.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[r.jsxRuntimeExports.jsx(ke,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(Ee,{})]})]})},we=`<!doctype html>
2
2
  <html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
3
3
  <head>
4
4
  <meta charset="UTF-8">
@@ -53,4 +53,4 @@
53
53
  outline: 1px solid ${e.length===1?"#42a1fc":"orange"} !important; outline-offset: -1px;
54
54
  }`)},[e,g]),x.useEffect(()=>{if(!a){m.textContent="";return}m.textContent=`[data-block-id="${a}"]{ pointer-events: none !important; opacity: 0.2 !important}`},[a]),x.useEffect(()=>{d&&(d.textContent=n?`[data-style-id="${n}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}`:"")},[n,e,d]),x.useEffect(()=>{h&&(h.textContent=`${c.map(u,({id:j})=>`[data-style-id="${j}"]`).join(",")}{
55
55
  outline: 1px solid #42a1fc !important; outline-offset: -1px;
56
- }`)},[u,h]),x.useEffect(()=>{const j=c.get(s,"bodyTextLightColor","#64748b"),f=c.get(s,"bodyTextDarkColor","#94a3b8"),E=c.get(s,"bodyBgLightColor","#FFFFFF"),S=c.get(s,"bodyBgDarkColor","#0f172a");l.body.className=`font-body antialiased text-[${j}] bg-[${E}] dark:text-[${f}] dark:bg-[${S}]`},[s,l,o]),o==="page"?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[$&&r.jsxRuntimeExports.jsx("link",{id:"heading-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${$.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),b&&$!==b&&r.jsxRuntimeExports.jsx("link",{id:"body-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${b.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),$&&r.jsxRuntimeExports.jsx("style",{children:`h1,h2,h3,h4,h5,h6{font-family: "${$}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}`})]}):null},Ye=o=>{const s={};return Object.keys(o).forEach(e=>{c.isString(o[e])&&o[e].startsWith(T.SLOT_KEY)&&(s[e]=o[e].replace(T.SLOT_KEY,"").split(","))}),s},Ge=c.memoize(o=>{const s=o.replace(T.STYLES_KEY,"").split(",");return me.twMerge(s[0],s[1])});function Xe(o,s){return c.get(o,`${s}_attrs`,{})}function Ze(o){const s={};return Object.keys(o).forEach(e=>{if(c.isString(o[e])&&o[e].startsWith(T.STYLES_KEY)){const t=Ge(o[e]);s[e]={className:t,"data-style-prop":e,"data-block-parent":o._id,"data-style-id":`${e}-${o._id}`,...Xe(o,e)}}}),s}function Qe(o,s){const e=c.get(o,"_bindings",{});return c.isEmpty(e)?{...o}:(c.each(e,(t,n)=>{c.isString(t)&&c.get(s,t,null)&&(o[n]=c.get(s,t,null))}),o)}function z({blocks:o}){const[s]=i.useBlocksStore(),[e]=k.useAtom(M.draggedBlockAtom),[t]=k.useAtom(M.dropTargetAtom),[n]=J.useCanvasSettings(),u=x.useCallback(d=>Ze(d),[]),[a]=i.useChaiExternalData(),[l]=k.useAtom(i.inlineEditingActiveAtom),p=x.useCallback(d=>d.reduce((g,h)=>{const m=c.get(n,h,{});return{...g,...m}},{}),[n,s]);return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:x.Children.toArray(o.map((d,g)=>{if(l===d._id)return null;const h=Ye(d),m={};c.isEmpty(h)||Object.keys(h).forEach(S=>{m[S]=x.Children.toArray(h[S].map(D=>r.jsxRuntimeExports.jsx(z,{blocks:[c.find(s,{_id:D})]})))});const $=c.filter(s,{_parent:d._id});m.children=$.length?r.jsxRuntimeExports.jsx(z,{blocks:$}):null;const b=ge.getBlockComponent(d._type),j=c.get(b,"builderComponent",c.get(b,"component",null));if(c.isNull(j))return r.jsxRuntimeExports.jsx("noscript",{children:`<!-- ${d==null?void 0:d._type} not registered -->`});const f=c.has(b,"getBlockStateFrom")?b==null?void 0:b.getBlockStateFrom(d,s):[],E=p(f);return r.jsxRuntimeExports.jsx(x.Suspense,{children:x.createElement(j,{blockProps:{"data-block-id":d._id,"data-block-type":d._type,...e?{"data-dnd":i.canAcceptChildBlock(d._type,e==null?void 0:e._type)?"yes":"no"}:{},...t===d._id?{"data-drop":"yes"}:{}},index:g,...Qe(d,a),...u(d),...m,inBuilder:!0,blockState:E})})}))})}const Je=()=>{const[o]=i.useBlocksStore(),s=c.isEmpty(o)?null:r.jsxRuntimeExports.jsx(i.BlocksExternalDataProvider,{children:r.jsxRuntimeExports.jsx(z,{blocks:c.filter(o,e=>c.isEmpty(e._parent))})});return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:s})},Ve=(o,s)=>o.querySelector(`[data-style-id="${s}"]`),et=()=>{const[o]=k.useAtom(i.networkModeAtom),[s]=i.usePreviewMode(),[e]=i.useCanvasWidth(),[,t]=i.useSelectedBlockIds(),n=i.useSelectedBlock(),[,u]=i.useHighlightBlockId(),a=x.useRef(null),l=x.useRef(null),[p,d]=x.useState({width:0,height:0}),g=Se(p),[h,m]=x.useState(0),[$,b]=x.useState([]),[,j]=x.useState([]),[,f]=k.useAtom(i.canvasIframeAtom),[E,S]=i.useSelectedStylingBlocks(),D=i.useBuilderProp("loading",!1),q=i.useBuilderProp("htmlDir","ltr");x.useEffect(()=>{const{clientWidth:v,clientHeight:C}=l.current;d({width:v,height:C}),h===0&&m(v)},[l,e,h]);const L=(v,C=0)=>{const{top:A}=v.getBoundingClientRect();return A+C>=0&&A-C<=window.innerHeight};x.useEffect(()=>{var v,C;if(n&&n.type!=="Multiple"&&a.current){const A=ne(a.current.contentDocument,n._id);A&&(L(A)||(C=(v=a.current)==null?void 0:v.contentWindow)==null||C.scrollTo({top:A.offsetTop,behavior:"smooth"}),b([A]))}},[n]),x.useEffect(()=>{if(!c.isEmpty(E)&&a.current){const v=Ve(a.current.contentDocument,c.first(E).id);j(v?[v]:[null])}else j([null])},[E]);const F=x.useMemo(()=>{let v=we;return v=v.replace("__HTML_DIR__",q),o==="offline"&&(v=v.replace("https://old.chaibuilder.com/offline/tailwind.cdn.js","/offline/tailwind.cdn.js"),v=v.replace("https://unpkg.com/aos@next/dist/aos.css","/offline/aos.css"),v=v.replace("https://unpkg.com/aos@next/dist/aos.js","/offline/aos.js")),v},[o]);return r.jsxRuntimeExports.jsx("div",{onClick:()=>{t([]),S([])},onMouseLeave:()=>setTimeout(()=>u(""),300),className:"relative mx-auto h-full w-full overflow-hidden",style:h>0&&!c.isEmpty(g)?{width:s?"100%":h}:{},ref:l,children:r.jsxRuntimeExports.jsxs(Ce,{contentDidMount:()=>f(a.current),ref:a,id:"canvas-iframe",style:{width:`${e}px`,...g},className:"relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",initialContent:F,children:[r.jsxRuntimeExports.jsx(Oe,{}),r.jsxRuntimeExports.jsx(Ue,{block:n,selectedBlockElement:c.first($)}),r.jsxRuntimeExports.jsx(Ke,{model:"page"}),r.jsxRuntimeExports.jsx(fe.Provider,{children:r.jsxRuntimeExports.jsx(He,{children:D?r.jsxRuntimeExports.jsx("div",{className:"h-full p-4",children:r.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"})}):r.jsxRuntimeExports.jsx(Je,{})})}),r.jsxRuntimeExports.jsx("br",{}),r.jsxRuntimeExports.jsx("div",{id:"placeholder",className:"pointer-events-none absolute z-[99999] max-w-full bg-green-500 transition-transform"})]})})},tt=x.lazy(()=>Promise.resolve().then(()=>require("./CodeEditor-1vu-qNgT.cjs"))),st=()=>{const[o]=J.useCodeEditor();return r.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[r.jsxRuntimeExports.jsx(Re,{}),r.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2",children:[r.jsxRuntimeExports.jsx(x.Suspense,{fallback:r.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"}),children:r.jsxRuntimeExports.jsx(i.ErrorBoundary,{children:r.jsxRuntimeExports.jsx(et,{})})}),o?r.jsxRuntimeExports.jsx(x.Suspense,{fallback:r.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"}),children:r.jsxRuntimeExports.jsx(je.Resizable,{enable:{top:!0,bottom:!1},className:"max-h-[400px] min-h-[200px]",children:r.jsxRuntimeExports.jsx(tt,{})})}):null]})]})};exports.default=st;
56
+ }`)},[u,h]),x.useEffect(()=>{const j=c.get(s,"bodyTextLightColor","#64748b"),f=c.get(s,"bodyTextDarkColor","#94a3b8"),E=c.get(s,"bodyBgLightColor","#FFFFFF"),S=c.get(s,"bodyBgDarkColor","#0f172a");l.body.className=`font-body antialiased text-[${j}] bg-[${E}] dark:text-[${f}] dark:bg-[${S}]`},[s,l,o]),o==="page"?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[$&&r.jsxRuntimeExports.jsx("link",{id:"heading-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${$.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),b&&$!==b&&r.jsxRuntimeExports.jsx("link",{id:"body-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${b.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),$&&r.jsxRuntimeExports.jsx("style",{children:`h1,h2,h3,h4,h5,h6{font-family: "${$}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}`})]}):null},Ye=o=>{const s={};return Object.keys(o).forEach(e=>{c.isString(o[e])&&o[e].startsWith(T.SLOT_KEY)&&(s[e]=o[e].replace(T.SLOT_KEY,"").split(","))}),s},Ge=c.memoize(o=>{const s=o.replace(T.STYLES_KEY,"").split(",");return me.twMerge(s[0],s[1])});function Xe(o,s){return c.get(o,`${s}_attrs`,{})}function Ze(o){const s={};return Object.keys(o).forEach(e=>{if(c.isString(o[e])&&o[e].startsWith(T.STYLES_KEY)){const t=Ge(o[e]);s[e]={className:t,"data-style-prop":e,"data-block-parent":o._id,"data-style-id":`${e}-${o._id}`,...Xe(o,e)}}}),s}function Qe(o,s){const e=c.get(o,"_bindings",{});return c.isEmpty(e)?{...o}:(c.each(e,(t,n)=>{c.isString(t)&&c.get(s,t,null)&&(o[n]=c.get(s,t,null))}),o)}function z({blocks:o}){const[s]=i.useBlocksStore(),[e]=k.useAtom(M.draggedBlockAtom),[t]=k.useAtom(M.dropTargetAtom),[n]=J.useCanvasSettings(),u=x.useCallback(d=>Ze(d),[]),[a]=i.useChaiExternalData(),[l]=k.useAtom(i.inlineEditingActiveAtom),p=x.useCallback(d=>d.reduce((g,h)=>{const m=c.get(n,h,{});return{...g,...m}},{}),[n,s]);return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:x.Children.toArray(o.map((d,g)=>{if(l===d._id)return null;const h=Ye(d),m={};c.isEmpty(h)||Object.keys(h).forEach(S=>{m[S]=x.Children.toArray(h[S].map(D=>r.jsxRuntimeExports.jsx(z,{blocks:[c.find(s,{_id:D})]})))});const $=c.filter(s,{_parent:d._id});m.children=$.length?r.jsxRuntimeExports.jsx(z,{blocks:$}):null;const b=ge.getBlockComponent(d._type),j=c.get(b,"builderComponent",c.get(b,"component",null));if(c.isNull(j))return r.jsxRuntimeExports.jsx("noscript",{children:`<!-- ${d==null?void 0:d._type} not registered -->`});const f=c.has(b,"getBlockStateFrom")?b==null?void 0:b.getBlockStateFrom(d,s):[],E=p(f);return r.jsxRuntimeExports.jsx(x.Suspense,{children:x.createElement(j,{blockProps:{"data-block-id":d._id,"data-block-type":d._type,...e?{"data-dnd":i.canAcceptChildBlock(d._type,e==null?void 0:e._type)?"yes":"no"}:{},...t===d._id?{"data-drop":"yes"}:{}},index:g,...Qe(d,a),...u(d),...m,inBuilder:!0,blockState:E})})}))})}const Je=()=>{const[o]=i.useBlocksStore(),s=c.isEmpty(o)?null:r.jsxRuntimeExports.jsx(i.BlocksExternalDataProvider,{children:r.jsxRuntimeExports.jsx(z,{blocks:c.filter(o,e=>c.isEmpty(e._parent))})});return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:s})},Ve=(o,s)=>o.querySelector(`[data-style-id="${s}"]`),et=()=>{const[o]=k.useAtom(i.networkModeAtom),[s]=i.usePreviewMode(),[e]=i.useCanvasWidth(),[,t]=i.useSelectedBlockIds(),n=i.useSelectedBlock(),[,u]=i.useHighlightBlockId(),a=x.useRef(null),l=x.useRef(null),[p,d]=x.useState({width:0,height:0}),g=Se(p),[h,m]=x.useState(0),[$,b]=x.useState([]),[,j]=x.useState([]),[,f]=k.useAtom(i.canvasIframeAtom),[E,S]=i.useSelectedStylingBlocks(),D=i.useBuilderProp("loading",!1),q=i.useBuilderProp("htmlDir","ltr");x.useEffect(()=>{const{clientWidth:v,clientHeight:C}=l.current;d({width:v,height:C}),h===0&&m(v)},[l,e,h]);const L=(v,C=0)=>{const{top:A}=v.getBoundingClientRect();return A+C>=0&&A-C<=window.innerHeight};x.useEffect(()=>{var v,C;if(n&&n.type!=="Multiple"&&a.current){const A=ne(a.current.contentDocument,n._id);A&&(L(A)||(C=(v=a.current)==null?void 0:v.contentWindow)==null||C.scrollTo({top:A.offsetTop,behavior:"smooth"}),b([A]))}},[n]),x.useEffect(()=>{if(!c.isEmpty(E)&&a.current){const v=Ve(a.current.contentDocument,c.first(E).id);j(v?[v]:[null])}else j([null])},[E]);const F=x.useMemo(()=>{let v=we;return v=v.replace("__HTML_DIR__",q),o==="offline"&&(v=v.replace("https://old.chaibuilder.com/offline/tailwind.cdn.js","/offline/tailwind.cdn.js"),v=v.replace("https://unpkg.com/aos@next/dist/aos.css","/offline/aos.css"),v=v.replace("https://unpkg.com/aos@next/dist/aos.js","/offline/aos.js")),v},[o]);return r.jsxRuntimeExports.jsx("div",{onClick:()=>{t([]),S([])},onMouseLeave:()=>setTimeout(()=>u(""),300),className:"relative mx-auto h-full w-full overflow-hidden",style:h>0&&!c.isEmpty(g)?{width:s?"100%":h}:{},ref:l,children:r.jsxRuntimeExports.jsxs(Ce,{contentDidMount:()=>f(a.current),ref:a,id:"canvas-iframe",style:{width:`${e}px`,...g},className:"relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",initialContent:F,children:[r.jsxRuntimeExports.jsx(Oe,{}),r.jsxRuntimeExports.jsx(Ue,{block:n,selectedBlockElement:c.first($)}),r.jsxRuntimeExports.jsx(Ke,{model:"page"}),r.jsxRuntimeExports.jsx(fe.Provider,{children:r.jsxRuntimeExports.jsx(He,{children:D?r.jsxRuntimeExports.jsx("div",{className:"h-full p-4",children:r.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"})}):r.jsxRuntimeExports.jsx(Je,{})})}),r.jsxRuntimeExports.jsx("br",{}),r.jsxRuntimeExports.jsx("div",{id:"placeholder",className:"pointer-events-none absolute z-[99999] max-w-full bg-green-500 transition-transform"})]})})},tt=x.lazy(()=>Promise.resolve().then(()=>require("./CodeEditor-jh9xwRXT.cjs"))),st=()=>{const[o]=J.useCodeEditor();return r.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[r.jsxRuntimeExports.jsx(Re,{}),r.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2",children:[r.jsxRuntimeExports.jsx(x.Suspense,{fallback:r.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"}),children:r.jsxRuntimeExports.jsx(i.ErrorBoundary,{children:r.jsxRuntimeExports.jsx(et,{})})}),o?r.jsxRuntimeExports.jsx(x.Suspense,{fallback:r.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"}),children:r.jsxRuntimeExports.jsx(je.Resizable,{enable:{top:!0,bottom:!1},className:"max-h-[400px] min-h-[200px]",children:r.jsxRuntimeExports.jsx(tt,{})})}):null]})]})};exports.default=st;
@@ -5,7 +5,7 @@ import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
5
  import A, { createElement as ce, useCallback as O, useState as B, useEffect as j, Component as $e, Children as ze, Suspense as Q, useRef as de, useMemo as Oe } from "react";
6
6
  import { map as P, includes as pe, toUpper as X, round as Ue, throttle as ye, has as be, isEmpty as I, first as U, omit as We, pick as qe, get as f, isString as se, memoize as Ke, each as Ye, find as Ge, filter as ke, isNull as Xe } from "lodash-es";
7
7
  import { ResetIcon as ue, SunIcon as Ze, MobileIcon as he, LaptopIcon as Je, DesktopIcon as Qe, DotsVerticalIcon as Ve, EraserIcon as et, ZoomInIcon as tt, DragHandleDots2Icon as st, ArrowUpIcon as ot, CopyIcon as nt, TrashIcon as rt } from "@radix-ui/react-icons";
8
- import { j as we, B as W, v as je, ap as Ce, aq as it, ar as at, as as lt, at as ct, o as oe, W as dt, h as H, au as pt, av as ut, aw as ht, ax as mt, ay as gt, az as ft, aA as _e, K as D, X as M, A as xt, a as vt, b as $t, c as yt, d as bt, e as kt, f as wt, g as jt, a2 as Ct, aB as _t, aC as Bt, p as Be, ao as z, aD as Dt, m as At, z as T, aE as De, P as It, aF as F, aG as St, i as ne, w as Ae, E as Ie, G as Se, U as Et, aH as Nt, aI as Mt, aJ as Tt, F as Lt, aK as Ft, aL as Rt, aM as Pt, aN as Ht, L as zt, aO as Ot, ag as V, a1 as Ut } from "./ChaiBuilderEditor-3xIN-AP_.js";
8
+ import { j as we, B as W, v as je, ap as Ce, aq as it, ar as at, as as lt, at as ct, o as oe, W as dt, h as H, au as pt, av as ut, aw as ht, ax as mt, ay as gt, az as ft, aA as _e, K as D, X as M, A as xt, a as vt, b as $t, c as yt, d as bt, e as kt, f as wt, g as jt, a2 as Ct, aB as _t, aC as Bt, p as Be, ao as z, aD as Dt, m as At, z as T, aE as De, P as It, aF as F, aG as St, i as ne, w as Ae, E as Ie, G as Se, U as Et, aH as Nt, aI as Mt, aJ as Tt, F as Lt, aK as Ft, aL as Rt, aM as Pt, aN as Ht, L as zt, aO as Ot, ag as V, a1 as Ut } from "./ChaiBuilderEditor-KEwDa8Bl.js";
9
9
  import { useTranslation as re } from "react-i18next";
10
10
  import { useAtom as b } from "jotai";
11
11
  import { SparklesIcon as Wt } from "lucide-react";
@@ -24,7 +24,7 @@ import es from "tailwindcss-palette-generator";
24
24
  import { twMerge as ts } from "tailwind-merge";
25
25
  import { S as ge, a as Ne } from "./MODIFIERS-fd5XOmum.js";
26
26
  import { getBlockComponent as ss } from "@chaibuilder/runtime";
27
- import { u as os, a as ns } from "./useCodeEditor-yl5V3Hte.js";
27
+ import { u as os, a as ns } from "./useCodeEditor-2KOfsFsx.js";
28
28
  import { Provider as rs } from "react-wrap-balancer";
29
29
  import { Resizable as is } from "re-resizable";
30
30
  import "./_commonjsHelpers-UyOWmZb0.js";
@@ -1225,7 +1225,7 @@ const Hs = () => {
1225
1225
  )
1226
1226
  }
1227
1227
  );
1228
- }, Us = A.lazy(() => import("./CodeEditor-0F7Dz3AB.js")), Go = () => {
1228
+ }, Us = A.lazy(() => import("./CodeEditor-XaHQMfpT.js")), Go = () => {
1229
1229
  const [n] = ns();
1230
1230
  return /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1231
1231
  /* @__PURE__ */ r.jsx(hs, {}),