@chaibuilder/sdk 1.1.13 → 1.1.15

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 (101) hide show
  1. package/dist/AddBlocks-AG_J7s2Z.cjs +1 -0
  2. package/dist/{AddBlocks-A7WofxHV.js → AddBlocks-FsdsASNp.js} +51 -51
  3. package/dist/BrandingOptions-TRVyCvVq.cjs +1 -0
  4. package/dist/{BrandingOptions-wkFrLFI_.js → BrandingOptions-zFJ28xmJ.js} +23 -23
  5. package/dist/{CanvasArea-chEYQhH8.js → CanvasArea-IiD0f6Eq.js} +7 -7
  6. package/dist/{CanvasArea-kF46NWZK.cjs → CanvasArea-Kbw-TjPH.cjs} +7 -7
  7. package/dist/CurrentPage-lOQd17GA.cjs +1 -0
  8. package/dist/{CurrentPage-Wd7F9Egg.js → CurrentPage-n2RQMBpJ.js} +10 -10
  9. package/dist/{Layers-qMOMP2Mi.js → Layers-38kbAjTI.js} +81 -81
  10. package/dist/Layers-D2WY0CpR.cjs +1 -0
  11. package/dist/MarkAsGlobalBlock-LXDkmFUr.cjs +1 -0
  12. package/dist/{MarkAsGlobalBlock-Czq45Amf.js → MarkAsGlobalBlock-xOHhiMDl.js} +3 -3
  13. package/dist/PagesPanel-RWnIpNqP.cjs +1 -0
  14. package/dist/{PagesPanel-ay4uk4mg.js → PagesPanel-bNqfHuCk.js} +6 -6
  15. package/dist/{ProjectPanel-eLlbfAtj.js → ProjectPanel-1Kgm2-R5.js} +10 -10
  16. package/dist/ProjectPanel-cXKiyEXm.cjs +1 -0
  17. package/dist/Settings-5AI0CInt.cjs +1 -0
  18. package/dist/{Settings-lpoxaMDu.js → Settings-ou3Owu0B.js} +454 -454
  19. package/dist/SidePanels-NV3UX8kK.cjs +1 -0
  20. package/dist/{SidePanels-iRXV69vh.js → SidePanels-muLqfBql.js} +36 -36
  21. package/dist/{Topbar-dQYhW4iv.js → Topbar-_-1HX-EE.js} +3 -3
  22. package/dist/Topbar-gQxbcPtG.cjs +1 -0
  23. package/dist/UnsplashImages-PNp5fYCc.cjs +1 -0
  24. package/dist/{UnsplashImages-AL1ASAoD.js → UnsplashImages-mqK09h8E.js} +6 -6
  25. package/dist/UploadImages-BoSSsLtD.cjs +1 -0
  26. package/dist/{UploadImages-09wuhk2O.js → UploadImages-IDkkRuhx.js} +3 -3
  27. package/dist/{add-page-modal-TXREEFPZ.js → add-page-modal-AJorVipD.js} +16 -16
  28. package/dist/add-page-modal-zOdAgfvh.cjs +1 -0
  29. package/dist/confirm-alert-dHRDZrA1.cjs +1 -0
  30. package/dist/{confirm-alert-GkfW9chS.js → confirm-alert-ea5xpncD.js} +3 -3
  31. package/dist/controls-QnyBNkXG.cjs +36 -0
  32. package/dist/controls-kEuiMMDf.js +4600 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.d.ts +5 -15
  35. package/dist/core.js +5 -5
  36. package/dist/{delete-page-modal-LNME2FwD.js → delete-page-modal-0VAs4Heb.js} +5 -5
  37. package/dist/delete-page-modal-KRBGE4Fo.cjs +1 -0
  38. package/dist/form-6qGAOYI3.cjs +1 -0
  39. package/dist/{form-Fk4CaX1A.js → form-irY39wvJ.js} +29 -29
  40. package/dist/functions-86L6n983.js +23 -0
  41. package/dist/functions-Jr7gX_RX.cjs +1 -0
  42. package/dist/{html-to-json-kGgp07Hv.js → html-to-json-Y5M0N8PH.js} +33 -33
  43. package/dist/html-to-json-aAZkA0f5.cjs +1 -0
  44. package/dist/{index-89A3jPHh.js → index-0OqmBgqo.js} +3 -3
  45. package/dist/{index-Q5q5Y_8a.js → index-4fMl4eN2.js} +6 -6
  46. package/dist/index-d55M5MRz.cjs +1 -0
  47. package/dist/{index-61c5wSJn.cjs → index-veRjBw4J.cjs} +2 -2
  48. package/dist/lib.cjs +1 -1
  49. package/dist/lib.js +27 -27
  50. package/dist/lodash-2us0VT8I.cjs +36 -0
  51. package/dist/lodash-3gkdNK5u.js +4538 -0
  52. package/dist/page-viewer-LvBMrQas.cjs +1 -0
  53. package/dist/{page-viewer-LPx-OTCC.js → page-viewer-QuVbTBKO.js} +6 -6
  54. package/dist/{project-general-setting-sSpFUD_Y.js → project-general-setting-6Nsq4-2Z.js} +9 -9
  55. package/dist/project-general-setting-pSrUGR7K.cjs +1 -0
  56. package/dist/{project-seo-setting-CGVegBtM.js → project-seo-setting-EhqUcTKy.js} +9 -9
  57. package/dist/project-seo-setting-N0OnBCvh.cjs +1 -0
  58. package/dist/render.cjs +1 -1
  59. package/dist/render.js +46 -46
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.js +11 -11
  62. package/dist/single-page-detail-JWCEEBaZ.cjs +1 -0
  63. package/dist/{single-page-detail-32H1_IG4.js → single-page-detail-SAqjZ5E1.js} +53 -53
  64. package/dist/studio.cjs +1 -1
  65. package/dist/studio.js +5 -5
  66. package/dist/ui.cjs +1 -1
  67. package/dist/ui.js +3 -3
  68. package/dist/useAddBlockByDrop-5QW86HjG.js +20 -0
  69. package/dist/useAddBlockByDrop-Ckzuvu-s.cjs +1 -0
  70. package/dist/utils-37UXq2O5.cjs +1 -0
  71. package/dist/{utils-zWMk4dB2.js → utils-XsPKXMVo.js} +5 -5
  72. package/package.json +3 -3
  73. package/dist/AddBlocks-Yuc4t0Z_.cjs +0 -1
  74. package/dist/BrandingOptions-KkPF1OGn.cjs +0 -1
  75. package/dist/CurrentPage-p9MaXTOB.cjs +0 -1
  76. package/dist/Layers-wQ0Fv9Xc.cjs +0 -1
  77. package/dist/MarkAsGlobalBlock-sb3hMXLq.cjs +0 -1
  78. package/dist/PagesPanel--maZxwX5.cjs +0 -1
  79. package/dist/ProjectPanel-KhIpO7m3.cjs +0 -1
  80. package/dist/Settings-n2DpS5Ta.cjs +0 -1
  81. package/dist/SidePanels-Dud5Xh9L.cjs +0 -1
  82. package/dist/Topbar-vqzjB75a.cjs +0 -1
  83. package/dist/UnsplashImages-3Sh4UZ-7.cjs +0 -1
  84. package/dist/UploadImages-mPzLhMiH.cjs +0 -1
  85. package/dist/add-page-modal-FPnIWwqA.cjs +0 -1
  86. package/dist/confirm-alert-YNyc3WEo.cjs +0 -1
  87. package/dist/controls-G0puEH71.js +0 -120
  88. package/dist/controls-aHZq-q4b.cjs +0 -1
  89. package/dist/delete-page-modal-sTbqZPvk.cjs +0 -1
  90. package/dist/form-OhgCJlVA.cjs +0 -1
  91. package/dist/functions-ZWGlwlQY.cjs +0 -1
  92. package/dist/functions-slns6ONz.js +0 -23
  93. package/dist/html-to-json-po8on2ju.cjs +0 -1
  94. package/dist/index-GNmGzavZ.cjs +0 -1
  95. package/dist/page-viewer-wQO9oV9h.cjs +0 -1
  96. package/dist/project-general-setting-8EwuN5lN.cjs +0 -1
  97. package/dist/project-seo-setting-R77SKM1I.cjs +0 -1
  98. package/dist/single-page-detail-nyBEHLtT.cjs +0 -1
  99. package/dist/useAddBlockByDrop-4VH-SMj7.cjs +0 -1
  100. package/dist/useAddBlockByDrop-_kyR0iI4.js +0 -20
  101. package/dist/utils-tx6hqsHY.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),c=require("react"),t=require("./lodash-2us0VT8I.cjs"),g=require("jotai"),s=require("./index-d55M5MRz.cjs"),v=require("@radix-ui/react-icons"),b=require("@chaibuilder/runtime"),T=require("flagged"),q=require("lucide-react"),B=require("react-dnd"),A=require("./html-to-json-aAZkA0f5.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-37UXq2O5.cjs");require("clsx");require("tailwind-merge");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-scroll-area");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-dom");require("react-quill");require("flat-to-nested");require("redux-undo");require("@react-hookz/web");require("react-i18next");require("himalaya");const C=({block:r})=>{const{type:o,icon:l,label:d}=r,{addCoreBlock:x,addPredefinedBlock:m}=s.useAddBlock(),[j,p]=s.useSelectedBlockIds(),[,i]=s.useHighlightBlockId(),[,f]=g.useAtom(s.activePanelAtom),[,a]=g.useAtom(s.addBlocksModalAtom),n=()=>{t.has(r,"blocks")?m(b.syncBlocksWithDefaults(r.blocks),t.head(j)):x(r,t.head(j)),a(!1),f("layers")},h=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:n,type:"button",onDragStart:E=>{E.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{p([]),i(null),a(!1),f("layers")},200)},draggable:h?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(h?"cursor-grab":"cursor-pointer"),children:[c.createElement(l||v.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"truncate text-xs",children:d||o})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:d||o})})]})})},w=({block:r,closePopover:o})=>{var n;const[l,d]=c.useState(!1),x=s.useBuilderProp("getExternalPredefinedBlock"),{addCoreBlock:m,addPredefinedBlock:j}=s.useAddBlock(),[p]=s.useSelectedBlockIds(),[,i,f]=B.useDrag(()=>({type:"CHAI_BLOCK",item:r}),[r]),a=c.useCallback(async h=>{if(h.stopPropagation(),t.has(r,"component")){m(r,t.head(p)),o();return}d(!0);const E=await x(r);t.isEmpty(E)||j(b.syncBlocksWithDefaults(E),t.head(p)),o()},[r]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(B.DragPreviewImage,{connect:f,src:"https://placehold.co/100x30/000000/FFF?text="+((n=r.name||r.label)==null?void 0:n.replace(" ","+"))}),e.jsxRuntimeExports.jsxs("div",{ref:i,onClick:l?()=>{}:a,className:"relative cursor-pointer overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",children:[l&&e.jsxRuntimeExports.jsxs("div",{className:"absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70",children:[e.jsxRuntimeExports.jsx(q.Loader,{className:"animate-spin",size:15,color:"white"})," ",e.jsxRuntimeExports.jsx("span",{className:"pl-2 text-sm text-white",children:"Adding..."})]}),r.preview?e.jsxRuntimeExports.jsx("img",{src:r.preview,className:"min-h-[50px] w-full rounded-md border border-gray-300",alt:r.label}):e.jsxRuntimeExports.jsx("div",{className:"flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200",children:e.jsxRuntimeExports.jsx("p",{className:"max-w-xs text-center text-sm text-gray-700",children:r.label})})]})]})},N=()=>{const{data:r}=s.useUILibraryBlocks(),o=b.useChaiBlocks(),l=t.filter(t.values(o),{category:"custom"}),d=t.groupBy(l,"group"),x=t.groupBy(r,"group"),m=c.useMemo(()=>t.mergeWith(d,x,(a,n)=>{if(t.isArray(a)&&t.isArray(n))return[...a,...n]}),[d,x]),[,j]=g.useAtom(s.addBlocksModalAtom),[p,i]=c.useState(t.head(t.keys(m))||""),f=t.get(m,p,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex flex-col h-full max-h-full overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("div",{className:"p-3 sticky top-0 flex w-full items-center",children:e.jsxRuntimeExports.jsxs(s.Select,{value:p,onValueChange:a=>i(a),children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-full",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Select a provider"})}),e.jsxRuntimeExports.jsxs(s.SelectContent,{children:[e.jsxRuntimeExports.jsx(s.SelectItem,{value:"",children:"Choose"}),c.Children.toArray(t.map(m,(a,n)=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:n,children:n},n)))]})]})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-2",children:c.Children.toArray(f.map(a=>e.jsxRuntimeExports.jsx(w,{block:a,closePopover:()=>j(!1)})))})]})},S=()=>{const[r,o]=c.useState(""),{addPredefinedBlock:l}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,x]=g.useAtom(s.addBlockOffCanvasAtom),[,m]=g.useAtom(s.activePanelAtom),[,j]=g.useAtom(s.addBlocksModalAtom),p=()=>{const i=A.getBlocksFromHTML(r);l([...i],t.head(d)||null),o(""),x(!1),m("layers"),j(!1)};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:"Use HTML snippets from Tailwind CSS component libraries etc. or just copy paste your own HTML code."})}),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:"Tailwind HTML snippet:"}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:i=>i&&i.focus(),defaultValue:r,onChange:i=>o(i.target.value),rows:12,placeholder:"Enter your code snippet here...",className:"resize-none bg-gray-100 overflow-x-auto whitespace-pre text-xs font-mono font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:r.trim()==="",onClick:()=>p(),size:"sm",className:"w-full",children:"Import HTML"}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 p-1 border-none text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:"NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page."})})]})]})},k=["ListItem","TableHead","TableBody","TableRow","TableCell","Column"],I=(r,o)=>{if(!r)return!t.includes(k,o);const l=r._type;return l==="List"?o==="ListItem":l==="Table"?o==="TableHead"||o==="TableBody":l==="TableHead"||l==="TableBody"?o==="TableRow":l==="TableRow"?o==="TableCell":l==="Row"?o==="Column":!t.includes(k,o)},L=()=>{const[r,o]=c.useState("core"),[l,d]=c.useState("basic"),x=b.useChaiBlocks(),[,m]=g.useAtom(s.showPredefinedBlockCategoryAtom),[j]=s.useSelectedBlockIds(),p=s.useAllBlocks(),i=t.find(p,{_id:t.head(j)}),{data:f,isLoading:a}=s.useUILibraryBlocks(),n=t.groupBy(t.filter(x,u=>I(i,u.type)),"category"),h=t.uniq(t.map(n.core,"group"));c.useEffect(()=>{!t.includes(h,l)&&!t.isEmpty(h)&&!t.isEmpty(l)&&d(t.head(h))},[h,l]);const E=u=>d(R=>R===u?"":u),y=!a&&!t.isEmpty(f)||t.find(t.values(x),{category:"custom"})!==void 0;return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full 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:"Add block"}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r==="html"?"(Enter or paste TailwindCSS HTML snippet)":"(Click to add block to page)"})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:u=>{m(""),o(u)},value:r,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(y?"grid-cols-3":"grid-cols-2"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:"Core"}),y?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"ui-blocks",children:"Custom Blocks"}):null,e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:"Import "})]})}),r==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:l,className:"w-full px-3",children:c.Children.toArray(t.map(h,u=>t.reject(t.filter(t.values(n.core),{group:u}),{hidden:!0}).length?e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:u,className:"border-border",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{onClick:()=>E(u),className:"py-2 capitalize",children:u}),e.jsxRuntimeExports.jsx(s.AccordionContent,{children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:c.Children.toArray(t.reject(t.filter(t.values(n.core),{group:u}),{hidden:!0}).map(R=>e.jsxRuntimeExports.jsx(C,{block:R})))})})]}):null))})}),r==="ui-blocks"&&e.jsxRuntimeExports.jsx(c.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(N,{})}),r==="html"&&e.jsxRuntimeExports.jsx(S,{})]})};exports.default=L;
