@chaibuilder/sdk 1.2.25 → 1.2.27
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-S-4jzdWv.cjs +1 -0
- package/dist/AddBlocks-ksZjjn0k.js +205 -0
- package/dist/BrandingOptions-EMCT0Wa3.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-T_kbQFQv.js} +53 -40
- package/dist/CanvasArea-SDzbubar.cjs +55 -0
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-rhOeubmu.js} +323 -340
- package/dist/{Class-ahc3NIbq.js → Class-3k8xjeiM.js} +29 -26
- package/dist/Class-MmCxz2Ay.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-0eeU1V_c.js} +53 -40
- package/dist/CurrentPage-aTjWjc3o.cjs +1 -0
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-Muu4rAtp.js} +96 -87
- package/dist/ListTree-SWsqdfcG.cjs +1 -0
- package/dist/MODIFIERS-9EwxLM8V.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-WQdaNvb8.js} +8 -10
- package/dist/PagesPanel-n3x-0ozR.cjs +1 -0
- package/dist/{PagesPanel-u1IB-nRr.js → PagesPanel-rYN28QpN.js} +44 -29
- package/dist/ProjectPanel-ivFOhdcz.js +84 -0
- package/dist/ProjectPanel-pBePMOta.cjs +1 -0
- package/dist/Settings-JRyJayf5.cjs +1 -0
- package/dist/{Settings-jCcd-VE6.js → Settings-XWmKzRl9.js} +400 -407
- package/dist/SidePanels-BtUeo6M9.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-ODktnGbC.js} +117 -108
- package/dist/Topbar-QMeD3hvq.cjs +1 -0
- package/dist/Topbar-Yunooh00.js +131 -0
- package/dist/UnsplashImages-05JR8oIu.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-QMl0bxix.js} +59 -47
- package/dist/UploadImages-OgSN1HVt.cjs +1 -0
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-Si-A26bc.js} +58 -36
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal-9pTKItY-.cjs +1 -0
- package/dist/add-page-modal-U7AUUrI1.js +103 -0
- package/dist/confirm-alert-DhRc-Zcd.cjs +1 -0
- package/dist/confirm-alert-kV5-c70T.js +59 -0
- package/dist/controls-KK2oLIa8.cjs +1 -0
- package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +74 -150
- package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-gunU_Fe5.js} +8 -6
- package/dist/delete-page-modal-4s-6AIy4.cjs +1 -0
- package/dist/delete-page-modal-UCBpdjLe.js +82 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +292 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +36 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/form-Ap63cNec.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-zmlTjM9j.js} +12 -12
- package/dist/html-to-json-C_Eobs_d.cjs +1 -0
- package/dist/{html-to-json-2xtb7520.js → html-to-json-p__Fgqdg.js} +65 -40
- package/dist/index-CFUoB97-.js +3079 -0
- package/dist/index-F4AQQ6qq.cjs +1 -0
- package/dist/index-Qk028f-N.cjs +1 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/index-f0AbmoYY.js +2201 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/index-l19JVVXI.cjs +206 -0
- package/dist/index-lOJfSheQ.js +39503 -0
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
- package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +59 -56
- package/dist/page-viewer-YFrIG3L7.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-jOwy--9A.js} +56 -43
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-3N8HZ2fe.js} +42 -35
- package/dist/project-general-setting-hK7I7FuN.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-bSiNgO_1.js} +39 -23
- package/dist/project-seo-setting-x-FK0pez.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +16 -16
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail--AZlZ-pC.js} +73 -66
- package/dist/single-page-detail-9abF2g2R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +39 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +158 -364
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1052 -3
- package/package.json +1 -1
- package/dist/AddBlocks-Ol3iIVKa.js +0 -207
- package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
- package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
- package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
- package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
- package/dist/Class-eieto7e-.cjs +0 -1
- package/dist/Controls-3Cc1XYXg.js +0 -105
- package/dist/Controls-ky25Ebo3.cjs +0 -1
- package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
- package/dist/Functions-Hvon6AMZ.cjs +0 -1
- package/dist/Functions-NzT2Six_.js +0 -15
- package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
- package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
- package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
- package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
- package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
- package/dist/STRINGS-b432aBJJ.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/Settings-8ilCSH8b.cjs +0 -1
- package/dist/SidePanels-T36C6Lhc.cjs +0 -1
- package/dist/Topbar-CvWQuspR.cjs +0 -1
- package/dist/Topbar-pbIDUE_B.js +0 -122
- package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
- package/dist/UploadImages-GkkJVAgG.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
- package/dist/add-page-modal-JCDXZIPW.js +0 -95
- package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
- package/dist/alert-dialog-rypfO5ly.js +0 -64
- package/dist/badge-E-S7CqUt.cjs +0 -1
- package/dist/badge-tEwO7C51.js +0 -23
- package/dist/block-helpers-OKHmRRol.cjs +0 -1
- package/dist/block-helpers-oSFpSsGz.js +0 -23
- package/dist/command-BxR6jaCI.cjs +0 -1
- package/dist/command-Pn3HKDuV.js +0 -97
- package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
- package/dist/confirm-alert-wR5_VJ1l.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-L7DPvB0m.cjs +0 -1
- package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
- package/dist/delete-page-modal-7KmP1elv.js +0 -67
- package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
- package/dist/dropdown-menu-El86_9Uo.js +0 -124
- package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
- package/dist/form-W58AVUdf.cjs +0 -1
- package/dist/hover-card-KUwpDkW8.cjs +0 -1
- package/dist/hover-card-q138xxXR.js +0 -45
- package/dist/html-to-json-uSnxl72F.cjs +0 -1
- package/dist/iconBase-gbUAAO2L.cjs +0 -1
- package/dist/iconBase-h4DuR_XT.js +0 -63
- package/dist/index-9MmykVSc.cjs +0 -1
- package/dist/index-hElOGcFr.js +0 -2200
- package/dist/index-lDTsQp7h.js +0 -188
- package/dist/index-rq5Y9ZDy.cjs +0 -1
- package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-WbcKdQ9k.cjs +0 -1
- package/dist/link-xuhP-4dN.js +0 -196
- package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
- package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-beY0MT1b.cjs +0 -1
- package/dist/skeleton-STeL9VrJ.cjs +0 -1
- package/dist/skeleton-lu8e7q2y.js +0 -239
- package/dist/tabs-_4WbA1cc.cjs +0 -1
- package/dist/tabs-yQ3oGziM.js +0 -106
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
- package/dist/useAddBlock-FEKFJNwQ.js +0 -69
- package/dist/useChaiExternalData-fkFgoS80.js +0 -6
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
- package/dist/useDarkMode-7i57segK.cjs +0 -1
- package/dist/useDarkMode-8VHJlYyE.js +0 -23
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
- package/dist/useStylingState-Iuj84yvc.js +0 -186
- package/dist/useStylingState-OIvJMV6p.cjs +0 -1
- package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
- package/dist/useUiLibraries-psyWFbNc.js +0 -12
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -1,56 +1,65 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import T, { memo as f, useMemo as v, useCallback as R, useEffect as H } from "react";
|
|
3
3
|
import { useAtom as P } from "jotai";
|
|
4
4
|
import { useDebouncedCallback as w } from "@react-hookz/web";
|
|
5
5
|
import { Tree as A } from "react-arborist";
|
|
6
|
-
import {
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import "react
|
|
10
|
-
import { u as K, T as U, a as G, c as W } from "./skeleton-lu8e7q2y.js";
|
|
11
|
-
import { BoxModelIcon as q, BoxIcon as J, DragHandleHorizontalIcon as Q, ViewHorizontalIcon as X, BorderAllIcon as Y, BorderTopIcon as Z, TableIcon as ee, DropdownMenuIcon as te, RadiobuttonIcon as se, InputIcon as re, ButtonIcon as I, CheckboxIcon as ne, GroupIcon as oe, SpaceBetweenVerticallyIcon as ce, ColumnsIcon as ae, RowsIcon as k, TextIcon as C, SketchLogoIcon as ie, DividerHorizontalIcon as le, CodeIcon as ue, CursorTextIcon as de, VideoIcon as xe, Link1Icon as pe, HeadingIcon as me, ImageIcon as he, CopyIcon as ge, TrashIcon as je, TriangleRightIcon as fe } from "@radix-ui/react-icons";
|
|
12
|
-
import { DatabaseIcon as be } from "lucide-react";
|
|
13
|
-
import { C as ye, a as ve, b as Ie, c as M } from "./context-menu-8dC9uGXj.js";
|
|
14
|
-
import { c as ke, a as Ce, b as y } from "./block-helpers-oSFpSsGz.js";
|
|
6
|
+
import { E as D, r as b, s as z, a1 as _, bs as N, aS as E, t as L, bt as F, aR as O, bu as V, 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-CFUoB97-.js";
|
|
7
|
+
import { c as M } 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";
|
|
15
10
|
import { find as B, first as Be } from "lodash-es";
|
|
16
|
-
import "./
|
|
17
|
-
import "clsx";
|
|
18
|
-
import "@radix-ui/react-scroll-area";
|
|
19
|
-
import "react-dom";
|
|
20
|
-
import "@floating-ui/react-dom";
|
|
21
|
-
import "i18next";
|
|
22
|
-
import "flagged";
|
|
23
|
-
import "react-hotkeys-hook";
|
|
11
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
24
12
|
import "@chaibuilder/runtime";
|
|
13
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
14
|
+
import "./Class-3k8xjeiM.js";
|
|
15
|
+
import "clsx";
|
|
25
16
|
import "tailwind-merge";
|
|
26
|
-
import "
|
|
17
|
+
import "react-i18next";
|
|
18
|
+
import "@radix-ui/react-toggle";
|
|
27
19
|
import "class-variance-authority";
|
|
28
|
-
import "
|
|
20
|
+
import "@radix-ui/react-switch";
|
|
21
|
+
import "@radix-ui/react-slot";
|
|
22
|
+
import "@radix-ui/react-accordion";
|
|
23
|
+
import "@radix-ui/react-alert-dialog";
|
|
24
|
+
import "@radix-ui/react-dialog";
|
|
25
|
+
import "@radix-ui/react-label";
|
|
26
|
+
import "@radix-ui/react-scroll-area";
|
|
27
|
+
import "@radix-ui/react-tabs";
|
|
29
28
|
import "@radix-ui/react-tooltip";
|
|
29
|
+
import "@radix-ui/react-popover";
|
|
30
|
+
import "@radix-ui/react-menubar";
|
|
31
|
+
import "@radix-ui/react-hover-card";
|
|
32
|
+
import "@radix-ui/react-select";
|
|
33
|
+
import "@radix-ui/react-dropdown-menu";
|
|
34
|
+
import "@radix-ui/react-separator";
|
|
30
35
|
import "@radix-ui/react-toast";
|
|
36
|
+
import "cmdk";
|
|
31
37
|
import "@radix-ui/react-context-menu";
|
|
38
|
+
import "react-icons-picker";
|
|
39
|
+
import "react-dom";
|
|
40
|
+
import "react-quill";
|
|
32
41
|
const S = (t) => {
|
|
33
42
|
switch (t.type) {
|
|
34
43
|
case "Image":
|
|
35
|
-
return /* @__PURE__ */ e.jsx(
|
|
44
|
+
return /* @__PURE__ */ e.jsx(ye, {});
|
|
36
45
|
case "Heading":
|
|
37
|
-
return /* @__PURE__ */ e.jsx(
|
|
46
|
+
return /* @__PURE__ */ e.jsx(be, {});
|
|
38
47
|
case "Text":
|
|
39
48
|
return /* @__PURE__ */ e.jsx(C, {});
|
|
40
49
|
case "Link":
|
|
41
|
-
return /* @__PURE__ */ e.jsx(
|
|
50
|
+
return /* @__PURE__ */ e.jsx(fe, {});
|
|
42
51
|
case "Video":
|
|
43
|
-
return /* @__PURE__ */ e.jsx(
|
|
52
|
+
return /* @__PURE__ */ e.jsx(je, {});
|
|
44
53
|
case "RichText":
|
|
45
|
-
return /* @__PURE__ */ e.jsx(
|
|
54
|
+
return /* @__PURE__ */ e.jsx(ge, {});
|
|
46
55
|
case "Button":
|
|
47
56
|
return /* @__PURE__ */ e.jsx(I, {});
|
|
48
57
|
case "CustomHTML":
|
|
49
|
-
return /* @__PURE__ */ e.jsx(
|
|
58
|
+
return /* @__PURE__ */ e.jsx(he, {});
|
|
50
59
|
case "Divider":
|
|
51
|
-
return /* @__PURE__ */ e.jsx(
|
|
60
|
+
return /* @__PURE__ */ e.jsx(me, {});
|
|
52
61
|
case "Icon":
|
|
53
|
-
return /* @__PURE__ */ e.jsx(
|
|
62
|
+
return /* @__PURE__ */ e.jsx(pe, {});
|
|
54
63
|
case "List":
|
|
55
64
|
return /* @__PURE__ */ e.jsx(k, {});
|
|
56
65
|
case "Paragraph":
|
|
@@ -58,38 +67,38 @@ const S = (t) => {
|
|
|
58
67
|
case "Row":
|
|
59
68
|
return /* @__PURE__ */ e.jsx(k, {});
|
|
60
69
|
case "ListItem":
|
|
61
|
-
return /* @__PURE__ */ e.jsx(
|
|
70
|
+
return /* @__PURE__ */ e.jsx(xe, {});
|
|
62
71
|
case "LineBreak":
|
|
63
|
-
return /* @__PURE__ */ e.jsx(
|
|
72
|
+
return /* @__PURE__ */ e.jsx(de, {});
|
|
64
73
|
case "Form":
|
|
65
|
-
return /* @__PURE__ */ e.jsx(
|
|
74
|
+
return /* @__PURE__ */ e.jsx(ue, {});
|
|
66
75
|
case "Checkbox":
|
|
67
|
-
return /* @__PURE__ */ e.jsx(
|
|
76
|
+
return /* @__PURE__ */ e.jsx(le, {});
|
|
68
77
|
case "FormButton":
|
|
69
78
|
return /* @__PURE__ */ e.jsx(I, {});
|
|
70
79
|
case "Input":
|
|
71
80
|
case "TextArea":
|
|
72
|
-
return /* @__PURE__ */ e.jsx(
|
|
81
|
+
return /* @__PURE__ */ e.jsx(ie, {});
|
|
73
82
|
case "Radio":
|
|
74
|
-
return /* @__PURE__ */ e.jsx(
|
|
83
|
+
return /* @__PURE__ */ e.jsx(ae, {});
|
|
75
84
|
case "Select":
|
|
76
|
-
return /* @__PURE__ */ e.jsx(
|
|
85
|
+
return /* @__PURE__ */ e.jsx(ce, {});
|
|
77
86
|
case "Table":
|
|
78
|
-
return /* @__PURE__ */ e.jsx(
|
|
87
|
+
return /* @__PURE__ */ e.jsx(ne, {});
|
|
79
88
|
case "TableHead":
|
|
80
|
-
return /* @__PURE__ */ e.jsx(
|
|
89
|
+
return /* @__PURE__ */ e.jsx(oe, {});
|
|
81
90
|
case "TableBody":
|
|
82
|
-
return /* @__PURE__ */ e.jsx(
|
|
91
|
+
return /* @__PURE__ */ e.jsx(re, {});
|
|
83
92
|
case "TableRow":
|
|
84
|
-
return /* @__PURE__ */ e.jsx(
|
|
93
|
+
return /* @__PURE__ */ e.jsx(se, {});
|
|
85
94
|
case "TableCell":
|
|
86
|
-
return /* @__PURE__ */ e.jsx(
|
|
95
|
+
return /* @__PURE__ */ e.jsx(te, {});
|
|
87
96
|
case "DataProvider":
|
|
88
|
-
return /* @__PURE__ */ e.jsx(
|
|
97
|
+
return /* @__PURE__ */ e.jsx(Ce, { size: 16 });
|
|
89
98
|
case "Box":
|
|
90
|
-
return /* @__PURE__ */ e.jsx(
|
|
99
|
+
return /* @__PURE__ */ e.jsx(ee, {});
|
|
91
100
|
default:
|
|
92
|
-
return /* @__PURE__ */ e.jsx(
|
|
101
|
+
return /* @__PURE__ */ e.jsx(Z, {});
|
|
93
102
|
}
|
|
94
103
|
}, Te = {
|
|
95
104
|
display: "flex",
|
|
@@ -107,7 +116,7 @@ const S = (t) => {
|
|
|
107
116
|
}), De = f(function({ children: r, isDragging: s }) {
|
|
108
117
|
return s ? /* @__PURE__ */ e.jsx("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: r }) : null;
|
|
109
118
|
}), _e = f(({ id: t, isDragging: r, mouse: s }) => {
|
|
110
|
-
const [l] = D(),
|
|
119
|
+
const [l] = D(), o = v(() => l.find((d) => d._id === t), [l, t]), x = v(
|
|
111
120
|
() => ({
|
|
112
121
|
transform: `translate(${(s == null ? void 0 : s.x) - 10}px, ${(s == null ? void 0 : s.y) - 10}px)`
|
|
113
122
|
}),
|
|
@@ -118,53 +127,53 @@ const S = (t) => {
|
|
|
118
127
|
{
|
|
119
128
|
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",
|
|
120
129
|
style: x,
|
|
121
|
-
children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${
|
|
122
|
-
/* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(S, { type:
|
|
123
|
-
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (
|
|
130
|
+
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: [
|
|
131
|
+
/* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(S, { type: o == null ? void 0 : o._type }) }),
|
|
132
|
+
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (o == null ? void 0 : o._name) || (o == null ? void 0 : o._type) })
|
|
124
133
|
] })
|
|
125
134
|
}
|
|
126
135
|
) }) }) : /* @__PURE__ */ e.jsx("div", { className: "hidden" });
|
|
127
136
|
}), Ne = () => {
|
|
128
|
-
const [t] = b(), r =
|
|
137
|
+
const [t] = b(), r = z(), s = _();
|
|
129
138
|
return /* @__PURE__ */ e.jsxs(
|
|
130
|
-
|
|
139
|
+
N,
|
|
131
140
|
{
|
|
132
|
-
disabled: !
|
|
141
|
+
disabled: !E(s == null ? void 0 : s._type),
|
|
133
142
|
className: "flex items-center gap-x-4 text-xs",
|
|
134
143
|
onClick: () => r(t),
|
|
135
144
|
children: [
|
|
136
|
-
/* @__PURE__ */ e.jsx(
|
|
145
|
+
/* @__PURE__ */ e.jsx(ve, {}),
|
|
137
146
|
" Remove"
|
|
138
147
|
]
|
|
139
148
|
}
|
|
140
149
|
);
|
|
141
150
|
}, Me = () => {
|
|
142
|
-
const [t] = b(), r =
|
|
151
|
+
const [t] = b(), r = L(), s = _(), l = R(() => {
|
|
143
152
|
r(t);
|
|
144
153
|
}, [t, r]);
|
|
145
|
-
return /* @__PURE__ */ e.jsxs(
|
|
154
|
+
return /* @__PURE__ */ e.jsxs(F, { className: "text-xs", children: [
|
|
146
155
|
/* @__PURE__ */ e.jsxs(
|
|
147
|
-
|
|
156
|
+
N,
|
|
148
157
|
{
|
|
149
|
-
disabled: !
|
|
158
|
+
disabled: !O(s == null ? void 0 : s._type),
|
|
150
159
|
className: "flex items-center gap-x-4 text-xs",
|
|
151
160
|
onClick: l,
|
|
152
161
|
children: [
|
|
153
|
-
/* @__PURE__ */ e.jsx(
|
|
162
|
+
/* @__PURE__ */ e.jsx(Ie, {}),
|
|
154
163
|
" Duplicate"
|
|
155
164
|
]
|
|
156
165
|
}
|
|
157
166
|
),
|
|
158
167
|
/* @__PURE__ */ e.jsx(Ne, {})
|
|
159
168
|
] });
|
|
160
|
-
}, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
161
|
-
/* @__PURE__ */ e.jsx(
|
|
169
|
+
}, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(V, { children: [
|
|
170
|
+
/* @__PURE__ */ e.jsx($, { children: t }),
|
|
162
171
|
/* @__PURE__ */ e.jsx(Me, {})
|
|
163
172
|
] }) }), Re = f(({ node: t, style: r, dragHandle: s }) => {
|
|
164
|
-
const l =
|
|
173
|
+
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 = w((c) => o(c), [], 300), i = (c) => {
|
|
165
174
|
c.stopPropagation(), t.toggle();
|
|
166
175
|
}, u = (c) => {
|
|
167
|
-
c.stopPropagation(), t.toggle(), j(c);
|
|
176
|
+
c.stopPropagation(), t.isOpen || t.toggle(), j(c);
|
|
168
177
|
};
|
|
169
178
|
return H(() => {
|
|
170
179
|
const c = setTimeout(() => {
|
|
@@ -175,11 +184,11 @@ const S = (t) => {
|
|
|
175
184
|
"div",
|
|
176
185
|
{
|
|
177
186
|
onClick: u,
|
|
178
|
-
onMouseEnter: () =>
|
|
187
|
+
onMouseEnter: () => n(d),
|
|
179
188
|
style: r,
|
|
180
189
|
"data-node-id": d,
|
|
181
190
|
ref: s,
|
|
182
|
-
className:
|
|
191
|
+
className: M(
|
|
183
192
|
"group flex !h-fit w-full items-center justify-between space-x-px py-px outline-none",
|
|
184
193
|
m ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800",
|
|
185
194
|
p && y(a._type, "Icon") ? "bg-green-200" : "",
|
|
@@ -191,7 +200,7 @@ const S = (t) => {
|
|
|
191
200
|
"div",
|
|
192
201
|
{
|
|
193
202
|
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" : ""}`,
|
|
194
|
-
children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(
|
|
203
|
+
children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(ke, {}) })
|
|
195
204
|
}
|
|
196
205
|
),
|
|
197
206
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
@@ -208,9 +217,9 @@ const S = (t) => {
|
|
|
208
217
|
)
|
|
209
218
|
] })
|
|
210
219
|
] }),
|
|
211
|
-
/* @__PURE__ */ e.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: l.map((c) => /* @__PURE__ */ e.jsxs(
|
|
220
|
+
/* @__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: [
|
|
212
221
|
/* @__PURE__ */ e.jsx(
|
|
213
|
-
|
|
222
|
+
K,
|
|
214
223
|
{
|
|
215
224
|
className: "cursor-pointer rounded bg-transparent hover:bg-white hover:text-blue-500",
|
|
216
225
|
asChild: !0,
|
|
@@ -239,38 +248,38 @@ const S = (t) => {
|
|
|
239
248
|
const [t] = D();
|
|
240
249
|
return (r, s) => {
|
|
241
250
|
var x;
|
|
242
|
-
const l = (x = B(t, { _id: s })) == null ? void 0 : x._type,
|
|
251
|
+
const l = (x = B(t, { _id: s })) == null ? void 0 : x._type, o = Be(r.map((d) => {
|
|
243
252
|
var a;
|
|
244
253
|
return (a = B(t, { _id: d })) == null ? void 0 : a._type;
|
|
245
254
|
}));
|
|
246
|
-
return y(l,
|
|
255
|
+
return y(l, o);
|
|
247
256
|
};
|
|
248
|
-
},
|
|
249
|
-
const [t] = P(
|
|
250
|
-
s([]),
|
|
251
|
-
}, m = ({ id:
|
|
252
|
-
l([
|
|
253
|
-
}, p = ({ dragIds:
|
|
254
|
-
d(
|
|
255
|
-
}, h = (
|
|
256
|
-
if (
|
|
257
|
+
}, It = () => {
|
|
258
|
+
const [t] = P(Y), [r, s] = b(), l = J(), [, o] = Q(), { moveBlocks: x } = X(), d = Pe(), a = () => {
|
|
259
|
+
s([]), o([]);
|
|
260
|
+
}, m = ({ id: n, name: i, node: u }) => {
|
|
261
|
+
l([n], { _name: i }, u.data._name);
|
|
262
|
+
}, p = ({ dragIds: n, parentId: i, index: u }) => {
|
|
263
|
+
d(n, i) && x(n, i, u);
|
|
264
|
+
}, h = (n) => {
|
|
265
|
+
if (n.length === 0)
|
|
257
266
|
return;
|
|
258
|
-
const i =
|
|
259
|
-
|
|
260
|
-
}, g = (
|
|
267
|
+
const i = n[0] ? n[0].id : "";
|
|
268
|
+
o([]), s([i]);
|
|
269
|
+
}, g = (n) => {
|
|
261
270
|
var c;
|
|
262
|
-
|
|
263
|
-
const i =
|
|
264
|
-
u && (
|
|
271
|
+
n.preventDefault();
|
|
272
|
+
const i = n.target, u = i.getAttribute("data-node-id") || ((c = i.closest("[data-node-id]")) == null ? void 0 : c.getAttribute("data-node-id"));
|
|
273
|
+
u && (o([]), s([u]));
|
|
265
274
|
}, j = w(
|
|
266
|
-
({ parentNode:
|
|
275
|
+
({ parentNode: n, dragNodes: i }) => {
|
|
267
276
|
var u;
|
|
268
|
-
return !y(
|
|
277
|
+
return !y(n == null ? void 0 : n.data._type, (u = i[0]) == null ? void 0 : u.data._type);
|
|
269
278
|
},
|
|
270
279
|
[],
|
|
271
280
|
300
|
|
272
281
|
);
|
|
273
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
282
|
+
return /* @__PURE__ */ e.jsx("div", { className: M("-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(
|
|
274
283
|
A,
|
|
275
284
|
{
|
|
276
285
|
height: 800,
|
|
@@ -283,7 +292,7 @@ const S = (t) => {
|
|
|
283
292
|
data: t,
|
|
284
293
|
renderCursor: we,
|
|
285
294
|
onSelect: h,
|
|
286
|
-
childrenAccessor: (
|
|
295
|
+
childrenAccessor: (n) => n.children,
|
|
287
296
|
width: "100%",
|
|
288
297
|
renderDragPreview: _e,
|
|
289
298
|
indent: 10,
|
|
@@ -295,5 +304,5 @@ const S = (t) => {
|
|
|
295
304
|
) }) });
|
|
296
305
|
};
|
|
297
306
|
export {
|
|
298
|
-
|
|
307
|
+
It as default
|
|
299
308
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),m=require("react"),k=require("jotai"),I=require("@react-hookz/web"),B=require("react-arborist"),n=require("./index-F4AQQ6qq.cjs"),y=require("./Functions-N3yhPYKY.cjs"),s=require("@radix-ui/react-icons"),q=require("lucide-react"),f=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@chaibuilder/runtime");require("./MODIFIERS-9EwxLM8V.cjs");require("./Class-MmCxz2Ay.cjs");require("clsx");require("tailwind-merge");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-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");const v=t=>{switch(t.type){case"Image":return e.jsxRuntimeExports.jsx(s.ImageIcon,{});case"Heading":return e.jsxRuntimeExports.jsx(s.HeadingIcon,{});case"Text":return e.jsxRuntimeExports.jsx(s.TextIcon,{});case"Link":return e.jsxRuntimeExports.jsx(s.Link1Icon,{});case"Video":return e.jsxRuntimeExports.jsx(s.VideoIcon,{});case"RichText":return e.jsxRuntimeExports.jsx(s.CursorTextIcon,{});case"Button":return e.jsxRuntimeExports.jsx(s.ButtonIcon,{});case"CustomHTML":return e.jsxRuntimeExports.jsx(s.CodeIcon,{});case"Divider":return e.jsxRuntimeExports.jsx(s.DividerHorizontalIcon,{});case"Icon":return e.jsxRuntimeExports.jsx(s.SketchLogoIcon,{});case"List":return e.jsxRuntimeExports.jsx(s.RowsIcon,{});case"Paragraph":return e.jsxRuntimeExports.jsx(s.TextIcon,{});case"Row":return e.jsxRuntimeExports.jsx(s.RowsIcon,{});case"ListItem":return e.jsxRuntimeExports.jsx(s.ColumnsIcon,{});case"LineBreak":return e.jsxRuntimeExports.jsx(s.SpaceBetweenVerticallyIcon,{});case"Form":return e.jsxRuntimeExports.jsx(s.GroupIcon,{});case"Checkbox":return e.jsxRuntimeExports.jsx(s.CheckboxIcon,{});case"FormButton":return e.jsxRuntimeExports.jsx(s.ButtonIcon,{});case"Input":case"TextArea":return e.jsxRuntimeExports.jsx(s.InputIcon,{});case"Radio":return e.jsxRuntimeExports.jsx(s.RadiobuttonIcon,{});case"Select":return e.jsxRuntimeExports.jsx(s.DropdownMenuIcon,{});case"Table":return e.jsxRuntimeExports.jsx(s.TableIcon,{});case"TableHead":return e.jsxRuntimeExports.jsx(s.BorderTopIcon,{});case"TableBody":return e.jsxRuntimeExports.jsx(s.BorderAllIcon,{});case"TableRow":return e.jsxRuntimeExports.jsx(s.ViewHorizontalIcon,{});case"TableCell":return e.jsxRuntimeExports.jsx(s.DragHandleHorizontalIcon,{});case"DataProvider":return e.jsxRuntimeExports.jsx(q.DatabaseIcon,{size:16});case"Box":return e.jsxRuntimeExports.jsx(s.BoxIcon,{});default:return e.jsxRuntimeExports.jsx(s.BoxModelIcon,{})}},C={display:"flex",alignItems:"center",zIndex:1},T=m.memo(function({top:o,left:r}){const a={position:"absolute",pointerEvents:"none",top:o+"px",left:r+"px",right:0};return e.jsxRuntimeExports.jsx("div",{style:{...C,...a},children:e.jsxRuntimeExports.jsx("div",{className:"h-0.5 flex-1 rounded-[1px] bg-green-500"})})}),w=m.memo(function({children:o,isDragging:r}){return r?e.jsxRuntimeExports.jsx("div",{className:"pointer-events-none fixed left-0 top-0 z-[100] h-full w-full",children:o}):null}),D=m.memo(({id:t,isDragging:o,mouse:r})=>{const[a]=n.useBlocksStore(),i=m.useMemo(()=>a.find(d=>d._id===t),[a,t]),j=m.useMemo(()=>({transform:`translate(${(r==null?void 0:r.x)-10}px, ${(r==null?void 0:r.y)-10}px)`}),[r]);return r?e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(w,{isDragging:o,children:e.jsxRuntimeExports.jsx("div",{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",style:j,children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex !cursor-grab items-center p-0.5","aria-label":`Type: ${i==null?void 0:i._type}`,children:[e.jsxRuntimeExports.jsx("div",{className:"-mt-0.5 h-3 w-3",children:e.jsxRuntimeExports.jsx(v,{type:i==null?void 0:i._type})}),e.jsxRuntimeExports.jsx("div",{className:"ml-2 truncate text-[11px]",children:(i==null?void 0:i._name)||(i==null?void 0:i._type)})]})})})}):e.jsxRuntimeExports.jsx("div",{className:"hidden"})}),S=()=>{const[t]=n.useSelectedBlockIds(),o=n.useRemoveBlocks(),r=n.useSelectedBlock();return e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{disabled:!n.canDeleteBlock(r==null?void 0:r._type),className:"flex items-center gap-x-4 text-xs",onClick:()=>o(t),children:[e.jsxRuntimeExports.jsx(s.TrashIcon,{})," Remove"]})},N=()=>{const[t]=n.useSelectedBlockIds(),o=n.useDuplicateBlocks(),r=n.useSelectedBlock(),a=m.useCallback(()=>{o(t)},[t,o]);return e.jsxRuntimeExports.jsxs(n.ContextMenuContent,{className:"text-xs",children:[e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{disabled:!n.canDuplicateBlock(r==null?void 0:r._type),className:"flex items-center gap-x-4 text-xs",onClick:a,children:[e.jsxRuntimeExports.jsx(s.CopyIcon,{})," Duplicate"]}),e.jsxRuntimeExports.jsx(S,{})]})},_=({children:t})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(n.ContextMenu,{children:[e.jsxRuntimeExports.jsx(n.ContextMenuTrigger,{children:t}),e.jsxRuntimeExports.jsx(N,{})]})}),M=m.memo(({node:t,style:o,dragHandle:r})=>{const a=n.useBuilderProp("outlineMenuItems",[]),[,i]=n.useHighlightBlockId(),j=t.children.length>0,{id:d,data:u,isSelected:h,willReceiveDrop:R,isDragging:g,isEditing:E,handleClick:b}=t,c=I.useDebouncedCallback(x=>i(x),[],300),l=x=>{x.stopPropagation(),t.toggle()},p=x=>{x.stopPropagation(),t.isOpen||t.toggle(),b(x)};return m.useEffect(()=>{const x=setTimeout(()=>{R&&!t.isOpen&&t.toggle()},500);return()=>clearTimeout(x)},[R,t]),e.jsxRuntimeExports.jsx(_,{id:d,children:e.jsxRuntimeExports.jsxs("div",{onClick:p,onMouseEnter:()=>c(d),style:o,"data-node-id":d,ref:r,className:y.cn("group flex !h-fit w-full items-center justify-between space-x-px py-px outline-none",h?"bg-blue-500 text-white":"text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800",R&&n.canAcceptChildBlock(u._type,"Icon")?"bg-green-200":"",g&&"opacity-20"),children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("div",{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":""}`,children:j&&e.jsxRuntimeExports.jsx("button",{onClick:l,type:"button",children:e.jsxRuntimeExports.jsx(s.TriangleRightIcon,{})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("div",{className:"-mt-0.5 h-3 w-3",children:e.jsxRuntimeExports.jsx(v,{type:u==null?void 0:u._type})}),E?e.jsxRuntimeExports.jsx(P,{node:t}):e.jsxRuntimeExports.jsx("div",{className:"ml-2 truncate text-[11px]",onDoubleClick:x=>{x.stopPropagation(),t.edit(),t.deselect()},children:(u==null?void 0:u._name)||(u==null?void 0:u._type.split("/").pop())})]})]}),e.jsxRuntimeExports.jsx("div",{className:"invisible flex items-center space-x-1 pr-2 group-hover:visible",children:a.map(x=>e.jsxRuntimeExports.jsxs(n.Tooltip,{children:[e.jsxRuntimeExports.jsx(n.TooltipTrigger,{className:"cursor-pointer rounded bg-transparent hover:bg-white hover:text-blue-500",asChild:!0,children:m.createElement(x.item,{blockId:d})}),e.jsxRuntimeExports.jsx(n.TooltipContent,{className:"z-[9999]",children:x.tooltip})]}))})]})})}),P=({node:t})=>e.jsxRuntimeExports.jsx("input",{autoFocus:!0,className:"ml-2 w-full rounded-sm border border-black/30 bg-transparent px-1 text-[11px] outline-none",type:"text",defaultValue:t.data.name,onFocus:o=>o.currentTarget.select(),onBlur:o=>t.submit(o.currentTarget.value),onKeyDown:o=>{o.key==="Enter"&&t.submit(o.currentTarget.value)}}),A=()=>{const[t]=n.useBlocksStore();return(o,r)=>{var j;const a=(j=f.find(t,{_id:r}))==null?void 0:j._type,i=f.first(o.map(d=>{var u;return(u=f.find(t,{_id:d}))==null?void 0:u._type}));return n.canAcceptChildBlock(a,i)}},H=()=>{const[t]=k.useAtom(n.treeDSBlocks),[o,r]=n.useSelectedBlockIds(),a=n.useUpdateBlocksProps(),[,i]=n.useSelectedStylingBlocks(),{moveBlocks:j}=n.useBlocksStoreUndoableActions(),d=A(),u=()=>{r([]),i([])},h=({id:c,name:l,node:p})=>{a([c],{_name:l},p.data._name)},R=({dragIds:c,parentId:l,index:p})=>{d(c,l)&&j(c,l,p)},g=c=>{if(c.length===0)return;const l=c[0]?c[0].id:"";i([]),r([l])},E=c=>{var x;c.preventDefault();const l=c.target,p=l.getAttribute("data-node-id")||((x=l.closest("[data-node-id]"))==null?void 0:x.getAttribute("data-node-id"));p&&(i([]),r([p]))},b=I.useDebouncedCallback(({parentNode:c,dragNodes:l})=>{var p;return!n.canAcceptChildBlock(c==null?void 0:c.data._type,(p=l[0])==null?void 0:p.data._type)},[],300);return e.jsxRuntimeExports.jsx("div",{className:y.cn("-mx-1 -mt-1 flex h-full select-none flex-col space-y-1"),onClick:()=>u(),children:e.jsxRuntimeExports.jsx("div",{id:"outline-view",className:"no-scrollbar h-full overflow-y-auto p-1 px-2 text-xs",children:e.jsxRuntimeExports.jsx(B.Tree,{height:800,className:"no-scrollbar !h-full max-w-full !overflow-y-auto !overflow-x-hidden",selection:o[0]||"",onRename:h,openByDefault:!1,onMove:R,rowHeight:20,data:t,renderCursor:T,onSelect:g,childrenAccessor:c=>c.children,width:"100%",renderDragPreview:D,indent:10,onContextMenu:E,disableDrop:b,idAccessor:"_id",children:M})})})};exports.default=H;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e="#styles:",o="#slots:",t="#i18n",i="outline",n=["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"],r={bodyFont:"Inter",headingFont:"Inter",roundedCorners:5,primaryColor:"#570df8",secondaryColor:"#f002b8",bodyBgDarkColor:"#031022",bodyBgLightColor:"#fcfcfc",bodyTextDarkColor:"#ffffff",bodyTextLightColor:"#000000"};exports.BRANDING_OPTIONS_DEFAULTS=r;exports.I18N_KEY=t;exports.MODIFIERS=n;exports.OUTLINE_KEY=i;exports.SLOT_KEY=o;exports.STYLES_KEY=e;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function t(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
const i = [
|
|
1
|
+
const e = "#styles:", o = "#slots:", t = "#i18n", i = "outline", n = [
|
|
6
2
|
"hover",
|
|
7
3
|
"focus",
|
|
8
4
|
"focus-within",
|
|
@@ -51,7 +47,7 @@ const i = [
|
|
|
51
47
|
"ui-not-active",
|
|
52
48
|
"ui-not-selected",
|
|
53
49
|
"ui-not-checked"
|
|
54
|
-
],
|
|
50
|
+
], r = {
|
|
55
51
|
bodyFont: "Inter",
|
|
56
52
|
headingFont: "Inter",
|
|
57
53
|
roundedCorners: 5,
|
|
@@ -63,8 +59,10 @@ const i = [
|
|
|
63
59
|
bodyTextLightColor: "#000000"
|
|
64
60
|
};
|
|
65
61
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
r as B,
|
|
63
|
+
t as I,
|
|
64
|
+
n as M,
|
|
65
|
+
i as O,
|
|
66
|
+
o as S,
|
|
67
|
+
e as a
|
|
70
68
|
};
|
|
@@ -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-Qk028f-N.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-l19JVVXI.cjs");require("i18next");require("react-i18next");require("./index-F4AQQ6qq.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("./Class-MmCxz2Ay.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-C_Eobs_d.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-9pTKItY-.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-YFrIG3L7.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,48 +1,63 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
2
|
-
import i, { Suspense as
|
|
1
|
+
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
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-
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "clsx";
|
|
8
|
-
import "@radix-ui/react-scroll-area";
|
|
9
|
-
import "react-dom";
|
|
10
|
-
import "@floating-ui/react-dom";
|
|
11
|
-
import "jotai";
|
|
4
|
+
import { u as l, a as c } from "./index-f0AbmoYY.js";
|
|
5
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
+
import "./index-lOJfSheQ.js";
|
|
12
7
|
import "i18next";
|
|
13
8
|
import "react-i18next";
|
|
14
|
-
import "
|
|
15
|
-
import "./
|
|
16
|
-
import "
|
|
17
|
-
import "class-variance-authority";
|
|
18
|
-
import "./utils-dze1SGvB.js";
|
|
9
|
+
import "./index-CFUoB97-.js";
|
|
10
|
+
import "./Functions-7jnEwJyw.js";
|
|
11
|
+
import "clsx";
|
|
19
12
|
import "tailwind-merge";
|
|
20
|
-
import "@
|
|
13
|
+
import "@chaibuilder/runtime";
|
|
14
|
+
import "jotai";
|
|
15
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
16
|
+
import "@react-hookz/web";
|
|
17
|
+
import "./Class-3k8xjeiM.js";
|
|
18
|
+
import "@radix-ui/react-toggle";
|
|
19
|
+
import "class-variance-authority";
|
|
20
|
+
import "@radix-ui/react-switch";
|
|
21
|
+
import "@radix-ui/react-slot";
|
|
22
|
+
import "@radix-ui/react-accordion";
|
|
21
23
|
import "@radix-ui/react-icons";
|
|
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";
|
|
22
36
|
import "@radix-ui/react-toast";
|
|
23
|
-
import "
|
|
37
|
+
import "cmdk";
|
|
38
|
+
import "@radix-ui/react-context-menu";
|
|
39
|
+
import "react-icons-picker";
|
|
40
|
+
import "react-dom";
|
|
41
|
+
import "react-quill";
|
|
42
|
+
import "@floating-ui/react-dom";
|
|
43
|
+
import "flagged";
|
|
24
44
|
import "react-hotkeys-hook";
|
|
25
|
-
import "@react-hookz/web";
|
|
26
|
-
import "@chaibuilder/runtime";
|
|
27
45
|
import "sonner";
|
|
28
|
-
import "./html-to-json-
|
|
46
|
+
import "./html-to-json-p__Fgqdg.js";
|
|
29
47
|
import "himalaya";
|
|
30
|
-
import "./STRINGS-b432aBJJ.js";
|
|
31
48
|
import "lucide-react";
|
|
32
|
-
import "./
|
|
33
|
-
import "./
|
|
34
|
-
|
|
35
|
-
const x = i.lazy(() => import("./add-page-modal-JCDXZIPW.js")), u = i.lazy(() => import("./page-viewer-NnOwmAmu.js")), W = () => {
|
|
36
|
-
const { data: o = [], isLoading: m } = l(), { data: r } = c(), e = a(d(o, { type: "STATIC" }), (s) => n(s, "uuid") === (r == null ? void 0 : r.homepage) ? 0 : 1);
|
|
49
|
+
import "./index-YpnaudSM.js";
|
|
50
|
+
const x = i.lazy(() => import("./add-page-modal-U7AUUrI1.js")), u = i.lazy(() => import("./page-viewer-jOwy--9A.js")), nt = () => {
|
|
51
|
+
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);
|
|
37
52
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
38
53
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
39
54
|
/* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Pages" }),
|
|
40
|
-
/* @__PURE__ */ t.jsx(
|
|
55
|
+
/* @__PURE__ */ t.jsx(s, { fallback: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-blue-500 underline", children: "+ New Page" }), children: /* @__PURE__ */ t.jsx(x, {}) })
|
|
41
56
|
] }),
|
|
42
57
|
/* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
|
|
43
|
-
/* @__PURE__ */ t.jsx("div", { className: "-mx-1 divide-y-2", children: /* @__PURE__ */ t.jsx(u, { isLoading: m, pages:
|
|
58
|
+
/* @__PURE__ */ t.jsx("div", { className: "-mx-1 divide-y-2", children: /* @__PURE__ */ t.jsx(u, { isLoading: m, pages: p }) })
|
|
44
59
|
] });
|
|
45
60
|
};
|
|
46
61
|
export {
|
|
47
|
-
|
|
62
|
+
nt as default
|
|
48
63
|
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import a, { useRef as x, useEffect as m, Suspense as p } from "react";
|
|
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-CFUoB97-.js";
|
|
5
|
+
import { b as h, a as g } from "./index-f0AbmoYY.js";
|
|
6
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
|
+
import "./Functions-7jnEwJyw.js";
|
|
8
|
+
import "clsx";
|
|
9
|
+
import "tailwind-merge";
|
|
10
|
+
import "@chaibuilder/runtime";
|
|
11
|
+
import "jotai";
|
|
12
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
13
|
+
import "@react-hookz/web";
|
|
14
|
+
import "./Class-3k8xjeiM.js";
|
|
15
|
+
import "react-i18next";
|
|
16
|
+
import "@radix-ui/react-toggle";
|
|
17
|
+
import "class-variance-authority";
|
|
18
|
+
import "@radix-ui/react-switch";
|
|
19
|
+
import "@radix-ui/react-slot";
|
|
20
|
+
import "@radix-ui/react-accordion";
|
|
21
|
+
import "@radix-ui/react-icons";
|
|
22
|
+
import "@radix-ui/react-alert-dialog";
|
|
23
|
+
import "@radix-ui/react-dialog";
|
|
24
|
+
import "@radix-ui/react-label";
|
|
25
|
+
import "@radix-ui/react-scroll-area";
|
|
26
|
+
import "@radix-ui/react-tabs";
|
|
27
|
+
import "@radix-ui/react-tooltip";
|
|
28
|
+
import "@radix-ui/react-popover";
|
|
29
|
+
import "@radix-ui/react-menubar";
|
|
30
|
+
import "@radix-ui/react-hover-card";
|
|
31
|
+
import "@radix-ui/react-select";
|
|
32
|
+
import "@radix-ui/react-dropdown-menu";
|
|
33
|
+
import "@radix-ui/react-separator";
|
|
34
|
+
import "@radix-ui/react-toast";
|
|
35
|
+
import "cmdk";
|
|
36
|
+
import "@radix-ui/react-context-menu";
|
|
37
|
+
import "react-icons-picker";
|
|
38
|
+
import "react-dom";
|
|
39
|
+
import "react-quill";
|
|
40
|
+
import "./index-lOJfSheQ.js";
|
|
41
|
+
import "i18next";
|
|
42
|
+
import "@floating-ui/react-dom";
|
|
43
|
+
import "flagged";
|
|
44
|
+
import "react-hotkeys-hook";
|
|
45
|
+
import "sonner";
|
|
46
|
+
import "./html-to-json-p__Fgqdg.js";
|
|
47
|
+
import "himalaya";
|
|
48
|
+
import "lucide-react";
|
|
49
|
+
import "./index-YpnaudSM.js";
|
|
50
|
+
const N = a.lazy(() => import("./project-general-setting-3N8HZ2fe.js")), S = a.lazy(() => import("./project-seo-setting-bSiNgO_1.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
|
+
...e,
|
|
52
|
+
seoData: { title: "", description: "", image: "" }
|
|
53
|
+
} : e;
|
|
54
|
+
function ft() {
|
|
55
|
+
const e = h(), { data: s } = g(), [r, i] = a.useState(
|
|
56
|
+
u(s || {})
|
|
57
|
+
), o = x(r);
|
|
58
|
+
return m(
|
|
59
|
+
() => () => {
|
|
60
|
+
b(s, o.current) || e.mutate(o.current, {
|
|
61
|
+
onSuccess: () => i(o.current)
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
[o]
|
|
65
|
+
), m(() => {
|
|
66
|
+
o.current = r;
|
|
67
|
+
}, [r]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
68
|
+
/* @__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" }) }),
|
|
69
|
+
/* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
|
|
70
|
+
/* @__PURE__ */ t.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ t.jsxs(f, { type: "single", className: "w-full", defaultValue: "GENERAL", children: [
|
|
71
|
+
/* @__PURE__ */ t.jsxs(n, { value: "GENERAL", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
72
|
+
/* @__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" }),
|
|
73
|
+
/* @__PURE__ */ t.jsx(c, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(N, { _projectData: r, seany: i }) }) })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ t.jsxs(n, { value: "SEO", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
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: "SEO Settings" }),
|
|
77
|
+
/* @__PURE__ */ t.jsx(c, { className: "px-1 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(S, { _projectData: r, seany: i }) }) })
|
|
78
|
+
] })
|
|
79
|
+
] }) })
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
ft as default
|
|
84
|
+
};
|
|
@@ -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-F4AQQ6qq.cjs"),a=require("./index-Qk028f-N.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("./Class-MmCxz2Ay.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-l19JVVXI.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-C_Eobs_d.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-hK7I7FuN.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-x-FK0pez.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;
|