@chaibuilder/sdk 4.0.0-beta.2 → 4.0.0-beta.4

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/dist/{2SSKDMRQ-C4VFVd-q.cjs → 2SSKDMRQ-CopJgtZb.cjs} +1 -1
  2. package/dist/{2SSKDMRQ-DSnzF_1o.js → 2SSKDMRQ-Difo_1pg.js} +2 -2
  3. package/dist/{AP7HFJJL-Cxwj01Aq.js → AP7HFJJL-BPuPBqj4.js} +1 -1
  4. package/dist/{AP7HFJJL-B7YYCY9q.cjs → AP7HFJJL-DYxDgaOs.cjs} +1 -1
  5. package/dist/{IconPicker-RqVvq6G2.js → IconPicker-B2-oriq2.js} +8 -7
  6. package/dist/IconPicker-C0oycHbs.cjs +1 -0
  7. package/dist/{WDYDFRGG-b3T2SQbz.cjs → WDYDFRGG-DbejaRPK.cjs} +1 -1
  8. package/dist/{WDYDFRGG-C7aSUcjs.js → WDYDFRGG-KK8pkcW1.js} +2 -2
  9. package/dist/{actions-registery-YnFmU21O.cjs → actions-registery-JdxhXhT6.cjs} +1 -1
  10. package/dist/{actions-registery-CZ1w0NKa.js → actions-registery-y_ENc8zj.js} +2 -2
  11. package/dist/actions.cjs +1 -1
  12. package/dist/actions.js +2 -2
  13. package/dist/active-in-another-tab-Cu_ASKtx.cjs +1 -0
  14. package/dist/active-in-another-tab-DkR2HWI4.js +35 -0
  15. package/dist/add-new-language-page-BXuwluuU.cjs +1 -0
  16. package/dist/{add-new-language-page-D7NDABl1.js → add-new-language-page-CBY0RR6q.js} +54 -53
  17. package/dist/{add-new-page-BNfwKjRd.cjs → add-new-page-C_PzKby8.cjs} +1 -1
  18. package/dist/{add-new-page-B4hc0B-g.js → add-new-page-DJLJFLAd.js} +2 -2
  19. package/dist/{ai-panel-content-BnbURb7j.js → ai-panel-content--YM01Aly.js} +12 -11
  20. package/dist/ai-panel-content-rRmJdH7L.cjs +1 -0
  21. package/dist/{ai-panel-default-lang-oVk4TDeb.js → ai-panel-default-lang-BZl0tPYo.js} +40 -40
  22. package/dist/{ai-panel-default-lang-3tCHzab5.cjs → ai-panel-default-lang-D2zhXvKP.cjs} +2 -2
  23. package/dist/{ai-panel-other-lang-DmQ3QMDD.js → ai-panel-other-lang-Bfjk2CYZ.js} +8 -8
  24. package/dist/{ai-panel-other-lang-BBHCCSen.cjs → ai-panel-other-lang-Y4bEKHoG.cjs} +1 -1
  25. package/dist/{ai-prompt-input-DaTyfib-.js → ai-prompt-input-DueQYNf-.js} +68 -67
  26. package/dist/ai-prompt-input-N9PcYCFa.cjs +1 -0
  27. package/dist/{ai-translation-prompt-DJPe2O-n.js → ai-translation-prompt-B36F3d7K.js} +2 -2
  28. package/dist/ai-translation-prompt-IAdWMNZb.cjs +1 -0
  29. package/dist/{apply-binding-6iwlED02.js → apply-binding-BvWfJCSZ.js} +204 -196
  30. package/dist/apply-binding-IsUf6UWJ.cjs +1 -0
  31. package/dist/{code-display-BzBq5xSn.js → code-display-Ck81Id9K.js} +1 -1
  32. package/dist/code-display-DloSPyPr.cjs +1 -0
  33. package/dist/{code-editor-DWWnphW9.js → code-editor-Bb7JumZy.js} +11 -10
  34. package/dist/code-editor-DQB8lAOk.cjs +1 -0
  35. package/dist/{continue-editing-in-this-client-BllU94XG.js → continue-editing-in-this-client-Dm9cCj7K.js} +10 -9
  36. package/dist/continue-editing-in-this-client-DmGFLHXw.cjs +1 -0
  37. package/dist/core-Dr7QYemB.js +56 -0
  38. package/dist/core-Y0lXLwkq.cjs +1 -0
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.d.ts +3 -3
  41. package/dist/core.js +41 -39
  42. package/dist/{css-import-modal-D72a-16X.js → css-import-modal-9P_0uNa4.js} +4 -3
  43. package/dist/css-import-modal-Rh1QAVxo.cjs +13 -0
  44. package/dist/{delete-design-token-D_TLlO3I.cjs → delete-design-token-BG8yHcS5.cjs} +1 -1
  45. package/dist/{delete-design-token-Cd1ZDtqT.js → delete-design-token-COvR4G1S.js} +1 -1
  46. package/dist/{delete-page-DC8pzvWW.js → delete-page-CNucxe4P.js} +11 -10
  47. package/dist/delete-page-DAvEjHwF.cjs +1 -0
  48. package/dist/design-token-usage-CXglXgcJ.cjs +1 -0
  49. package/dist/{design-token-usage-DE4XCDdn.js → design-token-usage-MNYsFlPG.js} +14 -13
  50. package/dist/digital-asset-manager-CB5MRBcW.cjs +1 -0
  51. package/dist/{digital-asset-manager-C_gL_0YY.js → digital-asset-manager-CqCWBO0s.js} +6 -5
  52. package/dist/{duplicate-page-BoVhko2q.js → duplicate-page-BknLfqr0.js} +19 -18
  53. package/dist/duplicate-page-DzZByALW.cjs +1 -0
  54. package/dist/{dynamic-page-selector-CSndg2-y.js → dynamic-page-selector-DoW7OyUB.js} +15 -14
  55. package/dist/dynamic-page-selector-WA007Sni.cjs +1 -0
  56. package/dist/get-chai-builder-tailwind-config-BFePCEIS.cjs +1 -0
  57. package/dist/{get-chai-builder-tailwind-config-DjoVOuAf.js → get-chai-builder-tailwind-config-BXf_xLHk.js} +5 -5
  58. package/dist/{get-chai-builder-theme-Dl72X7cz.cjs → get-chai-builder-theme-BApShjRz.cjs} +1 -1
  59. package/dist/{get-chai-builder-theme-BYtp20KD.js → get-chai-builder-theme-DDVRJQ6Z.js} +1 -1
  60. package/dist/{image-editor-oypq8asR.js → image-editor-CQnNtak2.js} +1 -1
  61. package/dist/{image-editor-DTspjj_c.cjs → image-editor-CqwaVxO2.cjs} +1 -1
  62. package/dist/index-C0-pgg_p.cjs +5 -0
  63. package/dist/index-C99FhuF1.cjs +160 -0
  64. package/dist/{index-BDnwJqMw.js → index-Dno42B0a.js} +716 -714
  65. package/dist/{index-S8ibZk9Q.js → index-rAcNbjk_.js} +3744 -3920
  66. package/dist/{json-diff-viewer-XX1pgabt.cjs → json-diff-viewer-CLuUHiPU.cjs} +3 -3
  67. package/dist/{json-diff-viewer-B5dr-Y_L.js → json-diff-viewer-CMvGUvJ2.js} +5 -4
  68. package/dist/{lang-panel-Cn83SRzd.js → lang-panel-CnwTb05j.js} +15 -14
  69. package/dist/lang-panel-fDCYm5Jm.cjs +1 -0
  70. package/dist/{manage-design-tokens-lP4HLS0P.js → manage-design-tokens-BsSZE9Vs.js} +12 -11
  71. package/dist/manage-design-tokens-BvH5KTJX.cjs +1 -0
  72. package/dist/mark-as-template-CpWEBJGd.cjs +1 -0
  73. package/dist/{mark-as-template-jncsjfHm.js → mark-as-template-DBLshWb5.js} +17 -16
  74. package/dist/{nested-path-selector-content-B-8LqhXI.js → nested-path-selector-content-6OBJ8LG8.js} +24 -23
  75. package/dist/nested-path-selector-content-C2sD9dkq.cjs +1 -0
  76. package/dist/no-language-page-content-BvPDdccK.cjs +1 -0
  77. package/dist/{no-language-page-content-D_zd9Rb0.js → no-language-page-content-CzENgtnu.js} +10 -9
  78. package/dist/{no-language-page-dialog-C5Ps6YYL.js → no-language-page-dialog-CbYI2cVg.js} +2 -2
  79. package/dist/{no-language-page-dialog-fXmbQO7L.cjs → no-language-page-dialog-CgW4yJBC.cjs} +1 -1
  80. package/dist/{page-creator-wCMtlE6Z.js → page-creator-Cc83uQqw.js} +113 -112
  81. package/dist/page-creator-g8GqgcKH.cjs +1 -0
  82. package/dist/{page-lock-BPCxfv9J.js → page-lock-BJUkyxdh.js} +2 -2
  83. package/dist/{page-lock-DweiYy1w.cjs → page-lock-CT7SmQqp.cjs} +1 -1
  84. package/dist/page-locked-dialog-Co5b9XIZ.cjs +1 -0
  85. package/dist/{page-locked-dialog-ByGl18_m.js → page-locked-dialog-DsEbWRed.js} +18 -15
  86. package/dist/{page-manager-new-BWFE-S-O.js → page-manager-new-5rFP5DyQ.js} +30 -29
  87. package/dist/page-manager-new-BOkJImo2.cjs +1 -0
  88. package/dist/page-manager-search-and-filter-Bfm0j1gg.cjs +1 -0
  89. package/dist/{page-manager-search-and-filter-kNJFWJ86.js → page-manager-search-and-filter-zq-LfhQ1.js} +13 -12
  90. package/dist/{page-revisions-content-Ulr8slUN.js → page-revisions-content-D38G2tJM.js} +34 -31
  91. package/dist/page-revisions-content-ag-MHBGr.cjs +1 -0
  92. package/dist/pages.cjs +1 -1
  93. package/dist/pages.d.ts +22 -23
  94. package/dist/pages.js +12 -12
  95. package/dist/{plugin-C6rgJDNQ.cjs → plugin-BGlQf0iy.cjs} +1 -1
  96. package/dist/{plugin-3ZKK6RXm.js → plugin-C-ht41UZ.js} +1 -1
  97. package/dist/publish-pages-content-BiX-GMLw.cjs +1 -0
  98. package/dist/{publish-pages-content-BTPzt_m4.js → publish-pages-content-CS7f41Ac.js} +66 -65
  99. package/dist/register-chai-top-bar-BqwKw4uy.cjs +1 -0
  100. package/dist/register-chai-top-bar-ESJHs5s-.js +237 -0
  101. package/dist/render.cjs +2 -2
  102. package/dist/render.d.ts +2 -2
  103. package/dist/render.js +87 -80
  104. package/dist/rte-widget-modal-BKNx2wln.cjs +1 -0
  105. package/dist/{rte-widget-modal-Rk_NW3KU.js → rte-widget-modal-D6Zik0Ta.js} +15 -14
  106. package/dist/runtime.cjs +1 -1
  107. package/dist/runtime.d.ts +168 -4
  108. package/dist/runtime.js +68 -38
  109. package/dist/{save-to-lib-BK3uTFss.js → save-to-lib-WwOzbgiF.js} +39 -38
  110. package/dist/save-to-lib-ffjCZYJ5.cjs +1 -0
  111. package/dist/sdk.css +1 -1
  112. package/dist/{selected-block-display-CU3TwIMA.js → selected-block-display-B1SG_UXw.js} +37 -36
  113. package/dist/selected-block-display-BOgnQRLF.cjs +16 -0
  114. package/dist/{seo-panel-jbzxFioc.js → seo-panel-BkOgRoWd.js} +12 -11
  115. package/dist/seo-panel-FjS1UF_y.cjs +2 -0
  116. package/dist/{shared-json-ld-BL_dv3_q.js → shared-json-ld-uka9TOgA.js} +68 -67
  117. package/dist/shared-json-ld-yJkXjENy.cjs +1 -0
  118. package/dist/slug-input-Cyd6NR6J.cjs +1 -0
  119. package/dist/{slug-input-1qwKkXhA.js → slug-input-DHLmUNrH.js} +9 -8
  120. package/dist/supabase-actions.cjs +1 -1
  121. package/dist/supabase-actions.d.ts +1 -1
  122. package/dist/supabase-actions.js +1 -1
  123. package/dist/{take-over-request-DKvKi3mM.js → take-over-request-Ca0X-qyf.js} +17 -16
  124. package/dist/take-over-request-CmpJVe9T.cjs +1 -0
  125. package/dist/{theme-panel-footer-DbMDLYGI.js → theme-panel-footer-BUXIu252.js} +11 -10
  126. package/dist/theme-panel-footer-CKO9YYwZ.cjs +1 -0
  127. package/dist/{translation-warning-modal-9wTwIy_9.js → translation-warning-modal-DrpFeI83.js} +9 -8
  128. package/dist/translation-warning-modal-pSZVKcNW.cjs +1 -0
  129. package/dist/{unmark-as-template-Dulvf7Zw.js → unmark-as-template-BMqgelv-.js} +11 -10
  130. package/dist/unmark-as-template-DF1Ms4VN.cjs +1 -0
  131. package/dist/unpublish-page-BJ0Bsvt2.js +28 -0
  132. package/dist/unpublish-page-Bsq2yEqQ.cjs +1 -0
  133. package/dist/utils.cjs +1 -1
  134. package/dist/utils.d.ts +4 -1
  135. package/dist/utils.js +2 -2
  136. package/dist/web-blocks.cjs +1 -1
  137. package/dist/web-blocks.js +5 -5
  138. package/dist/{web-preview-DXE4Jnf5.js → web-preview-D6h1L2nV.js} +2 -2
  139. package/dist/web-preview-kres0aG7.cjs +1 -0
  140. package/package.json +4 -2
  141. package/dist/IconPicker-C9-ieDWm.cjs +0 -1
  142. package/dist/active-in-another-tab-Clng6zpY.cjs +0 -1
  143. package/dist/active-in-another-tab-wb8qolB8.js +0 -34
  144. package/dist/add-new-language-page-C4BuMTaN.cjs +0 -1
  145. package/dist/ai-panel-content-DPy2jgKw.cjs +0 -1
  146. package/dist/ai-prompt-input-b5ty81RB.cjs +0 -1
  147. package/dist/ai-translation-prompt-c0Q3zkT2.cjs +0 -1
  148. package/dist/apply-binding-KKp5PnpZ.cjs +0 -1
  149. package/dist/code-display-Q3_sK_Ta.cjs +0 -1
  150. package/dist/code-editor-BQZi6-FB.cjs +0 -1
  151. package/dist/continue-editing-in-this-client-D9HyD4GP.cjs +0 -1
  152. package/dist/core-BoRDjj4h.cjs +0 -1
  153. package/dist/core-yvI6kCyw.js +0 -56
  154. package/dist/css-import-modal-BSMGKA2T.cjs +0 -13
  155. package/dist/delete-page-ByQwBupJ.cjs +0 -1
  156. package/dist/design-token-usage-BqZeR1sT.cjs +0 -1
  157. package/dist/digital-asset-manager-BYLKFEYi.cjs +0 -1
  158. package/dist/duplicate-page-vdvwLQLo.cjs +0 -1
  159. package/dist/dynamic-page-selector-DdnbCuQZ.cjs +0 -1
  160. package/dist/get-chai-builder-tailwind-config-B9rCyiQo.cjs +0 -1
  161. package/dist/index-CbwxUFy_.cjs +0 -5
  162. package/dist/index-CnSjWE1P.cjs +0 -160
  163. package/dist/lang-panel-BPxex-M2.cjs +0 -1
  164. package/dist/manage-design-tokens-ConiyuPr.cjs +0 -1
  165. package/dist/mark-as-template-DYRxre1f.cjs +0 -1
  166. package/dist/nested-path-selector-content-BYtLi7mC.cjs +0 -1
  167. package/dist/no-language-page-content-DAbLq0gX.cjs +0 -1
  168. package/dist/page-creator-VWIB2VAs.cjs +0 -1
  169. package/dist/page-locked-dialog-BlbgvaG2.cjs +0 -1
  170. package/dist/page-manager-new-D0lGfNnS.cjs +0 -1
  171. package/dist/page-manager-search-and-filter-DpGMoOII.cjs +0 -1
  172. package/dist/page-revisions-content-DYxXZqmh.cjs +0 -1
  173. package/dist/publish-pages-content-D6g8GAsd.cjs +0 -1
  174. package/dist/rte-widget-modal-DrMzWWjw.cjs +0 -1
  175. package/dist/save-to-lib-DHHUO12i.cjs +0 -1
  176. package/dist/selected-block-display-DSFhddPj.cjs +0 -16
  177. package/dist/seo-panel-Dl0IDV09.cjs +0 -2
  178. package/dist/shared-json-ld-DPNkqDC1.cjs +0 -1
  179. package/dist/slug-input-YVLjtTI3.cjs +0 -1
  180. package/dist/take-over-request-DvMIg_cZ.cjs +0 -1
  181. package/dist/theme-panel-footer-BMOaPLWc.cjs +0 -1
  182. package/dist/translation-warning-modal-DjTwz75c.cjs +0 -1
  183. package/dist/unmark-as-template-CdqIJJER.cjs +0 -1
  184. package/dist/unpublish-page-BwSVBf0_.cjs +0 -1
  185. package/dist/unpublish-page-Degu5Cy9.js +0 -27
  186. package/dist/web-preview-YzKxyXft.cjs +0 -1
