@chaibuilder/sdk 4.0.0-beta.31 → 4.0.0-beta.33

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 (152) hide show
  1. package/dist/{2SSKDMRQ-gmj-yWTy.js → 2SSKDMRQ-BXAXoR9y.js} +5 -5
  2. package/dist/{2SSKDMRQ-BksFOLpD.cjs → 2SSKDMRQ-BqOsh3tf.cjs} +1 -1
  3. package/dist/{AP7HFJJL-kVgc0R61.js → AP7HFJJL-B78LfetW.js} +1 -1
  4. package/dist/{AP7HFJJL-CO-deD_p.cjs → AP7HFJJL-Cv6sqAAd.cjs} +1 -1
  5. package/dist/{IconPicker-D_GRfhwS.js → IconPicker-BlO5Pnyu.js} +1 -1
  6. package/dist/{IconPicker-BJHUCDn4.cjs → IconPicker-D4yq_b-k.cjs} +1 -1
  7. package/dist/{WDYDFRGG-C9_E3QW0.js → WDYDFRGG-BE7jgVqa.js} +4 -4
  8. package/dist/{WDYDFRGG-KPpWFul_.cjs → WDYDFRGG-Dz9d3cVW.cjs} +1 -1
  9. package/dist/{actions-registery-Bj-j1k5i.js → actions-registery-D3-4Yha7.js} +1108 -1061
  10. package/dist/{actions-registery-Cy1lqUVI.cjs → actions-registery-vPaY-3dZ.cjs} +25 -25
  11. package/dist/actions.cjs +1 -1
  12. package/dist/actions.js +2 -2
  13. package/dist/{active-in-another-tab-1GoKTVcF.js → active-in-another-tab-CA47uafJ.js} +2 -2
  14. package/dist/{active-in-another-tab-iEd5fZD0.cjs → active-in-another-tab-CNn_R-55.cjs} +1 -1
  15. package/dist/{add-new-language-page-B3GUvWdP.js → add-new-language-page-B-kPbhFd.js} +3 -3
  16. package/dist/{add-new-language-page-Cq8R42Ro.cjs → add-new-language-page-QAZbAFQe.cjs} +1 -1
  17. package/dist/{add-new-page-DiHnECAR.cjs → add-new-page-D4nbAHOp.cjs} +1 -1
  18. package/dist/add-new-page-Y0d9tHh0.js +31 -0
  19. package/dist/{ai-panel-content-BPpawv4D.cjs → ai-panel-content-DXbebC-m.cjs} +1 -1
  20. package/dist/{ai-panel-content-tExD3yhH.js → ai-panel-content-WMOeK5pF.js} +5 -5
  21. package/dist/{ai-panel-default-lang-DnYLHSaS.js → ai-panel-default-lang-CM_psX_h.js} +7 -7
  22. package/dist/{ai-panel-default-lang-C6N4wUUF.cjs → ai-panel-default-lang-hmfyAYPM.cjs} +2 -2
  23. package/dist/{ai-panel-other-lang-D1pCJluY.js → ai-panel-other-lang-BKANRJAb.js} +13 -13
  24. package/dist/{ai-panel-other-lang-C65lVVtZ.cjs → ai-panel-other-lang-D4GL1b-W.cjs} +1 -1
  25. package/dist/{ai-prompt-input-Dws5BHhQ.cjs → ai-prompt-input-Dwd0-pcD.cjs} +1 -1
  26. package/dist/{ai-prompt-input-B2q30bhR.js → ai-prompt-input-mxXtWptn.js} +13 -13
  27. package/dist/{ai-translation-prompt-DnwG2BmF.cjs → ai-translation-prompt-7M2aEZ1w.cjs} +1 -1
  28. package/dist/{ai-translation-prompt-Dnn6i_t3.js → ai-translation-prompt-C_Pb7BE4.js} +1 -1
  29. package/dist/{apply-binding-chfbBKi2.js → apply-binding-BYCW1k2l.js} +1 -1
  30. package/dist/{apply-binding-9XSrYzAE.cjs → apply-binding-xiigK7eK.cjs} +1 -1
  31. package/dist/{change-password-modal-LKtYY-8V.cjs → change-password-modal-BYZoefwT.cjs} +1 -1
  32. package/dist/{change-password-modal-C0MMizgl.js → change-password-modal-Dqf_mleR.js} +5 -5
  33. package/dist/{code-editor-CWOmKcUc.js → code-editor-1fSEocLK.js} +1 -1
  34. package/dist/{code-editor-Cim6jQVF.cjs → code-editor-uN7W7KMD.cjs} +1 -1
  35. package/dist/{continue-editing-in-this-client-oxYWGWON.js → continue-editing-in-this-client-DD7bBhjD.js} +2 -2
  36. package/dist/{continue-editing-in-this-client-Dd6nKIvX.cjs → continue-editing-in-this-client-DDM65ror.cjs} +1 -1
  37. package/dist/{core-BWQrViOY.cjs → core-czmLeR0h.cjs} +1 -1
  38. package/dist/{core-QlWEXm1d.js → core-nSRy3D7z.js} +16 -15
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.d.ts +14 -2
  41. package/dist/core.js +19 -19
  42. package/dist/{css-import-modal-CXulmaB4.cjs → css-import-modal-BU7bJAaT.cjs} +1 -1
  43. package/dist/{css-import-modal-6bMTRlCg.js → css-import-modal-pBNRVmGj.js} +1 -1
  44. package/dist/default-theme-options-DN-3gIjM.cjs +22 -0
  45. package/dist/{plugin-BSjgGgwo.js → default-theme-options-saBIkWGT.js} +114 -114
  46. package/dist/{delete-page-D0tdn6VW.cjs → delete-page-8oEYsHPE.cjs} +1 -1
  47. package/dist/delete-page-B53nkF74.js +71 -0
  48. package/dist/{design-token-usage-D-hrcKz1.cjs → design-token-usage-Cm9m4AMz.cjs} +1 -1
  49. package/dist/{design-token-usage-lf7N_uOk.js → design-token-usage-DzWav2ip.js} +14 -14
  50. package/dist/{digital-asset-manager-DJhRhLGC.js → digital-asset-manager-1yLYGPuf.js} +5 -5
  51. package/dist/digital-asset-manager-BaTvMY8Q.cjs +1 -0
  52. package/dist/{duplicate-page-ChSp1TYN.cjs → duplicate-page-C2DZI4U0.cjs} +1 -1
  53. package/dist/{duplicate-page-CXzYy7vx.js → duplicate-page-DCRVR-kF.js} +6 -6
  54. package/dist/{dynamic-page-selector-btGtkyyv.cjs → dynamic-page-selector-CZJQnc-Q.cjs} +1 -1
  55. package/dist/{dynamic-page-selector-r5IR9_7k.js → dynamic-page-selector-DCGWkLVV.js} +12 -12
  56. package/dist/get-chai-builder-theme-C_qofMh_.cjs +1 -0
  57. package/dist/{get-chai-builder-theme-BpuwSLeS.js → get-chai-builder-theme-CyOkIlte.js} +1 -1
  58. package/dist/{image-compression-DsZ1oqpb.js → image-compression-DPFITwOL.js} +2 -2
  59. package/dist/image-compression-UaU7Bwqe.cjs +1 -0
  60. package/dist/{image-editor-CilPMtAC.js → image-editor-C0EYZJY_.js} +1 -1
  61. package/dist/{image-editor-BdW476J8.cjs → image-editor-DkgZrSGr.cjs} +1 -1
  62. package/dist/{index-DtMksfXx.js → index-BDrc0HJQ.js} +1729 -1680
  63. package/dist/index-BuXfCtgR.cjs +5 -0
  64. package/dist/{index-DsQXiNA_.js → index-C7bidKtE.js} +2786 -2752
  65. package/dist/index-DKjYF53r.cjs +160 -0
  66. package/dist/{json-diff-viewer-BkrnLb3B.cjs → json-diff-viewer-88jEhq8D.cjs} +1 -1
  67. package/dist/{json-diff-viewer-D3N3w3Ax.js → json-diff-viewer-wmzIZcuQ.js} +34 -34
  68. package/dist/{lang-panel-BAaaP4Qc.js → lang-panel--kWBnU_W.js} +7 -7
  69. package/dist/{lang-panel-BjDRrpwN.cjs → lang-panel-I_ABfjOZ.cjs} +1 -1
  70. package/dist/manage-design-tokens-CslCEOXU.cjs +1 -0
  71. package/dist/manage-design-tokens-JdVKj09s.js +445 -0
  72. package/dist/manage-design-tokens-modal-DA15ou0u.cjs +1 -0
  73. package/dist/{manage-design-tokens-modal-9qpcb-EC.js → manage-design-tokens-modal-xKxC72Bc.js} +9 -9
  74. package/dist/{mark-as-template-DNHYNjI9.js → mark-as-template-AbZrkEYl.js} +7 -7
  75. package/dist/{mark-as-template-IYRjta97.cjs → mark-as-template-ClQjC2p2.cjs} +1 -1
  76. package/dist/{nested-path-selector-content-Be-pbnVl.js → nested-path-selector-content-B04k-PPB.js} +1 -1
  77. package/dist/{nested-path-selector-content-CWmPgU-L.cjs → nested-path-selector-content-dFwZaM1r.cjs} +1 -1
  78. package/dist/{no-language-page-content-C-ltY7bj.js → no-language-page-content-CbUqxuC4.js} +2 -2
  79. package/dist/{no-language-page-content-8_J6y-cm.cjs → no-language-page-content-pzkWJAg6.cjs} +1 -1
  80. package/dist/{no-language-page-dialog-D5NXpDHi.js → no-language-page-dialog-AavD_Mmc.js} +2 -2
  81. package/dist/{no-language-page-dialog-BOZZZzqx.cjs → no-language-page-dialog-DhlOVXUm.cjs} +1 -1
  82. package/dist/{page-creator-BuHHnqiQ.js → page-creator-2OZveMsR.js} +95 -95
  83. package/dist/{page-creator-wtbae2U7.cjs → page-creator-DMjnStPf.cjs} +1 -1
  84. package/dist/{page-lock-pPGlTxj7.js → page-lock-5MwwTWe8.js} +2 -2
  85. package/dist/{page-lock-DN4iJc-V.cjs → page-lock-B3CpoFTs.cjs} +1 -1
  86. package/dist/{page-locked-dialog-Bl-ojgIW.js → page-locked-dialog-BhNZC9wZ.js} +13 -13
  87. package/dist/{page-locked-dialog-B_vdgv24.cjs → page-locked-dialog-ZOvjnxRI.cjs} +1 -1
  88. package/dist/page-manager-new-BcI-1Dms.cjs +1 -0
  89. package/dist/{page-manager-new-Bg8H6yrg.js → page-manager-new-l68-Lc9h.js} +85 -88
  90. package/dist/{page-manager-search-and-filter-CDXunXNd.cjs → page-manager-search-and-filter-BOpne6v-.cjs} +1 -1
  91. package/dist/{page-manager-search-and-filter-CyfO7O96.js → page-manager-search-and-filter-DJn98D02.js} +31 -30
  92. package/dist/{page-revisions-content-BKT8S9_g.cjs → page-revisions-content-B00tDCzu.cjs} +1 -1
  93. package/dist/{page-revisions-content-B-egQgoZ.js → page-revisions-content-Bqp-9bae.js} +23 -23
  94. package/dist/pages.cjs +1 -1
  95. package/dist/pages.d.ts +14 -2
  96. package/dist/pages.js +12 -12
  97. package/dist/{publish-pages-content-D2B_ScCQ.js → publish-pages-content-CtZLSG6O.js} +68 -75
  98. package/dist/publish-pages-content-DfYG0biw.cjs +1 -0
  99. package/dist/render.cjs +1 -1
  100. package/dist/render.js +5 -5
  101. package/dist/{rte-widget-modal-c3T09VeO.js → rte-widget-modal-DGEWoQ1b.js} +1 -1
  102. package/dist/{rte-widget-modal-CC1KcrAT.cjs → rte-widget-modal-DX66uSPv.cjs} +1 -1
  103. package/dist/runtime.cjs +6 -6
  104. package/dist/runtime.d.ts +2 -0
  105. package/dist/runtime.js +36 -35
  106. package/dist/{save-to-lib-dT1NDd5w.js → save-to-lib-CCxX5ZmQ.js} +26 -26
  107. package/dist/{save-to-lib-CiM0wiIr.cjs → save-to-lib-DmAjdhzU.cjs} +1 -1
  108. package/dist/sdk.css +1 -1
  109. package/dist/{selected-block-display-BgqcPsXI.cjs → selected-block-display-Csce27bR.cjs} +1 -1
  110. package/dist/{selected-block-display-BQndDPcY.js → selected-block-display-Cv6jBhJD.js} +20 -20
  111. package/dist/{seo-panel-DXZvGYEM.cjs → seo-panel-BZYXeYzE.cjs} +1 -1
  112. package/dist/{seo-panel-Z93Zf_bz.js → seo-panel-Ctstjs-d.js} +25 -25
  113. package/dist/{shared-json-ld-DwvUDGAS.cjs → shared-json-ld-BDWtjHgw.cjs} +1 -1
  114. package/dist/{shared-json-ld-Ct68RlWD.js → shared-json-ld-BNHGmUBd.js} +45 -45
  115. package/dist/{slug-input-CAqkFZBq.js → slug-input-Bui1Qmvh.js} +1 -1
  116. package/dist/{slug-input-Curnt2n3.cjs → slug-input-IAl_jfHr.cjs} +1 -1
  117. package/dist/supabase-actions.cjs +1 -1
  118. package/dist/supabase-actions.js +272 -206
  119. package/dist/{take-over-request-D6y2HcDr.cjs → take-over-request-Bl6jS1cK.cjs} +1 -1
  120. package/dist/{take-over-request-C6ngP1QR.js → take-over-request-Ceuqyk5K.js} +13 -13
  121. package/dist/{translation-warning-modal-B876S5yp.cjs → translation-warning-modal-CCmmwz1C.cjs} +1 -1
  122. package/dist/{translation-warning-modal-kRcfrPgo.js → translation-warning-modal-DA5dt2FA.js} +9 -9
  123. package/dist/types.d.ts +14 -2
  124. package/dist/{unmark-as-template-DeeWUTco.js → unmark-as-template-CKVMibvu.js} +13 -13
  125. package/dist/{unmark-as-template-f1dl_YTz.cjs → unmark-as-template-OEUqo0uc.cjs} +1 -1
  126. package/dist/unpublish-page-A5qn6E6g.js +28 -0
  127. package/dist/{unpublish-page-DEPFjGuu.cjs → unpublish-page-C81bYHLI.cjs} +1 -1
  128. package/dist/{unpublished-partials-modal-Ts5ZhAK9.js → unpublished-partials-modal-FqzTp5el.js} +3 -3
  129. package/dist/{unpublished-partials-modal-CEFXp1D1.cjs → unpublished-partials-modal-af5uDL7Y.cjs} +1 -1
  130. package/dist/utils.cjs +1 -1
  131. package/dist/utils.js +1 -1
  132. package/dist/web-blocks.cjs +1 -1
  133. package/dist/web-blocks.js +1 -1
  134. package/dist/{web-preview-CoT8r96b.js → web-preview-vge6uUSa.js} +1 -1
  135. package/dist/{web-preview-DTDoIE-c.cjs → web-preview-xtKkQOXy.cjs} +1 -1
  136. package/package.json +2 -7
  137. package/dist/add-new-page-C5HlQfzy.js +0 -31
  138. package/dist/delete-page-LnzR01A8.js +0 -71
  139. package/dist/digital-asset-manager-eCJHNSjj.cjs +0 -1
  140. package/dist/get-chai-builder-theme-B5RkBTsB.cjs +0 -1
  141. package/dist/image-compression-DZ9WMmyn.cjs +0 -1
  142. package/dist/index-CAhDwfHE.cjs +0 -5
  143. package/dist/index-mPCp0j2h.cjs +0 -160
  144. package/dist/manage-design-tokens-BknGNAKE.cjs +0 -1
  145. package/dist/manage-design-tokens-Co5677WS.js +0 -428
  146. package/dist/manage-design-tokens-modal-BcgdwEXE.cjs +0 -1
  147. package/dist/page-manager-new-5W5M9_ue.cjs +0 -1
  148. package/dist/plugin-DHpuZZXz.cjs +0 -22
  149. package/dist/publish-pages-content-WJHTVYnx.cjs +0 -1
  150. package/dist/theme-panel-footer-CGZL2F7R.js +0 -26
  151. package/dist/theme-panel-footer-IgGj-_OA.cjs +0 -1
  152. package/dist/unpublish-page-U_79Pwc0.js +0 -28
