@chaibuilder/sdk 1.2.41 → 1.2.43

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 (62) hide show
  1. package/dist/{AddBlocks-axw0eS0q.js → AddBlocks-9UM7zj57.js} +31 -31
  2. package/dist/{AddBlocks-M0Ai5QRA.cjs → AddBlocks-_6X3bnJZ.cjs} +1 -1
  3. package/dist/{CanvasArea-iPwNNbdH.cjs → CanvasArea-HmbcRpgP.cjs} +1 -1
  4. package/dist/{CanvasArea-CWXelVxd.js → CanvasArea-a3WMBMi3.js} +2 -2
  5. package/dist/{ChaiBuilderEditor-syigvGWW.cjs → ChaiBuilderEditor--NV-B5az.cjs} +10 -10
  6. package/dist/{ChaiBuilderEditor-3Wj_t3jA.js → ChaiBuilderEditor-yf2LRjL1.js} +447 -443
  7. package/dist/{CurrentPage-nER7hH4h.js → CurrentPage-hKtVFDxU.js} +2 -2
  8. package/dist/{CurrentPage-iniQPv9U.cjs → CurrentPage-rgu6shCq.cjs} +1 -1
  9. package/dist/{ListTree-biNayajJ.cjs → ListTree-fwN6Y_EA.cjs} +1 -1
  10. package/dist/{ListTree-hYx4RLqK.js → ListTree-ulr_sjdn.js} +1 -1
  11. package/dist/{PagesPanel-LtuJLoQJ.js → PagesPanel-EHLY-cfj.js} +3 -3
  12. package/dist/{PagesPanel-mFjGqRwI.cjs → PagesPanel-v6Nl5KWy.cjs} +1 -1
  13. package/dist/{ProjectPanel-s87fBlvB.cjs → ProjectPanel-ck-mOBEg.cjs} +1 -1
  14. package/dist/{ProjectPanel-g2wBPuXq.js → ProjectPanel-qiqyRbwH.js} +3 -3
  15. package/dist/Settings-Rtk4HDKy.cjs +1 -0
  16. package/dist/{Settings-sL6SfNst.js → Settings-a7j3ihRx.js} +110 -110
  17. package/dist/{SidePanels-gJa61XBn.js → SidePanels-9XdRZ7rz.js} +149 -149
  18. package/dist/SidePanels-biCoYtzR.cjs +1 -0
  19. package/dist/{ThemeConfiguration-5lCjeQNl.js → ThemeConfiguration-MaGPPza1.js} +4 -4
  20. package/dist/{ThemeConfiguration-bOyg0yqs.cjs → ThemeConfiguration-f6AxqpmO.cjs} +1 -1
  21. package/dist/{Topbar-22iB6xT8.js → Topbar-OpgHjdWn.js} +1 -1
  22. package/dist/{Topbar-YyBsZjuO.cjs → Topbar-cDxKWgN6.cjs} +1 -1
  23. package/dist/{UILibrariesPanel-p5kL4hPY.js → UILibrariesPanel-HVpapacm.js} +53 -54
  24. package/dist/UILibrariesPanel-d08F5Ri0.cjs +1 -0
  25. package/dist/{UnsplashImages-3-5Y4PKF.js → UnsplashImages-Gx7dy6mp.js} +1 -1
  26. package/dist/{UnsplashImages-IxQo6rWq.cjs → UnsplashImages-uyokFuF-.cjs} +1 -1
  27. package/dist/{UploadImages-sAW1x_IX.js → UploadImages-aClrfKqQ.js} +6 -6
  28. package/dist/{UploadImages-p0g4eMUM.cjs → UploadImages-kLPXfW7W.cjs} +1 -1
  29. package/dist/{add-page-modal-f5mO9mWn.cjs → add-page-modal-H5MTzKBT.cjs} +1 -1
  30. package/dist/{add-page-modal-UIhX5RaH.js → add-page-modal-kP7x8GYO.js} +3 -3
  31. package/dist/{confirm-alert-yjv50jW-.js → confirm-alert-gemzBTIt.js} +1 -1
  32. package/dist/{confirm-alert-6_2P1iPG.cjs → confirm-alert-zZAmXzx0.cjs} +1 -1
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +1 -1
  35. package/dist/{delete-page-modal-eXCSYimZ.cjs → delete-page-modal-E8MFNVWF.cjs} +1 -1
  36. package/dist/{delete-page-modal-4RNg8OWW.js → delete-page-modal-ER-TAzRL.js} +2 -2
  37. package/dist/email.cjs +1 -1
  38. package/dist/email.js +1 -1
  39. package/dist/{form-Zy8G3TfH.js → form-UruaB3s_.js} +1 -1
  40. package/dist/{form-gTqkjR1L.cjs → form-l4PB76nt.cjs} +1 -1
  41. package/dist/{index-m6gyJ5Ma.cjs → index-PXyps6Qc.cjs} +1 -1
  42. package/dist/{index-aYfwM1sV.js → index-rKrjj7Vz.js} +2 -2
  43. package/dist/{page-viewer-wTIqXVBZ.js → page-viewer-bCH5PPSH.js} +3 -3
  44. package/dist/{page-viewer-sRHeV-5x.cjs → page-viewer-wQq2qD96.cjs} +1 -1
  45. package/dist/{project-general-setting-rrNhfejo.cjs → project-general-setting-A5OelyCo.cjs} +1 -1
  46. package/dist/{project-general-setting-Zirq3OGL.js → project-general-setting-rdCQBkQZ.js} +3 -3
  47. package/dist/{project-seo-setting-x_PDTJdV.cjs → project-seo-setting-Y_q0WJSy.cjs} +1 -1
  48. package/dist/{project-seo-setting-fqUbfFgl.js → project-seo-setting-_SGBKl0c.js} +2 -2
  49. package/dist/{single-page-detail-FqZ4Sp-y.js → single-page-detail-H3Rb5gkJ.js} +4 -4
  50. package/dist/{single-page-detail-dGVJrIFh.cjs → single-page-detail-xAO7x8a1.cjs} +1 -1
  51. package/dist/studio.cjs +1 -1
  52. package/dist/studio.js +2 -2
  53. package/dist/ui.cjs +1 -1
  54. package/dist/ui.js +1 -1
  55. package/dist/{useCanvasSettings-WJiLFik5.cjs → useCanvasSettings-IalZcnSd.cjs} +1 -1
  56. package/dist/{useCanvasSettings-8RCa8BYU.js → useCanvasSettings-tkzd9Qrw.js} +1 -1
  57. package/dist/web-blocks.cjs +2 -2
  58. package/dist/web-blocks.js +44 -46
  59. package/package.json +1 -1
  60. package/dist/Settings-YEIKf61W.cjs +0 -1
  61. package/dist/SidePanels-f7N3ZWmB.cjs +0 -1
  62. package/dist/UILibrariesPanel-50360foB.cjs +0 -1
