@chaibuilder/sdk 1.2.11 → 1.2.13

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-k2p8Hy1n.cjs → AddBlocks-tomDo_Is.cjs} +1 -1
  2. package/dist/{AddBlocks-TSt8uJY4.js → AddBlocks-zN5--UP6.js} +11 -11
  3. package/dist/{BrandingOptions-WyVWfFVz.cjs → BrandingOptions-BUmE4f72.cjs} +1 -1
  4. package/dist/{BrandingOptions-uFTyYJZj.js → BrandingOptions-LbizrmRI.js} +2 -2
  5. package/dist/{CanvasArea-iRQqpOak.js → CanvasArea-OSH8wqt1.js} +22 -22
  6. package/dist/{CanvasArea-5erOZYLy.cjs → CanvasArea-nT6ZJh_V.cjs} +1 -1
  7. package/dist/{CurrentPage-RCxTz9Mc.js → CurrentPage-FzqNBLy4.js} +3 -3
  8. package/dist/{CurrentPage-NzmJloN7.cjs → CurrentPage-SWR9WU4k.cjs} +1 -1
  9. package/dist/{Layers-xDG7oltg.cjs → Layers-FRHRlPIH.cjs} +1 -1
  10. package/dist/{Layers-tXB5Pwid.js → Layers-g5_pwwgO.js} +57 -57
  11. package/dist/{PagesPanel-72nzYB1k.cjs → PagesPanel-3jcf5-iH.cjs} +1 -1
  12. package/dist/{PagesPanel-Jaz9jvye.js → PagesPanel-PSg6aqlK.js} +4 -4
  13. package/dist/{ProjectPanel-RU0QvH6e.cjs → ProjectPanel-EyEcNyh8.cjs} +1 -1
  14. package/dist/{ProjectPanel--S014Xx3.js → ProjectPanel-XW_Bx880.js} +4 -4
  15. package/dist/{Settings-gjvl5V1k.js → Settings--7qJ7ciF.js} +60 -60
  16. package/dist/{Settings-5EuwaVb3.cjs → Settings-h1c8ukpI.cjs} +1 -1
  17. package/dist/{SidePanels-Fq3kRwR0.js → SidePanels-Lmj0Qkd1.js} +8 -8
  18. package/dist/{SidePanels-uNCxnGte.cjs → SidePanels-NbM1mfsY.cjs} +1 -1
  19. package/dist/{Topbar-JqW89xI5.cjs → Topbar-2sOsQD2d.cjs} +1 -1
  20. package/dist/{Topbar-m5dbbI1f.js → Topbar-xvrno03z.js} +4 -4
  21. package/dist/{UnsplashImages-vACw5hbK.cjs → UnsplashImages-EiYSWkBa.cjs} +1 -1
  22. package/dist/{UnsplashImages-GhBD6owT.js → UnsplashImages-hhPOf7kt.js} +7 -7
  23. package/dist/{UploadImages-PzHdEKHT.cjs → UploadImages-GGCExfQd.cjs} +1 -1
  24. package/dist/{UploadImages-S1HgxeGb.js → UploadImages-JKjE44i7.js} +1 -1
  25. package/dist/{add-page-modal-GAizM2Jw.cjs → add-page-modal-65wltt_4.cjs} +1 -1
  26. package/dist/{add-page-modal-2P5hGXOQ.js → add-page-modal-Bl6y65im.js} +13 -13
  27. package/dist/{confirm-alert-57Xq5foA.js → confirm-alert-Nw1JCtuu.js} +1 -1
  28. package/dist/{confirm-alert-Uf84DpdR.cjs → confirm-alert-_DCO6hCV.cjs} +1 -1
  29. package/dist/core.cjs +1 -1
  30. package/dist/core.d.ts +8 -0
  31. package/dist/core.js +39 -37
  32. package/dist/{delete-page-modal-MG42FdnU.cjs → delete-page-modal-Q3Si4nyd.cjs} +1 -1
  33. package/dist/{delete-page-modal-ix5IjaFW.js → delete-page-modal-tiJ2UA5f.js} +3 -3
  34. package/dist/email-blocks.cjs +1 -1
  35. package/dist/email-blocks.js +27 -27
  36. package/dist/email.cjs +1 -1
  37. package/dist/email.js +4 -4
  38. package/dist/{empty-slot-TF2kd-0X.cjs → empty-slot-2LSrWJaY.cjs} +1 -1
  39. package/dist/{empty-slot-MWycClTb.js → empty-slot-5FRrRq1E.js} +33 -33
  40. package/dist/{form-SYcFyACJ.js → form-lbFCPUoE.js} +1 -1
  41. package/dist/{form-KBb3kA8g.cjs → form-vNgf0kO2.cjs} +1 -1
  42. package/dist/{index-aiHDvS5v.cjs → index-bfKqnRvZ.cjs} +1 -1
  43. package/dist/{index-cM3eKmlx.cjs → index-hS9T9Nub.cjs} +33 -33
  44. package/dist/{index-pNYv0oAF.js → index-m9VziIOy.js} +307 -295
  45. package/dist/{index-Fj3ead-J.js → index-wwk4px_E.js} +2069 -2059
  46. package/dist/{page-viewer-VxqOevr4.js → page-viewer-rLCyM4QC.js} +4 -4
  47. package/dist/{page-viewer-Sh99FGYk.cjs → page-viewer-w-ahza8q.cjs} +1 -1
  48. package/dist/{project-general-setting-VTLHa-Ik.cjs → project-general-setting-RTcIwUWc.cjs} +1 -1
  49. package/dist/{project-general-setting-nWOjPiin.js → project-general-setting-pY-Mkc8G.js} +4 -4
  50. package/dist/{project-seo-setting-70bWTwsB.js → project-seo-setting-9V67NFil.js} +3 -3
  51. package/dist/{project-seo-setting-ENAKc2Dl.cjs → project-seo-setting-aRDdqu88.cjs} +1 -1
  52. package/dist/{single-page-detail-3z7TF-Yy.js → single-page-detail-HYX4R3U0.js} +5 -5
  53. package/dist/{single-page-detail-6L38HJC4.cjs → single-page-detail-wHDpn40R.cjs} +1 -1
  54. package/dist/studio.cjs +1 -1
  55. package/dist/studio.js +3 -3
  56. package/dist/ui.cjs +1 -1
  57. package/dist/ui.js +25 -25
  58. package/dist/{useAddBlockByDrop-7mUMwNSG.cjs → useAddBlockByDrop-1WvPoBXa.cjs} +1 -1
  59. package/dist/{useAddBlockByDrop-tjQ5DgiO.js → useAddBlockByDrop-bs_SH7Tw.js} +1 -1
  60. package/dist/web-blocks.cjs +1 -1
  61. package/dist/web-blocks.js +129 -129
  62. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import { nth as k, startsWith as L, map as C, includes as T, isUndefined as P, find as V, isEmpty as F } from "lodash-es";