@@ -1,19 +1,19 @@
1
- import { jsxs as w, Fragment as F, jsx as t } from "react/jsx-runtime";
2
- import { d as ie } from "./index-DsQXiNA_.js";
3
- import { aB as be, aC as ge, ap as ke, k as de, T as R, aR as Ne, L as ve, m as Se, g as Le, c as Te, av as Ae, aS as Ce, aT as Ee } from "./index-DtMksfXx.js";
1
+ import { jsxs as y, Fragment as q, jsx as t } from "react/jsx-runtime";
2
+ import { d as ie } from "./index-C7bidKtE.js";
3
+ import { s as be, t as ge, w as ke, i as de, T as B, aQ as Ne, L as ve, k as Se, e as Le, c as Ae, aw as Te, aR as Ce, aS as Ee } from "./index-BDrc0HJQ.js";
4
4
  import { u as J } from "./use-page-expand-manager-Cf4MUEJw.js";
5
- import { compact as ue, filter as B, isEmpty as g, uniqBy as $e, keyBy as me, mapValues as Me, startCase as Ue, toLower as $, includes as q, get as W, find as H, map as Ie } from "lodash-es";
5
+ import { compact as ue, filter as F, isEmpty as g, uniqBy as $e, keyBy as me, mapValues as Me, startCase as Ue, toLower as $, includes as _, get as R, find as W, map as Ie } from "lodash-es";
6
6
  import { atom as ze, useAtom as Be, useSetAtom as Fe } from "jotai";
