@templatical/editor 0.41.0 → 0.42.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 (187) hide show
  1. package/dist/{AiChatSidebar-a8TPBAl2.js → AiChatSidebar-DqSoJAXx.js} +1 -1
  2. package/dist/{AiFeatureMenu-CroDMqRG.js → AiFeatureMenu-CoBvE72q.js} +1 -1
  3. package/dist/{BlockPreviewCanvas-Z9SZIgfA.js → BlockPreviewCanvas-W6-MRpWz.js} +33 -33
  4. package/dist/{CloudHeaderExtras-CVqHeqc6.js → CloudHeaderExtras-AbsNuL9T.js} +1 -1
  5. package/dist/{CloudPanels-CmEpQUJB.js → CloudPanels-BNL6rSeB.js} +2 -2
  6. package/dist/{CollaboratorBar-AIQC9fEF.js → CollaboratorBar-DlZ-wOL_.js} +1 -1
  7. package/dist/{CountdownToolbar-DkC-qSgq.js → CountdownToolbar-Bnq25sR-.js} +3 -3
  8. package/dist/{DesignReferenceSidebar-OoiYJAKS.js → DesignReferenceSidebar-Cl5eE8Kn.js} +1 -1
  9. package/dist/{LogicTagInsertButton-BimKobaG.js → LogicTagInsertButton-SI6irEtn.js} +243 -219
  10. package/dist/{MergeTagInput-DqpVzhy7.js → MergeTagInput-BMQGNh1k.js} +1 -1
  11. package/dist/{MergeTagModeToggle-BkIiAgpQ.js → MergeTagModeToggle-Cm9s-w6o.js} +1 -1
  12. package/dist/{ParagraphEditor-DaZ03d1U.js → ParagraphEditor-CnBPQCVo.js} +19 -19
  13. package/dist/{RestoreVersionDialog-DHb1mPoF.js → RestoreVersionDialog-B13whpxH.js} +1 -1
  14. package/dist/{RichTextEditorContent-AEtfKvLz.js → RichTextEditorContent-DOvhgc-7.js} +3 -3
  15. package/dist/{SaveBlockDialog-hGwLDWfE.js → SaveBlockDialog-b5yrQfoN.js} +5 -5
  16. package/dist/{SavedBlocksBrowserModal-C0lYVBFi.js → SavedBlocksBrowserModal-DpqK4Zqp.js} +4 -4
  17. package/dist/{SavedBlocksPanels-CaTbeVDv.js → SavedBlocksPanels-C2wURIlT.js} +1 -1
  18. package/dist/{SavedBlocksPickBar-DR2afid2.js → SavedBlocksPickBar-Bx9_SXVA.js} +1 -1
  19. package/dist/{TemplateSettings-BD1WNP4C.js → TemplateSettings-Gn9ps1R6.js} +3 -3
  20. package/dist/{TestEmailModal-DqoosG1u.js → TestEmailModal-DaIaklcg.js} +5 -5
  21. package/dist/{TestEmailPanel-DpozqyHF.js → TestEmailPanel-CKSvzakC.js} +1 -1
  22. package/dist/{TitleEditor-BCBdZLt_.js → TitleEditor-C66Jk73n.js} +7 -7
  23. package/dist/{ToggleSwitch-CJfQ8u57.js → ToggleSwitch-BqttX9lY.js} +1 -1
  24. package/dist/{Toolbar-C7SjilzH.js → Toolbar-DVsKYQaC.js} +846 -553
  25. package/dist/{TplModal-CVO-2KrU.js → TplModal-DRQln7xH.js} +2 -2
  26. package/dist/{VersionHistoryPanels-BzF7dmwa.js → VersionHistoryPanels-Df5WjNah.js} +1 -1
  27. package/dist/{WrapperBlock-BDjOn3fY.js → WrapperBlock-B0cUORGz.js} +4 -4
  28. package/dist/{blockTypeIcons-B0Bq1WT1.js → blockTypeIcons-DfQNZnl7.js} +1 -1
  29. package/dist/bundle-stats.json +6 -6
  30. package/dist/{ca-Ckgw9yd0.js → ca--zGWn9AU.js} +14 -0
  31. package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js → AiChatSidebar-DD17BwXn.js} +10 -10
  32. package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js.map → AiChatSidebar-DD17BwXn.js.map} +1 -1
  33. package/dist/cdn/chunks/{AiFeatureMenu-Cx3qdStQ.js → AiFeatureMenu-Di381OsL.js} +5 -5
  34. package/dist/cdn/chunks/{AiFeatureMenu-Cx3qdStQ.js.map → AiFeatureMenu-Di381OsL.js.map} +1 -1
  35. package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js → BlockIssueBadge-BR_N3nRh.js} +2 -2
  36. package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js.map → BlockIssueBadge-BR_N3nRh.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockPreviewCanvas-D31TNib3.js → BlockPreviewCanvas-BXpcAiiY.js} +28 -28
  38. package/dist/cdn/chunks/{BlockPreviewCanvas-D31TNib3.js.map → BlockPreviewCanvas-BXpcAiiY.js.map} +1 -1
  39. package/dist/cdn/chunks/{CloudHeaderExtras-0zdlKiq7.js → CloudHeaderExtras-BEM2eWfF.js} +3 -3
  40. package/dist/cdn/chunks/{CloudHeaderExtras-0zdlKiq7.js.map → CloudHeaderExtras-BEM2eWfF.js.map} +1 -1
  41. package/dist/cdn/chunks/{CloudPanels-DPh71yOO.js → CloudPanels-D7nK1-bm.js} +4 -4
  42. package/dist/cdn/chunks/{CloudPanels-DPh71yOO.js.map → CloudPanels-D7nK1-bm.js.map} +1 -1
  43. package/dist/cdn/chunks/{CollaboratorBar-lCZU8qkg.js → CollaboratorBar-D1SUwahw.js} +3 -3
  44. package/dist/cdn/chunks/{CollaboratorBar-lCZU8qkg.js.map → CollaboratorBar-D1SUwahw.js.map} +1 -1
  45. package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js → CommentsPanel-qsLMAlJU.js} +2 -2
  46. package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js.map → CommentsPanel-qsLMAlJU.js.map} +1 -1
  47. package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js → CommentsSidebar-CTwEE-s_.js} +16 -16
  48. package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js.map → CommentsSidebar-CTwEE-s_.js.map} +1 -1
  49. package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js → CountdownToolbar-BJTcnIQ-.js} +4 -4
  50. package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js.map → CountdownToolbar-BJTcnIQ-.js.map} +1 -1
  51. package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js → DesignReferenceSidebar-Dl3eEGtS.js} +9 -9
  52. package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js.map → DesignReferenceSidebar-Dl3eEGtS.js.map} +1 -1
  53. package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js → IssuesPanel-L9Gq_T8n.js} +8 -8
  54. package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js.map → IssuesPanel-L9Gq_T8n.js.map} +1 -1
  55. package/dist/cdn/chunks/{LogicTagInsertButton-CHc1yZ9v.js → LogicTagInsertButton-3pIbVE9p.js} +250 -226
  56. package/dist/cdn/chunks/LogicTagInsertButton-3pIbVE9p.js.map +1 -0
  57. package/dist/cdn/chunks/{MediaEditModal-Cw9MhjVz.js → MediaEditModal-rTjYl-fV.js} +2 -2
  58. package/dist/cdn/chunks/{MediaEditModal-Cw9MhjVz.js.map → MediaEditModal-rTjYl-fV.js.map} +1 -1
  59. package/dist/cdn/chunks/{MediaPanels-FD_aX3H5.js → MediaPanels-DMXRQVqg.js} +2 -2
  60. package/dist/cdn/chunks/{MediaPanels-FD_aX3H5.js.map → MediaPanels-DMXRQVqg.js.map} +1 -1
  61. package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js → MergeTagInput-JcBzr77a.js} +2 -2
  62. package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js.map → MergeTagInput-JcBzr77a.js.map} +1 -1
  63. package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js → MergeTagModeToggle-CYmueXS2.js} +10 -10
  64. package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js.map → MergeTagModeToggle-CYmueXS2.js.map} +1 -1
  65. package/dist/cdn/chunks/{ParagraphEditor-w2qEZTkM.js → ParagraphEditor-DbjFDnYm.js} +39 -39
  66. package/dist/cdn/chunks/{ParagraphEditor-w2qEZTkM.js.map → ParagraphEditor-DbjFDnYm.js.map} +1 -1
  67. package/dist/cdn/chunks/{RestoreVersionDialog-cnWVN3nX.js → RestoreVersionDialog-pANCWcce.js} +3 -3
  68. package/dist/cdn/chunks/{RestoreVersionDialog-cnWVN3nX.js.map → RestoreVersionDialog-pANCWcce.js.map} +1 -1
  69. package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js → RichTextEditorContent-BtM1or8A.js} +5 -5
  70. package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js.map → RichTextEditorContent-BtM1or8A.js.map} +1 -1
  71. package/dist/cdn/chunks/{SaveBlockDialog-jxQtKnVs.js → SaveBlockDialog-CGM3mrGj.js} +38 -38
  72. package/dist/cdn/chunks/{SaveBlockDialog-jxQtKnVs.js.map → SaveBlockDialog-CGM3mrGj.js.map} +1 -1
  73. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DpXWf4Pi.js → SavedBlocksBrowserModal-C6Z8AvtD.js} +10 -10
  74. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DpXWf4Pi.js.map → SavedBlocksBrowserModal-C6Z8AvtD.js.map} +1 -1
  75. package/dist/cdn/chunks/{SavedBlocksPanels-B-ASmf1P.js → SavedBlocksPanels-DNwKmnhp.js} +2 -2
  76. package/dist/cdn/chunks/{SavedBlocksPanels-B-ASmf1P.js.map → SavedBlocksPanels-DNwKmnhp.js.map} +1 -1
  77. package/dist/cdn/chunks/{SavedBlocksPickBar-CEFIQ8Nd.js → SavedBlocksPickBar-D2p1ufB4.js} +3 -3
  78. package/dist/cdn/chunks/{SavedBlocksPickBar-CEFIQ8Nd.js.map → SavedBlocksPickBar-D2p1ufB4.js.map} +1 -1
  79. package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js → TemplateScoringPanel-BDB4RErx.js} +19 -19
  80. package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js.map → TemplateScoringPanel-BDB4RErx.js.map} +1 -1
  81. package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js → TemplateSettings-DVN1t3yF.js} +9 -9
  82. package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js.map → TemplateSettings-DVN1t3yF.js.map} +1 -1
  83. package/dist/cdn/chunks/{TestEmailModal-CrjzVw8e.js → TestEmailModal-DZBCmBtT.js} +7 -7
  84. package/dist/cdn/chunks/{TestEmailModal-CrjzVw8e.js.map → TestEmailModal-DZBCmBtT.js.map} +1 -1
  85. package/dist/cdn/chunks/{TestEmailPanel-k9vdulTu.js → TestEmailPanel-1ibwYCUl.js} +2 -2
  86. package/dist/cdn/chunks/{TestEmailPanel-k9vdulTu.js.map → TestEmailPanel-1ibwYCUl.js.map} +1 -1
  87. package/dist/cdn/chunks/{TitleEditor-laILWfKh.js → TitleEditor-BRl2qKbd.js} +13 -13
  88. package/dist/cdn/chunks/{TitleEditor-laILWfKh.js.map → TitleEditor-BRl2qKbd.js.map} +1 -1
  89. package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js → ToggleSwitch-niSL2uog.js} +2 -2
  90. package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js.map → ToggleSwitch-niSL2uog.js.map} +1 -1
  91. package/dist/cdn/chunks/{Toolbar-BsiHW9gY.js → Toolbar-tTl0P-rr.js} +814 -566
  92. package/dist/cdn/chunks/Toolbar-tTl0P-rr.js.map +1 -0
  93. package/dist/cdn/chunks/{TplModal-D8DoPbFa.js → TplModal-C_eIPykE.js} +3 -3
  94. package/dist/cdn/chunks/{TplModal-D8DoPbFa.js.map → TplModal-C_eIPykE.js.map} +1 -1
  95. package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js → VersionHistoryMenu-Ww57XAzj.js} +7 -7
  96. package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js.map → VersionHistoryMenu-Ww57XAzj.js.map} +1 -1
  97. package/dist/cdn/chunks/{VersionHistoryPanels-zw1AtzGN.js → VersionHistoryPanels-w0EG_qVW.js} +2 -2
  98. package/dist/cdn/chunks/{VersionHistoryPanels-zw1AtzGN.js.map → VersionHistoryPanels-w0EG_qVW.js.map} +1 -1
  99. package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js → VersionPreviewBanner-Bbd4C-AN.js} +2 -2
  100. package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js.map → VersionPreviewBanner-Bbd4C-AN.js.map} +1 -1
  101. package/dist/cdn/chunks/{WrapperBlock-CpRvfAV0.js → WrapperBlock-Ch4KeMIb.js} +4 -4
  102. package/dist/cdn/chunks/{WrapperBlock-CpRvfAV0.js.map → WrapperBlock-Ch4KeMIb.js.map} +1 -1
  103. package/dist/cdn/chunks/blockTypeIcons-CyPXFh7L.js +21 -0
  104. package/dist/cdn/chunks/{blockTypeIcons-raBjStuv.js.map → blockTypeIcons-CyPXFh7L.js.map} +1 -1
  105. package/dist/cdn/chunks/{ca-Ckgw9yd0.js → ca--zGWn9AU.js} +15 -1
  106. package/dist/cdn/chunks/ca--zGWn9AU.js.map +1 -0
  107. package/dist/cdn/chunks/{cloud-CIT4yPp4.js → cloud-De-eh1u6.js} +2 -2
  108. package/dist/cdn/chunks/{cloud-CIT4yPp4.js.map → cloud-De-eh1u6.js.map} +1 -1
  109. package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js → createCloudRuntime-DsaUaWvr.js} +3 -3
  110. package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js.map → createCloudRuntime-DsaUaWvr.js.map} +1 -1
  111. package/dist/cdn/chunks/{de-D4dweQw8.js → de-BRNLKcDl.js} +15 -1
  112. package/dist/cdn/chunks/de-BRNLKcDl.js.map +1 -0
  113. package/dist/cdn/chunks/{editor-modal-CKu8HhiB.js → editor-modal-BdI0iA5r.js} +88 -88
  114. package/dist/cdn/chunks/{editor-modal-CKu8HhiB.js.map → editor-modal-BdI0iA5r.js.map} +1 -1
  115. package/dist/cdn/chunks/en-Cs-nw16K.js +2 -0
  116. package/dist/{en-VE7R7NyL.js → cdn/chunks/en-JJjqHMjy.js} +16 -0
  117. package/dist/cdn/chunks/en-JJjqHMjy.js.map +1 -0
  118. package/dist/cdn/chunks/{es-B9OhP8H3.js → es-BIh8BxV9.js} +15 -1
  119. package/dist/cdn/chunks/es-BIh8BxV9.js.map +1 -0
  120. package/dist/cdn/chunks/{extensions-CafoGF65.js → extensions-DK_9-6Bd.js} +4 -4
  121. package/dist/cdn/chunks/{extensions-CafoGF65.js.map → extensions-DK_9-6Bd.js.map} +1 -1
  122. package/dist/{fr-wrXhIi00.js → cdn/chunks/fr-C5VUZogP.js} +16 -0
  123. package/dist/cdn/chunks/fr-C5VUZogP.js.map +1 -0
  124. package/dist/cdn/chunks/{icons-BKkJ-5xF.js → icons-Bad3WZ3G.js} +49 -8
  125. package/dist/cdn/chunks/icons-Bad3WZ3G.js.map +1 -0
  126. package/dist/cdn/chunks/{ja-fKnVWXHC.js → ja-x5JYxaCW.js} +15 -1
  127. package/dist/cdn/chunks/ja-x5JYxaCW.js.map +1 -0
  128. package/dist/cdn/chunks/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +15 -1
  129. package/dist/cdn/chunks/{nl-DeFatKJe.js.map → nl-UXxFyXV6.js.map} +1 -1
  130. package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js → preRenderCustomBlocks-h4ZFBKbD.js} +2 -2
  131. package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js.map → preRenderCustomBlocks-h4ZFBKbD.js.map} +1 -1
  132. package/dist/cdn/chunks/{pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +15 -1
  133. package/dist/cdn/chunks/pt-BR-DHm3SP6W.js.map +1 -0
  134. package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js → socialIcons-ZOCwCCyn.js} +3 -3
  135. package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js.map → socialIcons-ZOCwCCyn.js.map} +1 -1
  136. package/dist/cdn/chunks/{src-DveVYoWS.js → src-BR3I3gOW.js} +265 -224
  137. package/dist/cdn/chunks/src-BR3I3gOW.js.map +1 -0
  138. package/dist/cdn/chunks/{src-L6HEdwFn.js → src-BxoLKnkl.js} +178 -165
  139. package/dist/cdn/chunks/src-BxoLKnkl.js.map +1 -0
  140. package/dist/cdn/chunks/{src-Cnc5E71L.js → src-fZSLjhjy.js} +12 -12
  141. package/dist/cdn/chunks/{src-Cnc5E71L.js.map → src-fZSLjhjy.js.map} +1 -1
  142. package/dist/cdn/chunks/{useEditorCore-DZmtKwJh.js → useEditorCore-yd40TFKy.js} +458 -446
  143. package/dist/cdn/chunks/useEditorCore-yd40TFKy.js.map +1 -0
  144. package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js → useLogicTag-J_i_hvZg.js} +2 -2
  145. package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js.map → useLogicTag-J_i_hvZg.js.map} +1 -1
  146. package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js → useMergeTag-C5MyHYxJ.js} +2 -2
  147. package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js.map → useMergeTag-C5MyHYxJ.js.map} +1 -1
  148. package/dist/cdn/chunks/{usePopoverPosition-BJRvAb-h.js → usePopoverPosition-DGXjXKjM.js} +25 -12
  149. package/dist/cdn/chunks/usePopoverPosition-DGXjXKjM.js.map +1 -0
  150. package/dist/cdn/editor.css +1 -1
  151. package/dist/cdn/editor.js +64 -64
  152. package/dist/{cloud-DsqqUfzh.js → cloud-AO_X8T9g.js} +1 -1
  153. package/dist/{createCloudRuntime-iLflkYzP.js → createCloudRuntime-D641nhri.js} +2 -2
  154. package/dist/{de-D4dweQw8.js → de-BRNLKcDl.js} +14 -0
  155. package/dist/{dist-DbUZvK04.js → dist-iLUVPysa.js} +263 -222
  156. package/dist/{cdn/chunks/en-VE7R7NyL.js → en-JJjqHMjy.js} +14 -2
  157. package/dist/{es-B9OhP8H3.js → es-BIh8BxV9.js} +14 -0
  158. package/dist/{extensions-DDhjuVKy.js → extensions-DoT2-_pz.js} +11 -11
  159. package/dist/{cdn/chunks/fr-wrXhIi00.js → fr-C5VUZogP.js} +14 -2
  160. package/dist/{ja-fKnVWXHC.js → ja-x5JYxaCW.js} +14 -0
  161. package/dist/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +14 -0
  162. package/dist/{preRenderCustomBlocks-BBSqQgke.js → preRenderCustomBlocks-CTstI3Q-.js} +4 -4
  163. package/dist/{pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +14 -0
  164. package/dist/{socialIcons-O7PZCW2P.js → socialIcons-CACVa6m_.js} +46 -46
  165. package/dist/style.css +1 -1
  166. package/dist/templatical-editor.js +108 -108
  167. package/dist/{useEditorCore-dcdHB_7H.js → useEditorCore-LyNoGs0m.js} +894 -882
  168. package/dist/{useLogicTag-D9pvgxQR.js → useLogicTag-BaH8gey0.js} +1 -1
  169. package/dist/{useMergeTag-BaVFPdlq.js → useMergeTag-Cyad1yBE.js} +1 -1
  170. package/dist/{usePopoverPosition-DH7z3Ghm.js → usePopoverPosition-BYmd-lhR.js} +24 -11
  171. package/package.json +7 -7
  172. package/dist/cdn/chunks/LogicTagInsertButton-CHc1yZ9v.js.map +0 -1
  173. package/dist/cdn/chunks/Toolbar-BsiHW9gY.js.map +0 -1
  174. package/dist/cdn/chunks/blockTypeIcons-raBjStuv.js +0 -21
  175. package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +0 -1
  176. package/dist/cdn/chunks/de-D4dweQw8.js.map +0 -1
  177. package/dist/cdn/chunks/en-DqzAdO8F.js +0 -2
  178. package/dist/cdn/chunks/en-VE7R7NyL.js.map +0 -1
  179. package/dist/cdn/chunks/es-B9OhP8H3.js.map +0 -1
  180. package/dist/cdn/chunks/fr-wrXhIi00.js.map +0 -1
  181. package/dist/cdn/chunks/icons-BKkJ-5xF.js.map +0 -1
  182. package/dist/cdn/chunks/ja-fKnVWXHC.js.map +0 -1
  183. package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +0 -1
  184. package/dist/cdn/chunks/src-DveVYoWS.js.map +0 -1
  185. package/dist/cdn/chunks/src-L6HEdwFn.js.map +0 -1
  186. package/dist/cdn/chunks/useEditorCore-DZmtKwJh.js.map +0 -1
  187. package/dist/cdn/chunks/usePopoverPosition-BJRvAb-h.js.map +0 -1
@@ -1,40 +1,40 @@
1
1
  import { E as e, F as t, H as n, K as r, N as i, Q as a, S as o, Y as s, at as c, b as l, c as u, ct as d, d as f, f as p, g as m, h, k as g, l as _, lt as v, m as y, n as b, p as x, q as S, r as C, u as w, ut as T, w as E, y as D } from "./draggable-IB4x6w2O.js";
2
- import { a as O, c as k, d as A, l as j } from "./src-DveVYoWS.js";
2
+ import { a as O, c as k, d as A, l as j } from "./src-BR3I3gOW.js";
3
3
  import { t as ee } from "./dist-CXB2_kBa.js";
4
4
  import { J as te, Y as M, Z as ne, d as re } from "./keys-DCWeHkSF.js";
5
5
  import { t as N } from "./useI18n-CyO_Nmca.js";
6
- import { a as ie, i as ae, n as oe, r as se, t as ce } from "./usePopoverPosition-BJRvAb-h.js";
7
- import { K as P, P as le, Rt as F, n as I } from "./icons-BKkJ-5xF.js";
8
- import { t as L } from "./useMergeTag-DbIHw4NG.js";
9
- import { t as R } from "./useLogicTag-DF7-l66G.js";
10
- import { u as ue } from "./styleConstants-C_YAPdQS.js";
6
+ import { a as ie, i as ae, n as oe, o as se, r as ce, t as le } from "./usePopoverPosition-DGXjXKjM.js";
7
+ import { F as P, n as ue, q as F, zt as I } from "./icons-Bad3WZ3G.js";
8
+ import { t as L } from "./useMergeTag-C5MyHYxJ.js";
9
+ import { t as de } from "./useLogicTag-J_i_hvZg.js";
10
+ import { u as fe } from "./styleConstants-C_YAPdQS.js";
11
11
  //#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
12
- var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n, V = (e) => me(H(e)), H = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
12
+ var R = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, z = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n, B = (e) => he(V(e)), V = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
13
13
  r: parseInt(e[0] + e[0], 16),
14
14
  g: parseInt(e[1] + e[1], 16),
15
15
  b: parseInt(e[2] + e[2], 16),
16
- a: e.length === 4 ? B(parseInt(e[3] + e[3], 16) / 255, 2) : 1
16
+ a: e.length === 4 ? z(parseInt(e[3] + e[3], 16) / 255, 2) : 1
17
17
  } : {
18
18
  r: parseInt(e.substring(0, 2), 16),
19
19
  g: parseInt(e.substring(2, 4), 16),
20
20
  b: parseInt(e.substring(4, 6), 16),
21
- a: e.length === 8 ? B(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
22
- }), U = (e) => pe(fe(e)), de = ({ h: e, s: t, v: n, a: r }) => {
21
+ a: e.length === 8 ? z(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
22
+ }), pe = (e) => me(W(e)), H = ({ h: e, s: t, v: n, a: r }) => {
23
23
  let i = (200 - t) * n / 100;
24
24
  return {
25
- h: B(e),
26
- s: B(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
27
- l: B(i / 2),
28
- a: B(r, 2)
25
+ h: z(e),
26
+ s: z(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
27
+ l: z(i / 2),
28
+ a: z(r, 2)
29
29
  };
30
- }, W = (e) => {
31
- let { h: t, s: n, l: r } = de(e);
30
+ }, U = (e) => {
31
+ let { h: t, s: n, l: r } = H(e);
32
32
  return `hsl(${t}, ${n}%, ${r}%)`;
33
- }, fe = ({ h: e, s: t, v: n, a: r }) => {
33
+ }, W = ({ h: e, s: t, v: n, a: r }) => {
34
34
  e = e / 360 * 6, t /= 100, n /= 100;
35
35
  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;
36
36
  return {
37
- r: B([
37
+ r: z([
38
38
  n,
39
39
  o,
40
40
  a,
@@ -42,7 +42,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
42
42
  s,
43
43
  n
44
44
  ][c] * 255),
45
- g: B([
45
+ g: z([
46
46
  s,
47
47
  n,
48
48
  n,
@@ -50,7 +50,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
50
50
  a,
51
51
  a
52
52
  ][c] * 255),
53
- b: B([
53
+ b: z([
54
54
  a,
55
55
  a,
56
56
  s,
@@ -58,73 +58,73 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
58
58
  n,
59
59
  o
60
60
  ][c] * 255),
61
- a: B(r, 2)
61
+ a: z(r, 2)
62
62
  };
63
63
  }, G = (e) => {
64
64
  let t = e.toString(16);
65
65
  return t.length < 2 ? "0" + t : t;
66
- }, pe = ({ r: e, g: t, b: n, a: r }) => {
67
- let i = r < 1 ? G(B(r * 255)) : "";
68
- return "#" + G(e) + G(t) + G(n) + i;
69
66
  }, me = ({ r: e, g: t, b: n, a: r }) => {
67
+ let i = r < 1 ? G(z(r * 255)) : "";
68
+ return "#" + G(e) + G(t) + G(n) + i;
69
+ }, he = ({ r: e, g: t, b: n, a: r }) => {
70
70
  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;
71
71
  return {
72
- h: B(60 * (o < 0 ? o + 6 : o)),
73
- s: B(i ? a / i * 100 : 0),
74
- v: B(i / 255 * 100),
72
+ h: z(60 * (o < 0 ? o + 6 : o)),
73
+ s: z(i ? a / i * 100 : 0),
74
+ v: z(i / 255 * 100),
75
75
  a: r
76
76
  };
77
77
  }, K = (e, t) => {
78
78
  if (e === t) return !0;
79
79
  for (let n in e) if (e[n] !== t[n]) return !1;
80
80
  return !0;
81
- }, q = (e, t) => e.toLowerCase() === t.toLowerCase() || K(H(e), H(t)), J = {}, Y = (e) => {
82
- let t = J[e];
83
- return t || (t = document.createElement("template"), t.innerHTML = e, J[e] = t), t;
84
- }, X = (e, t, n) => {
81
+ }, ge = (e, t) => e.toLowerCase() === t.toLowerCase() || K(V(e), V(t)), _e = {}, q = (e) => {
82
+ let t = _e[e];
83
+ return t || (t = document.createElement("template"), t.innerHTML = e, _e[e] = t), t;
84
+ }, J = (e, t, n) => {
85
85
  e.dispatchEvent(new CustomEvent(t, {
86
86
  bubbles: !0,
87
87
  detail: n
88
88
  }));
89
- }, Z = !1, Q = (e) => "touches" in e, he = (e) => Z && !Q(e) ? !1 : (Z ||= Q(e), !0), ge = (e, t) => {
90
- let n = Q(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
91
- X(e.el, "move", e.getMove({
92
- x: z((n.pageX - (r.left + window.pageXOffset)) / r.width),
93
- y: z((n.pageY - (r.top + window.pageYOffset)) / r.height)
89
+ }, Y = !1, X = (e) => "touches" in e, ve = (e) => Y && !X(e) ? !1 : (Y ||= X(e), !0), ye = (e, t) => {
90
+ let n = X(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
91
+ J(e.el, "move", e.getMove({
92
+ x: R((n.pageX - (r.left + window.pageXOffset)) / r.width),
93
+ y: R((n.pageY - (r.top + window.pageYOffset)) / r.height)
94
94
  }));
95
- }, _e = (e, t) => {
95
+ }, be = (e, t) => {
96
96
  let n = t.keyCode;
97
- n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), X(e.el, "move", e.getMove({
97
+ n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), J(e.el, "move", e.getMove({
98
98
  x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
99
99
  y: n === 40 ? .01 : n === 38 ? -.01 : 0
100
100
  }, !0)));
101
- }, ve = class {
101
+ }, Z = class {
102
102
  constructor(e, t, n, r) {
103
- let i = Y(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
103
+ let i = q(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
104
104
  e.appendChild(i.content.cloneNode(!0));
105
105
  let a = e.querySelector(`[part=${t}]`);
106
106
  a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
107
107
  }
108
108
  set dragging(e) {
109
109
  let t = e ? document.addEventListener : document.removeEventListener;
110
- t(Z ? "touchmove" : "mousemove", this), t(Z ? "touchend" : "mouseup", this);
110
+ t(Y ? "touchmove" : "mousemove", this), t(Y ? "touchend" : "mouseup", this);
111
111
  }
112
112
  handleEvent(e) {
113
113
  switch (e.type) {
114
114
  case "mousedown":
115
115
  case "touchstart":
116
- if (e.preventDefault(), !he(e) || !Z && e.button != 0) return;
117
- this.el.focus(), ge(this, e), this.dragging = !0;
116
+ if (e.preventDefault(), !ve(e) || !Y && e.button != 0) return;
117
+ this.el.focus(), ye(this, e), this.dragging = !0;
118
118
  break;
119
119
  case "mousemove":
120
120
  case "touchmove":
121
- e.preventDefault(), ge(this, e);
121
+ e.preventDefault(), ye(this, e);
122
122
  break;
123
123
  case "mouseup":
124
124
  case "touchend":
125
125
  this.dragging = !1;
126
126
  break;
127
- case "keydown": _e(this, e);
127
+ case "keydown": be(this, e);
128
128
  }
129
129
  }
130
130
  style(e) {
@@ -132,25 +132,25 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
132
132
  for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
133
133
  });
134
134
  }
135
- }, ye = class extends ve {
135
+ }, xe = class extends Z {
136
136
  constructor(e) {
137
137
  super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
138
138
  }
139
139
  update({ h: e }) {
140
140
  this.h = e, this.style([{
141
141
  left: `${e / 360 * 100}%`,
142
- color: W({
142
+ color: U({
143
143
  h: e,
144
144
  s: 100,
145
145
  v: 100,
146
146
  a: 1
147
147
  })
148
- }]), this.el.setAttribute("aria-valuenow", `${B(e)}`);
148
+ }]), this.el.setAttribute("aria-valuenow", `${z(e)}`);
149
149
  }
150
150
  getMove(e, t) {
151
- return { h: t ? z(this.h + e.x * 360, 0, 360) : 360 * e.x };
151
+ return { h: t ? R(this.h + e.x * 360, 0, 360) : 360 * e.x };
152
152
  }
153
- }, be = class extends ve {
153
+ }, Se = class extends Z {
154
154
  constructor(e) {
155
155
  super(e, "saturation", "aria-label=\"Color\"", !0);
156
156
  }
@@ -158,47 +158,47 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
158
158
  this.hsva = e, this.style([{
159
159
  top: `${100 - e.v}%`,
160
160
  left: `${e.s}%`,
161
- color: W(e)
162
- }, { "background-color": W({
161
+ color: U(e)
162
+ }, { "background-color": U({
163
163
  h: e.h,
164
164
  s: 100,
165
165
  v: 100,
166
166
  a: 1
167
- }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${B(e.s)}%, Brightness ${B(e.v)}%`);
167
+ }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${z(e.s)}%, Brightness ${z(e.v)}%`);
168
168
  }
169
169
  getMove(e, t) {
170
170
  return {
171
- s: t ? z(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
172
- v: t ? z(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
171
+ s: t ? R(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
172
+ v: t ? R(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
173
173
  };
174
174
  }
175
- }, 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}", $ = Symbol("same"), we = Symbol("color"), Te = Symbol("hsva"), Ee = Symbol("update"), De = Symbol("parts"), Oe = Symbol("css"), ke = Symbol("sliders"), Ae = class extends HTMLElement {
175
+ }, Ce = ":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)}", we = "[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}", Te = "[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}", Q = Symbol("same"), Ee = Symbol("color"), De = Symbol("hsva"), $ = Symbol("update"), Oe = Symbol("parts"), ke = Symbol("css"), Ae = Symbol("sliders"), je = class extends HTMLElement {
176
176
  static get observedAttributes() {
177
177
  return ["color"];
178
178
  }
179
- get [Oe]() {
179
+ get [ke]() {
180
180
  return [
181
- xe,
182
- Se,
183
- Ce
181
+ Ce,
182
+ we,
183
+ Te
184
184
  ];
185
185
  }
186
- get [ke]() {
187
- return [be, ye];
186
+ get [Ae]() {
187
+ return [Se, xe];
188
188
  }
189
189
  get color() {
190
- return this[we];
190
+ return this[Ee];
191
191
  }
192
192
  set color(e) {
193
- if (!this[$](e)) {
193
+ if (!this[Q](e)) {
194
194
  let t = this.colorModel.toHsva(e);
195
- this[Ee](t), this[we] = e;
195
+ this[$](t), this[Ee] = e;
196
196
  }
197
197
  }
198
198
  constructor() {
199
199
  super();
200
- let e = Y(`<style>${this[Oe].join("")}</style>`), t = this.attachShadow({ mode: "open" });
201
- t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[De] = this[ke].map((e) => new e(t));
200
+ let e = q(`<style>${this[ke].join("")}</style>`), t = this.attachShadow({ mode: "open" });
201
+ t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Oe] = this[Ae].map((e) => new e(t));
202
202
  }
203
203
  connectedCallback() {
204
204
  if (this.hasOwnProperty("color")) {
@@ -208,75 +208,79 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
208
208
  }
209
209
  attributeChangedCallback(e, t, n) {
210
210
  let r = this.colorModel.fromAttr(n);
211
- this[$](r) || (this.color = r);
211
+ this[Q](r) || (this.color = r);
212
212
  }
213
213
  handleEvent(e) {
214
- let t = this[Te], n = {
214
+ let t = this[De], n = {
215
215
  ...t,
216
216
  ...e.detail
217
217
  };
218
- this[Ee](n);
218
+ this[$](n);
219
219
  let r;
220
- !K(n, t) && !this[$](r = this.colorModel.fromHsva(n)) && (this[we] = r, X(this, "color-changed", { value: r }));
220
+ !K(n, t) && !this[Q](r = this.colorModel.fromHsva(n)) && (this[Ee] = r, J(this, "color-changed", { value: r }));
221
221
  }
222
- [$](e) {
222
+ [Q](e) {
223
223
  return this.color && this.colorModel.equal(e, this.color);
224
224
  }
225
- [Ee](e) {
226
- this[Te] = e, this[De].forEach((t) => t.update(e));
225
+ [$](e) {
226
+ this[De] = e, this[Oe].forEach((t) => t.update(e));
227
227
  }
228
- }, je = {
228
+ }, Me = {
229
229
  defaultColor: "#000",
230
- toHsva: V,
231
- fromHsva: ({ h: e, s: t, v: n }) => U({
230
+ toHsva: B,
231
+ fromHsva: ({ h: e, s: t, v: n }) => pe({
232
232
  h: e,
233
233
  s: t,
234
234
  v: n,
235
235
  a: 1
236
236
  }),
237
- equal: q,
237
+ equal: ge,
238
238
  fromAttr: (e) => e
239
- }, Me = class extends Ae {
239
+ }, Ne = class extends je {
240
240
  get colorModel() {
241
- return je;
241
+ return Me;
242
242
  }
243
243
  };
244
- customElements.define("hex-color-picker", class extends Me {});
244
+ customElements.define("hex-color-picker", class extends Ne {});
245
245
  //#endregion
246
246
  //#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
247
- var Ne = [
247
+ var Pe = [
248
248
  "disabled",
249
249
  "aria-label",
250
250
  "title",
251
251
  "aria-expanded"
252
- ], Pe = {
252
+ ], Fe = {
253
253
  key: 0,
254
254
  class: "tpl:relative tpl:flex-1"
255
- }, Fe = [
255
+ }, Ie = [
256
256
  "value",
257
257
  "placeholder",
258
258
  "disabled",
259
259
  "aria-label"
260
- ], Ie = ["aria-label", "title"], Le = ["data-tpl-theme"], Re = ["aria-label"], ze = [
260
+ ], Le = ["aria-label", "title"], Re = ["data-tpl-theme"], ze = [
261
+ "aria-pressed",
262
+ "aria-label",
263
+ "title"
264
+ ], Be = ["aria-label"], Ve = [
261
265
  "aria-label",
262
266
  "title",
263
267
  "aria-checked",
264
268
  "tabindex"
265
- ], Be = [
269
+ ], He = [
266
270
  "aria-label",
267
271
  "title",
268
272
  "aria-checked",
269
273
  "tabindex",
270
274
  "onClick"
271
- ], Ve = ["color", "aria-label"], He = {
272
- key: 2,
275
+ ], Ue = ["color", "aria-label"], We = {
276
+ key: 3,
273
277
  class: "tpl:relative tpl:mt-2"
274
- }, Ue = [
278
+ }, Ge = [
275
279
  "value",
276
280
  "placeholder",
277
281
  "disabled",
278
282
  "aria-label"
279
- ], We = ["aria-label", "title"], Ge = /* @__PURE__ */ o({
283
+ ], Ke = ["aria-label", "title"], qe = /* @__PURE__ */ o({
280
284
  __name: "ColorPicker",
281
285
  props: {
282
286
  modelValue: {},
@@ -296,37 +300,41 @@ var Ne = [
296
300
  allowCustom: {
297
301
  type: Boolean,
298
302
  default: void 0
303
+ },
304
+ allowTransparent: {
305
+ type: Boolean,
306
+ default: !1
299
307
  }
300
308
  },
301
309
  emits: ["update:modelValue"],
302
310
  setup(r, { emit: o }) {
303
- let s = r, g = o, { t: S } = N(), C = a(!1), T = a(), E = a(), D = a(!1);
304
- ee(T, () => {
311
+ let s = r, g = o, { t: S } = N(), C = a(!1), E = a(), O = a(), k = a(!1);
312
+ ee(E, () => {
305
313
  C.value = !1;
306
- }, { ignore: [E] });
307
- let O = p(() => !s.modelValue), k = p(() => ae(s.modelValue)), A = p(() => ae(s.modelValue || s.seedColor)), j = p(() => !s.disabled && !O.value), M = e(re, ie), P = p(() => [...new Set(s.presets ?? M.presets)]), le = p(() => s.allowCustom ?? M.allowCustom), F = p(() => P.value.length > 0), L = p(() => le.value || !F.value), R = p(() => se(s.modelValue));
308
- function z(e) {
309
- return R.value !== "" && se(e) === R.value;
314
+ }, { ignore: [O] });
315
+ let A = p(() => !s.modelValue), j = p(() => s.modelValue.trim().toLowerCase() === "transparent"), M = p(() => ae(s.modelValue)), P = p(() => (s.modelValue ? ie(s.modelValue) : null) || (ie(s.seedColor) ?? "#ffffff")), F = p(() => !s.disabled && !A.value), I = e(re, se), L = p(() => [...new Set(s.presets ?? I.presets)]), de = p(() => s.allowCustom ?? I.allowCustom), R = p(() => L.value.length > 0), z = p(() => de.value || !R.value), B = p(() => ce(s.modelValue));
316
+ function V(e) {
317
+ return B.value !== "" && ce(e) === B.value;
310
318
  }
311
- function B(e) {
319
+ function pe(e) {
312
320
  g("update:modelValue", e);
313
321
  }
314
- let V = p(() => F.value && !L.value);
315
- function H(e) {
316
- return V.value ? e + 1 : e;
322
+ let H = p(() => R.value && !z.value);
323
+ function U(e) {
324
+ return H.value ? e + 1 : e;
317
325
  }
318
- let U = p(() => {
319
- if (V.value && O.value) return 0;
320
- let e = P.value.findIndex((e) => z(e));
321
- return e === -1 ? 0 : H(e);
326
+ let W = p(() => {
327
+ if (H.value && A.value) return 0;
328
+ let e = L.value.findIndex((e) => V(e));
329
+ return e === -1 ? 0 : U(e);
322
330
  });
323
- function de() {
324
- return U.value === 0 ? 0 : -1;
331
+ function G() {
332
+ return W.value === 0 ? 0 : -1;
325
333
  }
326
- function W(e) {
327
- return H(e) === U.value ? 0 : -1;
334
+ function me(e) {
335
+ return U(e) === W.value ? 0 : -1;
328
336
  }
329
- function fe(e) {
337
+ function he(e) {
330
338
  if (![
331
339
  "ArrowRight",
332
340
  "ArrowDown",
@@ -336,32 +344,35 @@ var Ne = [
336
344
  let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
337
345
  r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
338
346
  }
339
- function G(e) {
340
- D.value = !0, g("update:modelValue", e.detail.value);
347
+ function K(e) {
348
+ k.value = !0, g("update:modelValue", e.detail.value);
341
349
  }
342
- function pe() {
343
- D.value = !1;
350
+ function ge() {
351
+ k.value = !1;
344
352
  }
345
- function me() {
346
- !D.value && O.value && g("update:modelValue", A.value);
353
+ function _e() {
354
+ !k.value && A.value && g("update:modelValue", P.value);
347
355
  }
348
- function K(e) {
356
+ function q(e) {
349
357
  g("update:modelValue", e.target.value);
350
358
  }
351
- function q() {
359
+ function J() {
352
360
  g("update:modelValue", "");
353
361
  }
354
- let J = oe(), { toLocal: Y } = ce(), X = e(te, null), Z = e(ne, null), Q = a({
362
+ function Y() {
363
+ g("update:modelValue", "transparent");
364
+ }
365
+ let X = oe(), { toLocal: ve } = le(), ye = e(te, null), be = e(ne, null), Z = a({
355
366
  top: 0,
356
367
  left: 0
357
368
  });
358
- function he() {
369
+ function xe() {
359
370
  if (!s.disabled) {
360
371
  if (!C.value) {
361
- let e = E.value?.getBoundingClientRect();
372
+ let e = O.value?.getBoundingClientRect();
362
373
  if (e) {
363
374
  let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
364
- Q.value = Y({
375
+ Z.value = ve({
365
376
  top: t,
366
377
  left: e.left
367
378
  });
@@ -373,7 +384,7 @@ var Ne = [
373
384
  return (e, a) => (i(), m("div", { class: d(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", r.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
374
385
  x("button", {
375
386
  ref_key: "swatchRef",
376
- ref: E,
387
+ ref: O,
377
388
  type: "button",
378
389
  disabled: r.disabled,
379
390
  "aria-label": r.ariaLabel || c(S).colorPicker.pickColor,
@@ -385,34 +396,37 @@ var Ne = [
385
396
  C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !r.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
386
397
  r.size === "sm" ? "tpl:size-8" : "tpl:size-10"
387
398
  ]),
388
- onClick: he
399
+ onClick: xe
389
400
  }, [x("span", {
390
- class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": O.value }]),
391
- style: v(O.value ? void 0 : { backgroundColor: k.value })
392
- }, null, 6)], 10, Ne),
393
- !r.swatchOnly && L.value ? (i(), m("div", Pe, [x("input", {
401
+ class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", {
402
+ "tpl-color-swatch-empty": A.value,
403
+ "tpl-color-swatch-transparent": j.value
404
+ }]),
405
+ style: v(A.value || j.value ? void 0 : { backgroundColor: M.value })
406
+ }, null, 6)], 10, Pe),
407
+ !r.swatchOnly && z.value ? (i(), m("div", Fe, [x("input", {
394
408
  type: "text",
395
- class: d([c(ue), "tpl:w-full"]),
396
- style: v(j.value ? { paddingRight: "2.25rem" } : void 0),
397
- value: k.value,
409
+ class: d([c(fe), "tpl:w-full"]),
410
+ style: v(F.value ? { paddingRight: "2.25rem" } : void 0),
411
+ value: M.value,
398
412
  placeholder: r.placeholder || c(S).colorPicker.notSet,
399
413
  disabled: r.disabled,
400
414
  "aria-label": c(S).colorPicker.hexValue,
401
- onInput: K
402
- }, null, 46, Fe), j.value ? (i(), m("button", {
415
+ onInput: q
416
+ }, null, 46, Ie), F.value ? (i(), m("button", {
403
417
  key: 0,
404
418
  type: "button",
405
419
  "aria-label": c(S).colorPicker.clear,
406
420
  title: c(S).colorPicker.clear,
407
421
  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)]",
408
- onClick: q
409
- }, [l(c(I), {
422
+ onClick: J
423
+ }, [l(c(ue), {
410
424
  size: 14,
411
425
  "stroke-width": 1.5
412
- })], 8, Ie)) : h("", !0)])) : h("", !0),
426
+ })], 8, Le)) : h("", !0)])) : h("", !0),
413
427
  (i(), y(f, {
414
- to: c(J),
415
- disabled: !c(J)
428
+ to: c(X),
429
+ disabled: !c(X)
416
430
  }, [l(b, {
417
431
  "enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
418
432
  "enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
@@ -424,90 +438,100 @@ var Ne = [
424
438
  default: n(() => [C.value ? (i(), m("div", {
425
439
  key: 0,
426
440
  ref_key: "popoverRef",
427
- ref: T,
428
- "data-tpl-theme": c(Z),
441
+ ref: E,
442
+ "data-tpl-theme": c(be),
429
443
  class: "tpl-color-popover tpl:absolute 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)]",
430
444
  style: v({
431
- top: `${Q.value.top}px`,
432
- left: `${Q.value.left}px`,
433
- ...c(X)
445
+ top: `${Z.value.top}px`,
446
+ left: `${Z.value.left}px`,
447
+ ...c(ye)
434
448
  })
435
449
  }, [
436
- F.value ? (i(), m("div", {
450
+ r.allowTransparent ? (i(), m("button", {
437
451
  key: 0,
452
+ type: "button",
453
+ "data-testid": "color-picker-transparent",
454
+ "aria-pressed": j.value,
455
+ "aria-label": c(S).colorPicker.transparent,
456
+ title: c(S).colorPicker.transparent,
457
+ class: d(["tpl:mb-2 tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1 tpl:text-left tpl:text-xs tpl:text-[var(--tpl-text)] 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)]", j.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)]"]),
458
+ onClick: Y
459
+ }, [a[2] ||= x("span", { class: "tpl-color-swatch-transparent tpl:size-4 tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)]" }, null, -1), D(" " + T(c(S).colorPicker.transparent), 1)], 10, ze)) : h("", !0),
460
+ R.value ? (i(), m("div", {
461
+ key: 1,
438
462
  role: "radiogroup",
439
463
  "aria-label": c(S).colorPicker.presetColors,
440
- class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", L.value && "tpl:mb-2"]),
441
- onKeydown: fe
442
- }, [V.value ? (i(), m("button", {
464
+ class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", z.value && "tpl:mb-2"]),
465
+ onKeydown: he
466
+ }, [H.value ? (i(), m("button", {
443
467
  key: 0,
444
468
  type: "button",
445
469
  role: "radio",
446
470
  "aria-label": c(S).colorPicker.clear,
447
471
  title: c(S).colorPicker.clear,
448
- "aria-checked": O.value,
449
- tabindex: de(),
450
- class: d(["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)]", O.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)]"]),
451
- onClick: q
452
- }, null, 10, ze)) : h("", !0), (i(!0), m(w, null, t(P.value, (e, t) => (i(), m("button", {
472
+ "aria-checked": A.value,
473
+ tabindex: G(),
474
+ class: d(["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)]", A.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)]"]),
475
+ onClick: J
476
+ }, null, 10, Ve)) : h("", !0), (i(!0), m(w, null, t(L.value, (e, t) => (i(), m("button", {
453
477
  key: e,
454
478
  type: "button",
455
479
  role: "radio",
456
480
  "aria-label": e,
457
481
  title: e,
458
- "aria-checked": z(e),
459
- tabindex: W(t),
482
+ "aria-checked": V(e),
483
+ tabindex: me(t),
460
484
  style: v({ backgroundColor: e }),
461
- class: d(["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)]", z(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)]"]),
462
- onClick: (t) => B(e)
463
- }, null, 14, Be))), 128))], 42, Re)) : h("", !0),
464
- L.value ? (i(), m("hex-color-picker", {
465
- key: 1,
466
- color: A.value,
485
+ class: d(["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)]", V(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)]"]),
486
+ onClick: (t) => pe(e)
487
+ }, null, 14, He))), 128))], 42, Be)) : h("", !0),
488
+ z.value ? (i(), m("hex-color-picker", {
489
+ key: 2,
490
+ color: P.value,
467
491
  "aria-label": c(S).colorPicker.pickColor,
468
- onColorChanged: G,
469
- onPointerdown: pe,
470
- onPointerup: me,
492
+ onColorChanged: K,
493
+ onPointerdown: ge,
494
+ onPointerup: _e,
471
495
  onKeydown: a[0] ||= u((e) => C.value = !1, ["escape"])
472
- }, null, 40, Ve)) : h("", !0),
473
- r.swatchOnly && L.value ? (i(), m("div", He, [x("input", {
496
+ }, null, 40, Ue)) : h("", !0),
497
+ r.swatchOnly && z.value ? (i(), m("div", We, [x("input", {
474
498
  type: "text",
475
- class: d([c(ue), "tpl:w-full"]),
476
- style: v(j.value ? { paddingRight: "2.25rem" } : void 0),
477
- value: k.value,
499
+ class: d([c(fe), "tpl:w-full"]),
500
+ style: v(F.value ? { paddingRight: "2.25rem" } : void 0),
501
+ value: M.value,
478
502
  placeholder: r.placeholder || c(S).colorPicker.notSet,
479
503
  disabled: r.disabled,
480
504
  "aria-label": c(S).colorPicker.hexValue,
481
- onChange: K,
505
+ onChange: q,
482
506
  onKeydown: a[1] ||= u(_((e) => e.target.blur(), ["prevent"]), ["enter"])
483
- }, null, 46, Ue), j.value ? (i(), m("button", {
507
+ }, null, 46, Ge), F.value ? (i(), m("button", {
484
508
  key: 0,
485
509
  type: "button",
486
510
  "aria-label": c(S).colorPicker.clear,
487
511
  title: c(S).colorPicker.clear,
488
512
  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)]",
489
- onClick: q
490
- }, [l(c(I), {
513
+ onClick: J
514
+ }, [l(c(ue), {
491
515
  size: 14,
492
516
  "stroke-width": 1.5
493
- })], 8, We)) : h("", !0)])) : h("", !0)
494
- ], 12, Le)) : h("", !0)]),
517
+ })], 8, Ke)) : h("", !0)])) : h("", !0)
518
+ ], 12, Re)) : h("", !0)]),
495
519
  _: 1
496
520
  })], 8, ["to", "disabled"]))
497
521
  ], 2));
498
522
  }
499
- }), Ke = ["id"], qe = {
523
+ }), Je = ["id"], Ye = {
500
524
  key: 0,
501
525
  class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
502
526
  "data-testid": "merge-tag-suggestion-empty"
503
- }, Je = [
527
+ }, Xe = [
504
528
  "id",
505
529
  "aria-selected",
506
530
  "data-selected",
507
531
  "data-merge-tag-value",
508
532
  "onMousedown",
509
533
  "onMousemove"
510
- ], Ye = { class: "tpl:font-medium" }, Xe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, Ze = /* @__PURE__ */ o({
534
+ ], Ze = { class: "tpl:font-medium" }, Qe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, $e = /* @__PURE__ */ o({
511
535
  __name: "MergeTagSuggestionList",
512
536
  props: {
513
537
  items: {},
@@ -526,7 +550,7 @@ var Ne = [
526
550
  class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1 tpl:shadow-[var(--tpl-shadow-lg)]",
527
551
  role: "listbox",
528
552
  "data-testid": "merge-tag-suggestion-list"
529
- }, [e.items.length === 0 ? (i(), m("div", qe, T(e.emptyText), 1)) : h("", !0), (i(!0), m(w, null, t(e.items, (t, a) => (i(), m("button", {
553
+ }, [e.items.length === 0 ? (i(), m("div", Ye, T(e.emptyText), 1)) : h("", !0), (i(!0), m(w, null, t(e.items, (t, a) => (i(), m("button", {
530
554
  key: t.value,
531
555
  id: r(a),
532
556
  type: "button",
@@ -537,21 +561,21 @@ var Ne = [
537
561
  class: d(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", a === e.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
538
562
  onMousedown: _((e) => n.$emit("select", t), ["prevent", "stop"]),
539
563
  onMousemove: (t) => a !== e.selectedIndex && n.$emit("hover", a)
540
- }, [x("span", Ye, T(t.label), 1), x("span", Xe, T(t.value), 1)], 42, Je))), 128))], 8, Ke));
564
+ }, [x("span", Ze, T(t.label), 1), x("span", Qe, T(t.value), 1)], 42, Xe))), 128))], 8, Je));
541
565
  }
542
- }), Qe = 10, $e = 0;
543
- function et(e, t) {
566
+ }), et = 10, tt = 0;
567
+ function nt(e, t) {
544
568
  let n = t.trim().toLowerCase();
545
- return n === "" ? e.slice(0, Qe) : e.filter((e) => {
569
+ return n === "" ? e.slice(0, et) : e.filter((e) => {
546
570
  let t = e.label.toLowerCase(), r = e.value.toLowerCase();
547
571
  return t.includes(n) || r.includes(n);
548
- }).slice(0, Qe);
572
+ }).slice(0, et);
549
573
  }
550
- function tt(e, t, n, r) {
574
+ function rt(e, t, n, r) {
551
575
  return t.length === 0 ? e.key === "Enter" || e.key === "Tab" : e.key === "ArrowDown" ? (n.value = (n.value + 1) % t.length, !0) : e.key === "ArrowUp" ? (n.value = (n.value - 1 + t.length) % t.length, !0) : e.key === "Enter" || e.key === "Tab" ? (r(t[n.value]), !0) : !1;
552
576
  }
553
- function nt(e, t) {
554
- let n = null, r = null, i = null, o = a([]), s = a(0), c = null, l = `tpl-merge-tag-suggestion-${++$e}`, u = null, d = [], f = null;
577
+ function it(e, t) {
578
+ let n = null, r = null, i = null, o = a([]), s = a(0), c = null, l = `tpl-merge-tag-suggestion-${++tt}`, u = null, d = [], f = null;
555
579
  function p() {
556
580
  v(u?.() ?? null);
557
581
  }
@@ -621,7 +645,7 @@ function nt(e, t) {
621
645
  return {
622
646
  open: ({ items: a, getRect: d, anchorEl: f, onCommand: p }) => {
623
647
  o.value = a, s.value = 0, c = p, r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup"), i = f, y(r, f), (t?.value ?? document.body).appendChild(r), n = C({ render() {
624
- return E(Ze, {
648
+ return E($e, {
625
649
  items: o.value,
626
650
  selectedIndex: s.value,
627
651
  emptyText: e,
@@ -637,7 +661,7 @@ function nt(e, t) {
637
661
  o.value = e, s.value >= e.length && (s.value = 0), c = n, x(), u = t, m();
638
662
  },
639
663
  handleKeyDown: (e) => {
640
- let t = tt(e, o.value, s, S);
664
+ let t = rt(e, o.value, s, S);
641
665
  return t && x(), t;
642
666
  },
643
667
  close: () => {
@@ -648,7 +672,7 @@ function nt(e, t) {
648
672
  }
649
673
  //#endregion
650
674
  //#region src/utils/mergeTagTrigger.ts
651
- function rt(e, t, n, r) {
675
+ function at(e, t, n, r) {
652
676
  if (!n) return null;
653
677
  let i = e.slice(0, t), a = i.lastIndexOf(n);
654
678
  if (a === -1) return null;
@@ -661,8 +685,8 @@ function rt(e, t, n, r) {
661
685
  }
662
686
  //#endregion
663
687
  //#region src/utils/textFieldCaret.ts
664
- var it = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
665
- function at(e, t, n) {
688
+ var ot = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
689
+ function st(e, t, n) {
666
690
  return {
667
691
  left: e,
668
692
  top: t,
@@ -675,7 +699,7 @@ function at(e, t, n) {
675
699
  toJSON: () => ({})
676
700
  };
677
701
  }
678
- function ot(e, t) {
702
+ function ct(e, t) {
679
703
  let n = e.ownerDocument, r = n.defaultView;
680
704
  if (!r) return null;
681
705
  let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
@@ -683,7 +707,7 @@ function ot(e, t) {
683
707
  let s = o.style;
684
708
  s.position = "absolute", s.visibility = "hidden", s.top = "0", s.left = "0", s.overflow = "hidden", s.whiteSpace = i ? "pre" : "pre-wrap", s.wordWrap = i ? "normal" : "break-word";
685
709
  let c = s, l = a;
686
- for (let e of it) c[e] = l[e];
710
+ for (let e of ot) c[e] = l[e];
687
711
  i && (s.width = "auto", s.whiteSpace = "pre");
688
712
  let u = e.value, d = u.slice(0, t);
689
713
  i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
@@ -692,26 +716,26 @@ function ot(e, t) {
692
716
  let p = f.offsetTop, m = f.offsetLeft;
693
717
  n.body.removeChild(o);
694
718
  let h = e.getBoundingClientRect(), g = parseFloat(a.borderTopWidth) || 0, _ = parseFloat(a.borderLeftWidth) || 0, v = parseFloat(a.lineHeight) || parseFloat(a.fontSize) || 0, y = h.left + m + _ - e.scrollLeft;
695
- if (i) return at(y, h.top, h.bottom);
719
+ if (i) return st(y, h.top, h.bottom);
696
720
  let b = h.top + p + g - e.scrollTop;
697
- return at(y, b, b + v);
721
+ return st(y, b, b + v);
698
722
  }
699
723
  //#endregion
700
724
  //#region src/composables/useMergeTagAutocomplete.ts
701
- var st = /* @__PURE__ */ new Set([
725
+ var lt = /* @__PURE__ */ new Set([
702
726
  "ArrowLeft",
703
727
  "ArrowRight",
704
728
  "Home",
705
729
  "End"
706
730
  ]);
707
- function ct(t) {
708
- let { elementRef: n, modelValue: i, emit: a, mergeTags: o, syntax: c, enabled: l, onInsert: u } = t, d = j(c), f = k(c), m = p(() => l && d !== null && o.value.length > 0), h = e(M, null), _ = nt((S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", oe()), v = !1;
731
+ function ut(t) {
732
+ let { elementRef: n, modelValue: i, emit: a, mergeTags: o, syntax: c, enabled: l, onInsert: u } = t, d = j(c), f = k(c), m = p(() => l && d !== null && o.value.length > 0), h = e(M, null), _ = it((S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", oe()), v = !1;
709
733
  r() && s(() => {
710
734
  v = !0, _.close();
711
735
  });
712
736
  function y(e) {
713
737
  let t = e.value ?? "";
714
- return rt(t, e.selectionStart ?? t.length, d, f);
738
+ return at(t, e.selectionStart ?? t.length, d, f);
715
739
  }
716
740
  function b(e, t, r) {
717
741
  let o = e.value ?? i(), s = o.slice(t.caret), c = f && s.startsWith(f) ? f.length : 0, l = o.slice(0, t.triggerStart), d = o.slice(t.caret + c), p = l + r.value + d, m = l.length + r.value.length;
@@ -733,7 +757,7 @@ function ct(t) {
733
757
  _.close();
734
758
  return;
735
759
  }
736
- let r = et(o.value, t.query), i = () => ot(e, t.triggerStart), a = (n) => b(e, t, n);
760
+ let r = nt(o.value, t.query), i = () => ct(e, t.triggerStart), a = (n) => b(e, t, n);
737
761
  _.isOpen() ? _.update({
738
762
  items: r,
739
763
  getRect: i,
@@ -746,7 +770,7 @@ function ct(t) {
746
770
  });
747
771
  }
748
772
  function C(e) {
749
- return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : st.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
773
+ return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : lt.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
750
774
  }
751
775
  return {
752
776
  available: m,
@@ -758,12 +782,12 @@ function ct(t) {
758
782
  }
759
783
  //#endregion
760
784
  //#region src/composables/useMergeTagField.ts
761
- function lt(e) {
762
- let { modelValue: t, emit: n, elementRef: i } = e, { mergeTags: o, canRequestMergeTag: c, isRequesting: l, isMergeTagValue: u, getMergeTagDisplayLabel: d, findMergeTag: f, requestMergeTag: m, syntax: h, autocomplete: _ } = L(), { canInsertLogicTag: v, isRequesting: y, requestLogicTag: b } = R(), x = a(!1), S = !1, C = !1;
785
+ function dt(e) {
786
+ let { modelValue: t, emit: n, elementRef: i } = e, { mergeTags: o, canRequestMergeTag: c, isRequesting: l, isMergeTagValue: u, getMergeTagDisplayLabel: d, findMergeTag: f, requestMergeTag: m, syntax: h, autocomplete: _ } = L(), { canInsertLogicTag: v, isRequesting: y, requestLogicTag: b } = de(), x = a(!1), S = !1, C = !1;
763
787
  r() && s(() => {
764
788
  C = !0;
765
789
  });
766
- let w = ct({
790
+ let w = ut({
767
791
  elementRef: i,
768
792
  modelValue: t,
769
793
  emit: n,
@@ -897,14 +921,14 @@ function lt(e) {
897
921
  }
898
922
  //#endregion
899
923
  //#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
900
- var ut = ["aria-label"], dt = [
924
+ var ft = ["aria-label"], pt = [
901
925
  "data-tooltip",
902
926
  "aria-label",
903
927
  "onClick"
904
- ], ft = ["data-tooltip"], pt = ["data-tooltip"], mt = {
928
+ ], mt = ["data-tooltip"], ht = ["data-tooltip"], gt = {
905
929
  key: 3,
906
930
  class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
907
- }, ht = ["aria-label", "title"], gt = ["aria-label", "title"], _t = /* @__PURE__ */ o({
931
+ }, _t = ["aria-label", "title"], vt = ["aria-label", "title"], yt = /* @__PURE__ */ o({
908
932
  __name: "MergeTagSegments",
909
933
  props: {
910
934
  segments: {},
@@ -939,7 +963,7 @@ var ut = ["aria-label"], dt = [
939
963
  color: "var(--tpl-primary)"
940
964
  },
941
965
  onClick: _((e) => r("repick", t), ["stop"])
942
- }, T(e.label), 11, dt)) : e.type === "mergeTag" ? (i(), m("span", {
966
+ }, T(e.label), 11, pt)) : e.type === "mergeTag" ? (i(), m("span", {
943
967
  key: 1,
944
968
  class: d(["tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", c(u) ? "tpl-tooltip" : ""]),
945
969
  "data-tooltip": c(u) ? e.value : void 0,
@@ -947,7 +971,7 @@ var ut = ["aria-label"], dt = [
947
971
  "background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
948
972
  color: "var(--tpl-primary)"
949
973
  }
950
- }, T(e.label), 11, ft)) : e.type === "logicMergeTag" ? (i(), m("span", {
974
+ }, T(e.label), 11, mt)) : e.type === "logicMergeTag" ? (i(), m("span", {
951
975
  key: 2,
952
976
  class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
953
977
  "data-tooltip": e.value,
@@ -956,7 +980,7 @@ var ut = ["aria-label"], dt = [
956
980
  border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
957
981
  color: "var(--tpl-primary)"
958
982
  }
959
- }, T(e.keyword), 9, pt)) : (i(), m("span", mt, T(e.value), 1))], 64))), 128)),
983
+ }, T(e.keyword), 9, ht)) : (i(), m("span", gt, T(e.value), 1))], 64))), 128)),
960
984
  x("button", {
961
985
  type: "button",
962
986
  class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-primary)] tpl:hover:opacity-100",
@@ -964,10 +988,10 @@ var ut = ["aria-label"], dt = [
964
988
  title: c(a).mergeTag.editAsText,
965
989
  "data-testid": "merge-tag-field-edit",
966
990
  onClick: _(f, ["stop"])
967
- }, [l(c(P), {
991
+ }, [l(c(F), {
968
992
  size: 12,
969
993
  "stroke-width": 2
970
- })], 8, ht),
994
+ })], 8, _t),
971
995
  x("button", {
972
996
  type: "button",
973
997
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-danger)] tpl:hover:opacity-100",
@@ -975,17 +999,17 @@ var ut = ["aria-label"], dt = [
975
999
  title: c(a).mergeTag.remove,
976
1000
  "data-testid": "merge-tag-field-clear",
977
1001
  onClick: p[0] ||= _((e) => r("clear"), ["stop"])
978
- }, [l(c(I), {
1002
+ }, [l(c(ue), {
979
1003
  size: 12,
980
1004
  "stroke-width": 2.5
981
- })], 8, gt)
982
- ], 10, ut));
1005
+ })], 8, vt)
1006
+ ], 10, ft));
983
1007
  }
984
- }), vt = [
1008
+ }), bt = [
985
1009
  "aria-label",
986
1010
  "title",
987
1011
  "disabled"
988
- ], yt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", bt = /* @__PURE__ */ o({
1012
+ ], xt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", St = /* @__PURE__ */ o({
989
1013
  __name: "MergeTagInsertButton",
990
1014
  props: { disabled: { type: Boolean } },
991
1015
  emits: ["insert"],
@@ -993,22 +1017,22 @@ var ut = ["aria-label"], dt = [
993
1017
  let { t } = N();
994
1018
  return (n, r) => (i(), m("button", {
995
1019
  type: "button",
996
- class: d([yt, "tpl:mt-1.5"]),
1020
+ class: d([xt, "tpl:mt-1.5"]),
997
1021
  "aria-label": c(t).mergeTag.insert,
998
1022
  title: c(t).mergeTag.insert,
999
1023
  disabled: e.disabled,
1000
1024
  onMousedown: r[0] ||= _(() => {}, ["prevent"]),
1001
1025
  onClick: r[1] ||= (e) => n.$emit("insert")
1002
- }, [l(c(le), {
1026
+ }, [l(c(P), {
1003
1027
  size: 12,
1004
1028
  "stroke-width": 2
1005
- }), D(" " + T(c(t).mergeTag.insertShort), 1)], 42, vt));
1029
+ }), D(" " + T(c(t).mergeTag.insertShort), 1)], 42, bt));
1006
1030
  }
1007
- }), xt = [
1031
+ }), Ct = [
1008
1032
  "aria-label",
1009
1033
  "title",
1010
1034
  "disabled"
1011
- ], St = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Ct = /* @__PURE__ */ o({
1035
+ ], wt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Tt = /* @__PURE__ */ o({
1012
1036
  __name: "LogicTagInsertButton",
1013
1037
  props: { disabled: { type: Boolean } },
1014
1038
  emits: ["insert"],
@@ -1016,20 +1040,20 @@ var ut = ["aria-label"], dt = [
1016
1040
  let { t } = N();
1017
1041
  return (n, r) => (i(), m("button", {
1018
1042
  type: "button",
1019
- class: d([St, "tpl:mt-1.5"]),
1043
+ class: d([wt, "tpl:mt-1.5"]),
1020
1044
  "aria-label": c(t).logicTag.insert,
1021
1045
  title: c(t).logicTag.insert,
1022
1046
  disabled: e.disabled,
1023
1047
  "data-testid": "field-insert-logic-button",
1024
1048
  onMousedown: r[0] ||= _(() => {}, ["prevent"]),
1025
1049
  onClick: r[1] ||= (e) => n.$emit("insert")
1026
- }, [l(c(F), {
1050
+ }, [l(c(I), {
1027
1051
  size: 12,
1028
1052
  "stroke-width": 2
1029
- }), D(" " + T(c(t).logicTag.insertShort), 1)], 42, xt));
1053
+ }), D(" " + T(c(t).logicTag.insertShort), 1)], 42, Ct));
1030
1054
  }
1031
1055
  });
1032
1056
  //#endregion
1033
- export { nt as a, Ge as c, lt as i, bt as n, et as o, _t as r, tt as s, Ct as t };
1057
+ export { it as a, qe as c, dt as i, St as n, nt as o, yt as r, rt as s, Tt as t };
1034
1058
 
1035
- //# sourceMappingURL=LogicTagInsertButton-CHc1yZ9v.js.map
1059
+ //# sourceMappingURL=LogicTagInsertButton-3pIbVE9p.js.map