3
- import { BoxModelIcon as $, BoxIcon as D, DragHandleHorizontalIcon as z, ViewHorizontalIcon as K, BorderAllIcon as U, BorderTopIcon as q, TableIcon as Q, DropdownMenuIcon as W, RadiobuttonIcon as Y, InputIcon as G, ButtonIcon as B, CheckboxIcon as J, GroupIcon as X, SpaceBetweenVerticallyIcon as Z, ColumnsIcon as ee, RowsIcon as v, TextIcon as w, SketchLogoIcon as te, DividerHorizontalIcon as se, CodeIcon as oe, CursorTextIcon as ne, VideoIcon as re, Link1Icon as ae, HeadingIcon as ce, ImageIcon as ie, TriangleRightIcon as le, TrashIcon as xe, CopyIcon as de, DoubleArrowDownIcon as me, StackIcon as pe } from "@radix-ui/react-icons";
3
+ import { BoxModelIcon as z, BoxIcon as D, DragHandleHorizontalIcon as K, ViewHorizontalIcon as $, BorderAllIcon as Q, BorderTopIcon as U, TableIcon as q, DropdownMenuIcon as W, RadiobuttonIcon as Y, InputIcon as G, ButtonIcon as B, CheckboxIcon as X, GroupIcon as J, SpaceBetweenVerticallyIcon as Z, ColumnsIcon as ee, RowsIcon as v, TextIcon as w, SketchLogoIcon as te, DividerHorizontalIcon as se, CodeIcon as ne, CursorTextIcon as oe, VideoIcon as re, Link1Icon as ae, HeadingIcon as ce, ImageIcon as ie, TriangleRightIcon as le, TrashIcon as xe, CopyIcon as de, DoubleArrowDownIcon as me, StackIcon as pe } from "@radix-ui/react-icons";
4
4
  import { useDrop as ue, useDragLayer as ge } from "react-dnd";
