@templatical/editor 0.20.0 → 0.21.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 (186) hide show
  1. package/README.md +1 -0
  2. package/dist/{AiChatSidebar-ChrE6pUq.js → AiChatSidebar-K_AehWc-.js} +9 -9
  3. package/dist/{AiFeatureMenu-DkQ9HhQ6.js → AiFeatureMenu-CPdNpHpZ.js} +6 -6
  4. package/dist/{BlockIssueBadge-B4QjePax.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
  5. package/dist/{CloudEditor-CfX-aMiV.js → CloudEditor-3a7mqMhe.js} +263 -315
  6. package/dist/{CollaboratorBar-DTibhQ1j.js → CollaboratorBar-Ds0YZWzV.js} +3 -3
  7. package/dist/{ColorPicker-4vDYhdGe.js → ColorPicker-s9GHXjZs.js} +4 -4
  8. package/dist/CommentsSidebar-DvNEdugN.js +435 -0
  9. package/dist/{CountdownBlock-Bn5w7C-p.js → CountdownBlock-BUHYIAe9.js} +1 -1
  10. package/dist/{CountdownToolbar-D7yQqnA2.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
  11. package/dist/{DesignReferenceSidebar-DnO6ZdwS.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
  12. package/dist/{IssuesPanel-X_vkNGrs.js → IssuesPanel-CEnEGFtd.js} +7 -7
  13. package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
  14. package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
  15. package/dist/{ParagraphEditor-C5ixOIYb.js → ParagraphEditor-CkwBirNl.js} +47 -47
  16. package/dist/{RichTextEditorContent-DwhDnMsG.js → RichTextEditorContent-FbnWsh46.js} +6 -6
  17. package/dist/SaveBlockDialog-Cc5BSUBx.js +264 -0
  18. package/dist/SavedBlockPreviewCanvas-ubttfmKr.js +109 -0
  19. package/dist/SavedBlocksBrowserModal-LkY_U3lY.js +323 -0
  20. package/dist/SavedBlocksPanels-CET0zvH6.js +36 -0
  21. package/dist/SavedBlocksPickBar-poGS4PoI.js +52 -0
  22. package/dist/{SnapshotHistory-DaVueFv6.js → SnapshotHistory-BvF5IXn1.js} +8 -8
  23. package/dist/{TemplateScoringPanel-B0UHoTLx.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
  24. package/dist/{TestEmailModal-BkauxF7j.js → TestEmailModal-BRaM_eko.js} +4 -4
  25. package/dist/{TitleEditor-n6WDVDjW.js → TitleEditor-Bhgzh-iQ.js} +11 -11
  26. package/dist/{TplModal-BDDyvT-C.js → TplModal-BA-Zsg0O.js} +3 -3
  27. package/dist/{blockTypeIcons-4D0aFXNg.js → blockTypeIcons-B1-Yzp-a.js} +6 -6
  28. package/dist/bundle-stats.json +8 -8
  29. package/dist/{cdn/chunks/ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -5
  30. package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js → AiFeatureMenu--PdArSnv.js} +7 -7
  31. package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js.map → AiFeatureMenu--PdArSnv.js.map} +1 -1
  32. package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js → BlockIssueBadge-DMSd0SIl.js} +5 -5
  33. package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js.map → BlockIssueBadge-DMSd0SIl.js.map} +1 -1
  34. package/dist/cdn/chunks/{CloudEditor-CEa3Xgqh.js → CloudEditor-DnTfI5GU.js} +270 -322
  35. package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js → CollaboratorBar-CBqd7ldq.js} +3 -3
  37. package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js.map → CollaboratorBar-CBqd7ldq.js.map} +1 -1
  38. package/dist/cdn/chunks/{ColorPicker-ll8pynws.js → ColorPicker-DCdWP8YB.js} +161 -161
  39. package/dist/cdn/chunks/{ColorPicker-ll8pynws.js.map → ColorPicker-DCdWP8YB.js.map} +1 -1
  40. package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js → CountdownBlock-BDnWMAME.js} +4 -4
  41. package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js.map → CountdownBlock-BDnWMAME.js.map} +1 -1
  42. package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js → CountdownToolbar-BbLoo22S.js} +4 -5
  43. package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js.map → CountdownToolbar-BbLoo22S.js.map} +1 -1
  44. package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js → IssuesPanel-CfudrI3T.js} +7 -7
  45. package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js.map → IssuesPanel-CfudrI3T.js.map} +1 -1
  46. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
  47. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
  48. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js +123 -0
  49. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js.map +1 -0
  50. package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js → ParagraphEditor-DPCUSXpx.js} +86 -86
  51. package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js.map → ParagraphEditor-DPCUSXpx.js.map} +1 -1
  52. package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js → RichTextEditorContent-B8dOiv_D.js} +5 -5
  53. package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js.map → RichTextEditorContent-B8dOiv_D.js.map} +1 -1
  54. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js +259 -0
  55. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js.map +1 -0
  56. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js +110 -0
  57. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js.map +1 -0
  58. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js +318 -0
  59. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js.map +1 -0
  60. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js +38 -0
  61. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js.map +1 -0
  62. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js +52 -0
  63. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js.map +1 -0
  64. package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js → TitleEditor-iwd-O9sO.js} +11 -11
  65. package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js.map → TitleEditor-iwd-O9sO.js.map} +1 -1
  66. package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js → blockTypeIcons-BYz0fgLz.js} +7 -7
  67. package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js.map → blockTypeIcons-BYz0fgLz.js.map} +1 -1
  68. package/dist/{ca-DbWoy4rG.js → cdn/chunks/ca-BBgad6y5.js} +52 -3
  69. package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
  70. package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
  71. package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
  72. package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
  73. package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
  74. package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
  75. package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
  76. package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
  77. package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
  78. package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
  79. package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
  80. package/dist/cdn/chunks/{extensions-Di3hdIRT.js → extensions-DeJh3E9b.js} +26 -26
  81. package/dist/cdn/chunks/{extensions-Di3hdIRT.js.map → extensions-DeJh3E9b.js.map} +1 -1
  82. package/dist/cdn/chunks/{features-CLIZ7Q-Y.js → features-pLfGJWIB.js} +1118 -962
  83. package/dist/cdn/chunks/features-pLfGJWIB.js.map +1 -0
  84. package/dist/cdn/chunks/{icons-GX40Qm2W.js → icons-FLemooQz.js} +16 -16
  85. package/dist/cdn/chunks/{icons-GX40Qm2W.js.map → icons-FLemooQz.js.map} +1 -1
  86. package/dist/cdn/chunks/{media-library-yYAkAagU.js → media-library-mCCZieYO.js} +176 -176
  87. package/dist/cdn/chunks/{media-library-yYAkAagU.js.map → media-library-mCCZieYO.js.map} +1 -1
  88. package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
  89. package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
  90. package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
  91. package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
  92. package/dist/cdn/chunks/quality-BRbHtAk1.js +2180 -0
  93. package/dist/cdn/chunks/{quality-DffYv9j5.js.map → quality-BRbHtAk1.js.map} +1 -1
  94. package/dist/cdn/chunks/{renderer-DpBGiXOg.js → renderer-Yg1XhsBN.js} +17 -17
  95. package/dist/cdn/chunks/{renderer-DpBGiXOg.js.map → renderer-Yg1XhsBN.js.map} +1 -1
  96. package/dist/cdn/chunks/{src-9K6uFiuK.js → src-BDJeYiVE.js} +33 -33
  97. package/dist/cdn/chunks/{src-9K6uFiuK.js.map → src-BDJeYiVE.js.map} +1 -1
  98. package/dist/cdn/chunks/{styles-DHSmjlpX.js → styles-Bp5Jsu9J.js} +1380 -1294
  99. package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +1 -0
  100. package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
  101. package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
  102. package/dist/cdn/editor.css +1 -1
  103. package/dist/cdn/editor.js +123 -114
  104. package/dist/cdn/editor.js.map +1 -1
  105. package/dist/{check-Bl4J_tYV.js → check-BpQDKiPz.js} +1 -1
  106. package/dist/{chevron-down-COEcl2iP.js → chevron-down-j8GrdTyz.js} +1 -1
  107. package/dist/chevron-up-BACyVhyC.js +7 -0
  108. package/dist/{circle-alert-CvHi5etc.js → circle-alert-CgtE46ND.js} +1 -1
  109. package/dist/{clock-CZZw62e8.js → clock-BzKLLW5L.js} +1 -1
  110. package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
  111. package/dist/{createLucideIcon-_peTZQtY.js → createLucideIcon-JWHwTI6N.js} +2 -2
  112. package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
  113. package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
  114. package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
  115. package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
  116. package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
  117. package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
  118. package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
  119. package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
  120. package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
  121. package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
  122. package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
  123. package/dist/dist-CweLDZrs.js +5 -0
  124. package/dist/dist-DOsdqAEZ.js +5 -0
  125. package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
  126. package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
  127. package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
  128. package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
  129. package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
  130. package/dist/{image-up-D26rNdfX.js → image-up-CQdtq8ge.js} +1 -1
  131. package/dist/index.d.ts +81 -4
  132. package/dist/{info-CE3JSTqk.js → info-BUJBXoE6.js} +1 -1
  133. package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
  134. package/dist/{list-checks-BQsLrtBB.js → list-checks-BGHaCSD5.js} +1 -1
  135. package/dist/{loader-circle-s9Rh5lLd.js → loader-circle-C-Z6kgI6.js} +1 -1
  136. package/dist/{message-circle-CI62d690.js → message-circle-CEm5qckV.js} +1 -1
  137. package/dist/pencil-DdwmkKLb.js +10 -0
  138. package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
  139. package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
  140. package/dist/{refresh-cw-DlYfl65Y.js → refresh-cw-maKlg0dl.js} +1 -1
  141. package/dist/{scan-line-CHadrYVb.js → scan-line-BFgesTOY.js} +1 -1
  142. package/dist/{send-CbP40otC.js → send-B70aQDrA.js} +1 -1
  143. package/dist/{shield-check-Bnj9aRoJ.js → shield-check-B7x5OKt5.js} +1 -1
  144. package/dist/{sparkles-CncWT57a.js → sparkles-DVlm1Ipp.js} +1 -1
  145. package/dist/style.css +1 -1
  146. package/dist/{styles-DkF_-uX8.js → styles-DIDAJdkj.js} +1237 -1151
  147. package/dist/templatical-editor.js +134 -125
  148. package/dist/{text-align-start-B458vzYw.js → text-align-start-Vay3Kvo2.js} +1 -1
  149. package/dist/{trash-2-DO0yjSU1.js → trash-2-DE8CmxAG.js} +1 -1
  150. package/dist/{triangle-alert-C18_ima6.js → triangle-alert-Djg6IG8N.js} +1 -1
  151. package/dist/{upload-DsCd2zTR.js → upload-BwwE0U6G.js} +1 -1
  152. package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
  153. package/dist/{useEditorCore-kKUemYY6.js → useEditorCore-Bd9CA4L_.js} +997 -817
  154. package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
  155. package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
  156. package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
  157. package/dist/{x-BCFQuE_q.js → x-CkD6A1iB.js} +1 -1
  158. package/package.json +21 -21
  159. package/dist/CommentsSidebar-D-o5Stlg.js +0 -442
  160. package/dist/ModuleBrowserModal-AJt--JPh.js +0 -202
  161. package/dist/ModulePreviewCanvas-BKYOcVCh.js +0 -106
  162. package/dist/NumberWithSuffix-Bf3rNxza.js +0 -89
  163. package/dist/SaveModuleDialog-B4QX9eiv.js +0 -125
  164. package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
  165. package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +0 -1
  166. package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js +0 -198
  167. package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js.map +0 -1
  168. package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js +0 -107
  169. package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js.map +0 -1
  170. package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js +0 -91
  171. package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js.map +0 -1
  172. package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js +0 -120
  173. package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js.map +0 -1
  174. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
  175. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
  176. package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
  177. package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
  178. package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
  179. package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
  180. package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +0 -1
  181. package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
  182. package/dist/cdn/chunks/quality-DffYv9j5.js +0 -2180
  183. package/dist/cdn/chunks/styles-DHSmjlpX.js.map +0 -1
  184. package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
  185. package/dist/dist-BDVm2MrW.js +0 -5
  186. package/dist/dist-DbekZDmJ.js +0 -5
