@chaibuilder/sdk 1.2.24 → 1.2.25

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 (186) hide show
  1. package/README.md +6 -5
  2. package/dist/AddBlocks-Ol3iIVKa.js +207 -0
  3. package/dist/AddBlocks-a1c-7Ewz.cjs +1 -0
  4. package/dist/BrandingOptions-6rnt0UaA.cjs +1 -0
  5. package/dist/{BrandingOptions-udtH5yJs.js → BrandingOptions-iTyWpwTs.js} +40 -54
  6. package/dist/CanvasArea-R4ogF9AT.cjs +55 -0
  7. package/dist/{CanvasArea-IqeMbtOf.js → CanvasArea-dZjng782.js} +340 -324
  8. package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +163 -0
  9. package/dist/ChaiBuilderEditor-vP4at00I.js +27974 -0
  10. package/dist/{Class-lGzsNBOK.js → Class-ahc3NIbq.js} +26 -29
  11. package/dist/Class-eieto7e-.cjs +1 -0
  12. package/dist/Controls-3Cc1XYXg.js +105 -0
  13. package/dist/Controls-ky25Ebo3.cjs +1 -0
  14. package/dist/CurrentPage-3gQTH0Zt.cjs +1 -0
  15. package/dist/{CurrentPage-AA0XHYMU.js → CurrentPage-Kmfp-kFk.js} +40 -54
  16. package/dist/Functions-Hvon6AMZ.cjs +1 -0
  17. package/dist/Functions-NzT2Six_.js +15 -0
  18. package/dist/ImagesPanel-J1RlG7xG.cjs +1 -0
  19. package/dist/ImagesPanel-Wb0GF_NA.js +29 -0
  20. package/dist/ListTree-CZ-mtjZ9.cjs +1 -0
  21. package/dist/{ListTree-ZNEtds1d.js → ListTree-N3jeD790.js} +92 -102
  22. package/dist/{MODIFIERS-dytZ-osO.js → MODIFIERS-CNqNUapY.js} +10 -4
  23. package/dist/MODIFIERS-o1p3VnpS.cjs +1 -0
  24. package/dist/PagesPanel-Gi0z6gaf.cjs +1 -0
  25. package/dist/PagesPanel-u1IB-nRr.js +48 -0
  26. package/dist/ProjectPanel-EydGZmMW.js +71 -0
  27. package/dist/ProjectPanel-kiiljG4H.cjs +1 -0
  28. package/dist/{STRINGS--j49GZJP.js → STRINGS-b432aBJJ.js} +2 -2
  29. package/dist/Settings-8ilCSH8b.cjs +1 -0
  30. package/dist/{Settings-pIePR1Id.js → Settings-jCcd-VE6.js} +407 -401
  31. package/dist/SidePanels-T36C6Lhc.cjs +1 -0
  32. package/dist/{SidePanels-NznSn5RN.js → SidePanels-pHMYprpW.js} +108 -118
  33. package/dist/Topbar-CvWQuspR.cjs +1 -0
  34. package/dist/Topbar-pbIDUE_B.js +122 -0
  35. package/dist/UnsplashImages-KBZPd9dv.cjs +1 -0
  36. package/dist/{UnsplashImages-qvwFbV-E.js → UnsplashImages-L7x_3RQf.js} +50 -63
  37. package/dist/UploadImages-GkkJVAgG.cjs +1 -0
  38. package/dist/{UploadImages-9NapgXBq.js → UploadImages-zdEJRLD8.js} +37 -60
  39. package/dist/accordion-oPUeqPCZ.js +42 -0
  40. package/dist/accordion-ynvFtV_p.cjs +1 -0
  41. package/dist/add-page-modal-9SGv2hgc.cjs +1 -0
  42. package/dist/add-page-modal-JCDXZIPW.js +95 -0
  43. package/dist/alert-dialog-P9xMMB6C.cjs +1 -0
  44. package/dist/alert-dialog-rypfO5ly.js +64 -0
  45. package/dist/badge-E-S7CqUt.cjs +1 -0
  46. package/dist/badge-tEwO7C51.js +23 -0
  47. package/dist/block-helpers-OKHmRRol.cjs +1 -0
  48. package/dist/block-helpers-oSFpSsGz.js +23 -0
  49. package/dist/command-BxR6jaCI.cjs +1 -0
  50. package/dist/command-Pn3HKDuV.js +97 -0
  51. package/dist/confirm-alert-uNm0lZ0y.cjs +1 -0
  52. package/dist/confirm-alert-wR5_VJ1l.js +36 -0
  53. package/dist/context-menu-8dC9uGXj.js +122 -0
  54. package/dist/context-menu-IgLbIuth.cjs +1 -0
  55. package/dist/{controls-OfJWSEqC.js → controls-IS5qnRce.js} +20 -85
  56. package/dist/controls-L7DPvB0m.cjs +1 -0
  57. package/dist/core.cjs +1 -1
  58. package/dist/core.d.ts +3 -1
  59. package/dist/core.js +150 -75
  60. package/dist/{defaultTheme-D8B4-wHO.js → defaultTheme-4kA60XdB.js} +6 -8
  61. package/dist/defaultTheme-mrkeGFGI.cjs +1 -0
  62. package/dist/delete-page-modal-7KmP1elv.js +67 -0
  63. package/dist/delete-page-modal-SgfwvfNu.cjs +1 -0
  64. package/dist/dropdown-menu-El86_9Uo.js +124 -0
  65. package/dist/dropdown-menu-SiHzqWwZ.cjs +1 -0
  66. package/dist/email-blocks.cjs +1 -1
  67. package/dist/email-blocks.js +3 -292
  68. package/dist/email.cjs +1 -1
  69. package/dist/email.d.ts +3 -1
  70. package/dist/email.js +18 -37
  71. package/dist/{form-STUz-6nE.js → form-0_RLz2TB.js} +12 -12
  72. package/dist/form-W58AVUdf.cjs +1 -0
  73. package/dist/hover-card-KUwpDkW8.cjs +1 -0
  74. package/dist/hover-card-q138xxXR.js +45 -0
  75. package/dist/{html-to-json-ngX9ef2u.js → html-to-json-2xtb7520.js} +41 -41
  76. package/dist/{html-to-json-efmv1pCj.cjs → html-to-json-uSnxl72F.cjs} +1 -1
  77. package/dist/iconBase-gbUAAO2L.cjs +1 -0
  78. package/dist/iconBase-h4DuR_XT.js +63 -0
  79. package/dist/index-9MmykVSc.cjs +1 -0
  80. package/dist/index-hElOGcFr.js +2200 -0
  81. package/dist/index-lDTsQp7h.js +188 -0
  82. package/dist/index-rq5Y9ZDy.cjs +1 -0
  83. package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
  84. package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
  85. package/dist/label-KaP7MRrs.js +10 -0
  86. package/dist/label-tFm8HZdb.cjs +1 -0
  87. package/dist/lib.cjs +2 -2
  88. package/dist/lib.js +62 -66
  89. package/dist/link-WbcKdQ9k.cjs +1 -0
  90. package/dist/link-xuhP-4dN.js +196 -0
  91. package/dist/page-viewer-Hx5hxHKm.cjs +1 -0
  92. package/dist/{page-viewer-rCXavxpd.js → page-viewer-NnOwmAmu.js} +43 -57
  93. package/dist/popover-a84pbVhQ.js +23 -0
  94. package/dist/popover-fKjgcRUx.cjs +1 -0
  95. package/dist/{project-general-setting-rmAVpDu9.js → project-general-setting-9ju3TDju.js} +35 -43
  96. package/dist/project-general-setting-FxkwjvJz.cjs +1 -0
  97. package/dist/{project-seo-setting-pX34Qsym.js → project-seo-setting-36CdUszM.js} +23 -40
  98. package/dist/project-seo-setting-RU7qiXxb.cjs +1 -0
  99. package/dist/render.cjs +1 -1
  100. package/dist/render.js +13 -14
  101. package/dist/scroll-area-FiHvy-TZ.cjs +1 -0
  102. package/dist/scroll-area-ewXbxc3n.js +30 -0
  103. package/dist/select-7bjg-rr9.cjs +1 -0
  104. package/dist/select-POGdEDHT.js +75 -0
  105. package/dist/separator-3Civ-6hb.cjs +1 -0
  106. package/dist/separator-SctTn0Qi.js +18 -0
  107. package/dist/single-page-detail-beY0MT1b.cjs +1 -0
  108. package/dist/{single-page-detail-rSQomrY5.js → single-page-detail-hD1jKZ8k.js} +66 -74
  109. package/dist/skeleton-STeL9VrJ.cjs +1 -0
  110. package/dist/skeleton-lu8e7q2y.js +239 -0
  111. package/dist/studio.cjs +1 -1
  112. package/dist/studio.d.ts +3 -1
  113. package/dist/studio.js +24 -40
  114. package/dist/tabs-_4WbA1cc.cjs +1 -0
  115. package/dist/tabs-yQ3oGziM.js +106 -0
  116. package/dist/textarea-1kZEh7ki.cjs +1 -0
  117. package/dist/textarea-b2QvVhrK.js +73 -0
  118. package/dist/ui.cjs +1 -1
  119. package/dist/ui.js +365 -160
  120. package/dist/useAddBlock-8pxOEYIl.cjs +1 -0
  121. package/dist/useAddBlock-FEKFJNwQ.js +69 -0
  122. package/dist/useChaiExternalData-fkFgoS80.js +6 -0
  123. package/dist/useChaiExternalData-rwoAZ6uU.cjs +1 -0
  124. package/dist/useDarkMode-7i57segK.cjs +1 -0
  125. package/dist/useDarkMode-8VHJlYyE.js +23 -0
  126. package/dist/useSelectedBreakpoints-6NK5qd7T.js +10 -0
  127. package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +1 -0
  128. package/dist/useStylingState-Iuj84yvc.js +186 -0
  129. package/dist/useStylingState-OIvJMV6p.cjs +1 -0
  130. package/dist/useUiLibraries-nCdauJ4N.cjs +1 -0
  131. package/dist/useUiLibraries-psyWFbNc.js +12 -0
  132. package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +1 -0
  133. package/dist/useUpdateBlocksProps-vWcDp-P9.js +23 -0
  134. package/dist/utils-dze1SGvB.js +6 -0
  135. package/dist/utils-qK_SjzzV.cjs +1 -0
  136. package/dist/web-blocks.cjs +1 -6
  137. package/dist/web-blocks.js +3 -1153
  138. package/package.json +1 -1
  139. package/dist/AddBlocks-l1JENNvq.js +0 -206
  140. package/dist/AddBlocks-zPPKkeKs.cjs +0 -1
  141. package/dist/BrandingOptions-DkpqGARR.cjs +0 -1
  142. package/dist/CanvasArea-plZTWifU.cjs +0 -55
  143. package/dist/Class-PoYusiA5.cjs +0 -1
  144. package/dist/CurrentPage-7_s9LtEJ.cjs +0 -1
  145. package/dist/Functions-7jnEwJyw.js +0 -15
  146. package/dist/Functions-N3yhPYKY.cjs +0 -1
  147. package/dist/ListTree-LAN7QmHQ.cjs +0 -1
  148. package/dist/MODIFIERS-0g14w5RS.cjs +0 -1
  149. package/dist/PagesPanel-5qMZBatP.cjs +0 -1
  150. package/dist/PagesPanel-883P3_su.js +0 -64
  151. package/dist/ProjectPanel-Y8Qcmsn0.js +0 -85
  152. package/dist/ProjectPanel-otQb9ceP.cjs +0 -1
  153. package/dist/Settings-Rt342VJ3.cjs +0 -1
  154. package/dist/SidePanels-PaQkgjLa.cjs +0 -1
  155. package/dist/Topbar-CqW7G360.cjs +0 -1
  156. package/dist/Topbar-pWzBEOed.js +0 -132
  157. package/dist/UnsplashImages-NGskB93R.cjs +0 -1
  158. package/dist/UploadImages-Oh7Glr9A.cjs +0 -1
  159. package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
  160. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
  161. package/dist/add-page-modal-4PiRJgX5.js +0 -104
  162. package/dist/add-page-modal-4o2L_7T7.cjs +0 -1
  163. package/dist/confirm-alert-C4M9eF-o.cjs +0 -1
  164. package/dist/confirm-alert-GUhZ_G8w.js +0 -60
  165. package/dist/controls-KK2oLIa8.cjs +0 -1
  166. package/dist/defaultTheme-7VqqhOcp.cjs +0 -1
  167. package/dist/delete-page-modal-4l5-RhQB.js +0 -83
  168. package/dist/delete-page-modal-Bek5bCf-.cjs +0 -1
  169. package/dist/empty-slot-ZBlsQi6m.js +0 -15
  170. package/dist/empty-slot-nzYOgZuS.cjs +0 -1
  171. package/dist/form-lBQ_76Uw.cjs +0 -1
  172. package/dist/index-Gk6sASBd.js +0 -3080
  173. package/dist/index-YpnaudSM.js +0 -63
  174. package/dist/index-dgm-fd8U.cjs +0 -206
  175. package/dist/index-e0c8PmRQ.js +0 -205
  176. package/dist/index-ecnGWzh9.cjs +0 -1
  177. package/dist/index-gS-3liKK.js +0 -39503
  178. package/dist/index-gi1LIOCw.cjs +0 -1
  179. package/dist/index-h-hd6EvN.cjs +0 -1
  180. package/dist/index-oCYKBYyT.cjs +0 -1
  181. package/dist/index-xZWaF8AW.js +0 -2201
  182. package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
  183. package/dist/page-viewer-JlKEwACu.cjs +0 -1
  184. package/dist/project-general-setting-2FGoUZ-z.cjs +0 -1
  185. package/dist/project-seo-setting-mlxL_e2_.cjs +0 -1
  186. package/dist/single-page-detail-c6-wRWyN.cjs +0 -1