5
5
  import { useDragOver as je, Tree as he } from "@minoru/react-dnd-treeview";
6
6
  import { useTranslation as be } from "react-i18next";
7
- import { W as fe, V as Ie, j as p, k as ye, $ as S, bo as N, aP as ke, l as Be, bp as ve, aO as we, bq as Ce, br as Te, bs as O, s as De, aJ as Se, ab as Ne, be as Oe, bt as Re } from "./index-pNYv0oAF.js";
7
+ import { X as fe, W as Ie, j as p, k as ye, a0 as S, bp as N, aQ as ke, l as Be, bq as ve, aP as we, br as Ce, bs as Te, bt as O, s as De, aK as Se, ac as Ne, bf as Oe, bu as Re } from "./index-m9VziIOy.js";
8
8
  import { DatabaseIcon as _e } from "lucide-react";
9
9
  import { useMemo as Ee, useCallback as Me } from "react";
10
10
  import { a as He } from "./MODIFIERS-RiXS5Mn1.js";
11
11
  import { c as I } from "./Functions-7jnEwJyw.js";
12
- import { f as Ae } from "./index-Fj3ead-J.js";
13
- import { u as Le } from "./useAddBlockByDrop-tjQ5DgiO.js";
12
+ import { f as Ae } from "./index-wwk4px_E.js";
13
+ import { u as Le } from "./useAddBlockByDrop-bs_SH7Tw.js";
14
14
  import "./_commonjsHelpers-UyOWmZb0.js";
15
15
  import "@chaibuilder/runtime";
16
16
  import "jotai";
@@ -51,7 +51,7 @@ import "sonner";
51
51
  import "./html-to-json-57841sEK.js";
52
52
  import "himalaya";
53
53
  import "./web-blocks.js";
