@templatical/editor 0.49.0 → 0.51.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.
- package/README.md +4 -2
- package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
- package/dist/AiAltTextReview-DoBEudnE.js +206 -0
- package/dist/AiChatPanel-Bs6sES3b.js +550 -0
- package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
- package/dist/AiPanels-CfN7A-ZA.js +33 -0
- package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
- package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
- package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
- package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
- package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
- package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
- package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
- package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
- package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
- package/dist/WrapperBlock-BO619LAb.js +45 -0
- package/dist/aiErrors-D5UOoYOt.js +41 -0
- package/dist/aiImageContext-BH4Ss1h3.js +48 -0
- package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
- package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
- package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
- package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
- package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
- package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
- package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
- package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
- package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
- package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
- package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
- package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
- package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
- package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
- package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
- package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
- package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
- package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
- package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2151 -1480
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
- package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
- package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
- package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
- package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
- package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
- package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +361 -24
- package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
- package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
- package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2114 -1422
- package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
- package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
- package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
- package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +14 -12
- package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
- package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
- package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
- package/dist/CommentsSidebar-J65znlrH.js +0 -500
- package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
- package/dist/IssuesPanel-DeeVsfG7.js +0 -117
- package/dist/ParagraphEditor-zLV44z-R.js +0 -797
- package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
- package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
- package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
- package/dist/ToggleSwitch-DHweVJOr.js +0 -102
- package/dist/WrapperBlock-DiiaxpMb.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
- package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
- package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
- package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
- package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
- package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
- package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
- package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
- package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
- package/dist/copy-CUC43md_.js +0 -19
- package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
- package/dist/de-D_atmUVB.js +0 -87
- package/dist/dist-CCqn-RqE.js +0 -407
- package/dist/en-BHCMzqib.js +0 -1
- package/dist/en-DhJLnaBx.js +0 -87
- package/dist/image-up-BqiO7KCO.js +0 -27
- package/dist/keys-BymCnLHD.js +0 -10
- package/dist/plus-BDd0gTEm.js +0 -14
- package/dist/pt-BR-BphMoUTw.js +0 -87
- package/dist/shield-check-YhsbXfQc.js +0 -14
- package/dist/socialIcons-Bwv-49EB.js +0 -2167
- package/dist/timeouts-o5Y9BuqI.js +0 -4
- package/dist/upload-uU2cK0Ce.js +0 -21
- package/dist/useAliveFlag-BjP0Gxza.js +0 -10
- package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as O, i as k, s as A, u as j } from "./src-
|
|
3
|
-
import { t as ee } from "./dist-
|
|
4
|
-
import { J as te, Y as M, Z as ne, d as re } from "./keys-
|
|
5
|
-
import { t as N } from "./useI18n-
|
|
6
|
-
import { a as
|
|
7
|
-
import { Bt as
|
|
8
|
-
import { t as R } from "./useMergeTag-
|
|
9
|
-
import { t as ue } from "./useLogicTag-
|
|
1
|
+
import { $ as e, A as t, C as n, D as r, I as i, J as a, P as o, T as s, U as c, X as l, _ as u, b as d, c as f, dt as p, f as m, g as h, h as g, l as _, lt as v, m as y, n as b, ot as x, p as S, q as C, r as w, u as T, ut as E, x as D } from "./draggable-DZ0gwUJ6.js";
|
|
2
|
+
import { c as O, i as k, s as A, u as j } from "./src-BNFnxfrA.js";
|
|
3
|
+
import { t as ee } from "./dist-S-rLGqax.js";
|
|
4
|
+
import { J as te, Y as M, Z as ne, d as re } from "./keys-BTpmg2Tt.js";
|
|
5
|
+
import { t as N } from "./useI18n-CbVubQhM.js";
|
|
6
|
+
import { a as P, i as ie, n as ae, o as oe, r as se, t as ce } from "./usePopoverPosition-C829ps5i.js";
|
|
7
|
+
import { Bt as le, G as F, N as I, t as L } from "./icons-DNX6StSs.js";
|
|
8
|
+
import { t as R } from "./useMergeTag-B0KryMj8.js";
|
|
9
|
+
import { t as ue } from "./useLogicTag-B49Nc53Y.js";
|
|
10
10
|
import { u as de } from "./styleConstants-v1dNKgJf.js";
|
|
11
11
|
//#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
|
|
12
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 ? {
|
|
@@ -74,57 +74,57 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
74
74
|
v: B(i / 255 * 100),
|
|
75
75
|
a: r
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, q = (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
|
-
},
|
|
82
|
-
let t =
|
|
83
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
84
|
-
},
|
|
81
|
+
}, he = (e, t) => e.toLowerCase() === t.toLowerCase() || q(H(e), H(t)), ge = {}, J = (e) => {
|
|
82
|
+
let t = ge[e];
|
|
83
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, ge[e] = t), t;
|
|
84
|
+
}, Y = (e, t, n) => {
|
|
85
85
|
e.dispatchEvent(new CustomEvent(t, {
|
|
86
86
|
bubbles: !0,
|
|
87
87
|
detail: n
|
|
88
88
|
}));
|
|
89
|
-
},
|
|
90
|
-
let n =
|
|
91
|
-
|
|
89
|
+
}, X = !1, Z = (e) => "touches" in e, _e = (e) => X && !Z(e) ? !1 : (X ||= Z(e), !0), ve = (e, t) => {
|
|
90
|
+
let n = Z(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
91
|
+
Y(e.el, "move", e.getMove({
|
|
92
92
|
x: z((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
93
93
|
y: z((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
94
94
|
}));
|
|
95
|
-
},
|
|
95
|
+
}, ye = (e, t) => {
|
|
96
96
|
let n = t.keyCode;
|
|
97
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
97
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), Y(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
|
-
},
|
|
101
|
+
}, Q = class {
|
|
102
102
|
constructor(e, t, n, r) {
|
|
103
|
-
let i =
|
|
103
|
+
let i = J(`<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(
|
|
110
|
+
t(X ? "touchmove" : "mousemove", this), t(X ? "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(), !
|
|
117
|
-
this.el.focus(),
|
|
116
|
+
if (e.preventDefault(), !_e(e) || !X && e.button != 0) return;
|
|
117
|
+
this.el.focus(), ve(this, e), this.dragging = !0;
|
|
118
118
|
break;
|
|
119
119
|
case "mousemove":
|
|
120
120
|
case "touchmove":
|
|
121
|
-
e.preventDefault(),
|
|
121
|
+
e.preventDefault(), ve(this, e);
|
|
122
122
|
break;
|
|
123
123
|
case "mouseup":
|
|
124
124
|
case "touchend":
|
|
125
125
|
this.dragging = !1;
|
|
126
126
|
break;
|
|
127
|
-
case "keydown":
|
|
127
|
+
case "keydown": ye(this, e);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
style(e) {
|
|
@@ -132,7 +132,7 @@ 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
|
-
},
|
|
135
|
+
}, be = class extends Q {
|
|
136
136
|
constructor(e) {
|
|
137
137
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
138
138
|
}
|
|
@@ -150,7 +150,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
150
150
|
getMove(e, t) {
|
|
151
151
|
return { h: t ? z(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
152
152
|
}
|
|
153
|
-
},
|
|
153
|
+
}, xe = class extends Q {
|
|
154
154
|
constructor(e) {
|
|
155
155
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
156
156
|
}
|
|
@@ -172,32 +172,32 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
172
172
|
v: t ? z(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
},
|
|
175
|
+
}, Se = ":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)}", Ce = "[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}", we = "[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"), Te = Symbol("color"), Ee = Symbol("hsva"), De = 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
179
|
get [ke]() {
|
|
180
180
|
return [
|
|
181
|
+
Se,
|
|
181
182
|
Ce,
|
|
182
|
-
we
|
|
183
|
-
Te
|
|
183
|
+
we
|
|
184
184
|
];
|
|
185
185
|
}
|
|
186
186
|
get [Ae]() {
|
|
187
|
-
return [
|
|
187
|
+
return [xe, be];
|
|
188
188
|
}
|
|
189
189
|
get color() {
|
|
190
|
-
return this[
|
|
190
|
+
return this[Te];
|
|
191
191
|
}
|
|
192
192
|
set color(e) {
|
|
193
|
-
if (!this[
|
|
193
|
+
if (!this[$](e)) {
|
|
194
194
|
let t = this.colorModel.toHsva(e);
|
|
195
|
-
this[
|
|
195
|
+
this[De](t), this[Te] = e;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
constructor() {
|
|
199
199
|
super();
|
|
200
|
-
let e =
|
|
200
|
+
let e = J(`<style>${this[ke].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
201
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() {
|
|
@@ -208,22 +208,22 @@ 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[
|
|
211
|
+
this[$](r) || (this.color = r);
|
|
212
212
|
}
|
|
213
213
|
handleEvent(e) {
|
|
214
|
-
let t = this[
|
|
214
|
+
let t = this[Ee], n = {
|
|
215
215
|
...t,
|
|
216
216
|
...e.detail
|
|
217
217
|
};
|
|
218
|
-
this[
|
|
218
|
+
this[De](n);
|
|
219
219
|
let r;
|
|
220
|
-
!
|
|
220
|
+
!q(n, t) && !this[$](r = this.colorModel.fromHsva(n)) && (this[Te] = r, Y(this, "color-changed", { value: r }));
|
|
221
221
|
}
|
|
222
|
-
[
|
|
222
|
+
[$](e) {
|
|
223
223
|
return this.color && this.colorModel.equal(e, this.color);
|
|
224
224
|
}
|
|
225
|
-
[
|
|
226
|
-
this[
|
|
225
|
+
[De](e) {
|
|
226
|
+
this[Ee] = e, this[Oe].forEach((t) => t.update(e));
|
|
227
227
|
}
|
|
228
228
|
}, Me = {
|
|
229
229
|
defaultColor: "#000",
|
|
@@ -234,7 +234,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
234
234
|
v: n,
|
|
235
235
|
a: 1
|
|
236
236
|
}),
|
|
237
|
-
equal:
|
|
237
|
+
equal: he,
|
|
238
238
|
fromAttr: (e) => e
|
|
239
239
|
}, Ne = class extends je {
|
|
240
240
|
get colorModel() {
|
|
@@ -280,7 +280,7 @@ var Pe = [
|
|
|
280
280
|
"placeholder",
|
|
281
281
|
"disabled",
|
|
282
282
|
"aria-label"
|
|
283
|
-
], Ke = ["aria-label", "title"], qe = /* @__PURE__ */
|
|
283
|
+
], Ke = ["aria-label", "title"], qe = /* @__PURE__ */ n({
|
|
284
284
|
__name: "ColorPicker",
|
|
285
285
|
props: {
|
|
286
286
|
modelValue: {},
|
|
@@ -307,23 +307,23 @@ var Pe = [
|
|
|
307
307
|
}
|
|
308
308
|
},
|
|
309
309
|
emits: ["update:modelValue"],
|
|
310
|
-
setup(
|
|
311
|
-
let
|
|
312
|
-
ee(
|
|
310
|
+
setup(t, { emit: n }) {
|
|
311
|
+
let a = t, s = n, { t: l } = N(), C = e(!1), w = e(), O = e(), k = e(!1);
|
|
312
|
+
ee(w, () => {
|
|
313
313
|
C.value = !1;
|
|
314
314
|
}, { ignore: [O] });
|
|
315
|
-
let A =
|
|
315
|
+
let A = S(() => !a.modelValue), j = S(() => a.modelValue.trim().toLowerCase() === "transparent"), M = S(() => ie(a.modelValue)), le = S(() => (a.modelValue ? P(a.modelValue) : null) || (P(a.seedColor) ?? "#ffffff")), F = S(() => !a.disabled && !A.value), I = r(re, oe), R = S(() => [...new Set(a.presets ?? I.presets)]), ue = S(() => a.allowCustom ?? I.allowCustom), z = S(() => R.value.length > 0), B = S(() => ue.value || !z.value), V = S(() => se(a.modelValue));
|
|
316
316
|
function H(e) {
|
|
317
|
-
return V.value !== "" &&
|
|
317
|
+
return V.value !== "" && se(e) === V.value;
|
|
318
318
|
}
|
|
319
319
|
function fe(e) {
|
|
320
|
-
|
|
320
|
+
s("update:modelValue", e);
|
|
321
321
|
}
|
|
322
|
-
let U =
|
|
322
|
+
let U = S(() => z.value && !B.value);
|
|
323
323
|
function W(e) {
|
|
324
324
|
return U.value ? e + 1 : e;
|
|
325
325
|
}
|
|
326
|
-
let G =
|
|
326
|
+
let G = S(() => {
|
|
327
327
|
if (U.value && A.value) return 0;
|
|
328
328
|
let e = R.value.findIndex((e) => H(e));
|
|
329
329
|
return e === -1 ? 0 : W(e);
|
|
@@ -344,35 +344,35 @@ var Pe = [
|
|
|
344
344
|
let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
|
|
345
345
|
r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
k.value = !0,
|
|
347
|
+
function q(e) {
|
|
348
|
+
k.value = !0, s("update:modelValue", e.detail.value);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function he() {
|
|
351
351
|
k.value = !1;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
!k.value && A.value &&
|
|
355
|
-
}
|
|
356
|
-
function q(e) {
|
|
357
|
-
g("update:modelValue", e.target.value);
|
|
353
|
+
function ge() {
|
|
354
|
+
!k.value && A.value && s("update:modelValue", le.value);
|
|
358
355
|
}
|
|
359
|
-
function J() {
|
|
360
|
-
|
|
356
|
+
function J(e) {
|
|
357
|
+
s("update:modelValue", e.target.value);
|
|
361
358
|
}
|
|
362
359
|
function Y() {
|
|
363
|
-
|
|
360
|
+
s("update:modelValue", "");
|
|
364
361
|
}
|
|
365
|
-
|
|
362
|
+
function X() {
|
|
363
|
+
s("update:modelValue", "transparent");
|
|
364
|
+
}
|
|
365
|
+
let Z = ae(), { toLocal: _e } = ce(), ve = r(te, null), ye = r(ne, null), Q = e({
|
|
366
366
|
top: 0,
|
|
367
367
|
left: 0
|
|
368
368
|
});
|
|
369
|
-
function
|
|
370
|
-
if (!
|
|
369
|
+
function be() {
|
|
370
|
+
if (!a.disabled) {
|
|
371
371
|
if (!C.value) {
|
|
372
372
|
let e = O.value?.getBoundingClientRect();
|
|
373
373
|
if (e) {
|
|
374
374
|
let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
|
|
375
|
-
|
|
375
|
+
Q.value = _e({
|
|
376
376
|
top: t,
|
|
377
377
|
left: e.left
|
|
378
378
|
});
|
|
@@ -381,53 +381,53 @@ var Pe = [
|
|
|
381
381
|
C.value = !C.value;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
return (e,
|
|
385
|
-
|
|
384
|
+
return (e, n) => (o(), u("div", { class: v(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", t.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
385
|
+
y("button", {
|
|
386
386
|
ref_key: "swatchRef",
|
|
387
387
|
ref: O,
|
|
388
388
|
type: "button",
|
|
389
|
-
disabled:
|
|
390
|
-
"aria-label":
|
|
391
|
-
title:
|
|
389
|
+
disabled: t.disabled,
|
|
390
|
+
"aria-label": t.ariaLabel || x(l).colorPicker.pickColor,
|
|
391
|
+
title: t.ariaLabel || void 0,
|
|
392
392
|
"aria-expanded": C.value,
|
|
393
|
-
class:
|
|
393
|
+
class: v([
|
|
394
394
|
"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)]",
|
|
395
|
-
|
|
396
|
-
C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !
|
|
397
|
-
|
|
395
|
+
t.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
396
|
+
C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !t.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
|
|
397
|
+
t.size === "sm" ? "tpl:size-8" : "tpl:size-10"
|
|
398
398
|
]),
|
|
399
|
-
onClick:
|
|
400
|
-
}, [
|
|
401
|
-
class:
|
|
399
|
+
onClick: be
|
|
400
|
+
}, [y("span", {
|
|
401
|
+
class: v(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", {
|
|
402
402
|
"tpl-color-swatch-empty": A.value,
|
|
403
403
|
"tpl-color-swatch-transparent": j.value
|
|
404
404
|
}]),
|
|
405
|
-
style:
|
|
405
|
+
style: E(A.value || j.value ? void 0 : { backgroundColor: M.value })
|
|
406
406
|
}, null, 6)], 10, Pe),
|
|
407
|
-
!
|
|
407
|
+
!t.swatchOnly && B.value ? (o(), u("div", Fe, [y("input", {
|
|
408
408
|
type: "text",
|
|
409
|
-
class:
|
|
410
|
-
style:
|
|
409
|
+
class: v([x(de), "tpl:w-full"]),
|
|
410
|
+
style: E(F.value ? { paddingRight: "2.25rem" } : void 0),
|
|
411
411
|
value: M.value,
|
|
412
|
-
placeholder:
|
|
413
|
-
disabled:
|
|
414
|
-
"aria-label":
|
|
415
|
-
onInput:
|
|
416
|
-
}, null, 46, Ie), F.value ? (
|
|
412
|
+
placeholder: t.placeholder || x(l).colorPicker.notSet,
|
|
413
|
+
disabled: t.disabled,
|
|
414
|
+
"aria-label": x(l).colorPicker.hexValue,
|
|
415
|
+
onInput: J
|
|
416
|
+
}, null, 46, Ie), F.value ? (o(), u("button", {
|
|
417
417
|
key: 0,
|
|
418
418
|
type: "button",
|
|
419
|
-
"aria-label":
|
|
420
|
-
title:
|
|
419
|
+
"aria-label": x(l).colorPicker.clear,
|
|
420
|
+
title: x(l).colorPicker.clear,
|
|
421
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)]",
|
|
422
|
-
onClick:
|
|
423
|
-
}, [
|
|
422
|
+
onClick: Y
|
|
423
|
+
}, [D(x(L), {
|
|
424
424
|
size: 14,
|
|
425
425
|
"stroke-width": 1.5
|
|
426
426
|
})], 8, Le)) : h("", !0)])) : h("", !0),
|
|
427
|
-
(
|
|
428
|
-
to:
|
|
429
|
-
disabled: !
|
|
430
|
-
}, [
|
|
427
|
+
(o(), g(m, {
|
|
428
|
+
to: x(Z),
|
|
429
|
+
disabled: !x(Z)
|
|
430
|
+
}, [D(b, {
|
|
431
431
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
432
432
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
433
433
|
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
@@ -435,45 +435,45 @@ var Pe = [
|
|
|
435
435
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
436
436
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
437
437
|
}, {
|
|
438
|
-
default:
|
|
438
|
+
default: c(() => [C.value ? (o(), u("div", {
|
|
439
439
|
key: 0,
|
|
440
440
|
ref_key: "popoverRef",
|
|
441
|
-
ref:
|
|
442
|
-
"data-tpl-theme":
|
|
441
|
+
ref: w,
|
|
442
|
+
"data-tpl-theme": x(ye),
|
|
443
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)]",
|
|
444
|
-
style:
|
|
445
|
-
top: `${
|
|
446
|
-
left: `${
|
|
447
|
-
...
|
|
444
|
+
style: E({
|
|
445
|
+
top: `${Q.value.top}px`,
|
|
446
|
+
left: `${Q.value.left}px`,
|
|
447
|
+
...x(ve)
|
|
448
448
|
})
|
|
449
449
|
}, [
|
|
450
|
-
|
|
450
|
+
t.allowTransparent ? (o(), u("button", {
|
|
451
451
|
key: 0,
|
|
452
452
|
type: "button",
|
|
453
453
|
"data-testid": "color-picker-transparent",
|
|
454
454
|
"aria-pressed": j.value,
|
|
455
|
-
"aria-label":
|
|
456
|
-
title:
|
|
457
|
-
class:
|
|
458
|
-
onClick:
|
|
459
|
-
}, [
|
|
460
|
-
z.value ? (
|
|
455
|
+
"aria-label": x(l).colorPicker.transparent,
|
|
456
|
+
title: x(l).colorPicker.transparent,
|
|
457
|
+
class: v(["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: X
|
|
459
|
+
}, [n[2] ||= y("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(" " + p(x(l).colorPicker.transparent), 1)], 10, ze)) : h("", !0),
|
|
460
|
+
z.value ? (o(), u("div", {
|
|
461
461
|
key: 1,
|
|
462
462
|
role: "radiogroup",
|
|
463
|
-
"aria-label":
|
|
464
|
-
class:
|
|
463
|
+
"aria-label": x(l).colorPicker.presetColors,
|
|
464
|
+
class: v(["tpl:flex tpl:flex-wrap tpl:gap-1.5", B.value && "tpl:mb-2"]),
|
|
465
465
|
onKeydown: me
|
|
466
|
-
}, [U.value ? (
|
|
466
|
+
}, [U.value ? (o(), u("button", {
|
|
467
467
|
key: 0,
|
|
468
468
|
type: "button",
|
|
469
469
|
role: "radio",
|
|
470
|
-
"aria-label":
|
|
471
|
-
title:
|
|
470
|
+
"aria-label": x(l).colorPicker.clear,
|
|
471
|
+
title: x(l).colorPicker.clear,
|
|
472
472
|
"aria-checked": A.value,
|
|
473
473
|
tabindex: K(),
|
|
474
|
-
class:
|
|
475
|
-
onClick:
|
|
476
|
-
}, null, 10, Ve)) : h("", !0), (
|
|
474
|
+
class: v(["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: Y
|
|
476
|
+
}, null, 10, Ve)) : h("", !0), (o(!0), u(T, null, i(R.value, (e, t) => (o(), u("button", {
|
|
477
477
|
key: e,
|
|
478
478
|
type: "button",
|
|
479
479
|
role: "radio",
|
|
@@ -481,37 +481,37 @@ var Pe = [
|
|
|
481
481
|
title: e,
|
|
482
482
|
"aria-checked": H(e),
|
|
483
483
|
tabindex: pe(t),
|
|
484
|
-
style:
|
|
485
|
-
class:
|
|
484
|
+
style: E({ backgroundColor: e }),
|
|
485
|
+
class: v(["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)]", H(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
486
|
onClick: (t) => fe(e)
|
|
487
487
|
}, null, 14, He))), 128))], 42, Be)) : h("", !0),
|
|
488
|
-
B.value ? (
|
|
488
|
+
B.value ? (o(), u("hex-color-picker", {
|
|
489
489
|
key: 2,
|
|
490
|
-
color:
|
|
491
|
-
"aria-label":
|
|
492
|
-
onColorChanged:
|
|
493
|
-
onPointerdown:
|
|
494
|
-
onPointerup:
|
|
495
|
-
onKeydown:
|
|
490
|
+
color: le.value,
|
|
491
|
+
"aria-label": x(l).colorPicker.pickColor,
|
|
492
|
+
onColorChanged: q,
|
|
493
|
+
onPointerdown: he,
|
|
494
|
+
onPointerup: ge,
|
|
495
|
+
onKeydown: n[0] ||= f((e) => C.value = !1, ["escape"])
|
|
496
496
|
}, null, 40, Ue)) : h("", !0),
|
|
497
|
-
|
|
497
|
+
t.swatchOnly && B.value ? (o(), u("div", We, [y("input", {
|
|
498
498
|
type: "text",
|
|
499
|
-
class:
|
|
500
|
-
style:
|
|
499
|
+
class: v([x(de), "tpl:w-full"]),
|
|
500
|
+
style: E(F.value ? { paddingRight: "2.25rem" } : void 0),
|
|
501
501
|
value: M.value,
|
|
502
|
-
placeholder:
|
|
503
|
-
disabled:
|
|
504
|
-
"aria-label":
|
|
505
|
-
onChange:
|
|
506
|
-
onKeydown:
|
|
507
|
-
}, null, 46, Ge), F.value ? (
|
|
502
|
+
placeholder: t.placeholder || x(l).colorPicker.notSet,
|
|
503
|
+
disabled: t.disabled,
|
|
504
|
+
"aria-label": x(l).colorPicker.hexValue,
|
|
505
|
+
onChange: J,
|
|
506
|
+
onKeydown: n[1] ||= f(_((e) => e.target.blur(), ["prevent"]), ["enter"])
|
|
507
|
+
}, null, 46, Ge), F.value ? (o(), u("button", {
|
|
508
508
|
key: 0,
|
|
509
509
|
type: "button",
|
|
510
|
-
"aria-label":
|
|
511
|
-
title:
|
|
510
|
+
"aria-label": x(l).colorPicker.clear,
|
|
511
|
+
title: x(l).colorPicker.clear,
|
|
512
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)]",
|
|
513
|
-
onClick:
|
|
514
|
-
}, [
|
|
513
|
+
onClick: Y
|
|
514
|
+
}, [D(x(L), {
|
|
515
515
|
size: 14,
|
|
516
516
|
"stroke-width": 1.5
|
|
517
517
|
})], 8, Ke)) : h("", !0)])) : h("", !0)
|
|
@@ -531,7 +531,7 @@ var Pe = [
|
|
|
531
531
|
"data-merge-tag-value",
|
|
532
532
|
"onMousedown",
|
|
533
533
|
"onMousemove"
|
|
534
|
-
], Ze = { class: "tpl:font-medium" }, Qe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, $e = /* @__PURE__ */
|
|
534
|
+
], Ze = { class: "tpl:font-medium" }, Qe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, $e = /* @__PURE__ */ n({
|
|
535
535
|
__name: "MergeTagSuggestionList",
|
|
536
536
|
props: {
|
|
537
537
|
items: {},
|
|
@@ -541,27 +541,27 @@ var Pe = [
|
|
|
541
541
|
},
|
|
542
542
|
emits: ["select", "hover"],
|
|
543
543
|
setup(e) {
|
|
544
|
-
let
|
|
545
|
-
function
|
|
546
|
-
return
|
|
544
|
+
let t = e;
|
|
545
|
+
function n(e) {
|
|
546
|
+
return t.listId ? `${t.listId}-opt-${e}` : void 0;
|
|
547
547
|
}
|
|
548
|
-
return (
|
|
548
|
+
return (t, r) => (o(), u("div", {
|
|
549
549
|
id: e.listId,
|
|
550
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)]",
|
|
551
551
|
role: "listbox",
|
|
552
552
|
"data-testid": "merge-tag-suggestion-list"
|
|
553
|
-
}, [e.items.length === 0 ? (
|
|
554
|
-
key:
|
|
555
|
-
id:
|
|
553
|
+
}, [e.items.length === 0 ? (o(), u("div", Ye, p(e.emptyText), 1)) : h("", !0), (o(!0), u(T, null, i(e.items, (r, i) => (o(), u("button", {
|
|
554
|
+
key: r.value,
|
|
555
|
+
id: n(i),
|
|
556
556
|
type: "button",
|
|
557
557
|
role: "option",
|
|
558
|
-
"aria-selected":
|
|
559
|
-
"data-selected":
|
|
560
|
-
"data-merge-tag-value":
|
|
561
|
-
class:
|
|
562
|
-
onMousedown: _((e) =>
|
|
563
|
-
onMousemove: (
|
|
564
|
-
}, [
|
|
558
|
+
"aria-selected": i === e.selectedIndex,
|
|
559
|
+
"data-selected": i === e.selectedIndex ? "true" : "false",
|
|
560
|
+
"data-merge-tag-value": r.value,
|
|
561
|
+
class: v(["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", i === 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)]"]),
|
|
562
|
+
onMousedown: _((e) => t.$emit("select", r), ["prevent", "stop"]),
|
|
563
|
+
onMousemove: (n) => i !== e.selectedIndex && t.$emit("hover", i)
|
|
564
|
+
}, [y("span", Ze, p(r.label), 1), y("span", Qe, p(r.value), 1)], 42, Xe))), 128))], 8, Je));
|
|
565
565
|
}
|
|
566
566
|
}), et = 10, tt = 0;
|
|
567
567
|
function nt(e, t) {
|
|
@@ -574,17 +574,17 @@ function nt(e, t) {
|
|
|
574
574
|
function rt(e, t, n, r) {
|
|
575
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;
|
|
576
576
|
}
|
|
577
|
-
function it(
|
|
578
|
-
let
|
|
579
|
-
function p() {
|
|
580
|
-
v(u?.() ?? null);
|
|
581
|
-
}
|
|
577
|
+
function it(t, n) {
|
|
578
|
+
let r = null, i = null, a = null, o = e([]), c = e(0), l = null, u = `tpl-merge-tag-suggestion-${++tt}`, d = null, f = [], p = null;
|
|
582
579
|
function m() {
|
|
583
|
-
|
|
584
|
-
|
|
580
|
+
y(d?.() ?? null);
|
|
581
|
+
}
|
|
582
|
+
function h() {
|
|
583
|
+
m(), p !== null && cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
584
|
+
p = null, m();
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function g(e) {
|
|
588
588
|
let t = [], n = e?.parentElement ?? null;
|
|
589
589
|
for (; n && n !== document.body && n !== document.documentElement;) {
|
|
590
590
|
let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
|
|
@@ -592,30 +592,30 @@ function it(e, t) {
|
|
|
592
592
|
}
|
|
593
593
|
return t;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
|
|
597
|
-
for (let e of
|
|
595
|
+
function _(e) {
|
|
596
|
+
f = [window, ...g(e)];
|
|
597
|
+
for (let e of f) e.addEventListener("scroll", m, {
|
|
598
598
|
passive: !0,
|
|
599
599
|
capture: !0
|
|
600
600
|
});
|
|
601
|
-
window.addEventListener("resize",
|
|
601
|
+
window.addEventListener("resize", m, { passive: !0 });
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
for (let e of
|
|
605
|
-
window.removeEventListener("resize",
|
|
603
|
+
function v() {
|
|
604
|
+
for (let e of f) e.removeEventListener("scroll", m, { capture: !0 });
|
|
605
|
+
window.removeEventListener("resize", m), f = [];
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
if (!
|
|
609
|
-
|
|
610
|
-
let t =
|
|
611
|
-
|
|
612
|
-
let
|
|
613
|
-
if (
|
|
614
|
-
let t = Math.max(0, e.top -
|
|
615
|
-
|
|
607
|
+
function y(e) {
|
|
608
|
+
if (!i || !e || e.bottom < 0 || e.top > window.innerHeight) return;
|
|
609
|
+
i.style.position = "absolute", i.style.zIndex = "9999";
|
|
610
|
+
let t = i.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0;
|
|
611
|
+
i.style.left = `${e.left - (t?.left ?? 0)}px`, i.style.top = `${e.bottom - n}px`;
|
|
612
|
+
let r = i.offsetHeight;
|
|
613
|
+
if (r !== 0 && window.innerHeight - e.bottom < r) {
|
|
614
|
+
let t = Math.max(0, e.top - r);
|
|
615
|
+
i.style.top = `${t - n}px`;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function b(e, t) {
|
|
619
619
|
let n = t?.closest("[data-tpl-theme]");
|
|
620
620
|
if (!n) return;
|
|
621
621
|
let r = n.getAttribute("data-tpl-theme");
|
|
@@ -627,60 +627,65 @@ function it(e, t) {
|
|
|
627
627
|
}
|
|
628
628
|
e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
|
|
630
|
+
function x(e) {
|
|
631
|
+
a && (e ? (a.setAttribute("role", "combobox"), a.setAttribute("aria-haspopup", "listbox"), a.setAttribute("aria-expanded", "true"), a.setAttribute("aria-controls", u)) : (a.removeAttribute("aria-expanded"), a.removeAttribute("aria-controls"), a.removeAttribute("aria-activedescendant"), a.removeAttribute("aria-haspopup"), a.removeAttribute("role")));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
|
|
633
|
+
function S() {
|
|
634
|
+
a && (o.value.length === 0 ? a.removeAttribute("aria-activedescendant") : a.setAttribute("aria-activedescendant", `${u}-opt-${c.value}`));
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
636
|
+
function C(e) {
|
|
637
|
+
l?.(e);
|
|
638
638
|
}
|
|
639
639
|
return {
|
|
640
|
-
open: ({ items:
|
|
641
|
-
o.value =
|
|
642
|
-
return
|
|
640
|
+
open: ({ items: e, getRect: f, anchorEl: p, onCommand: m }) => {
|
|
641
|
+
o.value = e, c.value = 0, l = m, i = document.createElement("div"), i.setAttribute("data-testid", "merge-tag-suggestion-popup"), a = p, b(i, p), (n?.value ?? document.body).appendChild(i), r = w({ render() {
|
|
642
|
+
return s($e, {
|
|
643
643
|
items: o.value,
|
|
644
|
-
selectedIndex:
|
|
645
|
-
emptyText:
|
|
646
|
-
listId:
|
|
647
|
-
onSelect: (e) =>
|
|
644
|
+
selectedIndex: c.value,
|
|
645
|
+
emptyText: t,
|
|
646
|
+
listId: u,
|
|
647
|
+
onSelect: (e) => C(e),
|
|
648
648
|
onHover: (e) => {
|
|
649
|
-
|
|
649
|
+
c.value = e, S();
|
|
650
650
|
}
|
|
651
651
|
});
|
|
652
|
-
} }),
|
|
652
|
+
} }), r.mount(i), x(!0), S(), d = f, h(), _(p);
|
|
653
653
|
},
|
|
654
654
|
update: ({ items: e, getRect: t, onCommand: n }) => {
|
|
655
|
-
o.value = e,
|
|
655
|
+
o.value = e, c.value >= e.length && (c.value = 0), l = n, S(), d = t, h();
|
|
656
656
|
},
|
|
657
657
|
handleKeyDown: (e) => {
|
|
658
|
-
let t = rt(e, o.value,
|
|
659
|
-
return t &&
|
|
658
|
+
let t = rt(e, o.value, c, C);
|
|
659
|
+
return t && S(), t;
|
|
660
660
|
},
|
|
661
661
|
close: () => {
|
|
662
|
-
|
|
662
|
+
i !== null && (p !== null && (cancelAnimationFrame(p), p = null), v(), x(!1), r?.unmount(), i.remove(), r = null, i = null, a = null, l = null, d = null);
|
|
663
663
|
},
|
|
664
|
-
isOpen: () =>
|
|
664
|
+
isOpen: () => i !== null
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
668
|
//#region src/utils/mergeTagTrigger.ts
|
|
669
|
-
function at(e, t, n, r) {
|
|
669
|
+
function at(e, t, n, r, i) {
|
|
670
670
|
if (!n) return null;
|
|
671
|
-
let
|
|
672
|
-
if (
|
|
673
|
-
let
|
|
674
|
-
return /\s/.test(
|
|
675
|
-
triggerStart:
|
|
671
|
+
let a = e.slice(0, t), o = a.lastIndexOf(n);
|
|
672
|
+
if (o === -1 || i && o < ot(a, i)) return null;
|
|
673
|
+
let s = a.slice(o + n.length);
|
|
674
|
+
return /\s/.test(s) || r && s.includes(r) ? null : {
|
|
675
|
+
triggerStart: o,
|
|
676
676
|
caret: t,
|
|
677
|
-
query:
|
|
677
|
+
query: s
|
|
678
678
|
};
|
|
679
679
|
}
|
|
680
|
+
function ot(e, t) {
|
|
681
|
+
let n = new RegExp(t.source, `${t.flags.replace(/[gy]/g, "")}g`), r = 0;
|
|
682
|
+
for (let t of e.matchAll(n)) r = t.index + t[0].length;
|
|
683
|
+
return r;
|
|
684
|
+
}
|
|
680
685
|
//#endregion
|
|
681
686
|
//#region src/utils/textFieldCaret.ts
|
|
682
|
-
var
|
|
683
|
-
function
|
|
687
|
+
var st = /* @__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(".");
|
|
688
|
+
function ct(e, t, n) {
|
|
684
689
|
return {
|
|
685
690
|
left: e,
|
|
686
691
|
top: t,
|
|
@@ -693,7 +698,7 @@ function st(e, t, n) {
|
|
|
693
698
|
toJSON: () => ({})
|
|
694
699
|
};
|
|
695
700
|
}
|
|
696
|
-
function
|
|
701
|
+
function lt(e, t) {
|
|
697
702
|
let n = e.ownerDocument, r = n.defaultView;
|
|
698
703
|
if (!r) return null;
|
|
699
704
|
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
@@ -701,7 +706,7 @@ function ct(e, t) {
|
|
|
701
706
|
let s = o.style;
|
|
702
707
|
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";
|
|
703
708
|
let c = s, l = a;
|
|
704
|
-
for (let e of
|
|
709
|
+
for (let e of st) c[e] = l[e];
|
|
705
710
|
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
706
711
|
let u = e.value, d = u.slice(0, t);
|
|
707
712
|
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
@@ -710,127 +715,127 @@ function ct(e, t) {
|
|
|
710
715
|
let p = f.offsetTop, m = f.offsetLeft;
|
|
711
716
|
n.body.removeChild(o);
|
|
712
717
|
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;
|
|
713
|
-
if (i) return
|
|
718
|
+
if (i) return ct(y, h.top, h.bottom);
|
|
714
719
|
let b = h.top + p + g - e.scrollTop;
|
|
715
|
-
return
|
|
720
|
+
return ct(y, b, b + v);
|
|
716
721
|
}
|
|
717
722
|
//#endregion
|
|
718
723
|
//#region src/composables/useMergeTagAutocomplete.ts
|
|
719
|
-
var
|
|
724
|
+
var ut = /* @__PURE__ */ new Set([
|
|
720
725
|
"ArrowLeft",
|
|
721
726
|
"ArrowRight",
|
|
722
727
|
"Home",
|
|
723
728
|
"End"
|
|
724
729
|
]);
|
|
725
|
-
function
|
|
726
|
-
let { elementRef: n, modelValue: i, emit:
|
|
727
|
-
|
|
728
|
-
|
|
730
|
+
function dt(e) {
|
|
731
|
+
let { elementRef: n, modelValue: i, emit: o, mergeTags: s, syntax: c, enabled: u, onInsert: d } = e, f = O(c), p = A(c), m = S(() => u && f !== null && s.value.length > 0), h = r(M, null), g = it((a(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", ae()), _ = !1;
|
|
732
|
+
C() && l(() => {
|
|
733
|
+
_ = !0, g.close();
|
|
729
734
|
});
|
|
730
|
-
function
|
|
735
|
+
function v(e) {
|
|
731
736
|
let t = e.value ?? "";
|
|
732
|
-
return at(t, e.selectionStart ?? t.length,
|
|
737
|
+
return at(t, e.selectionStart ?? t.length, f, p, c.value);
|
|
733
738
|
}
|
|
734
|
-
function
|
|
735
|
-
let
|
|
736
|
-
|
|
737
|
-
if (
|
|
739
|
+
function y(e, r, a) {
|
|
740
|
+
let s = e.value ?? i(), c = s.slice(r.caret), l = p && c.startsWith(p) ? p.length : 0, u = s.slice(0, r.triggerStart), f = s.slice(r.caret + l), m = u + a.value + f, h = u.length + a.value.length;
|
|
741
|
+
d?.(), o(m), g.close(), t(() => {
|
|
742
|
+
if (_) return;
|
|
738
743
|
let e = n.value;
|
|
739
|
-
e?.focus(), e?.setSelectionRange(
|
|
744
|
+
e?.focus(), e?.setSelectionRange(h, h);
|
|
740
745
|
});
|
|
741
746
|
}
|
|
742
|
-
function
|
|
743
|
-
if (!m.value ||
|
|
747
|
+
function b() {
|
|
748
|
+
if (!m.value || _) return;
|
|
744
749
|
let e = n.value;
|
|
745
750
|
if (!e) {
|
|
746
|
-
|
|
751
|
+
g.close();
|
|
747
752
|
return;
|
|
748
753
|
}
|
|
749
|
-
let t =
|
|
754
|
+
let t = v(e);
|
|
750
755
|
if (!t) {
|
|
751
|
-
|
|
756
|
+
g.close();
|
|
752
757
|
return;
|
|
753
758
|
}
|
|
754
|
-
let r = nt(
|
|
755
|
-
|
|
759
|
+
let r = nt(s.value, t.query), i = () => lt(e, t.triggerStart), a = (n) => y(e, t, n);
|
|
760
|
+
g.isOpen() ? g.update({
|
|
756
761
|
items: r,
|
|
757
762
|
getRect: i,
|
|
758
763
|
onCommand: a
|
|
759
|
-
}) :
|
|
764
|
+
}) : g.open({
|
|
760
765
|
items: r,
|
|
761
766
|
getRect: i,
|
|
762
767
|
anchorEl: e,
|
|
763
768
|
onCommand: a
|
|
764
769
|
});
|
|
765
770
|
}
|
|
766
|
-
function
|
|
767
|
-
return
|
|
771
|
+
function x(e) {
|
|
772
|
+
return g.isOpen() ? e.key === "Escape" ? (g.close(), !0) : ut.has(e.key) ? (g.close(), !1) : g.handleKeyDown(e) : !1;
|
|
768
773
|
}
|
|
769
774
|
return {
|
|
770
775
|
available: m,
|
|
771
|
-
refresh:
|
|
772
|
-
handleKeydown:
|
|
773
|
-
close: () =>
|
|
774
|
-
isOpen: () =>
|
|
776
|
+
refresh: b,
|
|
777
|
+
handleKeydown: x,
|
|
778
|
+
close: () => g.close(),
|
|
779
|
+
isOpen: () => g.isOpen()
|
|
775
780
|
};
|
|
776
781
|
}
|
|
777
782
|
//#endregion
|
|
778
783
|
//#region src/composables/useMergeTagField.ts
|
|
779
|
-
function
|
|
780
|
-
let { modelValue:
|
|
781
|
-
|
|
782
|
-
|
|
784
|
+
function ft(n) {
|
|
785
|
+
let { modelValue: r, emit: i, elementRef: a } = n, { mergeTags: o, canRequestMergeTag: s, isRequesting: c, isMergeTagValue: u, getMergeTagDisplayLabel: d, findMergeTag: f, requestMergeTag: p, syntax: m, autocomplete: h } = R(), { canInsertLogicTag: g, isRequesting: _, requestLogicTag: v } = ue(), y = e(!1), b = !1, x = !1;
|
|
786
|
+
C() && l(() => {
|
|
787
|
+
x = !0;
|
|
783
788
|
});
|
|
784
|
-
let w =
|
|
785
|
-
elementRef:
|
|
786
|
-
modelValue:
|
|
787
|
-
emit:
|
|
789
|
+
let w = dt({
|
|
790
|
+
elementRef: a,
|
|
791
|
+
modelValue: r,
|
|
792
|
+
emit: i,
|
|
788
793
|
mergeTags: o,
|
|
789
|
-
syntax:
|
|
790
|
-
enabled:
|
|
794
|
+
syntax: m,
|
|
795
|
+
enabled: h,
|
|
791
796
|
onInsert: () => {
|
|
792
|
-
|
|
797
|
+
y.value = !0;
|
|
793
798
|
}
|
|
794
|
-
}), T =
|
|
795
|
-
let e =
|
|
799
|
+
}), T = S(() => {
|
|
800
|
+
let e = r();
|
|
796
801
|
if (!e) return [];
|
|
797
|
-
let
|
|
802
|
+
let t = [], n = `(${m.value.source}|${m.logic.source})`, i = new RegExp(n, "g"), a = 0, o;
|
|
798
803
|
for (; (o = i.exec(e)) !== null;) {
|
|
799
|
-
o.index > a &&
|
|
804
|
+
o.index > a && t.push({
|
|
800
805
|
type: "text",
|
|
801
806
|
value: e.slice(a, o.index)
|
|
802
807
|
});
|
|
803
|
-
let
|
|
804
|
-
u(
|
|
808
|
+
let n = o[0];
|
|
809
|
+
u(n) ? t.push({
|
|
805
810
|
type: "mergeTag",
|
|
806
|
-
value:
|
|
807
|
-
label: d(
|
|
808
|
-
}) : j(
|
|
811
|
+
value: n,
|
|
812
|
+
label: d(n)
|
|
813
|
+
}) : j(n, m) ? t.push({
|
|
809
814
|
type: "logicMergeTag",
|
|
810
|
-
value:
|
|
811
|
-
keyword: k(
|
|
812
|
-
}) :
|
|
815
|
+
value: n,
|
|
816
|
+
keyword: k(n, m)
|
|
817
|
+
}) : t.push({
|
|
813
818
|
type: "text",
|
|
814
|
-
value:
|
|
815
|
-
}), a = o.index +
|
|
819
|
+
value: n
|
|
820
|
+
}), a = o.index + n.length;
|
|
816
821
|
}
|
|
817
|
-
return a < e.length &&
|
|
822
|
+
return a < e.length && t.push({
|
|
818
823
|
type: "text",
|
|
819
824
|
value: e.slice(a)
|
|
820
|
-
}),
|
|
821
|
-
}), E =
|
|
825
|
+
}), t;
|
|
826
|
+
}), E = S(() => T.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
822
827
|
function D() {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
let e =
|
|
826
|
-
|
|
828
|
+
y.value = !0, t(() => {
|
|
829
|
+
a.value?.focus();
|
|
830
|
+
let e = r()?.length || 0;
|
|
831
|
+
a.value?.setSelectionRange(e, e);
|
|
827
832
|
});
|
|
828
833
|
}
|
|
829
834
|
function O() {
|
|
830
|
-
|
|
835
|
+
b || (y.value = !1);
|
|
831
836
|
}
|
|
832
837
|
function A(e) {
|
|
833
|
-
|
|
838
|
+
i(e.target.value), w.refresh();
|
|
834
839
|
}
|
|
835
840
|
function ee(e) {
|
|
836
841
|
return w.handleKeydown(e) ? (e.preventDefault(), !0) : (e.key === "Escape" && O(), !1);
|
|
@@ -842,64 +847,64 @@ function dt(e) {
|
|
|
842
847
|
w.close(), O();
|
|
843
848
|
}
|
|
844
849
|
function ne() {
|
|
845
|
-
|
|
850
|
+
i("");
|
|
846
851
|
}
|
|
847
852
|
async function re() {
|
|
848
|
-
let e =
|
|
849
|
-
|
|
850
|
-
let
|
|
853
|
+
let e = y.value && a.value ? a.value.selectionStart ?? r().length : r().length;
|
|
854
|
+
b = !0;
|
|
855
|
+
let n;
|
|
851
856
|
try {
|
|
852
|
-
|
|
857
|
+
n = await p();
|
|
853
858
|
} finally {
|
|
854
|
-
|
|
859
|
+
b = !1;
|
|
855
860
|
}
|
|
856
|
-
if (!
|
|
857
|
-
let
|
|
858
|
-
|
|
859
|
-
if (
|
|
860
|
-
let t = e +
|
|
861
|
-
|
|
861
|
+
if (!x && n) {
|
|
862
|
+
let o = r().slice(0, e), s = r().slice(e), c = o + n.value + s;
|
|
863
|
+
i(c), y.value = !0, t(() => {
|
|
864
|
+
if (x) return;
|
|
865
|
+
let t = e + n.value.length;
|
|
866
|
+
a.value?.focus(), a.value?.setSelectionRange(t, t);
|
|
862
867
|
});
|
|
863
868
|
}
|
|
864
869
|
}
|
|
865
870
|
async function N(e) {
|
|
866
|
-
let t = T.value,
|
|
867
|
-
if (
|
|
868
|
-
|
|
869
|
-
let
|
|
871
|
+
let t = T.value, n = t[e];
|
|
872
|
+
if (n?.type !== "mergeTag") return;
|
|
873
|
+
b = !0;
|
|
874
|
+
let r;
|
|
870
875
|
try {
|
|
871
|
-
|
|
876
|
+
r = await p({
|
|
872
877
|
reason: "edit",
|
|
873
|
-
current: f(
|
|
878
|
+
current: f(n.value)
|
|
874
879
|
});
|
|
875
880
|
} finally {
|
|
876
|
-
|
|
881
|
+
b = !1;
|
|
877
882
|
}
|
|
878
|
-
!
|
|
883
|
+
!x && r && i(t.map((t, n) => n === e ? r.value : t.value).join(""));
|
|
879
884
|
}
|
|
880
|
-
async function
|
|
881
|
-
let e =
|
|
882
|
-
|
|
883
|
-
let
|
|
885
|
+
async function P() {
|
|
886
|
+
let e = a.value, n = e?.selectionStart ?? r().length, o = e?.selectionEnd ?? n;
|
|
887
|
+
b = !0;
|
|
888
|
+
let s;
|
|
884
889
|
try {
|
|
885
|
-
|
|
890
|
+
s = await v();
|
|
886
891
|
} finally {
|
|
887
|
-
|
|
892
|
+
b = !1;
|
|
888
893
|
}
|
|
889
|
-
if (
|
|
890
|
-
let
|
|
891
|
-
"before" in
|
|
892
|
-
|
|
894
|
+
if (x || !s) return;
|
|
895
|
+
let c = r(), l, u;
|
|
896
|
+
"before" in s ? (l = c.slice(0, n) + s.before + c.slice(n, o) + s.after + c.slice(o), u = n + s.before.length + (o - n)) : (l = c.slice(0, n) + s.value + c.slice(n), u = n + s.value.length), i(l), y.value = !0, t(() => {
|
|
897
|
+
x || (a.value?.focus(), a.value?.setSelectionRange(u, u));
|
|
893
898
|
});
|
|
894
899
|
}
|
|
895
900
|
return {
|
|
896
901
|
segments: T,
|
|
897
902
|
hasMergeTags: E,
|
|
898
|
-
canRequestMergeTag:
|
|
899
|
-
isRequestingMergeTag:
|
|
900
|
-
canInsertLogicTag:
|
|
901
|
-
isRequestingLogicTag:
|
|
902
|
-
isEditing:
|
|
903
|
+
canRequestMergeTag: s,
|
|
904
|
+
isRequestingMergeTag: c,
|
|
905
|
+
canInsertLogicTag: g,
|
|
906
|
+
isRequestingLogicTag: _,
|
|
907
|
+
isEditing: y,
|
|
903
908
|
startEditing: D,
|
|
904
909
|
stopEditing: O,
|
|
905
910
|
handleInput: A,
|
|
@@ -909,20 +914,20 @@ function dt(e) {
|
|
|
909
914
|
clearValue: ne,
|
|
910
915
|
insertMergeTag: re,
|
|
911
916
|
replaceMergeTagAt: N,
|
|
912
|
-
insertLogicTag:
|
|
917
|
+
insertLogicTag: P,
|
|
913
918
|
autocompleteAvailable: w.available
|
|
914
919
|
};
|
|
915
920
|
}
|
|
916
921
|
//#endregion
|
|
917
922
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
918
|
-
var
|
|
923
|
+
var pt = ["aria-label"], mt = [
|
|
919
924
|
"data-tooltip",
|
|
920
925
|
"aria-label",
|
|
921
926
|
"onClick"
|
|
922
|
-
],
|
|
927
|
+
], ht = ["data-tooltip"], gt = ["data-tooltip"], _t = {
|
|
923
928
|
key: 3,
|
|
924
929
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
925
|
-
},
|
|
930
|
+
}, vt = ["aria-label", "title"], yt = ["aria-label", "title"], bt = /* @__PURE__ */ n({
|
|
926
931
|
__name: "MergeTagSegments",
|
|
927
932
|
props: {
|
|
928
933
|
segments: {},
|
|
@@ -934,38 +939,38 @@ var ft = ["aria-label"], pt = [
|
|
|
934
939
|
"clear",
|
|
935
940
|
"repick"
|
|
936
941
|
],
|
|
937
|
-
setup(e, { emit:
|
|
938
|
-
let
|
|
939
|
-
function
|
|
940
|
-
|
|
942
|
+
setup(e, { emit: t }) {
|
|
943
|
+
let n = t, { t: r, format: a } = N(), { canRepickMergeTag: s, showRawValue: c } = R();
|
|
944
|
+
function l() {
|
|
945
|
+
n("edit");
|
|
941
946
|
}
|
|
942
|
-
return (
|
|
947
|
+
return (t, d) => (o(), u("div", {
|
|
943
948
|
role: "group",
|
|
944
|
-
"aria-label":
|
|
945
|
-
class:
|
|
946
|
-
onClick:
|
|
949
|
+
"aria-label": x(r).mergeTag.fieldGroup,
|
|
950
|
+
class: v([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
951
|
+
onClick: l
|
|
947
952
|
}, [
|
|
948
|
-
(
|
|
953
|
+
(o(!0), u(T, null, i(e.segments, (e, t) => (o(), u(T, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" && x(s)(e.value) ? (o(), u("button", {
|
|
949
954
|
key: 0,
|
|
950
955
|
type: "button",
|
|
951
|
-
class:
|
|
952
|
-
"data-tooltip": c
|
|
953
|
-
"aria-label":
|
|
956
|
+
class: v(["tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded tpl:border-none tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", x(c) ? "tpl-tooltip" : ""]),
|
|
957
|
+
"data-tooltip": x(c) ? e.value : void 0,
|
|
958
|
+
"aria-label": x(a)(x(r).mergeTag.changeTag, { label: e.label }),
|
|
954
959
|
"data-testid": "merge-tag-field-chip",
|
|
955
960
|
style: {
|
|
956
961
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
957
962
|
color: "var(--tpl-primary)"
|
|
958
963
|
},
|
|
959
|
-
onClick: _((e) =>
|
|
960
|
-
},
|
|
964
|
+
onClick: _((e) => n("repick", t), ["stop"])
|
|
965
|
+
}, p(e.label), 11, mt)) : e.type === "mergeTag" ? (o(), u("span", {
|
|
961
966
|
key: 1,
|
|
962
|
-
class:
|
|
963
|
-
"data-tooltip": c
|
|
967
|
+
class: v(["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", x(c) ? "tpl-tooltip" : ""]),
|
|
968
|
+
"data-tooltip": x(c) ? e.value : void 0,
|
|
964
969
|
style: {
|
|
965
970
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
966
971
|
color: "var(--tpl-primary)"
|
|
967
972
|
}
|
|
968
|
-
},
|
|
973
|
+
}, p(e.label), 11, ht)) : e.type === "logicMergeTag" ? (o(), u("span", {
|
|
969
974
|
key: 2,
|
|
970
975
|
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",
|
|
971
976
|
"data-tooltip": e.value,
|
|
@@ -974,80 +979,80 @@ var ft = ["aria-label"], pt = [
|
|
|
974
979
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
975
980
|
color: "var(--tpl-primary)"
|
|
976
981
|
}
|
|
977
|
-
},
|
|
978
|
-
|
|
982
|
+
}, p(e.keyword), 9, gt)) : (o(), u("span", _t, p(e.value), 1))], 64))), 128)),
|
|
983
|
+
y("button", {
|
|
979
984
|
type: "button",
|
|
980
985
|
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",
|
|
981
|
-
"aria-label":
|
|
982
|
-
title:
|
|
986
|
+
"aria-label": x(r).mergeTag.editAsText,
|
|
987
|
+
title: x(r).mergeTag.editAsText,
|
|
983
988
|
"data-testid": "merge-tag-field-edit",
|
|
984
|
-
onClick: _(
|
|
985
|
-
}, [
|
|
989
|
+
onClick: _(l, ["stop"])
|
|
990
|
+
}, [D(x(F), {
|
|
986
991
|
size: 12,
|
|
987
992
|
"stroke-width": 2
|
|
988
|
-
})], 8,
|
|
989
|
-
|
|
993
|
+
})], 8, vt),
|
|
994
|
+
y("button", {
|
|
990
995
|
type: "button",
|
|
991
996
|
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",
|
|
992
|
-
"aria-label":
|
|
993
|
-
title:
|
|
997
|
+
"aria-label": x(r).mergeTag.remove,
|
|
998
|
+
title: x(r).mergeTag.remove,
|
|
994
999
|
"data-testid": "merge-tag-field-clear",
|
|
995
|
-
onClick:
|
|
996
|
-
}, [
|
|
1000
|
+
onClick: d[0] ||= _((e) => n("clear"), ["stop"])
|
|
1001
|
+
}, [D(x(L), {
|
|
997
1002
|
size: 12,
|
|
998
1003
|
"stroke-width": 2.5
|
|
999
|
-
})], 8,
|
|
1000
|
-
], 10,
|
|
1004
|
+
})], 8, yt)
|
|
1005
|
+
], 10, pt));
|
|
1001
1006
|
}
|
|
1002
|
-
}),
|
|
1007
|
+
}), xt = [
|
|
1003
1008
|
"aria-label",
|
|
1004
1009
|
"title",
|
|
1005
1010
|
"disabled"
|
|
1006
|
-
],
|
|
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__ */ n({
|
|
1007
1012
|
__name: "MergeTagInsertButton",
|
|
1008
1013
|
props: { disabled: { type: Boolean } },
|
|
1009
1014
|
emits: ["insert"],
|
|
1010
1015
|
setup(e) {
|
|
1011
1016
|
let { t } = N();
|
|
1012
|
-
return (n, r) => (
|
|
1017
|
+
return (n, r) => (o(), u("button", {
|
|
1013
1018
|
type: "button",
|
|
1014
|
-
class:
|
|
1015
|
-
"aria-label":
|
|
1016
|
-
title:
|
|
1019
|
+
class: v([St, "tpl:mt-1.5"]),
|
|
1020
|
+
"aria-label": x(t).mergeTag.insert,
|
|
1021
|
+
title: x(t).mergeTag.insert,
|
|
1017
1022
|
disabled: e.disabled,
|
|
1018
1023
|
onMousedown: r[0] ||= _(() => {}, ["prevent"]),
|
|
1019
1024
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
1020
|
-
}, [
|
|
1025
|
+
}, [D(x(I), {
|
|
1021
1026
|
size: 12,
|
|
1022
1027
|
"stroke-width": 2
|
|
1023
|
-
}),
|
|
1028
|
+
}), d(" " + p(x(t).mergeTag.insertShort), 1)], 42, xt));
|
|
1024
1029
|
}
|
|
1025
|
-
}),
|
|
1030
|
+
}), wt = [
|
|
1026
1031
|
"aria-label",
|
|
1027
1032
|
"title",
|
|
1028
1033
|
"disabled"
|
|
1029
|
-
],
|
|
1034
|
+
], Tt = "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)]", Et = /* @__PURE__ */ n({
|
|
1030
1035
|
__name: "LogicTagInsertButton",
|
|
1031
1036
|
props: { disabled: { type: Boolean } },
|
|
1032
1037
|
emits: ["insert"],
|
|
1033
1038
|
setup(e) {
|
|
1034
1039
|
let { t } = N();
|
|
1035
|
-
return (n, r) => (
|
|
1040
|
+
return (n, r) => (o(), u("button", {
|
|
1036
1041
|
type: "button",
|
|
1037
|
-
class:
|
|
1038
|
-
"aria-label":
|
|
1039
|
-
title:
|
|
1042
|
+
class: v([Tt, "tpl:mt-1.5"]),
|
|
1043
|
+
"aria-label": x(t).logicTag.insert,
|
|
1044
|
+
title: x(t).logicTag.insert,
|
|
1040
1045
|
disabled: e.disabled,
|
|
1041
1046
|
"data-testid": "field-insert-logic-button",
|
|
1042
1047
|
onMousedown: r[0] ||= _(() => {}, ["prevent"]),
|
|
1043
1048
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
1044
|
-
}, [
|
|
1049
|
+
}, [D(x(le), {
|
|
1045
1050
|
size: 12,
|
|
1046
1051
|
"stroke-width": 2
|
|
1047
|
-
}),
|
|
1052
|
+
}), d(" " + p(x(t).logicTag.insertShort), 1)], 42, wt));
|
|
1048
1053
|
}
|
|
1049
1054
|
});
|
|
1050
1055
|
//#endregion
|
|
1051
|
-
export { it as a, qe as c,
|
|
1056
|
+
export { it as a, qe as c, ft as i, Ct as n, nt as o, bt as r, rt as s, Et as t };
|
|
1052
1057
|
|
|
1053
|
-
//# sourceMappingURL=LogicTagInsertButton-
|
|
1058
|
+
//# sourceMappingURL=LogicTagInsertButton-CsL2JDOG.js.map
|