@@ -1,29 +1,30 @@
1
1
  import { jsx as s, jsxs as l, Fragment as We } from "react/jsx-runtime";
2
- import { I as M, j as is, aG as ye, L as $, a9 as ee, aa as se, B as W, P as ae, C as le, k as ne, l as V, m as R, am as os, n as cs } from "./index-S8ibZk9Q.js";
3
- import { useState as y, useRef as us, useEffect as Ie, useMemo as B } from "react";
4
- import { r as te, S as ms, c as Oe } from "./slug-input-1qwKkXhA.js";
5
- import { isEmpty as $e, startCase as de, filter as hs, find as ge, groupBy as ps, pick as ds, set as P } from "lodash-es";
6
- import { ChevronDown as re, Search as ie, Check as U } from "lucide-react";
7
- import { ar as Re, as as Ue, A as oe, m as fs, at as gs, g as ys, h as vs, i as Ns, ay as Ss, L as bs } from "./index-BDnwJqMw.js";
8
- import { useQuery as ze } from "@tanstack/react-query";
2
+ import { z as M, h as ye, B as W } from "./register-chai-top-bar-ESJHs5s-.js";
3
+ import { j as os, L as z, a6 as ee, a7 as se, P as ae, C as le, k as ne, l as G, m as I, ai as cs, n as us } from "./index-rAcNbjk_.js";
4
+ import { isEmpty as ze, startCase as de, filter as ms, find as ge, groupBy as hs, pick as ps, set as P } from "lodash-es";
5
+ import { useState as y, useRef as ds, useEffect as Ie, useMemo as B, startTransition as Oe } from "react";
6
+ import { r as te, S as fs, c as Be } from "./slug-input-DHLmUNrH.js";
7
+ import { ChevronDown as re, Search as ie, Check as R } from "lucide-react";
8
+ import { ar as Re, as as Ue, A as oe, m as gs, at as ys, g as vs, h as Ns, i as Ss, ay as bs, L as ws } from "./index-Dno42B0a.js";
9
+ import { useQuery as _e } from "@tanstack/react-query";
9
10
  import { toast as E } from "sonner";