7
- import { ExternalLink as Oe, Pencil as je, NotepadText as Ge, MoreHorizontal as De, Lock as Re, Edit as We, Plus as He, ChevronRight as _e, StarsIcon as qe, Hash as Ve, File as he } from "lucide-react";
8
- import { useRef as Qe, useEffect as E, useMemo as _, useState as v, useCallback as le, startTransition as Xe, Suspense as C, lazy as M } from "react";
9
- import { useTranslation as Ye } from "react-i18next";
10
- import { B as Je } from "./register-chai-top-bar-D6GjnauV.js";
7
+ import { ExternalLink as Oe, Pencil as je, NotepadText as Ge, MoreHorizontal as De, Lock as Re, Plus as We, ChevronRight as He, StarsIcon as _e, Hash as qe, File as he } from "lucide-react";
8
+ import { useRef as Qe, useEffect as E, useMemo as H, useState as v, useCallback as le, startTransition as Ve, Suspense as C, lazy as M } from "react";
9
+ import { useTranslation as Xe } from "react-i18next";
10
+ import { B as Ye } from "./register-chai-top-bar-D6GjnauV.js";
11
11
  const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
12
- B(e, (a) => {
12
+ F(e, (a) => {
13
13
  const n = $(s);
14
- return q($((a == null ? void 0 : a.name) || ""), n) || q($((a == null ? void 0 : a.slug) || ""), n);
14
+ return _($((a == null ? void 0 : a.name) || ""), n) || _($((a == null ? void 0 : a.slug) || ""), n);
15
15
  })
16
- ), Ke = (e, s) => {
16
+ ), Je = (e, s) => {
17
17
  const a = /* @__PURE__ */ new Set(), n = me(e, "id");
18
18
  return s.forEach((i) => {
19
19
  let o = i;
@@ -28,14 +28,14 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
28
28
  children: n.children ? Y(n.children, s, a) : []
29
29
  };
30
30
  const i = n.children && n.children.some(
31
- (o) => q($(o.name || ""), $(s)) || q($(o.slug || ""), $(s))
31
+ (o) => _($(o.name || ""), $(s)) || _($(o.slug || ""), $(s))
32
32
  );
33
33
  return {
34
34
  ...n,
35
35
  shouldExpandOnSearch: i,
36
36
  children: n.children ? Y(n.children, s, a) : []
37
37
  };
38
- }), Ze = (e) => {
38
+ }), Ke = (e) => {
39
39
  if (!e || !e.length) return [];
40
40
  const s = {};
41
41
  e.forEach((n) => {
@@ -48,18 +48,18 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
48
48
  }, fe = (e) => !e || !e.length ? [] : [...e].sort((a, n) => (a.name || "").localeCompare(n.name || "")).map((a) => ({
49
49
  ...a,
50
50
  children: a.children ? fe(a.children) : []
51
- })), et = (e, s, a, n) => {
51
+ })), Ze = (e, s, a, n) => {
52
52
  if (!e || !e.length) return [];
53
53
  let i = e;
54
- if (a !== "all" && (i = ue(B(e, { pageType: a }))), g(s))
54
+ if (a !== "all" && (i = ue(F(e, { pageType: a }))), g(s))
55
55
  i = ce(i, s);
56
56
  else {
57
- const h = ce(i, s), c = Ke(e, h);
57
+ const h = ce(i, s), c = Je(e, h);
58
58
  i = $e([...h, ...c], "id");
59
59
  }
60
- const o = fe(Ze(i)), f = Y(o, s, n), P = B(f, (h) => n(h.pageType)).sort(
60
+ const o = fe(Ke(i)), f = Y(o, s, n), P = F(f, (h) => n(h.pageType)).sort(
61
61
  (h, c) => (h.name || "").localeCompare(c.name || "")
62
- ), d = B(f, (h) => !n(h.pageType));
62
+ ), d = F(f, (h) => !n(h.pageType));
63
63
  let p = [];
64
64
  if (a === "all") {
65
65
  const h = me(d, "pageType");
@@ -75,11 +75,11 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
75
75
  } else
76
76
  p = d.sort((h, c) => (h.name || "").localeCompare(c.name || ""));
77
77
  return [...P, ...p];
78
- }, tt = ze({
78
+ }, et = ze({
79
79
  pageId: null,
80
80
  position: { x: 0, y: 0 }
81
- }), nt = ({ pageId: e, children: s }) => {
82
- const [a, n] = Be(tt), i = Qe(null), o = a.pageId === e;
81
+ }), tt = ({ pageId: e, children: s }) => {
82
+ const [a, n] = Be(et), i = Qe(null), o = a.pageId === e;
83
83
  E(() => {
84
84
  const d = () => n({ pageId: null, position: { x: 0, y: 0 } });
85
85
  if (o)
@@ -91,7 +91,7 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
91
91
  const d = `${window.location.pathname}?page=${e}`;
92
92
  window.open(d, "_blank"), n({ pageId: null, position: { x: 0, y: 0 } });
93
93
  };
94
- return /* @__PURE__ */ w(F, { children: [
94
+ return /* @__PURE__ */ y(q, { children: [
95
95
  /* @__PURE__ */ t("span", { onContextMenu: f, children: s }),
96
96
  o && /* @__PURE__ */ t(
97
97
  "div",
@@ -99,8 +99,8 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
99
99
  ref: i,
100
100
  className: "fixed z-[9999] max-w-[160px] rounded-md border border-gray-200 bg-white",
101
101
  style: { top: a.position.y, left: a.position.x },
102
- children: /* @__PURE__ */ t("div", { className: "", children: /* @__PURE__ */ w(
103
- Je,
102
+ children: /* @__PURE__ */ t("div", { className: "", children: /* @__PURE__ */ y(
103
+ Ye,
104
104
  {
105
105
  variant: "ghost",
106
106
  onClick: P,
@@ -114,7 +114,7 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
114
114
  }
115
115
  )
116
116
  ] });
117
- }, st = ({ page: e }) => {
117
+ }, nt = ({ page: e }) => {
118
118
  var n, i;
119
119
  const { isExpanded: s, toggleExpanded: a } = J(e == null ? void 0 : e.id);
120
120
  return /* @__PURE__ */ t(
@@ -126,7 +126,7 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
126
126
  disabled: !((n = e == null ? void 0 : e.children) != null && n.length),
127
127
  className: `flex h-[calc(100%-2px)] w-5 items-center justify-center rounded text-gray-400 transition-colors hover:bg-gray-200 hover:px-1 hover:text-gray-500 ${(i = e == null ? void 0 : e.children) != null && i.length ? "hover:text-blue-400" : "opacity-0"}`,
128
128
  children: /* @__PURE__ */ t(
129
- _e,
129
+ He,
130
130
  {
131
131
  size: 12,
132
132
  className: `stroke-[4] transition-transform duration-200 ${s ? "rotate-90" : ""}`
@@ -134,13 +134,13 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
134
134
  )
135
135
  }
136
136
  );
137
- }, at = ({ page: e, pageType: s }) => /* @__PURE__ */ t("div", { className: "flex h-full items-center justify-center gap-x-1", children: e.dynamic ? /* @__PURE__ */ t(qe, { size: 12, className: "text-yellow-400" }) : s != null && s.icon ? /* @__PURE__ */ t(
137
+ }, st = ({ page: e, pageType: s }) => /* @__PURE__ */ t("div", { className: "flex h-full items-center justify-center gap-x-1", children: e.dynamic ? /* @__PURE__ */ t(_e, { size: 12, className: "text-yellow-400" }) : s != null && s.icon ? /* @__PURE__ */ t(
138
138
  "div",
139
139
  {
140
140
  className: "flex h-4 max-h-4 w-4 max-w-4 items-center justify-center stroke-[1] text-slate-500",
141
141
  dangerouslySetInnerHTML: { __html: s.icon }
142
142
  }
143
- ) : s != null && s.hasSlug ? /* @__PURE__ */ t(he, { size: 12, className: "stroke-[1] text-slate-500" }) : /* @__PURE__ */ t(Ve, { size: 12, className: "stroke-[1] text-slate-500" }) }), rt = ({ isOnline: e }) => /* @__PURE__ */ t("div", { className: `h-2 w-2 rounded-full ${e ? "bg-green-300" : "bg-gray-300"}` }), ot = ({
143
+ ) : s != null && s.hasSlug ? /* @__PURE__ */ t(he, { size: 12, className: "stroke-[1] text-slate-500" }) : /* @__PURE__ */ t(qe, { size: 12, className: "stroke-[1] text-slate-500" }) }), at = ({ isOnline: e }) => /* @__PURE__ */ t("div", { className: `h-2 w-2 rounded-full ${e ? "bg-green-300" : "bg-gray-300"}` }), rt = ({
144
144
  page: e,
145
145
  pageTypes: s,
146
146
  currentPage: a,
@@ -149,20 +149,20 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
149
149
  selectedLanguage: o,
150
150
  showUntranslatedPages: f
151
151
  }) => {
152
- const P = be(), { pageToUser: d } = ge(), p = W(d, [e == null ? void 0 : e.id, "userId"]), { data: h } = ke(p), c = h && P !== p ? h == null ? void 0 : h.name : null, x = de(), k = a === e.id, V = !!e.isTemplate, y = _(() => H(s, { key: e.pageType }), [s, e.pageType]);
153
- let u = W(i, e == null ? void 0 : e.id);
154
- u = W(u, "lang") === o ? u : null;
155
- const L = o === x || !!u, A = (u == null ? void 0 : u.name) || (e == null ? void 0 : e.name) || "No name";
152
+ const P = be(), { pageToUser: d } = ge(), p = R(d, [e == null ? void 0 : e.id, "userId"]), { data: h } = ke(p), c = h && P !== p ? h == null ? void 0 : h.name : null, x = de(), k = a === e.id, Q = !!e.isTemplate, w = H(() => W(s, { key: e.pageType }), [s, e.pageType]);
153
+ let u = R(i, e == null ? void 0 : e.id);
154
+ u = R(u, "lang") === o ? u : null;
155
+ const L = o === x || !!u, T = (u == null ? void 0 : u.name) || (e == null ? void 0 : e.name) || "No name";
156
156
  let N = (u == null ? void 0 : u.slug) || (e == null ? void 0 : e.slug) || "";
157
- const O = N + (e != null && e.dynamic ? `/${y == null ? void 0 : y.dynamicSlug}` : "") + (e != null && e.dynamicSlugCustom ? `${e.dynamicSlugCustom}` : "");
157
+ const O = N + (e != null && e.dynamic ? `/${w == null ? void 0 : w.dynamicSlug}` : "") + (e != null && e.dynamicSlugCustom ? `${e.dynamicSlugCustom}` : "");
158
158
  if (N.startsWith("/") && !f) {
159
159
  const l = N.split("/").pop();
160
160
  N = N.endsWith(l) && e.dynamic ? "" : `/${l}`;
161
161
  }
162
- const j = _(() => {
162
+ const j = H(() => {
163
163
  const l = "flex h-7 min-w-0 flex-1 cursor-pointer select-none items-center gap-x-1.5 rounded px-px text-xs duration-300 border-[1px]", U = `${k ? "border-primary/30 bg-primary/5" : "border-transparent hover:border-gray-200 hover:bg-gray-100"}`;
164
164
  return L ? `${l} ${U} ${c ? "opacity-60" : ""}` : `${l} bg-gray-100 opacity-50 group-hover:border-gray-200 border-transparent group-hover:bg-blue-100`;
165
- }, [L, k, c]), G = _(() => {
165
+ }, [L, k, c]), G = H(() => {
166
166
  if (e.isPartialGroup) return !1;
167
167
  if (u) {
168
168
  if (!u.online || g(u.changes)) return !1;
@@ -170,27 +170,27 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
170
170
  return !1;
171
171
  return !0;
172
172
  }, [u, e]);
173
- return /* @__PURE__ */ w("div", { className: "group relative", children: [
174
- /* @__PURE__ */ t(nt, { pageId: e.id, children: /* @__PURE__ */ w(
173
+ return /* @__PURE__ */ y("div", { className: "group relative", children: [
174
+ /* @__PURE__ */ t(tt, { pageId: e.id, children: /* @__PURE__ */ y(
175
175
  "div",
176
176
  {
177
177
  onClick: () => !e.isPartialGroup && L && n("select", e == null ? void 0 : e.id),
178
178
  className: j,
179
179
  children: [
180
- /* @__PURE__ */ t(st, { page: e }),
181
- !e.isPartialGroup && /* @__PURE__ */ t(rt, { isOnline: u ? u.online : e.online }),
182
- !e.isPartialGroup && /* @__PURE__ */ t(at, { page: e, pageType: y }),
183
- /* @__PURE__ */ t(R, { content: A, side: "top", showTooltip: A.length > 35, children: /* @__PURE__ */ t("span", { className: "max-w-[40%] truncate font-medium text-black", children: A }) }),
184
- (N || e.dynamic) && /* @__PURE__ */ t(R, { content: O, side: "top", showTooltip: !0, children: /* @__PURE__ */ w("span", { className: "max-w-[40%] truncate font-mono text-xs text-muted-foreground", children: [
180
+ /* @__PURE__ */ t(nt, { page: e }),
181
+ !e.isPartialGroup && /* @__PURE__ */ t(at, { isOnline: u ? u.online : e.online }),
182
+ !e.isPartialGroup && /* @__PURE__ */ t(st, { page: e, pageType: w }),
183
+ /* @__PURE__ */ t(B, { content: T, side: "top", showTooltip: T.length > 35, children: /* @__PURE__ */ t("span", { className: "max-w-[40%] truncate font-medium text-black", children: T }) }),
184
+ (N || e.dynamic) && /* @__PURE__ */ t(B, { content: O, side: "top", showTooltip: !0, children: /* @__PURE__ */ y("span", { className: "max-w-[40%] truncate font-mono text-xs text-muted-foreground", children: [
185
185
  N,
186
- e.dynamic && (y == null ? void 0 : y.dynamicSlug) && /* @__PURE__ */ w("span", { className: "text-xs text-gray-500", children: [
186
+ e.dynamic && (w == null ? void 0 : w.dynamicSlug) && /* @__PURE__ */ y("span", { className: "text-xs text-gray-500", children: [
187
187
  "/",
188
- y == null ? void 0 : y.dynamicSlug,
188
+ w == null ? void 0 : w.dynamicSlug,
189
189
  e.dynamicSlugCustom
190
190
  ] })
191
191
  ] }) }),
192
- G && /* @__PURE__ */ t(R, { content: "Has unpublished changes", side: "top", children: /* @__PURE__ */ t("span", { className: "text-amber-500", children: /* @__PURE__ */ t(je, { size: 12, className: "stroke-[2]" }) }) }),
193
- V && /* @__PURE__ */ t(R, { content: "Template", side: "top", children: /* @__PURE__ */ t("span", { className: "text-blue-500", children: /* @__PURE__ */ t(Ge, { size: 16 }) }) }),
192
+ G && /* @__PURE__ */ t(B, { content: "Has unpublished changes", side: "top", children: /* @__PURE__ */ t("span", { className: "text-amber-500", children: /* @__PURE__ */ t(je, { size: 12, className: "stroke-[2]" }) }) }),
193
+ Q && /* @__PURE__ */ t(B, { content: "Template", side: "top", children: /* @__PURE__ */ t("span", { className: "text-blue-500", children: /* @__PURE__ */ t(Ge, { size: 16 }) }) }),
194
194
  !e.isPartialGroup && L && !c ? /* @__PURE__ */ t("div", { className: "duration absolute right-0.5 top-[3px]", children: /* @__PURE__ */ t(
195
195
  Ne,
196
196
  {
@@ -204,17 +204,14 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
204
204
  setUnmarkAsTemplate: (l) => n("unmarkAsTemplate", l),
205
205
  children: /* @__PURE__ */ t("div", { className: "m-0 cursor-pointer rounded border border-transparent p-0.5 duration-100 hover:border-gray-400 hover:bg-white", children: /* @__PURE__ */ t(De, { className: "h-4 w-4", onClick: (l) => l.stopPropagation() }) })
206
206
  }
207
- ) }) : c ? /* @__PURE__ */ t("span", { className: "duration absolute right-1.5 top-1/2 -translate-y-1/2 text-xs text-gray-500", children: /* @__PURE__ */ t(Re, { className: "h-3.5 w-3.5 fill-red-200 text-red-500" }) }) : null
207
+ ) }) : c ? /* @__PURE__ */ y("span", { className: "duration absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center gap-x-1 text-xs text-red-500", children: [
208
+ /* @__PURE__ */ t(Re, { className: "h-3 w-3 fill-red-200 text-red-500" }),
209
+ /* @__PURE__ */ t(B, { content: `${c} is editing this page`, children: /* @__PURE__ */ t("span", { className: "font-bold", children: c }) })
210
+ ] }) : null
208
211
  ]
209
212
  }
210
213
  ) }),
211
- /* @__PURE__ */ t(F, { children: c && /* @__PURE__ */ w("button", { className: "absolute right-px top-1/2 flex h-6 -translate-y-1/2 items-center gap-x-1 rounded bg-red-50 px-2 py-0.5 text-xs font-light text-red-500 opacity-0 group-hover:opacity-100", children: [
212
- /* @__PURE__ */ t(We, { size: 12, className: "stroke-[3]" }),
213
- " ",
214
- /* @__PURE__ */ t("span", { className: "font-medium", children: c }),
215
- " is editing this page"
216
- ] }) }),
217
- /* @__PURE__ */ t(F, { children: !L && !e.isPartialGroup && !c && /* @__PURE__ */ w(
214
+ /* @__PURE__ */ t(q, { children: !L && !e.isPartialGroup && !c && /* @__PURE__ */ y(
218
215
  "button",
219
216
  {
220
217
  onClick: (l) => {
@@ -222,11 +219,11 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
222
219
  },
223
220
  className: "absolute left-1/2 top-1 flex -translate-x-1/2 items-center gap-x-1 rounded bg-blue-500 px-2 py-0.5 text-xs text-white opacity-0 duration-200 hover:bg-blue-700 group-hover:opacity-100",
224
221
  children: [
225
- /* @__PURE__ */ t(He, { size: 12, className: "stroke-[3]" }),
222
+ /* @__PURE__ */ t(We, { size: 12, className: "stroke-[3]" }),
226
223
  " ",
227
- /* @__PURE__ */ w("span", { className: "text-[10px]", children: [
224
+ /* @__PURE__ */ y("span", { className: "text-[10px]", children: [
228
225
  "Add ",
229
- W(ve, o),
226
+ R(ve, o),
230
227
  " Page"
231
228
  ] })
232
229
  ]
@@ -244,9 +241,9 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
244
241
  showUntranslatedPages: P
245
242
  }) => {
246
243
  const { expandedPages: d } = J();
247
- return /* @__PURE__ */ t("div", { className: "space-y-0.5", style: { paddingLeft: `${s * 10}px` }, children: e.map((p) => /* @__PURE__ */ w(F, { children: [
244
+ return /* @__PURE__ */ t("div", { className: "space-y-0.5", style: { paddingLeft: `${s * 10}px` }, children: e.map((p) => /* @__PURE__ */ y(q, { children: [
248
245
  /* @__PURE__ */ t(
249
- ot,
246
+ rt,
250
247
  {
251
248
  page: p,
252
249
  pageTypes: a,
@@ -271,34 +268,34 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
271
268
  }
272
269
  )
273
270
  ] }, p.id)) });
274
- }, it = M(() => import("./page-manager-search-and-filter-CyfO7O96.js")), lt = M(() => import("./add-new-page-C5HlQfzy.js")), ct = M(() => import("./delete-page-LnzR01A8.js")), dt = M(() => import("./duplicate-page-CXzYy7vx.js")), ut = M(() => import("./mark-as-template-DNHYNjI9.js")), mt = M(() => import("./unmark-as-template-DeeWUTco.js")), ht = M(() => import("./unpublish-page-U_79Pwc0.js")), vt = ({ close: e }) => {
275
- const { t: s } = Ye(), { languages: a, setSelectedLang: n } = ie(), { data: i } = Se(), { data: o, isFetching: f } = Le(), [P, d] = Te(), { updateForSelectedPage: p, expandPagesOnSearch: h } = J(null), c = de(), x = P.get("page"), [k, V] = v(""), [y, u] = v(null), [L, A] = v(null), [N, O] = v(null), [j, G] = v(null), [l, U] = v(""), [K, Z] = v(null), [ee, te] = v(null), [b, Q] = v(c), [xe, ye] = v(!1), ne = Fe(Ae), D = xe && b !== c, { data: I, isFetching: we } = Ce(b), se = le(
271
+ }, ot = M(() => import("./page-manager-search-and-filter-DJn98D02.js")), it = M(() => import("./add-new-page-Y0d9tHh0.js")), lt = M(() => import("./delete-page-B53nkF74.js")), ct = M(() => import("./duplicate-page-DCRVR-kF.js")), dt = M(() => import("./mark-as-template-AbZrkEYl.js")), ut = M(() => import("./unmark-as-template-CKVMibvu.js")), mt = M(() => import("./unpublish-page-A5qn6E6g.js")), Nt = ({ close: e }) => {
272
+ const { t: s } = Xe(), { languages: a, setSelectedLang: n } = ie(), { data: i } = Se(), { data: o, isFetching: f } = Le(), [P, d] = Ae(), { updateForSelectedPage: p, expandPagesOnSearch: h } = J(null), c = de(), x = P.get("page"), [k, Q] = v(""), [w, u] = v(null), [L, T] = v(null), [N, O] = v(null), [j, G] = v(null), [l, U] = v(""), [K, Z] = v(null), [ee, te] = v(null), [b, V] = v(c), [xe, we] = v(!1), ne = Fe(Te), D = xe && b !== c, { data: I, isFetching: ye } = Ce(b), se = le(
276
273
  (m) => {
277
274
  var r;
278
- return (r = H(i, { key: m })) == null ? void 0 : r.hasSlug;
275
+ return (r = W(i, { key: m })) == null ? void 0 : r.hasSlug;
279
276
  },
280
277
  [i]
281
- ), S = _(() => o ? D ? B(o, (m) => !(I != null && I[m.id])) : et(o, k, l, se) : [], [o, se, k, l, I, D]);
278
+ ), S = H(() => o ? D ? F(o, (m) => !(I != null && I[m.id])) : Ze(o, k, l, se) : [], [o, se, k, l, I, D]);
282
279
  E(() => {
283
280
  n(c);
284
281
  }, [c, n]), E(() => {
285
282
  const m = P.get("lang");
286
283
  if (m) {
287
- const r = a, T = a[0] ?? c, z = r.includes(m);
288
- Xe(() => {
289
- z && b !== m ? Q(m) : !z && b !== T && Q(T);
284
+ const r = a, A = a[0] ?? c, z = r.includes(m);
285
+ Ve(() => {
286
+ z && b !== m ? V(m) : !z && b !== A && V(A);
290
287
  });
291
288
  }
292
289
  }, []), E(() => {
293
290
  if (!g(l)) return;
294
291
  const m = sessionStorage.getItem("pageTypeFilter") || "all";
295
- !g(i) && m && (H(i, { key: m }) ? U(m) : U("all"));
292
+ !g(i) && m && (W(i, { key: m }) ? U(m) : U("all"));
296
293
  }, [i, l]), E(() => {
297
- if (x && !f && !H(o, { id: x })) {
294
+ if (x && !f && !W(o, { id: x })) {
298
295
  const r = new URLSearchParams(P.toString());
299
296
  if (r.delete("page"), [...r.keys()].length > 0) {
300
297
  if (typeof window < "u" && window.history && window.location) {
301
- const T = r.toString(), z = window.location.hash || "", oe = window.location.pathname, Pe = T ? `${oe}?${T}${z}` : `${oe}${z}`;
298
+ const A = r.toString(), z = window.location.hash || "", oe = window.location.pathname, Pe = A ? `${oe}?${A}${z}` : `${oe}${z}`;
302
299
  window.history.replaceState(window.history.state, "", Pe);
303
300
  }
304
301
  d(r);
@@ -321,11 +318,11 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
321
318
  },
322
319
  [e, d, X, b, c]
323
320
  ), re = (m, r) => {
324
- var T;
321
+ var A;
325
322
  if (r)
326
323
  switch (m) {
327
324
  case "add":
328
- A(r);
325
+ T(r);
329
326
  break;
330
327
  case "select":
331
328
  ae(r);
@@ -335,7 +332,7 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
335
332
  edit: !0,
336
333
  id: r == null ? void 0 : r.id,
337
334
  primaryPage: r == null ? void 0 : r.primaryPage
338
- }) : A(r);
335
+ }) : T(r);
339
336
  break;
340
337
  case "delete":
341
338
  u(r);
@@ -355,31 +352,31 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
355
352
  case "addLanguagePage":
356
353
  ne({
357
354
  edit: !1,
358
- primaryPage: ((T = r == null ? void 0 : r.page) == null ? void 0 : T.id) || "",
355
+ primaryPage: ((A = r == null ? void 0 : r.page) == null ? void 0 : A.id) || "",
359
356
  preselectedLang: (r == null ? void 0 : r.language) || b
360
357
  });
361
358
  break;
362
359
  }
363
360
  };
364
- return /* @__PURE__ */ w(F, { children: [
365
- /* @__PURE__ */ w("div", { className: "flex h-full flex-col justify-between", children: [
361
+ return /* @__PURE__ */ y(q, { children: [
362
+ /* @__PURE__ */ y("div", { className: "flex h-full flex-col justify-between", children: [
366
363
  /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
367
- it,
364
+ ot,
368
365
  {
369
366
  pages: S,
370
367
  search: k,
371
- setSearch: V,
368
+ setSearch: Q,
372
369
  languages: [c, ...a],
373
370
  selectedLanguage: b,
374
- setSelectedLanguage: Q,
371
+ setSelectedLanguage: V,
375
372
  selectedPageType: l,
376
373
  setSelectedPageType: U,
377
374
  onAddPage: (m) => re("add", m),
378
375
  showUntranslatedPages: D,
379
- setShowUntranslatedPages: ye
376
+ setShowUntranslatedPages: we
380
377
  }
381
378
  ) }),
382
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-4 pb-6 pt-2", children: f || we ? /* @__PURE__ */ t("div", { className: "space-y-2", children: Ie([...Array(15).keys()], (m) => /* @__PURE__ */ t("div", { className: "h-7 w-full animate-pulse rounded border border-gray-300 bg-gray-200" }, m)) }) : g(S) ? /* @__PURE__ */ w("div", { className: "flex h-[70vh] flex-col items-center justify-center gap-y-1 text-sm font-medium text-slate-500", children: [
379
+ /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-4 pb-6 pt-2", children: f || ye ? /* @__PURE__ */ t("div", { className: "space-y-2", children: Ie([...Array(15).keys()], (m) => /* @__PURE__ */ t("div", { className: "h-7 w-full animate-pulse rounded border border-gray-300 bg-gray-200" }, m)) }) : g(S) ? /* @__PURE__ */ y("div", { className: "flex h-[70vh] flex-col items-center justify-center gap-y-1 text-sm font-medium text-slate-500", children: [
383
380
  /* @__PURE__ */ t(he, { className: "h-6 w-6 stroke-[1]" }),
384
381
  s("Empty List!"),
385
382
  /* @__PURE__ */ t("span", { className: "font-light", children: s("Add new page to start") })
@@ -398,21 +395,21 @@ const ce = (e, s) => !e || !Array.isArray(e) ? [] : g(s) ? e : ue(
398
395
  ) })
399
396
  ] }),
400
397
  L && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
401
- lt,
398
+ it,
402
399
  {
403
400
  closePanel: e,
404
401
  editPage: ae,
405
402
  addEditPage: L,
406
- setAddEditPage: A
403
+ setAddEditPage: T
407
404
  }
408
405
  ) }),
409
- y && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ct, { page: y, onClose: () => u(null) }) }),
410
- N && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ht, { page: N, onClose: () => O(null) }) }),
411
- j && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ut, { page: j, onClose: () => G(null) }) }),
412
- ee && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(mt, { page: ee, onClose: () => te(null) }) }),
413
- K && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(dt, { page: K, onClose: () => Z(null), closePanel: e }) })
406
+ w && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(lt, { page: w, onClose: () => u(null) }) }),
407
+ N && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(mt, { page: N, onClose: () => O(null) }) }),
408
+ j && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(dt, { page: j, onClose: () => G(null) }) }),
409
+ ee && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ut, { page: ee, onClose: () => te(null) }) }),
410
+ K && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ct, { page: K, onClose: () => Z(null), closePanel: e }) })
414
411
  ] });
415
412
  };
416
413
  export {
417
- vt as default
414
+ Nt as default
418
415
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("./register-chai-top-bar-DyW9GPzV.cjs"),n=require("./index-mPCp0j2h.cjs"),f=require("./index-CAhDwfHE.cjs"),w=require("./use-page-expand-manager-B6XTvk0E.cjs"),C=require("@tanstack/react-query"),s=require("lodash-es"),d=require("lucide-react"),S=require("react"),g=require("react-i18next"),k=({selectedPageType:l,setSelectedPageType:i})=>{const{t:a}=g.useTranslation(),[r,o]=S.useState(""),{data:c}=f.usePageTypes(),u=t=>{if(!r)return!0;const x=r.toLowerCase(),m=j=>String(s.get(t,j,"")).toLowerCase().includes(x);return m("name")||m("key")},p=c.find(t=>t.key===l);return e.jsxs(n.Select,{onValueChange:i,value:l,children:[e.jsx(n.SelectTrigger,{className:`${l==="all"?"bg-gray-100/30 hover:bg-gray-100":"gap-x-1 border bg-gray-100/30 hover:bg-gray-100"} h-9 w-max min-w-[150px] overflow-hidden whitespace-nowrap rounded p-0 px-2 py-1 text-xs text-gray-600 shadow-none ring-0 focus:ring-0 [&>svg]:hidden`,children:e.jsxs("div",{className:"flex w-full items-center justify-between gap-x-1.5",children:[e.jsx("span",{className:"max-w-[150px] overflow-hidden truncate whitespace-nowrap font-medium leading-tight",children:(p==null?void 0:p.name)||a("All")}),e.jsx(d.ListFilter,{className:`${l!=="all"?"fill-sky-50 text-sky-500":""} pointer-events-none h-4 w-4 text-muted-foreground hover:bg-blue-300`})]})}),e.jsxs(n.SelectContent,{children:[e.jsx("div",{className:"sticky top-0 z-10 bg-white pb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(d.Search,{strokeWidth:2,className:"absolute left-2 top-2.5 h-3.5 w-3.5 text-gray-400"}),e.jsx(h.Input,{placeholder:a("Search page types..."),className:"h-8 w-full rounded border pl-8 text-xs shadow-none",value:r,onChange:t=>o(t.target.value),onKeyDown:t=>t.stopPropagation()})]})}),e.jsx(n.SelectItem,{value:"all",children:a("All")}),!s.isEmpty(s.filter(c,t=>t.hasSlug&&u(t)))&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 border-t px-2 py-1.5 pt-2 text-xs font-semibold text-gray-500",children:a("Pages")}),s.map([...s.filter(c,t=>t.hasSlug&&u(t))].sort((t,x)=>s.get(t,"name","").localeCompare(s.get(x,"name",""))),t=>e.jsx(n.SelectItem,{value:s.get(t,"key"),children:s.get(t,"name")},s.get(t,"key")))]}),!s.isEmpty(s.filter(c,t=>!t.hasSlug&&u(t)))&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 border-t px-2 py-1.5 pt-2 text-xs font-semibold text-gray-500",children:a("Partials")}),s.map([...s.filter(c,t=>!t.hasSlug&&u(t))].sort((t,x)=>s.get(t,"name","").localeCompare(s.get(x,"name",""))),t=>e.jsx(n.SelectItem,{value:s.get(t,"key"),children:s.get(t,"name")},s.get(t,"key")))]}),s.isEmpty(s.filter(c,u))&&e.jsx("div",{className:"px-3 py-2 text-center text-sm text-gray-500",children:a("No matching page types found")})]})]})},T=({search:l,setSearch:i})=>{const{t:a}=g.useTranslation();return e.jsxs("div",{className:"relative flex h-9 flex-1 items-center gap-2 rounded-md border px-2.5",children:[e.jsx("label",{htmlFor:"page-search-input",className:"sr-only",children:a("Search Pages")}),e.jsx(d.Search,{className:`${l?"fill-sky-50 text-sky-500":""} pointer-events-none h-4 w-4 text-muted-foreground`,"aria-hidden":"true"}),e.jsx(h.Input,{id:"page-search-input",placeholder:a("Search pages"),value:l,onChange:r=>i(r.target.value),className:"border-none px-1.5 shadow-none outline-none ring-0 transition-none focus:outline-none focus:ring-0 focus-visible:ring-0",autoComplete:"off"})]})},E=({pages:l})=>{const{t:i}=g.useTranslation(),{expandAll:a,collapseAll:r,expandedPages:o}=w.usePageExpandManager(null);return e.jsxs("div",{className:"flex gap-1",children:[e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{variant:"outline",size:"icon",onClick:()=>a(l),className:"rounded p-1 text-gray-500",children:e.jsx(d.ChevronsUpDown,{})})}),e.jsx(n.TooltipContent,{children:i("Expand All")})]}),e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{disabled:o.length===0,variant:"outline",size:"icon",onClick:()=>r(),className:"rounded p-1 text-gray-500",children:e.jsx(d.ChevronsDownUp,{})})}),e.jsx(n.TooltipContent,{children:i("Collapse All")})]})]})},b=({languages:l,selectedLanguage:i,setSelectedLanguage:a})=>{const r=f.useFallbackLang();return e.jsx("div",{className:"scrollbar-hide flex gap-1 overflow-x-auto pb-1",children:l.map(o=>e.jsxs(h.Button,{variant:i===o?"default":"outline",size:"sm",className:`h-6 flex-shrink-0 whitespace-nowrap rounded px-3 text-xs font-normal ${i===o?"bg-black text-white hover:bg-black":"text-gray-500"}`,onClick:()=>a(o.toLowerCase()),children:[o===r&&e.jsx(d.Star,{size:4,className:`p-0.5 ${i===r?"fill-white":"fill-black"}`}),f.LANGUAGES[o]||""]},o))})},y=()=>{const{t:l}=g.useTranslation(),i=C.useQueryClient();return e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{size:"sm",variant:"ghost",onClick:()=>i.invalidateQueries({queryKey:[f.ACTIONS.GET_WEBSITE_PAGES]}),className:"mt-1 h-6 w-6",children:e.jsx(d.RefreshCw,{})})}),e.jsx(n.TooltipContent,{side:"bottom",children:l("Refresh pages list")})]})},q=({pages:l,search:i,setSearch:a,languages:r,onAddPage:o,selectedLanguage:c,setSelectedLanguage:u,selectedPageType:p,setSelectedPageType:t,showUntranslatedPages:x,setShowUntranslatedPages:m})=>{const{t:j}=g.useTranslation(),v=r.length>1;return e.jsxs("div",{className:"space-y-3 border-b border-b-gray-200 px-4 pb-1",children:[e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx(k,{selectedPageType:p,setSelectedPageType:t}),e.jsx(T,{search:i,setSearch:a}),e.jsx(E,{pages:l}),e.jsxs(h.Button,{variant:"default",onClick:o,className:"rounded px-3 font-normal",children:[e.jsx(d.Plus,{strokeWidth:2,className:"stroke-white stroke-[3]"}),e.jsx("span",{className:"font-normal text-white",children:j("Add Page")})]}),!v&&e.jsx(y,{})]}),v?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx(b,{languages:r,selectedLanguage:c,setSelectedLanguage:N=>{u(N),m(x&&(r==null?void 0:r[0])!==c)}}),e.jsxs("div",{className:"flex items-center gap-x-2",children:[(r==null?void 0:r[0])!==c&&e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{variant:"ghost",onClick:()=>m(!x),className:"h-6 rounded px-3 py-1 text-xs font-normal",children:x?e.jsx(d.FilterXIcon,{}):e.jsx(d.Filter,{})})}),e.jsx(n.TooltipContent,{side:"bottom",children:j("Toggle Untranslated Pages")})]}),e.jsx(y,{})]})]}):e.jsx("div",{className:"flex items-center justify-between gap-2"})]})};exports.LanguageSelector=b;exports.default=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("./register-chai-top-bar-DyW9GPzV.cjs"),n=require("./index-DKjYF53r.cjs"),f=require("./index-BuXfCtgR.cjs"),w=require("./use-page-expand-manager-B6XTvk0E.cjs"),C=require("@tanstack/react-query"),s=require("lodash-es"),d=require("lucide-react"),S=require("react"),g=require("react-i18next"),k=({selectedPageType:l,setSelectedPageType:i})=>{const{t:a}=g.useTranslation(),[r,o]=S.useState(""),{data:c}=f.usePageTypes(),u=t=>{if(!r)return!0;const x=r.toLowerCase(),m=j=>String(s.get(t,j,"")).toLowerCase().includes(x);return m("name")||m("key")},p=c.find(t=>t.key===l);return e.jsxs(n.Select,{onValueChange:i,value:l,children:[e.jsx(n.SelectTrigger,{className:`${l==="all"?"bg-gray-100/30 hover:bg-gray-100":"gap-x-1 border bg-gray-100/30 hover:bg-gray-100"} h-9 w-max min-w-[150px] overflow-hidden whitespace-nowrap rounded p-0 px-2 py-1 text-xs text-gray-600 shadow-none ring-0 focus:ring-0 [&>svg]:hidden`,children:e.jsxs("div",{className:"flex w-full items-center justify-between gap-x-1.5",children:[e.jsx("span",{className:"max-w-[150px] overflow-hidden truncate whitespace-nowrap font-medium leading-tight",children:(p==null?void 0:p.name)||a("All")}),e.jsx(d.ListFilter,{className:`${l!=="all"?"fill-sky-50 text-sky-500":""} pointer-events-none h-4 w-4 text-muted-foreground hover:bg-blue-300`})]})}),e.jsxs(n.SelectContent,{children:[e.jsx("div",{className:"sticky top-0 z-10 bg-white pb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(d.Search,{strokeWidth:2,className:"absolute left-2 top-2.5 h-3.5 w-3.5 text-gray-400"}),e.jsx(h.Input,{placeholder:a("Search page types..."),className:"h-8 w-full rounded border pl-8 text-xs shadow-none",value:r,onChange:t=>o(t.target.value),onKeyDown:t=>t.stopPropagation()})]})}),e.jsx(n.SelectItem,{value:"all",children:a("All")}),!s.isEmpty(s.filter(c,t=>t.hasSlug&&u(t)))&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 border-t px-2 py-1.5 pt-2 text-xs font-semibold text-gray-500",children:a("Pages")}),s.map([...s.filter(c,t=>t.hasSlug&&u(t))].sort((t,x)=>s.get(t,"name","").localeCompare(s.get(x,"name",""))),t=>e.jsx(n.SelectItem,{value:s.get(t,"key"),children:s.get(t,"name")},s.get(t,"key")))]}),!s.isEmpty(s.filter(c,t=>!t.hasSlug&&u(t)))&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 border-t px-2 py-1.5 pt-2 text-xs font-semibold text-gray-500",children:a("Partials")}),s.map([...s.filter(c,t=>!t.hasSlug&&u(t))].sort((t,x)=>s.get(t,"name","").localeCompare(s.get(x,"name",""))),t=>e.jsx(n.SelectItem,{value:s.get(t,"key"),children:s.get(t,"name")},s.get(t,"key")))]}),s.isEmpty(s.filter(c,u))&&e.jsx("div",{className:"px-3 py-2 text-center text-sm text-gray-500",children:a("No matching page types found")})]})]})},T=({search:l,setSearch:i})=>{const{t:a}=g.useTranslation();return e.jsxs("div",{className:"relative flex h-9 flex-1 items-center gap-2 rounded-md border px-2.5",children:[e.jsx("label",{htmlFor:"page-search-input",className:"sr-only",children:a("Search Pages")}),e.jsx(d.Search,{className:`${l?"fill-sky-50 text-sky-500":""} pointer-events-none h-4 w-4 text-muted-foreground`,"aria-hidden":"true"}),e.jsx(h.Input,{id:"page-search-input",placeholder:a("Search pages"),value:l,onChange:r=>i(r.target.value),className:"border-none px-1.5 shadow-none outline-none ring-0 transition-none focus:outline-none focus:ring-0 focus-visible:ring-0",autoComplete:"off",autoFocus:!0})]})},E=({pages:l})=>{const{t:i}=g.useTranslation(),{expandAll:a,collapseAll:r,expandedPages:o}=w.usePageExpandManager(null);return e.jsxs("div",{className:"flex gap-1",children:[e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{variant:"outline",size:"icon",onClick:()=>a(l),className:"rounded p-1 text-gray-500",children:e.jsx(d.ChevronsUpDown,{})})}),e.jsx(n.TooltipContent,{children:i("Expand All")})]}),e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{disabled:o.length===0,variant:"outline",size:"icon",onClick:()=>r(),className:"rounded p-1 text-gray-500",children:e.jsx(d.ChevronsDownUp,{})})}),e.jsx(n.TooltipContent,{children:i("Collapse All")})]})]})},b=({languages:l,selectedLanguage:i,setSelectedLanguage:a})=>{const r=f.useFallbackLang();return e.jsx("div",{className:"scrollbar-hide flex gap-1 overflow-x-auto pb-1",children:l.map(o=>e.jsxs(h.Button,{variant:i===o?"default":"outline",size:"sm",className:`h-6 flex-shrink-0 whitespace-nowrap rounded px-3 text-xs font-normal ${i===o?"bg-black text-white hover:bg-black":"text-gray-500"}`,onClick:()=>a(o.toLowerCase()),children:[o===r&&e.jsx(d.Star,{size:4,className:`p-0.5 ${i===r?"fill-white":"fill-black"}`}),f.LANGUAGES[o]||""]},o))})},y=()=>{const{t:l}=g.useTranslation(),i=C.useQueryClient();return e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{size:"sm",variant:"ghost",onClick:()=>i.invalidateQueries({queryKey:[f.ACTIONS.GET_WEBSITE_PAGES]}),className:"mt-1 h-6 w-6",children:e.jsx(d.RefreshCw,{})})}),e.jsx(n.TooltipContent,{side:"bottom",children:l("Refresh pages list")})]})},q=({pages:l,search:i,setSearch:a,languages:r,onAddPage:o,selectedLanguage:c,setSelectedLanguage:u,selectedPageType:p,setSelectedPageType:t,showUntranslatedPages:x,setShowUntranslatedPages:m})=>{const{t:j}=g.useTranslation(),v=r.length>1;return e.jsxs("div",{className:"space-y-3 border-b border-b-gray-200 px-4 pb-1",children:[e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx(k,{selectedPageType:p,setSelectedPageType:t}),e.jsx(T,{search:i,setSearch:a}),e.jsx(E,{pages:l}),e.jsxs(h.Button,{variant:"default",onClick:o,className:"rounded px-3 font-normal",children:[e.jsx(d.Plus,{strokeWidth:2,className:"stroke-white stroke-[3]"}),e.jsx("span",{className:"font-normal text-white",children:j("Add Page")})]}),!v&&e.jsx(y,{})]}),v?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx(b,{languages:r,selectedLanguage:c,setSelectedLanguage:N=>{u(N),m(x&&(r==null?void 0:r[0])!==c)}}),e.jsxs("div",{className:"flex items-center gap-x-2",children:[(r==null?void 0:r[0])!==c&&e.jsxs(n.Tooltip,{children:[e.jsx(n.TooltipTrigger,{asChild:!0,children:e.jsx(h.Button,{variant:"ghost",onClick:()=>m(!x),className:"h-6 rounded px-3 py-1 text-xs font-normal",children:x?e.jsx(d.FilterXIcon,{}):e.jsx(d.Filter,{})})}),e.jsx(n.TooltipContent,{side:"bottom",children:j("Toggle Untranslated Pages")})]}),e.jsx(y,{})]})]}):e.jsx("div",{className:"flex items-center justify-between gap-2"})]})};exports.LanguageSelector=b;exports.default=q;
@@ -1,22 +1,22 @@
1
1
  import { jsx as e, jsxs as a, Fragment as k } from "react/jsx-runtime";
