@templatical/editor 0.26.3 → 0.27.0

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 (284) hide show
  1. package/README.md +3 -1
  2. package/dist/{AiChatSidebar-CMBz6Wix.js → AiChatSidebar-iVJDzqjr.js} +60 -60
  3. package/dist/AiFeatureMenu-DvrK-dzj.js +57 -0
  4. package/dist/{BlockIssueBadge-Buk3_6QF.js → BlockIssueBadge-BHysq7XQ.js} +11 -11
  5. package/dist/BlockPreviewCanvas-GZbr0ph5.js +121 -0
  6. package/dist/CloudHeaderExtras-Cx8gFWu2.js +59 -0
  7. package/dist/CloudPanels-D0X449DD.js +227 -0
  8. package/dist/{CollaboratorBar-BGwbg9aN.js → CollaboratorBar-DMSWCrX3.js} +21 -21
  9. package/dist/ColorPicker-DCjFQCAg.js +501 -0
  10. package/dist/CommentsPanel-D5wQB1Kf.js +18 -0
  11. package/dist/CommentsSidebar-BoTIxpLE.js +481 -0
  12. package/dist/{cdn/chunks/CountdownBlock-vLTkTI9e.js → CountdownBlock-BFX8iU90.js} +19 -21
  13. package/dist/{cdn/chunks/CountdownToolbar-DPjcgcVR.js → CountdownToolbar-CSftc9Ma.js} +52 -53
  14. package/dist/{DesignReferenceSidebar-Bx96XFmK.js → DesignReferenceSidebar-DKsx2TiL.js} +72 -71
  15. package/dist/{IssuesPanel-Do7RLXsP.js → IssuesPanel-flKKwKpM.js} +38 -38
  16. package/dist/{LoadingTrack-BexpNuTV.js → LoadingTrack-C2T8ixEL.js} +3 -3
  17. package/dist/{MergeTagModeToggle-P-UguQHc.js → MergeTagModeToggle-PKCoKAoF.js} +43 -43
  18. package/dist/{MergeTagSuggestion-BJ43ihWR.js → MergeTagSuggestion-DGha0WRp.js} +46 -46
  19. package/dist/{cdn/chunks/NumberWithSuffix-BXrRdfq1.js → NumberWithSuffix-DdPCXfKf.js} +42 -44
  20. package/dist/{ParagraphEditor-6WN5jmXr.js → ParagraphEditor-vDU-5y6r.js} +200 -198
  21. package/dist/RestoreVersionDialog-DIn1muFD.js +86 -0
  22. package/dist/{RichTextEditorContent-fbYJXAio.js → RichTextEditorContent-I83k5DtQ.js} +44 -44
  23. package/dist/SaveBlockDialog-C_QvYAeL.js +266 -0
  24. package/dist/{SavedBlocksBrowserModal-GMrajvfV.js → SavedBlocksBrowserModal-CefWWcdT.js} +116 -115
  25. package/dist/{cdn/chunks/SavedBlocksPanels-CUtYoi5Z.js → SavedBlocksPanels-DnQwO-7O.js} +9 -11
  26. package/dist/{SavedBlocksPickBar-Dk_IaMO9.js → SavedBlocksPickBar-BsFubArH.js} +17 -17
  27. package/dist/{TemplateScoringPanel-BZUsb3FD.js → TemplateScoringPanel-Bv_bBsJi.js} +87 -87
  28. package/dist/TestEmailModal-STPWDP79.js +206 -0
  29. package/dist/{cdn/chunks/TestEmailPanel-B8y7JabA.js → TestEmailPanel-HYVjApKZ.js} +4 -6
  30. package/dist/TitleEditor-DnB0EJ_g.js +198 -0
  31. package/dist/TplModal-chvLhXmC.js +49 -0
  32. package/dist/VersionHistoryMenu-Cq4rH56t.js +155 -0
  33. package/dist/VersionHistoryPanels-D7k_F7-9.js +46 -0
  34. package/dist/VersionPreviewBanner-DthyHe6C.js +38 -0
  35. package/dist/{blockTypeIcons-C7wRSaT3.js → blockTypeIcons-B8r4jMBn.js} +6 -6
  36. package/dist/bundle-stats.json +8 -8
  37. package/dist/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +69 -6
  38. package/dist/cdn/chunks/{AiChatSidebar-CQ8KUmNB.js → AiChatSidebar-DTUoBH5a.js} +54 -54
  39. package/dist/cdn/chunks/AiChatSidebar-DTUoBH5a.js.map +1 -0
  40. package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js +57 -0
  41. package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js.map +1 -0
  42. package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js → BlockIssueBadge-UzSSOM_2.js} +13 -13
  43. package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js.map → BlockIssueBadge-UzSSOM_2.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockPreviewCanvas-msj619wT.js → BlockPreviewCanvas-DStQFo9P.js} +42 -42
  45. package/dist/cdn/chunks/{BlockPreviewCanvas-msj619wT.js.map → BlockPreviewCanvas-DStQFo9P.js.map} +1 -1
  46. package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js +60 -0
  47. package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js.map +1 -0
  48. package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js +227 -0
  49. package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js.map +1 -0
  50. package/dist/cdn/chunks/{CollaboratorBar-G_sZDZXw.js → CollaboratorBar-BH_lZlat.js} +22 -22
  51. package/dist/cdn/chunks/CollaboratorBar-BH_lZlat.js.map +1 -0
  52. package/dist/cdn/chunks/ColorPicker-CStXen0Y.js +502 -0
  53. package/dist/cdn/chunks/ColorPicker-CStXen0Y.js.map +1 -0
  54. package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js +20 -0
  55. package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js.map +1 -0
  56. package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js +460 -0
  57. package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js.map +1 -0
  58. package/dist/{CountdownBlock-DuyvGcr8.js → cdn/chunks/CountdownBlock-BYSrJWxg.js} +25 -23
  59. package/dist/cdn/chunks/{CountdownBlock-vLTkTI9e.js.map → CountdownBlock-BYSrJWxg.js.map} +1 -1
  60. package/dist/{CountdownToolbar-CBE9wRaV.js → cdn/chunks/CountdownToolbar-CZPtQIb8.js} +66 -63
  61. package/dist/cdn/chunks/{CountdownToolbar-DPjcgcVR.js.map → CountdownToolbar-CZPtQIb8.js.map} +1 -1
  62. package/dist/cdn/chunks/{DesignReferenceSidebar-B-HFXV0W.js → DesignReferenceSidebar-sZWciECR.js} +64 -64
  63. package/dist/cdn/chunks/DesignReferenceSidebar-sZWciECR.js.map +1 -0
  64. package/dist/cdn/chunks/{IssuesPanel-DKTS4QVb.js → IssuesPanel-CHtetM9i.js} +36 -36
  65. package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +1 -0
  66. package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js → LoadingTrack-Dp_QZvAK.js} +3 -3
  67. package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js.map → LoadingTrack-Dp_QZvAK.js.map} +1 -1
  68. package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js → MergeTagModeToggle-ZwW-5EeN.js} +39 -39
  69. package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js.map → MergeTagModeToggle-ZwW-5EeN.js.map} +1 -1
  70. package/dist/cdn/chunks/{MergeTagSuggestion-Dn8dExNa.js → MergeTagSuggestion-DhllqTA3.js} +47 -47
  71. package/dist/cdn/chunks/MergeTagSuggestion-DhllqTA3.js.map +1 -0
  72. package/dist/{NumberWithSuffix-D37ZWiZh.js → cdn/chunks/NumberWithSuffix-yeQLcCyH.js} +37 -35
  73. package/dist/cdn/chunks/NumberWithSuffix-yeQLcCyH.js.map +1 -0
  74. package/dist/cdn/chunks/{ParagraphEditor-CZ5Z6AgG.js → ParagraphEditor-BJJ925sx.js} +234 -233
  75. package/dist/cdn/chunks/ParagraphEditor-BJJ925sx.js.map +1 -0
  76. package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js +87 -0
  77. package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js.map +1 -0
  78. package/dist/cdn/chunks/{RichTextEditorContent-DtL49Jpo.js → RichTextEditorContent-CfSq2wPR.js} +44 -44
  79. package/dist/cdn/chunks/RichTextEditorContent-CfSq2wPR.js.map +1 -0
  80. package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js +265 -0
  81. package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js.map +1 -0
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BkQXEUE2.js → SavedBlocksBrowserModal-BerMxAUt.js} +114 -113
  83. package/dist/cdn/chunks/SavedBlocksBrowserModal-BerMxAUt.js.map +1 -0
  84. package/dist/{SavedBlocksPanels-DEPmNhi6.js → cdn/chunks/SavedBlocksPanels-BUE4lzVP.js} +11 -9
  85. package/dist/cdn/chunks/{SavedBlocksPanels-CUtYoi5Z.js.map → SavedBlocksPanels-BUE4lzVP.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-C80qJykl.js → SavedBlocksPickBar-4HrqQfvl.js} +17 -17
  87. package/dist/cdn/chunks/SavedBlocksPickBar-4HrqQfvl.js.map +1 -0
  88. package/dist/cdn/chunks/{TemplateScoringPanel-NucRtAP0.js → TemplateScoringPanel-Xdkp2EMY.js} +81 -81
  89. package/dist/cdn/chunks/TemplateScoringPanel-Xdkp2EMY.js.map +1 -0
  90. package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js +206 -0
  91. package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js.map +1 -0
  92. package/dist/{TestEmailPanel-DubocPxf.js → cdn/chunks/TestEmailPanel-DqTDh5ri.js} +6 -4
  93. package/dist/cdn/chunks/{TestEmailPanel-B8y7JabA.js.map → TestEmailPanel-DqTDh5ri.js.map} +1 -1
  94. package/dist/cdn/chunks/{TitleEditor-C8WDXf4P.js → TitleEditor-nUAF7fKr.js} +83 -83
  95. package/dist/cdn/chunks/TitleEditor-nUAF7fKr.js.map +1 -0
  96. package/dist/cdn/chunks/TplModal-C0IqikoV.js +50 -0
  97. package/dist/cdn/chunks/TplModal-C0IqikoV.js.map +1 -0
  98. package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js +148 -0
  99. package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js.map +1 -0
  100. package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js +48 -0
  101. package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js.map +1 -0
  102. package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js +40 -0
  103. package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js.map +1 -0
  104. package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js → blockTypeIcons-hX_W4dqo.js} +2 -2
  105. package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js.map → blockTypeIcons-hX_W4dqo.js.map} +1 -1
  106. package/dist/cdn/chunks/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +70 -7
  107. package/dist/cdn/chunks/ca-Cqg9O8mx.js.map +1 -0
  108. package/dist/{cloud-qINCmQbn.js → cdn/chunks/cloud-BA0OpRh-.js} +400 -609
  109. package/dist/cdn/chunks/cloud-BA0OpRh-.js.map +1 -0
  110. package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js +344 -0
  111. package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js.map +1 -0
  112. package/dist/{de-DHra3lvx.js → cdn/chunks/de-BXmeeFbX.js} +71 -6
  113. package/dist/cdn/chunks/de-BXmeeFbX.js.map +1 -0
  114. package/dist/{de-uVoSP1xF.js → cdn/chunks/de-Dbwm2cON.js} +3 -54
  115. package/dist/cdn/chunks/de-Dbwm2cON.js.map +1 -0
  116. package/dist/cdn/chunks/{dist-B2HKGHnc.js → dist-CM8TB0VD.js} +136 -136
  117. package/dist/cdn/chunks/{dist-B2HKGHnc.js.map → dist-CM8TB0VD.js.map} +1 -1
  118. package/dist/cdn/chunks/{dist-C6z8AjBC.js → dist-CYLJiSiH.js} +63 -63
  119. package/dist/cdn/chunks/{dist-C6z8AjBC.js.map → dist-CYLJiSiH.js.map} +1 -1
  120. package/dist/cdn/chunks/{draggable-DCs9qL-b.js → draggable-BfpsXFg7.js} +916 -905
  121. package/dist/cdn/chunks/{draggable-DCs9qL-b.js.map → draggable-BfpsXFg7.js.map} +1 -1
  122. package/dist/{en-DlqX2YWZ.js → cdn/chunks/en-DbBNy67B.js} +71 -6
  123. package/dist/cdn/chunks/en-DbBNy67B.js.map +1 -0
  124. package/dist/{en-CjhsJxb-.js → cdn/chunks/en-Dzw4EqNI.js} +3 -54
  125. package/dist/cdn/chunks/en-Dzw4EqNI.js.map +1 -0
  126. package/dist/cdn/chunks/{es-Cuss2snv.js → es-JUsAjxWu.js} +70 -7
  127. package/dist/cdn/chunks/es-JUsAjxWu.js.map +1 -0
  128. package/dist/cdn/chunks/{extensions-qhcN3RMT.js → extensions-CMcVw2uu.js} +53 -53
  129. package/dist/cdn/chunks/{extensions-qhcN3RMT.js.map → extensions-CMcVw2uu.js.map} +1 -1
  130. package/dist/{fr-Cm85vB2g.js → cdn/chunks/fr-J3qgXH4h.js} +71 -6
  131. package/dist/cdn/chunks/fr-J3qgXH4h.js.map +1 -0
  132. package/dist/cdn/chunks/{icons-CvYN6zrM.js → icons-C36Ha5VU.js} +11 -11
  133. package/dist/cdn/chunks/{icons-CvYN6zrM.js.map → icons-C36Ha5VU.js.map} +1 -1
  134. package/dist/{keys-fwF3qZax.js → cdn/chunks/keys-CbQuRX85.js} +6 -4
  135. package/dist/cdn/chunks/keys-CbQuRX85.js.map +1 -0
  136. package/dist/cdn/chunks/logger-ByvdoAwq.js +23 -0
  137. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +1 -0
  138. package/dist/cdn/chunks/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +70 -7
  139. package/dist/cdn/chunks/nl-D_4DkqOi.js.map +1 -0
  140. package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js +23 -0
  141. package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js.map +1 -0
  142. package/dist/{pt-BR-CTzHTqJD.js → cdn/chunks/pt-BR-BxzQzWGJ.js} +3 -54
  143. package/dist/cdn/chunks/pt-BR-BxzQzWGJ.js.map +1 -0
  144. package/dist/cdn/chunks/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +70 -7
  145. package/dist/cdn/chunks/pt-BR-KGURyEEQ.js.map +1 -0
  146. package/dist/cdn/chunks/{src-BwbnXShT.js → src-BOjFLNf7.js} +148 -134
  147. package/dist/cdn/chunks/src-BOjFLNf7.js.map +1 -0
  148. package/dist/cdn/chunks/{src-xkGep9eN.js → src-Dq3fgSIx.js} +1448 -1458
  149. package/dist/cdn/chunks/src-Dq3fgSIx.js.map +1 -0
  150. package/dist/cdn/chunks/styleConstants-ByDqaYj_.js +61 -0
  151. package/dist/cdn/chunks/styleConstants-ByDqaYj_.js.map +1 -0
  152. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +6 -0
  153. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +1 -0
  154. package/dist/cdn/chunks/{tiptap-C44S1Cmh.js → tiptap-DmpGap5g.js} +40 -40
  155. package/dist/cdn/chunks/{tiptap-C44S1Cmh.js.map → tiptap-DmpGap5g.js.map} +1 -1
  156. package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js → useAliveFlag-Dtm174fG.js} +2 -2
  157. package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js.map → useAliveFlag-Dtm174fG.js.map} +1 -1
  158. package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js → useCloudI18n-NVa1aeY8.js} +5 -5
  159. package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js.map → useCloudI18n-NVa1aeY8.js.map} +1 -1
  160. package/dist/cdn/chunks/{useEditorCore-CcgxY-Gy.js → useEditorCore-CTu_qZ3W.js} +1434 -1147
  161. package/dist/cdn/chunks/useEditorCore-CTu_qZ3W.js.map +1 -0
  162. package/dist/cdn/chunks/{useI18n-UMs0F71x.js → useI18n-DVWCJJFH.js} +5 -5
  163. package/dist/cdn/chunks/{useI18n-UMs0F71x.js.map → useI18n-DVWCJJFH.js.map} +1 -1
  164. package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js → useMergeTag-BfZBRPQp.js} +4 -4
  165. package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js.map → useMergeTag-BfZBRPQp.js.map} +1 -1
  166. package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js → usePopoverPosition-BC-HA7TK.js} +3 -3
  167. package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js.map → usePopoverPosition-BC-HA7TK.js.map} +1 -1
  168. package/dist/cdn/editor.css +1 -1
  169. package/dist/cdn/editor.js +5103 -284
  170. package/dist/cdn/editor.js.map +1 -1
  171. package/dist/{check-On4TSac-.js → check-DZbmkMQe.js} +1 -1
  172. package/dist/{chevron-down-69EiBGoB.js → chevron-down-nYScOLeZ.js} +1 -1
  173. package/dist/{chevron-up-Dh3MG1Dw.js → chevron-up-CpYpDLnc.js} +1 -1
  174. package/dist/{circle-alert-cilwzafX.js → circle-alert-CuuK6thq.js} +1 -1
  175. package/dist/{clock-Dt0APH92.js → clock-DxkrtqOr.js} +1 -1
  176. package/dist/cloud-BAefVBb_.js +1444 -0
  177. package/dist/createCloudRuntime-Bt8W-ajI.js +342 -0
  178. package/dist/{createLucideIcon-C8WzBYCv.js → createLucideIcon-L-wQXW_R.js} +9 -9
  179. package/dist/{cdn/chunks/de-DHra3lvx.js → de-BXmeeFbX.js} +69 -8
  180. package/dist/{cdn/chunks/de-uVoSP1xF.js → de-Dbwm2cON.js} +1 -56
  181. package/dist/dist-B5iReTtK.js +251 -0
  182. package/dist/{dist-Cl8J0IES.js → dist-Ck9roB6K.js} +42 -42
  183. package/dist/{dist-BpKxrUi2.js → dist-CqcGTIiX.js} +46 -46
  184. package/dist/{cdn/chunks/en-DlqX2YWZ.js → en-DbBNy67B.js} +69 -8
  185. package/dist/{cdn/chunks/en-CjhsJxb-.js → en-Dzw4EqNI.js} +1 -56
  186. package/dist/{es-Cuss2snv.js → es-JUsAjxWu.js} +69 -6
  187. package/dist/{extensions-Cwg9S-0f.js → extensions-CX87G4aL.js} +42 -42
  188. package/dist/{cdn/chunks/fr-Cm85vB2g.js → fr-J3qgXH4h.js} +69 -8
  189. package/dist/{image-up-Ceggh_R3.js → image-up-DouZRGVt.js} +1 -1
  190. package/dist/index.d.ts +499 -23
  191. package/dist/{info-DO5odBcZ.js → info-puX5V6Iq.js} +1 -1
  192. package/dist/{cdn/chunks/keys-Cmc2Yl3D.js → keys-BxixS0TN.js} +4 -6
  193. package/dist/{list-checks-BSkPKbuI.js → list-checks-jw-ZlvWY.js} +1 -1
  194. package/dist/{loader-circle-bO7o7_HD.js → loader-circle-DqTxB7Kr.js} +1 -1
  195. package/dist/logger-BBlvSn6q.js +21 -0
  196. package/dist/{message-circle-BEkAk65X.js → message-circle-BZ7YpB22.js} +1 -1
  197. package/dist/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +69 -6
  198. package/dist/{pencil-t6m0EtKL.js → pencil-DmbRhTJu.js} +1 -1
  199. package/dist/preRenderCustomBlocks-BebjKtmw.js +21 -0
  200. package/dist/{cdn/chunks/pt-BR-CTzHTqJD.js → pt-BR-BxzQzWGJ.js} +1 -56
  201. package/dist/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +69 -6
  202. package/dist/{refresh-cw-CkOYVzK5.js → refresh-cw-OK_O-cL0.js} +1 -1
  203. package/dist/{runtime-dom.esm-bundler-CepEmvwF.js → runtime-dom.esm-bundler-BgKXIPLV.js} +144 -144
  204. package/dist/{scan-line-DwSVj25O.js → scan-line-DyaSTsJ5.js} +1 -1
  205. package/dist/{send-CWsWN8PQ.js → send-B-wasJJC.js} +1 -1
  206. package/dist/{shield-check-qje8Kufw.js → shield-check-DUIyRrTo.js} +1 -1
  207. package/dist/{sparkles-DumaWRW-.js → sparkles-DYEMATWC.js} +1 -1
  208. package/dist/style.css +1 -1
  209. package/dist/styleConstants-ByDqaYj_.js +59 -0
  210. package/dist/templatical-editor.js +5303 -289
  211. package/dist/{text-align-start-Ir8Ah4mT.js → text-align-start-CzjLeBLe.js} +1 -1
  212. package/dist/timeouts-DHPZQ0G3.js +4 -0
  213. package/dist/{trash-2-CklAFCmO.js → trash-2-C0shEPry.js} +1 -1
  214. package/dist/{triangle-alert-BBi4n93g.js → triangle-alert-Fw0ce8oQ.js} +1 -1
  215. package/dist/{upload-sVqqppuv.js → upload-D69C2CBx.js} +3 -4
  216. package/dist/{useAliveFlag-cvyBxHp7.js → useAliveFlag-BGIAZii_.js} +1 -1
  217. package/dist/{useCloudI18n-DKVm6PCa.js → useCloudI18n-CAZTZ9_a.js} +2 -2
  218. package/dist/{useEditorCore-P4UkhcyS.js → useEditorCore-B-kONNRw.js} +1604 -1320
  219. package/dist/{useI18n-DoVKdCTH.js → useI18n-BfXff_Sy.js} +2 -2
  220. package/dist/{useMergeTag-CYZk7dZD.js → useMergeTag-Dd4I7kge.js} +3 -3
  221. package/dist/usePopoverPosition-CxhCX3SQ.js +59 -0
  222. package/dist/{vue.runtime.esm-bundler-D1diBMsm.js → vue.runtime.esm-bundler-DzEsDRtY.js} +447 -436
  223. package/dist/{x-Mby7KlhS.js → x-BjTlFqRv.js} +1 -1
  224. package/package.json +7 -7
  225. package/dist/AiFeatureMenu-Cy-PVrNT.js +0 -63
  226. package/dist/BlockPreviewCanvas-BZKslwGI.js +0 -121
  227. package/dist/CloudEditor-CPRkQCRa.js +0 -1188
  228. package/dist/ColorPicker-ClETsjA3.js +0 -550
  229. package/dist/CommentsSidebar-CdRCCSDD.js +0 -435
  230. package/dist/SaveBlockDialog-21vDlEBS.js +0 -265
  231. package/dist/SnapshotHistory-Cb4WW2gf.js +0 -128
  232. package/dist/TestEmailModal-BHDKmd6B.js +0 -205
  233. package/dist/TitleEditor-Cy4B3UNe.js +0 -198
  234. package/dist/TplModal-Dv9zgSWI.js +0 -49
  235. package/dist/cdn/chunks/AiChatSidebar-CQ8KUmNB.js.map +0 -1
  236. package/dist/cdn/chunks/AiFeatureMenu-Cb9gaRBn.js +0 -63
  237. package/dist/cdn/chunks/AiFeatureMenu-Cb9gaRBn.js.map +0 -1
  238. package/dist/cdn/chunks/CloudEditor-DbyEsIxu.js +0 -1166
  239. package/dist/cdn/chunks/CloudEditor-DbyEsIxu.js.map +0 -1
  240. package/dist/cdn/chunks/CollaboratorBar-G_sZDZXw.js.map +0 -1
  241. package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js +0 -552
  242. package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js.map +0 -1
  243. package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js +0 -412
  244. package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js.map +0 -1
  245. package/dist/cdn/chunks/DesignReferenceSidebar-B-HFXV0W.js.map +0 -1
  246. package/dist/cdn/chunks/IssuesPanel-DKTS4QVb.js.map +0 -1
  247. package/dist/cdn/chunks/MergeTagSuggestion-Dn8dExNa.js.map +0 -1
  248. package/dist/cdn/chunks/NumberWithSuffix-BXrRdfq1.js.map +0 -1
  249. package/dist/cdn/chunks/ParagraphEditor-CZ5Z6AgG.js.map +0 -1
  250. package/dist/cdn/chunks/RichTextEditorContent-DtL49Jpo.js.map +0 -1
  251. package/dist/cdn/chunks/SaveBlockDialog-CVIVZEuy.js +0 -264
  252. package/dist/cdn/chunks/SaveBlockDialog-CVIVZEuy.js.map +0 -1
  253. package/dist/cdn/chunks/SavedBlocksBrowserModal-BkQXEUE2.js.map +0 -1
  254. package/dist/cdn/chunks/SavedBlocksPickBar-C80qJykl.js.map +0 -1
  255. package/dist/cdn/chunks/SnapshotHistory-DFinMrg_.js +0 -121
  256. package/dist/cdn/chunks/SnapshotHistory-DFinMrg_.js.map +0 -1
  257. package/dist/cdn/chunks/TemplateScoringPanel-NucRtAP0.js.map +0 -1
  258. package/dist/cdn/chunks/TestEmailModal-IxS-QjeH.js +0 -205
  259. package/dist/cdn/chunks/TestEmailModal-IxS-QjeH.js.map +0 -1
  260. package/dist/cdn/chunks/TitleEditor-C8WDXf4P.js.map +0 -1
  261. package/dist/cdn/chunks/TplModal-Ce0QuHyo.js +0 -50
  262. package/dist/cdn/chunks/TplModal-Ce0QuHyo.js.map +0 -1
  263. package/dist/cdn/chunks/ca-D1zgI9fQ.js.map +0 -1
  264. package/dist/cdn/chunks/cloud-DcC8bPwn.js +0 -1787
  265. package/dist/cdn/chunks/cloud-DcC8bPwn.js.map +0 -1
  266. package/dist/cdn/chunks/de-DHra3lvx.js.map +0 -1
  267. package/dist/cdn/chunks/de-uVoSP1xF.js.map +0 -1
  268. package/dist/cdn/chunks/en-CjhsJxb-.js.map +0 -1
  269. package/dist/cdn/chunks/en-DlqX2YWZ.js.map +0 -1
  270. package/dist/cdn/chunks/es-Cuss2snv.js.map +0 -1
  271. package/dist/cdn/chunks/fr-Cm85vB2g.js.map +0 -1
  272. package/dist/cdn/chunks/keys-Cmc2Yl3D.js.map +0 -1
  273. package/dist/cdn/chunks/nl-dmiIX7oT.js.map +0 -1
  274. package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +0 -1
  275. package/dist/cdn/chunks/pt-BR-CaIG-7EM.js.map +0 -1
  276. package/dist/cdn/chunks/src-BwbnXShT.js.map +0 -1
  277. package/dist/cdn/chunks/src-xkGep9eN.js.map +0 -1
  278. package/dist/cdn/chunks/styles-DLAfU4Uf.js +0 -4140
  279. package/dist/cdn/chunks/styles-DLAfU4Uf.js.map +0 -1
  280. package/dist/cdn/chunks/timeouts-SsLMC4a3.js +0 -6
  281. package/dist/cdn/chunks/timeouts-SsLMC4a3.js.map +0 -1
  282. package/dist/cdn/chunks/useEditorCore-CcgxY-Gy.js.map +0 -1
  283. package/dist/styles-Dx__pP9O.js +0 -4318
  284. package/dist/usePopoverPosition-C0dPEF4X.js +0 -308
