@chaibuilder/sdk 4.0.0-beta.3 → 4.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/{2SSKDMRQ-BnsZi3K3.cjs → 2SSKDMRQ-CopJgtZb.cjs} +1 -1
  2. package/dist/{2SSKDMRQ-CnSDkQcy.js → 2SSKDMRQ-Difo_1pg.js} +2 -2
  3. package/dist/{AP7HFJJL-CymCmW14.js → AP7HFJJL-BPuPBqj4.js} +1 -1
  4. package/dist/{AP7HFJJL-B31839PG.cjs → AP7HFJJL-DYxDgaOs.cjs} +1 -1
  5. package/dist/{IconPicker-B1rWC-Ex.js → IconPicker-B2-oriq2.js} +8 -7
  6. package/dist/IconPicker-C0oycHbs.cjs +1 -0
  7. package/dist/{WDYDFRGG-BxhOCHc3.cjs → WDYDFRGG-DbejaRPK.cjs} +1 -1
  8. package/dist/{WDYDFRGG-BUVnbAci.js → WDYDFRGG-KK8pkcW1.js} +2 -2
  9. package/dist/{actions-registery-YnFmU21O.cjs → actions-registery-JdxhXhT6.cjs} +1 -1
  10. package/dist/{actions-registery-CZ1w0NKa.js → actions-registery-y_ENc8zj.js} +2 -2
  11. package/dist/actions.cjs +1 -1
  12. package/dist/actions.js +2 -2
  13. package/dist/active-in-another-tab-Cu_ASKtx.cjs +1 -0
  14. package/dist/active-in-another-tab-DkR2HWI4.js +35 -0
  15. package/dist/add-new-language-page-BXuwluuU.cjs +1 -0
  16. package/dist/{add-new-language-page-WmlCnytQ.js → add-new-language-page-CBY0RR6q.js} +54 -53
  17. package/dist/{add-new-page-soZ8GAkN.cjs → add-new-page-C_PzKby8.cjs} +1 -1
  18. package/dist/{add-new-page-VW2wAYZp.js → add-new-page-DJLJFLAd.js} +2 -2
  19. package/dist/{ai-panel-content-D_o7Q_A-.js → ai-panel-content--YM01Aly.js} +12 -11
  20. package/dist/ai-panel-content-rRmJdH7L.cjs +1 -0
  21. package/dist/{ai-panel-default-lang-DnElspF0.js → ai-panel-default-lang-BZl0tPYo.js} +40 -40
  22. package/dist/{ai-panel-default-lang-COYaxNwn.cjs → ai-panel-default-lang-D2zhXvKP.cjs} +2 -2
  23. package/dist/{ai-panel-other-lang-Dp0E9_Hx.js → ai-panel-other-lang-Bfjk2CYZ.js} +8 -8
  24. package/dist/{ai-panel-other-lang-CkynNlAU.cjs → ai-panel-other-lang-Y4bEKHoG.cjs} +1 -1
  25. package/dist/{ai-prompt-input-Bhc0ds7X.js → ai-prompt-input-DueQYNf-.js} +68 -67
  26. package/dist/ai-prompt-input-N9PcYCFa.cjs +1 -0
  27. package/dist/{ai-translation-prompt-CZ55HQmo.js → ai-translation-prompt-B36F3d7K.js} +2 -2
  28. package/dist/ai-translation-prompt-IAdWMNZb.cjs +1 -0
  29. package/dist/{apply-binding-6iwlED02.js → apply-binding-BvWfJCSZ.js} +204 -196
  30. package/dist/apply-binding-IsUf6UWJ.cjs +1 -0
  31. package/dist/{code-display-DhD_RBcg.js → code-display-Ck81Id9K.js} +1 -1
  32. package/dist/code-display-DloSPyPr.cjs +1 -0
  33. package/dist/{code-editor-DRIAnNbb.js → code-editor-Bb7JumZy.js} +11 -10
  34. package/dist/code-editor-DQB8lAOk.cjs +1 -0
  35. package/dist/{continue-editing-in-this-client-CS2aQ7yY.js → continue-editing-in-this-client-Dm9cCj7K.js} +10 -9
  36. package/dist/continue-editing-in-this-client-DmGFLHXw.cjs +1 -0
  37. package/dist/core-Dr7QYemB.js +56 -0
  38. package/dist/core-Y0lXLwkq.cjs +1 -0
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.d.ts +3 -3
  41. package/dist/core.js +41 -39
  42. package/dist/{css-import-modal-Byg6wV0O.js → css-import-modal-9P_0uNa4.js} +5 -3
  43. package/dist/css-import-modal-Rh1QAVxo.cjs +13 -0
  44. package/dist/{delete-design-token-DkVs1oBf.cjs → delete-design-token-BG8yHcS5.cjs} +1 -1
  45. package/dist/{delete-design-token-BRZZiWtQ.js → delete-design-token-COvR4G1S.js} +1 -1
  46. package/dist/{delete-page-BzyX9TN-.js → delete-page-CNucxe4P.js} +11 -10
  47. package/dist/delete-page-DAvEjHwF.cjs +1 -0
  48. package/dist/design-token-usage-CXglXgcJ.cjs +1 -0
  49. package/dist/{design-token-usage-xQs6SlaJ.js → design-token-usage-MNYsFlPG.js} +14 -13
  50. package/dist/digital-asset-manager-CB5MRBcW.cjs +1 -0
  51. package/dist/{digital-asset-manager-DbtwzxRz.js → digital-asset-manager-CqCWBO0s.js} +6 -5
  52. package/dist/{duplicate-page-BR7Dlo9d.js → duplicate-page-BknLfqr0.js} +19 -18
  53. package/dist/duplicate-page-DzZByALW.cjs +1 -0
  54. package/dist/{dynamic-page-selector-Cb5r_W8s.js → dynamic-page-selector-DoW7OyUB.js} +15 -14
  55. package/dist/dynamic-page-selector-WA007Sni.cjs +1 -0
  56. package/dist/get-chai-builder-tailwind-config-BFePCEIS.cjs +1 -0
  57. package/dist/{get-chai-builder-tailwind-config-DjoVOuAf.js → get-chai-builder-tailwind-config-BXf_xLHk.js} +5 -5
  58. package/dist/{get-chai-builder-theme-Dl72X7cz.cjs → get-chai-builder-theme-BApShjRz.cjs} +1 -1
  59. package/dist/{get-chai-builder-theme-BYtp20KD.js → get-chai-builder-theme-DDVRJQ6Z.js} +1 -1
  60. package/dist/{image-editor-DV8kUKhl.js → image-editor-CQnNtak2.js} +1 -1
  61. package/dist/{image-editor-G-K28aTS.cjs → image-editor-CqwaVxO2.cjs} +1 -1
  62. package/dist/index-C0-pgg_p.cjs +5 -0
  63. package/dist/index-C99FhuF1.cjs +160 -0
  64. package/dist/{index-ZuacEL1j.js → index-Dno42B0a.js} +672 -670
  65. package/dist/{index-Ct7ElCGK.js → index-rAcNbjk_.js} +3744 -3920
  66. package/dist/{json-diff-viewer-D7z4zNvv.cjs → json-diff-viewer-CLuUHiPU.cjs} +3 -3
  67. package/dist/{json-diff-viewer-krslPepD.js → json-diff-viewer-CMvGUvJ2.js} +5 -4
  68. package/dist/{lang-panel-BwIewMyw.js → lang-panel-CnwTb05j.js} +15 -14
  69. package/dist/lang-panel-fDCYm5Jm.cjs +1 -0
  70. package/dist/{manage-design-tokens-Caz_20VK.js → manage-design-tokens-BsSZE9Vs.js} +12 -11
  71. package/dist/manage-design-tokens-BvH5KTJX.cjs +1 -0
  72. package/dist/mark-as-template-CpWEBJGd.cjs +1 -0
  73. package/dist/{mark-as-template-D295ZQtU.js → mark-as-template-DBLshWb5.js} +17 -16
  74. package/dist/{nested-path-selector-content-CKYYK-C5.js → nested-path-selector-content-6OBJ8LG8.js} +24 -23
  75. package/dist/nested-path-selector-content-C2sD9dkq.cjs +1 -0
  76. package/dist/no-language-page-content-BvPDdccK.cjs +1 -0
  77. package/dist/{no-language-page-content-BvqRBP6y.js → no-language-page-content-CzENgtnu.js} +10 -9
  78. package/dist/{no-language-page-dialog-PjNqTUpl.js → no-language-page-dialog-CbYI2cVg.js} +2 -2
  79. package/dist/{no-language-page-dialog-BcEoqyQB.cjs → no-language-page-dialog-CgW4yJBC.cjs} +1 -1
  80. package/dist/{page-creator-DiOITEMw.js → page-creator-Cc83uQqw.js} +113 -112
  81. package/dist/page-creator-g8GqgcKH.cjs +1 -0
  82. package/dist/{page-lock-Bfbs6RgL.js → page-lock-BJUkyxdh.js} +2 -2
  83. package/dist/{page-lock-BdYmCks0.cjs → page-lock-CT7SmQqp.cjs} +1 -1
  84. package/dist/page-locked-dialog-Co5b9XIZ.cjs +1 -0
  85. package/dist/{page-locked-dialog-B6MKTRfY.js → page-locked-dialog-DsEbWRed.js} +18 -15
  86. package/dist/{page-manager-new-CzX22g2n.js → page-manager-new-5rFP5DyQ.js} +30 -29
  87. package/dist/page-manager-new-BOkJImo2.cjs +1 -0
  88. package/dist/page-manager-search-and-filter-Bfm0j1gg.cjs +1 -0
  89. package/dist/{page-manager-search-and-filter-CM0UMb6U.js → page-manager-search-and-filter-zq-LfhQ1.js} +13 -12
  90. package/dist/{page-revisions-content-NH9JK4Ey.js → page-revisions-content-D38G2tJM.js} +34 -31
  91. package/dist/page-revisions-content-ag-MHBGr.cjs +1 -0
  92. package/dist/pages.cjs +1 -1
  93. package/dist/pages.d.ts +4 -4
  94. package/dist/pages.js +1 -1
  95. package/dist/{plugin-C6rgJDNQ.cjs → plugin-BGlQf0iy.cjs} +1 -1
  96. package/dist/{plugin-3ZKK6RXm.js → plugin-C-ht41UZ.js} +1 -1
  97. package/dist/publish-pages-content-BiX-GMLw.cjs +1 -0
  98. package/dist/{publish-pages-content-D9aixMN5.js → publish-pages-content-CS7f41Ac.js} +66 -65
  99. package/dist/register-chai-top-bar-BqwKw4uy.cjs +1 -0
  100. package/dist/register-chai-top-bar-ESJHs5s-.js +237 -0
  101. package/dist/render.cjs +2 -2
  102. package/dist/render.d.ts +2 -2
  103. package/dist/render.js +87 -80
  104. package/dist/rte-widget-modal-BKNx2wln.cjs +1 -0
  105. package/dist/{rte-widget-modal-DOJEXLIf.js → rte-widget-modal-D6Zik0Ta.js} +15 -14
  106. package/dist/runtime.cjs +1 -1
  107. package/dist/runtime.d.ts +168 -4
  108. package/dist/runtime.js +68 -38
  109. package/dist/{save-to-lib-eiOc_SSN.js → save-to-lib-WwOzbgiF.js} +39 -38
  110. package/dist/save-to-lib-ffjCZYJ5.cjs +1 -0
  111. package/dist/sdk.css +1 -1
  112. package/dist/{selected-block-display-CBFePS19.js → selected-block-display-B1SG_UXw.js} +37 -36
  113. package/dist/selected-block-display-BOgnQRLF.cjs +16 -0
  114. package/dist/{seo-panel-C1-iMOR1.js → seo-panel-BkOgRoWd.js} +12 -11
  115. package/dist/seo-panel-FjS1UF_y.cjs +2 -0
  116. package/dist/{shared-json-ld-B4PxAM_0.js → shared-json-ld-uka9TOgA.js} +68 -67
  117. package/dist/shared-json-ld-yJkXjENy.cjs +1 -0
  118. package/dist/slug-input-Cyd6NR6J.cjs +1 -0
  119. package/dist/{slug-input-AwNJs9im.js → slug-input-DHLmUNrH.js} +9 -8
  120. package/dist/supabase-actions.cjs +1 -1
  121. package/dist/supabase-actions.d.ts +1 -1
  122. package/dist/supabase-actions.js +1 -1
  123. package/dist/{take-over-request-C4FeDtN_.js → take-over-request-Ca0X-qyf.js} +17 -16
  124. package/dist/take-over-request-CmpJVe9T.cjs +1 -0
  125. package/dist/{theme-panel-footer-uBQqSJXm.js → theme-panel-footer-BUXIu252.js} +11 -10
  126. package/dist/theme-panel-footer-CKO9YYwZ.cjs +1 -0
  127. package/dist/{translation-warning-modal-B64YqlbI.js → translation-warning-modal-DrpFeI83.js} +9 -8
  128. package/dist/translation-warning-modal-pSZVKcNW.cjs +1 -0
  129. package/dist/{unmark-as-template-CZ9sQp_P.js → unmark-as-template-BMqgelv-.js} +11 -10
  130. package/dist/unmark-as-template-DF1Ms4VN.cjs +1 -0
  131. package/dist/unpublish-page-BJ0Bsvt2.js +28 -0
  132. package/dist/unpublish-page-Bsq2yEqQ.cjs +1 -0
  133. package/dist/utils.cjs +1 -1
  134. package/dist/utils.d.ts +4 -1
  135. package/dist/utils.js +2 -2
  136. package/dist/web-blocks.cjs +1 -1
  137. package/dist/web-blocks.js +46 -46
  138. package/dist/{web-preview-Djy6WIyj.js → web-preview-D6h1L2nV.js} +2 -2
  139. package/dist/web-preview-kres0aG7.cjs +1 -0
  140. package/package.json +4 -2
  141. package/dist/IconPicker-DREyo007.cjs +0 -1
  142. package/dist/active-in-another-tab-B47YjQGN.cjs +0 -1
  143. package/dist/active-in-another-tab-CyjngVA6.js +0 -34
  144. package/dist/add-new-language-page-88xzrUy8.cjs +0 -1
  145. package/dist/ai-panel-content-7zCil042.cjs +0 -1
  146. package/dist/ai-prompt-input-CThbVp0_.cjs +0 -1
  147. package/dist/ai-translation-prompt-C2kJQFDX.cjs +0 -1
  148. package/dist/apply-binding-KKp5PnpZ.cjs +0 -1
  149. package/dist/code-display-BnqzqzoP.cjs +0 -1
  150. package/dist/code-editor-o3___nu2.cjs +0 -1
  151. package/dist/continue-editing-in-this-client-CtMYsk-A.cjs +0 -1
  152. package/dist/core-BoRDjj4h.cjs +0 -1
  153. package/dist/core-yvI6kCyw.js +0 -56
  154. package/dist/css-import-modal-CyqkXWCO.cjs +0 -13
  155. package/dist/delete-page-DxX7PFIE.cjs +0 -1
  156. package/dist/design-token-usage-CAHzEGgJ.cjs +0 -1
  157. package/dist/digital-asset-manager--uO8Agia.cjs +0 -1
  158. package/dist/duplicate-page-CaNAbXwV.cjs +0 -1
  159. package/dist/dynamic-page-selector-Cxk_gjni.cjs +0 -1
  160. package/dist/get-chai-builder-tailwind-config-B9rCyiQo.cjs +0 -1
  161. package/dist/index-DF5DEvqb.cjs +0 -160
  162. package/dist/index-WQwzsC7A.cjs +0 -5
  163. package/dist/lang-panel-DT96k1xg.cjs +0 -1
  164. package/dist/manage-design-tokens-CrmLe7UT.cjs +0 -1
  165. package/dist/mark-as-template-W3LmpiqN.cjs +0 -1
  166. package/dist/nested-path-selector-content-CoS_d3dc.cjs +0 -1
  167. package/dist/no-language-page-content-DkfeMl90.cjs +0 -1
  168. package/dist/page-creator-C4gc5NSC.cjs +0 -1
  169. package/dist/page-locked-dialog-B1FAtK92.cjs +0 -1
  170. package/dist/page-manager-new-CHDueBDk.cjs +0 -1
  171. package/dist/page-manager-search-and-filter-DkkRIH86.cjs +0 -1
  172. package/dist/page-revisions-content-ChY-4f2V.cjs +0 -1
  173. package/dist/publish-pages-content-x-JuSFJ9.cjs +0 -1
  174. package/dist/rte-widget-modal-BaHIuEjF.cjs +0 -1
  175. package/dist/save-to-lib-Cgpxw8-g.cjs +0 -1
  176. package/dist/selected-block-display-BgRY82CT.cjs +0 -16
  177. package/dist/seo-panel-DfAb8U7W.cjs +0 -2
  178. package/dist/shared-json-ld-DzG398hr.cjs +0 -1
  179. package/dist/slug-input-C_ijLQ_X.cjs +0 -1
  180. package/dist/take-over-request-BNxcjY2j.cjs +0 -1
  181. package/dist/theme-panel-footer-Cq9pljro.cjs +0 -1
  182. package/dist/translation-warning-modal-BZAcwM2_.cjs +0 -1
  183. package/dist/unmark-as-template-EVvk0vmp.cjs +0 -1
  184. package/dist/unpublish-page-D4VwOlxc.js +0 -27
  185. package/dist/unpublish-page-bdSmwAVQ.cjs +0 -1
  186. package/dist/web-preview-Cio70gk5.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const T=require("./common-functions-B3a4xKt_.cjs"),e=require("lodash-es"),f=require("himalaya"),q=require("./core-Y0lXLwkq.cjs"),U=require("tailwind-merge"),m="#styles:",Y="__ADD_BLOCK_INTERNAL_ROOT",K="@",H="#",v="dt#",O=t=>{if(t=t.replace(m,""),!t)return{baseClasses:"",classes:""};const l=t.split(/,(?![^\[]*\])/);if(l.length===1)return{baseClasses:"",classes:l[0].trim()};const[n,...s]=l;return{baseClasses:n.trim(),classes:s.join(",").trim().replace(/ +(?= )/g,"")}};function X(t,l,n){const s=e.get(n,"i18nProps",[]);if(e.isEmpty(l)||e.isEmpty(s))return t;const a=e.cloneDeep(t);return e.forEach(e.keys(a),o=>{if(e.includes(s,o)&&!e.isEmpty(l)){const r=e.get(a,o),i=e.get(a,`${o}-${l}`,"");e.isString(r)?a[o]=e.isString(i)&&!e.isEmpty(i.trim())&&i.trimStart()||r:a[o]=e.isEmpty(i)?r:i}}),a}const M=(t,l)=>{const{baseClasses:n,classes:s}=O(t),o=s.split(" ").filter(i=>i.startsWith(v)).map(i=>{var d;return(d=l[i])==null?void 0:d.value}),r=s.split(" ").filter(i=>!i.startsWith(v)).join(" ");return U.twMerge.apply(null,[n,...o,r])};function G(t,l){return e.get(t,`${l}_attrs`,{})}function Z(t,l=!0,n={}){const s={};return Object.keys(t).forEach(a=>{if(e.isString(t[a])&&t[a].startsWith(m)){const o=M(t[a],n),r=G(t,a);s[a]={...!e.isEmpty(o)&&{className:o},...r,...l?{"data-style-prop":a,"data-block-parent":t._id,"data-style-id":`${a}-${t._id}`}:{}}}}),s}const Q=e.memoize(t=>{const l=q.getRegisteredChaiBlock(t),n=e.get(l,"schema.properties",{});return Object.fromEntries(Object.entries(n).filter(([,s])=>e.get(s,"runtime",!1)))}),ee=(t,l)=>{if(!e.isArray(t))return t;let n=t,s;return typeof l.limit=="number"&&l.limit>0&&(s=l.limit),s!==void 0&&(n=n.slice(0,s)),n},te=(t,l)=>{const n=e.cloneDeep(t);return e.forEach(e.keys(n),s=>{if(e.isString(n[s])&&!e.startsWith(s,"_")){let a=n[s];s==="repeaterItems"&&(n.repeaterItemsBinding=a);const o=/\{\{(.*?)\}\}/g,r=a.match(o);r&&r.forEach(i=>{let d=i.slice(2,-2);const c=e.get(l,d,i);a=e.isArray(c)?c:a.replace(i,c)}),n[s]=a}}),n},se=t=>{const l=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,n=/(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;return l.test(t)||n.test(t)},ne=t=>{if(e.isEmpty(t))return t;const l=/<video[^>]+src=['"]([^'">]+)['"]/,n=/<iframe[^>]+src=['"]([^'">]+)['"]/,s=t.match(l),a=t.match(n),o=s?s[1]:a?a[1]:null,r=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,i=/(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;return o&&(r.test(o)||i.test(o))?o:t},F=["chai-name","data-chai-name"],ae={img:{alt:"alt",width:"width",height:"height",src:"image"},video:{src:"url",autoplay:"controls.autoPlay",muted:"controls.muted",loop:"controls.loop",controls:"controls.widgets"},a:{href:"link.href",target:"link.target",type:""},input:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},textarea:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},select:{placeholder:"placeholder",required:"required",multiple:"multiple",name:"fieldName"},form:{action:"action"}},le=(t,l)=>{var n;return((n=t.children)==null?void 0:n.length)===1&&e.includes(["Heading","Paragraph","Span","ListItem","Button","Label","TableCell","Link","RichText"],l._type)},E=t=>t.map(l=>l.type==="text"?e.get(l,"content",""):e.isEmpty(l.children)?"":E(l.children||[])).join(""),B=t=>t===null?"":t,J=t=>{const l=e.compact(e.map(t.split(/\s+/),e.trim)),n=e.find(l,i=>/^w-/.test(i)),s=e.find(l,i=>/^h-/.test(i));if(!s||!n)return{height:"",width:""};const a=i=>{if(!i)return;const d=i.match(/^[wh]-(?:\[(.*?)\]|(.+))$/);if(!d)return;if(d[1])return d[1];const c=d[2];return/^\d+(\.\d+)?$/.test(c)?`${Number(c)*4}px`:c==="auto"||e.includes(c,"%")?c:"16px"},o=a(n),r=a(s);return{width:e.includes(o,"px")?o:"16px",height:e.includes(r,"px")?r:"16px"}},V=t=>{if(t.tagName==="svg")return{};const l={},n=ae[t.tagName||""]||{},s=t.attributes||[];return e.forEach(s,({key:a,value:o})=>{var r;if(!e.includes(F,a))if(a==="bid"&&(l._bid=B(o)),n[a]){if(t.tagName==="img"&&a==="src"&&!o.startsWith("http")){const i=e.find(t.attributes,{key:"width"}),d=e.find(t.attributes,{key:"height"});i&&d?o=`https://picsum.photos/${i==null?void 0:i.value}x${d==null?void 0:d.value}`:o="https://picsum.photos/150x150"}else if(t.tagName==="a"){const i=e.find(t.attributes,{key:"href"});i&&typeof(i==null?void 0:i.value)=="string"&&((r=i==null?void 0:i.value)!=null&&r.startsWith("pageType:"))&&e.set(l,"link.type","pageType")}e.set(l,n[a],B(o))}else e.includes(["style","class","srcset","bid"],a)||(l.styles_attrs=l.styles_attrs||{},e.startsWith(a,"@")&&(a=a.replace("@","x-on:")),l.styles_attrs[`${a}`]=B(o))}),delete l.class,l},oe=(t,l="styles")=>{if(!t.attributes)return{[l]:`${m},`};const n=e.find(t.attributes,{key:"class"});if(n){const s=n.value;return{[l]:`${m},${s}`}}return{[l]:`${m},`}},ie=t=>{const l=e.get(t,"attributes",[]),n=l.find(c=>c.key==="data-chai-richtext"||c.key==="chai-richtext"),s=l.find(c=>c.key==="data-chai-lightbox"||c.key==="chai-lightbox"),a=l.find(c=>c.key==="data-chai-dropdown"||c.key==="chai-dropdown"),o=l.find(c=>c.key==="data-chai-dropdown-button"||c.key==="chai-dropdown-button"),r=l.find(c=>c.key==="data-chai-dropdown-content"||c.key==="chai-dropdown-content"),i=l.find(c=>c.key==="class"),d=i&&i.value.split(/\s+/).includes("rte");if(a)return{_type:"Dropdown"};if(o)return{_type:"DropdownButton"};if(r)return{_type:"DropdownContent"};if(n||d)return{_type:"Paragraph"};if(s)return{_type:"LightBoxLink"};switch(t.tagName){case"img":return{_type:"Image"};case"input":return{_type:"Input",showLabel:!1};case"hr":return{_type:"Divider"};case"br":return{_type:"LineBreak"};case"textarea":return{_type:"TextArea",showLabel:!1};case"audio":return{_type:"Audio"};case"canvas":return{_type:"Canvas"};case"video":case"iframe":return{_type:"CustomHTML"};case"svg":return{_type:"Icon"};case"select":return{_type:"Select",options:[]};case"option":return{_type:"Option"};case"ul":case"ol":case"dl":return{_type:"List",tag:t.tagName,_listType:t.tagName==="ol"?"list-decimal":"list-none"};case"li":case"dt":return{_type:"ListItem",tag:t.tagName};case"span":case"figcaption":case"legend":return{_type:"Span",tag:t.tagName};case"p":return{_type:"Paragraph",content:""};case"a":return{_type:"Link"};case"form":return{_type:"Form"};case"label":return{_type:"Label"};case"button":return{_type:"Button"};case"code":return{_type:"Box",_name:"Code"};case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return{_type:"Heading",tag:t.tagName};case"table":return{_type:"Table"};case"tr":return{_type:"TableRow"};case"td":case"th":return{_type:"TableCell",tag:t.tagName};case"thead":return{_type:"TableHead"};case"tbody":return{_type:"TableBody"};case"tfoot":return{_type:"TableFooter"};default:{const c=e.get(t,"children",[]).length>0?"Box":"EmptyBox";return{_type:c,tag:t.tagName,_name:c=="EmptyBox"||t.tagName==="div"?c:e.capitalize(t.tagName)}}}},w=(t,l=null)=>e.flatMapDeep(t,n=>{var D,C,I,$,N,L,W,A,P,R;if(n.type==="comment")return[];let s={_id:T.generateUUID()};if(l&&(s._parent=l.block._id),n.type==="text")return e.isEmpty(e.get(n,"content",""))?[]:l&&le(l.node,l.block)?(e.set(l,"block.content",e.get(n,"content","")),[]):{...s,_type:"Text",content:e.get(n,"content","")};if(e.startsWith(n.tagName,"chai-")){const p=n.attributes||[],u=e.find(p,{key:"chai-type"}),y=(u==null?void 0:u.value)||e.startCase(e.camelCase(n.tagName||"")).replace(/ /g,"").replace(/\s+/g,"");s._type=y,e.forEach(p,({key:h,value:j})=>{if(h==="about-this-component"||h==="chai-type"||h==="can-move"||h==="can-delete")return;if(h==="id"){s._id=j;return}const z=e.startsWith(h,"_")?h:e.camelCase(h);let k=B(j);typeof k=="string"&&e.startsWith(k,"#styles:")&&(k=k.replace("#styles:","#styles:,")),s[z]=k});const g=w(n.children||[],{block:s,node:n});return[s,...g]}const a=e.get(n,"attributes",[]),o=n.tagName==="p"||a.find(p=>p.key==="data-chai-richtext"||p.key==="chai-richtext"),r=a.find(p=>p.key==="class"),i=r&&r.value.split(/\s+/).includes("rte"),d=a.find(p=>p.key==="data-chai-lightbox"||p.key==="chai-lightbox"),c=a.find(p=>p.key==="data-chai-dropdown"||p.key==="chai-dropdown"),b=a.find(p=>p.key==="data-chai-dropdown-button"||p.key==="chai-dropdown-button"),_=a.find(p=>p.key==="data-chai-dropdown-content"||p.key==="chai-dropdown-content");if(s={...s,...ie(n),...V(n),...oe(n)},n.attributes){const p=n.attributes.find(u=>e.includes(F,u.key));p&&(s._name=p.value)}if(o||i)return s.content=`<p>${f.stringify(n.children||[])}</p>`,e.has(s,"styles_attrs.data-chai-richtext")&&delete s.styles_attrs["data-chai-richtext"],e.has(s,"styles_attrs.chai-richtext")&&delete s.styles_attrs["chai-richtext"],[s];if(d){const p=["data-chai-lightbox","chai-lightbox","data-vbtype","data-autoplay","data-maxwidth","data-overlay","data-gall","href"];s={...s,href:((D=a.find(u=>u.key==="href"))==null?void 0:D.value)||"",hrefType:((C=a.find(u=>u.key==="data-vbtype"))==null?void 0:C.value)||"video",autoplay:((I=a.find(u=>u.key==="data-autoplay"))==null?void 0:I.value)==="true"?"true":"false",maxWidth:((N=($=a.find(u=>u.key==="data-maxwidth"))==null?void 0:$.value)==null?void 0:N.replace("px",""))||"",backdropColor:((L=a.find(u=>u.key==="data-overlay"))==null?void 0:L.value)||"",galleryName:((W=a.find(u=>u.key==="data-gall"))==null?void 0:W.value)||""},e.forEach(p,u=>{e.has(s,`styles_attrs.${u}`)&&delete s.styles_attrs[u]})}if(c&&(delete s.styles_attrs,s.showDropdown=!1),_&&delete s.styles_attrs,b){delete s.styles_attrs;const p=e.filter(n.children||[],y=>(y==null?void 0:y.tagName)!=="span");s.content=E(p);const u=e.find(n.children||[],y=>(y==null?void 0:y.tagName)==="span"&&e.some(y.children||[],g=>(g==null?void 0:g.tagName)==="svg"));if(u){const y=e.find(u.children||[],g=>(g==null?void 0:g.tagName)==="svg");if(y){s.icon=f.stringify([y]);const{height:g,width:h}=re(y,"16px","16px");s.iconHeight=g,s.iconWidth=h}}return[s]}if(s._type==="Input"){const p=s.inputType||"text";p==="checkbox"?e.set(s,"_type","Checkbox"):p==="radio"&&e.set(s,"_type","Radio")}else if(n.tagName==="video"||n.tagName==="iframe"){const p=f.stringify([n]);return se(p)&&(e.set(s,"_type","Video"),e.set(s,"url",ne(p)),e.set(s,"styles",`${m},`),e.set(s,"controls",{autoPlay:!1,muted:!0,loop:!1,controls:!1})),s.content=p,[s]}else if(n.tagName==="svg"){const p=e.get(e.find(n.attributes,{key:"class"}),"value",""),{height:u,width:y}=J(p);if(u&&y)s.styles=`${m}, ${T.cn(`w-${y} h-${u}`,p)}`.trim(),s.height=u==null?void 0:u.replace("px",""),s.width=y==null?void 0:y.replace("px","");else{const g=(A=e.find(n.attributes,{key:"height"}))==null?void 0:A.value,h=(P=e.find(n.attributes,{key:"width"}))==null?void 0:P.value;g&&h?(s.styles=`${m}, ${T.cn(`w-[${h}px] h-[${g}px]`,p)}`.trim(),s.height=g,s.width=h):s.styles=`${m}, ${T.cn("w-full h-full",p)}`.trim()}return n.attributes=e.filter(n.attributes,g=>!e.includes(["style","width","height","class"],g.key)),s.icon=f.stringify([n]),[s]}else if(n.tagName=="option"&&l&&((R=l.block)==null?void 0:R._type)==="Select")return l.block.options.push({label:E(n.children||[]),...V(n)}),[];const x=w(n.children||[],{block:s,node:n});return[s,...x]}),re=(t,l,n)=>{var d,c;const s=e.get(t,"attributes",[]),{height:a,width:o}=J(e.get(e.find(s,{key:"class"}),"value",""));if(a&&o)return{height:`[${a}px]`,width:`[${o}px]`};const r=(d=e.find(s,{key:"height"}))==null?void 0:d.value,i=(c=e.find(s,{key:"width"}))==null?void 0:c.value;return{height:r?`[${r}px]`:n,width:i?`[${i}px]`:l}},ce=t=>{t=t.replace(/(\w+)=\\?"(.*?)\\?"/g,(s,a,o)=>{let r=o.replace(/\\"/g,'"');return r=r.replace(/{([^}]+)}/g,i=>i.replace(/"/g,'\\"')),`${a}="${r.replace(/\\"/g,'"')}"`}),t=t.replace(/\\n/g,"").replace(/\\\\/g,"").replace(/\\([/<>])/g,"$1").replace(/\\./g,"").replace(/[\n\r\t\f\v]/g,""),t=t.replace(/\$name="[^"]*"/g,"");const l=t.match(/<body[^>]*>[\s\S]*?<\/body>/);return(l&&l.length>0?l[0].replace(/<body/,"<div").replace(/<\/body>/,"</div>"):t).replace(/\s+/g," ").replaceAll("> <","><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()},pe=t=>{const l=f.parse(ce(t));if(e.isEmpty(t))return[];const n=e.flatten(w(l));return q.syncBlocksWithDefaults(n)},ue=(t,l)=>t.map(n=>{const s=e.keys(n).filter(a=>e.isString(n[a])&&n[a].startsWith(m));return e.each(s,a=>{n[a]=`${m},${M(n[a],l)}`}),n}),de=t=>{const l=e.last(t);return t.map(n=>{const s=Object.keys(n);for(let a=0;a<s.length;a++)if(e.isString(n[s[a]])&&e.startsWith(s[a],"content")){const o=n===l?"":" ";n[s[a]]=`${n[s[a]].trim()}${o}`}return n})},S=(t,l,{index:n,key:s},a)=>{if(e.isString(t)){let o=t;const r=/\{\{(.*?)\}\}/g,i=t.match(r);if(i){const d=a==="image"||a==="mobileImage";i.forEach(c=>{let b=c.slice(2,-2).trim(),_=s.slice(2,-2).trim();n!==-1&&e.startsWith(b,"$index.")?b=`${_}.${n}.${b.slice(7)}`:n!==-1&&e.startsWith(b,"$index")&&(b=`${_}.${n}`);const x=e.get(l,b);x===void 0?o=o.replace(c,""):d&&!e.isArray(x)?o=x:o=e.isArray(x)?x:o.replace(c,x)})}return o}if(e.isArray(t))return t.map(o=>S(o,l,{index:n,key:s},a));if(t&&typeof t=="object"){const o={};return e.forEach(e.keys(t),r=>{!e.startsWith(r,"_")&&r!=="$repeaterItemsKey"?o[r]=S(t[r],l,{index:n,key:s},r):o[r]=t[r]}),o}return t},ye=(t,l,{index:n,key:s})=>{let a=e.cloneDeep(t);return a.repeaterItems&&(a.$repeaterItemsKey=a.repeaterItems,e.startsWith(a.repeaterItems,`{{${H}`)&&(a.$repeaterItemsKey=a.repeaterItems=`${a.repeaterItems.replace("}}",`/${a._id}}}`)}`),!e.isEmpty(a.repeaterItems)&&a.pagination&&(a.repeaterTotalItems=`${a.repeaterItems.replace("}}",`/${a._id}/totalItems}}`)}`)),S(a,l,{index:n,key:s})};exports.COLLECTION_PREFIX=H;exports.DESIGN_TOKEN_PREFIX=v;exports.REPEATER_PREFIX=K;exports.ROOT_TEMP_KEY=Y;exports.STYLES_KEY=m;exports.adjustSpacingInContentBlocks=de;exports.applyBindingToBlockProps=ye;exports.applyChaiDataBinding=te;exports.applyDesignTokens=ue;exports.applyLanguage=X;exports.applyLimit=ee;exports.getBlockRuntimeProps=Q;exports.getBlockTagAttributes=Z;exports.getBlocksFromHTML=pe;exports.getSplitChaiClasses=O;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { B as l } from "./index-Ct7ElCGK.js";
2
+ import { B as l } from "./register-chai-top-bar-ESJHs5s-.js";
3
3
  import m from "@monaco-editor/react";
4
4
  import { CheckIcon as h, CopyIcon as C, DownloadIcon as y } from "@radix-ui/react-icons";
5
5
  import { useState as s } from "react";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./register-chai-top-bar-BqwKw4uy.cjs"),m=require("@monaco-editor/react"),o=require("@radix-ui/react-icons"),r=require("react");function C({code:l,onCopy:d,language:s="javascript",onDownload:c,downloadText:u="Download"}){const[n,a]=r.useState(!1),[t,p]=r.useState(l),f=()=>{d(t),a(!0),setTimeout(()=>{a(!1)},2e3)},h=()=>{c(t)};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"h-[500px] max-h-full overflow-hidden rounded-md border py-2",children:e.jsx(m,{height:"100%",defaultLanguage:s,language:s,value:t,onChange:x=>p(x||""),theme:"vs-light",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"off",roundedSelection:!1,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,wordWrap:"on",bracketPairColorization:{enabled:!0},suggest:{showKeywords:!1,showSnippets:!1}}})}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(i.Button,{type:"button",variant:"outline",onClick:f,children:[n?e.jsx(o.CheckIcon,{className:"text-green-500"}):e.jsx(o.CopyIcon,{})," ",n?"Copied":"Copy"]}),e.jsxs(i.Button,{type:"button",onClick:h,children:[e.jsx(o.DownloadIcon,{})," ",u]})]})]})}exports.default=C;
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
- import { u as C, a as k, b as v, c as T, D as g, d as y, e as w, f as N, T as D } from "./index-Ct7ElCGK.js";
3
- import { useThrottledCallback as E } from "@react-hookz/web";
2
+ import { u as C, a as k, b as v, c as T, D as g, d as y, e as E, f as w, T as N } from "./index-rAcNbjk_.js";
3
+ import { useThrottledCallback as D } from "@react-hookz/web";
4
4
  import { useState as m, useCallback as H, useEffect as P } from "react";
5
5
  import { useTranslation as B } from "react-i18next";
6
6
  const u = (l) => {
@@ -8,33 +8,34 @@ const u = (l) => {
8
8
  return t.innerHTML = l, t.innerHTML;
9
9
  };
10
10
  function z() {
11
- const { t: l } = B(), [t, p] = m(!1), [n, f] = m(""), [e, r] = C(), [c] = k(), h = v(), x = T(), b = E(
11
+ const { t: l } = B(), [t, p] = m(!1), [n, f] = m(""), [e, r] = C(), [c] = k(), h = v(), x = T(), b = D(
12
12
  (s) => {
13
+ if (!e) return;
13
14
  const a = u(s);
14
15
  x([e.blockId], { [e.blockProp]: a });
15
16
  },
16
17
  [],
17
18
  300
18
19
  ), i = H(() => {
19
- if (t) {
20
+ if (t && e) {
20
21
  const s = u(n);
21
22
  h([e.blockId], { [e.blockProp]: s });
22
23
  }
23
- }, [t, n]);
24
+ }, [t, n, e]);
24
25
  return P(() => {
25
- c.includes(e == null ? void 0 : e.blockId) || (i(), r(null));
26
- }, [c]), /* @__PURE__ */ o(g, { open: !0, onOpenChange: () => {
26
+ e && !c.includes(e.blockId) && (i(), r(null));
27
+ }, [c, e]), /* @__PURE__ */ o(g, { open: !0, onOpenChange: () => {
27
28
  i(), r(null);
28
29
  }, children: /* @__PURE__ */ d(y, { className: "flex max-h-[400px] min-h-[200px] max-w-4xl flex-col border-gray-700 text-black", children: [
29
- /* @__PURE__ */ o(w, { className: "shrink-0 border-b border-gray-700 pb-3", children: /* @__PURE__ */ o(N, { className: "flex items-center justify-between text-black", children: /* @__PURE__ */ d("div", { className: "space-x-3 text-sm font-semibold", children: [
30
+ /* @__PURE__ */ o(E, { className: "shrink-0 border-b border-gray-700 pb-3", children: /* @__PURE__ */ o(w, { className: "flex items-center justify-between text-black", children: /* @__PURE__ */ d("div", { className: "space-x-3 text-sm font-semibold", children: [
30
31
  /* @__PURE__ */ o("span", { children: l("HTML Code Editor |") }),
31
32
  /* @__PURE__ */ o("span", { className: "text-xs text-gray-400", children: l("Scripts will be only executed in preview and live mode.") })
32
33
  ] }) }) }),
33
34
  /* @__PURE__ */ o("div", { className: "min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ o(
34
- D,
35
+ N,
35
36
  {
36
37
  className: "h-full w-full resize-none font-mono text-xs",
37
- value: n || e.initialCode,
38
+ value: e ? n || e.initialCode : "",
38
39
  onChange: (s) => {
39
40
  const a = s.target.value;
40
41
  p(!0), f(a), b(a);
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("./index-C99FhuF1.cjs"),k=require("@react-hookz/web"),c=require("react"),g=require("react-i18next"),x=l=>{const s=document.createElement("div");return s.innerHTML=l,s.innerHTML};function j(){const{t:l}=g.useTranslation(),[s,m]=c.useState(!1),[a,h]=c.useState(""),[e,i]=o.useCodeEditor(),[d]=o.useSelectedBlockIds(),p=o.useUpdateBlocksProps(),b=o.useUpdateBlocksPropsRealtime(),f=k.useThrottledCallback(n=>{if(!e)return;const r=x(n);b([e.blockId],{[e.blockProp]:r})},[],300),u=c.useCallback(()=>{if(s&&e){const n=x(a);p([e.blockId],{[e.blockProp]:n})}},[s,a,e]);c.useEffect(()=>{e&&!d.includes(e.blockId)&&(u(),i(null))},[d,e]);const C=()=>{u(),i(null)};return t.jsx(o.Dialog,{open:!0,onOpenChange:C,children:t.jsxs(o.DialogContent,{className:"flex max-h-[400px] min-h-[200px] max-w-4xl flex-col border-gray-700 text-black",children:[t.jsx(o.DialogHeader,{className:"shrink-0 border-b border-gray-700 pb-3",children:t.jsx(o.DialogTitle,{className:"flex items-center justify-between text-black",children:t.jsxs("div",{className:"space-x-3 text-sm font-semibold",children:[t.jsx("span",{children:l("HTML Code Editor |")}),t.jsx("span",{className:"text-xs text-gray-400",children:l("Scripts will be only executed in preview and live mode.")})]})})}),t.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:t.jsx(o.Textarea,{className:"h-full w-full resize-none font-mono text-xs",value:e?a||e.initialCode:"",onChange:n=>{const r=n.target.value;m(!0),h(r),f(r)},rows:10,placeholder:"Enter your code here..."})})]})})}exports.default=j;
@@ -1,24 +1,25 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { W as r, X as c, Y as o, Z as i, _ as l, B as d } from "./index-Ct7ElCGK.js";
3
- import { b as m, B as h } from "./index-ZuacEL1j.js";
2
+ import { B as r } from "./register-chai-top-bar-ESJHs5s-.js";
3
+ import { R as o, U as c, V as i, W as l, X as m } from "./index-rAcNbjk_.js";
4
+ import { b as d, B as h } from "./index-Dno42B0a.js";
4
5
  import { CheckCircle as u, Check as p } from "lucide-react";
5
6
  import { useTranslation as C } from "react-i18next";
6
- const k = () => {
7
- const { setPageLockMeta: s } = m(), { t: a } = C(), n = async () => {
7
+ const y = () => {
8
+ const { setPageLockMeta: s } = d(), { t: a } = C(), n = async () => {
8
9
  s({});
9
10
  };
10
- return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ t(r, { className: "mx-auto w-full max-w-md", children: [
11
- /* @__PURE__ */ e(c, { className: "space-y-1", children: /* @__PURE__ */ t(o, { className: "flex items-center gap-2 text-xl", children: [
11
+ return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ t(o, { className: "mx-auto w-full max-w-md", children: [
12
+ /* @__PURE__ */ e(c, { className: "space-y-1", children: /* @__PURE__ */ t(i, { className: "flex items-center gap-2 text-xl", children: [
12
13
  /* @__PURE__ */ e(u, { className: "h-6 w-6 text-green-500" }),
13
14
  a("You can edit the page now")
14
15
  ] }) }),
15
- /* @__PURE__ */ e(i, { className: "space-y-4", children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: a("This page is released by other user you can continue editing now") }) }),
16
- /* @__PURE__ */ e(l, { className: "flex gap-2", children: /* @__PURE__ */ t(d, { variant: "default", onClick: n, className: "flex-1 gap-2", children: [
16
+ /* @__PURE__ */ e(l, { className: "space-y-4", children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: a("This page is released by other user you can continue editing now") }) }),
17
+ /* @__PURE__ */ e(m, { className: "flex gap-2", children: /* @__PURE__ */ t(r, { variant: "default", onClick: n, className: "flex-1 gap-2", children: [
17
18
  /* @__PURE__ */ e(p, { className: "h-4 w-4" }),
18
19
  a("Continue Editing")
19
20
  ] }) })
20
21
  ] }) });
21
22
  };
22
23
  export {
23
- k as default
24
+ y as default
24
25
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./register-chai-top-bar-BqwKw4uy.cjs"),s=require("./index-C99FhuF1.cjs"),a=require("./index-C0-pgg_p.cjs"),n=require("lucide-react"),l=require("react-i18next"),o=()=>{const{setPageLockMeta:r}=a.usePageLockMeta(),{t}=l.useTranslation(),c=async()=>{r({})};return e.jsx(a.BlurContainer,{children:e.jsxs(s.Card,{className:"mx-auto w-full max-w-md",children:[e.jsx(s.CardHeader,{className:"space-y-1",children:e.jsxs(s.CardTitle,{className:"flex items-center gap-2 text-xl",children:[e.jsx(n.CheckCircle,{className:"h-6 w-6 text-green-500"}),t("You can edit the page now")]})}),e.jsx(s.CardContent,{className:"space-y-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:t("This page is released by other user you can continue editing now")})}),e.jsx(s.CardFooter,{className:"flex gap-2",children:e.jsxs(i.Button,{variant:"default",onClick:c,className:"flex-1 gap-2",children:[e.jsx(n.Check,{className:"h-4 w-4"}),t("Continue Editing")]})})]})})};exports.default=o;
@@ -0,0 +1,56 @@
1
+ import { get as c, each as g, has as u, set as o, cloneDeep as k, omitBy as f } from "lodash-es";
2
+ import { useMemo as h } from "react";
3
+ const s = {}, P = () => s, S = (e) => h(() => c(s, e, null), [e]), i = (e) => c(s, e, null), d = (e) => {
4
+ const t = c(s, `${e}.schema.properties`, {}), r = {};
5
+ return g(t, (n, l) => {
6
+ u(n, "block") || o(r, l, n.default);
7
+ }), r;
8
+ }, p = (e) => c(s, `${e}.i18nProps`, []), $ = (e) => c(s, `${e}.aiProps`, []), w = (e) => {
9
+ const t = i(e);
10
+ if (!t)
11
+ return null;
12
+ const r = k(t.schema), n = c(r, "properties", {}), l = f(n, (a) => (a == null ? void 0 : a.styles) === !0);
13
+ o(r, "properties", l);
14
+ const B = c(s, `${e}.uiSchema`, {});
15
+ return { schema: r, uiSchema: B };
16
+ }, D = (e) => e.map((t) => u(s, t._type) ? { ...d(t._type), ...t } : t), m = (e, t) => {
17
+ const r = c(s, t.type);
18
+ r ? o(s, t.type, { ...r, component: e, ...t }) : o(s, t.type, { component: e, ...t });
19
+ }, E = (e, t) => {
20
+ m(e, { ...t, category: t.category || "core" });
21
+ }, I = (e, t) => {
22
+ const r = c(s, t.type);
23
+ r ? o(s, t.type, { ...r, component: e, ...t }) : o(s, t.type, { component: e, ...t });
24
+ }, R = (e, t) => {
25
+ const r = i(e);
26
+ if (!r)
27
+ throw new Error(`Block ${e} not found`);
28
+ o(s, e, { ...r, dataProvider: t });
29
+ }, _ = (e, t) => {
30
+ const r = i(e);
31
+ if (!r)
32
+ throw new Error(`Block ${e} not found`);
33
+ o(s, e, { ...r, component: t });
34
+ }, v = (e, t) => ({
35
+ type: "null",
36
+ block: e,
37
+ prop: t,
38
+ default: null,
39
+ runtime: !0,
40
+ ui: { "ui:widget": "hidden" }
41
+ });
42
+ export {
43
+ w as a,
44
+ d as b,
45
+ v as c,
46
+ p as d,
47
+ i as e,
48
+ I as f,
49
+ $ as g,
50
+ _ as h,
51
+ D as i,
52
+ P as j,
53
+ E as r,
54
+ R as s,
55
+ S as u
56
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("lodash-es"),g=require("react"),o={},B=()=>o,k=e=>g.useMemo(()=>r.get(o,e,null),[e]),l=e=>r.get(o,e,null),u=e=>{const t=r.get(o,`${e}.schema.properties`,{}),s={};return r.each(t,(c,n)=>{r.has(c,"block")||r.set(s,n,c.default)}),s},h=e=>r.get(o,`${e}.i18nProps`,[]),d=e=>r.get(o,`${e}.aiProps`,[]),f=e=>{const t=l(e);if(!t)return null;const s=r.cloneDeep(t.schema),c=r.get(s,"properties",{}),n=r.omitBy(c,i=>(i==null?void 0:i.styles)===!0);r.set(s,"properties",n);const a=r.get(o,`${e}.uiSchema`,{});return{schema:s,uiSchema:a}},C=e=>e.map(t=>r.has(o,t._type)?{...u(t._type),...t}:t),P=(e,t)=>{const s=r.get(o,t.type);s?r.set(o,t.type,{...s,component:e,...t}):r.set(o,t.type,{component:e,...t})},m=(e,t)=>{P(e,{...t,category:t.category||"core"})},y=(e,t)=>{const s=r.get(o,t.type);s?r.set(o,t.type,{...s,component:e,...t}):r.set(o,t.type,{component:e,...t})},S=(e,t)=>{const s=l(e);if(!s)throw new Error(`Block ${e} not found`);r.set(o,e,{...s,dataProvider:t})},R=(e,t)=>{const s=l(e);if(!s)throw new Error(`Block ${e} not found`);r.set(o,e,{...s,component:t})},p=(e,t)=>({type:"null",block:e,prop:t,default:null,runtime:!0,ui:{"ui:widget":"hidden"}});exports.closestBlockProp=p;exports.getAIBlockProps=d;exports.getBlockFormSchemas=f;exports.getDefaultBlockProps=u;exports.getI18nBlockProps=h;exports.getRegisteredChaiBlock=l;exports.registerChaiBlock=m;exports.registerChaiServerBlock=y;exports.setChaiBlockComponent=R;exports.setChaiServerBlockDataProvider=S;exports.syncBlocksWithDefaults=C;exports.useRegisteredChaiBlock=k;exports.useRegisteredChaiBlocks=B;
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DF5DEvqb.cjs"),i=require("./common-functions-B3a4xKt_.cjs"),r=require("./apply-binding-KKp5PnpZ.cjs"),a=require("i18next");exports.ChaiAddBlocksDialog=e.AddBlocksDialog;exports.ChaiAddBlocksPanel=e.AddBlocksPanel;exports.ChaiAskAiUserPrompt=e.AIUserPrompt;exports.ChaiBlockAttributesEditor=e.BlockAttributesEditor;exports.ChaiBlockPropsEditor=e.BlockSettings;exports.ChaiBlockStyleEditor=e.BlockStyling;exports.ChaiBuilderCanvas=e.CanvasArea;exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.ChaiDarkModeSwitcher=e.DarkMode;exports.ChaiDefaultBlocks=e.DefaultChaiBlocks;exports.ChaiDraggableBlock=e.ChaiDraggableBlock;exports.ChaiExportCodeModal=e.ExportCodeModal;exports.ChaiImportHTML=e.ImportHTML;exports.ChaiOutline=e.ListTree;exports.ChaiScreenSizes=e.Breakpoints;exports.ChaiThemeConfigPanel=e.ThemeConfigPanel;exports.ChaiUILibrariesPanel=e.UILibrariesPanel;exports.ChaiUndoRedo=e.UndoRedo;exports.PERMISSIONS=e.PERMISSIONS;exports.getClassValueAndUnit=e.getClassValueAndUnit;exports.registerBlockSettingField=e.registerBlockSettingField;exports.registerBlockSettingTemplate=e.registerBlockSettingTemplate;exports.registerBlockSettingWidget=e.registerBlockSettingWidget;exports.registerChaiAddBlockTab=e.registerChaiAddBlockTab;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.useMediaManagerComponent=e.useMediaManagerComponent;exports.generateBlockId=i.generateUUID;exports.mergeClasses=i.cn;exports.convertHTMLToChaiBlocks=r.getBlocksFromHTML;exports.getBlocksFromHTML=r.getBlocksFromHTML;exports.i18n=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-C99FhuF1.cjs"),r=require("./common-functions-B3a4xKt_.cjs"),a=require("./apply-binding-IsUf6UWJ.cjs");require("lodash-es");const i=require("./register-chai-top-bar-BqwKw4uy.cjs"),t=require("i18next");exports.ChaiAddBlocksDialog=e.AddBlocksDialog;exports.ChaiAddBlocksPanel=e.AddBlocksPanel;exports.ChaiAskAiUserPrompt=e.AIUserPrompt;exports.ChaiBlockAttributesEditor=e.BlockAttributesEditor;exports.ChaiBlockPropsEditor=e.BlockSettings;exports.ChaiBlockStyleEditor=e.BlockStyling;exports.ChaiBuilderCanvas=e.CanvasArea;exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.ChaiDarkModeSwitcher=e.DarkMode;exports.ChaiDefaultBlocks=e.DefaultChaiBlocks;exports.ChaiDraggableBlock=e.ChaiDraggableBlock;exports.ChaiExportCodeModal=e.ExportCodeModal;exports.ChaiImportHTML=e.ImportHTML;exports.ChaiOutline=e.ListTree;exports.ChaiScreenSizes=e.Breakpoints;exports.ChaiThemeConfigPanel=e.ThemeConfigPanel;exports.ChaiUILibrariesPanel=e.UILibrariesPanel;exports.ChaiUndoRedo=e.UndoRedo;exports.PERMISSIONS=e.PERMISSIONS;exports.getClassValueAndUnit=e.getClassValueAndUnit;exports.generateBlockId=r.generateUUID;exports.mergeClasses=r.cn;exports.convertHTMLToChaiBlocks=a.getBlocksFromHTML;exports.getBlocksFromHTML=a.getBlocksFromHTML;exports.registerBlockSettingField=i.registerBlockSettingField;exports.registerBlockSettingTemplate=i.registerBlockSettingTemplate;exports.registerBlockSettingWidget=i.registerBlockSettingWidget;exports.registerChaiAddBlockTab=i.registerChaiAddBlockTab;exports.registerChaiLibrary=i.registerChaiLibrary;exports.registerChaiMediaManager=i.registerChaiMediaManager;exports.registerChaiPreImportHTMLHook=i.registerChaiPreImportHTMLHook;exports.registerChaiSaveToLibrary=i.registerChaiSaveToLibrary;exports.registerChaiSidebarPanel=i.registerChaiSidebarPanel;exports.registerChaiTopBar=i.registerChaiTopBar;exports.useMediaManagerComponent=i.useMediaManagerComponent;exports.i18n=t;
package/dist/core.d.ts CHANGED
@@ -66,7 +66,7 @@ export declare type ChaiBlock<T = Record<string, any>> = {
66
66
  declare type ChaiBlock_2<T = Record<string, any>> = {
67
67
  _id: string;
68
68
  _name?: string;
69
- _parent?: string;
69
+ _parent?: string | null | undefined;
70
70
  _libBlock?: string;
71
71
  _type: string;
72
72
  partialBlockId?: string;
@@ -80,7 +80,7 @@ export declare const ChaiBlockAttributesEditor: React_2.MemoExoticComponent<() =
80
80
  */
81
81
  export declare function ChaiBlockPropsEditor(): JSX.Element;
82
82
 
83
- export declare function ChaiBlockStyleEditor(): JSX.Element;
83
+ export declare function ChaiBlockStyleEditor(): JSX.Element | null;
84
84
 
85
85
  export declare const ChaiBuilderCanvas: default_2.FC;
86
86
 
@@ -111,7 +111,7 @@ export declare interface ChaiBuilderEditorProps {
111
111
  /**
112
112
  * Permissions
113
113
  */
114
- permissions?: string[];
114
+ permissions?: string[] | null;
115
115
  /**
116
116
  * Optional pageId. If not provided, a random pageId will be generated
117
117
  */
package/dist/core.js CHANGED
@@ -1,42 +1,44 @@
1
- import { b6 as s, aW as i, b2 as r, b7 as o, aX as t, aY as l, aZ as C, aT as h, b4 as g, b8 as b, b9 as d, ba as n, a_ as c, a$ as k, b3 as B, b0 as S, b1 as m, b5 as p, an as M, bb as T, bd as P, be as f, bf as u, bc as A, aO as L, aR as E, bg as I, aS as x, aP as H, aU as U, bh as D } from "./index-Ct7ElCGK.js";
2
- import { g as y, c as O } from "./common-functions-D2lMFR6K.js";
3
- import { g as F, g as W } from "./apply-binding-6iwlED02.js";
4
- import { default as z } from "i18next";
1
+ import { aW as r, aK as s, aS as o, aX as t, aL as l, aM as C, aN as h, aI as g, aU as d, aY as n, aZ as c, a_ as k, aO as B, aP as m, aT as p, aQ as S, aR as M, aV as T, aj as P, a$ as b } from "./index-rAcNbjk_.js";
2
+ import { g as u, c as L } from "./common-functions-D2lMFR6K.js";
3
+ import { g as A, g as I } from "./apply-binding-BvWfJCSZ.js";
4
+ import "lodash-es";
5
+ import { a as H, b as U, r as v, c as D, j as y, m as O, p as R, q as j, v as F, x as N, n as V } from "./register-chai-top-bar-ESJHs5s-.js";
6
+ import { default as q } from "i18next";
5
7
  export {
6
- s as ChaiAddBlocksDialog,
7
- i as ChaiAddBlocksPanel,
8
- r as ChaiAskAiUserPrompt,
9
- o as ChaiBlockAttributesEditor,
10
- t as ChaiBlockPropsEditor,
11
- l as ChaiBlockStyleEditor,
12
- C as ChaiBuilderCanvas,
13
- h as ChaiBuilderEditor,
14
- g as ChaiDarkModeSwitcher,
15
- b as ChaiDefaultBlocks,
16
- d as ChaiDraggableBlock,
17
- n as ChaiExportCodeModal,
18
- c as ChaiImportHTML,
19
- k as ChaiOutline,
20
- B as ChaiScreenSizes,
8
+ r as ChaiAddBlocksDialog,
9
+ s as ChaiAddBlocksPanel,
10
+ o as ChaiAskAiUserPrompt,
11
+ t as ChaiBlockAttributesEditor,
12
+ l as ChaiBlockPropsEditor,
13
+ C as ChaiBlockStyleEditor,
14
+ h as ChaiBuilderCanvas,
15
+ g as ChaiBuilderEditor,
16
+ d as ChaiDarkModeSwitcher,
17
+ n as ChaiDefaultBlocks,
18
+ c as ChaiDraggableBlock,
19
+ k as ChaiExportCodeModal,
20
+ B as ChaiImportHTML,
21
+ m as ChaiOutline,
22
+ p as ChaiScreenSizes,
21
23
  S as ChaiThemeConfigPanel,
22
- m as ChaiUILibrariesPanel,
23
- p as ChaiUndoRedo,
24
- M as PERMISSIONS,
25
- F as convertHTMLToChaiBlocks,
26
- y as generateBlockId,
27
- W as getBlocksFromHTML,
28
- T as getClassValueAndUnit,
29
- z as i18n,
30
- O as mergeClasses,
31
- P as registerBlockSettingField,
32
- f as registerBlockSettingTemplate,
33
- u as registerBlockSettingWidget,
34
- A as registerChaiAddBlockTab,
35
- L as registerChaiLibrary,
36
- E as registerChaiMediaManager,
37
- I as registerChaiPreImportHTMLHook,
38
- x as registerChaiSaveToLibrary,
39
- H as registerChaiSidebarPanel,
40
- U as registerChaiTopBar,
41
- D as useMediaManagerComponent
24
+ M as ChaiUILibrariesPanel,
25
+ T as ChaiUndoRedo,
26
+ P as PERMISSIONS,
27
+ A as convertHTMLToChaiBlocks,
28
+ u as generateBlockId,
29
+ I as getBlocksFromHTML,
30
+ b as getClassValueAndUnit,
31
+ q as i18n,
32
+ L as mergeClasses,
33
+ H as registerBlockSettingField,
34
+ U as registerBlockSettingTemplate,
35
+ v as registerBlockSettingWidget,
36
+ D as registerChaiAddBlockTab,
37
+ y as registerChaiLibrary,
38
+ O as registerChaiMediaManager,
39
+ R as registerChaiPreImportHTMLHook,
40
+ j as registerChaiSaveToLibrary,
41
+ F as registerChaiSidebarPanel,
42
+ N as registerChaiTopBar,
43
+ V as useMediaManagerComponent
42
44
  };
@@ -1,5 +1,7 @@
1
1
  import { jsx as i, jsxs as u } from "react/jsx-runtime";
2
- import { D as T, d as V, e as N, f as R, p as E, B as y, L as D, T as I, q as A } from "./index-Ct7ElCGK.js";
2
+ import { B as y } from "./register-chai-top-bar-ESJHs5s-.js";
3
+ import { D as T, d as V, e as N, f as R, p as E, L as D, T as I, q as A } from "./index-rAcNbjk_.js";
4
+ import "lodash-es";
3
5
  import * as b from "culori";
4
6
  import { a as L } from "./fonts-DRly3Wzd.js";
5
7
  import * as x from "react";
@@ -213,7 +215,7 @@ const d = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", H = (o) => `hsl(${d(o
213
215
  --foreground: hsl(37.50 36.36% 95.69%);
214
216
  --primary: rgb(46, 125, 50);
215
217
  --primary-foreground: #ffffff;
216
- }`, Z = ({ open: o, onOpenChange: e, onImport: s }) => {
218
+ }`, Q = ({ open: o, onOpenChange: e, onImport: s }) => {
217
219
  const [r, t] = x.useState(""), [l, n] = x.useState(null), [m, h] = x.useState(!1), { t: a } = P(), p = async () => {
218
220
  h(!0), n(null);
219
221
  try {
@@ -301,5 +303,5 @@ const d = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", H = (o) => `hsl(${d(o
301
303
  ] }) });
302
304
  };
303
305
  export {
304
- Z as CssImportModal
306
+ Q as CssImportModal
305
307
  };
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("./register-chai-top-bar-BqwKw4uy.cjs"),f=require("./index-C99FhuF1.cjs");require("lodash-es");const T=require("culori"),V=require("./fonts-B-Xt29pe.cjs"),N=require("react"),R=require("react-i18next");function j(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const b=j(T),C=j(N),d=e=>e?e%1===0?e:e.toFixed(4):"0",q=e=>`hsl(${d(e.h)} ${d(e.s*100)}% ${d(e.l*100)}%)`,E=(e,o="hsl",t="4")=>{try{const r=b.parse(e);if(!r)throw new Error("Invalid color input");switch(o){case"hsl":{const s=b.converter("hsl")(r);return t==="4"?q(s):`${d(s.h)} ${d(s.s*100)}% ${d(s.l*100)}%`}case"rgb":return b.formatRgb(r);case"oklch":{const s=b.converter("oklch")(r);return`oklch(${d(s.l)} ${d(s.c)} ${d(s.h)})`}case"hex":return b.formatHex(r);default:return e}}catch(r){return console.error(`Failed to convert color: ${e}`,r),e}},x=e=>E(e,"hex"),I=e=>{const o={fontFamily:{heading:"",body:""},borderRadius:"",colors:{}};try{const t=w(e);if(!t.isValid)return console.warn("CSS validation failed:",t.error),$();const r=v(e,":root"),s=v(e,".dark"),c=u(r,"--font-sans")||u(r,"--font-family")||u(r,"--font-heading")||u(r,"--font-body"),a=D(c);o.fontFamily={heading:a,body:a};const h=u(r,"--radius")||u(r,"--border-radius")||"0.5rem";o.borderRadius=P(h),["background","foreground","primary","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","accent","accent-foreground","destructive","destructive-foreground","border","input","ring","card","card-foreground","popover","popover-foreground"].forEach(i=>{const p=u(r,`--${i}`),g=u(s,`--${i}`);if(p||g){const l=p?k(p):"#000000",S=g?k(g):l;o.colors[i]=[l,S]}})}catch(t){return console.error("Error parsing CSS to ChaiThemeValues:",t),$()}return o},v=(e,o)=>{var r,s;const t=new RegExp(`${F(o)}\\s*{([^}]+)}`);return((s=(r=e.match(t))==null?void 0:r[1])==null?void 0:s.trim())||null},u=(e,o)=>{var s;if(!e)return null;const t=new RegExp(`${F(o)}\\s*:\\s*([^;]+)`),r=e.match(t);return((s=r==null?void 0:r[1])==null?void 0:s.trim())||null},k=e=>{if(!e||typeof e!="string")return"#000000";try{const o=e.replace(/var\([^)]+\)/g,"").trim();if(!o)return"#000000";if(/^[a-z]+$/i.test(o))return x(o)||"#000000";if(/^#?([0-9A-F]{3,4}|[0-9A-F]{6}|[0-9A-F]{8})$/i.test(o.replace(/#/g,""))){const r=o.startsWith("#")?o:`#${o}`;return r.length<=5?`#${r.slice(1).split("").map(s=>s+s).join("")}`.slice(0,7):r.length>7?r.slice(0,7):r}if(/^(rgb|hsl|oklch)a?\(/i.test(o))return x(o)||"#000000";const t=o.match(/^(\d+\.?\d*)\s+(\d+\.?\d*)%\s+(\d+\.?\d*)%$/);if(t){const[,r,s,c]=t,a=`hsl(${r} ${s}% ${c}%)`;return x(a)||"#000000"}if(/^[\d.]+[\s,]+[\d.]+[\s,]+[\d.]+(?:[\s,/]+[\d.]+)?$/.test(o)){const r=o.split(/[\s,]+/).filter(Boolean);if(r.length>=3){const c=r.some(a=>a.includes("%"))?`hsl(${r[0]} ${r[1]} ${r[2]})`:`rgb(${r[0]}, ${r[1]}, ${r[2]})`;return x(c)||"#000000"}}return x(o)||"#000000"}catch(o){return console.warn("Failed to process color:",e,o),"#000000"}},D=e=>{const o=V.getAllRegisteredFonts();if(!e)return"ui-sans-serif, system-ui, sans-serif";try{const r=e.replace(/["']/g,"").trim().split(",")[0].trim(),s=o.find(c=>c.family.toLowerCase()===r.toLowerCase());return(s==null?void 0:s.family)||"ui-sans-serif, system-ui, sans-serif"}catch(t){return console.warn("Error processing font family:",e,t),"ui-sans-serif, system-ui, sans-serif"}},P=e=>{try{const o=e.trim();if(o.endsWith("px"))return o;if(o.endsWith("rem")){const r=parseFloat(o.replace("rem",""));if(!isNaN(r))return`${Math.round(r*16)}px`}if(o.endsWith("em")){const r=parseFloat(o.replace("em",""));if(!isNaN(r))return`${Math.round(r*16)}px`}const t=parseFloat(o);return isNaN(t)?"8px":`${Math.round(t)}px`}catch(o){return console.warn("Error converting border radius to px:",e,o),"8px"}},$=()=>({fontFamily:{heading:"ui-sans-serif, system-ui, sans-serif",body:"ui-sans-serif, system-ui, sans-serif"},borderRadius:"8px",colors:{background:["#ffffff","#000000"],foreground:["#000000","#ffffff"],primary:["#3b82f6","#60a5fa"],"primary-foreground":["#ffffff","#1e293b"],secondary:["#f1f5f9","#334155"],"secondary-foreground":["#0f172a","#f8fafc"],muted:["#f8fafc","#1e293b"],"muted-foreground":["#64748b","#94a3b8"],accent:["#f1f5f9","#334155"],"accent-foreground":["#0f172a","#f8fafc"],destructive:["#ef4444","#f87171"],"destructive-foreground":["#ffffff","#1e293b"],border:["#e2e8f0","#475569"],input:["#e2e8f0","#475569"],ring:["#3b82f6","#60a5fa"],card:["#ffffff","#0f172a"],"card-foreground":["#000000","#f8fafc"],popover:["#ffffff","#0f172a"],"popover-foreground":["#000000","#f8fafc"]}}),F=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),B=e=>["background","foreground","primary","primary-foreground"].every(r=>e.colors[r]&&Array.isArray(e.colors[r])&&e.colors[r].length>=2)&&!!e.fontFamily.heading&&!!e.fontFamily.body&&!!e.borderRadius,w=e=>{if(!e||typeof e!="string")return{isValid:!1,error:"Please enter valid CSS content"};const o=e.trim();if(!o)return{isValid:!1,error:"Please enter CSS content"};try{if(!o.includes("{")||!o.includes("}"))return{isValid:!1,error:"Invalid CSS format. CSS should contain proper block structure with { }"};const t=(o.match(/{/g)||[]).length,r=(o.match(/}/g)||[]).length;return t!==r?{isValid:!1,error:"Invalid CSS format. Unmatched braces detected"}:!o.includes("--")||!o.includes(":")?{isValid:!1,error:"Invalid CSS format. CSS should contain variable definitions like --primary: #color"}:!o.includes(":root")&&!o.includes(".dark")?{isValid:!1,error:"CSS should contain at least :root or .dark selector with theme variables"}:{isValid:!0}}catch(t){return console.error("CSS validation error:",t),{isValid:!1,error:"Failed to parse CSS. Please check your syntax."}}},M=`:root {
2
+ --background: 0 0% 100%;
3
+ --foreground: oklch(0.52 0.13 144.17);
4
+ --primary: #3e2723;
5
+ --primary-foreground: #ffffff;
6
+ }
7
+
8
+ .dark {
9
+ --background: 222.2 84% 4.9%;
10
+ --foreground: hsl(37.50 36.36% 95.69%);
11
+ --primary: rgb(46, 125, 50);
12
+ --primary-foreground: #ffffff;
13
+ }`,_=({open:e,onOpenChange:o,onImport:t})=>{const[r,s]=C.useState(""),[c,a]=C.useState(null),[h,m]=C.useState(!1),{t:i}=R.useTranslation(),p=async()=>{m(!0),a(null);try{const l=w(r);if(!l.isValid){a(l.error||i("Invalid CSS format")),setTimeout(()=>{a(null)},5e3),m(!1);return}const S=I(r);if(!B(S)){a(i("The CSS doesn't contain enough theme information. Please ensure it includes at least background, foreground, primary, and primary-foreground colors.")),setTimeout(()=>{a(null)},5e3),m(!1);return}t(S),s(""),a(null),o(!1)}catch(l){console.error("Error importing CSS:",l),a(i("Failed to parse CSS. Please check your syntax and try again.")),setTimeout(()=>{a(null)},5e3)}finally{m(!1)}},g=()=>{s(""),a(null),o(!1)};return n.jsx(f.Dialog,{open:e,onOpenChange:o,children:n.jsxs(f.DialogContent,{className:"flex max-h-[80vh] max-w-2xl flex-col",children:[n.jsxs(f.DialogHeader,{children:[n.jsx(f.DialogTitle,{children:i("Import CSS Theme")}),n.jsxs(f.DialogDescription,{className:"space-y-2",children:[n.jsx("p",{children:i("Paste your CSS variables to import a custom theme. The CSS should contain :root and .dark blocks with CSS custom properties.")}),n.jsxs("div",{className:"flex items-center",children:[n.jsx("p",{className:"font-bold",children:"Get theme resources:"}),n.jsx(y.Button,{variant:"link",size:"sm",onClick:()=>window.open("https://tweakcn.com/","_blank"),children:"TweakCN"}),n.jsx(y.Button,{variant:"link",size:"sm",onClick:()=>window.open("https://ui.shadcn.com/themes#themes","_blank"),children:"shadcn/ui Themes"}),n.jsx(y.Button,{variant:"link",size:"sm",onClick:()=>window.open("https://zippystarter.com/tools/shadcn-ui-theme-generator","_blank"),children:"ZippyStarter"})]})]})]}),n.jsxs("div",{className:"flex-1 space-y-4 overflow-hidden",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(f.Label,{htmlFor:"css-input",children:i("CSS Variables")}),n.jsx(f.Textarea,{id:"css-input",placeholder:M,value:r,onChange:l=>s(l.target.value),className:"min-h-[300px] resize-none font-mono text-sm",disabled:h})]}),c&&n.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3",children:n.jsx("p",{className:"text-sm text-red-600",children:c})})]}),n.jsxs(f.DialogFooter,{className:"gap-2",children:[n.jsx(y.Button,{variant:"outline",onClick:g,disabled:h,children:i("Cancel")}),n.jsx(y.Button,{onClick:p,disabled:!r.trim()||h,children:i(h?"Importing...":"Import Theme")})]})]})})};exports.CssImportModal=_;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-DF5DEvqb.cjs"),i=require("react-i18next"),a=({tokenName:r,tokenValue:l,onDelete:n,children:o})=>{const{t:s}=i.useTranslation();return e.jsxs(t.AlertDialog,{children:[e.jsx(t.AlertDialogTrigger,{asChild:!0,children:o}),e.jsxs(t.AlertDialogContent,{className:"max-w-md",children:[e.jsxs(t.AlertDialogHeader,{children:[e.jsxs(t.AlertDialogTitle,{className:"text-base",children:[s("Delete"),' "',r,'"?']}),e.jsx(t.AlertDialogDescription,{asChild:!0,children:e.jsxs("div",{className:"space-y-3 pt-1 text-sm",children:[e.jsx("p",{className:"text-muted-foreground",children:s("This action cannot be undone. This will permanently remove the design token from your project.")}),e.jsxs("div",{className:"rounded-md border bg-muted/50 p-3",children:[e.jsx("p",{className:"mb-1 text-xs font-medium text-foreground",children:s("Token classes")}),e.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:l})]})]})})]}),e.jsxs(t.AlertDialogFooter,{children:[e.jsx(t.AlertDialogCancel,{className:"h-7 text-xs",children:s("Cancel")}),e.jsx(t.AlertDialogAction,{onClick:n,className:"h-7 bg-destructive text-xs text-destructive-foreground hover:bg-destructive/90",children:s("Delete")})]})]})]})};exports.default=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-C99FhuF1.cjs"),i=require("react-i18next"),a=({tokenName:r,tokenValue:l,onDelete:n,children:o})=>{const{t:s}=i.useTranslation();return e.jsxs(t.AlertDialog,{children:[e.jsx(t.AlertDialogTrigger,{asChild:!0,children:o}),e.jsxs(t.AlertDialogContent,{className:"max-w-md",children:[e.jsxs(t.AlertDialogHeader,{children:[e.jsxs(t.AlertDialogTitle,{className:"text-base",children:[s("Delete"),' "',r,'"?']}),e.jsx(t.AlertDialogDescription,{asChild:!0,children:e.jsxs("div",{className:"space-y-3 pt-1 text-sm",children:[e.jsx("p",{className:"text-muted-foreground",children:s("This action cannot be undone. This will permanently remove the design token from your project.")}),e.jsxs("div",{className:"rounded-md border bg-muted/50 p-3",children:[e.jsx("p",{className:"mb-1 text-xs font-medium text-foreground",children:s("Token classes")}),e.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:l})]})]})})]}),e.jsxs(t.AlertDialogFooter,{children:[e.jsx(t.AlertDialogCancel,{className:"h-7 text-xs",children:s("Cancel")}),e.jsx(t.AlertDialogAction,{onClick:n,className:"h-7 bg-destructive text-xs text-destructive-foreground hover:bg-destructive/90",children:s("Delete")})]})]})]})};exports.default=a;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
- import { G as i, H as n, J as c, K as d, M as m, O as h, Q as g, R as u, U as x } from "./index-Ct7ElCGK.js";
2
+ import { E as i, F as n, G as c, H as d, I as m, J as h, K as g, M as u, O as x } from "./index-rAcNbjk_.js";
3
3
  import { useTranslation as D } from "react-i18next";
4
4
  const N = ({ tokenName: l, tokenValue: s, onDelete: a, children: o }) => {
5
5
  const { t: r } = D();
@@ -1,6 +1,7 @@
1
1
  import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
- import { n as N, o as A, D as E, d as b, e as k, f as U, p as B, q as G, B as v } from "./index-Ct7ElCGK.js";
3
- import { c as R, o as W, m as q, g as F, l as H, L as M } from "./index-ZuacEL1j.js";
2
+ import { B as v } from "./register-chai-top-bar-ESJHs5s-.js";
3
+ import { n as N, o as A, D as E, d as b, e as k, f as U, p as B, q as G } from "./index-rAcNbjk_.js";
4
+ import { c as R, o as W, m as q, g as F, l as H, L as M } from "./index-Dno42B0a.js";
4
5
  import { get as Q } from "lodash-es";
5
6
  import { useMemo as w } from "react";
6
7
  import { useTranslation as $ } from "react-i18next";
@@ -12,20 +13,20 @@ const P = (e, r) => {
12
13
  d += P(c.id, r);
13
14
  }), d;
14
15
  };
15
- function X({ page: e, onClose: r }) {
16
- const { t } = $(), [, d] = R(), { mutate: c, isPending: h } = W(), { data: f } = q(), { data: m = [] } = F(), { setSelectedLang: S, fallbackLang: x } = N(), [, L] = A(), l = !(e != null && e.primaryPage), { data: s = [] } = H(l ? e == null ? void 0 : e.id : void 0), D = w(() => !l || !s ? 0 : s.filter((o) => o.id !== (e == null ? void 0 : e.id)).length, [l, s, e == null ? void 0 : e.id]), u = w(() => {
16
+ function Y({ page: e, onClose: r }) {
17
+ const { t } = $(), [, d] = R(), { mutate: c, isPending: h } = W(), { data: f } = q(), { data: m = [] } = F(), { setSelectedLang: S, fallbackLang: x } = N(), [, L] = A(), l = !(e != null && e.primaryPage), { data: s = [] } = H(l ? e == null ? void 0 : e.id : void 0), D = w(() => !l || !s ? 0 : s.filter((a) => a.id !== (e == null ? void 0 : e.id)).length, [l, s, e == null ? void 0 : e.id]), u = w(() => {
17
18
  if (!(e != null && e.id) || !m.length) return 0;
18
- let o = P(e.id, m);
19
+ let a = P(e.id, m);
19
20
  return l && s && s.length > 0 && s.forEach((y) => {
20
- y.id !== e.id && (o += P(y.id, m));
21
- }), o;
21
+ y.id !== e.id && (a += P(y.id, m));
22
+ }), a;
22
23
  }, [e == null ? void 0 : e.id, m, l, s]), C = () => {
23
24
  h || c(e, {
24
25
  onSuccess: () => {
25
26
  e != null && e.primaryPage ? (window.history.replaceState({}, "", `/?page=${e.primaryPage}`), d(new URLSearchParams({ page: e.primaryPage }))) : (window.history.replaceState({}, "", "/"), d(new URLSearchParams())), window.dispatchEvent(new PopStateEvent("popstate")), S(x), L("outline"), r();
26
27
  }
27
28
  });
28
- }, a = f == null ? void 0 : f.find((o) => o.key === (e == null ? void 0 : e.pageType));
29
+ }, o = f == null ? void 0 : f.find((a) => a.key === (e == null ? void 0 : e.pageType));
29
30
  return /* @__PURE__ */ i(E, { open: !!e, onOpenChange: r, children: /* @__PURE__ */ n(b, { children: [
30
31
  /* @__PURE__ */ n(k, { children: [
31
32
  /* @__PURE__ */ i(U, { children: t("Confirm Deletion") }),
@@ -35,7 +36,7 @@ function X({ page: e, onClose: r }) {
35
36
  " ",
36
37
  /* @__PURE__ */ i("b", { children: (e == null ? void 0 : e.name) ?? (e == null ? void 0 : e.slug) }),
37
38
  " ",
38
- a != null && a.hasSlug ? (a == null ? void 0 : a.name) + "?" : t("page?")
39
+ o != null && o.hasSlug ? (o == null ? void 0 : o.name) + "?" : t("page?")
39
40
  ] }),
40
41
  l && (D > 0 || u > 0) && /* @__PURE__ */ n("div", { className: "mt-3 rounded-md bg-red-50 p-3 text-sm", children: [
41
42
  /* @__PURE__ */ n("div", { className: "font-semibold text-red-800", children: [
@@ -66,5 +67,5 @@ function X({ page: e, onClose: r }) {
66
67
  ] }) });
67
68
  }
68
69
  export {
69
- X as default
70
+ Y as default
70
71
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),D=require("./register-chai-top-bar-BqwKw4uy.cjs"),n=require("./index-C99FhuF1.cjs"),o=require("./index-C0-pgg_p.cjs"),N=require("lodash-es"),v=require("react"),q=require("react-i18next"),f=(e,r)=>{const s=r.filter(u=>u.parent===e);if(s.length===0)return 0;let a=s.length;return s.forEach(u=>{a+=f(u.id,r)}),a};function A({page:e,onClose:r}){const{t:s}=q.useTranslation(),[,a]=o.useSearchParams(),{mutate:u,isPending:x}=o.useDeletePage(),{data:P}=o.usePageTypes(),{data:h=[]}=o.useWebsitePages(),{setSelectedLang:S,fallbackLang:w}=n.useLanguages(),[,C]=n.useSidebarActivePanel(),l=!(e!=null&&e.primaryPage),{data:i=[]}=o.useLanguagePages(l?e==null?void 0:e.id:void 0),j=v.useMemo(()=>!l||!i?0:i.filter(d=>d.id!==(e==null?void 0:e.id)).length,[l,i,e==null?void 0:e.id]),m=v.useMemo(()=>{if(!(e!=null&&e.id)||!h.length)return 0;let d=f(e.id,h);return l&&i&&i.length>0&&i.forEach(y=>{y.id!==e.id&&(d+=f(y.id,h))}),d},[e==null?void 0:e.id,h,l,i]),L=()=>{x||u(e,{onSuccess:()=>{e!=null&&e.primaryPage?(window.history.replaceState({},"",`/?page=${e.primaryPage}`),a(new URLSearchParams({page:e.primaryPage}))):(window.history.replaceState({},"","/"),a(new URLSearchParams)),window.dispatchEvent(new PopStateEvent("popstate")),S(w),C("outline"),r()}})},c=P==null?void 0:P.find(d=>d.key===(e==null?void 0:e.pageType));return t.jsx(n.Dialog,{open:!!e,onOpenChange:r,children:t.jsxs(n.DialogContent,{children:[t.jsxs(n.DialogHeader,{children:[t.jsx(n.DialogTitle,{children:s("Confirm Deletion")}),t.jsxs(n.DialogDescription,{className:"py-4 text-slate-500",children:[t.jsxs("div",{children:[s("Are you sure you want to remove")," ",t.jsx("b",{children:(e==null?void 0:e.name)??(e==null?void 0:e.slug)})," ",c!=null&&c.hasSlug?(c==null?void 0:c.name)+"?":s("page?")]}),l&&(j>0||m>0)&&t.jsxs("div",{className:"mt-3 rounded-md bg-red-50 p-3 text-sm",children:[t.jsxs("div",{className:"font-semibold text-red-800",children:[s("Warning: Deleting this primary page will also delete"),":"]}),t.jsxs("ul",{className:"mt-2 list-inside list-disc space-y-1 text-red-700",children:[m>0&&t.jsxs("li",{children:[t.jsx("span",{className:"font-medium",children:m})," ",s(m===1?"nested child page":"nested child pages")]}),j>0&&t.jsx("li",{children:s("All associated language pages")})]})]}),e.lang&&t.jsxs("div",{className:"py-2 text-sm",children:[s("Language"),":"," ",t.jsx("span",{className:"font-medium text-gray-500",children:N.get(o.LANGUAGES,e.lang,e.lang)})]})]})]}),t.jsxs(n.DialogFooter,{children:[t.jsx(D.Button,{variant:"outline",onClick:r,children:s("Cancel")}),t.jsx(D.Button,{variant:"destructive",disabled:x,onClick:L,children:s(x?"Deleting...":"Delete")})]})]})})}exports.default=A;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("./index-C99FhuF1.cjs"),L=require("./register-chai-top-bar-BqwKw4uy.cjs"),p=require("@radix-ui/react-icons"),q=require("lodash-es"),d=require("react"),w=require("react-i18next"),x=({title:n,items:a,emptyLabel:r,onSelect:t,icon:i})=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:n}),a.length>0?s.jsx("div",{className:"space-y-1",children:a.map(l=>s.jsx("button",{type:"button",onClick:()=>t(l.id),className:L.cn("group flex w-full items-center justify-between rounded-md border border-transparent bg-muted/40 px-3 py-1 text-left text-xs transition","hover:border-muted-foreground/20 hover:bg-muted/70 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1",l.isSelected&&"border-primary/40 bg-primary/10 text-primary"),children:s.jsxs("span",{className:"flex items-center space-x-2",children:[i&&i,s.jsx("span",{className:"truncate",children:l.label})]})},l.id))}):s.jsx("div",{className:"rounded border border-dashed border-muted px-3 py-1 text-xs text-muted-foreground",children:r})]}),C="#styles:",M=n=>{const r=[typeof n._name=="string"?n._name:void 0,typeof n._type=="string"?n._type:void 0].filter(Boolean).find(t=>t.trim().length>0);return r?r.length>40?`${r.slice(0,37)}...`:r:n._id},_=(n,a)=>{const r=`${a}`;return n.filter(t=>Object.values(t).some(i=>typeof i!="string"||!i.startsWith(C)?!1:i.includes(r))).map(t=>({id:t._id,label:M(t)}))},O=({tokenId:n,tokenName:a,children:r})=>{const{t}=w.useTranslation(),[i]=o.useBlocksStore(),[l,b]=o.useSelectedBlockIds(),g=o.useBuilderProp("pageId",""),m=o.useBuilderProp("siteWideUsage",{}),h=d.useMemo(()=>_(i,n),[i,n]),P=d.useMemo(()=>h.map(e=>({id:e.id,label:e.label,isSelected:l.includes(e.id)})),[h,l]),u=d.useMemo(()=>m?Object.entries(m).reduce((e,[f,c])=>(f===g||!(c!=null&&c.designTokens)||!Object.keys(c.designTokens).some(j=>typeof j!="string"?!1:j===n)||e.push({id:f,name:c.name||f,isPartial:!!c.isPartial}),e),[]):[],[m,a,n,g]),S=d.useMemo(()=>u.filter(e=>!e.isPartial).map(e=>({id:e.id,label:e.name})),[u]),k=d.useMemo(()=>u.filter(e=>e.isPartial).map(e=>({id:e.id,label:e.name})),[u]),v=d.useCallback(e=>{b([e])},[b]),B=o.useBuilderProp("gotoPage",q.noop),{selectedLang:N,fallbackLang:T}=o.useLanguages(),{savePageAsync:I}=o.useSavePage(),y=async e=>{e&&(await I(!0),B({pageId:e,lang:N||T}))};return s.jsxs(o.Popover,{children:[s.jsx(o.PopoverTrigger,{asChild:!0,children:r}),s.jsxs(o.PopoverContent,{side:"bottom",align:"end",className:"w-80 p-0",children:[s.jsxs("div",{className:"space-y-1 px-4 py-3",children:[s.jsx("p",{className:"text-xs font-semibold",children:a}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:t("Usage summary for this design token across your site.")})]}),s.jsxs("div",{className:"no-scrollbar max-h-64 space-y-4 overflow-y-auto px-4 pb-4",children:[s.jsx(x,{title:t("Blocks affected on this page"),items:P,emptyLabel:t("None"),onSelect:v,icon:s.jsx(p.ArrowRightIcon,{fontSize:4})}),s.jsx(x,{title:t("Blocks affected on other pages"),items:S,emptyLabel:t("None"),onSelect:y,icon:s.jsx(p.FileIcon,{fontSize:8})}),s.jsx(x,{title:t("Blocks affected on partial blocks"),items:k,emptyLabel:t("None"),onSelect:y,icon:s.jsx(p.GlobeIcon,{fontSize:8})})]})]})]})};exports.default=O;
@@ -1,6 +1,7 @@
1
1
  import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
- import { ag as _, ah as j, a as C, ai as p, n as I, V as O, a9 as z, aa as W, P as A } from "./index-Ct7ElCGK.js";
3
- import { ArrowRightIcon as E, FileIcon as F, GlobeIcon as M } from "@radix-ui/react-icons";
2
+ import { ad as _, a as j, ae as p, n as C, Q as I, a6 as O, a7 as z, P as E } from "./index-rAcNbjk_.js";
3
+ import { E as W } from "./register-chai-top-bar-ESJHs5s-.js";
4
+ import { ArrowRightIcon as A, FileIcon as F, GlobeIcon as M } from "@radix-ui/react-icons";
4
5
  import { noop as R } from "lodash-es";
5
6
  import { useMemo as d, useCallback as $ } from "react";
6
7
  import { useTranslation as D } from "react-i18next";
@@ -11,7 +12,7 @@ const b = ({ title: s, items: a, emptyLabel: r, onSelect: t, icon: o }) => /* @_
11
12
  {
12
13
  type: "button",
13
14
  onClick: () => t(i.id),
14
- className: _(
15
+ className: W(
15
16
  "group flex w-full items-center justify-between rounded-md border border-transparent bg-muted/40 px-3 py-1 text-left text-xs transition",
16
17
  "hover:border-muted-foreground/20 hover:bg-muted/70 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1",
17
18
  i.isSelected && "border-primary/40 bg-primary/10 text-primary"
@@ -23,7 +24,7 @@ const b = ({ title: s, items: a, emptyLabel: r, onSelect: t, icon: o }) => /* @_
23
24
  },
24
25
  i.id
25
26
  )) }) : /* @__PURE__ */ n("div", { className: "rounded border border-dashed border-muted px-3 py-1 text-xs text-muted-foreground", children: r })
26
- ] }), G = "#styles:", V = (s) => {
27
+ ] }), G = "#styles:", Q = (s) => {
27
28
  const r = [
28
29
  typeof s._name == "string" ? s._name : void 0,
29
30
  typeof s._type == "string" ? s._type : void 0
@@ -33,10 +34,10 @@ const b = ({ title: s, items: a, emptyLabel: r, onSelect: t, icon: o }) => /* @_
33
34
  const r = `${a}`;
34
35
  return s.filter((t) => Object.values(t).some((o) => typeof o != "string" || !o.startsWith(G) ? !1 : o.includes(r))).map((t) => ({
35
36
  id: t._id,
36
- label: V(t)
37
+ label: Q(t)
37
38
  }));
38
- }, K = ({ tokenId: s, tokenName: a, children: r }) => {
39
- const { t } = D(), [o] = j(), [i, g] = C(), h = p("pageId"), u = p("siteWideUsage"), y = d(() => X(o, s), [o, s]), k = d(
39
+ }, ee = ({ tokenId: s, tokenName: a, children: r }) => {
40
+ const { t } = D(), [o] = _(), [i, g] = j(), h = p("pageId", ""), u = p("siteWideUsage", {}), y = d(() => X(o, s), [o, s]), k = d(
40
41
  () => y.map((e) => ({
41
42
  id: e.id,
42
43
  label: e.label,
@@ -63,12 +64,12 @@ const b = ({ title: s, items: a, emptyLabel: r, onSelect: t, icon: o }) => /* @_
63
64
  g([e]);
64
65
  },
65
66
  [g]
66
- ), B = p("gotoPage", R), { selectedLang: T, fallbackLang: L } = I(), { savePageAsync: w } = O(), x = async (e) => {
67
+ ), B = p("gotoPage", R), { selectedLang: T, fallbackLang: L } = C(), { savePageAsync: w } = I(), x = async (e) => {
67
68
  e && (await w(!0), B({ pageId: e, lang: T || L }));
68
69
  };
69
- return /* @__PURE__ */ c(z, { children: [
70
- /* @__PURE__ */ n(W, { asChild: !0, children: r }),
71
- /* @__PURE__ */ c(A, { side: "bottom", align: "end", className: "w-80 p-0", children: [
70
+ return /* @__PURE__ */ c(O, { children: [
71
+ /* @__PURE__ */ n(z, { asChild: !0, children: r }),
72
+ /* @__PURE__ */ c(E, { side: "bottom", align: "end", className: "w-80 p-0", children: [
72
73
  /* @__PURE__ */ c("div", { className: "space-y-1 px-4 py-3", children: [
73
74
  /* @__PURE__ */ n("p", { className: "text-xs font-semibold", children: a }),
74
75
  /* @__PURE__ */ n("p", { className: "text-[11px] text-muted-foreground", children: t("Usage summary for this design token across your site.") })
@@ -81,7 +82,7 @@ const b = ({ title: s, items: a, emptyLabel: r, onSelect: t, icon: o }) => /* @_
81
82
  items: k,
82
83
  emptyLabel: t("None"),
83
84
  onSelect: N,
84
- icon: /* @__PURE__ */ n(E, { fontSize: 4 })
85
+ icon: /* @__PURE__ */ n(A, { fontSize: 4 })
85
86
  }
86
87
  ),
87
88
  /* @__PURE__ */ n(
@@ -109,5 +110,5 @@ const b = ({ title: s, items: a, emptyLabel: r, onSelect: t, icon: o }) => /* @_
109
110
  ] });
110
111
  };
111
112
  export {
112
- K as default
113
+ ee as default
113
114
  };