@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.
- package/dist/{2SSKDMRQ-Dub3pRV1.cjs → 2SSKDMRQ-DfXKDvXk.cjs} +1 -1
- package/dist/{2SSKDMRQ-B5Tzwoh4.js → 2SSKDMRQ-pPung-JB.js} +2 -2
- package/dist/{AP7HFJJL-CfmdXP9M.js → AP7HFJJL-CEJuc_Ox.js} +1 -1
- package/dist/{AP7HFJJL-Dt6MglIr.cjs → AP7HFJJL-PvPBwV6T.cjs} +1 -1
- package/dist/{IconPicker-DLqOB-ri.cjs → IconPicker-BJHUCDn4.cjs} +1 -1
- package/dist/{IconPicker-Cn8Z42-Z.js → IconPicker-D_GRfhwS.js} +1 -1
- package/dist/{WDYDFRGG-BOpmZGHS.js → WDYDFRGG-B3FrCE_j.js} +2 -2
- package/dist/{WDYDFRGG-Dfj1ikzw.cjs → WDYDFRGG-BPHlcLi5.cjs} +1 -1
- package/dist/{active-in-another-tab-CEWvA8SG.js → active-in-another-tab-C_Ma7oFU.js} +2 -2
- package/dist/{active-in-another-tab-DV83cJ_v.cjs → active-in-another-tab-WVYf-z5w.cjs} +1 -1
- package/dist/{add-new-language-page-C3Uu92KN.cjs → add-new-language-page-CxW2Vuyr.cjs} +1 -1
- package/dist/{add-new-language-page-B3wK94-S.js → add-new-language-page-DtsBO739.js} +3 -3
- package/dist/{add-new-page-BOE-xwBc.cjs → add-new-page-BfKt72NF.cjs} +1 -1
- package/dist/{add-new-page-DsvGVrR8.js → add-new-page-DG38rI6S.js} +2 -2
- package/dist/{ai-panel-content-DBlnfRRi.cjs → ai-panel-content-Dfo4jOVB.cjs} +1 -1
- package/dist/{ai-panel-content-BBSzHZG6.js → ai-panel-content-dktE9CIO.js} +3 -3
- package/dist/{ai-panel-default-lang-BVBuwnyU.js → ai-panel-default-lang-BbUTXMbm.js} +9 -9
- package/dist/{ai-panel-default-lang-DJJWAtN0.cjs → ai-panel-default-lang-GQCtwlPs.cjs} +2 -2
- package/dist/{ai-panel-other-lang-fIEZkmRy.js → ai-panel-other-lang-DIDS-mTi.js} +13 -13
- package/dist/{ai-panel-other-lang-v8Yd5ggR.cjs → ai-panel-other-lang-nCUxwpLX.cjs} +1 -1
- package/dist/{ai-prompt-input-CmSfGxTN.js → ai-prompt-input-B2q30bhR.js} +16 -16
- package/dist/{ai-prompt-input-C7ha_0Cn.cjs → ai-prompt-input-Dws5BHhQ.cjs} +1 -1
- package/dist/{ai-translation-prompt-BzTGAS3W.cjs → ai-translation-prompt-CJVcuWrs.cjs} +1 -1
- package/dist/{ai-translation-prompt-CtBmvsRy.js → ai-translation-prompt-D87qk3C1.js} +1 -1
- package/dist/{change-password-modal-CdOwtCWN.cjs → change-password-modal-CVUa60pC.cjs} +1 -1
- package/dist/{change-password-modal-DxkhBI5d.js → change-password-modal-PahNYs8x.js} +2 -2
- package/dist/{code-editor-Bpn8z2fo.js → code-editor-CWOmKcUc.js} +1 -1
- package/dist/{code-editor-fL3s6Hk7.cjs → code-editor-Cim6jQVF.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-DDB816CQ.js → continue-editing-in-this-client-BYFOU3hH.js} +2 -2
- package/dist/{continue-editing-in-this-client-DjxpjsA8.cjs → continue-editing-in-this-client-CW0f2LRk.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +3 -0
- package/dist/core.js +37 -37
- package/dist/{css-import-modal-CL8SIC3K.js → css-import-modal-6bMTRlCg.js} +1 -1
- package/dist/{css-import-modal-CRC7bK1c.cjs → css-import-modal-CXulmaB4.cjs} +1 -1
- package/dist/{delete-page-41tvYcEw.js → delete-page-BDViv7Xm.js} +2 -2
- package/dist/{delete-page-BHPlx8ec.cjs → delete-page-CdByrw3j.cjs} +1 -1
- package/dist/{design-token-usage-DtdjTCn3.cjs → design-token-usage-D-hrcKz1.cjs} +1 -1
- package/dist/{design-token-usage-CyOY4Pni.js → design-token-usage-lf7N_uOk.js} +28 -28
- package/dist/digital-asset-manager-CxxhsToc.cjs +1 -0
- package/dist/{digital-asset-manager-C_ru4Zes.js → digital-asset-manager-PcYficIX.js} +5 -5
- package/dist/{duplicate-page-BvggF83O.cjs → duplicate-page-D2f3HvWX.cjs} +1 -1
- package/dist/{duplicate-page-DMmDdmfS.js → duplicate-page-DfEA148D.js} +3 -3
- package/dist/{dynamic-page-selector-D2z51nLi.js → dynamic-page-selector-DB__KD2y.js} +2 -2
- package/dist/{dynamic-page-selector-C5agz2Ze.cjs → dynamic-page-selector-Dz7D1Wdr.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-DNp8Vhme.cjs → get-chai-builder-tailwind-config-7CxFxEYL.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-k8l5sdcw.js → get-chai-builder-tailwind-config-DC4sDOYK.js} +3 -3
- package/dist/{get-chai-builder-theme-BSUcPs5t.js → get-chai-builder-theme-BpuwSLeS.js} +1 -1
- package/dist/{image-compression-DsZ1oqpb.js → image-compression-DPFITwOL.js} +2 -2
- package/dist/image-compression-UaU7Bwqe.cjs +1 -0
- package/dist/{image-editor-DFmlG348.cjs → image-editor-BdW476J8.cjs} +1 -1
- package/dist/{image-editor-sKvOFo-S.js → image-editor-CilPMtAC.js} +1 -1
- package/dist/index-Bzyv7mAh.cjs +5 -0
- package/dist/{index-BFnMzGe6.js → index-DsQXiNA_.js} +4997 -4877
- package/dist/{index-CA1OwKJX.js → index-IQefjAA0.js} +1696 -1640
- package/dist/index-mPCp0j2h.cjs +160 -0
- package/dist/{json-diff-viewer-DRQSNhaS.cjs → json-diff-viewer-BPqY25PU.cjs} +1 -1
- package/dist/{json-diff-viewer-B5wAR5GY.js → json-diff-viewer-Ci2IbgDn.js} +34 -34
- package/dist/{lang-panel-q04hEq5o.js → lang-panel-DlAQr-y9.js} +3 -3
- package/dist/{lang-panel-BZsICcBR.cjs → lang-panel-jebYHYGD.cjs} +1 -1
- package/dist/library-blocks/bento/agency-showcase/agency-showcase.html +175 -0
- package/dist/library-blocks/bento/agency-showcase/agency-showcase.webp +0 -0
- package/dist/library-blocks/bento/creative-portfolio/creative-portfolio.html +116 -0
- package/dist/library-blocks/bento/creative-portfolio/creative-portfolio.webp +0 -0
- package/dist/library-blocks/bento/product-features/product-features.html +159 -0
- package/dist/library-blocks/bento/product-features/product-features.webp +0 -0
- package/dist/library-blocks/bento/saas-dashboard/saas-dashboard.html +182 -0
- package/dist/library-blocks/bento/saas-dashboard/saas-dashboard.webp +0 -0
- package/dist/library-blocks/bento/startup-metrics/startup-metrics.html +170 -0
- package/dist/library-blocks/bento/startup-metrics/startup-metrics.webp +0 -0
- package/dist/library-blocks/blocks-list.json +145 -12
- package/dist/library-blocks/feature/agency-services/agency-services.html +194 -0
- package/dist/library-blocks/feature/agency-services/agency-services.webp +0 -0
- package/dist/library-blocks/feature/consulting-firm/consulting-firm.html +219 -0
- package/dist/library-blocks/feature/consulting-firm/consulting-firm.webp +0 -0
- package/dist/library-blocks/feature/design-studio/design-studio.html +190 -0
- package/dist/library-blocks/feature/design-studio/design-studio.webp +0 -0
- package/dist/library-blocks/feature/freelancer-toolkit/freelancer-toolkit.html +195 -0
- package/dist/library-blocks/feature/freelancer-toolkit/freelancer-toolkit.webp +0 -0
- package/dist/library-blocks/feature/marketing-agency/marketing-agency.html +212 -0
- package/dist/library-blocks/feature/marketing-agency/marketing-agency.webp +0 -0
- package/dist/library-blocks/footer/creative-agency/creative-agency.html +64 -0
- package/dist/library-blocks/footer/creative-agency/creative-agency.webp +0 -0
- package/dist/library-blocks/footer/minimal-portfolio/minimal-portfolio.html +106 -0
- package/dist/library-blocks/footer/minimal-portfolio/minimal-portfolio.webp +0 -0
- package/dist/library-blocks/footer/saas-startup/saas-startup.html +117 -0
- package/dist/library-blocks/footer/saas-startup/saas-startup.webp +0 -0
- package/dist/library-blocks/hero/creative-agency/creative-agency.html +117 -0
- package/dist/library-blocks/hero/creative-agency/creative-agency.webp +0 -0
- package/dist/library-blocks/hero/developer-focused/developer-focused.html +124 -0
- package/dist/library-blocks/hero/developer-focused/developer-focused.webp +0 -0
- package/dist/library-blocks/hero/minimal-saas/minimal-saas.html +98 -0
- package/dist/library-blocks/hero/minimal-saas/minimal-saas.webp +0 -0
- package/dist/library-blocks/hero/portfolio-showcase/portfolio-showcase.html +148 -0
- package/dist/library-blocks/hero/portfolio-showcase/portfolio-showcase.webp +0 -0
- package/dist/library-blocks/hero/startup-landing/startup-landing.html +130 -0
- package/dist/library-blocks/hero/startup-landing/startup-landing.webp +0 -0
- package/dist/library-blocks/navbar/creative-agency/creative-agency.html +139 -0
- package/dist/library-blocks/navbar/creative-agency/creative-agency.webp +0 -0
- package/dist/library-blocks/navbar/minimal-portfolio/minimal-portfolio.html +164 -0
- package/dist/library-blocks/navbar/minimal-portfolio/minimal-portfolio.webp +0 -0
- package/dist/library-blocks/navbar/saas-startup/saas-startup.html +129 -0
- package/dist/library-blocks/navbar/saas-startup/saas-startup.webp +0 -0
- package/dist/manage-design-tokens-BknGNAKE.cjs +1 -0
- package/dist/manage-design-tokens-Co5677WS.js +428 -0
- package/dist/manage-design-tokens-modal-9qpcb-EC.js +161 -0
- package/dist/manage-design-tokens-modal-BcgdwEXE.cjs +1 -0
- package/dist/{mark-as-template-raTtKmQ9.js → mark-as-template-DOZL3umP.js} +2 -2
- package/dist/{mark-as-template-CT-hLGIW.cjs → mark-as-template-DS-tMllK.cjs} +1 -1
- package/dist/{nested-path-selector-content-CzQ2Lorl.js → nested-path-selector-content-Be-pbnVl.js} +1 -1
- package/dist/{nested-path-selector-content-CSUHTj9G.cjs → nested-path-selector-content-CWmPgU-L.cjs} +1 -1
- package/dist/{no-language-page-content-Bg6VjMVY.js → no-language-page-content-C8W0M_Fj.js} +4 -4
- package/dist/{no-language-page-content-Bkj8JpEY.cjs → no-language-page-content-DWtEo657.cjs} +1 -1
- package/dist/{no-language-page-dialog-TffLjvJn.cjs → no-language-page-dialog-FVXkSnfT.cjs} +1 -1
- package/dist/{no-language-page-dialog-CRPMr9YT.js → no-language-page-dialog-cpCZ9vES.js} +2 -2
- package/dist/{page-creator-CQhE1tgn.js → page-creator-CFtxeW_t.js} +172 -172
- package/dist/{page-creator-RrUhy8uH.cjs → page-creator-o6yRzsVf.cjs} +1 -1
- package/dist/{page-lock-D9h5pgxn.cjs → page-lock-BS_ErOIW.cjs} +1 -1
- package/dist/{page-lock-Dye1JZBB.js → page-lock-Cthbk6Pg.js} +2 -2
- package/dist/{page-locked-dialog-b2_f-A7a.cjs → page-locked-dialog-BWXifuQ8.cjs} +1 -1
- package/dist/{page-locked-dialog-BMjPVyHF.js → page-locked-dialog-D5hmaWqw.js} +16 -16
- package/dist/page-manager-new-Dl5YwsMm.js +418 -0
- package/dist/page-manager-new-DpSqBzeh.cjs +1 -0
- package/dist/{page-manager-search-and-filter-DCcYyoPO.js → page-manager-search-and-filter-iFsFJhn4.js} +27 -26
- package/dist/{page-manager-search-and-filter-D0ZXojiu.cjs → page-manager-search-and-filter-jDoLrCB7.cjs} +1 -1
- package/dist/{page-revisions-content-mDwvH6J-.js → page-revisions-content-C1IGUurW.js} +13 -13
- package/dist/{page-revisions-content-BX8ZWebc.cjs → page-revisions-content-CeBepZEw.cjs} +1 -1
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +3 -0
- package/dist/pages.js +1 -1
- package/dist/{plugin-Dkmjb2_e.js → plugin-BSjgGgwo.js} +10 -10
- package/dist/{publish-pages-content-M_Kb8b-F.js → publish-pages-content-BpEoA1T6.js} +3 -3
- package/dist/{publish-pages-content-CR4e9inX.cjs → publish-pages-content-PNsiaGI-.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +1 -0
- package/dist/render.js +32 -32
- package/dist/{rte-widget-modal-BRSm1Lnp.cjs → rte-widget-modal-CC1KcrAT.cjs} +1 -1
- package/dist/{rte-widget-modal-CVZDktXI.js → rte-widget-modal-c3T09VeO.js} +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/{save-to-lib-B1ccNhR2.js → save-to-lib-BERYhyxq.js} +27 -27
- package/dist/{save-to-lib-CYEAWxL9.cjs → save-to-lib-Bk59qO1r.cjs} +1 -1
- package/dist/sdk.css +1 -1
- package/dist/{selected-block-display-aGR7p5JC.js → selected-block-display-C6NxfC0N.js} +11 -11
- package/dist/{selected-block-display-MyU0rS4q.cjs → selected-block-display-vFSCOnw8.cjs} +1 -1
- package/dist/{seo-panel-B5mDwpaT.cjs → seo-panel-0vlr_dBq.cjs} +1 -1
- package/dist/{seo-panel-P9uixkoZ.js → seo-panel-COrEJZLA.js} +138 -138
- package/dist/{shared-json-ld-DhQJh_mT.cjs → shared-json-ld-C46hURIr.cjs} +1 -1
- package/dist/{shared-json-ld-Ba9GcvLr.js → shared-json-ld-DnTuCBc3.js} +70 -70
- package/dist/{slug-input-CAfGHqMW.js → slug-input-CAqkFZBq.js} +1 -1
- package/dist/{slug-input-BdMnlYKT.cjs → slug-input-Curnt2n3.cjs} +1 -1
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.js +193 -195
- package/dist/{take-over-request-BeHTL28z.cjs → take-over-request-6fliSr8w.cjs} +1 -1
- package/dist/{take-over-request-CXjaDliJ.js → take-over-request-DvmM5qTu.js} +10 -10
- package/dist/{theme-panel-footer-D_gxD0j4.cjs → theme-panel-footer-3ixmq107.cjs} +1 -1
- package/dist/{theme-panel-footer-BkwhuXM7.js → theme-panel-footer-BlsXRcEY.js} +2 -2
- package/dist/{translation-warning-modal-D_vt37fW.cjs → translation-warning-modal-B876S5yp.cjs} +1 -1
- package/dist/{translation-warning-modal-CTfArsb1.js → translation-warning-modal-kRcfrPgo.js} +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/{unmark-as-template-vFgMIdxN.js → unmark-as-template-Dn3klZKq.js} +2 -2
- package/dist/{unmark-as-template-D2bvjGKt.cjs → unmark-as-template-q1GblG-u.cjs} +1 -1
- package/dist/{unpublish-page-CxkjTzBB.js → unpublish-page-BbFZw0so.js} +2 -2
- package/dist/{unpublish-page-CPjHmtSM.cjs → unpublish-page-DMbcHmUV.cjs} +1 -1
- package/dist/unpublished-partials-modal-CEFXp1D1.cjs +1 -0
- package/dist/unpublished-partials-modal-Ts5ZhAK9.js +41 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/{web-preview--by73Vvr.js → web-preview-B2YGL26D.js} +1 -1
- package/dist/{web-preview-C3AMe_BB.cjs → web-preview-C6SLwtqv.cjs} +1 -1
- package/package.json +2 -7
- package/dist/delete-design-token-B0md8qUi.js +0 -40
- package/dist/delete-design-token-C94IgWdi.cjs +0 -1
- package/dist/digital-asset-manager-DSLQz8qk.cjs +0 -1
- package/dist/image-compression-DZ9WMmyn.cjs +0 -1
- package/dist/index-Bzn_gpaK.cjs +0 -5
- package/dist/index-D30xvFa5.cjs +0 -160
- package/dist/library-blocks/hero-1/hero-1.html +0 -74
- package/dist/library-blocks/hero-1/hero-1.webp +0 -0
- package/dist/library-blocks/hero-2/hero-2.html +0 -95
- package/dist/library-blocks/hero-2/hero-2.webp +0 -0
- package/dist/manage-design-tokens-Cene3KEu.js +0 -241
- package/dist/manage-design-tokens-Di5C6nTj.cjs +0 -1
- package/dist/page-manager-new-2mDjnSqc.cjs +0 -1
- package/dist/page-manager-new-DP1b_dXt.js +0 -411
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
import { jsxs as b, Fragment as F, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { d as oe } from "./index-BFnMzGe6.js";
|
|
3
|
-
import { aB as ye, aC as ge, ap as ke, k as de, T as D, aR as Ne, L as we, m as ve, g as Se, c as Le, av as Te, aS as Ae, aT as X } from "./index-CA1OwKJX.js";
|
|
4
|
-
import { u as J } from "./use-page-expand-manager-Cf4MUEJw.js";
|
|
5
|
-
import { compact as ue, filter as B, isEmpty as k, uniqBy as Ce, keyBy as me, mapValues as Ee, startCase as Me, toLower as M, includes as _, get as W, find as z, map as Ue } from "lodash-es";
|
|
6
|
-
import { atom as Ie, useAtom as $e, useSetAtom as ze } from "jotai";
|
|
7
|
-
import { ExternalLink as Be, Pencil as Fe, NotepadText as Oe, MoreHorizontal as je, Lock as Ge, Edit as Re, Plus as De, ChevronRight as We, StarsIcon as He, Hash as _e, File as he } from "lucide-react";
|
|
8
|
-
import { useRef as qe, useEffect as E, useMemo as H, useState as v, useCallback as ie, startTransition as Ve, Suspense as C, lazy as U } from "react";
|
|
9
|
-
import { useTranslation as Qe } from "react-i18next";
|
|
10
|
-
import { B as Xe } from "./register-chai-top-bar-D6GjnauV.js";
|
|
11
|
-
const ce = (e, s) => !e || !Array.isArray(e) ? [] : k(s) ? e : ue(
|
|
12
|
-
B(e, (r) => {
|
|
13
|
-
const n = M(s);
|
|
14
|
-
return _(M((r == null ? void 0 : r.name) || ""), n) || _(M((r == null ? void 0 : r.slug) || ""), n);
|
|
15
|
-
})
|
|
16
|
-
), Ye = (e, s) => {
|
|
17
|
-
const r = /* @__PURE__ */ new Set(), n = me(e, "id");
|
|
18
|
-
return s.forEach((o) => {
|
|
19
|
-
let a = o;
|
|
20
|
-
for (; a.parent && n[a.parent]; )
|
|
21
|
-
r.add(a.parent), a = n[a.parent];
|
|
22
|
-
}), Array.from(r).map((o) => n[o]);
|
|
23
|
-
}, Y = (e, s, r) => k(s) ? e : e.map((n) => {
|
|
24
|
-
if (!r(n.pageType))
|
|
25
|
-
return {
|
|
26
|
-
...n,
|
|
27
|
-
shouldExpandOnSearch: !0,
|
|
28
|
-
children: n.children ? Y(n.children, s, r) : []
|
|
29
|
-
};
|
|
30
|
-
const o = n.children && n.children.some(
|
|
31
|
-
(a) => _(M(a.name || ""), M(s)) || _(M(a.slug || ""), M(s))
|
|
32
|
-
);
|
|
33
|
-
return {
|
|
34
|
-
...n,
|
|
35
|
-
shouldExpandOnSearch: o,
|
|
36
|
-
children: n.children ? Y(n.children, s, r) : []
|
|
37
|
-
};
|
|
38
|
-
}), Je = (e) => {
|
|
39
|
-
if (!e || !e.length) return [];
|
|
40
|
-
const s = {};
|
|
41
|
-
e.forEach((n) => {
|
|
42
|
-
s[n.id] = { ...n, children: [] };
|
|
43
|
-
});
|
|
44
|
-
const r = [];
|
|
45
|
-
return Object.values(s).forEach((n) => {
|
|
46
|
-
n.parent && s[n.parent] ? s[n.parent].children.push(n) : r.push(n);
|
|
47
|
-
}), r;
|
|
48
|
-
}, fe = (e) => !e || !e.length ? [] : [...e].sort((r, n) => (r.name || "").localeCompare(n.name || "")).map((r) => ({
|
|
49
|
-
...r,
|
|
50
|
-
children: r.children ? fe(r.children) : []
|
|
51
|
-
})), Ke = (e, s, r, n) => {
|
|
52
|
-
if (!e || !e.length) return [];
|
|
53
|
-
let o = e;
|
|
54
|
-
if (r !== "all" && (o = ue(B(e, { pageType: r }))), k(s))
|
|
55
|
-
o = ce(o, s);
|
|
56
|
-
else {
|
|
57
|
-
const h = ce(o, s), c = Ye(e, h);
|
|
58
|
-
o = Ce([...h, ...c], "id");
|
|
59
|
-
}
|
|
60
|
-
const a = fe(Je(o)), f = Y(a, s, n), g = B(f, (h) => n(h.pageType)).sort(
|
|
61
|
-
(h, c) => (h.name || "").localeCompare(c.name || "")
|
|
62
|
-
), d = B(f, (h) => !n(h.pageType));
|
|
63
|
-
let x = [];
|
|
64
|
-
if (r === "all") {
|
|
65
|
-
const h = me(d, "pageType");
|
|
66
|
-
x = Object.values(
|
|
67
|
-
Ee(h, (c, p) => ({
|
|
68
|
-
...c,
|
|
69
|
-
id: p,
|
|
70
|
-
name: Me(p),
|
|
71
|
-
isPartialGroup: !0,
|
|
72
|
-
children: f.filter((N) => N.pageType === p)
|
|
73
|
-
}))
|
|
74
|
-
);
|
|
75
|
-
} else
|
|
76
|
-
x = d.sort((h, c) => (h.name || "").localeCompare(c.name || ""));
|
|
77
|
-
return [...g, ...x];
|
|
78
|
-
}, Ze = Ie({
|
|
79
|
-
pageId: null,
|
|
80
|
-
position: { x: 0, y: 0 }
|
|
81
|
-
}), et = ({ pageId: e, children: s }) => {
|
|
82
|
-
const [r, n] = $e(Ze), o = qe(null), a = r.pageId === e;
|
|
83
|
-
E(() => {
|
|
84
|
-
const d = () => n({ pageId: null, position: { x: 0, y: 0 } });
|
|
85
|
-
if (a)
|
|
86
|
-
return document.addEventListener("click", d), () => document.removeEventListener("click", d);
|
|
87
|
-
}, [a, n]);
|
|
88
|
-
const f = (d) => {
|
|
89
|
-
d.preventDefault(), d.stopPropagation(), n({ pageId: e, position: { x: d.clientX, y: d.clientY } });
|
|
90
|
-
}, g = () => {
|
|
91
|
-
const d = `${window.location.pathname}?page=${e}`;
|
|
92
|
-
window.open(d, "_blank"), n({ pageId: null, position: { x: 0, y: 0 } });
|
|
93
|
-
};
|
|
94
|
-
return /* @__PURE__ */ b(F, { children: [
|
|
95
|
-
/* @__PURE__ */ t("span", { onContextMenu: f, children: s }),
|
|
96
|
-
a && /* @__PURE__ */ t(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
ref: o,
|
|
100
|
-
className: "fixed z-[9999] max-w-[160px] rounded-md border border-gray-200 bg-white",
|
|
101
|
-
style: { top: r.position.y, left: r.position.x },
|
|
102
|
-
children: /* @__PURE__ */ t("div", { className: "", children: /* @__PURE__ */ b(
|
|
103
|
-
Xe,
|
|
104
|
-
{
|
|
105
|
-
variant: "ghost",
|
|
106
|
-
onClick: g,
|
|
107
|
-
className: "w-full px-2.5 py-1 text-start text-sm text-gray-700 hover:bg-gray-100",
|
|
108
|
-
children: [
|
|
109
|
-
/* @__PURE__ */ t(Be, { className: "h-4 w-4" }),
|
|
110
|
-
"Open in new tab"
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
) })
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
] });
|
|
117
|
-
}, tt = ({ page: e }) => {
|
|
118
|
-
var n, o;
|
|
119
|
-
const { isExpanded: s, toggleExpanded: r } = J(e == null ? void 0 : e.id);
|
|
120
|
-
return /* @__PURE__ */ t(
|
|
121
|
-
"button",
|
|
122
|
-
{
|
|
123
|
-
onClick: (a) => {
|
|
124
|
-
a.stopPropagation(), r();
|
|
125
|
-
},
|
|
126
|
-
disabled: !((n = e == null ? void 0 : e.children) != null && n.length),
|
|
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 ${(o = e == null ? void 0 : e.children) != null && o.length ? "hover:text-blue-400" : "opacity-0"}`,
|
|
128
|
-
children: /* @__PURE__ */ t(
|
|
129
|
-
We,
|
|
130
|
-
{
|
|
131
|
-
size: 12,
|
|
132
|
-
className: `stroke-[4] transition-transform duration-200 ${s ? "rotate-90" : ""}`
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}, nt = ({ page: e, pageType: s }) => /* @__PURE__ */ t("div", { className: "flex h-full items-center justify-center gap-x-1", children: e.dynamic ? /* @__PURE__ */ t(He, { size: 12, className: "text-yellow-400" }) : s != null && s.icon ? /* @__PURE__ */ t(
|
|
138
|
-
"div",
|
|
139
|
-
{
|
|
140
|
-
className: "flex h-4 max-h-4 w-4 max-w-4 items-center justify-center stroke-[1] text-slate-500",
|
|
141
|
-
dangerouslySetInnerHTML: { __html: s.icon }
|
|
142
|
-
}
|
|
143
|
-
) : s != null && s.hasSlug ? /* @__PURE__ */ t(he, { size: 12, className: "stroke-[1] text-slate-500" }) : /* @__PURE__ */ t(_e, { size: 12, className: "stroke-[1] text-slate-500" }) }), st = ({ isOnline: e }) => /* @__PURE__ */ t("div", { className: `h-2 w-2 rounded-full ${e ? "bg-green-300" : "bg-gray-300"}` }), rt = ({
|
|
144
|
-
page: e,
|
|
145
|
-
pageTypes: s,
|
|
146
|
-
currentPage: r,
|
|
147
|
-
onClickAction: n,
|
|
148
|
-
languagePages: o,
|
|
149
|
-
selectedLanguage: a,
|
|
150
|
-
showUntranslatedPages: f
|
|
151
|
-
}) => {
|
|
152
|
-
const g = ye(), { pageToUser: d } = ge(), x = W(d, [e == null ? void 0 : e.id, "userId"]), { data: h } = ke(x), c = h && g !== x ? h == null ? void 0 : h.name : null, p = de(), N = r === e.id, q = !!e.isTemplate, P = H(() => z(s, { key: e.pageType }), [s, e.pageType]);
|
|
153
|
-
let u = W(o, e == null ? void 0 : e.id);
|
|
154
|
-
u = W(u, "lang") === a ? u : null;
|
|
155
|
-
const L = a === p || !!u, T = (u == null ? void 0 : u.name) || (e == null ? void 0 : e.name) || "No name";
|
|
156
|
-
let w = (u == null ? void 0 : u.slug) || (e == null ? void 0 : e.slug) || "";
|
|
157
|
-
const O = w + (e != null && e.dynamic ? `/${P == null ? void 0 : P.dynamicSlug}` : "") + (e != null && e.dynamicSlugCustom ? `${e.dynamicSlugCustom}` : "");
|
|
158
|
-
if (w.startsWith("/") && !f) {
|
|
159
|
-
const i = w.split("/").pop();
|
|
160
|
-
w = w.endsWith(i) && e.dynamic ? "" : `/${i}`;
|
|
161
|
-
}
|
|
162
|
-
const j = H(() => {
|
|
163
|
-
const i = "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]", I = `${N ? "border-primary/30 bg-primary/5" : "border-transparent hover:border-gray-200 hover:bg-gray-100"}`;
|
|
164
|
-
return L ? `${i} ${I} ${c ? "opacity-60" : ""}` : `${i} bg-gray-100 opacity-50 group-hover:border-gray-200 border-transparent group-hover:bg-blue-100`;
|
|
165
|
-
}, [L, N, c]), G = H(() => {
|
|
166
|
-
if (e.isPartialGroup) return !1;
|
|
167
|
-
if (u) {
|
|
168
|
-
if (!u.online || k(u.changes)) return !1;
|
|
169
|
-
} else if (e && (!e.online || k(e.changes)))
|
|
170
|
-
return !1;
|
|
171
|
-
return !0;
|
|
172
|
-
}, [u, e]);
|
|
173
|
-
return /* @__PURE__ */ b("div", { className: "group relative", children: [
|
|
174
|
-
/* @__PURE__ */ t(et, { pageId: e.id, children: /* @__PURE__ */ b(
|
|
175
|
-
"div",
|
|
176
|
-
{
|
|
177
|
-
onClick: () => !e.isPartialGroup && L && n("select", e == null ? void 0 : e.id),
|
|
178
|
-
className: j,
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ t(tt, { page: e }),
|
|
181
|
-
!e.isPartialGroup && /* @__PURE__ */ t(st, { isOnline: u ? u.online : e.online }),
|
|
182
|
-
!e.isPartialGroup && /* @__PURE__ */ t(nt, { page: e, pageType: P }),
|
|
183
|
-
/* @__PURE__ */ t(D, { content: T, side: "top", showTooltip: T.length > 35, children: /* @__PURE__ */ t("span", { className: "max-w-[40%] truncate font-medium text-black", children: T }) }),
|
|
184
|
-
(w || e.dynamic) && /* @__PURE__ */ t(D, { content: O, side: "top", showTooltip: !0, children: /* @__PURE__ */ b("span", { className: "max-w-[40%] truncate font-mono text-xs text-muted-foreground", children: [
|
|
185
|
-
w,
|
|
186
|
-
e.dynamic && (P == null ? void 0 : P.dynamicSlug) && /* @__PURE__ */ b("span", { className: "text-xs text-gray-500", children: [
|
|
187
|
-
"/",
|
|
188
|
-
P == null ? void 0 : P.dynamicSlug,
|
|
189
|
-
e.dynamicSlugCustom
|
|
190
|
-
] })
|
|
191
|
-
] }) }),
|
|
192
|
-
G && /* @__PURE__ */ t(D, { content: "Has unpublished changes", side: "top", children: /* @__PURE__ */ t("span", { className: "text-amber-500", children: /* @__PURE__ */ t(Fe, { size: 12, className: "stroke-[2]" }) }) }),
|
|
193
|
-
q && /* @__PURE__ */ t(D, { content: "Template", side: "top", children: /* @__PURE__ */ t("span", { className: "text-blue-500", children: /* @__PURE__ */ t(Oe, { size: 16 }) }) }),
|
|
194
|
-
!e.isPartialGroup && L && !c ? /* @__PURE__ */ t("div", { className: "duration absolute right-0.5 top-[3px]", children: /* @__PURE__ */ t(
|
|
195
|
-
Ne,
|
|
196
|
-
{
|
|
197
|
-
isLanguagePage: !!u,
|
|
198
|
-
page: u || e,
|
|
199
|
-
setDuplicatePage: (i) => n("duplicate", i),
|
|
200
|
-
setAddEditPage: (i) => n("edit", u || i),
|
|
201
|
-
setUnpublishPage: (i) => n("unpublish", i),
|
|
202
|
-
setDeletePage: (i) => n("delete", u || i),
|
|
203
|
-
setMarkAsTemplate: (i) => n("markAsTemplate", i),
|
|
204
|
-
setUnmarkAsTemplate: (i) => n("unmarkAsTemplate", i),
|
|
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(je, { className: "h-4 w-4", onClick: (i) => i.stopPropagation() }) })
|
|
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(Ge, { className: "h-3.5 w-3.5 fill-red-200 text-red-500" }) }) : null
|
|
208
|
-
]
|
|
209
|
-
}
|
|
210
|
-
) }),
|
|
211
|
-
/* @__PURE__ */ t(F, { children: c && /* @__PURE__ */ b("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(Re, { 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__ */ b(
|
|
218
|
-
"button",
|
|
219
|
-
{
|
|
220
|
-
onClick: (i) => {
|
|
221
|
-
i.stopPropagation(), n("addLanguagePage", { language: a, page: e });
|
|
222
|
-
},
|
|
223
|
-
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
|
-
children: [
|
|
225
|
-
/* @__PURE__ */ t(De, { size: 12, className: "stroke-[3]" }),
|
|
226
|
-
" ",
|
|
227
|
-
/* @__PURE__ */ b("span", { className: "text-[10px]", children: [
|
|
228
|
-
"Add ",
|
|
229
|
-
W(we, a),
|
|
230
|
-
" Page"
|
|
231
|
-
] })
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
) })
|
|
235
|
-
] });
|
|
236
|
-
}, xe = ({
|
|
237
|
-
pages: e,
|
|
238
|
-
tier: s,
|
|
239
|
-
pageTypes: r,
|
|
240
|
-
currentPage: n,
|
|
241
|
-
onClickAction: o,
|
|
242
|
-
languagePages: a,
|
|
243
|
-
selectedLanguage: f,
|
|
244
|
-
showUntranslatedPages: g
|
|
245
|
-
}) => {
|
|
246
|
-
const { expandedPages: d } = J();
|
|
247
|
-
return /* @__PURE__ */ t("div", { className: "space-y-0.5", style: { paddingLeft: `${s * 10}px` }, children: e.map((x) => /* @__PURE__ */ b(F, { children: [
|
|
248
|
-
/* @__PURE__ */ t(
|
|
249
|
-
rt,
|
|
250
|
-
{
|
|
251
|
-
page: x,
|
|
252
|
-
pageTypes: r,
|
|
253
|
-
currentPage: n,
|
|
254
|
-
onClickAction: o,
|
|
255
|
-
languagePages: a,
|
|
256
|
-
selectedLanguage: f,
|
|
257
|
-
showUntranslatedPages: g
|
|
258
|
-
}
|
|
259
|
-
),
|
|
260
|
-
x.children && x.children.length > 0 && (d == null ? void 0 : d.includes(x.id)) && /* @__PURE__ */ t(
|
|
261
|
-
xe,
|
|
262
|
-
{
|
|
263
|
-
pages: x.children,
|
|
264
|
-
tier: s + 1,
|
|
265
|
-
pageTypes: r,
|
|
266
|
-
currentPage: n,
|
|
267
|
-
onClickAction: o,
|
|
268
|
-
languagePages: a,
|
|
269
|
-
selectedLanguage: f,
|
|
270
|
-
showUntranslatedPages: g
|
|
271
|
-
}
|
|
272
|
-
)
|
|
273
|
-
] }, x.id)) });
|
|
274
|
-
}, at = U(() => import("./page-manager-search-and-filter-DCcYyoPO.js")), lt = U(() => import("./add-new-page-DsvGVrR8.js")), ot = U(() => import("./delete-page-41tvYcEw.js")), it = U(() => import("./duplicate-page-DMmDdmfS.js")), ct = U(() => import("./mark-as-template-raTtKmQ9.js")), dt = U(() => import("./unmark-as-template-vFgMIdxN.js")), ut = U(() => import("./unpublish-page-CxkjTzBB.js")), Nt = ({ close: e }) => {
|
|
275
|
-
const { t: s } = Qe(), { languages: r, setSelectedLang: n } = oe(), { data: o } = ve(), { data: a, isFetching: f } = Se(), [g, d] = Le(), { updateForSelectedPage: x, expandPagesOnSearch: h } = J(null), c = de(), p = g.get("page"), [N, q] = v(""), [P, u] = v(null), [L, T] = v(null), [w, O] = v(null), [j, G] = v(null), [i, I] = v(""), [K, Z] = v(null), [ee, te] = v(null), [y, V] = v(c), [pe, Pe] = v(!1), ne = ze(Te), R = pe && y !== c, { data: $, isFetching: be } = Ae(y), se = ie(
|
|
276
|
-
(m) => {
|
|
277
|
-
var l;
|
|
278
|
-
return (l = z(o, { key: m })) == null ? void 0 : l.hasSlug;
|
|
279
|
-
},
|
|
280
|
-
[o]
|
|
281
|
-
), S = H(() => a ? R ? B(a, (m) => !($ != null && $[m.id])) : Ke(a, N, i, se) : [], [a, se, N, i, $, R]);
|
|
282
|
-
E(() => {
|
|
283
|
-
n(c);
|
|
284
|
-
}, [c, n]), E(() => {
|
|
285
|
-
const m = g.get("lang");
|
|
286
|
-
if (m) {
|
|
287
|
-
const l = r, A = r[0] ?? c, le = l.includes(m);
|
|
288
|
-
Ve(() => {
|
|
289
|
-
le && y !== m ? V(m) : !le && y !== A && V(A);
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}, []), E(() => {
|
|
293
|
-
if (!k(i)) return;
|
|
294
|
-
const m = sessionStorage.getItem("pageTypeFilter") || "all";
|
|
295
|
-
!k(o) && m && (z(o, { key: m }) ? I(m) : I("all"));
|
|
296
|
-
}, [o, i]), E(() => {
|
|
297
|
-
if (p && !f && !z(a, { id: p })) {
|
|
298
|
-
const l = z(a, { slug: "/" });
|
|
299
|
-
if (l) {
|
|
300
|
-
const A = new URLSearchParams({ page: l.id });
|
|
301
|
-
X(A, d);
|
|
302
|
-
} else
|
|
303
|
-
X(new URLSearchParams({}), d, !0);
|
|
304
|
-
}
|
|
305
|
-
}, [a, p, f, d]), E(() => {
|
|
306
|
-
p && !f && !k(S) && x(S, p);
|
|
307
|
-
}, [p, f, S, x]), E(() => {
|
|
308
|
-
!k(N) && !k(S) && h(S);
|
|
309
|
-
}, [N, S, h]);
|
|
310
|
-
const { setSelectedLang: Q } = oe(), re = ie(
|
|
311
|
-
(m) => {
|
|
312
|
-
const l = new URLSearchParams({ page: m });
|
|
313
|
-
y !== c ? (l.set("lang", y), Q(y)) : Q(""), X(l, d), e();
|
|
314
|
-
},
|
|
315
|
-
[e, d, Q, y, c]
|
|
316
|
-
), ae = (m, l) => {
|
|
317
|
-
var A;
|
|
318
|
-
if (l)
|
|
319
|
-
switch (m) {
|
|
320
|
-
case "add":
|
|
321
|
-
T(l);
|
|
322
|
-
break;
|
|
323
|
-
case "select":
|
|
324
|
-
re(l);
|
|
325
|
-
break;
|
|
326
|
-
case "edit":
|
|
327
|
-
y !== c ? ne({
|
|
328
|
-
edit: !0,
|
|
329
|
-
id: l == null ? void 0 : l.id,
|
|
330
|
-
primaryPage: l == null ? void 0 : l.primaryPage
|
|
331
|
-
}) : T(l);
|
|
332
|
-
break;
|
|
333
|
-
case "delete":
|
|
334
|
-
u(l);
|
|
335
|
-
break;
|
|
336
|
-
case "unpublish":
|
|
337
|
-
O(l);
|
|
338
|
-
break;
|
|
339
|
-
case "markAsTemplate":
|
|
340
|
-
G(l);
|
|
341
|
-
break;
|
|
342
|
-
case "unmarkAsTemplate":
|
|
343
|
-
te(l);
|
|
344
|
-
break;
|
|
345
|
-
case "duplicate":
|
|
346
|
-
Z(l);
|
|
347
|
-
break;
|
|
348
|
-
case "addLanguagePage":
|
|
349
|
-
ne({
|
|
350
|
-
edit: !1,
|
|
351
|
-
primaryPage: ((A = l == null ? void 0 : l.page) == null ? void 0 : A.id) || "",
|
|
352
|
-
preselectedLang: (l == null ? void 0 : l.language) || y
|
|
353
|
-
});
|
|
354
|
-
break;
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
return /* @__PURE__ */ b(F, { children: [
|
|
358
|
-
/* @__PURE__ */ b("div", { className: "flex h-full flex-col justify-between", children: [
|
|
359
|
-
/* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
|
|
360
|
-
at,
|
|
361
|
-
{
|
|
362
|
-
pages: S,
|
|
363
|
-
search: N,
|
|
364
|
-
setSearch: q,
|
|
365
|
-
languages: [c, ...r],
|
|
366
|
-
selectedLanguage: y,
|
|
367
|
-
setSelectedLanguage: V,
|
|
368
|
-
selectedPageType: i,
|
|
369
|
-
setSelectedPageType: I,
|
|
370
|
-
onAddPage: (m) => ae("add", m),
|
|
371
|
-
showUntranslatedPages: R,
|
|
372
|
-
setShowUntranslatedPages: Pe
|
|
373
|
-
}
|
|
374
|
-
) }),
|
|
375
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-4 pb-6 pt-2", children: f || be ? /* @__PURE__ */ t("div", { className: "space-y-2", children: Ue([...Array(15).keys()], (m) => /* @__PURE__ */ t("div", { className: "h-7 w-full animate-pulse rounded border border-gray-300 bg-gray-200" }, m)) }) : k(S) ? /* @__PURE__ */ b("div", { className: "flex h-[70vh] flex-col items-center justify-center gap-y-1 text-sm font-medium text-slate-500", children: [
|
|
376
|
-
/* @__PURE__ */ t(he, { className: "h-6 w-6 stroke-[1]" }),
|
|
377
|
-
s("Empty List!"),
|
|
378
|
-
/* @__PURE__ */ t("span", { className: "font-light", children: s("Add new page to start") })
|
|
379
|
-
] }) : /* @__PURE__ */ t(
|
|
380
|
-
xe,
|
|
381
|
-
{
|
|
382
|
-
tier: 0,
|
|
383
|
-
pages: S,
|
|
384
|
-
pageTypes: o,
|
|
385
|
-
currentPage: p || "",
|
|
386
|
-
onClickAction: ae,
|
|
387
|
-
languagePages: $,
|
|
388
|
-
selectedLanguage: y,
|
|
389
|
-
showUntranslatedPages: R
|
|
390
|
-
}
|
|
391
|
-
) })
|
|
392
|
-
] }),
|
|
393
|
-
L && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
|
|
394
|
-
lt,
|
|
395
|
-
{
|
|
396
|
-
closePanel: e,
|
|
397
|
-
editPage: re,
|
|
398
|
-
addEditPage: L,
|
|
399
|
-
setAddEditPage: T
|
|
400
|
-
}
|
|
401
|
-
) }),
|
|
402
|
-
P && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ot, { page: P, onClose: () => u(null) }) }),
|
|
403
|
-
w && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ut, { page: w, onClose: () => O(null) }) }),
|
|
404
|
-
j && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(ct, { page: j, onClose: () => G(null) }) }),
|
|
405
|
-
ee && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(dt, { page: ee, onClose: () => te(null) }) }),
|
|
406
|
-
K && /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(it, { page: K, onClose: () => Z(null), closePanel: e }) })
|
|
407
|
-
] });
|
|
408
|
-
};
|
|
409
|
-
export {
|
|
410
|
-
Nt as default
|
|
411
|
-
};
|