@chaibuilder/sdk 4.0.0-beta.30 → 4.0.0-beta.32

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 (184) hide show
  1. package/dist/{2SSKDMRQ-Dub3pRV1.cjs → 2SSKDMRQ-DfXKDvXk.cjs} +1 -1
  2. package/dist/{2SSKDMRQ-B5Tzwoh4.js → 2SSKDMRQ-pPung-JB.js} +2 -2
  3. package/dist/{AP7HFJJL-CfmdXP9M.js → AP7HFJJL-CEJuc_Ox.js} +1 -1
  4. package/dist/{AP7HFJJL-Dt6MglIr.cjs → AP7HFJJL-PvPBwV6T.cjs} +1 -1
  5. package/dist/{IconPicker-DLqOB-ri.cjs → IconPicker-BJHUCDn4.cjs} +1 -1
  6. package/dist/{IconPicker-Cn8Z42-Z.js → IconPicker-D_GRfhwS.js} +1 -1
  7. package/dist/{WDYDFRGG-BOpmZGHS.js → WDYDFRGG-B3FrCE_j.js} +2 -2
  8. package/dist/{WDYDFRGG-Dfj1ikzw.cjs → WDYDFRGG-BPHlcLi5.cjs} +1 -1
  9. package/dist/{active-in-another-tab-CEWvA8SG.js → active-in-another-tab-C_Ma7oFU.js} +2 -2
  10. package/dist/{active-in-another-tab-DV83cJ_v.cjs → active-in-another-tab-WVYf-z5w.cjs} +1 -1
  11. package/dist/{add-new-language-page-C3Uu92KN.cjs → add-new-language-page-CxW2Vuyr.cjs} +1 -1
  12. package/dist/{add-new-language-page-B3wK94-S.js → add-new-language-page-DtsBO739.js} +3 -3
  13. package/dist/{add-new-page-BOE-xwBc.cjs → add-new-page-BfKt72NF.cjs} +1 -1
  14. package/dist/{add-new-page-DsvGVrR8.js → add-new-page-DG38rI6S.js} +2 -2
  15. package/dist/{ai-panel-content-DBlnfRRi.cjs → ai-panel-content-Dfo4jOVB.cjs} +1 -1
  16. package/dist/{ai-panel-content-BBSzHZG6.js → ai-panel-content-dktE9CIO.js} +3 -3
  17. package/dist/{ai-panel-default-lang-BVBuwnyU.js → ai-panel-default-lang-BbUTXMbm.js} +9 -9
  18. package/dist/{ai-panel-default-lang-DJJWAtN0.cjs → ai-panel-default-lang-GQCtwlPs.cjs} +2 -2
  19. package/dist/{ai-panel-other-lang-fIEZkmRy.js → ai-panel-other-lang-DIDS-mTi.js} +13 -13
  20. package/dist/{ai-panel-other-lang-v8Yd5ggR.cjs → ai-panel-other-lang-nCUxwpLX.cjs} +1 -1
  21. package/dist/{ai-prompt-input-CmSfGxTN.js → ai-prompt-input-B2q30bhR.js} +16 -16
  22. package/dist/{ai-prompt-input-C7ha_0Cn.cjs → ai-prompt-input-Dws5BHhQ.cjs} +1 -1
  23. package/dist/{ai-translation-prompt-BzTGAS3W.cjs → ai-translation-prompt-CJVcuWrs.cjs} +1 -1
  24. package/dist/{ai-translation-prompt-CtBmvsRy.js → ai-translation-prompt-D87qk3C1.js} +1 -1
  25. package/dist/{change-password-modal-CdOwtCWN.cjs → change-password-modal-CVUa60pC.cjs} +1 -1
  26. package/dist/{change-password-modal-DxkhBI5d.js → change-password-modal-PahNYs8x.js} +2 -2
  27. package/dist/{code-editor-Bpn8z2fo.js → code-editor-CWOmKcUc.js} +1 -1
  28. package/dist/{code-editor-fL3s6Hk7.cjs → code-editor-Cim6jQVF.cjs} +1 -1
  29. package/dist/{continue-editing-in-this-client-DDB816CQ.js → continue-editing-in-this-client-BYFOU3hH.js} +2 -2
  30. package/dist/{continue-editing-in-this-client-DjxpjsA8.cjs → continue-editing-in-this-client-CW0f2LRk.cjs} +1 -1
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.d.ts +3 -0
  33. package/dist/core.js +37 -37
  34. package/dist/{css-import-modal-CL8SIC3K.js → css-import-modal-6bMTRlCg.js} +1 -1
  35. package/dist/{css-import-modal-CRC7bK1c.cjs → css-import-modal-CXulmaB4.cjs} +1 -1
  36. package/dist/{delete-page-41tvYcEw.js → delete-page-BDViv7Xm.js} +2 -2
  37. package/dist/{delete-page-BHPlx8ec.cjs → delete-page-CdByrw3j.cjs} +1 -1
  38. package/dist/{design-token-usage-DtdjTCn3.cjs → design-token-usage-D-hrcKz1.cjs} +1 -1
  39. package/dist/{design-token-usage-CyOY4Pni.js → design-token-usage-lf7N_uOk.js} +28 -28
  40. package/dist/digital-asset-manager-CxxhsToc.cjs +1 -0
  41. package/dist/{digital-asset-manager-C_ru4Zes.js → digital-asset-manager-PcYficIX.js} +5 -5
  42. package/dist/{duplicate-page-BvggF83O.cjs → duplicate-page-D2f3HvWX.cjs} +1 -1
  43. package/dist/{duplicate-page-DMmDdmfS.js → duplicate-page-DfEA148D.js} +3 -3
  44. package/dist/{dynamic-page-selector-D2z51nLi.js → dynamic-page-selector-DB__KD2y.js} +2 -2
  45. package/dist/{dynamic-page-selector-C5agz2Ze.cjs → dynamic-page-selector-Dz7D1Wdr.cjs} +1 -1
  46. package/dist/{get-chai-builder-tailwind-config-DNp8Vhme.cjs → get-chai-builder-tailwind-config-7CxFxEYL.cjs} +1 -1
  47. package/dist/{get-chai-builder-tailwind-config-k8l5sdcw.js → get-chai-builder-tailwind-config-DC4sDOYK.js} +3 -3
  48. package/dist/{get-chai-builder-theme-BSUcPs5t.js → get-chai-builder-theme-BpuwSLeS.js} +1 -1
  49. package/dist/{image-compression-DsZ1oqpb.js → image-compression-DPFITwOL.js} +2 -2
  50. package/dist/image-compression-UaU7Bwqe.cjs +1 -0
  51. package/dist/{image-editor-DFmlG348.cjs → image-editor-BdW476J8.cjs} +1 -1
  52. package/dist/{image-editor-sKvOFo-S.js → image-editor-CilPMtAC.js} +1 -1
  53. package/dist/index-Bzyv7mAh.cjs +5 -0
  54. package/dist/{index-BFnMzGe6.js → index-DsQXiNA_.js} +4997 -4877
  55. package/dist/{index-CA1OwKJX.js → index-IQefjAA0.js} +1696 -1640
  56. package/dist/index-mPCp0j2h.cjs +160 -0
  57. package/dist/{json-diff-viewer-DRQSNhaS.cjs → json-diff-viewer-BPqY25PU.cjs} +1 -1
  58. package/dist/{json-diff-viewer-B5wAR5GY.js → json-diff-viewer-Ci2IbgDn.js} +34 -34
  59. package/dist/{lang-panel-q04hEq5o.js → lang-panel-DlAQr-y9.js} +3 -3
  60. package/dist/{lang-panel-BZsICcBR.cjs → lang-panel-jebYHYGD.cjs} +1 -1
  61. package/dist/library-blocks/bento/agency-showcase/agency-showcase.html +175 -0
  62. package/dist/library-blocks/bento/agency-showcase/agency-showcase.webp +0 -0
  63. package/dist/library-blocks/bento/creative-portfolio/creative-portfolio.html +116 -0
  64. package/dist/library-blocks/bento/creative-portfolio/creative-portfolio.webp +0 -0
  65. package/dist/library-blocks/bento/product-features/product-features.html +159 -0
  66. package/dist/library-blocks/bento/product-features/product-features.webp +0 -0
  67. package/dist/library-blocks/bento/saas-dashboard/saas-dashboard.html +182 -0
  68. package/dist/library-blocks/bento/saas-dashboard/saas-dashboard.webp +0 -0
  69. package/dist/library-blocks/bento/startup-metrics/startup-metrics.html +170 -0
  70. package/dist/library-blocks/bento/startup-metrics/startup-metrics.webp +0 -0
  71. package/dist/library-blocks/blocks-list.json +145 -12
  72. package/dist/library-blocks/feature/agency-services/agency-services.html +194 -0
  73. package/dist/library-blocks/feature/agency-services/agency-services.webp +0 -0
  74. package/dist/library-blocks/feature/consulting-firm/consulting-firm.html +219 -0
  75. package/dist/library-blocks/feature/consulting-firm/consulting-firm.webp +0 -0
  76. package/dist/library-blocks/feature/design-studio/design-studio.html +190 -0
  77. package/dist/library-blocks/feature/design-studio/design-studio.webp +0 -0
  78. package/dist/library-blocks/feature/freelancer-toolkit/freelancer-toolkit.html +195 -0
  79. package/dist/library-blocks/feature/freelancer-toolkit/freelancer-toolkit.webp +0 -0
  80. package/dist/library-blocks/feature/marketing-agency/marketing-agency.html +212 -0
  81. package/dist/library-blocks/feature/marketing-agency/marketing-agency.webp +0 -0
  82. package/dist/library-blocks/footer/creative-agency/creative-agency.html +64 -0
  83. package/dist/library-blocks/footer/creative-agency/creative-agency.webp +0 -0
  84. package/dist/library-blocks/footer/minimal-portfolio/minimal-portfolio.html +106 -0
  85. package/dist/library-blocks/footer/minimal-portfolio/minimal-portfolio.webp +0 -0
  86. package/dist/library-blocks/footer/saas-startup/saas-startup.html +117 -0
  87. package/dist/library-blocks/footer/saas-startup/saas-startup.webp +0 -0
  88. package/dist/library-blocks/hero/creative-agency/creative-agency.html +117 -0
  89. package/dist/library-blocks/hero/creative-agency/creative-agency.webp +0 -0
  90. package/dist/library-blocks/hero/developer-focused/developer-focused.html +124 -0
  91. package/dist/library-blocks/hero/developer-focused/developer-focused.webp +0 -0
  92. package/dist/library-blocks/hero/minimal-saas/minimal-saas.html +98 -0
  93. package/dist/library-blocks/hero/minimal-saas/minimal-saas.webp +0 -0
  94. package/dist/library-blocks/hero/portfolio-showcase/portfolio-showcase.html +148 -0
  95. package/dist/library-blocks/hero/portfolio-showcase/portfolio-showcase.webp +0 -0
  96. package/dist/library-blocks/hero/startup-landing/startup-landing.html +130 -0
  97. package/dist/library-blocks/hero/startup-landing/startup-landing.webp +0 -0
  98. package/dist/library-blocks/navbar/creative-agency/creative-agency.html +139 -0
  99. package/dist/library-blocks/navbar/creative-agency/creative-agency.webp +0 -0
  100. package/dist/library-blocks/navbar/minimal-portfolio/minimal-portfolio.html +164 -0
  101. package/dist/library-blocks/navbar/minimal-portfolio/minimal-portfolio.webp +0 -0
  102. package/dist/library-blocks/navbar/saas-startup/saas-startup.html +129 -0
  103. package/dist/library-blocks/navbar/saas-startup/saas-startup.webp +0 -0
  104. package/dist/manage-design-tokens-BknGNAKE.cjs +1 -0
  105. package/dist/manage-design-tokens-Co5677WS.js +428 -0
  106. package/dist/manage-design-tokens-modal-9qpcb-EC.js +161 -0
  107. package/dist/manage-design-tokens-modal-BcgdwEXE.cjs +1 -0
  108. package/dist/{mark-as-template-raTtKmQ9.js → mark-as-template-DOZL3umP.js} +2 -2
  109. package/dist/{mark-as-template-CT-hLGIW.cjs → mark-as-template-DS-tMllK.cjs} +1 -1
  110. package/dist/{nested-path-selector-content-CzQ2Lorl.js → nested-path-selector-content-Be-pbnVl.js} +1 -1
  111. package/dist/{nested-path-selector-content-CSUHTj9G.cjs → nested-path-selector-content-CWmPgU-L.cjs} +1 -1
  112. package/dist/{no-language-page-content-Bg6VjMVY.js → no-language-page-content-C8W0M_Fj.js} +4 -4
  113. package/dist/{no-language-page-content-Bkj8JpEY.cjs → no-language-page-content-DWtEo657.cjs} +1 -1
  114. package/dist/{no-language-page-dialog-TffLjvJn.cjs → no-language-page-dialog-FVXkSnfT.cjs} +1 -1
  115. package/dist/{no-language-page-dialog-CRPMr9YT.js → no-language-page-dialog-cpCZ9vES.js} +2 -2
  116. package/dist/{page-creator-CQhE1tgn.js → page-creator-CFtxeW_t.js} +172 -172
  117. package/dist/{page-creator-RrUhy8uH.cjs → page-creator-o6yRzsVf.cjs} +1 -1
  118. package/dist/{page-lock-D9h5pgxn.cjs → page-lock-BS_ErOIW.cjs} +1 -1
  119. package/dist/{page-lock-Dye1JZBB.js → page-lock-Cthbk6Pg.js} +2 -2
  120. package/dist/{page-locked-dialog-b2_f-A7a.cjs → page-locked-dialog-BWXifuQ8.cjs} +1 -1
  121. package/dist/{page-locked-dialog-BMjPVyHF.js → page-locked-dialog-D5hmaWqw.js} +16 -16
  122. package/dist/page-manager-new-Dl5YwsMm.js +418 -0
  123. package/dist/page-manager-new-DpSqBzeh.cjs +1 -0
  124. package/dist/{page-manager-search-and-filter-DCcYyoPO.js → page-manager-search-and-filter-iFsFJhn4.js} +27 -26
  125. package/dist/{page-manager-search-and-filter-D0ZXojiu.cjs → page-manager-search-and-filter-jDoLrCB7.cjs} +1 -1
  126. package/dist/{page-revisions-content-mDwvH6J-.js → page-revisions-content-C1IGUurW.js} +13 -13
  127. package/dist/{page-revisions-content-BX8ZWebc.cjs → page-revisions-content-CeBepZEw.cjs} +1 -1
  128. package/dist/pages.cjs +1 -1
  129. package/dist/pages.d.ts +3 -0
  130. package/dist/pages.js +1 -1
  131. package/dist/{plugin-Dkmjb2_e.js → plugin-BSjgGgwo.js} +10 -10
  132. package/dist/{publish-pages-content-M_Kb8b-F.js → publish-pages-content-BpEoA1T6.js} +3 -3
  133. package/dist/{publish-pages-content-CR4e9inX.cjs → publish-pages-content-PNsiaGI-.cjs} +1 -1
  134. package/dist/render.cjs +1 -1
  135. package/dist/render.d.ts +1 -0
  136. package/dist/render.js +32 -32
  137. package/dist/{rte-widget-modal-BRSm1Lnp.cjs → rte-widget-modal-CC1KcrAT.cjs} +1 -1
  138. package/dist/{rte-widget-modal-CVZDktXI.js → rte-widget-modal-c3T09VeO.js} +1 -1
  139. package/dist/runtime.d.ts +1 -0
  140. package/dist/{save-to-lib-B1ccNhR2.js → save-to-lib-BERYhyxq.js} +27 -27
  141. package/dist/{save-to-lib-CYEAWxL9.cjs → save-to-lib-Bk59qO1r.cjs} +1 -1
  142. package/dist/sdk.css +1 -1
  143. package/dist/{selected-block-display-aGR7p5JC.js → selected-block-display-C6NxfC0N.js} +11 -11
  144. package/dist/{selected-block-display-MyU0rS4q.cjs → selected-block-display-vFSCOnw8.cjs} +1 -1
  145. package/dist/{seo-panel-B5mDwpaT.cjs → seo-panel-0vlr_dBq.cjs} +1 -1
  146. package/dist/{seo-panel-P9uixkoZ.js → seo-panel-COrEJZLA.js} +138 -138
  147. package/dist/{shared-json-ld-DhQJh_mT.cjs → shared-json-ld-C46hURIr.cjs} +1 -1
  148. package/dist/{shared-json-ld-Ba9GcvLr.js → shared-json-ld-DnTuCBc3.js} +70 -70
  149. package/dist/{slug-input-CAfGHqMW.js → slug-input-CAqkFZBq.js} +1 -1
  150. package/dist/{slug-input-BdMnlYKT.cjs → slug-input-Curnt2n3.cjs} +1 -1
  151. package/dist/supabase-actions.cjs +1 -1
  152. package/dist/supabase-actions.js +193 -195
  153. package/dist/{take-over-request-BeHTL28z.cjs → take-over-request-6fliSr8w.cjs} +1 -1
  154. package/dist/{take-over-request-CXjaDliJ.js → take-over-request-DvmM5qTu.js} +10 -10
  155. package/dist/{theme-panel-footer-D_gxD0j4.cjs → theme-panel-footer-3ixmq107.cjs} +1 -1
  156. package/dist/{theme-panel-footer-BkwhuXM7.js → theme-panel-footer-BlsXRcEY.js} +2 -2
  157. package/dist/{translation-warning-modal-D_vt37fW.cjs → translation-warning-modal-B876S5yp.cjs} +1 -1
  158. package/dist/{translation-warning-modal-CTfArsb1.js → translation-warning-modal-kRcfrPgo.js} +1 -1
  159. package/dist/types.d.ts +3 -0
  160. package/dist/{unmark-as-template-vFgMIdxN.js → unmark-as-template-Dn3klZKq.js} +2 -2
  161. package/dist/{unmark-as-template-D2bvjGKt.cjs → unmark-as-template-q1GblG-u.cjs} +1 -1
  162. package/dist/{unpublish-page-CxkjTzBB.js → unpublish-page-BbFZw0so.js} +2 -2
  163. package/dist/{unpublish-page-CPjHmtSM.cjs → unpublish-page-DMbcHmUV.cjs} +1 -1
  164. package/dist/unpublished-partials-modal-CEFXp1D1.cjs +1 -0
  165. package/dist/unpublished-partials-modal-Ts5ZhAK9.js +41 -0
  166. package/dist/utils.cjs +1 -1
  167. package/dist/utils.js +2 -2
  168. package/dist/{web-preview--by73Vvr.js → web-preview-B2YGL26D.js} +1 -1
  169. package/dist/{web-preview-C3AMe_BB.cjs → web-preview-C6SLwtqv.cjs} +1 -1
  170. package/package.json +2 -7
  171. package/dist/delete-design-token-B0md8qUi.js +0 -40
  172. package/dist/delete-design-token-C94IgWdi.cjs +0 -1
  173. package/dist/digital-asset-manager-DSLQz8qk.cjs +0 -1
  174. package/dist/image-compression-DZ9WMmyn.cjs +0 -1
  175. package/dist/index-Bzn_gpaK.cjs +0 -5
  176. package/dist/index-D30xvFa5.cjs +0 -160
  177. package/dist/library-blocks/hero-1/hero-1.html +0 -74
  178. package/dist/library-blocks/hero-1/hero-1.webp +0 -0
  179. package/dist/library-blocks/hero-2/hero-2.html +0 -95
  180. package/dist/library-blocks/hero-2/hero-2.webp +0 -0
  181. package/dist/manage-design-tokens-Cene3KEu.js +0 -241
  182. package/dist/manage-design-tokens-Di5C6nTj.cjs +0 -1
  183. package/dist/page-manager-new-2mDjnSqc.cjs +0 -1
  184. package/dist/page-manager-new-DP1b_dXt.js +0 -411