54
- import "./empty-slot-MWycClTb.js";
54
+ import "./empty-slot-5FRrRq1E.js";
55
55
  const R = (t) => {
56
56
  switch (t.type) {
57
57
  case "Image":
@@ -65,11 +65,11 @@ const R = (t) => {
65
65
  case "Video":
66
66
  return /* @__PURE__ */ e.jsx(re, {});
67
67
  case "RichText":
68
- return /* @__PURE__ */ e.jsx(ne, {});
68
+ return /* @__PURE__ */ e.jsx(oe, {});
69
69
  case "Button":
70
70
  return /* @__PURE__ */ e.jsx(B, {});
71
71
  case "CustomHTML":
72
- return /* @__PURE__ */ e.jsx(oe, {});
72
+ return /* @__PURE__ */ e.jsx(ne, {});
73
73
  case "Divider":
74
74
  return /* @__PURE__ */ e.jsx(se, {});
75
75
  case "Icon":
@@ -85,9 +85,9 @@ const R = (t) => {
85
85
  case "LineBreak":
86
86
  return /* @__PURE__ */ e.jsx(Z, {});
87
87
  case "Form":
88
- return /* @__PURE__ */ e.jsx(X, {});
89
- case "Checkbox":
90
88
  return /* @__PURE__ */ e.jsx(J, {});
89
+ case "Checkbox":
90
+ return /* @__PURE__ */ e.jsx(X, {});
91
91
  case "FormButton":
92
92
  return /* @__PURE__ */ e.jsx(B, {});
93
93
  case "Input":
@@ -98,21 +98,21 @@ const R = (t) => {
98
98
  case "Select":
99
99
  return /* @__PURE__ */ e.jsx(W, {});
100
100
  case "Table":
101
- return /* @__PURE__ */ e.jsx(Q, {});
102
- case "TableHead":
103
101
  return /* @__PURE__ */ e.jsx(q, {});
104
- case "TableBody":
102
+ case "TableHead":
105
103
  return /* @__PURE__ */ e.jsx(U, {});
104
+ case "TableBody":
105
+ return /* @__PURE__ */ e.jsx(Q, {});
106
106
  case "TableRow":
107
- return /* @__PURE__ */ e.jsx(K, {});
107
+ return /* @__PURE__ */ e.jsx($, {});
108
108
  case "TableCell":
109
- return /* @__PURE__ */ e.jsx(z, {});
109
+ return /* @__PURE__ */ e.jsx(K, {});
110
110
  case "DataProvider":
111
111
  return /* @__PURE__ */ e.jsx(_e, { size: 16 });
112
112
  case "Box":
113
113
  return /* @__PURE__ */ e.jsx(D, {});
114
114
  default:
115
- return /* @__PURE__ */ e.jsx($, {});
115
+ return /* @__PURE__ */ e.jsx(z, {});
116
116
  }
117
117
  };
118
118
  function Pe(t = "") {
@@ -140,12 +140,12 @@ function Pe(t = "") {
140
140
  }
141
141
  const Ve = (t) => {
142
142
  let s = "";
143
- return Object.keys(t).forEach((o) => {
144
- L(t[o], He) && (s = t[o]);
143
+ return Object.keys(t).forEach((n) => {
144
+ L(t[n], He) && (s = t[n]);
145
145
  }), s;
146
146
  }, Fe = (t) => {
147
147
  var m;
148
- const [, s] = fe(), [o] = Ie(), { isSelected: r } = t, { id: a, data: c } = t.node, u = t.depth * 10, g = (i) => {
148
+ const [, s] = fe(), [n] = Ie(), { isSelected: r } = t, { id: a, data: c } = t.node, u = t.depth * 10, g = (i) => {
149
149
  i.stopPropagation(), t.onToggle(t.node.id);
150
150
  }, x = je(a, t.isOpen, t.onToggle), d = Ee(() => {
151
151
  const i = Ve(t.node.data);
@@ -162,7 +162,7 @@ const Ve = (t) => {
162
162
  r ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800"
163
163
  ),
164
164
  onClick: (i) => {
165
- i.stopPropagation(), !o.includes(a) && t.onSelect(a);
165
+ i.stopPropagation(), !n.includes(a) && t.onSelect(a);
166
166
  },
167
167
  onContextMenu: () => t.onSelect(a),
168
168
  style: { paddingInlineStart: u },
@@ -194,22 +194,22 @@ const Ve = (t) => {
194
194
  }
195
195
  )
196
196
  );
197
- }, $e = (t) => {
198
- var o;
197
+ }, ze = (t) => {
198
+ var n;
199
199
  const { item: s } = t.monitorProps;
200
200
  return /* @__PURE__ */ e.jsxs("div", { className: "flex w-max items-center bg-blue-200 bg-opacity-30 p-1 font-semibold text-blue-700", children: [
201
- /* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(R, { type: (o = s == null ? void 0 : s.data) == null ? void 0 : o._type }) }),
201
+ /* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(R, { type: (n = s == null ? void 0 : s.data) == null ? void 0 : n._type }) }),
202
202
  /* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: s.text })
203
203
  ] });
204
- }, ze = (t) => {
204
+ }, Ke = (t) => {
205
205
  const s = t.depth * 10 + 16;
206
206
  return /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-0 h-0.5 -translate-y-1/2 transform bg-green-500", style: { left: s } });
207
- }, Ke = () => {
208
- const [t] = p(), s = ye(), o = S();
207
+ }, $e = () => {
208
+ const [t] = p(), s = ye(), n = S();
209
209
  return /* @__PURE__ */ e.jsxs(
210
210
  N,
211
211
  {
212
- disabled: !ke(o == null ? void 0 : o._type),
212
+ disabled: !ke(n == null ? void 0 : n._type),
213
213
  className: "flex items-center gap-x-4 text-xs",
214
214
  onClick: () => s(t),
215
215
  children: [
@@ -218,15 +218,15 @@ const Ve = (t) => {
218
218
  ]
219
219
  }
220
220
  );
221
- }, Ue = () => {
222
- const [t] = p(), s = Be(), o = S(), r = Me(() => {
221
+ }, Qe = () => {
222
+ const [t] = p(), s = Be(), n = S(), r = Me(() => {
223
223
  s(t);
224
224
  }, [t, s]);
225
225
  return /* @__PURE__ */ e.jsxs(ve, { className: "text-xs", children: [
226
226
  /* @__PURE__ */ e.jsxs(
227
227
  N,
228
228
  {
229
- disabled: !we(o == null ? void 0 : o._type),
229
+ disabled: !we(n == null ? void 0 : n._type),
230
230
  className: "flex items-center gap-x-4 text-xs",
231
231
  onClick: r,
232
232
  children: [
@@ -235,28 +235,28 @@ const Ve = (t) => {
235
235
  ]
236
236
  }
237
237
  ),
238
- /* @__PURE__ */ e.jsx(Ke, {})
238
+ /* @__PURE__ */ e.jsx($e, {})
239
239
  ] });
240
- }, qe = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(Ce, { children: [
240
+ }, Ue = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(Ce, { children: [
241
241
  /* @__PURE__ */ e.jsx(Te, { children: t }),
242
- /* @__PURE__ */ e.jsx(Ue, {})
242
+ /* @__PURE__ */ e.jsx(Qe, {})
243
243
  ] }) });
244
- function Qe(t) {
244
+ function qe(t) {
245
245
  return C(t, (s) => {
246
- const { data: o } = s;
246
+ const { data: n } = s;
247
247
  return {
248
- ...o,
248
+ ...n,
249
249
  _parent: s.parent === 0 ? null : s.parent
250
250
  };
251
251
  });
252
252
  }
253
253
  function We() {
254
- const [t] = O(), [s, o] = p();
254
+ const [t] = O(), [s, n] = p();
255
255
  return t ? /* @__PURE__ */ e.jsxs(
256
256
  "div",
257
257
  {
258
258
  onClick: (r) => {
259
- r.stopPropagation(), o(["container"]);
259
+ r.stopPropagation(), n(["container"]);
260
260
  },
261
261
  className: I(
262
262
  "flex items-center pl-2 text-xs",
@@ -271,38 +271,38 @@ function We() {
271
271
  ) : null;
272
272
  }
273
273
  const Yt = () => {
274
- const [t] = De(), { setNewBlocks: s } = Se(), [o, r, a] = p(), [, c] = Ne(), { t: u } = be(), g = Ae(), x = Le(), [d] = O(), m = async (n, l) => {
274
+ const [t] = De(), { setNewBlocks: s } = Se(), [n, r, a] = p(), [, c] = Ne(), { t: u } = be(), g = Ae(), x = Le(), [d] = O(), m = async (o, l) => {
275
275
  const { dragSource: h, relativeIndex: b, dropTargetId: f, monitor: y } = l;
276
276
  if (h) {
277
- const H = Qe(n);
277
+ const H = qe(o);
278
278
  s(H);
279
279
  const A = y.getItem();
280
280
  r([A.id]);
281
281
  } else
282
282
  await x({ block: y.getItem(), dropTargetId: f, relativeIndex: b });
283
- }, i = C(t, (n) => ({
284
- id: n._id,
285
- text: n._type,
286
- parent: n._parent || 0,
287
- droppable: !P(V(t, { _parent: n._id })),
288
- data: n
283
+ }, i = C(t, (o) => ({
284
+ id: o._id,
285
+ text: o._type,
286
+ parent: o._parent || 0,
287
+ droppable: !P(V(t, { _parent: o._id })),
288
+ data: o
289
289
  })), _ = () => {
290
290
  r([]), c([]);
291
291
  }, [{ isOver: j }, E] = ue(() => ({
292
292
  accept: ["CHAI_BLOCK"],
293
- collect: (n) => ({
294
- canDrop: n.canDrop(),
295
- isOver: n.isOver()
293
+ collect: (o) => ({
294
+ canDrop: o.canDrop(),
295
+ isOver: o.isOver()
296
296
  }),
297
- drop: (n) => {
297
+ drop: (o) => {
298
298
  (async () => await x({
299
- block: n,
299
+ block: o,
300
300
  dropTargetId: "",
301
301
  relativeIndex: 0
302
302
  }))();
303
303
  }
304
- })), { isDragging: M } = ge((n) => ({
305
- isDragging: n.isDragging()
304
+ })), { isDragging: M } = ge((o) => ({
305
+ isDragging: o.isDragging()
306
306
  }));
307
307
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
308
308
  "div",
@@ -331,21 +331,21 @@ const Yt = () => {
331
331
  extraAcceptTypes: ["CHAI_BLOCK"],
332
332
  tree: i,
333
333
  rootId: 0,
334
- render: (n, { depth: l, isOpen: h, onToggle: b }) => /* @__PURE__ */ e.jsx(qe, { id: n.id, children: /* @__PURE__ */ e.jsx(
334
+ render: (o, { depth: l, isOpen: h, onToggle: b }) => /* @__PURE__ */ e.jsx(Ue, { id: o.id, children: /* @__PURE__ */ e.jsx(
335
335
  Fe,
336
336
  {
337
337
  onSelect: (f) => {
338
338
  c([]), r([f]);
339
339
  },
340
- isSelected: T(o, n.id),
341
- node: n,
340
+ isSelected: T(n, o.id),
341
+ node: o,
342
342
  depth: l,
343
343
  isOpen: h,
344
344
  onToggle: b,
345
345
  toggleIds: a
346
346
  }
347
347
  ) }),
348
- dragPreviewRender: (n) => /* @__PURE__ */ e.jsx($e, { monitorProps: n }),
348
+ dragPreviewRender: (o) => /* @__PURE__ */ e.jsx(ze, { monitorProps: o }),
349
349
  onDrop: m,
350
350
  classes: {
351
351
  root: "h-[90%] " + (d ? "pl-2" : "pt-2"),
@@ -358,7 +358,7 @@ const Yt = () => {
358
358
  canDrop: Re,
359
359
  dropTargetOffset: 2,
360
360
  enableAnimateExpand: !0,
361
- placeholderRender: (n, { depth: l }) => /* @__PURE__ */ e.jsx(ze, { node: n, depth: l })
361
+ placeholderRender: (o, { depth: l }) => /* @__PURE__ */ e.jsx(Ke, { node: o, depth: l })
362
362
  }
363
363
  )
364
364
  ] })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),i=require("lodash-es"),s=require("./index-cM3eKmlx.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("react-i18next");require("./index-aiHDvS5v.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./empty-slot-TF2kd-0X.cjs");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-GAizM2Jw.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-Sh99FGYk.cjs"))),d=()=>{const{data:t=[],isLoading:q}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(t,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:q,pages:n})})]})};exports.default=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),i=require("lodash-es"),s=require("./index-hS9T9Nub.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("react-i18next");require("./index-bfKqnRvZ.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./empty-slot-2LSrWJaY.cjs");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-65wltt_4.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-w-ahza8q.cjs"))),d=()=>{const{data:t=[],isLoading:q}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(t,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:q,pages:n})})]})};exports.default=d;
@@ -1,11 +1,11 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import i, { Suspense as s } from "react";
3
3
  import { sortBy as a, filter as d, get as n } from "lodash-es";
4
- import { a as l, b as c } from "./index-Fj3ead-J.js";
4
+ import { a as l, b as c } from "./index-wwk4px_E.js";
5
5
  import "./_commonjsHelpers-UyOWmZb0.js";
6
6
  import "i18next";
7
7
  import "react-i18next";
8
- import "./index-pNYv0oAF.js";
8
+ import "./index-m9VziIOy.js";
9
9
  import "./Functions-7jnEwJyw.js";
10
10
  import "clsx";
11
11
  import "tailwind-merge";
@@ -50,8 +50,8 @@ import "./html-to-json-57841sEK.js";
50
50
  import "himalaya";
51
51
  import "lucide-react";
52
52
  import "./web-blocks.js";
53
- import "./empty-slot-MWycClTb.js";
54
- const x = i.lazy(() => import("./add-page-modal-2P5hGXOQ.js")), g = i.lazy(() => import("./page-viewer-VxqOevr4.js")), gt = () => {
53
+ import "./empty-slot-5FRrRq1E.js";
54
+ const x = i.lazy(() => import("./add-page-modal-Bl6y65im.js")), g = i.lazy(() => import("./page-viewer-rLCyM4QC.js")), gt = () => {
55
55
  const { data: o = [], isLoading: m } = l(), { data: r } = c(), p = a(d(o, { type: "STATIC" }), (e) => n(e, "uuid") === (r == null ? void 0 : r.homepage) ? 0 : 1);
56
56
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
57
57
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("react"),x=require("lodash-es"),s=require("./index-aiHDvS5v.cjs"),a=require("./index-cM3eKmlx.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./empty-slot-TF2kd-0X.cjs");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-VTLHa-Ik.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-ENAKc2Dl.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function q(){const t=a.useUpdateProject(),{data:n}=a.useProject(),[i,o]=r.useState(l(n||{})),u=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||t.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("react"),x=require("lodash-es"),s=require("./index-bfKqnRvZ.cjs"),a=require("./index-hS9T9Nub.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./empty-slot-2LSrWJaY.cjs");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-RTcIwUWc.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-aRDdqu88.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function q(){const t=a.useUpdateProject(),{data:n}=a.useProject(),[i,o]=r.useState(l(n||{})),u=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||t.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=q;
@@ -1,8 +1,8 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import m, { useRef as x, useEffect as a, Suspense as p } from "react";
3
3
  import { isEqual as b, isEmpty as j } from "lodash-es";
4
- import { b7 as f, b8 as n, b9 as l, ba as c } from "./index-pNYv0oAF.js";
5
- import { c as h, b as g } from "./index-Fj3ead-J.js";
4
+ import { b8 as f, b9 as n, ba as l, bb as c } from "./index-m9VziIOy.js";
5
+ import { c as h, b as g } from "./index-wwk4px_E.js";
6
6
  import "./_commonjsHelpers-UyOWmZb0.js";
7
7
  import "./Functions-7jnEwJyw.js";
8
8
  import "clsx";
@@ -50,8 +50,8 @@ import "./html-to-json-57841sEK.js";
50
50
  import "himalaya";
51
51
  import "lucide-react";
52
52
  import "./web-blocks.js";
53
- import "./empty-slot-MWycClTb.js";
54
- const N = m.lazy(() => import("./project-general-setting-nWOjPiin.js")), S = m.lazy(() => import("./project-seo-setting-70bWTwsB.js")), d = /* @__PURE__ */ t.jsx("div", { className: "px-3", children: /* @__PURE__ */ t.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (r) => r && j(r.seoData) ? {
53
+ import "./empty-slot-5FRrRq1E.js";
54
+ const N = m.lazy(() => import("./project-general-setting-pY-Mkc8G.js")), S = m.lazy(() => import("./project-seo-setting-9V67NFil.js")), d = /* @__PURE__ */ t.jsx("div", { className: "px-3", children: /* @__PURE__ */ t.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (r) => r && j(r.seoData) ? {
55
55
  ...r,
56
56
  seoData: { title: "", description: "", image: "" }
57
57
  } : r;