@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.
Files changed (101) hide show
  1. package/dist/AddBlocks-AG_J7s2Z.cjs +1 -0
  2. package/dist/{AddBlocks-A7WofxHV.js → AddBlocks-FsdsASNp.js} +51 -51
  3. package/dist/BrandingOptions-TRVyCvVq.cjs +1 -0
  4. package/dist/{BrandingOptions-wkFrLFI_.js → BrandingOptions-zFJ28xmJ.js} +23 -23
  5. package/dist/{CanvasArea-chEYQhH8.js → CanvasArea-IiD0f6Eq.js} +7 -7
  6. package/dist/{CanvasArea-kF46NWZK.cjs → CanvasArea-Kbw-TjPH.cjs} +7 -7
  7. package/dist/CurrentPage-lOQd17GA.cjs +1 -0
  8. package/dist/{CurrentPage-Wd7F9Egg.js → CurrentPage-n2RQMBpJ.js} +10 -10
  9. package/dist/{Layers-qMOMP2Mi.js → Layers-38kbAjTI.js} +81 -81
  10. package/dist/Layers-D2WY0CpR.cjs +1 -0
  11. package/dist/MarkAsGlobalBlock-LXDkmFUr.cjs +1 -0
  12. package/dist/{MarkAsGlobalBlock-Czq45Amf.js → MarkAsGlobalBlock-xOHhiMDl.js} +3 -3
  13. package/dist/PagesPanel-RWnIpNqP.cjs +1 -0
  14. package/dist/{PagesPanel-ay4uk4mg.js → PagesPanel-bNqfHuCk.js} +6 -6
  15. package/dist/{ProjectPanel-eLlbfAtj.js → ProjectPanel-1Kgm2-R5.js} +10 -10
  16. package/dist/ProjectPanel-cXKiyEXm.cjs +1 -0
  17. package/dist/Settings-5AI0CInt.cjs +1 -0
  18. package/dist/{Settings-lpoxaMDu.js → Settings-ou3Owu0B.js} +454 -454
  19. package/dist/SidePanels-NV3UX8kK.cjs +1 -0
  20. package/dist/{SidePanels-iRXV69vh.js → SidePanels-muLqfBql.js} +36 -36
  21. package/dist/{Topbar-dQYhW4iv.js → Topbar-_-1HX-EE.js} +3 -3
  22. package/dist/Topbar-gQxbcPtG.cjs +1 -0
  23. package/dist/UnsplashImages-PNp5fYCc.cjs +1 -0
  24. package/dist/{UnsplashImages-AL1ASAoD.js → UnsplashImages-mqK09h8E.js} +6 -6
  25. package/dist/UploadImages-BoSSsLtD.cjs +1 -0
  26. package/dist/{UploadImages-09wuhk2O.js → UploadImages-IDkkRuhx.js} +3 -3
  27. package/dist/{add-page-modal-TXREEFPZ.js → add-page-modal-AJorVipD.js} +16 -16
  28. package/dist/add-page-modal-zOdAgfvh.cjs +1 -0
  29. package/dist/confirm-alert-dHRDZrA1.cjs +1 -0
  30. package/dist/{confirm-alert-GkfW9chS.js → confirm-alert-ea5xpncD.js} +3 -3
  31. package/dist/controls-QnyBNkXG.cjs +36 -0
  32. package/dist/controls-kEuiMMDf.js +4600 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.d.ts +5 -15
  35. package/dist/core.js +5 -5
  36. package/dist/{delete-page-modal-LNME2FwD.js → delete-page-modal-0VAs4Heb.js} +5 -5
  37. package/dist/delete-page-modal-KRBGE4Fo.cjs +1 -0
  38. package/dist/form-6qGAOYI3.cjs +1 -0
  39. package/dist/{form-Fk4CaX1A.js → form-irY39wvJ.js} +29 -29
  40. package/dist/functions-86L6n983.js +23 -0
  41. package/dist/functions-Jr7gX_RX.cjs +1 -0
  42. package/dist/{html-to-json-kGgp07Hv.js → html-to-json-Y5M0N8PH.js} +33 -33
  43. package/dist/html-to-json-aAZkA0f5.cjs +1 -0
  44. package/dist/{index-89A3jPHh.js → index-0OqmBgqo.js} +3 -3
  45. package/dist/{index-Q5q5Y_8a.js → index-4fMl4eN2.js} +6 -6
  46. package/dist/index-d55M5MRz.cjs +1 -0
  47. package/dist/{index-61c5wSJn.cjs → index-veRjBw4J.cjs} +2 -2
  48. package/dist/lib.cjs +1 -1
  49. package/dist/lib.js +27 -27
  50. package/dist/lodash-2us0VT8I.cjs +36 -0
  51. package/dist/lodash-3gkdNK5u.js +4538 -0
  52. package/dist/page-viewer-LvBMrQas.cjs +1 -0
  53. package/dist/{page-viewer-LPx-OTCC.js → page-viewer-QuVbTBKO.js} +6 -6
  54. package/dist/{project-general-setting-sSpFUD_Y.js → project-general-setting-6Nsq4-2Z.js} +9 -9
  55. package/dist/project-general-setting-pSrUGR7K.cjs +1 -0
  56. package/dist/{project-seo-setting-CGVegBtM.js → project-seo-setting-EhqUcTKy.js} +9 -9
  57. package/dist/project-seo-setting-N0OnBCvh.cjs +1 -0
  58. package/dist/render.cjs +1 -1
  59. package/dist/render.js +46 -46
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.js +11 -11
  62. package/dist/single-page-detail-JWCEEBaZ.cjs +1 -0
  63. package/dist/{single-page-detail-32H1_IG4.js → single-page-detail-SAqjZ5E1.js} +53 -53
  64. package/dist/studio.cjs +1 -1
  65. package/dist/studio.js +5 -5
  66. package/dist/ui.cjs +1 -1
  67. package/dist/ui.js +3 -3
  68. package/dist/useAddBlockByDrop-5QW86HjG.js +20 -0
  69. package/dist/useAddBlockByDrop-Ckzuvu-s.cjs +1 -0
  70. package/dist/utils-37UXq2O5.cjs +1 -0
  71. package/dist/{utils-zWMk4dB2.js → utils-XsPKXMVo.js} +5 -5
  72. package/package.json +3 -3
  73. package/dist/AddBlocks-Yuc4t0Z_.cjs +0 -1
  74. package/dist/BrandingOptions-KkPF1OGn.cjs +0 -1
  75. package/dist/CurrentPage-p9MaXTOB.cjs +0 -1
  76. package/dist/Layers-wQ0Fv9Xc.cjs +0 -1
  77. package/dist/MarkAsGlobalBlock-sb3hMXLq.cjs +0 -1
  78. package/dist/PagesPanel--maZxwX5.cjs +0 -1
  79. package/dist/ProjectPanel-KhIpO7m3.cjs +0 -1
  80. package/dist/Settings-n2DpS5Ta.cjs +0 -1
  81. package/dist/SidePanels-Dud5Xh9L.cjs +0 -1
  82. package/dist/Topbar-vqzjB75a.cjs +0 -1
  83. package/dist/UnsplashImages-3Sh4UZ-7.cjs +0 -1
  84. package/dist/UploadImages-mPzLhMiH.cjs +0 -1
  85. package/dist/add-page-modal-FPnIWwqA.cjs +0 -1
  86. package/dist/confirm-alert-YNyc3WEo.cjs +0 -1
  87. package/dist/controls-G0puEH71.js +0 -120
  88. package/dist/controls-aHZq-q4b.cjs +0 -1
  89. package/dist/delete-page-modal-sTbqZPvk.cjs +0 -1
  90. package/dist/form-OhgCJlVA.cjs +0 -1
  91. package/dist/functions-ZWGlwlQY.cjs +0 -1
  92. package/dist/functions-slns6ONz.js +0 -23
  93. package/dist/html-to-json-po8on2ju.cjs +0 -1
  94. package/dist/index-GNmGzavZ.cjs +0 -1
  95. package/dist/page-viewer-wQO9oV9h.cjs +0 -1
  96. package/dist/project-general-setting-8EwuN5lN.cjs +0 -1
  97. package/dist/project-seo-setting-R77SKM1I.cjs +0 -1
  98. package/dist/single-page-detail-nyBEHLtT.cjs +0 -1
  99. package/dist/useAddBlockByDrop-4VH-SMj7.cjs +0 -1
  100. package/dist/useAddBlockByDrop-_kyR0iI4.js +0 -20
  101. 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-61c5wSJn.cjs"),e=require("./index-GNmGzavZ.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");require("@minoru/react-dnd-treeview");require("./utils-tx6hqsHY.cjs");require("tailwind-merge");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-icons");require("sonner");require("./html-to-json-po8on2ju.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});
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) => 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-Q5q5Y_8a.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-89A3jPHh.js";
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-zWMk4dB2.js";
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-kGgp07Hv.js";
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-89A3jPHh.js";
3
- import { j as x } from "./index-Q5q5Y_8a.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-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-zWMk4dB2.js";
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-kGgp07Hv.js";
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 { includes as h, get as a, set as $, first as F } from "lodash";
5
- import { bd as P, be as E, bf as O, bg as S } from "./index-89A3jPHh.js";
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: c } = i, m = {};
12
- return Object.keys(c).forEach((r) => {
13
- const e = c[r];
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 = a(e, "i18n", !1) ? `${r}-${l}` : r;
17
- m[o] = d(e, l);
18
- }), m;
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, p = {
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 = a(e, "i18n", !1) ? `${r}-${l}` : r;
28
- p.items[o] = d(e, l);
29
- }), p;
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: c, title: m } = i, n = {
39
- title: m,
38
+ const { properties: p, title: a } = i, n = {
39
+ title: a,
40
40
  type: "object",
41
41
  properties: {}
42
42
  };
43
- return Object.keys(c).forEach((o) => {
44
- const t = c[o];
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 = a(t, "i18n", !1) ? `${o}-${l}` : o;
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: p, title: r } = i, e = {
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(p).forEach((o) => {
60
- const t = p[o];
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 = a(t, "i18n", !1) ? `${o}-${l}` : o;
64
- e.items.properties[s] = y(t, l), $(e.items, "title", a(t, "itemTitle", `${r} item`));
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: c,
73
- onChange: m,
72
+ formData: p,
73
+ onChange: a,
74
74
  disabled: n = !1,
75
- activeLang: p = ""
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 = a(s, "i18n", !1) ? `${t}-${p}` : t;
86
- r.properties[f] = y(s, p), e[f] = d(s, p);
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 && m({ ...t }, 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: c,
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-zWMk4dB2.js";
3
- import { includes as y, get as c, isEmpty as g, forEach as $, find as o, set as u, capitalize as w, flatMapDeep as C, filter as S, omit as B, flatten as I } from "lodash";
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 = {}, r = A[t.tagName] || {}, a = t.attributes;
40
- return $(a, ({ key: i, value: l }) => {
41
- if (r[i]) {
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, r[i], m(l));
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 r = o(t.attributes, { key: "class" });
54
- if (r) {
55
- const a = r.value;
56
- return { [e]: `${p},${a}` };
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, (r) => {
139
+ }, b = (t, e = null) => C(t, (a) => {
140
140
  var l;
141
- if (r.type === "comment")
141
+ if (a.type === "comment")
142
142
  return [];
143
- let a = { _id: x() };
144
- if (e && (a._parent = e.block._id), r.type === "text")
145
- return g(c(r, "content", "")) ? [] : e && H(e.node, e.block) ? (u(e, "block.content", c(r, "content", "")), []) : { ...a, _type: "Text", content: c(r, "content", "") };
146
- if (a = {
147
- ...a,
148
- ...E(r),
149
- ...f(r),
150
- ...q(r)
151
- }, a._type === "Input") {
152
- const s = a.inputType || "text";
153
- s === "checkbox" ? u(a, "_type", "Checkbox") : s === "radio" && u(a, "_type", "Radio");
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 (r.tagName === "video")
156
- return a.content = h([r]), [a];
157
- if (r.tagName === "svg") {
158
- const s = o(r.attributes, { key: "height" }), n = o(r.attributes, { key: "width" }), d = c(s, "value") ? `[${c(s, "value")}px]` : "full", T = c(n, "value") ? `[${c(n, "value")}px]` : "full", v = c(o(r.attributes, { key: "class" }), "value");
159
- return a.styles = `${p}, ${L(`w-${T} h-${d}`, v)}`.trim(), r.attributes = S(r.attributes, (N) => !y(["style", "width", "height", "class"], N.key)), a.icon = h([r]), u(a, "styles_attrs", B(c(a, "styles_attrs") || {}, ["height", "width", "style", "class"])), [a];
160
- } else if (r.tagName == "option" && e && ((l = e.block) == null ? void 0 : l._type) === "Select")
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: _(r.children),
163
- ...f(r)
162
+ label: _(a.children),
163
+ ...f(a)
164
164
  }), [];
165
165
  }
166
- const i = b(r.children, { block: a, node: r });
167
- return [a, ...i];
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-zWMk4dB2.js";
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 { flatten as Y, filter as I, omit as at, isEmpty as oe, isString as Qs, find as se, map as V, each as ce, get as E, set as fe, has as nt, includes as $, isUndefined as zr, without as Ft, forIn as Gt, findIndex as Be, last as Xs, first as ee, startsWith as Wt, isNull as qe, pick as wt, sortBy as Nt, isObject as Zs } from "lodash";
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-AL1ASAoD.js")), Ar = et.lazy(() => import("./UploadImages-09wuhk2O.js")), Es = ({
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-89A3jPHh.js";
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 { find as Bc, get as Ac, isString as _f, isEmpty as QS, flatten as XS, first as _S, each as ls, omit as $f, sortBy as $S, filter as tC, has as eC, set as aC, capitalize as rC, size as is } from "lodash";
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-zWMk4dB2.js";
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-kGgp07Hv.js";
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-iRXV69vh.js")), jh1 = v0(() => import("./Topbar-dQYhW4iv.js")), Fh1 = v0(() => import("./CanvasArea-chEYQhH8.js")), qh1 = v0(() => import("./Settings-lpoxaMDu.js")), Wh1 = () => {
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-ay4uk4mg.js")), Js1 = v0(() => import("./ProjectPanel-eLlbfAtj.js")), Ys1 = v0(() => import("./CurrentPage-Wd7F9Egg.js")), Qs1 = () => /* @__PURE__ */ n1.jsx("h2", { children: "Your Logo" }), Xs1 = () => {
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) => {