@chaibuilder/sdk 1.2.64 → 1.2.65

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 (78) hide show
  1. package/dist/CanvasArea-fSdH_RiN.cjs +1 -0
  2. package/dist/{CanvasArea-kB6ky_uL.js → CanvasArea-ut5yknzX.js} +58 -54
  3. package/dist/{CodeEditor-37od44Ou.js → CodeEditor-Qff4q7sx.js} +1 -1
  4. package/dist/{CurrentPage-bHq9Uusr.js → CurrentPage-jHSVy3hq.js} +38 -26
  5. package/dist/CurrentPage-p_AM4lrF.cjs +1 -0
  6. package/dist/{PagesPanel-wIPAyjJK.js → PagesPanel-U3InJ9Db.js} +20 -8
  7. package/dist/PagesPanel-wqDb4D-x.cjs +1 -0
  8. package/dist/{ProjectPanel-L-SlDizV.js → ProjectPanel-XODJTO4J.js} +36 -24
  9. package/dist/ProjectPanel-fWESzHr6.cjs +1 -0
  10. package/dist/{SidePanels-UQj0XTnb.js → SidePanels-ijaUKSek.js} +96 -82
  11. package/dist/SidePanels-lrMQqc0h.cjs +1 -0
  12. package/dist/Topbar-RrCDxd0i.cjs +1 -0
  13. package/dist/{Topbar-1O05wogM.js → Topbar-vHlnfxPs.js} +45 -30
  14. package/dist/UILibrariesPanel-7btHgBD0.cjs +1 -0
  15. package/dist/{UILibrariesPanel-vshiYI6G.js → UILibrariesPanel-NVUMUPUj.js} +85 -65
  16. package/dist/{UnsplashImages-Eq7hprBO.js → UnsplashImages-UkHihhA5.js} +18 -18
  17. package/dist/{UploadImages-lco2Tea3.js → UploadImages-HtuJZJlo.js} +1 -1
  18. package/dist/add-page-modal-RwIj1FxH.cjs +1 -0
  19. package/dist/{add-page-modal-qr7rvJzN.js → add-page-modal-TOfMfmPA.js} +33 -24
  20. package/dist/{confirm-alert-P6TAevaP.js → confirm-alert-eIp2cAkc.js} +1 -1
  21. package/dist/core.cjs +1 -1
  22. package/dist/core.d.ts +7 -8
  23. package/dist/core.js +74 -59
  24. package/dist/{delete-page-modal-55oioI9i.js → delete-page-modal-4bxjpVBD.js} +33 -21
  25. package/dist/delete-page-modal-qYDZmpgT.cjs +1 -0
  26. package/dist/email.cjs +1 -1
  27. package/dist/email.js +20 -5
  28. package/dist/{form-5ke_lZv8.js → form-NAzFjGs0.js} +9 -9
  29. package/dist/html-to-json-NqRjgFqp.cjs +1 -0
  30. package/dist/html-to-json-l_mw5y-e.js +243 -0
  31. package/dist/{index-6w-6HYBd.cjs → index--k2M8kzI.cjs} +1 -1
  32. package/dist/{index-audsIPBC.cjs → index-5XyNUAjc.cjs} +81 -22
  33. package/dist/{index-b33n_-zO.js → index-C7mB4XFm.js} +117 -117
  34. package/dist/{index-fnkMn4Pk.js → index-YZhtVcj_.js} +4 -4
  35. package/dist/{index-wRAIA8zZ.js → index-lFgDm1oa.js} +48587 -45055
  36. package/dist/lib.cjs +2 -2
  37. package/dist/lib.js +22 -22
  38. package/dist/page-viewer-4wrnWnK0.js +124 -0
  39. package/dist/page-viewer-ra0GLx1p.cjs +1 -0
  40. package/dist/{project-general-setting-NEkNjf7V.js → project-general-setting-IwZUkYF3.js} +18 -9
  41. package/dist/project-general-setting-lFjTUhHD.cjs +1 -0
  42. package/dist/{project-seo-setting-YmspOYsF.js → project-seo-setting-e1fTqVsd.js} +2 -2
  43. package/dist/{single-page-detail-jHzoDP7B.js → single-page-detail-ZNWFKqLW.js} +64 -55
  44. package/dist/single-page-detail-g55Anu7R.cjs +1 -0
  45. package/dist/studio.cjs +1 -1
  46. package/dist/studio.js +18 -6
  47. package/dist/style.css +2 -2
  48. package/dist/ui.js +67 -67
  49. package/package.json +1 -1
  50. package/dist/AddBlocks-6dJmFSgk.js +0 -142
  51. package/dist/AddBlocks-doCNVVbk.cjs +0 -1
  52. package/dist/CanvasArea-kdnkFfKR.cjs +0 -1
  53. package/dist/CurrentPage-Ekl5Cwbv.cjs +0 -1
  54. package/dist/PagesPanel-SMHrEmCb.cjs +0 -1
  55. package/dist/ProjectPanel-YruLal65.cjs +0 -1
  56. package/dist/Settings-WXkCyhAv.js +0 -2380
  57. package/dist/Settings-_5VHcgFC.cjs +0 -1
  58. package/dist/SidePanels-UeIZB3e1.cjs +0 -1
  59. package/dist/StaticCanvas-7C52tXAv.js +0 -749
  60. package/dist/StaticCanvas-ll9VTXI5.cjs +0 -60
  61. package/dist/ThemeConfigPanel-_86vVxLz.cjs +0 -1
  62. package/dist/ThemeConfigPanel-gw8B2zvx.js +0 -194
  63. package/dist/Topbar-gb17oHdJ.cjs +0 -1
  64. package/dist/UILibrariesPanel-03Y3F3A_.cjs +0 -1
  65. package/dist/add-page-modal-rOKavDFX.cjs +0 -1
  66. package/dist/atoms-KQpaDRnF.cjs +0 -1
  67. package/dist/atoms-Oomqut88.js +0 -6
  68. package/dist/delete-page-modal-wdAiMVnL.cjs +0 -1
  69. package/dist/html-to-json-_01DXd-a.js +0 -192
  70. package/dist/html-to-json-ndxaXRT8.cjs +0 -1
  71. package/dist/index-e0c8PmRQ.js +0 -205
  72. package/dist/index-gi1LIOCw.cjs +0 -1
  73. package/dist/page-viewer-t44DP65U.js +0 -112
  74. package/dist/page-viewer-wU7T0f48.cjs +0 -1
  75. package/dist/plugin-2hf9pCRy.cjs +0 -1
  76. package/dist/plugin-wDnsBVPp.js +0 -54
  77. package/dist/project-general-setting-87cX9vvO.cjs +0 -1
  78. package/dist/single-page-detail-27UjWK8L.cjs +0 -1
