@templatical/editor 0.26.2 → 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 (285) 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-zvfvE7f-.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-CLvv5Ija.js → ParagraphEditor-vDU-5y6r.js} +202 -199
  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-KWlaiLlr.js → SavedBlocksBrowserModal-CefWWcdT.js} +116 -115
  25. package/dist/{cdn/chunks/SavedBlocksPanels-e4HyTZ8v.js → SavedBlocksPanels-DnQwO-7O.js} +9 -11
  26. package/dist/{SavedBlocksPickBar-C3h8oL3r.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-CZAG1gQE.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-2_85L_CL.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-DPtiMsVz.js → BlockPreviewCanvas-DStQFo9P.js} +42 -42
  45. package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.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-BF469_AN.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-Bzcma_Lm.js → ParagraphEditor-BJJ925sx.js} +235 -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-C59D4G5C.js → SavedBlocksBrowserModal-BerMxAUt.js} +114 -113
  83. package/dist/cdn/chunks/SavedBlocksBrowserModal-BerMxAUt.js.map +1 -0
  84. package/dist/{SavedBlocksPanels-CQsZvWO_.js → cdn/chunks/SavedBlocksPanels-BUE4lzVP.js} +11 -9
  85. package/dist/cdn/chunks/{SavedBlocksPanels-e4HyTZ8v.js.map → SavedBlocksPanels-BUE4lzVP.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-DMHxPCM4.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-B6goIAxT.js → cdn/chunks/TestEmailPanel-DqTDh5ri.js} +6 -4
  93. package/dist/cdn/chunks/{TestEmailPanel-CZAG1gQE.js.map → TestEmailPanel-DqTDh5ri.js.map} +1 -1
  94. package/dist/cdn/chunks/{TitleEditor-D0_LY2Ex.js → TitleEditor-nUAF7fKr.js} +85 -84
  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/cdn/chunks/{en-DlqX2YWZ.js → en-DbBNy67B.js} +70 -7
  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-C7h52yuk.js → extensions-CMcVw2uu.js} +81 -67
  129. package/dist/cdn/chunks/extensions-CMcVw2uu.js.map +1 -0
  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-CUKUsRzX.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-CKQ9gmoo.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/{en-DlqX2YWZ.js → en-DbBNy67B.js} +69 -6
  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-DzKNPITR.js → extensions-CX87G4aL.js} +71 -57
  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-idmPLUeb.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-BY6mubnR.js +0 -63
  226. package/dist/BlockPreviewCanvas-DbNOqSI1.js +0 -121
  227. package/dist/CloudEditor-DEnMNMbm.js +0 -1188
  228. package/dist/ColorPicker-ClETsjA3.js +0 -550
  229. package/dist/CommentsSidebar-CdRCCSDD.js +0 -435
  230. package/dist/SaveBlockDialog-fVp_PwZi.js +0 -265
  231. package/dist/SnapshotHistory-DjA3Ej_i.js +0 -128
  232. package/dist/TestEmailModal-EM0RP_9L.js +0 -205
  233. package/dist/TitleEditor-JEaP9jVF.js +0 -197
  234. package/dist/TplModal-DoneXIj_.js +0 -49
  235. package/dist/cdn/chunks/AiChatSidebar-CQ8KUmNB.js.map +0 -1
  236. package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js +0 -63
  237. package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js.map +0 -1
  238. package/dist/cdn/chunks/CloudEditor-CQ830jJt.js +0 -1166
  239. package/dist/cdn/chunks/CloudEditor-CQ830jJt.js.map +0 -1
  240. package/dist/cdn/chunks/CollaboratorBar-BF469_AN.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-Bzcma_Lm.js.map +0 -1
  250. package/dist/cdn/chunks/RichTextEditorContent-DtL49Jpo.js.map +0 -1
  251. package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js +0 -264
  252. package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js.map +0 -1
  253. package/dist/cdn/chunks/SavedBlocksBrowserModal-C59D4G5C.js.map +0 -1
  254. package/dist/cdn/chunks/SavedBlocksPickBar-DMHxPCM4.js.map +0 -1
  255. package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js +0 -121
  256. package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js.map +0 -1
  257. package/dist/cdn/chunks/TemplateScoringPanel-NucRtAP0.js.map +0 -1
  258. package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js +0 -205
  259. package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js.map +0 -1
  260. package/dist/cdn/chunks/TitleEditor-D0_LY2Ex.js.map +0 -1
  261. package/dist/cdn/chunks/TplModal-iCmoKB2k.js +0 -50
  262. package/dist/cdn/chunks/TplModal-iCmoKB2k.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/extensions-C7h52yuk.js.map +0 -1
  272. package/dist/cdn/chunks/fr-Cm85vB2g.js.map +0 -1
  273. package/dist/cdn/chunks/keys-Cmc2Yl3D.js.map +0 -1
  274. package/dist/cdn/chunks/nl-dmiIX7oT.js.map +0 -1
  275. package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +0 -1
  276. package/dist/cdn/chunks/pt-BR-CaIG-7EM.js.map +0 -1
  277. package/dist/cdn/chunks/src-CUKUsRzX.js.map +0 -1
  278. package/dist/cdn/chunks/src-xkGep9eN.js.map +0 -1
  279. package/dist/cdn/chunks/styles-CND3ey2g.js +0 -4140
  280. package/dist/cdn/chunks/styles-CND3ey2g.js.map +0 -1
  281. package/dist/cdn/chunks/timeouts-SsLMC4a3.js +0 -6
  282. package/dist/cdn/chunks/timeouts-SsLMC4a3.js.map +0 -1
  283. package/dist/cdn/chunks/useEditorCore-CKQ9gmoo.js.map +0 -1
  284. package/dist/styles-BK36D1sy.js +0 -4318
  285. package/dist/usePopoverPosition-C0dPEF4X.js +0 -308
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollaboratorBar-BH_lZlat.js","names":[],"sources":["../../../src/cloud/components/CollaboratorBar.vue","../../../src/cloud/components/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;iCAcM,IAAa;;;;;;;EAPnB,IAAM,IAAQ,GAKR,EAAE,GAAG,MAAW,EAAmB,GAInC,IAAuB,QAC3B,EAAM,cAAc,MAAM,GAAG,CAAU,CACzC,GAEM,IAAwB,QAC5B,EAAM,cAAc,MAAM,CAAU,CACtC,GAEM,IAAgB,QAAe,EAAsB,MAAM,MAAM,GAEjE,IAAgB,QACpB,EAAsB,MAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAC1D;EAEA,SAAS,EAAY,GAAsB;GACzC,IAAM,IAAQ,EAAK,KAAK,CAAC,CAAC,MAAM,KAAK;GAMrC,OALI,EAAM,UAAU,KAEhB,EAAM,EAAE,CAAC,OAAO,CAAC,IAAI,EAAM,EAAM,SAAS,EAAE,CAAC,OAAO,CAAC,EAAA,CACrD,YAAY,IAET,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY;EACpC;oBAIE,EAAA,GAAA,EA0CM,OA1CN,GA0CM,CAxCJ,EAaM,OAAA;GAZJ,OAAM;GACL,OAAK,EAAA,EAAmB,OAAA,EAAA,cAAW,uBAAA,wBAAA,CAAA;GAGnC,OAAgB,EAAA,cAAwB,EAAA,CAAA,CAAM,CAAC,cAAc,YAAsB,EAAA,CAAA,CAAM,CAAC,cAAc;EAM7F,GAAA,CAAA,EAAA,eAAZ,EAAA,GAAA,EAAwD,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;EACnD,CAAA,MAAA,EAAA,GAAA,EAA+C,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;EAKpC,CAAA,EAAA,GAAA,IAAA,CAAA,GAAA,EAAA,cAAc,SAAM,KAD5B,EAAA,GAAA,EAuBM,OAvBN,GAuBM,EAnBJ,EAAA,EAAA,GAAA,EAWM,GAAA,MAAA,EAVmB,EAAA,QAAhB,OADT,EAAA,GAAA,EAWM,OAAA;GATH,KAAK,EAAa;GACnB,OAAM;GACL,OAAK,EAAA;IAA+B,iBAAA,EAAa;IAAwB,OAAA,EAAA,CAAA,CAAiB,CAAC,EAAa,KAAK;;GAI7G,OAAO,EAAa;EAElB,GAAA,EAAA,EAAY,EAAa,IAAI,CAAA,GAAA,IAAA,CAAA,EAG1B,GAAA,GAAA,IAAA,EAAA,QAAa,KADrB,EAAA,GAAA,EAMM,OAAA;;GAJJ,OAAM;GACL,OAAO,EAAA;EACT,GAAA,OACE,EAAG,EAAA,KAAa,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
@@ -0,0 +1,502 @@
1
+ import { E as e, F as t, H as n, N as r, Q as i, S as a, at as o, b as s, c, ct as l, d as ee, f as u, g as d, h as f, l as te, lt as p, m as ne, n as re, p as m, u as ie } from "./draggable-BfpsXFg7.js";
2
+ import { t as ae } from "./dist-CM8TB0VD.js";
3
+ import { B as oe, H as se, u as ce } from "./keys-CbQuRX85.js";
4
+ import { t as le } from "./useI18n-DVWCJJFH.js";
5
+ import { a as ue, i as h, n as de, r as g, t as fe } from "./usePopoverPosition-BC-HA7TK.js";
6
+ import { n as _ } from "./icons-C36Ha5VU.js";
7
+ import { u as v } from "./styleConstants-ByDqaYj_.js";
8
+ //#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
9
+ var y = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, b = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
10
+ 360 / (Math.PI * 2);
11
+ var x = (e) => k(S(e)), S = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
12
+ r: parseInt(e[0] + e[0], 16),
13
+ g: parseInt(e[1] + e[1], 16),
14
+ b: parseInt(e[2] + e[2], 16),
15
+ a: e.length === 4 ? b(parseInt(e[3] + e[3], 16) / 255, 2) : 1
16
+ } : {
17
+ r: parseInt(e.substring(0, 2), 16),
18
+ g: parseInt(e.substring(2, 4), 16),
19
+ b: parseInt(e.substring(4, 6), 16),
20
+ a: e.length === 8 ? b(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
21
+ }), C = (e) => O(E(e)), w = ({ h: e, s: t, v: n, a: r }) => {
22
+ let i = (200 - t) * n / 100;
23
+ return {
24
+ h: b(e),
25
+ s: b(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
26
+ l: b(i / 2),
27
+ a: b(r, 2)
28
+ };
29
+ }, T = (e) => {
30
+ let { h: t, s: n, l: r } = w(e);
31
+ return `hsl(${t}, ${n}%, ${r}%)`;
32
+ }, E = ({ h: e, s: t, v: n, a: r }) => {
33
+ e = e / 360 * 6, t /= 100, n /= 100;
34
+ 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;
35
+ return {
36
+ r: b([
37
+ n,
38
+ o,
39
+ a,
40
+ a,
41
+ s,
42
+ n
43
+ ][c] * 255),
44
+ g: b([
45
+ s,
46
+ n,
47
+ n,
48
+ o,
49
+ a,
50
+ a
51
+ ][c] * 255),
52
+ b: b([
53
+ a,
54
+ a,
55
+ s,
56
+ n,
57
+ n,
58
+ o
59
+ ][c] * 255),
60
+ a: b(r, 2)
61
+ };
62
+ }, D = (e) => {
63
+ let t = e.toString(16);
64
+ return t.length < 2 ? "0" + t : t;
65
+ }, O = ({ r: e, g: t, b: n, a: r }) => {
66
+ let i = r < 1 ? D(b(r * 255)) : "";
67
+ return "#" + D(e) + D(t) + D(n) + i;
68
+ }, k = ({ r: e, g: t, b: n, a: r }) => {
69
+ 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;
70
+ return {
71
+ h: b(60 * (o < 0 ? o + 6 : o)),
72
+ s: b(i ? a / i * 100 : 0),
73
+ v: b(i / 255 * 100),
74
+ a: r
75
+ };
76
+ }, A = (e, t) => {
77
+ if (e === t) return !0;
78
+ for (let n in e) if (e[n] !== t[n]) return !1;
79
+ return !0;
80
+ }, j = (e, t) => e.toLowerCase() === t.toLowerCase() || A(S(e), S(t)), M = {}, N = (e) => {
81
+ let t = M[e];
82
+ return t || (t = document.createElement("template"), t.innerHTML = e, M[e] = t), t;
83
+ }, P = (e, t, n) => {
84
+ e.dispatchEvent(new CustomEvent(t, {
85
+ bubbles: !0,
86
+ detail: n
87
+ }));
88
+ }, F = !1, I = (e) => "touches" in e, L = (e) => F && !I(e) ? !1 : (F ||= I(e), !0), R = (e, t) => {
89
+ let n = I(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
90
+ P(e.el, "move", e.getMove({
91
+ x: y((n.pageX - (r.left + window.pageXOffset)) / r.width),
92
+ y: y((n.pageY - (r.top + window.pageYOffset)) / r.height)
93
+ }));
94
+ }, z = (e, t) => {
95
+ let n = t.keyCode;
96
+ n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), P(e.el, "move", e.getMove({
97
+ x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
98
+ y: n === 40 ? .01 : n === 38 ? -.01 : 0
99
+ }, !0)));
100
+ }, B = class {
101
+ constructor(e, t, n, r) {
102
+ let i = N(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
103
+ e.appendChild(i.content.cloneNode(!0));
104
+ let a = e.querySelector(`[part=${t}]`);
105
+ a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
106
+ }
107
+ set dragging(e) {
108
+ let t = e ? document.addEventListener : document.removeEventListener;
109
+ t(F ? "touchmove" : "mousemove", this), t(F ? "touchend" : "mouseup", this);
110
+ }
111
+ handleEvent(e) {
112
+ switch (e.type) {
113
+ case "mousedown":
114
+ case "touchstart":
115
+ if (e.preventDefault(), !L(e) || !F && e.button != 0) return;
116
+ this.el.focus(), R(this, e), this.dragging = !0;
117
+ break;
118
+ case "mousemove":
119
+ case "touchmove":
120
+ e.preventDefault(), R(this, e);
121
+ break;
122
+ case "mouseup":
123
+ case "touchend":
124
+ this.dragging = !1;
125
+ break;
126
+ case "keydown": z(this, e);
127
+ }
128
+ }
129
+ style(e) {
130
+ e.forEach((e, t) => {
131
+ for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
132
+ });
133
+ }
134
+ }, V = class extends B {
135
+ constructor(e) {
136
+ super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
137
+ }
138
+ update({ h: e }) {
139
+ this.h = e, this.style([{
140
+ left: `${e / 360 * 100}%`,
141
+ color: T({
142
+ h: e,
143
+ s: 100,
144
+ v: 100,
145
+ a: 1
146
+ })
147
+ }]), this.el.setAttribute("aria-valuenow", `${b(e)}`);
148
+ }
149
+ getMove(e, t) {
150
+ return { h: t ? y(this.h + e.x * 360, 0, 360) : 360 * e.x };
151
+ }
152
+ }, H = class extends B {
153
+ constructor(e) {
154
+ super(e, "saturation", "aria-label=\"Color\"", !0);
155
+ }
156
+ update(e) {
157
+ this.hsva = e, this.style([{
158
+ top: `${100 - e.v}%`,
159
+ left: `${e.s}%`,
160
+ color: T(e)
161
+ }, { "background-color": T({
162
+ h: e.h,
163
+ s: 100,
164
+ v: 100,
165
+ a: 1
166
+ }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${b(e.s)}%, Brightness ${b(e.v)}%`);
167
+ }
168
+ getMove(e, t) {
169
+ return {
170
+ s: t ? y(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
171
+ v: t ? y(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
172
+ };
173
+ }
174
+ }, U = ":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)}", W = "[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}", G = "[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}", K = Symbol("same"), q = Symbol("color"), J = Symbol("hsva"), Y = Symbol("update"), X = Symbol("parts"), Z = Symbol("css"), Q = Symbol("sliders"), pe = class extends HTMLElement {
175
+ static get observedAttributes() {
176
+ return ["color"];
177
+ }
178
+ get [Z]() {
179
+ return [
180
+ U,
181
+ W,
182
+ G
183
+ ];
184
+ }
185
+ get [Q]() {
186
+ return [H, V];
187
+ }
188
+ get color() {
189
+ return this[q];
190
+ }
191
+ set color(e) {
192
+ if (!this[K](e)) {
193
+ let t = this.colorModel.toHsva(e);
194
+ this[Y](t), this[q] = e;
195
+ }
196
+ }
197
+ constructor() {
198
+ super();
199
+ let e = N(`<style>${this[Z].join("")}</style>`), t = this.attachShadow({ mode: "open" });
200
+ t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[X] = this[Q].map((e) => new e(t));
201
+ }
202
+ connectedCallback() {
203
+ if (this.hasOwnProperty("color")) {
204
+ let e = this.color;
205
+ delete this.color, this.color = e;
206
+ } else this.color ||= this.colorModel.defaultColor;
207
+ }
208
+ attributeChangedCallback(e, t, n) {
209
+ let r = this.colorModel.fromAttr(n);
210
+ this[K](r) || (this.color = r);
211
+ }
212
+ handleEvent(e) {
213
+ let t = this[J], n = {
214
+ ...t,
215
+ ...e.detail
216
+ };
217
+ this[Y](n);
218
+ let r;
219
+ !A(n, t) && !this[K](r = this.colorModel.fromHsva(n)) && (this[q] = r, P(this, "color-changed", { value: r }));
220
+ }
221
+ [K](e) {
222
+ return this.color && this.colorModel.equal(e, this.color);
223
+ }
224
+ [Y](e) {
225
+ this[J] = e, this[X].forEach((t) => t.update(e));
226
+ }
227
+ }, $ = {
228
+ defaultColor: "#000",
229
+ toHsva: x,
230
+ fromHsva: ({ h: e, s: t, v: n }) => C({
231
+ h: e,
232
+ s: t,
233
+ v: n,
234
+ a: 1
235
+ }),
236
+ equal: j,
237
+ fromAttr: (e) => e
238
+ }, me = class extends pe {
239
+ get colorModel() {
240
+ return $;
241
+ }
242
+ };
243
+ customElements.define("hex-color-picker", class extends me {});
244
+ //#endregion
245
+ //#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
246
+ var he = [
247
+ "disabled",
248
+ "aria-label",
249
+ "title",
250
+ "aria-expanded"
251
+ ], ge = {
252
+ key: 0,
253
+ class: "tpl:relative tpl:flex-1"
254
+ }, _e = [
255
+ "value",
256
+ "placeholder",
257
+ "disabled",
258
+ "aria-label"
259
+ ], ve = ["aria-label", "title"], ye = ["data-tpl-theme"], be = ["aria-label"], xe = [
260
+ "aria-label",
261
+ "title",
262
+ "aria-checked",
263
+ "tabindex"
264
+ ], Se = [
265
+ "aria-label",
266
+ "title",
267
+ "aria-checked",
268
+ "tabindex",
269
+ "onClick"
270
+ ], Ce = ["color", "aria-label"], we = {
271
+ key: 2,
272
+ class: "tpl:relative tpl:mt-2"
273
+ }, Te = [
274
+ "value",
275
+ "placeholder",
276
+ "disabled",
277
+ "aria-label"
278
+ ], Ee = ["aria-label", "title"], De = /* @__PURE__ */ a({
279
+ __name: "ColorPicker",
280
+ props: {
281
+ modelValue: {},
282
+ placeholder: { default: "" },
283
+ seedColor: { default: "#ffffff" },
284
+ swatchOnly: {
285
+ type: Boolean,
286
+ default: !1
287
+ },
288
+ disabled: {
289
+ type: Boolean,
290
+ default: !1
291
+ },
292
+ size: { default: "md" },
293
+ ariaLabel: { default: "" },
294
+ presets: { default: void 0 },
295
+ allowCustom: {
296
+ type: Boolean,
297
+ default: void 0
298
+ }
299
+ },
300
+ emits: ["update:modelValue"],
301
+ setup(a, { emit: y }) {
302
+ let b = a, x = y, { t: S } = le(), C = i(!1), w = i(), T = i(), E = i(!1);
303
+ ae(w, () => {
304
+ C.value = !1;
305
+ }, { ignore: [T] });
306
+ let D = u(() => !b.modelValue), O = u(() => h(b.modelValue)), k = u(() => h(b.modelValue || b.seedColor)), A = u(() => !b.disabled && !D.value), j = e(ce, ue), M = u(() => [...new Set(b.presets ?? j.presets)]), N = u(() => b.allowCustom ?? j.allowCustom), P = u(() => M.value.length > 0), F = u(() => N.value || !P.value), I = u(() => g(b.modelValue));
307
+ function L(e) {
308
+ return I.value !== "" && g(e) === I.value;
309
+ }
310
+ function R(e) {
311
+ x("update:modelValue", e);
312
+ }
313
+ let z = u(() => P.value && !F.value);
314
+ function B(e) {
315
+ return z.value ? e + 1 : e;
316
+ }
317
+ let V = u(() => {
318
+ if (z.value && D.value) return 0;
319
+ let e = M.value.findIndex((e) => L(e));
320
+ return e === -1 ? 0 : B(e);
321
+ });
322
+ function H() {
323
+ return V.value === 0 ? 0 : -1;
324
+ }
325
+ function U(e) {
326
+ return B(e) === V.value ? 0 : -1;
327
+ }
328
+ function W(e) {
329
+ if (![
330
+ "ArrowRight",
331
+ "ArrowDown",
332
+ "ArrowLeft",
333
+ "ArrowUp"
334
+ ].includes(e.key)) return;
335
+ let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
336
+ r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
337
+ }
338
+ function G(e) {
339
+ E.value = !0, x("update:modelValue", e.detail.value);
340
+ }
341
+ function K() {
342
+ E.value = !1;
343
+ }
344
+ function q() {
345
+ !E.value && D.value && x("update:modelValue", k.value);
346
+ }
347
+ function J(e) {
348
+ x("update:modelValue", e.target.value);
349
+ }
350
+ function Y() {
351
+ x("update:modelValue", "");
352
+ }
353
+ let X = de(), { toLocal: Z } = fe(), Q = e(oe, null), pe = e(se, null), $ = i({
354
+ top: 0,
355
+ left: 0
356
+ });
357
+ function me() {
358
+ if (!b.disabled) {
359
+ if (!C.value) {
360
+ let e = T.value?.getBoundingClientRect();
361
+ if (e) {
362
+ let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
363
+ $.value = Z({
364
+ top: t,
365
+ left: e.left
366
+ });
367
+ }
368
+ }
369
+ C.value = !C.value;
370
+ }
371
+ }
372
+ return (e, i) => (r(), d("div", { class: l(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", a.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
373
+ m("button", {
374
+ ref_key: "swatchRef",
375
+ ref: T,
376
+ type: "button",
377
+ disabled: a.disabled,
378
+ "aria-label": a.ariaLabel || o(S).colorPicker.pickColor,
379
+ title: a.ariaLabel || void 0,
380
+ "aria-expanded": C.value,
381
+ class: l([
382
+ "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)]",
383
+ a.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
384
+ C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !a.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
385
+ a.size === "sm" ? "tpl:size-8" : "tpl:size-10"
386
+ ]),
387
+ onClick: me
388
+ }, [m("span", {
389
+ class: l(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": D.value }]),
390
+ style: p(D.value ? void 0 : { backgroundColor: O.value })
391
+ }, null, 6)], 10, he),
392
+ !a.swatchOnly && F.value ? (r(), d("div", ge, [m("input", {
393
+ type: "text",
394
+ class: l([o(v), "tpl:w-full"]),
395
+ style: p(A.value ? { paddingRight: "2.25rem" } : void 0),
396
+ value: O.value,
397
+ placeholder: a.placeholder || o(S).colorPicker.notSet,
398
+ disabled: a.disabled,
399
+ "aria-label": o(S).colorPicker.hexValue,
400
+ onInput: J
401
+ }, null, 46, _e), A.value ? (r(), d("button", {
402
+ key: 0,
403
+ type: "button",
404
+ "aria-label": o(S).colorPicker.clear,
405
+ title: o(S).colorPicker.clear,
406
+ 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)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
407
+ onClick: Y
408
+ }, [s(o(_), {
409
+ size: 14,
410
+ "stroke-width": 1.5
411
+ })], 8, ve)) : f("", !0)])) : f("", !0),
412
+ (r(), ne(ee, {
413
+ to: o(X),
414
+ disabled: !o(X)
415
+ }, [s(re, {
416
+ "enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
417
+ "enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
418
+ "enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
419
+ "leave-active-class": "tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
420
+ "leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
421
+ "leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
422
+ }, {
423
+ default: n(() => [C.value ? (r(), d("div", {
424
+ key: 0,
425
+ ref_key: "popoverRef",
426
+ ref: w,
427
+ "data-tpl-theme": o(pe),
428
+ 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)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]",
429
+ style: p({
430
+ top: `${$.value.top}px`,
431
+ left: `${$.value.left}px`,
432
+ ...o(Q)
433
+ })
434
+ }, [
435
+ P.value ? (r(), d("div", {
436
+ key: 0,
437
+ role: "radiogroup",
438
+ "aria-label": o(S).colorPicker.presetColors,
439
+ class: l(["tpl:flex tpl:flex-wrap tpl:gap-1.5", F.value && "tpl:mb-2"]),
440
+ onKeydown: W
441
+ }, [z.value ? (r(), d("button", {
442
+ key: 0,
443
+ type: "button",
444
+ role: "radio",
445
+ "aria-label": o(S).colorPicker.clear,
446
+ title: o(S).colorPicker.clear,
447
+ "aria-checked": D.value,
448
+ tabindex: H(),
449
+ class: l(["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)]", D.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
450
+ onClick: Y
451
+ }, null, 10, xe)) : f("", !0), (r(!0), d(ie, null, t(M.value, (e, t) => (r(), d("button", {
452
+ key: e,
453
+ type: "button",
454
+ role: "radio",
455
+ "aria-label": e,
456
+ title: e,
457
+ "aria-checked": L(e),
458
+ tabindex: U(t),
459
+ style: p({ backgroundColor: e }),
460
+ class: l(["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)]", L(e) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
461
+ onClick: (t) => R(e)
462
+ }, null, 14, Se))), 128))], 42, be)) : f("", !0),
463
+ F.value ? (r(), d("hex-color-picker", {
464
+ key: 1,
465
+ color: k.value,
466
+ "aria-label": o(S).colorPicker.pickColor,
467
+ onColorChanged: G,
468
+ onPointerdown: K,
469
+ onPointerup: q,
470
+ onKeydown: i[0] ||= c((e) => C.value = !1, ["escape"])
471
+ }, null, 40, Ce)) : f("", !0),
472
+ a.swatchOnly && F.value ? (r(), d("div", we, [m("input", {
473
+ type: "text",
474
+ class: l([o(v), "tpl:w-full"]),
475
+ style: p(A.value ? { paddingRight: "2.25rem" } : void 0),
476
+ value: O.value,
477
+ placeholder: a.placeholder || o(S).colorPicker.notSet,
478
+ disabled: a.disabled,
479
+ "aria-label": o(S).colorPicker.hexValue,
480
+ onChange: J,
481
+ onKeydown: i[1] ||= c(te((e) => e.target.blur(), ["prevent"]), ["enter"])
482
+ }, null, 46, Te), A.value ? (r(), d("button", {
483
+ key: 0,
484
+ type: "button",
485
+ "aria-label": o(S).colorPicker.clear,
486
+ title: o(S).colorPicker.clear,
487
+ 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)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
488
+ onClick: Y
489
+ }, [s(o(_), {
490
+ size: 14,
491
+ "stroke-width": 1.5
492
+ })], 8, Ee)) : f("", !0)])) : f("", !0)
493
+ ], 12, ye)) : f("", !0)]),
494
+ _: 1
495
+ })], 8, ["to", "disabled"]))
496
+ ], 2));
497
+ }
498
+ });
499
+ //#endregion
500
+ export { De as t };
501
+
502
+ //# sourceMappingURL=ColorPicker-CStXen0Y.js.map