@chaibuilder/sdk 1.1.11 → 1.1.13
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-Rd2EpNMr.js → AddBlocks-A7WofxHV.js} +29 -37
- package/dist/AddBlocks-Yuc4t0Z_.cjs +1 -0
- package/dist/{BrandingOptions-rTaSfm0M.cjs → BrandingOptions-KkPF1OGn.cjs} +1 -1
- package/dist/{BrandingOptions-OVjd8R6I.js → BrandingOptions-wkFrLFI_.js} +2 -2
- package/dist/{CanvasArea-zAT94LPr.js → CanvasArea-chEYQhH8.js} +52 -53
- package/dist/{CanvasArea-_eT3OREW.cjs → CanvasArea-kF46NWZK.cjs} +3 -3
- package/dist/{CurrentPage-awyWzrD1.js → CurrentPage-Wd7F9Egg.js} +15 -23
- package/dist/CurrentPage-p9MaXTOB.cjs +1 -0
- package/dist/{Layers-Iu48BWko.js → Layers-qMOMP2Mi.js} +9 -17
- package/dist/Layers-wQ0Fv9Xc.cjs +1 -0
- package/dist/{MarkAsGlobalBlock--GjBOKA4.js → MarkAsGlobalBlock-Czq45Amf.js} +2 -2
- package/dist/{MarkAsGlobalBlock-GV1kflbN.cjs → MarkAsGlobalBlock-sb3hMXLq.cjs} +1 -1
- package/dist/PagesPanel--maZxwX5.cjs +1 -0
- package/dist/{PagesPanel-FiGBY1m8.js → PagesPanel-ay4uk4mg.js} +7 -15
- package/dist/ProjectPanel-KhIpO7m3.cjs +1 -0
- package/dist/{ProjectPanel-c5QlZgrp.js → ProjectPanel-eLlbfAtj.js} +19 -27
- package/dist/{Settings-FuvoLEbx.js → Settings-lpoxaMDu.js} +8 -16
- package/dist/Settings-n2DpS5Ta.cjs +1 -0
- package/dist/SidePanels-Dud5Xh9L.cjs +1 -0
- package/dist/{SidePanels-2FjCLw9X.js → SidePanels-iRXV69vh.js} +10 -18
- package/dist/{Topbar-qloDpVn7.js → Topbar-dQYhW4iv.js} +2 -2
- package/dist/{Topbar-P3sqe-wG.cjs → Topbar-vqzjB75a.cjs} +1 -1
- package/dist/{UnsplashImages-8p0Vu9j_.cjs → UnsplashImages-3Sh4UZ-7.cjs} +1 -1
- package/dist/{UnsplashImages-aVlfl8Rj.js → UnsplashImages-AL1ASAoD.js} +2 -2
- package/dist/{UploadImages-7xgCWSqx.js → UploadImages-09wuhk2O.js} +2 -2
- package/dist/{UploadImages-PjW68B7L.cjs → UploadImages-mPzLhMiH.cjs} +1 -1
- package/dist/add-page-modal-FPnIWwqA.cjs +1 -0
- package/dist/{add-page-modal-o4WyfyUe.js → add-page-modal-TXREEFPZ.js} +20 -28
- package/dist/{confirm-alert-OQrR9mLj.js → confirm-alert-GkfW9chS.js} +2 -2
- package/dist/{confirm-alert-Wvv7pPyF.cjs → confirm-alert-YNyc3WEo.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +55 -63
- package/dist/{delete-page-modal-pWTbYmMV.js → delete-page-modal-LNME2FwD.js} +20 -28
- package/dist/delete-page-modal-sTbqZPvk.cjs +1 -0
- package/dist/{form-W_17vJvn.js → form-Fk4CaX1A.js} +1 -1
- package/dist/{form-1HQKf4Lc.cjs → form-OhgCJlVA.cjs} +1 -1
- package/dist/functions-ZWGlwlQY.cjs +1 -0
- package/dist/functions-slns6ONz.js +23 -0
- package/dist/html-to-json-kGgp07Hv.js +177 -0
- package/dist/html-to-json-po8on2ju.cjs +1 -0
- package/dist/{index-kVugkp77.cjs → index-61c5wSJn.cjs} +2 -2
- package/dist/{index-D15K4BZT.js → index-89A3jPHh.js} +2 -2
- package/dist/{index-MIe2pKhn.cjs → index-GNmGzavZ.cjs} +1 -1
- package/dist/{index-RYlMCgpN.js → index-Q5q5Y_8a.js} +16 -16
- package/dist/lib.cjs +2 -1
- package/dist/lib.d.ts +2 -65
- package/dist/lib.js +1140 -230
- package/dist/page-viewer-LPx-OTCC.js +110 -0
- package/dist/page-viewer-wQO9oV9h.cjs +1 -0
- package/dist/project-general-setting-8EwuN5lN.cjs +1 -0
- package/dist/{project-general-setting-rHyDn0aW.js → project-general-setting-sSpFUD_Y.js} +8 -16
- package/dist/{project-seo-setting-bW4cNODi.js → project-seo-setting-CGVegBtM.js} +3 -3
- package/dist/{project-seo-setting-uEYqfVt6.cjs → project-seo-setting-R77SKM1I.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.js +44 -50
- package/dist/{single-page-detail-UUVe4WYc.js → single-page-detail-32H1_IG4.js} +54 -62
- package/dist/single-page-detail-nyBEHLtT.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +6 -14
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +65 -7
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/dist/{useAddBlockByDrop-8i3iNtPF.cjs → useAddBlockByDrop-4VH-SMj7.cjs} +1 -1
- package/dist/{useAddBlockByDrop-wiagwec5.js → useAddBlockByDrop-_kyR0iI4.js} +1 -1
- package/dist/utils-tx6hqsHY.cjs +1 -0
- package/dist/{utils-PPBbw5bk.js → utils-zWMk4dB2.js} +18 -17
- package/package.json +1 -1
- package/dist/AddBlocks-YS5XlqpG.cjs +0 -1
- package/dist/CurrentPage-J3WuljO3.cjs +0 -1
- package/dist/Layers-SkyPSf1R.cjs +0 -1
- package/dist/PagesPanel-dzL5sq6p.cjs +0 -1
- package/dist/ProjectPanel-uOP0fGfw.cjs +0 -1
- package/dist/Settings-QxjYc9wt.cjs +0 -1
- package/dist/SidePanels-9tKSnDxd.cjs +0 -1
- package/dist/add-page-modal-1ied5RTu.cjs +0 -1
- package/dist/delete-page-modal-fKBafNSA.cjs +0 -1
- package/dist/functions-JFP-oMsY.js +0 -1109
- package/dist/functions-KMQYiBHf.cjs +0 -2
- package/dist/page-viewer-CijLLu6R.js +0 -118
- package/dist/page-viewer-_mpbB5Lr.cjs +0 -1
- package/dist/project-general-setting-gwcHJ-ow.cjs +0 -1
- package/dist/single-page-detail-aNLmbldV.cjs +0 -1
- package/dist/tailwind-config-OxLD7oFU.cjs +0 -1
- package/dist/tailwind-config-d1VL1lzE.js +0 -62
- package/dist/utils-It2K33fU.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { ag as x, aq as h, ar as f, as as j, at as y, au as P } from "./index-
|
|
3
|
-
import { sortBy as v, filter as b, get as w, isEmpty as
|
|
2
|
+
import { ag as x, aq as h, ar as f, as as j, at as y, au as P } from "./index-89A3jPHh.js";
|
|
3
|
+
import { sortBy as v, filter as b, get as w, isEmpty as m, find as n, capitalize as C, map as N } from "lodash";
|
|
4
4
|
import { toast as S } from "sonner";
|
|
5
5
|
import { useEffect as p } from "react";
|
|
6
|
-
import { b as k, a as B, d as E, e as I } from "./index-
|
|
6
|
+
import { b as k, a as B, d as E, e as I } from "./index-Q5q5Y_8a.js";
|
|
7
7
|
import { BriefcaseIcon as L } from "lucide-react";
|
|
8
8
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
11
|
-
import "./utils-
|
|
11
|
+
import "./utils-zWMk4dB2.js";
|
|
12
12
|
import "clsx";
|
|
13
13
|
import "tailwind-merge";
|
|
14
14
|
import "@radix-ui/react-switch";
|
|
@@ -45,31 +45,23 @@ import "react-textarea-autosize";
|
|
|
45
45
|
import "flagged";
|
|
46
46
|
import "react-dnd";
|
|
47
47
|
import "@minoru/react-dnd-treeview";
|
|
48
|
-
import "./lib.js";
|
|
49
|
-
import "himalaya";
|
|
50
|
-
import "./functions-JFP-oMsY.js";
|
|
51
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
52
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
53
|
-
import "@tailwindcss/forms";
|
|
54
|
-
import "@tailwindcss/typography";
|
|
55
|
-
import "@tailwindcss/aspect-ratio";
|
|
56
|
-
import "@tailwindcss/line-clamp";
|
|
57
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
58
48
|
import "react-hotkeys-hook";
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
50
|
+
import "himalaya";
|
|
51
|
+
const Be = () => {
|
|
52
|
+
const { data: t } = k(), { data: i, isLoading: l } = B(), { syncState: c } = x(), d = E(), [a, o] = I(), s = v(b(i, { type: "STATIC" }), (r) => w(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
|
|
61
53
|
p(() => {
|
|
62
|
-
!
|
|
63
|
-
}, [
|
|
54
|
+
!m(i) && t.homepage && !n(i, { uuid: a }) && o(t.homepage);
|
|
55
|
+
}, [a, i, t, o]), p(() => () => o(null), [o]);
|
|
64
56
|
const u = (r) => {
|
|
65
57
|
if (c !== "SAVED")
|
|
66
58
|
S.error("You have unsaved changes. Please save before changing the page.");
|
|
67
59
|
else {
|
|
68
|
-
const g = n(
|
|
60
|
+
const g = n(s, { uuid: r });
|
|
69
61
|
d(g);
|
|
70
62
|
}
|
|
71
63
|
};
|
|
72
|
-
return l ||
|
|
64
|
+
return l || m(a) ? null : /* @__PURE__ */ e.jsx(
|
|
73
65
|
"nav",
|
|
74
66
|
{
|
|
75
67
|
className: "flex rounded-lg border border-gray-200 bg-gray-50 px-3 pr-0 py-1 text-gray-700 dark:border-gray-700 dark:bg-gray-800",
|
|
@@ -100,9 +92,9 @@ const De = () => {
|
|
|
100
92
|
)
|
|
101
93
|
}
|
|
102
94
|
),
|
|
103
|
-
/* @__PURE__ */ e.jsxs(h, { value:
|
|
95
|
+
/* @__PURE__ */ e.jsxs(h, { value: a || "", onValueChange: u, children: [
|
|
104
96
|
/* @__PURE__ */ e.jsx(f, { className: "h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400", children: /* @__PURE__ */ e.jsx(j, { placeholder: "Page" }) }),
|
|
105
|
-
/* @__PURE__ */ e.jsx(y, { className: "z-[999]", children: N(
|
|
97
|
+
/* @__PURE__ */ e.jsx(y, { className: "z-[999]", children: N(s, (r) => /* @__PURE__ */ e.jsx(P, { value: r.uuid, children: r == null ? void 0 : r.name }, r.uuid)) })
|
|
106
98
|
] })
|
|
107
99
|
] }) })
|
|
108
100
|
] })
|
|
@@ -110,5 +102,5 @@ const De = () => {
|
|
|
110
102
|
);
|
|
111
103
|
};
|
|
112
104
|
export {
|
|
113
|
-
|
|
105
|
+
Be as default
|
|
114
106
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),s=require("./index-GNmGzavZ.cjs"),i=require("lodash"),h=require("sonner"),l=require("react"),o=require("./index-61c5wSJn.cjs"),j=require("lucide-react");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.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("react-hotkeys-hook");require("./html-to-json-po8on2ju.cjs");require("himalaya");const p=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{syncState:d}=s.useSavePage(),m=o.useChangePage(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(u,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(u)&&t.homepage&&!i.find(u,{uuid:n})&&a(t.homepage)},[n,u,t,a]),l.useEffect(()=>()=>a(null),[a]);const q=r=>{if(d!=="SAVED")h.toast.error("You have unsaved changes. Please save before changing the page.");else{const g=i.find(c,{uuid:r});m(g)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 pr-0 py-1 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(j.BriefcaseIcon,{className:"w-4 h-4 mr-2"}),i.capitalize(t.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(s.Select,{value:n||"",onValueChange:q,children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(s.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=p;
|
|
@@ -4,15 +4,14 @@ import { BoxModelIcon as z, BoxIcon as V, DragHandleHorizontalIcon as F, ViewHor
|
|
|
4
4
|
import { useDrop as he, useDragLayer as be } from "react-dnd";
|
|
5
5
|
import { useDragOver as fe, Tree as Ie } from "@minoru/react-dnd-treeview";
|
|
6
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-
|
|
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-89A3jPHh.js";
|
|
8
8
|
import { DatabaseIcon as Ge } from "lucide-react";
|
|
9
|
-
import "./lib.js";
|
|
10
9
|
import { useMemo as $e, lazy as Ke, useCallback as Qe, useState as Ue, Suspense as Ye } from "react";
|
|
11
10
|
import { a as qe } from "./MODIFIERS-MLfpKQY1.js";
|
|
12
|
-
import {
|
|
13
|
-
import { f as We } from "./index-
|
|
11
|
+
import { d as S } from "./utils-zWMk4dB2.js";
|
|
12
|
+
import { f as We } from "./index-Q5q5Y_8a.js";
|
|
14
13
|
import { useAtom as Ze } from "jotai";
|
|
15
|
-
import { u as Je } from "./useAddBlockByDrop-
|
|
14
|
+
import { u as Je } from "./useAddBlockByDrop-_kyR0iI4.js";
|
|
16
15
|
import "@radix-ui/react-toggle";
|
|
17
16
|
import "class-variance-authority";
|
|
18
17
|
import "@radix-ui/react-switch";
|
|
@@ -40,15 +39,6 @@ import "flat-to-nested";
|
|
|
40
39
|
import "redux-undo";
|
|
41
40
|
import "@chaibuilder/runtime";
|
|
42
41
|
import "@react-hookz/web";
|
|
43
|
-
import "himalaya";
|
|
44
|
-
import "./functions-JFP-oMsY.js";
|
|
45
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
46
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
47
|
-
import "@tailwindcss/forms";
|
|
48
|
-
import "@tailwindcss/typography";
|
|
49
|
-
import "@tailwindcss/aspect-ratio";
|
|
50
|
-
import "@tailwindcss/line-clamp";
|
|
51
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
52
42
|
import "clsx";
|
|
53
43
|
import "tailwind-merge";
|
|
54
44
|
import "i18next";
|
|
@@ -57,6 +47,8 @@ import "react-textarea-autosize";
|
|
|
57
47
|
import "flagged";
|
|
58
48
|
import "react-hotkeys-hook";
|
|
59
49
|
import "sonner";
|
|
50
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
51
|
+
import "himalaya";
|
|
60
52
|
const D = (t) => {
|
|
61
53
|
switch (t.type) {
|
|
62
54
|
case "Image":
|
|
@@ -209,7 +201,7 @@ const et = (t) => {
|
|
|
209
201
|
}, ot = (t) => {
|
|
210
202
|
const s = t.depth * 10 + 16;
|
|
211
203
|
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
|
-
}, nt = Ke(() => import("./MarkAsGlobalBlock
|
|
204
|
+
}, nt = Ke(() => import("./MarkAsGlobalBlock-Czq45Amf.js")), rt = () => {
|
|
213
205
|
const [t] = g(), [, s] = Ce();
|
|
214
206
|
return /* @__PURE__ */ e.jsxs(i, { className: "flex items-center gap-x-4 text-xs", onClick: () => s(t), children: [
|
|
215
207
|
/* @__PURE__ */ e.jsx(ie, {}),
|
|
@@ -286,7 +278,7 @@ function xt(t) {
|
|
|
286
278
|
};
|
|
287
279
|
});
|
|
288
280
|
}
|
|
289
|
-
const
|
|
281
|
+
const ls = () => {
|
|
290
282
|
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
283
|
const { dragSource: b, relativeIndex: f, dropTargetId: I, monitor: k } = u;
|
|
292
284
|
if (b) {
|
|
@@ -380,5 +372,5 @@ const js = () => {
|
|
|
380
372
|
) });
|
|
381
373
|
};
|
|
382
374
|
export {
|
|
383
|
-
|
|
375
|
+
ls as default
|
|
384
376
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),u=require("lodash"),t=require("@radix-ui/react-icons"),B=require("react-dnd"),y=require("@minoru/react-dnd-treeview"),N=require("react-i18next"),n=require("./index-GNmGzavZ.cjs"),O=require("lucide-react"),R=require("react"),A=require("./MODIFIERS-WFzDQfiT.cjs"),q=require("./utils-tx6hqsHY.cjs"),_=require("./index-61c5wSJn.cjs"),P=require("jotai"),H=require("./useAddBlockByDrop-4VH-SMj7.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-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("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("clsx");require("tailwind-merge");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-po8on2ju.cjs");require("himalaya");const C=s=>{switch(s.type){case"Image":return e.jsxRuntimeExports.jsx(t.ImageIcon,{});case"Heading":return e.jsxRuntimeExports.jsx(t.HeadingIcon,{});case"Text":return e.jsxRuntimeExports.jsx(t.TextIcon,{});case"Link":return e.jsxRuntimeExports.jsx(t.Link1Icon,{});case"Video":return e.jsxRuntimeExports.jsx(t.VideoIcon,{});case"RichText":return e.jsxRuntimeExports.jsx(t.CursorTextIcon,{});case"Button":return e.jsxRuntimeExports.jsx(t.ButtonIcon,{});case"CustomHTML":return e.jsxRuntimeExports.jsx(t.CodeIcon,{});case"Divider":return e.jsxRuntimeExports.jsx(t.DividerHorizontalIcon,{});case"Icon":return e.jsxRuntimeExports.jsx(t.SketchLogoIcon,{});case"List":return e.jsxRuntimeExports.jsx(t.RowsIcon,{});case"Paragraph":return e.jsxRuntimeExports.jsx(t.TextIcon,{});case"Row":return e.jsxRuntimeExports.jsx(t.RowsIcon,{});case"ListItem":return e.jsxRuntimeExports.jsx(t.ColumnsIcon,{});case"LineBreak":return e.jsxRuntimeExports.jsx(t.SpaceBetweenVerticallyIcon,{});case"Form":return e.jsxRuntimeExports.jsx(t.GroupIcon,{});case"Checkbox":return e.jsxRuntimeExports.jsx(t.CheckboxIcon,{});case"FormButton":return e.jsxRuntimeExports.jsx(t.ButtonIcon,{});case"Input":case"TextArea":return e.jsxRuntimeExports.jsx(t.InputIcon,{});case"Radio":return e.jsxRuntimeExports.jsx(t.RadiobuttonIcon,{});case"Select":return e.jsxRuntimeExports.jsx(t.DropdownMenuIcon,{});case"Table":return e.jsxRuntimeExports.jsx(t.TableIcon,{});case"TableHead":return e.jsxRuntimeExports.jsx(t.BorderTopIcon,{});case"TableBody":return e.jsxRuntimeExports.jsx(t.BorderAllIcon,{});case"TableRow":return e.jsxRuntimeExports.jsx(t.ViewHorizontalIcon,{});case"TableCell":return e.jsxRuntimeExports.jsx(t.DragHandleHorizontalIcon,{});case"DataProvider":return e.jsxRuntimeExports.jsx(O.DatabaseIcon,{size:16});case"Box":return e.jsxRuntimeExports.jsx(t.BoxIcon,{});default:return e.jsxRuntimeExports.jsx(t.BoxModelIcon,{})}};function L(s=""){const r={xs:"390px",sm:"640px",md:"768px",lg:"1024px",xl:"1366px","2xl":"1536px"};if(new RegExp(/\bsr-only\b/).test(s))return"Sr Only";if(new RegExp(/\b(sm|md|lg|xl|2xl):hidden\b/).test(s))return"Visible on mobile";if(s.match(/(^| )hidden( |$)/g)){const c=new RegExp(/\b(sm|md|lg|xl|2xl):(block|grid|flex|inline|inline-grid|inline-flex|inline-block)\b/),l=s.match(c);if(u.nth(l,1))return`Visible >=${r[u.nth(l,1)]}`}return""}const F=s=>{let r="";return Object.keys(s).forEach(o=>{u.startsWith(s[o],A.STYLES_KEY)&&(r=s[o])}),r},V=s=>{var j;const[,r]=n.useHighlightBlockId(),[o]=n.useHiddenBlockIds(),{isSelected:i}=s,{id:c,data:l}=s.node,d=s.depth*10,m=a=>{a.stopPropagation(),s.onToggle(s.node.id)},E=y.useDragOver(c,s.isOpen,s.onToggle),p=R.useMemo(()=>{const a=F(s.node.data);return L(a)},[s.node.data]);return e.jsxRuntimeExports.jsx("div",{onMouseEnter:()=>r(c),className:q.cn$1("group flex w-full items-center justify-between space-x-px py-px ",i?"bg-blue-500 text-white":"hover:bg-gray-200 dark:hover:bg-gray-800"),onClick:a=>{a.stopPropagation(),!o.includes(c)&&s.onSelect(c)},onContextMenu:()=>s.onSelect(c),style:{paddingInlineStart:d},...E,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 ${s.isOpen?"rotate-90":""}`,children:s.node.droppable&&e.jsxRuntimeExports.jsx("button",{onClick:m,type:"button",children:e.jsxRuntimeExports.jsx(t.TriangleRightIcon,{})})}),e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex items-center",children:[e.jsxRuntimeExports.jsx("div",{className:"-mt-1 h-3 w-3",children:e.jsxRuntimeExports.jsx(C,{type:l==null?void 0:l._type})}),e.jsxRuntimeExports.jsx("div",{className:"ml-2 truncate text-[11px]",children:((j=s.node.data)==null?void 0:j._name)||s.node.text}),p?e.jsxRuntimeExports.jsxs("span",{className:"ml-2 flex items-center text-[10px] italic "+(i?"text-gray-200":"text-gray-500"),children:["(",p,")"]}):null]})]})})},$=s=>{var o;const{item:r}=s.monitorProps;return e.jsxRuntimeExports.jsxs("div",{className:"flex w-max items-center bg-blue-200 bg-opacity-30 p-1 font-semibold text-blue-700",children:[e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(C,{type:(o=r==null?void 0:r.data)==null?void 0:o._type})}),e.jsxRuntimeExports.jsx("div",{className:"ml-2 truncate text-[11px]",children:r.text})]})},z=s=>{const r=s.depth*10+16;return e.jsxRuntimeExports.jsx("div",{className:"absolute right-0 top-0 h-0.5 -translate-y-1/2 transform bg-green-500",style:{left:r}})},G=R.lazy(()=>Promise.resolve().then(()=>require("./MarkAsGlobalBlock-sb3hMXLq.cjs"))),K=()=>{const[s]=n.useSelectedBlockIds(),[,r]=n.useCutBlockIds();return e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:()=>r(s),children:[e.jsxRuntimeExports.jsx(t.ScissorsIcon,{})," Cut"]})},Q=()=>{const[s]=n.useSelectedBlockIds(),[,r]=n.useCopyBlockIds();return e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:()=>r(s),children:[e.jsxRuntimeExports.jsx(t.ClipboardIcon,{})," Copy"]})},U=()=>{const[s]=n.useSelectedBlockIds(),r=n.useRemoveBlocks(),o=n.useSelectedBlock();return e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{disabled:(o==null?void 0:o._type)==="Slot",className:"flex items-center gap-x-4 text-xs",onClick:()=>r(s),children:[e.jsxRuntimeExports.jsx(t.TrashIcon,{})," Remove"]})},Y=({id:s=null,openMarkAsGlobalModal:r})=>{const[o]=n.useSelectedBlockIds(),i=n.useDuplicateBlocks(),{pasteBlocks:c,canPaste:l}=n.usePasteBlocks(),d=n.useBuilderProp("globalBlocksSupport",!1),m=R.useCallback(()=>{i(o)},[o,i]);return e.jsxRuntimeExports.jsxs(n.ContextMenuContent,{className:"text-xs",children:[d&&e.jsxRuntimeExports.jsx(n.ContextMenuItem,{className:"flex items-center gap-x-4 border-b text-xs",onClick:r,children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-4",children:[e.jsxRuntimeExports.jsx(t.GlobeIcon,{})," Mark as global"]})}),e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:m,children:[e.jsxRuntimeExports.jsx(t.CopyIcon,{})," Duplicate"]}),e.jsxRuntimeExports.jsx(K,{}),e.jsxRuntimeExports.jsx(Q,{}),e.jsxRuntimeExports.jsxs(n.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:()=>c(s),disabled:!l,children:[e.jsxRuntimeExports.jsx(t.ClipboardCopyIcon,{})," Paste"]}),e.jsxRuntimeExports.jsx(U,{})]})},W=({children:s,id:r=null})=>{const[o,i]=R.useState(!1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(n.Dialog,{open:o,onOpenChange:i,children:o&&e.jsxRuntimeExports.jsx(n.DialogContent,{children:e.jsxRuntimeExports.jsx(R.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"h-96 w-full animate-pulse bg-gray-200"}),children:e.jsxRuntimeExports.jsx(G,{closeModal:()=>i(!1),id:r})})})}),e.jsxRuntimeExports.jsxs(n.ContextMenu,{children:[e.jsxRuntimeExports.jsx(n.ContextMenuTrigger,{children:s}),e.jsxRuntimeExports.jsx(Y,{id:r,openMarkAsGlobalModal:()=>i(!0)})]})]})};function J(s){return u.map(s,r=>{const{data:o}=r;return{...o,_parent:r.parent===0?null:r.parent}})}const X=()=>{const s=n.useAllBlocks(),[r]=n.useSetAllBlocks(),[o,i,c]=n.useSelectedBlockIds(),[,l]=n.useSelectedStylingBlocks(),{t:d}=N.useTranslation(),{createSnapshot:m}=n.useCanvasHistory(),E=_.useExpandedIds(),p=H.useAddBlockByDrop(),[,j]=P.useAtom(n.addBlocksModalAtom),a=async(x,g)=>{const{dragSource:h,relativeIndex:b,dropTargetId:k,monitor:f}=g;if(h){m();const T=J(x);r(T);const M=f.getItem();i([M.id])}else await p({block:f.getItem(),dropTargetId:k,relativeIndex:b}),j(!1)},v=u.map(s,x=>({id:x._id,text:x._type,parent:x._parent||0,droppable:!u.isUndefined(u.find(s,{_parent:x._id})),data:x})),S=()=>{i([]),l([])},[{isOver:I},w]=B.useDrop(()=>({accept:["CHAI_BLOCK"],collect:x=>({canDrop:x.canDrop(),isOver:x.isOver()}),drop:x=>{(async()=>(await p({block:x,dropTargetId:"",relativeIndex:0}),j(!1)))()}})),{isDragging:D}=B.useDragLayer(x=>({isDragging:x.isDragging()}));return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx("div",{onClick:()=>S(),className:q.cn$1("-mx-1 -mt-1 flex h-full select-none flex-col space-y-1",D?"bg-green-50/80":"bg-background"),children:u.isEmpty(s)?e.jsxRuntimeExports.jsxs("div",{ref:w,className:`mx-1 mt-4 max-w-full h-full p-6 text-center text-sm text-gray-400 ${I?"bg-blue-200":""}`,children:[I?e.jsxRuntimeExports.jsx(t.DoubleArrowDownIcon,{className:"mx-auto h-12 w-12 animate-bounce"}):e.jsxRuntimeExports.jsx(t.StackIcon,{className:"mx-auto h-10 w-10"}),e.jsxRuntimeExports.jsx("p",{className:"mt-2",children:d(I?"drop_here_message":"tree_view_no_blocks")})]}):e.jsxRuntimeExports.jsx(n.ScrollArea,{id:"layers-view",className:"no-scrollbar h-full overflow-y-auto p-1",children:e.jsxRuntimeExports.jsx(y.Tree,{initialOpen:E,extraAcceptTypes:["CHAI_BLOCK"],tree:v,rootId:0,render:(x,{depth:g,isOpen:h,onToggle:b})=>e.jsxRuntimeExports.jsx(W,{id:x.id,children:e.jsxRuntimeExports.jsx(V,{onSelect:k=>{l([]),i([k])},isSelected:u.includes(o,x.id),node:x,depth:g,isOpen:h,onToggle:b,toggleIds:c})}),dragPreviewRender:x=>e.jsxRuntimeExports.jsx($,{monitorProps:x}),onDrop:a,classes:{root:"h-full pt-2",draggingSource:"opacity-30",dropTarget:"bg-green-100",placeholder:"relative"},sort:!1,insertDroppableFirst:!1,canDrop:n.canDropBlock,dropTargetOffset:2,enableAnimateExpand:!0,placeholderRender:(x,{depth:g})=>e.jsxRuntimeExports.jsx(z,{node:x,depth:g})})})})})};exports.default=X;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import { GlobeIcon as m } from "@radix-ui/react-icons";
|
|
3
3
|
import { useState as n } from "react";
|
|
4
|
-
import { $ as p, B as o } from "./index-
|
|
4
|
+
import { $ as p, B as o } from "./index-89A3jPHh.js";
|
|
5
5
|
import { capitalize as c } from "lodash";
|
|
6
6
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
9
|
-
import "./utils-
|
|
9
|
+
import "./utils-zWMk4dB2.js";
|
|
10
10
|
import "clsx";
|
|
11
11
|
import "tailwind-merge";
|
|
12
12
|
import "@radix-ui/react-switch";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),n=require("@radix-ui/react-icons"),o=require("react"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),n=require("@radix-ui/react-icons"),o=require("react"),s=require("./index-GNmGzavZ.cjs"),c=require("lodash");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.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-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");const x=({id:t=null,closeModal:i})=>{const l=s.useMarkAsGlobalBlock(),[r,u]=o.useState("");return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("h1",{className:"text-lg font-bold",children:"Mark as Global"}),e.jsxRuntimeExports.jsxs("div",{className:"py-2 text-sm",children:["Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks. ",e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("ul",{className:"mt-4 list-inside list-disc space-y-1",children:[e.jsxRuntimeExports.jsxs("li",{children:["Global blocks are indicated with ",e.jsxRuntimeExports.jsx(n.GlobeIcon,{className:"inline"})," icon in left sidebar"]}),e.jsxRuntimeExports.jsx("li",{children:'Global blocks are available under "Global" category'})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"my-4",children:[e.jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-400",children:"Enter global block name"}),e.jsxRuntimeExports.jsx("input",{placeholder:"Eg: Header, Footer ",className:"mt-2 w-full",value:r,onChange:a=>u(a.target.value)})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-4",children:[e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>{l(t,c.capitalize(r)),i()},disabled:r.length<=2,variant:"default",children:"Mark as Global"}),e.jsxRuntimeExports.jsx(s.Button,{variant:"outline",onClick:i,children:"Cancel"})]})]})};exports.default=x;
|
|
@@ -0,0 +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-61c5wSJn.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("i18next");require("react-i18next");require("./index-GNmGzavZ.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.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("react-hotkeys-hook");require("sonner");require("./html-to-json-po8on2ju.cjs");require("himalaya");require("lucide-react");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-FPnIWwqA.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-wQO9oV9h.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,14 +1,14 @@
|
|
|
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-Q5q5Y_8a.js";
|
|
5
5
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import "./index-
|
|
8
|
+
import "./index-89A3jPHh.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
11
|
-
import "./utils-
|
|
11
|
+
import "./utils-zWMk4dB2.js";
|
|
12
12
|
import "clsx";
|
|
13
13
|
import "tailwind-merge";
|
|
14
14
|
import "@radix-ui/react-switch";
|
|
@@ -43,20 +43,12 @@ import "react-textarea-autosize";
|
|
|
43
43
|
import "flagged";
|
|
44
44
|
import "react-dnd";
|
|
45
45
|
import "@minoru/react-dnd-treeview";
|
|
46
|
-
import "./lib.js";
|
|
47
|
-
import "himalaya";
|
|
48
|
-
import "./functions-JFP-oMsY.js";
|
|
49
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
50
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
51
|
-
import "@tailwindcss/forms";
|
|
52
|
-
import "@tailwindcss/typography";
|
|
53
|
-
import "@tailwindcss/aspect-ratio";
|
|
54
|
-
import "@tailwindcss/line-clamp";
|
|
55
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
56
46
|
import "react-hotkeys-hook";
|
|
57
47
|
import "sonner";
|
|
48
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
49
|
+
import "himalaya";
|
|
58
50
|
import "lucide-react";
|
|
59
|
-
const x = i.lazy(() => import("./add-page-modal-
|
|
51
|
+
const x = i.lazy(() => import("./add-page-modal-TXREEFPZ.js")), g = i.lazy(() => import("./page-viewer-LPx-OTCC.js")), lt = () => {
|
|
60
52
|
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
53
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
62
54
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
@@ -68,5 +60,5 @@ const x = i.lazy(() => import("./add-page-modal-o4WyfyUe.js")), g = i.lazy(() =>
|
|
|
68
60
|
] });
|
|
69
61
|
};
|
|
70
62
|
export {
|
|
71
|
-
|
|
63
|
+
lt as default
|
|
72
64
|
};
|
|
@@ -0,0 +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-GNmGzavZ.cjs"),a=require("./index-61c5wSJn.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-tx6hqsHY.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("react-hotkeys-hook");require("sonner");require("./html-to-json-po8on2ju.cjs");require("himalaya");require("lucide-react");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-8EwuN5lN.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-R77SKM1I.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function q(){const t=a.useUpdateProject(),{data:n}=a.useProject(),[i,o]=r.useState(l(n||{})),u=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||t.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=q;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
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
|
-
import { bh as h, bi as n, bj as l, bk as c } from "./index-
|
|
5
|
-
import { c as f, b as g } from "./index-
|
|
4
|
+
import { bh as h, bi as n, bj as l, bk as c } from "./index-89A3jPHh.js";
|
|
5
|
+
import { c as f, b as g } from "./index-Q5q5Y_8a.js";
|
|
6
6
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
9
|
-
import "./utils-
|
|
9
|
+
import "./utils-zWMk4dB2.js";
|
|
10
10
|
import "clsx";
|
|
11
11
|
import "tailwind-merge";
|
|
12
12
|
import "@radix-ui/react-switch";
|
|
@@ -43,51 +43,43 @@ import "react-textarea-autosize";
|
|
|
43
43
|
import "flagged";
|
|
44
44
|
import "react-dnd";
|
|
45
45
|
import "@minoru/react-dnd-treeview";
|
|
46
|
-
import "./lib.js";
|
|
47
|
-
import "himalaya";
|
|
48
|
-
import "./functions-JFP-oMsY.js";
|
|
49
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
50
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
51
|
-
import "@tailwindcss/forms";
|
|
52
|
-
import "@tailwindcss/typography";
|
|
53
|
-
import "@tailwindcss/aspect-ratio";
|
|
54
|
-
import "@tailwindcss/line-clamp";
|
|
55
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
56
46
|
import "react-hotkeys-hook";
|
|
57
47
|
import "sonner";
|
|
48
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
49
|
+
import "himalaya";
|
|
58
50
|
import "lucide-react";
|
|
59
|
-
const N = m.lazy(() => import("./project-general-setting-
|
|
60
|
-
...
|
|
51
|
+
const N = m.lazy(() => import("./project-general-setting-sSpFUD_Y.js")), S = m.lazy(() => import("./project-seo-setting-CGVegBtM.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) ? {
|
|
52
|
+
...e,
|
|
61
53
|
seoData: { title: "", description: "", image: "" }
|
|
62
|
-
} :
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
u(
|
|
66
|
-
), o = x(
|
|
54
|
+
} : e;
|
|
55
|
+
function ft() {
|
|
56
|
+
const e = f(), { data: s } = g(), [r, i] = m.useState(
|
|
57
|
+
u(s || {})
|
|
58
|
+
), o = x(r);
|
|
67
59
|
return a(
|
|
68
60
|
() => () => {
|
|
69
|
-
b(
|
|
70
|
-
onSuccess: () =>
|
|
61
|
+
b(s, o.current) || e.mutate(o.current, {
|
|
62
|
+
onSuccess: () => i(o.current)
|
|
71
63
|
});
|
|
72
64
|
},
|
|
73
65
|
[o]
|
|
74
66
|
), a(() => {
|
|
75
|
-
o.current =
|
|
76
|
-
}, [
|
|
67
|
+
o.current = r;
|
|
68
|
+
}, [r]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
77
69
|
/* @__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" }) }),
|
|
78
70
|
/* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
|
|
79
71
|
/* @__PURE__ */ t.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ t.jsxs(h, { type: "single", className: "w-full", defaultValue: "GENERAL", children: [
|
|
80
72
|
/* @__PURE__ */ t.jsxs(n, { value: "GENERAL", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
81
73
|
/* @__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" }),
|
|
82
|
-
/* @__PURE__ */ t.jsx(c, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(N, { _projectData:
|
|
74
|
+
/* @__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 }) }) })
|
|
83
75
|
] }),
|
|
84
76
|
/* @__PURE__ */ t.jsxs(n, { value: "SEO", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
85
77
|
/* @__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" }),
|
|
86
|
-
/* @__PURE__ */ t.jsx(c, { className: "px-1 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(S, { _projectData:
|
|
78
|
+
/* @__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 }) }) })
|
|
87
79
|
] })
|
|
88
80
|
] }) })
|
|
89
81
|
] });
|
|
90
82
|
}
|
|
91
83
|
export {
|
|
92
|
-
|
|
84
|
+
ft as default
|
|
93
85
|
};
|
|
@@ -5,17 +5,17 @@ import { useThrottledCallback as be } from "@react-hookz/web";
|
|
|
5
5
|
import { forEach as Ce, isArray as ae, omit as pt, truncate as ut, includes as E, get as u, first as pe, split as xt, startCase as Y, toLower as te, isEmpty as b, map as C, find as gt, last as fe, filter as ve, set as Me, keys as ht, cloneDeep as mt, each as yt, capitalize as bt, reject as ft, nth as Ve, startsWith as z, isNumber as vt, parseInt as jt, isNaN as _e, findLast as wt, flatten as U, intersection as Fe, has as he, isNull as Ct } from "lodash";
|
|
6
6
|
import { useTranslation as Ye } from "react-i18next";
|
|
7
7
|
import { PlusIcon as ke, Cross2Icon as We, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as Tt, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Rt, AlignLeftIcon as Vt, AlignCenterHorizontallyIcon as Ht, AlignRightIcon as Bt, StretchHorizontallyIcon as At, FontItalicIcon as Dt, UnderlineIcon as It, OverlineIcon as Pt, LetterCaseUppercaseIcon as $t, Cross1Icon as Lt, InfoCircledIcon as Ne, MinusIcon as Ot, BoxIcon as Xe, RowSpacingIcon as Et, TriangleDownIcon as Mt, CrossCircledIcon as _t, TrashIcon as Ft, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
-
import { b0 as Yt, b1 as Wt, B as ue, b2 as Xt, b3 as Zt, b4 as zt, b5 as Ut, b6 as Gt, b7 as Kt, b8 as qt, a6 as G, am as Jt, an as Qt, ao as er, b9 as tr, ak as rr, ba as lr, al as sr, aD as W, aE as X, aG as Z, bb as or, bc as nr, bd as ar, be as ir, bf as dr, bg as cr, p as ze, ac as Ue, i as pr, bh as Ge, bi as ie, bj as de, bk as ce, aj as Te, P as Ke, a3 as qe, j as Je, aI as Se, bl as ur, bm as xr, a4 as xe, W as gr, a9 as Qe, R as Be, ag as hr, ad as mr, bn as yr, aq as br, ar as fr, as as vr, at as jr, au as H, bo as et, ax as wr, ay as Cr, az as Ae, aA as De } from "./index-
|
|
8
|
+
import { b0 as Yt, b1 as Wt, B as ue, b2 as Xt, b3 as Zt, b4 as zt, b5 as Ut, b6 as Gt, b7 as Kt, b8 as qt, a6 as G, am as Jt, an as Qt, ao as er, b9 as tr, ak as rr, ba as lr, al as sr, aD as W, aE as X, aG as Z, bb as or, bc as nr, bd as ar, be as ir, bf as dr, bg as cr, p as ze, ac as Ue, i as pr, bh as Ge, bi as ie, bj as de, bk as ce, aj as Te, P as Ke, a3 as qe, j as Je, aI as Se, bl as ur, bm as xr, a4 as xe, W as gr, a9 as Qe, R as Be, ag as hr, ad as mr, bn as yr, aq as br, ar as fr, as as vr, at as jr, au as H, bo as et, ax as wr, ay as Cr, az as Ae, aA as De } from "./index-89A3jPHh.js";
|
|
9
9
|
import { u as kr } from "./controls-G0puEH71.js";
|
|
10
10
|
import { Check as Nr, EditIcon as Tr, TrashIcon as Sr } from "lucide-react";
|
|
11
11
|
import { getBlockComponent as tt, getChaiDataProviders as Rr } from "@chaibuilder/runtime";
|
|
12
|
-
import { E as rt, u as lt } from "./index-
|
|
12
|
+
import { E as rt, u as lt } from "./index-Q5q5Y_8a.js";
|
|
13
13
|
import Vr from "@rjsf/core";
|
|
14
14
|
import Hr from "@rjsf/validator-ajv8";
|
|
15
15
|
import { useAtom as Br } from "jotai";
|
|
16
16
|
import Ar from "react-autosuggest";
|
|
17
17
|
import Dr from "fuse.js";
|
|
18
|
-
import { A as Ir, C as ge,
|
|
18
|
+
import { A as Ir, C as ge, e as Pr } from "./utils-zWMk4dB2.js";
|
|
19
19
|
import { a as $r } from "./MODIFIERS-MLfpKQY1.js";
|
|
20
20
|
import "@radix-ui/react-toggle";
|
|
21
21
|
import "class-variance-authority";
|
|
@@ -49,19 +49,11 @@ import "react-textarea-autosize";
|
|
|
49
49
|
import "flagged";
|
|
50
50
|
import "react-dnd";
|
|
51
51
|
import "@minoru/react-dnd-treeview";
|
|
52
|
-
import "./lib.js";
|
|
53
|
-
import "himalaya";
|
|
54
|
-
import "./functions-JFP-oMsY.js";
|
|
55
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
56
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
57
|
-
import "@tailwindcss/forms";
|
|
58
|
-
import "@tailwindcss/typography";
|
|
59
|
-
import "@tailwindcss/aspect-ratio";
|
|
60
|
-
import "@tailwindcss/line-clamp";
|
|
61
|
-
import "./tailwind-config-d1VL1lzE.js";
|
|
62
|
-
import "tailwind-merge";
|
|
63
52
|
import "react-hotkeys-hook";
|
|
64
53
|
import "sonner";
|
|
54
|
+
import "./html-to-json-kGgp07Hv.js";
|
|
55
|
+
import "himalaya";
|
|
56
|
+
import "tailwind-merge";
|
|
65
57
|
const Lr = I.lazy(() => import("react-json-view"));
|
|
66
58
|
function Or(t) {
|
|
67
59
|
const l = [], r = {};
|
|
@@ -2128,7 +2120,7 @@ const gl = {
|
|
|
2128
2120
|
"-": 1,
|
|
2129
2121
|
deg: 1,
|
|
2130
2122
|
ms: 0.1
|
|
2131
|
-
},
|
|
2123
|
+
}, ms = () => {
|
|
2132
2124
|
const t = G(), { t: l } = Ye(), [r, s] = I.useState(""), [o, n] = I.useState({
|
|
2133
2125
|
onDrag: (a) => a,
|
|
2134
2126
|
onDragEnd: (a) => a,
|
|
@@ -2192,5 +2184,5 @@ const gl = {
|
|
|
2192
2184
|
] }) });
|
|
2193
2185
|
};
|
|
2194
2186
|
export {
|
|
2195
|
-
|
|
2187
|
+
ms as default
|
|
2196
2188
|
};
|