@@ -1,7 +1,7 @@
1
1
  import { M as e, P as t, T as n, V as r, Z as i, c as a, d as o, f as s, g as c, h as l, it as u, l as ee, m as te, n as ne, ot as d, p as f, st as p, u as re, x as m, y as h } from "./draggable-D840DIZB.js";
2
- import { Bt as ie, H as ae, Rt as g, Ut as oe, V as se, Zt as ce, _n as le, hn as ue, lt as de, pn as fe, zt as _ } from "./features-CLIZ7Q-Y.js";
2
+ import { Cn as ie, Gt as ae, U as oe, Ut as se, W as ce, Wt as g, Yt as le, dt as ue, rn as de, xn as fe, yn as pe } from "./features-pLfGJWIB.js";
3
3
  //#region src/constants/styleConstants.ts
4
- var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]", y = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", b = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-l-[var(--tpl-radius-sm)] tpl:rounded-r-none tpl:border-r-0 tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", x = "tpl:flex tpl:items-center tpl:px-2.5 tpl:text-xs tpl:border tpl:border-l-0 tpl:text-[var(--tpl-text-dim)] tpl:bg-[var(--tpl-bg-hover)] tpl:border-[var(--tpl-border)] tpl:rounded-r-[var(--tpl-radius-sm)]", S = "tpl:flex-1 tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-mono tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", C = "tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:border tpl:border-[var(--tpl-border)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)]", w = "tpl:flex tpl:size-8 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]", T = "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]", E = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2.5 tpl:py-2 tpl:font-mono tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-150 tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", D = "tpl-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3.5 tpl:py-2 tpl:text-sm tpl:font-medium tpl:whitespace-nowrap tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary)] hover:tpl:text-[var(--tpl-bg)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", O = [
4
+ var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]", v = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", y = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-l-[var(--tpl-radius-sm)] tpl:rounded-r-none tpl:border-r-0 tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", b = "tpl:flex tpl:items-center tpl:px-2.5 tpl:text-xs tpl:border tpl:border-l-0 tpl:text-[var(--tpl-text-dim)] tpl:bg-[var(--tpl-bg-hover)] tpl:border-[var(--tpl-border)] tpl:rounded-r-[var(--tpl-radius-sm)]", x = "tpl:flex-1 tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-mono tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", S = "tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:border tpl:border-[var(--tpl-border)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)]", C = "tpl:flex tpl:size-8 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]", w = "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]", T = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2.5 tpl:py-2 tpl:font-mono tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-150 tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", E = "tpl-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3.5 tpl:py-2 tpl:text-sm tpl:font-medium tpl:whitespace-nowrap tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary)] hover:tpl:text-[var(--tpl-bg)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", D = [
5
5
  "10px",
6
6
  "12px",
7
7
  "14px",
@@ -14,7 +14,7 @@ var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
14
14
  "36px",
15
15
  "48px",
16
16
  "64px"
17
- ], k = [
17
+ ], O = [
18
18
  "1",
19
19
  "1.2",
20
20
  "1.4",
@@ -23,7 +23,7 @@ var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
23
23
  "1.8",
24
24
  "2",
25
25
  "2.5"
26
- ], A = [
26
+ ], k = [
27
27
  {
28
28
  label: "Normal",
29
29
  value: "normal"
@@ -52,34 +52,34 @@ var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
52
52
  label: "3px",
53
53
  value: "3px"
54
54
  }
55
- ], j = "#000000", M = "#ffffff", N = "#ffff00", P = "#f2f2f2", F = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, I = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
55
+ ], A = "#000000", j = "#ffffff", M = "#ffff00", N = "#f2f2f2", P = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, F = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
56
56
  360 / (Math.PI * 2);