@@ -1,18 +1,18 @@
1
1
  import { j as e } from "./jsx-runtime-NV737rRe.js";
2
2
  import B, { createElement as z, useState as b, useCallback as q, useMemo as V, useEffect as U, Suspense as W } from "react";
3
- import { has as D, first as h, omit as J, isEmpty as j, filter as y, values as k, groupBy as T, mergeWith as K, isArray as P, keys as Q, get as X, map as N, includes as A, find as H, uniq as Y, reject as E } from "lodash";
3
+ import { t as R, h, o as J, a as j, b as y, F as k, Y as T, Z as K, L as P, k as Y, g as Z, d as N, c as A, j as H, _ as Q, R as E } from "./lodash-3gkdNK5u.js";
4
4
  import { useAtom as f } from "jotai";
5
- import { O as I, j as v, _ as Z, av as R, aw as S, aD as $, aE as ee, aG as se, i as te, a8 as _, aq as re, ar as oe, as as le, at as ae, au as F, bp as ce, bq as ne, br as ie, bs as de, bt as me, aI as pe, bu as ue, bv as xe, B as he, bw as fe, bx as ge, by as be, ae as je, ax as ye, ay as ke, az as w, bo as Be, bh as ve, bi as Ce, bj as we, bk as Te, S as Ne } from "./index-89A3jPHh.js";
5
+ import { O as I, j as v, _ as X, av as _, aw as L, aD as $, aE as ee, aG as se, i as te, a8 as D, aq as oe, ar as re, as as ae, at as le, au as F, bp as ce, bq as ne, br as ie, bs as de, bt as me, aI as pe, bu as ue, bv as xe, B as he, bw as fe, bx as ge, by as be, ae as je, ax as ye, ay as ke, az as w, bo as Be, bh as ve, bi as Ce, bj as we, bk as Te, S as Ne } from "./index-0OqmBgqo.js";
6
6
  import { BoxIcon as Ae } from "@radix-ui/react-icons";