@@ -1,9 +1,9 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import j, { createElement as L, useState as f, useEffect as S } from "react";
3
- import { has as E, isFunction as F, first as h, omit as H, filter as x, groupBy as I, uniq as z, map as k, includes as D, isEmpty as N, reject as C, values as y } from "lodash-es";
3
+ import { has as E, isFunction as F, first as h, omit as H, filter as u, groupBy as I, uniq as z, map as k, includes as D, isEmpty as N, reject as y, values as C } from "lodash-es";
4
4
  import { useAtom as g } from "jotai";
5
5
  import { useTranslation as T } from "react-i18next";
6
- import { m as _, L as A, z as M, ag as w, ac as q, ad as O, ae as R, bg as G, bh as J, bi as K, bj as U, aq as V, bk as W, bl as Y, B as Q, bm as X, bn as Z, bo as $, h as B, ai as ee, aj as se, ak as v, ba as te, b3 as oe, b4 as re, b5 as ae, b6 as le } from "./ChaiBuilderEditor-3Wj_t3jA.js";
6
+ import { m as _, L as A, z as M, ag as w, ac as q, ad as O, ae as R, bh as G, bi as J, bj as K, bk as U, aq as V, bl as W, bm as Y, B as Q, bn as X, bo as Z, bp as $, h as v, ai as ee, aj as te, ak as B, bb as se, b4 as oe, b5 as re, b6 as ae, b7 as le } from "./ChaiBuilderEditor-yf2LRjL1.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";
@@ -44,13 +44,13 @@ import "react-quill";
44
44
  import "react-hotkeys-hook";