57
- var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
57
+ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
58
58
  r: parseInt(e[0] + e[0], 16),
59
59
  g: parseInt(e[1] + e[1], 16),
60
60
  b: parseInt(e[2] + e[2], 16),
61
- a: e.length === 4 ? I(parseInt(e[3] + e[3], 16) / 255, 2) : 1
61
+ a: e.length === 4 ? F(parseInt(e[3] + e[3], 16) / 255, 2) : 1
62
62
  } : {
63
63
  r: parseInt(e.substring(0, 2), 16),
64
64
  g: parseInt(e.substring(2, 4), 16),
65
65
  b: parseInt(e.substring(4, 6), 16),
66
- a: e.length === 8 ? I(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
67
- }), z = (e) => me(pe(e)), B = ({ h: e, s: t, v: n, a: r }) => {
66
+ a: e.length === 8 ? F(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
67
+ }), R = (e) => he(me(e)), z = ({ h: e, s: t, v: n, a: r }) => {
68
68
  let i = (200 - t) * n / 100;
69
69
  return {
70
- h: I(e),
71
- s: I(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
72
- l: I(i / 2),
73
- a: I(r, 2)
70
+ h: F(e),
71
+ s: F(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
72
+ l: F(i / 2),
73
+ a: F(r, 2)
74
74
  };
75
- }, V = (e) => {
76
- let { h: t, s: n, l: r } = B(e);
75
+ }, B = (e) => {
76
+ let { h: t, s: n, l: r } = z(e);
77
77
  return `hsl(${t}, ${n}%, ${r}%)`;
78
- }, pe = ({ h: e, s: t, v: n, a: r }) => {
78
+ }, me = ({ h: e, s: t, v: n, a: r }) => {
79
79
  e = e / 360 * 6, t /= 100, n /= 100;
80
80
  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;
81
81
  return {
82
- r: I([
82
+ r: F([
83
83
  n,
84
84
  o,
85
85
  a,
@@ -87,7 +87,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
87
87
  s,
88
88
  n
89
89
  ][c] * 255),
90
- g: I([
90
+ g: F([
91
91
  s,
92
92
  n,
93
93
  n,
@@ -95,7 +95,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
95
95
  a,
96
96
  a
97
97
  ][c] * 255),
98
- b: I([
98
+ b: F([
99
99
  a,
100
100
  a,
101
101
  s,
@@ -103,74 +103,74 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
103
103
  n,
104
104
  o
105
105
  ][c] * 255),
106
- a: I(r, 2)
106
+ a: F(r, 2)
107
107
  };
108
- }, H = (e) => {
108
+ }, V = (e) => {
109
109
  let t = e.toString(16);
110
110
  return t.length < 2 ? "0" + t : t;
111
- }, me = ({ r: e, g: t, b: n, a: r }) => {
112
- let i = r < 1 ? H(I(r * 255)) : "";
113
- return "#" + H(e) + H(t) + H(n) + i;
114
111
  }, he = ({ r: e, g: t, b: n, a: r }) => {
112
+ let i = r < 1 ? V(F(r * 255)) : "";
113
+ return "#" + V(e) + V(t) + V(n) + i;
114
+ }, ge = ({ r: e, g: t, b: n, a: r }) => {
115
115
  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;
116
116
  return {
117
- h: I(60 * (o < 0 ? o + 6 : o)),
118
- s: I(i ? a / i * 100 : 0),
119
- v: I(i / 255 * 100),
117
+ h: F(60 * (o < 0 ? o + 6 : o)),
118
+ s: F(i ? a / i * 100 : 0),
119
+ v: F(i / 255 * 100),
120
120
  a: r
121
121
  };
122
- }, U = (e, t) => {
122
+ }, H = (e, t) => {
123
123
  if (e === t) return !0;
124
124
  for (let n in e) if (e[n] !== t[n]) return !1;
125
125
  return !0;
126
- }, W = (e, t) => e.toLowerCase() === t.toLowerCase() || U(R(e), R(t)), G = {}, K = (e) => {
127
- let t = G[e];
128
- return t || (t = document.createElement("template"), t.innerHTML = e, G[e] = t), t;
129
- }, q = (e, t, n) => {
126
+ }, U = (e, t) => e.toLowerCase() === t.toLowerCase() || H(L(e), L(t)), W = {}, G = (e) => {
127
+ let t = W[e];
128
+ return t || (t = document.createElement("template"), t.innerHTML = e, W[e] = t), t;
129
+ }, K = (e, t, n) => {
130
130
  e.dispatchEvent(new CustomEvent(t, {
131
131
  bubbles: !0,
132
132
  detail: n
133
133
  }));
134
- }, J = !1, Y = (e) => "touches" in e, ge = (e) => J && !Y(e) ? !1 : (J ||= Y(e), !0), X = (e, t) => {
135
- let n = Y(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
136
- q(e.el, "move", e.getMove({
137
- x: F((n.pageX - (r.left + window.pageXOffset)) / r.width),
138
- y: F((n.pageY - (r.top + window.pageYOffset)) / r.height)
134
+ }, q = !1, J = (e) => "touches" in e, _e = (e) => q && !J(e) ? !1 : (q ||= J(e), !0), Y = (e, t) => {
135
+ let n = J(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
136
+ K(e.el, "move", e.getMove({
137
+ x: P((n.pageX - (r.left + window.pageXOffset)) / r.width),
138
+ y: P((n.pageY - (r.top + window.pageYOffset)) / r.height)
139
139
  }));
140
- }, _e = (e, t) => {
140
+ }, X = (e, t) => {
141
141
  let n = t.keyCode;
142
- n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), q(e.el, "move", e.getMove({
142
+ n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), K(e.el, "move", e.getMove({
143
143
  x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
144
144
  y: n === 40 ? .01 : n === 38 ? -.01 : 0
145
145
  }, !0)));
146
146
  }, ve = class {
147
147
  constructor(e, t, n, r) {
148
- let i = K(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
148
+ let i = G(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
149
149
  e.appendChild(i.content.cloneNode(!0));
150
150
  let a = e.querySelector(`[part=${t}]`);
151
151
  a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
152
152
  }
153
153
  set dragging(e) {
154
154
  let t = e ? document.addEventListener : document.removeEventListener;
155
- t(J ? "touchmove" : "mousemove", this), t(J ? "touchend" : "mouseup", this);
155
+ t(q ? "touchmove" : "mousemove", this), t(q ? "touchend" : "mouseup", this);
156
156
  }
157
157
  handleEvent(e) {
158
158
  switch (e.type) {
159
159
  case "mousedown":
160
160
  case "touchstart":
161
- if (e.preventDefault(), !ge(e) || !J && e.button != 0) return;
162
- this.el.focus(), X(this, e), this.dragging = !0;
161
+ if (e.preventDefault(), !_e(e) || !q && e.button != 0) return;
162
+ this.el.focus(), Y(this, e), this.dragging = !0;
163
163
  break;
164
164
  case "mousemove":
165
165
  case "touchmove":
166
- e.preventDefault(), X(this, e);
166
+ e.preventDefault(), Y(this, e);
167
167
  break;
168
168
  case "mouseup":
169
169
  case "touchend":
170
170
  this.dragging = !1;
171
171
  break;
172
172
  case "keydown":
173
- _e(this, e);
173
+ X(this, e);
174
174
  break;
175
175
  }
176
176
  }
@@ -186,16 +186,16 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
186
186
  update({ h: e }) {
187
187
  this.h = e, this.style([{
188
188
  left: `${e / 360 * 100}%`,
189
- color: V({
189
+ color: B({
190
190
  h: e,
191
191
  s: 100,
192
192
  v: 100,
193
193
  a: 1
194
194
  })
195
- }]), this.el.setAttribute("aria-valuenow", `${I(e)}`);
195
+ }]), this.el.setAttribute("aria-valuenow", `${F(e)}`);
196
196
  }
197
197
  getMove(e, t) {
198
- return { h: t ? F(this.h + e.x * 360, 0, 360) : 360 * e.x };
198
+ return { h: t ? P(this.h + e.x * 360, 0, 360) : 360 * e.x };
199
199
  }
200
200
  }, be = class extends ve {
201
201
  constructor(e) {
@@ -205,18 +205,18 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
205
205
  this.hsva = e, this.style([{
206
206
  top: `${100 - e.v}%`,
207
207
  left: `${e.s}%`,
208
- color: V(e)
209
- }, { "background-color": V({
208
+ color: B(e)
209
+ }, { "background-color": B({
210
210
  h: e.h,
211
211
  s: 100,
212
212
  v: 100,
213
213
  a: 1
214
- }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${I(e.s)}%, Brightness ${I(e.v)}%`);
214
+ }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${F(e.s)}%, Brightness ${F(e.v)}%`);
215
215
  }
216
216
  getMove(e, t) {
217
217
  return {
218
- s: t ? F(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
219
- v: t ? F(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
218
+ s: t ? P(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
219
+ v: t ? P(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
220
220
  };
221
221
  }
222
222
  }, xe = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", Se = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", Ce = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", Z = Symbol("same"), Q = Symbol("color"), we = Symbol("hsva"), $ = Symbol("update"), Te = Symbol("parts"), Ee = Symbol("css"), De = Symbol("sliders"), Oe = class extends HTMLElement {
@@ -244,7 +244,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
244
244
  }
245
245
  constructor() {
246
246
  super();
247
- let e = K(`<style>${this[Ee].join("")}</style>`), t = this.attachShadow({ mode: "open" });
247
+ let e = G(`<style>${this[Ee].join("")}</style>`), t = this.attachShadow({ mode: "open" });
248
248
  t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Te] = this[De].map((e) => new e(t));
249
249
  }
250
250
  connectedCallback() {
@@ -264,7 +264,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
264
264
  };
265
265
  this[$](n);
266
266
  let r;
267
- !U(n, t) && !this[Z](r = this.colorModel.fromHsva(n)) && (this[Q] = r, q(this, "color-changed", { value: r }));
267
+ !H(n, t) && !this[Z](r = this.colorModel.fromHsva(n)) && (this[Q] = r, K(this, "color-changed", { value: r }));
268
268
  }
269
269
  [Z](e) {
270
270
  return this.color && this.colorModel.equal(e, this.color);
@@ -274,14 +274,14 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
274
274
  }
275
275
  }, ke = {
276
276
  defaultColor: "#000",
277
- toHsva: L,
278
- fromHsva: ({ h: e, s: t, v: n }) => z({
277
+ toHsva: I,
278
+ fromHsva: ({ h: e, s: t, v: n }) => R({
279
279
  h: e,
280
280
  s: t,
281
281
  v: n,
282
282
  a: 1
283
283
  }),
284
- equal: W,
284
+ equal: U,
285
285
  fromAttr: (e) => e
286
286
  }, Ae = class extends Oe {
287
287
  get colorModel() {
@@ -346,34 +346,34 @@ var je = [
346
346
  }
347
347
  },
348
348
  emits: ["update:modelValue"],
349
- setup(m, { emit: v }) {
350
- let y = m, b = v, { t: x } = oe(), C = i(!1), w = i(), T = i(), E = i(!1);
351
- le(w, () => {
352
- C.value = !1;
353
- }, { ignore: [T] });
354
- let D = s(() => !y.modelValue), O = s(() => _(y.modelValue)), k = s(() => _(y.modelValue || y.seedColor)), A = s(() => !y.disabled && !D.value), j = n(ce, ie), M = s(() => [...new Set(y.presets ?? j.presets)]), N = s(() => y.allowCustom ?? j.allowCustom), P = s(() => M.value.length > 0), F = s(() => N.value || !P.value), I = s(() => g(y.modelValue));
355
- function L(e) {
356
- return I.value !== "" && g(e) === I.value;
349
+ setup(m, { emit: _ }) {
350
+ let v = m, y = _, { t: b } = le(), S = i(!1), C = i(), w = i(), T = i(!1);
351
+ ie(C, () => {
352
+ S.value = !1;
353
+ }, { ignore: [w] });
354
+ let E = s(() => !v.modelValue), D = s(() => g(v.modelValue)), O = s(() => g(v.modelValue || v.seedColor)), k = s(() => !v.disabled && !E.value), A = n(de, ae), j = s(() => [...new Set(v.presets ?? A.presets)]), M = s(() => v.allowCustom ?? A.allowCustom), N = s(() => j.value.length > 0), P = s(() => M.value || !N.value), F = s(() => se(v.modelValue));
355
+ function I(e) {
356
+ return F.value !== "" && se(e) === F.value;
357
357
  }
358
- function R(e) {
359
- b("update:modelValue", e);
358
+ function L(e) {
359
+ y("update:modelValue", e);
360
360
  }
361
- let z = s(() => P.value && !F.value);
362
- function B(e) {
363
- return z.value ? e + 1 : e;
361
+ let R = s(() => N.value && !P.value);
362
+ function z(e) {
363
+ return R.value ? e + 1 : e;
364
364
  }
365
- let V = s(() => {
366
- if (z.value && D.value) return 0;
367
- let e = M.value.findIndex((e) => L(e));
368
- return e === -1 ? 0 : B(e);
365
+ let B = s(() => {
366
+ if (R.value && E.value) return 0;
367
+ let e = j.value.findIndex((e) => I(e));
368
+ return e === -1 ? 0 : z(e);
369
369
  });
370
- function pe() {
371
- return V.value === 0 ? 0 : -1;
370
+ function me() {
371
+ return B.value === 0 ? 0 : -1;
372
372
  }
373
- function H(e) {
374
- return B(e) === V.value ? 0 : -1;
373
+ function V(e) {
374
+ return z(e) === B.value ? 0 : -1;
375
375
  }
376
- function me(e) {
376
+ function he(e) {
377
377
  if (![
378
378
  "ArrowRight",
379
379
  "ArrowDown",
@@ -383,83 +383,83 @@ var je = [
383
383
  let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
384
384
  r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
385
385
  }
386
- function he(e) {
387
- E.value = !0, b("update:modelValue", e.detail.value);
386
+ function ge(e) {
387
+ T.value = !0, y("update:modelValue", e.detail.value);
388
388
  }
389
- function U() {
390
- E.value = !1;
389
+ function H() {
390
+ T.value = !1;
391
391
  }
392
- function W() {
393
- !E.value && D.value && b("update:modelValue", k.value);
392
+ function U() {
393
+ !T.value && E.value && y("update:modelValue", O.value);
394
394
  }
395
- function G(e) {
396
- b("update:modelValue", e.target.value);
395
+ function W(e) {
396
+ y("update:modelValue", e.target.value);
397
397
  }
398
- function K() {
399
- b("update:modelValue", "");
398
+ function G() {
399
+ y("update:modelValue", "");
400
400
  }
401
- let q = ae(), { toLocal: J } = se(), Y = n(fe, null), ge = n(ue, null), X = i({
401
+ let K = ce(), { toLocal: q } = oe(), J = n(pe, null), _e = n(fe, null), Y = i({
402
402
  top: 0,
403
403
  left: 0
404
404
  });
405
- function _e() {
406
- if (!y.disabled) {
407
- if (!C.value) {
408
- let e = T.value?.getBoundingClientRect();
405
+ function X() {
406
+ if (!v.disabled) {
407
+ if (!S.value) {
408
+ let e = w.value?.getBoundingClientRect();
409
409
  if (e) {
410
410
  let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
411
- X.value = J({
411
+ Y.value = q({
412
412
  top: t,
413
413
  left: e.left
414
414
  });
415
415
  }
416
416
  }
417
- C.value = !C.value;
417
+ S.value = !S.value;
418
418
  }
419
419
  }
420
420
  return (n, i) => (e(), c("div", { class: d(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", m.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
421
421
  f("button", {
422
422
  ref_key: "swatchRef",
423
- ref: T,
423
+ ref: w,
424
424
  type: "button",
425
425
  disabled: m.disabled,
426
- "aria-label": m.ariaLabel || u(x).colorPicker.pickColor,
426
+ "aria-label": m.ariaLabel || u(b).colorPicker.pickColor,
427
427
  title: m.ariaLabel || void 0,
428
- "aria-expanded": C.value,
428
+ "aria-expanded": S.value,
429
429
  class: d([
430
430
  "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)]",
431
431
  m.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
432
- C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !m.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
432
+ S.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !m.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
433
433
  m.size === "sm" ? "tpl:size-8" : "tpl:size-10"
434
434
  ]),
435
- onClick: _e
435
+ onClick: X
436
436
  }, [f("span", {
437
- class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": D.value }]),
438
- style: p(D.value ? void 0 : { backgroundColor: O.value })
437
+ class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": E.value }]),
438
+ style: p(E.value ? void 0 : { backgroundColor: D.value })
439
439
  }, null, 6)], 10, je),
440
- !m.swatchOnly && F.value ? (e(), c("div", Me, [f("input", {
440
+ !m.swatchOnly && P.value ? (e(), c("div", Me, [f("input", {
441
441
  type: "text",
442
- class: d([u(S), "tpl:w-full"]),
443
- style: p(A.value ? { paddingRight: "2.25rem" } : void 0),
444
- value: O.value,
445
- placeholder: m.placeholder || u(x).colorPicker.notSet,
442
+ class: d([u(x), "tpl:w-full"]),
443
+ style: p(k.value ? { paddingRight: "2.25rem" } : void 0),
444
+ value: D.value,
445
+ placeholder: m.placeholder || u(b).colorPicker.notSet,
446
446
  disabled: m.disabled,
447
- "aria-label": u(x).colorPicker.hexValue,
448
- onInput: G
449
- }, null, 46, Ne), A.value ? (e(), c("button", {
447
+ "aria-label": u(b).colorPicker.hexValue,
448
+ onInput: W
449
+ }, null, 46, Ne), k.value ? (e(), c("button", {
450
450
  key: 0,
451
451
  type: "button",
452
- "aria-label": u(x).colorPicker.clear,
453
- title: u(x).colorPicker.clear,
452
+ "aria-label": u(b).colorPicker.clear,
453
+ title: u(b).colorPicker.clear,
454
454
  class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
455
- onClick: K
456
- }, [h(u(de), {
455
+ onClick: G
456
+ }, [h(u(ue), {
457
457
  size: 14,
458
458
  "stroke-width": 1.5
459
459
  })], 8, Pe)) : l("", !0)])) : l("", !0),
460
460
  (e(), te(o, {
461
- to: u(q),
462
- disabled: !u(q)
461
+ to: u(K),
462
+ disabled: !u(K)
463
463
  }, [h(ne, {
464
464
  "enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
465
465
  "enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
@@ -468,73 +468,73 @@ var je = [
468
468
  "leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
469
469
  "leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
470
470
  }, {
471
- default: r(() => [C.value ? (e(), c("div", {
471
+ default: r(() => [S.value ? (e(), c("div", {
472
472
  key: 0,
473
473
  ref_key: "popoverRef",
474
- ref: w,
475
- "data-tpl-theme": u(ge),
474
+ ref: C,
475
+ "data-tpl-theme": u(_e),
476
476
  class: "tpl-color-popover tpl:absolute tpl:z-modal tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg",
477
477
  style: p({
478
- top: `${X.value.top}px`,
479
- left: `${X.value.left}px`,
480
- ...u(Y)
478
+ top: `${Y.value.top}px`,
479
+ left: `${Y.value.left}px`,
480
+ ...u(J)
481
481
  })
482
482
  }, [
483
- P.value ? (e(), c("div", {
483
+ N.value ? (e(), c("div", {
484
484
  key: 0,
485
485
  role: "radiogroup",
486
- "aria-label": u(x).colorPicker.presetColors,
487
- class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", F.value && "tpl:mb-2"]),
488
- onKeydown: me
489
- }, [z.value ? (e(), c("button", {
486
+ "aria-label": u(b).colorPicker.presetColors,
487
+ class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", P.value && "tpl:mb-2"]),
488
+ onKeydown: he
489
+ }, [R.value ? (e(), c("button", {
490
490
  key: 0,
491
491
  type: "button",
492
492
  role: "radio",
493
- "aria-label": u(x).colorPicker.clear,
494
- title: u(x).colorPicker.clear,
495
- "aria-checked": D.value,
496
- tabindex: pe(),
497
- 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)]", D.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
498
- onClick: K
499
- }, null, 10, Le)) : l("", !0), (e(!0), c(re, null, t(M.value, (t, n) => (e(), c("button", {
493
+ "aria-label": u(b).colorPicker.clear,
494
+ title: u(b).colorPicker.clear,
495
+ "aria-checked": E.value,
496
+ tabindex: me(),
497
+ 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)]", E.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
498
+ onClick: G
499
+ }, null, 10, Le)) : l("", !0), (e(!0), c(re, null, t(j.value, (t, n) => (e(), c("button", {
500
500
  key: t,
501
501
  type: "button",
502
502
  role: "radio",
503
503
  "aria-label": t,
504
504
  title: t,
505
- "aria-checked": L(t),
506
- tabindex: H(n),
505
+ "aria-checked": I(t),
506
+ tabindex: V(n),
507
507
  style: p({ backgroundColor: t }),
508
- 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)]", L(t) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
509
- onClick: (e) => R(t)
508
+ 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)]", I(t) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
509
+ onClick: (e) => L(t)
510
510
  }, null, 14, Re))), 128))], 42, Ie)) : l("", !0),
511
- F.value ? (e(), c("hex-color-picker", {
511
+ P.value ? (e(), c("hex-color-picker", {
512
512
  key: 1,
513
- color: k.value,
514
- "aria-label": u(x).colorPicker.pickColor,
515
- onColorChanged: he,
516
- onPointerdown: U,
517
- onPointerup: W,
518
- onKeydown: i[0] ||= a((e) => C.value = !1, ["escape"])
513
+ color: O.value,
514
+ "aria-label": u(b).colorPicker.pickColor,
515
+ onColorChanged: ge,
516
+ onPointerdown: H,
517
+ onPointerup: U,
518
+ onKeydown: i[0] ||= a((e) => S.value = !1, ["escape"])
519
519
  }, null, 40, ze)) : l("", !0),
520
- m.swatchOnly && F.value ? (e(), c("div", Be, [f("input", {
520
+ m.swatchOnly && P.value ? (e(), c("div", Be, [f("input", {
521
521
  type: "text",
522
- class: d([u(S), "tpl:w-full"]),
523
- style: p(A.value ? { paddingRight: "2.25rem" } : void 0),
524
- value: O.value,
525
- placeholder: m.placeholder || u(x).colorPicker.notSet,
522
+ class: d([u(x), "tpl:w-full"]),
523
+ style: p(k.value ? { paddingRight: "2.25rem" } : void 0),
524
+ value: D.value,
525
+ placeholder: m.placeholder || u(b).colorPicker.notSet,
526
526
  disabled: m.disabled,
527
- "aria-label": u(x).colorPicker.hexValue,
528
- onChange: G,
527
+ "aria-label": u(b).colorPicker.hexValue,
528
+ onChange: W,
529
529
  onKeydown: i[1] ||= a(ee((e) => e.target.blur(), ["prevent"]), ["enter"])
530
- }, null, 46, Ve), A.value ? (e(), c("button", {
530
+ }, null, 46, Ve), k.value ? (e(), c("button", {
531
531
  key: 0,
532
532
  type: "button",
533
- "aria-label": u(x).colorPicker.clear,
534
- title: u(x).colorPicker.clear,
533
+ "aria-label": u(b).colorPicker.clear,
534
+ title: u(b).colorPicker.clear,
535
535
  class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
536
- onClick: K
537
- }, [h(u(de), {
536
+ onClick: G
537
+ }, [h(u(ue), {
538
538
  size: 14,
539
539
  "stroke-width": 1.5
540
540
  })], 8, He)) : l("", !0)])) : l("", !0)
@@ -545,6 +545,6 @@ var je = [
545
545
  }
546
546
  });
547
547
  //#endregion
548
- export { w as _, j as a, k as c, D as d, y as f, E as g, v as h, P as i, T as l, x as m, M as n, O as o, b as p, N as r, A as s, Ue as t, C as u };
548
+ export { C as _, A as a, O as c, E as d, v as f, T as g, _ as h, N as i, w as l, b as m, j as n, D as o, y as p, M as r, k as s, Ue as t, S as u };
549
549
 
550
- //# sourceMappingURL=ColorPicker-ll8pynws.js.map
550
+ //# sourceMappingURL=ColorPicker-DCdWP8YB.js.map