@@ -0,0 +1,161 @@
1
+ import { jsxs as l, jsx as e, Fragment as y } from "react/jsx-runtime";
2
+ import { al as k, am as A, i as T, an as M, ao as H, ap as _, aq as j, ar as I, a6 as P, D as S, e as L, f as E, g as O, a0 as U, a1 as q, as as R, a2 as $, a3 as V, at as Y, a4 as z, a5 as B } from "./index-DsQXiNA_.js";
3
+ import { TokensIcon as Q } from "@radix-ui/react-icons";
4
+ import { useMemo as u, useEffect as b, useState as g, useCallback as v } from "react";
5
+ import { useTranslation as F } from "react-i18next";
6
+ import { p as W, g as G, a as J, b as K } from "./plugin-BSjgGgwo.js";
7
+ import { get as w, filter as x, has as C, isEmpty as X, map as D, find as N } from "lodash-es";
8
+ import Z from "@tailwindcss/aspect-ratio";
9
+ import ee from "@tailwindcss/container-queries";
10
+ import se from "@tailwindcss/forms";
11
+ import ne from "@tailwindcss/typography";
12
+ import { u as ae } from "./fonts-B3UYxuJI.js";
13
+ import re from "./manage-design-tokens-Co5677WS.js";
14
+ const te = () => {
15
+ const [s] = T(), a = M(), [r] = H(), { document: n, window: i } = _(), t = ae();
16
+ b(() => {
17
+ r ? n == null || n.documentElement.classList.add("dark") : n == null || n.documentElement.classList.remove("dark");
18
+ }, [r, n]), b(() => {
19
+ !i || !i.tailwind || (i.tailwind.config = {
20
+ darkMode: "class",
21
+ theme: {
22
+ extend: {
23
+ container: {
24
+ center: !0,
25
+ padding: "1rem",
26
+ screens: {
27
+ "2xl": "1400px"
28
+ }
29
+ },
30
+ ...G(a)
31
+ }
32
+ },
33
+ plugins: [
34
+ ne,
35
+ se,
36
+ Z,
37
+ ee,
38
+ W(function({ addBase: o, theme: d }) {
39
+ o({
40
+ "h1,h2,h3,h4,h5,h6": {
41
+ fontFamily: d("fontFamily.heading")
42
+ },
43
+ body: {
44
+ fontFamily: d("fontFamily.body"),
45
+ color: d("colors.foreground"),
46
+ backgroundColor: d("colors.background")
47
+ }
48
+ });
49
+ })
50
+ ]
51
+ });
52
+ }, [s, a, i]);
53
+ const c = u(() => {
54
+ const o = w(s, "fontFamily.heading"), d = w(s, "fontFamily.body");
55
+ return t.filter((h) => h.family === o || h.family === d);
56
+ }, [s, t]), p = u(
57
+ () => J(x(c, (o) => C(o, "url"))),
58
+ [c]
59
+ ), m = u(
60
+ () => K(x(c, (o) => C(o, "src"))),
61
+ [c]
62
+ );
63
+ return /* @__PURE__ */ l(y, { children: [
64
+ /* @__PURE__ */ e(j, { theme: s }),
65
+ p.map((o, d) => /* @__PURE__ */ e("link", { rel: "stylesheet", href: o }, `preview-font-${d}`)),
66
+ /* @__PURE__ */ e("style", { id: "chai-custom-fonts", dangerouslySetInnerHTML: { __html: m } })
67
+ ] });
68
+ }, le = ({
69
+ content: s,
70
+ classes: a = "",
71
+ className: r = "w-full rounded border-0",
72
+ style: n = { minHeight: 80 },
73
+ title: i = "Preview"
74
+ }) => {
75
+ const t = u(() => k.replace('dir="__HTML_DIR__"', 'dir="ltr"'), []);
76
+ return (
77
+ // @ts-ignore
78
+ /* @__PURE__ */ l(A, { className: r, style: n, title: i, initialContent: t, children: [
79
+ /* @__PURE__ */ e(te, {}),
80
+ /* @__PURE__ */ e("div", { className: "h-full p-4", children: /* @__PURE__ */ e("div", { className: a || void 0, dangerouslySetInnerHTML: { __html: s } }) })
81
+ ] })
82
+ );
83
+ }, f = ["xs", "sm", "md", "lg", "xl", "2xl"], oe = (s) => {
84
+ if (s = s.trim().replace(/ +(?= )/g, ""), X(s)) return "";
85
+ const a = D(s.split(" "), I), r = [];
86
+ for (const n of a) {
87
+ const i = n.mq;
88
+ if (!r.includes(n.fullCls))
89
+ for (let t = f.indexOf(i) + 1; t < f.length; t++) {
90
+ const c = N(a, { property: n.property, mq: f[t] });
91
+ if (c && c.cls !== n.cls)
92
+ break;
93
+ N(a, { cls: n.cls, mq: f[t] }) && r.push(`${f[t]}:${n.cls}`);
94
+ }
95
+ }
96
+ return x(
97
+ D(a, (n) => r.includes(n.fullCls) ? null : n.fullCls),
98
+ (n) => n !== null
99
+ ).join(" ");
100
+ }, ie = ({ activeToken: s }) => {
101
+ const { t: a } = F(), r = s != null && s.value ? oe(s.value) : "", n = s && s.name && s.value;
102
+ return /* @__PURE__ */ e(P, { className: "h-full", children: /* @__PURE__ */ e("div", { className: "space-y-4 pr-4", children: /* @__PURE__ */ l("div", { className: "space-y-2 rounded-lg border bg-card p-4", children: [
103
+ n && /* @__PURE__ */ e(y, { children: /* @__PURE__ */ l("div", { className: "mb-3 flex items-center justify-between", children: [
104
+ /* @__PURE__ */ e("span", { className: "text-sm font-semibold", children: s.name }),
105
+ s.id && /* @__PURE__ */ e("span", { className: "rounded bg-muted px-2 py-0.5 font-mono text-[9px] text-muted-foreground", children: s.id })
106
+ ] }) }),
107
+ /* @__PURE__ */ l("div", { children: [
108
+ /* @__PURE__ */ e("div", { className: "mb-2 text-[10px] font-medium text-muted-foreground", children: a("Preview:") }),
109
+ /* @__PURE__ */ e(
110
+ le,
111
+ {
112
+ content: a("Sample text with token styles applied"),
113
+ classes: r,
114
+ style: { minHeight: 80 },
115
+ title: a("Token Preview")
116
+ }
117
+ )
118
+ ] })
119
+ ] }) }) });
120
+ }, Ce = ({ open: s, onOpenChange: a }) => {
121
+ const { t: r } = F(), [n, i] = g(null), [t, c] = g(!1), [p, m] = g(!1), o = v(
122
+ (h) => {
123
+ if (!h && t) {
124
+ m(!0);
125
+ return;
126
+ }
127
+ a(h);
128
+ },
129
+ [t, a]
130
+ ), d = v(() => {
131
+ m(!1), c(!1), a(!1);
132
+ }, [a]);
133
+ return /* @__PURE__ */ l(y, { children: [
134
+ /* @__PURE__ */ e(S, { open: s, onOpenChange: o, children: /* @__PURE__ */ l(L, { className: "flex h-[53vh] max-w-6xl flex-col gap-0 p-0", children: [
135
+ /* @__PURE__ */ e(E, { className: "border-b border-border px-6 py-4", children: /* @__PURE__ */ l(O, { className: "flex items-center gap-2", children: [
136
+ /* @__PURE__ */ e(Q, { className: "h-5 w-5 text-primary" }),
137
+ r("Design Token Management")
138
+ ] }) }),
139
+ /* @__PURE__ */ l("div", { className: "flex flex-1 overflow-hidden", children: [
140
+ /* @__PURE__ */ e("div", { className: "flex w-1/2 flex-col border-r border-border p-4", children: /* @__PURE__ */ e(re, { onActiveTokenChange: i, onDirtyStateChange: c }) }),
141
+ /* @__PURE__ */ l("div", { className: "flex w-1/2 flex-col p-4", children: [
142
+ /* @__PURE__ */ e("div", { className: "mb-3 flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: r("Live Preview") }) }),
143
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ e(ie, { activeToken: n }) })
144
+ ] })
145
+ ] })
146
+ ] }) }),
147
+ /* @__PURE__ */ e(U, { open: p, onOpenChange: m, children: /* @__PURE__ */ l(q, { children: [
148
+ /* @__PURE__ */ l(R, { children: [
149
+ /* @__PURE__ */ e($, { children: r("Unsaved Changes") }),
150
+ /* @__PURE__ */ e(V, { children: r("You have unsaved changes. Are you sure you want to close? Your changes will be lost.") })
151
+ ] }),
152
+ /* @__PURE__ */ l(Y, { children: [
153
+ /* @__PURE__ */ e(z, { children: r("Continue Editing") }),
154
+ /* @__PURE__ */ e(B, { onClick: d, children: r("Discard Changes") })
155
+ ] })
156
+ ] }) })
157
+ ] });
158
+ };
159
+ export {
160
+ Ce as default
161
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-mPCp0j2h.cjs"),y=require("@radix-ui/react-icons"),c=require("react"),j=require("react-i18next"),g=require("./plugin-DHpuZZXz.cjs"),o=require("lodash-es"),b=require("@tailwindcss/aspect-ratio"),v=require("@tailwindcss/container-queries"),w=require("@tailwindcss/forms"),C=require("@tailwindcss/typography"),D=require("./fonts-D5fTqvSS.cjs"),F=require("./manage-design-tokens-BknGNAKE.cjs"),N=()=>{const[s]=t.useTheme(),r=t.useThemeOptions(),[l]=t.useDarkMode(),{document:n,window:d}=t.useFrame(),i=D.useRegisteredFonts();c.useEffect(()=>{l?n==null||n.documentElement.classList.add("dark"):n==null||n.documentElement.classList.remove("dark")},[l,n]),c.useEffect(()=>{!d||!d.tailwind||(d.tailwind.config={darkMode:"class",theme:{extend:{container:{center:!0,padding:"1rem",screens:{"2xl":"1400px"}},...g.getChaiThemeOptions(r)}},plugins:[C,w,b,v,g.plugin(function({addBase:a,theme:m}){a({"h1,h2,h3,h4,h5,h6":{fontFamily:m("fontFamily.heading")},body:{fontFamily:m("fontFamily.body"),color:m("colors.foreground"),backgroundColor:m("colors.background")}})})]})},[s,r,d]);const u=c.useMemo(()=>{const a=o.get(s,"fontFamily.heading"),m=o.get(s,"fontFamily.body");return i.filter(f=>f.family===a||f.family===m)},[s,i]),p=c.useMemo(()=>g.getThemeFontsUrls(o.filter(u,a=>o.has(a,"url"))),[u]),h=c.useMemo(()=>g.getThemeCustomFontFace(o.filter(u,a=>o.has(a,"src"))),[u]);return e.jsxs(e.Fragment,{children:[e.jsx(t.CssThemeVariables,{theme:s}),p.map((a,m)=>e.jsx("link",{rel:"stylesheet",href:a},`preview-font-${m}`)),e.jsx("style",{id:"chai-custom-fonts",dangerouslySetInnerHTML:{__html:h}})]})},T=({content:s,classes:r="",className:l="w-full rounded border-0",style:n={minHeight:80},title:d="Preview"})=>{const i=c.useMemo(()=>t.IframeInitialContent.replace('dir="__HTML_DIR__"','dir="ltr"'),[]);return e.jsxs(t.ChaiFrame,{className:l,style:n,title:d,initialContent:i,children:[e.jsx(N,{}),e.jsx("div",{className:"h-full p-4",children:e.jsx("div",{className:r||void 0,dangerouslySetInnerHTML:{__html:s}})})]})},x=["xs","sm","md","lg","xl","2xl"],k=s=>{if(s=s.trim().replace(/ +(?= )/g,""),o.isEmpty(s))return"";const r=o.map(s.split(" "),t.constructClassObject),l=[];for(const n of r){const d=n.mq;if(!l.includes(n.fullCls))for(let i=x.indexOf(d)+1;i<x.length;i++){const u=o.find(r,{property:n.property,mq:x[i]});if(u&&u.cls!==n.cls)break;o.find(r,{cls:n.cls,mq:x[i]})&&l.push(`${x[i]}:${n.cls}`)}}return o.filter(o.map(r,n=>l.includes(n.fullCls)?null:n.fullCls),n=>n!==null).join(" ")},q=({activeToken:s})=>{const{t:r}=j.useTranslation(),l=s!=null&&s.value?k(s.value):"",n=s&&s.name&&s.value;return e.jsx(t.ScrollArea,{className:"h-full",children:e.jsx("div",{className:"space-y-4 pr-4",children:e.jsxs("div",{className:"space-y-2 rounded-lg border bg-card p-4",children:[n&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-semibold",children:s.name}),s.id&&e.jsx("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[9px] text-muted-foreground",children:s.id})]})}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-[10px] font-medium text-muted-foreground",children:r("Preview:")}),e.jsx(T,{content:r("Sample text with token styles applied"),classes:l,style:{minHeight:80},title:r("Token Preview")})]})]})})})},A=({open:s,onOpenChange:r})=>{const{t:l}=j.useTranslation(),[n,d]=c.useState(null),[i,u]=c.useState(!1),[p,h]=c.useState(!1),a=c.useCallback(f=>{if(!f&&i){h(!0);return}r(f)},[i,r]),m=c.useCallback(()=>{h(!1),u(!1),r(!1)},[r]);return e.jsxs(e.Fragment,{children:[e.jsx(t.Dialog,{open:s,onOpenChange:a,children:e.jsxs(t.DialogContent,{className:"flex h-[53vh] max-w-6xl flex-col gap-0 p-0",children:[e.jsx(t.DialogHeader,{className:"border-b border-border px-6 py-4",children:e.jsxs(t.DialogTitle,{className:"flex items-center gap-2",children:[e.jsx(y.TokensIcon,{className:"h-5 w-5 text-primary"}),l("Design Token Management")]})}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx("div",{className:"flex w-1/2 flex-col border-r border-border p-4",children:e.jsx(F.default,{onActiveTokenChange:d,onDirtyStateChange:u})}),e.jsxs("div",{className:"flex w-1/2 flex-col p-4",children:[e.jsx("div",{className:"mb-3 flex items-center justify-between",children:e.jsx("h3",{className:"text-sm font-semibold",children:l("Live Preview")})}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(q,{activeToken:n})})]})]})]})}),e.jsx(t.AlertDialog,{open:p,onOpenChange:h,children:e.jsxs(t.AlertDialogContent,{children:[e.jsxs(t.AlertDialogHeader,{children:[e.jsx(t.AlertDialogTitle,{children:l("Unsaved Changes")}),e.jsx(t.AlertDialogDescription,{children:l("You have unsaved changes. Are you sure you want to close? Your changes will be lost.")})]}),e.jsxs(t.AlertDialogFooter,{children:[e.jsx(t.AlertDialogCancel,{children:l("Continue Editing")}),e.jsx(t.AlertDialogAction,{onClick:m,children:l("Discard Changes")})]})]})})]})};exports.default=A;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { z, B as c } from "./register-chai-top-bar-D6GjnauV.js";
3
- import { D as P, e as B, f as E, g as L, p as S, q as w, T as U, r as R } from "./index-BFnMzGe6.js";
4
- import { q as j, m as O } from "./index-CA1OwKJX.js";
3
+ import { D as P, e as B, f as E, g as L, p as S, q as w, T as U, r as R } from "./index-DsQXiNA_.js";
4
+ import { q as j, m as O } from "./index-IQefjAA0.js";
5
5
  import { startCase as y } from "lodash-es";