2
2
  import { B as m, z as E } from "./register-chai-top-bar-D6GjnauV.js";
3
- import { x as g, y as b, z as y, S as L, A as F, B as I, E as N } from "./index-DsQXiNA_.js";
4
- import { k as j, L as T, m as $, A as B } from "./index-DtMksfXx.js";
3
+ import { w as g, x as b, y, S as F, z as L, A as I, B as w } from "./index-C7bidKtE.js";
4
+ import { i as j, L as T, k as $, A as B } from "./index-BDrc0HJQ.js";
5
5
  import { u as G } from "./use-page-expand-manager-Cf4MUEJw.js";
6
6
  import { useQueryClient as D } from "@tanstack/react-query";
7
- import { isEmpty as w, filter as x, map as S, get as o } from "lodash-es";
7
+ import { isEmpty as N, filter as x, map as S, get as i } from "lodash-es";
8
8
  import { Star as M, Plus as R, FilterXIcon as W, Filter as q, ListFilter as K, Search as P, ChevronsUpDown as Q, ChevronsDownUp as _, RefreshCw as O } from "lucide-react";
9
9
  import { useState as U } from "react";
10
10
  import { useTranslation as f } from "react-i18next";
11
11
  const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
12
- const { t: l } = f(), [r, i] = U(""), { data: c } = $(), h = (t) => {
12
+ const { t: l } = f(), [r, o] = U(""), { data: c } = $(), h = (t) => {
13
13
  if (!r) return !0;
14
- const d = r.toLowerCase(), u = (v) => String(o(t, v, "")).toLowerCase().includes(d);
14
+ const d = r.toLowerCase(), u = (v) => String(i(t, v, "")).toLowerCase().includes(d);
15
15
  return u("name") || u("key");
16
16
  }, p = c.find((t) => t.key === n);
17
- return /* @__PURE__ */ a(L, { onValueChange: s, value: n, children: [
17
+ return /* @__PURE__ */ a(F, { onValueChange: s, value: n, children: [
18
18
  /* @__PURE__ */ e(
19
- F,
19
+ L,
20
20
  {
21
21
  className: `${n === "all" ? "bg-gray-100/30 hover:bg-gray-100" : "gap-x-1 border bg-gray-100/30 hover:bg-gray-100"} h-9 w-max min-w-[150px] overflow-hidden whitespace-nowrap rounded p-0 px-2 py-1 text-xs text-gray-600 shadow-none ring-0 focus:ring-0 [&>svg]:hidden`,
22
22
  children: /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between gap-x-1.5", children: [
@@ -39,31 +39,31 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
39
39
  placeholder: l("Search page types..."),
40
40
  className: "h-8 w-full rounded border pl-8 text-xs shadow-none",
41
41
  value: r,
42
- onChange: (t) => i(t.target.value),
42
+ onChange: (t) => o(t.target.value),
43
43
  onKeyDown: (t) => t.stopPropagation()
44
44
  }
45
45
  )
46
46
  ] }) }),
47
- /* @__PURE__ */ e(N, { value: "all", children: l("All") }),
48
- !w(x(c, (t) => t.hasSlug && h(t))) && /* @__PURE__ */ a(k, { children: [
47
+ /* @__PURE__ */ e(w, { value: "all", children: l("All") }),
48
+ !N(x(c, (t) => t.hasSlug && h(t))) && /* @__PURE__ */ a(k, { children: [
49
49
  /* @__PURE__ */ e("div", { className: "mt-2 border-t px-2 py-1.5 pt-2 text-xs font-semibold text-gray-500", children: l("Pages") }),
50
50
  S(
51
51
  [...x(c, (t) => t.hasSlug && h(t))].sort(
52
- (t, d) => o(t, "name", "").localeCompare(o(d, "name", ""))
52
+ (t, d) => i(t, "name", "").localeCompare(i(d, "name", ""))
53
53
  ),
54
- (t) => /* @__PURE__ */ e(N, { value: o(t, "key"), children: o(t, "name") }, o(t, "key"))
54
+ (t) => /* @__PURE__ */ e(w, { value: i(t, "key"), children: i(t, "name") }, i(t, "key"))
55
55
  )
56
56
  ] }),
57
- !w(x(c, (t) => !t.hasSlug && h(t))) && /* @__PURE__ */ a(k, { children: [
57
+ !N(x(c, (t) => !t.hasSlug && h(t))) && /* @__PURE__ */ a(k, { children: [
58
58
  /* @__PURE__ */ e("div", { className: "mt-2 border-t px-2 py-1.5 pt-2 text-xs font-semibold text-gray-500", children: l("Partials") }),
59
59
  S(
60
60
  [...x(c, (t) => !t.hasSlug && h(t))].sort(
61
- (t, d) => o(t, "name", "").localeCompare(o(d, "name", ""))
61
+ (t, d) => i(t, "name", "").localeCompare(i(d, "name", ""))
62
62
  ),
63
- (t) => /* @__PURE__ */ e(N, { value: o(t, "key"), children: o(t, "name") }, o(t, "key"))
63
+ (t) => /* @__PURE__ */ e(w, { value: i(t, "key"), children: i(t, "name") }, i(t, "key"))
64
64
  )
65
65
  ] }),
66
- w(x(c, h)) && /* @__PURE__ */ e("div", { className: "px-3 py-2 text-center text-sm text-gray-500", children: l("No matching page types found") })
66
+ N(x(c, h)) && /* @__PURE__ */ e("div", { className: "px-3 py-2 text-center text-sm text-gray-500", children: l("No matching page types found") })
67
67
  ] })
68
68
  ] });
69
69
  }, X = ({ search: n, setSearch: s }) => {
@@ -85,12 +85,13 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
85
85
  value: n,
86
86
  onChange: (r) => s(r.target.value),
87
87
  className: "border-none px-1.5 shadow-none outline-none ring-0 transition-none focus:outline-none focus:ring-0 focus-visible:ring-0",
88
- autoComplete: "off"
88
+ autoComplete: "off",
89
+ autoFocus: !0
89
90
  }
90
91
  )
