@chaibuilder/sdk 4.0.0-beta.4 → 4.0.0-beta.41
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/README.md +72 -50
- package/dist/{2SSKDMRQ-Difo_1pg.js → 2SSKDMRQ-CdpXONNF.js} +3 -3
- package/dist/{2SSKDMRQ-CopJgtZb.cjs → 2SSKDMRQ-Dq_oq6gn.cjs} +1 -1
- package/dist/{AP7HFJJL-BPuPBqj4.js → AP7HFJJL-CZb0rAxI.js} +1 -1
- package/dist/{AP7HFJJL-DYxDgaOs.cjs → AP7HFJJL-Do14BULM.cjs} +1 -1
- package/dist/{IconPicker-B2-oriq2.js → IconPicker-CvZSjXc6.js} +2 -2
- package/dist/{IconPicker-C0oycHbs.cjs → IconPicker-DUN9bxmQ.cjs} +1 -1
- package/dist/STRINGS-BExFecZW.js +8 -0
- package/dist/STRINGS-FNnfjF5H.cjs +1 -0
- package/dist/{WDYDFRGG-DbejaRPK.cjs → WDYDFRGG-DfczfcZ8.cjs} +1 -1
- package/dist/{WDYDFRGG-KK8pkcW1.js → WDYDFRGG-Dxa2zFdt.js} +4 -4
- package/dist/{actions-registery-y_ENc8zj.js → actions-registery-CMKfEXxX.js} +3397 -3202
- package/dist/actions-registery-CqhNZFV3.cjs +481 -0
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.ts +0 -158
- package/dist/actions.js +3 -3
- package/dist/{active-in-another-tab-DkR2HWI4.js → active-in-another-tab-BREv3Xj8.js} +5 -5
- package/dist/{active-in-another-tab-Cu_ASKtx.cjs → active-in-another-tab-C9o276yY.cjs} +1 -1
- package/dist/{add-new-language-page-CBY0RR6q.js → add-new-language-page-C4PSVDV5.js} +4 -4
- package/dist/{add-new-language-page-BXuwluuU.cjs → add-new-language-page-jHLJjrl1.cjs} +1 -1
- package/dist/{add-new-page-C_PzKby8.cjs → add-new-page-BPPMxBYi.cjs} +1 -1
- package/dist/add-new-page-DomZuT16.js +31 -0
- package/dist/{ai-panel-content--YM01Aly.js → ai-panel-content-CsmUoTCg.js} +6 -6
- package/dist/{ai-panel-content-rRmJdH7L.cjs → ai-panel-content-DlS51Qef.cjs} +1 -1
- package/dist/ai-panel-default-lang-BRVlAMMU.js +317 -0
- package/dist/ai-panel-default-lang-DVKDEnbe.cjs +3 -0
- package/dist/ai-panel-other-lang-B-2xJz2W.cjs +1 -0
- package/dist/ai-panel-other-lang-BPVS6lO_.js +132 -0
- package/dist/{ai-prompt-input-DueQYNf-.js → ai-prompt-input-B0FMhaLB.js} +30 -34
- package/dist/{ai-prompt-input-N9PcYCFa.cjs → ai-prompt-input-CY2pBPzO.cjs} +1 -1
- package/dist/{ai-translation-prompt-B36F3d7K.js → ai-translation-prompt-6LlaU9LO.js} +2 -2
- package/dist/{ai-translation-prompt-IAdWMNZb.cjs → ai-translation-prompt-BwhKmgC3.cjs} +1 -1
- package/dist/apply-binding-BuwI_Uf5.cjs +41 -0
- package/dist/apply-binding-RQRSIe56.js +942 -0
- package/dist/change-password-modal-BlSTfit6.js +137 -0
- package/dist/change-password-modal-wbCcGfDM.cjs +1 -0
- package/dist/{code-display-DloSPyPr.cjs → code-display-BR-gij5j.cjs} +1 -1
- package/dist/{code-display-Ck81Id9K.js → code-display-DdWcOQ_i.js} +1 -1
- package/dist/code-editor-BC_saYAw.cjs +1 -0
- package/dist/code-editor-Be5VT6om.js +57 -0
- package/dist/{continue-editing-in-this-client-DmGFLHXw.cjs → continue-editing-in-this-client-Bs_3q1hH.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-Dm9cCj7K.js → continue-editing-in-this-client-Z1rBUPU8.js} +3 -3
- package/dist/core-czmLeR0h.cjs +1 -0
- package/dist/core-nSRy3D7z.js +54 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +285 -103
- package/dist/core.js +71 -42
- package/dist/{css-import-modal-9P_0uNa4.js → css-import-modal-DMZRgpy0.js} +8 -8
- package/dist/{css-import-modal-Rh1QAVxo.cjs → css-import-modal-QaTHJ7CT.cjs} +1 -1
- package/dist/delete-page-BoP3I06P.js +84 -0
- package/dist/delete-page-CjXYHAsS.cjs +1 -0
- package/dist/{design-token-usage-MNYsFlPG.js → design-token-usage-DFanW2r-.js} +26 -26
- package/dist/{design-token-usage-CXglXgcJ.cjs → design-token-usage-kEPgi-3C.cjs} +1 -1
- package/dist/{digital-asset-manager-CqCWBO0s.js → digital-asset-manager-BbI7Ye34.js} +6 -6
- package/dist/digital-asset-manager-N8tcW28y.cjs +1 -0
- package/dist/{duplicate-page-DzZByALW.cjs → duplicate-page-B-4nFU4j.cjs} +1 -1
- package/dist/{duplicate-page-BknLfqr0.js → duplicate-page-C6y7FdRQ.js} +7 -7
- package/dist/{dynamic-page-selector-WA007Sni.cjs → dynamic-page-selector-Cq4U-49i.cjs} +1 -1
- package/dist/{dynamic-page-selector-DoW7OyUB.js → dynamic-page-selector-DQCWphi0.js} +16 -16
- package/dist/fonts/bungee/Bungee-Regular.woff2 +0 -0
- package/dist/fonts/dm_sans/dm-sans-variable.woff2 +0 -0
- package/dist/fonts/geist/Geist-VariableFont_wght.ttf +0 -0
- package/dist/fonts/geist/Geist-VariableFont_wght.woff2 +0 -0
- package/dist/fonts/geist/geist-variable.woff2 +0 -0
- package/dist/fonts/geist-mono/GeistMono-VariableFont_wght.woff2 +0 -0
- package/dist/fonts/inter/inter-latin.woff2 +0 -0
- package/dist/fonts/inter/inter-variable.woff2 +1449 -0
- package/dist/fonts/lato/lato-variable.woff2 +0 -0
- package/dist/fonts/lavishly_yours/lavishly-yours.woff2 +11 -0
- package/dist/fonts/merriweather/merriweather-variable.woff2 +11 -0
- package/dist/fonts/montserrat/montserrat-variable.woff2 +0 -0
- package/dist/fonts/nunito_sans/nunito-sans-variable.woff2 +11 -0
- package/dist/fonts/open_sans/open-sans-variable.woff2 +0 -0
- package/dist/fonts/oswald/oswald-variable.woff2 +0 -0
- package/dist/fonts/playfair_display/playfair-display-variable.woff2 +11 -0
- package/dist/fonts/poppins/poppins-variable.woff2 +0 -0
- package/dist/fonts/raleway/raleway-variable.woff2 +0 -0
- package/dist/fonts/roboto/roboto-variable.woff2 +11 -0
- package/dist/fonts/source_sans_3/source-sans-3-variable.woff2 +11 -0
- package/dist/fonts/ubuntu/ubuntu-variable.woff2 +0 -0
- package/dist/fonts-B3UYxuJI.js +25 -0
- package/dist/fonts-D5fTqvSS.cjs +1 -0
- package/dist/{get-chai-builder-tailwind-config-BFePCEIS.cjs → get-chai-builder-tailwind-config-7CxFxEYL.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-BXf_xLHk.js → get-chai-builder-tailwind-config-DC4sDOYK.js} +5 -5
- package/dist/{get-chai-builder-theme-BApShjRz.cjs → get-chai-builder-theme-B5RkBTsB.cjs} +1 -1
- package/dist/{get-chai-builder-theme-DDVRJQ6Z.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-CqwaVxO2.cjs → image-editor-565A0NpE.cjs} +1 -1
- package/dist/{image-editor-CQnNtak2.js → image-editor-Dz_HQ0I8.js} +1 -1
- package/dist/index-3pEi7VzS.cjs +5 -0
- package/dist/index-C3CV1lXL.cjs +160 -0
- package/dist/index-CDVuf3C1.js +5118 -0
- package/dist/{index-rAcNbjk_.js → index-wBr2Ml98.js} +6152 -6102
- package/dist/{json-diff-viewer-CLuUHiPU.cjs → json-diff-viewer-CMYFM6D6.cjs} +7 -7
- package/dist/{json-diff-viewer-CMvGUvJ2.js → json-diff-viewer-DG7a5-2B.js} +87 -85
- package/dist/{lang-panel-CnwTb05j.js → lang-panel-BvGiJJ8s.js} +26 -26
- package/dist/lang-panel-D97iJH-l.cjs +1 -0
- 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 +149 -0
- 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-4Gu6TMKZ.js +446 -0
- package/dist/manage-design-tokens-Do9Kptp3.cjs +1 -0
- package/dist/manage-design-tokens-modal-Btbdgoun.cjs +1 -0
- package/dist/manage-design-tokens-modal-CkyFE8NW.js +161 -0
- package/dist/{mark-as-template-DBLshWb5.js → mark-as-template-Djhnj93U.js} +11 -11
- package/dist/{mark-as-template-CpWEBJGd.cjs → mark-as-template-QPJ0DqxL.cjs} +1 -1
- package/dist/{nested-path-selector-content-C2sD9dkq.cjs → nested-path-selector-content-BcmSxXxL.cjs} +1 -1
- package/dist/{nested-path-selector-content-6OBJ8LG8.js → nested-path-selector-content-DkPIHcVj.js} +2 -2
- package/dist/{no-language-page-content-CzENgtnu.js → no-language-page-content-DTq-5StU.js} +9 -9
- package/dist/{no-language-page-content-BvPDdccK.cjs → no-language-page-content-ZQz4Kr0-.cjs} +1 -1
- package/dist/{no-language-page-dialog-CbYI2cVg.js → no-language-page-dialog-2rA-YBbC.js} +2 -2
- package/dist/{no-language-page-dialog-CgW4yJBC.cjs → no-language-page-dialog-BsLkwJID.cjs} +1 -1
- package/dist/{page-creator-Cc83uQqw.js → page-creator-Dzpc0_dN.js} +143 -143
- package/dist/page-creator-lcDUpPjh.cjs +1 -0
- package/dist/{page-lock-CT7SmQqp.cjs → page-lock-B2GU-1YM.cjs} +1 -1
- package/dist/{page-lock-BJUkyxdh.js → page-lock-ulFtdOkt.js} +2 -2
- package/dist/{page-locked-dialog-DsEbWRed.js → page-locked-dialog-B9VpkvhN.js} +22 -22
- package/dist/page-locked-dialog-CJ53Z6sQ.cjs +1 -0
- package/dist/page-manager-new-CkoS0B1i.cjs +1 -0
- package/dist/page-manager-new-OoC8W7Yn.js +408 -0
- package/dist/{page-manager-search-and-filter-Bfm0j1gg.cjs → page-manager-search-and-filter-BosoN3wg.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-zq-LfhQ1.js → page-manager-search-and-filter-JfSTGlvp.js} +30 -29
- package/dist/{page-revisions-content-D38G2tJM.js → page-revisions-content-DsFh5itr.js} +133 -122
- package/dist/page-revisions-content-Dtd-t1N3.cjs +1 -0
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +330 -96
- package/dist/pages.js +23 -19
- package/dist/plugin-BSjgGgwo.js +248 -0
- package/dist/plugin-DHpuZZXz.cjs +22 -0
- package/dist/publish-pages-content-C7oS7pkz.cjs +1 -0
- package/dist/{publish-pages-content-CS7f41Ac.js → publish-pages-content-DJc7iu8d.js} +39 -39
- package/dist/{register-chai-top-bar-ESJHs5s-.js → register-chai-top-bar-D6GjnauV.js} +87 -87
- package/dist/register-chai-top-bar-DyW9GPzV.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +20 -18
- package/dist/render.js +133 -132
- package/dist/{rte-widget-modal-BKNx2wln.cjs → rte-widget-modal-BKQaoxh9.cjs} +1 -1
- package/dist/{rte-widget-modal-D6Zik0Ta.js → rte-widget-modal-BdBYmqgs.js} +10 -10
- package/dist/runtime-client.cjs +1 -0
- package/dist/runtime-client.d.ts +158 -0
- package/dist/runtime-client.js +32 -0
- package/dist/runtime.cjs +11 -1
- package/dist/runtime.d.ts +153 -270
- package/dist/runtime.js +107 -71
- package/dist/{save-to-lib-WwOzbgiF.js → save-to-lib-5nwSdZ9R.js} +153 -147
- package/dist/save-to-lib-D0WdH4lq.cjs +1 -0
- package/dist/sdk.css +1 -1
- package/dist/{selected-block-display-B1SG_UXw.js → selected-block-display-D8ROZHHv.js} +12 -12
- package/dist/{selected-block-display-BOgnQRLF.cjs → selected-block-display-DjYeUPdU.cjs} +1 -1
- package/dist/{seo-panel-BkOgRoWd.js → seo-panel-BbyRNAEo.js} +27 -27
- package/dist/seo-panel-DRjSxmk5.cjs +2 -0
- package/dist/shared-json-ld-BbNLdzCO.cjs +1 -0
- package/dist/{shared-json-ld-uka9TOgA.js → shared-json-ld-EPbpTI9V.js} +88 -88
- package/dist/{slug-input-Cyd6NR6J.cjs → slug-input-CIzxXknM.cjs} +1 -1
- package/dist/{slug-input-DHLmUNrH.js → slug-input-DSbJecNr.js} +8 -8
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.d.ts +45 -0
- package/dist/supabase-actions.js +380 -275
- package/dist/{take-over-request-Ca0X-qyf.js → take-over-request-BOGDk0H4.js} +13 -13
- package/dist/take-over-request-BXntCMdj.cjs +1 -0
- package/dist/{translation-warning-modal-pSZVKcNW.cjs → translation-warning-modal-DhJaOyLo.cjs} +1 -1
- package/dist/{translation-warning-modal-DrpFeI83.js → translation-warning-modal-reVr0L9e.js} +9 -9
- package/dist/types.cjs +1 -0
- package/dist/types.d.ts +756 -0
- package/dist/types.js +1 -0
- package/dist/{unmark-as-template-BMqgelv-.js → unmark-as-template-BM85Y7WK.js} +11 -11
- package/dist/{unmark-as-template-DF1Ms4VN.cjs → unmark-as-template-DOPyeU7R.cjs} +1 -1
- package/dist/unpublish-page-DHfds-1-.js +28 -0
- package/dist/{unpublish-page-Bsq2yEqQ.cjs → unpublish-page-Dz028Bzp.cjs} +1 -1
- package/dist/unpublished-partials-modal-BO5ZZdTw.js +52 -0
- package/dist/unpublished-partials-modal-CMqQa9-m.cjs +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +6 -6
- package/dist/utils.js +2 -2
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +360 -351
- package/dist/{web-preview-kres0aG7.cjs → web-preview-5MzixBt5.cjs} +1 -1
- package/dist/{web-preview-D6h1L2nV.js → web-preview-BNjG8s8A.js} +2 -2
- package/package.json +34 -35
- package/dist/actions-registery-JdxhXhT6.cjs +0 -418
- package/dist/add-new-page-DJLJFLAd.js +0 -31
- package/dist/ai-panel-default-lang-BZl0tPYo.js +0 -341
- package/dist/ai-panel-default-lang-D2zhXvKP.cjs +0 -3
- package/dist/ai-panel-other-lang-Bfjk2CYZ.js +0 -162
- package/dist/ai-panel-other-lang-Y4bEKHoG.cjs +0 -1
- package/dist/apply-binding-BvWfJCSZ.js +0 -841
- package/dist/apply-binding-IsUf6UWJ.cjs +0 -1
- package/dist/code-editor-Bb7JumZy.js +0 -51
- package/dist/code-editor-DQB8lAOk.cjs +0 -1
- package/dist/core-Dr7QYemB.js +0 -56
- package/dist/core-Y0lXLwkq.cjs +0 -1
- package/dist/delete-design-token-BG8yHcS5.cjs +0 -1
- package/dist/delete-design-token-COvR4G1S.js +0 -40
- package/dist/delete-page-CNucxe4P.js +0 -71
- package/dist/delete-page-DAvEjHwF.cjs +0 -1
- package/dist/digital-asset-manager-CB5MRBcW.cjs +0 -1
- package/dist/fonts/GeistMonoVF.woff +0 -0
- package/dist/fonts/GeistVF.woff +0 -0
- package/dist/fonts-B-Xt29pe.cjs +0 -1
- package/dist/fonts-DRly3Wzd.js +0 -78
- package/dist/image-compression-DZ9WMmyn.cjs +0 -1
- package/dist/index-B-rSiAp_.cjs +0 -1
- package/dist/index-C0-pgg_p.cjs +0 -5
- package/dist/index-C99FhuF1.cjs +0 -160
- package/dist/index-Dno42B0a.js +0 -4734
- package/dist/index-Dxfyt4d4.js +0 -39
- package/dist/lang-panel-fDCYm5Jm.cjs +0 -1
- package/dist/manage-design-tokens-BsSZE9Vs.js +0 -241
- package/dist/manage-design-tokens-BvH5KTJX.cjs +0 -1
- package/dist/page-creator-g8GqgcKH.cjs +0 -1
- package/dist/page-locked-dialog-Co5b9XIZ.cjs +0 -1
- package/dist/page-manager-new-5rFP5DyQ.js +0 -395
- package/dist/page-manager-new-BOkJImo2.cjs +0 -1
- package/dist/page-revisions-content-ag-MHBGr.cjs +0 -1
- package/dist/plugin-BGlQf0iy.cjs +0 -22
- package/dist/plugin-C-ht41UZ.js +0 -245
- package/dist/publish-pages-content-BiX-GMLw.cjs +0 -1
- package/dist/register-chai-top-bar-BqwKw4uy.cjs +0 -1
- package/dist/save-to-lib-ffjCZYJ5.cjs +0 -1
- package/dist/seo-panel-FjS1UF_y.cjs +0 -2
- package/dist/shared-json-ld-yJkXjENy.cjs +0 -1
- package/dist/take-over-request-CmpJVe9T.cjs +0 -1
- package/dist/theme-panel-footer-BUXIu252.js +0 -26
- package/dist/theme-panel-footer-CKO9YYwZ.cjs +0 -1
- package/dist/unpublish-page-BJ0Bsvt2.js +0 -28
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { flatten as $, keys as b, uniqBy as s, get as v } from "lodash-es";
|
|
2
|
+
import { a as B } from "./fonts-B3UYxuJI.js";
|
|
3
|
+
import { g as _ } from "./_commonjsHelpers-C6fGbg64.js";
|
|
4
|
+
const x = {
|
|
5
|
+
fontFamily: {
|
|
6
|
+
"font-heading": "Arial",
|
|
7
|
+
"font-body": "Arial"
|
|
8
|
+
},
|
|
9
|
+
borderRadius: "10px",
|
|
10
|
+
colors: [
|
|
11
|
+
{
|
|
12
|
+
group: "Body",
|
|
13
|
+
items: {
|
|
14
|
+
background: ["#FFFFFF", "#121212"],
|
|
15
|
+
foreground: ["#121212", "#FFFFFF"]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
group: "Primary",
|
|
20
|
+
items: {
|
|
21
|
+
primary: ["#2563EB", "#3B82F6"],
|
|
22
|
+
"primary-foreground": ["#FFFFFF", "#FFFFFF"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
group: "Secondary",
|
|
27
|
+
items: {
|
|
28
|
+
secondary: ["#F3F4F6", "#374151"],
|
|
29
|
+
"secondary-foreground": ["#1F2937", "#F9FAFB"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
group: "Border, Input & Ring",
|
|
34
|
+
items: {
|
|
35
|
+
border: ["#E5E7EB", "#374151"],
|
|
36
|
+
input: ["#E5E7EB", "#374151"],
|
|
37
|
+
ring: ["#2563EB", "#3B82F6"]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
group: "Card",
|
|
42
|
+
items: {
|
|
43
|
+
card: ["#FFFFFF", "#1F2937"],
|
|
44
|
+
"card-foreground": ["#121212", "#FFFFFF"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
group: "Popover",
|
|
49
|
+
items: {
|
|
50
|
+
popover: ["#FFFFFF", "#1F2937"],
|
|
51
|
+
"popover-foreground": ["#121212", "#FFFFFF"]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
group: "Muted",
|
|
56
|
+
items: {
|
|
57
|
+
muted: ["#F3F4F6", "#374151"],
|
|
58
|
+
"muted-foreground": ["#6B7280", "#9CA3AF"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
group: "Accent",
|
|
63
|
+
items: {
|
|
64
|
+
accent: ["#F3F4F6", "#374151"],
|
|
65
|
+
"accent-foreground": ["#1F2937", "#FFFFFF"]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
group: "Destructive",
|
|
70
|
+
items: {
|
|
71
|
+
destructive: ["#DC2626", "#EF4444"],
|
|
72
|
+
"destructive-foreground": ["#FFFFFF", "#FFFFFF"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}, q = {
|
|
77
|
+
fontFamily: {
|
|
78
|
+
heading: "Arial",
|
|
79
|
+
body: "Arial"
|
|
80
|
+
},
|
|
81
|
+
borderRadius: "6px",
|
|
82
|
+
colors: {
|
|
83
|
+
background: ["#FFFFFF", "#09090B"],
|
|
84
|
+
foreground: ["#09090B", "#FFFFFF"],
|
|
85
|
+
primary: ["#2563EB", "#3B82F6"],
|
|
86
|
+
"primary-foreground": ["#FFFFFF", "#FFFFFF"],
|
|
87
|
+
secondary: ["#F4F4F5", "#27272A"],
|
|
88
|
+
"secondary-foreground": ["#09090B", "#FFFFFF"],
|
|
89
|
+
muted: ["#F4F4F5", "#27272A"],
|
|
90
|
+
"muted-foreground": ["#71717A", "#A1A1AA"],
|
|
91
|
+
accent: ["#F4F4F5", "#27272A"],
|
|
92
|
+
"accent-foreground": ["#09090B", "#FFFFFF"],
|
|
93
|
+
destructive: ["#EF4444", "#7F1D1D"],
|
|
94
|
+
"destructive-foreground": ["#FFFFFF", "#FFFFFF"],
|
|
95
|
+
border: ["#E4E4E7", "#27272A"],
|
|
96
|
+
input: ["#E4E4E7", "#27272A"],
|
|
97
|
+
ring: ["#2563EB", "#3B82F6"],
|
|
98
|
+
card: ["#FFFFFF", "#09090B"],
|
|
99
|
+
"card-foreground": ["#09090B", "#FFFFFF"],
|
|
100
|
+
popover: ["#FFFFFF", "#09090B"],
|
|
101
|
+
"popover-foreground": ["#09090B", "#FFFFFF"]
|
|
102
|
+
}
|
|
103
|
+
}, O = (e) => ({
|
|
104
|
+
fontFamily: e.fontFamily ? b(e.fontFamily).reduce(
|
|
105
|
+
(r, t) => ({
|
|
106
|
+
...r,
|
|
107
|
+
[t.replace("font-", "")]: `var(--${t})`
|
|
108
|
+
}),
|
|
109
|
+
{}
|
|
110
|
+
) : {},
|
|
111
|
+
borderRadius: e.borderRadius ? {
|
|
112
|
+
lg: "var(--radius)",
|
|
113
|
+
md: "calc(var(--radius) - 2px)",
|
|
114
|
+
sm: "calc(var(--radius) - 4px)"
|
|
115
|
+
} : {},
|
|
116
|
+
colors: e.colors ? $(e.colors.map((r) => Object.entries(r.items))).reduce(
|
|
117
|
+
(r, [t]) => ({ ...r, [t]: `hsl(var(--${t}))` }),
|
|
118
|
+
{}
|
|
119
|
+
) : {}
|
|
120
|
+
});
|
|
121
|
+
function m(e) {
|
|
122
|
+
const F = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
123
|
+
let r = parseInt(F[1], 16), t = parseInt(F[2], 16), n = parseInt(F[3], 16);
|
|
124
|
+
r /= 255, t /= 255, n /= 255;
|
|
125
|
+
const o = Math.max(r, t, n), a = Math.min(r, t, n);
|
|
126
|
+
let u = 0, l = 0;
|
|
127
|
+
const g = (o + a) / 2;
|
|
128
|
+
if (o == a)
|
|
129
|
+
u = l = 0;
|
|
130
|
+
else {
|
|
131
|
+
const i = o - a;
|
|
132
|
+
switch (l = g > 0.5 ? i / (2 - o - a) : i / (o + a), o) {
|
|
133
|
+
case r:
|
|
134
|
+
u = (t - n) / i + (t < n ? 6 : 0);
|
|
135
|
+
break;
|
|
136
|
+
case t:
|
|
137
|
+
u = (n - r) / i + 2;
|
|
138
|
+
break;
|
|
139
|
+
case n:
|
|
140
|
+
u = (r - t) / i + 4;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
u /= 6;
|
|
144
|
+
}
|
|
145
|
+
return `${Math.round(u * 360)} ${Math.round(l * 100)}% ${Math.round(g * 100)}%`;
|
|
146
|
+
}
|
|
147
|
+
const E = (e) => {
|
|
148
|
+
const r = B().find((t) => t.family === e);
|
|
149
|
+
return `"${e}", ${v(r, "fallback", "")}`;
|
|
150
|
+
}, S = ({ theme: e }) => {
|
|
151
|
+
const F = e;
|
|
152
|
+
return `:root {
|
|
153
|
+
${e.fontFamily ? Object.entries(e.fontFamily).map(([r, t]) => `--font-${r}: ${E(t)};`).join(`
|
|
154
|
+
`) : ""}
|
|
155
|
+
${F.borderRadius ? `--radius: ${F.borderRadius};` : ""}
|
|
156
|
+
${F.colors ? Object.entries(F.colors).map(([r, t]) => `--${r}: ${m(t[0])};`).join(`
|
|
157
|
+
`) : ""}
|
|
158
|
+
}
|
|
159
|
+
.dark {
|
|
160
|
+
${F.colors ? Object.entries(F.colors).map(([r, t]) => `--${r}: ${m(t[1])};`).join(`
|
|
161
|
+
`) : ""}
|
|
162
|
+
}`;
|
|
163
|
+
}, T = (e) => !e || e.length === 0 ? "" : s(e, "family").map((F) => `<link rel="stylesheet" href="${F.url}" />`).join(`
|
|
164
|
+
`), D = (e) => !e || e.length === 0 ? [] : s(e, "family").map((F) => F.url), I = (e) => !e || e.length === 0 ? "" : s(e, "family").map((F) => `@import url("${F.url}");`).join(`
|
|
165
|
+
`), w = (e) => !e || e.length === 0 ? "" : s(e, "family").map(
|
|
166
|
+
(F) => F.src.map(
|
|
167
|
+
(r) => `@font-face {
|
|
168
|
+
font-family: "${F.family}";
|
|
169
|
+
src: url("${r.url}") format("${r.format}");
|
|
170
|
+
font-display: swap;
|
|
171
|
+
${r.fontWeight ? `font-weight: ${r.fontWeight};` : ""}
|
|
172
|
+
${r.fontStyle ? `font-style: ${r.fontStyle};` : ""}
|
|
173
|
+
${r.fontStretch ? `font-stretch: ${r.fontStretch};` : ""}
|
|
174
|
+
}`
|
|
175
|
+
).join(`
|
|
176
|
+
`)
|
|
177
|
+
).join(`
|
|
178
|
+
`);
|
|
179
|
+
var d = {}, c = {}, p;
|
|
180
|
+
function A() {
|
|
181
|
+
return p || (p = 1, (function(e) {
|
|
182
|
+
Object.defineProperty(e, "__esModule", {
|
|
183
|
+
value: !0
|
|
184
|
+
}), Object.defineProperty(e, "default", {
|
|
185
|
+
enumerable: !0,
|
|
186
|
+
get: function() {
|
|
187
|
+
return r;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
function F(t, n) {
|
|
191
|
+
return {
|
|
192
|
+
handler: t,
|
|
193
|
+
config: n
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
F.withOptions = function(t, n = () => ({})) {
|
|
197
|
+
const o = function(a) {
|
|
198
|
+
return {
|
|
199
|
+
__options: a,
|
|
200
|
+
handler: t(a),
|
|
201
|
+
config: n(a)
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
return o.__isOptionsFunction = !0, o.__pluginFunction = t, o.__configFunction = n, o;
|
|
205
|
+
};
|
|
206
|
+
const r = F;
|
|
207
|
+
})(c)), c;
|
|
208
|
+
}
|
|
209
|
+
var y;
|
|
210
|
+
function P() {
|
|
211
|
+
return y || (y = 1, (function(e) {
|
|
212
|
+
Object.defineProperty(e, "__esModule", {
|
|
213
|
+
value: !0
|
|
214
|
+
}), Object.defineProperty(e, "default", {
|
|
215
|
+
enumerable: !0,
|
|
216
|
+
get: function() {
|
|
217
|
+
return t;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
const F = /* @__PURE__ */ r(A());
|
|
221
|
+
function r(n) {
|
|
222
|
+
return n && n.__esModule ? n : {
|
|
223
|
+
default: n
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const t = F.default;
|
|
227
|
+
})(d)), d;
|
|
228
|
+
}
|
|
229
|
+
var f, h;
|
|
230
|
+
function j() {
|
|
231
|
+
if (h) return f;
|
|
232
|
+
h = 1;
|
|
233
|
+
let e = P();
|
|
234
|
+
return f = (e.__esModule ? e : { default: e }).default, f;
|
|
235
|
+
}
|
|
236
|
+
var C = j();
|
|
237
|
+
const L = /* @__PURE__ */ _(C);
|
|
238
|
+
export {
|
|
239
|
+
D as a,
|
|
240
|
+
w as b,
|
|
241
|
+
S as c,
|
|
242
|
+
x as d,
|
|
243
|
+
I as e,
|
|
244
|
+
T as f,
|
|
245
|
+
O as g,
|
|
246
|
+
q as h,
|
|
247
|
+
L as p
|
|
248
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";const a=require("lodash-es"),$=require("./fonts-D5fTqvSS.cjs"),b=require("./_commonjsHelpers-DwGv2jUC.cjs"),B={fontFamily:{"font-heading":"Arial","font-body":"Arial"},borderRadius:"10px",colors:[{group:"Body",items:{background:["#FFFFFF","#121212"],foreground:["#121212","#FFFFFF"]}},{group:"Primary",items:{primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"]}},{group:"Secondary",items:{secondary:["#F3F4F6","#374151"],"secondary-foreground":["#1F2937","#F9FAFB"]}},{group:"Border, Input & Ring",items:{border:["#E5E7EB","#374151"],input:["#E5E7EB","#374151"],ring:["#2563EB","#3B82F6"]}},{group:"Card",items:{card:["#FFFFFF","#1F2937"],"card-foreground":["#121212","#FFFFFF"]}},{group:"Popover",items:{popover:["#FFFFFF","#1F2937"],"popover-foreground":["#121212","#FFFFFF"]}},{group:"Muted",items:{muted:["#F3F4F6","#374151"],"muted-foreground":["#6B7280","#9CA3AF"]}},{group:"Accent",items:{accent:["#F3F4F6","#374151"],"accent-foreground":["#1F2937","#FFFFFF"]}},{group:"Destructive",items:{destructive:["#DC2626","#EF4444"],"destructive-foreground":["#FFFFFF","#FFFFFF"]}}]},v={fontFamily:{heading:"Arial",body:"Arial"},borderRadius:"6px",colors:{background:["#FFFFFF","#09090B"],foreground:["#09090B","#FFFFFF"],primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"],secondary:["#F4F4F5","#27272A"],"secondary-foreground":["#09090B","#FFFFFF"],muted:["#F4F4F5","#27272A"],"muted-foreground":["#71717A","#A1A1AA"],accent:["#F4F4F5","#27272A"],"accent-foreground":["#09090B","#FFFFFF"],destructive:["#EF4444","#7F1D1D"],"destructive-foreground":["#FFFFFF","#FFFFFF"],border:["#E4E4E7","#27272A"],input:["#E4E4E7","#27272A"],ring:["#2563EB","#3B82F6"],card:["#FFFFFF","#09090B"],"card-foreground":["#09090B","#FFFFFF"],popover:["#FFFFFF","#09090B"],"popover-foreground":["#09090B","#FFFFFF"]}},_=e=>({fontFamily:e.fontFamily?a.keys(e.fontFamily).reduce((r,t)=>({...r,[t.replace("font-","")]:`var(--${t})`}),{}):{},borderRadius:e.borderRadius?{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}:{},colors:e.colors?a.flatten(e.colors.map(r=>Object.entries(r.items))).reduce((r,[t])=>({...r,[t]:`hsl(var(--${t}))`}),{}):{}});function m(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);let r=parseInt(n[1],16),t=parseInt(n[2],16),F=parseInt(n[3],16);r/=255,t/=255,F/=255;const o=Math.max(r,t,F),u=Math.min(r,t,F);let i=0,l=0;const g=(o+u)/2;if(o==u)i=l=0;else{const s=o-u;switch(l=g>.5?s/(2-o-u):s/(o+u),o){case r:i=(t-F)/s+(t<F?6:0);break;case t:i=(F-r)/s+2;break;case F:i=(r-t)/s+4;break}i/=6}return`${Math.round(i*360)} ${Math.round(l*100)}% ${Math.round(g*100)}%`}const E=e=>{const r=$.getAllRegisteredFonts().find(t=>t.family===e);return`"${e}", ${a.get(r,"fallback","")}`},A=({theme:e})=>{const n=e;return`:root {
|
|
2
|
+
${e.fontFamily?Object.entries(e.fontFamily).map(([r,t])=>`--font-${r}: ${E(t)};`).join(`
|
|
3
|
+
`):""}
|
|
4
|
+
${n.borderRadius?`--radius: ${n.borderRadius};`:""}
|
|
5
|
+
${n.colors?Object.entries(n.colors).map(([r,t])=>`--${r}: ${m(t[0])};`).join(`
|
|
6
|
+
`):""}
|
|
7
|
+
}
|
|
8
|
+
.dark {
|
|
9
|
+
${n.colors?Object.entries(n.colors).map(([r,t])=>`--${r}: ${m(t[1])};`).join(`
|
|
10
|
+
`):""}
|
|
11
|
+
}`},C=e=>!e||e.length===0?"":a.uniqBy(e,"family").map(n=>`<link rel="stylesheet" href="${n.url}" />`).join(`
|
|
12
|
+
`),P=e=>!e||e.length===0?[]:a.uniqBy(e,"family").map(n=>n.url),j=e=>!e||e.length===0?"":a.uniqBy(e,"family").map(n=>`@import url("${n.url}");`).join(`
|
|
13
|
+
`),q=e=>!e||e.length===0?"":a.uniqBy(e,"family").map(n=>n.src.map(r=>`@font-face {
|
|
14
|
+
font-family: "${n.family}";
|
|
15
|
+
src: url("${r.url}") format("${r.format}");
|
|
16
|
+
font-display: swap;
|
|
17
|
+
${r.fontWeight?`font-weight: ${r.fontWeight};`:""}
|
|
18
|
+
${r.fontStyle?`font-style: ${r.fontStyle};`:""}
|
|
19
|
+
${r.fontStretch?`font-stretch: ${r.fontStretch};`:""}
|
|
20
|
+
}`).join(`
|
|
21
|
+
`)).join(`
|
|
22
|
+
`);var d={},c={},p;function T(){return p||(p=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function n(t,F){return{handler:t,config:F}}n.withOptions=function(t,F=()=>({})){const o=function(u){return{__options:u,handler:t(u),config:F(u)}};return o.__isOptionsFunction=!0,o.__pluginFunction=t,o.__configFunction=F,o};const r=n})(c)),c}var h;function M(){return h||(h=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});const n=r(T());function r(F){return F&&F.__esModule?F:{default:F}}const t=n.default})(d)),d}var f,y;function k(){if(y)return f;y=1;let e=M();return f=(e.__esModule?e:{default:e}).default,f}var R=k();const O=b.getDefaultExportFromCjs(R);exports.defaultThemeOptions=B;exports.defaultThemeValues=v;exports.getChaiThemeCssVariables=A;exports.getChaiThemeOptions=_;exports.getThemeCustomFontFace=q;exports.getThemeFontsCSSImport=j;exports.getThemeFontsLinkMarkup=C;exports.getThemeFontsUrls=P;exports.plugin=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),q=require("./register-chai-top-bar-DyW9GPzV.cjs"),f=require("./index-C3CV1lXL.cjs"),r=require("./index-3pEi7VzS.cjs"),U=require("./page-manager-search-and-filter-BosoN3wg.cjs"),F=require("@tanstack/react-query"),t=require("lodash-es"),b=require("lucide-react"),a=require("react"),M=()=>{const l=r.useApiUrl(),u=r.useFetch();return F.useQuery({queryKey:[r.ACTIONS.GET_CHANGES],queryFn:async()=>u(l,{action:r.ACTIONS.GET_CHANGES})})},G=({page:l,selectedPages:u,handleCheckboxChange:N,getPageType:y,hasSlug:h,currentOwnerId:c})=>{const x=r.useUserId(),{data:d}=r.useChaiUserInfo(c),o=c===x?null:d==null?void 0:d.name;return e.jsxs("tr",{className:"group relative border-b last:border-b-0 hover:bg-gray-50",children:[e.jsxs("td",{scope:"row",className:`flex items-center gap-x-1 whitespace-nowrap px-6 py-2 text-gray-900 dark:text-white ${o?"opacity-50":""}`,children:[o?e.jsx(b.Lock,{className:"h-4 w-4 fill-red-200 text-red-500"}):e.jsx("input",{checked:t.includes(u,l==null?void 0:l.id),onClick:p=>{p.stopPropagation(),N(l==null?void 0:l.id)},type:"checkbox",className:"cursor-pointer rounded focus:outline-none focus:ring-0"})," ",h(l.pageType)?e.jsx(b.File,{className:"h-4 w-4"}):e.jsx(b.GlobeIcon,{className:"h-4 w-4"}),e.jsx(r.Tooltip,{content:l.name,side:"top",showTooltip:l.name.length>25,children:e.jsx("span",{className:"max-w-[200px] truncate font-medium text-black",children:l.name})}),l.slug&&e.jsx(r.Tooltip,{content:l.slug,side:"top",showTooltip:l.slug.length>25,children:e.jsx("span",{className:"max-w-[200px] truncate font-mono text-xs text-muted-foreground",children:l.slug})})]}),e.jsx("td",{className:"px-2",children:y(l==null?void 0:l.pageType)}),e.jsx("td",{className:"px-4 text-right",children:t.first(l.changes)||""}),e.jsx(e.Fragment,{children:o&&e.jsxs("button",{className:"absolute right-0 top-0 flex h-full 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:[e.jsx(b.Edit,{size:12,className:"stroke-[3]"})," ",e.jsx("span",{className:"font-medium",children:o})," is editing this page"]})})]},l==null?void 0:l.id)},O=({onClose:l=()=>{},isPending:u,publishPage:N})=>{const y=r.useUserId(),{pageToUser:h}=r.usePageToUser(),[c,x]=a.useState([]),d=r.useFallbackLang(),[o,p]=a.useState(d),{data:T,isFetching:C}=M(),{data:g}=r.usePageTypes(),k=a.useCallback(s=>{var n;return(n=t.find(g,{key:s}))==null?void 0:n.hasSlug},[g]),j=a.useMemo(()=>t.filter(g,s=>!k(s.key)).map(s=>s.key),[k,g]),P=t.uniq(t.map(T,"lang")).filter(Boolean),i=a.useMemo(()=>t.filter(T,s=>s.pageType==="theme"||s.pageType==="design_tokens"?!1:o===d?s.lang===o||s.lang==="":s.lang===o),[T,o,d]),w=a.useMemo(()=>t.filter(i,s=>!j.includes(s.pageType)),[i,j]),S=a.useMemo(()=>t.filter(i,s=>j.includes(s.pageType)),[i,j]);a.useEffect(()=>{const s=t.map(t.filter(i,{online:!0}),"id");a.startTransition(()=>x(s))},[i]),a.useEffect(()=>{const s=t.filter(t.keys(h),n=>t.get(h,[n,"userId"])!==y);a.startTransition(()=>x(n=>t.filter(n,m=>!t.includes(s,m))))},[h,y]);const v=c.length===(i==null?void 0:i.length),E=s=>{x(n=>t.includes(n,s)?t.filter(n,m=>m!==s):t.concat(n,s))},B=()=>{x(v?[]:t.map(i,"id"))},I=()=>{N({ids:t.uniq(c)},{onSuccess:()=>{l(),r.throwConfetti("CENTER_CENTER"),p(d)}})},A=s=>{if(s==="theme")return"Theme";const n=t.find(g,{key:s});return n?n==null?void 0:n.name:s},L=a.useMemo(()=>{const s=[{label:"Updated",top:"pt-2"},...t.orderBy(t.filter(w,{online:!0}),"pageType"),...t.orderBy(t.filter(S,{online:!0}),"pageType")].filter(m=>m.pageType!=="theme"&&m.pageType!=="design_tokens"),n=[{label:"Offline",top:"pt-6"},...t.orderBy(t.filter(w,{online:!1}),"pageType"),...t.orderBy(t.filter(S,{online:!1}),"pageType")];return[...s,...n]},[w,S]);return e.jsxs(f.DialogContent,{className:"flex max-h-[80%] max-w-4xl flex-col",children:[e.jsxs(f.DialogHeader,{children:[e.jsx(f.DialogTitle,{children:"Publish changes"}),e.jsx(f.DialogDescription,{className:"text-xs",children:"Select the pages you want to publish. Click publish when you're done."})]}),P.length>0&&e.jsx("div",{className:"my-[2px] mt-0",children:e.jsx(U.LanguageSelector,{languages:[d,...P],selectedLanguage:o,setSelectedLanguage:p})}),e.jsx("div",{className:"no-scrollbar relative -mx-4 -mt-4 h-full max-h-full overflow-y-auto",children:C?e.jsxs("div",{className:"space-y-2 px-1",children:[e.jsx("div",{className:"mt-2 h-6 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-6 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-6 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-6 w-full animate-pulse rounded bg-gray-200"})]}):e.jsxs("table",{className:"w-full text-left text-xs text-gray-500 dark:text-gray-400 rtl:text-right",children:[e.jsx("thead",{className:"sticky top-0 z-10 border-b bg-gray-50 text-gray-700 dark:bg-gray-700 dark:text-gray-400",children:e.jsxs("tr",{children:[e.jsxs("th",{scope:"col",className:"w-[1 50px] flex items-center gap-x-2 px-6 py-3",children:[e.jsx("input",{checked:v,onClick:s=>{s.stopPropagation(),B()},type:"checkbox",className:"mt-1 cursor-pointer rounded focus:outline-none focus:ring-0"}),"Name"]}),e.jsx("th",{scope:"col",className:"w-[150px] px-2 py-3",children:"Type"}),e.jsx("th",{scope:"col",className:"w-[150px] px-4 py-3 text-right",children:"Status"})]})}),e.jsx("tbody",{children:t.map(L,s=>s.label?e.jsx("tr",{children:e.jsxs("td",{colSpan:3,className:`relative px-6 py-2 text-xs font-medium text-gray-800 ${s.top}`,children:[e.jsx("div",{className:"absolute inset-0 left-6 flex items-center",children:e.jsx("div",{className:"order-gray-300 w-full"})}),e.jsx("div",{className:"relative flex justify-start",children:e.jsx("span",{className:"bg-gray-50 pr-2",children:s.label})})]})},"separator"):e.jsx(G,{page:s,selectedPages:c,handleCheckboxChange:E,getPageType:A,hasSlug:k,currentOwnerId:t.get(h,[(s==null?void 0:s.primaryPage)||(s==null?void 0:s.id),"userId"])}))})]})}),e.jsxs(f.DialogFooter,{className:"mt-10 flex items-center justify-center",children:[c.length>0&&e.jsxs("span",{className:"text-center text-sm text-muted-foreground",children:[c.length," Page",c.length!==1?"s":""," Selected"]}),e.jsx(q.Button,{disabled:u,variant:"outline",onClick:l,children:"Cancel"}),e.jsx(q.Button,{disabled:u||C||t.isEmpty(c),onClick:I,children:u?"Publishing...":"Publish Selected"})]})]})};exports.default=O;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import { B as L } from "./register-chai-top-bar-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { LanguageSelector as ae } from "./page-manager-search-and-filter-
|
|
2
|
+
import { B as L } from "./register-chai-top-bar-D6GjnauV.js";
|
|
3
|
+
import { e as K, f as Q, g as J, o as V, q as W } from "./index-wBr2Ml98.js";
|
|
4
|
+
import { ap as X, aq as Y, A as I, az as O, aA as Z, i as ee, k as te, an as se, T as U, aB as le } from "./index-CDVuf3C1.js";
|
|
5
|
+
import { LanguageSelector as ae } from "./page-manager-search-and-filter-JfSTGlvp.js";
|
|
6
6
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
7
7
|
import { find as B, filter as a, map as b, keys as re, get as F, includes as C, orderBy as N, isEmpty as oe, uniq as G, first as ce, concat as ie } from "lodash-es";
|
|
8
|
-
import { Lock as de, GlobeIcon as ue, File as
|
|
9
|
-
import { useState as
|
|
10
|
-
const
|
|
8
|
+
import { Lock as de, GlobeIcon as ue, File as he, Edit as me } from "lucide-react";
|
|
9
|
+
import { useState as q, useCallback as ge, useMemo as p, useEffect as D, startTransition as j } from "react";
|
|
10
|
+
const pe = () => {
|
|
11
11
|
const s = X(), d = Y();
|
|
12
12
|
return ne({
|
|
13
13
|
queryKey: [I.GET_CHANGES],
|
|
14
14
|
queryFn: async () => d(s, { action: I.GET_CHANGES })
|
|
15
15
|
});
|
|
16
|
-
}, fe = ({ page: s, selectedPages: d, handleCheckboxChange: k, getPageType: f, hasSlug:
|
|
16
|
+
}, fe = ({ page: s, selectedPages: d, handleCheckboxChange: k, getPageType: f, hasSlug: h, currentOwnerId: r }) => {
|
|
17
17
|
const u = O(), { data: i } = se(r), o = r === u ? null : i == null ? void 0 : i.name;
|
|
18
18
|
return /* @__PURE__ */ n("tr", { className: "group relative border-b last:border-b-0 hover:bg-gray-50", children: [
|
|
19
19
|
/* @__PURE__ */ n(
|
|
@@ -34,7 +34,7 @@ const ge = () => {
|
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
36
|
" ",
|
|
37
|
-
|
|
37
|
+
h(s.pageType) ? /* @__PURE__ */ t(he, { className: "h-4 w-4" }) : /* @__PURE__ */ t(ue, { className: "h-4 w-4" }),
|
|
38
38
|
/* @__PURE__ */ t(U, { content: s.name, side: "top", showTooltip: s.name.length > 25, children: /* @__PURE__ */ t("span", { className: "max-w-[200px] truncate font-medium text-black", children: s.name }) }),
|
|
39
39
|
s.slug && /* @__PURE__ */ t(U, { content: s.slug, side: "top", showTooltip: s.slug.length > 25, children: /* @__PURE__ */ t("span", { className: "max-w-[200px] truncate font-mono text-xs text-muted-foreground", children: s.slug }) })
|
|
40
40
|
]
|
|
@@ -43,7 +43,7 @@ const ge = () => {
|
|
|
43
43
|
/* @__PURE__ */ t("td", { className: "px-2", children: f(s == null ? void 0 : s.pageType) }),
|
|
44
44
|
/* @__PURE__ */ t("td", { className: "px-4 text-right", children: ce(s.changes) || "" }),
|
|
45
45
|
/* @__PURE__ */ t($, { children: o && /* @__PURE__ */ n("button", { className: "absolute right-0 top-0 flex h-full 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: [
|
|
46
|
-
/* @__PURE__ */ t(
|
|
46
|
+
/* @__PURE__ */ t(me, { size: 12, className: "stroke-[3]" }),
|
|
47
47
|
" ",
|
|
48
48
|
/* @__PURE__ */ t("span", { className: "font-medium", children: o }),
|
|
49
49
|
" is editing this page"
|
|
@@ -55,34 +55,34 @@ const ge = () => {
|
|
|
55
55
|
isPending: d,
|
|
56
56
|
publishPage: k
|
|
57
57
|
}) => {
|
|
58
|
-
const f = O(), { pageToUser:
|
|
58
|
+
const f = O(), { pageToUser: h } = Z(), [r, u] = q([]), i = ee(), [o, x] = q(i), { data: T, isFetching: v } = pe(), { data: g } = te(), w = ge((e) => {
|
|
59
59
|
var l;
|
|
60
|
-
return (l = B(
|
|
61
|
-
}, [
|
|
62
|
-
() => a(
|
|
63
|
-
[
|
|
64
|
-
), E = G(b(
|
|
65
|
-
() => a(
|
|
66
|
-
[
|
|
67
|
-
), S =
|
|
60
|
+
return (l = B(g, { key: e })) == null ? void 0 : l.hasSlug;
|
|
61
|
+
}, [g]), y = p(
|
|
62
|
+
() => a(g, (e) => !w(e.key)).map((e) => e.key),
|
|
63
|
+
[w, g]
|
|
64
|
+
), E = G(b(T, "lang")).filter(Boolean), c = p(
|
|
65
|
+
() => a(T, (e) => e.pageType === "theme" || e.pageType === "design_tokens" ? !1 : o === i ? e.lang === o || e.lang === "" : e.lang === o),
|
|
66
|
+
[T, o, i]
|
|
67
|
+
), S = p(
|
|
68
68
|
() => a(c, (e) => !y.includes(e.pageType)),
|
|
69
69
|
[c, y]
|
|
70
|
-
), P =
|
|
70
|
+
), P = p(
|
|
71
71
|
() => a(c, (e) => y.includes(e.pageType)),
|
|
72
72
|
[c, y]
|
|
73
73
|
);
|
|
74
|
-
|
|
74
|
+
D(() => {
|
|
75
75
|
const e = b(a(c, { online: !0 }), "id");
|
|
76
|
-
|
|
77
|
-
}, [c]),
|
|
78
|
-
const e = a(re(
|
|
79
|
-
|
|
80
|
-
}, [
|
|
81
|
-
const A = r.length === (c == null ? void 0 : c.length),
|
|
82
|
-
u((l) => C(l, e) ? a(l, (
|
|
76
|
+
j(() => u(e));
|
|
77
|
+
}, [c]), D(() => {
|
|
78
|
+
const e = a(re(h), (l) => F(h, [l, "userId"]) !== f);
|
|
79
|
+
j(() => u((l) => a(l, (m) => !C(e, m))));
|
|
80
|
+
}, [h, f]);
|
|
81
|
+
const A = r.length === (c == null ? void 0 : c.length), _ = (e) => {
|
|
82
|
+
u((l) => C(l, e) ? a(l, (m) => m !== e) : ie(l, e));
|
|
83
83
|
}, z = () => {
|
|
84
84
|
u(A ? [] : b(c, "id"));
|
|
85
|
-
},
|
|
85
|
+
}, H = () => {
|
|
86
86
|
k(
|
|
87
87
|
{ ids: G(r) },
|
|
88
88
|
{
|
|
@@ -91,16 +91,16 @@ const ge = () => {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
|
-
},
|
|
94
|
+
}, M = (e) => {
|
|
95
95
|
if (e === "theme") return "Theme";
|
|
96
|
-
const l = B(
|
|
96
|
+
const l = B(g, { key: e });
|
|
97
97
|
return l ? l == null ? void 0 : l.name : e;
|
|
98
|
-
},
|
|
98
|
+
}, R = p(() => {
|
|
99
99
|
const e = [
|
|
100
100
|
{ label: "Updated", top: "pt-2" },
|
|
101
101
|
...N(a(S, { online: !0 }), "pageType"),
|
|
102
102
|
...N(a(P, { online: !0 }), "pageType")
|
|
103
|
-
].filter((
|
|
103
|
+
].filter((m) => m.pageType !== "theme" && m.pageType !== "design_tokens"), l = [
|
|
104
104
|
{ label: "Offline", top: "pt-6" },
|
|
105
105
|
...N(a(S, { online: !1 }), "pageType"),
|
|
106
106
|
...N(a(P, { online: !1 }), "pageType")
|
|
@@ -145,7 +145,7 @@ const ge = () => {
|
|
|
145
145
|
/* @__PURE__ */ t("th", { scope: "col", className: "w-[150px] px-4 py-3 text-right", children: "Status" })
|
|
146
146
|
] }) }),
|
|
147
147
|
/* @__PURE__ */ t("tbody", { children: b(
|
|
148
|
-
|
|
148
|
+
R,
|
|
149
149
|
(e) => e.label ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ n("td", { colSpan: 3, className: `relative px-6 py-2 text-xs font-medium text-gray-800 ${e.top}`, children: [
|
|
150
150
|
/* @__PURE__ */ t("div", { className: "absolute inset-0 left-6 flex items-center", children: /* @__PURE__ */ t("div", { className: "order-gray-300 w-full" }) }),
|
|
151
151
|
/* @__PURE__ */ t("div", { className: "relative flex justify-start", children: /* @__PURE__ */ t("span", { className: "bg-gray-50 pr-2", children: e.label }) })
|
|
@@ -154,10 +154,10 @@ const ge = () => {
|
|
|
154
154
|
{
|
|
155
155
|
page: e,
|
|
156
156
|
selectedPages: r,
|
|
157
|
-
handleCheckboxChange:
|
|
158
|
-
getPageType:
|
|
159
|
-
hasSlug:
|
|
160
|
-
currentOwnerId: F(
|
|
157
|
+
handleCheckboxChange: _,
|
|
158
|
+
getPageType: M,
|
|
159
|
+
hasSlug: w,
|
|
160
|
+
currentOwnerId: F(h, [(e == null ? void 0 : e.primaryPage) || (e == null ? void 0 : e.id), "userId"])
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
) })
|
|
@@ -170,7 +170,7 @@ const ge = () => {
|
|
|
170
170
|
" Selected"
|
|
171
171
|
] }),
|
|
172
172
|
/* @__PURE__ */ t(L, { disabled: d, variant: "outline", onClick: s, children: "Cancel" }),
|
|
173
|
-
/* @__PURE__ */ t(L, { disabled: d || v || oe(r), onClick:
|
|
173
|
+
/* @__PURE__ */ t(L, { disabled: d || v || oe(r), onClick: H, children: d ? "Publishing..." : "Publish Selected" })
|
|
174
174
|
] })
|
|
175
175
|
] });
|
|
176
176
|
};
|