@chaibuilder/sdk 1.1.6 → 1.1.8
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/{CanvasArea-KFawx0_w.cjs → CanvasArea-0dMH8DLY.cjs} +3 -3
- package/dist/{CanvasArea-p6CzaMHZ.js → CanvasArea-qr3Iv0Xx.js} +6 -5
- package/dist/{CurrentPage-OBL3g4Yi.js → CurrentPage-XW_-vuBP.js} +1 -1
- package/dist/{CurrentPage-ryaNOdBG.cjs → CurrentPage-xRSxWOUz.cjs} +1 -1
- package/dist/{Layers-vPWQ37qV.cjs → Layers-fvXADkdU.cjs} +1 -1
- package/dist/{Layers-pRp3dQbJ.js → Layers-urjdDTKB.js} +116 -109
- package/dist/{PagesPanel-TZHquhPp.js → PagesPanel-ID_Vm6CO.js} +2 -2
- package/dist/{PagesPanel-UNyNf9Wa.cjs → PagesPanel-SkDUfIP1.cjs} +1 -1
- package/dist/{ProjectPanel-DSOTTM6w.js → ProjectPanel-_XAgk4uz.js} +2 -2
- package/dist/{ProjectPanel-qEHWFzZ5.cjs → ProjectPanel-tbw24HmR.cjs} +1 -1
- package/dist/Settings-CchIkXh7.cjs +1 -0
- package/dist/{Settings-1hWFfjOz.js → Settings-b5UJ1CbF.js} +99 -102
- package/dist/{SidePanels-nBn4Vra0.js → SidePanels-BH-IFPaj.js} +6 -6
- package/dist/{SidePanels-ZI1zShFi.cjs → SidePanels-cPyWHJGN.cjs} +1 -1
- package/dist/{add-page-modal-heUSalDc.cjs → add-page-modal-FSnagas1.cjs} +1 -1
- package/dist/{add-page-modal-TfhubZar.js → add-page-modal-ZvUYpd4h.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-Mc9nqfGb.js → delete-page-modal-4MVbQbIE.js} +1 -1
- package/dist/{delete-page-modal-JMQ8sF7h.cjs → delete-page-modal-DAFOspX2.cjs} +1 -1
- package/dist/{index-pJ41X3Ih.js → index-LOLasIJD.js} +4 -4
- package/dist/{index-baStnHeY.cjs → index-rhyb2TB9.cjs} +1 -1
- package/dist/{page-viewer-uKAAjMDq.cjs → page-viewer-V6dlnIHN.cjs} +1 -1
- package/dist/{page-viewer-Mn1PepVx.js → page-viewer-r_ZdpaXh.js} +2 -2
- package/dist/{project-general-setting-m4GpLeXe.js → project-general-setting-6kSqNVU3.js} +1 -1
- package/dist/{project-general-setting-f2rTQuKG.cjs → project-general-setting-Dh5ki1wJ.cjs} +1 -1
- package/dist/{single-page-detail-pwJc4U2h.cjs → single-page-detail-E3QAv3RO.cjs} +1 -1
- package/dist/{single-page-detail-EJF2UsAE.js → single-page-detail-LTirOwox.js} +2 -2
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +1 -1
- package/package.json +1 -1
- package/dist/Settings-kKh1orAV.cjs +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { nth as
|
|
3
|
-
import { BoxModelIcon as
|
|
4
|
-
import { useDrop as
|
|
5
|
-
import { useDragOver as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { DatabaseIcon as
|
|
2
|
+
import { nth as y, startsWith as A, map as w, isUndefined as E, find as H, isEmpty as P, includes as L } from "lodash";
|
|
3
|
+
import { BoxModelIcon as z, BoxIcon as V, DragHandleHorizontalIcon as F, ViewHorizontalIcon as G, BorderAllIcon as $, BorderTopIcon as K, TableIcon as Q, DropdownMenuIcon as U, RadiobuttonIcon as Y, InputIcon as q, ButtonIcon as B, CheckboxIcon as W, GroupIcon as Z, SpaceBetweenVerticallyIcon as J, ColumnsIcon as X, RowsIcon as C, TextIcon as v, SketchLogoIcon as ee, DividerHorizontalIcon as te, CodeIcon as se, CursorTextIcon as oe, VideoIcon as ne, Link1Icon as re, HeadingIcon as ae, ImageIcon as ce, TriangleRightIcon as le, ScissorsIcon as ie, ClipboardIcon as xe, TrashIcon as de, GlobeIcon as me, CopyIcon as pe, ClipboardCopyIcon as ue, DoubleArrowDownIcon as ge, StackIcon as je } from "@radix-ui/react-icons";
|
|
4
|
+
import { useDrop as he, useDragLayer as be } from "react-dnd";
|
|
5
|
+
import { useDragOver as fe, Tree as Ie } from "@minoru/react-dnd-treeview";
|
|
6
|
+
import { useTranslation as ke } from "react-i18next";
|
|
7
|
+
import { _ as ye, Z as Be, j as g, n as Ce, bz as i, k as ve, l as we, a6 as Se, m as De, o as Te, i as Ne, bA as Me, ak as Oe, al as Re, bB as _e, bC as Ae, ae as Ee, w as He, aj as Pe, p as Le, aw as ze, bo as Ve, bD as Fe } from "./index-bKgIzodL.js";
|
|
8
|
+
import { DatabaseIcon as Ge } from "lucide-react";
|
|
9
9
|
import "./lib.js";
|
|
10
|
-
import { useMemo as
|
|
11
|
-
import { a as
|
|
12
|
-
import { c as
|
|
13
|
-
import { f as
|
|
14
|
-
import { useAtom as
|
|
15
|
-
import { u as
|
|
10
|
+
import { useMemo as $e, lazy as Ke, useCallback as Qe, useState as Ue, Suspense as Ye } from "react";
|
|
11
|
+
import { a as qe } from "./MODIFIERS-MLfpKQY1.js";
|
|
12
|
+
import { c as S } from "./utils-PPBbw5bk.js";
|
|
13
|
+
import { f as We } from "./index-LOLasIJD.js";
|
|
14
|
+
import { useAtom as Ze } from "jotai";
|
|
15
|
+
import { u as Je } from "./useAddBlockByDrop-LM3owe-j.js";
|
|
16
16
|
import "@radix-ui/react-toggle";
|
|
17
17
|
import "class-variance-authority";
|
|
18
18
|
import "@radix-ui/react-switch";
|
|
@@ -57,70 +57,70 @@ import "react-textarea-autosize";
|
|
|
57
57
|
import "flagged";
|
|
58
58
|
import "react-hotkeys-hook";
|
|
59
59
|
import "sonner";
|
|
60
|
-
const
|
|
60
|
+
const D = (t) => {
|
|
61
61
|
switch (t.type) {
|
|
62
62
|
case "Image":
|
|
63
|
-
return /* @__PURE__ */ e.jsx(
|
|
63
|
+
return /* @__PURE__ */ e.jsx(ce, {});
|
|
64
64
|
case "Heading":
|
|
65
|
-
return /* @__PURE__ */ e.jsx(
|
|
65
|
+
return /* @__PURE__ */ e.jsx(ae, {});
|
|
66
66
|
case "Text":
|
|
67
|
-
return /* @__PURE__ */ e.jsx(
|
|
67
|
+
return /* @__PURE__ */ e.jsx(v, {});
|
|
68
68
|
case "Link":
|
|
69
|
-
return /* @__PURE__ */ e.jsx(
|
|
69
|
+
return /* @__PURE__ */ e.jsx(re, {});
|
|
70
70
|
case "Video":
|
|
71
|
-
return /* @__PURE__ */ e.jsx(
|
|
71
|
+
return /* @__PURE__ */ e.jsx(ne, {});
|
|
72
72
|
case "RichText":
|
|
73
|
-
return /* @__PURE__ */ e.jsx(
|
|
73
|
+
return /* @__PURE__ */ e.jsx(oe, {});
|
|
74
74
|
case "Button":
|
|
75
|
-
return /* @__PURE__ */ e.jsx(
|
|
75
|
+
return /* @__PURE__ */ e.jsx(B, {});
|
|
76
76
|
case "CustomHTML":
|
|
77
|
-
return /* @__PURE__ */ e.jsx(
|
|
77
|
+
return /* @__PURE__ */ e.jsx(se, {});
|
|
78
78
|
case "Divider":
|
|
79
|
-
return /* @__PURE__ */ e.jsx(
|
|
79
|
+
return /* @__PURE__ */ e.jsx(te, {});
|
|
80
80
|
case "Icon":
|
|
81
|
-
return /* @__PURE__ */ e.jsx(
|
|
81
|
+
return /* @__PURE__ */ e.jsx(ee, {});
|
|
82
82
|
case "List":
|
|
83
|
-
return /* @__PURE__ */ e.jsx(B, {});
|
|
84
|
-
case "Paragraph":
|
|
85
83
|
return /* @__PURE__ */ e.jsx(C, {});
|
|
84
|
+
case "Paragraph":
|
|
85
|
+
return /* @__PURE__ */ e.jsx(v, {});
|
|
86
86
|
case "Row":
|
|
87
|
-
return /* @__PURE__ */ e.jsx(
|
|
87
|
+
return /* @__PURE__ */ e.jsx(C, {});
|
|
88
88
|
case "ListItem":
|
|
89
|
-
return /* @__PURE__ */ e.jsx(
|
|
89
|
+
return /* @__PURE__ */ e.jsx(X, {});
|
|
90
90
|
case "LineBreak":
|
|
91
|
-
return /* @__PURE__ */ e.jsx(
|
|
91
|
+
return /* @__PURE__ */ e.jsx(J, {});
|
|
92
92
|
case "Form":
|
|
93
|
-
return /* @__PURE__ */ e.jsx(
|
|
93
|
+
return /* @__PURE__ */ e.jsx(Z, {});
|
|
94
94
|
case "Checkbox":
|
|
95
|
-
return /* @__PURE__ */ e.jsx(
|
|
95
|
+
return /* @__PURE__ */ e.jsx(W, {});
|
|
96
96
|
case "FormButton":
|
|
97
|
-
return /* @__PURE__ */ e.jsx(
|
|
97
|
+
return /* @__PURE__ */ e.jsx(B, {});
|
|
98
98
|
case "Input":
|
|
99
99
|
case "TextArea":
|
|
100
|
-
return /* @__PURE__ */ e.jsx(
|
|
100
|
+
return /* @__PURE__ */ e.jsx(q, {});
|
|
101
101
|
case "Radio":
|
|
102
|
-
return /* @__PURE__ */ e.jsx(
|
|
102
|
+
return /* @__PURE__ */ e.jsx(Y, {});
|
|
103
103
|
case "Select":
|
|
104
|
-
return /* @__PURE__ */ e.jsx(
|
|
104
|
+
return /* @__PURE__ */ e.jsx(U, {});
|
|
105
105
|
case "Table":
|
|
106
|
-
return /* @__PURE__ */ e.jsx(
|
|
106
|
+
return /* @__PURE__ */ e.jsx(Q, {});
|
|
107
107
|
case "TableHead":
|
|
108
|
-
return /* @__PURE__ */ e.jsx(
|
|
108
|
+
return /* @__PURE__ */ e.jsx(K, {});
|
|
109
109
|
case "TableBody":
|
|
110
|
-
return /* @__PURE__ */ e.jsx(
|
|
110
|
+
return /* @__PURE__ */ e.jsx($, {});
|
|
111
111
|
case "TableRow":
|
|
112
|
-
return /* @__PURE__ */ e.jsx(
|
|
112
|
+
return /* @__PURE__ */ e.jsx(G, {});
|
|
113
113
|
case "TableCell":
|
|
114
|
-
return /* @__PURE__ */ e.jsx(
|
|
114
|
+
return /* @__PURE__ */ e.jsx(F, {});
|
|
115
115
|
case "DataProvider":
|
|
116
|
-
return /* @__PURE__ */ e.jsx(
|
|
116
|
+
return /* @__PURE__ */ e.jsx(Ge, { size: 16 });
|
|
117
117
|
case "Box":
|
|
118
|
-
return /* @__PURE__ */ e.jsx(
|
|
118
|
+
return /* @__PURE__ */ e.jsx(V, {});
|
|
119
119
|
default:
|
|
120
|
-
return /* @__PURE__ */ e.jsx(
|
|
120
|
+
return /* @__PURE__ */ e.jsx(z, {});
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function Xe(t = "") {
|
|
124
124
|
const s = {
|
|
125
125
|
xs: "390px",
|
|
126
126
|
sm: "640px",
|
|
@@ -138,23 +138,23 @@ function Je(t = "") {
|
|
|
138
138
|
// checks if any of the display property is set for any higher media query
|
|
139
139
|
/\b(sm|md|lg|xl|2xl):(block|grid|flex|inline|inline-grid|inline-flex|inline-block)\b/
|
|
140
140
|
), c = t.match(a);
|
|
141
|
-
if (
|
|
142
|
-
return `Visible >=${s[
|
|
141
|
+
if (y(c, 1))
|
|
142
|
+
return `Visible >=${s[y(c, 1)]}`;
|
|
143
143
|
}
|
|
144
144
|
return "";
|
|
145
145
|
}
|
|
146
|
-
const
|
|
146
|
+
const et = (t) => {
|
|
147
147
|
let s = "";
|
|
148
148
|
return Object.keys(t).forEach((o) => {
|
|
149
|
-
|
|
149
|
+
A(t[o], qe) && (s = t[o]);
|
|
150
150
|
}), s;
|
|
151
|
-
},
|
|
151
|
+
}, tt = (t) => {
|
|
152
152
|
var p;
|
|
153
|
-
const [, s] =
|
|
153
|
+
const [, s] = ye(), [o] = Be(), { isSelected: r } = t, { id: a, data: c } = t.node, x = t.depth * 10, d = (l) => {
|
|
154
154
|
l.stopPropagation(), t.onToggle(t.node.id);
|
|
155
|
-
}, j =
|
|
156
|
-
const l =
|
|
157
|
-
return
|
|
155
|
+
}, j = fe(a, t.isOpen, t.onToggle), m = $e(() => {
|
|
156
|
+
const l = et(t.node.data);
|
|
157
|
+
return Xe(l);
|
|
158
158
|
}, [t.node.data]);
|
|
159
159
|
return (
|
|
160
160
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
@@ -162,7 +162,7 @@ const Xe = (t) => {
|
|
|
162
162
|
"div",
|
|
163
163
|
{
|
|
164
164
|
onMouseEnter: () => s(a),
|
|
165
|
-
className:
|
|
165
|
+
className: S(
|
|
166
166
|
"group flex w-full items-center justify-between space-x-px py-px ",
|
|
167
167
|
r ? "bg-blue-500 text-white" : "hover:bg-gray-200 dark:hover:bg-gray-800"
|
|
168
168
|
),
|
|
@@ -177,11 +177,11 @@ const Xe = (t) => {
|
|
|
177
177
|
"div",
|
|
178
178
|
{
|
|
179
179
|
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" : ""}`,
|
|
180
|
-
children: t.node.droppable && /* @__PURE__ */ e.jsx("button", { onClick: d, type: "button", children: /* @__PURE__ */ e.jsx(
|
|
180
|
+
children: t.node.droppable && /* @__PURE__ */ e.jsx("button", { onClick: d, type: "button", children: /* @__PURE__ */ e.jsx(le, {}) })
|
|
181
181
|
}
|
|
182
182
|
),
|
|
183
183
|
/* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex items-center", children: [
|
|
184
|
-
/* @__PURE__ */ e.jsx("div", { className: "-mt-1 h-3 w-3", children: /* @__PURE__ */ e.jsx(
|
|
184
|
+
/* @__PURE__ */ e.jsx("div", { className: "-mt-1 h-3 w-3", children: /* @__PURE__ */ e.jsx(D, { type: c == null ? void 0 : c._type }) }),
|
|
185
185
|
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: ((p = t.node.data) == null ? void 0 : p._name) || t.node.text }),
|
|
186
186
|
m ? /* @__PURE__ */ e.jsxs(
|
|
187
187
|
"span",
|
|
@@ -199,30 +199,30 @@ const Xe = (t) => {
|
|
|
199
199
|
}
|
|
200
200
|
)
|
|
201
201
|
);
|
|
202
|
-
},
|
|
202
|
+
}, st = (t) => {
|
|
203
203
|
var o;
|
|
204
204
|
const { item: s } = t.monitorProps;
|
|
205
205
|
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: [
|
|
206
|
-
/* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(
|
|
206
|
+
/* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(D, { type: (o = s == null ? void 0 : s.data) == null ? void 0 : o._type }) }),
|
|
207
207
|
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: s.text })
|
|
208
208
|
] });
|
|
209
|
-
},
|
|
209
|
+
}, ot = (t) => {
|
|
210
210
|
const s = t.depth * 10 + 16;
|
|
211
211
|
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 } });
|
|
212
|
-
},
|
|
213
|
-
const [t] = g(), [, s] =
|
|
212
|
+
}, nt = Ke(() => import("./MarkAsGlobalBlock-vWOYzFKX.js")), rt = () => {
|
|
213
|
+
const [t] = g(), [, s] = Ce();
|
|
214
214
|
return /* @__PURE__ */ e.jsxs(i, { className: "flex items-center gap-x-4 text-xs", onClick: () => s(t), children: [
|
|
215
|
-
/* @__PURE__ */ e.jsx(
|
|
215
|
+
/* @__PURE__ */ e.jsx(ie, {}),
|
|
216
216
|
" Cut"
|
|
217
217
|
] });
|
|
218
|
-
},
|
|
219
|
-
const [t] = g(), [, s] =
|
|
218
|
+
}, at = () => {
|
|
219
|
+
const [t] = g(), [, s] = ve();
|
|
220
220
|
return /* @__PURE__ */ e.jsxs(i, { className: "flex items-center gap-x-4 text-xs", onClick: () => s(t), children: [
|
|
221
|
-
/* @__PURE__ */ e.jsx(
|
|
221
|
+
/* @__PURE__ */ e.jsx(xe, {}),
|
|
222
222
|
" Copy"
|
|
223
223
|
] });
|
|
224
|
-
},
|
|
225
|
-
const [t] = g(), s =
|
|
224
|
+
}, ct = () => {
|
|
225
|
+
const [t] = g(), s = we(), o = Se();
|
|
226
226
|
return /* @__PURE__ */ e.jsxs(
|
|
227
227
|
i,
|
|
228
228
|
{
|
|
@@ -230,29 +230,29 @@ const Xe = (t) => {
|
|
|
230
230
|
className: "flex items-center gap-x-4 text-xs",
|
|
231
231
|
onClick: () => s(t),
|
|
232
232
|
children: [
|
|
233
|
-
/* @__PURE__ */ e.jsx(
|
|
233
|
+
/* @__PURE__ */ e.jsx(de, {}),
|
|
234
234
|
" Remove"
|
|
235
235
|
]
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
|
-
},
|
|
238
|
+
}, lt = ({
|
|
239
239
|
id: t = null,
|
|
240
240
|
openMarkAsGlobalModal: s
|
|
241
241
|
}) => {
|
|
242
|
-
const [o] = g(), r =
|
|
242
|
+
const [o] = g(), r = De(), { pasteBlocks: a, canPaste: c } = Te(), x = Ne("globalBlocksSupport", !1), d = Qe(() => {
|
|
243
243
|
r(o);
|
|
244
244
|
}, [o, r]);
|
|
245
|
-
return /* @__PURE__ */ e.jsxs(
|
|
245
|
+
return /* @__PURE__ */ e.jsxs(Me, { className: "text-xs", children: [
|
|
246
246
|
x && /* @__PURE__ */ e.jsx(i, { className: "flex items-center gap-x-4 border-b text-xs", onClick: s, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-4", children: [
|
|
247
|
-
/* @__PURE__ */ e.jsx(
|
|
247
|
+
/* @__PURE__ */ e.jsx(me, {}),
|
|
248
248
|
" Mark as global"
|
|
249
249
|
] }) }),
|
|
250
250
|
/* @__PURE__ */ e.jsxs(i, { className: "flex items-center gap-x-4 text-xs", onClick: d, children: [
|
|
251
|
-
/* @__PURE__ */ e.jsx(
|
|
251
|
+
/* @__PURE__ */ e.jsx(pe, {}),
|
|
252
252
|
" Duplicate"
|
|
253
253
|
] }),
|
|
254
|
-
/* @__PURE__ */ e.jsx(nt, {}),
|
|
255
254
|
/* @__PURE__ */ e.jsx(rt, {}),
|
|
255
|
+
/* @__PURE__ */ e.jsx(at, {}),
|
|
256
256
|
/* @__PURE__ */ e.jsxs(
|
|
257
257
|
i,
|
|
258
258
|
{
|
|
@@ -260,25 +260,25 @@ const Xe = (t) => {
|
|
|
260
260
|
onClick: () => a(t),
|
|
261
261
|
disabled: !c,
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */ e.jsx(
|
|
263
|
+
/* @__PURE__ */ e.jsx(ue, {}),
|
|
264
264
|
" Paste"
|
|
265
265
|
]
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
|
-
/* @__PURE__ */ e.jsx(
|
|
268
|
+
/* @__PURE__ */ e.jsx(ct, {})
|
|
269
269
|
] });
|
|
270
|
-
},
|
|
271
|
-
const [o, r] =
|
|
270
|
+
}, it = ({ children: t, id: s = null }) => {
|
|
271
|
+
const [o, r] = Ue(!1);
|
|
272
272
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
273
|
-
/* @__PURE__ */ e.jsx(
|
|
274
|
-
/* @__PURE__ */ e.jsxs(
|
|
275
|
-
/* @__PURE__ */ e.jsx(
|
|
276
|
-
/* @__PURE__ */ e.jsx(
|
|
273
|
+
/* @__PURE__ */ e.jsx(Oe, { open: o, onOpenChange: r, children: o && /* @__PURE__ */ e.jsx(Re, { children: /* @__PURE__ */ e.jsx(Ye, { fallback: /* @__PURE__ */ e.jsx("div", { className: "h-96 w-full animate-pulse bg-gray-200" }), children: /* @__PURE__ */ e.jsx(nt, { closeModal: () => r(!1), id: s }) }) }) }),
|
|
274
|
+
/* @__PURE__ */ e.jsxs(_e, { children: [
|
|
275
|
+
/* @__PURE__ */ e.jsx(Ae, { children: t }),
|
|
276
|
+
/* @__PURE__ */ e.jsx(lt, { id: s, openMarkAsGlobalModal: () => r(!0) })
|
|
277
277
|
] })
|
|
278
278
|
] });
|
|
279
279
|
};
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function xt(t) {
|
|
281
|
+
return w(t, (s) => {
|
|
282
282
|
const { data: o } = s;
|
|
283
283
|
return {
|
|
284
284
|
...o,
|
|
@@ -286,19 +286,26 @@ function it(t) {
|
|
|
286
286
|
};
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
const t =
|
|
291
|
-
const { dragSource: b, relativeIndex: f, dropTargetId: I, monitor:
|
|
292
|
-
|
|
293
|
-
|
|
289
|
+
const js = () => {
|
|
290
|
+
const t = Ee(), [s] = He(), [o, r, a] = g(), [, c] = Pe(), { t: x } = ke(), { createSnapshot: d } = Le(), j = We(), m = Je(), [, p] = Ze(ze), l = async (n, u) => {
|
|
291
|
+
const { dragSource: b, relativeIndex: f, dropTargetId: I, monitor: k } = u;
|
|
292
|
+
if (b) {
|
|
293
|
+
d();
|
|
294
|
+
const R = xt(n);
|
|
295
|
+
s(R);
|
|
296
|
+
const _ = k.getItem();
|
|
297
|
+
r([_.id]);
|
|
298
|
+
} else
|
|
299
|
+
await m({ block: k.getItem(), dropTargetId: I, relativeIndex: f }), p(!1);
|
|
300
|
+
}, T = w(t, (n) => ({
|
|
294
301
|
id: n._id,
|
|
295
302
|
text: n._type,
|
|
296
303
|
parent: n._parent || 0,
|
|
297
|
-
droppable: !
|
|
304
|
+
droppable: !E(H(t, { _parent: n._id })),
|
|
298
305
|
data: n
|
|
299
|
-
})),
|
|
306
|
+
})), N = () => {
|
|
300
307
|
r([]), c([]);
|
|
301
|
-
}, [{ isOver: h },
|
|
308
|
+
}, [{ isOver: h }, M] = he(() => ({
|
|
302
309
|
accept: ["CHAI_BLOCK"],
|
|
303
310
|
collect: (n) => ({
|
|
304
311
|
canDrop: n.canDrop(),
|
|
@@ -311,41 +318,41 @@ const gs = () => {
|
|
|
311
318
|
relativeIndex: 0
|
|
312
319
|
}), p(!1)))();
|
|
313
320
|
}
|
|
314
|
-
})), { isDragging:
|
|
321
|
+
})), { isDragging: O } = be((n) => ({
|
|
315
322
|
isDragging: n.isDragging()
|
|
316
323
|
}));
|
|
317
324
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
318
325
|
"div",
|
|
319
326
|
{
|
|
320
|
-
onClick: () =>
|
|
321
|
-
className:
|
|
327
|
+
onClick: () => N(),
|
|
328
|
+
className: S(
|
|
322
329
|
"-mx-1 -mt-1 flex h-full select-none flex-col space-y-1",
|
|
323
|
-
|
|
330
|
+
O ? "bg-green-50/80" : "bg-background"
|
|
324
331
|
),
|
|
325
|
-
children:
|
|
332
|
+
children: P(t) ? /* @__PURE__ */ e.jsxs(
|
|
326
333
|
"div",
|
|
327
334
|
{
|
|
328
|
-
ref:
|
|
335
|
+
ref: M,
|
|
329
336
|
className: `mx-1 mt-4 max-w-full h-full p-6 text-center text-sm text-gray-400 ${h ? "bg-blue-200" : ""}`,
|
|
330
337
|
children: [
|
|
331
|
-
h ? /* @__PURE__ */ e.jsx(
|
|
338
|
+
h ? /* @__PURE__ */ e.jsx(ge, { className: "mx-auto h-12 w-12 animate-bounce" }) : /* @__PURE__ */ e.jsx(je, { className: "mx-auto h-10 w-10" }),
|
|
332
339
|
/* @__PURE__ */ e.jsx("p", { className: "mt-2", children: x(h ? "drop_here_message" : "tree_view_no_blocks") })
|
|
333
340
|
]
|
|
334
341
|
}
|
|
335
|
-
) : /* @__PURE__ */ e.jsx(
|
|
336
|
-
|
|
342
|
+
) : /* @__PURE__ */ e.jsx(Ve, { id: "layers-view", className: "no-scrollbar h-full overflow-y-auto p-1", children: /* @__PURE__ */ e.jsx(
|
|
343
|
+
Ie,
|
|
337
344
|
{
|
|
338
345
|
initialOpen: j,
|
|
339
346
|
extraAcceptTypes: ["CHAI_BLOCK"],
|
|
340
|
-
tree:
|
|
347
|
+
tree: T,
|
|
341
348
|
rootId: 0,
|
|
342
|
-
render: (n, { depth: u, isOpen: b, onToggle: f }) => /* @__PURE__ */ e.jsx(
|
|
343
|
-
|
|
349
|
+
render: (n, { depth: u, isOpen: b, onToggle: f }) => /* @__PURE__ */ e.jsx(it, { id: n.id, children: /* @__PURE__ */ e.jsx(
|
|
350
|
+
tt,
|
|
344
351
|
{
|
|
345
352
|
onSelect: (I) => {
|
|
346
353
|
c([]), r([I]);
|
|
347
354
|
},
|
|
348
|
-
isSelected:
|
|
355
|
+
isSelected: L(o, n.id),
|
|
349
356
|
node: n,
|
|
350
357
|
depth: u,
|
|
351
358
|
isOpen: b,
|
|
@@ -353,7 +360,7 @@ const gs = () => {
|
|
|
353
360
|
toggleIds: a
|
|
354
361
|
}
|
|
355
362
|
) }),
|
|
356
|
-
dragPreviewRender: (n) => /* @__PURE__ */ e.jsx(
|
|
363
|
+
dragPreviewRender: (n) => /* @__PURE__ */ e.jsx(st, { monitorProps: n }),
|
|
357
364
|
onDrop: l,
|
|
358
365
|
classes: {
|
|
359
366
|
root: "h-full pt-2",
|
|
@@ -363,15 +370,15 @@ const gs = () => {
|
|
|
363
370
|
},
|
|
364
371
|
sort: !1,
|
|
365
372
|
insertDroppableFirst: !1,
|
|
366
|
-
canDrop:
|
|
373
|
+
canDrop: Fe,
|
|
367
374
|
dropTargetOffset: 2,
|
|
368
375
|
enableAnimateExpand: !0,
|
|
369
|
-
placeholderRender: (n, { depth: u }) => /* @__PURE__ */ e.jsx(
|
|
376
|
+
placeholderRender: (n, { depth: u }) => /* @__PURE__ */ e.jsx(ot, { node: n, depth: u })
|
|
370
377
|
}
|
|
371
378
|
) })
|
|
372
379
|
}
|
|
373
380
|
) });
|
|
374
381
|
};
|
|
375
382
|
export {
|
|
376
|
-
|
|
383
|
+
js as default
|
|
377
384
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import i, { Suspense as s } from "react";
|
|
3
3
|
import { sortBy as a, filter as d, get as n } from "lodash";
|
|
4
|
-
import { a as l, b as c } from "./index-
|
|
4
|
+
import { a as l, b as c } from "./index-LOLasIJD.js";
|
|
5
5
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import "react-i18next";
|
|
@@ -56,7 +56,7 @@ import "./tailwind-config-d1VL1lzE.js";
|
|
|
56
56
|
import "react-hotkeys-hook";
|
|
57
57
|
import "sonner";
|
|
58
58
|
import "lucide-react";
|
|
59
|
-
const x = i.lazy(() => import("./add-page-modal-
|
|
59
|
+
const x = i.lazy(() => import("./add-page-modal-ZvUYpd4h.js")), g = i.lazy(() => import("./page-viewer-r_ZdpaXh.js")), bt = () => {
|
|
60
60
|
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);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
62
62
|
/* @__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-WUGKV8jN.cjs"),u=require("react"),i=require("lodash"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),u=require("react"),i=require("lodash"),s=require("./index-rhyb2TB9.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("i18next");require("react-i18next");require("./index-U_pW4Tkc.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("sonner");require("lucide-react");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-FSnagas1.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-V6dlnIHN.cjs"))),d=()=>{const{data:q=[],isLoading:t}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(q,{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:t,pages:n})})]})};exports.default=d;
|
|
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-NV737rRe.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";
|
|
4
4
|
import { bh as h, bi as n, bj as l, bk as c } from "./index-bKgIzodL.js";
|
|
5
|
-
import { c as f, b as g } from "./index-
|
|
5
|
+
import { c as f, b as g } from "./index-LOLasIJD.js";
|
|
6
6
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
@@ -56,7 +56,7 @@ import "./tailwind-config-d1VL1lzE.js";
|
|
|
56
56
|
import "react-hotkeys-hook";
|
|
57
57
|
import "sonner";
|
|
58
58
|
import "lucide-react";
|
|
59
|
-
const N = m.lazy(() => import("./project-general-setting-
|
|
59
|
+
const N = m.lazy(() => import("./project-general-setting-6kSqNVU3.js")), S = m.lazy(() => import("./project-seo-setting-dRUW-Zmp.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) ? {
|
|
60
60
|
...r,
|
|
61
61
|
seoData: { title: "", description: "", image: "" }
|
|
62
62
|
} : r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("react"),x=require("lodash"),s=require("./index-U_pW4Tkc.cjs"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("react"),x=require("lodash"),s=require("./index-U_pW4Tkc.cjs"),a=require("./index-rhyb2TB9.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("sonner");require("lucide-react");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-Dh5ki1wJ.cjs"))),q=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-57XXrUTn.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 m(){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(q,{_projectData:i,seany:o})})})]})]})})]})}exports.default=m;
|