6
6
  import { Tag as q, File as X, ImageIcon as _, X as $ } from "lucide-react";
7
7
  import { useState as m, useRef as H, useCallback as K } from "react";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./register-chai-top-bar-DyW9GPzV.cjs"),t=require("./index-D30xvFa5.cjs"),y=require("./index-Bzn_gpaK.cjs"),w=require("lodash-es"),m=require("lucide-react"),l=require("react"),M=require("react-i18next"),k=require("sonner"),B=1*1024*1024,A=({page:r,onClose:u})=>{const{t:s}=M.useTranslation(),[f,p]=l.useState(!1),[j,T]=l.useState(""),[c,N]=l.useState(""),[v,x]=l.useState(!1),i=l.useRef(null),C=y.useMarkAsTemplate(),{data:h}=y.usePageTypes(),g=h==null?void 0:h.find(a=>a.key===r.pageType),I=(g==null?void 0:g.name)||w.startCase(r.pageType),D=l.useCallback(a=>{var b;const d=(b=a.target.files)==null?void 0:b[0];if(d){if(d.size>B){k.toast.error(s("File too large"),{description:`${s("Maximum file size is 1MB. Selected file is")} ${(d.size/1024).toFixed(2)}KB.`}),i.current&&(i.current.value="");return}try{x(!0);const n=new FileReader;n.onloadend=()=>{N(n.result),x(!1)},n.readAsDataURL(d)}catch(n){console.error("Error reading file:",n),x(!1),k.toast.error(s("Failed to process image"),{description:n instanceof Error?n.message:s("Unknown error")})}}},[s]),F=()=>{N(""),i.current&&(i.current.value="")},S=()=>{var a;(a=i.current)==null||a.click()},q=()=>{p(!0),C.mutate({page:r,name:r.name,description:j.trim()||void 0,pageType:r.pageType,...c?{previewImage:c}:{}},{onSuccess:()=>{p(!1),u()},onError:()=>{p(!1)}})};return e.jsx(t.Dialog,{open:!0,onOpenChange:u,children:e.jsxs(t.DialogContent,{children:[e.jsxs(t.DialogHeader,{children:[e.jsx(t.DialogTitle,{children:s("Mark as template")}),e.jsxs(t.DialogDescription,{className:"space-y-1 py-4 text-xs text-slate-500",children:[s("Are you sure you want to mark this page as a template?"),e.jsx("br",{}),s("Templates can be used to create new pages with the same content.")]})]}),e.jsxs("div",{className:"mb-4 space-y-4 text-xs",children:[e.jsxs("div",{className:"space-y-3 rounded border bg-slate-50 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m.Tag,{className:"h-4 w-4 text-slate-500"}),e.jsxs("span",{className:"font-medium text-slate-500",children:[s("Page Name"),":"]}),e.jsx("span",{className:"font-semibold",children:w.startCase(r.name)})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m.File,{className:"h-4 w-4 text-slate-500"}),e.jsxs("span",{className:"font-medium text-slate-500",children:[s("Type"),":"]}),e.jsx("span",{className:"font-semibold",children:I})]})]}),e.jsxs("div",{children:[e.jsx(t.Label,{htmlFor:"description",className:"text-xs font-medium",children:s("Description (Optional)")}),e.jsx(t.Textarea,{id:"description",placeholder:s("Describe this template's purpose"),className:"mt-1 h-24 resize-none text-xs",value:j,onChange:a=>T(a.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t.Label,{htmlFor:"previewImage",className:"text-xs font-medium",children:s("Preview Image (Optional)")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o.Input,{type:"file",id:"previewImage",ref:i,onChange:D,accept:"image/*",className:"hidden"}),e.jsx(o.Button,{type:"button",variant:"outline",onClick:S,disabled:v,className:"w-full",children:v?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),s("Uploading...")]}):e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(m.ImageIcon,{className:"h-4 w-4"}),s("Select image")]})}),c&&e.jsx(o.Button,{type:"button",variant:"outline",size:"icon",onClick:F,children:e.jsx(m.X,{className:"h-4 w-4"})})]}),c&&e.jsx("div",{className:"aspect-video overflow-hidden rounded-md border",children:e.jsx("img",{src:c,alt:s("Preview"),className:"h-full max-h-[200px] w-full object-contain"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("max 1mb")})]})]})]}),e.jsxs(t.DialogFooter,{className:f?"pointer-events-none opacity-75":"",children:[e.jsx(o.Button,{variant:"outline",onClick:a=>{a.stopPropagation(),u()},children:s("Cancel")}),e.jsx(o.Button,{variant:"default",disabled:f,onClick:q,children:s("Mark as template")})]})]})})};exports.default=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./register-chai-top-bar-DyW9GPzV.cjs"),t=require("./index-mPCp0j2h.cjs"),y=require("./index-Bzyv7mAh.cjs"),w=require("lodash-es"),m=require("lucide-react"),l=require("react"),M=require("react-i18next"),k=require("sonner"),B=1*1024*1024,A=({page:r,onClose:u})=>{const{t:s}=M.useTranslation(),[f,p]=l.useState(!1),[j,T]=l.useState(""),[c,N]=l.useState(""),[v,x]=l.useState(!1),i=l.useRef(null),C=y.useMarkAsTemplate(),{data:h}=y.usePageTypes(),g=h==null?void 0:h.find(a=>a.key===r.pageType),I=(g==null?void 0:g.name)||w.startCase(r.pageType),D=l.useCallback(a=>{var b;const d=(b=a.target.files)==null?void 0:b[0];if(d){if(d.size>B){k.toast.error(s("File too large"),{description:`${s("Maximum file size is 1MB. Selected file is")} ${(d.size/1024).toFixed(2)}KB.`}),i.current&&(i.current.value="");return}try{x(!0);const n=new FileReader;n.onloadend=()=>{N(n.result),x(!1)},n.readAsDataURL(d)}catch(n){console.error("Error reading file:",n),x(!1),k.toast.error(s("Failed to process image"),{description:n instanceof Error?n.message:s("Unknown error")})}}},[s]),F=()=>{N(""),i.current&&(i.current.value="")},S=()=>{var a;(a=i.current)==null||a.click()},q=()=>{p(!0),C.mutate({page:r,name:r.name,description:j.trim()||void 0,pageType:r.pageType,...c?{previewImage:c}:{}},{onSuccess:()=>{p(!1),u()},onError:()=>{p(!1)}})};return e.jsx(t.Dialog,{open:!0,onOpenChange:u,children:e.jsxs(t.DialogContent,{children:[e.jsxs(t.DialogHeader,{children:[e.jsx(t.DialogTitle,{children:s("Mark as template")}),e.jsxs(t.DialogDescription,{className:"space-y-1 py-4 text-xs text-slate-500",children:[s("Are you sure you want to mark this page as a template?"),e.jsx("br",{}),s("Templates can be used to create new pages with the same content.")]})]}),e.jsxs("div",{className:"mb-4 space-y-4 text-xs",children:[e.jsxs("div",{className:"space-y-3 rounded border bg-slate-50 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m.Tag,{className:"h-4 w-4 text-slate-500"}),e.jsxs("span",{className:"font-medium text-slate-500",children:[s("Page Name"),":"]}),e.jsx("span",{className:"font-semibold",children:w.startCase(r.name)})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m.File,{className:"h-4 w-4 text-slate-500"}),e.jsxs("span",{className:"font-medium text-slate-500",children:[s("Type"),":"]}),e.jsx("span",{className:"font-semibold",children:I})]})]}),e.jsxs("div",{children:[e.jsx(t.Label,{htmlFor:"description",className:"text-xs font-medium",children:s("Description (Optional)")}),e.jsx(t.Textarea,{id:"description",placeholder:s("Describe this template's purpose"),className:"mt-1 h-24 resize-none text-xs",value:j,onChange:a=>T(a.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t.Label,{htmlFor:"previewImage",className:"text-xs font-medium",children:s("Preview Image (Optional)")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o.Input,{type:"file",id:"previewImage",ref:i,onChange:D,accept:"image/*",className:"hidden"}),e.jsx(o.Button,{type:"button",variant:"outline",onClick:S,disabled:v,className:"w-full",children:v?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),s("Uploading...")]}):e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(m.ImageIcon,{className:"h-4 w-4"}),s("Select image")]})}),c&&e.jsx(o.Button,{type:"button",variant:"outline",size:"icon",onClick:F,children:e.jsx(m.X,{className:"h-4 w-4"})})]}),c&&e.jsx("div",{className:"aspect-video overflow-hidden rounded-md border",children:e.jsx("img",{src:c,alt:s("Preview"),className:"h-full max-h-[200px] w-full object-contain"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("max 1mb")})]})]})]}),e.jsxs(t.DialogFooter,{className:f?"pointer-events-none opacity-75":"",children:[e.jsx(o.Button,{variant:"outline",onClick:a=>{a.stopPropagation(),u()},children:s("Cancel")}),e.jsx(o.Button,{variant:"default",disabled:f,onClick:q,children:s("Mark as template")})]})]})})};exports.default=A;
