@chaibuilder/sdk 1.2.64 → 1.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CanvasArea-fSdH_RiN.cjs +1 -0
- package/dist/{CanvasArea-kB6ky_uL.js → CanvasArea-ut5yknzX.js} +58 -54
- package/dist/{CodeEditor-37od44Ou.js → CodeEditor-Qff4q7sx.js} +1 -1
- package/dist/{CurrentPage-bHq9Uusr.js → CurrentPage-jHSVy3hq.js} +38 -26
- package/dist/CurrentPage-p_AM4lrF.cjs +1 -0
- package/dist/{PagesPanel-wIPAyjJK.js → PagesPanel-U3InJ9Db.js} +20 -8
- package/dist/PagesPanel-wqDb4D-x.cjs +1 -0
- package/dist/{ProjectPanel-L-SlDizV.js → ProjectPanel-XODJTO4J.js} +36 -24
- package/dist/ProjectPanel-fWESzHr6.cjs +1 -0
- package/dist/{SidePanels-UQj0XTnb.js → SidePanels-ijaUKSek.js} +96 -82
- package/dist/SidePanels-lrMQqc0h.cjs +1 -0
- package/dist/Topbar-RrCDxd0i.cjs +1 -0
- package/dist/{Topbar-1O05wogM.js → Topbar-vHlnfxPs.js} +45 -30
- package/dist/UILibrariesPanel-7btHgBD0.cjs +1 -0
- package/dist/{UILibrariesPanel-vshiYI6G.js → UILibrariesPanel-NVUMUPUj.js} +85 -65
- package/dist/{UnsplashImages-Eq7hprBO.js → UnsplashImages-UkHihhA5.js} +18 -18
- package/dist/{UploadImages-lco2Tea3.js → UploadImages-HtuJZJlo.js} +1 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +1 -0
- package/dist/{add-page-modal-qr7rvJzN.js → add-page-modal-TOfMfmPA.js} +33 -24
- package/dist/{confirm-alert-P6TAevaP.js → confirm-alert-eIp2cAkc.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +7 -8
- package/dist/core.js +74 -59
- package/dist/{delete-page-modal-55oioI9i.js → delete-page-modal-4bxjpVBD.js} +33 -21
- package/dist/delete-page-modal-qYDZmpgT.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.js +20 -5
- package/dist/{form-5ke_lZv8.js → form-NAzFjGs0.js} +9 -9
- package/dist/html-to-json-NqRjgFqp.cjs +1 -0
- package/dist/html-to-json-l_mw5y-e.js +243 -0
- package/dist/{index-6w-6HYBd.cjs → index--k2M8kzI.cjs} +1 -1
- package/dist/{index-audsIPBC.cjs → index-5XyNUAjc.cjs} +81 -22
- package/dist/{index-b33n_-zO.js → index-C7mB4XFm.js} +117 -117
- package/dist/{index-fnkMn4Pk.js → index-YZhtVcj_.js} +4 -4
- package/dist/{index-wRAIA8zZ.js → index-lFgDm1oa.js} +48587 -45055
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +22 -22
- package/dist/page-viewer-4wrnWnK0.js +124 -0
- package/dist/page-viewer-ra0GLx1p.cjs +1 -0
- package/dist/{project-general-setting-NEkNjf7V.js → project-general-setting-IwZUkYF3.js} +18 -9
- package/dist/project-general-setting-lFjTUhHD.cjs +1 -0
- package/dist/{project-seo-setting-YmspOYsF.js → project-seo-setting-e1fTqVsd.js} +2 -2
- package/dist/{single-page-detail-jHzoDP7B.js → single-page-detail-ZNWFKqLW.js} +64 -55
- package/dist/single-page-detail-g55Anu7R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +18 -6
- package/dist/style.css +2 -2
- package/dist/ui.js +67 -67
- package/package.json +1 -1
- package/dist/AddBlocks-6dJmFSgk.js +0 -142
- package/dist/AddBlocks-doCNVVbk.cjs +0 -1
- package/dist/CanvasArea-kdnkFfKR.cjs +0 -1
- package/dist/CurrentPage-Ekl5Cwbv.cjs +0 -1
- package/dist/PagesPanel-SMHrEmCb.cjs +0 -1
- package/dist/ProjectPanel-YruLal65.cjs +0 -1
- package/dist/Settings-WXkCyhAv.js +0 -2380
- package/dist/Settings-_5VHcgFC.cjs +0 -1
- package/dist/SidePanels-UeIZB3e1.cjs +0 -1
- package/dist/StaticCanvas-7C52tXAv.js +0 -749
- package/dist/StaticCanvas-ll9VTXI5.cjs +0 -60
- package/dist/ThemeConfigPanel-_86vVxLz.cjs +0 -1
- package/dist/ThemeConfigPanel-gw8B2zvx.js +0 -194
- package/dist/Topbar-gb17oHdJ.cjs +0 -1
- package/dist/UILibrariesPanel-03Y3F3A_.cjs +0 -1
- package/dist/add-page-modal-rOKavDFX.cjs +0 -1
- package/dist/atoms-KQpaDRnF.cjs +0 -1
- package/dist/atoms-Oomqut88.js +0 -6
- package/dist/delete-page-modal-wdAiMVnL.cjs +0 -1
- package/dist/html-to-json-_01DXd-a.js +0 -192
- package/dist/html-to-json-ndxaXRT8.cjs +0 -1
- package/dist/index-e0c8PmRQ.js +0 -205
- package/dist/index-gi1LIOCw.cjs +0 -1
- package/dist/page-viewer-t44DP65U.js +0 -112
- package/dist/page-viewer-wU7T0f48.cjs +0 -1
- package/dist/plugin-2hf9pCRy.cjs +0 -1
- package/dist/plugin-wDnsBVPp.js +0 -54
- package/dist/project-general-setting-87cX9vvO.cjs +0 -1
- package/dist/single-page-detail-27UjWK8L.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),u=require("lodash-es"),a=require("@radix-ui/react-icons"),i=require("./index-5XyNUAjc.cjs"),s=require("./index-aeDphKpP.cjs"),c=require("react-i18next"),j=require("jotai"),m=require("lucide-react"),d=require("re-resizable");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("@react-hookz/web");require("react-arborist");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("./index--mLLy7QQ.cjs");require("react-dom");require("prop-types");require("react-quill");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("./MODIFIERS-mVmfEGgo.cjs");require("lodash");require("@chaibuilder/runtime");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./utils-D_vtk3zK.cjs");require("./controls-rRZhz0vu.cjs");require("@radix-ui/react-scroll-area");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-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("tree-model");function p(){const[r,t]=s.useDarkMode();return e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(a.SunIcon,{className:"size-4 shrink-0"}),e.jsxRuntimeExports.jsx(s.Switch,{id:"dark-mode-switch",checked:r,onCheckedChange:()=>{t(!r)},className:`${r?"bg-violet-600":"bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:e.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${r?"translate-x-5":"translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})}),e.jsxRuntimeExports.jsx(i.FaMoon,{className:"size-4 ml-3 shrink-0"})]})}const q=()=>{const{t:r}=c.useTranslation(),{setNewBlocks:t}=s.useBlocksStoreUndoableActions(),[,l]=s.useSelectedBlockIds(),[,o]=s.useSelectedStylingBlocks(),x=n.useCallback(()=>{t([]),l([]),o([])},[t]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(s.AlertDialog,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(s.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[e.jsxRuntimeExports.jsx(a.EraserIcon,{})," ",r("clear")]})}),e.jsxRuntimeExports.jsxs(s.AlertDialogContent,{className:"border-border",children:[e.jsxRuntimeExports.jsxs(s.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTitle,{children:r("clear_canvas_title")}),e.jsxRuntimeExports.jsx(s.AlertDialogDescription,{children:r("clear_canvas_description")})]}),e.jsxRuntimeExports.jsxs(s.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogCancel,{children:r("cancel")}),e.jsxRuntimeExports.jsx(s.AlertDialogAction,{onClick:x,children:r("yes")})]})]})]})})},h=()=>{const[r,t]=j.useAtom(s.aiAssistantActiveAtom);return s.useBuilderProp("askAiCallBack",null)?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsxs(s.Label,{htmlFor:"ai-assistant",className:"flex items-center gap-x-1 text-sm text-yellow-600",children:[e.jsxRuntimeExports.jsx(m.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),e.jsxRuntimeExports.jsx(s.Switch,{className:"scale-90",checked:r,onCheckedChange:o=>{t(o)},id:"ai-assitantt"})]}):null},E=()=>{const r=s.useBuilderProp("darkMode",!0),[t]=s.useCanvasZoom();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[e.jsxRuntimeExports.jsx(i.Breakpoints,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(p,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"})]}):null,e.jsxRuntimeExports.jsxs("div",{className:"flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400",children:[e.jsxRuntimeExports.jsx(a.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",e.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[u.round(t,0),"%"]})]}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(i.UndoRedo,{})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[e.jsxRuntimeExports.jsx(q,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(h,{})]})]})},R=n.lazy(()=>Promise.resolve().then(()=>require("./CodeEditor-ypUx3RAV.cjs"))),f=()=>{const[r]=s.useCodeEditor();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[e.jsxRuntimeExports.jsx(E,{}),e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden bg-gray-100/40 px-2",children:[e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(i.ErrorBoundary,{children:e.jsxRuntimeExports.jsx(i.StaticCanvas,{})})}),r?e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(d.Resizable,{enable:{top:!0,bottom:!1},className:"max-h-[400px] min-h-[200px]",children:e.jsxRuntimeExports.jsx(R,{})})}):null]})]})};exports.default=f;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import
|
|
2
|
+
import p, { useCallback as d, Suspense as o } from "react";
|
|
3
3
|
import { round as x } from "lodash-es";
|
|
4
|
-
import { SunIcon as u, EraserIcon as h, ZoomInIcon as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { SunIcon as u, EraserIcon as h, ZoomInIcon as j } from "@radix-ui/react-icons";
|
|
5
|
+
import { b as f, B as k, U as v, E as g, S as b } from "./index-lFgDm1oa.js";
|
|
6
|
+
import { Y as A, ar as n, D as N, j as C, z as w, A as B, a as D, B as S, b as y, c as I, d as z, e as E, f as M, g as _, b8 as F, bb as R, h as c, as as T, R as U, bF as r, ak as Z, a3 as l } from "./index-C7mB4XFm.js";
|
|
7
7
|
import { useTranslation as $ } from "react-i18next";
|
|
8
|
-
import { useAtom as
|
|
9
|
-
import { SparklesIcon as
|
|
10
|
-
import L from "./StaticCanvas-7C52tXAv.js";
|
|
8
|
+
import { useAtom as H } from "jotai";
|
|
9
|
+
import { SparklesIcon as L } from "lucide-react";
|
|
11
10
|
import { Resizable as P } from "re-resizable";
|
|
12
11
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
13
12
|
import "i18next";
|
|
@@ -18,15 +17,31 @@ import "clsx";
|
|
|
18
17
|
import "tailwind-merge";
|
|
19
18
|
import "./index-VBXQixVm.js";
|
|
20
19
|
import "react-dom";
|
|
21
|
-
import "
|
|
20
|
+
import "prop-types";
|
|
21
|
+
import "react-quill";
|
|
22
|
+
import "react-hotkeys-hook";
|
|
23
|
+
import "@floating-ui/dom";
|
|
22
24
|
import "@floating-ui/react-dom";
|
|
23
25
|
import "flagged";
|
|
24
|
-
import "
|
|
26
|
+
import "@tailwindcss/typography";
|
|
27
|
+
import "@tailwindcss/forms";
|
|
28
|
+
import "@tailwindcss/aspect-ratio";
|
|
29
|
+
import "tailwindcss-palette-generator";
|
|
30
|
+
import "./html-to-json-l_mw5y-e.js";
|
|
31
|
+
import "himalaya";
|
|
32
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
33
|
+
import "lodash";
|
|
25
34
|
import "@chaibuilder/runtime";
|
|
35
|
+
import "react-wrap-balancer";
|
|
36
|
+
import "@rjsf/core";
|
|
37
|
+
import "@rjsf/validator-ajv8";
|
|
38
|
+
import "react-autosuggest";
|
|
39
|
+
import "fuse.js";
|
|
40
|
+
import "./utils-VpVqnC9m.js";
|
|
41
|
+
import "./controls-yjgoZzB6.js";
|
|
42
|
+
import "@radix-ui/react-scroll-area";
|
|
26
43
|
import "@radix-ui/react-toggle";
|
|
27
44
|
import "class-variance-authority";
|
|
28
|
-
import "./utils-VpVqnC9m.js";
|
|
29
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
30
45
|
import "@radix-ui/react-switch";
|
|
31
46
|
import "@radix-ui/react-slot";
|
|
32
47
|
import "@radix-ui/react-accordion";
|
|
@@ -45,20 +60,9 @@ import "@radix-ui/react-toast";
|
|
|
45
60
|
import "cmdk";
|
|
46
61
|
import "@radix-ui/react-context-menu";
|
|
47
62
|
import "react-icons-picker";
|
|
48
|
-
import "react-quill";
|
|
49
63
|
import "tree-model";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
import "@floating-ui/dom";
|
|
53
|
-
import "@tailwindcss/typography";
|
|
54
|
-
import "@tailwindcss/forms";
|
|
55
|
-
import "@tailwindcss/aspect-ratio";
|
|
56
|
-
import "tailwindcss-palette-generator";
|
|
57
|
-
import "./plugin-wDnsBVPp.js";
|
|
58
|
-
import "lodash";
|
|
59
|
-
import "react-wrap-balancer";
|
|
60
|
-
function q() {
|
|
61
|
-
const [e, t] = b();
|
|
64
|
+
function Y() {
|
|
65
|
+
const [e, t] = A();
|
|
62
66
|
return /* @__PURE__ */ s.jsxs("div", { className: "flex items-center", children: [
|
|
63
67
|
/* @__PURE__ */ s.jsx(u, { className: "size-4 shrink-0" }),
|
|
64
68
|
/* @__PURE__ */ s.jsx(
|
|
@@ -79,35 +83,35 @@ function q() {
|
|
|
79
83
|
)
|
|
80
84
|
}
|
|
81
85
|
),
|
|
82
|
-
/* @__PURE__ */ s.jsx(
|
|
86
|
+
/* @__PURE__ */ s.jsx(f, { className: "size-4 ml-3 shrink-0" })
|
|
83
87
|
] });
|
|
84
88
|
}
|
|
85
|
-
const
|
|
86
|
-
const { t: e } = $(), { setNewBlocks: t } =
|
|
89
|
+
const q = () => {
|
|
90
|
+
const { t: e } = $(), { setNewBlocks: t } = N(), [, a] = C(), [, i] = w(), m = d(() => {
|
|
87
91
|
t([]), a([]), i([]);
|
|
88
92
|
}, [t]);
|
|
89
|
-
return /* @__PURE__ */ s.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ s.jsxs(
|
|
90
|
-
/* @__PURE__ */ s.jsx(
|
|
93
|
+
return /* @__PURE__ */ s.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ s.jsxs(B, { children: [
|
|
94
|
+
/* @__PURE__ */ s.jsx(D, { asChild: !0, children: /* @__PURE__ */ s.jsxs(S, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
91
95
|
/* @__PURE__ */ s.jsx(h, {}),
|
|
92
96
|
" ",
|
|
93
97
|
e("clear")
|
|
94
98
|
] }) }),
|
|
95
|
-
/* @__PURE__ */ s.jsxs(
|
|
96
|
-
/* @__PURE__ */ s.jsxs(
|
|
97
|
-
/* @__PURE__ */ s.jsx(
|
|
98
|
-
/* @__PURE__ */ s.jsx(
|
|
99
|
+
/* @__PURE__ */ s.jsxs(y, { className: "border-border", children: [
|
|
100
|
+
/* @__PURE__ */ s.jsxs(I, { children: [
|
|
101
|
+
/* @__PURE__ */ s.jsx(z, { children: e("clear_canvas_title") }),
|
|
102
|
+
/* @__PURE__ */ s.jsx(E, { children: e("clear_canvas_description") })
|
|
99
103
|
] }),
|
|
100
|
-
/* @__PURE__ */ s.jsxs(
|
|
101
|
-
/* @__PURE__ */ s.jsx(
|
|
102
|
-
/* @__PURE__ */ s.jsx(
|
|
104
|
+
/* @__PURE__ */ s.jsxs(M, { children: [
|
|
105
|
+
/* @__PURE__ */ s.jsx(_, { children: e("cancel") }),
|
|
106
|
+
/* @__PURE__ */ s.jsx(F, { onClick: m, children: e("yes") })
|
|
103
107
|
] })
|
|
104
108
|
] })
|
|
105
109
|
] }) });
|
|
106
|
-
},
|
|
107
|
-
const [e, t] =
|
|
110
|
+
}, G = () => {
|
|
111
|
+
const [e, t] = H(R);
|
|
108
112
|
return c("askAiCallBack", null) ? /* @__PURE__ */ s.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
109
|
-
/* @__PURE__ */ s.jsxs(
|
|
110
|
-
/* @__PURE__ */ s.jsx(
|
|
113
|
+
/* @__PURE__ */ s.jsxs(T, { htmlFor: "ai-assistant", className: "flex items-center gap-x-1 text-sm text-yellow-600", children: [
|
|
114
|
+
/* @__PURE__ */ s.jsx(L, { className: "w-4" }),
|
|
111
115
|
"AI Assistant"
|
|
112
116
|
] }),
|
|
113
117
|
/* @__PURE__ */ s.jsx(
|
|
@@ -122,18 +126,18 @@ const G = () => {
|
|
|
122
126
|
}
|
|
123
127
|
)
|
|
124
128
|
] }) : null;
|
|
125
|
-
},
|
|
126
|
-
const e = c("darkMode", !0), [t] =
|
|
129
|
+
}, J = () => {
|
|
130
|
+
const e = c("darkMode", !0), [t] = U();
|
|
127
131
|
return /* @__PURE__ */ s.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
128
132
|
/* @__PURE__ */ s.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
129
|
-
/* @__PURE__ */ s.jsx(
|
|
133
|
+
/* @__PURE__ */ s.jsx(k, {}),
|
|
130
134
|
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" }),
|
|
131
135
|
e ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
132
|
-
/* @__PURE__ */ s.jsx(
|
|
136
|
+
/* @__PURE__ */ s.jsx(Y, {}),
|
|
133
137
|
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" })
|
|
134
138
|
] }) : null,
|
|
135
139
|
/* @__PURE__ */ s.jsxs("div", { className: "flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400", children: [
|
|
136
|
-
/* @__PURE__ */ s.jsx(
|
|
140
|
+
/* @__PURE__ */ s.jsx(j, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
137
141
|
" ",
|
|
138
142
|
/* @__PURE__ */ s.jsxs("div", { className: "text-xs leading-3", children: [
|
|
139
143
|
x(t, 0),
|
|
@@ -141,24 +145,24 @@ const G = () => {
|
|
|
141
145
|
] })
|
|
142
146
|
] }),
|
|
143
147
|
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" }),
|
|
144
|
-
/* @__PURE__ */ s.jsx(
|
|
148
|
+
/* @__PURE__ */ s.jsx(v, {})
|
|
145
149
|
] }),
|
|
146
150
|
/* @__PURE__ */ s.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
|
|
147
|
-
/* @__PURE__ */ s.jsx(
|
|
151
|
+
/* @__PURE__ */ s.jsx(q, {}),
|
|
148
152
|
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" }),
|
|
149
|
-
/* @__PURE__ */ s.jsx(
|
|
153
|
+
/* @__PURE__ */ s.jsx(G, {})
|
|
150
154
|
] })
|
|
151
155
|
] });
|
|
152
|
-
},
|
|
153
|
-
const [e] =
|
|
156
|
+
}, K = p.lazy(() => import("./CodeEditor-Qff4q7sx.js")), ie = () => {
|
|
157
|
+
const [e] = Z();
|
|
154
158
|
return /* @__PURE__ */ s.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
155
|
-
/* @__PURE__ */ s.jsx(
|
|
159
|
+
/* @__PURE__ */ s.jsx(J, {}),
|
|
156
160
|
/* @__PURE__ */ s.jsxs("div", { className: "relative flex h-full flex-col overflow-hidden bg-gray-100/40 px-2", children: [
|
|
157
|
-
/* @__PURE__ */ s.jsx(o, { fallback: /* @__PURE__ */ s.jsx(l, { className: "h-full" }), children: /* @__PURE__ */ s.jsx(
|
|
158
|
-
e ? /* @__PURE__ */ s.jsx(o, { fallback: /* @__PURE__ */ s.jsx(l, { className: "h-full" }), children: /* @__PURE__ */ s.jsx(P, { enable: { top: !0, bottom: !1 }, className: "max-h-[400px] min-h-[200px]", children: /* @__PURE__ */ s.jsx(
|
|
161
|
+
/* @__PURE__ */ s.jsx(o, { fallback: /* @__PURE__ */ s.jsx(l, { className: "h-full" }), children: /* @__PURE__ */ s.jsx(g, { children: /* @__PURE__ */ s.jsx(b, {}) }) }),
|
|
162
|
+
e ? /* @__PURE__ */ s.jsx(o, { fallback: /* @__PURE__ */ s.jsx(l, { className: "h-full" }), children: /* @__PURE__ */ s.jsx(P, { enable: { top: !0, bottom: !1 }, className: "max-h-[400px] min-h-[200px]", children: /* @__PURE__ */ s.jsx(K, {}) }) }) : null
|
|
159
163
|
] })
|
|
160
164
|
] });
|
|
161
165
|
};
|
|
162
166
|
export {
|
|
163
|
-
|
|
167
|
+
ie as default
|
|
164
168
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import k from "@monaco-editor/react";
|
|
3
|
-
import {
|
|
3
|
+
import { ak as C, j, y as v, at as g, B as y } from "./index-C7mB4XFm.js";
|
|
4
4
|
import { useTranslation as N } from "react-i18next";
|
|
5
5
|
import { useState as a, useCallback as T, useEffect as E } from "react";
|
|
6
6
|
import { Cross2Icon as w } from "@radix-ui/react-icons";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { sortBy as P, filter as w, get as C, isEmpty as
|
|
1
|
+
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import { b9 as h, bw as f, bx as j, by as y, bz as b, bA as v } from "./index-C7mB4XFm.js";
|
|
3
|
+
import { sortBy as P, filter as w, get as C, isEmpty as s, find as n, capitalize as N, map as S } from "lodash-es";
|
|
4
4
|
import { toast as k } from "sonner";
|
|
5
5
|
import { useEffect as p } from "react";
|
|
6
|
-
import { a as B, u as E, c as T, d as
|
|
7
|
-
import { BriefcaseIcon as
|
|
8
|
-
import { useTranslation as
|
|
6
|
+
import { a as B, u as E, c as T, d as z } from "./index-YZhtVcj_.js";
|
|
7
|
+
import { BriefcaseIcon as A } from "lucide-react";
|
|
8
|
+
import { useTranslation as I } from "react-i18next";
|
|
9
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
10
|
import "@radix-ui/react-toggle";
|
|
11
11
|
import "class-variance-authority";
|
|
@@ -40,41 +40,53 @@ import "@chaibuilder/runtime";
|
|
|
40
40
|
import "jotai";
|
|
41
41
|
import "@react-hookz/web";
|
|
42
42
|
import "tree-model";
|
|
43
|
-
import "./index-
|
|
43
|
+
import "./index-lFgDm1oa.js";
|
|
44
44
|
import "i18next";
|
|
45
45
|
import "react-arborist";
|
|
46
46
|
import "./index-VBXQixVm.js";
|
|
47
|
+
import "prop-types";
|
|
48
|
+
import "react-hotkeys-hook";
|
|
49
|
+
import "@floating-ui/dom";
|
|
47
50
|
import "@floating-ui/react-dom";
|
|
48
51
|
import "flagged";
|
|
49
|
-
import "
|
|
50
|
-
import "
|
|
52
|
+
import "@tailwindcss/typography";
|
|
53
|
+
import "@tailwindcss/forms";
|
|
54
|
+
import "@tailwindcss/aspect-ratio";
|
|
55
|
+
import "tailwindcss-palette-generator";
|
|
56
|
+
import "./html-to-json-l_mw5y-e.js";
|
|
51
57
|
import "himalaya";
|
|
52
58
|
import "lodash";
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
import "react-wrap-balancer";
|
|
60
|
+
import "@rjsf/core";
|
|
61
|
+
import "@rjsf/validator-ajv8";
|
|
62
|
+
import "react-autosuggest";
|
|
63
|
+
import "fuse.js";
|
|
64
|
+
import "./controls-yjgoZzB6.js";
|
|
65
|
+
const Gr = () => {
|
|
66
|
+
const { data: t } = B(), { data: i, isLoading: l } = E(), { saveState: c } = h(), d = T(), { t: u } = I(), [o, m] = z(), a = P(w(i, { type: "STATIC" }), (e) => C(e, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
|
|
55
67
|
p(() => {
|
|
56
|
-
!
|
|
57
|
-
}, [o, i, t,
|
|
58
|
-
const g = (
|
|
68
|
+
!s(i) && t.homepage && !n(i, { uuid: o }) && m(t.homepage);
|
|
69
|
+
}, [o, i, t, m]), p(() => () => m(null), [m]);
|
|
70
|
+
const g = (e) => {
|
|
59
71
|
if (c !== "SAVED")
|
|
60
72
|
k.error(u("You have unsaved changes. Please save before changing the page."));
|
|
61
73
|
else {
|
|
62
|
-
const x = n(
|
|
74
|
+
const x = n(a, { uuid: e });
|
|
63
75
|
d(x);
|
|
64
76
|
}
|
|
65
77
|
};
|
|
66
|
-
return l ||
|
|
78
|
+
return l || s(o) ? null : /* @__PURE__ */ r.jsx(
|
|
67
79
|
"nav",
|
|
68
80
|
{
|
|
69
81
|
className: "flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 text-gray-700 dark:border-gray-700 dark:bg-gray-800",
|
|
70
82
|
"aria-label": "Breadcrumb",
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ r.jsxs("ol", { className: "inline-flex items-center space-x-1 md:space-x-3", children: [
|
|
84
|
+
/* @__PURE__ */ r.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ r.jsxs("div", { className: "inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400", children: [
|
|
85
|
+
/* @__PURE__ */ r.jsx(A, { className: "mr-2 h-4 w-4" }),
|
|
74
86
|
N(t.name)
|
|
75
87
|
] }) }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ r.jsx("li", { "aria-current": "page", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
89
|
+
/* @__PURE__ */ r.jsx(
|
|
78
90
|
"svg",
|
|
79
91
|
{
|
|
80
92
|
className: "mx-1 h-3 w-3 text-gray-400",
|
|
@@ -82,7 +94,7 @@ const Le = () => {
|
|
|
82
94
|
xmlns: "http://www.w3.org/2000/svg",
|
|
83
95
|
fill: "none",
|
|
84
96
|
viewBox: "0 0 6 10",
|
|
85
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ r.jsx(
|
|
86
98
|
"path",
|
|
87
99
|
{
|
|
88
100
|
stroke: "currentColor",
|
|
@@ -94,9 +106,9 @@ const Le = () => {
|
|
|
94
106
|
)
|
|
95
107
|
}
|
|
96
108
|
),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ r.jsxs(f, { value: o || "", onValueChange: g, children: [
|
|
110
|
+
/* @__PURE__ */ r.jsx(j, { 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__ */ r.jsx(y, { placeholder: "Page" }) }),
|
|
111
|
+
/* @__PURE__ */ r.jsx(b, { className: "z-[999]", children: S(a, (e) => /* @__PURE__ */ r.jsx(v, { value: e.uuid, children: e == null ? void 0 : e.name }, e.uuid)) })
|
|
100
112
|
] })
|
|
101
113
|
] }) })
|
|
102
114
|
] })
|
|
@@ -104,5 +116,5 @@ const Le = () => {
|
|
|
104
116
|
);
|
|
105
117
|
};
|
|
106
118
|
export {
|
|
107
|
-
|
|
119
|
+
Gr as default
|
|
108
120
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("./index-aeDphKpP.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index--k2M8kzI.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("./index-5XyNUAjc.cjs");require("i18next");require("react-arborist");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");const E=()=>{const{data:t}=o.useProject(),{data:s,isLoading:q}=o.usePages(),{saveState:x}=u.useSavePage(),d=o.useChangePage(),{t:m}=f.useTranslation(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(s,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(s)&&t.homepage&&!i.find(s,{uuid:n})&&a(t.homepage)},[n,s,t,a]),l.useEffect(()=>()=>a(null),[a]);const g=r=>{if(x!=="SAVED")j.toast.error(m("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});d(h)}};return q||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 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(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),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(u.Select,{value:n||"",onValueChange:g,children:[e.jsxRuntimeExports.jsx(u.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(u.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(u.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(u.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=E;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import i, { Suspense as s } from "react";
|
|
3
3
|
import { sortBy as a, filter as d, get as n } from "lodash-es";
|
|
4
|
-
import { u as l, a as c } from "./index-
|
|
4
|
+
import { u as l, a as c } from "./index-YZhtVcj_.js";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
-
import "./index-
|
|
6
|
+
import "./index-lFgDm1oa.js";
|
|
7
7
|
import "i18next";
|
|
8
8
|
import "react-i18next";
|
|
9
9
|
import "jotai";
|
|
10
10
|
import "@react-hookz/web";
|
|
11
11
|
import "react-arborist";
|
|
12
|
-
import "./index-
|
|
12
|
+
import "./index-C7mB4XFm.js";
|
|
13
13
|
import "@radix-ui/react-toggle";
|
|
14
14
|
import "class-variance-authority";
|
|
15
15
|
import "./utils-VpVqnC9m.js";
|
|
@@ -43,14 +43,26 @@ import "@chaibuilder/runtime";
|
|
|
43
43
|
import "tree-model";
|
|
44
44
|
import "lucide-react";
|
|
45
45
|
import "./index-VBXQixVm.js";
|
|
46
|
+
import "prop-types";
|
|
47
|
+
import "react-hotkeys-hook";
|
|
48
|
+
import "@floating-ui/dom";
|
|
46
49
|
import "@floating-ui/react-dom";
|
|
47
50
|
import "flagged";
|
|
48
|
-
import "
|
|
49
|
-
import "
|
|
50
|
-
import "
|
|
51
|
+
import "@tailwindcss/typography";
|
|
52
|
+
import "@tailwindcss/forms";
|
|
53
|
+
import "@tailwindcss/aspect-ratio";
|
|
54
|
+
import "tailwindcss-palette-generator";
|
|
55
|
+
import "./html-to-json-l_mw5y-e.js";
|
|
51
56
|
import "himalaya";
|
|
52
57
|
import "lodash";
|
|
53
|
-
|
|
58
|
+
import "react-wrap-balancer";
|
|
59
|
+
import "@rjsf/core";
|
|
60
|
+
import "@rjsf/validator-ajv8";
|
|
61
|
+
import "react-autosuggest";
|
|
62
|
+
import "fuse.js";
|
|
63
|
+
import "./controls-yjgoZzB6.js";
|
|
64
|
+
import "sonner";
|
|
65
|
+
const x = i.lazy(() => import("./add-page-modal-TOfMfmPA.js")), u = i.lazy(() => import("./page-viewer-4wrnWnK0.js")), _t = () => {
|
|
54
66
|
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);
|
|
55
67
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
56
68
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
@@ -62,5 +74,5 @@ const x = i.lazy(() => import("./add-page-modal-qr7rvJzN.js")), u = i.lazy(() =>
|
|
|
62
74
|
] });
|
|
63
75
|
};
|
|
64
76
|
export {
|
|
65
|
-
|
|
77
|
+
_t as default
|
|
66
78
|
};
|
|
@@ -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--k2M8kzI.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-5XyNUAjc.cjs");require("i18next");require("react-i18next");require("jotai");require("@react-hookz/web");require("react-arborist");require("./index-aeDphKpP.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("tree-model");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");require("sonner");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-RwIj1FxH.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-ra0GLx1p.cjs"))),d=()=>{const{data:q=[],isLoading:t}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(q,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:t,pages:n})})]})};exports.default=d;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import
|
|
3
|
-
import { isEqual as
|
|
4
|
-
import {
|
|
5
|
-
import { b as h, a as g } from "./index-
|
|
2
|
+
import m, { useRef as x, useEffect as a, Suspense as p } from "react";
|
|
3
|
+
import { isEqual as j, isEmpty as b } from "lodash-es";
|
|
4
|
+
import { av as f, aw as n, ax as l, ay as c } from "./index-C7mB4XFm.js";
|
|
5
|
+
import { b as h, a as g } from "./index-YZhtVcj_.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
@@ -38,50 +38,62 @@ import "jotai";
|
|
|
38
38
|
import "@react-hookz/web";
|
|
39
39
|
import "tree-model";
|
|
40
40
|
import "react-i18next";
|
|
41
|
-
import "./index-
|
|
41
|
+
import "./index-lFgDm1oa.js";
|
|
42
42
|
import "i18next";
|
|
43
43
|
import "react-arborist";
|
|
44
44
|
import "lucide-react";
|
|
45
45
|
import "./index-VBXQixVm.js";
|
|
46
|
+
import "prop-types";
|
|
47
|
+
import "react-hotkeys-hook";
|
|
48
|
+
import "@floating-ui/dom";
|
|
46
49
|
import "@floating-ui/react-dom";
|
|
47
50
|
import "flagged";
|
|
48
|
-
import "
|
|
49
|
-
import "
|
|
50
|
-
import "
|
|
51
|
+
import "@tailwindcss/typography";
|
|
52
|
+
import "@tailwindcss/forms";
|
|
53
|
+
import "@tailwindcss/aspect-ratio";
|
|
54
|
+
import "tailwindcss-palette-generator";
|
|
55
|
+
import "./html-to-json-l_mw5y-e.js";
|
|
51
56
|
import "himalaya";
|
|
52
57
|
import "lodash";
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
import "react-wrap-balancer";
|
|
59
|
+
import "@rjsf/core";
|
|
60
|
+
import "@rjsf/validator-ajv8";
|
|
61
|
+
import "react-autosuggest";
|
|
62
|
+
import "fuse.js";
|
|
63
|
+
import "./controls-yjgoZzB6.js";
|
|
64
|
+
import "sonner";
|
|
65
|
+
const N = m.lazy(() => import("./project-general-setting-IwZUkYF3.js")), S = m.lazy(() => import("./project-seo-setting-e1fTqVsd.js")), d = /* @__PURE__ */ t.jsx("div", { className: "px-3", children: /* @__PURE__ */ t.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (r) => r && b(r.seoData) ? {
|
|
66
|
+
...r,
|
|
55
67
|
seoData: { title: "", description: "", image: "" }
|
|
56
|
-
} :
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
u(
|
|
60
|
-
), o = x(
|
|
61
|
-
return
|
|
68
|
+
} : r;
|
|
69
|
+
function _t() {
|
|
70
|
+
const r = h(), { data: i } = g(), [e, s] = m.useState(
|
|
71
|
+
u(i || {})
|
|
72
|
+
), o = x(e);
|
|
73
|
+
return a(
|
|
62
74
|
() => () => {
|
|
63
|
-
|
|
64
|
-
onSuccess: () =>
|
|
75
|
+
j(i, o.current) || r.mutate(o.current, {
|
|
76
|
+
onSuccess: () => s(o.current)
|
|
65
77
|
});
|
|
66
78
|
},
|
|
67
79
|
[o]
|
|
68
|
-
),
|
|
69
|
-
o.current =
|
|
70
|
-
}, [
|
|
80
|
+
), a(() => {
|
|
81
|
+
o.current = e;
|
|
82
|
+
}, [e]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
71
83
|
/* @__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" }) }),
|
|
72
84
|
/* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
|
|
73
85
|
/* @__PURE__ */ t.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ t.jsxs(f, { type: "single", className: "w-full", defaultValue: "GENERAL", children: [
|
|
74
86
|
/* @__PURE__ */ t.jsxs(n, { value: "GENERAL", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
75
87
|
/* @__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" }),
|
|
76
|
-
/* @__PURE__ */ t.jsx(c, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(N, { _projectData:
|
|
88
|
+
/* @__PURE__ */ t.jsx(c, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(N, { _projectData: e, seany: s }) }) })
|
|
77
89
|
] }),
|
|
78
90
|
/* @__PURE__ */ t.jsxs(n, { value: "SEO", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
|
|
79
91
|
/* @__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" }),
|
|
80
|
-
/* @__PURE__ */ t.jsx(c, { className: "px-1 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(S, { _projectData:
|
|
92
|
+
/* @__PURE__ */ t.jsx(c, { className: "px-1 pt-4 text-sm", children: /* @__PURE__ */ t.jsx(p, { fallback: d, children: /* @__PURE__ */ t.jsx(S, { _projectData: e, seany: s }) }) })
|
|
81
93
|
] })
|
|
82
94
|
] }) })
|
|
83
95
|
] });
|
|
84
96
|
}
|
|
85
97
|
export {
|
|
86
|
-
|
|
98
|
+
_t as default
|
|
87
99
|
};
|
|
@@ -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-aeDphKpP.cjs"),a=require("./index--k2M8kzI.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("./index-5XyNUAjc.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");require("sonner");const q=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-lFjTUhHD.cjs"))),d=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-o0V9acCV.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=i=>i&&x.isEmpty(i.seoData)?{...i,seoData:{title:"",description:"",image:""}}:i;function m(){const i=a.useUpdateProject(),{data:n}=a.useProject(),[t,o]=r.useState(l(n||{})),u=r.useRef(t);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||i.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=t},[t]),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(q,{_projectData:t,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(d,{_projectData:t,seany:o})})})]})]})})]})}exports.default=m;
|