@chaibuilder/sdk 1.2.63 → 1.2.64
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-6dJmFSgk.js +142 -0
- package/dist/AddBlocks-doCNVVbk.cjs +1 -0
- package/dist/{CanvasArea-DvfLxy0w.js → CanvasArea-kB6ky_uL.js} +4 -4
- package/dist/{CanvasArea-hGLbDJlM.cjs → CanvasArea-kdnkFfKR.cjs} +1 -1
- package/dist/{CodeEditor-QPwyZNgA.js → CodeEditor-37od44Ou.js} +1 -1
- package/dist/{CurrentPage-fMCaBGwl.cjs → CurrentPage-Ekl5Cwbv.cjs} +1 -1
- package/dist/{CurrentPage-rOUX01kk.js → CurrentPage-bHq9Uusr.js} +3 -3
- package/dist/{PagesPanel-ZCZjs7Bi.cjs → PagesPanel-SMHrEmCb.cjs} +1 -1
- package/dist/{PagesPanel-6P4VkMP-.js → PagesPanel-wIPAyjJK.js} +4 -4
- package/dist/{ProjectPanel-Cn3teDRW.js → ProjectPanel-L-SlDizV.js} +4 -4
- package/dist/{ProjectPanel-XSVWRr6v.cjs → ProjectPanel-YruLal65.cjs} +1 -1
- package/dist/{Settings-dbB2VPAj.js → Settings-WXkCyhAv.js} +16 -14
- package/dist/{Settings-Amh8Mtm7.cjs → Settings-_5VHcgFC.cjs} +1 -1
- package/dist/{SidePanels-_Im6sF4f.js → SidePanels-UQj0XTnb.js} +72 -72
- package/dist/{SidePanels-5adH7U3T.cjs → SidePanels-UeIZB3e1.cjs} +1 -1
- package/dist/{StaticCanvas-goU42OMU.js → StaticCanvas-7C52tXAv.js} +42 -42
- package/dist/{StaticCanvas-fDhBK35X.cjs → StaticCanvas-ll9VTXI5.cjs} +1 -1
- package/dist/ThemeConfigPanel-_86vVxLz.cjs +1 -0
- package/dist/{ThemeConfigPanel-aEN4tTYi.js → ThemeConfigPanel-gw8B2zvx.js} +59 -56
- package/dist/{Topbar-SuY-S0im.js → Topbar-1O05wogM.js} +2 -2
- package/dist/{Topbar-ag6qdgbe.cjs → Topbar-gb17oHdJ.cjs} +1 -1
- package/dist/{UILibrariesPanel-RI9mo293.js → UILibrariesPanel-vshiYI6G.js} +18 -18
- package/dist/{UnsplashImages-dasLGrBn.js → UnsplashImages-Eq7hprBO.js} +5 -5
- package/dist/{UploadImages-Gh2AQpk1.js → UploadImages-lco2Tea3.js} +7 -7
- package/dist/{add-page-modal-zCiyvKEa.js → add-page-modal-qr7rvJzN.js} +6 -6
- package/dist/{add-page-modal-80cVOM7i.cjs → add-page-modal-rOKavDFX.cjs} +1 -1
- package/dist/{confirm-alert-9XYi0a4k.js → confirm-alert-P6TAevaP.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +6 -2
- package/dist/core.js +15 -15
- package/dist/{delete-page-modal-pzagU_6y.js → delete-page-modal-55oioI9i.js} +3 -3
- package/dist/{delete-page-modal-foPRP--l.cjs → delete-page-modal-wdAiMVnL.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-EjiQiiEY.js → form-5ke_lZv8.js} +1 -1
- package/dist/{index-DzAuS11k.cjs → index-6w-6HYBd.cjs} +1 -1
- package/dist/{index-BbW1Uw_k.cjs → index-audsIPBC.cjs} +1 -1
- package/dist/{index-bscJUvUx.js → index-b33n_-zO.js} +60 -60
- package/dist/{index-qSbpzIA4.js → index-fnkMn4Pk.js} +3 -3
- package/dist/{index-EEcKvBh3.js → index-wRAIA8zZ.js} +5 -5
- package/dist/{page-viewer-Z1wXyzzc.js → page-viewer-t44DP65U.js} +9 -9
- package/dist/{page-viewer-XFTCHu_2.cjs → page-viewer-wU7T0f48.cjs} +1 -1
- package/dist/{project-general-setting-HV3X_wHI.cjs → project-general-setting-87cX9vvO.cjs} +1 -1
- package/dist/{project-general-setting-5B7s5swF.js → project-general-setting-NEkNjf7V.js} +4 -4
- package/dist/{project-seo-setting-aAGnwBrw.js → project-seo-setting-YmspOYsF.js} +2 -2
- package/dist/{single-page-detail-6C1WP3s5.cjs → single-page-detail-27UjWK8L.cjs} +1 -1
- package/dist/{single-page-detail-Yr0EbBJJ.js → single-page-detail-jHzoDP7B.js} +10 -10
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.js +10 -10
- package/package.json +1 -1
- package/dist/AddBlocks-4wpxOF2K.cjs +0 -1
- package/dist/AddBlocks-ChNxwRrx.js +0 -142
- package/dist/ThemeConfigPanel-N6l317II.cjs +0 -1
|
@@ -2781,7 +2781,7 @@ const kr = (e) => {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
)
|
|
2783
2783
|
] });
|
|
2784
|
-
}, Ar = nt.lazy(() => import("./UnsplashImages-
|
|
2784
|
+
}, Ar = nt.lazy(() => import("./UnsplashImages-Eq7hprBO.js")), Sr = nt.lazy(() => import("./UploadImages-lco2Tea3.js")), Es = ({
|
|
2785
2785
|
isModalView: e = !1,
|
|
2786
2786
|
onSelect: t = () => {
|
|
2787
2787
|
}
|
|
@@ -2952,7 +2952,7 @@ export {
|
|
|
2952
2952
|
Xr as Z,
|
|
2953
2953
|
pi as _,
|
|
2954
2954
|
Li as a,
|
|
2955
|
-
|
|
2955
|
+
ea as a$,
|
|
2956
2956
|
re as a0,
|
|
2957
2957
|
$o as a1,
|
|
2958
2958
|
Ho as a2,
|
|
@@ -2963,33 +2963,33 @@ export {
|
|
|
2963
2963
|
or as a7,
|
|
2964
2964
|
Mi as a8,
|
|
2965
2965
|
zn as a9,
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2966
|
+
ln as aA,
|
|
2967
|
+
mi as aB,
|
|
2968
|
+
bi as aC,
|
|
2969
|
+
xi as aD,
|
|
2970
|
+
hi as aE,
|
|
2971
|
+
tn as aF,
|
|
2972
|
+
Ri as aG,
|
|
2973
|
+
vi as aH,
|
|
2974
|
+
ki as aI,
|
|
2975
|
+
Zr as aJ,
|
|
2976
|
+
Si as aK,
|
|
2977
|
+
ji as aL,
|
|
2978
|
+
_i as aM,
|
|
2979
|
+
Ui as aN,
|
|
2980
|
+
$i as aO,
|
|
2981
|
+
xa as aP,
|
|
2982
|
+
Ms as aQ,
|
|
2983
|
+
ir as aR,
|
|
2984
|
+
lr as aS,
|
|
2985
|
+
cr as aT,
|
|
2986
|
+
dr as aU,
|
|
2987
|
+
fr as aV,
|
|
2988
|
+
ta as aW,
|
|
2989
|
+
oa as aX,
|
|
2990
|
+
na as aY,
|
|
2991
|
+
sa as aZ,
|
|
2992
|
+
Ns as a_,
|
|
2993
2993
|
Vn as aa,
|
|
2994
2994
|
Fn as ab,
|
|
2995
2995
|
Zn as ac,
|
|
@@ -2998,36 +2998,36 @@ export {
|
|
|
2998
2998
|
vs as af,
|
|
2999
2999
|
gi as ag,
|
|
3000
3000
|
zi as ah,
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3001
|
+
ga as ai,
|
|
3002
|
+
os as aj,
|
|
3003
|
+
ls as ak,
|
|
3004
|
+
cs as al,
|
|
3005
|
+
cl as am,
|
|
3006
|
+
Ii as an,
|
|
3007
|
+
Ci as ao,
|
|
3008
|
+
Ai as ap,
|
|
3009
|
+
ri as aq,
|
|
3010
|
+
ii as ar,
|
|
3011
|
+
ci as as,
|
|
3012
|
+
di as at,
|
|
3013
|
+
Ti as au,
|
|
3014
|
+
zo as av,
|
|
3015
|
+
on as aw,
|
|
3016
|
+
ui as ax,
|
|
3017
|
+
Uo as ay,
|
|
3018
|
+
fi as az,
|
|
3019
3019
|
Yn as b,
|
|
3020
3020
|
Yi as b$,
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3021
|
+
wt as b0,
|
|
3022
|
+
It as b1,
|
|
3023
|
+
Tt as b2,
|
|
3024
|
+
wl as b3,
|
|
3025
|
+
xl as b4,
|
|
3026
|
+
yl as b5,
|
|
3027
|
+
Nl as b6,
|
|
3028
|
+
Pn as b7,
|
|
3029
|
+
Ln as b8,
|
|
3030
|
+
ma as b9,
|
|
3031
3031
|
Ia as bA,
|
|
3032
3032
|
Ja as bB,
|
|
3033
3033
|
Sn as bC,
|
|
@@ -3055,9 +3055,9 @@ export {
|
|
|
3055
3055
|
Na as bY,
|
|
3056
3056
|
wa as bZ,
|
|
3057
3057
|
Wi as b_,
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3058
|
+
ti as ba,
|
|
3059
|
+
ua as bb,
|
|
3060
|
+
Oi as bc,
|
|
3061
3061
|
al as bd,
|
|
3062
3062
|
qa as be,
|
|
3063
3063
|
Nn as bf,
|
|
@@ -18,9 +18,9 @@ var c2 = (h, t, a, c) => ({
|
|
|
18
18
|
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
19
19
|
import * as b from "react";
|
|
20
20
|
import H0, { lazy as A2, useCallback as g2, useState as o2, Suspense as u0, useEffect as s0 } from "react";
|
|
21
|
-
import { C as p0 } from "./index-
|
|
21
|
+
import { C as p0 } from "./index-wRAIA8zZ.js";
|
|
22
22
|
import { FileTextIcon as V0, GearIcon as f0, EyeClosedIcon as m0, EyeOpenIcon as L0 } from "@radix-ui/react-icons";
|
|
23
|
-
import { u as x0, B as Y2, A as w0, a as B0, b as C0, c as O0, d as A0, e as S0, f as y0, g as b0, h as P0 } from "./index-
|
|
23
|
+
import { u as x0, B as Y2, A as w0, a as B0, b as C0, c as O0, d as A0, e as S0, f as y0, g as b0, h as P0 } from "./index-b33n_-zO.js";
|
|
24
24
|
import { toast as a1, Toaster as F0 } from "sonner";
|
|
25
25
|
import { useTranslation as k0 } from "react-i18next";
|
|
26
26
|
import { sortBy as R0, filter as D0, has as T0, set as E0, capitalize as N0, get as b2, omit as I0, size as P2 } from "lodash-es";
|
|
@@ -2044,7 +2044,7 @@ const D4 = () => {
|
|
|
2044
2044
|
] })
|
|
2045
2045
|
] })
|
|
2046
2046
|
] });
|
|
2047
|
-
}, W4 = () => /* @__PURE__ */ r.jsx(I4, { children: /* @__PURE__ */ r.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ r.jsx(Q0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), U4 = A2(() => import("./PagesPanel-
|
|
2047
|
+
}, W4 = () => /* @__PURE__ */ r.jsx(I4, { children: /* @__PURE__ */ r.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ r.jsx(Q0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), U4 = A2(() => import("./PagesPanel-wIPAyjJK.js")), j4 = A2(() => import("./ProjectPanel-L-SlDizV.js")), Q4 = A2(() => import("./CurrentPage-bHq9Uusr.js")), K4 = () => /* @__PURE__ */ r.jsx("h2", { children: "Your Logo" }), G4 = () => {
|
|
2048
2048
|
const { mutate: h } = y4();
|
|
2049
2049
|
return P0("editable", !0) ? /* @__PURE__ */ r.jsx(Y2, { onClick: h, className: "bg-blue-600 text-white", children: "Publish" }) : null;
|
|
2050
2050
|
}, q4 = (h) => {
|
|
@@ -6,7 +6,7 @@ import React__default, { memo, useMemo as useMemo$1, useCallback as useCallback$
|
|
|
6
6
|
import { useAtom, atom as atom$1, useAtomValue as useAtomValue$1, getDefaultStore } from "jotai";
|
|
7
7
|
import { useDebouncedCallback, useIntervalEffect } from "@react-hookz/web";
|
|
8
8
|
import { Tree } from "react-arborist";
|
|
9
|
-
import { i as useBlocksStore, j as useSelectedBlockIds, k as useRemoveBlocks, l as useSelectedBlock, C as ContextMenuItem, m as canDeleteBlock, n as useDuplicateBlocks, o as ContextMenuContent, p as canDuplicateBlock, q as ContextMenu, r as ContextMenuTrigger, h as useBuilderProp, s as canvasIframeAtom, t as canAcceptChildBlock, T as Tooltip$1, v as TooltipTrigger, w as TooltipContent, x as treeDSBlocks, y as useUpdateBlocksProps, z as useSelectedStylingBlocks, D as useBlocksStoreUndoableActions, E as treeRefAtom, F as useUndoManager, B as Button$1, H as HoverCard$1, G as HoverCardTrigger, I as HoverCardContent, J as useCanvasWidth, K as useSelectedBreakpoints, L as DropdownMenu, M as DropdownMenuTrigger, N as DropdownMenuContent, O as DropdownMenuLabel, P as DropdownMenuSeparator, Q as DropdownMenuCheckboxItem, R as useStore, S as useAtom$1, U as createStore, V as atom, W as useSetAtom, X as useAtomValue, Y as atomWithStorage, Z as atomWithDefault, _ as usePreviewMode, $ as Skeleton$1, a0 as presentBlocksAtom, a1 as chaiExternalDataAtom, a2 as usePageDataProviders, a3 as useStreamMultipleBlocksProps, a4 as useUpdateMultipleBlocksProps, a5 as DropdownMenuItem, a6 as Textarea$1, a7 as useToast, a8 as Accordion$1, a9 as AccordionItem$1, aa as AccordionTrigger, ab as AccordionContent, A as AlertDialog, a as AlertDialogTrigger, b as AlertDialogContent, c as AlertDialogHeader, d as AlertDialogTitle, e as AlertDialogDescription, f as AlertDialogFooter, g as AlertDialogCancel, ac as AlertDialogAction, ad as useSavePage, ae as builderSaveStateAtom, af as aiAssistantActiveAtom, ag as isDevelopment, ah as TooltipProvider, ai as useBrandingOptions, u as useBuilderReset,
|
|
9
|
+
import { i as useBlocksStore, j as useSelectedBlockIds, k as useRemoveBlocks, l as useSelectedBlock, C as ContextMenuItem, m as canDeleteBlock, n as useDuplicateBlocks, o as ContextMenuContent, p as canDuplicateBlock, q as ContextMenu, r as ContextMenuTrigger, h as useBuilderProp, s as canvasIframeAtom, t as canAcceptChildBlock, T as Tooltip$1, v as TooltipTrigger, w as TooltipContent, x as treeDSBlocks, y as useUpdateBlocksProps, z as useSelectedStylingBlocks, D as useBlocksStoreUndoableActions, E as treeRefAtom, F as useUndoManager, B as Button$1, H as HoverCard$1, G as HoverCardTrigger, I as HoverCardContent, J as useCanvasWidth, K as useSelectedBreakpoints, L as DropdownMenu, M as DropdownMenuTrigger, N as DropdownMenuContent, O as DropdownMenuLabel, P as DropdownMenuSeparator, Q as DropdownMenuCheckboxItem, R as useStore, S as useAtom$1, U as createStore, V as atom, W as useSetAtom, X as useAtomValue, Y as atomWithStorage, Z as atomWithDefault, _ as usePreviewMode, $ as Skeleton$1, a0 as presentBlocksAtom, a1 as chaiExternalDataAtom, a2 as usePageDataProviders, a3 as useStreamMultipleBlocksProps, a4 as useUpdateMultipleBlocksProps, a5 as DropdownMenuItem, a6 as Textarea$1, a7 as useToast, a8 as Accordion$1, a9 as AccordionItem$1, aa as AccordionTrigger, ab as AccordionContent, A as AlertDialog, a as AlertDialogTrigger, b as AlertDialogContent, c as AlertDialogHeader, d as AlertDialogTitle, e as AlertDialogDescription, f as AlertDialogFooter, g as AlertDialogCancel, ac as AlertDialogAction, ad as useSavePage, ae as builderSaveStateAtom, af as aiAssistantActiveAtom, ag as isDevelopment, ah as TooltipProvider, ai as ScrollArea$1, aj as useBrandingOptions, u as useBuilderReset, ak as chaiBuilderPropsAtom, al as dataProvidersAtom, am as Toaster } from "./index-b33n_-zO.js";
|
|
10
10
|
import { c as cn } from "./Functions-7jnEwJyw.js";
|
|
11
11
|
import { BoxModelIcon, BoxIcon, DragHandleHorizontalIcon, ViewHorizontalIcon, BorderAllIcon, BorderTopIcon, TableIcon, DropdownMenuIcon, RadiobuttonIcon, InputIcon, ButtonIcon, CheckboxIcon as CheckboxIcon$1, GroupIcon, SpaceBetweenVerticallyIcon, ColumnsIcon, RowsIcon, TextIcon, SketchLogoIcon, DividerHorizontalIcon, CodeIcon, CursorTextIcon, VideoIcon, Link1Icon, HeadingIcon, ImageIcon as ImageIcon$1, TrashIcon, CopyIcon as CopyIcon$1, TriangleRightIcon, ResetIcon, MobileIcon, LaptopIcon, DesktopIcon, DotsVerticalIcon, EyeClosedIcon, CheckIcon as CheckIcon$1, ArrowUpIcon, ArrowDownIcon, Cross2Icon } from "@radix-ui/react-icons";
|
|
12
12
|
import { DatabaseIcon, SmileIcon, ShuffleIcon, SparklesIcon, Loader as Loader$1, EditIcon } from "lucide-react";
|
|
@@ -80138,7 +80138,7 @@ const AskAIPrompt = ({ blockId: a }) => {
|
|
|
80138
80138
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SetAiContext, { onOpen: (n) => c(n) }),
|
|
80139
80139
|
r ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(AskAIPrompt, { blockId: first(a) })
|
|
80140
80140
|
] });
|
|
80141
|
-
}, SidePanels = lazy(() => import("./SidePanels-
|
|
80141
|
+
}, SidePanels = lazy(() => import("./SidePanels-UQj0XTnb.js")), TopBar = lazy(() => import("./Topbar-1O05wogM.js")), CanvasArea = lazy(() => import("./CanvasArea-kB6ky_uL.js")), Settings = lazy(() => import("./Settings-WXkCyhAv.js")), useAutoSave = () => {
|
|
80142
80142
|
const { savePage: a } = useSavePage(), r = useBuilderProp("autoSaveSupport", !0), c = useBuilderProp("autoSaveInterval", 60);
|
|
80143
80143
|
useIntervalEffect(() => {
|
|
80144
80144
|
r && a();
|
|
@@ -80163,10 +80163,10 @@ const AskAIPrompt = ({ blockId: a }) => {
|
|
|
80163
80163
|
n ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 z-[500] flex h-full w-full items-center justify-center backdrop-blur-[2px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { children: React__default.createElement(l) }) }),
|
|
80164
80164
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full max-h-full w-fit border-border", style: { maxHeight: "calc(100vh - 56px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SidePanels, {}) }) }),
|
|
80165
80165
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full flex-1 bg-slate-800/20", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CanvasArea, {}) }) }),
|
|
80166
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
80166
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative flex h-[100%] w-[280px] min-w-[280px] border-l border-border pb-10", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ScrollArea$1, { className: "h-full w-full overflow-y-auto", children: [
|
|
80167
80167
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, {}) }),
|
|
80168
80168
|
r ? /* @__PURE__ */ jsxRuntimeExports.jsx(AskAI, {}) : null
|
|
80169
|
-
] })
|
|
80169
|
+
] }) })
|
|
80170
80170
|
] })
|
|
80171
80171
|
]
|
|
80172
80172
|
}
|
|
@@ -80226,7 +80226,7 @@ const setDebugLogs = (a) => {
|
|
|
80226
80226
|
] }),
|
|
80227
80227
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Toaster, {})
|
|
80228
80228
|
] });
|
|
80229
|
-
}, BuilderCanvas = lazy(() => import("./StaticCanvas-
|
|
80229
|
+
}, BuilderCanvas = lazy(() => import("./StaticCanvas-7C52tXAv.js")), BlockSettings = lazy(() => import("./Settings-WXkCyhAv.js")), AddBlocksPanel = lazy(() => import("./AddBlocks-6dJmFSgk.js")), ThemeConfigPanel = lazy(() => import("./ThemeConfigPanel-gw8B2zvx.js"));
|
|
80230
80230
|
export {
|
|
80231
80231
|
AddBlocksPanel as A,
|
|
80232
80232
|
Breakpoints as B,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import s, { useState as n, Suspense as l } from "react";
|
|
3
3
|
import { ChevronRightIcon as c, GearIcon as u, HomeIcon as d, FileTextIcon as x } from "@radix-ui/react-icons";
|
|
4
|
-
import {
|
|
5
|
-
import { d as j, a as N, c as
|
|
4
|
+
import { aN as g, aO as h, aP as f } from "./index-b33n_-zO.js";
|
|
5
|
+
import { d as j, a as N, c as P } from "./index-fnkMn4Pk.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
@@ -38,7 +38,7 @@ import "jotai";
|
|
|
38
38
|
import "@react-hookz/web";
|
|
39
39
|
import "tree-model";
|
|
40
40
|
import "react-i18next";
|
|
41
|
-
import "./index-
|
|
41
|
+
import "./index-wRAIA8zZ.js";
|
|
42
42
|
import "i18next";
|
|
43
43
|
import "react-arborist";
|
|
44
44
|
import "lucide-react";
|
|
@@ -50,7 +50,7 @@ import "sonner";
|
|
|
50
50
|
import "./html-to-json-_01DXd-a.js";
|
|
51
51
|
import "himalaya";
|
|
52
52
|
import "lodash";
|
|
53
|
-
const
|
|
53
|
+
const b = s.lazy(() => import("./single-page-detail-jHzoDP7B.js")), v = ({ pageData: r }) => {
|
|
54
54
|
const [t, i] = n("CLOSE");
|
|
55
55
|
return /* @__PURE__ */ e.jsxs(
|
|
56
56
|
g,
|
|
@@ -78,14 +78,14 @@ const v = s.lazy(() => import("./single-page-detail-Yr0EbBJJ.js")), P = ({ pageD
|
|
|
78
78
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" }),
|
|
79
79
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" })
|
|
80
80
|
] }),
|
|
81
|
-
children: /* @__PURE__ */ e.jsx(
|
|
81
|
+
children: /* @__PURE__ */ e.jsx(b, { pageData: r, open: t, setOpen: i })
|
|
82
82
|
}
|
|
83
83
|
) })
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
}, E = (r) => {
|
|
88
|
-
const [t] = j(), { data: i } = N(), o =
|
|
88
|
+
const [t] = j(), { data: i } = N(), o = P(), a = (i == null ? void 0 : i.homepage) === r.uuid, m = t === r.uuid, p = () => o(r);
|
|
89
89
|
return i ? /* @__PURE__ */ e.jsxs(
|
|
90
90
|
"button",
|
|
91
91
|
{
|
|
@@ -98,15 +98,15 @@ const v = s.lazy(() => import("./single-page-detail-Yr0EbBJJ.js")), P = ({ pageD
|
|
|
98
98
|
" ",
|
|
99
99
|
r.name
|
|
100
100
|
] }),
|
|
101
|
-
/* @__PURE__ */ e.jsx(
|
|
101
|
+
/* @__PURE__ */ e.jsx(v, { pageData: r })
|
|
102
102
|
]
|
|
103
103
|
}
|
|
104
104
|
) : null;
|
|
105
|
-
},
|
|
105
|
+
}, ve = ({ pages: r, isLoading: t }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-1 px-2.5 pt-2", children: [
|
|
106
106
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
107
107
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
108
108
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" })
|
|
109
109
|
] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children: s.Children.toArray(r.map((i) => /* @__PURE__ */ e.jsx(E, { ...i }))) });
|
|
110
110
|
export {
|
|
111
|
-
|
|
111
|
+
ve as default
|
|
112
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),n=require("@radix-ui/react-icons"),o=require("./index-aeDphKpP.cjs"),x=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),n=require("@radix-ui/react-icons"),o=require("./index-aeDphKpP.cjs"),x=require("./index-6w-6HYBd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");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-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-audsIPBC.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const m=u.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-27UjWK8L.cjs"))),j=({pageData:s})=>{const[r,i]=u.useState("CLOSE");return e.jsxRuntimeExports.jsxs(o.Popover,{open:r==="OPEN"||r==="ALERT"||r==="PENDING",onOpenChange:t=>{i(r==="PENDING"?"ALERT":t?"OPEN":"CLOSE")},children:[e.jsxRuntimeExports.jsx(o.PopoverTrigger,{asChild:!0,onClick:t=>{t.stopPropagation(),i("OPEN")},children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:r==="OPEN"||r==="ALERT"||r==="PENDING"?e.jsxRuntimeExports.jsx(n.ChevronRightIcon,{}):e.jsxRuntimeExports.jsx("div",{className:"hidden hover:text-blue-600 group-hover:flex",children:e.jsxRuntimeExports.jsx(n.GearIcon,{})})})}),e.jsxRuntimeExports.jsx(o.PopoverContent,{side:"right",align:"start",alignOffset:-35,className:"h-screen w-96",children:e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex w-full animate-pulse flex-col gap-y-3",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-6 w-1/2"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"})]}),children:e.jsxRuntimeExports.jsx(m,{pageData:s,open:r,setOpen:i})})})]})},q=s=>{const[r]=x.useCurrentPage(),{data:i}=x.useProject(),t=x.useChangePage(),l=(i==null?void 0:i.homepage)===s.uuid,a=r===s.uuid,c=()=>t(s);return i?e.jsxRuntimeExports.jsxs("button",{className:`group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${a?"bg-blue-200 ":""}`,onClick:c,type:"button",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex text-sm items-center gap-x-1.5",children:[l?e.jsxRuntimeExports.jsx(n.HomeIcon,{}):e.jsxRuntimeExports.jsx(n.FileTextIcon,{})," ",s.name]}),e.jsxRuntimeExports.jsx(j,{pageData:s})]}):null},p=({pages:s,isLoading:r})=>r?e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-1 px-2.5 pt-2",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"})]}):s.length===0?e.jsxRuntimeExports.jsx("div",{className:"px-2.5 pb-2 pt-4",children:"No pages"}):e.jsxRuntimeExports.jsx("div",{className:"-mb-2",children:u.Children.toArray(s.map(i=>e.jsxRuntimeExports.jsx(q,{...i})))});exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./index-aeDphKpP.cjs"),o=require("./controls-rRZhz0vu.cjs"),d=require("./form-4jTocVbZ.cjs"),m=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./index-aeDphKpP.cjs"),o=require("./controls-rRZhz0vu.cjs"),d=require("./form-4jTocVbZ.cjs"),m=require("./index-6w-6HYBd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");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("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-audsIPBC.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");function g(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,u.get?u:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const j=g(a),b=({_projectData:r,seany:i})=>{const{data:e,isLoading:u}=m.useProject();j.useEffect(()=>{e&&i(e)},[e,i]);const n=({formData:s},t)=>{i(l=>({...l,[t]:s[t]}))},c={name:o.g({title:"Project Name",default:e==null?void 0:e.name}),favicon:o.v({title:"Favicon",default:e==null?void 0:e.favicon})};return q.jsxRuntimeExports.jsx(f.ScrollArea,{className:"flex h-full select-none flex-col",children:q.jsxRuntimeExports.jsx(d.Form,{properties:c,disabled:u,formData:r,onChange:n})})};exports.default=b;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { ai as n } from "./index-b33n_-zO.js";
|
|
4
4
|
import { g as c, v as d } from "./controls-yjgoZzB6.js";
|
|
5
|
-
import { F as u } from "./form-
|
|
6
|
-
import { a as x } from "./index-
|
|
5
|
+
import { F as u } from "./form-5ke_lZv8.js";
|
|
6
|
+
import { a as x } from "./index-fnkMn4Pk.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "@radix-ui/react-toggle";
|
|
9
9
|
import "class-variance-authority";
|
|
@@ -42,7 +42,7 @@ import "tree-model";
|
|
|
42
42
|
import "react-i18next";
|
|
43
43
|
import "@rjsf/core";
|
|
44
44
|
import "@rjsf/validator-ajv8";
|
|
45
|
-
import "./index-
|
|
45
|
+
import "./index-wRAIA8zZ.js";
|
|
46
46
|
import "i18next";
|
|
47
47
|
import "react-arborist";
|
|
48
48
|
import "lucide-react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { h as c, g as u, r as g, v as x } from "./controls-yjgoZzB6.js";
|
|
3
|
-
import { F as v } from "./form-
|
|
3
|
+
import { F as v } from "./form-5ke_lZv8.js";
|
|
4
4
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "@rjsf/core";
|
|
8
8
|
import "@rjsf/validator-ajv8";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-b33n_-zO.js";
|
|
10
10
|
import "@radix-ui/react-toggle";
|
|
11
11
|
import "class-variance-authority";
|
|
12
12
|
import "./utils-VpVqnC9m.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),g=require("react"),c=require("lodash-es"),H=require("@radix-ui/react-icons"),y=require("./index-aeDphKpP.cjs"),d=require("./controls-rRZhz0vu.cjs"),w=require("sonner"),p=require("./form-4jTocVbZ.cjs"),h=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),g=require("react"),c=require("lodash-es"),H=require("@radix-ui/react-icons"),y=require("./index-aeDphKpP.cjs"),d=require("./controls-rRZhz0vu.cjs"),w=require("sonner"),p=require("./form-4jTocVbZ.cjs"),h=require("./index-6w-6HYBd.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-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("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-audsIPBC.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const z=g.lazy(()=>Promise.resolve().then(()=>require("./delete-page-modal-wdAiMVnL.cjs"))),L=g.lazy(()=>Promise.resolve().then(()=>require("./confirm-alert-v1lG8ex4.cjs"))),E=n=>{if(!c.isString(n)||!(n.includes("/[")&&n.includes("]")))return!1;const s=/^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/,q=/^[a-zA-Z0-9_-]+$/;let e=!0;return n.split("/").forEach(u=>{e&&(u.includes("[[")&&u.includes("]]")?e=/^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(u):u.includes("[")&&u.includes("]")?e=s.test(u):e=q.test(u))}),e},P=n=>n&&c.isEmpty(n.seoData)?{...n,seoData:{title:"",description:"",image:""}}:n,G=(n,o)=>{const s=!c.isEqual(c.omit(n,["seoData"]),c.omit(o,["seoData"])),q=!c.isEqual(P(o).seoData,P(n).seoData);return s||q},Y=({open:n,setOpen:o,pageData:s})=>{const q=h.useQueryClient(),{data:e}=h.useProject(),u=h.useUpdatePage(),m=h.useUpdateProject("Homepage updated successfully."),[i,b]=g.useState(P(s)),[a,A]=g.useState({isHomePage:(e==null?void 0:e.homepage)===s.uuid}),j=G(i,s);g.useEffect(()=>{const l=!c.isEqual(P(s),i),t=(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage;o(l||t?"PENDING":"OPEN")},[e,s,i,a,o]);const C=()=>{if(j){if(s.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")){n==="ALERT"&&o("PENDING");return}u.mutate(i,{onSuccess:()=>{q.invalidateQueries({refetchType:"active",queryKey:["pages",e==null?void 0:e.uuid]}),o("CLOSE"),w.toast.success("Page updated successfully.")}})}a.isHomePage&&(e==null?void 0:e.homepage)!==s.uuid&&m.mutate({...e,homepage:s==null?void 0:s.uuid},{onSuccess:()=>o("CLOSE")})},R=({formData:l},t)=>{b(f=>{var S,N;if(!t)return f;const x={[t]:l[t]};return t==="name"?x.slug=c.kebabCase((S=l[t])==null?void 0:S.replace(/\d/g,"")):t==="slug"?x.slug=(N=l[t])==null?void 0:N.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_"):t==="seoData"&&(x.seoData={title:l[t].title||"",description:l[t].description||"",image:l[t].image||""}),{...f,...x}})},I=({formData:l},t)=>{A(f=>{const x={[t]:l[t]};return{...f,...x}})},v={name:d.g({title:"Page Name",default:i.name}),slug:d.g({title:"Page Slug",default:i.slug})},T={seoData:d.h({title:"",description:"",default:{title:"",description:"",image:""},properties:{title:d.g({title:"Meta Title",default:i.name}),description:d.r({title:"Meta Description",default:i.slug}),image:d.v({title:"Social Media Image",default:""})}})},M={isHomePage:d.c({title:"Set as homepage",default:a.isHomePage})};return r.jsxRuntimeExports.jsxs(y.ScrollArea,{className:"flex h-full select-none flex-col",children:[r.jsxRuntimeExports.jsx(L,{open:n==="ALERT",title:"Do yo want to save changes?",onCancel:()=>o("CLOSE"),onConfirm:C,disabled:m.isPending||u.isPending}),r.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 px-2.5 py-1",children:r.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Page Details"})}),r.jsxRuntimeExports.jsx("div",{className:"px-2.5 pt-2",children:r.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[r.jsxRuntimeExports.jsx(p.Form,{title:"Basic Details",formData:i,properties:v,onChange:R,disabled:u.isPending||m.isPending}),r.jsxRuntimeExports.jsx("div",{className:"h-2 w-full"}),r.jsxRuntimeExports.jsx(p.Form,{title:"SEO Details",formData:i,properties:T,onChange:R,disabled:u.isPending||m.isPending}),(e==null?void 0:e.homepage)!==s.uuid&&s.type==="STATIC"?r.jsxRuntimeExports.jsx(p.Form,{formData:a,properties:M,onChange:I,disabled:u.isPending||m.isPending}):s.type==="STATIC"&&r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500",children:[r.jsxRuntimeExports.jsx(H.HomeIcon,{})," This is homepage"," "]}),i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")&&r.jsxRuntimeExports.jsxs("small",{className:"px-1 text-red-400",children:["Add dynamic ID in page slug Eg: ",r.jsxRuntimeExports.jsx("i",{className:"underline",children:"some-url/[some-id]"})]}),r.jsxRuntimeExports.jsxs("div",{className:"my-2 flex w-full items-center justify-between gap-x-2 px-1",children:[r.jsxRuntimeExports.jsx(y.Button,{className:"w-full",type:"submit",onClick:C,disabled:(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage?!1:c.isEmpty(i.name)||c.isEmpty(i.slug)||!j||u.isPending||m.isPending||i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||""),children:"Save"}),r.jsxRuntimeExports.jsx(z,{pageData:s,projectData:e})]})]})})]})};exports.default=Y;
|
|
@@ -2,11 +2,11 @@ import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import I, { useState as j, useEffect as z } from "react";
|
|
3
3
|
import { isString as L, isEmpty as x, isEqual as C, omit as y, kebabCase as B } from "lodash-es";
|
|
4
4
|
import { HomeIcon as G } from "@radix-ui/react-icons";
|
|
5
|
-
import {
|
|
5
|
+
import { ai as Y, B as q } from "./index-b33n_-zO.js";
|
|
6
6
|
import { g, h as Z, r as $, v as F, c as Q } from "./controls-yjgoZzB6.js";
|
|
7
7
|
import { toast as U } from "sonner";
|
|
8
|
-
import { F as h } from "./form-
|
|
9
|
-
import { f as V, a as X, g as _, b as K } from "./index-
|
|
8
|
+
import { F as h } from "./form-5ke_lZv8.js";
|
|
9
|
+
import { f as V, a as X, g as _, b as K } from "./index-fnkMn4Pk.js";
|
|
10
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
11
|
import "@radix-ui/react-toggle";
|
|
12
12
|
import "class-variance-authority";
|
|
@@ -43,7 +43,7 @@ import "tree-model";
|
|
|
43
43
|
import "react-i18next";
|
|
44
44
|
import "@rjsf/core";
|
|
45
45
|
import "@rjsf/validator-ajv8";
|
|
46
|
-
import "./index-
|
|
46
|
+
import "./index-wRAIA8zZ.js";
|
|
47
47
|
import "i18next";
|
|
48
48
|
import "react-arborist";
|
|
49
49
|
import "lucide-react";
|
|
@@ -54,7 +54,7 @@ import "react-hotkeys-hook";
|
|
|
54
54
|
import "./html-to-json-_01DXd-a.js";
|
|
55
55
|
import "himalaya";
|
|
56
56
|
import "lodash";
|
|
57
|
-
const O = I.lazy(() => import("./delete-page-modal-
|
|
57
|
+
const O = I.lazy(() => import("./delete-page-modal-55oioI9i.js")), J = I.lazy(() => import("./confirm-alert-P6TAevaP.js")), P = (r) => {
|
|
58
58
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
59
59
|
return !1;
|
|
60
60
|
const s = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
|
@@ -92,13 +92,13 @@ const O = I.lazy(() => import("./delete-page-modal-pzagU_6y.js")), J = I.lazy(()
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
d.isHomePage && (e == null ? void 0 : e.homepage) !== s.uuid && c.mutate({ ...e, homepage: s == null ? void 0 : s.uuid }, { onSuccess: () => m("CLOSE") });
|
|
95
|
-
},
|
|
95
|
+
}, E = ({ formData: l }, o) => {
|
|
96
96
|
T((p) => {
|
|
97
|
-
var
|
|
97
|
+
var b, A;
|
|
98
98
|
if (!o)
|
|
99
99
|
return p;
|
|
100
100
|
const a = { [o]: l[o] };
|
|
101
|
-
return o === "name" ? a.slug = B((
|
|
101
|
+
return o === "name" ? a.slug = B((b = l[o]) == null ? void 0 : b.replace(/\d/g, "")) : o === "slug" ? a.slug = (A = l[o]) == null ? void 0 : A.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_") : o === "seoData" && (a.seoData = {
|
|
102
102
|
title: l[o].title || "",
|
|
103
103
|
description: l[o].description || "",
|
|
104
104
|
image: l[o].image || ""
|
|
@@ -167,7 +167,7 @@ const O = I.lazy(() => import("./delete-page-modal-pzagU_6y.js")), J = I.lazy(()
|
|
|
167
167
|
title: "Basic Details",
|
|
168
168
|
formData: i,
|
|
169
169
|
properties: M,
|
|
170
|
-
onChange:
|
|
170
|
+
onChange: E,
|
|
171
171
|
disabled: n.isPending || c.isPending
|
|
172
172
|
}
|
|
173
173
|
),
|
|
@@ -178,7 +178,7 @@ const O = I.lazy(() => import("./delete-page-modal-pzagU_6y.js")), J = I.lazy(()
|
|
|
178
178
|
title: "SEO Details",
|
|
179
179
|
formData: i,
|
|
180
180
|
properties: w,
|
|
181
|
-
onChange:
|
|
181
|
+
onChange: E,
|
|
182
182
|
disabled: n.isPending || c.isPending
|
|
183
183
|
}
|
|
184
184
|
),
|
package/dist/studio.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-Z_BpKhVy.cjs");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-Z_BpKhVy.cjs");const e=require("./index-6w-6HYBd.cjs");require("react");require("sonner");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-audsIPBC.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("lodash-es");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("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");exports.ChaiBuilderStudio=e.ChaiBuilderStudio;
|
package/dist/studio.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { C as $ } from "./index-
|
|
2
|
+
import { C as $ } from "./index-fnkMn4Pk.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "sonner";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
-
import "./index-
|
|
6
|
+
import "./index-wRAIA8zZ.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-b33n_-zO.js";
|
|
13
13
|
import "@radix-ui/react-toggle";
|
|
14
14
|
import "class-variance-authority";
|
|
15
15
|
import "./utils-VpVqnC9m.js";
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a8 as Q, ab as $, a9 as j, aa as y, bl as E, bJ as U, A as W, ac as X, g as Y, b as Z, e as _, f as z, c as J, d as K, a as aa, bm as ea, bx as oa, B as ta, bg as ra, bj as sa, bi as na, bk as ia, bh as ba, bL as pa,
|
|
1
|
+
import { a8 as Q, ab as $, a9 as j, aa as y, bl as E, bJ as U, A as W, ac as X, g as Y, b as Z, e as _, f as z, c as J, d as K, a as aa, bm as ea, bx as oa, B as ta, bg as ra, bj as sa, bi as na, bk as ia, bh as ba, bL as pa, aQ as ua, ci as ma, aT as ca, aU as la, aR as da, aV as ga, aS as Ca, ck as Ma, cj as Sa, q as Da, cl as Ta, o as xa, cq as Aa, C as ha, cn as wa, cr as Ia, cv as Pa, cm as va, co as Ga, cp as La, cs as ka, ct as Ha, cu as Ra, r as Fa, a_ as Va, b0 as Ba, aY as fa, aZ as qa, aW as Na, aX as Oa, a$ as Qa, L as $a, Q as ja, N as ya, bd as Ea, a5 as Ua, O as Wa, cb as Xa, cf as Ya, ca as Za, P as _a, be as za, cc as Ja, cd as Ka, ce as ae, M as ee, H as oe, I as te, G as re, b4 as se, b5 as ne, bb as ie, b9 as be, b6 as pe, bN as ue, bU as me, bQ as ce, b_ as le, bR as de, bT as ge, bO as Ce, bX as Me, bV as Se, bW as De, bS as Te, c0 as xe, b$ as Ae, bY as he, bZ as we, bP as Ie, aN as Pe, aP as ve, aO as Ge, b3 as Le, ai as ke, bM as He, bs as Re, bv as Fe, bz as Ve, bw as Be, bA as fe, c1 as qe, bt as Ne, bu as Oe, bB as Qe, c2 as $e, c4 as je, c5 as ye, c9 as Ee, c7 as Ue, c6 as We, c8 as Xe, c3 as Ye, $ as Ze, b8 as _e, bo as ze, by as Je, bp as Ke, bq as ao, a6 as eo, am as oo, bG as to, T as ro, w as so, bc as no, ah as io, v as bo, bK as po, bI as uo, cg as mo, ch as co, bH as lo, a7 as go } from "./index-b33n_-zO.js";
|
|
2
2
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
@@ -63,9 +63,9 @@ export {
|
|
|
63
63
|
ba as CardHeader,
|
|
64
64
|
pa as CardTitle,
|
|
65
65
|
ua as Command,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
ma as CommandDialog,
|
|
67
|
+
ca as CommandEmpty,
|
|
68
|
+
la as CommandGroup,
|
|
69
69
|
da as CommandInput,
|
|
70
70
|
ga as CommandItem,
|
|
71
71
|
Ca as CommandList,
|
|
@@ -117,9 +117,9 @@ export {
|
|
|
117
117
|
be as Label,
|
|
118
118
|
pe as LinkField,
|
|
119
119
|
ue as Menubar,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
me as MenubarCheckboxItem,
|
|
121
|
+
ce as MenubarContent,
|
|
122
|
+
le as MenubarGroup,
|
|
123
123
|
de as MenubarItem,
|
|
124
124
|
ge as MenubarLabel,
|
|
125
125
|
Ce as MenubarMenu,
|
|
@@ -171,8 +171,8 @@ export {
|
|
|
171
171
|
bo as TooltipTrigger,
|
|
172
172
|
po as badgeVariants,
|
|
173
173
|
uo as buttonVariants,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
mo as reducer,
|
|
175
|
+
co as toast,
|
|
176
|
+
lo as toggleVariants,
|
|
177
177
|
go as useToast
|
|
178
178
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),t=require("lodash-es"),g=require("jotai"),q=require("react-i18next"),s=require("./index-aeDphKpP.cjs"),T=require("@radix-ui/react-icons"),R=require("@chaibuilder/runtime"),E=require("./MODIFIERS-mVmfEGgo.cjs"),N=require("./atoms-KQpaDRnF.cjs"),k=require("flagged"),y=require("./html-to-json-ndxaXRT8.cjs"),B=require("./Functions-N3yhPYKY.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.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("@react-hookz/web");require("tree-model");require("himalaya");require("lodash");const v=({block:r})=>{const[,i]=g.useAtom(N.draggedBlockAtom),{type:l,icon:d,label:c}=r,{addCoreBlock:x,addPredefinedBlock:m}=s.useAddBlock(),[n,p]=s.useSelectedBlockIds(),[,f]=s.useHighlightBlockId(),[,h]=g.useAtom(s.activePanelAtom),j=()=>{if(t.has(r,"blocks")){const o=t.isFunction(r.blocks)?r.blocks():r.blocks;m(R.syncBlocksWithDefaults(o),t.first(n))}else x(r,t.first(n));h(E.OUTLINE_KEY)},a=k.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:j,type:"button",onDragStart:o=>{o.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),o.dataTransfer.setDragImage(new Image,0,0),i(t.omit(r,["component","icon"])),setTimeout(()=>{p([]),f(null),h(E.OUTLINE_KEY)},200)},draggable:a?"true":"false",className:"cursor-pointer space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",children:[u.createElement(d||T.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:c||l})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:c||l})})]})})},C=()=>{const{t:r}=q.useTranslation(),[i,l]=u.useState(""),{addPredefinedBlock:d}=s.useAddBlock(),[c]=s.useSelectedBlockIds(),[,x]=g.useAtom(s.activePanelAtom),m=()=>{const n=y.getBlocksFromHTML(i);d([...n],t.first(c)||null),l(""),x(E.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:n=>n&&n.focus(),onChange:n=>l(n.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>m(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},A=({className:r})=>{const{t:i}=q.useTranslation(),[l,d]=u.useState("core"),[c,x]=u.useState("basic"),m=R.useChaiBlocks(),[,n]=g.useAtom(s.showPredefinedBlockCategoryAtom),p=s.useBuilderProp("importHTMLSupport",!0),f=s.useBuilderProp("filterChaiBlock",()=>!0),h=t.filter(m,f),j=t.groupBy(h,"category"),a=t.uniq(t.map(j.core,"group"));return u.useEffect(()=>{!t.includes(a,c)&&!t.isEmpty(a)&&!t.isEmpty(c)&&x(t.first(a))},[a,c]),e.jsxRuntimeExports.jsxs("div",{className:B.cn("flex h-full w-72 flex-col overflow-hidden",r),children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:i("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:i(l==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:o=>{n(""),d(o)},value:l,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(p?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:i("Blocks")}),p?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:i("import")}):null]})}),l==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:u.Children.toArray(t.map(a,o=>t.reject(t.filter(t.values(j.core),{group:o}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:o,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:o,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:o}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:u.Children.toArray(t.reject(t.filter(t.values(j.core),{group:o}),{hidden:!0}).map(b=>e.jsxRuntimeExports.jsx(v,{block:b})))})})]})}):null))})}),l==="html"&&p?e.jsxRuntimeExports.jsx(C,{}):null]})};exports.default=A;
|