@@ -1,16 +1,16 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import { noop as T, get as g, has as I, first as x, isEmpty as L, values as U, groupBy as D, map as R, capitalize as _ } from "lodash-es";
3
- import * as O from "react";
2
+ import { noop as T, get as g, has as I, first as x, isEmpty as L, values as U, groupBy as D, map as _, capitalize as O } from "lodash-es";
3
+ import * as R from "react";
4
4
  import S, { useState as A, useCallback as z, useEffect as G, useRef as M } from "react";
5
- import { aN as H, aO as $, B as F, aP as W, aQ as Y, aR as q, aS as J, aT as K, aU as Q, aV as V, h as C, aq as X, j as Z, aA as ee, T as te, v as se, w as oe, Y as re, bf as ae, $ as ne, ai as ie } from "./index-b33n_-zO.js";
5
+ import { a4 as H, a5 as F, B as J, a6 as W, a7 as $, a8 as K, a9 as V, aa as Y, ab as q, ac as Q, h as C, U as X, j as Z, V as ee, T as te, v as se, w as oe, b5 as re, aO as ae, a3 as ie, aJ as ne } from "./index-C7mB4XFm.js";
6
6
  import { syncBlocksWithDefaults as le, useChaiBlocks as ce } from "@chaibuilder/runtime";
7
- import { Loader as de } from "lucide-react";
8
- import { useAtom as w, atom as me } from "jotai";
9
- import { c as P } from "./Functions-7jnEwJyw.js";
10
- import { CaretSortIcon as ue, CheckIcon as pe, CaretRightIcon as xe } from "@radix-ui/react-icons";
7
+ import { Loader as me } from "lucide-react";
8
+ import { useAtom as w, atom as de } from "jotai";
9
+ import { c as E } from "./Functions-7jnEwJyw.js";
10
+ import { CaretSortIcon as pe, CheckIcon as ue, CaretRightIcon as xe } from "@radix-ui/react-icons";
11
11
  import { O as fe } from "./MODIFIERS-fd5XOmum.js";
12
- import { useTranslation as E } from "react-i18next";
13
- import { d as he } from "./atoms-Oomqut88.js";
12
+ import { useTranslation as P } from "react-i18next";
13
+ import { c as he } from "./index-lFgDm1oa.js";
14
14
  import ge from "clsx";
15
15
  import { useFeature as je } from "flagged";
16
16
  import "./_commonjsHelpers-UyOWmZb0.js";
@@ -41,48 +41,68 @@ import "react-dom";
41
41
  import "react-quill";
42
42
  import "@react-hookz/web";
43
43
  import "tree-model";