@@ -2,7 +2,7 @@ import { jsx as c, jsxs as n } from "react/jsx-runtime";
2
2
  import { ChevronLeft as v, ChevronRight as g } from "lucide-react";
3
3
  import * as l from "react";
4
4
  import { B as k } from "./register-chai-top-bar-D6GjnauV.js";
5
- import { P as N, C as x, j as P, k as S, l as w, m as B, n as d } from "./index-BFnMzGe6.js";
5
+ import { P as N, C as x, j as P, k as S, l as w, m as B, n as d } from "./index-DsQXiNA_.js";
6
6
  function I({
7
7
  data: o,
8
8
  onSelect: m,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("lucide-react"),p=require("react"),v=require("./register-chai-top-bar-DyW9GPzV.cjs"),a=require("./index-D30xvFa5.cjs");function C(c){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const r in c)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(c,r);Object.defineProperty(l,r,i.get?i:{enumerable:!0,get:()=>c[r]})}}return l.default=c,Object.freeze(l)}const o=C(p);function N({data:c,onSelect:l,dataType:r="value",open:i,setOpen:m}){const[u,f]=o.useState([]),[h,j]=o.useState(c);o.useEffect(()=>{i||f([]),j(c)},[c,i]);const b=e=>Array.isArray(e)?"array":typeof e=="object"&&e!==null?"object":"value",y=o.useCallback(e=>{const n=s=>r==="value"?s==="value"||s==="object":r==="array"?s==="array":s===r;e.type==="object"?(f(s=>[...s,e.key]),j(e.value)):n(e.type)&&(l([...u,e.key].join(".")),m(!1))},[r,l,u,m]),x=o.useCallback(()=>{if(u.length>0){const e=u.slice(0,-1);f(e),j(e.reduce((n,s)=>n[s],c))}},[u,c]),g=o.useMemo(()=>Object.entries(h).map(([e,n])=>({key:e,value:n,type:b(n)})).filter(e=>r==="value"?e.type==="value"||e.type==="object":r==="array"?e.type==="array"||e.type==="object":r==="object"?e.type==="object":!0),[h,r]);return t.jsx(a.PopoverContent,{className:"z-[9999] w-[200px] p-0",children:t.jsxs(a.Command,{children:[t.jsx(a.CommandInput,{className:"border-none",placeholder:"Search..."}),t.jsxs(a.CommandList,{onWheel:e=>{try{e.preventDefault();const n=e.currentTarget;n.scrollTop+=e.deltaY}catch{e.preventDefault()}},children:[t.jsx(a.CommandEmpty,{children:"No option found."}),t.jsxs(a.CommandGroup,{children:[u.length>0&&t.jsxs(a.CommandItem,{onSelect:x,className:"flex items-center text-sm",children:[t.jsx(d.ChevronLeft,{className:"mr-2 h-4 w-4"}),"Back"]}),g.map(e=>t.jsxs(a.CommandItem,{onSelect:()=>y(e),className:"flex items-center justify-between",children:[t.jsx("span",{children:e.key}),t.jsxs("div",{className:"flex items-center gap-2",children:[r==="object"&&e.type==="object"&&t.jsx(v.Button,{size:"sm",variant:"ghost",className:"h-6 px-2 hover:bg-primary hover:text-primary-foreground",onClick:n=>{n.stopPropagation(),l([...u,e.key].join(".")),m(!1)},children:"Select"}),(e.type==="object"||e.type==="array")&&t.jsx("div",{className:"cursor-pointer rounded p-1 hover:bg-muted",children:t.jsx(d.ChevronRight,{className:"h-4 w-4 opacity-50"})})]})]},e.key))]})]})]})})}exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("lucide-react"),p=require("react"),v=require("./register-chai-top-bar-DyW9GPzV.cjs"),a=require("./index-mPCp0j2h.cjs");function C(c){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const r in c)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(c,r);Object.defineProperty(l,r,i.get?i:{enumerable:!0,get:()=>c[r]})}}return l.default=c,Object.freeze(l)}const o=C(p);function N({data:c,onSelect:l,dataType:r="value",open:i,setOpen:m}){const[u,f]=o.useState([]),[h,j]=o.useState(c);o.useEffect(()=>{i||f([]),j(c)},[c,i]);const b=e=>Array.isArray(e)?"array":typeof e=="object"&&e!==null?"object":"value",y=o.useCallback(e=>{const n=s=>r==="value"?s==="value"||s==="object":r==="array"?s==="array":s===r;e.type==="object"?(f(s=>[...s,e.key]),j(e.value)):n(e.type)&&(l([...u,e.key].join(".")),m(!1))},[r,l,u,m]),x=o.useCallback(()=>{if(u.length>0){const e=u.slice(0,-1);f(e),j(e.reduce((n,s)=>n[s],c))}},[u,c]),g=o.useMemo(()=>Object.entries(h).map(([e,n])=>({key:e,value:n,type:b(n)})).filter(e=>r==="value"?e.type==="value"||e.type==="object":r==="array"?e.type==="array"||e.type==="object":r==="object"?e.type==="object":!0),[h,r]);return t.jsx(a.PopoverContent,{className:"z-[9999] w-[200px] p-0",children:t.jsxs(a.Command,{children:[t.jsx(a.CommandInput,{className:"border-none",placeholder:"Search..."}),t.jsxs(a.CommandList,{onWheel:e=>{try{e.preventDefault();const n=e.currentTarget;n.scrollTop+=e.deltaY}catch{e.preventDefault()}},children:[t.jsx(a.CommandEmpty,{children:"No option found."}),t.jsxs(a.CommandGroup,{children:[u.length>0&&t.jsxs(a.CommandItem,{onSelect:x,className:"flex items-center text-sm",children:[t.jsx(d.ChevronLeft,{className:"mr-2 h-4 w-4"}),"Back"]}),g.map(e=>t.jsxs(a.CommandItem,{onSelect:()=>y(e),className:"flex items-center justify-between",children:[t.jsx("span",{children:e.key}),t.jsxs("div",{className:"flex items-center gap-2",children:[r==="object"&&e.type==="object"&&t.jsx(v.Button,{size:"sm",variant:"ghost",className:"h-6 px-2 hover:bg-primary hover:text-primary-foreground",onClick:n=>{n.stopPropagation(),l([...u,e.key].join(".")),m(!1)},children:"Select"}),(e.type==="object"||e.type==="array")&&t.jsx("div",{className:"cursor-pointer rounded p-1 hover:bg-muted",children:t.jsx(d.ChevronRight,{className:"h-4 w-4 opacity-50"})})]})]},e.key))]})]})]})})}exports.default=N;
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { B as h } from "./register-chai-top-bar-D6GjnauV.js";
3
- import { d as u, U as w, V as p, W as f, X as P, Y as C } from "./index-BFnMzGe6.js";
4
- import { c as S, d as L, L as x, B as N } from "./index-CA1OwKJX.js";
3
+ import { d as u, G as w, H as p, I as f, J as P, K as C } from "./index-DsQXiNA_.js";
4
+ import { c as S, d as L, L as x, B as N } from "./index-IQefjAA0.js";
5
5
  import { get as v } from "lodash-es";
