@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/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,282 @@ declare interface AccessibilityLintOptions {
|
|
|
4
4
|
thresholds?: Partial<LintThresholds>;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
/** Insert `block` into `parent`, after the sibling `after` (`null`: first). */
|
|
8
|
+
declare interface AddBlockOperation {
|
|
9
|
+
op: "addBlock";
|
|
10
|
+
/**
|
|
11
|
+
* A non-empty string `id` and a string `type`. A section brings its
|
|
12
|
+
* `children`: a list of columns, each a list of blocks.
|
|
13
|
+
*/
|
|
14
|
+
block: Block;
|
|
15
|
+
parent: BlockParent;
|
|
16
|
+
after: string | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Lint rules whose findings get "Write alt text" (A1 amendment R4). */
|
|
20
|
+
export declare const AI_ALT_TEXT_RULES: readonly ["a11y.img-missing-alt", "a11y.img-alt-is-filename", "a11y.img-alt-too-long", "a11y.img-linked-no-context"];
|
|
21
|
+
|
|
22
|
+
/** Lint rules whose findings get "Fix with AI" (A1 amendment R3). */
|
|
23
|
+
export declare const AI_FIXABLE_RULES: readonly ["a11y.link-vague-text", "a11y.button-vague-label", "a11y.link-empty", "a11y.text-all-caps", "a11y.missing-preheader", "deliverability.link-text-domain-mismatch", "deliverability.low-text"];
|
|
24
|
+
|
|
25
|
+
/** One image and its email context. Image URLs must be http(s), at most 2,048 characters. */
|
|
26
|
+
export declare interface AiAltTextRequest {
|
|
27
|
+
templateId: string;
|
|
28
|
+
sessionId: string;
|
|
29
|
+
blockId: string;
|
|
30
|
+
image: {
|
|
31
|
+
url: string;
|
|
32
|
+
};
|
|
33
|
+
currentAlt: string | null;
|
|
34
|
+
linkHref: string | null;
|
|
35
|
+
/** Plain text, at most 2,000 code points. */
|
|
36
|
+
nearbyText: string;
|
|
37
|
+
locale: string;
|
|
38
|
+
/** Effective lint altMaxLength: integer 1–1,000, counted as string.length. */
|
|
39
|
+
maxLength: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** A batch a backend applied to the template itself. */
|
|
43
|
+
export declare interface AiAppliedBatch {
|
|
44
|
+
batchId: string;
|
|
45
|
+
revision: number;
|
|
46
|
+
operationCount: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** One chat reference: PNG, JPEG, WebP, GIF or PDF. */
|
|
50
|
+
export declare interface AiChatAttachment {
|
|
51
|
+
file: Blob;
|
|
52
|
+
kind: "image" | "pdf";
|
|
53
|
+
name: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** One message of a template's AI conversation. */
|
|
57
|
+
export declare interface AiChatMessage {
|
|
58
|
+
id: string;
|
|
59
|
+
role: "user" | "assistant";
|
|
60
|
+
kind: AiMessageKind;
|
|
61
|
+
/** The author's message, a fix's "Fix: {message}", or the assistant's reply. */
|
|
62
|
+
text: string;
|
|
63
|
+
/** Reference metadata on user messages only; file retention is the backend's choice. */
|
|
64
|
+
attachments?: {
|
|
65
|
+
name: string;
|
|
66
|
+
kind: "image" | "pdf";
|
|
67
|
+
}[];
|
|
68
|
+
/** What the assistant's turn applied; empty for user messages. */
|
|
69
|
+
batches: AiMessageBatch[];
|
|
70
|
+
/** `true` after Undo, `false` after Redo. */
|
|
71
|
+
undone: boolean;
|
|
72
|
+
/** ISO 8601. */
|
|
73
|
+
createdAt: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare interface AiChatRequest extends AiRequestBase {
|
|
77
|
+
/** 1–4,000 characters. */
|
|
78
|
+
message: string;
|
|
79
|
+
/** The selected block, when the backend has it; `null` otherwise. */
|
|
80
|
+
selectedBlockId: string | null;
|
|
81
|
+
/** Always present; at most 4 files, each at most 5 MB, at most 10 MB together. */
|
|
82
|
+
attachments: AiChatAttachment[];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* A stored conversation per template: the chat panel loads it, and Undo and
|
|
87
|
+
* Redo work after a reload. Without it the chat lives in memory.
|
|
88
|
+
*/
|
|
89
|
+
export declare interface AiConversationProvider {
|
|
90
|
+
/** Settle an editor-applied replay, idempotently, after applying or refusing it. */
|
|
91
|
+
settleReplay(templateId: string, messageId: string, outcome: AiReplayOutcome): Promise<void>;
|
|
92
|
+
/** Oldest first. */
|
|
93
|
+
list(templateId: string): Promise<AiChatMessage[]>;
|
|
94
|
+
/** New chat; `false` hides the button. */
|
|
95
|
+
clear: false | ((templateId: string) => Promise<void>);
|
|
96
|
+
undo: false | ((templateId: string, messageId: string, context: AiReplayContext) => Promise<AiReplay>);
|
|
97
|
+
redo: false | ((templateId: string, messageId: string, context: AiReplayContext) => Promise<AiReplay>);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** The provider's features: its members other than `conversation`. */
|
|
101
|
+
export declare type AiFeatureName = Exclude<keyof AiProvider, "conversation">;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* JSON-serializable subset of @templatical/quality's LintIssue. Severity,
|
|
105
|
+
* client support and the local fix closure never travel to the provider.
|
|
106
|
+
* Every field is untrusted diagnostic data, never model instructions.
|
|
107
|
+
*/
|
|
108
|
+
export declare interface AiFixFinding {
|
|
109
|
+
/** Non-empty lint rule id, at most 200 characters. */
|
|
110
|
+
ruleId: string;
|
|
111
|
+
/** The problem, at most 1,000 code points. */
|
|
112
|
+
message: string;
|
|
113
|
+
/** The linter's suggested action, at most 1,000 code points. */
|
|
114
|
+
suggestion: string;
|
|
115
|
+
/** Rule docs URL: http(s), at most 2,048 characters; never fetched by the model. */
|
|
116
|
+
reference: string;
|
|
117
|
+
/** Block id (at most 200 characters), or null for a template-level finding. */
|
|
118
|
+
blockId: string | null;
|
|
119
|
+
/** Diagnostic excerpt when supplied by the rule, at most 1,000 code points. */
|
|
120
|
+
excerpt?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export declare interface AiFixRequest extends AiRequestBase {
|
|
124
|
+
finding: AiFixFinding;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** One declared merge tag. Never `sample` or `onRequest`. */
|
|
128
|
+
declare interface AiMergeTag {
|
|
129
|
+
value: string;
|
|
130
|
+
label: string;
|
|
131
|
+
group?: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The editor's merge tags: write tags as their bare `value` in this syntax,
|
|
137
|
+
* and no others. At most 500 tags; `value` ≤ 200, `label` ≤ 100, `group` ≤ 100,
|
|
138
|
+
* `description` ≤ 200 characters.
|
|
139
|
+
*/
|
|
140
|
+
export declare interface AiMergeTags {
|
|
141
|
+
syntax: AiMergeTagSyntax;
|
|
142
|
+
tags: AiMergeTag[];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** The editor's merge-tag syntax: a built-in preset's name, or `custom`. */
|
|
146
|
+
declare type AiMergeTagSyntax = SyntaxPresetName | "custom";
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* A batch an assistant message applied: `revision` is the backend's for a
|
|
150
|
+
* batch the server applied, `null` for one the editor applied itself.
|
|
151
|
+
*/
|
|
152
|
+
export declare interface AiMessageBatch {
|
|
153
|
+
batchId: string;
|
|
154
|
+
revision: number | null;
|
|
155
|
+
operationCount: number;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare type AiMessageKind = "chat" | "fix";
|
|
159
|
+
|
|
160
|
+
/** What the editor answers for a batch of operations it was handed. */
|
|
161
|
+
export declare type AiOperationsResult = {
|
|
162
|
+
applied: true;
|
|
163
|
+
inverse: Operation[];
|
|
164
|
+
} | {
|
|
165
|
+
applied: false;
|
|
166
|
+
code: OperationErrorCode;
|
|
167
|
+
opIndex: number;
|
|
168
|
+
message: string;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The bring-your-own AI contract: `init({ ai })`. One member per feature,
|
|
173
|
+
* `false` when you don't offer it (the editor hides its entry point), a
|
|
174
|
+
* function when you do. Every call gets an `AbortSignal`; stopping a turn
|
|
175
|
+
* aborts it, and the rejection is an `AbortError`.
|
|
176
|
+
*
|
|
177
|
+
* Reject with an `SdkError` whose `code` is an `AiErrorCode` and whose
|
|
178
|
+
* message the user can read. `@templatical/ai-kit/client`'s
|
|
179
|
+
* `createHttpAiProvider` implements this over a documented REST and SSE wire;
|
|
180
|
+
* Templatical Cloud is one backend for it.
|
|
181
|
+
*/
|
|
182
|
+
export declare interface AiProvider {
|
|
183
|
+
chat: false | ((request: AiChatRequest, on: AiTurnHandlers, signal: AbortSignal) => Promise<AiTurnResult>);
|
|
184
|
+
fixFinding: false | ((request: AiFixRequest, on: AiTurnHandlers, signal: AbortSignal) => Promise<AiTurnResult>);
|
|
185
|
+
/** True means chat accepts attachments; has no effect while chat is false. */
|
|
186
|
+
chatAttachments: false | true;
|
|
187
|
+
rewrite: false | ((request: AiRewriteRequest, on: AiRewriteHandlers, signal: AbortSignal) => Promise<{
|
|
188
|
+
html: string;
|
|
189
|
+
}>);
|
|
190
|
+
altText: false | ((request: AiAltTextRequest, signal: AbortSignal) => Promise<{
|
|
191
|
+
alt: string;
|
|
192
|
+
}>);
|
|
193
|
+
conversation?: AiConversationProvider;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** What Undo or Redo of a message returns: operations to apply, or a batch applied. */
|
|
197
|
+
export declare type AiReplay = {
|
|
198
|
+
operations: Operation[];
|
|
199
|
+
replayId: string;
|
|
200
|
+
} | {
|
|
201
|
+
applied: {
|
|
202
|
+
batchId: string;
|
|
203
|
+
revision: number;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/** Who asks for an Undo or Redo: the editor session (`X-Templatical-Session` on the wire). */
|
|
208
|
+
export declare interface AiReplayContext {
|
|
209
|
+
sessionId: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The outcome of an editor-applied replay. The backend changes `undone` only
|
|
214
|
+
* on `applied: true`; a refusal or an unsettled replay leaves it unchanged.
|
|
215
|
+
* Settlement is idempotent per `replayId`: later settlements are no-ops.
|
|
216
|
+
* A server-applied replay is never settled.
|
|
217
|
+
*/
|
|
218
|
+
export declare interface AiReplayOutcome {
|
|
219
|
+
replayId: string;
|
|
220
|
+
direction: "undo" | "redo";
|
|
221
|
+
applied: boolean;
|
|
222
|
+
sessionId: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** What every AI request carries. */
|
|
226
|
+
export declare interface AiRequestBase {
|
|
227
|
+
templateId: string;
|
|
228
|
+
/**
|
|
229
|
+
* The template as the editor has it, after it sent its pending edits. A
|
|
230
|
+
* backend that holds the template itself (Templatical Cloud) ignores it.
|
|
231
|
+
*/
|
|
232
|
+
content: TemplateContent;
|
|
233
|
+
/** The collaboration revision `content` is at, or `null` without collaboration. */
|
|
234
|
+
revision: number | null;
|
|
235
|
+
/** The editor session (`X-Templatical-Session` on the wire). */
|
|
236
|
+
sessionId: string;
|
|
237
|
+
/** The editor syntax and declared tags; `tags` is empty when none are declared. */
|
|
238
|
+
mergeTags: AiMergeTags;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
declare interface AiRewriteHandlers {
|
|
242
|
+
/** A chunk of the rewritten text, for a live preview. */
|
|
243
|
+
onText(text: string): void;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
declare type AiRewritePreset = "shorten" | "expand" | "friendlier" | "formal" | "fixGrammar" | "translate";
|
|
247
|
+
|
|
248
|
+
export declare interface AiRewriteRequest extends AiRequestBase {
|
|
249
|
+
/**
|
|
250
|
+
* The paragraph's HTML (1–20,000 characters), merge tags as the editor's
|
|
251
|
+
* tags (`<span data-merge-tag="{{first_name}}" …>`).
|
|
252
|
+
*/
|
|
253
|
+
html: string;
|
|
254
|
+
preset: AiRewritePreset | null;
|
|
255
|
+
/** A BCP 47 tag; set when `preset` is `translate`. */
|
|
256
|
+
language: string | null;
|
|
257
|
+
/** ≤ 500 characters. At least one of `preset` and `instruction` is set. */
|
|
258
|
+
instruction: string | null;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* What a chat or fix turn reports as it runs. A turn hands its edits
|
|
263
|
+
* over one of two ways, and may mix them:
|
|
264
|
+
*
|
|
265
|
+
* - `onOperations`: the editor applies the batch at once and answers with its
|
|
266
|
+
* inverse, or with why it refused (another person holds a block, the
|
|
267
|
+
* template changed). A turn's batches form one undo step.
|
|
268
|
+
* - `onApplied`: the backend already applied the batch to its copy. The editor
|
|
269
|
+
* follows the collaboration revision, or reloads the template when the turn
|
|
270
|
+
* ends; with neither a collaboration nor a templates provider it refuses.
|
|
271
|
+
*/
|
|
272
|
+
export declare interface AiTurnHandlers {
|
|
273
|
+
onText(text: string): void;
|
|
274
|
+
onOperations(ops: Operation[]): Promise<AiOperationsResult>;
|
|
275
|
+
onApplied(batch: AiAppliedBatch): void;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export declare interface AiTurnResult {
|
|
279
|
+
/** The assistant message's id in `conversation`, or `null` without history. */
|
|
280
|
+
messageId: string | null;
|
|
281
|
+
/** The whole reply. */
|
|
282
|
+
text: string;
|
|
12
283
|
}
|
|
13
284
|
|
|
14
285
|
/**
|
|
@@ -93,6 +364,33 @@ export declare interface BlockDefaults {
|
|
|
93
364
|
|
|
94
365
|
declare type BlockDefaultsFor<T> = Partial<Omit<T, "id" | "type">>;
|
|
95
366
|
|
|
367
|
+
/** A block one session holds. */
|
|
368
|
+
export declare interface BlockLock {
|
|
369
|
+
blockId: string;
|
|
370
|
+
holder: BlockLockHolder;
|
|
371
|
+
/**
|
|
372
|
+
* ISO 8601. Renewals aren't broadcast, so another session's lock is dropped
|
|
373
|
+
* when it is released or its session leaves, never by this time.
|
|
374
|
+
*/
|
|
375
|
+
expiresAt: string;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/** Who holds a lock. */
|
|
379
|
+
export declare interface BlockLockHolder {
|
|
380
|
+
sessionId: string;
|
|
381
|
+
type: "user" | "guest" | "mcp";
|
|
382
|
+
/** The user id, or `guest:{sessionId}`. */
|
|
383
|
+
id: string;
|
|
384
|
+
name: string;
|
|
385
|
+
color: string;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/** Where a block sits: `null` is the top level, otherwise a section column. */
|
|
389
|
+
export declare type BlockParent = null | {
|
|
390
|
+
sectionId: string;
|
|
391
|
+
column: number;
|
|
392
|
+
};
|
|
393
|
+
|
|
96
394
|
declare interface BlockStyles {
|
|
97
395
|
padding: SpacingValue;
|
|
98
396
|
backgroundColor?: string;
|
|
@@ -161,25 +459,106 @@ declare interface ButtonBlock extends BaseBlock {
|
|
|
161
459
|
align: "left" | "center" | "right";
|
|
162
460
|
}
|
|
163
461
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
462
|
+
/** Who made a change. */
|
|
463
|
+
export declare interface CollaborationActor {
|
|
464
|
+
type: "user" | "guest" | "mcp" | "api" | "ai";
|
|
465
|
+
/**
|
|
466
|
+
* The user id, `guest:{sessionId}` for a guest, `null` for `api`. For `mcp`,
|
|
467
|
+
* the id of the user the agent acts for; for `ai`, of the user who asked.
|
|
468
|
+
*/
|
|
469
|
+
id: string | null;
|
|
470
|
+
/** For `mcp` and `ai`, the name of the user the agent or the AI acts for. */
|
|
471
|
+
name: string;
|
|
472
|
+
/**
|
|
473
|
+
* `null` when no editor session made the change (`api`, `mcp`). For `ai`,
|
|
474
|
+
* the session that asked: that editor shows the outline and no notice.
|
|
475
|
+
*/
|
|
476
|
+
sessionId: string | null;
|
|
477
|
+
/**
|
|
478
|
+
* For `mcp` only: the agent's name (`Claude`, `Cursor`, …). The editor names
|
|
479
|
+
* it in the notice it shows for the batch ("Claude for Ada changed 3
|
|
480
|
+
* blocks"), as text. A backend that lets agents edit sends it with every
|
|
481
|
+
* agent batch, broadcast and catch-up alike.
|
|
482
|
+
*/
|
|
483
|
+
client?: string;
|
|
176
484
|
}
|
|
177
485
|
|
|
178
|
-
|
|
179
|
-
|
|
486
|
+
/** Why a backend refused a batch or a lock. */
|
|
487
|
+
export declare type CollaborationConflictCode = OperationErrorCode | "lock_lost" | "content_too_large";
|
|
488
|
+
|
|
489
|
+
/** The realtime connection, as the editor shows it. */
|
|
490
|
+
export declare type CollaborationConnectionState = "connected" | "reconnecting" | "offline";
|
|
491
|
+
|
|
492
|
+
/** What a backend calls while an editor has joined a template. */
|
|
493
|
+
export declare interface CollaborationHandlers {
|
|
494
|
+
/** Another session's batch, or one this session can't attribute to itself. */
|
|
495
|
+
onBatch(batch: RevisionedBatch): void;
|
|
496
|
+
/**
|
|
497
|
+
* The content changed in a way batches don't describe: fetch it again.
|
|
498
|
+
* `actor` is who changed it, when the backend knows: the editor names an
|
|
499
|
+
* agent's re-sync (`type: "mcp"`) in a notice ("Claude for Ada updated the
|
|
500
|
+
* template").
|
|
501
|
+
*/
|
|
502
|
+
onResync(revision: number, actor?: CollaborationActor): void;
|
|
503
|
+
onLock(lock: BlockLock): void;
|
|
504
|
+
onUnlock(blockId: string, sessionId: string): void;
|
|
505
|
+
/** Everyone with the template open, this session included. */
|
|
506
|
+
onMembers(members: CollaborationMember[]): void;
|
|
507
|
+
onConnectionChange(state: CollaborationConnectionState): void;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** What {@link CollaborationProvider.join} resolves with. */
|
|
511
|
+
export declare interface CollaborationJoin {
|
|
512
|
+
/** The template's current revision. */
|
|
513
|
+
revision: number;
|
|
514
|
+
/** Unexpired locks. */
|
|
515
|
+
locks: BlockLock[];
|
|
516
|
+
/** Everyone with the template open, this session included; empty without presence. */
|
|
517
|
+
members: CollaborationMember[];
|
|
518
|
+
/** Stop receiving events for this template. */
|
|
519
|
+
leave(): void;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** One editor session with the template open. */
|
|
523
|
+
export declare interface CollaborationMember {
|
|
524
|
+
sessionId: string;
|
|
525
|
+
/** `null` for a guest. */
|
|
526
|
+
userId: string | null;
|
|
180
527
|
name: string;
|
|
528
|
+
type: "user" | "guest";
|
|
529
|
+
avatarUrl?: string;
|
|
530
|
+
/** A CSS colour the backend picks, so it is the same on every screen. */
|
|
181
531
|
color: string;
|
|
182
|
-
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* The bring-your-own collaboration contract: ordered operations, presence and
|
|
536
|
+
* block locks over your backend. Templatical Cloud is one implementation.
|
|
537
|
+
*
|
|
538
|
+
* `join` may be called again for the template already joined, after a
|
|
539
|
+
* reconnect: answer with the current revision, locks and members without
|
|
540
|
+
* subscribing twice.
|
|
541
|
+
*
|
|
542
|
+
* The three lock methods are optional together: a backend without them gets
|
|
543
|
+
* ordered operations and no locks.
|
|
544
|
+
*/
|
|
545
|
+
export declare interface CollaborationProvider {
|
|
546
|
+
join(templateId: string, session: {
|
|
547
|
+
sessionId: string;
|
|
548
|
+
}, handlers: CollaborationHandlers): Promise<CollaborationJoin>;
|
|
549
|
+
submit(templateId: string, batch: OperationBatch): Promise<{
|
|
550
|
+
revision: number;
|
|
551
|
+
}>;
|
|
552
|
+
operationsAfter(templateId: string, revision: number): Promise<OperationsAfterResult>;
|
|
553
|
+
acquireLock?(templateId: string, blockId: string): Promise<BlockLock>;
|
|
554
|
+
renewLock?(templateId: string, blockId: string): Promise<BlockLock>;
|
|
555
|
+
releaseLock?(templateId: string, blockId: string): Promise<void>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** What `onRemoteChange` reports: a batch another session made. */
|
|
559
|
+
export declare interface CollaborationRemoteChange {
|
|
560
|
+
actor: CollaborationActor;
|
|
561
|
+
ops: Operation[];
|
|
183
562
|
}
|
|
184
563
|
|
|
185
564
|
export declare interface ColorsConfig {
|
|
@@ -460,6 +839,15 @@ declare interface CommentsProvider extends CommentsOptions {
|
|
|
460
839
|
subscribe?: (templateId: string, onChange: (change: CommentChange) => void) => () => void;
|
|
461
840
|
}
|
|
462
841
|
|
|
842
|
+
declare interface CompatibilityLintOptions {
|
|
843
|
+
rules?: RuleOverrides;
|
|
844
|
+
thresholds?: Partial<CompatibilityThresholds>;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
declare interface CompatibilityThresholds {
|
|
848
|
+
maxHtmlBytes: number;
|
|
849
|
+
}
|
|
850
|
+
|
|
463
851
|
/**
|
|
464
852
|
* Writing direction of the delivered email — the canvas `dir` and the
|
|
465
853
|
* rendered `<mjml dir>`. Independent of the editor chrome language
|
|
@@ -689,6 +1077,28 @@ declare interface DataSourceFetchContext {
|
|
|
689
1077
|
blockId: string;
|
|
690
1078
|
}
|
|
691
1079
|
|
|
1080
|
+
/** Delete a block. Deleting a section deletes its children with it. */
|
|
1081
|
+
declare interface DeleteBlockOperation {
|
|
1082
|
+
op: "deleteBlock";
|
|
1083
|
+
blockId: string;
|
|
1084
|
+
/** The whole current block, children included, compared exactly. */
|
|
1085
|
+
expect?: {
|
|
1086
|
+
block: Block;
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
declare interface DeliverabilityLintOptions {
|
|
1091
|
+
rules?: RuleOverrides;
|
|
1092
|
+
thresholds?: Partial<DeliverabilityThresholds>;
|
|
1093
|
+
/** Hosts treated as URL shorteners. Replaces DEFAULT_SHORTENER_HOSTS; spread the default to extend it. */
|
|
1094
|
+
shortenerHosts?: string[];
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
declare interface DeliverabilityThresholds {
|
|
1098
|
+
/** Visible characters below which `deliverability.low-text` fires. */
|
|
1099
|
+
minTextLength: number;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
692
1102
|
declare interface DisplayCondition {
|
|
693
1103
|
label: string;
|
|
694
1104
|
before: string;
|
|
@@ -875,10 +1285,10 @@ export declare function init(config: TemplaticalEditorConfig): Promise<Templatic
|
|
|
875
1285
|
* still surface as an overlay, because by then there is an editor to cover.
|
|
876
1286
|
*
|
|
877
1287
|
* `templates`, `comments` and `versionHistory` are all keyed to a template
|
|
878
|
-
* id Cloud issued, which also anchors
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
1288
|
+
* id Cloud issued, which also anchors the server-side export — a store Cloud
|
|
1289
|
+
* never issued ids for would degrade all of them silently. Cloud therefore
|
|
1290
|
+
* keeps each key's storage, but each key is still accepted, for its
|
|
1291
|
+
* configuration and events:
|
|
882
1292
|
* `templates.load`/`create`/`save`,
|
|
883
1293
|
* `comments.list`/`create`/`update`/`delete`/`setResolved`, and
|
|
884
1294
|
* `versionHistory.list`/`get`/`create`/`restore` are ignored with a warning
|
|
@@ -957,6 +1367,13 @@ declare interface LintOptions {
|
|
|
957
1367
|
* linter without enumerating its rules.
|
|
958
1368
|
*/
|
|
959
1369
|
links?: false | LinksLintOptions;
|
|
1370
|
+
/**
|
|
1371
|
+
* Deliverability linter config. Set to `false` to disable the whole
|
|
1372
|
+
* `lintDeliverability` linter without enumerating its rules.
|
|
1373
|
+
*/
|
|
1374
|
+
deliverability?: false | DeliverabilityLintOptions;
|
|
1375
|
+
/** Email-client compatibility checks over pass-through content. */
|
|
1376
|
+
compatibility?: false | CompatibilityLintOptions;
|
|
960
1377
|
}
|
|
961
1378
|
|
|
962
1379
|
declare interface LintThresholds {
|
|
@@ -1034,11 +1451,6 @@ export declare interface LogicTagsConfig {
|
|
|
1034
1451
|
onRequest?: () => Promise<LogicTag | LogicPair | null>;
|
|
1035
1452
|
}
|
|
1036
1453
|
|
|
1037
|
-
declare interface McpConfig {
|
|
1038
|
-
enabled: boolean;
|
|
1039
|
-
onOperation?: (payload: TemplateOperationPayload) => void;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
1454
|
/**
|
|
1043
1455
|
* One file in a media library — the row `list` returns and `create` persists.
|
|
1044
1456
|
*
|
|
@@ -1463,15 +1875,71 @@ export declare interface MergeTagsConfig {
|
|
|
1463
1875
|
* same popup, so behavior is identical.
|
|
1464
1876
|
*
|
|
1465
1877
|
* Defaults to `true`. Effective only when `tags` is non-empty AND
|
|
1466
|
-
* `syntax`
|
|
1467
|
-
*
|
|
1878
|
+
* `syntax` is a built-in preset or a custom syntax with an `opener`
|
|
1879
|
+
* (a custom syntax without one has no autocomplete).
|
|
1468
1880
|
*/
|
|
1469
1881
|
autocomplete?: boolean;
|
|
1470
1882
|
}
|
|
1471
1883
|
|
|
1884
|
+
/**
|
|
1885
|
+
* Move a block to `parent`, after the sibling `after` (`null`: first). The
|
|
1886
|
+
* sibling list is the target container with the moved block taken out.
|
|
1887
|
+
*/
|
|
1888
|
+
declare interface MoveBlockOperation {
|
|
1889
|
+
op: "moveBlock";
|
|
1890
|
+
blockId: string;
|
|
1891
|
+
parent: BlockParent;
|
|
1892
|
+
after: string | null;
|
|
1893
|
+
/**
|
|
1894
|
+
* The block's current position: its parent and its previous sibling. A key
|
|
1895
|
+
* left out counts as `null`.
|
|
1896
|
+
*/
|
|
1897
|
+
expect?: {
|
|
1898
|
+
parent: BlockParent;
|
|
1899
|
+
after: string | null;
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1472
1903
|
/** Function type for media browser requests, used by both OSS and Cloud editors. */
|
|
1473
1904
|
export declare type OnRequestMedia = (context?: MediaRequestContext) => Promise<MediaResult | null>;
|
|
1474
1905
|
|
|
1906
|
+
/**
|
|
1907
|
+
* One change to a template, in the vocabulary the editor, the CLI's `edit`
|
|
1908
|
+
* command, collaboration backends and Templatical Cloud share. Positions are
|
|
1909
|
+
* anchored to a sibling rather than an index, so an operation means the same
|
|
1910
|
+
* thing after someone else's change lands first.
|
|
1911
|
+
*/
|
|
1912
|
+
export declare type Operation = AddBlockOperation | MoveBlockOperation | DeleteBlockOperation | UpdateBlockOperation | UpdateSettingsOperation | SetContentOperation;
|
|
1913
|
+
|
|
1914
|
+
/** A batch an editor submits. */
|
|
1915
|
+
export declare interface OperationBatch {
|
|
1916
|
+
/** A UUID the editor generates; resubmitting the same id applies it once. */
|
|
1917
|
+
batchId: string;
|
|
1918
|
+
/** The last revision the editor had confirmed when it sent the batch. */
|
|
1919
|
+
baseRevision: number;
|
|
1920
|
+
/** 1–100 operations, applied in order and all or nothing. */
|
|
1921
|
+
ops: Operation[];
|
|
1922
|
+
/**
|
|
1923
|
+
* `"ai"` when an AI turn produced the batch: the editor applied the
|
|
1924
|
+
* operations an `AiProvider` handed it. A backend may broadcast the batch
|
|
1925
|
+
* with `actor.type: "ai"` (the same user and session), and the other
|
|
1926
|
+
* editors then name it "AI (for Ada)". Absent on every other batch.
|
|
1927
|
+
*/
|
|
1928
|
+
origin?: "ai";
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
/** Why {@link applyOperations} refused a batch. */
|
|
1932
|
+
declare type OperationErrorCode = "block_exists" | "block_missing" | "anchor_missing" | "precondition_failed" | "lock_held" | "locked_by_others" | "invalid_operation";
|
|
1933
|
+
|
|
1934
|
+
/** What {@link CollaborationProvider.operationsAfter} resolves with. */
|
|
1935
|
+
export declare type OperationsAfterResult = {
|
|
1936
|
+
revision: number;
|
|
1937
|
+
batches: RevisionedBatch[];
|
|
1938
|
+
} | {
|
|
1939
|
+
revision: number;
|
|
1940
|
+
resync: true;
|
|
1941
|
+
};
|
|
1942
|
+
|
|
1475
1943
|
declare interface ParagraphBlock extends BaseBlock {
|
|
1476
1944
|
type: "paragraph";
|
|
1477
1945
|
content: string;
|
|
@@ -1630,9 +2098,18 @@ export declare type ResolveImageUrl = (src: string) => string | null | Promise<s
|
|
|
1630
2098
|
*/
|
|
1631
2099
|
declare type ResolvePreview = (context: PreviewResolveContext) => Promise<TemplateContent>;
|
|
1632
2100
|
|
|
2101
|
+
/** A batch as the backend applied it, at the revision it produced. */
|
|
2102
|
+
export declare interface RevisionedBatch {
|
|
2103
|
+
revision: number;
|
|
2104
|
+
batchId: string;
|
|
2105
|
+
actor: CollaborationActor;
|
|
2106
|
+
ops: Operation[];
|
|
2107
|
+
createdAt?: string;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
1633
2110
|
/**
|
|
1634
2111
|
* Per-rule severity override. Set a rule to `'off'` to disable it.
|
|
1635
|
-
* Keys are the full prefixed rule IDs (`a11y.*`, `structure.*`, `link.*`)
|
|
2112
|
+
* Keys are the full prefixed rule IDs (`a11y.*`, `structure.*`, `link.*`, `deliverability.*`, `compat.*`)
|
|
1636
2113
|
* so a value copied from `LintIssue.ruleId` pastes straight in.
|
|
1637
2114
|
*/
|
|
1638
2115
|
declare type RuleOverrides = Record<string, Severity>;
|
|
@@ -1833,6 +2310,13 @@ export declare interface SavedBlocksProvider extends SavedBlocksOptions {
|
|
|
1833
2310
|
delete: false | ((id: string) => Promise<void>);
|
|
1834
2311
|
}
|
|
1835
2312
|
|
|
2313
|
+
/**
|
|
2314
|
+
* The `code` any provider sends in a refusal. Cloud and AI codes are named
|
|
2315
|
+
* here; collaboration refusal codes flow through `CollaborationConflict`.
|
|
2316
|
+
* Any other string reaches `SdkError.code` without an SDK release.
|
|
2317
|
+
*/
|
|
2318
|
+
export declare type SdkErrorCode = "invalid_credentials" | "token_invalid" | "token_revoked" | "browser_not_allowed" | "token_scope_mismatch" | "limit_reached" | "feature_unavailable" | "not_found" | "user_required" | "not_author" | "mcp_not_allowed" | "content_too_large" | "recipient_not_allowed" | "send_failed" | "rate_limited" | "ai_turn_running" | "ai_output_invalid" | "ai_provider_error" | (string & {});
|
|
2319
|
+
|
|
1836
2320
|
declare interface SectionBlock extends BaseBlock {
|
|
1837
2321
|
type: "section";
|
|
1838
2322
|
columns: ColumnLayout;
|
|
@@ -1912,6 +2396,15 @@ declare interface SelectOption {
|
|
|
1912
2396
|
value: string;
|
|
1913
2397
|
}
|
|
1914
2398
|
|
|
2399
|
+
/**
|
|
2400
|
+
* Replace `blocks` and `settings` wholesale. The engine checks only that
|
|
2401
|
+
* `blocks` is an array and `settings` an object.
|
|
2402
|
+
*/
|
|
2403
|
+
declare interface SetContentOperation {
|
|
2404
|
+
op: "setContent";
|
|
2405
|
+
content: TemplateContent;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
1915
2408
|
declare type Severity = "error" | "warning" | "info" | "off";
|
|
1916
2409
|
|
|
1917
2410
|
/**
|
|
@@ -1974,6 +2467,22 @@ declare interface StructureLintOptions {
|
|
|
1974
2467
|
declare interface SyntaxPreset {
|
|
1975
2468
|
value: RegExp;
|
|
1976
2469
|
logic: RegExp;
|
|
2470
|
+
/**
|
|
2471
|
+
* The characters that open a data tag, e.g. `{` for `{first_name}` or `%`
|
|
2472
|
+
* for `%FIRSTNAME%`. Typing them opens merge-tag autocomplete. Every
|
|
2473
|
+
* built-in preset declares its own, so a syntax spread from one keeps it;
|
|
2474
|
+
* a custom syntax without one, or with only whitespace, gets no
|
|
2475
|
+
* autocomplete. A space inside it is kept, for tags written with one: the
|
|
2476
|
+
* query ends at whitespace, so `{{ first_name }}` needs `'{{ '`.
|
|
2477
|
+
*/
|
|
2478
|
+
opener?: string;
|
|
2479
|
+
/**
|
|
2480
|
+
* The characters that close a data tag, e.g. `}`. Inserting a suggestion
|
|
2481
|
+
* absorbs a closer already typed after the caret, so `{fir}` becomes
|
|
2482
|
+
* `{first_name}`, not `{first_name}}`. It may equal `opener`. Whitespace
|
|
2483
|
+
* only counts as unset.
|
|
2484
|
+
*/
|
|
2485
|
+
closer?: string;
|
|
1977
2486
|
}
|
|
1978
2487
|
|
|
1979
2488
|
declare type SyntaxPresetName = "liquid" | "handlebars" | "mailchimp" | "ampscript";
|
|
@@ -2040,6 +2549,13 @@ export declare interface Template {
|
|
|
2040
2549
|
*/
|
|
2041
2550
|
updatedAt?: string;
|
|
2042
2551
|
content: TemplateContent;
|
|
2552
|
+
/**
|
|
2553
|
+
* The collaboration revision `content` is at. Required from `load` when a
|
|
2554
|
+
* collaboration provider is configured: the editor starts counting from it.
|
|
2555
|
+
*/
|
|
2556
|
+
revision?: number;
|
|
2557
|
+
/** Unexpired block locks, when the store has a collaboration backend. */
|
|
2558
|
+
locks?: BlockLock[];
|
|
2043
2559
|
}
|
|
2044
2560
|
|
|
2045
2561
|
export declare interface TemplateContent {
|
|
@@ -2049,14 +2565,6 @@ export declare interface TemplateContent {
|
|
|
2049
2565
|
|
|
2050
2566
|
export declare type TemplateDefaults = Partial<TemplateSettings>;
|
|
2051
2567
|
|
|
2052
|
-
declare type TemplateOperation = "addBlock" | "updateBlock" | "deleteBlock" | "moveBlock" | "updateSettings" | "setContent" | "updateBlockStyle";
|
|
2053
|
-
|
|
2054
|
-
declare interface TemplateOperationPayload {
|
|
2055
|
-
operation: TemplateOperation;
|
|
2056
|
-
data: Record<string, unknown>;
|
|
2057
|
-
timestamp: number;
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
2568
|
/**
|
|
2061
2569
|
* Partial patch for {@link TemplatesProvider.save}. Only the keys present are
|
|
2062
2570
|
* being changed, so a rename can travel without content and vice versa.
|
|
@@ -2405,9 +2913,6 @@ export declare interface TemplaticalCloudEditorConfig {
|
|
|
2405
2913
|
* @default true
|
|
2406
2914
|
*/
|
|
2407
2915
|
smallScreenNotice?: boolean;
|
|
2408
|
-
ai?: AiConfig | false;
|
|
2409
|
-
collaboration?: CollaborationConfig;
|
|
2410
|
-
mcp?: McpConfig;
|
|
2411
2916
|
blockDefaults?: BlockDefaults;
|
|
2412
2917
|
templateDefaults?: TemplateDefaults;
|
|
2413
2918
|
/**
|
|
@@ -2453,8 +2958,8 @@ export declare interface TemplaticalCloudEditorConfig {
|
|
|
2453
2958
|
/**
|
|
2454
2959
|
* Configuration and events for the template lifecycle. **The same key and
|
|
2455
2960
|
* the same type as `init()`'s `templates`** — minus the storage methods,
|
|
2456
|
-
* which Cloud owns: the id it issues is the join key for
|
|
2457
|
-
*
|
|
2961
|
+
* which Cloud owns: the id it issues is the join key for version history,
|
|
2962
|
+
* comments and the server-side export.
|
|
2458
2963
|
*
|
|
2459
2964
|
* Passing a full provider is not an error: `load` / `create` / `save` are
|
|
2460
2965
|
* ignored with a warning naming them, while `autoSave`, `unsavedChangesGuard`,
|
|
@@ -3218,11 +3723,74 @@ export declare interface TemplaticalEditorConfig {
|
|
|
3218
3723
|
* read rather than immediately.
|
|
3219
3724
|
*/
|
|
3220
3725
|
comments?: CommentsProvider;
|
|
3726
|
+
/**
|
|
3727
|
+
* Real-time collaboration over your backend: ordered operations, presence and
|
|
3728
|
+
* block locks.
|
|
3729
|
+
*
|
|
3730
|
+
* ```ts
|
|
3731
|
+
* const editor = await init({
|
|
3732
|
+
* container,
|
|
3733
|
+
* templates,
|
|
3734
|
+
* collaboration: {
|
|
3735
|
+
* join: (templateId, session, handlers) => myRealtime.join(templateId, session, handlers),
|
|
3736
|
+
* submit: (templateId, batch) => post(`/api/templates/${templateId}/operations`, batch),
|
|
3737
|
+
* operationsAfter: (templateId, revision) =>
|
|
3738
|
+
* get(`/api/templates/${templateId}/operations?after=${revision}`),
|
|
3739
|
+
* acquireLock: (templateId, blockId) => post(`/api/templates/${templateId}/locks`, { blockId }),
|
|
3740
|
+
* renewLock: (templateId, blockId) => put(`/api/templates/${templateId}/locks/${blockId}`),
|
|
3741
|
+
* releaseLock: (templateId, blockId) => del(`/api/templates/${templateId}/locks/${blockId}`),
|
|
3742
|
+
* },
|
|
3743
|
+
* });
|
|
3744
|
+
* await editor.load("tpl_123");
|
|
3745
|
+
* ```
|
|
3746
|
+
*
|
|
3747
|
+
* **Needs `templates`**: a session joins a loaded template, and `load` must
|
|
3748
|
+
* return the template's `revision`. With a collaboration provider, every edit
|
|
3749
|
+
* reaches your backend as an operation through `submit`, so `templates.save`
|
|
3750
|
+
* receives only renames, and undo and redo send inverse operations that your
|
|
3751
|
+
* backend can refuse. Selecting a block takes its lock; the three lock methods
|
|
3752
|
+
* are optional together. Apply operations on your server with
|
|
3753
|
+
* `applyOperations` from `@templatical/types`.
|
|
3754
|
+
*
|
|
3755
|
+
* **Omitted by default.** See the Collaboration page under Connect your backend.
|
|
3756
|
+
*/
|
|
3757
|
+
collaboration?: CollaborationProvider;
|
|
3758
|
+
/**
|
|
3759
|
+
* A batch of edits from another session landed on the canvas: who made it
|
|
3760
|
+
* (`actor`) and the operations. Not called for this editor's own edits, and
|
|
3761
|
+
* not for a re-sync that reloads the whole template.
|
|
3762
|
+
*/
|
|
3763
|
+
onRemoteChange?: (change: CollaborationRemoteChange) => void;
|
|
3764
|
+
/**
|
|
3765
|
+
* Your AI backend: a chat that edits the template with Undo, rewrite in the
|
|
3766
|
+
* paragraph toolbar, static localized chat starters and
|
|
3767
|
+
* chat attachments. One member per feature; `false` leaves it out and the
|
|
3768
|
+
* editor hides its entry point:
|
|
3769
|
+
*
|
|
3770
|
+
* ```ts
|
|
3771
|
+
* import { createHttpAiProvider } from "@templatical/ai-kit/client";
|
|
3772
|
+
*
|
|
3773
|
+
* const editor = await init({
|
|
3774
|
+
* container,
|
|
3775
|
+
* templates,
|
|
3776
|
+
* ai: createHttpAiProvider({ baseUrl: "/api/ai" }),
|
|
3777
|
+
* });
|
|
3778
|
+
* await editor.load("tpl_123");
|
|
3779
|
+
* ```
|
|
3780
|
+
*
|
|
3781
|
+
* **Needs a loaded template**: every AI request names it, so the entry
|
|
3782
|
+
* points show once `create()` or `load()` has resolved. With
|
|
3783
|
+
* `collaboration`, the AI's edits travel as this user's batches marked
|
|
3784
|
+
* `origin: "ai"`; without it they apply here. Either way a turn is one
|
|
3785
|
+
* Cmd/Ctrl+Z. Failures reach `onError`.
|
|
3786
|
+
*
|
|
3787
|
+
* **Omitted by default.** See AI under Connect your backend.
|
|
3788
|
+
*/
|
|
3789
|
+
ai?: AiProvider;
|
|
3221
3790
|
/**
|
|
3222
3791
|
* Who is using the editor — needed by any feature that attributes work to a
|
|
3223
|
-
* person
|
|
3224
|
-
*
|
|
3225
|
-
* comments provider.
|
|
3792
|
+
* person: {@link comments}, and the collaborator bar, which leaves this user's
|
|
3793
|
+
* own sessions out. It is a top-level key rather than part of either provider.
|
|
3226
3794
|
*
|
|
3227
3795
|
* ```ts
|
|
3228
3796
|
* init({ container, user: { id: "u_7", name: "Ada Lovelace" } });
|
|
@@ -3434,6 +4002,30 @@ export declare type UiTheme = "light" | "dark" | "auto";
|
|
|
3434
4002
|
*/
|
|
3435
4003
|
export declare function unmount(): void;
|
|
3436
4004
|
|
|
4005
|
+
/**
|
|
4006
|
+
* Replace top-level keys of a block (`set`, a `styles` object included) and
|
|
4007
|
+
* remove others (`unset`). `id`, `type` and `children` can't be touched, and
|
|
4008
|
+
* a section's `columns` can't be unset. On a section, `set.columns` resizes
|
|
4009
|
+
* `children` to the layout's column count.
|
|
4010
|
+
*/
|
|
4011
|
+
declare interface UpdateBlockOperation {
|
|
4012
|
+
op: "updateBlock";
|
|
4013
|
+
blockId: string;
|
|
4014
|
+
set?: Record<string, unknown>;
|
|
4015
|
+
unset?: string[];
|
|
4016
|
+
/** Expected current values by key; `null` matches `null` or an absent key. */
|
|
4017
|
+
expect?: Record<string, unknown>;
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
/** Replace and remove top-level keys of `content.settings`. */
|
|
4021
|
+
declare interface UpdateSettingsOperation {
|
|
4022
|
+
op: "updateSettings";
|
|
4023
|
+
set?: Partial<TemplateSettings>;
|
|
4024
|
+
unset?: string[];
|
|
4025
|
+
/** Expected current values by key; `null` matches `null` or an absent key. */
|
|
4026
|
+
expect?: Record<string, unknown>;
|
|
4027
|
+
}
|
|
4028
|
+
|
|
3437
4029
|
/** Throw if `layout` does not contain exactly one legal slot. */
|
|
3438
4030
|
export declare function validateLayout(layout: TemplateContent): void;
|
|
3439
4031
|
|