@@ -1,66 +1,56 @@
1
- import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import S, { memo as f, useMemo as v, useCallback as R, useEffect as H } from "react";
1
+ import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
+ import T, { memo as f, useMemo as v, useCallback as R, useEffect as H } from "react";
3
3
  import { useAtom as P } from "jotai";
4
- import { useDebouncedCallback as T } from "@react-hookz/web";
4
+ import { useDebouncedCallback as w } from "@react-hookz/web";
5
5
  import { Tree as A } from "react-arborist";
6
- import { E as w, r as b, s as z, a1 as D, bs as _, aS as L, t as E, bt as F, aR as V, bu as O, bv as $, h as U, Y as q, bw as y, ap as G, aq as K, ar as W, bx as Y, a5 as J, ac as Q, aM as X } from "./index-Gk6sASBd.js";
7
- import { c as N } from "./Functions-7jnEwJyw.js";
8
- import { BoxModelIcon as Z, BoxIcon as ee, DragHandleHorizontalIcon as te, ViewHorizontalIcon as se, BorderAllIcon as re, BorderTopIcon as oe, TableIcon as ne, DropdownMenuIcon as ce, RadiobuttonIcon as ae, InputIcon as ie, ButtonIcon as I, CheckboxIcon as le, GroupIcon as ue, SpaceBetweenVerticallyIcon as de, ColumnsIcon as xe, RowsIcon as k, TextIcon as C, SketchLogoIcon as pe, DividerHorizontalIcon as me, CodeIcon as he, CursorTextIcon as ge, VideoIcon as je, Link1Icon as fe, HeadingIcon as be, ImageIcon as ye, TrashIcon as ve, CopyIcon as Ie, TriangleRightIcon as ke } from "@radix-ui/react-icons";
9
- import { DatabaseIcon as Ce } from "lucide-react";
6
+ import { a as D, j as b, u as z, k as _, i as L, f as E, K as F, n as V, t as O } from "./ChaiBuilderEditor-vP4at00I.js";
7
+ import { c as N } from "./Functions-NzT2Six_.js";
8
+ import { u as $ } from "./useUpdateBlocksProps-vWcDp-P9.js";
9
+ import "react-i18next";
10
+ import { u as K, T as U, a as G, c as W } from "./skeleton-lu8e7q2y.js";
11
+ import { BoxModelIcon as q, BoxIcon as J, DragHandleHorizontalIcon as Q, ViewHorizontalIcon as X, BorderAllIcon as Y, BorderTopIcon as Z, TableIcon as ee, DropdownMenuIcon as te, RadiobuttonIcon as se, InputIcon as re, ButtonIcon as I, CheckboxIcon as ne, GroupIcon as oe, SpaceBetweenVerticallyIcon as ce, ColumnsIcon as ae, RowsIcon as k, TextIcon as C, SketchLogoIcon as ie, DividerHorizontalIcon as le, CodeIcon as ue, CursorTextIcon as de, VideoIcon as xe, Link1Icon as pe, HeadingIcon as me, ImageIcon as he, CopyIcon as ge, TrashIcon as je, TriangleRightIcon as fe } from "@radix-ui/react-icons";
12
+ import { DatabaseIcon as be } from "lucide-react";
13
+ import { C as ye, a as ve, b as Ie, c as M } from "./context-menu-8dC9uGXj.js";
14
+ import { c as ke, a as Ce, b as y } from "./block-helpers-oSFpSsGz.js";
10
15
  import { find as B, first as Be } from "lodash-es";