6
6
  import { LockIcon as B } from "lucide-react";
7
7
  import { useTranslation as E } from "react-i18next";
8
- const A = () => {
8
+ const k = () => {
9
9
  const { t: a } = E(), [c, l] = S(), r = c.get("lang"), i = L(r), { setSelectedLang: g } = u(), d = () => {
10
10
  const n = new URLSearchParams(window.location.search);
11
11
  n.delete("lang");
@@ -39,5 +39,5 @@ const A = () => {
39
39
  ] }) });
40
40
  };
41
41
  export {
42
- A as default
42
+ k as default
43
43
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("./register-chai-top-bar-DyW9GPzV.cjs"),t=require("./index-D30xvFa5.cjs"),n=require("./index-Bzn_gpaK.cjs"),w=require("lodash-es"),x=require("lucide-react"),p=require("react-i18next"),P=()=>{const{t:a}=p.useTranslation(),[i,l]=n.useSearchParams(),c=i.get("lang"),g=n.useIsLanguagePageCreated(c),{setSelectedLang:u}=t.useLanguages(),d=()=>{const r=new URLSearchParams(window.location.search);r.delete("lang");const o=r.toString(),h=`${window.location.pathname}${o?`?${o}`:""}`;window.history.pushState({},"",h),l(r),u(""),window.dispatchEvent(new PopStateEvent("popstate"))};if(g)return null;const s=w.get(n.LANGUAGES,c);return e.jsx(n.BlurContainer,{children:e.jsxs(t.Card,{className:"mx-auto w-full max-w-md",children:[e.jsx(t.CardHeader,{className:"space-y-1",children:e.jsxs(t.CardTitle,{className:"flex items-center gap-2 text-2xl",children:[e.jsx(x.LockIcon,{className:"h-6 w-6 text-yellow-500"}),a("Page missing for"),' "',s,'" ',a("language"),"."]})}),e.jsx(t.CardContent,{className:"grid gap-4",children:e.jsxs("div",{children:[a("Page is not available in the"),' "',s,'" ',a("language. Either create the page in the"),' "',s,'"',a("language or switch to the base language.")]})}),e.jsx(t.CardFooter,{children:e.jsx(m.Button,{onClick:d,className:"w-full",variant:"destructive",children:a("Switch to default language")})})]})})};exports.default=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("./register-chai-top-bar-DyW9GPzV.cjs"),t=require("./index-mPCp0j2h.cjs"),n=require("./index-Bzyv7mAh.cjs"),w=require("lodash-es"),x=require("lucide-react"),p=require("react-i18next"),P=()=>{const{t:a}=p.useTranslation(),[i,l]=n.useSearchParams(),c=i.get("lang"),g=n.useIsLanguagePageCreated(c),{setSelectedLang:u}=t.useLanguages(),d=()=>{const r=new URLSearchParams(window.location.search);r.delete("lang");const o=r.toString(),h=`${window.location.pathname}${o?`?${o}`:""}`;window.history.pushState({},"",h),l(r),u(""),window.dispatchEvent(new PopStateEvent("popstate"))};if(g)return null;const s=w.get(n.LANGUAGES,c);return e.jsx(n.BlurContainer,{children:e.jsxs(t.Card,{className:"mx-auto w-full max-w-md",children:[e.jsx(t.CardHeader,{className:"space-y-1",children:e.jsxs(t.CardTitle,{className:"flex items-center gap-2 text-2xl",children:[e.jsx(x.LockIcon,{className:"h-6 w-6 text-yellow-500"}),a("Page missing for"),' "',s,'" ',a("language"),"."]})}),e.jsx(t.CardContent,{className:"grid gap-4",children:e.jsxs("div",{children:[a("Page is not available in the"),' "',s,'" ',a("language. Either create the page in the"),' "',s,'"',a("language or switch to the base language.")]})}),e.jsx(t.CardFooter,{children:e.jsx(m.Button,{onClick:d,className:"w-full",variant:"destructive",children:a("Switch to default language")})})]})})};exports.default=P;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./index-Bzn_gpaK.cjs"),n=require("react"),t=n.lazy(()=>Promise.resolve().then(()=>require("./no-language-page-content-Bkj8JpEY.cjs"))),g=()=>{const[r]=a.useSearchParams(),s=r.get("lang");return a.useIsLanguagePageCreated(s)?null:e.jsx(n.Suspense,{children:e.jsx(t,{})})};exports.default=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./index-Bzyv7mAh.cjs"),n=require("react"),t=n.lazy(()=>Promise.resolve().then(()=>require("./no-language-page-content-DWtEo657.cjs"))),g=()=>{const[r]=a.useSearchParams(),s=r.get("lang");return a.useIsLanguagePageCreated(s)?null:e.jsx(n.Suspense,{children:e.jsx(t,{})})};exports.default=g;
@@ -1,7 +1,7 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { c as g, d as n } from "./index-CA1OwKJX.js";
2
+ import { c as g, d as n } from "./index-IQefjAA0.js";
3
3
  import { Suspense as s, lazy as t } from "react";
4
- const o = t(() => import("./no-language-page-content-Bg6VjMVY.js")), l = () => {
4
+ const o = t(() => import("./no-language-page-content-C8W0M_Fj.js")), l = () => {
5
5
  const [e] = g(), r = e.get("lang");
6
6
  return n(r) ? null : /* @__PURE__ */ a(s, { children: /* @__PURE__ */ a(o, {}) });
7
7
  };