@templatical/editor 0.20.0 → 0.21.1

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 (238) hide show
  1. package/README.md +1 -0
  2. package/dist/{AiChatSidebar-ChrE6pUq.js → AiChatSidebar-K_AehWc-.js} +9 -9
  3. package/dist/{AiFeatureMenu-DkQ9HhQ6.js → AiFeatureMenu-CcqQDHzJ.js} +6 -6
  4. package/dist/{BlockIssueBadge-B4QjePax.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
  5. package/dist/{CloudEditor-CfX-aMiV.js → CloudEditor-Dnww6og-.js} +263 -315
  6. package/dist/{CollaboratorBar-DTibhQ1j.js → CollaboratorBar-Bj4NZiie.js} +3 -3
  7. package/dist/{ColorPicker-4vDYhdGe.js → ColorPicker-s9GHXjZs.js} +4 -4
  8. package/dist/CommentsSidebar-DvNEdugN.js +435 -0
  9. package/dist/CountdownBlock-J_Q9JRQM.js +91 -0
  10. package/dist/{CountdownToolbar-D7yQqnA2.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
  11. package/dist/{DesignReferenceSidebar-DnO6ZdwS.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
  12. package/dist/{IssuesPanel-X_vkNGrs.js → IssuesPanel-CEnEGFtd.js} +7 -7
  13. package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
  14. package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
  15. package/dist/{ParagraphEditor-C5ixOIYb.js → ParagraphEditor--_zWfxps.js} +47 -47
  16. package/dist/{RichTextEditorContent-DwhDnMsG.js → RichTextEditorContent-FbnWsh46.js} +6 -6
  17. package/dist/SaveBlockDialog-CYIEHABH.js +264 -0
  18. package/dist/SavedBlockPreviewCanvas-2-mzAnZE.js +109 -0
  19. package/dist/SavedBlocksBrowserModal-D5V5yF_3.js +323 -0
  20. package/dist/SavedBlocksPanels-Dff38YXu.js +36 -0
  21. package/dist/SavedBlocksPickBar-rB6iyji6.js +52 -0
  22. package/dist/{SnapshotHistory-DaVueFv6.js → SnapshotHistory-FtzDq8f0.js} +8 -8
  23. package/dist/{TemplateScoringPanel-B0UHoTLx.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
  24. package/dist/{TestEmailModal-BkauxF7j.js → TestEmailModal-DL2O1H8M.js} +4 -4
  25. package/dist/{TitleEditor-n6WDVDjW.js → TitleEditor-CPda5lh-.js} +11 -11
  26. package/dist/{TplModal-BDDyvT-C.js → TplModal-C7Koj5gM.js} +3 -3
  27. package/dist/{blockTypeIcons-4D0aFXNg.js → blockTypeIcons-CgwECCut.js} +6 -6
  28. package/dist/bundle-stats.json +8 -8
  29. package/dist/{cdn/chunks/ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -5
  30. package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js +203 -0
  31. package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js.map +1 -0
  32. package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js → AiFeatureMenu-Duwg413F.js} +12 -8
  33. package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js.map → AiFeatureMenu-Duwg413F.js.map} +1 -1
  34. package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js → BlockIssueBadge-Da4yR-mh.js} +7 -5
  35. package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js.map → BlockIssueBadge-Da4yR-mh.js.map} +1 -1
  36. package/dist/cdn/chunks/{CloudEditor-CEa3Xgqh.js → CloudEditor-B3hqbwfP.js} +275 -318
  37. package/dist/cdn/chunks/CloudEditor-B3hqbwfP.js.map +1 -0
  38. package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js → CollaboratorBar-BS3rJy6-.js} +7 -6
  39. package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js.map → CollaboratorBar-BS3rJy6-.js.map} +1 -1
  40. package/dist/cdn/chunks/{ColorPicker-ll8pynws.js → ColorPicker-DZSzZ5ZP.js} +168 -164
  41. package/dist/cdn/chunks/{ColorPicker-ll8pynws.js.map → ColorPicker-DZSzZ5ZP.js.map} +1 -1
  42. package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js +412 -0
  43. package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js.map +1 -0
  44. package/dist/cdn/chunks/CountdownBlock-Bffpoppw.js +93 -0
  45. package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js.map → CountdownBlock-Bffpoppw.js.map} +1 -1
  46. package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js → CountdownToolbar-DAnmIZjq.js} +4 -5
  47. package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js.map → CountdownToolbar-DAnmIZjq.js.map} +1 -1
  48. package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js +223 -0
  49. package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js.map +1 -0
  50. package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js → IssuesPanel-D80JedOj.js} +11 -10
  51. package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js.map → IssuesPanel-D80JedOj.js.map} +1 -1
  52. package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js +12 -0
  53. package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js.map +1 -0
  54. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
  55. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
  56. package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js +123 -0
  57. package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js.map +1 -0
  58. package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js → ParagraphEditor-CtaRa1vr.js} +90 -85
  59. package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js.map → ParagraphEditor-CtaRa1vr.js.map} +1 -1
  60. package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js → RichTextEditorContent-BbdgJqWM.js} +9 -6
  61. package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js.map → RichTextEditorContent-BbdgJqWM.js.map} +1 -1
  62. package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js +263 -0
  63. package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js.map +1 -0
  64. package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js +111 -0
  65. package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js.map +1 -0
  66. package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js +322 -0
  67. package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js.map +1 -0
  68. package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js +38 -0
  69. package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js.map +1 -0
  70. package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js +54 -0
  71. package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js.map +1 -0
  72. package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js +121 -0
  73. package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js.map +1 -0
  74. package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js +231 -0
  75. package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js.map +1 -0
  76. package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +96 -0
  77. package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +1 -0
  78. package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js → TitleEditor-BJ7LFykI.js} +18 -15
  79. package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js.map → TitleEditor-BJ7LFykI.js.map} +1 -1
  80. package/dist/cdn/chunks/TplModal-CH9RzKF7.js +50 -0
  81. package/dist/cdn/chunks/TplModal-CH9RzKF7.js.map +1 -0
  82. package/dist/cdn/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  83. package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +21 -0
  84. package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js.map → blockTypeIcons-etMMQoVv.js.map} +1 -1
  85. package/dist/{ca-DbWoy4rG.js → cdn/chunks/ca-BBgad6y5.js} +52 -3
  86. package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
  87. package/dist/cdn/chunks/cloud-BJlbXGTJ.js +1787 -0
  88. package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +1 -0
  89. package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
  90. package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
  91. package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
  92. package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
  93. package/dist/cdn/chunks/dist-CiBEt0VR.js +163 -0
  94. package/dist/cdn/chunks/dist-CiBEt0VR.js.map +1 -0
  95. package/dist/cdn/chunks/dist-CxTt8FRE.js +403 -0
  96. package/dist/cdn/chunks/dist-CxTt8FRE.js.map +1 -0
  97. package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
  98. package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
  99. package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
  100. package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
  101. package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
  102. package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
  103. package/dist/cdn/chunks/{extensions-Di3hdIRT.js → extensions-ZX2oarW6.js} +28 -26
  104. package/dist/cdn/chunks/{extensions-Di3hdIRT.js.map → extensions-ZX2oarW6.js.map} +1 -1
  105. package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js +12 -0
  106. package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -0
  107. package/dist/cdn/chunks/htmlparser-CZa2V5cF.js +1008 -0
  108. package/dist/cdn/chunks/htmlparser-CZa2V5cF.js.map +1 -0
  109. package/dist/cdn/chunks/icons-CYWw8Xfp.js +1190 -0
  110. package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +1 -0
  111. package/dist/cdn/chunks/keys-D7kUmfpE.js +12 -0
  112. package/dist/cdn/chunks/keys-D7kUmfpE.js.map +1 -0
  113. package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
  114. package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
  115. package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
  116. package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
  117. package/dist/cdn/chunks/src-BKI1x1k7.js +546 -0
  118. package/dist/cdn/chunks/src-BKI1x1k7.js.map +1 -0
  119. package/dist/cdn/chunks/src-CM0gCvAS.js +1176 -0
  120. package/dist/cdn/chunks/src-CM0gCvAS.js.map +1 -0
  121. package/dist/cdn/chunks/{media-library-yYAkAagU.js → src-D6F_3XkE.js} +1754 -1252
  122. package/dist/cdn/chunks/src-D6F_3XkE.js.map +1 -0
  123. package/dist/cdn/chunks/{renderer-DpBGiXOg.js → src-DYji-wXB.js} +117 -133
  124. package/dist/cdn/chunks/src-DYji-wXB.js.map +1 -0
  125. package/dist/cdn/chunks/{styles-DHSmjlpX.js → styles-DMOEiSX9.js} +1448 -1354
  126. package/dist/cdn/chunks/styles-DMOEiSX9.js.map +1 -0
  127. package/dist/cdn/chunks/timeouts-Bmi_yePw.js +6 -0
  128. package/dist/cdn/chunks/timeouts-Bmi_yePw.js.map +1 -0
  129. package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
  130. package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
  131. package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js +12 -0
  132. package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js.map +1 -0
  133. package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js +25 -0
  134. package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js.map +1 -0
  135. package/dist/cdn/chunks/useEditorCore-BA6mspzD.js +3019 -0
  136. package/dist/cdn/chunks/useEditorCore-BA6mspzD.js.map +1 -0
  137. package/dist/cdn/chunks/useI18n-8Wd7G-cq.js +19 -0
  138. package/dist/cdn/chunks/useI18n-8Wd7G-cq.js.map +1 -0
  139. package/dist/cdn/chunks/useMergeTag-C7G31KV-.js +46 -0
  140. package/dist/cdn/chunks/useMergeTag-C7G31KV-.js.map +1 -0
  141. package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js +61 -0
  142. package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js.map +1 -0
  143. package/dist/cdn/editor.css +1 -1
  144. package/dist/cdn/editor.js +132 -120
  145. package/dist/cdn/editor.js.map +1 -1
  146. package/dist/{check-Bl4J_tYV.js → check-BpQDKiPz.js} +1 -1
  147. package/dist/{chevron-down-COEcl2iP.js → chevron-down-j8GrdTyz.js} +1 -1
  148. package/dist/chevron-up-BACyVhyC.js +7 -0
  149. package/dist/{circle-alert-CvHi5etc.js → circle-alert-CgtE46ND.js} +1 -1
  150. package/dist/{clock-CZZw62e8.js → clock-BzKLLW5L.js} +1 -1
  151. package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
  152. package/dist/{createLucideIcon-_peTZQtY.js → createLucideIcon-JWHwTI6N.js} +2 -2
  153. package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
  154. package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
  155. package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
  156. package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
  157. package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
  158. package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
  159. package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
  160. package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
  161. package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
  162. package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
  163. package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
  164. package/dist/dist-CweLDZrs.js +5 -0
  165. package/dist/dist-DOsdqAEZ.js +5 -0
  166. package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
  167. package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
  168. package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
  169. package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
  170. package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
  171. package/dist/{image-up-D26rNdfX.js → image-up-CQdtq8ge.js} +1 -1
  172. package/dist/index.d.ts +81 -4
  173. package/dist/{info-CE3JSTqk.js → info-BUJBXoE6.js} +1 -1
  174. package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
  175. package/dist/{list-checks-BQsLrtBB.js → list-checks-BGHaCSD5.js} +1 -1
  176. package/dist/{loader-circle-s9Rh5lLd.js → loader-circle-C-Z6kgI6.js} +1 -1
  177. package/dist/{message-circle-CI62d690.js → message-circle-CEm5qckV.js} +1 -1
  178. package/dist/pencil-DdwmkKLb.js +10 -0
  179. package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
  180. package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
  181. package/dist/{refresh-cw-DlYfl65Y.js → refresh-cw-maKlg0dl.js} +1 -1
  182. package/dist/{scan-line-CHadrYVb.js → scan-line-BFgesTOY.js} +1 -1
  183. package/dist/{send-CbP40otC.js → send-B70aQDrA.js} +1 -1
  184. package/dist/{shield-check-Bnj9aRoJ.js → shield-check-B7x5OKt5.js} +1 -1
  185. package/dist/{sparkles-CncWT57a.js → sparkles-DVlm1Ipp.js} +1 -1
  186. package/dist/style.css +1 -1
  187. package/dist/{styles-DkF_-uX8.js → styles-PcOPXvLO.js} +1235 -1151
  188. package/dist/templatical-editor.js +134 -125
  189. package/dist/{text-align-start-B458vzYw.js → text-align-start-Vay3Kvo2.js} +1 -1
  190. package/dist/{trash-2-DO0yjSU1.js → trash-2-DE8CmxAG.js} +1 -1
  191. package/dist/{triangle-alert-C18_ima6.js → triangle-alert-Djg6IG8N.js} +1 -1
  192. package/dist/{upload-DsCd2zTR.js → upload-BwwE0U6G.js} +1 -1
  193. package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
  194. package/dist/{useEditorCore-kKUemYY6.js → useEditorCore-CT1slufs.js} +997 -817
  195. package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
  196. package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
  197. package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
  198. package/dist/{x-BCFQuE_q.js → x-CkD6A1iB.js} +1 -1
  199. package/package.json +21 -21
  200. package/dist/CommentsSidebar-D-o5Stlg.js +0 -442
  201. package/dist/CountdownBlock-Bn5w7C-p.js +0 -92
  202. package/dist/ModuleBrowserModal-AJt--JPh.js +0 -202
  203. package/dist/ModulePreviewCanvas-BKYOcVCh.js +0 -106
  204. package/dist/NumberWithSuffix-Bf3rNxza.js +0 -89
  205. package/dist/SaveModuleDialog-B4QX9eiv.js +0 -125
  206. package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
  207. package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +0 -1
  208. package/dist/cdn/chunks/CountdownBlock-eGUE7hhw.js +0 -93
  209. package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js +0 -198
  210. package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js.map +0 -1
  211. package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js +0 -107
  212. package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js.map +0 -1
  213. package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js +0 -91
  214. package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js.map +0 -1
  215. package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js +0 -120
  216. package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js.map +0 -1
  217. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
  218. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
  219. package/dist/cdn/chunks/blockTypeIcons-B0Hjh42a.js +0 -22
  220. package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
  221. package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
  222. package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
  223. package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
  224. package/dist/cdn/chunks/features-CLIZ7Q-Y.js +0 -7657
  225. package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +0 -1
  226. package/dist/cdn/chunks/icons-GX40Qm2W.js +0 -690
  227. package/dist/cdn/chunks/icons-GX40Qm2W.js.map +0 -1
  228. package/dist/cdn/chunks/media-library-yYAkAagU.js.map +0 -1
  229. package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
  230. package/dist/cdn/chunks/quality-DffYv9j5.js +0 -2180
  231. package/dist/cdn/chunks/quality-DffYv9j5.js.map +0 -1
  232. package/dist/cdn/chunks/renderer-DpBGiXOg.js.map +0 -1
  233. package/dist/cdn/chunks/src-9K6uFiuK.js +0 -509
  234. package/dist/cdn/chunks/src-9K6uFiuK.js.map +0 -1
  235. package/dist/cdn/chunks/styles-DHSmjlpX.js.map +0 -1
  236. package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
  237. package/dist/dist-BDVm2MrW.js +0 -5
  238. package/dist/dist-DbekZDmJ.js +0 -5