91
92
  ] });
92
93
  }, H = ({ pages: n }) => {
93
- const { t: s } = f(), { expandAll: l, collapseAll: r, expandedPages: i } = G(null);
94
+ const { t: s } = f(), { expandAll: l, collapseAll: r, expandedPages: o } = G(null);
94
95
  return /* @__PURE__ */ a("div", { className: "flex gap-1", children: [
95
96
  /* @__PURE__ */ a(g, { children: [
96
97
  /* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(m, { variant: "outline", size: "icon", onClick: () => l(n), className: "rounded p-1 text-gray-500", children: /* @__PURE__ */ e(Q, {}) }) }),
@@ -100,7 +101,7 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
100
101
  /* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(
101
102
  m,
102
103
  {
103
- disabled: i.length === 0,
104
+ disabled: o.length === 0,
104
105
  variant: "outline",
105
106
  size: "icon",
106
107
  onClick: () => r(),
@@ -113,19 +114,19 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
113
114
  ] });
114
115
  }, J = ({ languages: n, selectedLanguage: s, setSelectedLanguage: l }) => {
115
116
  const r = j();
116
- return /* @__PURE__ */ e("div", { className: "scrollbar-hide flex gap-1 overflow-x-auto pb-1", children: n.map((i) => /* @__PURE__ */ a(
117
+ return /* @__PURE__ */ e("div", { className: "scrollbar-hide flex gap-1 overflow-x-auto pb-1", children: n.map((o) => /* @__PURE__ */ a(
117
118
  m,
118
119
  {
119
- variant: s === i ? "default" : "outline",
120
+ variant: s === o ? "default" : "outline",
120
121
  size: "sm",
121
- className: `h-6 flex-shrink-0 whitespace-nowrap rounded px-3 text-xs font-normal ${s === i ? "bg-black text-white hover:bg-black" : "text-gray-500"}`,
122
- onClick: () => l(i.toLowerCase()),
122
+ className: `h-6 flex-shrink-0 whitespace-nowrap rounded px-3 text-xs font-normal ${s === o ? "bg-black text-white hover:bg-black" : "text-gray-500"}`,
123
+ onClick: () => l(o.toLowerCase()),
123
124
  children: [
124
- i === r && /* @__PURE__ */ e(M, { size: 4, className: `p-0.5 ${s === r ? "fill-white" : "fill-black"}` }),
125
- T[i] || ""
125
+ o === r && /* @__PURE__ */ e(M, { size: 4, className: `p-0.5 ${s === r ? "fill-white" : "fill-black"}` }),
126
+ T[o] || ""
126
127
  ]
127
128
  },
128
- i
129
+ o
129
130
  )) });
130
131
  }, A = () => {
131
132
  const { t: n } = f(), s = D();
@@ -142,12 +143,12 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
142
143
  ) }),
143
144
  /* @__PURE__ */ e(y, { side: "bottom", children: n("Refresh pages list") })
144
145
  ] });
145
- }, oe = ({
146
+ }, ie = ({
146
147
  pages: n,
147
148
  search: s,
148
149
  setSearch: l,
149
150
  languages: r,
150
- onAddPage: i,
151
+ onAddPage: o,
151
152
  selectedLanguage: c,
152
153
  setSelectedLanguage: h,
153
154
  selectedPageType: p,
@@ -161,7 +162,7 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
161
162
  /* @__PURE__ */ e(V, { selectedPageType: p, setSelectedPageType: t }),
162
163
  /* @__PURE__ */ e(X, { search: s, setSearch: l }),
163
164
  /* @__PURE__ */ e(H, { pages: n }),
164
- /* @__PURE__ */ a(m, { variant: "default", onClick: i, className: "rounded px-3 font-normal", children: [
165
+ /* @__PURE__ */ a(m, { variant: "default", onClick: o, className: "rounded px-3 font-normal", children: [
165
166
  /* @__PURE__ */ e(R, { strokeWidth: 2, className: "stroke-white stroke-[3]" }),
166
167
  /* @__PURE__ */ e("span", { className: "font-normal text-white", children: v("Add Page") })
167
168
  ] }),
@@ -198,5 +199,5 @@ const V = ({ selectedPageType: n, setSelectedPageType: s }) => {
198
199
  };
199
200
  export {
200
201
  J as LanguageSelector,
201
- oe as default
202
+ ie as default
202
203
  };