@chaibuilder/sdk 1.2.24 → 1.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/AddBlocks-Ol3iIVKa.js +207 -0
- package/dist/AddBlocks-a1c-7Ewz.cjs +1 -0
- package/dist/BrandingOptions-6rnt0UaA.cjs +1 -0
- package/dist/{BrandingOptions-udtH5yJs.js → BrandingOptions-iTyWpwTs.js} +40 -54
- package/dist/CanvasArea-R4ogF9AT.cjs +55 -0
- package/dist/{CanvasArea-IqeMbtOf.js → CanvasArea-dZjng782.js} +340 -324
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +163 -0
- package/dist/ChaiBuilderEditor-vP4at00I.js +27974 -0
- package/dist/{Class-lGzsNBOK.js → Class-ahc3NIbq.js} +26 -29
- package/dist/Class-eieto7e-.cjs +1 -0
- package/dist/Controls-3Cc1XYXg.js +105 -0
- package/dist/Controls-ky25Ebo3.cjs +1 -0
- package/dist/CurrentPage-3gQTH0Zt.cjs +1 -0
- package/dist/{CurrentPage-AA0XHYMU.js → CurrentPage-Kmfp-kFk.js} +40 -54
- package/dist/Functions-Hvon6AMZ.cjs +1 -0
- package/dist/Functions-NzT2Six_.js +15 -0
- package/dist/ImagesPanel-J1RlG7xG.cjs +1 -0
- package/dist/ImagesPanel-Wb0GF_NA.js +29 -0
- package/dist/ListTree-CZ-mtjZ9.cjs +1 -0
- package/dist/{ListTree-ZNEtds1d.js → ListTree-N3jeD790.js} +92 -102
- package/dist/{MODIFIERS-dytZ-osO.js → MODIFIERS-CNqNUapY.js} +10 -4
- package/dist/MODIFIERS-o1p3VnpS.cjs +1 -0
- package/dist/PagesPanel-Gi0z6gaf.cjs +1 -0
- package/dist/PagesPanel-u1IB-nRr.js +48 -0
- package/dist/ProjectPanel-EydGZmMW.js +71 -0
- package/dist/ProjectPanel-kiiljG4H.cjs +1 -0
- package/dist/{STRINGS--j49GZJP.js → STRINGS-b432aBJJ.js} +2 -2
- package/dist/Settings-8ilCSH8b.cjs +1 -0
- package/dist/{Settings-pIePR1Id.js → Settings-jCcd-VE6.js} +407 -401
- package/dist/SidePanels-T36C6Lhc.cjs +1 -0
- package/dist/{SidePanels-NznSn5RN.js → SidePanels-pHMYprpW.js} +108 -118
- package/dist/Topbar-CvWQuspR.cjs +1 -0
- package/dist/Topbar-pbIDUE_B.js +122 -0
- package/dist/UnsplashImages-KBZPd9dv.cjs +1 -0
- package/dist/{UnsplashImages-qvwFbV-E.js → UnsplashImages-L7x_3RQf.js} +50 -63
- package/dist/UploadImages-GkkJVAgG.cjs +1 -0
- package/dist/{UploadImages-9NapgXBq.js → UploadImages-zdEJRLD8.js} +37 -60
- package/dist/accordion-oPUeqPCZ.js +42 -0
- package/dist/accordion-ynvFtV_p.cjs +1 -0
- package/dist/add-page-modal-9SGv2hgc.cjs +1 -0
- package/dist/add-page-modal-JCDXZIPW.js +95 -0
- package/dist/alert-dialog-P9xMMB6C.cjs +1 -0
- package/dist/alert-dialog-rypfO5ly.js +64 -0
- package/dist/badge-E-S7CqUt.cjs +1 -0
- package/dist/badge-tEwO7C51.js +23 -0
- package/dist/block-helpers-OKHmRRol.cjs +1 -0
- package/dist/block-helpers-oSFpSsGz.js +23 -0
- package/dist/command-BxR6jaCI.cjs +1 -0
- package/dist/command-Pn3HKDuV.js +97 -0
- package/dist/confirm-alert-uNm0lZ0y.cjs +1 -0
- package/dist/confirm-alert-wR5_VJ1l.js +36 -0
- package/dist/context-menu-8dC9uGXj.js +122 -0
- package/dist/context-menu-IgLbIuth.cjs +1 -0
- package/dist/{controls-OfJWSEqC.js → controls-IS5qnRce.js} +20 -85
- package/dist/controls-L7DPvB0m.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +3 -1
- package/dist/core.js +150 -75
- package/dist/{defaultTheme-D8B4-wHO.js → defaultTheme-4kA60XdB.js} +6 -8
- package/dist/defaultTheme-mrkeGFGI.cjs +1 -0
- package/dist/delete-page-modal-7KmP1elv.js +67 -0
- package/dist/delete-page-modal-SgfwvfNu.cjs +1 -0
- package/dist/dropdown-menu-El86_9Uo.js +124 -0
- package/dist/dropdown-menu-SiHzqWwZ.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +3 -292
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +3 -1
- package/dist/email.js +18 -37
- package/dist/{form-STUz-6nE.js → form-0_RLz2TB.js} +12 -12
- package/dist/form-W58AVUdf.cjs +1 -0
- package/dist/hover-card-KUwpDkW8.cjs +1 -0
- package/dist/hover-card-q138xxXR.js +45 -0
- package/dist/{html-to-json-ngX9ef2u.js → html-to-json-2xtb7520.js} +41 -41
- package/dist/{html-to-json-efmv1pCj.cjs → html-to-json-uSnxl72F.cjs} +1 -1
- package/dist/iconBase-gbUAAO2L.cjs +1 -0
- package/dist/iconBase-h4DuR_XT.js +63 -0
- package/dist/index-9MmykVSc.cjs +1 -0
- package/dist/index-hElOGcFr.js +2200 -0
- package/dist/index-lDTsQp7h.js +188 -0
- package/dist/index-rq5Y9ZDy.cjs +1 -0
- package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
- package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
- package/dist/label-KaP7MRrs.js +10 -0
- package/dist/label-tFm8HZdb.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +62 -66
- package/dist/link-WbcKdQ9k.cjs +1 -0
- package/dist/link-xuhP-4dN.js +196 -0
- package/dist/page-viewer-Hx5hxHKm.cjs +1 -0
- package/dist/{page-viewer-rCXavxpd.js → page-viewer-NnOwmAmu.js} +43 -57
- package/dist/popover-a84pbVhQ.js +23 -0
- package/dist/popover-fKjgcRUx.cjs +1 -0
- package/dist/{project-general-setting-rmAVpDu9.js → project-general-setting-9ju3TDju.js} +35 -43
- package/dist/project-general-setting-FxkwjvJz.cjs +1 -0
- package/dist/{project-seo-setting-pX34Qsym.js → project-seo-setting-36CdUszM.js} +23 -40
- package/dist/project-seo-setting-RU7qiXxb.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +13 -14
- package/dist/scroll-area-FiHvy-TZ.cjs +1 -0
- package/dist/scroll-area-ewXbxc3n.js +30 -0
- package/dist/select-7bjg-rr9.cjs +1 -0
- package/dist/select-POGdEDHT.js +75 -0
- package/dist/separator-3Civ-6hb.cjs +1 -0
- package/dist/separator-SctTn0Qi.js +18 -0
- package/dist/single-page-detail-beY0MT1b.cjs +1 -0
- package/dist/{single-page-detail-rSQomrY5.js → single-page-detail-hD1jKZ8k.js} +66 -74
- package/dist/skeleton-STeL9VrJ.cjs +1 -0
- package/dist/skeleton-lu8e7q2y.js +239 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +3 -1
- package/dist/studio.js +24 -40
- package/dist/tabs-_4WbA1cc.cjs +1 -0
- package/dist/tabs-yQ3oGziM.js +106 -0
- package/dist/textarea-1kZEh7ki.cjs +1 -0
- package/dist/textarea-b2QvVhrK.js +73 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +365 -160
- package/dist/useAddBlock-8pxOEYIl.cjs +1 -0
- package/dist/useAddBlock-FEKFJNwQ.js +69 -0
- package/dist/useChaiExternalData-fkFgoS80.js +6 -0
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +1 -0
- package/dist/useDarkMode-7i57segK.cjs +1 -0
- package/dist/useDarkMode-8VHJlYyE.js +23 -0
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +10 -0
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +1 -0
- package/dist/useStylingState-Iuj84yvc.js +186 -0
- package/dist/useStylingState-OIvJMV6p.cjs +1 -0
- package/dist/useUiLibraries-nCdauJ4N.cjs +1 -0
- package/dist/useUiLibraries-psyWFbNc.js +12 -0
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +1 -0
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +23 -0
- package/dist/utils-dze1SGvB.js +6 -0
- package/dist/utils-qK_SjzzV.cjs +1 -0
- package/dist/web-blocks.cjs +1 -6
- package/dist/web-blocks.js +3 -1153
- package/package.json +1 -1
- package/dist/AddBlocks-l1JENNvq.js +0 -206
- package/dist/AddBlocks-zPPKkeKs.cjs +0 -1
- package/dist/BrandingOptions-DkpqGARR.cjs +0 -1
- package/dist/CanvasArea-plZTWifU.cjs +0 -55
- package/dist/Class-PoYusiA5.cjs +0 -1
- package/dist/CurrentPage-7_s9LtEJ.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/ListTree-LAN7QmHQ.cjs +0 -1
- package/dist/MODIFIERS-0g14w5RS.cjs +0 -1
- package/dist/PagesPanel-5qMZBatP.cjs +0 -1
- package/dist/PagesPanel-883P3_su.js +0 -64
- package/dist/ProjectPanel-Y8Qcmsn0.js +0 -85
- package/dist/ProjectPanel-otQb9ceP.cjs +0 -1
- package/dist/Settings-Rt342VJ3.cjs +0 -1
- package/dist/SidePanels-PaQkgjLa.cjs +0 -1
- package/dist/Topbar-CqW7G360.cjs +0 -1
- package/dist/Topbar-pWzBEOed.js +0 -132
- package/dist/UnsplashImages-NGskB93R.cjs +0 -1
- package/dist/UploadImages-Oh7Glr9A.cjs +0 -1
- package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
- package/dist/add-page-modal-4PiRJgX5.js +0 -104
- package/dist/add-page-modal-4o2L_7T7.cjs +0 -1
- package/dist/confirm-alert-C4M9eF-o.cjs +0 -1
- package/dist/confirm-alert-GUhZ_G8w.js +0 -60
- package/dist/controls-KK2oLIa8.cjs +0 -1
- package/dist/defaultTheme-7VqqhOcp.cjs +0 -1
- package/dist/delete-page-modal-4l5-RhQB.js +0 -83
- package/dist/delete-page-modal-Bek5bCf-.cjs +0 -1
- package/dist/empty-slot-ZBlsQi6m.js +0 -15
- package/dist/empty-slot-nzYOgZuS.cjs +0 -1
- package/dist/form-lBQ_76Uw.cjs +0 -1
- package/dist/index-Gk6sASBd.js +0 -3080
- package/dist/index-YpnaudSM.js +0 -63
- package/dist/index-dgm-fd8U.cjs +0 -206
- package/dist/index-e0c8PmRQ.js +0 -205
- package/dist/index-ecnGWzh9.cjs +0 -1
- package/dist/index-gS-3liKK.js +0 -39503
- package/dist/index-gi1LIOCw.cjs +0 -1
- package/dist/index-h-hd6EvN.cjs +0 -1
- package/dist/index-oCYKBYyT.cjs +0 -1
- package/dist/index-xZWaF8AW.js +0 -2201
- package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
- package/dist/page-viewer-JlKEwACu.cjs +0 -1
- package/dist/project-general-setting-2FGoUZ-z.cjs +0 -1
- package/dist/project-seo-setting-mlxL_e2_.cjs +0 -1
- package/dist/single-page-detail-c6-wRWyN.cjs +0 -1
|
@@ -1,66 +1,56 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
2
|
-
import
|
|
1
|
+
import { j as e } from "./jsx-runtime-Sp0orL4X.js";
|
|
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
|
-
import { useDebouncedCallback as
|
|
4
|
+
import { useDebouncedCallback as w } from "@react-hookz/web";
|
|
5
5
|
import { Tree as A } from "react-arborist";
|
|
6
|
-
import {
|
|
7
|
-
import { c as N } from "./Functions-
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
6
|
+
import { a as D, j as b, u as z, k as _, i as L, f as E, K as F, n as V, t as O } from "./ChaiBuilderEditor-vP4at00I.js";
|
|
7
|
+
import { c as N } from "./Functions-NzT2Six_.js";
|
|
8
|
+
import { u as $ } from "./useUpdateBlocksProps-vWcDp-P9.js";
|
|
9
|
+
import "react-i18next";
|
|
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";
|
|
10
15
|
import { find as B, first as Be } from "lodash-es";
|
|
11
|
-
import "./
|
|
12
|
-
import "@chaibuilder/runtime";
|
|
13
|
-
import "./STRINGS--j49GZJP.js";
|
|
14
|
-
import "./MODIFIERS-dytZ-osO.js";
|
|
15
|
-
import "./Class-lGzsNBOK.js";
|
|
16
|
+
import "./MODIFIERS-CNqNUapY.js";
|
|
16
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";
|
|
24
|
+
import "@chaibuilder/runtime";
|
|
17
25
|
import "tailwind-merge";
|
|
18
|
-
import "react-i18next";
|
|
19
|
-
import "@radix-ui/react-toggle";
|
|
20
|
-
import "class-variance-authority";
|
|
21
|
-
import "@radix-ui/react-switch";
|
|
22
26
|
import "@radix-ui/react-slot";
|
|
23
|
-
import "
|
|
24
|
-
import "
|
|
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";
|
|
27
|
+
import "class-variance-authority";
|
|
28
|
+
import "./utils-dze1SGvB.js";
|
|
29
29
|
import "@radix-ui/react-tooltip";
|
|
30
|
-
import "@radix-ui/react-popover";
|
|
31
|
-
import "@radix-ui/react-menubar";
|
|
32
|
-
import "@radix-ui/react-hover-card";
|
|
33
|
-
import "@radix-ui/react-select";
|
|
34
|
-
import "@radix-ui/react-dropdown-menu";
|
|
35
|
-
import "@radix-ui/react-separator";
|
|
36
30
|
import "@radix-ui/react-toast";
|
|
37
|
-
import "cmdk";
|
|
38
31
|
import "@radix-ui/react-context-menu";
|
|
39
|
-
|
|
40
|
-
import "react-dom";
|
|
41
|
-
import "react-quill";
|
|
42
|
-
const M = (t) => {
|
|
32
|
+
const S = (t) => {
|
|
43
33
|
switch (t.type) {
|
|
44
34
|
case "Image":
|
|
45
|
-
return /* @__PURE__ */ e.jsx(
|
|
35
|
+
return /* @__PURE__ */ e.jsx(he, {});
|
|
46
36
|
case "Heading":
|
|
47
|
-
return /* @__PURE__ */ e.jsx(
|
|
37
|
+
return /* @__PURE__ */ e.jsx(me, {});
|
|
48
38
|
case "Text":
|
|
49
39
|
return /* @__PURE__ */ e.jsx(C, {});
|
|
50
40
|
case "Link":
|
|
51
|
-
return /* @__PURE__ */ e.jsx(
|
|
41
|
+
return /* @__PURE__ */ e.jsx(pe, {});
|
|
52
42
|
case "Video":
|
|
53
|
-
return /* @__PURE__ */ e.jsx(
|
|
43
|
+
return /* @__PURE__ */ e.jsx(xe, {});
|
|
54
44
|
case "RichText":
|
|
55
|
-
return /* @__PURE__ */ e.jsx(
|
|
45
|
+
return /* @__PURE__ */ e.jsx(de, {});
|
|
56
46
|
case "Button":
|
|
57
47
|
return /* @__PURE__ */ e.jsx(I, {});
|
|
58
48
|
case "CustomHTML":
|
|
59
|
-
return /* @__PURE__ */ e.jsx(
|
|
49
|
+
return /* @__PURE__ */ e.jsx(ue, {});
|
|
60
50
|
case "Divider":
|
|
61
|
-
return /* @__PURE__ */ e.jsx(
|
|
51
|
+
return /* @__PURE__ */ e.jsx(le, {});
|
|
62
52
|
case "Icon":
|
|
63
|
-
return /* @__PURE__ */ e.jsx(
|
|
53
|
+
return /* @__PURE__ */ e.jsx(ie, {});
|
|
64
54
|
case "List":
|
|
65
55
|
return /* @__PURE__ */ e.jsx(k, {});
|
|
66
56
|
case "Paragraph":
|
|
@@ -68,44 +58,44 @@ const M = (t) => {
|
|
|
68
58
|
case "Row":
|
|
69
59
|
return /* @__PURE__ */ e.jsx(k, {});
|
|
70
60
|
case "ListItem":
|
|
71
|
-
return /* @__PURE__ */ e.jsx(
|
|
61
|
+
return /* @__PURE__ */ e.jsx(ae, {});
|
|
72
62
|
case "LineBreak":
|
|
73
|
-
return /* @__PURE__ */ e.jsx(
|
|
63
|
+
return /* @__PURE__ */ e.jsx(ce, {});
|
|
74
64
|
case "Form":
|
|
75
|
-
return /* @__PURE__ */ e.jsx(
|
|
65
|
+
return /* @__PURE__ */ e.jsx(oe, {});
|
|
76
66
|
case "Checkbox":
|
|
77
|
-
return /* @__PURE__ */ e.jsx(
|
|
67
|
+
return /* @__PURE__ */ e.jsx(ne, {});
|
|
78
68
|
case "FormButton":
|
|
79
69
|
return /* @__PURE__ */ e.jsx(I, {});
|
|
80
70
|
case "Input":
|
|
81
71
|
case "TextArea":
|
|
82
|
-
return /* @__PURE__ */ e.jsx(
|
|
72
|
+
return /* @__PURE__ */ e.jsx(re, {});
|
|
83
73
|
case "Radio":
|
|
84
|
-
return /* @__PURE__ */ e.jsx(
|
|
74
|
+
return /* @__PURE__ */ e.jsx(se, {});
|
|
85
75
|
case "Select":
|
|
86
|
-
return /* @__PURE__ */ e.jsx(
|
|
76
|
+
return /* @__PURE__ */ e.jsx(te, {});
|
|
87
77
|
case "Table":
|
|
88
|
-
return /* @__PURE__ */ e.jsx(
|
|
78
|
+
return /* @__PURE__ */ e.jsx(ee, {});
|
|
89
79
|
case "TableHead":
|
|
90
|
-
return /* @__PURE__ */ e.jsx(
|
|
80
|
+
return /* @__PURE__ */ e.jsx(Z, {});
|
|
91
81
|
case "TableBody":
|
|
92
|
-
return /* @__PURE__ */ e.jsx(
|
|
82
|
+
return /* @__PURE__ */ e.jsx(Y, {});
|
|
93
83
|
case "TableRow":
|
|
94
|
-
return /* @__PURE__ */ e.jsx(
|
|
84
|
+
return /* @__PURE__ */ e.jsx(X, {});
|
|
95
85
|
case "TableCell":
|
|
96
|
-
return /* @__PURE__ */ e.jsx(
|
|
86
|
+
return /* @__PURE__ */ e.jsx(Q, {});
|
|
97
87
|
case "DataProvider":
|
|
98
|
-
return /* @__PURE__ */ e.jsx(
|
|
88
|
+
return /* @__PURE__ */ e.jsx(be, { size: 16 });
|
|
99
89
|
case "Box":
|
|
100
|
-
return /* @__PURE__ */ e.jsx(
|
|
90
|
+
return /* @__PURE__ */ e.jsx(J, {});
|
|
101
91
|
default:
|
|
102
|
-
return /* @__PURE__ */ e.jsx(
|
|
92
|
+
return /* @__PURE__ */ e.jsx(q, {});
|
|
103
93
|
}
|
|
104
94
|
}, Te = {
|
|
105
95
|
display: "flex",
|
|
106
96
|
alignItems: "center",
|
|
107
97
|
zIndex: 1
|
|
108
|
-
}, we =
|
|
98
|
+
}, we = T.memo(function({ top: r, left: s }) {
|
|
109
99
|
const l = {
|
|
110
100
|
position: "absolute",
|
|
111
101
|
pointerEvents: "none",
|
|
@@ -117,7 +107,7 @@ const M = (t) => {
|
|
|
117
107
|
}), De = f(function({ children: r, isDragging: s }) {
|
|
118
108
|
return s ? /* @__PURE__ */ e.jsx("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: r }) : null;
|
|
119
109
|
}), _e = f(({ id: t, isDragging: r, mouse: s }) => {
|
|
120
|
-
const [l] =
|
|
110
|
+
const [l] = D(), n = v(() => l.find((d) => d._id === t), [l, t]), x = v(
|
|
121
111
|
() => ({
|
|
122
112
|
transform: `translate(${(s == null ? void 0 : s.x) - 10}px, ${(s == null ? void 0 : s.y) - 10}px)`
|
|
123
113
|
}),
|
|
@@ -128,50 +118,50 @@ const M = (t) => {
|
|
|
128
118
|
{
|
|
129
119
|
className: "pointer-events-none absolute z-50 rounded border border-gray-200 bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
|
|
130
120
|
style: x,
|
|
131
|
-
children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${
|
|
132
|
-
/* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(
|
|
133
|
-
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (
|
|
121
|
+
children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${n == null ? void 0 : n._type}`, children: [
|
|
122
|
+
/* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(S, { type: n == null ? void 0 : n._type }) }),
|
|
123
|
+
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (n == null ? void 0 : n._name) || (n == null ? void 0 : n._type) })
|
|
134
124
|
] })
|
|
135
125
|
}
|
|
136
126
|
) }) }) : /* @__PURE__ */ e.jsx("div", { className: "hidden" });
|
|
137
127
|
}), Ne = () => {
|
|
138
|
-
const [t] = b(), r =
|
|
128
|
+
const [t] = b(), r = L(), s = _();
|
|
139
129
|
return /* @__PURE__ */ e.jsxs(
|
|
140
|
-
|
|
130
|
+
M,
|
|
141
131
|
{
|
|
142
|
-
disabled: !
|
|
132
|
+
disabled: !Ce(s == null ? void 0 : s._type),
|
|
143
133
|
className: "flex items-center gap-x-4 text-xs",
|
|
144
134
|
onClick: () => r(t),
|
|
145
135
|
children: [
|
|
146
|
-
/* @__PURE__ */ e.jsx(
|
|
136
|
+
/* @__PURE__ */ e.jsx(je, {}),
|
|
147
137
|
" Remove"
|
|
148
138
|
]
|
|
149
139
|
}
|
|
150
140
|
);
|
|
151
141
|
}, Me = () => {
|
|
152
|
-
const [t] = b(), r =
|
|
142
|
+
const [t] = b(), r = z(), s = _(), l = R(() => {
|
|
153
143
|
r(t);
|
|
154
144
|
}, [t, r]);
|
|
155
|
-
return /* @__PURE__ */ e.jsxs(
|
|
145
|
+
return /* @__PURE__ */ e.jsxs(Ie, { className: "text-xs", children: [
|
|
156
146
|
/* @__PURE__ */ e.jsxs(
|
|
157
|
-
|
|
147
|
+
M,
|
|
158
148
|
{
|
|
159
|
-
disabled: !
|
|
149
|
+
disabled: !ke(s == null ? void 0 : s._type),
|
|
160
150
|
className: "flex items-center gap-x-4 text-xs",
|
|
161
151
|
onClick: l,
|
|
162
152
|
children: [
|
|
163
|
-
/* @__PURE__ */ e.jsx(
|
|
153
|
+
/* @__PURE__ */ e.jsx(ge, {}),
|
|
164
154
|
" Duplicate"
|
|
165
155
|
]
|
|
166
156
|
}
|
|
167
157
|
),
|
|
168
158
|
/* @__PURE__ */ e.jsx(Ne, {})
|
|
169
159
|
] });
|
|
170
|
-
}, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
171
|
-
/* @__PURE__ */ e.jsx(
|
|
160
|
+
}, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(ye, { children: [
|
|
161
|
+
/* @__PURE__ */ e.jsx(ve, { children: t }),
|
|
172
162
|
/* @__PURE__ */ e.jsx(Me, {})
|
|
173
163
|
] }) }), Re = f(({ node: t, style: r, dragHandle: s }) => {
|
|
174
|
-
const l =
|
|
164
|
+
const l = K("outlineMenuItems", []), [, n] = E(), x = t.children.length > 0, { id: d, data: a, isSelected: m, willReceiveDrop: p, isDragging: h, isEditing: g, handleClick: j } = t, o = w((c) => n(c), [], 300), i = (c) => {
|
|
175
165
|
c.stopPropagation(), t.toggle();
|
|
176
166
|
}, u = (c) => {
|
|
177
167
|
c.stopPropagation(), t.toggle(), j(c);
|
|
@@ -185,7 +175,7 @@ const M = (t) => {
|
|
|
185
175
|
"div",
|
|
186
176
|
{
|
|
187
177
|
onClick: u,
|
|
188
|
-
onMouseEnter: () =>
|
|
178
|
+
onMouseEnter: () => o(d),
|
|
189
179
|
style: r,
|
|
190
180
|
"data-node-id": d,
|
|
191
181
|
ref: s,
|
|
@@ -201,11 +191,11 @@ const M = (t) => {
|
|
|
201
191
|
"div",
|
|
202
192
|
{
|
|
203
193
|
className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${t.isOpen ? "rotate-90" : ""}`,
|
|
204
|
-
children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(
|
|
194
|
+
children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(fe, {}) })
|
|
205
195
|
}
|
|
206
196
|
),
|
|
207
197
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
208
|
-
/* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(
|
|
198
|
+
/* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(S, { type: a == null ? void 0 : a._type }) }),
|
|
209
199
|
g ? /* @__PURE__ */ e.jsx(He, { node: t }) : /* @__PURE__ */ e.jsx(
|
|
210
200
|
"div",
|
|
211
201
|
{
|
|
@@ -218,13 +208,13 @@ const M = (t) => {
|
|
|
218
208
|
)
|
|
219
209
|
] })
|
|
220
210
|
] }),
|
|
221
|
-
/* @__PURE__ */ e.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: l.map((c) => /* @__PURE__ */ e.jsxs(
|
|
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(U, { children: [
|
|
222
212
|
/* @__PURE__ */ e.jsx(
|
|
223
|
-
|
|
213
|
+
G,
|
|
224
214
|
{
|
|
225
215
|
className: "cursor-pointer rounded bg-transparent hover:bg-white hover:text-blue-500",
|
|
226
216
|
asChild: !0,
|
|
227
|
-
children: c.item
|
|
217
|
+
children: T.createElement(c.item, { blockId: d })
|
|
228
218
|
}
|
|
229
219
|
),
|
|
230
220
|
/* @__PURE__ */ e.jsx(W, { className: "z-[9999]", children: c.tooltip })
|
|
@@ -246,36 +236,36 @@ const M = (t) => {
|
|
|
246
236
|
}
|
|
247
237
|
}
|
|
248
238
|
), Pe = () => {
|
|
249
|
-
const [t] =
|
|
239
|
+
const [t] = D();
|
|
250
240
|
return (r, s) => {
|
|
251
241
|
var x;
|
|
252
|
-
const l = (x = B(t, { _id: s })) == null ? void 0 : x._type,
|
|
242
|
+
const l = (x = B(t, { _id: s })) == null ? void 0 : x._type, n = Be(r.map((d) => {
|
|
253
243
|
var a;
|
|
254
244
|
return (a = B(t, { _id: d })) == null ? void 0 : a._type;
|
|
255
245
|
}));
|
|
256
|
-
return y(l,
|
|
246
|
+
return y(l, n);
|
|
257
247
|
};
|
|
258
|
-
},
|
|
259
|
-
const [t] = P(
|
|
260
|
-
s([]),
|
|
261
|
-
}, m = ({ id:
|
|
262
|
-
l([
|
|
263
|
-
}, p = ({ dragIds:
|
|
264
|
-
d(
|
|
265
|
-
}, h = (
|
|
266
|
-
if (
|
|
248
|
+
}, pt = () => {
|
|
249
|
+
const [t] = P(F), [r, s] = b(), l = $(), [, n] = V(), { moveBlocks: x } = O(), d = Pe(), a = () => {
|
|
250
|
+
s([]), n([]);
|
|
251
|
+
}, m = ({ id: o, name: i, node: u }) => {
|
|
252
|
+
l([o], { _name: i }, u.data._name);
|
|
253
|
+
}, p = ({ dragIds: o, parentId: i, index: u }) => {
|
|
254
|
+
d(o, i) && x(o, i, u);
|
|
255
|
+
}, h = (o) => {
|
|
256
|
+
if (o.length === 0)
|
|
267
257
|
return;
|
|
268
|
-
const i =
|
|
269
|
-
|
|
270
|
-
}, g = (
|
|
258
|
+
const i = o[0] ? o[0].id : "";
|
|
259
|
+
n([]), s([i]);
|
|
260
|
+
}, g = (o) => {
|
|
271
261
|
var c;
|
|
272
|
-
|
|
273
|
-
const i =
|
|
274
|
-
u && (
|
|
275
|
-
}, j =
|
|
276
|
-
({ parentNode:
|
|
262
|
+
o.preventDefault();
|
|
263
|
+
const i = o.target, u = i.getAttribute("data-node-id") || ((c = i.closest("[data-node-id]")) == null ? void 0 : c.getAttribute("data-node-id"));
|
|
264
|
+
u && (n([]), s([u]));
|
|
265
|
+
}, j = w(
|
|
266
|
+
({ parentNode: o, dragNodes: i }) => {
|
|
277
267
|
var u;
|
|
278
|
-
return !y(
|
|
268
|
+
return !y(o == null ? void 0 : o.data._type, (u = i[0]) == null ? void 0 : u.data._type);
|
|
279
269
|
},
|
|
280
270
|
[],
|
|
281
271
|
300
|
|
@@ -293,7 +283,7 @@ const M = (t) => {
|
|
|
293
283
|
data: t,
|
|
294
284
|
renderCursor: we,
|
|
295
285
|
onSelect: h,
|
|
296
|
-
childrenAccessor: (
|
|
286
|
+
childrenAccessor: (o) => o.children,
|
|
297
287
|
width: "100%",
|
|
298
288
|
renderDragPreview: _e,
|
|
299
289
|
indent: 10,
|
|
@@ -305,5 +295,5 @@ const M = (t) => {
|
|
|
305
295
|
) }) });
|
|
306
296
|
};
|
|
307
297
|
export {
|
|
308
|
-
|
|
298
|
+
pt as default
|
|
309
299
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function t(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
const i = [
|
|
2
6
|
"hover",
|
|
3
7
|
"focus",
|
|
4
8
|
"focus-within",
|
|
@@ -47,7 +51,7 @@ const e = [
|
|
|
47
51
|
"ui-not-active",
|
|
48
52
|
"ui-not-selected",
|
|
49
53
|
"ui-not-checked"
|
|
50
|
-
],
|
|
54
|
+
], l = {
|
|
51
55
|
bodyFont: "Inter",
|
|
52
56
|
headingFont: "Inter",
|
|
53
57
|
roundedCorners: 5,
|
|
@@ -59,6 +63,8 @@ const e = [
|
|
|
59
63
|
bodyTextLightColor: "#000000"
|
|
60
64
|
};
|
|
61
65
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
l as B,
|
|
67
|
+
i as M,
|
|
68
|
+
o as c,
|
|
69
|
+
t as g
|
|
64
70
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const i=["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"],l={bodyFont:"Inter",headingFont:"Inter",roundedCorners:5,primaryColor:"#570df8",secondaryColor:"#f002b8",bodyBgDarkColor:"#031022",bodyBgLightColor:"#fcfcfc",bodyTextDarkColor:"#ffffff",bodyTextLightColor:"#000000"};exports.BRANDING_OPTIONS_DEFAULTS=l;exports.MODIFIERS=i;exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),i=require("react"),s=require("lodash-es"),u=require("./index-9MmykVSc.cjs");require("./ChaiBuilderEditor-m30yoOgJ.cjs");require("./MODIFIERS-o1p3VnpS.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./skeleton-STeL9VrJ.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-qK_SjzzV.cjs");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("./Functions-Hvon6AMZ.cjs");require("react-hotkeys-hook");require("@react-hookz/web");require("@chaibuilder/runtime");require("sonner");require("./html-to-json-uSnxl72F.cjs");require("himalaya");require("./STRINGS-gPz7CUOk.cjs");require("lucide-react");require("./iconBase-gbUAAO2L.cjs");require("./alert-dialog-P9xMMB6C.cjs");require("@radix-ui/react-alert-dialog");const q=i.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-9SGv2hgc.cjs"))),x=i.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-Hx5hxHKm.cjs"))),d=()=>{const{data:t=[],isLoading:n}=u.usePages(),{data:r}=u.useProject(),o=s.sortBy(s.filter(t,{type:"STATIC"}),a=>s.get(a,"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(i.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(q,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:n,pages:o})})]})};exports.default=d;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import i, { Suspense as p } from "react";
|
|
3
|
+
import { sortBy as a, filter as d, get as n } from "lodash-es";
|
|
4
|
+
import { u as l, a as c } from "./index-hElOGcFr.js";
|
|
5
|
+
import "./ChaiBuilderEditor-vP4at00I.js";
|
|
6
|
+
import "./MODIFIERS-CNqNUapY.js";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "@radix-ui/react-scroll-area";
|
|
9
|
+
import "react-dom";
|
|
10
|
+
import "@floating-ui/react-dom";
|
|
11
|
+
import "jotai";
|
|
12
|
+
import "i18next";
|
|
13
|
+
import "react-i18next";
|
|
14
|
+
import "flagged";
|
|
15
|
+
import "./skeleton-lu8e7q2y.js";
|
|
16
|
+
import "@radix-ui/react-slot";
|
|
17
|
+
import "class-variance-authority";
|
|
18
|
+
import "./utils-dze1SGvB.js";
|
|
19
|
+
import "tailwind-merge";
|
|
20
|
+
import "@radix-ui/react-tooltip";
|
|
21
|
+
import "@radix-ui/react-icons";
|
|
22
|
+
import "@radix-ui/react-toast";
|
|
23
|
+
import "./Functions-NzT2Six_.js";
|
|
24
|
+
import "react-hotkeys-hook";
|
|
25
|
+
import "@react-hookz/web";
|
|
26
|
+
import "@chaibuilder/runtime";
|
|
27
|
+
import "sonner";
|
|
28
|
+
import "./html-to-json-2xtb7520.js";
|
|
29
|
+
import "himalaya";
|
|
30
|
+
import "./STRINGS-b432aBJJ.js";
|
|
31
|
+
import "lucide-react";
|
|
32
|
+
import "./iconBase-h4DuR_XT.js";
|
|
33
|
+
import "./alert-dialog-rypfO5ly.js";
|
|
34
|
+
import "@radix-ui/react-alert-dialog";
|
|
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);
|
|
37
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
38
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
39
|
+
/* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Pages" }),
|
|
40
|
+
/* @__PURE__ */ t.jsx(p, { fallback: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-blue-500 underline", children: "+ New Page" }), children: /* @__PURE__ */ t.jsx(x, {}) })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__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: e }) })
|
|
44
|
+
] });
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
W as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import i, { useRef as x, useEffect as m, Suspense as n } from "react";
|
|
3
|
+
import { isEqual as b, isEmpty as j } from "lodash-es";
|
|
4
|
+
import { A as f, a as l, b as c, c as p } from "./accordion-oPUeqPCZ.js";
|
|
5
|
+
import { b as h, a as g } from "./index-hElOGcFr.js";
|
|
6
|
+
import "@radix-ui/react-accordion";
|
|
7
|
+
import "@radix-ui/react-icons";
|
|
8
|
+
import "./utils-dze1SGvB.js";
|
|
9
|
+
import "clsx";
|
|
10
|
+
import "tailwind-merge";
|
|
11
|
+
import "./ChaiBuilderEditor-vP4at00I.js";
|
|
12
|
+
import "./MODIFIERS-CNqNUapY.js";
|
|
13
|
+
import "@radix-ui/react-scroll-area";
|
|
14
|
+
import "react-dom";
|
|
15
|
+
import "@floating-ui/react-dom";
|
|
16
|
+
import "jotai";
|
|
17
|
+
import "i18next";
|
|
18
|
+
import "react-i18next";
|
|
19
|
+
import "flagged";
|
|
20
|
+
import "./skeleton-lu8e7q2y.js";
|
|
21
|
+
import "@radix-ui/react-slot";
|
|
22
|
+
import "class-variance-authority";
|
|
23
|
+
import "@radix-ui/react-tooltip";
|
|
24
|
+
import "@radix-ui/react-toast";
|
|
25
|
+
import "./Functions-NzT2Six_.js";
|
|
26
|
+
import "react-hotkeys-hook";
|
|
27
|
+
import "@react-hookz/web";
|
|
28
|
+
import "@chaibuilder/runtime";
|
|
29
|
+
import "sonner";
|
|
30
|
+
import "./html-to-json-2xtb7520.js";
|
|
31
|
+
import "himalaya";
|
|
32
|
+
import "./STRINGS-b432aBJJ.js";
|
|
33
|
+
import "lucide-react";
|
|
34
|
+
import "./iconBase-h4DuR_XT.js";
|
|
35
|
+
import "./alert-dialog-rypfO5ly.js";
|
|
36
|
+
import "@radix-ui/react-alert-dialog";
|
|
37
|
+
const N = i.lazy(() => import("./project-general-setting-9ju3TDju.js")), S = i.lazy(() => import("./project-seo-setting-36CdUszM.js")), d = /* @__PURE__ */ e.jsx("div", { className: "px-3", children: /* @__PURE__ */ e.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (t) => t && j(t.seoData) ? {
|
|
38
|
+
...t,
|
|
39
|
+
seoData: { title: "", description: "", image: "" }
|
|
40
|
+
} : t;
|
|
41
|
+
function oe() {
|
|
42
|
+
const t = h(), { data: o } = g(), [r, a] = i.useState(
|
|
43
|
+
u(o || {})
|
|
44
|
+
), s = x(r);
|
|
45
|
+
return m(
|
|
46
|
+
() => () => {
|
|
47
|
+
b(o, s.current) || t.mutate(s.current, {
|
|
48
|
+
onSuccess: () => a(s.current)
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
[s]
|
|
52
|
+
), m(() => {
|
|
53
|
+
s.current = r;
|
|
54
|
+
}, [r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
55
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ e.jsx("h1", { className: "px-1 font-semibold", children: "Website Settings" }) }),
|
|
56
|
+
/* @__PURE__ */ e.jsx("hr", { className: "-mx-1" }),
|
|
57
|
+
/* @__PURE__ */ e.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ e.jsxs(f, { type: "single", className: "w-full", defaultValue: "GENERAL", children: [
|
|
58
|
+
/* @__PURE__ */ e.jsxs(l, { value: "GENERAL", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
59
|
+
/* @__PURE__ */ e.jsx(c, { 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" }),
|
|
60
|
+
/* @__PURE__ */ e.jsx(p, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ e.jsx(n, { fallback: d, children: /* @__PURE__ */ e.jsx(N, { _projectData: r, seany: a }) }) })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ e.jsxs(l, { value: "SEO", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
63
|
+
/* @__PURE__ */ e.jsx(c, { 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" }),
|
|
64
|
+
/* @__PURE__ */ e.jsx(p, { className: "px-1 pt-4 text-sm", children: /* @__PURE__ */ e.jsx(n, { fallback: d, children: /* @__PURE__ */ e.jsx(S, { _projectData: r, seany: a }) }) })
|
|
65
|
+
] })
|
|
66
|
+
] }) })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
oe as default
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),r=require("react"),x=require("lodash-es"),s=require("./accordion-ynvFtV_p.cjs"),a=require("./index-9MmykVSc.cjs");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("./ChaiBuilderEditor-m30yoOgJ.cjs");require("./MODIFIERS-o1p3VnpS.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./skeleton-STeL9VrJ.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("./Functions-Hvon6AMZ.cjs");require("react-hotkeys-hook");require("@react-hookz/web");require("@chaibuilder/runtime");require("sonner");require("./html-to-json-uSnxl72F.cjs");require("himalaya");require("./STRINGS-gPz7CUOk.cjs");require("lucide-react");require("./iconBase-gbUAAO2L.cjs");require("./alert-dialog-P9xMMB6C.cjs");require("@radix-ui/react-alert-dialog");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-FxkwjvJz.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-RU7qiXxb.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 j(){const t=a.useUpdateProject(),{data:u}=a.useProject(),[i,o]=r.useState(l(u||{})),n=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(u,n.current)||t.mutate(n.current,{onSuccess:()=>o(n.current)})},[n]),r.useEffect(()=>{n.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=j;
|