@chaibuilder/sdk 1.2.10 → 1.2.12
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.
- package/README.md +10 -12
- package/dist/AddBlocks-ByeMUUzE.js +218 -0
- package/dist/AddBlocks-nMUkm4og.cjs +1 -0
- package/dist/{BrandingOptions-10jJO8mG.js → BrandingOptions--poS5shs.js} +18 -21
- package/dist/BrandingOptions-eeDfvB0R.cjs +1 -0
- package/dist/{CanvasArea-jgBDM5Qd.js → CanvasArea--TKubnIM.js} +184 -185
- package/dist/{CanvasArea-6O8dMPug.cjs → CanvasArea-h4lA4oqP.cjs} +4 -4
- package/dist/{utils-AvyFzbPC.js → Class-17XFhL48.js} +15 -16
- package/dist/Class-5ARpH_Tu.cjs +1 -0
- package/dist/CurrentPage-B3YumhrX.cjs +1 -0
- package/dist/{CurrentPage-lakeZviD.js → CurrentPage-Gw9LJ40j.js} +24 -25
- package/dist/Layers-4r_4F6ST.cjs +1 -0
- package/dist/{Layers-R7TfREUd.js → Layers-d-xge4On.js} +77 -78
- package/dist/{PagesPanel-4mqxCFHq.js → PagesPanel-E4wSgVcE.js} +14 -15
- package/dist/PagesPanel-iZLDBwXQ.cjs +1 -0
- package/dist/ProjectPanel-2TcqGnfN.cjs +1 -0
- package/dist/{ProjectPanel-Wy2nw-1w.js → ProjectPanel-q7upaf7h.js} +17 -18
- package/dist/Settings-NuDNH2dR.cjs +1 -0
- package/dist/{Settings-_K28Ontt.js → Settings-y3DHsT88.js} +163 -164
- package/dist/SidePanels-91l1CjYv.cjs +1 -0
- package/dist/{SidePanels-6slnxdSj.js → SidePanels-BK_QnEh9.js} +40 -41
- package/dist/{Topbar-bwt6HjlL.js → Topbar-b7jnOD57.js} +16 -17
- package/dist/Topbar-rEO5z57t.cjs +1 -0
- package/dist/{UnsplashImages-V29UE-57.js → UnsplashImages-Lb78FYx7.js} +27 -28
- package/dist/UnsplashImages-p-WdKs3b.cjs +1 -0
- package/dist/{UploadImages-E0mi_qn8.js → UploadImages-aWG_1r7N.js} +23 -24
- package/dist/UploadImages-zk-IYDx8.cjs +1 -0
- package/dist/{add-page-modal-FJEAqfD3.js → add-page-modal-7djj9GZj.js} +28 -29
- package/dist/add-page-modal-iUffBbAe.cjs +1 -0
- package/dist/{confirm-alert-5hfE116f.js → confirm-alert-QuqMrpWn.js} +12 -13
- package/dist/confirm-alert-i3FRAgP4.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +9 -50
- package/dist/core.js +47 -56
- package/dist/defaultTheme-IH19g4fv.cjs +1 -0
- package/dist/defaultTheme-YY8mlQS3.js +1055 -0
- package/dist/{delete-page-modal-wH0yLiQI.js → delete-page-modal-DEBiprds.js} +14 -15
- package/dist/delete-page-modal-RllDrgxs.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +100 -81
- package/dist/email.cjs +1 -0
- package/dist/email.d.ts +116 -0
- package/dist/email.js +79 -0
- package/dist/{controls-XPXGHKht.js → empty-slot-MWycClTb.js} +61 -50
- package/dist/empty-slot-TF2kd-0X.cjs +1 -0
- package/dist/{form-UVHCD9N3.js → form-94xR0NG8.js} +1 -1
- package/dist/{form-1j01gADS.cjs → form-yz7h2msc.cjs} +1 -1
- package/dist/{index-B4sL0YTN.js → index-0m8Zuv5X.js} +1434 -1552
- package/dist/{index-c2VLKuhY.js → index-19nTm_cE.js} +2069 -2059
- package/dist/index-TEfD-2ti.cjs +1 -0
- package/dist/{index-xbQL0wpz.cjs → index-XVud0HL8.cjs} +33 -33
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +95 -1125
- package/dist/page-viewer-_ktv1pgX.cjs +1 -0
- package/dist/{page-viewer-TcK0I240.js → page-viewer-xPLhXv6k.js} +16 -17
- package/dist/{project-general-setting-4ruKl033.js → project-general-setting-XlORLtqJ.js} +15 -16
- package/dist/project-general-setting-nULU3Tzw.cjs +1 -0
- package/dist/project-seo-setting-9QkARPhg.cjs +1 -0
- package/dist/{project-seo-setting-d1EZlacB.js → project-seo-setting-KQkeHwny.js} +14 -15
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +2 -0
- package/dist/render.js +111 -70
- package/dist/single-page-detail-Gb6O3Yyw.cjs +1 -0
- package/dist/{single-page-detail-PihQi-dP.js → single-page-detail-gtVN9hxR.js} +44 -45
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +13 -14
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +138 -139
- package/dist/{useAddBlockByDrop-nLzs79He.cjs → useAddBlockByDrop-GU5QLPtz.cjs} +1 -1
- package/dist/{useAddBlockByDrop-rcDR-z9_.js → useAddBlockByDrop-b5KJh_7w.js} +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +313 -322
- package/package.json +8 -2
- package/dist/AddBlocks-GiMnBMeQ.js +0 -224
- package/dist/AddBlocks-SzURo9Bj.cjs +0 -1
- package/dist/BrandingOptions-yK-54R-c.cjs +0 -1
- package/dist/CurrentPage-1y62Ne77.cjs +0 -1
- package/dist/Layers-Z4nmm9xK.cjs +0 -1
- package/dist/PagesPanel-ouHdxyOH.cjs +0 -1
- package/dist/ProjectPanel-hHolYZjt.cjs +0 -1
- package/dist/Settings-EYOw02iE.cjs +0 -1
- package/dist/SidePanels-U-_O1QN8.cjs +0 -1
- package/dist/Topbar-dQEoY2P8.cjs +0 -1
- package/dist/UnsplashImages-pGgaUPQy.cjs +0 -1
- package/dist/UploadImages-7oLycdSh.cjs +0 -1
- package/dist/add-page-modal-In6XI-vZ.cjs +0 -1
- package/dist/confirm-alert-Vwd3OzL9.cjs +0 -1
- package/dist/controls-Dy1qa8Dc.cjs +0 -1
- package/dist/delete-page-modal-tl7FLK9J.cjs +0 -1
- package/dist/functions-Ox_svtKm.cjs +0 -1
- package/dist/functions-xIebp8Aw.js +0 -23
- package/dist/index-7ogwGh39.cjs +0 -1
- package/dist/page-viewer-SfQUe0SI.cjs +0 -1
- package/dist/project-general-setting-t7E2Y_w9.cjs +0 -1
- package/dist/project-seo-setting-4b_BJZDF.cjs +0 -1
- package/dist/single-page-detail-KuXd9Mur.cjs +0 -1
- package/dist/utils-PTxFk6qT.cjs +0 -1
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { nth as k, startsWith as L, map as C, includes as T, isUndefined as P, find as V, isEmpty as
|
|
3
|
-
import { BoxModelIcon as
|
|
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 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 {
|
|
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-0m8Zuv5X.js";
|
|
8
8
|
import { DatabaseIcon as _e } from "lucide-react";
|
|
9
9
|
import { useMemo as Ee, useCallback as Me } from "react";
|
|
10
|
-
import { a as
|
|
10
|
+
import { a as He } from "./MODIFIERS-RiXS5Mn1.js";
|
|
11
11
|
import { c as I } from "./Functions-7jnEwJyw.js";
|
|
12
|
-
import { f as
|
|
13
|
-
import { u as Le } from "./useAddBlockByDrop-
|
|
12
|
+
import { f as Ae } from "./index-19nTm_cE.js";
|
|
13
|
+
import { u as Le } from "./useAddBlockByDrop-b5KJh_7w.js";
|
|
14
14
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
15
|
+
import "@chaibuilder/runtime";
|
|
16
|
+
import "jotai";
|
|
17
|
+
import "flat-to-nested";
|
|
18
|
+
import "@react-hookz/web";
|
|
15
19
|
import "@radix-ui/react-toggle";
|
|
16
20
|
import "class-variance-authority";
|
|
17
|
-
import "./
|
|
21
|
+
import "./Class-17XFhL48.js";
|
|
18
22
|
import "clsx";
|
|
19
23
|
import "tailwind-merge";
|
|
20
24
|
import "@radix-ui/react-switch";
|
|
@@ -38,11 +42,6 @@ import "@radix-ui/react-context-menu";
|
|
|
38
42
|
import "react-icons-picker";
|
|
39
43
|
import "react-dom";
|
|
40
44
|
import "react-quill";
|
|
41
|
-
import "jotai";
|
|
42
|
-
import "flat-to-nested";
|
|
43
|
-
import "redux-undo";
|
|
44
|
-
import "@chaibuilder/runtime";
|
|
45
|
-
import "@react-hookz/web";
|
|
46
45
|
import "i18next";
|
|
47
46
|
import "@floating-ui/react-dom";
|
|
48
47
|
import "react-textarea-autosize";
|
|
@@ -52,7 +51,7 @@ import "sonner";
|
|
|
52
51
|
import "./html-to-json-57841sEK.js";
|
|
53
52
|
import "himalaya";
|
|
54
53
|
import "./web-blocks.js";
|
|
55
|
-
import "./
|
|
54
|
+
import "./empty-slot-MWycClTb.js";
|
|
56
55
|
const R = (t) => {
|
|
57
56
|
switch (t.type) {
|
|
58
57
|
case "Image":
|
|
@@ -66,11 +65,11 @@ const R = (t) => {
|
|
|
66
65
|
case "Video":
|
|
67
66
|
return /* @__PURE__ */ e.jsx(re, {});
|
|
68
67
|
case "RichText":
|
|
69
|
-
return /* @__PURE__ */ e.jsx(
|
|
68
|
+
return /* @__PURE__ */ e.jsx(oe, {});
|
|
70
69
|
case "Button":
|
|
71
70
|
return /* @__PURE__ */ e.jsx(B, {});
|
|
72
71
|
case "CustomHTML":
|
|
73
|
-
return /* @__PURE__ */ e.jsx(
|
|
72
|
+
return /* @__PURE__ */ e.jsx(ne, {});
|
|
74
73
|
case "Divider":
|
|
75
74
|
return /* @__PURE__ */ e.jsx(se, {});
|
|
76
75
|
case "Icon":
|
|
@@ -84,36 +83,36 @@ const R = (t) => {
|
|
|
84
83
|
case "ListItem":
|
|
85
84
|
return /* @__PURE__ */ e.jsx(ee, {});
|
|
86
85
|
case "LineBreak":
|
|
87
|
-
return /* @__PURE__ */ e.jsx(
|
|
86
|
+
return /* @__PURE__ */ e.jsx(Z, {});
|
|
88
87
|
case "Form":
|
|
89
88
|
return /* @__PURE__ */ e.jsx(J, {});
|
|
90
89
|
case "Checkbox":
|
|
91
|
-
return /* @__PURE__ */ e.jsx(
|
|
90
|
+
return /* @__PURE__ */ e.jsx(X, {});
|
|
92
91
|
case "FormButton":
|
|
93
92
|
return /* @__PURE__ */ e.jsx(B, {});
|
|
94
93
|
case "Input":
|
|
95
94
|
case "TextArea":
|
|
96
95
|
return /* @__PURE__ */ e.jsx(G, {});
|
|
97
96
|
case "Radio":
|
|
98
|
-
return /* @__PURE__ */ e.jsx(
|
|
97
|
+
return /* @__PURE__ */ e.jsx(Y, {});
|
|
99
98
|
case "Select":
|
|
100
|
-
return /* @__PURE__ */ e.jsx(
|
|
99
|
+
return /* @__PURE__ */ e.jsx(W, {});
|
|
101
100
|
case "Table":
|
|
102
|
-
return /* @__PURE__ */ e.jsx(
|
|
101
|
+
return /* @__PURE__ */ e.jsx(q, {});
|
|
103
102
|
case "TableHead":
|
|
104
|
-
return /* @__PURE__ */ e.jsx(Y, {});
|
|
105
|
-
case "TableBody":
|
|
106
103
|
return /* @__PURE__ */ e.jsx(U, {});
|
|
104
|
+
case "TableBody":
|
|
105
|
+
return /* @__PURE__ */ e.jsx(Q, {});
|
|
107
106
|
case "TableRow":
|
|
108
|
-
return /* @__PURE__ */ e.jsx(K, {});
|
|
109
|
-
case "TableCell":
|
|
110
107
|
return /* @__PURE__ */ e.jsx($, {});
|
|
108
|
+
case "TableCell":
|
|
109
|
+
return /* @__PURE__ */ e.jsx(K, {});
|
|
111
110
|
case "DataProvider":
|
|
112
111
|
return /* @__PURE__ */ e.jsx(_e, { size: 16 });
|
|
113
112
|
case "Box":
|
|
114
113
|
return /* @__PURE__ */ e.jsx(D, {});
|
|
115
114
|
default:
|
|
116
|
-
return /* @__PURE__ */ e.jsx(
|
|
115
|
+
return /* @__PURE__ */ e.jsx(z, {});
|
|
117
116
|
}
|
|
118
117
|
};
|
|
119
118
|
function Pe(t = "") {
|
|
@@ -141,12 +140,12 @@ function Pe(t = "") {
|
|
|
141
140
|
}
|
|
142
141
|
const Ve = (t) => {
|
|
143
142
|
let s = "";
|
|
144
|
-
return Object.keys(t).forEach((
|
|
145
|
-
L(t[
|
|
143
|
+
return Object.keys(t).forEach((n) => {
|
|
144
|
+
L(t[n], He) && (s = t[n]);
|
|
146
145
|
}), s;
|
|
147
|
-
},
|
|
146
|
+
}, Fe = (t) => {
|
|
148
147
|
var m;
|
|
149
|
-
const [, s] = fe(), [
|
|
148
|
+
const [, s] = fe(), [n] = Ie(), { isSelected: r } = t, { id: a, data: c } = t.node, u = t.depth * 10, g = (i) => {
|
|
150
149
|
i.stopPropagation(), t.onToggle(t.node.id);
|
|
151
150
|
}, x = je(a, t.isOpen, t.onToggle), d = Ee(() => {
|
|
152
151
|
const i = Ve(t.node.data);
|
|
@@ -160,10 +159,10 @@ const Ve = (t) => {
|
|
|
160
159
|
onMouseEnter: () => s(a),
|
|
161
160
|
className: I(
|
|
162
161
|
"group flex w-full items-center justify-between space-x-px py-px",
|
|
163
|
-
r ? "bg-blue-500 text-white" : "text-gray-
|
|
162
|
+
r ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800"
|
|
164
163
|
),
|
|
165
164
|
onClick: (i) => {
|
|
166
|
-
i.stopPropagation(), !
|
|
165
|
+
i.stopPropagation(), !n.includes(a) && t.onSelect(a);
|
|
167
166
|
},
|
|
168
167
|
onContextMenu: () => t.onSelect(a),
|
|
169
168
|
style: { paddingInlineStart: u },
|
|
@@ -195,22 +194,22 @@ const Ve = (t) => {
|
|
|
195
194
|
}
|
|
196
195
|
)
|
|
197
196
|
);
|
|
198
|
-
},
|
|
199
|
-
var
|
|
197
|
+
}, ze = (t) => {
|
|
198
|
+
var n;
|
|
200
199
|
const { item: s } = t.monitorProps;
|
|
201
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: [
|
|
202
|
-
/* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(R, { 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 }) }),
|
|
203
202
|
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: s.text })
|
|
204
203
|
] });
|
|
205
|
-
},
|
|
204
|
+
}, Ke = (t) => {
|
|
206
205
|
const s = t.depth * 10 + 16;
|
|
207
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 } });
|
|
208
|
-
},
|
|
209
|
-
const [t] = p(), s = ye(),
|
|
207
|
+
}, $e = () => {
|
|
208
|
+
const [t] = p(), s = ye(), n = S();
|
|
210
209
|
return /* @__PURE__ */ e.jsxs(
|
|
211
210
|
N,
|
|
212
211
|
{
|
|
213
|
-
disabled: !ke(
|
|
212
|
+
disabled: !ke(n == null ? void 0 : n._type),
|
|
214
213
|
className: "flex items-center gap-x-4 text-xs",
|
|
215
214
|
onClick: () => s(t),
|
|
216
215
|
children: [
|
|
@@ -219,15 +218,15 @@ const Ve = (t) => {
|
|
|
219
218
|
]
|
|
220
219
|
}
|
|
221
220
|
);
|
|
222
|
-
},
|
|
223
|
-
const [t] = p(), s = Be(),
|
|
221
|
+
}, Qe = () => {
|
|
222
|
+
const [t] = p(), s = Be(), n = S(), r = Me(() => {
|
|
224
223
|
s(t);
|
|
225
224
|
}, [t, s]);
|
|
226
225
|
return /* @__PURE__ */ e.jsxs(ve, { className: "text-xs", children: [
|
|
227
226
|
/* @__PURE__ */ e.jsxs(
|
|
228
227
|
N,
|
|
229
228
|
{
|
|
230
|
-
disabled: !we(
|
|
229
|
+
disabled: !we(n == null ? void 0 : n._type),
|
|
231
230
|
className: "flex items-center gap-x-4 text-xs",
|
|
232
231
|
onClick: r,
|
|
233
232
|
children: [
|
|
@@ -236,28 +235,28 @@ const Ve = (t) => {
|
|
|
236
235
|
]
|
|
237
236
|
}
|
|
238
237
|
),
|
|
239
|
-
/* @__PURE__ */ e.jsx(
|
|
238
|
+
/* @__PURE__ */ e.jsx($e, {})
|
|
240
239
|
] });
|
|
241
|
-
},
|
|
240
|
+
}, Ue = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(Ce, { children: [
|
|
242
241
|
/* @__PURE__ */ e.jsx(Te, { children: t }),
|
|
243
|
-
/* @__PURE__ */ e.jsx(
|
|
242
|
+
/* @__PURE__ */ e.jsx(Qe, {})
|
|
244
243
|
] }) });
|
|
245
|
-
function
|
|
244
|
+
function qe(t) {
|
|
246
245
|
return C(t, (s) => {
|
|
247
|
-
const { data:
|
|
246
|
+
const { data: n } = s;
|
|
248
247
|
return {
|
|
249
|
-
...
|
|
248
|
+
...n,
|
|
250
249
|
_parent: s.parent === 0 ? null : s.parent
|
|
251
250
|
};
|
|
252
251
|
});
|
|
253
252
|
}
|
|
254
|
-
function
|
|
255
|
-
const [t] = O(), [s,
|
|
253
|
+
function We() {
|
|
254
|
+
const [t] = O(), [s, n] = p();
|
|
256
255
|
return t ? /* @__PURE__ */ e.jsxs(
|
|
257
256
|
"div",
|
|
258
257
|
{
|
|
259
258
|
onClick: (r) => {
|
|
260
|
-
r.stopPropagation(),
|
|
259
|
+
r.stopPropagation(), n(["container"]);
|
|
261
260
|
},
|
|
262
261
|
className: I(
|
|
263
262
|
"flex items-center pl-2 text-xs",
|
|
@@ -271,39 +270,39 @@ function Ze() {
|
|
|
271
270
|
}
|
|
272
271
|
) : null;
|
|
273
272
|
}
|
|
274
|
-
const
|
|
275
|
-
const [t] = De(), { setNewBlocks: s } = Se(), [
|
|
273
|
+
const Yt = () => {
|
|
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) => {
|
|
276
275
|
const { dragSource: h, relativeIndex: b, dropTargetId: f, monitor: y } = l;
|
|
277
276
|
if (h) {
|
|
278
|
-
const
|
|
279
|
-
s(
|
|
280
|
-
const
|
|
281
|
-
r([
|
|
277
|
+
const H = qe(o);
|
|
278
|
+
s(H);
|
|
279
|
+
const A = y.getItem();
|
|
280
|
+
r([A.id]);
|
|
282
281
|
} else
|
|
283
282
|
await x({ block: y.getItem(), dropTargetId: f, relativeIndex: b });
|
|
284
|
-
}, i = C(t, (
|
|
285
|
-
id:
|
|
286
|
-
text:
|
|
287
|
-
parent:
|
|
288
|
-
droppable: !P(V(t, { _parent:
|
|
289
|
-
data:
|
|
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
|
|
290
289
|
})), _ = () => {
|
|
291
290
|
r([]), c([]);
|
|
292
291
|
}, [{ isOver: j }, E] = ue(() => ({
|
|
293
292
|
accept: ["CHAI_BLOCK"],
|
|
294
|
-
collect: (
|
|
295
|
-
canDrop:
|
|
296
|
-
isOver:
|
|
293
|
+
collect: (o) => ({
|
|
294
|
+
canDrop: o.canDrop(),
|
|
295
|
+
isOver: o.isOver()
|
|
297
296
|
}),
|
|
298
|
-
drop: (
|
|
297
|
+
drop: (o) => {
|
|
299
298
|
(async () => await x({
|
|
300
|
-
block:
|
|
299
|
+
block: o,
|
|
301
300
|
dropTargetId: "",
|
|
302
301
|
relativeIndex: 0
|
|
303
302
|
}))();
|
|
304
303
|
}
|
|
305
|
-
})), { isDragging: M } = ge((
|
|
306
|
-
isDragging:
|
|
304
|
+
})), { isDragging: M } = ge((o) => ({
|
|
305
|
+
isDragging: o.isDragging()
|
|
307
306
|
}));
|
|
308
307
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
309
308
|
"div",
|
|
@@ -313,7 +312,7 @@ const Gt = () => {
|
|
|
313
312
|
"-mx-1 -mt-1 flex h-full select-none flex-col space-y-1",
|
|
314
313
|
M ? "bg-green-50/80" : "bg-background"
|
|
315
314
|
),
|
|
316
|
-
children:
|
|
315
|
+
children: F(t) ? /* @__PURE__ */ e.jsxs(
|
|
317
316
|
"div",
|
|
318
317
|
{
|
|
319
318
|
ref: E,
|
|
@@ -324,7 +323,7 @@ const Gt = () => {
|
|
|
324
323
|
]
|
|
325
324
|
}
|
|
326
325
|
) : /* @__PURE__ */ e.jsxs(Oe, { id: "layers-view", className: "no-scrollbar h-full overflow-y-auto p-1", children: [
|
|
327
|
-
/* @__PURE__ */ e.jsx(
|
|
326
|
+
/* @__PURE__ */ e.jsx(We, {}),
|
|
328
327
|
/* @__PURE__ */ e.jsx(
|
|
329
328
|
he,
|
|
330
329
|
{
|
|
@@ -332,21 +331,21 @@ const Gt = () => {
|
|
|
332
331
|
extraAcceptTypes: ["CHAI_BLOCK"],
|
|
333
332
|
tree: i,
|
|
334
333
|
rootId: 0,
|
|
335
|
-
render: (
|
|
336
|
-
|
|
334
|
+
render: (o, { depth: l, isOpen: h, onToggle: b }) => /* @__PURE__ */ e.jsx(Ue, { id: o.id, children: /* @__PURE__ */ e.jsx(
|
|
335
|
+
Fe,
|
|
337
336
|
{
|
|
338
337
|
onSelect: (f) => {
|
|
339
338
|
c([]), r([f]);
|
|
340
339
|
},
|
|
341
|
-
isSelected: T(
|
|
342
|
-
node:
|
|
340
|
+
isSelected: T(n, o.id),
|
|
341
|
+
node: o,
|
|
343
342
|
depth: l,
|
|
344
343
|
isOpen: h,
|
|
345
344
|
onToggle: b,
|
|
346
345
|
toggleIds: a
|
|
347
346
|
}
|
|
348
347
|
) }),
|
|
349
|
-
dragPreviewRender: (
|
|
348
|
+
dragPreviewRender: (o) => /* @__PURE__ */ e.jsx(ze, { monitorProps: o }),
|
|
350
349
|
onDrop: m,
|
|
351
350
|
classes: {
|
|
352
351
|
root: "h-[90%] " + (d ? "pl-2" : "pt-2"),
|
|
@@ -359,7 +358,7 @@ const Gt = () => {
|
|
|
359
358
|
canDrop: Re,
|
|
360
359
|
dropTargetOffset: 2,
|
|
361
360
|
enableAnimateExpand: !0,
|
|
362
|
-
placeholderRender: (
|
|
361
|
+
placeholderRender: (o, { depth: l }) => /* @__PURE__ */ e.jsx(Ke, { node: o, depth: l })
|
|
363
362
|
}
|
|
364
363
|
)
|
|
365
364
|
] })
|
|
@@ -367,5 +366,5 @@ const Gt = () => {
|
|
|
367
366
|
) });
|
|
368
367
|
};
|
|
369
368
|
export {
|
|
370
|
-
|
|
369
|
+
Yt as default
|
|
371
370
|
};
|
|
@@ -1,17 +1,22 @@
|
|
|
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-
|
|
4
|
+
import { a as l, b as c } from "./index-19nTm_cE.js";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import "./index-
|
|
9
|
-
import "
|
|
10
|
-
import "class-variance-authority";
|
|
11
|
-
import "./utils-AvyFzbPC.js";
|
|
12
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
8
|
+
import "./index-0m8Zuv5X.js";
|
|
9
|
+
import "./Functions-7jnEwJyw.js";
|
|
13
10
|
import "clsx";
|
|
14
11
|
import "tailwind-merge";
|
|
12
|
+
import "@chaibuilder/runtime";
|
|
13
|
+
import "jotai";
|
|
14
|
+
import "flat-to-nested";
|
|
15
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
16
|
+
import "@react-hookz/web";
|
|
17
|
+
import "@radix-ui/react-toggle";
|
|
18
|
+
import "class-variance-authority";
|
|
19
|
+
import "./Class-17XFhL48.js";
|
|
15
20
|
import "@radix-ui/react-switch";
|
|
16
21
|
import "@radix-ui/react-slot";
|
|
17
22
|
import "@radix-ui/react-accordion";
|
|
@@ -34,12 +39,6 @@ import "@radix-ui/react-context-menu";
|
|
|
34
39
|
import "react-icons-picker";
|
|
35
40
|
import "react-dom";
|
|
36
41
|
import "react-quill";
|
|
37
|
-
import "jotai";
|
|
38
|
-
import "flat-to-nested";
|
|
39
|
-
import "./Functions-7jnEwJyw.js";
|
|
40
|
-
import "redux-undo";
|
|
41
|
-
import "@chaibuilder/runtime";
|
|
42
|
-
import "@react-hookz/web";
|
|
43
42
|
import "@floating-ui/react-dom";
|
|
44
43
|
import "react-textarea-autosize";
|
|
45
44
|
import "flagged";
|
|
@@ -51,8 +50,8 @@ import "./html-to-json-57841sEK.js";
|
|
|
51
50
|
import "himalaya";
|
|
52
51
|
import "lucide-react";
|
|
53
52
|
import "./web-blocks.js";
|
|
54
|
-
import "./
|
|
55
|
-
const x = i.lazy(() => import("./add-page-modal-
|
|
53
|
+
import "./empty-slot-MWycClTb.js";
|
|
54
|
+
const x = i.lazy(() => import("./add-page-modal-7djj9GZj.js")), g = i.lazy(() => import("./page-viewer-xPLhXv6k.js")), gt = () => {
|
|
56
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);
|
|
57
56
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
58
57
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
@@ -64,5 +63,5 @@ const x = i.lazy(() => import("./add-page-modal-FJEAqfD3.js")), g = i.lazy(() =>
|
|
|
64
63
|
] });
|
|
65
64
|
};
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
gt as default
|
|
68
67
|
};
|
|
@@ -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-XVud0HL8.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("react-i18next");require("./index-TEfD-2ti.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-iUffBbAe.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-_ktv1pgX.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;
|
|
@@ -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-TEfD-2ti.cjs"),a=require("./index-XVud0HL8.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-nULU3Tzw.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-9QkARPhg.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,15 +1,20 @@
|
|
|
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 {
|
|
5
|
-
import { c as
|
|
4
|
+
import { b8 as f, b9 as n, ba as l, bb as c } from "./index-0m8Zuv5X.js";
|
|
5
|
+
import { c as h, b as g } from "./index-19nTm_cE.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
|
-
import "
|
|
8
|
-
import "class-variance-authority";
|
|
9
|
-
import "./utils-AvyFzbPC.js";
|
|
10
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
7
|
+
import "./Functions-7jnEwJyw.js";
|
|
11
8
|
import "clsx";
|
|
12
9
|
import "tailwind-merge";
|
|
10
|
+
import "@chaibuilder/runtime";
|
|
11
|
+
import "jotai";
|
|
12
|
+
import "flat-to-nested";
|
|
13
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
14
|
+
import "@react-hookz/web";
|
|
15
|
+
import "@radix-ui/react-toggle";
|
|
16
|
+
import "class-variance-authority";
|
|
17
|
+
import "./Class-17XFhL48.js";
|
|
13
18
|
import "@radix-ui/react-switch";
|
|
14
19
|
import "@radix-ui/react-slot";
|
|
15
20
|
import "@radix-ui/react-accordion";
|
|
@@ -32,12 +37,6 @@ import "@radix-ui/react-context-menu";
|
|
|
32
37
|
import "react-icons-picker";
|
|
33
38
|
import "react-dom";
|
|
34
39
|
import "react-quill";
|
|
35
|
-
import "jotai";
|
|
36
|
-
import "flat-to-nested";
|
|
37
|
-
import "./Functions-7jnEwJyw.js";
|
|
38
|
-
import "redux-undo";
|
|
39
|
-
import "@chaibuilder/runtime";
|
|
40
|
-
import "@react-hookz/web";
|
|
41
40
|
import "react-i18next";
|
|
42
41
|
import "i18next";
|
|
43
42
|
import "@floating-ui/react-dom";
|
|
@@ -51,13 +50,13 @@ import "./html-to-json-57841sEK.js";
|
|
|
51
50
|
import "himalaya";
|
|
52
51
|
import "lucide-react";
|
|
53
52
|
import "./web-blocks.js";
|
|
54
|
-
import "./
|
|
55
|
-
const N = m.lazy(() => import("./project-general-setting-
|
|
53
|
+
import "./empty-slot-MWycClTb.js";
|
|
54
|
+
const N = m.lazy(() => import("./project-general-setting-XlORLtqJ.js")), S = m.lazy(() => import("./project-seo-setting-KQkeHwny.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) ? {
|
|
56
55
|
...r,
|
|
57
56
|
seoData: { title: "", description: "", image: "" }
|
|
58
57
|
} : r;
|
|
59
|
-
function
|
|
60
|
-
const r =
|
|
58
|
+
function St() {
|
|
59
|
+
const r = h(), { data: s } = g(), [e, i] = m.useState(
|
|
61
60
|
u(s || {})
|
|
62
61
|
), o = x(e);
|
|
63
62
|
return a(
|
|
@@ -72,7 +71,7 @@ function vt() {
|
|
|
72
71
|
}, [e]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
73
72
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Website Settings" }) }),
|
|
74
73
|
/* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
|
|
75
|
-
/* @__PURE__ */ t.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ t.jsxs(
|
|
74
|
+
/* @__PURE__ */ t.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ t.jsxs(f, { type: "single", className: "w-full", defaultValue: "GENERAL", children: [
|
|
76
75
|
/* @__PURE__ */ t.jsxs(n, { value: "GENERAL", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
77
76
|
/* @__PURE__ */ t.jsx(l, { 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" }),
|
|
78
77
|
/* @__PURE__ */ t.jsx(c, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(N, { _projectData: e, seany: i }) }) })
|
|
@@ -85,5 +84,5 @@ function vt() {
|
|
|
85
84
|
] });
|
|
86
85
|
}
|
|
87
86
|
export {
|
|
88
|
-
|
|
87
|
+
St as default
|
|
89
88
|
};
|