7
7
  import { syncBlocksWithDefaults as G, useChaiBlocks as O } from "@chaibuilder/runtime";
8
8
  import { useFeature as Ie } from "flagged";
9
- import { Loader as Se } from "lucide-react";
10
- import { useDrag as Le, DragPreviewImage as Pe } from "react-dnd";
11
- import { g as He } from "./html-to-json-kGgp07Hv.js";
9
+ import { Loader as Le } from "lucide-react";
10
+ import { useDrag as Se, DragPreviewImage as Pe } from "react-dnd";
11
+ import { g as He } from "./html-to-json-Y5M0N8PH.js";
12
12
  import "./MODIFIERS-MLfpKQY1.js";
13
13
  import "@radix-ui/react-toggle";
14
14
  import "class-variance-authority";
15
- import "./utils-zWMk4dB2.js";
15
+ import "./utils-XsPKXMVo.js";
16
16
  import "clsx";
17
17
  import "tailwind-merge";
18
18
  import "@radix-ui/react-switch";
@@ -42,24 +42,24 @@ import "@react-hookz/web";
42
42
  import "react-i18next";
43
43
  import "himalaya";
44
44
  const Ee = ({ block: s }) => {
45
- const { type: t, icon: r, label: c } = s, { addCoreBlock: i, addPredefinedBlock: d } = I(), [p, m] = v(), [, l] = Z(), [, x] = f(R), [, a] = f(S), o = () => {
46
- D(s, "blocks") ? d(G(s.blocks), h(p)) : i(s, h(p)), a(!1), x("layers");
45
+ const { type: t, icon: o, label: c } = s, { addCoreBlock: i, addPredefinedBlock: d } = I(), [p, m] = v(), [, a] = X(), [, x] = f(_), [, l] = f(L), r = () => {
46
+ R(s, "blocks") ? d(G(s.blocks), h(p)) : i(s, h(p)), l(!1), x("layers");
47
47
  }, u = Ie("dnd");
48
48
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs($, { children: [
49
49
  /* @__PURE__ */ e.jsx(ee, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
50
50
  "button",
51
51
  {
52
- onClick: o,
52
+ onClick: r,
53
53
  type: "button",
54
54
  onDragStart: (g) => {
55
55
  g.dataTransfer.setData("text/plain", JSON.stringify(J(s, ["component", "icon"]))), setTimeout(() => {
56
- m([]), l(null), a(!1), x("layers");
56
+ m([]), a(null), l(!1), x("layers");
57
57
  }, 200);
58
58
  },
59
59
  draggable: u ? "true" : "false",
60
60
  className: "space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 " + (u ? "cursor-grab" : "cursor-pointer"),
61
61
  children: [
62
- z(r || Ae, { className: "w-4 h-4 mx-auto" }),
62
+ z(o || Ae, { className: "w-4 h-4 mx-auto" }),
63
63
  /* @__PURE__ */ e.jsx("p", { className: "truncate text-xs", children: c || t })
64
64
  ]
65
65
  }
@@ -67,16 +67,16 @@ const Ee = ({ block: s }) => {
67
67
  /* @__PURE__ */ e.jsx(se, { children: /* @__PURE__ */ e.jsx("p", { children: c || t }) })
68
68
  ] }) });
69
69
  }, Fe = ({ block: s, closePopover: t }) => {
70
- var o;
71
- const [r, c] = b(!1), i = te("getExternalPredefinedBlock"), { addCoreBlock: d, addPredefinedBlock: p } = I(), [m] = v(), [, l, x] = Le(
70
+ var r;
71
+ const [o, c] = b(!1), i = te("getExternalPredefinedBlock"), { addCoreBlock: d, addPredefinedBlock: p } = I(), [m] = v(), [, a, x] = Se(
72
72
  () => ({
73
73
  type: "CHAI_BLOCK",
74
74
  item: s
75
75
  }),
76
76
  [s]
77
- ), a = q(
77
+ ), l = q(
78
78
  async (u) => {
79
- if (u.stopPropagation(), D(s, "component")) {
79
+ if (u.stopPropagation(), R(s, "component")) {
80
80
  d(s, h(m)), t();
81
81
  return;
82
82
  }
@@ -91,19 +91,19 @@ const Ee = ({ block: s }) => {
91
91
  Pe,
92
92
  {
93
93
  connect: x,
94
- src: "https://placehold.co/100x30/000000/FFF?text=" + ((o = s.name || s.label) == null ? void 0 : o.replace(" ", "+"))
94
+ src: "https://placehold.co/100x30/000000/FFF?text=" + ((r = s.name || s.label) == null ? void 0 : r.replace(" ", "+"))
95
95
  }
96
96
  ),
97
97
  /* @__PURE__ */ e.jsxs(
98
98
  "div",
99
99
  {
100
- ref: l,
101
- onClick: r ? () => {
102
- } : a,
100
+ ref: a,
101
+ onClick: o ? () => {
102
+ } : l,
103
103
  className: "relative cursor-pointer overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",
104
104
  children: [
105
- r && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70", children: [
106
- /* @__PURE__ */ e.jsx(Se, { className: "animate-spin", size: 15, color: "white" }),
105
+ o && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70", children: [
106
+ /* @__PURE__ */ e.jsx(Le, { className: "animate-spin", size: 15, color: "white" }),
107
107
  " ",
108
108
  /* @__PURE__ */ e.jsx("span", { className: "pl-2 text-sm text-white", children: "Adding..." })
109
109
  ] }),
@@ -120,28 +120,28 @@ const Ee = ({ block: s }) => {
120
120
  )
121
121
  ] });
122
122
  }, Me = () => {
123
- const { data: s } = _(), t = O(), r = y(k(t), { category: "custom" }), c = T(r, "group"), i = T(s, "group"), d = V(() => K(c, i, (a, o) => {
124
- if (P(a) && P(o))
125
- return [...a, ...o];
126
- }), [c, i]), [, p] = f(S), [m, l] = b(h(Q(d)) || ""), x = X(d, m, []);
123
+ const { data: s } = D(), t = O(), o = y(k(t), { category: "custom" }), c = T(o, "group"), i = T(s, "group"), d = V(() => K(c, i, (l, r) => {
124
+ if (P(l) && P(r))
125
+ return [...l, ...r];
126
+ }), [c, i]), [, p] = f(L), [m, a] = b(h(Y(d)) || ""), x = Z(d, m, []);
127
127
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col h-full max-h-full overflow-hidden py-2", children: [
128
- /* @__PURE__ */ e.jsx("div", { className: "p-3 sticky top-0 flex w-full items-center", children: /* @__PURE__ */ e.jsxs(re, { value: m, onValueChange: (a) => l(a), children: [
129
- /* @__PURE__ */ e.jsx(oe, { className: "w-full", children: /* @__PURE__ */ e.jsx(le, { placeholder: "Select a provider" }) }),
130
- /* @__PURE__ */ e.jsxs(ae, { children: [
128
+ /* @__PURE__ */ e.jsx("div", { className: "p-3 sticky top-0 flex w-full items-center", children: /* @__PURE__ */ e.jsxs(oe, { value: m, onValueChange: (l) => a(l), children: [
129
+ /* @__PURE__ */ e.jsx(re, { className: "w-full", children: /* @__PURE__ */ e.jsx(ae, { placeholder: "Select a provider" }) }),
130
+ /* @__PURE__ */ e.jsxs(le, { children: [
131
131
  /* @__PURE__ */ e.jsx(F, { value: "", children: "Choose" }),
132
132
  B.Children.toArray(
133
- N(d, (a, o) => /* @__PURE__ */ e.jsx(F, { value: o, children: o }, o))
133
+ N(d, (l, r) => /* @__PURE__ */ e.jsx(F, { value: r, children: r }, r))
134
134
  )
135
135
  ] })
136
136
  ] }) }),
137
137
  /* @__PURE__ */ e.jsx("div", { className: "h-full w-full space-y-2 overflow-y-auto px-2", children: B.Children.toArray(
138
- x.map((a) => /* @__PURE__ */ e.jsx(Fe, { block: a, closePopover: () => p(!1) }))
138
+ x.map((l) => /* @__PURE__ */ e.jsx(Fe, { block: l, closePopover: () => p(!1) }))
139
139
  ) })
140
140
  ] });
141
- }, De = () => {
142
- const [s, t] = b(""), { addPredefinedBlock: r } = I(), [c] = v(), [, i] = f(ce), [, d] = f(R), [, p] = f(S), m = () => {
143
- const l = He(s);
144
- r([...l], h(c) || null), t(""), i(!1), d("layers"), p(!1);
141
+ }, Re = () => {
142
+ const [s, t] = b(""), { addPredefinedBlock: o } = I(), [c] = v(), [, i] = f(ce), [, d] = f(_), [, p] = f(L), m = () => {
143
+ const a = He(s);
144
+ o([...a], h(c) || null), t(""), i(!1), d("layers"), p(!1);
145
145
  };
146
146
  return /* @__PURE__ */ e.jsxs(ne, { className: "border-border/0 p-0 shadow-none", children: [
147
147
  /* @__PURE__ */ e.jsx(ie, { className: "p-3", children: /* @__PURE__ */ e.jsx(de, { children: "Use HTML snippets from Tailwind CSS component libraries etc. or just copy paste your own HTML code." }) }),
@@ -152,9 +152,9 @@ const Ee = ({ block: s }) => {
152
152
  {
153
153
  autoFocus: !0,
154
154
  tabIndex: 1,
155
- ref: (l) => l && l.focus(),
155
+ ref: (a) => a && a.focus(),
156
156
  defaultValue: s,
157
- onChange: (l) => t(l.target.value),
157
+ onChange: (a) => t(a.target.value),
158
158
  rows: 12,
159
159
  placeholder: "Enter your code snippet here...",
160
160
  className: "resize-none bg-gray-100 overflow-x-auto whitespace-pre text-xs font-mono font-normal"
@@ -166,20 +166,20 @@ const Ee = ({ block: s }) => {
166
166
  /* @__PURE__ */ e.jsx(fe, { variant: "default", className: "mt-2 p-1 border-none text-gray-400", children: /* @__PURE__ */ e.jsx(ge, { className: "text-xs font-normal leading-4", children: "NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page." }) })
167
167
  ] })
168
168
  ] });
169
- }, M = ["ListItem", "TableHead", "TableBody", "TableRow", "TableCell", "Column"], Re = (s, t) => {
169
+ }, M = ["ListItem", "TableHead", "TableBody", "TableRow", "TableCell", "Column"], _e = (s, t) => {
170
170
  if (!s)
171
171
  return !A(M, t);
172
- const r = s._type;
173
- return r === "List" ? t === "ListItem" : r === "Table" ? t === "TableHead" || t === "TableBody" : r === "TableHead" || r === "TableBody" ? t === "TableRow" : r === "TableRow" ? t === "TableCell" : r === "Row" ? t === "Column" : !A(M, t);
172
+ const o = s._type;
173
+ return o === "List" ? t === "ListItem" : o === "Table" ? t === "TableHead" || t === "TableBody" : o === "TableHead" || o === "TableBody" ? t === "TableRow" : o === "TableRow" ? t === "TableCell" : o === "Row" ? t === "Column" : !A(M, t);
174
174
  }, As = () => {
175
- const [s, t] = b("core"), [r, c] = b("basic"), i = O(), [, d] = f(be), [p] = v(), m = je(), l = H(m, { _id: h(p) }), { data: x, isLoading: a } = _(), o = T(
176
- y(i, (n) => Re(l, n.type)),
175
+ const [s, t] = b("core"), [o, c] = b("basic"), i = O(), [, d] = f(be), [p] = v(), m = je(), a = H(m, { _id: h(p) }), { data: x, isLoading: l } = D(), r = T(
176
+ y(i, (n) => _e(a, n.type)),
177
177
  "category"
178
- ), u = Y(N(o.core, "group"));
178
+ ), u = Q(N(r.core, "group"));
179
179
  U(() => {
180
- !A(u, r) && !j(u) && !j(r) && c(h(u));
181
- }, [u, r]);
182
- const g = (n) => c((C) => C === n ? "" : n), L = !a && !j(x) || H(k(i), { category: "custom" }) !== void 0;
180
+ !A(u, o) && !j(u) && !j(o) && c(h(u));
181
+ }, [u, o]);
182
+ const g = (n) => c((C) => C === n ? "" : n), S = !l && !j(x) || H(k(i), { category: "custom" }) !== void 0;
183
183
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
184
184
  /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
185
185
  /* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: "Add block" }),
@@ -193,28 +193,28 @@ const Ee = ({ block: s }) => {
193
193
  },
194
194
  value: s,
195
195
  className: "h-max",
196
- children: /* @__PURE__ */ e.jsxs(ke, { className: "grid w-full " + (L ? "grid-cols-3" : "grid-cols-2"), children: [
196
+ children: /* @__PURE__ */ e.jsxs(ke, { className: "grid w-full " + (S ? "grid-cols-3" : "grid-cols-2"), children: [
197
197
  /* @__PURE__ */ e.jsx(w, { value: "core", children: "Core" }),
198
- L ? /* @__PURE__ */ e.jsx(w, { value: "ui-blocks", children: "Custom Blocks" }) : null,
198
+ S ? /* @__PURE__ */ e.jsx(w, { value: "ui-blocks", children: "Custom Blocks" }) : null,
199
199
  /* @__PURE__ */ e.jsx(w, { value: "html", children: "Import " })
200
200
  ] })
201
201
  }
202
202
  ),
203
- s === "core" && /* @__PURE__ */ e.jsx(Be, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx(ve, { type: "single", value: r, className: "w-full px-3", children: B.Children.toArray(
203
+ s === "core" && /* @__PURE__ */ e.jsx(Be, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx(ve, { type: "single", value: o, className: "w-full px-3", children: B.Children.toArray(
204
204
  N(
205
205
  u,
206
- (n) => E(y(k(o.core), { group: n }), {
206
+ (n) => E(y(k(r.core), { group: n }), {
207
207
  hidden: !0
208
208
  }).length ? /* @__PURE__ */ e.jsxs(Ce, { value: n, className: "border-border", children: [
209
209
  /* @__PURE__ */ e.jsx(we, { onClick: () => g(n), className: "py-2 capitalize", children: n }),
210
210
  /* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: B.Children.toArray(
211
- E(y(k(o.core), { group: n }), { hidden: !0 }).map((C) => /* @__PURE__ */ e.jsx(Ee, { block: C }))
211
+ E(y(k(r.core), { group: n }), { hidden: !0 }).map((C) => /* @__PURE__ */ e.jsx(Ee, { block: C }))
212
212
  ) }) })
213
213
  ] }) : null
214
214
  )
215
215
  ) }) }),
216
216
  s === "ui-blocks" && /* @__PURE__ */ e.jsx(W, { fallback: /* @__PURE__ */ e.jsx(Ne, { className: "h-32 w-full" }), children: /* @__PURE__ */ e.jsx(Me, {}) }),
217
- s === "html" && /* @__PURE__ */ e.jsx(De, {})
217
+ s === "html" && /* @__PURE__ */ e.jsx(Re, {})
218
218
  ] });
219
219
  };
220
220
  export {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-WUGKV8jN.cjs"),j=require("react"),B=require("@rjsf/validator-ajv8"),E=require("@rjsf/core"),g=require("./index-d55M5MRz.cjs"),r=require("./controls-QnyBNkXG.cjs"),m=require("./lodash-2us0VT8I.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-37UXq2O5.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");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-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");function R(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const x=R(j),N=({value:t,onChange:e,id:i,onBlur:a})=>{const d=m.debounce(e,200),c=n=>d(n.target.value);return l.jsxRuntimeExports.jsx("div",{className:"mt-1.5 flex items-center gap-x-3",children:l.jsxRuntimeExports.jsx("div",{className:"flex w-3/5 flex-col",children:l.jsxRuntimeExports.jsx("input",{type:"color",className:"text-xs p-0",value:t,onBlur:({target:{value:n}})=>a(i,n),onChange:c})})})},y=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"}],P=()=>{const t=g.useBuilderProp("onSaveBrandingOptions",async()=>{}),[e,i]=g.useBrandingOptions(),a=x.useRef(e);x.useEffect(()=>()=>{m.isEqual(e,a.current)||t(a.current)},[]);const d=({formData:o},s)=>{s&&(i(o),a.current=o)},{bodyFont:c,headingFont:n,primaryColor:f,bodyTextDarkColor:q,bodyTextLightColor:b,bodyBgDarkColor:h,secondaryColor:S,bodyBgLightColor:C,roundedCorners:O}=e,v={headingFont:r.Ty({title:"Heading font",default:n,options:y}),bodyFont:r.Ty({title:"Body font",default:c,options:y}),roundedCorners:r.my({title:"Rounded Corner",default:parseInt(O||5,10)}),primaryColor:r.Ey({title:"Primary",default:f}),secondaryColor:r.Ey({title:"Secondary",default:S}),bodyBgLightColor:r.Ey({title:"Body Background (Light)",default:C}),bodyBgDarkColor:r.Ey({title:"Body Background (Dark)",default:h}),bodyTextLightColor:r.Ey({title:"Body Text (Light)",default:q}),bodyTextDarkColor:r.Ey({title:"Body Text (Dark)",default:b})},u={type:"object",properties:{}},p={};return Object.keys(v).forEach(o=>{const s=v[o];return u.properties||(u.properties={}),u.properties[o]=s.schema,p[o]=s.uiSchema,!0}),l.jsxRuntimeExports.jsxs("div",{className:"flex h-full select-none flex-col",children:[l.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:l.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Branding Options"})}),l.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:l.jsxRuntimeExports.jsx(E,{widgets:{color:N},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:p,schema:u,formData:e,validator:B,onChange:d})})]})};exports.default=P;
