@chaibuilder/sdk 4.0.0-beta.49 → 4.0.0-beta.51
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 +35 -52
- package/dist/{2SSKDMRQ-CjvuNdPo.cjs → 2SSKDMRQ-BSYe_xPq.cjs} +1 -1
- package/dist/{2SSKDMRQ-Dvf9zadl.js → 2SSKDMRQ-Dv-C_YAA.js} +3 -3
- package/dist/{AP7HFJJL-DYFttFoI.cjs → AP7HFJJL-BJolKJBt.cjs} +1 -1
- package/dist/{AP7HFJJL-q4dJdyFs.js → AP7HFJJL-DhdVstVC.js} +1 -1
- package/dist/{IconPicker-Bf163F7t.js → IconPicker-BBkl0T8b.js} +13 -13
- package/dist/{IconPicker-JWhYq2Gp.cjs → IconPicker-C0WWlb8t.cjs} +1 -1
- package/dist/{WDYDFRGG-O9GIrtX0.js → WDYDFRGG-CJs2MxSq.js} +4 -4
- package/dist/{WDYDFRGG-BEksfGMC.cjs → WDYDFRGG-DRt6Zg7Q.cjs} +1 -1
- package/dist/{actions-registery-BHbZHkE3.cjs → actions-registery-CLL3KrNv.cjs} +2 -2
- package/dist/{actions-registery-gJb_wq2F.js → actions-registery-CrGIlqUX.js} +88 -88
- package/dist/actions.cjs +1 -1
- package/dist/actions.js +2 -2
- package/dist/{add-new-language-page-BfUp5Ua2.cjs → add-new-language-page-ByMSfRcN.cjs} +1 -1
- package/dist/{add-new-language-page-CRR93tLq.js → add-new-language-page-DtVoDNfI.js} +35 -35
- package/dist/{add-new-page-B8NGK6WS.cjs → add-new-page-CnuChfJz.cjs} +1 -1
- package/dist/add-new-page-DanzzvYo.js +31 -0
- package/dist/{ai-panel-default-lang-BXYQye3N.js → ai-panel-default-lang-BaPz2d_6.js} +35 -35
- package/dist/{ai-panel-default-lang-VhgmHFoQ.cjs → ai-panel-default-lang-CoIQSz_Y.cjs} +2 -2
- package/dist/{ai-panel-other-lang-DaCf-cq4.js → ai-panel-other-lang--i-5z4e2.js} +22 -22
- package/dist/{ai-panel-other-lang-Ds0EXeUC.cjs → ai-panel-other-lang-ChlMVodg.cjs} +1 -1
- package/dist/{ai-prompt-input-7iWk72w5.js → ai-prompt-input-BQi0VDJC.js} +77 -77
- package/dist/{ai-prompt-input-nZ5_Dm7X.cjs → ai-prompt-input-BT5426AB.cjs} +1 -1
- package/dist/{ai-translation-prompt-1OUs1P7n.js → ai-translation-prompt-BN78s33t.js} +8 -8
- package/dist/{ai-translation-prompt-B16cK-1Q.cjs → ai-translation-prompt-BQPaekp3.cjs} +1 -1
- package/dist/{apply-binding-CBSjMYSk.cjs → apply-binding-Cjh1kqMO.cjs} +1 -1
- package/dist/{apply-binding-vAuN-TGV.js → apply-binding-v_W4uR3U.js} +28 -28
- package/dist/{plugin-BSjgGgwo.js → chai-theme-helpers-BEf2rwE4.js} +83 -83
- package/dist/chai-theme-helpers-q3nwoNht.cjs +22 -0
- package/dist/{change-password-modal-D5eXjiYq.cjs → change-password-modal-DHUrrKw7.cjs} +1 -1
- package/dist/{change-password-modal-CdvJR1Ln.js → change-password-modal-pEp-nMNb.js} +30 -30
- package/dist/{code-display-DdWcOQ_i.js → code-display-BaLKScgW.js} +5 -5
- package/dist/{code-display-BR-gij5j.cjs → code-display-i7jb2kmw.cjs} +1 -1
- package/dist/{code-editor-CyLjDiEp.js → code-editor-CRoniyP0.js} +12 -12
- package/dist/{code-editor-SWbfFj1E.cjs → code-editor-gwFRjQ2_.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +0 -5
- package/dist/core.js +49 -49
- package/dist/{css-import-modal-Be47CBJn.js → css-import-modal-B3qxX9Iv.js} +14 -14
- package/dist/{css-import-modal-Bdwgd05S.cjs → css-import-modal-nAB5FSwn.cjs} +2 -2
- package/dist/{delete-page-C99K2qzS.js → delete-page-DbawNFf7.js} +13 -13
- package/dist/{delete-page-DLohaU-U.cjs → delete-page-YP1HEAoD.cjs} +1 -1
- package/dist/{digital-asset-manager-BZMb6sC7.js → digital-asset-manager-DTD5mf24.js} +388 -357
- package/dist/digital-asset-manager-kJnuMqpw.cjs +1 -0
- package/dist/{duplicate-page-D5Gtvqdv.cjs → duplicate-page-CxqW_EO7.cjs} +1 -1
- package/dist/{duplicate-page-CDc2X0eW.js → duplicate-page-DnRb1y6K.js} +19 -19
- package/dist/{dynamic-page-selector-DZHhX008.cjs → dynamic-page-selector-2EqJhUrB.cjs} +1 -1
- package/dist/{dynamic-page-selector-DvNBXo6o.js → dynamic-page-selector-D6VLDIN9.js} +17 -17
- package/dist/{get-chai-builder-tailwind-config-7CxFxEYL.cjs → get-chai-builder-tailwind-config-DNp8Vhme.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-DC4sDOYK.js → get-chai-builder-tailwind-config-k8l5sdcw.js} +3 -3
- package/dist/{get-chai-builder-theme-BpuwSLeS.js → get-chai-builder-theme-DLpviqPJ.js} +1 -1
- package/dist/get-chai-builder-theme-Du4ARJlw.cjs +1 -0
- package/dist/{image-editor-DwhTYkVR.cjs → image-editor-BQcOGsli.cjs} +1 -1
- package/dist/{image-editor-BBvvi9Vm.js → image-editor-CMf731xL.js} +15 -15
- package/dist/index-BYrRPW_c.cjs +5 -0
- package/dist/index-D-r_K4yA.cjs +160 -0
- package/dist/{index-OuHV9Ann.js → index-DPV6NiJ-.js} +5894 -6049
- package/dist/index-DqzFD1CG.js +4861 -0
- package/dist/{mark-as-template-CP_F9ZQ4.js → mark-as-template-D7jqSCXw.js} +28 -28
- package/dist/{mark-as-template-B9yLcasI.cjs → mark-as-template-DyB56HzI.cjs} +1 -1
- package/dist/{nested-path-selector-content-DmtCI3q9.js → nested-path-selector-content-dwSikrsV.js} +2 -2
- package/dist/{nested-path-selector-content-aTdu-o0e.cjs → nested-path-selector-content-g9_Tq_sR.cjs} +1 -1
- package/dist/no-language-page-content-BRITuyfN.js +43 -0
- package/dist/{no-language-page-content-C-MCdPXt.cjs → no-language-page-content-ZvMNVY-Y.cjs} +1 -1
- package/dist/{no-language-page-dialog-D4QIAHnE.cjs → no-language-page-dialog-Cndq8xRP.cjs} +1 -1
- package/dist/no-language-page-dialog-D7L9nVb9.js +10 -0
- package/dist/page-creator-BAIbU14q.js +652 -0
- package/dist/page-creator-qL3-M8g3.cjs +1 -0
- package/dist/{page-manager-new-ah6QYar2.cjs → page-manager-new-By3eGO3i.cjs} +1 -1
- package/dist/{page-manager-new-ttsrxdW9.js → page-manager-new-YRG89y4f.js} +63 -63
- package/dist/page-manager-search-and-filter-BbdgOU9V.cjs +1 -0
- package/dist/page-manager-search-and-filter-Cllju4CV.js +184 -0
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +0 -15
- package/dist/pages.js +20 -21
- package/dist/{publish-pages-content-KZVMHT6V.js → publish-pages-content-CG5LBUnY.js} +48 -48
- package/dist/{publish-pages-content-BrajJUcP.cjs → publish-pages-content-DxMiBxNU.cjs} +1 -1
- package/dist/{register-chai-top-bar-DyW9GPzV.cjs → register-chai-top-bar-CCssW5dL.cjs} +1 -1
- package/dist/{register-chai-top-bar-D6GjnauV.js → register-chai-top-bar-DWmJ2efT.js} +11 -11
- package/dist/render.cjs +1 -1
- package/dist/render.js +54 -54
- package/dist/{rte-widget-modal-CiTwsXTr.cjs → rte-widget-modal-CsTqFJc_.cjs} +1 -1
- package/dist/{rte-widget-modal-IU8JzPuZ.js → rte-widget-modal-DoeTMRtX.js} +2 -2
- package/dist/runtime-client.cjs +1 -1
- package/dist/runtime-client.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/sdk.css +1 -1
- package/dist/{selected-block-display-CidmQ-wz.js → selected-block-display-Ck1kkNEi.js} +17 -28
- package/dist/{selected-block-display-CAFEOrLV.cjs → selected-block-display-DSow6N4b.cjs} +1 -1
- package/dist/seo-panel---mYZmLD.js +559 -0
- package/dist/seo-panel-mfX63fua.cjs +1 -0
- package/dist/{shared-json-ld-uvMmwCYp.js → shared-json-ld-B3I_RLE2.js} +46 -46
- package/dist/{shared-json-ld-CMH-eRUq.cjs → shared-json-ld-CGgwUOlW.cjs} +1 -1
- package/dist/{slug-input-DLWTMTsO.js → slug-input-DQ4t3-Tt.js} +5 -5
- package/dist/{slug-input-CiHC5l3r.cjs → slug-input-DaNbl597.cjs} +1 -1
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.js +2 -2
- package/dist/types.d.ts +0 -96
- package/dist/{unmark-as-template-F7TdgWjI.cjs → unmark-as-template-CZ65AE4v.cjs} +1 -1
- package/dist/{unmark-as-template-C5ovsEBP.js → unmark-as-template-DvmoTbVu.js} +11 -11
- package/dist/unpublish-page-3--vO5b0.js +28 -0
- package/dist/{unpublish-page-CUr8Xub6.cjs → unpublish-page-B46TiWlU.cjs} +1 -1
- package/dist/{unpublished-partials-modal-BhNAub_z.js → unpublished-partials-modal-DVMz3q83.js} +18 -15
- package/dist/{unpublished-partials-modal-Cv5R9-hi.cjs → unpublished-partials-modal-U5lKBOSR.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +2 -2
- package/dist/{web-preview-D9pXonAv.js → web-preview-D5o5XQo0.js} +2 -2
- package/dist/{web-preview-CuMYekVJ.cjs → web-preview-Da3RhcjQ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/active-in-another-tab-B4Ur0JP7.js +0 -35
- package/dist/active-in-another-tab-BPdx4lWh.cjs +0 -1
- package/dist/add-new-page-Ppy5-y5j.js +0 -31
- package/dist/continue-editing-in-this-client-BrSvK-Ay.js +0 -25
- package/dist/continue-editing-in-this-client-Cmi-GkYZ.cjs +0 -1
- package/dist/design-token-usage-D1lWCJ3L.js +0 -114
- package/dist/design-token-usage-eY2wQ0l3.cjs +0 -1
- package/dist/digital-asset-manager-Z5aJxkq0.cjs +0 -1
- package/dist/get-chai-builder-theme-B5RkBTsB.cjs +0 -1
- package/dist/image-compression-DPFITwOL.js +0 -37
- package/dist/image-compression-UaU7Bwqe.cjs +0 -1
- package/dist/index-BVwFJWDq.cjs +0 -5
- package/dist/index-DCJDQs1a.cjs +0 -160
- package/dist/index-LBTm1Jmk.js +0 -5199
- package/dist/json-diff-viewer-Cb1CmRqP.cjs +0 -8
- package/dist/json-diff-viewer-DG6qMOBS.js +0 -261
- package/dist/lang-panel-B3USOxGq.js +0 -216
- package/dist/lang-panel-DxoJ0v4y.cjs +0 -1
- package/dist/manage-design-tokens-6YGIctip.js +0 -446
- package/dist/manage-design-tokens-modal-BSSCXH8Y.cjs +0 -1
- package/dist/manage-design-tokens-modal-CzsnN49F.js +0 -161
- package/dist/manage-design-tokens-udLBvkHA.cjs +0 -1
- package/dist/no-language-page-content-D8t5dfgh.js +0 -43
- package/dist/no-language-page-dialog-C_fHI2zI.js +0 -10
- package/dist/page-creator-Cz_ah-qE.cjs +0 -1
- package/dist/page-creator-DKEkuGCO.js +0 -796
- package/dist/page-lock-CwZKJ4IE.js +0 -30
- package/dist/page-lock-DdCvtA-I.cjs +0 -1
- package/dist/page-locked-dialog-CrTDBoC4.cjs +0 -1
- package/dist/page-locked-dialog-DqLlooUz.js +0 -136
- package/dist/page-manager-search-and-filter-D7AupT6_.cjs +0 -1
- package/dist/page-manager-search-and-filter-bsqZ6wnI.js +0 -210
- package/dist/page-revisions-content-B6hsIla7.cjs +0 -1
- package/dist/page-revisions-content-C5O8_Fms.js +0 -459
- package/dist/plugin-DHpuZZXz.cjs +0 -22
- package/dist/save-to-lib-DMnv7ENo.js +0 -429
- package/dist/save-to-lib-Dc700Aop.cjs +0 -1
- package/dist/seo-panel-Br8gxDxu.js +0 -789
- package/dist/seo-panel-CMY-adM-.cjs +0 -2
- package/dist/take-over-request-IRLgF1dG.cjs +0 -1
- package/dist/take-over-request-KdR1_h_K.js +0 -64
- package/dist/translation-warning-modal-CLZ9tC1F.cjs +0 -1
- package/dist/translation-warning-modal-CzNt6LDO.js +0 -27
- package/dist/unpublish-page-0fR1o0b7.js +0 -28
package/dist/render.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./chai-theme-helpers-q3nwoNht.cjs"),d=require("./apply-binding-Cjh1kqMO.cjs"),m=require("react/jsx-runtime"),t=require("lodash-es"),g=require("react"),w=require("./core-czmLeR0h.cjs"),F=require("@mhsdesign/jit-browser-tailwindcss"),j=require("@tailwindcss/aspect-ratio"),q=require("@tailwindcss/container-queries"),K=require("@tailwindcss/forms"),M=require("@tailwindcss/typography"),x=require("./get-chai-builder-theme-Du4ARJlw.cjs");async function O(e){const a={pageProps:e.pageProps,block:e.block,lang:e.lang,draft:e.draft,inBuilder:!1},n=await e.dataProvider(a);return t.has(n,"$metadata")&&t.isFunction(e.dataProviderMetadataCallback)&&e.dataProviderMetadataCallback(e.block,n.$metadata),e.children({...t.omit(n,"$metadata")})}const N=()=>m.jsx("div",{}),H=e=>{const{block:a,lang:n,fallbackLang:s,children:i,externalData:l,blocks:o,draft:r,pageProps:c,dataProviderMetadataCallback:f}=e,p=w.getRegisteredChaiBlock(a._type),u=t.get(p,"component",null),k=t.get(e.repeaterData,"index",-1),P=t.get(e.repeaterData,"dataKey",""),B=n===s?"":n??"",y=d.applyBindingToBlockProps(d.applyLanguage(a,B,p),l??{},{index:k,key:P}),h=d.getBlockTagAttributes(a,!1),I=D(o,a._id,d.getBlockRuntimeProps(a._type)),$=t.has(p,"dataProvider")&&t.isFunction(p.dataProvider),C={...y,...h,...I},v={blockProps:{},inBuilder:!1,lang:n||s||"en",draft:r??!1,pageData:l??{},...C};let _=t.get(C,"_show",!0);if(t.isString(_)&&_.startsWith("{{")&&(_=d.resolveBinding(_,l)!=="false"),t.isNull(u)||!_)return null;if($){const b=t.get(p,"suspenseFallback",N);return m.jsx(g.Suspense,{fallback:g.createElement(b),children:m.jsx(O,{lang:n??"",pageProps:c,block:C,dataProvider:p.dataProvider,...f?{dataProviderMetadataCallback:f}:{},draft:r??!1,children:S=>g.createElement(u,{...v,...S,children:i({_id:a._id,_type:a._type,...t.isArray(y.repeaterItems)?{repeaterItems:d.applyLimit(y.repeaterItems,a),$repeaterItemsKey:y.$repeaterItemsKey,repeaterTotalItems:y.repeaterTotalItems??-1}:{}})})})})}return m.jsx(g.Suspense,{children:g.createElement(u,{...v,children:i({_id:a._id,_type:a._type,...t.isArray(y.repeaterItems)?{repeaterItems:d.applyLimit(y.repeaterItems,a),$repeaterItemsKey:y.$repeaterItemsKey,repeaterTotalItems:y.repeaterTotalItems??-1}:{}})})})},E=e=>{const{blocks:a,parent:n,repeaterData:s,type:i}=e;let l=t.uniqBy(t.filter(a,r=>t.has(r,"_id")&&(t.isEmpty(n)?!r._parent:r._parent===n)),"_id");const o=r=>t.filter(a,c=>c._parent===r).length>0;return(i==="Heading"||i==="Paragraph"||i==="Link"||i==="Span")&&(l=d.adjustSpacingInContentBlocks(l)),t.map(l,(r,c)=>r?g.createElement(H,{...e,key:r._id?`${r._id}-${c}`:`block-${c}`,block:r},({_id:f,_type:p,repeaterItems:u,$repeaterItemsKey:k})=>p==="Repeater"?t.isArray(u)&&u.map((P,B)=>g.createElement(E,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}-${c}-${B}`,repeaterData:{index:B,dataKey:k}})):o(f)?g.createElement(E,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}-${c}`,repeaterData:s,type:r._type}):null):null)},D=(e,a,n)=>t.isEmpty(n)?{}:Object.entries(n).reduce((s,[i,l])=>{const o=[];let r=t.find(e,{_id:a});for(;r;)o.push(r),r=t.find(e,{_id:r._parent});const c=t.find(o,{_type:l.block});return c&&(s[i]=t.get(c,t.get(l,"prop"),null)),s},{});function J(e){if(t.isEmpty(e.lang)&&!t.isEmpty(e.fallbackLang))throw new Error("lang prop is required when fallbackLang is provided");if(t.isEmpty(e.blocks))return null;const a=e.lang??"en",n=e.fallbackLang??a;return m.jsx(E,{...e,lang:a,fallbackLang:n})}async function W(e){const a=await e.dataProvider;return t.has(a,"$metadata")&&t.isFunction(e.dataProviderMetadataCallback)&&e.dataProviderMetadataCallback(e.block,a.$metadata),e.children({...t.omit(a,"$metadata")})}const V=()=>m.jsx("div",{}),U=async e=>{const{block:a,lang:n,fallbackLang:s,children:i,externalData:l,blocks:o,draft:r,pageProps:c,dataProviderMetadataCallback:f,dataProviders:p}=e,u=w.getRegisteredChaiBlock(a._type),k=t.get(u,"component",null),P=t.get(e.repeaterData,"index",-1),B=t.get(e.repeaterData,"dataKey",""),y=n===s?"":n??"en",h=d.applyBindingToBlockProps(d.applyLanguage(a,y,u),l??{},{index:P,key:B}),I=d.getBlockTagAttributes(a,!1),$=D(o,a._id,d.getBlockRuntimeProps(a._type)),C=t.has(u,"dataProvider")&&t.isFunction(u.dataProvider),v={...h,...I,...$},_={blockProps:{},inBuilder:!1,lang:n||s||"en",draft:r??!1,pageData:l??{},...v},b=t.get(v,"_show",!0);if(t.isNull(k)||!b)return null;if(C){const S=t.get(p,a._id,Promise.resolve({})),R=t.get(u,"suspenseFallback",V);return m.jsx(g.Suspense,{fallback:g.createElement(R),children:m.jsx(W,{lang:n??"",pageProps:c,block:v,dataProvider:S,...f?{dataProviderMetadataCallback:f}:{},draft:r??!1,children:A=>g.createElement(k,{..._,...A,children:i({_id:a._id,_type:a._type,...t.isArray(h.repeaterItems)?{repeaterItems:d.applyLimit(h.repeaterItems,a),$repeaterItemsKey:h.$repeaterItemsKey,repeaterTotalItems:h.repeaterTotalItems??-1}:{}})})})})}return g.createElement(k,{..._,children:i({_id:a._id,_type:a._type,...t.isArray(h.repeaterItems)?{repeaterItems:d.applyLimit(h.repeaterItems,a),$repeaterItemsKey:h.$repeaterItemsKey,repeaterTotalItems:h.repeaterTotalItems??-1}:{}})})},T=async e=>{const{blocks:a,parent:n,repeaterData:s,type:i}=e;let l=t.uniqBy(t.filter(a,r=>t.has(r,"_id")&&(t.isEmpty(n)?!r._parent:r._parent===n)),"_id");const o=r=>t.filter(a,c=>c._parent===r).length>0;return(i==="Heading"||i==="Paragraph"||i==="Link")&&(l=d.adjustSpacingInContentBlocks(l)),t.map(l,r=>r?g.createElement(U,{...e,dataProviders:e.dataProviders,key:r._id,block:r},({_id:c,_type:f,repeaterItems:p,$repeaterItemsKey:u})=>f==="Repeater"?t.isArray(p)&&p.map((k,P)=>g.createElement(T,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}-${P}`,repeaterData:{index:P,dataKey:u}})):o(c)?g.createElement(T,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}`,repeaterData:s,type:r._type}):null):null)};async function G(e){if(t.isEmpty(e.lang)&&!t.isEmpty(e.fallbackLang))throw new Error("lang prop is required when fallbackLang is provided");if(t.isEmpty(e.blocks))return null;const a=e.lang??"en",n=e.fallbackLang??a;if(e.dataProviders)return m.jsx(T,{...e,lang:a,fallbackLang:n,dataProviders:e.dataProviders});const i=e.blocks.filter(l=>{const o=w.getRegisteredChaiBlock(l._type);return!!(t.has(o,"dataProvider")&&t.isFunction(o.dataProvider))}).reduce((l,o)=>{const r=w.getRegisteredChaiBlock(o._type);if(!r||!r.dataProvider)return l;const c={pageProps:e.pageProps,block:o,lang:e.lang,draft:e.draft,inBuilder:!1};return l[o._id]=Promise.resolve(r.dataProvider(c)),l},{});return m.jsx(T,{...e,lang:a,fallbackLang:n,dataProviders:i})}function Q(e,a){const n=e.filter(s=>s._type==="GlobalBlock"||s._type==="PartialBlock");for(let s=0;s<n.length;s++){const i=n[s],l=t.get(i,"partialBlockId",t.get(i,"globalBlock",""));if(l==="")continue;let o=t.cloneDeep(t.get(a,l,[]));i._parent&&(o==null?void 0:o.length)>0&&(o=o.map(c=>(t.isEmpty(c._parent)&&(c._parent=i._parent),c)));const r=e.indexOf(i);e.splice(r,1,...o)}return e}const z=e=>{if(!e)return[];try{return JSON.parse(X(e)).filter(n=>!n._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function X(e){const a=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(a,n=>{const s=decodeURIComponent(n),i=s.indexOf("public");return i!==-1?s.substring(i+6):s})}async function Y(e,a=[],n=!1){return await F.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:a,theme:{extend:{...x.getChaiBuilderTheme(),keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"}}},plugins:[K,M,j,q,x.chaiBuilderPlugin],corePlugins:{preflight:n}}}).generateStylesFromContent(` ${n?"@tailwind base;":""}
|
|
2
2
|
@tailwind components;
|
|
3
3
|
@tailwind utilities;`,e)}const Z=(e,a)=>{const n=JSON.stringify(e).replace(/#styles:([^"]*)/g,(s,i)=>`#styles:${i.replace(/^,/g," ")}`.replace(/#styles:/g,""));return Y([n],[],a)},ee=async(e,a=!1)=>await Z(e,a);exports.getChaiThemeCssVariables=L.getChaiThemeCssVariables;exports.getThemeFontsCSSImport=L.getThemeFontsCSSImport;exports.getThemeFontsLinkMarkup=L.getThemeFontsLinkMarkup;exports.applyChaiDataBinding=d.applyChaiDataBinding;exports.applyDesignTokens=d.applyDesignTokens;exports.convertHTMLToChaiBlocks=d.getBlocksFromHTML;exports.AsyncRenderChaiBlocks=G;exports.RenderChaiBlocks=J;exports.convertToBlocks=z;exports.getMergedPartialBlocks=Q;exports.getStylesForBlocks=ee;
|
package/dist/render.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as O, b as N, c as E, d as J, r as z, e as S, f as W } from "./apply-binding-
|
|
3
|
-
import { h as Me, i as Oe, g as Ne } from "./apply-binding-
|
|
1
|
+
import { a as Ke, b as Re, c as Ae } from "./chai-theme-helpers-BEf2rwE4.js";
|
|
2
|
+
import { a as O, b as N, c as E, d as J, r as z, e as S, f as W } from "./apply-binding-v_W4uR3U.js";
|
|
3
|
+
import { h as Me, i as Oe, g as Ne } from "./apply-binding-v_W4uR3U.js";
|
|
4
4
|
import { jsx as m } from "react/jsx-runtime";
|
|
5
|
-
import { has as v, isFunction as
|
|
5
|
+
import { has as v, isFunction as I, omit as j, get as d, isString as X, isNull as q, isArray as b, uniqBy as H, filter as T, isEmpty as h, map as U, find as A, cloneDeep as Y } from "lodash-es";
|
|
6
6
|
import { Suspense as F, createElement as u } from "react";
|
|
7
|
-
import { f as
|
|
7
|
+
import { f as L } from "./core-nSRy3D7z.js";
|
|
8
8
|
import { createTailwindcss as Z } from "@mhsdesign/jit-browser-tailwindcss";
|
|
9
9
|
import ee from "@tailwindcss/aspect-ratio";
|
|
10
10
|
import te from "@tailwindcss/container-queries";
|
|
11
11
|
import ae from "@tailwindcss/forms";
|
|
12
12
|
import re from "@tailwindcss/typography";
|
|
13
|
-
import { c as ne, g as ie } from "./get-chai-builder-theme-
|
|
13
|
+
import { c as ne, g as ie } from "./get-chai-builder-theme-DLpviqPJ.js";
|
|
14
14
|
async function oe(e) {
|
|
15
15
|
const t = {
|
|
16
16
|
pageProps: e.pageProps,
|
|
@@ -19,18 +19,18 @@ async function oe(e) {
|
|
|
19
19
|
draft: e.draft,
|
|
20
20
|
inBuilder: !1
|
|
21
21
|
}, r = await e.dataProvider(t);
|
|
22
|
-
return v(r, "$metadata") &&
|
|
22
|
+
return v(r, "$metadata") && I(e.dataProviderMetadataCallback) && e.dataProviderMetadataCallback(e.block, r.$metadata), e.children({
|
|
23
23
|
...j(r, "$metadata")
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
const se = () => /* @__PURE__ */ m("div", {}), le = (e) => {
|
|
27
|
-
const { block: t, lang: r, fallbackLang: i, children: n, externalData: o, blocks: s, draft: a, pageProps: l, dataProviderMetadataCallback: y } = e, g =
|
|
27
|
+
const { block: t, lang: r, fallbackLang: i, children: n, externalData: o, blocks: s, draft: a, pageProps: l, dataProviderMetadataCallback: y } = e, g = L(t._type), c = d(g, "component", null), _ = d(e.repeaterData, "index", -1), P = d(e.repeaterData, "dataKey", ""), f = O(
|
|
28
28
|
N(t, r === i ? "" : r ?? "", g),
|
|
29
29
|
o ?? {},
|
|
30
30
|
{ index: _, key: P }
|
|
31
|
-
),
|
|
32
|
-
...p,
|
|
31
|
+
), p = E(t, !1), x = V(s, t._id, J(t._type)), K = v(g, "dataProvider") && I(g.dataProvider), $ = {
|
|
33
32
|
...f,
|
|
33
|
+
...p,
|
|
34
34
|
...x
|
|
35
35
|
}, B = {
|
|
36
36
|
blockProps: {},
|
|
@@ -38,9 +38,9 @@ const se = () => /* @__PURE__ */ m("div", {}), le = (e) => {
|
|
|
38
38
|
lang: r || i || "en",
|
|
39
39
|
draft: a ?? !1,
|
|
40
40
|
pageData: o ?? {},
|
|
41
|
-
|
|
41
|
+
...$
|
|
42
42
|
};
|
|
43
|
-
let k = d(
|
|
43
|
+
let k = d($, "_show", !0);
|
|
44
44
|
if (X(k) && k.startsWith("{{") && (k = z(k, o) !== "false"), q(c) || !k) return null;
|
|
45
45
|
if (K) {
|
|
46
46
|
const C = d(g, "suspenseFallback", se);
|
|
@@ -49,7 +49,7 @@ const se = () => /* @__PURE__ */ m("div", {}), le = (e) => {
|
|
|
49
49
|
{
|
|
50
50
|
lang: r ?? "",
|
|
51
51
|
pageProps: l,
|
|
52
|
-
block:
|
|
52
|
+
block: $,
|
|
53
53
|
dataProvider: g.dataProvider,
|
|
54
54
|
...y ? { dataProviderMetadataCallback: y } : {},
|
|
55
55
|
draft: a ?? !1,
|
|
@@ -59,10 +59,10 @@ const se = () => /* @__PURE__ */ m("div", {}), le = (e) => {
|
|
|
59
59
|
children: n({
|
|
60
60
|
_id: t._id,
|
|
61
61
|
_type: t._type,
|
|
62
|
-
...b(
|
|
63
|
-
repeaterItems: S(
|
|
64
|
-
$repeaterItemsKey:
|
|
65
|
-
repeaterTotalItems:
|
|
62
|
+
...b(f.repeaterItems) ? {
|
|
63
|
+
repeaterItems: S(f.repeaterItems, t),
|
|
64
|
+
$repeaterItemsKey: f.$repeaterItemsKey,
|
|
65
|
+
repeaterTotalItems: f.repeaterTotalItems ?? -1
|
|
66
66
|
} : {}
|
|
67
67
|
})
|
|
68
68
|
})
|
|
@@ -74,27 +74,27 @@ const se = () => /* @__PURE__ */ m("div", {}), le = (e) => {
|
|
|
74
74
|
children: n({
|
|
75
75
|
_id: t._id,
|
|
76
76
|
_type: t._type,
|
|
77
|
-
...b(
|
|
78
|
-
repeaterItems: S(
|
|
79
|
-
$repeaterItemsKey:
|
|
80
|
-
repeaterTotalItems:
|
|
77
|
+
...b(f.repeaterItems) ? {
|
|
78
|
+
repeaterItems: S(f.repeaterItems, t),
|
|
79
|
+
$repeaterItemsKey: f.$repeaterItemsKey,
|
|
80
|
+
repeaterTotalItems: f.repeaterTotalItems ?? -1
|
|
81
81
|
} : {}
|
|
82
82
|
})
|
|
83
83
|
}) });
|
|
84
84
|
}, M = (e) => {
|
|
85
85
|
const { blocks: t, parent: r, repeaterData: i, type: n } = e;
|
|
86
86
|
let o = H(
|
|
87
|
-
|
|
87
|
+
T(t, (a) => v(a, "_id") && (h(r) ? !a._parent : a._parent === r)),
|
|
88
88
|
"_id"
|
|
89
89
|
);
|
|
90
|
-
const s = (a) =>
|
|
91
|
-
return (n === "Heading" || n === "Paragraph" || n === "Link" || n === "Span") && (o = W(o)), U(o, (a, l) => a ? /* @__PURE__ */ u(le, { ...e, key: a._id ? `${a._id}-${l}` : `block-${l}`, block: a }, ({ _id: y, _type: g, repeaterItems: c, $repeaterItemsKey: _ }) => g === "Repeater" ? b(c) && c.map((P,
|
|
90
|
+
const s = (a) => T(t, (l) => l._parent === a).length > 0;
|
|
91
|
+
return (n === "Heading" || n === "Paragraph" || n === "Link" || n === "Span") && (o = W(o)), U(o, (a, l) => a ? /* @__PURE__ */ u(le, { ...e, key: a._id ? `${a._id}-${l}` : `block-${l}`, block: a }, ({ _id: y, _type: g, repeaterItems: c, $repeaterItemsKey: _ }) => g === "Repeater" ? b(c) && c.map((P, w) => /* @__PURE__ */ u(
|
|
92
92
|
M,
|
|
93
93
|
{
|
|
94
94
|
...e,
|
|
95
95
|
parent: a._id,
|
|
96
|
-
key: `${d(a, "_parent", "root")}-${a._id}-${l}-${
|
|
97
|
-
repeaterData: { index:
|
|
96
|
+
key: `${d(a, "_parent", "root")}-${a._id}-${l}-${w}`,
|
|
97
|
+
repeaterData: { index: w, dataKey: _ }
|
|
98
98
|
}
|
|
99
99
|
)) : s(y) ? /* @__PURE__ */ u(
|
|
100
100
|
M,
|
|
@@ -117,7 +117,7 @@ const se = () => /* @__PURE__ */ m("div", {}), le = (e) => {
|
|
|
117
117
|
},
|
|
118
118
|
{}
|
|
119
119
|
);
|
|
120
|
-
function
|
|
120
|
+
function Ie(e) {
|
|
121
121
|
if (h(e.lang) && !h(e.fallbackLang))
|
|
122
122
|
throw new Error("lang prop is required when fallbackLang is provided");
|
|
123
123
|
if (h(e.blocks))
|
|
@@ -127,7 +127,7 @@ function we(e) {
|
|
|
127
127
|
}
|
|
128
128
|
async function de(e) {
|
|
129
129
|
const t = await e.dataProvider;
|
|
130
|
-
return v(t, "$metadata") &&
|
|
130
|
+
return v(t, "$metadata") && I(e.dataProviderMetadataCallback) && e.dataProviderMetadataCallback(e.block, t.$metadata), e.children({
|
|
131
131
|
...j(t, "$metadata")
|
|
132
132
|
});
|
|
133
133
|
}
|
|
@@ -143,12 +143,12 @@ const ce = () => /* @__PURE__ */ m("div", {}), ge = async (e) => {
|
|
|
143
143
|
pageProps: l,
|
|
144
144
|
dataProviderMetadataCallback: y,
|
|
145
145
|
dataProviders: g
|
|
146
|
-
} = e, c =
|
|
146
|
+
} = e, c = L(t._type), _ = d(c, "component", null), P = d(e.repeaterData, "index", -1), w = d(e.repeaterData, "dataKey", ""), p = O(
|
|
147
147
|
N(t, r === i ? "" : r ?? "en", c),
|
|
148
148
|
o ?? {},
|
|
149
|
-
{ index: P, key:
|
|
150
|
-
), x = E(t, !1), K = V(s, t._id, J(t._type)),
|
|
151
|
-
...
|
|
149
|
+
{ index: P, key: w }
|
|
150
|
+
), x = E(t, !1), K = V(s, t._id, J(t._type)), $ = v(c, "dataProvider") && I(c.dataProvider), B = {
|
|
151
|
+
...p,
|
|
152
152
|
...x,
|
|
153
153
|
...K
|
|
154
154
|
}, k = {
|
|
@@ -160,7 +160,7 @@ const ce = () => /* @__PURE__ */ m("div", {}), ge = async (e) => {
|
|
|
160
160
|
...B
|
|
161
161
|
}, C = d(B, "_show", !0);
|
|
162
162
|
if (q(_) || !C) return null;
|
|
163
|
-
if (
|
|
163
|
+
if ($) {
|
|
164
164
|
const R = d(g, t._id, Promise.resolve({})), G = d(c, "suspenseFallback", ce);
|
|
165
165
|
return /* @__PURE__ */ m(F, { fallback: u(G), children: /* @__PURE__ */ m(
|
|
166
166
|
de,
|
|
@@ -177,10 +177,10 @@ const ce = () => /* @__PURE__ */ m("div", {}), ge = async (e) => {
|
|
|
177
177
|
children: n({
|
|
178
178
|
_id: t._id,
|
|
179
179
|
_type: t._type,
|
|
180
|
-
...b(
|
|
181
|
-
repeaterItems: S(
|
|
182
|
-
$repeaterItemsKey:
|
|
183
|
-
repeaterTotalItems:
|
|
180
|
+
...b(p.repeaterItems) ? {
|
|
181
|
+
repeaterItems: S(p.repeaterItems, t),
|
|
182
|
+
$repeaterItemsKey: p.$repeaterItemsKey,
|
|
183
|
+
repeaterTotalItems: p.repeaterTotalItems ?? -1
|
|
184
184
|
} : {}
|
|
185
185
|
})
|
|
186
186
|
})
|
|
@@ -192,20 +192,20 @@ const ce = () => /* @__PURE__ */ m("div", {}), ge = async (e) => {
|
|
|
192
192
|
children: n({
|
|
193
193
|
_id: t._id,
|
|
194
194
|
_type: t._type,
|
|
195
|
-
...b(
|
|
196
|
-
repeaterItems: S(
|
|
197
|
-
$repeaterItemsKey:
|
|
198
|
-
repeaterTotalItems:
|
|
195
|
+
...b(p.repeaterItems) ? {
|
|
196
|
+
repeaterItems: S(p.repeaterItems, t),
|
|
197
|
+
$repeaterItemsKey: p.$repeaterItemsKey,
|
|
198
|
+
repeaterTotalItems: p.repeaterTotalItems ?? -1
|
|
199
199
|
} : {}
|
|
200
200
|
})
|
|
201
201
|
});
|
|
202
202
|
}, D = async (e) => {
|
|
203
203
|
const { blocks: t, parent: r, repeaterData: i, type: n } = e;
|
|
204
204
|
let o = H(
|
|
205
|
-
|
|
205
|
+
T(t, (a) => v(a, "_id") && (h(r) ? !a._parent : a._parent === r)),
|
|
206
206
|
"_id"
|
|
207
207
|
);
|
|
208
|
-
const s = (a) =>
|
|
208
|
+
const s = (a) => T(t, (l) => l._parent === a).length > 0;
|
|
209
209
|
return (n === "Heading" || n === "Paragraph" || n === "Link") && (o = W(o)), U(o, (a) => a ? /* @__PURE__ */ u(ge, { ...e, dataProviders: e.dataProviders, key: a._id, block: a }, ({ _id: l, _type: y, repeaterItems: g, $repeaterItemsKey: c }) => y === "Repeater" ? b(g) && g.map((_, P) => /* @__PURE__ */ u(
|
|
210
210
|
D,
|
|
211
211
|
{
|
|
@@ -234,11 +234,11 @@ async function Ce(e) {
|
|
|
234
234
|
if (e.dataProviders)
|
|
235
235
|
return /* @__PURE__ */ m(D, { ...e, lang: t, fallbackLang: r, dataProviders: e.dataProviders });
|
|
236
236
|
const n = e.blocks.filter((o) => {
|
|
237
|
-
const s =
|
|
238
|
-
return !!(v(s, "dataProvider") &&
|
|
237
|
+
const s = L(o._type);
|
|
238
|
+
return !!(v(s, "dataProvider") && I(s.dataProvider));
|
|
239
239
|
}).reduce(
|
|
240
240
|
(o, s) => {
|
|
241
|
-
const a =
|
|
241
|
+
const a = L(s._type);
|
|
242
242
|
if (!a || !a.dataProvider)
|
|
243
243
|
return o;
|
|
244
244
|
const l = {
|
|
@@ -266,7 +266,7 @@ function Se(e, t) {
|
|
|
266
266
|
}
|
|
267
267
|
return e;
|
|
268
268
|
}
|
|
269
|
-
const
|
|
269
|
+
const Te = (e) => {
|
|
270
270
|
if (!e) return [];
|
|
271
271
|
try {
|
|
272
272
|
return JSON.parse(ue(e)).filter((r) => !r._type.startsWith("@chai"));
|
|
@@ -281,7 +281,7 @@ function ue(e) {
|
|
|
281
281
|
return n !== -1 ? i.substring(n + 6) : i;
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
|
-
async function
|
|
284
|
+
async function pe(e, t = [], r = !1) {
|
|
285
285
|
return await Z({
|
|
286
286
|
tailwindConfig: {
|
|
287
287
|
darkMode: "class",
|
|
@@ -324,20 +324,20 @@ async function fe(e, t = [], r = !1) {
|
|
|
324
324
|
e
|
|
325
325
|
);
|
|
326
326
|
}
|
|
327
|
-
const
|
|
327
|
+
const fe = (e, t) => {
|
|
328
328
|
const r = JSON.stringify(e).replace(/#styles:([^"]*)/g, (i, n) => `#styles:${n.replace(/^,/g, " ")}`.replace(/#styles:/g, ""));
|
|
329
|
-
return
|
|
330
|
-
},
|
|
329
|
+
return pe([r], [], t);
|
|
330
|
+
}, Le = async (e, t = !1) => await fe(e, t);
|
|
331
331
|
export {
|
|
332
332
|
Ce as AsyncRenderChaiBlocks,
|
|
333
|
-
|
|
333
|
+
Ie as RenderChaiBlocks,
|
|
334
334
|
Me as applyChaiDataBinding,
|
|
335
335
|
Oe as applyDesignTokens,
|
|
336
336
|
Ne as convertHTMLToChaiBlocks,
|
|
337
|
-
|
|
337
|
+
Te as convertToBlocks,
|
|
338
338
|
Ke as getChaiThemeCssVariables,
|
|
339
339
|
Se as getMergedPartialBlocks,
|
|
340
|
-
|
|
340
|
+
Le as getStylesForBlocks,
|
|
341
341
|
Re as getThemeFontsCSSImport,
|
|
342
342
|
Ae as getThemeFontsLinkMarkup
|
|
343
343
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-D-r_K4yA.cjs"),p=require("./register-chai-top-bar-CCssW5dL.cjs"),S=({isOpen:m,onClose:r,editor:t,rteElement:f})=>{const a=s.usePageExternalData(),u=o=>{if(!t)return;const i=`{{${o}}}`;t.commands.focus();const{from:j,to:g}=t.state.selection;if(j!==g)t.chain().deleteSelection().insertContent(i).run();else{const{state:c}=t,n=c.selection.from,x=c.doc.textBetween(Math.max(0,n-1),n),l=c.doc.textBetween(n,Math.min(n+1,c.doc.content.size));let d="";n>0&&x!==" "&&!/[.,!?;:]/.test(x)&&(d=" ");let h="";l&&l!==" "&&!/[.,!?;:]/.test(l)&&(h=" "),t.chain().insertContent(d+i+h).run()}};return e.jsx(s.Dialog,{open:m,onOpenChange:o=>!o&&r(),children:e.jsxs(s.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[800px]",children:[e.jsx(s.DialogHeader,{children:e.jsxs(s.DialogTitle,{className:"flex items-center justify-between pr-8",children:[e.jsx("span",{children:"Rich Text Editor"}),a&&Object.keys(a).length>0&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2 text-sm text-muted-foreground",children:"Add field:"}),e.jsx("div",{className:"rte-path-selector",children:e.jsx(s.NestedPathSelector,{data:a,onSelect:u})})]})]})}),f,e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(p.Button,{onClick:r,children:"Done"})})]})})};exports.default=S;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { h as D, D as N, e as S, f as j, g as v, N as w } from "./index-
|
|
3
|
-
import { B } from "./register-chai-top-bar-
|
|
2
|
+
import { h as D, D as N, e as S, f as j, g as v, N as w } from "./index-DPV6NiJ-.js";
|
|
3
|
+
import { B } from "./register-chai-top-bar-DWmJ2efT.js";
|
|
4
4
|
const M = ({
|
|
5
5
|
isOpen: f,
|
|
6
6
|
onClose: r,
|
package/dist/runtime-client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./register-chai-top-bar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./register-chai-top-bar-CCssW5dL.cjs");exports.ADD_BLOCK_TABS=e.ADD_BLOCK_TABS;exports.CHAI_BUILDER_PANELS=e.CHAI_BUILDER_PANELS;exports.IfChaiFeatureFlag=e.IfChaiFeatureFlag;exports.RJSF_EXTENSIONS=e.RJSF_EXTENSIONS;exports.getChaiLibrary=e.getChaiLibrary;exports.getPreImportHTML=e.getPreImportHTML;exports.registerChaiAddBlockTab=e.registerChaiAddBlockTab;exports.registerChaiBlockSettingField=e.registerChaiBlockSettingField;exports.registerChaiBlockSettingTemplate=e.registerChaiBlockSettingTemplate;exports.registerChaiBlockSettingWidget=e.registerChaiBlockSettingWidget;exports.registerChaiFeatureFlag=e.registerChaiFeatureFlag;exports.registerChaiFeatureFlags=e.registerChaiFeatureFlags;exports.registerChaiLibrary=e.registerChaiLibrary;exports.registerChaiMediaManager=e.registerChaiMediaManager;exports.registerChaiPreImportHTMLHook=e.registerChaiPreImportHTMLHook;exports.registerChaiSaveToLibrary=e.registerChaiSaveToLibrary;exports.registerChaiSidebarPanel=e.registerChaiSidebarPanel;exports.registerChaiTopBar=e.registerChaiTopBar;exports.resetSaveToLibrary=e.resetSaveToLibrary;exports.useChaiAddBlockTabs=e.useChaiAddBlockTabs;exports.useChaiBlockSettingComponents=e.useChaiBlockSettingComponents;exports.useChaiFeatureFlag=e.useChaiFeatureFlag;exports.useChaiFeatureFlags=e.useChaiFeatureFlags;exports.useChaiLibraries=e.useChaiLibraries;exports.useChaiSidebarPanels=e.useChaiSidebarPanels;exports.useMediaManagerComponent=e.useMediaManagerComponent;exports.useSaveToLibraryComponent=e.useSaveToLibraryComponent;exports.useToggleChaiFeatureFlag=e.useToggleChaiFeatureFlag;exports.useTopBarComponent=e.useTopBarComponent;
|
package/dist/runtime-client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, C as r, I as i, R as t, k as g, o as C, c as o, a as h, b as l, r as n, e as u, f as F, j as S, m as T, p as b, q as d, v as p, x as B, t as L, d as m, u as k, h as c, g as A, l as I, w as y, n as M, s as P, i as _, y as v } from "./register-chai-top-bar-
|
|
1
|
+
import { A as s, C as r, I as i, R as t, k as g, o as C, c as o, a as h, b as l, r as n, e as u, f as F, j as S, m as T, p as b, q as d, v as p, x as B, t as L, d as m, u as k, h as c, g as A, l as I, w as y, n as M, s as P, i as _, y as v } from "./register-chai-top-bar-DWmJ2efT.js";
|
|
2
2
|
export {
|
|
3
3
|
s as ADD_BLOCK_TABS,
|
|
4
4
|
r as CHAI_BUILDER_PANELS,
|
package/dist/runtime.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("lodash-es"),h=require("./STRINGS-FNnfjF5H.cjs"),i=require("./register-partial-type-ig9fUWIJ.cjs"),o=require("./core-czmLeR0h.cjs"),c=require("./fonts-D5fTqvSS.cjs"),C=e=>{const r=t.filter(t.compact(t.map(e,c.getRegisteredFont)),s=>t.has(s,"src"));return d(r)},d=e=>!e||e.length===0?"":t.uniqBy(e,"family").map(r=>r.src.map(s=>`@font-face {
|
|
2
2
|
font-family: "${r.family}";
|
|
3
3
|
src: url("${s.url}") format("${s.format}");
|
|
4
4
|
font-display: swap;
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as l } from "./STRINGS-BExFecZW.js";
|
|
2
1
|
import { has as g, uniqBy as u, filter as m, compact as d, map as C, keys as P, intersection as n, get as p, each as y, isEmpty as h, omit as B } from "lodash-es";
|
|
2
|
+
import { S as l } from "./STRINGS-BExFecZW.js";
|
|
3
3
|
import { b as Y, C as K, P as q, a as z, g as H, d as N, f as U, e as V, r as J, c as M, h as Q, i as X } from "./register-partial-type-BjtdfKHE.js";
|
|
4
4
|
import { s as S } from "./core-nSRy3D7z.js";
|
|
5
5
|
import { c as ee, g as te, a as se, b as re, d as oe, e as ae, f as ie, r as ne, h as le, i as ce, j as pe, k as he, u as ge, l as ue } from "./core-nSRy3D7z.js";
|