@chaibuilder/sdk 4.0.0-beta.3 → 4.0.0-beta.30
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-CnSDkQcy.js → 2SSKDMRQ-B5Tzwoh4.js} +2 -2
- package/dist/{2SSKDMRQ-BnsZi3K3.cjs → 2SSKDMRQ-Dub3pRV1.cjs} +1 -1
- package/dist/{AP7HFJJL-CymCmW14.js → AP7HFJJL-CfmdXP9M.js} +1 -1
- package/dist/{AP7HFJJL-B31839PG.cjs → AP7HFJJL-Dt6MglIr.cjs} +1 -1
- package/dist/{IconPicker-B1rWC-Ex.js → IconPicker-Cn8Z42-Z.js} +8 -7
- package/dist/IconPicker-DLqOB-ri.cjs +1 -0
- package/dist/STRINGS-BExFecZW.js +8 -0
- package/dist/STRINGS-FNnfjF5H.cjs +1 -0
- package/dist/{WDYDFRGG-BUVnbAci.js → WDYDFRGG-BOpmZGHS.js} +2 -2
- package/dist/{WDYDFRGG-BxhOCHc3.cjs → WDYDFRGG-Dfj1ikzw.cjs} +1 -1
- package/dist/{actions-registery-CZ1w0NKa.js → actions-registery-Bj-j1k5i.js} +2668 -2585
- package/dist/actions-registery-Cy1lqUVI.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-CEWvA8SG.js +35 -0
- package/dist/active-in-another-tab-DV83cJ_v.cjs +1 -0
- package/dist/{add-new-language-page-WmlCnytQ.js → add-new-language-page-B3wK94-S.js} +54 -53
- package/dist/add-new-language-page-C3Uu92KN.cjs +1 -0
- package/dist/{add-new-page-soZ8GAkN.cjs → add-new-page-BOE-xwBc.cjs} +1 -1
- package/dist/{add-new-page-VW2wAYZp.js → add-new-page-DsvGVrR8.js} +2 -2
- package/dist/{ai-panel-content-D_o7Q_A-.js → ai-panel-content-BBSzHZG6.js} +12 -11
- package/dist/ai-panel-content-DBlnfRRi.cjs +1 -0
- package/dist/ai-panel-default-lang-BVBuwnyU.js +317 -0
- package/dist/ai-panel-default-lang-DJJWAtN0.cjs +3 -0
- package/dist/ai-panel-other-lang-fIEZkmRy.js +132 -0
- package/dist/ai-panel-other-lang-v8Yd5ggR.cjs +1 -0
- package/dist/ai-prompt-input-C7ha_0Cn.cjs +1 -0
- package/dist/{ai-prompt-input-Bhc0ds7X.js → ai-prompt-input-CmSfGxTN.js} +70 -73
- package/dist/ai-translation-prompt-BzTGAS3W.cjs +1 -0
- package/dist/{ai-translation-prompt-CZ55HQmo.js → ai-translation-prompt-CtBmvsRy.js} +2 -2
- package/dist/apply-binding-9XSrYzAE.cjs +1 -0
- package/dist/{apply-binding-6iwlED02.js → apply-binding-chfbBKi2.js} +238 -225
- package/dist/change-password-modal-CdOwtCWN.cjs +1 -0
- package/dist/change-password-modal-DxkhBI5d.js +137 -0
- package/dist/code-display-BR-gij5j.cjs +1 -0
- package/dist/{code-display-DhD_RBcg.js → code-display-DdWcOQ_i.js} +1 -1
- package/dist/code-editor-Bpn8z2fo.js +57 -0
- package/dist/code-editor-fL3s6Hk7.cjs +1 -0
- package/dist/{continue-editing-in-this-client-CS2aQ7yY.js → continue-editing-in-this-client-DDB816CQ.js} +10 -9
- package/dist/continue-editing-in-this-client-DjxpjsA8.cjs +1 -0
- package/dist/core-BWQrViOY.cjs +1 -0
- package/dist/core-QlWEXm1d.js +53 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +272 -105
- package/dist/core.js +64 -33
- package/dist/{css-import-modal-Byg6wV0O.js → css-import-modal-CL8SIC3K.js} +11 -9
- package/dist/css-import-modal-CRC7bK1c.cjs +13 -0
- package/dist/{delete-design-token-BRZZiWtQ.js → delete-design-token-B0md8qUi.js} +1 -1
- package/dist/{delete-design-token-DkVs1oBf.cjs → delete-design-token-C94IgWdi.cjs} +1 -1
- package/dist/delete-page-41tvYcEw.js +71 -0
- package/dist/delete-page-BHPlx8ec.cjs +1 -0
- package/dist/{design-token-usage-xQs6SlaJ.js → design-token-usage-CyOY4Pni.js} +19 -18
- package/dist/design-token-usage-DtdjTCn3.cjs +1 -0
- package/dist/{digital-asset-manager-DbtwzxRz.js → digital-asset-manager-C_ru4Zes.js} +6 -5
- package/dist/digital-asset-manager-DSLQz8qk.cjs +1 -0
- package/dist/duplicate-page-BvggF83O.cjs +1 -0
- package/dist/{duplicate-page-BR7Dlo9d.js → duplicate-page-DMmDdmfS.js} +20 -19
- package/dist/dynamic-page-selector-C5agz2Ze.cjs +1 -0
- package/dist/{dynamic-page-selector-Cb5r_W8s.js → dynamic-page-selector-D2z51nLi.js} +12 -11
- 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-DNp8Vhme.cjs +1 -0
- package/dist/{get-chai-builder-tailwind-config-DjoVOuAf.js → get-chai-builder-tailwind-config-k8l5sdcw.js} +5 -5
- package/dist/{get-chai-builder-theme-Dl72X7cz.cjs → get-chai-builder-theme-B5RkBTsB.cjs} +1 -1
- package/dist/{get-chai-builder-theme-BYtp20KD.js → get-chai-builder-theme-BSUcPs5t.js} +1 -1
- package/dist/{image-editor-G-K28aTS.cjs → image-editor-DFmlG348.cjs} +1 -1
- package/dist/{image-editor-DV8kUKhl.js → image-editor-sKvOFo-S.js} +1 -1
- package/dist/{index-Ct7ElCGK.js → index-BFnMzGe6.js} +5381 -5895
- package/dist/index-Bzn_gpaK.cjs +5 -0
- package/dist/index-CA1OwKJX.js +4887 -0
- package/dist/index-D30xvFa5.cjs +160 -0
- package/dist/{json-diff-viewer-krslPepD.js → json-diff-viewer-B5wAR5GY.js} +82 -79
- package/dist/json-diff-viewer-DRQSNhaS.cjs +8 -0
- package/dist/lang-panel-BZsICcBR.cjs +1 -0
- package/dist/{lang-panel-BwIewMyw.js → lang-panel-q04hEq5o.js} +15 -14
- package/dist/library-blocks/blocks-list.json +16 -0
- package/dist/library-blocks/hero-1/hero-1.html +74 -0
- package/dist/library-blocks/hero-1/hero-1.webp +0 -0
- package/dist/library-blocks/hero-2/hero-2.html +95 -0
- package/dist/library-blocks/hero-2/hero-2.webp +0 -0
- package/dist/{manage-design-tokens-Caz_20VK.js → manage-design-tokens-Cene3KEu.js} +16 -15
- package/dist/manage-design-tokens-Di5C6nTj.cjs +1 -0
- package/dist/mark-as-template-CT-hLGIW.cjs +1 -0
- package/dist/{mark-as-template-D295ZQtU.js → mark-as-template-raTtKmQ9.js} +17 -16
- package/dist/nested-path-selector-content-CSUHTj9G.cjs +1 -0
- package/dist/{nested-path-selector-content-CKYYK-C5.js → nested-path-selector-content-CzQ2Lorl.js} +24 -23
- package/dist/{no-language-page-content-BvqRBP6y.js → no-language-page-content-Bg6VjMVY.js} +8 -7
- package/dist/no-language-page-content-Bkj8JpEY.cjs +1 -0
- package/dist/{no-language-page-dialog-PjNqTUpl.js → no-language-page-dialog-CRPMr9YT.js} +2 -2
- package/dist/{no-language-page-dialog-BcEoqyQB.cjs → no-language-page-dialog-TffLjvJn.cjs} +1 -1
- package/dist/{page-creator-DiOITEMw.js → page-creator-CQhE1tgn.js} +147 -146
- package/dist/page-creator-RrUhy8uH.cjs +1 -0
- package/dist/{page-lock-BdYmCks0.cjs → page-lock-D9h5pgxn.cjs} +1 -1
- package/dist/{page-lock-Bfbs6RgL.js → page-lock-Dye1JZBB.js} +2 -2
- package/dist/{page-locked-dialog-B6MKTRfY.js → page-locked-dialog-BMjPVyHF.js} +19 -16
- package/dist/page-locked-dialog-b2_f-A7a.cjs +1 -0
- package/dist/page-manager-new-2mDjnSqc.cjs +1 -0
- package/dist/page-manager-new-DP1b_dXt.js +411 -0
- package/dist/page-manager-search-and-filter-D0ZXojiu.cjs +1 -0
- package/dist/{page-manager-search-and-filter-CM0UMb6U.js → page-manager-search-and-filter-DCcYyoPO.js} +20 -19
- package/dist/page-revisions-content-BX8ZWebc.cjs +1 -0
- package/dist/{page-revisions-content-NH9JK4Ey.js → page-revisions-content-mDwvH6J-.js} +134 -120
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +297 -97
- package/dist/pages.js +22 -19
- package/dist/plugin-DHpuZZXz.cjs +22 -0
- package/dist/plugin-Dkmjb2_e.js +248 -0
- package/dist/publish-pages-content-CR4e9inX.cjs +1 -0
- package/dist/{publish-pages-content-D9aixMN5.js → publish-pages-content-M_Kb8b-F.js} +71 -70
- package/dist/register-chai-top-bar-D6GjnauV.js +237 -0
- package/dist/register-chai-top-bar-DyW9GPzV.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +21 -20
- package/dist/render.js +127 -120
- package/dist/rte-widget-modal-BRSm1Lnp.cjs +1 -0
- package/dist/{rte-widget-modal-DOJEXLIf.js → rte-widget-modal-CVZDktXI.js} +10 -9
- 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 +158 -114
- package/dist/runtime.js +107 -42
- package/dist/{save-to-lib-eiOc_SSN.js → save-to-lib-B1ccNhR2.js} +152 -145
- package/dist/save-to-lib-CYEAWxL9.cjs +1 -0
- package/dist/sdk.css +1 -1
- package/dist/selected-block-display-MyU0rS4q.cjs +16 -0
- package/dist/{selected-block-display-CBFePS19.js → selected-block-display-aGR7p5JC.js} +36 -35
- package/dist/seo-panel-B5mDwpaT.cjs +2 -0
- package/dist/{seo-panel-C1-iMOR1.js → seo-panel-P9uixkoZ.js} +149 -148
- package/dist/{shared-json-ld-B4PxAM_0.js → shared-json-ld-Ba9GcvLr.js} +72 -71
- package/dist/shared-json-ld-DhQJh_mT.cjs +1 -0
- package/dist/slug-input-BdMnlYKT.cjs +1 -0
- package/dist/{slug-input-AwNJs9im.js → slug-input-CAfGHqMW.js} +9 -8
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.d.ts +40 -1
- package/dist/supabase-actions.js +231 -192
- package/dist/take-over-request-BeHTL28z.cjs +1 -0
- package/dist/{take-over-request-C4FeDtN_.js → take-over-request-CXjaDliJ.js} +18 -17
- package/dist/theme-panel-footer-BkwhuXM7.js +26 -0
- package/dist/theme-panel-footer-D_gxD0j4.cjs +1 -0
- package/dist/{translation-warning-modal-B64YqlbI.js → translation-warning-modal-CTfArsb1.js} +11 -10
- package/dist/translation-warning-modal-D_vt37fW.cjs +1 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.ts +740 -0
- package/dist/types.js +1 -0
- package/dist/unmark-as-template-D2bvjGKt.cjs +1 -0
- package/dist/{unmark-as-template-CZ9sQp_P.js → unmark-as-template-vFgMIdxN.js} +12 -11
- package/dist/unpublish-page-CPjHmtSM.cjs +1 -0
- package/dist/unpublish-page-CxkjTzBB.js +28 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +8 -5
- package/dist/utils.js +2 -2
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +341 -332
- package/dist/{web-preview-Djy6WIyj.js → web-preview--by73Vvr.js} +2 -2
- package/dist/web-preview-C3AMe_BB.cjs +1 -0
- package/package.json +36 -31
- package/dist/IconPicker-DREyo007.cjs +0 -1
- package/dist/actions-registery-YnFmU21O.cjs +0 -418
- package/dist/active-in-another-tab-B47YjQGN.cjs +0 -1
- package/dist/active-in-another-tab-CyjngVA6.js +0 -34
- package/dist/add-new-language-page-88xzrUy8.cjs +0 -1
- package/dist/ai-panel-content-7zCil042.cjs +0 -1
- package/dist/ai-panel-default-lang-COYaxNwn.cjs +0 -3
- package/dist/ai-panel-default-lang-DnElspF0.js +0 -341
- package/dist/ai-panel-other-lang-CkynNlAU.cjs +0 -1
- package/dist/ai-panel-other-lang-Dp0E9_Hx.js +0 -162
- package/dist/ai-prompt-input-CThbVp0_.cjs +0 -1
- package/dist/ai-translation-prompt-C2kJQFDX.cjs +0 -1
- package/dist/apply-binding-KKp5PnpZ.cjs +0 -1
- package/dist/code-display-BnqzqzoP.cjs +0 -1
- package/dist/code-editor-DRIAnNbb.js +0 -50
- package/dist/code-editor-o3___nu2.cjs +0 -1
- package/dist/continue-editing-in-this-client-CtMYsk-A.cjs +0 -1
- package/dist/core-BoRDjj4h.cjs +0 -1
- package/dist/core-yvI6kCyw.js +0 -56
- package/dist/css-import-modal-CyqkXWCO.cjs +0 -13
- package/dist/delete-page-BzyX9TN-.js +0 -70
- package/dist/delete-page-DxX7PFIE.cjs +0 -1
- package/dist/design-token-usage-CAHzEGgJ.cjs +0 -1
- package/dist/digital-asset-manager--uO8Agia.cjs +0 -1
- package/dist/duplicate-page-CaNAbXwV.cjs +0 -1
- package/dist/dynamic-page-selector-Cxk_gjni.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/get-chai-builder-tailwind-config-B9rCyiQo.cjs +0 -1
- package/dist/index-B-rSiAp_.cjs +0 -1
- package/dist/index-DF5DEvqb.cjs +0 -160
- package/dist/index-Dxfyt4d4.js +0 -39
- package/dist/index-WQwzsC7A.cjs +0 -5
- package/dist/index-ZuacEL1j.js +0 -4732
- package/dist/json-diff-viewer-D7z4zNvv.cjs +0 -8
- package/dist/lang-panel-DT96k1xg.cjs +0 -1
- package/dist/manage-design-tokens-CrmLe7UT.cjs +0 -1
- package/dist/mark-as-template-W3LmpiqN.cjs +0 -1
- package/dist/nested-path-selector-content-CoS_d3dc.cjs +0 -1
- package/dist/no-language-page-content-DkfeMl90.cjs +0 -1
- package/dist/page-creator-C4gc5NSC.cjs +0 -1
- package/dist/page-locked-dialog-B1FAtK92.cjs +0 -1
- package/dist/page-manager-new-CHDueBDk.cjs +0 -1
- package/dist/page-manager-new-CzX22g2n.js +0 -394
- package/dist/page-manager-search-and-filter-DkkRIH86.cjs +0 -1
- package/dist/page-revisions-content-ChY-4f2V.cjs +0 -1
- package/dist/plugin-3ZKK6RXm.js +0 -245
- package/dist/plugin-C6rgJDNQ.cjs +0 -22
- package/dist/publish-pages-content-x-JuSFJ9.cjs +0 -1
- package/dist/rte-widget-modal-BaHIuEjF.cjs +0 -1
- package/dist/save-to-lib-Cgpxw8-g.cjs +0 -1
- package/dist/selected-block-display-BgRY82CT.cjs +0 -16
- package/dist/seo-panel-DfAb8U7W.cjs +0 -2
- package/dist/shared-json-ld-DzG398hr.cjs +0 -1
- package/dist/slug-input-C_ijLQ_X.cjs +0 -1
- package/dist/take-over-request-BNxcjY2j.cjs +0 -1
- package/dist/theme-panel-footer-Cq9pljro.cjs +0 -1
- package/dist/theme-panel-footer-uBQqSJXm.js +0 -25
- package/dist/translation-warning-modal-BZAcwM2_.cjs +0 -1
- package/dist/unmark-as-template-EVvk0vmp.cjs +0 -1
- package/dist/unpublish-page-D4VwOlxc.js +0 -27
- package/dist/unpublish-page-bdSmwAVQ.cjs +0 -1
- package/dist/web-preview-Cio70gk5.cjs +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<section class="overflow-hidden bg-white px-6 py-24">
|
|
2
|
+
<div class="mx-auto max-w-7xl">
|
|
3
|
+
<div class="mb-20">
|
|
4
|
+
<h2 class="mb-3 text-sm font-bold uppercase tracking-widest text-indigo-600">The Roadmap</h2>
|
|
5
|
+
<h3 class="text-4xl font-black leading-tight text-slate-900 md:text-5xl">
|
|
6
|
+
Three steps to <br />
|
|
7
|
+
<span class="text-indigo-600">digital transformation.</span>
|
|
8
|
+
</h3>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="relative">
|
|
12
|
+
<div class="absolute left-0 top-24 hidden h-0.5 w-full bg-slate-100 lg:block">
|
|
13
|
+
<div class="absolute inset-0 w-1/2 bg-gradient-to-r from-indigo-500 to-purple-500"></div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="relative grid grid-cols-1 gap-12 lg:grid-cols-3">
|
|
17
|
+
<div class="group">
|
|
18
|
+
<div class="relative mb-8">
|
|
19
|
+
<div
|
|
20
|
+
class="relative z-10 flex h-16 w-16 items-center justify-center rounded-2xl bg-slate-900 text-2xl font-bold text-white shadow-xl transition-colors duration-300 group-hover:bg-indigo-600">
|
|
21
|
+
01
|
|
22
|
+
</div>
|
|
23
|
+
<div class="absolute left-8 top-16 h-12 w-0.5 bg-slate-100 lg:hidden"></div>
|
|
24
|
+
</div>
|
|
25
|
+
<h4 class="mb-4 text-2xl font-bold text-slate-900 transition-colors group-hover:text-indigo-600">
|
|
26
|
+
Strategic Discovery
|
|
27
|
+
</h4>
|
|
28
|
+
<p class="mb-6 leading-relaxed text-slate-600">
|
|
29
|
+
We start by diving deep into your business DNA to identify bottlenecks and untapped opportunities for
|
|
30
|
+
growth.
|
|
31
|
+
</p>
|
|
32
|
+
<ul class="space-y-3">
|
|
33
|
+
<li class="flex items-center text-sm font-medium text-slate-500">
|
|
34
|
+
<span class="mr-3 h-1.5 w-1.5 rounded-full bg-indigo-500"></span> Market Analysis
|
|
35
|
+
</li>
|
|
36
|
+
<li class="flex items-center text-sm font-medium text-slate-500">
|
|
37
|
+
<span class="mr-3 h-1.5 w-1.5 rounded-full bg-indigo-500"></span> Tech Audit
|
|
38
|
+
</li>
|
|
39
|
+
</ul>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="group">
|
|
43
|
+
<div class="relative mb-8">
|
|
44
|
+
<div
|
|
45
|
+
class="relative z-10 flex h-16 w-16 items-center justify-center rounded-2xl bg-slate-900 text-2xl font-bold text-white shadow-xl transition-colors duration-300 group-hover:bg-indigo-600">
|
|
46
|
+
02
|
|
47
|
+
</div>
|
|
48
|
+
<div class="absolute left-8 top-16 h-12 w-0.5 bg-slate-100 lg:hidden"></div>
|
|
49
|
+
</div>
|
|
50
|
+
<h4 class="mb-4 text-2xl font-bold text-slate-900 transition-colors group-hover:text-indigo-600">
|
|
51
|
+
Smart Implementation
|
|
52
|
+
</h4>
|
|
53
|
+
<p class="mb-6 leading-relaxed text-slate-600">
|
|
54
|
+
Our engineers deploy custom-built automation tools that integrate seamlessly with your existing tech stack.
|
|
55
|
+
</p>
|
|
56
|
+
<ul class="space-y-3">
|
|
57
|
+
<li class="flex items-center text-sm font-medium text-slate-500">
|
|
58
|
+
<span class="mr-3 h-1.5 w-1.5 rounded-full bg-indigo-500"></span> API Integration
|
|
59
|
+
</li>
|
|
60
|
+
<li class="flex items-center text-sm font-medium text-slate-500">
|
|
61
|
+
<span class="mr-3 h-1.5 w-1.5 rounded-full bg-indigo-500"></span> Custom UI/UX
|
|
62
|
+
</li>
|
|
63
|
+
</ul>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="group">
|
|
67
|
+
<div class="relative mb-8">
|
|
68
|
+
<div
|
|
69
|
+
class="relative z-10 flex h-16 w-16 items-center justify-center rounded-2xl bg-slate-900 text-2xl font-bold text-white shadow-xl transition-colors duration-300 group-hover:bg-indigo-600">
|
|
70
|
+
03
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<h4 class="mb-4 text-2xl font-bold text-slate-900 transition-colors group-hover:text-indigo-600">
|
|
74
|
+
Scale & Optimize
|
|
75
|
+
</h4>
|
|
76
|
+
<p class="mb-6 leading-relaxed text-slate-600">
|
|
77
|
+
We don't just launch and leave. We monitor performance in real-time, tweaking the system for maximum ROI.
|
|
78
|
+
</p>
|
|
79
|
+
<div
|
|
80
|
+
class="inline-flex cursor-pointer items-center text-sm font-bold text-indigo-600 transition-transform group-hover:translate-x-2">
|
|
81
|
+
VIEW CASE STUDIES
|
|
82
|
+
<svg
|
|
83
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
84
|
+
class="ml-2 h-4 w-4"
|
|
85
|
+
fill="none"
|
|
86
|
+
viewBox="0 0 24 24"
|
|
87
|
+
stroke="currentColor">
|
|
88
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M14 5l7 7m0 0l-7 7m7-7H3" />
|
|
89
|
+
</svg>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</section>
|
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { a4 as _, a5 as q, a6 as H, q as K, a7 as X, a8 as J, a9 as Y } from "./index-BFnMzGe6.js";
|
|
3
|
+
import { z, B as u } from "./register-chai-top-bar-D6GjnauV.js";
|
|
4
|
+
import { D as ee } from "./STRINGS-BExFecZW.js";
|
|
4
5
|
import { MagnifyingGlassIcon as L, PlusIcon as O, TokensIcon as te, ArrowLeftIcon as ne, EyeOpenIcon as se, Pencil1Icon as re, TrashIcon as ae } from "@radix-ui/react-icons";
|
|
5
6
|
import { useAtom as oe } from "jotai";
|
|
6
7
|
import { nanoid as ie } from "nanoid";
|
|
@@ -16,7 +17,7 @@ const S = (n) => {
|
|
|
16
17
|
return m.length === 0 ? "" : m.length > 25 ? o("Token name must be 25 characters or less") : /^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(m) ? Object.entries(s).find(
|
|
17
18
|
([l, v]) => v.name === m && (!d || l !== i)
|
|
18
19
|
) ? o("Token name already exists") : "" : o("Only alphanumeric characters and hyphens allowed");
|
|
19
|
-
}, xe = (n) => n.replace(/\s+/g, "-"), ge = M(() => import("./delete-design-token-
|
|
20
|
+
}, xe = (n) => n.replace(/\s+/g, "-"), ge = M(() => import("./delete-design-token-B0md8qUi.js")), pe = M(() => import("./design-token-usage-CyOY4Pni.js")), ve = ({ tokenId: n, token: s, isDisabled: o, onEdit: d, onDelete: i }) => /* @__PURE__ */ a("div", { className: "group relative flex items-center justify-between overflow-hidden rounded border p-2 transition-all duration-150 hover:bg-muted/90", children: [
|
|
20
21
|
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
21
22
|
/* @__PURE__ */ e("div", { className: "text-xs font-semibold", children: s.name }),
|
|
22
23
|
/* @__PURE__ */ e("div", { className: "w-full max-w-52 truncate text-[10px] font-light", children: s.value })
|
|
@@ -53,8 +54,8 @@ const S = (n) => {
|
|
|
53
54
|
}
|
|
54
55
|
) }) })
|
|
55
56
|
] })
|
|
56
|
-
] }),
|
|
57
|
-
const { t: n } = ue(), [s, o] = oe(_), d =
|
|
57
|
+
] }), Le = ({}) => {
|
|
58
|
+
const { t: n } = ue(), [s, o] = oe(_), d = q(), [i, m] = g("view"), [p, k] = g(null), [l, v] = g(""), [h, b] = g(""), [T, y] = g(""), [w, P] = g(""), [B, C] = g(!1), f = le(null), D = ce(() => Object.entries(s).filter(
|
|
58
59
|
([, t]) => t.name.toLowerCase().includes(w.toLowerCase()) || t.value.toLowerCase().includes(w.toLowerCase())
|
|
59
60
|
), [s, w]);
|
|
60
61
|
de(() => () => {
|
|
@@ -103,7 +104,7 @@ const S = (n) => {
|
|
|
103
104
|
}, W = (t) => {
|
|
104
105
|
const r = s[t];
|
|
105
106
|
r && (k(t), v(r.name), b(r.value), y(""), m("edit"));
|
|
106
|
-
},
|
|
107
|
+
}, E = () => {
|
|
107
108
|
k(null), v(""), b(""), y(""), m("add");
|
|
108
109
|
}, A = () => {
|
|
109
110
|
f.current && clearTimeout(f.current), k(null), v(""), b(""), y(""), C(!1), m("view");
|
|
@@ -112,14 +113,14 @@ const S = (n) => {
|
|
|
112
113
|
v(r);
|
|
113
114
|
const c = fe(r, s, n, i === "edit", p || void 0);
|
|
114
115
|
y(c), i === "edit" && !c && j(r, h);
|
|
115
|
-
},
|
|
116
|
+
}, I = (t) => {
|
|
116
117
|
b(t), i === "edit" && !T && l.trim() && j(l, t);
|
|
117
118
|
}, $ = (t) => {
|
|
118
119
|
const r = J(Y(he(h, t)));
|
|
119
|
-
|
|
120
|
+
I(r);
|
|
120
121
|
}, G = (t) => {
|
|
121
122
|
const r = h.split(" ").filter((c) => c !== t).join(" ");
|
|
122
|
-
|
|
123
|
+
I(r);
|
|
123
124
|
};
|
|
124
125
|
return /* @__PURE__ */ e("div", { className: "flex h-full w-full flex-col", children: i === "view" ? /* @__PURE__ */ a(Q, { children: [
|
|
125
126
|
Object.entries(s).length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-x-2", children: [
|
|
@@ -139,7 +140,7 @@ const S = (n) => {
|
|
|
139
140
|
u,
|
|
140
141
|
{
|
|
141
142
|
variant: "outline",
|
|
142
|
-
onClick:
|
|
143
|
+
onClick: E,
|
|
143
144
|
size: "sm",
|
|
144
145
|
className: "h-6 border-primary text-xs text-primary hover:bg-primary/10 hover:text-primary",
|
|
145
146
|
children: [
|
|
@@ -149,12 +150,12 @@ const S = (n) => {
|
|
|
149
150
|
}
|
|
150
151
|
)
|
|
151
152
|
] }),
|
|
152
|
-
/* @__PURE__ */ e("div", { className: "no-scrollbar flex flex-1 flex-col overflow-hidden pt-2", children: /* @__PURE__ */ e(
|
|
153
|
+
/* @__PURE__ */ e("div", { className: "no-scrollbar flex flex-1 flex-col overflow-hidden pt-2", children: /* @__PURE__ */ e(H, { className: "h-full flex-1", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
153
154
|
Object.entries(s).length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center rounded-lg border border-dashed border-muted bg-muted/20 py-8", children: [
|
|
154
155
|
/* @__PURE__ */ e("div", { className: "mb-2 text-3xl", children: /* @__PURE__ */ e(te, { className: "h-12 w-12 text-muted-foreground" }) }),
|
|
155
156
|
/* @__PURE__ */ e("p", { className: "mb-1 text-sm font-medium text-foreground", children: n("No design tokens yet") }),
|
|
156
157
|
/* @__PURE__ */ e("p", { className: "text-center text-xs text-muted-foreground", children: n("Create reusable design tokens to streamline your styling") }),
|
|
157
|
-
/* @__PURE__ */ a(u, { variant: "default", onClick:
|
|
158
|
+
/* @__PURE__ */ a(u, { variant: "default", onClick: E, size: "sm", className: "mt-4 h-7 text-xs leading-tight", children: [
|
|
158
159
|
/* @__PURE__ */ e(O, { className: "mr-1 h-3 w-3" }),
|
|
159
160
|
n("Add first design token")
|
|
160
161
|
] })
|
|
@@ -197,7 +198,7 @@ const S = (n) => {
|
|
|
197
198
|
] }),
|
|
198
199
|
/* @__PURE__ */ a("div", { className: "flex-1 space-y-3 overflow-y-auto", children: [
|
|
199
200
|
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
|
|
200
|
-
/* @__PURE__ */ e(
|
|
201
|
+
/* @__PURE__ */ e(K, { htmlFor: "token-name", className: "text-xs font-medium", children: n("Token Name") }),
|
|
201
202
|
/* @__PURE__ */ e(
|
|
202
203
|
z,
|
|
203
204
|
{
|
|
@@ -211,7 +212,7 @@ const S = (n) => {
|
|
|
211
212
|
T ? /* @__PURE__ */ e("span", { className: "text-[10px] text-destructive", children: T }) : /* @__PURE__ */ e("span", { className: "text-[10px] font-light text-muted-foreground", children: n("Button-Primary, Card-Header, Text-Large etc.") })
|
|
212
213
|
] }),
|
|
213
214
|
/* @__PURE__ */ e(
|
|
214
|
-
|
|
215
|
+
X,
|
|
215
216
|
{
|
|
216
217
|
from: "designToken",
|
|
217
218
|
classFromProps: h,
|
|
@@ -236,5 +237,5 @@ const S = (n) => {
|
|
|
236
237
|
})() });
|
|
237
238
|
};
|
|
238
239
|
export {
|
|
239
|
-
|
|
240
|
+
Le as default
|
|
240
241
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("./index-D30xvFa5.cjs"),c=require("./register-chai-top-bar-DyW9GPzV.cjs"),Z=require("./STRINGS-FNnfjF5H.cjs"),u=require("@radix-ui/react-icons"),$=require("jotai"),U=require("nanoid"),a=require("react"),Q=require("react-i18next"),p=require("sonner"),_=require("tailwind-merge"),B=t=>{const n=t.trim();return n.length===0||n.length>25?!1:/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(n)},H=(t,n,o,m=!1,i)=>{const x=t.trim();return x.length===0?"":x.length>25?o("Token name must be 25 characters or less"):/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(x)?Object.entries(n).find(([l,N])=>N.name===x&&(!m||l!==i))?o("Token name already exists"):"":o("Only alphanumeric characters and hyphens allowed")},K=t=>t.replace(/\s+/g,"-"),X=a.lazy(()=>Promise.resolve().then(()=>require("./delete-design-token-C94IgWdi.cjs"))),J=a.lazy(()=>Promise.resolve().then(()=>require("./design-token-usage-DtdjTCn3.cjs"))),Y=({tokenId:t,token:n,isDisabled:o,onEdit:m,onDelete:i})=>e.jsxs("div",{className:"group relative flex items-center justify-between overflow-hidden rounded border p-2 transition-all duration-150 hover:bg-muted/90",children:[e.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[e.jsx("div",{className:"text-xs font-semibold",children:n.name}),e.jsx("div",{className:"w-full max-w-52 truncate text-[10px] font-light",children:n.value})]}),e.jsxs("div",{className:"absolute right-1 top-1 flex flex-shrink-0 items-center opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[e.jsx(a.Suspense,{fallback:null,children:e.jsx(J,{tokenId:t,tokenName:n.name,children:e.jsx(c.Button,{variant:"ghost",size:"sm",className:"h-6 w-6 rounded-full p-0 hover:bg-primary/10 hover:text-primary",children:e.jsx(u.EyeOpenIcon,{className:"h-3 w-3"})})})}),e.jsx(c.Button,{variant:"ghost",size:"sm",onClick:()=>m(t),disabled:o,className:"h-6 w-6 rounded-full p-0 hover:bg-primary/10 hover:text-primary",children:e.jsx(u.Pencil1Icon,{className:"h-3 w-3"})}),e.jsx(a.Suspense,{fallback:null,children:e.jsx(X,{tokenName:n.name,tokenValue:n.value,onDelete:()=>i(t),children:e.jsx(c.Button,{variant:"ghost",size:"sm",disabled:o,className:"h-6 w-6 rounded-full p-0 hover:bg-destructive/10",children:e.jsx(u.TrashIcon,{className:"h-3 w-3 text-destructive"})})})})]})]}),ee=({})=>{const{t}=Q.useTranslation(),[n,o]=$.useAtom(v.chaiDesignTokensAtom),m=v.useIncrementActionsCount(),[i,x]=a.useState("view"),[j,k]=a.useState(null),[l,N]=a.useState(""),[h,b]=a.useState(""),[T,y]=a.useState(""),[w,E]=a.useState(""),[z,C]=a.useState(!1),f=a.useRef(null),S=a.useMemo(()=>Object.entries(n).filter(([,s])=>s.name.toLowerCase().includes(w.toLowerCase())||s.value.toLowerCase().includes(w.toLowerCase())),[n,w]);a.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const I=a.useCallback((s,r)=>{!j||i!=="edit"||!s.trim()||!r.trim()||!B(s)||Object.entries(n).find(([g,W])=>W.name===s.trim()&&g!==j)||(C(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{const g={...n,[j]:{name:s.trim(),value:r.trim()}};o(g),m(),C(!1)},250))},[j,i,n,o,m]),R=()=>{if(!l.trim()||!h.trim()){p.toast.error(t("Please fill in both token name and classes"));return}if(!B(l)){p.toast.error(t("Invalid design token name format"));return}if(Object.values(n).find(g=>g.name===l.trim())){p.toast.error(t("Token already exists"));return}const r=`${Z.DESIGN_TOKEN_PREFIX}${U.nanoid(12)}`,d={...n,[r]:{name:l.trim(),value:h.trim()}};o(d),m(),p.toast.success(t("Token added successfully")),A()},M=s=>{const r={...n};delete r[s],o(r),m(),p.toast.success(t("Token deleted successfully"))},P=s=>{const r=n[s];r&&(k(s),N(r.name),b(r.value),y(""),x("edit"))},D=()=>{k(null),N(""),b(""),y(""),x("add")},A=()=>{f.current&&clearTimeout(f.current),k(null),N(""),b(""),y(""),C(!1),x("view")},O=s=>{const r=K(s);N(r);const d=H(r,n,t,i==="edit",j||void 0);y(d),i==="edit"&&!d&&I(r,h)},q=s=>{b(s),i==="edit"&&!T&&l.trim()&&I(l,s)},L=s=>{const r=v.orderClassesByBreakpoint(v.removeDuplicateClasses(_.twMerge(h,s)));q(r)},F=s=>{const r=h.split(" ").filter(d=>d!==s).join(" ");q(r)},G=()=>{const s=i==="edit",r=t(s?"Edit Design Token":"Add Design Token"),d=t(s?"Update design token. Auto-saved.":"Create a reusable design token");return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-md border border-border/50 bg-muted p-1.5",children:[e.jsx(c.Button,{variant:"ghost",size:"sm",onClick:A,className:"h-6 w-6 rounded-full p-0 hover:bg-muted",children:e.jsx(u.ArrowLeftIcon,{className:"h-3 w-3"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:r}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:d})]}),s&&z&&e.jsx("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:e.jsx("div",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-primary"})})]}),e.jsxs("div",{className:"flex-1 space-y-3 overflow-y-auto",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(v.Label,{htmlFor:"token-name",className:"text-xs font-medium",children:t("Token Name")}),e.jsx(c.Input,{id:"token-name",placeholder:"Button-Primary",value:l,onChange:g=>O(g.target.value),className:"h-7 text-xs"}),T?e.jsx("span",{className:"text-[10px] text-destructive",children:T}):e.jsx("span",{className:"text-[10px] font-light text-muted-foreground",children:t("Button-Primary, Card-Header, Text-Large etc.")})]}),e.jsx(v.ManualClasses,{from:"designToken",classFromProps:h,onAddNew:L,onRemove:F}),!s&&e.jsxs("div",{className:"mt-3 flex items-center justify-end gap-2 pt-3",children:[e.jsx(c.Button,{variant:"outline",onClick:A,className:"h-7 text-xs",children:t("Cancel")}),e.jsx(c.Button,{onClick:R,disabled:!l.trim()||!h.trim()||!!T,className:"h-7 text-xs",children:t("Add Token")})]})]})]})},V=()=>e.jsxs(e.Fragment,{children:[Object.entries(n).length>0&&e.jsxs("div",{className:"flex items-center justify-between gap-x-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(u.MagnifyingGlassIcon,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),e.jsx(c.Input,{placeholder:t("Search tokens"),value:w,onChange:s=>E(s.target.value),className:"h-6 pl-7 text-xs"})]}),e.jsxs(c.Button,{variant:"outline",onClick:D,size:"sm",className:"h-6 border-primary text-xs text-primary hover:bg-primary/10 hover:text-primary",children:[e.jsx(u.PlusIcon,{className:"h-3 w-3"}),t("Add")]})]}),e.jsx("div",{className:"no-scrollbar flex flex-1 flex-col overflow-hidden pt-2",children:e.jsx(v.ScrollArea,{className:"h-full flex-1",children:e.jsxs("div",{className:"space-y-1",children:[Object.entries(n).length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-muted bg-muted/20 py-8",children:[e.jsx("div",{className:"mb-2 text-3xl",children:e.jsx(u.TokensIcon,{className:"h-12 w-12 text-muted-foreground"})}),e.jsx("p",{className:"mb-1 text-sm font-medium text-foreground",children:t("No design tokens yet")}),e.jsx("p",{className:"text-center text-xs text-muted-foreground",children:t("Create reusable design tokens to streamline your styling")}),e.jsxs(c.Button,{variant:"default",onClick:D,size:"sm",className:"mt-4 h-7 text-xs leading-tight",children:[e.jsx(u.PlusIcon,{className:"mr-1 h-3 w-3"}),t("Add first design token")]})]}):S.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-muted bg-muted/20 py-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx(u.MagnifyingGlassIcon,{className:"h-10 w-10 text-muted-foreground"})}),e.jsx("p",{className:"mb-1 text-sm font-medium text-foreground",children:t("No tokens found")}),e.jsx("p",{className:"text-center text-xs text-muted-foreground",children:t("No design tokens match your search")})]}):S.map(([s,r])=>e.jsx(Y,{token:r,tokenId:s,onEdit:P,onDelete:M,isDisabled:!1},s)),e.jsx("div",{className:"h-44"})]})})})]});return e.jsx("div",{className:"flex h-full w-full flex-col",children:i==="view"?V():G()})};exports.default=ee;
|
|
@@ -0,0 +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,13 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { q as
|
|
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";
|
|
4
5
|
import { startCase as y } from "lodash-es";
|
|
5
6
|
import { Tag as q, File as X, ImageIcon as _, X as $ } from "lucide-react";
|
|
6
|
-
import { useState as
|
|
7
|
+
import { useState as m, useRef as H, useCallback as K } from "react";
|
|
7
8
|
import { useTranslation as Z } from "react-i18next";
|
|
8
9
|
import { toast as k } from "sonner";
|
|
9
|
-
const G = 1 * 1024 * 1024,
|
|
10
|
-
const { t: a } = Z(), [g, p] =
|
|
10
|
+
const G = 1 * 1024 * 1024, re = ({ page: n, onClose: d }) => {
|
|
11
|
+
const { t: a } = Z(), [g, p] = m(!1), [x, T] = m(""), [l, N] = m(""), [v, u] = m(!1), i = H(null), I = j(), { data: h } = O(), f = h == null ? void 0 : h.find((s) => s.key === n.pageType), C = (f == null ? void 0 : f.name) || y(n.pageType), D = K(
|
|
11
12
|
(s) => {
|
|
12
13
|
var b;
|
|
13
14
|
const o = (b = s.target.files) == null ? void 0 : b[0];
|
|
@@ -38,7 +39,7 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
38
39
|
var s;
|
|
39
40
|
(s = i.current) == null || s.click();
|
|
40
41
|
}, A = () => {
|
|
41
|
-
p(!0),
|
|
42
|
+
p(!0), I.mutate(
|
|
42
43
|
{
|
|
43
44
|
page: n,
|
|
44
45
|
name: n.name,
|
|
@@ -48,7 +49,7 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
48
49
|
},
|
|
49
50
|
{
|
|
50
51
|
onSuccess: () => {
|
|
51
|
-
p(!1),
|
|
52
|
+
p(!1), d();
|
|
52
53
|
},
|
|
53
54
|
onError: () => {
|
|
54
55
|
p(!1);
|
|
@@ -56,10 +57,10 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
56
57
|
}
|
|
57
58
|
);
|
|
58
59
|
};
|
|
59
|
-
return /* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ t(
|
|
61
|
-
/* @__PURE__ */ e(
|
|
62
|
-
/* @__PURE__ */ t(
|
|
60
|
+
return /* @__PURE__ */ e(P, { open: !0, onOpenChange: d, children: /* @__PURE__ */ t(B, { children: [
|
|
61
|
+
/* @__PURE__ */ t(E, { children: [
|
|
62
|
+
/* @__PURE__ */ e(L, { children: a("Mark as template") }),
|
|
63
|
+
/* @__PURE__ */ t(S, { className: "space-y-1 py-4 text-xs text-slate-500", children: [
|
|
63
64
|
a("Are you sure you want to mark this page as a template?"),
|
|
64
65
|
/* @__PURE__ */ e("br", {}),
|
|
65
66
|
a("Templates can be used to create new pages with the same content.")
|
|
@@ -87,13 +88,13 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
87
88
|
/* @__PURE__ */ t("div", { children: [
|
|
88
89
|
/* @__PURE__ */ e(w, { htmlFor: "description", className: "text-xs font-medium", children: a("Description (Optional)") }),
|
|
89
90
|
/* @__PURE__ */ e(
|
|
90
|
-
|
|
91
|
+
U,
|
|
91
92
|
{
|
|
92
93
|
id: "description",
|
|
93
94
|
placeholder: a("Describe this template's purpose"),
|
|
94
95
|
className: "mt-1 h-24 resize-none text-xs",
|
|
95
96
|
value: x,
|
|
96
|
-
onChange: (s) =>
|
|
97
|
+
onChange: (s) => T(s.target.value)
|
|
97
98
|
}
|
|
98
99
|
)
|
|
99
100
|
] }),
|
|
@@ -102,7 +103,7 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
102
103
|
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
103
104
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
104
105
|
/* @__PURE__ */ e(
|
|
105
|
-
|
|
106
|
+
z,
|
|
106
107
|
{
|
|
107
108
|
type: "file",
|
|
108
109
|
id: "previewImage",
|
|
@@ -142,7 +143,7 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
142
143
|
{
|
|
143
144
|
variant: "outline",
|
|
144
145
|
onClick: (s) => {
|
|
145
|
-
s.stopPropagation(),
|
|
146
|
+
s.stopPropagation(), d();
|
|
146
147
|
},
|
|
147
148
|
children: a("Cancel")
|
|
148
149
|
}
|
|
@@ -152,5 +153,5 @@ const G = 1 * 1024 * 1024, se = ({ page: n, onClose: m }) => {
|
|
|
152
153
|
] }) });
|
|
153
154
|
};
|
|
154
155
|
export {
|
|
155
|
-
|
|
156
|
+
re as default
|
|
156
157
|
};
|
|
@@ -0,0 +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;
|
package/dist/{nested-path-selector-content-CKYYK-C5.js → nested-path-selector-content-CzQ2Lorl.js}
RENAMED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { jsx as c, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeft as
|
|
2
|
+
import { ChevronLeft as v, ChevronRight as g } from "lucide-react";
|
|
3
3
|
import * as l from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
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";
|
|
6
|
+
function I({
|
|
6
7
|
data: o,
|
|
7
|
-
onSelect:
|
|
8
|
+
onSelect: m,
|
|
8
9
|
dataType: t = "value",
|
|
9
|
-
open:
|
|
10
|
-
setOpen:
|
|
10
|
+
open: h,
|
|
11
|
+
setOpen: u
|
|
11
12
|
}) {
|
|
12
|
-
const [s, i] = l.useState([]), [y,
|
|
13
|
+
const [s, i] = l.useState([]), [y, f] = l.useState(o);
|
|
13
14
|
l.useEffect(() => {
|
|
14
|
-
|
|
15
|
-
}, [o,
|
|
15
|
+
h || i([]), f(o);
|
|
16
|
+
}, [o, h]);
|
|
16
17
|
const b = (e) => Array.isArray(e) ? "array" : typeof e == "object" && e !== null ? "object" : "value", j = l.useCallback(
|
|
17
18
|
(e) => {
|
|
18
19
|
const r = (a) => t === "value" ? a === "value" || a === "object" : t === "array" ? a === "array" : a === t;
|
|
19
|
-
e.type === "object" ? (i((a) => [...a, e.key]),
|
|
20
|
+
e.type === "object" ? (i((a) => [...a, e.key]), f(e.value)) : r(e.type) && (m([...s, e.key].join(".")), u(!1));
|
|
20
21
|
},
|
|
21
|
-
[t,
|
|
22
|
+
[t, m, s, u]
|
|
22
23
|
), C = l.useCallback(() => {
|
|
23
24
|
if (s.length > 0) {
|
|
24
25
|
const e = s.slice(0, -1);
|
|
25
|
-
i(e),
|
|
26
|
+
i(e), f(e.reduce((r, a) => r[a], o));
|
|
26
27
|
}
|
|
27
|
-
}, [s, o]),
|
|
28
|
+
}, [s, o]), p = l.useMemo(() => Object.entries(y).map(([e, r]) => ({
|
|
28
29
|
key: e,
|
|
29
30
|
value: r,
|
|
30
31
|
type: b(r)
|
|
31
32
|
})).filter((e) => t === "value" ? e.type === "value" || e.type === "object" : t === "array" ? e.type === "array" || e.type === "object" : t === "object" ? e.type === "object" : !0), [y, t]);
|
|
32
|
-
return /* @__PURE__ */ c(
|
|
33
|
-
/* @__PURE__ */ c(
|
|
33
|
+
return /* @__PURE__ */ c(N, { className: "z-[9999] w-[200px] p-0", children: /* @__PURE__ */ n(x, { children: [
|
|
34
|
+
/* @__PURE__ */ c(P, { className: "border-none", placeholder: "Search..." }),
|
|
34
35
|
/* @__PURE__ */ n(
|
|
35
|
-
|
|
36
|
+
S,
|
|
36
37
|
{
|
|
37
38
|
onWheel: (e) => {
|
|
38
39
|
try {
|
|
@@ -44,13 +45,13 @@ function E({
|
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
children: [
|
|
47
|
-
/* @__PURE__ */ c(
|
|
48
|
-
/* @__PURE__ */ n(
|
|
48
|
+
/* @__PURE__ */ c(w, { children: "No option found." }),
|
|
49
|
+
/* @__PURE__ */ n(B, { children: [
|
|
49
50
|
s.length > 0 && /* @__PURE__ */ n(d, { onSelect: C, className: "flex items-center text-sm", children: [
|
|
50
|
-
/* @__PURE__ */ c(
|
|
51
|
+
/* @__PURE__ */ c(v, { className: "mr-2 h-4 w-4" }),
|
|
51
52
|
"Back"
|
|
52
53
|
] }),
|
|
53
|
-
|
|
54
|
+
p.map((e) => /* @__PURE__ */ n(
|
|
54
55
|
d,
|
|
55
56
|
{
|
|
56
57
|
onSelect: () => j(e),
|
|
@@ -59,13 +60,13 @@ function E({
|
|
|
59
60
|
/* @__PURE__ */ c("span", { children: e.key }),
|
|
60
61
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
61
62
|
t === "object" && e.type === "object" && /* @__PURE__ */ c(
|
|
62
|
-
|
|
63
|
+
k,
|
|
63
64
|
{
|
|
64
65
|
size: "sm",
|
|
65
66
|
variant: "ghost",
|
|
66
67
|
className: "h-6 px-2 hover:bg-primary hover:text-primary-foreground",
|
|
67
68
|
onClick: (r) => {
|
|
68
|
-
r.stopPropagation(),
|
|
69
|
+
r.stopPropagation(), m([...s, e.key].join(".")), u(!1);
|
|
69
70
|
},
|
|
70
71
|
children: "Select"
|
|
71
72
|
}
|
|
@@ -83,5 +84,5 @@ function E({
|
|
|
83
84
|
] }) });
|
|
84
85
|
}
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
+
I as default
|
|
87
88
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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";
|
|
4
5
|
import { get as v } from "lodash-es";
|
|
5
6
|
import { LockIcon as B } from "lucide-react";
|
|
6
7
|
import { useTranslation as E } from "react-i18next";
|
|
7
8
|
const A = () => {
|
|
8
|
-
const { t: a } = E(), [c, l] = S(), r = c.get("lang"), i = L(r), { setSelectedLang: g } =
|
|
9
|
+
const { t: a } = E(), [c, l] = S(), r = c.get("lang"), i = L(r), { setSelectedLang: g } = u(), d = () => {
|
|
9
10
|
const n = new URLSearchParams(window.location.search);
|
|
10
11
|
n.delete("lang");
|
|
11
12
|
const o = n.toString(), m = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
@@ -13,8 +14,8 @@ const A = () => {
|
|
|
13
14
|
};
|
|
14
15
|
if (i) return null;
|
|
15
16
|
const t = v(x, r);
|
|
16
|
-
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ s(
|
|
17
|
-
/* @__PURE__ */ e(
|
|
17
|
+
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ s(w, { className: "mx-auto w-full max-w-md", children: [
|
|
18
|
+
/* @__PURE__ */ e(p, { className: "space-y-1", children: /* @__PURE__ */ s(f, { className: "flex items-center gap-2 text-2xl", children: [
|
|
18
19
|
/* @__PURE__ */ e(B, { className: "h-6 w-6 text-yellow-500" }),
|
|
19
20
|
a("Page missing for"),
|
|
20
21
|
' "',
|
|
@@ -23,7 +24,7 @@ const A = () => {
|
|
|
23
24
|
a("language"),
|
|
24
25
|
"."
|
|
25
26
|
] }) }),
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
+
/* @__PURE__ */ e(P, { className: "grid gap-4", children: /* @__PURE__ */ s("div", { children: [
|
|
27
28
|
a("Page is not available in the"),
|
|
28
29
|
' "',
|
|
29
30
|
t,
|
|
@@ -34,7 +35,7 @@ const A = () => {
|
|
|
34
35
|
'"',
|
|
35
36
|
a("language or switch to the base language.")
|
|
36
37
|
] }) }),
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(h, { onClick: d, className: "w-full", variant: "destructive", children: a("Switch to default language") }) })
|
|
38
39
|
] }) });
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
@@ -0,0 +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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { c as g, d as n } from "./index-
|
|
2
|
+
import { c as g, d as n } from "./index-CA1OwKJX.js";
|
|
3
3
|
import { Suspense as s, lazy as t } from "react";
|
|
4
|
-
const o = t(() => import("./no-language-page-content-
|
|
4
|
+
const o = t(() => import("./no-language-page-content-Bg6VjMVY.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
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./index-
|
|
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;
|