45
45
  import "lucide-react";
46
46
  import "himalaya";
47
- const pe = ({ block: s }) => {
48
- const { type: o, icon: i, label: a } = s, { addCoreBlock: n, addPredefinedBlock: d } = _(), [c, t] = A(), [, u] = M(), [, p] = g(w), m = () => {
49
- if (E(s, "blocks")) {
50
- const r = F(s.blocks) ? s.blocks() : s.blocks;
47
+ const pe = ({ block: t }) => {
48
+ const { type: o, icon: i, label: a } = t, { addCoreBlock: n, addPredefinedBlock: d } = _(), [c, s] = A(), [, x] = M(), [, p] = g(w), m = () => {
49
+ if (E(t, "blocks")) {
50
+ const r = F(t.blocks) ? t.blocks() : t.blocks;
51
51
  d(ce(r), h(c));
52
52
  } else
53
- n(s, h(c));
53
+ n(t, h(c));
54
54
  p(b);
55
55
  }, l = de("dnd");
56
56
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(q, { children: [
@@ -60,8 +60,8 @@ const pe = ({ block: s }) => {
60
60
  onClick: m,
61
61
  type: "button",
62
62
  onDragStart: (r) => {
63
- r.dataTransfer.setData("text/plain", JSON.stringify(H(s, ["component", "icon"]))), setTimeout(() => {
64
- t([]), u(null), p(b);
63
+ r.dataTransfer.setData("text/plain", JSON.stringify(H(t, ["component", "icon"]))), setTimeout(() => {
64
+ s([]), x(null), p(b);
65
65
  }, 200);
66
66
  },
67
67
  draggable: l ? "true" : "false",
@@ -75,41 +75,41 @@ const pe = ({ block: s }) => {
75
75
  /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsx("p", { children: a || o }) })
76
76
  ] }) });
77
77
  }, he = () => {
78
- const { t: s } = T(), [o, i] = f(""), { addPredefinedBlock: a } = _(), [n] = A(), [, d] = g(w), c = () => {
79
- const t = me(o);
80
- a([...t], h(n) || null), i(""), d(b);
78
+ const { t } = T(), [o, i] = f(""), { addPredefinedBlock: a } = _(), [n] = A(), [, d] = g(w), c = () => {
79
+ const s = me(o);
80
+ a([...s], h(n) || null), i(""), d(b);
81
81
  };
82
82
  return /* @__PURE__ */ e.jsxs(G, { className: "border-border/0 p-0 shadow-none", children: [
83
- /* @__PURE__ */ e.jsx(J, { className: "p-3", children: /* @__PURE__ */ e.jsx(K, { children: s("html_snippet_description") }) }),
83
+ /* @__PURE__ */ e.jsx(J, { className: "p-3", children: /* @__PURE__ */ e.jsx(K, { children: t("html_snippet_description") }) }),
84
84
  /* @__PURE__ */ e.jsx(U, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
85
- /* @__PURE__ */ e.jsx(V, { htmlFor: "current", className: "text-sm", children: s("tailwind_html_snippet") }),
85
+ /* @__PURE__ */ e.jsx(V, { htmlFor: "current", className: "text-sm", children: t("tailwind_html_snippet") }),
86
86
  /* @__PURE__ */ e.jsx(
87
87
  W,
88
88
  {
89
89
  autoFocus: !0,
90
90
  tabIndex: 1,
91
- ref: (t) => t && t.focus(),
92
- onChange: (t) => i(t.target.value),
91
+ ref: (s) => s && s.focus(),
92
+ onChange: (s) => i(s.target.value),
93
93
  rows: 12,
94
94
  value: o,
95
- placeholder: s("enter_code_snippet"),
95
+ placeholder: t("enter_code_snippet"),
96
96
  className: "resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"
97
97
  }
98
98
  )
99
99
  ] }) }),
100
100
  /* @__PURE__ */ e.jsxs(Y, { className: "flex flex-col justify-end p-3", children: [
101
- /* @__PURE__ */ e.jsx(Q, { disabled: o.trim() === "", onClick: () => c(), size: "sm", className: "w-full", children: s("import_html") }),
102
- /* @__PURE__ */ e.jsx(X, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx(Z, { className: "text-xs font-normal leading-4", children: s("note_imported_html") }) })
101
+ /* @__PURE__ */ e.jsx(Q, { disabled: o.trim() === "", onClick: () => c(), size: "sm", className: "w-full", children: t("import_html") }),
102
+ /* @__PURE__ */ e.jsx(X, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx(Z, { className: "text-xs font-normal leading-4", children: t("note_imported_html") }) })
103
103
  ] })
104
104
  ] });
