@chaibuilder/sdk 1.2.23 → 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-eUSoIgjj.js → BrandingOptions-iTyWpwTs.js} +40 -54
  6. package/dist/CanvasArea-R4ogF9AT.cjs +55 -0
  7. package/dist/{CanvasArea-ulUy_rmB.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-SFhXzQMy.js → CurrentPage-Kmfp-kFk.js} +41 -55
  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-ZeVWczTF.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-FZWm8Fc3.js → Settings-jCcd-VE6.js} +407 -401
  31. package/dist/SidePanels-T36C6Lhc.cjs +1 -0
  32. package/dist/{SidePanels-wrkkpcGE.js → SidePanels-pHMYprpW.js} +107 -117
  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-eZedbK2J.js → UnsplashImages-L7x_3RQf.js} +50 -63
  37. package/dist/UploadImages-GkkJVAgG.cjs +1 -0
  38. package/dist/{UploadImages-71QziLbr.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 +7 -4
  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 +5 -2
  70. package/dist/email.js +18 -37
  71. package/dist/{form-zKUMQFuB.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-7AwzWRtB.js → page-viewer-NnOwmAmu.js} +44 -58
  93. package/dist/popover-a84pbVhQ.js +23 -0
  94. package/dist/popover-fKjgcRUx.cjs +1 -0
  95. package/dist/{project-general-setting-pYPoqvqd.js → project-general-setting-9ju3TDju.js} +35 -43
  96. package/dist/project-general-setting-FxkwjvJz.cjs +1 -0
  97. package/dist/{project-seo-setting-zXKOcjep.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-q2TDxN-P.js → single-page-detail-hD1jKZ8k.js} +65 -73
  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 +5 -2
  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 +364 -159
  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-b0Vk6eqO.js +0 -206
  140. package/dist/AddBlocks-bgu08YJC.cjs +0 -1
  141. package/dist/BrandingOptions-AljW1cXz.cjs +0 -1
  142. package/dist/CanvasArea-dp1tzDkK.cjs +0 -55
  143. package/dist/Class-PoYusiA5.cjs +0 -1
  144. package/dist/CurrentPage-rWHgPomd.cjs +0 -1
  145. package/dist/Functions-7jnEwJyw.js +0 -15
  146. package/dist/Functions-N3yhPYKY.cjs +0 -1
  147. package/dist/ListTree-5n8U4-IF.cjs +0 -1
  148. package/dist/MODIFIERS-0g14w5RS.cjs +0 -1
  149. package/dist/PagesPanel-IkZjy0Gn.js +0 -64
  150. package/dist/PagesPanel-sBN51kKZ.cjs +0 -1
  151. package/dist/ProjectPanel-e98TJLfI.js +0 -85
  152. package/dist/ProjectPanel-lbQH31jc.cjs +0 -1
  153. package/dist/Settings-qytQoyTv.cjs +0 -1
  154. package/dist/SidePanels-YRIM1IPq.cjs +0 -1
  155. package/dist/Topbar-LUyDFBkK.js +0 -129
  156. package/dist/Topbar-NOSnWo7V.cjs +0 -1
  157. package/dist/UnsplashImages-f-ObKOC-.cjs +0 -1
  158. package/dist/UploadImages-oOnccvT9.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-g3fd00P5.cjs +0 -1
  162. package/dist/add-page-modal-yQ6qL6Ui.js +0 -104
  163. package/dist/confirm-alert-3flAvzWH.js +0 -60
  164. package/dist/confirm-alert-LQsGNYz8.cjs +0 -1
  165. package/dist/controls-KK2oLIa8.cjs +0 -1
  166. package/dist/defaultTheme-7VqqhOcp.cjs +0 -1
  167. package/dist/delete-page-modal-iMmkPec0.js +0 -83
  168. package/dist/delete-page-modal-tzZmqGzE.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-LBHtTduy.cjs +0 -1
  172. package/dist/index--dUsFH1I.cjs +0 -1
  173. package/dist/index-HD1UKc4P.js +0 -3079
  174. package/dist/index-YpnaudSM.js +0 -63
  175. package/dist/index-bOWwCMRF.cjs +0 -206
  176. package/dist/index-e0c8PmRQ.js +0 -205
  177. package/dist/index-ecnGWzh9.cjs +0 -1
  178. package/dist/index-fvMaxES9.cjs +0 -1
  179. package/dist/index-gi1LIOCw.cjs +0 -1
  180. package/dist/index-m4WGov7e.js +0 -2202
  181. package/dist/index-uLtBNl55.js +0 -39503
  182. package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
  183. package/dist/page-viewer-5gTszT-n.cjs +0 -1
  184. package/dist/project-general-setting-52CTYL_w.cjs +0 -1
  185. package/dist/project-seo-setting-jTweI1DX.cjs +0 -1
  186. package/dist/single-page-detail-jy2SPcp1.cjs +0 -1
package/dist/lib.js CHANGED
@@ -1,21 +1,20 @@
1
- import { c as _ } from "./Class-lGzsNBOK.js";
2
- import { a as ie } from "./Class-lGzsNBOK.js";
3
- import { g as le, a as pe } from "./Functions-7jnEwJyw.js";
4
- import { g as me } from "./html-to-json-ngX9ef2u.js";
5
- import { first as F, includes as l, keys as d, map as T, parseInt as $, get as p, set as b, startsWith as k, replace as O } from "lodash-es";
6
- import { d as h, a as C, g as I } from "./defaultTheme-D8B4-wHO.js";
7
- import { tailwindcssPaletteGenerator as E } from "@bobthered/tailwindcss-palette-generator";
8
- import { createTailwindcss as V } from "@mhsdesign/jit-browser-tailwindcss";
9
- import A from "@tailwindcss/forms";
1
+ import { c as ie } from "./utils-dze1SGvB.js";
2
+ import { g as oe, a as le } from "./Functions-NzT2Six_.js";
3
+ import { g as xe } from "./html-to-json-2xtb7520.js";
4
+ import { first as $, includes as l, keys as d, map as w, parseInt as S, get as p, set as b, replace as k, startsWith as C } from "lodash-es";
5
+ import { c as O } from "./Class-ahc3NIbq.js";
6
+ import { d as h, g as V, a as I } from "./defaultTheme-4kA60XdB.js";
7
+ import { tailwindcssPaletteGenerator as _ } from "@bobthered/tailwindcss-palette-generator";
8
+ import { createTailwindcss as E } from "@mhsdesign/jit-browser-tailwindcss";
9
+ import P from "@tailwindcss/forms";
10
10
  import L from "@tailwindcss/typography";
11
- import P from "@tailwindcss/aspect-ratio";
12
- import { a as R } from "./STRINGS--j49GZJP.js";
11
+ import v from "@tailwindcss/aspect-ratio";
12
+ import { S as A } from "./STRINGS-b432aBJJ.js";
13
13
  import "clsx";
14
14
  import "tailwind-merge";
15
- import "./MODIFIERS-dytZ-osO.js";
16
15
  import "himalaya";
17
- import "./_commonjsHelpers-UyOWmZb0.js";
18
- const w = {
16
+ import "./MODIFIERS-CNqNUapY.js";
17
+ const T = {
19
18
  25: "1/4",
20
19
  "33.33": "1/3",
21
20
  50: "1/2",
@@ -32,7 +31,7 @@ const w = {
32
31
  "58.33": "7/12",
33
32
  "91.67": "11/12",
34
33
  100: "full"
35
- }, W = {
34
+ }, B = {
36
35
  0: "0",
37
36
  1: "px",
38
37
  2: "0.5",
@@ -68,22 +67,21 @@ const w = {
68
67
  288: "72",
69
68
  320: "80",
70
69
  384: "96"
71
- };
72
- const B = 16, X = 4;
73
- function v(a) {
74
- return a.indexOf("rem") !== -1 && (a = `${parseFloat(a.replace("rem", "")) * B}px`), a;
70
+ }, R = 16, X = 4;
71
+ function Y(a) {
72
+ return a.indexOf("rem") !== -1 && (a = `${parseFloat(a.replace("rem", "")) * R}px`), a;
75
73
  }
76
- const te = (a) => {
77
- const r = a.match(/\[.*\]/);
78
- if (r === null)
74
+ const ae = (a) => {
75
+ const c = a.match(/\[.*\]/);
76
+ if (c === null)
79
77
  return a;
80
- const s = _(a);
78
+ const s = O(a);
81
79
  if (s === null)
82
80
  return a;
83
81
  const { property: n } = s;
84
- let e = F(r).replace(/\]/i, "").replace(/\[/i, "");
85
- const c = a.replace(/\[.*\]/i, "");
86
- e = v(e);
82
+ let e = $(c).replace(/\]/i, "").replace(/\[/i, "");
83
+ const i = a.replace(/\[.*\]/i, "");
84
+ e = Y(e);
87
85
  let t = a;
88
86
  switch (n) {
89
87
  case "top":
@@ -118,23 +116,23 @@ const te = (a) => {
118
116
  case "spaceX":
119
117
  case "spaceY":
120
118
  if (e.indexOf("px") !== -1) {
121
- const o = T(d(W), (i) => `${i}px`);
119
+ const o = w(d(B), (r) => `${r}px`);
122
120
  if (l(o, e)) {
123
- const i = $(e.replace("px", ""), 10);
124
- i === 1 ? t = `${c}px` : t = c + i / X;
121
+ const r = S(e.replace("px", ""), 10);
122
+ r === 1 ? t = `${i}px` : t = i + r / X;
125
123
  }
126
124
  }
127
125
  if (e.indexOf("%") !== -1) {
128
- const o = T(d(w), (i) => `${i}%`);
126
+ const o = w(d(T), (r) => `${r}%`);
129
127
  if (l(o, e)) {
130
- const i = parseFloat(e.replace("%", ""));
131
- t = c + p(w, i);
128
+ const r = parseFloat(e.replace("%", ""));
129
+ t = i + p(T, r);
132
130
  }
133
131
  }
134
- e.indexOf("vw") !== -1 && parseFloat(e.replace("vw", "")) === 100 && (t = `${c}screen`), e.indexOf("vh") !== -1 && parseFloat(e.replace("vh", "")) === 100 && (t = `${c}screen`);
132
+ e.indexOf("vw") !== -1 && parseFloat(e.replace("vw", "")) === 100 && (t = `${i}screen`), e.indexOf("vh") !== -1 && parseFloat(e.replace("vh", "")) === 100 && (t = `${i}screen`);
135
133
  break;
136
134
  case "minWidth":
137
- e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${c}full`), e === "0px" && (t = "min-w-0");
135
+ e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${i}full`), e === "0px" && (t = "min-w-0");
138
136
  break;
139
137
  case "maxWidth":
140
138
  e === "0px" && (t = "max-w-0");
@@ -158,7 +156,7 @@ const te = (a) => {
158
156
  l(d(x), e) && (t = `max-w-${x[e]}`);
159
157
  break;
160
158
  case "minHeight":
161
- e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${c}full`), e === "0px" && (t = "min-h-0"), e === "100vh" && (t = "min-h-screen");
159
+ e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${i}full`), e === "0px" && (t = "min-h-0"), e === "100vh" && (t = "min-h-screen");
162
160
  break;
163
161
  case "fontSize":
164
162
  const f = {
@@ -176,7 +174,7 @@ const te = (a) => {
176
174
  "96px": "8xl",
177
175
  "128px": "9xl"
178
176
  };
179
- l(d(f), e) && (t = c + f[e]);
177
+ l(d(f), e) && (t = i + f[e]);
180
178
  break;
181
179
  case "lineHeight":
182
180
  const m = {
@@ -195,10 +193,10 @@ const te = (a) => {
195
193
  "1.625": "relaxed",
196
194
  2: "loose"
197
195
  };
198
- l(d(m), e) && (t = c + m[e]);
196
+ l(d(m), e) && (t = i + m[e]);
199
197
  break;
200
198
  case "zIndex":
201
- t = ["0", "10", "20", "30", "40", "50"].indexOf(e) !== -1 ? `${c}${e}` : a;
199
+ t = ["0", "10", "20", "30", "40", "50"].indexOf(e) !== -1 ? `${i}${e}` : a;
202
200
  break;
203
201
  case "opacity":
204
202
  const y = [
@@ -220,17 +218,15 @@ const te = (a) => {
220
218
  ], u = parseFloat(e) * 100;
221
219
  l(y, u.toString()) && (t = `opacity-${u}`);
222
220
  break;
223
- default:
224
- break;
225
221
  }
226
222
  return t;
227
223
  };
228
- async function D(a, r, s = [], n = "c-", e = !1) {
229
- const c = p(a, "primaryColor", "#000"), t = p(a, "secondaryColor", "#ccc"), x = p(a, "headingFont", "Inter"), f = p(a, "bodyFont", "Inter"), m = p(a, "roundedCorners", "0"), g = E({
230
- colors: [c, t],
224
+ async function M(a, c, s = [], n = "c-", e = !1) {
225
+ const i = p(a, "primaryColor", "#000"), t = p(a, "secondaryColor", "#ccc"), x = p(a, "headingFont", "Inter"), f = p(a, "bodyFont", "Inter"), m = p(a, "roundedCorners", "0"), g = _({
226
+ colors: [i, t],
231
227
  names: ["primary", "secondary"]
232
228
  });
233
- return b(g, "primary.DEFAULT", c), b(g, "secondary.DEFAULT", t), `${await V({
229
+ return b(g, "primary.DEFAULT", i), b(g, "secondary.DEFAULT", t), `${await E({
234
230
  tailwindConfig: {
235
231
  darkMode: "class",
236
232
  safelist: s,
@@ -246,7 +242,7 @@ async function D(a, r, s = [], n = "c-", e = !1) {
246
242
  colors: g
247
243
  }
248
244
  },
249
- plugins: [A, L, P],
245
+ plugins: [P, L, v],
250
246
  corePlugins: { preflight: e },
251
247
  ...n ? { prefix: `${n}` } : {}
252
248
  }
@@ -254,40 +250,40 @@ async function D(a, r, s = [], n = "c-", e = !1) {
254
250
  ` ${e ? "@tailwind base;" : ""}
255
251
  @tailwind components;
256
252
  @tailwind utilities;`,
257
- r
253
+ c
258
254
  )}
259
255
  .${n}bg-clip-text{background-clip: text;-webkit-background-clip: text;} h1,h2,h3,h4,h5,h6{font-family: "${x}",${h.fontFamily.sans.join(
260
256
  ", "
261
257
  )};}`;
262
258
  }
263
- const U = (a, r) => a.map((s) => {
259
+ const U = (a, c) => a.map((s) => {
264
260
  const n = {};
265
261
  return Object.keys(s).forEach((e) => {
266
- k(s[e], R) && (n[e] = C(s[e], r));
262
+ C(s[e], A) && (n[e] = I(s[e], c));
267
263
  }), n;
268
- }), S = (a, r, s = "c-", n = !1) => {
269
- const e = I(r, s);
270
- return D(
271
- r,
272
- [O(JSON.stringify(U(a, s)), /#styles:/g, "")],
264
+ }), F = (a, c, s = "c-", n = !1) => {
265
+ const e = V(c, s);
266
+ return M(
267
+ c,
268
+ [k(JSON.stringify(U(a, s)), /#styles:/g, "")],
273
269
  e.split(" ").concat(`${s}inline-block`, `${s}w-full`, `${s}h-full`),
274
270
  s,
275
271
  n
276
272
  );
277
- }, se = async (a, r = "c-", s = !1) => {
273
+ }, te = async (a, c = "c-", s = !1) => {
278
274
  const n = a.page.blocks;
279
- return await S(n, a.project.brandingOptions, r, s);
280
- }, ne = async (a, r, s = "c-", n = !1) => await S(a, r, s, n);
275
+ return await F(n, a.project.brandingOptions, c, s);
276
+ }, se = async (a, c, s = "c-", n = !1) => await F(a, c, s, n);
281
277
  export {
282
- C as addPrefixToClasses,
278
+ I as addPrefixToClasses,
283
279
  ie as cn,
284
- te as convertArbitraryToTailwindClass,
285
- le as generateUUID,
286
- me as getBlocksFromHTML,
287
- S as getBlocksTailwindCSS,
288
- I as getBrandingClasses,
289
- pe as getBreakpointValue,
290
- ne as getStylesForBlocks,
291
- se as getStylesForPageData,
292
- D as getTailwindCSS
280
+ ae as convertArbitraryToTailwindClass,
281
+ oe as generateUUID,
282
+ xe as getBlocksFromHTML,
283
+ F as getBlocksTailwindCSS,
284
+ V as getBrandingClasses,
285
+ le as getBreakpointValue,
286
+ se as getStylesForBlocks,
287
+ te as getStylesForPageData,
288
+ M as getTailwindCSS
293
289
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./jsx-runtime-JYMCiFoE.cjs"),m=require("react-icons-picker"),h=require("react-dom"),g=require("lodash-es"),d=require("react"),x=require("./tabs-_4WbA1cc.cjs"),j=require("./ImagesPanel-J1RlG7xG.cjs"),E=require("react-quill");require("react-i18next");const R=require("./skeleton-STeL9VrJ.cjs"),f=s=>{try{const t=document.getElementById("icon-picker-field"),r=document.createElement("div");h.render(e.jsxRuntimeExports.jsx(m.IconPickerItem,{value:s}),r),t.appendChild(r),r.hidden=!0;let o=r.innerHTML;setTimeout(()=>t.removeChild(r),100);const a=new DOMParser().parseFromString(o,"image/svg+xml"),i=a.querySelector("svg");return i&&(i.removeAttribute("width"),i.removeAttribute("height")),new XMLSerializer().serializeToString(a)}catch(t){return console.error(t),""}},v=({value:s,onChange:t})=>{const r=o=>{t("<svg />");const l=f(o);t(l)};return e.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[e.jsxRuntimeExports.jsxs("div",{className:"group relative h-12 w-12",children:[e.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s?s.replace("<svg",'<svg class="h-5 w-5"'):"<svg class='h-5 w-5' />"},className:"absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"}),e.jsxRuntimeExports.jsx(m,{value:s?"BiSolidGrid":null,onChange:r,pickButtonStyle:{position:"relative",height:"48px",width:"48px",border:"1px solid #BBBBBB",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",backgroundColor:"transparent",zIndex:1},searchInputStyle:{backgroundColor:"transparent",width:"100%",border:"1px solid #BBBBBB",margin:"0px 10px",padding:"10px"}})]}),e.jsxRuntimeExports.jsx("textarea",{value:s,onChange:o=>t(o.target.value),className:"h-full w-full rounded-sm border border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",placeholder:"Choose icon or enter svg"})]})},b=({children:s,onSelect:t})=>{const[r,o]=d.useState(!1),l=(...a)=>{t.call(void 0,...a),o(!1)};return e.jsxRuntimeExports.jsxs(x.Dialog,{open:r,onOpenChange:a=>o(a),children:[e.jsxRuntimeExports.jsx(x.DialogTrigger,{asChild:!0,children:s}),e.jsxRuntimeExports.jsx(x.DialogContent,{className:"flex h-3/4 max-w-5xl",children:e.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:e.jsxRuntimeExports.jsx(j.default,{isModalView:!0,onSelect:l})})})]})},p=b,k=({value:s,onChange:t,id:r,onBlur:o})=>e.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[s?e.jsxRuntimeExports.jsx("img",{src:s,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):e.jsxRuntimeExports.jsx(p,{onSelect:t,children:e.jsxRuntimeExports.jsx("div",{className:"h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400"})}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[e.jsxRuntimeExports.jsx(p,{onSelect:t,children:e.jsxRuntimeExports.jsx("small",{className:"cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700",children:s||!g.isEmpty(s)?"Replace Image":"Choose Image"})}),e.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"}),e.jsxRuntimeExports.jsx("input",{type:"url",className:"text-xs",placeholder:"Enter image URL",value:s,onBlur:({target:{value:l}})=>o(r,l),onChange:l=>t(l.target.value)})]})]}),y=({id:s,placeholder:t,value:r,onChange:o,onBlur:l})=>{const a={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},i=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:e.jsxRuntimeExports.jsx(E,{id:s,value:r,onBlur:c=>l(s,c),onChange:c=>o(c),modules:a,formats:i,placeholder:t,className:"mt-1 rounded-md"})},w=({schema:s,formData:t,onChange:r})=>{const[o,l]=d.useState([]),a=R.useBuilderProp("getPages",()=>[]),{type:i="page",href:c="",target:u="self"}=t;return d.useEffect(()=>{(async()=>{const n=await a();l(n||[])})()},[]),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(s==null?void 0:s.title)??"Link"}),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[e.jsxRuntimeExports.jsx("select",{name:"type",value:i,onChange:n=>r({...t,type:n.target.value}),children:[{const:"page",title:"Open Page"},{const:"url",title:"Open URL"},{const:"email",title:"Compose Email"},{const:"telephone",title:"Call Phone"},{const:"scroll",title:"Scroll to element"}].map(n=>e.jsxRuntimeExports.jsx("option",{value:n.const,children:n.title},n.const))}),i==="page"?e.jsxRuntimeExports.jsxs("select",{name:"href",placeholder:"Choose Page",value:c,onChange:n=>r({...t,href:n.target.value}),children:[e.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),g.map(o,n=>e.jsxRuntimeExports.jsx("option",{value:n.slug,children:n.name},n.uuid))]}):e.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:c,onChange:n=>r({...t,href:n.target.value}),placeholder:i==="page"||i==="url"?"Enter URL":i==="scroll"?"#ElementID":"Enter detail"}),(i==="page"||i==="url")&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsxRuntimeExports.jsx("input",{type:"checkbox",defaultChecked:u==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>r({...t,target:u==="_blank"?"_self":"_blank"})}),e.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})};exports.IconPickerField=v;exports.ImagePickerField=k;exports.LinkField=w;exports.RichTextEditorField=y;
@@ -0,0 +1,196 @@
1
+ import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
+ import m, { IconPickerItem as g } from "react-icons-picker";
3
+ import x from "react-dom";
4
+ import { isEmpty as h, map as f } from "lodash-es";
5
+ import { useState as u, useEffect as v } from "react";
6
+ import { D as b, a as j, b as k } from "./tabs-yQ3oGziM.js";
7
+ import y from "./ImagesPanel-Wb0GF_NA.js";
8
+ import w from "react-quill";
9
+ import "react-i18next";
10
+ import { u as N } from "./skeleton-lu8e7q2y.js";
11
+ const B = (r) => {
12
+ try {
13
+ const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
14
+ x.render(/* @__PURE__ */ e.jsx(g, { value: r }), s), t.appendChild(s), s.hidden = !0;
15
+ let n = s.innerHTML;
16
+ setTimeout(() => t.removeChild(s), 100);
17
+ const i = new DOMParser().parseFromString(n, "image/svg+xml"), o = i.querySelector("svg");
18
+ return o && (o.removeAttribute("width"), o.removeAttribute("height")), new XMLSerializer().serializeToString(i);
19
+ } catch (t) {
20
+ return console.error(t), "";
21
+ }
22
+ }, z = ({ value: r, onChange: t }) => {
23
+ const s = (n) => {
24
+ t("<svg />");
25
+ const a = B(n);
26
+ t(a);
27
+ };
28
+ return /* @__PURE__ */ e.jsxs("div", { className: "mt-1 flex h-20 items-center gap-x-2", id: "icon-picker-field", children: [
29
+ /* @__PURE__ */ e.jsxs("div", { className: "group relative h-12 w-12", children: [
30
+ /* @__PURE__ */ e.jsx(
31
+ "div",
32
+ {
33
+ dangerouslySetInnerHTML: {
34
+ __html: r ? r.replace("<svg", '<svg class="h-5 w-5"') : "<svg class='h-5 w-5' />"
35
+ },
36
+ className: "absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ e.jsx(
40
+ m,
41
+ {
42
+ value: r ? "BiSolidGrid" : null,
43
+ onChange: s,
44
+ pickButtonStyle: {
45
+ position: "relative",
46
+ height: "48px",
47
+ width: "48px",
48
+ border: "1px solid #BBBBBB",
49
+ display: "flex",
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ borderRadius: "6px",
53
+ backgroundColor: "transparent",
54
+ zIndex: 1
55
+ },
56
+ searchInputStyle: {
57
+ backgroundColor: "transparent",
58
+ width: "100%",
59
+ border: "1px solid #BBBBBB",
60
+ margin: "0px 10px",
61
+ padding: "10px"
62
+ }
63
+ }
64
+ )
65
+ ] }),
66
+ /* @__PURE__ */ e.jsx(
67
+ "textarea",
68
+ {
69
+ value: r,
70
+ onChange: (n) => t(n.target.value),
71
+ className: "h-full w-full rounded-sm border border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",
72
+ placeholder: "Choose icon or enter svg"
73
+ }
74
+ )
75
+ ] });
76
+ }, C = ({ children: r, onSelect: t }) => {
77
+ const [s, n] = u(!1), a = (...i) => {
78
+ t.call(void 0, ...i), n(!1);
79
+ };
80
+ return /* @__PURE__ */ e.jsxs(b, { open: s, onOpenChange: (i) => n(i), children: [
81
+ /* @__PURE__ */ e.jsx(j, { asChild: !0, children: r }),
82
+ /* @__PURE__ */ e.jsx(k, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ e.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ e.jsx(y, { isModalView: !0, onSelect: a }) }) })
83
+ ] });
84
+ }, p = C, A = ({ value: r, onChange: t, id: s, onBlur: n }) => /* @__PURE__ */ e.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
85
+ r ? /* @__PURE__ */ e.jsx("img", { src: r, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ e.jsx(p, { onSelect: t, children: /* @__PURE__ */ e.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
86
+ /* @__PURE__ */ e.jsxs("div", { className: "flex w-3/5 flex-col", children: [
87
+ /* @__PURE__ */ e.jsx(p, { onSelect: t, children: /* @__PURE__ */ e.jsx("small", { className: "cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700", children: r || !h(r) ? "Replace Image" : "Choose Image" }) }),
88
+ /* @__PURE__ */ e.jsx("small", { className: "-pl-4 pt-2 text-center text-xs text-gray-600", children: "OR" }),
89
+ /* @__PURE__ */ e.jsx(
90
+ "input",
91
+ {
92
+ type: "url",
93
+ className: "text-xs",
94
+ placeholder: "Enter image URL",
95
+ value: r,
96
+ onBlur: ({ target: { value: a } }) => n(s, a),
97
+ onChange: (a) => t(a.target.value)
98
+ }
99
+ )
100
+ ] })
101
+ ] }), F = ({ id: r, placeholder: t, value: s, onChange: n, onBlur: a }) => {
102
+ const i = {
103
+ toolbar: [
104
+ ["bold", "italic", "underline", "strike", "blockquote"],
105
+ [{ list: "ordered" }, { list: "bullet" }],
106
+ [{ color: [] }, { background: [] }, { align: [] }],
107
+ ["link", "clean"]
108
+ ]
109
+ }, o = [
110
+ "header",
111
+ "font",
112
+ "list",
113
+ "bold",
114
+ "italic",
115
+ "underline",
116
+ "strike",
117
+ "blockquote",
118
+ "color",
119
+ "background",
120
+ "align",
121
+ "link",
122
+ "image"
123
+ ];
124
+ return typeof window > "u" ? null : /* @__PURE__ */ e.jsx(
125
+ w,
126
+ {
127
+ id: r,
128
+ value: s,
129
+ onBlur: (c) => a(r, c),
130
+ onChange: (c) => n(c),
131
+ modules: i,
132
+ formats: o,
133
+ placeholder: t,
134
+ className: "mt-1 rounded-md"
135
+ }
136
+ );
137
+ }, D = ({ schema: r, formData: t, onChange: s }) => {
138
+ const [n, a] = u([]), i = N("getPages", () => []), { type: o = "page", href: c = "", target: d = "self" } = t;
139
+ return v(() => {
140
+ (async () => {
141
+ const l = await i();
142
+ a(l || []);
143
+ })();
144
+ }, []), /* @__PURE__ */ e.jsxs("div", { children: [
145
+ /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium", children: (r == null ? void 0 : r.title) ?? "Link" }),
146
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-y-1.5", children: [
147
+ /* @__PURE__ */ e.jsx("select", { name: "type", value: o, onChange: (l) => s({ ...t, type: l.target.value }), children: [
148
+ { const: "page", title: "Open Page" },
149
+ { const: "url", title: "Open URL" },
150
+ { const: "email", title: "Compose Email" },
151
+ { const: "telephone", title: "Call Phone" },
152
+ { const: "scroll", title: "Scroll to element" }
153
+ ].map((l) => /* @__PURE__ */ e.jsx("option", { value: l.const, children: l.title }, l.const)) }),
154
+ o === "page" ? /* @__PURE__ */ e.jsxs(
155
+ "select",
156
+ {
157
+ name: "href",
158
+ placeholder: "Choose Page",
159
+ value: c,
160
+ onChange: (l) => s({ ...t, href: l.target.value }),
161
+ children: [
162
+ /* @__PURE__ */ e.jsx("option", { value: "", children: "Choose page" }),
163
+ f(n, (l) => /* @__PURE__ */ e.jsx("option", { value: l.slug, children: l.name }, l.uuid))
164
+ ]
165
+ }
166
+ ) : /* @__PURE__ */ e.jsx(
167
+ "input",
168
+ {
169
+ name: "href",
170
+ type: "text",
171
+ value: c,
172
+ onChange: (l) => s({ ...t, href: l.target.value }),
173
+ placeholder: o === "page" || o === "url" ? "Enter URL" : o === "scroll" ? "#ElementID" : "Enter detail"
174
+ }
175
+ ),
176
+ (o === "page" || o === "url") && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
177
+ /* @__PURE__ */ e.jsx(
178
+ "input",
179
+ {
180
+ type: "checkbox",
181
+ defaultChecked: d === "_blank",
182
+ className: "cursor-pointer rounded-md border border-border",
183
+ onChange: () => s({ ...t, target: d === "_blank" ? "_self" : "_blank" })
184
+ }
185
+ ),
186
+ /* @__PURE__ */ e.jsx("span", { className: "pt-1 text-xs", children: "Open in new tab" })
187
+ ] })
188
+ ] })
189
+ ] });
190
+ };
191
+ export {
192
+ z as I,
193
+ D as L,
194
+ F as R,
195
+ A as a
196
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),n=require("react"),u=require("@radix-ui/react-icons"),o=require("./popover-fKjgcRUx.cjs"),x=require("./index-9MmykVSc.cjs");require("@radix-ui/react-popover");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("lodash-es");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 m=n.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-beY0MT1b.cjs"))),j=({pageData:s})=>{const[r,t]=n.useState("CLOSE");return e.jsxRuntimeExports.jsxs(o.Popover,{open:r==="OPEN"||r==="ALERT"||r==="PENDING",onOpenChange:i=>{t(r==="PENDING"?"ALERT":i?"OPEN":"CLOSE")},children:[e.jsxRuntimeExports.jsx(o.PopoverTrigger,{asChild:!0,onClick:i=>{i.stopPropagation(),t("OPEN")},children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:r==="OPEN"||r==="ALERT"||r==="PENDING"?e.jsxRuntimeExports.jsx(u.ChevronRightIcon,{}):e.jsxRuntimeExports.jsx("div",{className:"hidden hover:text-blue-600 group-hover:flex",children:e.jsxRuntimeExports.jsx(u.GearIcon,{})})})}),e.jsxRuntimeExports.jsx(o.PopoverContent,{side:"right",align:"start",alignOffset:-35,className:"h-screen w-96",children:e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex w-full animate-pulse flex-col gap-y-3",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-6 w-1/2"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"})]}),children:e.jsxRuntimeExports.jsx(m,{pageData:s,open:r,setOpen:t})})})]})},p=s=>{const[r]=x.useCurrentPage(),{data:t}=x.useProject(),i=x.useChangePage(),l=(t==null?void 0:t.homepage)===s.uuid,a=r===s.uuid,c=()=>i(s);return t?e.jsxRuntimeExports.jsxs("button",{className:`group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${a?"bg-blue-200 ":""}`,onClick:c,type:"button",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex text-sm items-center gap-x-1.5",children:[l?e.jsxRuntimeExports.jsx(u.HomeIcon,{}):e.jsxRuntimeExports.jsx(u.FileTextIcon,{})," ",s.name]}),e.jsxRuntimeExports.jsx(j,{pageData:s})]}):null},d=({pages:s,isLoading:r})=>r?e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-1 px-2.5 pt-2",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"})]}):s.length===0?e.jsxRuntimeExports.jsx("div",{className:"px-2.5 pb-2 pt-4",children:"No pages"}):e.jsxRuntimeExports.jsx("div",{className:"-mb-2",children:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(p,{...t})))});exports.default=d;
@@ -1,110 +1,96 @@
1
- import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import s, { useState as p, Suspense as l } from "react";
3
- import { ChevronRightIcon as c, GearIcon as u, HomeIcon as d, FileTextIcon as x } from "@radix-ui/react-icons";
4
- import { aV as g, aW as h, aX as f } from "./index-HD1UKc4P.js";
5
- import { d as j, a as N, c as b } from "./index-m4WGov7e.js";
6
- import "./_commonjsHelpers-UyOWmZb0.js";
7
- import "lodash-es";
8
- import "./Functions-7jnEwJyw.js";
1
+ import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
+ import o, { useState as m, Suspense as c } from "react";
3
+ import { HomeIcon as p, FileTextIcon as u, ChevronRightIcon as d, GearIcon as x } from "@radix-ui/react-icons";
4
+ import { P as g, a as h, b as f } from "./popover-a84pbVhQ.js";
5
+ import { d as j, a as N, c as b } from "./index-hElOGcFr.js";
6
+ import "@radix-ui/react-popover";
7
+ import "./utils-dze1SGvB.js";
9
8
  import "clsx";
10
9
  import "tailwind-merge";
11
- import "@chaibuilder/runtime";
12
- import "jotai";
13
- import "./STRINGS--j49GZJP.js";
14
- import "@react-hookz/web";
15
- import "./MODIFIERS-dytZ-osO.js";
16
- import "@radix-ui/react-toggle";
17
- import "class-variance-authority";
18
- import "./Class-lGzsNBOK.js";
19
- import "@radix-ui/react-switch";
20
- import "@radix-ui/react-slot";
21
- import "@radix-ui/react-accordion";
22
- import "@radix-ui/react-alert-dialog";
23
- import "@radix-ui/react-dialog";
24
- import "@radix-ui/react-label";
10
+ import "./ChaiBuilderEditor-vP4at00I.js";
11
+ import "./MODIFIERS-CNqNUapY.js";
25
12
  import "@radix-ui/react-scroll-area";
26
- import "@radix-ui/react-tabs";
27
- import "@radix-ui/react-tooltip";
28
- import "@radix-ui/react-popover";
29
- import "@radix-ui/react-menubar";
30
- import "@radix-ui/react-hover-card";
31
- import "@radix-ui/react-select";
32
- import "@radix-ui/react-dropdown-menu";
33
- import "@radix-ui/react-separator";
34
- import "@radix-ui/react-toast";
35
- import "cmdk";
36
- import "@radix-ui/react-context-menu";
37
- import "react-icons-picker";
38
13
  import "react-dom";
39
- import "react-quill";
40
- import "react-i18next";
41
- import "./index-uLtBNl55.js";
42
- import "i18next";
43
14
  import "@floating-ui/react-dom";
15
+ import "jotai";
16
+ import "i18next";
17
+ import "react-i18next";
44
18
  import "flagged";
19
+ import "lodash-es";
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";
45
26
  import "react-hotkeys-hook";
27
+ import "@react-hookz/web";
28
+ import "@chaibuilder/runtime";
46
29
  import "sonner";
47
- import "./html-to-json-ngX9ef2u.js";
30
+ import "./html-to-json-2xtb7520.js";
48
31
  import "himalaya";
32
+ import "./STRINGS-b432aBJJ.js";
49
33
  import "lucide-react";
50
- import "./index-YpnaudSM.js";
51
- const v = s.lazy(() => import("./single-page-detail-q2TDxN-P.js")), P = ({ pageData: r }) => {
52
- const [t, i] = p("CLOSE");
34
+ import "./iconBase-h4DuR_XT.js";
35
+ import "./alert-dialog-rypfO5ly.js";
36
+ import "@radix-ui/react-alert-dialog";
37
+ const P = o.lazy(() => import("./single-page-detail-hD1jKZ8k.js")), v = ({ pageData: r }) => {
38
+ const [t, s] = m("CLOSE");
53
39
  return /* @__PURE__ */ e.jsxs(
54
40
  g,
55
41
  {
56
42
  open: t === "OPEN" || t === "ALERT" || t === "PENDING",
57
- onOpenChange: (o) => {
58
- i(t === "PENDING" ? "ALERT" : o ? "OPEN" : "CLOSE");
43
+ onOpenChange: (i) => {
44
+ s(t === "PENDING" ? "ALERT" : i ? "OPEN" : "CLOSE");
59
45
  },
60
46
  children: [
61
47
  /* @__PURE__ */ e.jsx(
62
48
  h,
63
49
  {
64
50
  asChild: !0,
65
- onClick: (o) => {
66
- o.stopPropagation(), i("OPEN");
51
+ onClick: (i) => {
52
+ i.stopPropagation(), s("OPEN");
67
53
  },
68
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between", children: t === "OPEN" || t === "ALERT" || t === "PENDING" ? /* @__PURE__ */ e.jsx(c, {}) : /* @__PURE__ */ e.jsx("div", { className: "hidden hover:text-blue-600 group-hover:flex", children: /* @__PURE__ */ e.jsx(u, {}) }) })
54
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between", children: t === "OPEN" || t === "ALERT" || t === "PENDING" ? /* @__PURE__ */ e.jsx(d, {}) : /* @__PURE__ */ e.jsx("div", { className: "hidden hover:text-blue-600 group-hover:flex", children: /* @__PURE__ */ e.jsx(x, {}) }) })
69
55
  }
70
56
  ),
71
57
  /* @__PURE__ */ e.jsx(f, { side: "right", align: "start", alignOffset: -35, className: "h-screen w-96", children: /* @__PURE__ */ e.jsx(
72
- l,
58
+ c,
73
59
  {
74
60
  fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full animate-pulse flex-col gap-y-3", children: [
75
61
  /* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-6 w-1/2" }),
76
62
  /* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" }),
77
63
  /* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" })
78
64
  ] }),
79
- children: /* @__PURE__ */ e.jsx(v, { pageData: r, open: t, setOpen: i })
65
+ children: /* @__PURE__ */ e.jsx(P, { pageData: r, open: t, setOpen: s })
80
66
  }
81
67
  ) })
82
68
  ]
83
69
  }
84
70
  );
85
71
  }, E = (r) => {
86
- const [t] = j(), { data: i } = N(), o = b(), a = (i == null ? void 0 : i.homepage) === r.uuid, m = t === r.uuid, n = () => o(r);
87
- return i ? /* @__PURE__ */ e.jsxs(
72
+ const [t] = j(), { data: s } = N(), i = b(), a = (s == null ? void 0 : s.homepage) === r.uuid, n = t === r.uuid, l = () => i(r);
73
+ return s ? /* @__PURE__ */ e.jsxs(
88
74
  "button",
89
75
  {
90
- className: `group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${m ? "bg-blue-200 " : ""}`,
91
- onClick: n,
76
+ className: `group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${n ? "bg-blue-200 " : ""}`,
77
+ onClick: l,
92
78
  type: "button",
93
79
  children: [
94
80
  /* @__PURE__ */ e.jsxs("div", { className: "flex text-sm items-center gap-x-1.5", children: [
95
- a ? /* @__PURE__ */ e.jsx(d, {}) : /* @__PURE__ */ e.jsx(x, {}),
81
+ a ? /* @__PURE__ */ e.jsx(p, {}) : /* @__PURE__ */ e.jsx(u, {}),
96
82
  " ",
97
83
  r.name
98
84
  ] }),
99
- /* @__PURE__ */ e.jsx(P, { pageData: r })
85
+ /* @__PURE__ */ e.jsx(v, { pageData: r })
100
86
  ]
101
87
  }
102
88
  ) : null;
103
- }, be = ({ pages: r, isLoading: t }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-1 px-2.5 pt-2", children: [
89
+ }, ae = ({ pages: r, isLoading: t }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-1 px-2.5 pt-2", children: [
104
90
  /* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
105
91
  /* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
106
92
  /* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" })
107
- ] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children: s.Children.toArray(r.map((i) => /* @__PURE__ */ e.jsx(E, { ...i }))) });
93
+ ] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children: o.Children.toArray(r.map((s) => /* @__PURE__ */ e.jsx(E, { ...s }))) });
108
94
  export {
109
- be as default
95
+ ae as default
110
96
  };
@@ -0,0 +1,23 @@
1
+ import { j as t } from "./jsx-runtime-Sp0orL4X.js";
2
+ import * as i from "react";
3
+ import * as o from "@radix-ui/react-popover";
4
+ import { c as n } from "./utils-dze1SGvB.js";
5
+ const l = o.Root, c = o.Trigger, m = i.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...s }, d) => /* @__PURE__ */ t.jsx(o.Portal, { children: /* @__PURE__ */ t.jsx(
6
+ o.Content,
7
+ {
8
+ ref: d,
9
+ align: a,
10
+ sideOffset: r,
11
+ className: n(
12
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
13
+ e
14
+ ),
15
+ ...s
16
+ }
17
+ ) }));
18
+ m.displayName = o.Content.displayName;
19
+ export {
20
+ l as P,
21
+ c as a,
22
+ m as b
23
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./jsx-runtime-JYMCiFoE.cjs"),c=require("react"),p=require("@radix-ui/react-popover"),l=require("./utils-qK_SjzzV.cjs");function i(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=i(c),r=i(p),u=r.Root,f=r.Trigger,s=m.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},d)=>n.jsxRuntimeExports.jsx(r.Portal,{children:n.jsxRuntimeExports.jsx(r.Content,{ref:d,align:o,sideOffset:t,className:l.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));s.displayName=r.Content.displayName;exports.Popover=u;exports.PopoverContent=s;exports.PopoverTrigger=f;