@@ -1,552 +0,0 @@
1
- import { M as e, P as t, T as n, V as r, Z as i, c as a, ct as o, d as s, f as c, g as l, h as u, it as d, l as ee, m as te, n as ne, p as f, st as p, u as re, x as m, y as h } from "./draggable-DCs9qL-b.js";
2
- import { t as ie } from "./dist-B2HKGHnc.js";
3
- import { U as ae, V as oe, u as se } from "./keys-Cmc2Yl3D.js";
4
- import { t as ce } from "./useI18n-UMs0F71x.js";
5
- import { a as le, i as ue, n as de, r as g, t as fe } from "./usePopoverPosition-cf8Y-ynK.js";
6
- import { n as pe } from "./icons-CvYN6zrM.js";
7
- //#region src/constants/styleConstants.ts
8
- var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]", v = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", y = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-l-[var(--tpl-radius-sm)] tpl:rounded-r-none tpl:border-r-0 tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", b = "tpl:flex tpl:items-center tpl:px-2.5 tpl:text-xs tpl:border tpl:border-l-0 tpl:text-[var(--tpl-text-dim)] tpl:bg-[var(--tpl-bg-hover)] tpl:border-[var(--tpl-border)] tpl:rounded-r-[var(--tpl-radius-sm)]", x = "tpl:flex-1 tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-mono tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", S = "tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:border tpl:border-[var(--tpl-border)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)]", C = "tpl:flex tpl:size-8 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]", w = "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]", T = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2.5 tpl:py-2 tpl:font-mono tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-150 tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", E = "tpl-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3.5 tpl:py-2 tpl:text-sm tpl:font-medium tpl:whitespace-nowrap tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary)] hover:tpl:text-[var(--tpl-bg)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", D = [
9
- "10px",
10
- "12px",
11
- "14px",
12
- "16px",
13
- "18px",
14
- "20px",
15
- "24px",
16
- "28px",
17
- "32px",
18
- "36px",
19
- "48px",
20
- "64px"
21
- ], O = [
22
- "1",
23
- "1.2",
24
- "1.4",
25
- "1.5",
26
- "1.6",
27
- "1.8",
28
- "2",
29
- "2.5"
30
- ], k = [
31
- {
32
- label: "Normal",
33
- value: "normal"
34
- },
35
- {
36
- label: "-0.5px",
37
- value: "-0.5px"
38
- },
39
- {
40
- label: "0.5px",
41
- value: "0.5px"
42
- },
43
- {
44
- label: "1px",
45
- value: "1px"
46
- },
47
- {
48
- label: "1.5px",
49
- value: "1.5px"
50
- },
51
- {
52
- label: "2px",
53
- value: "2px"
54
- },
55
- {
56
- label: "3px",
57
- value: "3px"
58
- }
59
- ], A = "#000000", j = "#ffffff", me = "#ffff00", M = "#f2f2f2", N = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, P = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
60
- 360 / (Math.PI * 2);
61
- var F = (e) => U(I(e)), I = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
62
- r: parseInt(e[0] + e[0], 16),
63
- g: parseInt(e[1] + e[1], 16),
64
- b: parseInt(e[2] + e[2], 16),
65
- a: e.length === 4 ? P(parseInt(e[3] + e[3], 16) / 255, 2) : 1
66
- } : {
67
- r: parseInt(e.substring(0, 2), 16),
68
- g: parseInt(e.substring(2, 4), 16),
69
- b: parseInt(e.substring(4, 6), 16),
70
- a: e.length === 8 ? P(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
71
- }), L = (e) => H(B(e)), R = ({ h: e, s: t, v: n, a: r }) => {
72
- let i = (200 - t) * n / 100;
73
- return {
74
- h: P(e),
75
- s: P(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
76
- l: P(i / 2),
77
- a: P(r, 2)
78
- };
79
- }, z = (e) => {
80
- let { h: t, s: n, l: r } = R(e);
81
- return `hsl(${t}, ${n}%, ${r}%)`;
82
- }, B = ({ h: e, s: t, v: n, a: r }) => {
83
- e = e / 360 * 6, t /= 100, n /= 100;
84
- let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
85
- return {
86
- r: P([
87
- n,
88
- o,
89
- a,
90
- a,
91
- s,
92
- n
93
- ][c] * 255),
94
- g: P([
95
- s,
96
- n,
97
- n,
98
- o,
99
- a,
100
- a
101
- ][c] * 255),
102
- b: P([
103
- a,
104
- a,
105
- s,
106
- n,
107
- n,
108
- o
109
- ][c] * 255),
110
- a: P(r, 2)
111
- };
112
- }, V = (e) => {
113
- let t = e.toString(16);
114
- return t.length < 2 ? "0" + t : t;
115
- }, H = ({ r: e, g: t, b: n, a: r }) => {
116
- let i = r < 1 ? V(P(r * 255)) : "";
117
- return "#" + V(e) + V(t) + V(n) + i;
118
- }, U = ({ r: e, g: t, b: n, a: r }) => {
119
- let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
120
- return {
121
- h: P(60 * (o < 0 ? o + 6 : o)),
122
- s: P(i ? a / i * 100 : 0),
123
- v: P(i / 255 * 100),
124
- a: r
125
- };
126
- }, W = (e, t) => {
127
- if (e === t) return !0;
128
- for (let n in e) if (e[n] !== t[n]) return !1;
129
- return !0;
130
- }, he = (e, t) => e.toLowerCase() === t.toLowerCase() || W(I(e), I(t)), G = {}, K = (e) => {
131
- let t = G[e];
132
- return t || (t = document.createElement("template"), t.innerHTML = e, G[e] = t), t;
133
- }, q = (e, t, n) => {
134
- e.dispatchEvent(new CustomEvent(t, {
135
- bubbles: !0,
136
- detail: n
137
- }));
138
- }, J = !1, Y = (e) => "touches" in e, ge = (e) => J && !Y(e) ? !1 : (J ||= Y(e), !0), X = (e, t) => {
139
- let n = Y(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
140
- q(e.el, "move", e.getMove({
141
- x: N((n.pageX - (r.left + window.pageXOffset)) / r.width),
142
- y: N((n.pageY - (r.top + window.pageYOffset)) / r.height)
143
- }));
144
- }, _e = (e, t) => {
145
- let n = t.keyCode;
146
- n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), q(e.el, "move", e.getMove({
147
- x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
148
- y: n === 40 ? .01 : n === 38 ? -.01 : 0
149
- }, !0)));
150
- }, ve = class {
151
- constructor(e, t, n, r) {
152
- let i = K(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
153
- e.appendChild(i.content.cloneNode(!0));
154
- let a = e.querySelector(`[part=${t}]`);
155
- a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
156
- }
157
- set dragging(e) {
158
- let t = e ? document.addEventListener : document.removeEventListener;
159
- t(J ? "touchmove" : "mousemove", this), t(J ? "touchend" : "mouseup", this);
160
- }
161
- handleEvent(e) {
162
- switch (e.type) {
163
- case "mousedown":
164
- case "touchstart":
165
- if (e.preventDefault(), !ge(e) || !J && e.button != 0) return;
166
- this.el.focus(), X(this, e), this.dragging = !0;
167
- break;
168
- case "mousemove":
169
- case "touchmove":
170
- e.preventDefault(), X(this, e);
171
- break;
172
- case "mouseup":
173
- case "touchend":
174
- this.dragging = !1;
175
- break;
176
- case "keydown": _e(this, e);
177
- }
178
- }
179
- style(e) {
180
- e.forEach((e, t) => {
181
- for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
182
- });
183
- }
184
- }, ye = class extends ve {
185
- constructor(e) {
186
- super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
187
- }
188
- update({ h: e }) {
189
- this.h = e, this.style([{
190
- left: `${e / 360 * 100}%`,
191
- color: z({
192
- h: e,
193
- s: 100,
194
- v: 100,
195
- a: 1
196
- })
197
- }]), this.el.setAttribute("aria-valuenow", `${P(e)}`);
198
- }
199
- getMove(e, t) {
200
- return { h: t ? N(this.h + e.x * 360, 0, 360) : 360 * e.x };
201
- }
202
- }, be = class extends ve {
203
- constructor(e) {
204
- super(e, "saturation", "aria-label=\"Color\"", !0);
205
- }
206
- update(e) {
207
- this.hsva = e, this.style([{
208
- top: `${100 - e.v}%`,
209
- left: `${e.s}%`,
210
- color: z(e)
211
- }, { "background-color": z({
212
- h: e.h,
213
- s: 100,
214
- v: 100,
215
- a: 1
216
- }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${P(e.s)}%, Brightness ${P(e.v)}%`);
217
- }
218
- getMove(e, t) {
219
- return {
220
- s: t ? N(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
221
- v: t ? N(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
222
- };
223
- }
224
- }, xe = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", Se = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", Ce = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", Z = Symbol("same"), Q = Symbol("color"), we = Symbol("hsva"), $ = Symbol("update"), Te = Symbol("parts"), Ee = Symbol("css"), De = Symbol("sliders"), Oe = class extends HTMLElement {
225
- static get observedAttributes() {
226
- return ["color"];
227
- }
228
- get [Ee]() {
229
- return [
230
- xe,
231
- Se,
232
- Ce
233
- ];
234
- }
235
- get [De]() {
236
- return [be, ye];
237
- }
238
- get color() {
239
- return this[Q];
240
- }
241
- set color(e) {
242
- if (!this[Z](e)) {
243
- let t = this.colorModel.toHsva(e);
244
- this[$](t), this[Q] = e;
245
- }
246
- }
247
- constructor() {
248
- super();
249
- let e = K(`<style>${this[Ee].join("")}</style>`), t = this.attachShadow({ mode: "open" });
250
- t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Te] = this[De].map((e) => new e(t));
251
- }
252
- connectedCallback() {
253
- if (this.hasOwnProperty("color")) {
254
- let e = this.color;
255
- delete this.color, this.color = e;
256
- } else this.color ||= this.colorModel.defaultColor;
257
- }
258
- attributeChangedCallback(e, t, n) {
259
- let r = this.colorModel.fromAttr(n);
260
- this[Z](r) || (this.color = r);
261
- }
262
- handleEvent(e) {
263
- let t = this[we], n = {
264
- ...t,
265
- ...e.detail
266
- };
267
- this[$](n);
268
- let r;
269
- !W(n, t) && !this[Z](r = this.colorModel.fromHsva(n)) && (this[Q] = r, q(this, "color-changed", { value: r }));
270
- }
271
- [Z](e) {
272
- return this.color && this.colorModel.equal(e, this.color);
273
- }
274
- [$](e) {
275
- this[we] = e, this[Te].forEach((t) => t.update(e));
276
- }
277
- }, ke = {
278
- defaultColor: "#000",
279
- toHsva: F,
280
- fromHsva: ({ h: e, s: t, v: n }) => L({
281
- h: e,
282
- s: t,
283
- v: n,
284
- a: 1
285
- }),
286
- equal: he,
287
- fromAttr: (e) => e
288
- }, Ae = class extends Oe {
289
- get colorModel() {
290
- return ke;
291
- }
292
- };
293
- customElements.define("hex-color-picker", class extends Ae {});
294
- //#endregion
295
- //#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
296
- var je = [
297
- "disabled",
298
- "aria-label",
299
- "title",
300
- "aria-expanded"
301
- ], Me = {
302
- key: 0,
303
- class: "tpl:relative tpl:flex-1"
304
- }, Ne = [
305
- "value",
306
- "placeholder",
307
- "disabled",
308
- "aria-label"
309
- ], Pe = ["aria-label", "title"], Fe = ["data-tpl-theme"], Ie = ["aria-label"], Le = [
310
- "aria-label",
311
- "title",
312
- "aria-checked",
313
- "tabindex"
314
- ], Re = [
315
- "aria-label",
316
- "title",
317
- "aria-checked",
318
- "tabindex",
319
- "onClick"
320
- ], ze = ["color", "aria-label"], Be = {
321
- key: 2,
322
- class: "tpl:relative tpl:mt-2"
323
- }, Ve = [
324
- "value",
325
- "placeholder",
326
- "disabled",
327
- "aria-label"
328
- ], He = ["aria-label", "title"], Ue = /* @__PURE__ */ m({
329
- __name: "ColorPicker",
330
- props: {
331
- modelValue: {},
332
- placeholder: { default: "" },
333
- seedColor: { default: "#ffffff" },
334
- swatchOnly: {
335
- type: Boolean,
336
- default: !1
337
- },
338
- disabled: {
339
- type: Boolean,
340
- default: !1
341
- },
342
- size: { default: "md" },
343
- ariaLabel: { default: "" },
344
- presets: { default: void 0 },
345
- allowCustom: {
346
- type: Boolean,
347
- default: void 0
348
- }
349
- },
350
- emits: ["update:modelValue"],
351
- setup(m, { emit: _ }) {
352
- let v = m, y = _, { t: b } = ce(), S = i(!1), C = i(), w = i(), T = i(!1);
353
- ie(C, () => {
354
- S.value = !1;
355
- }, { ignore: [w] });
356
- let E = c(() => !v.modelValue), D = c(() => ue(v.modelValue)), O = c(() => ue(v.modelValue || v.seedColor)), k = c(() => !v.disabled && !E.value), A = n(se, le), j = c(() => [...new Set(v.presets ?? A.presets)]), me = c(() => v.allowCustom ?? A.allowCustom), M = c(() => j.value.length > 0), N = c(() => me.value || !M.value), P = c(() => g(v.modelValue));
357
- function F(e) {
358
- return P.value !== "" && g(e) === P.value;
359
- }
360
- function I(e) {
361
- y("update:modelValue", e);
362
- }
363
- let L = c(() => M.value && !N.value);
364
- function R(e) {
365
- return L.value ? e + 1 : e;
366
- }
367
- let z = c(() => {
368
- if (L.value && E.value) return 0;
369
- let e = j.value.findIndex((e) => F(e));
370
- return e === -1 ? 0 : R(e);
371
- });
372
- function B() {
373
- return z.value === 0 ? 0 : -1;
374
- }
375
- function V(e) {
376
- return R(e) === z.value ? 0 : -1;
377
- }
378
- function H(e) {
379
- if (![
380
- "ArrowRight",
381
- "ArrowDown",
382
- "ArrowLeft",
383
- "ArrowUp"
384
- ].includes(e.key)) return;
385
- let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
386
- r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
387
- }
388
- function U(e) {
389
- T.value = !0, y("update:modelValue", e.detail.value);
390
- }
391
- function W() {
392
- T.value = !1;
393
- }
394
- function he() {
395
- !T.value && E.value && y("update:modelValue", O.value);
396
- }
397
- function G(e) {
398
- y("update:modelValue", e.target.value);
399
- }
400
- function K() {
401
- y("update:modelValue", "");
402
- }
403
- let q = de(), { toLocal: J } = fe(), Y = n(oe, null), ge = n(ae, null), X = i({
404
- top: 0,
405
- left: 0
406
- });
407
- function _e() {
408
- if (!v.disabled) {
409
- if (!S.value) {
410
- let e = w.value?.getBoundingClientRect();
411
- if (e) {
412
- let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
413
- X.value = J({
414
- top: t,
415
- left: e.left
416
- });
417
- }
418
- }
419
- S.value = !S.value;
420
- }
421
- }
422
- return (n, i) => (e(), l("div", { class: p(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", m.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
423
- f("button", {
424
- ref_key: "swatchRef",
425
- ref: w,
426
- type: "button",
427
- disabled: m.disabled,
428
- "aria-label": m.ariaLabel || d(b).colorPicker.pickColor,
429
- title: m.ariaLabel || void 0,
430
- "aria-expanded": S.value,
431
- class: p([
432
- "tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
433
- m.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
434
- S.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !m.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
435
- m.size === "sm" ? "tpl:size-8" : "tpl:size-10"
436
- ]),
437
- onClick: _e
438
- }, [f("span", {
439
- class: p(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": E.value }]),
440
- style: o(E.value ? void 0 : { backgroundColor: D.value })
441
- }, null, 6)], 10, je),
442
- !m.swatchOnly && N.value ? (e(), l("div", Me, [f("input", {
443
- type: "text",
444
- class: p([d(x), "tpl:w-full"]),
445
- style: o(k.value ? { paddingRight: "2.25rem" } : void 0),
446
- value: D.value,
447
- placeholder: m.placeholder || d(b).colorPicker.notSet,
448
- disabled: m.disabled,
449
- "aria-label": d(b).colorPicker.hexValue,
450
- onInput: G
451
- }, null, 46, Ne), k.value ? (e(), l("button", {
452
- key: 0,
453
- type: "button",
454
- "aria-label": d(b).colorPicker.clear,
455
- title: d(b).colorPicker.clear,
456
- class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
457
- onClick: K
458
- }, [h(d(pe), {
459
- size: 14,
460
- "stroke-width": 1.5
461
- })], 8, Pe)) : u("", !0)])) : u("", !0),
462
- (e(), te(s, {
463
- to: d(q),
464
- disabled: !d(q)
465
- }, [h(ne, {
466
- "enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
467
- "enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
468
- "enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
469
- "leave-active-class": "tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
470
- "leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
471
- "leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
472
- }, {
473
- default: r(() => [S.value ? (e(), l("div", {
474
- key: 0,
475
- ref_key: "popoverRef",
476
- ref: C,
477
- "data-tpl-theme": d(ge),
478
- class: "tpl-color-popover tpl:absolute tpl:z-modal tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg",
479
- style: o({
480
- top: `${X.value.top}px`,
481
- left: `${X.value.left}px`,
482
- ...d(Y)
483
- })
484
- }, [
485
- M.value ? (e(), l("div", {
486
- key: 0,
487
- role: "radiogroup",
488
- "aria-label": d(b).colorPicker.presetColors,
489
- class: p(["tpl:flex tpl:flex-wrap tpl:gap-1.5", N.value && "tpl:mb-2"]),
490
- onKeydown: H
491
- }, [L.value ? (e(), l("button", {
492
- key: 0,
493
- type: "button",
494
- role: "radio",
495
- "aria-label": d(b).colorPicker.clear,
496
- title: d(b).colorPicker.clear,
497
- "aria-checked": E.value,
498
- tabindex: B(),
499
- class: p(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", E.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
500
- onClick: K
501
- }, null, 10, Le)) : u("", !0), (e(!0), l(re, null, t(j.value, (t, n) => (e(), l("button", {
502
- key: t,
503
- type: "button",
504
- role: "radio",
505
- "aria-label": t,
506
- title: t,
507
- "aria-checked": F(t),
508
- tabindex: V(n),
509
- style: o({ backgroundColor: t }),
510
- class: p(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", F(t) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
511
- onClick: (e) => I(t)
512
- }, null, 14, Re))), 128))], 42, Ie)) : u("", !0),
513
- N.value ? (e(), l("hex-color-picker", {
514
- key: 1,
515
- color: O.value,
516
- "aria-label": d(b).colorPicker.pickColor,
517
- onColorChanged: U,
518
- onPointerdown: W,
519
- onPointerup: he,
520
- onKeydown: i[0] ||= a((e) => S.value = !1, ["escape"])
521
- }, null, 40, ze)) : u("", !0),
522
- m.swatchOnly && N.value ? (e(), l("div", Be, [f("input", {
523
- type: "text",
524
- class: p([d(x), "tpl:w-full"]),
525
- style: o(k.value ? { paddingRight: "2.25rem" } : void 0),
526
- value: D.value,
527
- placeholder: m.placeholder || d(b).colorPicker.notSet,
528
- disabled: m.disabled,
529
- "aria-label": d(b).colorPicker.hexValue,
530
- onChange: G,
531
- onKeydown: i[1] ||= a(ee((e) => e.target.blur(), ["prevent"]), ["enter"])
532
- }, null, 46, Ve), k.value ? (e(), l("button", {
533
- key: 0,
534
- type: "button",
535
- "aria-label": d(b).colorPicker.clear,
536
- title: d(b).colorPicker.clear,
537
- class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
538
- onClick: K
539
- }, [h(d(pe), {
540
- size: 14,
541
- "stroke-width": 1.5
542
- })], 8, He)) : u("", !0)])) : u("", !0)
543
- ], 12, Fe)) : u("", !0)]),
544
- _: 1
545
- })], 8, ["to", "disabled"]))
546
- ], 2));
547
- }
548
- });
549
- //#endregion
550
- export { C as _, A as a, O as c, E as d, v as f, T as g, _ as h, M as i, w as l, b as m, j as n, D as o, y as p, me as r, k as s, Ue as t, S as u };
551
-
552
- //# sourceMappingURL=ColorPicker-W_UyiVGc.js.map