11
- import "./_commonjsHelpers-UyOWmZb0.js";
12
- import "@chaibuilder/runtime";
13
- import "./STRINGS--j49GZJP.js";
14
- import "./MODIFIERS-dytZ-osO.js";
15
- import "./Class-lGzsNBOK.js";
16
+ import "./MODIFIERS-CNqNUapY.js";
16
17
  import "clsx";
18
+ import "@radix-ui/react-scroll-area";
19
+ import "react-dom";
20
+ import "@floating-ui/react-dom";
21
+ import "i18next";
22
+ import "flagged";
23
+ import "react-hotkeys-hook";
24
+ import "@chaibuilder/runtime";
17
25
  import "tailwind-merge";
18
- import "react-i18next";
19
- import "@radix-ui/react-toggle";
20
- import "class-variance-authority";
21
- import "@radix-ui/react-switch";
22
26
  import "@radix-ui/react-slot";
23
- import "@radix-ui/react-accordion";
24
- import "@radix-ui/react-alert-dialog";
25
- import "@radix-ui/react-dialog";
26
- import "@radix-ui/react-label";
27
- import "@radix-ui/react-scroll-area";
28
- import "@radix-ui/react-tabs";
27
+ import "class-variance-authority";
28
+ import "./utils-dze1SGvB.js";
29
29
  import "@radix-ui/react-tooltip";
