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