10
- import { g as Be } from "./get-seo-defaults-9zHebckY.js";
11
- function ws({
11
+ import { g as $e } from "./get-seo-defaults-9zHebckY.js";
12
+ function xs({
12
13
  value: a,
13
14
  onChange: o,
14
15
  placeholder: v = "Enter custom slug part",
15
16
  dynamicPattern: p,
16
17
  onValidationChange: i
17
18
  }) {
18
- const [g, u] = y(null), m = us(null), [f, C] = y(p + a);
19
+ const [g, u] = y(null), m = ds(null), [f, C] = y(p + a);
19
20
  Ie(() => {
20
21
  C(p + a);
21
22
  }, [a, p]);
22
23
  const F = (S) => {
23
24
  const b = S.target.value;
24
25
  if (!b.startsWith(p)) {
25
- const O = b.replace(p, ""), z = p + O;
26
- C(z), o(O);
26
+ const O = b.replace(p, ""), U = p + O;
27
+ C(U), o(O);
27
28
  return;
28
29
  }
29
30
  const t = b.substring(p.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), n = (t.match(/\./g) || []).length, d = n <= 1;
@@ -38,7 +39,7 @@ function ws({
38
39
  S.setSelectionRange(b, b);
39
40
  }, 0);
40
41
  }
41
- }, I = (S) => {
42
+ }, $ = (S) => {
42
43
  const b = S.currentTarget;
43
44
  (b.selectionStart || 0) <= p.length && setTimeout(() => {
44
45
  const t = p.length;
@@ -57,7 +58,7 @@ function ws({
57
58
  value: f,
58
59
  onChange: F,
59
60
  onFocus: w,
60
- onClick: I,
61
+ onClick: $,
61
62
  placeholder: v,
62
63
  className: g ? "border-red-500" : ""
63
64
  }
@@ -65,7 +66,7 @@ function ws({
65
66
  g && /* @__PURE__ */ s("div", { className: "mt-1 text-xs text-red-500", children: g })
66
67
  ] }) });
67
68
  }
68
- const ce = ({ children: a, onWheel: o, ...v }) => /* @__PURE__ */ s(is, { ...v, onWheel: (i) => {
69
+ const ce = ({ children: a, onWheel: o, ...v }) => /* @__PURE__ */ s(os, { ...v, onWheel: (i) => {
69
70
  try {
70
71
  i.preventDefault();
71
72
  const g = i.currentTarget;
@@ -75,7 +76,7 @@ const ce = ({ children: a, onWheel: o, ...v }) => /* @__PURE__ */ s(is, { ...v,
75
76
  }
76
77
  o && o(i);
77
78
  }, children: a }), fe = (...a) => a.filter(Boolean).join(" ");
78
- function xs({
79
+ function Cs({
79
80
  pages: a,
80
81
  selectedParentId: o,
81
82
  onChange: v,
@@ -85,7 +86,7 @@ function xs({
85
86
  }) {
86
87
  const [u, m] = y(!1), [f, C] = y(""), F = ye("enable-add-page-dropdown");
87
88
  F || (p = "w-full rounded-md border border-gray-300 px-3 py-2");
88
- const w = B(() => !a || a.length === 0 ? [] : a.filter((d) => !$e(d.slug)).filter((d) => d.slug !== "/").sort((d, N) => d.slug.localeCompare(N.slug)), [a]), I = B(() => {
89
+ const w = B(() => !a || a.length === 0 ? [] : a.filter((d) => !ze(d.slug)).filter((d) => d.slug !== "/").sort((d, N) => d.slug.localeCompare(N.slug)), [a]), $ = B(() => {
89
90
  if (!f.trim()) return w;
90
91
  const n = f.toLowerCase();
91
92
  return w.filter(
@@ -105,7 +106,7 @@ function xs({
105
106
  return n ? `${n.name} (${h(n.slug)})` : "None";
106
107
  };
107
108
  return /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
108
- /* @__PURE__ */ s($, { htmlFor: i, className: "text-sm", children: "Parent" }),
109
+ /* @__PURE__ */ s(z, { htmlFor: i, className: "text-sm", children: "Parent" }),
109
110
  F ? /* @__PURE__ */ l(ee, { open: u, onOpenChange: m, children: [
110
111
  /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ l(
111
112
  W,
@@ -136,9 +137,9 @@ function xs({
136
137
  ] }) }) }),
137
138
  /* @__PURE__ */ l(ce, { className: "max-h-[300px] overflow-y-auto", children: [
138
139
  /* @__PURE__ */ s(ne, { children: "No pages found." }),
139
- /* @__PURE__ */ l(V, { children: [
140
+ /* @__PURE__ */ l(G, { children: [
140
141
  /* @__PURE__ */ l(
141
- R,
142
+ I,
142
143
  {
143
144
  value: "none",
144
145
  onSelect: () => {
@@ -147,11 +148,11 @@ function xs({
147
148
  className: "flex cursor-pointer items-center justify-between",
148
149
  children: [
149
150
  /* @__PURE__ */ s("span", { children: "None" }),
150
- /* @__PURE__ */ s(U, { className: fe("mr-2 h-4 w-4", o ? "opacity-0" : "opacity-100") })
151
+ /* @__PURE__ */ s(R, { className: fe("mr-2 h-4 w-4", o ? "opacity-0" : "opacity-100") })
151
152
  ]
152
153
  }
153
154
  ),
154
- I.map((n) => {
155
+ $.map((n) => {
155
156
  const d = b(S(n.slug)), N = h(n.slug), O = /* @__PURE__ */ l("span", { className: "flex items-center text-sm", children: [
156
157
  d,
157
158
  n.name,
@@ -162,7 +163,7 @@ function xs({
162
163
  ] })
163
164
  ] });
164
165
  return /* @__PURE__ */ l(
165
- R,
166
+ I,
166
167
  {
167
168
  value: n.id,
168
169
  onSelect: () => {
@@ -172,7 +173,7 @@ function xs({
172
173
  children: [
173
174
  /* @__PURE__ */ s("span", { children: O }),
174
175
  /* @__PURE__ */ s(
175
- U,
176
+ R,
176
177
  {
177
178
  className: fe(
178
179
  "mr-2 h-4 w-4 shrink-0",
@@ -213,7 +214,7 @@ function xs({
213
214
  )
214
215
  ] });
215
216
  }
216
- const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
217
+ const ks = (...a) => a.filter(Boolean).join(" "), Ls = ({
217
218
  templates: a,
218
219
  selectedTemplateId: o,
219
220
  onSelectTemplate: v,
@@ -223,9 +224,9 @@ const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
223
224
  if (Ie(() => {
224
225
  if (o) {
225
226
  const h = a.find((t) => t.id === o);
226
- g((h == null ? void 0 : h.preview) || "");
227
+ Oe(() => g((h == null ? void 0 : h.preview) || ""));
227
228
  } else
228
- g("");
229
+ Oe(() => g(""));
229
230
  }, [o, a]), p)
230
231
  return /* @__PURE__ */ s("div", { className: "flex h-fit items-center justify-center text-sm text-gray-500", children: "Loading templates..." });
231
232
  if (a.length === 0)
@@ -235,7 +236,7 @@ const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
235
236
  const t = h.libraryName;
236
237
  w[t] || (w[t] = []), w[t].push(h);
237
238
  });
238
- const I = Object.entries(w).reduce(
239
+ const $ = Object.entries(w).reduce(
239
240
  (h, [t, n]) => {
240
241
  const d = n.filter(
241
242
  (N) => N.name.toLowerCase().includes(f.toLowerCase()) || t.toLowerCase().includes(f.toLowerCase())
@@ -265,8 +266,8 @@ const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
265
266
  ] }) }),
266
267
  /* @__PURE__ */ l(ce, { className: "max-h-[300px] overflow-y-auto", children: [
267
268
  /* @__PURE__ */ s(ne, { children: "No templates found." }),
268
- Object.entries(I).map(([h, t]) => /* @__PURE__ */ s(V, { heading: h, children: t.map((n) => /* @__PURE__ */ l(
269
- R,
269
+ Object.entries($).map(([h, t]) => /* @__PURE__ */ s(G, { heading: h, children: t.map((n) => /* @__PURE__ */ l(
270
+ I,
270
271
  {
271
272
  value: n.id,
272
273
  onSelect: () => {
@@ -276,9 +277,9 @@ const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
276
277
  children: [
277
278
  de(n.name),
278
279
  /* @__PURE__ */ s(
279
- U,
280
+ R,
280
281
  {
281
- className: Cs(
282
+ className: ks(
282
283
  "mr-2 h-4 w-4",
283
284
  o === n.id ? "opacity-100" : "opacity-0"
284
285
  )
@@ -307,16 +308,16 @@ const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
307
308
  /* @__PURE__ */ s("div", { className: "border-t bg-gray-50 p-2 text-xs text-gray-500", children: "Template preview" })
308
309
  ] })
309
310
  ] });
310
- }, Ls = () => {
311
+ }, Ts = () => {
311
312
  const a = Re(), o = Ue();
312
- return ze({
313
+ return _e({
313
314
  queryKey: [oe.GET_LIBRARIES],
314
315
  staleTime: "static",
315
316
  queryFn: async () => await o(a, { action: oe.GET_LIBRARIES }) || []
316
317
  });
317
- }, Ts = (a) => {
318
+ }, js = (a) => {
318
319
  const o = Re(), v = Ue();
319
- return ze({
320
+ return _e({
320
321
  queryKey: [oe.GET_TEMPLATES_BY_TYPE, a],
321
322
  staleTime: "static",
322
323
  enabled: !!a,
@@ -325,41 +326,41 @@ const Cs = (...a) => a.filter(Boolean).join(" "), ks = ({
325
326
  action: oe.GET_TEMPLATES_BY_TYPE,
326
327
  data: { pageType: a }
327
328
  });
328
- return (a ? hs(p, { pageType: a }) : p) || [];
329
+ return (a ? ms(p, { pageType: a }) : p) || [];
329
330
  }
330
331
  });
331
- }, js = (a) => {
332
- const { data: o = [], isLoading: v } = Ts(a), { data: p = [], isLoading: i } = Ls(), g = B(() => v || i ? [] : o.map((m) => {
332
+ }, Ds = (a) => {
333
+ const { data: o = [], isLoading: v } = js(a), { data: p = [], isLoading: i } = Ts(), g = B(() => v || i ? [] : o.map((m) => {
333
334
  const f = ge(p, { id: m.library });
334
335
  return {
335
336
  ...m,
336
337
  libraryName: (f == null ? void 0 : f.type) !== "shared" ? "Site Library" : (f == null ? void 0 : f.name) + " Library",
337
338
  libraryType: f == null ? void 0 : f.type
338
339
  };
339
- }), [o, p, v, i]), u = B(() => ps(g, "libraryName"), [g]);
340
+ }), [o, p, v, i]), u = B(() => hs(g, "libraryName"), [g]);
340
341
  return {
341
342
  data: g,
342
343
  groupedData: u,
343
344
  isLoading: v || i
344
345
  };
345
- }, G = (...a) => a.filter(Boolean).join(" ");
346
- function zs({ addEditPage: a, close: o, closePanel: v }) {
346
+ }, V = (...a) => a.filter(Boolean).join(" ");
347
+ function qs({ addEditPage: a, close: o, closePanel: v }) {
347
348
  var Ae, Fe;
348
- const { data: p } = fs(), i = B(() => p ?? [], [p]), g = gs(), u = !!(a != null && a.id), { data: m } = ys(), { mutate: f, isPending: C } = vs(), { mutate: F, isPending: w } = Ns(), [I, S] = y(null), [b, h] = y(!0), [t, n] = y((a == null ? void 0 : a.pageType) ?? "page"), { hasPermission: d } = os(), N = d(Ss.CHANGE_PAGE_TYPE), [O, z] = y(!1), [_e, qe] = y(""), { selectedLang: Ge, fallbackLang: Ve } = cs(), ve = Ge || Ve, [Y, Z] = y(""), [Ne, H] = y(!1), Se = B(() => {
349
+ const { data: p } = gs(), i = B(() => p ?? [], [p]), g = ys(), u = !!(a != null && a.id), { data: m } = vs(), { mutate: f, isPending: C } = Ns(), { mutate: F, isPending: w } = Ss(), [$, S] = y(null), [b, h] = y(!0), [t, n] = y((a == null ? void 0 : a.pageType) ?? "page"), { hasPermission: d } = cs(), N = d(bs.CHANGE_PAGE_TYPE), [O, U] = y(!1), [qe, Ve] = y(""), { selectedLang: Ge, fallbackLang: Me } = us(), ve = Ge || Me, [Y, Z] = y(""), [Ne, H] = y(!1), Se = B(() => {
349
350
  const e = i.find((c) => c.key === t);
350
351
  return (e == null ? void 0 : e.hasSlug) === !1;
351
- }, [t, i]), [k, Me] = y((a == null ? void 0 : a.parent) ?? ""), [_, be] = y((a == null ? void 0 : a.name) ?? ""), [T, we] = y((a == null ? void 0 : a.dynamic) ?? !1), [j, K] = y(T ? "" : ((a == null ? void 0 : a.slug) ?? "").split("/").pop() || ""), [xe, Ce] = y((a == null ? void 0 : a.dynamicSlugCustom) ?? ""), [ke, Ye] = y(!0), [Qe, ue] = y(!1), [me, He] = y(""), { data: Le, isLoading: Ke } = js(t), Q = C || w, Te = ye("enable-add-page-dropdown"), he = B(() => !u || !(a != null && a.id) || !m ? null : m.find((e) => e.id === a.id), [u, a == null ? void 0 : a.id, m]), Ze = (he == null ? void 0 : he.online) || !1, Je = B(() => !u || !(a != null && a.id) || !m ? !1 : m.some((e) => e.parent === a.id), [u, a == null ? void 0 : a.id, m]), r = i.find((e) => e.key === t), q = (e) => {
352
+ }, [t, i]), [k, Ye] = y((a == null ? void 0 : a.parent) ?? ""), [_, be] = y((a == null ? void 0 : a.name) ?? ""), [T, we] = y((a == null ? void 0 : a.dynamic) ?? !1), [j, K] = y(T ? "" : ((a == null ? void 0 : a.slug) ?? "").split("/").pop() || ""), [xe, Ce] = y((a == null ? void 0 : a.dynamicSlugCustom) ?? ""), [ke, Qe] = y(!0), [He, ue] = y(!1), [me, Ke] = y(""), { data: Le, isLoading: Ze } = Ds(t), Q = C || w, Te = ye("enable-add-page-dropdown"), he = B(() => !u || !(a != null && a.id) || !m ? null : m.find((e) => e.id === a.id), [u, a == null ? void 0 : a.id, m]), Je = (he == null ? void 0 : he.online) || !1, Xe = B(() => !u || !(a != null && a.id) || !m ? !1 : m.some((e) => e.parent === a.id), [u, a == null ? void 0 : a.id, m]), r = i.find((e) => e.key === t), q = (e) => {
352
353
  if (u && t !== e) {
353
- qe(e), z(!0), Z(""), H(!1);
354
+ Ve(e), U(!0), Z(""), H(!1);
354
355
  return;
355
356
  }
356
357
  n(e), Z(""), H(!1);
357
358
  }, je = () => {
358
- n(_e), z(!1), we(!1);
359
- }, Xe = (e) => {
360
- we(e), e ? K("") : Ce("");
359
+ n(qe), U(!1), we(!1);
361
360
  }, Pe = (e) => {
362
- if (Me(e), e && e !== "none") {
361
+ we(e), e ? K("") : Ce("");
362
+ }, Ee = (e) => {
363
+ if (Ye(e), e && e !== "none") {
363
364
  const c = m == null ? void 0 : m.find((x) => x.id === e), D = (c == null ? void 0 : c.slug) || "";
364
365
  if (j.startsWith(D)) {
365
366
  const x = j.slice(D.length).replace(/^\/+/, "");
@@ -368,9 +369,9 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
368
369
  K(j.replace(/^\/+/, ""));
369
370
  } else
370
371
  K(j ? `${j}` : "");
371
- }, Ee = (e) => {
372
- He(e);
373
- }, es = () => _.trim() ? T && !$e(j) ? (S("Slug must be empty when using dynamic slug"), !1) : T && !ke ? (S("Dynamic slug is invalid"), !1) : !0 : (E.error("Name is required"), !1), ss = () => {
372
+ }, es = (e) => {
373
+ Ke(e);
374
+ }, ss = () => _.trim() ? T && !ze(j) ? (S("Slug must be empty when using dynamic slug"), !1) : T && !ke ? (S("Dynamic slug is invalid"), !1) : !0 : (E.error("Name is required"), !1), as = () => {
374
375
  const e = {
375
376
  pageType: r == null ? void 0 : r.key,
376
377
  name: _,
@@ -389,13 +390,13 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
389
390
  o(), g(c.page.id, v);
390
391
  }
391
392
  });
392
- }, as = (e, c) => {
393
+ }, ls = (e, c) => {
393
394
  if (!e.trim() && !T)
394
395
  return S("Child page slug is required"), !1;
395
- const D = te(c), x = Oe(D, e);
396
- return Object.keys(bs).some((X) => x === `/${X}` || (x == null ? void 0 : x.startsWith(`/${X}/`))) ? (S("Slugs cannot start with a language code for primary page"), !1) : !0;
397
- }, ls = (e, c) => {
398
- const D = te(c), x = Oe(D, e), L = {
396
+ const D = te(c), x = Be(D, e);
397
+ return Object.keys(ws).some((X) => x === `/${X}` || (x == null ? void 0 : x.startsWith(`/${X}/`))) ? (S("Slugs cannot start with a language code for primary page"), !1) : !0;
398
+ }, ns = (e, c) => {
399
+ const D = te(c), x = Be(D, e), L = {
399
400
  pageType: t,
400
401
  name: _,
401
402
  slug: x.replace(/\/$/, ""),
@@ -409,7 +410,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
409
410
  jsonLD: {}
410
411
  };
411
412
  if (T && (L.dynamicSlugCustom = xe), u) {
412
- const A = ds(L, ["pageType", "parent", "name", "slug", "dynamic", "dynamicSlugCustom"]);
413
+ const A = ps(L, ["pageType", "parent", "name", "slug", "dynamic", "dynamicSlugCustom"]);
413
414
  F(
414
415
  { id: a == null ? void 0 : a.id, ...A },
415
416
  {
@@ -421,14 +422,14 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
421
422
  } else {
422
423
  const A = ge(i, { key: t });
423
424
  A != null && A.trackingDefault && (L.tracking = A.trackingDefault);
424
- const { seo: X, jsonLD: ts } = Be(A, ve);
425
- P(L, "seo", X), P(L, "jsonLD", ts), f(L, {
426
- onSuccess: (rs) => {
427
- o(), g(rs.page.id, v);
425
+ const { seo: X, jsonLD: rs } = $e(A, ve);
426
+ P(L, "seo", X), P(L, "jsonLD", rs), f(L, {
427
+ onSuccess: (is) => {
428
+ o(), g(is.page.id, v);
428
429
  }
429
430
  });
430
431
  }
431
- }, ns = () => {
432
+ }, ts = () => {
432
433
  const e = {
433
434
  pageType: t,
434
435
  name: _,
@@ -449,7 +450,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
449
450
  else {
450
451
  const c = ge(i, { key: t });
451
452
  c != null && c.trackingDefault && (e.tracking = c.trackingDefault);
452
- const { seo: D, jsonLD: x } = Be(c, ve);
453
+ const { seo: D, jsonLD: x } = $e(c, ve);
453
454
  P(e, "seo", D), P(e, "jsonLD", x), f(e, {
454
455
  onSuccess: (L) => {
455
456
  var A;
@@ -458,18 +459,18 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
458
459
  });
459
460
  }
460
461
  }, De = (e) => {
461
- if (e.preventDefault(), S(null), !!es()) {
462
+ if (e.preventDefault(), S(null), !!ss()) {
462
463
  if (!(r != null && r.hasSlug)) {
463
- ss();
464
+ as();
464
465
  return;
465
466
  }
466
467
  if (k && k !== "none") {
467
468
  const c = m == null ? void 0 : m.find((x) => x.id === k), D = (c == null ? void 0 : c.slug) || "";
468
- if (!as(j, D))
469
+ if (!ls(j, D))
469
470
  return;
470
- ls(j, D);
471
+ ns(j, D);
471
472
  } else
472
- ns();
473
+ ts();
473
474
  }
474
475
  }, { pagesType: pe, partialsType: J } = B(() => {
475
476
  const e = (c) => Y ? c.name.toLowerCase().includes(Y.toLowerCase()) || c.key.toLowerCase().includes(Y.toLowerCase()) : !0;
@@ -480,7 +481,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
480
481
  }, [i, Y]);
481
482
  return r != null && r.hasSlug ? /* @__PURE__ */ l("form", { onSubmit: De, className: "mx-auto w-full max-w-md space-y-4", children: [
482
483
  /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
483
- /* @__PURE__ */ s($, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
484
+ /* @__PURE__ */ s(z, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
484
485
  Te ? /* @__PURE__ */ l(ee, { open: Ne, onOpenChange: H, children: [
485
486
  /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ l(
486
487
  W,
@@ -488,7 +489,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
488
489
  variant: "outline",
489
490
  role: "combobox",
490
491
  disabled: u && !N,
491
- className: G(
492
+ className: V(
492
493
  "w-full justify-between",
493
494
  u && !N ? "cursor-not-allowed text-gray-500" : ""
494
495
  ),
@@ -513,8 +514,8 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
513
514
  ] }) }),
514
515
  /* @__PURE__ */ l(ce, { className: "overflow-y-auto", children: [
515
516
  /* @__PURE__ */ s(ne, { children: "No page type found." }),
516
- u ? Se ? /* @__PURE__ */ s(V, { heading: "Partials", children: J.map((e) => /* @__PURE__ */ l(
517
- R,
517
+ u ? Se ? /* @__PURE__ */ s(G, { heading: "Partials", children: J.map((e) => /* @__PURE__ */ l(
518
+ I,
518
519
  {
519
520
  value: e.key,
520
521
  onSelect: () => q(e.key),
@@ -522,16 +523,16 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
522
523
  children: [
523
524
  e.name,
524
525
  /* @__PURE__ */ s(
525
- U,
526
+ R,
526
527
  {
527
- className: G("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
528
+ className: V("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
528
529
  }
529
530
  )
530
531
  ]
531
532
  },
532
533
  e.key
533
- )) }) : /* @__PURE__ */ s(V, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ l(
534
- R,
534
+ )) }) : /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ l(
535
+ I,
535
536
  {
536
537
  value: e.key,
537
538
  onSelect: () => q(e.key),
@@ -539,17 +540,17 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
539
540
  children: [
540
541
  e.name,
541
542
  /* @__PURE__ */ s(
542
- U,
543
+ R,
543
544
  {
544
- className: G("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
545
+ className: V("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
545
546
  }
546
547
  )
547
548
  ]
548
549
  },
549
550
  e.key
550
551
  )) }) : /* @__PURE__ */ l(We, { children: [
551
- pe.length > 0 && /* @__PURE__ */ s(V, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ l(
552
- R,
552
+ pe.length > 0 && /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ l(
553
+ I,
553
554
  {
554
555
  value: e.key,
555
556
  onSelect: () => q(e.key),
@@ -557,17 +558,17 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
557
558
  children: [
558
559
  e.name,
559
560
  /* @__PURE__ */ s(
560
- U,
561
+ R,
561
562
  {
562
- className: G("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
563
+ className: V("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
563
564
  }
564
565
  )
565
566
  ]
566
567
  },
567
568
  e.key
568
569
  )) }),
569
- J.length > 0 && /* @__PURE__ */ s(V, { heading: "Partials", children: J.map((e) => /* @__PURE__ */ l(
570
- R,
570
+ J.length > 0 && /* @__PURE__ */ s(G, { heading: "Partials", children: J.map((e) => /* @__PURE__ */ l(
571
+ I,
571
572
  {
572
573
  value: e.key,
573
574
  onSelect: () => q(e.key),
@@ -575,9 +576,9 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
575
576
  children: [
576
577
  e.name,
577
578
  /* @__PURE__ */ s(
578
- U,
579
+ R,
579
580
  {
580
- className: G("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
581
+ className: V("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0")
581
582
  }
582
583
  )
583
584
  ]
@@ -604,34 +605,34 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
604
605
  O && /* @__PURE__ */ l("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
605
606
  /* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
606
607
  /* @__PURE__ */ l("div", { className: "mt-2 flex gap-2", children: [
607
- /* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => z(!1), children: "Cancel" }),
608
+ /* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
608
609
  /* @__PURE__ */ s(W, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
609
610
  ] })
610
611
  ] })
611
612
  ] }),
612
613
  !u && (r == null ? void 0 : r.hasSlug) && Le.length > 0 && /* @__PURE__ */ l("div", { className: "space-y-1", children: [
613
- /* @__PURE__ */ s($, { className: "mb-1 block text-sm", children: "Template" }),
614
+ /* @__PURE__ */ s(z, { className: "mb-1 block text-sm", children: "Template" }),
614
615
  /* @__PURE__ */ s(
615
- ks,
616
+ Ls,
616
617
  {
617
618
  templates: Le,
618
619
  selectedTemplateId: me,
619
- onSelectTemplate: Ee,
620
- isLoading: Ke
620
+ onSelectTemplate: es,
621
+ isLoading: Ze
621
622
  }
622
623
  )
623
624
  ] }),
624
625
  /* @__PURE__ */ s(
625
- xs,
626
+ Cs,
626
627
  {
627
628
  pages: m,
628
629
  selectedParentId: k,
629
- onChange: Pe,
630
+ onChange: Ee,
630
631
  currentPage: a
631
632
  }
632
633
  ),
633
634
  /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
634
- /* @__PURE__ */ s($, { htmlFor: "name", className: "text-sm", children: "Name" }),
635
+ /* @__PURE__ */ s(z, { htmlFor: "name", className: "text-sm", children: "Name" }),
635
636
  /* @__PURE__ */ s(
636
637
  M,
637
638
  {
@@ -652,40 +653,40 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
652
653
  type: "checkbox",
653
654
  id: "useDynamicSlug",
654
655
  checked: T,
655
- onChange: (e) => Xe(e.target.checked),
656
+ onChange: (e) => Pe(e.target.checked),
656
657
  className: "rounded border-gray-300"
657
658
  }
658
659
  ),
659
- /* @__PURE__ */ s($, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
660
+ /* @__PURE__ */ s(z, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
660
661
  ] }),
661
662
  T && /* @__PURE__ */ s("div", { className: "space-y-2", children: /* @__PURE__ */ s("div", { className: "space-y-0.5", children: /* @__PURE__ */ s(
662
- ws,
663
+ xs,
663
664
  {
664
665
  value: xe,
665
666
  onChange: Ce,
666
667
  dynamicPattern: (r == null ? void 0 : r.dynamicSlug) || "{{id}}",
667
668
  placeholder: "Enter custom slug part (optional)",
668
- onValidationChange: Ye
669
+ onValidationChange: Qe
669
670
  }
670
671
  ) }) })
671
672
  ] }),
672
673
  (!(r != null && r.dynamicSegments) || !T) && /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
673
- /* @__PURE__ */ s($, { htmlFor: "slug", className: "text-sm", children: "Slug" }),
674
+ /* @__PURE__ */ s(z, { htmlFor: "slug", className: "text-sm", children: "Slug" }),
674
675
  /* @__PURE__ */ s(
675
- ms,
676
+ fs,
676
677
  {
677
678
  value: j,
678
679
  onChange: (e) => {
679
680
  var c;
680
- K(e), u && e !== (((c = a == null ? void 0 : a.slug) == null ? void 0 : c.split("/").pop()) || "") ? ue(!!(Ze || Je)) : ue(!1);
681
+ K(e), u && e !== (((c = a == null ? void 0 : a.slug) == null ? void 0 : c.split("/").pop()) || "") ? ue(!!(Je || Xe)) : ue(!1);
681
682
  },
682
683
  placeholder: k && k !== "none" ? "Enter page slug" : t === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
683
684
  parentSlug: k && k !== "none" ? (Fe = m == null ? void 0 : m.find((e) => e.id === k)) == null ? void 0 : Fe.slug : void 0,
684
685
  onValidationChange: h
685
686
  }
686
687
  ),
687
- I && /* @__PURE__ */ s("p", { className: "text-xs text-red-500", children: I }),
688
- Qe && /* @__PURE__ */ s("div", { className: "mt-4 rounded-md border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */ l("div", { className: "flex items-start space-x-2", children: [
688
+ $ && /* @__PURE__ */ s("p", { className: "text-xs text-red-500", children: $ }),
689
+ He && /* @__PURE__ */ s("div", { className: "mt-4 rounded-md border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */ l("div", { className: "flex items-start space-x-2", children: [
689
690
  /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: /* @__PURE__ */ s("svg", { className: "h-5 w-5 text-amber-400", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ s(
690
691
  "path",
691
692
  {
@@ -713,7 +714,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
713
714
  )
714
715
  ] }) : /* @__PURE__ */ l("form", { onSubmit: De, className: "mx-auto w-full max-w-md space-y-4", children: [
715
716
  /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
716
- /* @__PURE__ */ s($, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
717
+ /* @__PURE__ */ s(z, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
717
718
  Te ? /* @__PURE__ */ l(ee, { open: Ne, onOpenChange: H, children: [
718
719
  /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ l(
719
720
  W,
@@ -721,7 +722,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
721
722
  variant: "outline",
722
723
  role: "combobox",
723
724
  disabled: u && !N,
724
- className: G(
725
+ className: V(
725
726
  "w-full justify-between",
726
727
  u && !N ? "cursor-not-allowed text-gray-500" : ""
727
728
  ),
@@ -746,8 +747,8 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
746
747
  ] }) }),
747
748
  /* @__PURE__ */ l(ce, { className: "max-h-[200px] overflow-y-auto", children: [
748
749
  /* @__PURE__ */ s(ne, { children: "No page type found." }),
749
- /* @__PURE__ */ s(V, { heading: "Partials", children: J.map((e) => /* @__PURE__ */ l(
750
- R,
750
+ /* @__PURE__ */ s(G, { heading: "Partials", children: J.map((e) => /* @__PURE__ */ l(
751
+ I,
751
752
  {
752
753
  value: e.key,
753
754
  onSelect: () => {
@@ -756,7 +757,7 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
756
757
  className: "flex cursor-pointer items-center justify-between",
757
758
  children: [
758
759
  e.name,
759
- /* @__PURE__ */ s(U, { className: G("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0") })
760
+ /* @__PURE__ */ s(R, { className: V("mr-2 h-4 w-4", t === e.key ? "opacity-100" : "opacity-0") })
760
761
  ]
761
762
  },
762
763
  e.key
@@ -777,19 +778,19 @@ function zs({ addEditPage: a, close: o, closePanel: v }) {
777
778
  O && /* @__PURE__ */ l("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
778
779
  /* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
779
780
  /* @__PURE__ */ l("div", { className: "mt-2 flex gap-2", children: [
780
- /* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => z(!1), children: "Cancel" }),
781
+ /* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
781
782
  /* @__PURE__ */ s(W, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
782
783
  ] })
783
784
  ] }),
784
785
  /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (Ae = i.find((e) => e.key === t)) == null ? void 0 : Ae.helpText })
785
786
  ] }),
786
787
  /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
787
- /* @__PURE__ */ s($, { htmlFor: "name", className: "text-sm", children: "Name" }),
788
+ /* @__PURE__ */ s(z, { htmlFor: "name", className: "text-sm", children: "Name" }),
788
789
  /* @__PURE__ */ s(M, { id: "name", value: _, onChange: (e) => be(e.target.value), required: !0, "aria-required": "true" })
789
790
  ] }),
790
791
  /* @__PURE__ */ s(W, { disabled: Q, type: "submit", className: "w-full", children: u ? Q ? "Updating..." : "Update " + (r == null ? void 0 : r.name) : Q ? "Creating..." : "Create " + (r == null ? void 0 : r.name) })
791
792
  ] });
792
793
  }
793
794
  export {
794
- zs as default
795
+ qs as default
795
796
  };