@chaibuilder/sdk 1.2.22 → 1.2.24

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 (107) hide show
  1. package/dist/AddBlocks-l1JENNvq.js +206 -0
  2. package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
  3. package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
  4. package/dist/{BrandingOptions-4961TxX2.js → BrandingOptions-udtH5yJs.js} +11 -10
  5. package/dist/CanvasArea-IqeMbtOf.js +951 -0
  6. package/dist/CanvasArea-plZTWifU.cjs +55 -0
  7. package/dist/{Class-MmCxz2Ay.cjs → Class-PoYusiA5.cjs} +1 -1
  8. package/dist/{Class-3k8xjeiM.js → Class-lGzsNBOK.js} +1 -1
  9. package/dist/CurrentPage-7_s9LtEJ.cjs +1 -0
  10. package/dist/{CurrentPage-oPZN6Gwj.js → CurrentPage-AA0XHYMU.js} +23 -24
  11. package/dist/ListTree-LAN7QmHQ.cjs +1 -0
  12. package/dist/ListTree-ZNEtds1d.js +309 -0
  13. package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
  14. package/dist/{MODIFIERS-WQdaNvb8.js → MODIFIERS-dytZ-osO.js} +4 -8
  15. package/dist/PagesPanel-5qMZBatP.cjs +1 -0
  16. package/dist/{PagesPanel-pRKHw-AZ.js → PagesPanel-883P3_su.js} +9 -10
  17. package/dist/{ProjectPanel-iU6DY-Yp.js → ProjectPanel-Y8Qcmsn0.js} +11 -12
  18. package/dist/ProjectPanel-otQb9ceP.cjs +1 -0
  19. package/dist/STRINGS--j49GZJP.js +7 -0
  20. package/dist/STRINGS-gPz7CUOk.cjs +1 -0
  21. package/dist/Settings-Rt342VJ3.cjs +1 -0
  22. package/dist/{Settings-BhSrj-cE.js → Settings-pIePR1Id.js} +862 -865
  23. package/dist/{SidePanels-OLOUpKn4.js → SidePanels-NznSn5RN.js} +121 -125
  24. package/dist/SidePanels-PaQkgjLa.cjs +1 -0
  25. package/dist/Topbar-CqW7G360.cjs +1 -0
  26. package/dist/{Topbar-Ny9T-7Zb.js → Topbar-pWzBEOed.js} +39 -35
  27. package/dist/UnsplashImages-NGskB93R.cjs +1 -0
  28. package/dist/{UnsplashImages-Y8RGFVSh.js → UnsplashImages-qvwFbV-E.js} +17 -16
  29. package/dist/{UploadImages-dd8LfyFr.js → UploadImages-9NapgXBq.js} +12 -11
  30. package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
  31. package/dist/{add-page-modal-Jni6CY1x.js → add-page-modal-4PiRJgX5.js} +11 -12
  32. package/dist/add-page-modal-4o2L_7T7.cjs +1 -0
  33. package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
  34. package/dist/{confirm-alert-sc8RaWvD.js → confirm-alert-GUhZ_G8w.js} +7 -6
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +5 -3
  37. package/dist/core.js +48 -49
  38. package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
  39. package/dist/{defaultTheme-gunU_Fe5.js → defaultTheme-D8B4-wHO.js} +1 -1
  40. package/dist/{delete-page-modal-0WiMZFxr.js → delete-page-modal-4l5-RhQB.js} +10 -11
  41. package/dist/delete-page-modal-Bek5bCf-.cjs +1 -0
  42. package/dist/email.cjs +1 -1
  43. package/dist/email.d.ts +3 -1
  44. package/dist/email.js +16 -16
  45. package/dist/{form-Nj6Kdn3g.js → form-STUz-6nE.js} +1 -1
  46. package/dist/{form-n1Q6u16z.cjs → form-lBQ_76Uw.cjs} +1 -1
  47. package/dist/html-to-json-efmv1pCj.cjs +1 -0
  48. package/dist/{html-to-json-C5sExaSD.js → html-to-json-ngX9ef2u.js} +31 -29
  49. package/dist/{index-IPJAbzzO.js → index-Gk6sASBd.js} +1242 -1213
  50. package/dist/{index-0bwkNnA0.cjs → index-dgm-fd8U.cjs} +42 -42
  51. package/dist/{index-UP_4awU9.js → index-gS-3liKK.js} +4479 -4484
  52. package/dist/index-h-hd6EvN.cjs +1 -0
  53. package/dist/index-oCYKBYyT.cjs +1 -0
  54. package/dist/{index-_VPpjzJu.js → index-xZWaF8AW.js} +118 -119
  55. package/dist/lib.cjs +3 -3
  56. package/dist/lib.js +17 -16
  57. package/dist/page-viewer-JlKEwACu.cjs +1 -0
  58. package/dist/{page-viewer-L1Dmgj-c.js → page-viewer-rCXavxpd.js} +15 -16
  59. package/dist/project-general-setting-2FGoUZ-z.cjs +1 -0
  60. package/dist/{project-general-setting-sUP7JqWK.js → project-general-setting-rmAVpDu9.js} +11 -12
  61. package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
  62. package/dist/{project-seo-setting-NNvAGt4T.js → project-seo-setting-pX34Qsym.js} +8 -7
  63. package/dist/render.cjs +1 -1
  64. package/dist/render.js +14 -13
  65. package/dist/single-page-detail-c6-wRWyN.cjs +1 -0
  66. package/dist/{single-page-detail-FXg_NebW.js → single-page-detail-rSQomrY5.js} +12 -13
  67. package/dist/studio.cjs +1 -1
  68. package/dist/studio.d.ts +3 -1
  69. package/dist/studio.js +8 -9
  70. package/dist/ui.cjs +1 -1
  71. package/dist/ui.js +139 -138
  72. package/dist/web-blocks.cjs +6 -1
  73. package/dist/web-blocks.js +462 -354
  74. package/package.json +3 -5
  75. package/dist/AddBlocks-157fSrJX.cjs +0 -1
  76. package/dist/AddBlocks-WgpssWmQ.js +0 -223
  77. package/dist/BrandingOptions-nwXR9TMl.cjs +0 -1
  78. package/dist/CanvasArea-MajWGr9z.js +0 -908
  79. package/dist/CanvasArea-MmTlc5Vb.cjs +0 -55
  80. package/dist/CurrentPage-LpLr0lDI.cjs +0 -1
  81. package/dist/ListTree-dvxHTXs4.js +0 -167
  82. package/dist/ListTree-gTmusfso.cjs +0 -1
  83. package/dist/MODIFIERS-9EwxLM8V.cjs +0 -1
  84. package/dist/Outline-2OxsXs1-.js +0 -294
  85. package/dist/Outline-7CCnnzmK.cjs +0 -1
  86. package/dist/PagesPanel-8536oBWB.cjs +0 -1
  87. package/dist/ProjectPanel-oILsUWOH.cjs +0 -1
  88. package/dist/Settings-jHiYmt0y.cjs +0 -1
  89. package/dist/SidePanels-bcJJocSq.cjs +0 -1
  90. package/dist/Topbar-NMvzqQHW.cjs +0 -1
  91. package/dist/TypeIcon-ElNNPazl.cjs +0 -1
  92. package/dist/TypeIcon-qO96rNbV.js +0 -69
  93. package/dist/UnsplashImages-6tZv1q2_.cjs +0 -1
  94. package/dist/UploadImages-VLlVg9Ur.cjs +0 -1
  95. package/dist/add-page-modal-IsqDdK7X.cjs +0 -1
  96. package/dist/confirm-alert-f26zJ7Js.cjs +0 -1
  97. package/dist/defaultTheme-7Lk2zq60.cjs +0 -1
  98. package/dist/delete-page-modal-c3b-GCap.cjs +0 -1
  99. package/dist/html-to-json-FGufPv9R.cjs +0 -1
  100. package/dist/index-9PHdn80L.cjs +0 -1
  101. package/dist/index-nwAgi0aD.cjs +0 -1
  102. package/dist/page-viewer-TnxHhq7S.cjs +0 -1
  103. package/dist/project-general-setting-1Ot1RU43.cjs +0 -1
  104. package/dist/project-seo-setting-3-vBkx2v.cjs +0 -1
  105. package/dist/single-page-detail-btEKYXjE.cjs +0 -1
  106. package/dist/useAddBlockByDrop-V8xo-PNQ.js +0 -20
  107. package/dist/useAddBlockByDrop-qRHgy8_0.cjs +0 -1
