@chaibuilder/sdk 1.1.13 → 1.1.15
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-AG_J7s2Z.cjs +1 -0
- package/dist/{AddBlocks-A7WofxHV.js → AddBlocks-FsdsASNp.js} +51 -51
- package/dist/BrandingOptions-TRVyCvVq.cjs +1 -0
- package/dist/{BrandingOptions-wkFrLFI_.js → BrandingOptions-zFJ28xmJ.js} +23 -23
- package/dist/{CanvasArea-chEYQhH8.js → CanvasArea-IiD0f6Eq.js} +7 -7
- package/dist/{CanvasArea-kF46NWZK.cjs → CanvasArea-Kbw-TjPH.cjs} +7 -7
- package/dist/CurrentPage-lOQd17GA.cjs +1 -0
- package/dist/{CurrentPage-Wd7F9Egg.js → CurrentPage-n2RQMBpJ.js} +10 -10
- package/dist/{Layers-qMOMP2Mi.js → Layers-38kbAjTI.js} +81 -81
- package/dist/Layers-D2WY0CpR.cjs +1 -0
- package/dist/MarkAsGlobalBlock-LXDkmFUr.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-Czq45Amf.js → MarkAsGlobalBlock-xOHhiMDl.js} +3 -3
- package/dist/PagesPanel-RWnIpNqP.cjs +1 -0
- package/dist/{PagesPanel-ay4uk4mg.js → PagesPanel-bNqfHuCk.js} +6 -6
- package/dist/{ProjectPanel-eLlbfAtj.js → ProjectPanel-1Kgm2-R5.js} +10 -10
- package/dist/ProjectPanel-cXKiyEXm.cjs +1 -0
- package/dist/Settings-5AI0CInt.cjs +1 -0
- package/dist/{Settings-lpoxaMDu.js → Settings-ou3Owu0B.js} +454 -454
- package/dist/SidePanels-NV3UX8kK.cjs +1 -0
- package/dist/{SidePanels-iRXV69vh.js → SidePanels-muLqfBql.js} +36 -36
- package/dist/{Topbar-dQYhW4iv.js → Topbar-_-1HX-EE.js} +3 -3
- package/dist/Topbar-gQxbcPtG.cjs +1 -0
- package/dist/UnsplashImages-PNp5fYCc.cjs +1 -0
- package/dist/{UnsplashImages-AL1ASAoD.js → UnsplashImages-mqK09h8E.js} +6 -6
- package/dist/UploadImages-BoSSsLtD.cjs +1 -0
- package/dist/{UploadImages-09wuhk2O.js → UploadImages-IDkkRuhx.js} +3 -3
- package/dist/{add-page-modal-TXREEFPZ.js → add-page-modal-AJorVipD.js} +16 -16
- package/dist/add-page-modal-zOdAgfvh.cjs +1 -0
- package/dist/confirm-alert-dHRDZrA1.cjs +1 -0
- package/dist/{confirm-alert-GkfW9chS.js → confirm-alert-ea5xpncD.js} +3 -3
- package/dist/controls-QnyBNkXG.cjs +36 -0
- package/dist/controls-kEuiMMDf.js +4600 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +5 -15
- package/dist/core.js +5 -5
- package/dist/{delete-page-modal-LNME2FwD.js → delete-page-modal-0VAs4Heb.js} +5 -5
- package/dist/delete-page-modal-KRBGE4Fo.cjs +1 -0
- package/dist/form-6qGAOYI3.cjs +1 -0
- package/dist/{form-Fk4CaX1A.js → form-irY39wvJ.js} +29 -29
- package/dist/functions-86L6n983.js +23 -0
- package/dist/functions-Jr7gX_RX.cjs +1 -0
- package/dist/{html-to-json-kGgp07Hv.js → html-to-json-Y5M0N8PH.js} +33 -33
- package/dist/html-to-json-aAZkA0f5.cjs +1 -0
- package/dist/{index-89A3jPHh.js → index-0OqmBgqo.js} +3 -3
- package/dist/{index-Q5q5Y_8a.js → index-4fMl4eN2.js} +6 -6
- package/dist/index-d55M5MRz.cjs +1 -0
- package/dist/{index-61c5wSJn.cjs → index-veRjBw4J.cjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +27 -27
- package/dist/lodash-2us0VT8I.cjs +36 -0
- package/dist/lodash-3gkdNK5u.js +4538 -0
- package/dist/page-viewer-LvBMrQas.cjs +1 -0
- package/dist/{page-viewer-LPx-OTCC.js → page-viewer-QuVbTBKO.js} +6 -6
- package/dist/{project-general-setting-sSpFUD_Y.js → project-general-setting-6Nsq4-2Z.js} +9 -9
- package/dist/project-general-setting-pSrUGR7K.cjs +1 -0
- package/dist/{project-seo-setting-CGVegBtM.js → project-seo-setting-EhqUcTKy.js} +9 -9
- package/dist/project-seo-setting-N0OnBCvh.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +46 -46
- package/dist/server.cjs +1 -1
- package/dist/server.js +11 -11
- package/dist/single-page-detail-JWCEEBaZ.cjs +1 -0
- package/dist/{single-page-detail-32H1_IG4.js → single-page-detail-SAqjZ5E1.js} +53 -53
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +5 -5
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +3 -3
- package/dist/useAddBlockByDrop-5QW86HjG.js +20 -0
- package/dist/useAddBlockByDrop-Ckzuvu-s.cjs +1 -0
- package/dist/utils-37UXq2O5.cjs +1 -0
- package/dist/{utils-zWMk4dB2.js → utils-XsPKXMVo.js} +5 -5
- package/package.json +3 -3
- package/dist/AddBlocks-Yuc4t0Z_.cjs +0 -1
- package/dist/BrandingOptions-KkPF1OGn.cjs +0 -1
- package/dist/CurrentPage-p9MaXTOB.cjs +0 -1
- package/dist/Layers-wQ0Fv9Xc.cjs +0 -1
- package/dist/MarkAsGlobalBlock-sb3hMXLq.cjs +0 -1
- package/dist/PagesPanel--maZxwX5.cjs +0 -1
- package/dist/ProjectPanel-KhIpO7m3.cjs +0 -1
- package/dist/Settings-n2DpS5Ta.cjs +0 -1
- package/dist/SidePanels-Dud5Xh9L.cjs +0 -1
- package/dist/Topbar-vqzjB75a.cjs +0 -1
- package/dist/UnsplashImages-3Sh4UZ-7.cjs +0 -1
- package/dist/UploadImages-mPzLhMiH.cjs +0 -1
- package/dist/add-page-modal-FPnIWwqA.cjs +0 -1
- package/dist/confirm-alert-YNyc3WEo.cjs +0 -1
- package/dist/controls-G0puEH71.js +0 -120
- package/dist/controls-aHZq-q4b.cjs +0 -1
- package/dist/delete-page-modal-sTbqZPvk.cjs +0 -1
- package/dist/form-OhgCJlVA.cjs +0 -1
- package/dist/functions-ZWGlwlQY.cjs +0 -1
- package/dist/functions-slns6ONz.js +0 -23
- package/dist/html-to-json-po8on2ju.cjs +0 -1
- package/dist/index-GNmGzavZ.cjs +0 -1
- package/dist/page-viewer-wQO9oV9h.cjs +0 -1
- package/dist/project-general-setting-8EwuN5lN.cjs +0 -1
- package/dist/project-seo-setting-R77SKM1I.cjs +0 -1
- package/dist/single-page-detail-nyBEHLtT.cjs +0 -1
- package/dist/useAddBlockByDrop-4VH-SMj7.cjs +0 -1
- package/dist/useAddBlockByDrop-_kyR0iI4.js +0 -20
- package/dist/utils-tx6hqsHY.cjs +0 -1
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-veRjBw4J.cjs"),e=require("./index-d55M5MRz.cjs"),u=require("react-i18next");require("i18next");require("./jsx-runtime-WUGKV8jN.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("react-textarea-autosize");require("jotai");require("flagged");require("react-dnd");require("./lodash-2us0VT8I.cjs");require("@minoru/react-dnd-treeview");require("./utils-37UXq2O5.cjs");require("tailwind-merge");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-icons");require("sonner");require("./html-to-json-aAZkA0f5.cjs");require("himalaya");require("lucide-react");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("react-quill");require("flat-to-nested");require("redux-undo");require("@react-hookz/web");exports.ChaiBuilderEditor=s.ChaiBuilderEditor;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useBuildingBlocks=e.useBuildingBlocks;exports.useCanvasHistory=e.useCanvasHistory;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDeveloperPreviewMode=e.useDeveloperPreviewMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useFeatureSupport=e.useFeatureSupport;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useMarkAsGlobalBlock=e.useMarkAsGlobalBlock;exports.useMoveBlocks=e.useMoveBlocks;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useProject=e.useProject;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useSetAllBlocks=e.useSetAllBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useTranslations=e.useTranslations;exports.useTreeData=e.useTreeData;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>u.useTranslation});
|
package/dist/core.d.ts
CHANGED
|
@@ -160,17 +160,7 @@ export declare const useAllBlocks: () => ChaiBlock[];
|
|
|
160
160
|
/**
|
|
161
161
|
* Wrapper around useAtom
|
|
162
162
|
*/
|
|
163
|
-
export declare const useBrandingOptions: () => readonly [
|
|
164
|
-
bodyFont: string;
|
|
165
|
-
headingFont: string;
|
|
166
|
-
roundedCorners: number;
|
|
167
|
-
primaryColor: string;
|
|
168
|
-
secondaryColor: string;
|
|
169
|
-
bodyBgDarkColor: string;
|
|
170
|
-
bodyBgLightColor: string;
|
|
171
|
-
bodyTextDarkColor: string;
|
|
172
|
-
bodyTextLightColor: string;
|
|
173
|
-
}, (...args: unknown[]) => unknown];
|
|
163
|
+
export declare const useBrandingOptions: () => readonly [any, (args_0: any) => void];
|
|
174
164
|
|
|
175
165
|
export declare const useBuilderProp: (propKey: string, defaultValue?: any) => any;
|
|
176
166
|
|
|
@@ -216,12 +206,12 @@ export declare const useDeveloperPreviewMode: () => [boolean, Function];
|
|
|
216
206
|
*/
|
|
217
207
|
export declare const useDuplicateBlocks: () => Function;
|
|
218
208
|
|
|
219
|
-
export declare const useFeatureSupport: (feature: string, defaultValue: boolean) =>
|
|
209
|
+
export declare const useFeatureSupport: (feature: string, defaultValue: boolean) => any;
|
|
220
210
|
|
|
221
211
|
export declare const useGetPageData: () => () => {
|
|
222
212
|
currentPage: unknown;
|
|
223
|
-
blocks:
|
|
224
|
-
globalBlocks:
|
|
213
|
+
blocks: any;
|
|
214
|
+
globalBlocks: any;
|
|
225
215
|
};
|
|
226
216
|
|
|
227
217
|
export declare const useHiddenBlockIds: () => (string[] | ((args_0: string[] | ((prev: string[]) => string[])) => void) | ((blockId: string) => void))[];
|
|
@@ -269,7 +259,7 @@ export declare const useSavePage: () => {
|
|
|
269
259
|
*/
|
|
270
260
|
export declare const useSelectedBlock: () => string | {
|
|
271
261
|
type: string;
|
|
272
|
-
id: any
|
|
262
|
+
id: any;
|
|
273
263
|
};
|
|
274
264
|
|
|
275
265
|
export declare const useSelectedBlockAllClasses: () => Array<ClassDerivedObject>;
|
package/dist/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as $ } from "./index-
|
|
2
|
-
import { N as z, af as J, O as K, ah as ss, P as es, ae as as, x as os, i as ts, y as rs, Q as is, p as ps, R as ls, U as us, k as ms, V as cs, n as ds, W as Bs, X as ks, m as ns, L as Ss, Y as Cs, Z as Ps, _ as vs, $ as gs, a0 as ys, o as As, h as Ms, a1 as hs, M as Ds, l as Is, a3 as Rs, ag as fs, a6 as xs, a5 as Ts, a4 as Us, j as bs, ad as js, ai as ws, aj as Hs, w as Os, a7 as Fs, a9 as Gs, a2 as Ls, aa as Ws, a8 as Zs, ab as Es, ac as Ns } from "./index-
|
|
1
|
+
import { k as $ } from "./index-4fMl4eN2.js";
|
|
2
|
+
import { N as z, af as J, O as K, ah as ss, P as es, ae as as, x as os, i as ts, y as rs, Q as is, p as ps, R as ls, U as us, k as ms, V as cs, n as ds, W as Bs, X as ks, m as ns, L as Ss, Y as Cs, Z as Ps, _ as vs, $ as gs, a0 as ys, o as As, h as Ms, a1 as hs, M as Ds, l as Is, a3 as Rs, ag as fs, a6 as xs, a5 as Ts, a4 as Us, j as bs, ad as js, ai as ws, aj as Hs, w as Os, a7 as Fs, a9 as Gs, a2 as Ls, aa as Ws, a8 as Zs, ab as Es, ac as Ns } from "./index-0OqmBgqo.js";
|
|
3
3
|
import { useTranslation as Vs } from "react-i18next";
|
|
4
4
|
import "i18next";
|
|
5
5
|
import "./jsx-runtime-NV737rRe.js";
|
|
@@ -13,15 +13,15 @@ import "react-textarea-autosize";
|
|
|
13
13
|
import "jotai";
|
|
14
14
|
import "flagged";
|
|
15
15
|
import "react-dnd";
|
|
16
|
-
import "lodash";
|
|
16
|
+
import "./lodash-3gkdNK5u.js";
|
|
17
17
|
import "@minoru/react-dnd-treeview";
|
|
18
|
-
import "./utils-
|
|
18
|
+
import "./utils-XsPKXMVo.js";
|
|
19
19
|
import "tailwind-merge";
|
|
20
20
|
import "react-hotkeys-hook";
|
|
21
21
|
import "@chaibuilder/runtime";
|
|
22
22
|
import "@radix-ui/react-icons";
|
|
23
23
|
import "sonner";
|
|
24
|
-
import "./html-to-json-
|
|
24
|
+
import "./html-to-json-Y5M0N8PH.js";
|
|
25
25
|
import "himalaya";
|
|
26
26
|
import "lucide-react";
|
|
27
27
|
import "@radix-ui/react-toggle";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { D as p, E as l, F as n, H as d, I as a, K as c, B as u } from "./index-
|
|
3
|
-
import { j as x } from "./index-
|
|
2
|
+
import { D as p, E as l, F as n, H as d, I as a, K as c, B as u } from "./index-0OqmBgqo.js";
|
|
3
|
+
import { j as x } from "./index-4fMl4eN2.js";
|
|
4
4
|
import { TrashIcon as h } from "@radix-ui/react-icons";
|
|
5
5
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
9
|
-
import "./utils-
|
|
10
|
-
import "lodash";
|
|
9
|
+
import "./utils-XsPKXMVo.js";
|
|
10
|
+
import "./lodash-3gkdNK5u.js";
|
|
11
11
|
import "clsx";
|
|
12
12
|
import "tailwind-merge";
|
|
13
13
|
import "@radix-ui/react-switch";
|
|
@@ -45,7 +45,7 @@ import "react-dnd";
|
|
|
45
45
|
import "@minoru/react-dnd-treeview";
|
|
46
46
|
import "react-hotkeys-hook";
|
|
47
47
|
import "sonner";
|
|
48
|
-
import "./html-to-json-
|
|
48
|
+
import "./html-to-json-Y5M0N8PH.js";
|
|
49
49
|
import "himalaya";
|
|
50
50
|
import "lucide-react";
|
|
51
51
|
const ce = ({ pageData: r, projectData: i }) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("./index-d55M5MRz.cjs"),l=require("./index-veRjBw4J.cjs"),q=require("@radix-ui/react-icons");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-37UXq2O5.cjs");require("./lodash-2us0VT8I.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-aAZkA0f5.cjs");require("himalaya");require("lucide-react");const d=({pageData:i,projectData:t})=>{const n={},u=l.useDeletePage(),s=i.uuid===t.homepage,o=()=>{u.mutate(i,{onSuccess:()=>{n({uuid:t.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:s,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${s?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(q.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(r.Button,{variant:"destructive",onClick:o,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("./jsx-runtime-WUGKV8jN.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("./lodash-2us0VT8I.cjs"),f=require("./index-d55M5MRz.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.head(a.split("."));s&&j&&u({...t},j)};return d.jsxRuntimeExports.jsxs(d.jsxRuntimeExports.Fragment,{children:[c&&d.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),d.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:d.jsxRuntimeExports.jsx(y,{widgets:{richtext:f.RichTextEditorField,icon:f.IconPickerField,image:f.ImagePickerField},fields:{link:f.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { j as u } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import b from "@rjsf/core";
|
|
3
3
|
import x from "@rjsf/validator-ajv8";
|
|
4
|
-
import {
|
|
5
|
-
import { bd as P, be as E, bf as O, bg as S } from "./index-
|
|
4
|
+
import { c as h, g as m, s as $, h as F } from "./lodash-3gkdNK5u.js";
|
|
5
|
+
import { bd as P, be as E, bf as O, bg as S } from "./index-0OqmBgqo.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|
|
9
9
|
return i.uiSchema;
|
|
10
10
|
case "model":
|
|
11
|
-
const { properties:
|
|
12
|
-
return Object.keys(
|
|
13
|
-
const e =
|
|
11
|
+
const { properties: p } = i, a = {};
|
|
12
|
+
return Object.keys(p).forEach((r) => {
|
|
13
|
+
const e = p[r];
|
|
14
14
|
if (h(["slot", "styles"], e.type))
|
|
15
15
|
return;
|
|
16
|
-
const o =
|
|
17
|
-
|
|
18
|
-
}),
|
|
16
|
+
const o = m(e, "i18n", !1) ? `${r}-${l}` : r;
|
|
17
|
+
a[o] = d(e, l);
|
|
18
|
+
}), a;
|
|
19
19
|
case "list":
|
|
20
|
-
const { itemProperties: n } = i,
|
|
20
|
+
const { itemProperties: n } = i, c = {
|
|
21
21
|
items: {}
|
|
22
22
|
};
|
|
23
23
|
return Object.keys(n).forEach((r) => {
|
|
24
24
|
const e = n[r];
|
|
25
25
|
if (h(["slot", "styles"], e.type))
|
|
26
26
|
return;
|
|
27
|
-
const o =
|
|
28
|
-
|
|
29
|
-
}),
|
|
27
|
+
const o = m(e, "i18n", !1) ? `${r}-${l}` : r;
|
|
28
|
+
c.items[o] = d(e, l);
|
|
29
|
+
}), c;
|
|
30
30
|
default:
|
|
31
31
|
return {};
|
|
32
32
|
}
|
|
@@ -35,20 +35,20 @@ const d = (i, l = "") => {
|
|
|
35
35
|
case "singular":
|
|
36
36
|
return i.schema;
|
|
37
37
|
case "model":
|
|
38
|
-
const { properties:
|
|
39
|
-
title:
|
|
38
|
+
const { properties: p, title: a } = i, n = {
|
|
39
|
+
title: a,
|
|
40
40
|
type: "object",
|
|
41
41
|
properties: {}
|
|
42
42
|
};
|
|
43
|
-
return Object.keys(
|
|
44
|
-
const t =
|
|
43
|
+
return Object.keys(p).forEach((o) => {
|
|
44
|
+
const t = p[o];
|
|
45
45
|
if (h(["slot", "styles"], t.type))
|
|
46
46
|
return;
|
|
47
|
-
const s =
|
|
47
|
+
const s = m(t, "i18n", !1) ? `${o}-${l}` : o;
|
|
48
48
|
n.properties[s] = y(t, l);
|
|
49
49
|
}), n;
|
|
50
50
|
case "list":
|
|
51
|
-
const { itemProperties:
|
|
51
|
+
const { itemProperties: c, title: r } = i, e = {
|
|
52
52
|
title: r,
|
|
53
53
|
type: "array",
|
|
54
54
|
items: {
|
|
@@ -56,12 +56,12 @@ const d = (i, l = "") => {
|
|
|
56
56
|
properties: {}
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
return Object.keys(
|
|
60
|
-
const t =
|
|
59
|
+
return Object.keys(c).forEach((o) => {
|
|
60
|
+
const t = c[o];
|
|
61
61
|
if (h(["slot", "styles"], t.type))
|
|
62
62
|
return;
|
|
63
|
-
const s =
|
|
64
|
-
e.items.properties[s] = y(t, l), $(e.items, "title",
|
|
63
|
+
const s = m(t, "i18n", !1) ? `${o}-${l}` : o;
|
|
64
|
+
e.items.properties[s] = y(t, l), $(e.items, "title", m(t, "itemTitle", `${r} item`));
|
|
65
65
|
}), e;
|
|
66
66
|
default:
|
|
67
67
|
return {};
|
|
@@ -69,10 +69,10 @@ const d = (i, l = "") => {
|
|
|
69
69
|
}, C = ({
|
|
70
70
|
title: i,
|
|
71
71
|
properties: l = {},
|
|
72
|
-
formData:
|
|
73
|
-
onChange:
|
|
72
|
+
formData: p,
|
|
73
|
+
onChange: a,
|
|
74
74
|
disabled: n = !1,
|
|
75
|
-
activeLang:
|
|
75
|
+
activeLang: c = ""
|
|
76
76
|
}) => {
|
|
77
77
|
const r = {
|
|
78
78
|
type: "object",
|
|
@@ -82,15 +82,15 @@ const d = (i, l = "") => {
|
|
|
82
82
|
const s = l[t];
|
|
83
83
|
if (h(["slot", "styles"], s.type))
|
|
84
84
|
return;
|
|
85
|
-
const f =
|
|
86
|
-
r.properties[f] = y(s,
|
|
85
|
+
const f = m(s, "i18n", !1) ? `${t}-${c}` : t;
|
|
86
|
+
r.properties[f] = y(s, c), e[f] = d(s, c);
|
|
87
87
|
});
|
|
88
88
|
const o = ({ ...t }, s) => {
|
|
89
89
|
const f = s == null ? void 0 : s.replace("root.", "").split("/").pop();
|
|
90
90
|
if (!s || !f)
|
|
91
91
|
return;
|
|
92
92
|
const j = F(f.split("."));
|
|
93
|
-
s && j &&
|
|
93
|
+
s && j && a({ ...t }, j);
|
|
94
94
|
};
|
|
95
95
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
96
96
|
i && /* @__PURE__ */ u.jsx("h1", { className: "px-1 text-sm font-semibold underline", children: i }),
|
|
@@ -112,7 +112,7 @@ const d = (i, l = "") => {
|
|
|
112
112
|
liveValidate: !0,
|
|
113
113
|
uiSchema: e,
|
|
114
114
|
schema: r,
|
|
115
|
-
formData:
|
|
115
|
+
formData: p,
|
|
116
116
|
validator: x,
|
|
117
117
|
onChange: o,
|
|
118
118
|
disabled: n
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { g as r, c, l as d } from "./lodash-3gkdNK5u.js";
|
|
2
|
+
import { a as g } from "./MODIFIERS-MLfpKQY1.js";
|
|
3
|
+
const C = (t, s = "c-") => {
|
|
4
|
+
const n = r(t, "bodyTextLightColor", "#64748b"), l = r(t, "bodyTextDarkColor", "#94a3b8"), e = r(t, "bodyBgLightColor", "#FFFFFF"), $ = r(t, "bodyBgDarkColor", "#0f172a");
|
|
5
|
+
return `${s}font-body ${s}antialiased ${s}text-[${n}] ${s}bg-[${e}] dark:${s}text-[${l}] dark:${s}bg-[${$}]`;
|
|
6
|
+
}, h = (t, s = "c-") => {
|
|
7
|
+
const l = t.replace(g, "").split(",").map((e) => e.split(" ").map((a) => {
|
|
8
|
+
if (a === "")
|
|
9
|
+
return "";
|
|
10
|
+
if (c(a, "hs-") || c(a, "[--") || c(a, "paddle"))
|
|
11
|
+
return a;
|
|
12
|
+
if (a.includes(":")) {
|
|
13
|
+
const o = a.split(":");
|
|
14
|
+
return o[o.length - 1] = s + d(o), o.join(":");
|
|
15
|
+
}
|
|
16
|
+
return `${s}${a}`;
|
|
17
|
+
}).join(" "));
|
|
18
|
+
return `${g}${l.join(" , ")}`;
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
h as a,
|
|
22
|
+
C as g
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./lodash-2us0VT8I.cjs"),d=require("./MODIFIERS-WFzDQfiT.cjs"),g=(a,s="c-")=>{const n=e.get(a,"bodyTextLightColor","#64748b"),o=e.get(a,"bodyTextDarkColor","#94a3b8"),l=e.get(a,"bodyBgLightColor","#FFFFFF"),c=e.get(a,"bodyBgDarkColor","#0f172a");return`${s}font-body ${s}antialiased ${s}text-[${n}] ${s}bg-[${l}] dark:${s}text-[${o}] dark:${s}bg-[${c}]`},u=(a,s="c-")=>{const o=a.replace(d.STYLES_KEY,"").split(",").map(l=>l.split(" ").map(t=>{if(t==="")return"";if(e.includes(t,"hs-")||e.includes(t,"[--")||e.includes(t,"paddle"))return t;if(t.includes(":")){const r=t.split(":");return r[r.length-1]=s+e.last(r),r.join(":")}return`${s}${t}`}).join(" "));return`${d.STYLES_KEY}${o.join(" , ")}`};exports.addPrefixToClasses=u;exports.getBrandingClasses=g;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { stringify as h, parse as k } from "himalaya";
|
|
2
|
-
import { g as x, d as L } from "./utils-
|
|
3
|
-
import {
|
|
2
|
+
import { g as x, d as L } from "./utils-XsPKXMVo.js";
|
|
3
|
+
import { c as y, g as c, a as g, f as $, j as o, s as u, u as w, D as C, b as S, o as B, n as I } from "./lodash-3gkdNK5u.js";
|
|
4
4
|
import { a as p } from "./MODIFIERS-MLfpKQY1.js";
|
|
5
5
|
const A = {
|
|
6
6
|
img: { alt: "alt", width: "width", height: "height", src: "image" },
|
|
@@ -36,24 +36,24 @@ const A = {
|
|
|
36
36
|
name: "fieldName"
|
|
37
37
|
}
|
|
38
38
|
}, H = (t, e) => t.children.length === 1 && y(["Heading", "Paragraph", "Span", "ListItem", "Button", "Label", "TableCell", "Link"], e._type), _ = (t) => t.map((e) => e.type === "text" ? c(e, "content", "") : g(e.children) ? "" : _(e.children)).join(""), m = (t) => t === null ? !0 : t, f = (t) => {
|
|
39
|
-
const e = {},
|
|
40
|
-
return $(
|
|
41
|
-
if (
|
|
39
|
+
const e = {}, a = A[t.tagName] || {}, r = t.attributes;
|
|
40
|
+
return $(r, ({ key: i, value: l }) => {
|
|
41
|
+
if (a[i]) {
|
|
42
42
|
if (t.tagName === "img" && i === "src" && !l.startsWith("http")) {
|
|
43
43
|
const s = o(t.attributes, { key: "width" }), n = o(t.attributes, { key: "height" });
|
|
44
44
|
s && n ? l = `https://via.placeholder.com/${s == null ? void 0 : s.value}x${n == null ? void 0 : n.value}` : l = "https://via.placeholder.com/150x150";
|
|
45
45
|
}
|
|
46
|
-
u(e,
|
|
46
|
+
u(e, a[i], m(l));
|
|
47
47
|
} else
|
|
48
48
|
y(["style", "class", "srcset"], i) || u(e, `styles_attrs.${i}`, m(l));
|
|
49
49
|
}), delete e.class, e;
|
|
50
50
|
}, q = (t, e = "styles") => {
|
|
51
51
|
if (!t.attributes)
|
|
52
52
|
return { [e]: `${p},` };
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
return { [e]: `${p},${
|
|
53
|
+
const a = o(t.attributes, { key: "class" });
|
|
54
|
+
if (a) {
|
|
55
|
+
const r = a.value;
|
|
56
|
+
return { [e]: `${p},${r}` };
|
|
57
57
|
}
|
|
58
58
|
return { [e]: `${p},` };
|
|
59
59
|
}, E = (t) => {
|
|
@@ -136,35 +136,35 @@ const A = {
|
|
|
136
136
|
name: t.tagName === "div" ? "Box" : w(t.tagName)
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
}, b = (t, e = null) => C(t, (
|
|
139
|
+
}, b = (t, e = null) => C(t, (a) => {
|
|
140
140
|
var l;
|
|
141
|
-
if (
|
|
141
|
+
if (a.type === "comment")
|
|
142
142
|
return [];
|
|
143
|
-
let
|
|
144
|
-
if (e && (
|
|
145
|
-
return g(c(
|
|
146
|
-
if (
|
|
147
|
-
...
|
|
148
|
-
...E(
|
|
149
|
-
...f(
|
|
150
|
-
...q(
|
|
151
|
-
},
|
|
152
|
-
const s =
|
|
153
|
-
s === "checkbox" ? u(
|
|
143
|
+
let r = { _id: x() };
|
|
144
|
+
if (e && (r._parent = e.block._id), a.type === "text")
|
|
145
|
+
return g(c(a, "content", "")) ? [] : e && H(e.node, e.block) ? (u(e, "block.content", c(a, "content", "")), []) : { ...r, _type: "Text", content: c(a, "content", "") };
|
|
146
|
+
if (r = {
|
|
147
|
+
...r,
|
|
148
|
+
...E(a),
|
|
149
|
+
...f(a),
|
|
150
|
+
...q(a)
|
|
151
|
+
}, r._type === "Input") {
|
|
152
|
+
const s = r.inputType || "text";
|
|
153
|
+
s === "checkbox" ? u(r, "_type", "Checkbox") : s === "radio" && u(r, "_type", "Radio");
|
|
154
154
|
} else {
|
|
155
|
-
if (
|
|
156
|
-
return
|
|
157
|
-
if (
|
|
158
|
-
const s = o(
|
|
159
|
-
return
|
|
160
|
-
} else if (
|
|
155
|
+
if (a.tagName === "video")
|
|
156
|
+
return r.content = h([a]), [r];
|
|
157
|
+
if (a.tagName === "svg") {
|
|
158
|
+
const s = o(a.attributes, { key: "height" }), n = o(a.attributes, { key: "width" }), d = c(s, "value") ? `[${c(s, "value")}px]` : "full", T = c(n, "value") ? `[${c(n, "value")}px]` : "full", v = c(o(a.attributes, { key: "class" }), "value");
|
|
159
|
+
return r.styles = `${p}, ${L(`w-${T} h-${d}`, v)}`.trim(), a.attributes = S(a.attributes, (N) => !y(["style", "width", "height", "class"], N.key)), r.icon = h([a]), u(r, "styles_attrs", B(c(r, "styles_attrs") || {}, ["height", "width", "style", "class"])), [r];
|
|
160
|
+
} else if (a.tagName == "option" && e && ((l = e.block) == null ? void 0 : l._type) === "Select")
|
|
161
161
|
return e.block.options.push({
|
|
162
|
-
label: _(
|
|
163
|
-
...f(
|
|
162
|
+
label: _(a.children),
|
|
163
|
+
...f(a)
|
|
164
164
|
}), [];
|
|
165
165
|
}
|
|
166
|
-
const i = b(
|
|
167
|
-
return [
|
|
166
|
+
const i = b(a.children, { block: r, node: a });
|
|
167
|
+
return [r, ...i];
|
|
168
168
|
}), M = (t) => {
|
|
169
169
|
const e = t.match(/<body[^>]*>[\s\S]*?<\/body>/);
|
|
170
170
|
return (e && e.length > 0 ? e[0].replace(/<body/, "<div").replace(/<\/body>/, "</div>") : t).replace(/\s+/g, " ").replaceAll("> <", "><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").trim();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("himalaya"),p=require("./utils-37UXq2O5.cjs"),e=require("./lodash-2us0VT8I.cjs"),u=require("./MODIFIERS-WFzDQfiT.cjs"),T={img:{alt:"alt",width:"width",height:"height",src:"image"},video:{src:"url",autoplay:"controls.autoPlay",muted:"controls.muted",loop:"controls.loop",controls:"controls.widgets"},a:{href:"link.href",target:"link.target",type:""},input:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},textarea:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},select:{placeholder:"placeholder",required:"required",multiple:"multiple",name:"fieldName"}},v=(t,r)=>t.children.length===1&&e.includes(["Heading","Paragraph","Span","ListItem","Button","Label","TableCell","Link"],r._type),h=t=>t.map(r=>r.type==="text"?e.get(r,"content",""):e.isEmpty(r.children)?"":h(r.children)).join(""),g=t=>t===null?!0:t,y=t=>{const r={},s=T[t.tagName]||{},a=t.attributes;return e.forEach(a,({key:l,value:c})=>{if(s[l]){if(t.tagName==="img"&&l==="src"&&!c.startsWith("http")){const i=e.find(t.attributes,{key:"width"}),n=e.find(t.attributes,{key:"height"});i&&n?c=`https://via.placeholder.com/${i==null?void 0:i.value}x${n==null?void 0:n.value}`:c="https://via.placeholder.com/150x150"}e.set(r,s[l],g(c))}else e.includes(["style","class","srcset"],l)||e.set(r,`styles_attrs.${l}`,g(c))}),delete r.class,r},k=(t,r="styles")=>{if(!t.attributes)return{[r]:`${u.STYLES_KEY},`};const s=e.find(t.attributes,{key:"class"});if(s){const a=s.value;return{[r]:`${u.STYLES_KEY},${a}`}}return{[r]:`${u.STYLES_KEY},`}},N=t=>{switch(t.tagName){case"img":return{_type:"Image"};case"input":return{_type:"Input",showLabel:!1};case"hr":return{_type:"Divider"};case"br":return{_type:"LineBreak"};case"textarea":return{_type:"TextArea",showLabel:!1};case"audio":return{_type:"Audio"};case"iframe":return{_type:"Iframe"};case"canvas":return{_type:"Canvas"};case"video":return{_type:"CustomHTML"};case"svg":return{_type:"Icon"};case"select":return{_type:"Select",options:[]};case"option":return{_type:"Option"};case"ul":case"ol":case"dl":return{_type:"List",tag:t.tagName,_listType:t.tagName==="ol"?"list-decimal":"list-none"};case"li":case"dt":return{_type:"ListItem",tag:t.tagName};case"span":case"figcaption":case"legend":return{_type:"Span",tag:t.tagName};case"p":return{_type:"Paragraph",content:""};case"a":return{_type:"Link"};case"form":return{_type:"Form"};case"label":return{_type:"Label"};case"button":return{_type:"Button"};case"code":return{_type:"Code"};case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return{_type:"Heading",tag:t.tagName};case"table":return{_type:"Table"};case"tr":return{_type:"TableRow"};case"td":case"th":return{_type:"TableCell",tag:t.tagName};case"thead":return{_type:"TableHead"};case"tbody":return{_type:"TableBody"};case"tfoot":return{_type:"TableFooter"};default:return{_type:"Box",tag:t.tagName,name:t.tagName==="div"?"Box":e.capitalize(t.tagName)}}},m=(t,r=null)=>e.flatMapDeep(t,s=>{var c;if(s.type==="comment")return[];let a={_id:p.generateUUID()};if(r&&(a._parent=r.block._id),s.type==="text")return e.isEmpty(e.get(s,"content",""))?[]:r&&v(r.node,r.block)?(e.set(r,"block.content",e.get(s,"content","")),[]):{...a,_type:"Text",content:e.get(s,"content","")};if(a={...a,...N(s),...y(s),...k(s)},a._type==="Input"){const i=a.inputType||"text";i==="checkbox"?e.set(a,"_type","Checkbox"):i==="radio"&&e.set(a,"_type","Radio")}else{if(s.tagName==="video")return a.content=o.stringify([s]),[a];if(s.tagName==="svg"){const i=e.find(s.attributes,{key:"height"}),n=e.find(s.attributes,{key:"width"}),f=e.get(i,"value")?`[${e.get(i,"value")}px]`:"full",_=e.get(n,"value")?`[${e.get(n,"value")}px]`:"full",d=e.get(e.find(s.attributes,{key:"class"}),"value");return a.styles=`${u.STYLES_KEY}, ${p.cn$1(`w-${_} h-${f}`,d)}`.trim(),s.attributes=e.filter(s.attributes,b=>!e.includes(["style","width","height","class"],b.key)),a.icon=o.stringify([s]),e.set(a,"styles_attrs",e.omit(e.get(a,"styles_attrs")||{},["height","width","style","class"])),[a]}else if(s.tagName=="option"&&r&&((c=r.block)==null?void 0:c._type)==="Select")return r.block.options.push({label:h(s.children),...y(s)}),[]}const l=m(s.children,{block:a,node:s});return[a,...l]}),L=t=>{const r=t.match(/<body[^>]*>[\s\S]*?<\/body>/);return(r&&r.length>0?r[0].replace(/<body/,"<div").replace(/<\/body>/,"</div>"):t).replace(/\s+/g," ").replaceAll("> <","><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()},S=t=>{const r=o.parse(L(t));return e.isEmpty(t)?[]:e.flatten(m(r))};exports.getBlocksFromHTML=S;
|
|
@@ -3,7 +3,7 @@ import * as m from "react";
|
|
|
3
3
|
import et, { createContext as Os, useContext as zs, useRef as Br, createElement as Rr, useReducer as Vs, useEffect as je, useDebugValue as $s, useCallback as A, useMemo as Fs, useState as De, Suspense as vt } from "react";
|
|
4
4
|
import * as zt from "@radix-ui/react-toggle";
|
|
5
5
|
import { cva as be } from "class-variance-authority";
|
|
6
|
-
import { g as le, c as Pe, a as Gs, b as c } from "./utils-
|
|
6
|
+
import { g as le, c as Pe, a as Gs, b as c } from "./utils-XsPKXMVo.js";
|
|
7
7
|
import * as He from "@radix-ui/react-switch";
|
|
8
8
|
import { Slot as Ws } from "@radix-ui/react-slot";
|
|
9
9
|
import * as pe from "@radix-ui/react-accordion";
|
|
@@ -25,7 +25,7 @@ import { Command as U } from "cmdk";
|
|
|
25
25
|
import * as T from "@radix-ui/react-context-menu";
|
|
26
26
|
import Ks, { IconPickerItem as Js } from "react-icons-picker";
|
|
27
27
|
import Ys from "react-dom";
|
|
28
|
-
import {
|
|
28
|
+
import { n as Y, b as I, o as at, a as oe, i as Qs, j as se, d as V, f as ce, g as E, s as fe, t as nt, c as $, w as zr, x as Ft, y as Gt, z as Be, l as Xs, h as ee, e as Wt, A as qe, B as wt, q as Nt, C as Zs } from "./lodash-3gkdNK5u.js";
|
|
29
29
|
import eo from "react-quill";
|
|
30
30
|
import { atom as y, useAtom as R, useAtomValue as L, useSetAtom as de } from "jotai";
|
|
31
31
|
import Ut from "flat-to-nested";
|
|
@@ -2580,7 +2580,7 @@ const Sr = (e) => {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
)
|
|
2582
2582
|
] });
|
|
2583
|
-
}, jr = et.lazy(() => import("./UnsplashImages-
|
|
2583
|
+
}, jr = et.lazy(() => import("./UnsplashImages-mqK09h8E.js")), Ar = et.lazy(() => import("./UploadImages-IDkkRuhx.js")), Es = ({
|
|
2584
2584
|
isModalView: e = !1,
|
|
2585
2585
|
onSelect: t = () => {
|
|
2586
2586
|
}
|
|
@@ -20,7 +20,7 @@ import { initReactI18next as oS } from "react-i18next";
|
|
|
20
20
|
import { j as n1 } from "./jsx-runtime-NV737rRe.js";
|
|
21
21
|
import * as O from "react";
|
|
22
22
|
import p, { useState as g1, useRef as z1, useLayoutEffect as L3, useEffect as L1, useCallback as D1, useDebugValue as o91, useContext as Et, forwardRef as Q, createContext as $t, useReducer as cS, useMemo as fa, cloneElement as Ae, Fragment as hS, Children as br, Component as Ff, isValidElement as sS, createElement as G4, memo as vS, Suspense as Ue, lazy as v0 } from "react";
|
|
23
|
-
import { u as O3, a as h2, c as qf, b as wt, d as Pe, e as s2, f as d0, g as Wf, h as dS, i as J4, B as S3, S as uS, j as Kf, k as gS, l as fS, m as pS, n as zS, o as MS, p as mS, q as HS, r as VS, s as wS, t as bS, v as yS, T as xS, w as LS, x as OS, y as Uf, z as SS, A as CS, C as BS, D as AS, E as PS, F as ES, G as IS, H as kS, I as NS, J as RS, K as TS } from "./index-
|
|
23
|
+
import { u as O3, a as h2, c as qf, b as wt, d as Pe, e as s2, f as d0, g as Wf, h as dS, i as J4, B as S3, S as uS, j as Kf, k as gS, l as fS, m as pS, n as zS, o as MS, p as mS, q as HS, r as VS, s as wS, t as bS, v as yS, T as xS, w as LS, x as OS, y as Uf, z as SS, A as CS, C as BS, D as AS, E as PS, F as ES, G as IS, H as kS, I as NS, J as RS, K as TS } from "./index-0OqmBgqo.js";
|
|
24
24
|
import { g as Ii, c as j0 } from "./MODIFIERS-MLfpKQY1.js";
|
|
25
25
|
import Zf from "clsx";
|
|
26
26
|
import { flushSync as DS, createPortal as jS } from "react-dom";
|
|
@@ -30,14 +30,14 @@ import US from "react-textarea-autosize";
|
|
|
30
30
|
import { useAtom as ki, atom as ZS, useAtomValue as Xf, getDefaultStore as GS } from "jotai";
|
|
31
31
|
import { FlagsProvider as JS } from "flagged";
|
|
32
32
|
import { DndProvider as YS } from "react-dnd";
|
|
33
|
-
import {
|
|
33
|
+
import { j as Bc, g as Ac, i as _f, a as QS, n as XS, h as _S, f as ls, o as $f, q as $S, b as tC, t as eC, s as aC, u as rC, v as is } from "./lodash-3gkdNK5u.js";
|
|
34
34
|
import { MultiBackend as nC, getBackendOptions as lC } from "@minoru/react-dnd-treeview";
|
|
35
|
-
import { d as iC } from "./utils-
|
|
35
|
+
import { d as iC } from "./utils-XsPKXMVo.js";
|
|
36
36
|
import { useHotkeys as se } from "react-hotkeys-hook";
|
|
37
37
|
import { getChaiDataProviders as oC, syncBlocksWithDefaults as cC } from "@chaibuilder/runtime";
|
|
38
38
|
import { FileTextIcon as hC, GearIcon as sC, EyeClosedIcon as vC, EyeOpenIcon as dC } from "@radix-ui/react-icons";
|
|
39
39
|
import { toast as ae, Toaster as uC } from "sonner";
|
|
40
|
-
import { g as gC } from "./html-to-json-
|
|
40
|
+
import { g as gC } from "./html-to-json-Y5M0N8PH.js";
|
|
41
41
|
import { Loader as fC, Loader2 as pC, LogOutIcon as zC } from "lucide-react";
|
|
42
42
|
const MC = "Dark mode", mC = "This page has no blocks. Add a block by clicking the + button", HC = "This page is empty", VC = "Please select a block to edit settings or styles", wC = "Please select a styling block", bC = "Drop your block here", yC = {
|
|
43
43
|
dark_mode: MC,
|
|
@@ -38598,7 +38598,7 @@ const Eh1 = () => {
|
|
|
38598
38598
|
e((l) => (delete l[n.providerKey], l));
|
|
38599
38599
|
});
|
|
38600
38600
|
}), [r, a, e]), /* @__PURE__ */ n1.jsx(n1.Fragment, { children: t });
|
|
38601
|
-
}, Dh1 = v0(() => import("./SidePanels-
|
|
38601
|
+
}, Dh1 = v0(() => import("./SidePanels-muLqfBql.js")), jh1 = v0(() => import("./Topbar-_-1HX-EE.js")), Fh1 = v0(() => import("./CanvasArea-IiD0f6Eq.js")), qh1 = v0(() => import("./Settings-ou3Owu0B.js")), Wh1 = () => {
|
|
38602
38602
|
const [t] = ki(bS), e = (n) => {
|
|
38603
38603
|
yS() || n.preventDefault();
|
|
38604
38604
|
};
|
|
@@ -40728,7 +40728,7 @@ const Fs1 = () => {
|
|
|
40728
40728
|
] })
|
|
40729
40729
|
] })
|
|
40730
40730
|
] });
|
|
40731
|
-
}, Zs1 = () => /* @__PURE__ */ n1.jsx(Us1, { children: /* @__PURE__ */ n1.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ n1.jsx(zC, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), Gs1 = v0(() => import("./PagesPanel-
|
|
40731
|
+
}, Zs1 = () => /* @__PURE__ */ n1.jsx(Us1, { children: /* @__PURE__ */ n1.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ n1.jsx(zC, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), Gs1 = v0(() => import("./PagesPanel-bNqfHuCk.js")), Js1 = v0(() => import("./ProjectPanel-1Kgm2-R5.js")), Ys1 = v0(() => import("./CurrentPage-n2RQMBpJ.js")), Qs1 = () => /* @__PURE__ */ n1.jsx("h2", { children: "Your Logo" }), Xs1 = () => {
|
|
40732
40732
|
const { mutate: t } = Es1();
|
|
40733
40733
|
return J4("editable", !0) ? /* @__PURE__ */ n1.jsx(S3, { onClick: t, className: "bg-blue-600 text-white", children: "Publish" }) : null;
|
|
40734
40734
|
}, _s1 = (t) => {
|