44
+ import "i18next";
45
+ import "react-arborist";
46
+ import "./index-VBXQixVm.js";
47
+ import "prop-types";
48
+ import "react-hotkeys-hook";
49
+ import "@floating-ui/dom";
50
+ import "@floating-ui/react-dom";
51
+ import "@tailwindcss/typography";
52
+ import "@tailwindcss/forms";
53
+ import "@tailwindcss/aspect-ratio";
54
+ import "tailwindcss-palette-generator";
55
+ import "./html-to-json-l_mw5y-e.js";
56
+ import "himalaya";
57
+ import "lodash";
58
+ import "react-wrap-balancer";
59
+ import "@rjsf/core";
60
+ import "@rjsf/validator-ajv8";
61
+ import "react-autosuggest";
62
+ import "fuse.js";
63
+ import "./controls-yjgoZzB6.js";
44
64
  function ke({
45
65
  uiLibraries: t,
46
66
  library: a,
47
- setLibrary: n
67
+ setLibrary: i
48
68
  }) {
49
- var u;
50
- const [d, l] = O.useState(!1), { t: s } = E();
51
- return a ? /* @__PURE__ */ e.jsxs(H, { open: d, onOpenChange: l, children: [
52
- /* @__PURE__ */ e.jsx($, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
69
+ var p;
70
+ const [m, l] = R.useState(!1), { t: s } = P();
71
+ return a ? /* @__PURE__ */ e.jsxs(H, { open: m, onOpenChange: l, children: [
72
+ /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
53
73
  /* @__PURE__ */ e.jsx("span", { children: s("Choose Library") }),
54
74
  /* @__PURE__ */ e.jsxs(
55
- F,
75
+ J,
56
76
  {
57
77
  variant: "outline",
58
78
  size: "sm",
59
79
  role: "combobox",
60
- "aria-expanded": d,
80
+ "aria-expanded": m,
61
81
  className: "w-[200px] justify-between",
62
82
  children: [
63
- a ? (u = t.find((o) => o.uuid === a)) == null ? void 0 : u.name : s("Select library"),
64
- /* @__PURE__ */ e.jsx(ue, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
83
+ a ? (p = t.find((o) => o.uuid === a)) == null ? void 0 : p.name : s("Select library"),
84
+ /* @__PURE__ */ e.jsx(pe, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
65
85
  ]
66
86
  }
67
87
  )
68
88
  ] }) }),
69
- /* @__PURE__ */ e.jsx(W, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(Y, { children: [
70
- /* @__PURE__ */ e.jsx(q, { placeholder: "Search library...", className: "h-9" }),
71
- /* @__PURE__ */ e.jsxs(J, { children: [
72
- /* @__PURE__ */ e.jsx(K, { children: "No library found." }),
73
- /* @__PURE__ */ e.jsx(Q, { children: t.map((o) => /* @__PURE__ */ e.jsxs(
74
- V,
89
+ /* @__PURE__ */ e.jsx(W, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs($, { children: [
90
+ /* @__PURE__ */ e.jsx(K, { placeholder: "Search library...", className: "h-9" }),
91
+ /* @__PURE__ */ e.jsxs(V, { children: [
92
+ /* @__PURE__ */ e.jsx(Y, { children: "No library found." }),
93
+ /* @__PURE__ */ e.jsx(q, { children: t.map((o) => /* @__PURE__ */ e.jsxs(
94
+ Q,
75
95
  {
76
96
  value: o.uuid,
77
- onSelect: (p) => {
78
- n(p), l(!1);
97
+ onSelect: (u) => {
98
+ i(u), l(!1);
79
99
  },
80
100
  children: [
81
101
  o.name,
82
102
  /* @__PURE__ */ e.jsx(
83
- pe,
103
+ ue,
84
104
  {
85
- className: P("ml-auto h-4 w-4", a === o.uuid ? "opacity-100" : "opacity-0")
105
+ className: E("ml-auto h-4 w-4", a === o.uuid ? "opacity-100" : "opacity-0")
86
106
  }
87
107
  )
88
108
  ]
@@ -96,28 +116,28 @@ function ke({
96
116
  const we = ({
97
117
  block: t,
98
118
  closePopover: a,
99
- library: n
119
+ library: i
100
120
  }) => {
101
- const [d, l] = A(!1), s = C("getUILibraryBlock", T), { addCoreBlock: u, addPredefinedBlock: o } = X(), [p, j] = Z(), [, k] = ee(), f = g(t, "name", g(t, "label")), v = je("dnd"), [, b] = w(he), i = (r) => {
102
- const m = I(r, "styles_attrs.data-page-section");
103
- return r._type === "Box" && m;
121
+ const [m, l] = A(!1), s = C("getUILibraryBlock", T), { addCoreBlock: p, addPredefinedBlock: o } = X(), [u, j] = Z(), [, k] = ee(), f = g(t, "name", g(t, "label")), b = je("dnd"), [, v] = w(he), n = (r) => {
122
+ const d = I(r, "styles_attrs.data-page-section");
123
+ return r._type === "Box" && d;
104
124
  }, B = z(
105
125
  async (r) => {
106
126
  if (r.stopPropagation(), I(t, "component")) {
107
- u(t, x(p)), a();
127
+ p(t, x(u)), a();
108
128
  return;
109
129
  }
110
130
  l(!0);
111
- const m = await s(n, t);
112
- let h = x(p);
113
- i(x(m)) && (h = null), L(m) || o(le(m), h), a();
131
+ const d = await s(i, t);
132
+ let h = x(u);
133
+ n(x(d)) && (h = null), L(d) || o(le(d), h), a();
114
134
  },
115
135
  [t]
116
136
  ), c = async (r) => {
117
- const m = await s(n, t);
118
- let h = x(p);
119
- if (i(x(m)) && (h = null), !L(m)) {
120
- const y = { blocks: m, uiLibrary: !0, parent: h };
137
+ const d = await s(i, t);
138
+ let h = x(u);
139
+ if (n(x(d)) && (h = null), !L(d)) {
140
+ const y = { blocks: d, uiLibrary: !0, parent: h };
121
141
  if (r.dataTransfer.setData("text/plain", JSON.stringify(y)), t.preview) {
122
142
  const N = new Image();
123
143
  N.src = t.preview, N.onload = () => {
@@ -125,7 +145,7 @@ const we = ({
125
145
  };
126
146
  } else
127
147
  r.dataTransfer.setDragImage(new Image(), 0, 0);
128
- b(y), setTimeout(() => {
148
+ v(y), setTimeout(() => {
129
149
  j([]), k(null), a();
130
150
  }, 200);
131
151
  }
@@ -134,16 +154,16 @@ const we = ({
134
154
  /* @__PURE__ */ e.jsx(se, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
135
155
  "div",
136
156
  {
137
- onClick: d ? () => {
157
+ onClick: m ? () => {
138
158
  } : B,
139
- draggable: v ? "true" : "false",
159
+ draggable: b ? "true" : "false",
140
160
  onDragStart: c,
141
161
  className: ge(
142
162
  "relative mt-2 cursor-pointer overflow-hidden rounded-md border border-gray-300 bg-white duration-200 hover:border-blue-500 hover:shadow-xl"
143
163
  ),
144
164
  children: [
145
- d && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black/70", children: [
146
- /* @__PURE__ */ e.jsx(de, { className: "animate-spin", size: 15, color: "white" }),
165
+ m && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black/70", children: [
166
+ /* @__PURE__ */ e.jsx(me, { className: "animate-spin", size: 15, color: "white" }),
147
167
  /* @__PURE__ */ e.jsx("span", { className: "pl-2 text-sm text-white", children: "Adding..." })
148
168
  ] }),
149
169
  t.preview ? /* @__PURE__ */ e.jsx("img", { src: t.preview, className: "min-h-[25px] w-full rounded-md", alt: f }) : /* @__PURE__ */ e.jsx("div", { className: "flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200", children: /* @__PURE__ */ e.jsx("p", { className: "max-w-xs text-center text-sm text-gray-700", children: f }) })
@@ -152,39 +172,39 @@ const we = ({
152
172
  ) }),
153
173
  /* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsx("p", { children: f }) })
154
174
  ] });
155
- }, ve = me({}), be = (t) => {
156
- const [a, n] = w(ve), d = C("getUILibraryBlocks", T), l = g(a, `${t == null ? void 0 : t.uuid}.blocks`, []), s = g(a, `${t == null ? void 0 : t.uuid}.loading`, !1);
175
+ }, be = de({}), ve = (t) => {
176
+ const [a, i] = w(be), m = C("getUILibraryBlocks", T), l = g(a, `${t == null ? void 0 : t.uuid}.blocks`, []), s = g(a, `${t == null ? void 0 : t.uuid}.loading`, !1);
157
177
  return G(() => {
158
178
  (async () => {
159
179
  if (s || l.length > 0 || !t)
160
180
  return;
161
- n((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !0, blocks: [] } }));
162
- const u = await d(t);
163
- n((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !1, blocks: u || [] } }));
181
+ i((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !0, blocks: [] } }));
182
+ const p = await m(t);
183
+ i((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !1, blocks: p || [] } }));
164
184
  })();
165
185
  }, [t, l, s]), { data: l, isLoading: s };
166
186
  }, Be = re("_selectedLibrary", null), Ne = () => {
167
- const [t, a] = w(Be), n = C("uiLibraries", []), d = ce(), l = U(d).filter((c) => c.category === "custom"), s = n.find((c) => c.uuid === t) || x(n), { data: u, isLoading: o } = be(s), p = D([...u, ...l], "group"), [j, k] = A("Hero"), [, f] = w(ae), v = g(p, j, []), { t: b } = E(), i = M(null), B = (c) => {
168
- i.current && (clearTimeout(i.current), i.current = null), i.current = setTimeout(() => {
169
- i.current && k(c);
187
+ const [t, a] = w(Be), i = C("uiLibraries", []), m = ce(), l = U(m).filter((c) => c.category === "custom"), s = i.find((c) => c.uuid === t) || x(i), { data: p, isLoading: o } = ve(s), u = D([...p, ...l], "group"), [j, k] = A("Hero"), [, f] = w(ae), b = g(u, j, []), { t: v } = P(), n = M(null), B = (c) => {
188
+ n.current && (clearTimeout(n.current), n.current = null), n.current = setTimeout(() => {
189
+ n.current && k(c);
170
190
  }, 300);
171
191
  };
172
- return o ? /* @__PURE__ */ e.jsx(ne, { className: "h-full w-full" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full max-h-full w-[460px] flex-col overflow-hidden bg-background", children: [
173
- s != null && s.uuid ? /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex h-fit flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ e.jsx("h1", { className: "flex w-full flex-col items-baseline truncate px-1 text-sm font-semibold xl:flex-col", children: /* @__PURE__ */ e.jsx(ke, { library: s == null ? void 0 : s.uuid, setLibrary: a, uiLibraries: n }) }) }) }) : null,
192
+ return o ? /* @__PURE__ */ e.jsx(ie, { className: "h-full w-full" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full max-h-full w-[460px] flex-col overflow-hidden bg-background", children: [
193
+ s != null && s.uuid ? /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex h-fit flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ e.jsx("h1", { className: "flex w-full flex-col items-baseline truncate px-1 text-sm font-semibold xl:flex-col", children: /* @__PURE__ */ e.jsx(ke, { library: s == null ? void 0 : s.uuid, setLibrary: a, uiLibraries: i }) }) }) }) : null,
174
194
  /* @__PURE__ */ e.jsxs("div", { className: "flex h-[95%] border-t border-gray-300 pt-2", children: [
175
195
  /* @__PURE__ */ e.jsx("div", { className: "flex h-full w-40 flex-col gap-1 px-1", children: S.Children.toArray(
176
- R(p, (c, r) => /* @__PURE__ */ e.jsxs(
196
+ _(u, (c, r) => /* @__PURE__ */ e.jsxs(
177
197
  "div",
178
198
  {
179
199
  onMouseEnter: () => B(r),
180
- onMouseLeave: () => clearTimeout(i.current),
200
+ onMouseLeave: () => clearTimeout(n.current),
181
201
  onClick: () => k(r),
182
- className: P(
202
+ className: E(
183
203
  "flex w-full cursor-pointer items-center justify-between rounded-md p-1 text-sm transition-all ease-in-out hover:bg-gray-200",
184
204
  r === j ? "bg-blue-500 text-white hover:bg-blue-600" : ""
185
205
  ),
186
206
  children: [
187
- /* @__PURE__ */ e.jsx("span", { children: _(r) }),
207
+ /* @__PURE__ */ e.jsx("span", { children: O(r) }),
188
208
  /* @__PURE__ */ e.jsx(xe, { className: "ml-2 h-5 w-5" })
189
209
  ]
190
210
  },
@@ -192,14 +212,14 @@ const we = ({
192
212
  ))
193
213
  ) }),
194
214
  /* @__PURE__ */ e.jsxs(
195
- ie,
215
+ ne,
196
216
  {
197
- onMouseEnter: () => i.current ? clearTimeout(i.current) : null,
217
+ onMouseEnter: () => n.current ? clearTimeout(n.current) : null,
198
218
  className: "z-10 -mt-2 flex h-full max-h-full w-[300px] flex-col gap-2 border-l border-gray-300 transition-all ease-linear",
199
219
  children: [
200
- /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 z-30 border-b border-gray-300 bg-gray-200 p-2 text-[9px] font-light leading-3 text-gray-500", children: b("Click on a block to add it to the page") }),
220
+ /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 z-30 border-b border-gray-300 bg-gray-200 p-2 text-[9px] font-light leading-3 text-gray-500", children: v("Click on a block to add it to the page") }),
201
221
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 px-2", children: S.Children.toArray(
202
- v.map((c) => /* @__PURE__ */ e.jsx(we, { block: c, library: s, closePopover: () => f(fe) }))
222
+ b.map((c) => /* @__PURE__ */ e.jsx(we, { block: c, library: s, closePopover: () => f(fe) }))
203
223
  ) }),
204
224
  /* @__PURE__ */ e.jsx("br", {}),
205
225
  /* @__PURE__ */ e.jsx("br", {}),
@@ -209,7 +229,7 @@ const we = ({
209
229
  )
210
230
  ] })
211
231
  ] }) });
212
- }, pt = () => /* @__PURE__ */ e.jsx(Ne, {});
232
+ }, Pt = () => /* @__PURE__ */ e.jsx(Ne, {});
213
233
  export {
214
- pt as default
234
+ Pt as default
215
235
  };
@@ -1,11 +1,11 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import { useState as p, useEffect as D } from "react";
3
3
  import { isEmpty as d, startCase as E } from "lodash-es";
4
- import { MixerHorizontalIcon as L } from "@radix-ui/react-icons";
5
- import { createApi as B } from "unsplash-js";
6
- import { h as F, bb as K, aN as O, aO as U, aP as V, bs as P, bt as C, bu as S, bv as I, bw as h, ai as Q, B as H } from "./index-b33n_-zO.js";
7
- import { useDebouncedState as R } from "@react-hookz/web";
8
- import { Loader as $ } from "lucide-react";
4
+ import { MixerHorizontalIcon as F } from "@radix-ui/react-icons";
5
+ import { createApi as L } from "unsplash-js";
6
+ import { h as B, aF as K, a4 as U, a5 as V, a6 as O, bw as P, bx as C, by as S, bz as A, bA as h, aJ as Q, B as H } from "./index-C7mB4XFm.js";
7
+ import { useDebouncedState as J } from "@react-hookz/web";
8
+ import { Loader as R } from "lucide-react";
9
9
  import "./_commonjsHelpers-UyOWmZb0.js";
10
10
  import "@radix-ui/react-toggle";
11
11
  import "class-variance-authority";
@@ -39,18 +39,18 @@ import "@chaibuilder/runtime";
39
39
  import "jotai";
40
40
  import "tree-model";
41
41
  import "react-i18next";
42
- const k = async (x, g) => new Promise((o, r) => {
43
- B({ accessKey: g }).search.getPhotos(x).then((i) => {
42
+ const I = async (x, g) => new Promise((o, r) => {
43
+ L({ accessKey: g }).search.getPhotos(x).then((i) => {
44
44
  o(i);
45
45
  }).catch((i) => r(i));
46
46
  }), De = ({ isModalView: x, onSelect: g }) => {
47
- const o = F("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l, A] = p(), [n, q] = p(), [z, y] = p(0), [u, T] = R("", 1e3), [f, c] = p(!1), _ = async (s) => {
47
+ const o = B("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l, k] = p(), [n, q] = p(), [z, y] = p(0), [u, T] = J("", 1e3), [f, c] = p(!1), _ = async (s) => {
48
48
  if (d(u))
49
49
  return;
50
50
  let t = i + 1;
51
51
  s && (s.preventDefault(), t = 1), c(!0), v(t);
52
52
  const m = { query: u, page: t };
53
- l && (m.orientation = l), n && (m.color = n), k(m, o).then((a) => {
53
+ l && (m.orientation = l), n && (m.color = n), I(m, o).then((a) => {
54
54
  var b, N, w;
55
55
  j(t === 1 ? ((b = a == null ? void 0 : a.response) == null ? void 0 : b.results) || [] : [...r, ...((N = a == null ? void 0 : a.response) == null ? void 0 : N.results) || []]), y((w = a == null ? void 0 : a.response) == null ? void 0 : w.total_pages), c(!1);
56
56
  }).catch(() => {
@@ -61,7 +61,7 @@ const k = async (x, g) => new Promise((o, r) => {
61
61
  if (!d(u) && o) {
62
62
  c(!0);
63
63
  const s = { query: u, page: 1 };
64
- l && (s.orientation = l), n && (s.color = n), v(1), k(s, o).then((t) => {
64
+ l && (s.orientation = l), n && (s.color = n), v(1), I(s, o).then((t) => {
65
65
  var m, a;
66
66
  j(((m = t == null ? void 0 : t.response) == null ? void 0 : m.results) || []), y((a = t == null ? void 0 : t.response) == null ? void 0 : a.total_pages), c(!1);
67
67
  }).catch(() => {
@@ -92,18 +92,18 @@ const k = async (x, g) => new Promise((o, r) => {
92
92
  onChange: (s) => T(s.target.value)
93
93
  }
94
94
  ),
95
- /* @__PURE__ */ e.jsxs(O, { children: [
96
- /* @__PURE__ */ e.jsx(U, { asChild: !0, className: "h-full w-10 cursor-pointer p-2.5 hover:bg-slate-200", children: /* @__PURE__ */ e.jsx(L, {}) }),
95
+ /* @__PURE__ */ e.jsxs(U, { children: [
96
+ /* @__PURE__ */ e.jsx(V, { asChild: !0, className: "h-full w-10 cursor-pointer p-2.5 hover:bg-slate-200", children: /* @__PURE__ */ e.jsx(F, {}) }),
97
97
  /* @__PURE__ */ e.jsx(
98
- V,
98
+ O,
99
99
  {
100
100
  side: x ? "bottom" : "right",
101
101
  className: "z-[9999] flex w-max items-center justify-center",
102
102
  children: /* @__PURE__ */ e.jsxs("div", { children: [
103
103
  /* @__PURE__ */ e.jsx("div", { className: "py-1 text-sm font-medium", children: "Orientation" }),
104
- /* @__PURE__ */ e.jsxs(P, { defaultValue: l, onValueChange: (s) => A(s), children: [
104
+ /* @__PURE__ */ e.jsxs(P, { defaultValue: l, onValueChange: (s) => k(s), children: [
105
105
  /* @__PURE__ */ e.jsx(C, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
106
- /* @__PURE__ */ e.jsxs(I, { className: "z-[9999]", children: [
106
+ /* @__PURE__ */ e.jsxs(A, { className: "z-[9999]", children: [
107
107
  /* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
108
108
  /* @__PURE__ */ e.jsx(h, { value: "landscape", children: "Landscape" }),
109
109
  /* @__PURE__ */ e.jsx(h, { value: "portrait", children: "Portrait" }),
@@ -113,7 +113,7 @@ const k = async (x, g) => new Promise((o, r) => {
113
113
  /* @__PURE__ */ e.jsx("div", { className: "pb-1 pt-2 text-sm font-medium", children: "Color" }),
114
114
  /* @__PURE__ */ e.jsxs(P, { defaultValue: n, onValueChange: (s) => q(s), children: [
115
115
  /* @__PURE__ */ e.jsx(C, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
116
- /* @__PURE__ */ e.jsxs(I, { className: "z-[9999]", children: [
116
+ /* @__PURE__ */ e.jsxs(A, { className: "z-[9999]", children: [
117
117
  /* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
118
118
  [
119
119
  "black_and_white",
@@ -173,7 +173,7 @@ const k = async (x, g) => new Promise((o, r) => {
173
173
  ) }) }, s.id)
174
174
  )),
175
175
  f && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-8", children: [
176
- /* @__PURE__ */ e.jsx($, { className: "animate-spin w-6 h-6" }),
176
+ /* @__PURE__ */ e.jsx(R, { className: "animate-spin w-6 h-6" }),
177
177
  "  Loading..."
178
178
  ] }),
179
179
  !d(r) && i < z && !f && /* @__PURE__ */ e.jsx(
@@ -194,5 +194,5 @@ const k = async (x, g) => new Promise((o, r) => {
194
194
  };
195
195
  export {
196
196
  De as default,
197
- k as fetchImage
197
+ I as fetchImage
198
198
  };
@@ -2,7 +2,7 @@ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import { useState as i, useEffect as k } from "react";
3
3
  import { isEmpty as j, map as b } from "lodash-es";
4
4
  import { atom as F, useAtom as U } from "jotai";
5
- import { h as y, ai as C } from "./index-b33n_-zO.js";
5
+ import { h as y, aJ as C } from "./index-C7mB4XFm.js";
6
6
  import { useTranslation as E } from "react-i18next";
7
7
  import { Upload as G, Loader as P } from "lucide-react";
8
8
  import "./_commonjsHelpers-UyOWmZb0.js";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),P=require("lodash-es"),t=require("./index-aeDphKpP.cjs"),g=require("./controls-rRZhz0vu.cjs"),R=require("./form-4jTocVbZ.cjs"),f=require("./index--k2M8kzI.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-5XyNUAjc.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("react-autosuggest");require("fuse.js");require("sonner");const b=({closeModal:i})=>{var q,l;const u=f.useAddPage(),[r,m]=x.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{},template:""}),p=()=>{u.mutate(r,{onSuccess:()=>i()})},j=({formData:n},s)=>{m(o=>{var d,c;const a={[s]:n[s]};return s==="name"?a.slug=P.kebabCase((d=n[s])==null?void 0:d.replace(/\d/g,"")):s==="slug"&&(a.slug=(c=n[s])==null?void 0:c.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...o,...a}})},h={name:g.g({title:"Page Name",default:r.name}),slug:g.g({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(t.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(R.Form,{formData:r,properties:h,onChange:j,disabled:u.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(t.Button,{type:"submit",disabled:!r.name||!r.slug||((q=r.name)==null?void 0:q.length)<2||((l=r.slug)==null?void 0:l.length)<2||u.isPending,onClick:p,children:"Add Page"})})]})},E=()=>{const[i,u]=x.useState(!1);return e.jsxRuntimeExports.jsxs(t.Dialog,{open:i,onOpenChange:()=>u(!i),children:[e.jsxRuntimeExports.jsx(t.DialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx(t.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>u(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(b,{closeModal:()=>u(!i)})]})};exports.default=E;
@@ -1,10 +1,10 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import { useState as c } from "react";
3
- import { kebabCase as j } from "lodash-es";
4
- import { b0 as b, B as u, a_ as C, a$ as A } from "./index-b33n_-zO.js";
3
+ import { kebabCase as P } from "lodash-es";
4
+ import { aj as C, B as u, ah as b, ai as A } from "./index-C7mB4XFm.js";
5
5
  import { g } from "./controls-yjgoZzB6.js";
6
- import { F as D } from "./form-5ke_lZv8.js";
7
- import { e as N } from "./index-fnkMn4Pk.js";
6
+ import { F as D } from "./form-NAzFjGs0.js";
7
+ import { e as N } from "./index-YZhtVcj_.js";
8
8
  import "./_commonjsHelpers-UyOWmZb0.js";
9
9
  import "@radix-ui/react-toggle";
10
10
  import "class-variance-authority";
@@ -42,21 +42,30 @@ import "tree-model";
42
42
  import "react-i18next";
43
43
  import "@rjsf/core";
44
44
  import "@rjsf/validator-ajv8";
45
- import "./index-wRAIA8zZ.js";
45
+ import "./index-lFgDm1oa.js";
46
46
  import "i18next";
47
47
  import "react-arborist";
48
48
  import "lucide-react";
49
49
  import "./index-VBXQixVm.js";
50
+ import "prop-types";
51
+ import "react-hotkeys-hook";
52
+ import "@floating-ui/dom";
50
53
  import "@floating-ui/react-dom";
51
54
  import "flagged";
52
- import "react-hotkeys-hook";
53
- import "sonner";
54
- import "./html-to-json-_01DXd-a.js";
55
+ import "@tailwindcss/typography";
56
+ import "@tailwindcss/forms";
57
+ import "@tailwindcss/aspect-ratio";
58
+ import "tailwindcss-palette-generator";
59
+ import "./html-to-json-l_mw5y-e.js";
55
60
  import "himalaya";
56
61
  import "lodash";
57
- const S = ({ closeModal: e }) => {
62
+ import "react-wrap-balancer";
63
+ import "react-autosuggest";
64
+ import "fuse.js";
65
+ import "sonner";
66
+ const S = ({ closeModal: i }) => {
58
67
  var a, s;
59
- const i = N(), [o, f] = c({
68
+ const r = N(), [o, f] = c({
60
69
  name: "",
61
70
  slug: "",
62
71
  blocks: [],
@@ -64,43 +73,43 @@ const S = ({ closeModal: e }) => {
64
73
  seoData: {},
65
74
  template: ""
66
75
  }), x = () => {
67
- i.mutate(o, { onSuccess: () => e() });
68
- }, h = ({ formData: m }, r) => {
76
+ r.mutate(o, { onSuccess: () => i() });
77
+ }, h = ({ formData: m }, e) => {
69
78
  f((l) => {
70
79
  var n, d;
71
- const p = { [r]: m[r] };
72
- return r === "name" ? p.slug = j((n = m[r]) == null ? void 0 : n.replace(/\d/g, "")) : r === "slug" && (p.slug = (d = m[r]) == null ? void 0 : d.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_")), {
80
+ const p = { [e]: m[e] };
81
+ return e === "name" ? p.slug = P((n = m[e]) == null ? void 0 : n.replace(/\d/g, "")) : e === "slug" && (p.slug = (d = m[e]) == null ? void 0 : d.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_")), {
73
82
  ...l,
74
83
  ...p
75
84
  };
76
85
  });
77
- }, P = {
86
+ }, j = {
78
87
  name: g({
79
88
  title: "Page Name",
80
89
  default: o.name
81
90
  }),
82
91
  slug: g({ title: "Page Slug", default: o.slug })
83
92
  };
84
- return /* @__PURE__ */ t.jsxs(b, { children: [
93
+ return /* @__PURE__ */ t.jsxs(C, { children: [
85
94
  /* @__PURE__ */ t.jsx("div", { className: "px-1 font-bold", children: "Add Page" }),
86
- /* @__PURE__ */ t.jsx(D, { formData: o, properties: P, onChange: h, disabled: i.isPending }),
95
+ /* @__PURE__ */ t.jsx(D, { formData: o, properties: j, onChange: h, disabled: r.isPending }),
87
96
  /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ t.jsx(
88
97
  u,
89
98
  {
90
99
  type: "submit",
91
- disabled: !o.name || !o.slug || ((a = o.name) == null ? void 0 : a.length) < 2 || ((s = o.slug) == null ? void 0 : s.length) < 2 || i.isPending,
100
+ disabled: !o.name || !o.slug || ((a = o.name) == null ? void 0 : a.length) < 2 || ((s = o.slug) == null ? void 0 : s.length) < 2 || r.isPending,
92
101
  onClick: x,
93
102
  children: "Add Page"
94
103
  }
95
104
  ) })
96
105
  ] });
97
- }, Mt = () => {
98
- const [e, i] = c(!1);
99
- return /* @__PURE__ */ t.jsxs(C, { open: e, onOpenChange: () => i(!e), children: [
100
- /* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => i(!e), children: "+ New Page" }) }),
101
- e && /* @__PURE__ */ t.jsx(S, { closeModal: () => i(!e) })
106
+ }, It = () => {
107
+ const [i, r] = c(!1);
108
+ return /* @__PURE__ */ t.jsxs(b, { open: i, onOpenChange: () => r(!i), children: [
109
+ /* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => r(!i), children: "+ New Page" }) }),
110
+ i && /* @__PURE__ */ t.jsx(S, { closeModal: () => r(!i) })
102
111
  ] });
103
112
  };
104
113
  export {
105
- Mt as default
114
+ It as default
106
115
  };
@@ -1,5 +1,5 @@
1
1
  import { j as i } from "./jsx-runtime-WbnYoNE9.js";
2
- import { A as a, b as n, d as c, e as x, g as d, B as j } from "./index-b33n_-zO.js";
2
+ import { A as a, b as n, d as c, e as x, g as d, B as j } from "./index-C7mB4XFm.js";
3
3
  import "./_commonjsHelpers-UyOWmZb0.js";
4
4
  import "react";
5
5
  import "@radix-ui/react-toggle";
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-audsIPBC.cjs");require("react");const e=require("./index-aeDphKpP.cjs"),r=require("react-i18next");require("i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("jotai");require("@react-hookz/web");require("react-arborist");require("./Functions-N3yhPYKY.cjs");require("lodash-es");require("clsx");require("tailwind-merge");require("@radix-ui/react-icons");require("lucide-react");require("./index--mLLy7QQ.cjs");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("tree-model");exports.AddBlocksPanel=s.AddBlocksPanel;exports.BlockSettings=s.BlockSettings;exports.Breakpoints=s.Breakpoints;exports.BuilderCanvas=s.BuilderCanvas;exports.ChaiBuilderEditor=s.ChaiBuilderEditor;exports.Outline=s.ListTree;exports.ThemeConfigPanel=s.ThemeConfigPanel;exports.UndoRedo=s.UndoRedo;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlocksStore=e.useBlocksStore;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCodeEditor=e.useCodeEditor;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>r.useTranslation});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-5XyNUAjc.cjs"),e=require("./index-aeDphKpP.cjs"),s=require("react-i18next");require("i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("jotai");require("@react-hookz/web");require("react-arborist");require("./Functions-N3yhPYKY.cjs");require("lodash-es");require("clsx");require("tailwind-merge");require("@radix-ui/react-icons");require("lucide-react");require("./index--mLLy7QQ.cjs");require("react-dom");require("prop-types");require("react-quill");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("./MODIFIERS-mVmfEGgo.cjs");require("lodash");require("@chaibuilder/runtime");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./utils-D_vtk3zK.cjs");require("./controls-rRZhz0vu.cjs");require("@radix-ui/react-scroll-area");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("tree-model");exports.AddBlocksPanel=r.AddBlocksPanel;exports.BlockSettings=r.Settings;exports.Breakpoints=r.Breakpoints;exports.BuilderCanvas=r.StaticCanvas;exports.ChaiBuilderEditor=r.ChaiBuilderEditor;exports.Outline=r.ListTree;exports.ThemeConfigPanel=r.ThemeConfigPanel;exports.UndoRedo=r.UndoRedo;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlocksStore=e.useBlocksStore;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCodeEditor=e.useCodeEditor;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>s.useTranslation});
package/dist/core.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { FC } from 'react';
2
1
  import { JSX as JSX_2 } from 'react/jsx-runtime';
3
- import { LazyExoticComponent } from 'react';
4
2
  import { default as React_2 } from 'react';
3
+ import * as React_3 from 'react';
5
4
  import { ReactNode } from 'react';
6
5
  import { RESET } from 'jotai/utils';
7
6
  import { ThrottledFunction } from '@react-hookz/web';
@@ -12,10 +11,10 @@ declare type AddBlocks = {
12
11
  addPredefinedBlock: any;
13
12
  };
14
13
 
15
- export declare const AddBlocksPanel: LazyExoticComponent<({ className, showHeading }: {
14
+ export declare const AddBlocksPanel: ({ className, showHeading }: {
16
15
  showHeading?: boolean;
17
16
  className?: string;
18
- }) => JSX_2.Element>;
17
+ }) => JSX_2.Element;
19
18
 
20
19
  declare type AskAiResponse = {
21
20
  blocks?: Array<{
@@ -30,7 +29,7 @@ declare interface Block {
30
29
  [key: string]: any;
31
30
  }
32
31
 
33
- export declare const BlockSettings: LazyExoticComponent<FC<{}>>;
32
+ export declare const BlockSettings: React_2.FC;
34
33
 
35
34
  declare type Breakpoint = {
36
35
  title: string;
@@ -42,7 +41,7 @@ declare type Breakpoint = {
42
41
 
43
42
  export declare const Breakpoints: () => JSX_2.Element;
44
43
 
45
- export declare const BuilderCanvas: LazyExoticComponent<() => JSX_2.Element>;
44
+ export declare const BuilderCanvas: () => React_2.JSX.Element;
46
45
 
47
46
  export declare type ChaiBlock = {
48
47
  _id: string;
@@ -197,10 +196,10 @@ declare type SavePageData = {
197
196
  themeConfiguration?: Record<string, any>;
198
197
  };
199
198
 
200
- export declare const ThemeConfigPanel: LazyExoticComponent<({ showHeading, className, }: {
199
+ export declare const ThemeConfigPanel: ({ showHeading, className, }: {
201
200
  className?: string;
202
201
  showHeading?: boolean;
203
- }) => JSX_2.Element>;
202
+ }) => React_3.JSX.Element;
204
203
 
205
204
  declare type TimeInSeconds = number;
206
205