@@ -1,202 +0,0 @@
1
- import { A as e, Dt as t, I as n, N as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, g as ee, h as d, l as f, nt as p, r as m, s as h, u as te, z as g } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { a as ne, c as _, i as re } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import "./useEditorCore-kKUemYY6.js";
4
- import { B as v, P as ie, h as ae } from "./keys-DFaIbGR8.js";
5
- import { t as oe } from "./useI18n-BNMzZTM5.js";
6
- import { n as se, r as y, t as b } from "./blockTypeIcons-4D0aFXNg.js";
7
- import { t as ce } from "./trash-2-DO0yjSU1.js";
8
- import { t as le } from "./x-BCFQuE_q.js";
9
- import { n as ue } from "./useCloudI18n-PCDOC2kz.js";
10
- import { t as de } from "./TplModal-BDDyvT-C.js";
11
- //#region src/cloud/components/ModuleBrowserModal.vue?vue&type=script&setup=true&lang.ts
12
- var fe = {
13
- role: "dialog",
14
- "aria-modal": "true",
15
- "aria-labelledby": "tpl-module-browser-title",
16
- class: "tpl-scale-in tpl:mx-4 tpl:flex tpl:w-full tpl:max-w-[1000px] tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)]",
17
- style: {
18
- "background-color": "var(--tpl-bg-elevated)",
19
- "box-shadow": "var(--tpl-shadow-xl)",
20
- "max-height": "90vh"
21
- }
22
- }, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, me = {
23
- id: "tpl-module-browser-title",
24
- class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
25
- }, x = ["aria-label"], S = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, C = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, w = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, T = { class: "tpl:relative" }, E = ["placeholder"], D = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, O = {
26
- key: 0,
27
- class: "tpl:flex tpl:flex-col tpl:gap-1"
28
- }, k = ["aria-pressed", "onClick"], A = { class: "tpl:flex tpl:items-center tpl:gap-2" }, j = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, M = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, N = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, P = {
29
- key: 0,
30
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
31
- }, F = ["aria-label", "onClick"], I = [
32
- "aria-label",
33
- "title",
34
- "onClick"
35
- ], L = {
36
- key: 1,
37
- class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
38
- }, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, z = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, he = {
39
- key: 0,
40
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
41
- }, ge = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, _e = {
42
- key: 1,
43
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
44
- }, ve = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ye = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xe = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Se = ["value"], Ce = { class: "tpl:flex tpl:gap-2" }, we = ["disabled"], B = /* @__PURE__ */ c({
45
- __name: "ModuleBrowserModal",
46
- props: { visible: { type: Boolean } },
47
- emits: ["close", "insert"],
48
- setup(c, { emit: B }) {
49
- let Te = c, V = B, Ee = ee(() => import("./ModulePreviewCanvas-BKYOcVCh.js")), { t: De } = oe(), { t: H } = ue(), U = v(ie, "ModuleBrowserModal"), W = v(ae, "ModuleBrowserModal"), G = s(""), K = s(null), q = s(null), J = s("end"), Y = h(() => {
50
- let e = U.modules.value;
51
- if (!G.value) return e;
52
- let t = G.value.toLowerCase();
53
- return e.filter((e) => e.name.toLowerCase().includes(t));
54
- }), X = h(() => K.value ? U.modules.value.find((e) => e.id === K.value) ?? null : null), Oe = h(() => {
55
- let e = [{
56
- value: "beginning",
57
- label: H.modules.insertAtBeginning
58
- }], t = W.content.value.blocks;
59
- for (let n = 0; n < t.length; n++) {
60
- let r = t[n], i = r.type, a = De.blocks[i] ?? r.type;
61
- e.push({
62
- value: r.id,
63
- label: H.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
64
- });
65
- }
66
- return e.push({
67
- value: "end",
68
- label: H.modules.insertAtEnd
69
- }), e;
70
- }), ke = h(() => {
71
- if (J.value === "end") return;
72
- if (J.value === "beginning") return 0;
73
- let e = W.content.value.blocks.findIndex((e) => e.id === J.value);
74
- if (e !== -1) return e + 1;
75
- });
76
- n(() => Te.visible, (e) => {
77
- if (e) {
78
- G.value = "", K.value = null, q.value = null;
79
- let e = W.state.selectedBlockId;
80
- if (e) {
81
- let t = W.content.value.blocks.findIndex((t) => t.id === e);
82
- J.value = t === -1 ? "end" : e;
83
- } else J.value = "end";
84
- }
85
- });
86
- function Ae(e) {
87
- let t = [], n = /* @__PURE__ */ new Set();
88
- for (let r of e.content) if (!n.has(r.type) && b[r.type] && (n.add(r.type), t.push({
89
- type: r.type,
90
- icon: b[r.type]
91
- })), t.length >= 5) break;
92
- return t;
93
- }
94
- function Z(e) {
95
- let t = new Set(e.content.map((e) => e.type));
96
- return Math.max(0, t.size - 5);
97
- }
98
- async function je(e) {
99
- try {
100
- await U.deleteModule(e), K.value === e && (K.value = null);
101
- } finally {
102
- q.value = null;
103
- }
104
- }
105
- function Q() {
106
- X.value && V("insert", X.value, ke.value);
107
- }
108
- function $() {
109
- V("close");
110
- }
111
- function Me(e) {
112
- e.key === "Escape" && $(), e.key === "Enter" && X.value && (e.preventDefault(), Q());
113
- }
114
- return (n, s) => (i(), f(de, {
115
- visible: c.visible,
116
- onClose: $,
117
- onKeydown: Me
118
- }, {
119
- default: o(() => [l("div", fe, [
120
- l("div", pe, [l("h3", me, a(p(H).modules.browse), 1), l("button", {
121
- "aria-label": p(H).modules.close,
122
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
123
- onClick: $
124
- }, [d(p(le), {
125
- size: 16,
126
- "stroke-width": 2
127
- })], 8, x)]),
128
- l("div", S, [l("div", C, [l("div", w, [l("div", T, [d(p(se), {
129
- size: 14,
130
- "stroke-width": 2,
131
- class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
132
- }), g(l("input", {
133
- "onUpdate:modelValue": s[0] ||= (e) => G.value = e,
134
- type: "text",
135
- placeholder: p(H).modules.search,
136
- class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
137
- }, null, 8, E), [[ne, G.value]])])]), l("div", D, [Y.value.length > 0 ? (i(), u("div", O, [(i(!0), u(m, null, e(Y.value, (n) => (i(), u("button", {
138
- key: n.id,
139
- type: "button",
140
- "aria-pressed": K.value === n.id,
141
- class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
142
- style: t({
143
- borderColor: K.value === n.id ? "var(--tpl-primary)" : "var(--tpl-border)",
144
- backgroundColor: K.value === n.id ? "var(--tpl-primary-light)" : "transparent"
145
- }),
146
- onClick: (e) => K.value = n.id
147
- }, [l("div", A, [l("span", j, a(n.name), 1), l("span", M, a(p(H).modules.blockCount.replace("{count}", String(n.content.length))), 1)]), l("div", N, [
148
- (i(!0), u(m, null, e(Ae(n), (e) => (i(), f(r(e.icon), {
149
- key: e.type,
150
- size: 14,
151
- "stroke-width": 1.5,
152
- class: "tpl:text-[var(--tpl-text-dim)]"
153
- }))), 128)),
154
- Z(n) > 0 ? (i(), u("span", P, " +" + a(Z(n)), 1)) : te("", !0),
155
- q.value === n.id ? (i(), u("button", {
156
- key: 1,
157
- "aria-label": p(H).modules.deleteConfirm,
158
- class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-100 tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
159
- style: { "background-color": "transparent" },
160
- onClick: _((e) => je(n.id), ["stop"])
161
- }, a(p(H).modules.deleteConfirm), 9, F)) : (i(), u("button", {
162
- key: 2,
163
- class: "tpl-module-delete-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
164
- "aria-label": p(H).modules.delete,
165
- title: p(H).modules.delete,
166
- onClick: _((e) => q.value = n.id, ["stop"])
167
- }, [d(p(ce), {
168
- size: 12,
169
- "stroke-width": 1.5
170
- })], 8, I))
171
- ])], 12, k))), 128))])) : (i(), u("div", L, [d(p(y), {
172
- size: 32,
173
- "stroke-width": 1,
174
- class: "tpl:text-[var(--tpl-text-dim)]"
175
- }), l("p", R, a(G.value ? p(H).modules.noModules : p(H).modules.noModulesHint), 1)]))])]), l("div", z, [X.value ? (i(), u("div", he, [l("div", ge, [d(p(Ee), { blocks: X.value.content }, null, 8, ["blocks"])])])) : (i(), u("div", _e, [d(p(y), {
176
- size: 32,
177
- "stroke-width": 1,
178
- class: "tpl:text-[var(--tpl-text-dim)]"
179
- }), l("p", ve, a(p(H).modules.selectToPreview), 1)]))])]),
180
- l("div", ye, [l("div", be, [l("label", xe, a(p(H).modules.insertPosition), 1), g(l("select", {
181
- "onUpdate:modelValue": s[1] ||= (e) => J.value = e,
182
- class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
183
- }, [(i(!0), u(m, null, e(Oe.value, (e) => (i(), u("option", {
184
- key: e.value,
185
- value: e.value
186
- }, a(e.label), 9, Se))), 128))], 512), [[re, J.value]])]), l("div", Ce, [l("button", {
187
- type: "button",
188
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
189
- onClick: $
190
- }, a(p(H).modules.close), 1), l("button", {
191
- type: "button",
192
- class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
193
- disabled: !X.value,
194
- onClick: Q
195
- }, a(p(H).modules.insert), 9, we)])])
196
- ])]),
197
- _: 1
198
- }, 8, ["visible"]));
199
- }
200
- });
201
- //#endregion
202
- export { B as default };
@@ -1,106 +0,0 @@
1
- import { A as e, Dt as t, M as n, N as r, O as i, _ as a, c as o, d as s, l as c, nt as l, r as u, s as d, x as f } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { I as p, _ as m, a as h, d as g, f as _, h as v, i as y, l as b, m as x, n as S, p as C, r as w, v as T, y as E } from "./useEditorCore-kKUemYY6.js";
3
- import { o as D } from "./keys-DFaIbGR8.js";
4
- //#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
5
- var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__PURE__ */ a({
6
- name: "PreviewSectionBlock",
7
- __name: "PreviewSectionBlock",
8
- props: {
9
- block: {},
10
- viewport: {}
11
- },
12
- setup(a) {
13
- let A = {
14
- title: b,
15
- paragraph: C,
16
- image: v,
17
- video: S,
18
- button: p,
19
- divider: T,
20
- social: h,
21
- menu: x,
22
- table: w,
23
- spacer: y,
24
- html: m,
25
- custom: E
26
- }, j = a, M = f(D, null), N = d(() => {
27
- switch (j.block.columns) {
28
- case "2": return ["50%", "50%"];
29
- case "3": return [
30
- "33.33%",
31
- "33.33%",
32
- "33.33%"
33
- ];
34
- case "1-2": return ["33.33%", "66.67%"];
35
- case "2-1": return ["66.67%", "33.33%"];
36
- default: return ["100%"];
37
- }
38
- }), P = d(() => {
39
- let e = N.value.length, t = [...j.block.children];
40
- for (; t.length < e;) t.push([]);
41
- return t.slice(0, e);
42
- });
43
- function F(e) {
44
- return P.value[e] || [];
45
- }
46
- function I(e) {
47
- return _(e, M, A);
48
- }
49
- return (a, d) => {
50
- let f = n("PreviewSectionBlock", !0);
51
- return i(), s("div", O, [o("div", k, [(i(!0), s(u, null, e(P.value, (n, a) => (i(), s("div", {
52
- key: a,
53
- style: t({ width: N.value[a] })
54
- }, [(i(!0), s(u, null, e(F(a), (e) => (i(), s("div", {
55
- key: e.id,
56
- style: t(l(g)(e))
57
- }, [e.type === "section" ? (i(), c(f, {
58
- key: 0,
59
- block: e,
60
- viewport: "desktop"
61
- }, null, 8, ["block"])) : (i(), c(r(I(e)), {
62
- key: 1,
63
- block: e,
64
- viewport: "desktop"
65
- }, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
66
- };
67
- }
68
- }), j = {
69
- class: "tpl:pointer-events-none tpl:mx-auto tpl:w-[600px] tpl:select-none tpl:rounded-lg",
70
- style: {
71
- "background-color": "var(--tpl-canvas-bg)",
72
- "box-shadow": "var(--tpl-shadow-sm)"
73
- }
74
- }, M = /* @__PURE__ */ a({
75
- __name: "ModulePreviewCanvas",
76
- props: { blocks: {} },
77
- setup(n) {
78
- let a = f(D), o = {
79
- section: A,
80
- title: b,
81
- paragraph: C,
82
- image: v,
83
- video: S,
84
- button: p,
85
- divider: T,
86
- social: h,
87
- menu: x,
88
- table: w,
89
- spacer: y,
90
- html: m,
91
- custom: E
92
- };
93
- function d(e) {
94
- return _(e, a, o);
95
- }
96
- return (a, o) => (i(), s("div", j, [(i(!0), s(u, null, e(n.blocks, (e) => (i(), s("div", {
97
- key: e.id,
98
- style: t(l(g)(e))
99
- }, [(i(), c(r(d(e)), {
100
- block: e,
101
- viewport: "desktop"
102
- }, null, 8, ["block"]))], 4))), 128))]));
103
- }
104
- });
105
- //#endregion
106
- export { M as default };
@@ -1,89 +0,0 @@
1
- import { A as e, Dt as t, Et as n, N as r, O as i, Ot as a, _ as o, c as s, d as c, j as l, l as u, nt as d, r as f, s as p, u as m } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { h, m as g, p as _ } from "./ColorPicker-4vDYhdGe.js";
3
- //#region src/components/SlidingPillSelect.vue?vue&type=script&setup=true&lang.ts
4
- var v = [
5
- "aria-checked",
6
- "aria-label",
7
- "title",
8
- "onClick"
9
- ], y = { key: 1 }, b = /* @__PURE__ */ o({
10
- __name: "SlidingPillSelect",
11
- props: {
12
- options: {},
13
- modelValue: {}
14
- },
15
- emits: ["update:modelValue"],
16
- setup(n, { emit: o }) {
17
- let s = n, l = o, d = p(() => s.options.findIndex((e) => e.value === s.modelValue)), h = p(() => `translateX(${Math.max(d.value, 0) * 100}%)`);
18
- return (o, s) => (i(), c("div", {
19
- role: "radiogroup",
20
- class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
21
- style: t({
22
- gridTemplateColumns: `repeat(${n.options.length}, 1fr)`,
23
- backgroundColor: "var(--tpl-bg-hover)"
24
- })
25
- }, [d.value >= 0 ? (i(), c("div", {
26
- key: 0,
27
- class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
28
- style: t({
29
- left: "4px",
30
- width: `calc((100% - 8px) / ${n.options.length})`,
31
- transform: h.value,
32
- backgroundColor: "var(--tpl-bg)",
33
- boxShadow: "var(--tpl-shadow)",
34
- transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
35
- })
36
- }, null, 4)) : m("", !0), (i(!0), c(f, null, e(n.options, (e) => (i(), c("button", {
37
- key: e.value,
38
- role: "radio",
39
- "aria-checked": n.modelValue === e.value,
40
- "aria-label": e.label,
41
- class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
42
- style: t({
43
- color: n.modelValue === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
44
- transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
45
- }),
46
- title: e.label,
47
- onClick: (t) => l("update:modelValue", e.value)
48
- }, [e.icon ? (i(), u(r(e.icon), {
49
- key: 0,
50
- size: 14,
51
- "stroke-width": 2
52
- })) : (i(), c("span", y, a(e.label), 1))], 12, v))), 128))], 4));
53
- }
54
- }), x = { class: "tpl:mb-3.5" }, S = /* @__PURE__ */ o({
55
- __name: "FieldRow",
56
- props: { label: {} },
57
- setup(e) {
58
- return (t, r) => (i(), c("div", x, [e.label ? (i(), c("label", {
59
- key: 0,
60
- class: n(d(h))
61
- }, a(e.label), 3)) : m("", !0), l(t.$slots, "default")]));
62
- }
63
- }), C = { class: "tpl:flex tpl:items-stretch" }, w = [
64
- "value",
65
- "min",
66
- "max"
67
- ], T = /* @__PURE__ */ o({
68
- __name: "NumberWithSuffix",
69
- props: {
70
- modelValue: {},
71
- min: {},
72
- max: {},
73
- suffix: {}
74
- },
75
- emits: ["update:modelValue"],
76
- setup(e, { emit: t }) {
77
- let r = t;
78
- return (t, o) => (i(), c("div", C, [s("input", {
79
- type: "number",
80
- class: n(d(_)),
81
- value: e.modelValue,
82
- min: e.min,
83
- max: e.max,
84
- onInput: o[0] ||= (e) => r("update:modelValue", Number(e.target.value))
85
- }, null, 42, w), s("span", { class: n(d(g)) }, a(e.suffix), 3)]));
86
- }
87
- });
88
- //#endregion
89
- export { S as n, b as r, T as t };
@@ -1,125 +0,0 @@
1
- import { A as e, Dt as t, Et as n, I as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, h as d, l as f, m as p, nt as m, r as h, s as g, u as ee, z as _ } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { a as v } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import "./useEditorCore-kKUemYY6.js";
4
- import { B as y, P as b, h as x } from "./keys-DFaIbGR8.js";
5
- import { t as S } from "./useI18n-BNMzZTM5.js";
6
- import { t as te } from "./loader-circle-s9Rh5lLd.js";
7
- import { n as ne } from "./useCloudI18n-PCDOC2kz.js";
8
- import { t as re } from "./ToggleSwitch-DUNuUPsZ.js";
9
- import { t as C } from "./TplModal-BDDyvT-C.js";
10
- //#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
11
- var w = ["aria-busy"], T = {
12
- id: "tpl-save-module-title",
13
- class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
14
- }, E = { class: "tpl:mb-3" }, D = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, O = ["placeholder", "disabled"], k = { class: "tpl:mb-3" }, A = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, j = { class: "tpl:max-h-40 tpl:space-y-1 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:p-2 tpl:border-[var(--tpl-border)]" }, M = {
15
- key: 0,
16
- role: "alert",
17
- class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
18
- }, N = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, P = ["disabled"], F = ["disabled"], I = {
19
- key: 0,
20
- class: "tpl:flex tpl:items-center tpl:gap-1.5"
21
- }, L = { key: 1 }, R = /* @__PURE__ */ c({
22
- __name: "SaveModuleDialog",
23
- props: {
24
- visible: { type: Boolean },
25
- preSelectedBlockId: {}
26
- },
27
- emits: ["close", "saved"],
28
- setup(c, { emit: R }) {
29
- let z = c, B = R, { t: V } = S(), { t: H } = ne(), U = y(x, "SaveModuleDialog"), W = y(b, "SaveModuleDialog"), G = s(""), K = s(/* @__PURE__ */ new Set()), q = s(!1), J = s(null), Y = g(() => U.content.value.blocks);
30
- function X(e, t) {
31
- let n = e.type;
32
- return `${V.blocks[n] ?? e.type} ${t + 1}`;
33
- }
34
- r(() => z.visible, (e) => {
35
- e && (G.value = "", J.value = null, K.value = new Set(z.preSelectedBlockId ? [z.preSelectedBlockId] : []));
36
- });
37
- function ie(e) {
38
- let t = new Set(K.value);
39
- t.has(e) ? t.delete(e) : t.add(e), K.value = t;
40
- }
41
- let Z = g(() => G.value.trim().length > 0 && K.value.size > 0 && !q.value);
42
- async function Q() {
43
- if (Z.value) {
44
- q.value = !0, J.value = null;
45
- try {
46
- let e = Y.value.filter((e) => K.value.has(e.id));
47
- await W.createModule(G.value.trim(), e), B("saved"), B("close");
48
- } catch (e) {
49
- J.value = e.message;
50
- } finally {
51
- q.value = !1;
52
- }
53
- }
54
- }
55
- function $() {
56
- q.value || B("close");
57
- }
58
- function ae(e) {
59
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
60
- }
61
- return (r, s) => (i(), f(C, {
62
- visible: c.visible,
63
- onClose: $,
64
- onKeydown: ae
65
- }, {
66
- default: o(() => [l("div", {
67
- role: "dialog",
68
- "aria-modal": "true",
69
- "aria-busy": q.value,
70
- "aria-labelledby": "tpl-save-module-title",
71
- class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
72
- style: {
73
- "background-color": "var(--tpl-bg-elevated)",
74
- "box-shadow": "var(--tpl-shadow-xl)"
75
- }
76
- }, [
77
- l("h3", T, a(m(H).modules.saveAsModule), 1),
78
- l("div", E, [l("label", D, a(m(H).modules.moduleName), 1), _(l("input", {
79
- "onUpdate:modelValue": s[0] ||= (e) => G.value = e,
80
- type: "text",
81
- placeholder: m(H).modules.moduleNamePlaceholder,
82
- class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
83
- disabled: q.value
84
- }, null, 8, O), [[v, G.value]])]),
85
- l("div", k, [l("label", A, a(m(H).modules.selectBlocks), 1), l("div", j, [(i(!0), u(h, null, e(Y.value, (e, n) => (i(), f(re, {
86
- key: e.id,
87
- class: "tpl:rounded-sm tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:transition-colors tpl:duration-100",
88
- style: t({
89
- color: "var(--tpl-text)",
90
- backgroundColor: K.value.has(e.id) ? "var(--tpl-primary-light)" : "transparent"
91
- }),
92
- "model-value": K.value.has(e.id),
93
- label: X(e, n),
94
- disabled: q.value,
95
- "onUpdate:modelValue": (t) => ie(e.id)
96
- }, null, 8, [
97
- "style",
98
- "model-value",
99
- "label",
100
- "disabled",
101
- "onUpdate:modelValue"
102
- ]))), 128))])]),
103
- J.value ? (i(), u("p", M, a(J.value), 1)) : ee("", !0),
104
- l("div", N, [l("button", {
105
- type: "button",
106
- class: n(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": q.value }]),
107
- disabled: q.value,
108
- onClick: $
109
- }, a(m(H).modules.cancel), 11, P), l("button", {
110
- type: "button",
111
- class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
112
- disabled: !Z.value,
113
- onClick: Q
114
- }, [q.value ? (i(), u("span", I, [d(m(te), {
115
- class: "tpl:animate-spin",
116
- size: 12,
117
- "stroke-width": 2
118
- }), p(" " + a(m(H).modules.saving), 1)])) : (i(), u("span", L, a(m(H).modules.save), 1))], 8, F)])
119
- ], 8, w)]),
120
- _: 1
121
- }, 8, ["visible"]));
122
- }
123
- });
124
- //#endregion
125
- export { R as default };
@@ -1,37 +0,0 @@
1
- import { Et as e, O as t, Ot as n, _ as r, c as i, d as a, j as o, m as s, u as c } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- //#region src/components/ToggleSwitch.vue?vue&type=script&setup=true&lang.ts
3
- var l = { key: 0 }, u = {
4
- key: 0,
5
- class: "tpl:text-[var(--tpl-danger)]"
6
- }, d = [
7
- "aria-checked",
8
- "aria-label",
9
- "disabled"
10
- ], f = /* @__PURE__ */ r({
11
- __name: "ToggleSwitch",
12
- props: {
13
- modelValue: { type: Boolean },
14
- label: {},
15
- disabled: { type: Boolean },
16
- required: { type: Boolean }
17
- },
18
- emits: ["update:modelValue"],
19
- setup(r, { emit: f }) {
20
- let p = f;
21
- return (f, m) => (t(), a("label", { class: e(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", r.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [f.$slots.default || r.label || r.required ? (t(), a("span", l, [o(f.$slots, "default", {}, () => [s(n(r.label), 1)]), r.required ? (t(), a("span", u, " *")) : c("", !0)])) : c("", !0), i("button", {
22
- type: "button",
23
- role: "switch",
24
- "aria-checked": r.modelValue,
25
- "aria-label": r.label,
26
- disabled: r.disabled,
27
- class: e([
28
- "tpl:relative tpl:inline-flex tpl:h-5 tpl:w-9 tpl:shrink-0 tpl:rounded-full tpl:border-2 tpl:border-transparent tpl:transition-colors tpl:duration-200",
29
- r.modelValue ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-border)]",
30
- r.disabled ? "tpl:cursor-not-allowed tpl:opacity-60" : "tpl:cursor-pointer"
31
- ]),
32
- onClick: m[0] ||= (e) => !r.disabled && p("update:modelValue", !r.modelValue)
33
- }, [i("span", { class: e(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", r.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, d)], 2));
34
- }
35
- });
36
- //#endregion
37
- export { f as t };