@@ -0,0 +1,309 @@
1
+ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
+ import S, { memo as f, useMemo as v, useCallback as R, useEffect as H } from "react";
3
+ import { useAtom as P } from "jotai";
4
+ import { useDebouncedCallback as T } from "@react-hookz/web";
5
+ import { Tree as A } from "react-arborist";
6
+ import { E as w, r as b, s as z, a1 as D, bs as _, aS as L, t as E, bt as F, aR as V, bu as O, bv as $, h as U, Y as q, bw as y, ap as G, aq as K, ar as W, bx as Y, a5 as J, ac as Q, aM as X } from "./index-Gk6sASBd.js";
7
+ import { c as N } from "./Functions-7jnEwJyw.js";
8
+ import { BoxModelIcon as Z, BoxIcon as ee, DragHandleHorizontalIcon as te, ViewHorizontalIcon as se, BorderAllIcon as re, BorderTopIcon as oe, TableIcon as ne, DropdownMenuIcon as ce, RadiobuttonIcon as ae, InputIcon as ie, ButtonIcon as I, CheckboxIcon as le, GroupIcon as ue, SpaceBetweenVerticallyIcon as de, ColumnsIcon as xe, RowsIcon as k, TextIcon as C, SketchLogoIcon as pe, DividerHorizontalIcon as me, CodeIcon as he, CursorTextIcon as ge, VideoIcon as je, Link1Icon as fe, HeadingIcon as be, ImageIcon as ye, TrashIcon as ve, CopyIcon as Ie, TriangleRightIcon as ke } from "@radix-ui/react-icons";
9
+ import { DatabaseIcon as Ce } from "lucide-react";
10
+ import { find as B, first as Be } from "lodash-es";
11
+ import "./_commonjsHelpers-UyOWmZb0.js";
12
+ import "@chaibuilder/runtime";
13
+ import "./STRINGS--j49GZJP.js";
14
+ import "./MODIFIERS-dytZ-osO.js";
15
+ import "./Class-lGzsNBOK.js";
16
+ import "clsx";
17
+ import "tailwind-merge";
18
+ import "react-i18next";
19
+ import "@radix-ui/react-toggle";
20
+ import "class-variance-authority";
21
+ import "@radix-ui/react-switch";
22
+ import "@radix-ui/react-slot";
23
+ import "@radix-ui/react-accordion";
24
+ import "@radix-ui/react-alert-dialog";
25
+ import "@radix-ui/react-dialog";
26
+ import "@radix-ui/react-label";
27
+ import "@radix-ui/react-scroll-area";
28
+ import "@radix-ui/react-tabs";
29
+ import "@radix-ui/react-tooltip";
30
+ import "@radix-ui/react-popover";
31
+ import "@radix-ui/react-menubar";
32
+ import "@radix-ui/react-hover-card";
33
+ import "@radix-ui/react-select";
34
+ import "@radix-ui/react-dropdown-menu";
35
+ import "@radix-ui/react-separator";
36
+ import "@radix-ui/react-toast";
37
+ import "cmdk";
38
+ import "@radix-ui/react-context-menu";
39
+ import "react-icons-picker";
40
+ import "react-dom";
41
+ import "react-quill";
42
+ const M = (t) => {
43
+ switch (t.type) {
44
+ case "Image":
45
+ return /* @__PURE__ */ e.jsx(ye, {});
46
+ case "Heading":
47
+ return /* @__PURE__ */ e.jsx(be, {});
48
+ case "Text":
49
+ return /* @__PURE__ */ e.jsx(C, {});
50
+ case "Link":
51
+ return /* @__PURE__ */ e.jsx(fe, {});
52
+ case "Video":
53
+ return /* @__PURE__ */ e.jsx(je, {});
54
+ case "RichText":
55
+ return /* @__PURE__ */ e.jsx(ge, {});
56
+ case "Button":
57
+ return /* @__PURE__ */ e.jsx(I, {});
58
+ case "CustomHTML":
59
+ return /* @__PURE__ */ e.jsx(he, {});
60
+ case "Divider":
61
+ return /* @__PURE__ */ e.jsx(me, {});
62
+ case "Icon":
63
+ return /* @__PURE__ */ e.jsx(pe, {});
64
+ case "List":
65
+ return /* @__PURE__ */ e.jsx(k, {});
66
+ case "Paragraph":
67
+ return /* @__PURE__ */ e.jsx(C, {});
68
+ case "Row":
69
+ return /* @__PURE__ */ e.jsx(k, {});
70
+ case "ListItem":
71
+ return /* @__PURE__ */ e.jsx(xe, {});
72
+ case "LineBreak":
73
+ return /* @__PURE__ */ e.jsx(de, {});
74
+ case "Form":
75
+ return /* @__PURE__ */ e.jsx(ue, {});
76
+ case "Checkbox":
77
+ return /* @__PURE__ */ e.jsx(le, {});
78
+ case "FormButton":
79
+ return /* @__PURE__ */ e.jsx(I, {});
80
+ case "Input":
81
+ case "TextArea":
82
+ return /* @__PURE__ */ e.jsx(ie, {});
83
+ case "Radio":
84
+ return /* @__PURE__ */ e.jsx(ae, {});
85
+ case "Select":
86
+ return /* @__PURE__ */ e.jsx(ce, {});
87
+ case "Table":
88
+ return /* @__PURE__ */ e.jsx(ne, {});
89
+ case "TableHead":
90
+ return /* @__PURE__ */ e.jsx(oe, {});
91
+ case "TableBody":
92
+ return /* @__PURE__ */ e.jsx(re, {});
93
+ case "TableRow":
94
+ return /* @__PURE__ */ e.jsx(se, {});
95
+ case "TableCell":
96
+ return /* @__PURE__ */ e.jsx(te, {});
97
+ case "DataProvider":
98
+ return /* @__PURE__ */ e.jsx(Ce, { size: 16 });
99
+ case "Box":
100
+ return /* @__PURE__ */ e.jsx(ee, {});
101
+ default:
102
+ return /* @__PURE__ */ e.jsx(Z, {});
103
+ }
104
+ }, Te = {
105
+ display: "flex",
106
+ alignItems: "center",
107
+ zIndex: 1
108
+ }, we = S.memo(function({ top: r, left: s }) {
109
+ const l = {
110
+ position: "absolute",
111
+ pointerEvents: "none",
112
+ top: r + "px",
113
+ left: s + "px",
114
+ right: 0
115
+ };
116
+ return /* @__PURE__ */ e.jsx("div", { style: { ...Te, ...l }, children: /* @__PURE__ */ e.jsx("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
117
+ }), De = f(function({ children: r, isDragging: s }) {
118
+ return s ? /* @__PURE__ */ e.jsx("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: r }) : null;
119
+ }), _e = f(({ id: t, isDragging: r, mouse: s }) => {
120
+ const [l] = w(), o = v(() => l.find((d) => d._id === t), [l, t]), x = v(
121
+ () => ({
122
+ transform: `translate(${(s == null ? void 0 : s.x) - 10}px, ${(s == null ? void 0 : s.y) - 10}px)`
123
+ }),
124
+ [s]
125
+ );
126
+ return s ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(De, { isDragging: r, children: /* @__PURE__ */ e.jsx(
127
+ "div",
128
+ {
129
+ className: "pointer-events-none absolute z-50 rounded border border-gray-200 bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
130
+ style: x,
131
+ children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${o == null ? void 0 : o._type}`, children: [
132
+ /* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(M, { type: o == null ? void 0 : o._type }) }),
133
+ /* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (o == null ? void 0 : o._name) || (o == null ? void 0 : o._type) })
134
+ ] })
135
+ }
136
+ ) }) }) : /* @__PURE__ */ e.jsx("div", { className: "hidden" });
137
+ }), Ne = () => {
138
+ const [t] = b(), r = z(), s = D();
139
+ return /* @__PURE__ */ e.jsxs(
140
+ _,
141
+ {
142
+ disabled: !L(s == null ? void 0 : s._type),
143
+ className: "flex items-center gap-x-4 text-xs",
144
+ onClick: () => r(t),
145
+ children: [
146
+ /* @__PURE__ */ e.jsx(ve, {}),
147
+ " Remove"
148
+ ]
149
+ }
150
+ );
151
+ }, Me = () => {
152
+ const [t] = b(), r = E(), s = D(), l = R(() => {
153
+ r(t);
154
+ }, [t, r]);
155
+ return /* @__PURE__ */ e.jsxs(F, { className: "text-xs", children: [
156
+ /* @__PURE__ */ e.jsxs(
157
+ _,
158
+ {
159
+ disabled: !V(s == null ? void 0 : s._type),
160
+ className: "flex items-center gap-x-4 text-xs",
161
+ onClick: l,
162
+ children: [
163
+ /* @__PURE__ */ e.jsx(Ie, {}),
164
+ " Duplicate"
165
+ ]
166
+ }
167
+ ),
168
+ /* @__PURE__ */ e.jsx(Ne, {})
169
+ ] });
170
+ }, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(O, { children: [
171
+ /* @__PURE__ */ e.jsx($, { children: t }),
172
+ /* @__PURE__ */ e.jsx(Me, {})
173
+ ] }) }), Re = f(({ node: t, style: r, dragHandle: s }) => {
174
+ const l = U("outlineMenuItems", []), [, o] = q(), x = t.children.length > 0, { id: d, data: a, isSelected: m, willReceiveDrop: p, isDragging: h, isEditing: g, handleClick: j } = t, n = T((c) => o(c), [], 300), i = (c) => {
175
+ c.stopPropagation(), t.toggle();
176
+ }, u = (c) => {
177
+ c.stopPropagation(), t.toggle(), j(c);
178
+ };
179
+ return H(() => {
180
+ const c = setTimeout(() => {
181
+ p && !t.isOpen && t.toggle();
182
+ }, 500);
183
+ return () => clearTimeout(c);
184
+ }, [p, t]), /* @__PURE__ */ e.jsx(Se, { id: d, children: /* @__PURE__ */ e.jsxs(
185
+ "div",
186
+ {
187
+ onClick: u,
188
+ onMouseEnter: () => n(d),
189
+ style: r,
190
+ "data-node-id": d,
191
+ ref: s,
192
+ className: N(
193
+ "group flex !h-fit w-full items-center justify-between space-x-px py-px outline-none",
194
+ m ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800",
195
+ p && y(a._type, "Icon") ? "bg-green-200" : "",
196
+ h && "opacity-20"
197
+ ),
198
+ children: [
199
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
200
+ /* @__PURE__ */ e.jsx(
201
+ "div",
202
+ {
203
+ className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${t.isOpen ? "rotate-90" : ""}`,
204
+ children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(ke, {}) })
205
+ }
206
+ ),
207
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
208
+ /* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(M, { type: a == null ? void 0 : a._type }) }),
209
+ g ? /* @__PURE__ */ e.jsx(He, { node: t }) : /* @__PURE__ */ e.jsx(
210
+ "div",
211
+ {
212
+ className: "ml-2 truncate text-[11px]",
213
+ onDoubleClick: (c) => {
214
+ c.stopPropagation(), t.edit(), t.deselect();
215
+ },
216
+ children: (a == null ? void 0 : a._name) || (a == null ? void 0 : a._type.split("/").pop())
217
+ }
218
+ )
219
+ ] })
220
+ ] }),
221
+ /* @__PURE__ */ e.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: l.map((c) => /* @__PURE__ */ e.jsxs(G, { children: [
222
+ /* @__PURE__ */ e.jsx(
223
+ K,
224
+ {
225
+ className: "cursor-pointer rounded bg-transparent hover:bg-white hover:text-blue-500",
226
+ asChild: !0,
227
+ children: c.item(d)
228
+ }
229
+ ),
230
+ /* @__PURE__ */ e.jsx(W, { className: "z-[9999]", children: c.tooltip })
231
+ ] })) })
232
+ ]
233
+ }
234
+ ) });
235
+ }), He = ({ node: t }) => /* @__PURE__ */ e.jsx(
236
+ "input",
237
+ {
238
+ autoFocus: !0,
239
+ className: "ml-2 w-full rounded-sm border border-black/30 bg-transparent px-1 text-[11px] outline-none",
240
+ type: "text",
241
+ defaultValue: t.data.name,
242
+ onFocus: (r) => r.currentTarget.select(),
243
+ onBlur: (r) => t.submit(r.currentTarget.value),
244
+ onKeyDown: (r) => {
245
+ r.key === "Enter" && t.submit(r.currentTarget.value);
246
+ }
247
+ }
248
+ ), Pe = () => {
249
+ const [t] = w();
250
+ return (r, s) => {
251
+ var x;
252
+ const l = (x = B(t, { _id: s })) == null ? void 0 : x._type, o = Be(r.map((d) => {
253
+ var a;
254
+ return (a = B(t, { _id: d })) == null ? void 0 : a._type;
255
+ }));
256
+ return y(l, o);
257
+ };
258
+ }, kt = () => {
259
+ const [t] = P(Y), [r, s] = b(), l = J(), [, o] = Q(), { moveBlocks: x } = X(), d = Pe(), a = () => {
260
+ s([]), o([]);
261
+ }, m = ({ id: n, name: i, node: u }) => {
262
+ l([n], { _name: i }, u.data._name);
263
+ }, p = ({ dragIds: n, parentId: i, index: u }) => {
264
+ d(n, i) && x(n, i, u);
265
+ }, h = (n) => {
266
+ if (n.length === 0)
267
+ return;
268
+ const i = n[0] ? n[0].id : "";
269
+ o([]), s([i]);
270
+ }, g = (n) => {
271
+ var c;
272
+ n.preventDefault();
273
+ const i = n.target, u = i.getAttribute("data-node-id") || ((c = i.closest("[data-node-id]")) == null ? void 0 : c.getAttribute("data-node-id"));
274
+ u && (o([]), s([u]));
275
+ }, j = T(
276
+ ({ parentNode: n, dragNodes: i }) => {
277
+ var u;
278
+ return !y(n == null ? void 0 : n.data._type, (u = i[0]) == null ? void 0 : u.data._type);
279
+ },
280
+ [],
281
+ 300
282
+ );
283
+ return /* @__PURE__ */ e.jsx("div", { className: N("-mx-1 -mt-1 flex h-full select-none flex-col space-y-1"), onClick: () => a(), children: /* @__PURE__ */ e.jsx("div", { id: "outline-view", className: "no-scrollbar h-full overflow-y-auto p-1 px-2 text-xs", children: /* @__PURE__ */ e.jsx(
284
+ A,
285
+ {
286
+ height: 800,
287
+ className: "no-scrollbar !h-full max-w-full !overflow-y-auto !overflow-x-hidden",
288
+ selection: r[0] || "",
289
+ onRename: m,
290
+ openByDefault: !1,
291
+ onMove: p,
292
+ rowHeight: 20,
293
+ data: t,
294
+ renderCursor: we,
295
+ onSelect: h,
296
+ childrenAccessor: (n) => n.children,
297
+ width: "100%",
298
+ renderDragPreview: _e,
299
+ indent: 10,
300
+ onContextMenu: g,
301
+ disableDrop: j,
302
+ idAccessor: "_id",
303
+ children: Re
304
+ }
305
+ ) }) });
306
+ };
307
+ export {
308
+ kt as default
309
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=["hover","focus","focus-within","focus-visible","active","visited","target","first","last","only","odd","even","first-of-type","last-of-type","only-of-type","empty","disabled","checked","indeterminate","default","required","valid","invalid","in-range","out-of-range","placeholder-shown","autofill","read-only","open","before","after","first-letter","first-line","marker","selection","file","placeholder","ui-open","ui-disabled","ui-active","ui-selected","ui-checked","ui-not-open","ui-not-disabled","ui-not-active","ui-not-selected","ui-not-checked"],o={bodyFont:"Inter",headingFont:"Inter",roundedCorners:5,primaryColor:"#570df8",secondaryColor:"#f002b8",bodyBgDarkColor:"#031022",bodyBgLightColor:"#fcfcfc",bodyTextDarkColor:"#ffffff",bodyTextLightColor:"#000000"};exports.BRANDING_OPTIONS_DEFAULTS=o;exports.MODIFIERS=e;
@@ -1,4 +1,4 @@
1
- const e = "#styles:", o = "#slots:", t = "#i18n", i = "outline", n = [
1
+ const e = [
2
2
  "hover",
3
3
  "focus",
4
4
  "focus-within",
@@ -47,7 +47,7 @@ const e = "#styles:", o = "#slots:", t = "#i18n", i = "outline", n = [
47
47
  "ui-not-active",
48
48
  "ui-not-selected",
49
49
  "ui-not-checked"
50
- ], r = {
50
+ ], o = {
51
51
  bodyFont: "Inter",
52
52
  headingFont: "Inter",
53
53
  roundedCorners: 5,
@@ -59,10 +59,6 @@ const e = "#styles:", o = "#slots:", t = "#i18n", i = "outline", n = [
59
59
  bodyTextLightColor: "#000000"
60
60
  };
61
61
  export {
62
- r as B,
63
- t as I,
64
- n as M,
65
- i as O,
66
- o as S,
67
- e as a
62
+ o as B,
63
+ e as M
68
64
  };
@@ -0,0 +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-oCYKBYyT.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-dgm-fd8U.cjs");require("i18next");require("react-i18next");require("./index-h-hd6EvN.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-0g14w5RS.cjs");require("./Class-PoYusiA5.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-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("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-efmv1pCj.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-4o2L_7T7.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-JlKEwACu.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,22 +1,23 @@
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 { u as l, a as c } from "./index-_VPpjzJu.js";
4
+ import { u as l, a as c } from "./index-xZWaF8AW.js";
5
5
  import "./_commonjsHelpers-UyOWmZb0.js";
6
- import "./index-UP_4awU9.js";
6
+ import "./index-gS-3liKK.js";
7
7
  import "i18next";
8
8
  import "react-i18next";
9
- import "./index-IPJAbzzO.js";
9
+ import "./index-Gk6sASBd.js";
10
10
  import "./Functions-7jnEwJyw.js";
11
11
  import "clsx";
12
12
  import "tailwind-merge";
13
13
  import "@chaibuilder/runtime";
14
14
  import "jotai";
15
- import "./MODIFIERS-WQdaNvb8.js";
15
+ import "./STRINGS--j49GZJP.js";
16
16
  import "@react-hookz/web";
17
+ import "./MODIFIERS-dytZ-osO.js";
18
+ import "./Class-lGzsNBOK.js";
17
19
  import "@radix-ui/react-toggle";
18
20
  import "class-variance-authority";
19
- import "./Class-3k8xjeiM.js";
20
21
  import "@radix-ui/react-switch";
21
22
  import "@radix-ui/react-slot";
22
23
  import "@radix-ui/react-accordion";
@@ -41,15 +42,13 @@ import "react-dom";
41
42
  import "react-quill";
42
43
  import "@floating-ui/react-dom";
43
44
  import "flagged";
44
- import "react-dnd";
45
- import "@minoru/react-dnd-treeview";
46
45
  import "react-hotkeys-hook";
47
46
  import "sonner";
48
- import "./html-to-json-C5sExaSD.js";
47
+ import "./html-to-json-ngX9ef2u.js";
49
48
  import "himalaya";
50
49
  import "lucide-react";
51
50
  import "./index-YpnaudSM.js";
52
- const x = i.lazy(() => import("./add-page-modal-Jni6CY1x.js")), u = i.lazy(() => import("./page-viewer-L1Dmgj-c.js")), ct = () => {
51
+ const x = i.lazy(() => import("./add-page-modal-4PiRJgX5.js")), u = i.lazy(() => import("./page-viewer-rCXavxpd.js")), lt = () => {
53
52
  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);
54
53
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
55
54
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
@@ -61,5 +60,5 @@ const x = i.lazy(() => import("./add-page-modal-Jni6CY1x.js")), u = i.lazy(() =>
61
60
  ] });
62
61
  };
63
62
  export {
64
- ct as default
63
+ lt as default
65
64
  };
@@ -1,19 +1,21 @@
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 { b9 as f, ba as n, bb as l, bc as c } from "./index-IPJAbzzO.js";
5
- import { b as h, a as g } from "./index-_VPpjzJu.js";
4
+ import { b9 as f, ba as n, bb as l, bc as c } from "./index-Gk6sASBd.js";
5
+ import { b as h, a as g } from "./index-xZWaF8AW.js";
6
6
  import "./_commonjsHelpers-UyOWmZb0.js";
7
7
  import "./Functions-7jnEwJyw.js";
8
8
  import "clsx";
9
9
  import "tailwind-merge";
10
10
  import "@chaibuilder/runtime";
11
11
  import "jotai";
12
- import "./MODIFIERS-WQdaNvb8.js";
12
+ import "./STRINGS--j49GZJP.js";
13
13
  import "@react-hookz/web";
14
+ import "./MODIFIERS-dytZ-osO.js";
15
+ import "./Class-lGzsNBOK.js";
16
+ import "react-i18next";
14
17
  import "@radix-ui/react-toggle";
15
18
  import "class-variance-authority";
16
- import "./Class-3k8xjeiM.js";
17
19
  import "@radix-ui/react-switch";
18
20
  import "@radix-ui/react-slot";
19
21
  import "@radix-ui/react-accordion";
@@ -36,24 +38,21 @@ import "@radix-ui/react-context-menu";
36
38
  import "react-icons-picker";
37
39
  import "react-dom";
38
40
  import "react-quill";
39
- import "react-i18next";
40
- import "./index-UP_4awU9.js";
41
+ import "./index-gS-3liKK.js";
41
42
  import "i18next";
42
43
  import "@floating-ui/react-dom";
43
44
  import "flagged";
44
- import "react-dnd";
45
- import "@minoru/react-dnd-treeview";
46
45
  import "react-hotkeys-hook";
47
46
  import "sonner";
48
- import "./html-to-json-C5sExaSD.js";
47
+ import "./html-to-json-ngX9ef2u.js";
49
48
  import "himalaya";
50
49
  import "lucide-react";
51
50
  import "./index-YpnaudSM.js";
52
- const N = m.lazy(() => import("./project-general-setting-sUP7JqWK.js")), S = m.lazy(() => import("./project-seo-setting-NNvAGt4T.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 = (e) => e && j(e.seoData) ? {
51
+ const N = m.lazy(() => import("./project-general-setting-rmAVpDu9.js")), S = m.lazy(() => import("./project-seo-setting-pX34Qsym.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 = (e) => e && j(e.seoData) ? {
53
52
  ...e,
54
53
  seoData: { title: "", description: "", image: "" }
55
54
  } : e;
56
- function gt() {
55
+ function ht() {
57
56
  const e = h(), { data: s } = g(), [r, i] = m.useState(
58
57
  u(s || {})
59
58
  ), o = x(r);
@@ -82,5 +81,5 @@ function gt() {
82
81
  ] });
83
82
  }
84
83
  export {
85
- gt as default
84
+ ht as default
86
85
  };
@@ -0,0 +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-h-hd6EvN.cjs"),a=require("./index-oCYKBYyT.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-0g14w5RS.cjs");require("./Class-PoYusiA5.cjs");require("react-i18next");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-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("./index-dgm-fd8U.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-efmv1pCj.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-2FGoUZ-z.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-mlxL_e2_.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;
@@ -0,0 +1,7 @@
1
+ const s = "#styles:", t = "#slots:", o = "#i18n", n = "outline";
2
+ export {
3
+ o as I,
4
+ n as O,
5
+ t as S,
6
+ s as a
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";const E="#styles:",s="#slots:",Y="#i18n",t="outline";exports.I18N_KEY=Y;exports.OUTLINE_KEY=t;exports.SLOT_KEY=s;exports.STYLES_KEY=E;