@chaibuilder/sdk 1.2.11 → 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/dist/{AddBlocks-TSt8uJY4.js → AddBlocks-ByeMUUzE.js} +11 -11
- package/dist/{AddBlocks-k2p8Hy1n.cjs → AddBlocks-nMUkm4og.cjs} +1 -1
- package/dist/{BrandingOptions-uFTyYJZj.js → BrandingOptions--poS5shs.js} +1 -1
- package/dist/{BrandingOptions-WyVWfFVz.cjs → BrandingOptions-eeDfvB0R.cjs} +1 -1
- package/dist/{CanvasArea-iRQqpOak.js → CanvasArea--TKubnIM.js} +21 -21
- package/dist/{CanvasArea-5erOZYLy.cjs → CanvasArea-h4lA4oqP.cjs} +1 -1
- package/dist/{CurrentPage-NzmJloN7.cjs → CurrentPage-B3YumhrX.cjs} +1 -1
- package/dist/{CurrentPage-RCxTz9Mc.js → CurrentPage-Gw9LJ40j.js} +2 -2
- package/dist/{Layers-xDG7oltg.cjs → Layers-4r_4F6ST.cjs} +1 -1
- package/dist/{Layers-tXB5Pwid.js → Layers-d-xge4On.js} +56 -56
- package/dist/{PagesPanel-Jaz9jvye.js → PagesPanel-E4wSgVcE.js} +3 -3
- package/dist/{PagesPanel-72nzYB1k.cjs → PagesPanel-iZLDBwXQ.cjs} +1 -1
- package/dist/{ProjectPanel-RU0QvH6e.cjs → ProjectPanel-2TcqGnfN.cjs} +1 -1
- package/dist/{ProjectPanel--S014Xx3.js → ProjectPanel-q7upaf7h.js} +3 -3
- package/dist/{Settings-5EuwaVb3.cjs → Settings-NuDNH2dR.cjs} +1 -1
- package/dist/{Settings-gjvl5V1k.js → Settings-y3DHsT88.js} +59 -59
- package/dist/{SidePanels-uNCxnGte.cjs → SidePanels-91l1CjYv.cjs} +1 -1
- package/dist/{SidePanels-Fq3kRwR0.js → SidePanels-BK_QnEh9.js} +7 -7
- package/dist/{Topbar-m5dbbI1f.js → Topbar-b7jnOD57.js} +4 -4
- package/dist/{Topbar-JqW89xI5.cjs → Topbar-rEO5z57t.cjs} +1 -1
- package/dist/{UnsplashImages-GhBD6owT.js → UnsplashImages-Lb78FYx7.js} +7 -7
- package/dist/{UnsplashImages-vACw5hbK.cjs → UnsplashImages-p-WdKs3b.cjs} +1 -1
- package/dist/{UploadImages-S1HgxeGb.js → UploadImages-aWG_1r7N.js} +1 -1
- package/dist/{UploadImages-PzHdEKHT.cjs → UploadImages-zk-IYDx8.cjs} +1 -1
- package/dist/{add-page-modal-2P5hGXOQ.js → add-page-modal-7djj9GZj.js} +12 -12
- package/dist/{add-page-modal-GAizM2Jw.cjs → add-page-modal-iUffBbAe.cjs} +1 -1
- package/dist/{confirm-alert-57Xq5foA.js → confirm-alert-QuqMrpWn.js} +1 -1
- package/dist/{confirm-alert-Uf84DpdR.cjs → confirm-alert-i3FRAgP4.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -0
- package/dist/core.js +38 -36
- package/dist/{delete-page-modal-ix5IjaFW.js → delete-page-modal-DEBiprds.js} +2 -2
- package/dist/{delete-page-modal-MG42FdnU.cjs → delete-page-modal-RllDrgxs.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-SYcFyACJ.js → form-94xR0NG8.js} +1 -1
- package/dist/{form-KBb3kA8g.cjs → form-yz7h2msc.cjs} +1 -1
- package/dist/{index-pNYv0oAF.js → index-0m8Zuv5X.js} +306 -294
- package/dist/{index-Fj3ead-J.js → index-19nTm_cE.js} +2069 -2059
- package/dist/{index-aiHDvS5v.cjs → index-TEfD-2ti.cjs} +1 -1
- package/dist/{index-cM3eKmlx.cjs → index-XVud0HL8.cjs} +33 -33
- package/dist/{page-viewer-Sh99FGYk.cjs → page-viewer-_ktv1pgX.cjs} +1 -1
- package/dist/{page-viewer-VxqOevr4.js → page-viewer-xPLhXv6k.js} +3 -3
- package/dist/{project-general-setting-nWOjPiin.js → project-general-setting-XlORLtqJ.js} +3 -3
- package/dist/{project-general-setting-VTLHa-Ik.cjs → project-general-setting-nULU3Tzw.cjs} +1 -1
- package/dist/{project-seo-setting-ENAKc2Dl.cjs → project-seo-setting-9QkARPhg.cjs} +1 -1
- package/dist/{project-seo-setting-70bWTwsB.js → project-seo-setting-KQkeHwny.js} +2 -2
- package/dist/{single-page-detail-6L38HJC4.cjs → single-page-detail-Gb6O3Yyw.cjs} +1 -1
- package/dist/{single-page-detail-3z7TF-Yy.js → single-page-detail-gtVN9hxR.js} +4 -4
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +25 -25
- package/dist/{useAddBlockByDrop-7mUMwNSG.cjs → useAddBlockByDrop-GU5QLPtz.cjs} +1 -1
- package/dist/{useAddBlockByDrop-tjQ5DgiO.js → useAddBlockByDrop-b5KJh_7w.js} +1 -1
- 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
|
|
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
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-
|
|
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
15
|
import "@chaibuilder/runtime";
|
|
16
16
|
import "jotai";
|
|
@@ -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(
|
|
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(
|
|
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 "
|
|
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(
|
|
107
|
+
return /* @__PURE__ */ e.jsx($, {});
|
|
108
108
|
case "TableCell":
|
|
109
|
-
return /* @__PURE__ */ e.jsx(
|
|
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((
|
|
144
|
-
L(t[
|
|
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(), [
|
|
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(), !
|
|
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
|
-
},
|
|
198
|
-
var
|
|
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: (
|
|
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
|
-
},
|
|
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
|
-
},
|
|
208
|
-
const [t] = p(), s = ye(),
|
|
207
|
+
}, $e = () => {
|
|
208
|
+
const [t] = p(), s = ye(), n = S();
|
|
209
209
|
return /* @__PURE__ */ e.jsxs(
|
|
210
210
|
N,
|
|
211
211
|
{
|
|
212
|
-
disabled: !ke(
|
|
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
|
-
},
|
|
222
|
-
const [t] = p(), s = Be(),
|
|
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(
|
|
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(
|
|
238
|
+
/* @__PURE__ */ e.jsx($e, {})
|
|
239
239
|
] });
|
|
240
|
-
},
|
|
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(
|
|
242
|
+
/* @__PURE__ */ e.jsx(Qe, {})
|
|
243
243
|
] }) });
|
|
244
|
-
function
|
|
244
|
+
function qe(t) {
|
|
245
245
|
return C(t, (s) => {
|
|
246
|
-
const { data:
|
|
246
|
+
const { data: n } = s;
|
|
247
247
|
return {
|
|
248
|
-
...
|
|
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,
|
|
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(),
|
|
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(), [
|
|
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 =
|
|
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, (
|
|
284
|
-
id:
|
|
285
|
-
text:
|
|
286
|
-
parent:
|
|
287
|
-
droppable: !P(V(t, { _parent:
|
|
288
|
-
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
|
|
289
289
|
})), _ = () => {
|
|
290
290
|
r([]), c([]);
|
|
291
291
|
}, [{ isOver: j }, E] = ue(() => ({
|
|
292
292
|
accept: ["CHAI_BLOCK"],
|
|
293
|
-
collect: (
|
|
294
|
-
canDrop:
|
|
295
|
-
isOver:
|
|
293
|
+
collect: (o) => ({
|
|
294
|
+
canDrop: o.canDrop(),
|
|
295
|
+
isOver: o.isOver()
|
|
296
296
|
}),
|
|
297
|
-
drop: (
|
|
297
|
+
drop: (o) => {
|
|
298
298
|
(async () => await x({
|
|
299
|
-
block:
|
|
299
|
+
block: o,
|
|
300
300
|
dropTargetId: "",
|
|
301
301
|
relativeIndex: 0
|
|
302
302
|
}))();
|
|
303
303
|
}
|
|
304
|
-
})), { isDragging: M } = ge((
|
|
305
|
-
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: (
|
|
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(
|
|
341
|
-
node:
|
|
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: (
|
|
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: (
|
|
361
|
+
placeholderRender: (o, { depth: l }) => /* @__PURE__ */ e.jsx(Ke, { node: o, depth: l })
|
|
362
362
|
}
|
|
363
363
|
)
|
|
364
364
|
] })
|
|
@@ -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-
|
|
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-
|
|
8
|
+
import "./index-0m8Zuv5X.js";
|
|
9
9
|
import "./Functions-7jnEwJyw.js";
|
|
10
10
|
import "clsx";
|
|
11
11
|
import "tailwind-merge";
|
|
@@ -51,7 +51,7 @@ import "himalaya";
|
|
|
51
51
|
import "lucide-react";
|
|
52
52
|
import "./web-blocks.js";
|
|
53
53
|
import "./empty-slot-MWycClTb.js";
|
|
54
|
-
const x = i.lazy(() => import("./add-page-modal-
|
|
54
|
+
const x = i.lazy(() => import("./add-page-modal-7djj9GZj.js")), g = i.lazy(() => import("./page-viewer-xPLhXv6k.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"),u=require("react"),i=require("lodash-es"),s=require("./index-
|
|
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;
|
|
@@ -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-
|
|
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,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 {
|
|
5
|
-
import { c as h, b as g } from "./index-
|
|
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
7
|
import "./Functions-7jnEwJyw.js";
|
|
8
8
|
import "clsx";
|
|
@@ -51,7 +51,7 @@ import "himalaya";
|
|
|
51
51
|
import "lucide-react";
|
|
52
52
|
import "./web-blocks.js";
|
|
53
53
|
import "./empty-slot-MWycClTb.js";
|
|
54
|
-
const N = m.lazy(() => import("./project-general-setting-
|
|
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) ? {
|
|
55
55
|
...r,
|
|
56
56
|
seoData: { title: "", description: "", image: "" }
|
|
57
57
|
} : r;
|