@@ -2,13 +2,13 @@ import { j as t } from "./jsx-runtime-NV737rRe.js";
2
2
  import * as c from "react";
3
3
  import O from "@rjsf/validator-ajv8";
4
4
  import N from "@rjsf/core";
5
- import { i as j, x as k } from "./index-89A3jPHh.js";
6
- import { f as g, c as D, y as a } from "./controls-G0puEH71.js";
7
- import { debounce as P, isEqual as R } from "lodash";
5
+ import { i as j, x as k } from "./index-0OqmBgqo.js";
6
+ import { T as g, m as D, E as o } from "./controls-kEuiMMDf.js";
7
+ import { $ as P, X as R } from "./lodash-3gkdNK5u.js";
8
8
  import "./MODIFIERS-MLfpKQY1.js";
9
9
  import "@radix-ui/react-toggle";
10
10
  import "class-variance-authority";
11
- import "./utils-zWMk4dB2.js";
11
+ import "./utils-XsPKXMVo.js";
12
12
  import "clsx";
13
13
  import "tailwind-merge";
14
14
  import "@radix-ui/react-switch";
@@ -39,7 +39,7 @@ import "redux-undo";
39
39
  import "@chaibuilder/runtime";
40
40
  import "@react-hookz/web";
41
41
  import "react-i18next";
