@templatical/editor 0.48.0 → 0.50.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-BShkuJis.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/CloudPanels-B4F5m7vy.js +168 -0
- package/dist/CollaborationNotices-CNuDp7Y2.js +76 -0
- package/dist/CollaboratorBar-BtHPiuHq.js +123 -0
- package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-Dasj191h.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CEIMPojJ.js} +56 -56
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CqfU52CO.js} +272 -267
- package/dist/{cdn/chunks/MediaEditModal-zXfcArr4.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-YnEkorTZ.js} +26 -26
- package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-Bq_IGOLJ.js} +22 -22
- package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-C8GngfQx.js} +88 -88
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-BjcTiV87.js} +14 -14
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/Toolbar-CZSPZYbj.js +3153 -0
- package/dist/{TplModal-Bz4-IZ9R.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-DUGF0tUJ.js} +10 -10
- 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-CEDZytqP.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CbNzJM3I.js → ca-C7mTzW1r.js} +147 -8
- 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-C7sdnkrF.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-D0--EQkP.js} +39 -39
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.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-awqHfJqC.js → CloudPanels-C3jsxo_f.js} +52 -100
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js +78 -0
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js.map +1 -0
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-zx39Dyby.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-Cjud2Tos.js} +71 -71
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.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-DbH97JR9.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-CsL2JDOG.js} +374 -369
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-ByOvznRC.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-Cp4XB_dH.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-C8U-7LxL.js} +34 -34
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.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-BgR6RXSb.js → RestoreVersionDialog-CdA5osuA.js} +26 -26
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-CijargAy.js} +78 -78
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-BPRaJBv3.js} +19 -19
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.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-C_x2TfFk.js → Toolbar-DoprRgTn.js} +1097 -1101
- package/dist/cdn/chunks/Toolbar-DoprRgTn.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BaGcn-b1.js} +13 -13
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.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-HrMJDfVg.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-CbNzJM3I.js → cdn/chunks/ca-C7mTzW1r.js} +149 -6
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js +1408 -0
- 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-DMquBpZM.js → cdn/chunks/de-DNuYQTmS.js} +149 -6
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-CUWI-IvA.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-DZ0gwUJ6.js} +1359 -1266
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-CI6EfeMd.js} +881 -881
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.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-C8Mp71sO.js → cdn/chunks/en-CW71OK66.js} +149 -6
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-Byq4tthI.js → cdn/chunks/es-DdK7zQfi.js} +149 -6
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-taJTZlLK.js} +71 -71
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-Dz5Bgb7-.js} +149 -6
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-DNX6StSs.js} +183 -150
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-Di-zJiT8.js} +149 -6
- 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-ClJ3BY3F.js → cdn/chunks/nl-CvVuHYFL.js} +149 -6
- package/dist/cdn/chunks/nl-CvVuHYFL.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.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-DibcXcmv.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +149 -6
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- 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/cdn/chunks/{src-DYCDeBDM.js → src-BNFnxfrA.js} +694 -329
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-BcTUmgLe.js} +181 -181
- package/dist/cdn/chunks/src-BcTUmgLe.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/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-CtVrAViq.js} +44 -44
- package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.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-CTc6O8al.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-B0KryMj8.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.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-oLcATrQ8.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2235 -1311
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ClwqRMgv.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-te6qn-zE.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-W2hbH1FM.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-CIEGV5DN.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-Y4cx0gkJ.js → clock-HADxnl6-.js} +1 -1
- package/dist/createCloudRuntime-DVQI_ReU.js +1379 -0
- package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-DMquBpZM.js → de-DNuYQTmS.js} +147 -8
- package/dist/{cdn/chunks/dist-CjL6JHML.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-DuufrR8O.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-MNQYSEWU.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{dist-tsmnQugO.js → dist-DtOF3bDW.js} +648 -294
- package/dist/{editor-modal-AlVLkU91.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-C8Mp71sO.js → en-CW71OK66.js} +147 -8
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-Byq4tthI.js → es-DdK7zQfi.js} +147 -8
- package/dist/{extensions-pjO8VGkM.js → extensions-CdyweA50.js} +54 -54
- package/dist/{eye-Ddnz8nnm.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-Dz5Bgb7-.js} +147 -8
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +640 -48
- package/dist/{info-DXLmzoeY.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-Di-zJiT8.js} +147 -8
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-Cel46wgo.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-Cl0GwiV9.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-uAwpvfys.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-DWU1pTM_.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-CvVuHYFL.js} +147 -8
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-CbyG_yU_.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-BzoDcwKu.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-D8rr61_z.js} +3 -3
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-DibcXcmv.js → pt-BR-ZhO4vgyq.js} +147 -8
- package/dist/{refresh-cw-9WinWixo.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-CqgGq1gG.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-Ceo3c9Db.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-CcLaCpGK.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/socialIcons-Dd-jRiVe.js +2086 -0
- package/dist/{sparkles-Do9XjAuT.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +2272 -1327
- package/dist/{text-align-start-DvzC0HQA.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-vlINTx32.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-BTLeAVlM.js} +1534 -1549
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-Bhdx7AKk.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1182 -1087
- package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-Cd6SFw8r.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +17 -15
- package/dist/AiChatSidebar-DxPHFNoT.js +0 -230
- package/dist/AiFeatureMenu-C8GVqu1d.js +0 -57
- package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
- package/dist/CloudPanels-Dgw7tb4R.js +0 -216
- package/dist/CollaboratorBar-5rfopCPx.js +0 -103
- package/dist/CommentsSidebar-BOqj16Al.js +0 -500
- package/dist/DesignReferenceSidebar-BWAi3eQQ.js +0 -279
- package/dist/IssuesPanel-C-x3I012.js +0 -117
- package/dist/ParagraphEditor-BVjOwwHx.js +0 -797
- package/dist/SavedBlocksBrowserModal-DbmIS5uK.js +0 -360
- package/dist/TemplateScoringPanel-ynbGl-sr.js +0 -273
- package/dist/TemplateSettings-Bi01S3H3.js +0 -246
- package/dist/ToggleSwitch-Ozc7YU38.js +0 -102
- package/dist/Toolbar-B-2lO0I8.js +0 -3156
- package/dist/WrapperBlock-D0qgNqjD.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js +0 -60
- package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CbzxwsyI.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-DWPHZuQm.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BMB9vShs.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-zXfcArr4.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-Cp4XB_dH.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BhEOMzEQ.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DxrKuctP.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CsZiG3TT.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DXSqmaLS.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +0 -22
- package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
- package/dist/cdn/chunks/cloud-BHClP3e2.js +0 -1736
- package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js +0 -400
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
- package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
- package/dist/cdn/chunks/de-mMY5yQJu.js +0 -93
- package/dist/cdn/chunks/de-mMY5yQJu.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js +0 -93
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
- package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
- package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
- package/dist/cdn/chunks/icons-aTYwH5-g.js.map +0 -1
- package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
- package/dist/cdn/chunks/keys-HI-INbkz.js +0 -12
- package/dist/cdn/chunks/keys-HI-INbkz.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CoCwRUi0.js +0 -93
- package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
- package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
- package/dist/cdn/chunks/src-DlFlC9Tt.js +0 -1272
- package/dist/cdn/chunks/src-DlFlC9Tt.js.map +0 -1
- package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js +0 -2602
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +0 -1
- package/dist/cloud-B5xwm_4X.js +0 -1689
- package/dist/copy-BEcsAlfB.js +0 -19
- package/dist/createCloudRuntime-zNPkF6T9.js +0 -398
- package/dist/de-mMY5yQJu.js +0 -91
- package/dist/dist-DAAJogrx.js +0 -407
- package/dist/en-B0FUfNwz.js +0 -1
- package/dist/en-ChVeGQBY.js +0 -91
- package/dist/image-up-CM_HC0Dx.js +0 -27
- package/dist/keys-BKFq19a2.js +0 -10
- package/dist/plus-8cDvoCjZ.js +0 -14
- package/dist/pt-BR-CoCwRUi0.js +0 -91
- package/dist/shield-check-uDAwur5D.js +0 -14
- package/dist/socialIcons-PTiwhLoC.js +0 -1359
- package/dist/timeouts-Cv2jvusx.js +0 -4
- package/dist/upload-CtNOI6J2.js +0 -21
- package/dist/useAliveFlag-Dd06mRxe.js +0 -10
- package/dist/useScrollToBlock-CXmcHQQN.js +0 -47
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ The visual editor for [Templatical](https://github.com/templatical/sdk) — a so
|
|
|
21
21
|
npm install @templatical/editor
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
`@templatical/quality` is an optional dependency of the editor and installs by default. Leaving it out is supported: the editor works without it and hides the Issues tab.
|
|
25
|
+
|
|
24
26
|
`@templatical/renderer` is an optional peer — install it only if you need to convert templates to MJML. The two common cases are:
|
|
25
27
|
|
|
26
28
|
- **In the browser, alongside the editor**, when you call `editor.toMjml()` to export from the user's session.
|
|
@@ -83,9 +85,9 @@ Theme via `:host`-style CSS variables — set `--tpl-user-*` on the container (o
|
|
|
83
85
|
|
|
84
86
|
See the [Shadow DOM guide](https://docs.templatical.com/guide/shadow-dom) for trade-offs, opt-out semantics, and browser-support tiers.
|
|
85
87
|
|
|
86
|
-
##
|
|
88
|
+
## Backend providers
|
|
87
89
|
|
|
88
|
-
AI
|
|
90
|
+
The AI assistant and rewrite use an `AiProvider` passed to `init({ ai })`. Configure comments, version history, saved blocks, test email, rendering and real-time collaboration against your own backend with `init()`. See [Connect your backend](https://docs.templatical.com/backend/).
|
|
89
91
|
|
|
90
92
|
## Documentation
|
|
91
93
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { A as e, C as t, D as n, Mt as r, Q as i, c as a, d as o, f as s, j as c, k as l, l as u, ot as d, y as f, z as p } from "./vue.runtime.esm-bundler-DgFJ6GPG.js";
|
|
2
|
+
import { c as m, s as h } from "./runtime-dom.esm-bundler-B8WCZWUm.js";
|
|
3
|
+
import { X as g, g as _, t as v } from "./keys-Zd9KWRD1.js";
|
|
4
|
+
import { t as y } from "./useI18n-BdoY7xDE.js";
|
|
5
|
+
import { n as b, r as x } from "./aiErrors-D5UOoYOt.js";
|
|
6
|
+
import { n as S, r as C } from "./aiImageContext-BH4Ss1h3.js";
|
|
7
|
+
//#region src/components/ai/AiAltTextPopover.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var w = ["onKeydown"], T = [
|
|
9
|
+
"value",
|
|
10
|
+
"disabled",
|
|
11
|
+
"readonly",
|
|
12
|
+
"aria-busy",
|
|
13
|
+
"aria-label"
|
|
14
|
+
], E = { class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, D = {
|
|
15
|
+
key: 0,
|
|
16
|
+
role: "alert",
|
|
17
|
+
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
18
|
+
}, O = {
|
|
19
|
+
key: 1,
|
|
20
|
+
role: "alert",
|
|
21
|
+
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
22
|
+
}, k = { class: "tpl:flex tpl:flex-wrap tpl:gap-2" }, A = ["disabled"], j = ["disabled"], M = /* @__PURE__ */ f({
|
|
23
|
+
__name: "AiAltTextPopover",
|
|
24
|
+
props: { blockId: {} },
|
|
25
|
+
emits: ["close", "drafting"],
|
|
26
|
+
setup(f, { emit: M }) {
|
|
27
|
+
let N = f, P = M, F = t(v, null), I = t(_, null), L = I ? S(I.content.value, N.blockId) : null, R = i(!1), z = a(() => R.value || I !== null && !C(S(I.content.value, N.blockId), L)), B = t(g, "en"), { t: V, format: H } = y(), U = i(""), W = i(!0), G = i(!1), K = i(!1), q = i(""), J = i(null), Y = new AbortController(), X = !1;
|
|
28
|
+
function Z(e) {
|
|
29
|
+
let t = e.target;
|
|
30
|
+
W.value ? t.value = U.value : U.value = t.value;
|
|
31
|
+
}
|
|
32
|
+
function Q() {
|
|
33
|
+
X = !0, Y.abort(), P("drafting", null), P("close");
|
|
34
|
+
}
|
|
35
|
+
F && p(F.templateSession, Q, { flush: "sync" }), l(async () => {
|
|
36
|
+
P("drafting", Y);
|
|
37
|
+
try {
|
|
38
|
+
F && (U.value = await F.draftAltText(N.blockId, Y.signal));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
Y.signal.aborted || (K.value = !0, q.value = b(e, V.ai.errors, H, B));
|
|
41
|
+
} finally {
|
|
42
|
+
W.value = !1, P("drafting", null), await n(), X || J.value?.focus();
|
|
43
|
+
}
|
|
44
|
+
}), e(() => {
|
|
45
|
+
X = !0, Y.abort(), P("drafting", null);
|
|
46
|
+
});
|
|
47
|
+
async function $(e) {
|
|
48
|
+
if (!(!F || G.value || W.value || F.busy.value || z.value)) {
|
|
49
|
+
G.value = !0;
|
|
50
|
+
try {
|
|
51
|
+
await F.applyAltTexts([{
|
|
52
|
+
blockId: N.blockId,
|
|
53
|
+
alt: e ? "" : U.value,
|
|
54
|
+
decorative: e,
|
|
55
|
+
...L ? { expect: L } : {}
|
|
56
|
+
}]), Q();
|
|
57
|
+
} catch (e) {
|
|
58
|
+
x(e) && (e.code === "precondition_failed" || e.code === "block_missing") && (R.value = !0), K.value = !0, q.value = b(e, V.ai.errors, H, B);
|
|
59
|
+
} finally {
|
|
60
|
+
G.value = !1;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return (e, t) => (c(), s("div", {
|
|
65
|
+
class: "tpl:mt-3 tpl:flex tpl:flex-col tpl:gap-2",
|
|
66
|
+
onKeydown: h(m(Q, ["stop", "prevent"]), ["esc"])
|
|
67
|
+
}, [
|
|
68
|
+
u("textarea", {
|
|
69
|
+
ref_key: "textarea",
|
|
70
|
+
ref: J,
|
|
71
|
+
value: U.value,
|
|
72
|
+
disabled: W.value,
|
|
73
|
+
readonly: W.value,
|
|
74
|
+
"aria-busy": W.value,
|
|
75
|
+
onInput: Z,
|
|
76
|
+
"aria-label": d(V).ai.altText.title,
|
|
77
|
+
rows: "3",
|
|
78
|
+
class: "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)]"
|
|
79
|
+
}, null, 40, T),
|
|
80
|
+
u("p", E, r(d(V).ai.altText.note), 1),
|
|
81
|
+
z.value ? (c(), s("p", D, r(d(V).ai.altText.stale), 1)) : o("", !0),
|
|
82
|
+
K.value && !z.value ? (c(), s("p", O, r(d(V).ai.altText.failed) + " " + r(q.value), 1)) : o("", !0),
|
|
83
|
+
u("div", k, [
|
|
84
|
+
u("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
disabled: W.value || G.value || d(F)?.busy.value || z.value,
|
|
87
|
+
class: "tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-on-primary)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)] tpl:disabled:opacity-60",
|
|
88
|
+
onClick: t[0] ||= (e) => $(!1)
|
|
89
|
+
}, r(d(V).ai.altText.accept), 9, A),
|
|
90
|
+
u("button", {
|
|
91
|
+
type: "button",
|
|
92
|
+
disabled: W.value || G.value || d(F)?.busy.value || z.value,
|
|
93
|
+
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)] tpl:disabled:opacity-60",
|
|
94
|
+
onClick: t[1] ||= (e) => $(!0)
|
|
95
|
+
}, r(d(V).ai.altText.decorative), 9, j),
|
|
96
|
+
u("button", {
|
|
97
|
+
type: "button",
|
|
98
|
+
class: "tpl:rounded-md tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)]",
|
|
99
|
+
onClick: Q
|
|
100
|
+
}, r(d(V).ai.altText.cancel), 1)
|
|
101
|
+
])
|
|
102
|
+
], 40, w));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
export { M as default };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { A as e, C as t, Mt as n, N as r, Q as i, _ as a, c as o, d as s, f as c, j as l, k as u, l as d, ot as f, r as p, y as m, z as h } from "./vue.runtime.esm-bundler-DgFJ6GPG.js";
|
|
2
|
+
import { c as g, s as _ } from "./runtime-dom.esm-bundler-B8WCZWUm.js";
|
|
3
|
+
import { X as v, g as y } from "./keys-Zd9KWRD1.js";
|
|
4
|
+
import { t as b } from "./useI18n-BdoY7xDE.js";
|
|
5
|
+
import { n as x } from "./aiErrors-D5UOoYOt.js";
|
|
6
|
+
import { n as S, r as C } from "./aiImageContext-BH4Ss1h3.js";
|
|
7
|
+
import { t as w } from "./ToggleSwitch-D51U9cmR.js";
|
|
8
|
+
//#region src/components/ai/AiAltTextReview.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var ee = ["aria-label", "onKeydown"], te = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, T = {
|
|
10
|
+
key: 0,
|
|
11
|
+
role: "status",
|
|
12
|
+
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
13
|
+
}, E = { class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, D = { class: "tpl:m-0 tpl:flex tpl:list-none tpl:flex-col tpl:gap-3 tpl:p-0" }, O = ["src"], k = [
|
|
14
|
+
"value",
|
|
15
|
+
"readonly",
|
|
16
|
+
"disabled",
|
|
17
|
+
"aria-busy",
|
|
18
|
+
"aria-label",
|
|
19
|
+
"onInput"
|
|
20
|
+
], ne = {
|
|
21
|
+
key: 0,
|
|
22
|
+
role: "alert",
|
|
23
|
+
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
24
|
+
}, re = {
|
|
25
|
+
key: 1,
|
|
26
|
+
role: "alert",
|
|
27
|
+
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
28
|
+
}, A = {
|
|
29
|
+
key: 1,
|
|
30
|
+
role: "alert",
|
|
31
|
+
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
32
|
+
}, j = { class: "tpl:flex tpl:flex-wrap tpl:gap-2" }, M = ["disabled"], N = /* @__PURE__ */ m({
|
|
33
|
+
__name: "AiAltTextReview",
|
|
34
|
+
props: {
|
|
35
|
+
blockIds: {},
|
|
36
|
+
feature: {}
|
|
37
|
+
},
|
|
38
|
+
emits: ["close"],
|
|
39
|
+
setup(m, { emit: N }) {
|
|
40
|
+
let P = m, F = N, I = t(y, null), L = t(v, "en"), { t: R, format: z } = b(), B = i(P.blockIds.map((e) => ({
|
|
41
|
+
blockId: e,
|
|
42
|
+
src: I ? S(I.content.value, e)?.src ?? "" : "",
|
|
43
|
+
snapshot: I ? S(I.content.value, e) : null,
|
|
44
|
+
text: "",
|
|
45
|
+
decorative: !1,
|
|
46
|
+
accepted: !1,
|
|
47
|
+
state: "queued"
|
|
48
|
+
}))), V = i(null), H = i(!1), U = i(""), W = /* @__PURE__ */ new Map(), G = !1, K = !1, q = o(() => B.value.some((e) => e.state === "queued" || e.state === "pending")), J = o(() => B.value.filter((e) => e.state === "done" || e.state === "failed").length), Y = (e) => e.state !== "stale" && e.state !== "queued" && e.state !== "pending" && (e.decorative || e.text.trim().length > 0), X = o(() => B.value.filter((e) => e.accepted && Y(e)));
|
|
49
|
+
function ie(e, t) {
|
|
50
|
+
let n = t.target;
|
|
51
|
+
e.state === "queued" || e.state === "pending" || e.decorative ? n.value = e.text : (e.text = n.value, Y(e) || (e.accepted = !1));
|
|
52
|
+
}
|
|
53
|
+
function ae(e, t) {
|
|
54
|
+
e.decorative = t, e.decorative && (e.text = ""), Y(e) || (e.accepted = !1);
|
|
55
|
+
}
|
|
56
|
+
function Z() {
|
|
57
|
+
G = !0;
|
|
58
|
+
for (let e of B.value) (e.state === "pending" || e.state === "queued") && (e.state = "stopped", e.accepted = !1);
|
|
59
|
+
for (let e of W.values()) e.abort();
|
|
60
|
+
W.clear();
|
|
61
|
+
}
|
|
62
|
+
function Q() {
|
|
63
|
+
K || (K = !0, Z(), F("close"));
|
|
64
|
+
}
|
|
65
|
+
function $() {
|
|
66
|
+
if (!(K || G)) for (let e of B.value) {
|
|
67
|
+
if (W.size >= 3) break;
|
|
68
|
+
if (e.state !== "queued") continue;
|
|
69
|
+
let t = new AbortController();
|
|
70
|
+
W.set(e.blockId, t), e.state = "pending", oe(e, t);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async function oe(e, t) {
|
|
74
|
+
try {
|
|
75
|
+
let n = await P.feature.draftAltText(e.blockId, t.signal);
|
|
76
|
+
if (K || t.signal.aborted) return;
|
|
77
|
+
e.text = e.decorative ? "" : n, e.state = "done", e.accepted = Y(e);
|
|
78
|
+
} catch {
|
|
79
|
+
!K && !t.signal.aborted && (e.state = "failed", e.accepted = !1);
|
|
80
|
+
} finally {
|
|
81
|
+
W.delete(e.blockId), $();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
I && (h(I.content, () => {
|
|
85
|
+
for (let e of B.value) C(S(I.content.value, e.blockId), e.snapshot) || (e.state = "stale", e.accepted = !1, W.get(e.blockId)?.abort());
|
|
86
|
+
}, {
|
|
87
|
+
deep: !0,
|
|
88
|
+
flush: "sync",
|
|
89
|
+
immediate: !0
|
|
90
|
+
}), h(() => B.value.filter((e) => !I.findBlockLocation(e.blockId)), (e) => {
|
|
91
|
+
for (let t of e) W.get(t.blockId)?.abort(), B.value = B.value.filter((e) => e !== t);
|
|
92
|
+
}, {
|
|
93
|
+
flush: "sync",
|
|
94
|
+
immediate: !0
|
|
95
|
+
})), h([
|
|
96
|
+
P.feature.templateId,
|
|
97
|
+
P.feature.isAvailable,
|
|
98
|
+
() => I?.loadVersion?.value
|
|
99
|
+
], Q, { flush: "sync" }), u(() => {
|
|
100
|
+
V.value?.focus(), $();
|
|
101
|
+
}), e(() => {
|
|
102
|
+
K = !0, Z();
|
|
103
|
+
});
|
|
104
|
+
async function se() {
|
|
105
|
+
if (!(K || H.value || P.feature.busy.value || !X.value.length)) {
|
|
106
|
+
H.value = !0, U.value = "";
|
|
107
|
+
try {
|
|
108
|
+
await P.feature.applyAltTexts(X.value.filter((e) => I?.findBlockLocation(e.blockId)).map((e) => ({
|
|
109
|
+
blockId: e.blockId,
|
|
110
|
+
alt: e.decorative ? "" : e.text.trim(),
|
|
111
|
+
decorative: e.decorative,
|
|
112
|
+
...e.snapshot ? { expect: e.snapshot } : {}
|
|
113
|
+
}))), Q();
|
|
114
|
+
} catch (e) {
|
|
115
|
+
U.value = x(e, R.ai.errors, z, L);
|
|
116
|
+
} finally {
|
|
117
|
+
H.value = !1;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return (e, t) => (l(), c("section", {
|
|
122
|
+
ref_key: "container",
|
|
123
|
+
ref: V,
|
|
124
|
+
tabindex: "-1",
|
|
125
|
+
"aria-label": f(R).ai.altText.review,
|
|
126
|
+
"data-testid": "ai-alt-text-review",
|
|
127
|
+
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)]",
|
|
128
|
+
onKeydown: _(g(Q, ["stop", "prevent"]), ["esc"])
|
|
129
|
+
}, [
|
|
130
|
+
d("h4", te, n(f(R).ai.altText.review), 1),
|
|
131
|
+
q.value ? (l(), c("div", T, [d("span", null, n(f(z)(f(R).ai.altText.progress, {
|
|
132
|
+
done: J.value,
|
|
133
|
+
total: B.value.length
|
|
134
|
+
})), 1), d("button", {
|
|
135
|
+
type: "button",
|
|
136
|
+
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-[var(--tpl-text)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)]",
|
|
137
|
+
onClick: Z
|
|
138
|
+
}, n(f(R).ai.chat.stop), 1)])) : s("", !0),
|
|
139
|
+
d("p", E, n(f(R).ai.altText.note), 1),
|
|
140
|
+
d("ul", D, [(l(!0), c(p, null, r(B.value, (e) => (l(), c("li", {
|
|
141
|
+
key: e.blockId,
|
|
142
|
+
"data-testid": "ai-alt-text-row",
|
|
143
|
+
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:border-b tpl:border-[var(--tpl-border)] tpl:pb-3"
|
|
144
|
+
}, [
|
|
145
|
+
d("img", {
|
|
146
|
+
src: e.src,
|
|
147
|
+
alt: "",
|
|
148
|
+
loading: "lazy",
|
|
149
|
+
referrerpolicy: "no-referrer",
|
|
150
|
+
style: {
|
|
151
|
+
"max-width": "64px",
|
|
152
|
+
"max-height": "64px"
|
|
153
|
+
},
|
|
154
|
+
class: "tpl:object-contain"
|
|
155
|
+
}, null, 8, O),
|
|
156
|
+
d("textarea", {
|
|
157
|
+
value: e.text,
|
|
158
|
+
readonly: e.state === "queued" || e.state === "pending",
|
|
159
|
+
disabled: e.decorative,
|
|
160
|
+
"aria-busy": e.state === "pending",
|
|
161
|
+
"aria-label": f(R).ai.altText.title,
|
|
162
|
+
rows: "3",
|
|
163
|
+
class: "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)] tpl:disabled:opacity-60",
|
|
164
|
+
onInput: (t) => ie(e, t)
|
|
165
|
+
}, null, 40, k),
|
|
166
|
+
a(w, {
|
|
167
|
+
"model-value": e.decorative,
|
|
168
|
+
label: f(R).ai.altText.decorative,
|
|
169
|
+
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
170
|
+
"onUpdate:modelValue": (t) => ae(e, t)
|
|
171
|
+
}, null, 8, [
|
|
172
|
+
"model-value",
|
|
173
|
+
"label",
|
|
174
|
+
"onUpdate:modelValue"
|
|
175
|
+
]),
|
|
176
|
+
a(w, {
|
|
177
|
+
modelValue: e.accepted,
|
|
178
|
+
"onUpdate:modelValue": (t) => e.accepted = t,
|
|
179
|
+
label: f(R).ai.altText.accept,
|
|
180
|
+
disabled: !Y(e),
|
|
181
|
+
class: "tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
182
|
+
}, null, 8, [
|
|
183
|
+
"modelValue",
|
|
184
|
+
"onUpdate:modelValue",
|
|
185
|
+
"label",
|
|
186
|
+
"disabled"
|
|
187
|
+
]),
|
|
188
|
+
e.state === "stale" ? (l(), c("p", ne, n(f(R).ai.altText.stale), 1)) : s("", !0),
|
|
189
|
+
e.state === "failed" ? (l(), c("p", re, n(f(R).ai.altText.failed), 1)) : s("", !0)
|
|
190
|
+
]))), 128))]),
|
|
191
|
+
U.value ? (l(), c("p", A, n(U.value), 1)) : s("", !0),
|
|
192
|
+
d("div", j, [d("button", {
|
|
193
|
+
type: "button",
|
|
194
|
+
disabled: !X.value.length || H.value || m.feature.busy.value,
|
|
195
|
+
class: "tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-on-primary)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)] tpl:disabled:opacity-60",
|
|
196
|
+
onClick: se
|
|
197
|
+
}, n(f(z)(f(R).ai.altText.applyAccepted, { count: X.value.length })), 9, M), d("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
class: "tpl:rounded-md tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:focus-visible:outline-2 tpl:focus-visible:outline-[var(--tpl-primary)]",
|
|
200
|
+
onClick: Q
|
|
201
|
+
}, n(f(R).ai.altText.cancel), 1)])
|
|
202
|
+
], 40, ee));
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
//#endregion
|
|
206
|
+
export { N as default };
|