30
- import "@radix-ui/react-popover";
31
- import "@radix-ui/react-menubar";
32
- import "@radix-ui/react-hover-card";
33
- import "@radix-ui/react-select";
34
- import "@radix-ui/react-dropdown-menu";
35
- import "@radix-ui/react-separator";
36
30
  import "@radix-ui/react-toast";
37
- import "cmdk";
38
31
  import "@radix-ui/react-context-menu";
39
- import "react-icons-picker";
40
- import "react-dom";
41
- import "react-quill";
42
- const M = (t) => {
32
+ const S = (t) => {
43
33
  switch (t.type) {
44
34
  case "Image":
45
- return /* @__PURE__ */ e.jsx(ye, {});
35
+ return /* @__PURE__ */ e.jsx(he, {});
46
36
  case "Heading":
47
- return /* @__PURE__ */ e.jsx(be, {});
37
+ return /* @__PURE__ */ e.jsx(me, {});
48
38
  case "Text":
49
39
  return /* @__PURE__ */ e.jsx(C, {});
50
40
  case "Link":
51
- return /* @__PURE__ */ e.jsx(fe, {});
41
+ return /* @__PURE__ */ e.jsx(pe, {});
52
42
  case "Video":
53
- return /* @__PURE__ */ e.jsx(je, {});
43
+ return /* @__PURE__ */ e.jsx(xe, {});
54
44
  case "RichText":
55
- return /* @__PURE__ */ e.jsx(ge, {});
45
+ return /* @__PURE__ */ e.jsx(de, {});
56
46
  case "Button":
57
47
  return /* @__PURE__ */ e.jsx(I, {});
58
48
  case "CustomHTML":
59
- return /* @__PURE__ */ e.jsx(he, {});
49
+ return /* @__PURE__ */ e.jsx(ue, {});
60
50
  case "Divider":
61
- return /* @__PURE__ */ e.jsx(me, {});
51
+ return /* @__PURE__ */ e.jsx(le, {});
62
52
  case "Icon":
63
- return /* @__PURE__ */ e.jsx(pe, {});
53
+ return /* @__PURE__ */ e.jsx(ie, {});
64
54
  case "List":
65
55
  return /* @__PURE__ */ e.jsx(k, {});
66
56
  case "Paragraph":
@@ -68,44 +58,44 @@ const M = (t) => {
68
58
  case "Row":
69
59
  return /* @__PURE__ */ e.jsx(k, {});
70
60
  case "ListItem":
71
- return /* @__PURE__ */ e.jsx(xe, {});
61
+ return /* @__PURE__ */ e.jsx(ae, {});
72
62
  case "LineBreak":
73
- return /* @__PURE__ */ e.jsx(de, {});
63
+ return /* @__PURE__ */ e.jsx(ce, {});
74
64
  case "Form":
75
- return /* @__PURE__ */ e.jsx(ue, {});
65
+ return /* @__PURE__ */ e.jsx(oe, {});
76
66
  case "Checkbox":
77
- return /* @__PURE__ */ e.jsx(le, {});
67
+ return /* @__PURE__ */ e.jsx(ne, {});
78
68
  case "FormButton":
79
69
  return /* @__PURE__ */ e.jsx(I, {});
80
70
  case "Input":
81
71
  case "TextArea":
82
- return /* @__PURE__ */ e.jsx(ie, {});
72
+ return /* @__PURE__ */ e.jsx(re, {});
83
73
  case "Radio":
84
- return /* @__PURE__ */ e.jsx(ae, {});
74
+ return /* @__PURE__ */ e.jsx(se, {});
85
75
  case "Select":
86
- return /* @__PURE__ */ e.jsx(ce, {});
76
+ return /* @__PURE__ */ e.jsx(te, {});
87
77
  case "Table":
88
- return /* @__PURE__ */ e.jsx(ne, {});
78
+ return /* @__PURE__ */ e.jsx(ee, {});
89
79
  case "TableHead":
90
- return /* @__PURE__ */ e.jsx(oe, {});
80
+ return /* @__PURE__ */ e.jsx(Z, {});
91
81
  case "TableBody":
92
- return /* @__PURE__ */ e.jsx(re, {});
82
+ return /* @__PURE__ */ e.jsx(Y, {});
93
83
  case "TableRow":
94
- return /* @__PURE__ */ e.jsx(se, {});
84
+ return /* @__PURE__ */ e.jsx(X, {});
95
85
  case "TableCell":
96
- return /* @__PURE__ */ e.jsx(te, {});
86
+ return /* @__PURE__ */ e.jsx(Q, {});
97
87
  case "DataProvider":
98
- return /* @__PURE__ */ e.jsx(Ce, { size: 16 });
88
+ return /* @__PURE__ */ e.jsx(be, { size: 16 });
99
89
  case "Box":
100
- return /* @__PURE__ */ e.jsx(ee, {});
90
+ return /* @__PURE__ */ e.jsx(J, {});
101
91
  default:
102
- return /* @__PURE__ */ e.jsx(Z, {});
92
+ return /* @__PURE__ */ e.jsx(q, {});
103
93
  }
104
94
  }, Te = {
105
95
  display: "flex",
106
96
  alignItems: "center",
107
97
  zIndex: 1
108
- }, we = S.memo(function({ top: r, left: s }) {
98
+ }, we = T.memo(function({ top: r, left: s }) {
109
99
  const l = {
110
100
  position: "absolute",
111
101
  pointerEvents: "none",
@@ -117,7 +107,7 @@ const M = (t) => {
117
107
  }), De = f(function({ children: r, isDragging: s }) {
118
108
  return s ? /* @__PURE__ */ e.jsx("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: r }) : null;
119
109
  }), _e = f(({ id: t, isDragging: r, mouse: s }) => {
120
- const [l] = w(), o = v(() => l.find((d) => d._id === t), [l, t]), x = v(
110
+ const [l] = D(), n = v(() => l.find((d) => d._id === t), [l, t]), x = v(
121
111
  () => ({
122
112
  transform: `translate(${(s == null ? void 0 : s.x) - 10}px, ${(s == null ? void 0 : s.y) - 10}px)`
123
113
  }),
@@ -128,50 +118,50 @@ const M = (t) => {
128
118
  {
129
119
  className: "pointer-events-none absolute z-50 rounded border border-gray-200 bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
130
120
  style: x,
131
- children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${o == null ? void 0 : o._type}`, children: [
132
- /* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(M, { type: o == null ? void 0 : o._type }) }),
133
- /* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (o == null ? void 0 : o._name) || (o == null ? void 0 : o._type) })
121
+ children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${n == null ? void 0 : n._type}`, children: [
122
+ /* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(S, { type: n == null ? void 0 : n._type }) }),
123
+ /* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: (n == null ? void 0 : n._name) || (n == null ? void 0 : n._type) })
134
124
  ] })
135
125
  }
136
126
  ) }) }) : /* @__PURE__ */ e.jsx("div", { className: "hidden" });
137
127
  }), Ne = () => {
138
- const [t] = b(), r = z(), s = D();
128
+ const [t] = b(), r = L(), s = _();
139
129
  return /* @__PURE__ */ e.jsxs(
140
- _,
130
+ M,
141
131
  {
142
- disabled: !L(s == null ? void 0 : s._type),
132
+ disabled: !Ce(s == null ? void 0 : s._type),
143
133
  className: "flex items-center gap-x-4 text-xs",
144
134
  onClick: () => r(t),
145
135
  children: [
146
- /* @__PURE__ */ e.jsx(ve, {}),
136
+ /* @__PURE__ */ e.jsx(je, {}),
147
137
  " Remove"
148
138
  ]
149
139
  }
150
140
  );
151
141
  }, Me = () => {
152
- const [t] = b(), r = E(), s = D(), l = R(() => {
142
+ const [t] = b(), r = z(), s = _(), l = R(() => {
153
143
  r(t);
154
144
  }, [t, r]);
155
- return /* @__PURE__ */ e.jsxs(F, { className: "text-xs", children: [
145
+ return /* @__PURE__ */ e.jsxs(Ie, { className: "text-xs", children: [
156
146
  /* @__PURE__ */ e.jsxs(
157
- _,
147
+ M,
158
148
  {
159
- disabled: !V(s == null ? void 0 : s._type),
149
+ disabled: !ke(s == null ? void 0 : s._type),
160
150
  className: "flex items-center gap-x-4 text-xs",
161
151
  onClick: l,
162
152
  children: [
163
- /* @__PURE__ */ e.jsx(Ie, {}),
153
+ /* @__PURE__ */ e.jsx(ge, {}),
164
154
  " Duplicate"
165
155
  ]
166
156
  }
167
157
  ),
168
158
  /* @__PURE__ */ e.jsx(Ne, {})
169
159
  ] });
170
- }, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(O, { children: [
171
- /* @__PURE__ */ e.jsx($, { children: t }),
160
+ }, Se = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(ye, { children: [
161
+ /* @__PURE__ */ e.jsx(ve, { children: t }),
172
162
  /* @__PURE__ */ e.jsx(Me, {})
173
163
  ] }) }), Re = f(({ node: t, style: r, dragHandle: s }) => {
174
- const l = U("outlineMenuItems", []), [, o] = q(), x = t.children.length > 0, { id: d, data: a, isSelected: m, willReceiveDrop: p, isDragging: h, isEditing: g, handleClick: j } = t, n = T((c) => o(c), [], 300), i = (c) => {
164
+ const l = K("outlineMenuItems", []), [, n] = E(), x = t.children.length > 0, { id: d, data: a, isSelected: m, willReceiveDrop: p, isDragging: h, isEditing: g, handleClick: j } = t, o = w((c) => n(c), [], 300), i = (c) => {
175
165
  c.stopPropagation(), t.toggle();
176
166
  }, u = (c) => {
177
167
  c.stopPropagation(), t.toggle(), j(c);
@@ -185,7 +175,7 @@ const M = (t) => {
185
175
  "div",
186
176
  {
187
177
  onClick: u,
188
- onMouseEnter: () => n(d),
178
+ onMouseEnter: () => o(d),
189
179
  style: r,
190
180
  "data-node-id": d,
191
181
  ref: s,
@@ -201,11 +191,11 @@ const M = (t) => {
201
191
  "div",
202
192
  {
203
193
  className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${t.isOpen ? "rotate-90" : ""}`,
204
- children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(ke, {}) })
194
+ children: x && /* @__PURE__ */ e.jsx("button", { onClick: i, type: "button", children: /* @__PURE__ */ e.jsx(fe, {}) })
205
195
  }
206
196
  ),
207
197
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
208
- /* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(M, { type: a == null ? void 0 : a._type }) }),
198
+ /* @__PURE__ */ e.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ e.jsx(S, { type: a == null ? void 0 : a._type }) }),
209
199
  g ? /* @__PURE__ */ e.jsx(He, { node: t }) : /* @__PURE__ */ e.jsx(
210
200
  "div",
211
201
  {
@@ -218,13 +208,13 @@ const M = (t) => {
218
208
  )
219
209
  ] })
220
210
  ] }),
221
- /* @__PURE__ */ e.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: l.map((c) => /* @__PURE__ */ e.jsxs(G, { children: [
211
+ /* @__PURE__ */ e.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: l.map((c) => /* @__PURE__ */ e.jsxs(U, { children: [
222
212
  /* @__PURE__ */ e.jsx(
223
- K,
213
+ G,
224
214
  {
225
215
  className: "cursor-pointer rounded bg-transparent hover:bg-white hover:text-blue-500",
226
216
  asChild: !0,
227
- children: c.item(d)
217
+ children: T.createElement(c.item, { blockId: d })
228
218
  }
229
219
  ),
230
220
  /* @__PURE__ */ e.jsx(W, { className: "z-[9999]", children: c.tooltip })
@@ -246,36 +236,36 @@ const M = (t) => {
246
236
  }
247
237
  }
248
238
  ), Pe = () => {
249
- const [t] = w();
239
+ const [t] = D();
250
240
  return (r, s) => {
251
241
  var x;
252
- const l = (x = B(t, { _id: s })) == null ? void 0 : x._type, o = Be(r.map((d) => {
242
+ const l = (x = B(t, { _id: s })) == null ? void 0 : x._type, n = Be(r.map((d) => {
253
243
  var a;
254
244
  return (a = B(t, { _id: d })) == null ? void 0 : a._type;
255
245
  }));
256
- return y(l, o);
246
+ return y(l, n);
257
247
  };
258
- }, kt = () => {
259
- const [t] = P(Y), [r, s] = b(), l = J(), [, o] = Q(), { moveBlocks: x } = X(), d = Pe(), a = () => {
260
- s([]), o([]);
261
- }, m = ({ id: n, name: i, node: u }) => {
262
- l([n], { _name: i }, u.data._name);
263
- }, p = ({ dragIds: n, parentId: i, index: u }) => {
264
- d(n, i) && x(n, i, u);
265
- }, h = (n) => {
266
- if (n.length === 0)
248
+ }, pt = () => {
249
+ const [t] = P(F), [r, s] = b(), l = $(), [, n] = V(), { moveBlocks: x } = O(), d = Pe(), a = () => {
250
+ s([]), n([]);
251
+ }, m = ({ id: o, name: i, node: u }) => {
252
+ l([o], { _name: i }, u.data._name);
253
+ }, p = ({ dragIds: o, parentId: i, index: u }) => {
254
+ d(o, i) && x(o, i, u);
255
+ }, h = (o) => {
256
+ if (o.length === 0)
267
257
  return;
268
- const i = n[0] ? n[0].id : "";
269
- o([]), s([i]);
270
- }, g = (n) => {
258
+ const i = o[0] ? o[0].id : "";
259
+ n([]), s([i]);
260
+ }, g = (o) => {
271
261
  var c;
272
- n.preventDefault();
273
- const i = n.target, u = i.getAttribute("data-node-id") || ((c = i.closest("[data-node-id]")) == null ? void 0 : c.getAttribute("data-node-id"));
274
- u && (o([]), s([u]));
275
- }, j = T(
276
- ({ parentNode: n, dragNodes: i }) => {
262
+ o.preventDefault();
263
+ const i = o.target, u = i.getAttribute("data-node-id") || ((c = i.closest("[data-node-id]")) == null ? void 0 : c.getAttribute("data-node-id"));
264
+ u && (n([]), s([u]));
265
+ }, j = w(
266
+ ({ parentNode: o, dragNodes: i }) => {
277
267
  var u;
278
- return !y(n == null ? void 0 : n.data._type, (u = i[0]) == null ? void 0 : u.data._type);
268
+ return !y(o == null ? void 0 : o.data._type, (u = i[0]) == null ? void 0 : u.data._type);
279
269
  },
280
270
  [],
281
271
  300
@@ -293,7 +283,7 @@ const M = (t) => {
293
283
  data: t,
294
284
  renderCursor: we,
295
285
  onSelect: h,
296
- childrenAccessor: (n) => n.children,
286
+ childrenAccessor: (o) => o.children,
297
287
  width: "100%",
298
288
  renderDragPreview: _e,
299
289
  indent: 10,
@@ -305,5 +295,5 @@ const M = (t) => {
305
295
  ) }) });
306
296
  };
307
297
  export {
308
- kt as default
298
+ pt as default
309
299
  };
@@ -1,4 +1,8 @@
1
- const e = [
1
+ var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function t(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ const i = [
2
6
  "hover",
3
7
  "focus",
4
8
  "focus-within",
@@ -47,7 +51,7 @@ const e = [
47
51
  "ui-not-active",
48
52
  "ui-not-selected",
49
53
  "ui-not-checked"
50
- ], o = {
54
+ ], l = {
51
55
  bodyFont: "Inter",
52
56
  headingFont: "Inter",
53
57
  roundedCorners: 5,
@@ -59,6 +63,8 @@ const e = [
59
63
  bodyTextLightColor: "#000000"
60
64
  };
61
65
  export {
62
- o as B,
63
- e as M
66
+ l as B,
67
+ i as M,
68
+ o as c,
69
+ t as g
64
70
  };
@@ -0,0 +1 @@
1
+ "use strict";var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const i=["hover","focus","focus-within","focus-visible","active","visited","target","first","last","only","odd","even","first-of-type","last-of-type","only-of-type","empty","disabled","checked","indeterminate","default","required","valid","invalid","in-range","out-of-range","placeholder-shown","autofill","read-only","open","before","after","first-letter","first-line","marker","selection","file","placeholder","ui-open","ui-disabled","ui-active","ui-selected","ui-checked","ui-not-open","ui-not-disabled","ui-not-active","ui-not-selected","ui-not-checked"],l={bodyFont:"Inter",headingFont:"Inter",roundedCorners:5,primaryColor:"#570df8",secondaryColor:"#f002b8",bodyBgDarkColor:"#031022",bodyBgLightColor:"#fcfcfc",bodyTextDarkColor:"#ffffff",bodyTextLightColor:"#000000"};exports.BRANDING_OPTIONS_DEFAULTS=l;exports.MODIFIERS=i;exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),i=require("react"),s=require("lodash-es"),u=require("./index-9MmykVSc.cjs");require("./ChaiBuilderEditor-m30yoOgJ.cjs");require("./MODIFIERS-o1p3VnpS.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./skeleton-STeL9VrJ.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-qK_SjzzV.cjs");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("./Functions-Hvon6AMZ.cjs");require("react-hotkeys-hook");require("@react-hookz/web");require("@chaibuilder/runtime");require("sonner");require("./html-to-json-uSnxl72F.cjs");require("himalaya");require("./STRINGS-gPz7CUOk.cjs");require("lucide-react");require("./iconBase-gbUAAO2L.cjs");require("./alert-dialog-P9xMMB6C.cjs");require("@radix-ui/react-alert-dialog");const q=i.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-9SGv2hgc.cjs"))),x=i.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-Hx5hxHKm.cjs"))),d=()=>{const{data:t=[],isLoading:n}=u.usePages(),{data:r}=u.useProject(),o=s.sortBy(s.filter(t,{type:"STATIC"}),a=>s.get(a,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(q,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:n,pages:o})})]})};exports.default=d;
@@ -0,0 +1,48 @@
1
+ import { j as t } from "./jsx-runtime-Sp0orL4X.js";
2
+ import i, { Suspense as p } from "react";
3
+ import { sortBy as a, filter as d, get as n } from "lodash-es";
4
+ import { u as l, a as c } from "./index-hElOGcFr.js";
5
+ import "./ChaiBuilderEditor-vP4at00I.js";
6
+ import "./MODIFIERS-CNqNUapY.js";
7
+ import "clsx";
8
+ import "@radix-ui/react-scroll-area";
9
+ import "react-dom";
10
+ import "@floating-ui/react-dom";
11
+ import "jotai";
12
+ import "i18next";
13
+ import "react-i18next";
14
+ import "flagged";
15
+ import "./skeleton-lu8e7q2y.js";
16
+ import "@radix-ui/react-slot";
17
+ import "class-variance-authority";
18
+ import "./utils-dze1SGvB.js";
19
+ import "tailwind-merge";
20
+ import "@radix-ui/react-tooltip";
21
+ import "@radix-ui/react-icons";
22
+ import "@radix-ui/react-toast";
23
+ import "./Functions-NzT2Six_.js";
24
+ import "react-hotkeys-hook";
25
+ import "@react-hookz/web";
26
+ import "@chaibuilder/runtime";
27
+ import "sonner";
28
+ import "./html-to-json-2xtb7520.js";
29
+ import "himalaya";
30
+ import "./STRINGS-b432aBJJ.js";
31
+ import "lucide-react";
32
+ import "./iconBase-h4DuR_XT.js";
33
+ import "./alert-dialog-rypfO5ly.js";
34
+ import "@radix-ui/react-alert-dialog";
35
+ const x = i.lazy(() => import("./add-page-modal-JCDXZIPW.js")), u = i.lazy(() => import("./page-viewer-NnOwmAmu.js")), W = () => {
36
+ const { data: o = [], isLoading: m } = l(), { data: r } = c(), e = a(d(o, { type: "STATIC" }), (s) => n(s, "uuid") === (r == null ? void 0 : r.homepage) ? 0 : 1);
37
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
38
+ /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
39
+ /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Pages" }),
40
+ /* @__PURE__ */ t.jsx(p, { fallback: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-blue-500 underline", children: "+ New Page" }), children: /* @__PURE__ */ t.jsx(x, {}) })
41
+ ] }),
42
+ /* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
43
+ /* @__PURE__ */ t.jsx("div", { className: "-mx-1 divide-y-2", children: /* @__PURE__ */ t.jsx(u, { isLoading: m, pages: e }) })
44
+ ] });
45
+ };
46
+ export {
47
+ W as default
48
+ };
@@ -0,0 +1,71 @@
1
+ import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
+ import i, { useRef as x, useEffect as m, Suspense as n } from "react";
3
+ import { isEqual as b, isEmpty as j } from "lodash-es";
4
+ import { A as f, a as l, b as c, c as p } from "./accordion-oPUeqPCZ.js";
5
+ import { b as h, a as g } from "./index-hElOGcFr.js";
6
+ import "@radix-ui/react-accordion";
7
+ import "@radix-ui/react-icons";
8
+ import "./utils-dze1SGvB.js";
9
+ import "clsx";
10
+ import "tailwind-merge";
11
+ import "./ChaiBuilderEditor-vP4at00I.js";
12
+ import "./MODIFIERS-CNqNUapY.js";
13
+ import "@radix-ui/react-scroll-area";
14
+ import "react-dom";
15
+ import "@floating-ui/react-dom";
16
+ import "jotai";
17
+ import "i18next";
18
+ import "react-i18next";
19
+ import "flagged";
20
+ import "./skeleton-lu8e7q2y.js";
21
+ import "@radix-ui/react-slot";
22
+ import "class-variance-authority";
23
+ import "@radix-ui/react-tooltip";
24
+ import "@radix-ui/react-toast";
25
+ import "./Functions-NzT2Six_.js";
26
+ import "react-hotkeys-hook";
27
+ import "@react-hookz/web";
28
+ import "@chaibuilder/runtime";
29
+ import "sonner";
30
+ import "./html-to-json-2xtb7520.js";
31
+ import "himalaya";
32
+ import "./STRINGS-b432aBJJ.js";
33
+ import "lucide-react";
34
+ import "./iconBase-h4DuR_XT.js";
35
+ import "./alert-dialog-rypfO5ly.js";
36
+ import "@radix-ui/react-alert-dialog";
37
+ const N = i.lazy(() => import("./project-general-setting-9ju3TDju.js")), S = i.lazy(() => import("./project-seo-setting-36CdUszM.js")), d = /* @__PURE__ */ e.jsx("div", { className: "px-3", children: /* @__PURE__ */ e.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (t) => t && j(t.seoData) ? {
38
+ ...t,
39
+ seoData: { title: "", description: "", image: "" }
40
+ } : t;
41
+ function oe() {
42
+ const t = h(), { data: o } = g(), [r, a] = i.useState(
43
+ u(o || {})
44
+ ), s = x(r);
45
+ return m(
46
+ () => () => {
47
+ b(o, s.current) || t.mutate(s.current, {
48
+ onSuccess: () => a(s.current)
49
+ });
50
+ },
51
+ [s]
52
+ ), m(() => {
53
+ s.current = r;
54
+ }, [r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
55
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ e.jsx("h1", { className: "px-1 font-semibold", children: "Website Settings" }) }),
56
+ /* @__PURE__ */ e.jsx("hr", { className: "-mx-1" }),
57
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1", children: /* @__PURE__ */ e.jsxs(f, { type: "single", className: "w-full", defaultValue: "GENERAL", children: [
58
+ /* @__PURE__ */ e.jsxs(l, { value: "GENERAL", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
59
+ /* @__PURE__ */ e.jsx(c, { className: "bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800", children: "General Settings" }),
60
+ /* @__PURE__ */ e.jsx(p, { className: "px-2 pt-4 text-sm", children: /* @__PURE__ */ e.jsx(n, { fallback: d, children: /* @__PURE__ */ e.jsx(N, { _projectData: r, seany: a }) }) })
61
+ ] }),
62
+ /* @__PURE__ */ e.jsxs(l, { value: "SEO", className: "border-b-2 border-slate-100 dark:border-slate-800", children: [
63
+ /* @__PURE__ */ e.jsx(c, { className: "bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800", children: "SEO Settings" }),
64
+ /* @__PURE__ */ e.jsx(p, { className: "px-1 pt-4 text-sm", children: /* @__PURE__ */ e.jsx(n, { fallback: d, children: /* @__PURE__ */ e.jsx(S, { _projectData: r, seany: a }) }) })
65
+ ] })
66
+ ] }) })
67
+ ] });
68
+ }
69
+ export {
70
+ oe as default
71
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),r=require("react"),x=require("lodash-es"),s=require("./accordion-ynvFtV_p.cjs"),a=require("./index-9MmykVSc.cjs");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("./ChaiBuilderEditor-m30yoOgJ.cjs");require("./MODIFIERS-o1p3VnpS.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./skeleton-STeL9VrJ.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("./Functions-Hvon6AMZ.cjs");require("react-hotkeys-hook");require("@react-hookz/web");require("@chaibuilder/runtime");require("sonner");require("./html-to-json-uSnxl72F.cjs");require("himalaya");require("./STRINGS-gPz7CUOk.cjs");require("lucide-react");require("./iconBase-gbUAAO2L.cjs");require("./alert-dialog-P9xMMB6C.cjs");require("@radix-ui/react-alert-dialog");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-FxkwjvJz.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-RU7qiXxb.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function j(){const t=a.useUpdateProject(),{data:u}=a.useProject(),[i,o]=r.useState(l(u||{})),n=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(u,n.current)||t.mutate(n.current,{onSuccess:()=>o(n.current)})},[n]),r.useEffect(()=>{n.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=j;
@@ -2,6 +2,6 @@ const s = "#styles:", t = "#slots:", o = "#i18n", n = "outline";
2
2
  export {
3
3
  o as I,
4
4
  n as O,
5
- t as S,
6
- s as a
5
+ s as S,
6
+ t as a
7
7
  };