42
- const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
42
+ const T = ({ value: s, onChange: e, id: u, onBlur: i }) => {
43
43
  const p = P(e, 200), d = (l) => p(l.target.value);
44
44
  return /* @__PURE__ */ t.jsx("div", { className: "mt-1.5 flex items-center gap-x-3", children: /* @__PURE__ */ t.jsx("div", { className: "flex w-3/5 flex-col", children: /* @__PURE__ */ t.jsx(
45
45
  "input",
@@ -101,20 +101,20 @@ const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
101
101
  { title: "Lustria", value: "Lustria" },
102
102
  { title: "Ovo", value: "Ovo" },
103
103
  { title: "Suranna", value: "Suranna" }
104
- ], xt = () => {
104
+ ], yt = () => {
105
105
  const s = j("onSaveBrandingOptions", async () => {
106
106
  }), [e, u] = k(), i = c.useRef(e);
107
107
  c.useEffect(() => () => {
108
108
  R(e, i.current) || s(i.current);
109
109
  }, []);
110
- const p = ({ formData: o }, n) => {
111
- n && (u(o), i.current = o);
110
+ const p = ({ formData: a }, n) => {
111
+ n && (u(a), i.current = a);
112
112
  }, {
113
113
  bodyFont: d,
114
114
  headingFont: l,
115
115
  primaryColor: h,
116
- bodyTextDarkColor: x,
117
- bodyTextLightColor: y,
116
+ bodyTextDarkColor: y,
117
+ bodyTextLightColor: x,
118
118
  bodyBgDarkColor: b,
119
119
  secondaryColor: C,
120
120
  bodyBgLightColor: S,
@@ -134,39 +134,39 @@ const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
134
134
  title: "Rounded Corner",
135
135
  default: parseInt(B || 5, 10)
136
136
  }),
137
- primaryColor: a({ title: "Primary", default: h }),
138
- secondaryColor: a({ title: "Secondary", default: C }),
139
- bodyBgLightColor: a({
137
+ primaryColor: o({ title: "Primary", default: h }),
138
+ secondaryColor: o({ title: "Secondary", default: C }),
139
+ bodyBgLightColor: o({
140
140
  title: "Body Background (Light)",
141
141
  default: S
142
142
  }),
143
- bodyBgDarkColor: a({
143
+ bodyBgDarkColor: o({
144
144
  title: "Body Background (Dark)",
145
145
  default: b
146
146
  }),
147
- bodyTextLightColor: a({
147
+ bodyTextLightColor: o({
148
148
  title: "Body Text (Light)",
149
- default: x
149
+ default: y
150
150
  }),
151
- bodyTextDarkColor: a({
151
+ bodyTextDarkColor: o({
152
152
  title: "Body Text (Dark)",
153
- default: y
153
+ default: x
154
154
  })
155
155
  // TODO: exteend more options from user
156
156
  }, r = {
157
157
  type: "object",
158
158
  properties: {}
159
159
  }, v = {};
160
- return Object.keys(m).forEach((o) => {
161
- const n = m[o];
162
- return r.properties || (r.properties = {}), r.properties[o] = n.schema, v[o] = n.uiSchema, !0;
160
+ return Object.keys(m).forEach((a) => {
161
+ const n = m[a];
162
+ return r.properties || (r.properties = {}), r.properties[a] = n.schema, v[a] = n.uiSchema, !0;
163
163
  }), /* @__PURE__ */ t.jsxs("div", { className: "flex h-full select-none flex-col", children: [
164
164
  /* @__PURE__ */ t.jsx("div", { className: "rounded-md bg-background/30 p-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Branding Options" }) }),
165
165
  /* @__PURE__ */ t.jsx("div", { className: "-mx-2", children: /* @__PURE__ */ t.jsx(
166
166
  N,
167
167
  {
168
168
  widgets: {
169
- color: w
169
+ color: T
170
170
  },
171
171
  idSeparator: ".",
172
172
  autoComplete: "off",
@@ -183,5 +183,5 @@ const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
183
183
  ] });
184
184
  };
185
185
  export {
186
- xt as default
186
+ yt as default
187
187
  };
@@ -3,16 +3,16 @@ var bt = (e, t, n) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var J = (e, t, n) => (bt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { j as r } from "./jsx-runtime-NV737rRe.js";
5
5
  import X, { createElement as wt, useCallback as we, useState as U, useEffect as _, Component as Ue, Children as kt, Suspense as ze, useRef as De, useMemo as jt, lazy as Ct } from "react";
6
- import { map as ie, includes as Be, toUpper as ue, round as Tt, throttle as Ye, noop as ee, isEmpty as K, first as ae, omit as St, pick as It, get as O, isString as ke, memoize as Et, each as Dt, find as Bt, filter as Ke, isNull as Ot } from "lodash";
6
+ import { d as ie, c as Be, H as ue, I as Tt, J as Ye, K as ee, a as K, h as ae, o as St, B as It, g as O, i as ke, m as Et, f as Dt, j as Bt, b as Ke, A as Ot } from "./lodash-3gkdNK5u.js";
7
7
  import { ResetIcon as Oe, MobileIcon as Ae, LaptopIcon as At, DesktopIcon as Pt, DotsVerticalIcon as Rt, EraserIcon as Mt, ZoomInIcon as _t, DragHandleDots2Icon as Lt, ArrowUpIcon as Nt, CopyIcon as Ft, TrashIcon as $t } from "@radix-ui/react-icons";
8
- import { p as je, B as le, W as Je, aI as Wt, aJ as Ht, aK as qt, aL as Ut, aM as zt, R as Ce, ai as Yt, aN as Kt, aO as Jt, aP as Xt, aQ as Vt, aR as Zt, aS as Gt, w as Qt, j as W, aj as V, D as en, E as tn, F as nn, G as rn, H as sn, I as on, J as an, K as ln, ap as cn, L as dn, U as Xe, aH as oe, aT as un, _ as G, ab as pn, aU as re, ae as Te, m as Ve, n as fn, k as hn, o as gn, h as Ze, l as Ge, ag as mn, aV as yn, aW as Qe, aX as vn, aY as xn, x as bn, a as wn, aZ as kn, a_ as jn, a6 as Cn, a$ as Tn, i as Sn, S as et, aw as In } from "./index-89A3jPHh.js";
8
+ import { p as je, B as le, W as Je, aI as Wt, aJ as Ht, aK as qt, aL as Ut, aM as zt, R as Ce, ai as Yt, aN as Kt, aO as Jt, aP as Xt, aQ as Vt, aR as Zt, aS as Gt, w as Qt, j as W, aj as V, D as en, E as tn, F as nn, G as rn, H as sn, I as on, J as an, K as ln, ap as cn, L as dn, U as Xe, aH as oe, aT as un, _ as G, ab as pn, aU as re, ae as Te, m as Ve, n as fn, k as hn, o as gn, h as Ze, l as Ge, ag as mn, aV as yn, aW as Qe, aX as vn, aY as xn, x as bn, a as wn, aZ as kn, a_ as jn, a6 as Cn, a$ as Tn, i as Sn, S as et, aw as In } from "./index-0OqmBgqo.js";
9
9
  import { useTranslation as En } from "react-i18next";
10
10
  import { useAtom as F } from "jotai";
11
11
  import Pe from "react-dom";
12
12
  import { g as Dn, S as Re, a as tt } from "./MODIFIERS-MLfpKQY1.js";
13
- import { r as nt, u as Bn, B as On, E as An } from "./index-Q5q5Y_8a.js";
13
+ import { r as nt, u as Bn, B as On, E as An } from "./index-4fMl4eN2.js";
14
14
  import { Quill as Pn } from "react-quill";
15
- import { u as Rn } from "./useAddBlockByDrop-_kyR0iI4.js";
15
+ import { u as Rn } from "./useAddBlockByDrop-5QW86HjG.js";
16
16
  import { useFeature as rt } from "flagged";
17
17
  import { flip as Mn } from "@floating-ui/dom";
18
18
  import { useFloating as _n, shift as Ln } from "@floating-ui/react-dom";
@@ -23,7 +23,7 @@ import { twMerge as Wn } from "tailwind-merge";
23
23
  import { getBlockComponent as Hn } from "@chaibuilder/runtime";
24
24
  import "@radix-ui/react-toggle";
25
25
  import "class-variance-authority";
26
- import "./utils-zWMk4dB2.js";
26
+ import "./utils-XsPKXMVo.js";
27
27
  import "clsx";
28
28
  import "@radix-ui/react-switch";
29
29
  import "@radix-ui/react-slot";
@@ -52,7 +52,7 @@ import "react-dnd";
52
52
  import "@minoru/react-dnd-treeview";
53
53
  import "react-hotkeys-hook";
54
54
  import "sonner";
55
- import "./html-to-json-kGgp07Hv.js";
55
+ import "./html-to-json-Y5M0N8PH.js";
56
56
  import "himalaya";
57
57
  import "lucide-react";
58
58
  const qn = () => {
@@ -1405,7 +1405,7 @@ const Sr = () => {
1405
1405
  )
1406
1406
  }
1407
1407
  );
1408
- }, Dr = Ct(() => import("./AddBlocks-A7WofxHV.js")), Ps = () => {
1408
+ }, Dr = Ct(() => import("./AddBlocks-FsdsASNp.js")), Ps = () => {
1409
1409
  const [e, t] = F(In);
1410
1410
  return /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1411
1411
  /* @__PURE__ */ r.jsx(Jn, {}),