105
- }, ls = () => {
106
- const { t: s } = T(), [o, i] = f("core"), [a, n] = f("basic"), d = ne(), [, c] = g($), t = B("importHTMLSupport", !0), u = B("filterChaiBlock", () => !0), p = x(d, u), m = I(p, "category"), l = z(k(m.core, "group"));
105
+ }, lt = () => {
106
+ const { t } = T(), [o, i] = f("core"), [a, n] = f("basic"), d = ne(), [, c] = g($), s = v("importHTMLSupport", !0), x = v("filterChaiBlock", () => !0), p = u(d, x), m = I(p, "category"), l = z(k(m.core, "group"));
107
107
  return S(() => {
108
108
  !D(l, a) && !N(l) && !N(a) && n(h(l));
109
109
  }, [l, a]), /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-72 flex-col overflow-hidden", children: [
110
110
  /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
111
- /* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: s("add_block") }),
112
- /* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: s(o === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
111
+ /* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: t("add_block") }),
112
+ /* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: t(o === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
113
113
  ] }),
114
114
  /* @__PURE__ */ e.jsx(
115
115
  ee,
@@ -119,26 +119,26 @@ const pe = ({ block: s }) => {
119
119
  },
120
120
  value: o,
121
121
  className: "h-max",
122
- children: /* @__PURE__ */ e.jsxs(se, { className: "grid w-full " + (t ? "grid-cols-2" : "grid-cols-1"), children: [
123
- /* @__PURE__ */ e.jsx(v, { value: "core", children: s("Blocks") }),
124
- t ? /* @__PURE__ */ e.jsx(v, { value: "html", children: s("import") }) : null
122
+ children: /* @__PURE__ */ e.jsxs(te, { className: "grid w-full " + (s ? "grid-cols-2" : "grid-cols-1"), children: [
123
+ /* @__PURE__ */ e.jsx(B, { value: "core", children: t("Blocks") }),
124
+ s ? /* @__PURE__ */ e.jsx(B, { value: "html", children: t("import") }) : null
125
125
  ] })
126
126
  }
127
127
  ),
128
- o === "core" && /* @__PURE__ */ e.jsx(te, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: j.Children.toArray(
128
+ o === "core" && /* @__PURE__ */ e.jsx(se, { className: "-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: j.Children.toArray(
129
129
  k(
130
130
  l,
131
- (r) => C(x(y(m.core), { group: r }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(oe, { type: "single", value: r, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(re, { value: r, children: [
131
+ (r) => y(u(C(m.core), { group: r }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(oe, { type: "single", value: r, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(re, { value: r, children: [
132
132
  /* @__PURE__ */ e.jsx(ae, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children: r }),
133
133
  /* @__PURE__ */ e.jsx(le, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: j.Children.toArray(
134
- C(x(y(m.core), { group: r }), { hidden: !0 }).map((P) => /* @__PURE__ */ e.jsx(pe, { block: P }))
134
+ y(u(C(m.core), { group: r }), { hidden: !0 }).map((P) => /* @__PURE__ */ e.jsx(pe, { block: P }))
135
135
  ) }) })
136
136
  ] }) }) : null
137
137
  )
138
138
  ) }) }),
139
- o === "html" && t ? /* @__PURE__ */ e.jsx(he, {}) : null
139
+ o === "html" && s ? /* @__PURE__ */ e.jsx(he, {}) : null
140
140
  ] });
141
141
  };
142
142
  export {
143
- ls as default
143
+ lt as default
144
144
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),t=require("lodash-es"),g=require("jotai"),q=require("react-i18next"),s=require("./ChaiBuilderEditor-syigvGWW.cjs"),b=require("@radix-ui/react-icons"),E=require("@chaibuilder/runtime"),N=require("flagged"),f=require("./STRINGS-gPz7CUOk.cjs"),T=require("./html-to-json-VPWiWWGH.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("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lucide-react");require("himalaya");const k=({block:r})=>{const{type:o,icon:u,label:l}=r,{addCoreBlock:d,addPredefinedBlock:m}=s.useAddBlock(),[x,i]=s.useSelectedBlockIds(),[,h]=s.useHighlightBlockId(),[,j]=g.useAtom(s.activePanelAtom),p=()=>{if(t.has(r,"blocks")){const n=t.isFunction(r.blocks)?r.blocks():r.blocks;m(E.syncBlocksWithDefaults(n),t.first(x))}else d(r,t.first(x));j(f.OUTLINE_KEY)},c=N.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:p,type:"button",onDragStart:n=>{n.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{i([]),h(null),j(f.OUTLINE_KEY)},200)},draggable:c?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(c?"cursor-grab":"cursor-pointer"),children:[a.createElement(u||b.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:l||o})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:l||o})})]})})},y=()=>{const{t:r}=q.useTranslation(),[o,u]=a.useState(""),{addPredefinedBlock:l}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,m]=g.useAtom(s.activePanelAtom),x=()=>{const i=T.getBlocksFromHTML(o);l([...i],t.first(d)||null),u(""),m(f.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:i=>i&&i.focus(),onChange:i=>u(i.target.value),rows:12,value:o,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:o.trim()==="",onClick:()=>x(),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")})})]})]})},B=()=>{const{t:r}=q.useTranslation(),[o,u]=a.useState("core"),[l,d]=a.useState("basic"),m=E.useChaiBlocks(),[,x]=g.useAtom(s.showPredefinedBlockCategoryAtom),i=s.useBuilderProp("importHTMLSupport",!0),h=s.useBuilderProp("filterChaiBlock",()=>!0),j=t.filter(m,h),p=t.groupBy(j,"category"),c=t.uniq(t.map(p.core,"group"));return a.useEffect(()=>{!t.includes(c,l)&&!t.isEmpty(c)&&!t.isEmpty(l)&&d(t.first(c))},[c,l]),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(o==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:n=>{x(""),u(n)},value:o,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(i?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),i?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),o==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:a.Children.toArray(t.map(c,n=>t.reject(t.filter(t.values(p.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:a.Children.toArray(t.reject(t.filter(t.values(p.core),{group:n}),{hidden:!0}).map(R=>e.jsxRuntimeExports.jsx(k,{block:R})))})})]})}):null))})}),o==="html"&&i?e.jsxRuntimeExports.jsx(y,{}):null]})};exports.default=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),t=require("lodash-es"),g=require("jotai"),q=require("react-i18next"),s=require("./ChaiBuilderEditor--NV-B5az.cjs"),b=require("@radix-ui/react-icons"),E=require("@chaibuilder/runtime"),N=require("flagged"),f=require("./STRINGS-gPz7CUOk.cjs"),T=require("./html-to-json-VPWiWWGH.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("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lucide-react");require("himalaya");const y=({block:r})=>{const{type:o,icon:u,label:l}=r,{addCoreBlock:d,addPredefinedBlock:m}=s.useAddBlock(),[x,i]=s.useSelectedBlockIds(),[,h]=s.useHighlightBlockId(),[,j]=g.useAtom(s.activePanelAtom),p=()=>{if(t.has(r,"blocks")){const n=t.isFunction(r.blocks)?r.blocks():r.blocks;m(E.syncBlocksWithDefaults(n),t.first(x))}else d(r,t.first(x));j(f.OUTLINE_KEY)},c=N.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:p,type:"button",onDragStart:n=>{n.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{i([]),h(null),j(f.OUTLINE_KEY)},200)},draggable:c?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(c?"cursor-grab":"cursor-pointer"),children:[a.createElement(u||b.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:l||o})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:l||o})})]})})},k=()=>{const{t:r}=q.useTranslation(),[o,u]=a.useState(""),{addPredefinedBlock:l}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,m]=g.useAtom(s.activePanelAtom),x=()=>{const i=T.getBlocksFromHTML(o);l([...i],t.first(d)||null),u(""),m(f.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:i=>i&&i.focus(),onChange:i=>u(i.target.value),rows:12,value:o,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:o.trim()==="",onClick:()=>x(),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}=q.useTranslation(),[o,u]=a.useState("core"),[l,d]=a.useState("basic"),m=E.useChaiBlocks(),[,x]=g.useAtom(s.showPredefinedBlockCategoryAtom),i=s.useBuilderProp("importHTMLSupport",!0),h=s.useBuilderProp("filterChaiBlock",()=>!0),j=t.filter(m,h),p=t.groupBy(j,"category"),c=t.uniq(t.map(p.core,"group"));return a.useEffect(()=>{!t.includes(c,l)&&!t.isEmpty(c)&&!t.isEmpty(l)&&d(t.first(c))},[c,l]),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(o==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:n=>{x(""),u(n)},value:o,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(i?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),i?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),o==="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:a.Children.toArray(t.map(c,n=>t.reject(t.filter(t.values(p.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:a.Children.toArray(t.reject(t.filter(t.values(p.core),{group:n}),{hidden:!0}).map(R=>e.jsxRuntimeExports.jsx(y,{block:R})))})})]})}):null))})}),o==="html"&&i?e.jsxRuntimeExports.jsx(k,{}):null]})};exports.default=v;
@@ -1,4 +1,4 @@
1
- "use strict";var ne=Object.defineProperty;var oe=(o,s,e)=>s in o?ne(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;var C=(o,s,e)=>(oe(o,typeof s!="symbol"?s+"":s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),h=require("react"),a=require("lodash-es"),E=require("@radix-ui/react-icons"),i=require("./ChaiBuilderEditor-syigvGWW.cjs"),M=require("react-i18next"),b=require("jotai"),re=require("lucide-react"),F=require("react-dom"),k=require("prop-types"),ie=require("react-quill"),W=require("flagged"),le=require("@floating-ui/dom"),H=require("@floating-ui/react-dom"),ce=require("@react-hookz/web"),ae=require("@tailwindcss/typography"),de=require("@tailwindcss/forms"),ue=require("@tailwindcss/aspect-ratio"),pe=require("tailwindcss-palette-generator"),he=require("react-wrap-balancer"),xe=require("tailwind-merge"),_=require("./STRINGS-gPz7CUOk.cjs"),me=require("@chaibuilder/runtime"),ge=require("./useCanvasSettings-WJiLFik5.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("i18next");require("./Functions-N3yhPYKY.cjs");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-hotkeys-hook");const fe=()=>{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(E.ResetIcon,{})}),r.jsxRuntimeExports.jsx(i.Button,{disabled:!s(),onClick:t,size:"sm",className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(E.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function ve(){const[o,s]=i.useDarkMode(),{t:e}=M.useTranslation();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(i.Label,{htmlFor:"dark-mode-switch",children:e("dark_mode")}),r.jsxRuntimeExports.jsxs(i.Switch,{id:"dark-mode-switch",checked:o,onCheckedChange:()=>{s(!o)},className:`${o?"bg-violet-600":"bg-violet-300"}
1
+ "use strict";var ne=Object.defineProperty;var oe=(o,s,e)=>s in o?ne(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;var C=(o,s,e)=>(oe(o,typeof s!="symbol"?s+"":s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),h=require("react"),a=require("lodash-es"),E=require("@radix-ui/react-icons"),i=require("./ChaiBuilderEditor--NV-B5az.cjs"),M=require("react-i18next"),b=require("jotai"),re=require("lucide-react"),F=require("react-dom"),k=require("prop-types"),ie=require("react-quill"),W=require("flagged"),le=require("@floating-ui/dom"),H=require("@floating-ui/react-dom"),ce=require("@react-hookz/web"),ae=require("@tailwindcss/typography"),de=require("@tailwindcss/forms"),ue=require("@tailwindcss/aspect-ratio"),pe=require("tailwindcss-palette-generator"),he=require("react-wrap-balancer"),xe=require("tailwind-merge"),_=require("./STRINGS-gPz7CUOk.cjs"),me=require("@chaibuilder/runtime"),ge=require("./useCanvasSettings-IalZcnSd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("i18next");require("./Functions-N3yhPYKY.cjs");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-hotkeys-hook");const fe=()=>{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(E.ResetIcon,{})}),r.jsxRuntimeExports.jsx(i.Button,{disabled:!s(),onClick:t,size:"sm",className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(E.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function ve(){const[o,s]=i.useDarkMode(),{t:e}=M.useTranslation();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(i.Label,{htmlFor:"dark-mode-switch",children:e("dark_mode")}),r.jsxRuntimeExports.jsxs(i.Switch,{id:"dark-mode-switch",checked:o,onCheckedChange:()=>{s(!o)},className:`${o?"bg-violet-600":"bg-violet-300"}
2
2
  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",{className:"sr-only",children:e("use_setting")}),r.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${o?"translate-x-5":"translate-x-0"}
3
3
  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`})]})]})}const O=({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"}})]}),je=[{title:"mobile_xs_title",content:"mobile_xs_content",breakpoint:"xs",icon:r.jsxRuntimeExports.jsx(E.MobileIcon,{}),width:400},{title:"mobile_sm_title",content:"mobile_sm_content",breakpoint:"sm",icon:r.jsxRuntimeExports.jsx(E.MobileIcon,{className:"rotate-90"}),width:640},{title:"tablet_md_title",content:"tablet_md_content",breakpoint:"md",icon:r.jsxRuntimeExports.jsx(O,{}),width:800},{title:"tablet_lg_title",content:"tablet_lg_content",breakpoint:"lg",icon:r.jsxRuntimeExports.jsx(O,{landscape:!0}),width:1024},{title:"desktop_xl_title",content:"desktop_xl_content",breakpoint:"xl",icon:r.jsxRuntimeExports.jsx(E.LaptopIcon,{}),width:1420},{title:"large_desktop_2xl_title",content:"large_desktop_2xl_content",breakpoint:"2xl",icon:r.jsxRuntimeExports.jsx(E.DesktopIcon,{}),width:1920}],U=({title:o,content:s,currentBreakpoint:e,breakpoint:t,width:n,icon:p,onClick:c})=>{const{t:l}=M.useTranslation();return r.jsxRuntimeExports.jsxs(i.HoverCard,{children:[r.jsxRuntimeExports.jsx(i.HoverCardTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx(i.Button,{onClick:()=>c(n),size:"sm",variant:t===e?"secondary":"ghost",children:p})}),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)})]})})})]})},$e=()=>{const[,o,s]=i.useCanvasWidth(),[e,t]=i.useSelectedBreakpoints(),{t:n}=M.useTranslation(),p=i.useBuilderProp("breakpoints",je),c=l=>{e.includes(l)?e.length>2&&t(e.filter(d=>d!==l)):t(d=>[...d,l])};return p.length<4?r.jsxRuntimeExports.jsx("div",{className:"flex items-center rounded-md",children:a.map(p,l=>h.createElement(U,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o}))}):r.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md",children:[a.map(p.filter(l=>a.includes(e,a.toUpper(l.breakpoint))),l=>h.createElement(U,{...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(E.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,{}),a.map(p,l=>r.jsxRuntimeExports.jsx(i.DropdownMenuCheckboxItem,{disabled:l.breakpoint==="xs",onCheckedChange:()=>c(a.toUpper(l.breakpoint)),checked:a.includes(e,a.toUpper(l.breakpoint)),children:n(l.title)},l.breakpoint))]})]})]})},ye=()=>{const{t:o}=M.useTranslation(),{setNewBlocks:s}=i.useBlocksStoreUndoableActions(),[,e]=i.useSelectedBlockIds(),[,t]=i.useSelectedStylingBlocks(),n=h.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(E.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")})]})]})]})})},be=()=>{const[o,s]=b.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(re.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),r.jsxRuntimeExports.jsx(i.Switch,{className:"scale-90",checked:o,onCheckedChange:t=>{s(t)},id:"ai-assitantt"})]}):null},ke=()=>{const o=i.useBuilderProp("darkMode",!1),[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:[o?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(ve,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"})]}):null,r.jsxRuntimeExports.jsx($e,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),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(E.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",r.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[a.round(s,0),"%"]})]}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(fe,{})]}),r.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[r.jsxRuntimeExports.jsx(ye,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(be,{})]})]})},Ee=`<!doctype html>
4
4
  <html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
@@ -5,7 +5,7 @@ import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
5
  import A, { createElement as se, useCallback as H, useState as j, useEffect as k, Component as ue, Children as Oe, Suspense as he, useRef as ne, useMemo as ze } from "react";
6
6
  import { map as P, includes as oe, toUpper as Y, round as Ue, noop as T, has as Q, throttle as me, isEmpty as D, first as U, omit as We, pick as qe, get as f, isString as G, memoize as Ke, each as Ye, find as Je, filter as ge, isNull as Qe } from "lodash-es";
7
7
  import { ResetIcon as re, MobileIcon as ie, LaptopIcon as Ze, DesktopIcon as Xe, DotsVerticalIcon as Ge, EraserIcon as Ve, ZoomInIcon as et, DragHandleDots2Icon as tt, ArrowUpIcon as st, CopyIcon as nt, TrashIcon as ot } from "@radix-ui/react-icons";
8
- import { j as fe, B as W, v as xe, aq as ve, ar as $e, as as rt, at as it, au as at, o as V, X as lt, h as L, av as ct, aw as dt, ax as pt, ay as ut, az as ht, aA as mt, aB as gt, L as C, Y as N, A as ft, a as xt, b as vt, c as $t, d as yt, e as bt, f as kt, g as wt, a3 as jt, aC as Ct, p as ye, ap as z, m as Bt, aD as Dt, z as M, Q as It, aE as R, aF as St, i as ee, w as be, E as ke, H as we, V as _t, aG as At, aH as je, aI as Nt, aJ as Mt, F as Et, aK as Tt, aL as Lt, aM as Rt, M as Ft, aN as Pt, ah as Ce, a2 as Ht } from "./ChaiBuilderEditor-3Wj_t3jA.js";
8
+ import { j as fe, B as W, v as xe, aq as ve, ar as $e, as as rt, at as it, au as at, o as V, X as lt, h as L, av as ct, aw as dt, ax as pt, ay as ut, az as ht, aA as mt, aB as gt, L as C, Y as N, A as ft, a as xt, b as vt, c as $t, d as yt, e as bt, f as kt, g as wt, a3 as jt, aC as Ct, p as ye, ap as z, m as Bt, aD as Dt, z as M, Q as It, aE as R, aF as St, i as ee, w as be, E as ke, H as we, V as _t, aG as At, aH as je, aI as Nt, aJ as Mt, F as Et, aK as Tt, aL as Lt, aM as Rt, M as Ft, aN as Pt, ah as Ce, a2 as Ht } from "./ChaiBuilderEditor-yf2LRjL1.js";
9
9
  import { useTranslation as q } from "react-i18next";
10
10
  import { useAtom as y } from "jotai";
11
11
  import { SparklesIcon as Ot } from "lucide-react";
@@ -24,7 +24,7 @@ import { Provider as Xt } from "react-wrap-balancer";
24
24
  import { twMerge as Gt } from "tailwind-merge";
25
25
  import { S as le, a as De } from "./STRINGS--j49GZJP.js";
26
26
  import { getBlockComponent as Vt } from "@chaibuilder/runtime";
27
- import { u as es } from "./useCanvasSettings-8RCa8BYU.js";
27
+ import { u as es } from "./useCanvasSettings-tkzd9Qrw.js";
28
28
  import "./_commonjsHelpers-UyOWmZb0.js";
29
29
  import "clsx";
30
30
  import "@radix-ui/react-scroll-area";