@templatical/editor 0.27.6 → 0.28.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/dist/{AiChatSidebar-jbpwD_4k.js → AiChatSidebar-mZyf81xG.js} +14 -14
- package/dist/{AiFeatureMenu-BeZR46ZG.js → AiFeatureMenu-wpL2vbbd.js} +7 -7
- package/dist/{BlockIssueBadge-B8wQY1tM.js → BlockIssueBadge-CavnyR3o.js} +5 -5
- package/dist/{BlockPreviewCanvas-CIjts7SP.js → BlockPreviewCanvas-CeNJqtJ6.js} +3 -3
- package/dist/{CloudHeaderExtras-mMqnnTi1.js → CloudHeaderExtras-fH0cB-Ru.js} +5 -5
- package/dist/{CloudPanels-fiTneIeJ.js → CloudPanels-Davlnzfd.js} +7 -7
- package/dist/{CollaboratorBar-C48K85la.js → CollaboratorBar-BvQZriPA.js} +4 -4
- package/dist/{ColorPicker-Bc1lGovM.js → ColorPicker-OLSFZBBZ.js} +7 -7
- package/dist/{CommentsPanel-D5Ljv1oj.js → CommentsPanel-B4_63eIS.js} +2 -2
- package/dist/{CommentsSidebar-C5mDJVjC.js → CommentsSidebar-BkBHMXez.js} +14 -14
- package/dist/{CountdownBlock-qKtJVRIV.js → CountdownBlock-Drr1WErd.js} +3 -3
- package/dist/{CountdownToolbar-B-9EdQvm.js → CountdownToolbar-D8FsDIfa.js} +4 -4
- package/dist/{DesignReferenceSidebar-DOy4ENYv.js → DesignReferenceSidebar-Dp44REBY.js} +11 -11
- package/dist/{IssuesPanel-DZUehVZS.js → IssuesPanel-C1v3dmoB.js} +8 -8
- package/dist/{LoadingTrack-C2T8ixEL.js → LoadingTrack-Db9j_aBr.js} +1 -1
- package/dist/{MergeTagModeToggle-Fn9Q1SrJ.js → MergeTagModeToggle-CZN0Pr1o.js} +5 -5
- package/dist/{MergeTagSuggestion-DflUPfkT.js → MergeTagSuggestion-a7Tk8tBB.js} +2 -2
- package/dist/{NumberWithSuffix-DZAktKby.js → NumberWithSuffix-C1D0WFrN.js} +1 -1
- package/dist/{ParagraphEditor-BwTQoxxF.js → ParagraphEditor-CGxsm0Mx.js} +15 -15
- package/dist/{RestoreVersionDialog-CVuUY3CK.js → RestoreVersionDialog-BLW8wC1J.js} +5 -5
- package/dist/{RichTextEditorContent-CoXoAfZ1.js → RichTextEditorContent-COBy_Q9j.js} +8 -8
- package/dist/{SaveBlockDialog-Bn5JtRSE.js → SaveBlockDialog-DPDQTGTB.js} +10 -10
- package/dist/{SavedBlocksBrowserModal-WWGhUC8R.js → SavedBlocksBrowserModal-D8a-wIRe.js} +11 -11
- package/dist/{SavedBlocksPanels-R_4C58EN.js → SavedBlocksPanels-CmnGyJHO.js} +2 -2
- package/dist/{SavedBlocksPickBar-D5KZVvvu.js → SavedBlocksPickBar-Z-YRd488.js} +4 -4
- package/dist/{TemplateScoringPanel-Cz25F9Cf.js → TemplateScoringPanel-5zp1qOSl.js} +15 -15
- package/dist/{TestEmailModal-C_C228mX.js → TestEmailModal-C69UbsNy.js} +10 -10
- package/dist/{TestEmailPanel-D7YOLrOb.js → TestEmailPanel-CH2dG-8A.js} +2 -2
- package/dist/{TitleEditor-XOQQlb1V.js → TitleEditor-BfWPus_C.js} +10 -10
- package/dist/{TplModal-DLXIufsn.js → TplModal-DBlMd7h9.js} +5 -5
- package/dist/{VersionHistoryMenu-Bk5zEClP.js → VersionHistoryMenu-Cg4UKxKc.js} +8 -8
- package/dist/{VersionHistoryPanels-D-km60IA.js → VersionHistoryPanels-BKjbNEOM.js} +2 -2
- package/dist/{VersionPreviewBanner-PMaxy3tA.js → VersionPreviewBanner-B0thyJ8F.js} +3 -3
- package/dist/{blockTypeIcons-BG5c5gc8.js → blockTypeIcons-CQMkcHo9.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-CEuJ6IRr.js → ca-DY0AYOLG.js} +6 -0
- package/dist/cdn/chunks/{AiChatSidebar-hq9GgASn.js → AiChatSidebar-BQATQ3Tr.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-hq9GgASn.js.map → AiChatSidebar-BQATQ3Tr.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B8B-XgQB.js → AiFeatureMenu-cNoZ0xl_.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B8B-XgQB.js.map → AiFeatureMenu-cNoZ0xl_.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DOvq0xJb.js → BlockIssueBadge-CH_3vFw4.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-DOvq0xJb.js.map → BlockIssueBadge-CH_3vFw4.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-ZN-5MezA.js → BlockPreviewCanvas-9tFXPVgi.js} +4 -4
- package/dist/cdn/chunks/{BlockPreviewCanvas-ZN-5MezA.js.map → BlockPreviewCanvas-9tFXPVgi.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-Dbd6brlz.js → CloudHeaderExtras-CUAM2ADe.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-Dbd6brlz.js.map → CloudHeaderExtras-CUAM2ADe.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CxkGH1dy.js → CloudPanels-DMnnSIkX.js} +7 -7
- package/dist/cdn/chunks/{CloudPanels-CxkGH1dy.js.map → CloudPanels-DMnnSIkX.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DpP8oKTU.js → CollaboratorBar-C6sorNRi.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-DpP8oKTU.js.map → CollaboratorBar-C6sorNRi.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-BsYEtL7B.js → ColorPicker-q1V7ggWI.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-BsYEtL7B.js.map → ColorPicker-q1V7ggWI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-B1B_UQ2z.js → CommentsPanel-ExfxJZM3.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-B1B_UQ2z.js.map → CommentsPanel-ExfxJZM3.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-B4waNT5L.js → CommentsSidebar-CzALURMJ.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-B4waNT5L.js.map → CommentsSidebar-CzALURMJ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-BKrYGRiT.js → CountdownBlock-_7TUBqJS.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BKrYGRiT.js.map → CountdownBlock-_7TUBqJS.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DhJg2sQa.js → CountdownToolbar-CkbWSrAH.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DhJg2sQa.js.map → CountdownToolbar-CkbWSrAH.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-4Ds4D0M0.js → DesignReferenceSidebar-COh0Rx_A.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-4Ds4D0M0.js.map → DesignReferenceSidebar-COh0Rx_A.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CyGgRHuI.js → IssuesPanel-C1NG0xRI.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-CyGgRHuI.js.map → IssuesPanel-C1NG0xRI.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Dp_QZvAK.js → LoadingTrack-D_wweXVz.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Dp_QZvAK.js.map → LoadingTrack-D_wweXVz.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-B_oHsH0i.js → MergeTagModeToggle-B1yXCp3D.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-B_oHsH0i.js.map → MergeTagModeToggle-B1yXCp3D.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Df7jcLpS.js → MergeTagSuggestion-DqYR3jPA.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-Df7jcLpS.js.map → MergeTagSuggestion-DqYR3jPA.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DNBrbl4H.js → NumberWithSuffix-CWvM_I3T.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-DNBrbl4H.js.map → NumberWithSuffix-CWvM_I3T.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-9GPXDRns.js → ParagraphEditor-DPM1hUKo.js} +22 -22
- package/dist/cdn/chunks/{ParagraphEditor-9GPXDRns.js.map → ParagraphEditor-DPM1hUKo.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BWewwJIZ.js → RestoreVersionDialog-Dz0bX5ZZ.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-BWewwJIZ.js.map → RestoreVersionDialog-Dz0bX5ZZ.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DWD1--Yi.js → RichTextEditorContent-nkyIRAyN.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-DWD1--Yi.js.map → RichTextEditorContent-nkyIRAyN.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-DUyrK4nE.js → SaveBlockDialog-DVMxZbmf.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-DUyrK4nE.js.map → SaveBlockDialog-DVMxZbmf.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DZrk2Fxx.js → SavedBlocksBrowserModal-C3nfKRQg.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DZrk2Fxx.js.map → SavedBlocksBrowserModal-C3nfKRQg.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-iSAXI4IM.js → SavedBlocksPanels-DVat5S7j.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-iSAXI4IM.js.map → SavedBlocksPanels-DVat5S7j.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CFeccSg9.js → SavedBlocksPickBar-Brg8US_n.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-CFeccSg9.js.map → SavedBlocksPickBar-Brg8US_n.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-Ct5p7X_i.js → TemplateScoringPanel-DO86BvdQ.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-Ct5p7X_i.js.map → TemplateScoringPanel-DO86BvdQ.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BJo6q_Dm.js → TestEmailModal-CDx1Pqtx.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-BJo6q_Dm.js.map → TestEmailModal-CDx1Pqtx.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-LuLd-ErE.js → TestEmailPanel--PpajGV7.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-LuLd-ErE.js.map → TestEmailPanel--PpajGV7.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BsGfiDXQ.js → TitleEditor-CLkXt5RZ.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-BsGfiDXQ.js.map → TitleEditor-CLkXt5RZ.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-lUdHsbjL.js → TplModal-BhfPoZ_W.js} +5 -5
- package/dist/cdn/chunks/{TplModal-lUdHsbjL.js.map → TplModal-BhfPoZ_W.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CXMPsVMR.js → VersionHistoryMenu-_DyRYBRP.js} +5 -5
- package/dist/cdn/chunks/{VersionHistoryMenu-CXMPsVMR.js.map → VersionHistoryMenu-_DyRYBRP.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-oTKA6TUS.js → VersionHistoryPanels-DGfOOcKV.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-oTKA6TUS.js.map → VersionHistoryPanels-DGfOOcKV.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-7DZLUVaE.js → VersionPreviewBanner-FbBmgknN.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-7DZLUVaE.js.map → VersionPreviewBanner-FbBmgknN.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-D8dtoELC.js → blockTypeIcons-o4ammRlm.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-D8dtoELC.js.map → blockTypeIcons-o4ammRlm.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CEuJ6IRr.js → ca-DY0AYOLG.js} +7 -1
- package/dist/cdn/chunks/ca-DY0AYOLG.js.map +1 -0
- package/dist/cdn/chunks/{cloud-BA0OpRh-.js → cloud-CRCcXTc5.js} +2 -2
- package/dist/cdn/chunks/{cloud-BA0OpRh-.js.map → cloud-CRCcXTc5.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-CedWXagq.js → createCloudRuntime-C-u7oIGa.js} +7 -7
- package/dist/cdn/chunks/{createCloudRuntime-CedWXagq.js.map → createCloudRuntime-C-u7oIGa.js.map} +1 -1
- package/dist/{de-aRxhZF_K.js → cdn/chunks/de-CYLWugqb.js} +8 -0
- package/dist/cdn/chunks/de-CYLWugqb.js.map +1 -0
- package/dist/cdn/chunks/{dist-CM8TB0VD.js → dist-2fOlspdg.js} +3 -3
- package/dist/cdn/chunks/{dist-CM8TB0VD.js.map → dist-2fOlspdg.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CYLJiSiH.js → dist-eKG4m5Wx.js} +2 -2
- package/dist/cdn/chunks/{dist-CYLJiSiH.js.map → dist-eKG4m5Wx.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-BfpsXFg7.js → draggable-BLMjz0GK.js} +565 -579
- package/dist/cdn/chunks/{draggable-BfpsXFg7.js.map → draggable-BLMjz0GK.js.map} +1 -1
- package/dist/cdn/chunks/{en-BX4V_7YO.js → en-C3TM249M.js} +7 -1
- package/dist/cdn/chunks/en-C3TM249M.js.map +1 -0
- package/dist/cdn/chunks/en-C6FKrw69.js +2 -0
- package/dist/cdn/chunks/{es-CA9uQ-5x.js → es-D1SF4nCR.js} +7 -1
- package/dist/cdn/chunks/es-D1SF4nCR.js.map +1 -0
- package/dist/cdn/chunks/{extensions-P0lpi6k8.js → extensions-qSqWdFko.js} +6 -6
- package/dist/cdn/chunks/{extensions-P0lpi6k8.js.map → extensions-qSqWdFko.js.map} +1 -1
- package/dist/{fr-iBuE60Ap.js → cdn/chunks/fr-CdLhJ7kw.js} +8 -0
- package/dist/cdn/chunks/fr-CdLhJ7kw.js.map +1 -0
- package/dist/cdn/chunks/{icons-BrdgOeXm.js → icons-MeYdeH4P.js} +2 -2
- package/dist/cdn/chunks/{icons-BrdgOeXm.js.map → icons-MeYdeH4P.js.map} +1 -1
- package/dist/cdn/chunks/{keys-oJdkdtPn.js → keys-D7OpfE2s.js} +2 -2
- package/dist/cdn/chunks/{keys-oJdkdtPn.js.map → keys-D7OpfE2s.js.map} +1 -1
- package/dist/cdn/chunks/{nl-Btw4ojNo.js → nl-BvsLoyKp.js} +7 -1
- package/dist/cdn/chunks/nl-BvsLoyKp.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-GjVsCqbN.js → pt-BR-CAGS5YXp.js} +7 -1
- package/dist/cdn/chunks/pt-BR-CAGS5YXp.js.map +1 -0
- package/dist/cdn/chunks/{src-BS2ClsbB.js → src-2QDLdUyx.js} +93 -11
- package/dist/cdn/chunks/src-2QDLdUyx.js.map +1 -0
- package/dist/cdn/chunks/src-B_QJduQD.js.map +1 -1
- package/dist/cdn/chunks/{src-rhf0R6xZ.js → src-DgxiymKd.js} +62 -59
- package/dist/cdn/chunks/src-DgxiymKd.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DWeSx_P8.js → tiptap-DgH_wKK_.js} +2 -2
- package/dist/cdn/chunks/{tiptap-DWeSx_P8.js.map → tiptap-DgH_wKK_.js.map} +1 -1
- package/dist/cdn/chunks/{useAliveFlag-Dtm174fG.js → useAliveFlag-C1pwLtPO.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-Dtm174fG.js.map → useAliveFlag-C1pwLtPO.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Ch-SiRjU.js → useCloudI18n-D4gzxtqF.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Ch-SiRjU.js.map → useCloudI18n-D4gzxtqF.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CwJIw1Uy.js → useEditorCore-2ZVOY0Rh.js} +30 -25
- package/dist/cdn/chunks/{useEditorCore-CwJIw1Uy.js.map → useEditorCore-2ZVOY0Rh.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-BY-amddA.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-Cxnmf5hM.js.map → useEditorRoot-BY-amddA.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-4sUbTM3Y.js → useI18n-DYb1SgLB.js} +3 -3
- package/dist/cdn/chunks/{useI18n-4sUbTM3Y.js.map → useI18n-DYb1SgLB.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DxjTEyin.js → useMergeTag-D-SE_XN8.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-DxjTEyin.js.map → useMergeTag-D-SE_XN8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-C1N2kaiZ.js → usePopoverPosition-CJZ6EkS4.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-C1N2kaiZ.js.map → usePopoverPosition-CJZ6EkS4.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-BvWAfWd8.js → useScrollToBlock-D6gyIzT1.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-BvWAfWd8.js.map → useScrollToBlock-D6gyIzT1.js.map} +1 -1
- package/dist/cdn/editor.js +1010 -956
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-C2h94k_8.js → check-CLfibuQc.js} +1 -1
- package/dist/{chevron-down-ulZzvfvk.js → chevron-down-DamTR8ta.js} +1 -1
- package/dist/{chevron-up-8g-VtBW4.js → chevron-up-CrV_Ksg-.js} +1 -1
- package/dist/{circle-alert-BJFqBtRt.js → circle-alert-BLy-e34e.js} +1 -1
- package/dist/{clock-C-1JiH38.js → clock-DQI6aaFT.js} +1 -1
- package/dist/{cloud-BAefVBb_.js → cloud-DXFUA8H_.js} +1 -1
- package/dist/{createCloudRuntime-FEZG-Gve.js → createCloudRuntime-BrgMP9gS.js} +5 -5
- package/dist/{createLucideIcon-DJb_1j1D.js → createLucideIcon-Cbl3Ma_H.js} +1 -1
- package/dist/{cdn/chunks/de-aRxhZF_K.js → de-CYLWugqb.js} +6 -2
- package/dist/{dist-BLVvhIFj.js → dist-7Lr_A7Va.js} +2 -2
- package/dist/{dist-B5iReTtK.js → dist-CkSgS-K9.js} +2 -2
- package/dist/{dist-CqcGTIiX.js → dist-WE11SQGe.js} +1 -1
- package/dist/{en-BX4V_7YO.js → en-C3TM249M.js} +6 -0
- package/dist/{es-CA9uQ-5x.js → es-D1SF4nCR.js} +6 -0
- package/dist/{extensions-DWp4eXoE.js → extensions-PJK0gLCL.js} +6 -6
- package/dist/{cdn/chunks/fr-iBuE60Ap.js → fr-CdLhJ7kw.js} +6 -2
- package/dist/{image-up-0rvCz8rh.js → image-up-BVOMy_Fs.js} +1 -1
- package/dist/{info-CXvc-MZk.js → info-BKMKasyT.js} +1 -1
- package/dist/{keys-CVpi8xCT.js → keys-CAor2T5q.js} +1 -1
- package/dist/{loader-circle-DQIuGTFk.js → loader-circle-CSGh8n8A.js} +1 -1
- package/dist/{message-circle-BqX2Y80d.js → message-circle-C6q2Fm_W.js} +1 -1
- package/dist/{nl-Btw4ojNo.js → nl-BvsLoyKp.js} +6 -0
- package/dist/{pencil-DpGX5hCB.js → pencil-DaTN0HKw.js} +1 -1
- package/dist/{pt-BR-GjVsCqbN.js → pt-BR-CAGS5YXp.js} +6 -0
- package/dist/{refresh-cw-B13pUg95.js → refresh-cw-Cu4wRQwT.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-BgKXIPLV.js → runtime-dom.esm-bundler-CHEsXNQz.js} +1 -1
- package/dist/{scan-line-BDZEtA92.js → scan-line-O_o657Gv.js} +1 -1
- package/dist/{send-DQ52s_T6.js → send-GS3soauT.js} +1 -1
- package/dist/{shield-check-C4uQTy20.js → shield-check-B2TzT3Wp.js} +1 -1
- package/dist/{sparkles-CphMFXxu.js → sparkles-CNENcXZl.js} +1 -1
- package/dist/templatical-editor.js +464 -410
- package/dist/{text-align-start-Cem3VGu8.js → text-align-start-D0-k8RUf.js} +1 -1
- package/dist/{trash-2-ijNDbe1n.js → trash-2-BE-qGIpG.js} +1 -1
- package/dist/{triangle-alert-C1e0A199.js → triangle-alert-DNM2_dyh.js} +1 -1
- package/dist/{upload-CXwGBFi0.js → upload-Cv2Jx-yM.js} +1 -1
- package/dist/{useAliveFlag-BGIAZii_.js → useAliveFlag-1yBub211.js} +1 -1
- package/dist/{useCloudI18n-DmWo4nzs.js → useCloudI18n-Dwo7usTl.js} +2 -2
- package/dist/{useEditorCore-BfPXdBsv.js → useEditorCore-DM8vzMZQ.js} +35 -30
- package/dist/{useEditorRoot-DKyG95pb.js → useEditorRoot-CUIzpMYc.js} +2 -2
- package/dist/{useI18n-CvYvat9_.js → useI18n-DT_DKupw.js} +2 -2
- package/dist/{useMergeTag-D6Z6cyDa.js → useMergeTag-CcHQCcPN.js} +2 -2
- package/dist/{usePopoverPosition-WslxM_PU.js → usePopoverPosition-DaHz1kqb.js} +2 -2
- package/dist/{useScrollToBlock-B3H6frtG.js → useScrollToBlock-C2LYXENK.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-DzEsDRtY.js → vue.runtime.esm-bundler-CdH_W9qX.js} +158 -172
- package/dist/{x-eZrtE6uf.js → x-DUPrT6Aa.js} +1 -1
- package/package.json +9 -9
- package/dist/cdn/chunks/ca-CEuJ6IRr.js.map +0 -1
- package/dist/cdn/chunks/de-aRxhZF_K.js.map +0 -1
- package/dist/cdn/chunks/en-BCgVx9zM.js +0 -90
- package/dist/cdn/chunks/en-BCgVx9zM.js.map +0 -1
- package/dist/cdn/chunks/en-BX4V_7YO.js.map +0 -1
- package/dist/cdn/chunks/es-CA9uQ-5x.js.map +0 -1
- package/dist/cdn/chunks/fr-iBuE60Ap.js.map +0 -1
- package/dist/cdn/chunks/nl-Btw4ojNo.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-GjVsCqbN.js.map +0 -1
- package/dist/cdn/chunks/src-BS2ClsbB.js.map +0 -1
- package/dist/cdn/chunks/src-rhf0R6xZ.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-Cxnmf5hM.js +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { E as e } from "./draggable-BLMjz0GK.js";
|
|
2
|
+
import { g as t } from "./keys-D7OpfE2s.js";
|
|
3
|
+
//#region src/composables/useEditorRoot.ts
|
|
4
|
+
function n() {
|
|
5
|
+
return e(t, document) ?? document;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n as t };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=useEditorRoot-BY-amddA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditorRoot-
|
|
1
|
+
{"version":3,"file":"useEditorRoot-BY-amddA.js","names":[],"sources":["../../../src/composables/useEditorRoot.ts"],"sourcesContent":["import { inject } from \"vue\";\nimport { EDITOR_ROOT_KEY } from \"../keys\";\n\n/**\n * Returns the editor's effective DOM root — `Document` when mounted in light\n * DOM, `ShadowRoot` when mounted with `shadowDom: true`.\n *\n * Use this instead of reaching for `document` directly when the code is\n * shadow-DOM-aware (focus trap, selection, popover mount, etc.). Both\n * `Document` and `ShadowRoot` expose the same subset of APIs the editor\n * needs (`activeElement`, `getSelection?`, `querySelector`, `appendChild`),\n * so call sites usually don't need to branch.\n *\n * Falls back to `document` if no provider is in scope — keeps headless /\n * test-utility usage working without explicit wiring.\n *\n * Internal — not exported from the package entry.\n */\nexport function useEditorRoot(): Document | ShadowRoot {\n // When called outside a Vue setup() context (e.g. direct composable\n // invocation in unit tests), Vue's inject() warns and returns undefined\n // regardless of the default arg. Coalesce explicitly so callers always\n // get a usable root — keeps test ergonomics simple and matches the\n // \"headless fallback to document\" semantics this composable promises.\n const root = inject(EDITOR_ROOT_KEY, document);\n return root ?? document;\n}\n"],"mappings":";;;AAkBA,SAAgB,IAAuC;CAOrD,OADa,EAAO,GAAiB,QAC9B,KAAQ;AACjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as e, q as t } from "./draggable-
|
|
2
|
-
import { V as n } from "./keys-
|
|
1
|
+
import { E as e, q as t } from "./draggable-BLMjz0GK.js";
|
|
2
|
+
import { V as n } from "./keys-D7OpfE2s.js";
|
|
3
3
|
//#region src/composables/useI18n.ts
|
|
4
4
|
function r(r) {
|
|
5
5
|
let i = r ?? e(n, null);
|
|
@@ -16,4 +16,4 @@ function r(r) {
|
|
|
16
16
|
//#endregion
|
|
17
17
|
export { r as t };
|
|
18
18
|
|
|
19
|
-
//# sourceMappingURL=useI18n-
|
|
19
|
+
//# sourceMappingURL=useI18n-DYb1SgLB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n-
|
|
1
|
+
{"version":3,"file":"useI18n-DYb1SgLB.js","names":[],"sources":["../../../src/composables/useI18n.ts"],"sourcesContent":["import type { Translations } from \"../i18n\";\nimport { type Ref, inject, isRef } from \"vue\";\nimport { TRANSLATIONS_KEY } from \"../keys\";\n\nexport interface UseI18nReturn {\n /** Current translations object */\n t: Translations;\n /** Format a string with placeholders */\n format: (template: string, values: Record<string, string | number>) => string;\n}\n\n/**\n * Composable for internationalization.\n * Provides access to the current locale's translations.\n *\n * @param translationsOverride - Optional translations to use instead of injected value\n */\nexport function useI18n(translationsOverride?: Translations): UseI18nReturn {\n const injected =\n translationsOverride ??\n (inject(TRANSLATIONS_KEY, null) as Translations | Ref<Translations> | null);\n\n if (!injected) {\n throw new Error(\n \"useI18n() requires a translations provider. Ensure the component renders inside the editor, below Editor.vue.\",\n );\n }\n\n const t: Translations = isRef(injected) ? injected.value : injected;\n\n /**\n * Format a string with placeholders.\n * e.g., format('{minutes}m ago', { minutes: 5 }) -> '5m ago'\n */\n function format(\n template: string,\n values: Record<string, string | number>,\n ): string {\n return template.replace(/\\{(\\w+)\\}/g, (_, key) => {\n return key in values ? String(values[key]) : `{${key}}`;\n });\n }\n\n return {\n t,\n format,\n };\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAQ,GAAoD;CAC1E,IAAM,IACJ,KACC,EAAO,GAAkB,IAAI;CAEhC,IAAI,CAAC,GACH,MAAU,MACR,+GACF;CAGF,IAAM,IAAkB,EAAM,CAAQ,IAAI,EAAS,QAAQ;CAM3D,SAAS,EACP,GACA,GACQ;EACR,OAAO,EAAS,QAAQ,eAAe,GAAG,MACjC,KAAO,IAAS,OAAO,EAAO,EAAI,IAAI,IAAI,EAAI,EACtD;CACH;CAEA,OAAO;EACL;EACA;CACF;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as e, Q as t } from "./draggable-
|
|
1
|
+
import { E as e, Q as t } from "./draggable-BLMjz0GK.js";
|
|
2
2
|
import { f as n, o as r, r as i } from "./src-B_QJduQD.js";
|
|
3
|
-
import { D as a, E as o, M as s, T as c, k as l } from "./keys-
|
|
3
|
+
import { D as a, E as o, M as s, T as c, k as l } from "./keys-D7OpfE2s.js";
|
|
4
4
|
//#region src/composables/useMergeTag.ts
|
|
5
5
|
function u() {
|
|
6
6
|
let u = e(c, []), d = e(l, i.liquid), f = e(s, null), p = e(o, !0), m = e(a, null), h = t(!1);
|
|
@@ -43,4 +43,4 @@ function u() {
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { u as t };
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=useMergeTag-
|
|
46
|
+
//# sourceMappingURL=useMergeTag-D-SE_XN8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMergeTag-
|
|
1
|
+
{"version":3,"file":"useMergeTag-D-SE_XN8.js","names":[],"sources":["../../../src/composables/useMergeTag.ts"],"sourcesContent":["import type { MergeTag, SyntaxPreset } from \"@templatical/types\";\nimport {\n isMergeTagValue as checkIsMergeTagValue,\n getMergeTagLabel as resolveMergeTagLabel,\n SYNTAX_PRESETS,\n} from \"@templatical/types\";\nimport { inject, ref, type Ref } from \"vue\";\nimport {\n MERGE_TAGS_KEY,\n MERGE_TAG_SYNTAX_KEY,\n MERGE_TAG_AUTOCOMPLETE_KEY,\n MERGE_TAG_PICKER_KEY,\n ON_REQUEST_MERGE_TAG_KEY,\n} from \"../keys\";\n\nexport interface UseMergeTagReturn {\n /** Available merge tags from config */\n mergeTags: MergeTag[];\n /** Whether a merge tag request is in progress */\n isRequesting: Ref<boolean>;\n /**\n * Whether the \"Insert merge tag\" button should be shown. True when\n * either `onRequestMergeTag` is provided or `mergeTags.tags` is\n * non-empty (the built-in picker then handles the click).\n */\n canRequestMergeTag: boolean;\n /** Whether typing-based autocomplete is enabled by configuration */\n autocomplete: boolean;\n /** The resolved syntax preset for merge tags */\n syntax: SyntaxPreset;\n /** Check if a value matches the configured merge tag syntax */\n isMergeTagValue: (value: string) => boolean;\n /** Get the human-readable label for a merge tag value */\n getMergeTagLabel: (value: string) => string;\n /**\n * Request a merge tag from the user. Precedence: when\n * `onRequestMergeTag` is set it owns the UX; otherwise the built-in\n * picker opens with the configured `mergeTags.tags`; otherwise null.\n */\n requestMergeTag: () => Promise<MergeTag | null>;\n}\n\n/**\n * Composable for merge tag functionality.\n * Provides utilities for detecting, displaying, and requesting merge tags.\n */\nexport function useMergeTag(): UseMergeTagReturn {\n const mergeTags = inject(MERGE_TAGS_KEY, []);\n const syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\n const onRequestMergeTag = inject(ON_REQUEST_MERGE_TAG_KEY, null);\n const autocomplete = inject(MERGE_TAG_AUTOCOMPLETE_KEY, true);\n // Picker may be null in headless contexts (tests, non-editor consumers).\n // requestMergeTag() returns null in that case rather than throwing.\n const picker = inject(MERGE_TAG_PICKER_KEY, null);\n\n const isRequesting = ref(false);\n\n function isMergeTagValue(value: string): boolean {\n return checkIsMergeTagValue(value, syntax);\n }\n\n function getMergeTagLabel(value: string): string {\n return resolveMergeTagLabel(value, mergeTags);\n }\n\n /**\n * Request a merge tag from the user. Precedence:\n * 1. `onRequestMergeTag` callback (consumer-owned UX)\n * 2. Built-in picker over `mergeTags.tags`\n * 3. null (nothing configured)\n */\n async function requestMergeTag(): Promise<MergeTag | null> {\n if (onRequestMergeTag) {\n isRequesting.value = true;\n try {\n return await onRequestMergeTag();\n } finally {\n isRequesting.value = false;\n }\n }\n if (mergeTags.length > 0 && picker) {\n isRequesting.value = true;\n try {\n return await picker.open(mergeTags);\n } finally {\n isRequesting.value = false;\n }\n }\n return null;\n }\n\n const canRequestMergeTag = !!onRequestMergeTag || mergeTags.length > 0;\n\n return {\n mergeTags,\n isRequesting,\n canRequestMergeTag,\n autocomplete,\n syntax,\n isMergeTagValue,\n getMergeTagLabel,\n requestMergeTag,\n };\n}\n"],"mappings":";;;;AA8CA,SAAgB,IAAiC;CAC/C,IAAM,IAAY,EAAO,GAAgB,CAAC,CAAC,GACrC,IAAS,EAAO,GAAsB,EAAe,MAAM,GAC3D,IAAoB,EAAO,GAA0B,IAAI,GACzD,IAAe,EAAO,GAA4B,EAAI,GAGtD,IAAS,EAAO,GAAsB,IAAI,GAE1C,IAAe,EAAI,EAAK;CAE9B,SAAS,EAAgB,GAAwB;EAC/C,OAAO,EAAqB,GAAO,CAAM;CAC3C;CAEA,SAAS,EAAiB,GAAuB;EAC/C,OAAO,EAAqB,GAAO,CAAS;CAC9C;CAQA,eAAe,IAA4C;EACzD,IAAI,GAAmB;GACrB,EAAa,QAAQ;GACrB,IAAI;IACF,OAAO,MAAM,EAAkB;GACjC,UAAU;IACR,EAAa,QAAQ;GACvB;EACF;EACA,IAAI,EAAU,SAAS,KAAK,GAAQ;GAClC,EAAa,QAAQ;GACrB,IAAI;IACF,OAAO,MAAM,EAAO,KAAK,CAAS;GACpC,UAAU;IACR,EAAa,QAAQ;GACvB;EACF;EACA,OAAO;CACT;CAIA,OAAO;EACL;EACA;EACA,oBALyB,CAAC,CAAC,KAAqB,EAAU,SAAS;EAMnE;EACA;EACA,iBAAA;EACA,kBAAA;EACA;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as e, Q as t } from "./draggable-
|
|
2
|
-
import { P as n } from "./keys-
|
|
1
|
+
import { E as e, Q as t } from "./draggable-BLMjz0GK.js";
|
|
2
|
+
import { P as n } from "./keys-D7OpfE2s.js";
|
|
3
3
|
//#region src/utils/resolveColorsConfig.ts
|
|
4
4
|
var r = {
|
|
5
5
|
presets: [],
|
|
@@ -58,4 +58,4 @@ function l() {
|
|
|
58
58
|
//#endregion
|
|
59
59
|
export { r as a, o as i, c as n, a as o, s as r, l as t };
|
|
60
60
|
|
|
61
|
-
//# sourceMappingURL=usePopoverPosition-
|
|
61
|
+
//# sourceMappingURL=usePopoverPosition-CJZ6EkS4.js.map
|
package/dist/cdn/chunks/{usePopoverPosition-C1N2kaiZ.js.map → usePopoverPosition-CJZ6EkS4.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopoverPosition-C1N2kaiZ.js","names":[],"sources":["../../../src/utils/resolveColorsConfig.ts","../../../src/utils/color.ts","../../../src/composables/usePopoverRoot.ts","../../../src/composables/usePopoverPosition.ts"],"sourcesContent":["import type { ColorsConfig } from \"@templatical/types\";\n\n/**\n * Normalized color-picker configuration handed to the provide/inject layer and\n * to `ColorPicker`. `presets` defaults to an empty array and `allowCustom` to\n * `true`, so consumers never branch on `undefined`.\n *\n * `allowCustomIgnored` is a validation signal, not a rendered value: it is\n * `true` when `allowCustom: false` was requested but forced back to `true`\n * because there were no presets to fall back on. This util stays pure — it\n * never logs; the consumer that owns the config surface emits the warning\n * (today that is `useEditorCore` for the editor-level config), the same split\n * `resolvePaletteBlocks` / `Sidebar.vue` use.\n */\nexport interface ResolvedColors {\n presets: string[];\n allowCustom: boolean;\n allowCustomIgnored: boolean;\n /**\n * Preset entries dropped because they are not a valid `#rgb` / `#rrggbb` hex\n * string (see the validity rule on {@link resolveColorsConfig}). Collected —\n * not logged — so the config-owning consumer can warn once listing them,\n * exactly as `allowCustomIgnored` is surfaced. Reflects THIS resolution's\n * `colors.presets` input only: when a `fallback`'s already-resolved (already\n * filtered) presets are inherited, its invalids are never re-reported here.\n */\n invalidPresets: string[];\n}\n\n/**\n * The unconfigured baseline: no presets, free-form entry allowed — i.e. the\n * picker behaves exactly as it did before the `colors` option existed. Used as\n * the inject default and as the fallback for the top-level resolution.\n */\nexport const DEFAULT_RESOLVED_COLORS: ResolvedColors = {\n presets: [],\n allowCustom: true,\n allowCustomIgnored: false,\n invalidPresets: [],\n};\n\n/**\n * A valid preset is a `#rgb` or `#rrggbb` hex string. 4-/8-digit alpha hex is\n * deliberately rejected: the wheel (vanilla-colorful) is RGB-only,\n * `normalizeColorToHex` drops alpha on the DOM round-trip so a selected alpha\n * preset would never read back as selected, and alpha degrades unpredictably\n * across email clients.\n */\nconst VALID_PRESET_HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/**\n * Resolve a `ColorsConfig` against an already-resolved `fallback`, applying\n * precedence per property (`input` → `fallback` → default) plus the shared\n * validation rule.\n *\n * The editor-level call passes no `fallback` (it defaults to\n * {@link DEFAULT_RESOLVED_COLORS}) and its result is provided via `COLORS_KEY`.\n * The `fallback` parameter is the nested-resolution seam: a narrower config can\n * be resolved against a broader already-resolved one, inheriting whichever\n * property it does not set.\n *\n * Validation: entries in `colors.presets` that aren't valid hex\n * ({@link VALID_PRESET_HEX}) are dropped from `presets` and collected into\n * `invalidPresets` for the caller to warn about. Separately, `allowCustom:\n * false` with no presets anywhere in the chain is ignored — forced back to\n * `true`, with `allowCustomIgnored` set so the caller can warn — because\n * hiding the wheel and hex input without a preset grid would leave the picker\n * unable to set a color. Filtering runs BEFORE that guard, so an all-invalid\n * list with `allowCustom: false` cascades into the forced-true path. This\n * mirrors how `paletteBlocks` is resolved: `resolvePaletteBlocks` collects the\n * offending entries and the consumer warns; this util stays pure the same way.\n */\nexport function resolveColorsConfig(\n colors: ColorsConfig | undefined,\n fallback: ResolvedColors = DEFAULT_RESOLVED_COLORS,\n): ResolvedColors {\n // Validate only presets this resolution actually supplies. When it inherits\n // `fallback.presets`, those were already resolved (already filtered), so\n // re-validating would double-report an upstream invalid entry.\n let presets: string[];\n let invalidPresets: string[];\n if (colors?.presets === undefined) {\n presets = fallback.presets;\n invalidPresets = [];\n } else {\n presets = [];\n invalidPresets = [];\n for (const entry of colors.presets) {\n if (VALID_PRESET_HEX.test(entry)) {\n presets.push(entry);\n } else {\n invalidPresets.push(entry);\n }\n }\n }\n\n const requestedAllowCustom = colors?.allowCustom ?? fallback.allowCustom;\n\n const allowCustomIgnored = !requestedAllowCustom && presets.length === 0;\n const allowCustom = allowCustomIgnored ? true : requestedAllowCustom;\n\n return { presets, allowCustom, allowCustomIgnored, invalidPresets };\n}\n","/**\n * Normalize a browser-serialized `rgb()/rgba()` color to `#rrggbb`. The browser\n * serializes an inline `style=\"color:#hex\"` to `rgb(...)`, so reading a stored\n * color back via `element.style.color` (e.g. a TipTap textStyle/highlight mark,\n * or a saved link color) surfaces `rgb(...)` — mismatching the hex used\n * everywhere else, and unparseable by the hex-only picker (`vanilla-colorful`)\n * and the native `<input type=\"color\">`. Non-rgb input (already hex, a keyword,\n * or empty) is returned unchanged.\n */\nexport function normalizeColorToHex(value: string): string {\n const m = /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)/i.exec(value.trim());\n if (!m) return value;\n const toHex = (n: string) => Number(n).toString(16).padStart(2, \"0\");\n return `#${toHex(m[1])}${toHex(m[2])}${toHex(m[3])}`;\n}\n\n/**\n * Canonicalize a hex color to the lowercase 6-digit form used for preset\n * membership tests. Runs {@link normalizeColorToHex} first (so a\n * browser-serialized `rgb(...)` round-trip collapses to hex), then expands a\n * 3-digit shorthand (`#abc` → `#aabbcc`) and lowercases it. Non-hex input (a\n * keyword, or empty) is returned unchanged after that rgb normalization —\n * the caller decides whether that counts as a member.\n *\n * Kept separate from `normalizeColorToHex` (which is left untouched) because a\n * configured preset may be `#abc` while the browser round-trips the selected\n * value to `#aabbcc`, and a factory default may be `#FFFFFF` while the preset\n * is `#ffffff` — bare equality misses both. Preset-selection display\n * (`ColorPicker`) and the off-palette defaults audit (`collectOffPaletteDefaults`)\n * both compare through this one function so the two membership tests can't drift.\n */\nexport function canonicalizeHexColor(value: string): string {\n const hex = normalizeColorToHex(value);\n const short = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(hex);\n if (short) {\n return `#${short[1]}${short[1]}${short[2]}${short[2]}${short[3]}${short[3]}`.toLowerCase();\n }\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n return hex.toLowerCase();\n }\n return hex;\n}\n","import { inject, ref, type Ref } from \"vue\";\nimport { POPOVER_ROOT_KEY } from \"../keys\";\n\n/**\n * Returns the editor's shared popover mount ref — the `<div\n * class=\"tpl-popover-root\" />` rendered at the top level of `Editor.vue`.\n * Every teleport target (RichTextLinkDialog, TitleEditor\n * toolbar, ParagraphToolbar, TplModal) injects this and teleports to\n * `popoverRoot.value` rather than `to=\"body\"`, so popups stay inside the\n * editor's effective DOM root (shadow-aware).\n *\n * Falls back to a never-resolving `ref(null)` when no provider is in scope.\n * Components must guard with `v-if=\"popoverRoot\"` before teleporting —\n * with the fallback, isolated component tests that don't mount the editor\n * shell simply render nothing rather than blow up.\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverRoot(): Ref<HTMLElement | null> {\n return inject(POPOVER_ROOT_KEY, ref<HTMLElement | null>(null));\n}\n","import { usePopoverRoot } from \"./usePopoverRoot\";\n\n/**\n * Coordinate helper for popovers that teleport into the shared popover root\n * (`.tpl-popover-root`, `position: relative`) and position themselves with\n * `position: absolute`.\n *\n * Callers compute a target point in **viewport** space — from\n * `getBoundingClientRect()`, `useElementBounding`, or a TipTap caret rect —\n * and `toLocal` converts it to coordinates **local to the popover root** by\n * subtracting the root's own viewport rect.\n *\n * Why this exists: a `position: fixed` popover resolves its coordinates\n * against the nearest ancestor that establishes a containing block — and any\n * `transform` / `filter` / `will-change` on an ancestor of the editor (a\n * consumer's scroll-parallax wrapper, route-transition, reveal animation…)\n * does exactly that, even while its computed `transform` reads `none` (a\n * running/animated transform still promotes the element). The fixed popover\n * would then be offset by that ancestor's position. Anchoring `absolute`\n * inside the (positioned) popover root instead makes the placement immune:\n * both points are read in viewport space, so the subtraction cancels the\n * ancestor offset, and the popover tracks the editor if the ancestor moves.\n *\n * Read `toLocal` inside a `computed` for a reactive result (recomputes with\n * its viewport-coordinate dependencies), or call it once when a popover opens.\n * Falls back to the viewport coordinates unchanged when no popover root is in\n * scope (isolated component tests / headless callers).\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverPosition(): {\n toLocal: (viewport: { top: number; left: number }) => {\n top: number;\n left: number;\n };\n} {\n const popoverRoot = usePopoverRoot();\n function toLocal(viewport: { top: number; left: number }): {\n top: number;\n left: number;\n } {\n const rect = popoverRoot.value?.getBoundingClientRect();\n if (!rect) return { top: viewport.top, left: viewport.left };\n return { top: viewport.top - rect.top, left: viewport.left - rect.left };\n }\n return { toLocal };\n}\n"],"mappings":";;;AAkCA,IAAa,IAA0C;CACrD,SAAS,CAAC;CACV,aAAa;CACb,oBAAoB;CACpB,gBAAgB,CAAC;AACnB,GASM,IAAmB;AAwBzB,SAAgB,EACd,GACA,IAA2B,GACX;CAIhB,IAAI,GACA;CACJ,IAAI,GAAQ,YAAY,KAAA,GAEtB,AADA,IAAU,EAAS,SACnB,IAAiB,CAAC;MACb;EAEL,AADA,IAAU,CAAC,GACX,IAAiB,CAAC;EAClB,KAAK,IAAM,KAAS,EAAO,SACzB,AAAI,EAAiB,KAAK,CAAK,IAC7B,EAAQ,KAAK,CAAK,IAElB,EAAe,KAAK,CAAK;CAG/B;CAEA,IAAM,IAAuB,GAAQ,eAAe,EAAS,aAEvD,IAAqB,CAAC,KAAwB,EAAQ,WAAW;CAGvE,OAAO;EAAE;EAAS,aAFE,IAAqB,KAAO;EAEjB;EAAoB;CAAe;AACpE;;;AC7FA,SAAgB,EAAoB,GAAuB;CACzD,IAAM,IAAI,4CAA4C,KAAK,EAAM,KAAK,CAAC;CACvE,IAAI,CAAC,GAAG,OAAO;CACf,IAAM,KAAS,MAAc,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CACnE,OAAO,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE;AACnD;AAiBA,SAAgB,EAAqB,GAAuB;CAC1D,IAAM,IAAM,EAAoB,CAAK,GAC/B,IAAQ,qCAAqC,KAAK,CAAG;CAO3D,OANI,IACK,IAAI,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,YAAY,IAEvF,kBAAkB,KAAK,CAAG,IACrB,EAAI,YAAY,IAElB;AACT;;;ACvBA,SAAgB,IAA0C;CACxD,OAAO,EAAO,GAAkB,EAAwB,IAAI,CAAC;AAC/D;;;ACUA,SAAgB,IAKd;CACA,IAAM,IAAc,EAAe;CACnC,SAAS,EAAQ,GAGf;EACA,IAAM,IAAO,EAAY,OAAO,sBAAsB;EAEtD,OADK,IACE;GAAE,KAAK,EAAS,MAAM,EAAK;GAAK,MAAM,EAAS,OAAO,EAAK;EAAK,IADrD;GAAE,KAAK,EAAS;GAAK,MAAM,EAAS;EAAK;CAE7D;CACA,OAAO,EAAE,WAAQ;AACnB"}
|
|
1
|
+
{"version":3,"file":"usePopoverPosition-CJZ6EkS4.js","names":[],"sources":["../../../src/utils/resolveColorsConfig.ts","../../../src/utils/color.ts","../../../src/composables/usePopoverRoot.ts","../../../src/composables/usePopoverPosition.ts"],"sourcesContent":["import type { ColorsConfig } from \"@templatical/types\";\n\n/**\n * Normalized color-picker configuration handed to the provide/inject layer and\n * to `ColorPicker`. `presets` defaults to an empty array and `allowCustom` to\n * `true`, so consumers never branch on `undefined`.\n *\n * `allowCustomIgnored` is a validation signal, not a rendered value: it is\n * `true` when `allowCustom: false` was requested but forced back to `true`\n * because there were no presets to fall back on. This util stays pure — it\n * never logs; the consumer that owns the config surface emits the warning\n * (today that is `useEditorCore` for the editor-level config), the same split\n * `resolvePaletteBlocks` / `Sidebar.vue` use.\n */\nexport interface ResolvedColors {\n presets: string[];\n allowCustom: boolean;\n allowCustomIgnored: boolean;\n /**\n * Preset entries dropped because they are not a valid `#rgb` / `#rrggbb` hex\n * string (see the validity rule on {@link resolveColorsConfig}). Collected —\n * not logged — so the config-owning consumer can warn once listing them,\n * exactly as `allowCustomIgnored` is surfaced. Reflects THIS resolution's\n * `colors.presets` input only: when a `fallback`'s already-resolved (already\n * filtered) presets are inherited, its invalids are never re-reported here.\n */\n invalidPresets: string[];\n}\n\n/**\n * The unconfigured baseline: no presets, free-form entry allowed — i.e. the\n * picker behaves exactly as it did before the `colors` option existed. Used as\n * the inject default and as the fallback for the top-level resolution.\n */\nexport const DEFAULT_RESOLVED_COLORS: ResolvedColors = {\n presets: [],\n allowCustom: true,\n allowCustomIgnored: false,\n invalidPresets: [],\n};\n\n/**\n * A valid preset is a `#rgb` or `#rrggbb` hex string. 4-/8-digit alpha hex is\n * deliberately rejected: the wheel (vanilla-colorful) is RGB-only,\n * `normalizeColorToHex` drops alpha on the DOM round-trip so a selected alpha\n * preset would never read back as selected, and alpha degrades unpredictably\n * across email clients.\n */\nconst VALID_PRESET_HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/**\n * Resolve a `ColorsConfig` against an already-resolved `fallback`, applying\n * precedence per property (`input` → `fallback` → default) plus the shared\n * validation rule.\n *\n * The editor-level call passes no `fallback` (it defaults to\n * {@link DEFAULT_RESOLVED_COLORS}) and its result is provided via `COLORS_KEY`.\n * The `fallback` parameter is the nested-resolution seam: a narrower config can\n * be resolved against a broader already-resolved one, inheriting whichever\n * property it does not set.\n *\n * Validation: entries in `colors.presets` that aren't valid hex\n * ({@link VALID_PRESET_HEX}) are dropped from `presets` and collected into\n * `invalidPresets` for the caller to warn about. Separately, `allowCustom:\n * false` with no presets anywhere in the chain is ignored — forced back to\n * `true`, with `allowCustomIgnored` set so the caller can warn — because\n * hiding the wheel and hex input without a preset grid would leave the picker\n * unable to set a color. Filtering runs BEFORE that guard, so an all-invalid\n * list with `allowCustom: false` cascades into the forced-true path. This\n * mirrors how `paletteBlocks` is resolved: `resolvePaletteBlocks` collects the\n * offending entries and the consumer warns; this util stays pure the same way.\n */\nexport function resolveColorsConfig(\n colors: ColorsConfig | undefined,\n fallback: ResolvedColors = DEFAULT_RESOLVED_COLORS,\n): ResolvedColors {\n // Validate only presets this resolution actually supplies. When it inherits\n // `fallback.presets`, those were already resolved (already filtered), so\n // re-validating would double-report an upstream invalid entry.\n let presets: string[];\n let invalidPresets: string[];\n if (colors?.presets === undefined) {\n presets = fallback.presets;\n invalidPresets = [];\n } else {\n presets = [];\n invalidPresets = [];\n for (const entry of colors.presets) {\n if (VALID_PRESET_HEX.test(entry)) {\n presets.push(entry);\n } else {\n invalidPresets.push(entry);\n }\n }\n }\n\n const requestedAllowCustom = colors?.allowCustom ?? fallback.allowCustom;\n\n const allowCustomIgnored = !requestedAllowCustom && presets.length === 0;\n const allowCustom = allowCustomIgnored ? true : requestedAllowCustom;\n\n return { presets, allowCustom, allowCustomIgnored, invalidPresets };\n}\n","/**\n * Normalize a browser-serialized `rgb()/rgba()` color to `#rrggbb`. The browser\n * serializes an inline `style=\"color:#hex\"` to `rgb(...)`, so reading a stored\n * color back via `element.style.color` (e.g. a TipTap textStyle/highlight mark,\n * or a saved link color) surfaces `rgb(...)` — mismatching the hex used\n * everywhere else, and unparseable by the hex-only picker (`vanilla-colorful`)\n * and the native `<input type=\"color\">`. Non-rgb input (already hex, a keyword,\n * or empty) is returned unchanged.\n */\nexport function normalizeColorToHex(value: string): string {\n const m = /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)/i.exec(value.trim());\n if (!m) return value;\n const toHex = (n: string) => Number(n).toString(16).padStart(2, \"0\");\n return `#${toHex(m[1])}${toHex(m[2])}${toHex(m[3])}`;\n}\n\n/**\n * Canonicalize a hex color to the lowercase 6-digit form used for preset\n * membership tests. Runs {@link normalizeColorToHex} first (so a\n * browser-serialized `rgb(...)` round-trip collapses to hex), then expands a\n * 3-digit shorthand (`#abc` → `#aabbcc`) and lowercases it. Non-hex input (a\n * keyword, or empty) is returned unchanged after that rgb normalization —\n * the caller decides whether that counts as a member.\n *\n * Kept separate from `normalizeColorToHex` (which is left untouched) because a\n * configured preset may be `#abc` while the browser round-trips the selected\n * value to `#aabbcc`, and a factory default may be `#FFFFFF` while the preset\n * is `#ffffff` — bare equality misses both. Preset-selection display\n * (`ColorPicker`) and the off-palette defaults audit (`collectOffPaletteDefaults`)\n * both compare through this one function so the two membership tests can't drift.\n */\nexport function canonicalizeHexColor(value: string): string {\n const hex = normalizeColorToHex(value);\n const short = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(hex);\n if (short) {\n return `#${short[1]}${short[1]}${short[2]}${short[2]}${short[3]}${short[3]}`.toLowerCase();\n }\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n return hex.toLowerCase();\n }\n return hex;\n}\n","import { inject, ref, type Ref } from \"vue\";\nimport { POPOVER_ROOT_KEY } from \"../keys\";\n\n/**\n * Returns the editor's shared popover mount ref — the `<div\n * class=\"tpl-popover-root\" />` rendered at the top level of `Editor.vue`.\n * Every teleport target (RichTextLinkDialog, TitleEditor\n * toolbar, ParagraphToolbar, TplModal) injects this and teleports to\n * `popoverRoot.value` rather than `to=\"body\"`, so popups stay inside the\n * editor's effective DOM root (shadow-aware).\n *\n * Falls back to a never-resolving `ref(null)` when no provider is in scope.\n * Components must guard with `v-if=\"popoverRoot\"` before teleporting —\n * with the fallback, isolated component tests that don't mount the editor\n * shell simply render nothing rather than blow up.\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverRoot(): Ref<HTMLElement | null> {\n return inject(POPOVER_ROOT_KEY, ref<HTMLElement | null>(null));\n}\n","import { usePopoverRoot } from \"./usePopoverRoot\";\n\n/**\n * Coordinate helper for popovers that teleport into the shared popover root\n * (`.tpl-popover-root`, `position: relative`) and position themselves with\n * `position: absolute`.\n *\n * Callers compute a target point in **viewport** space — from\n * `getBoundingClientRect()`, `useElementBounding`, or a TipTap caret rect —\n * and `toLocal` converts it to coordinates **local to the popover root** by\n * subtracting the root's own viewport rect.\n *\n * Why this exists: a `position: fixed` popover resolves its coordinates\n * against the nearest ancestor that establishes a containing block — and any\n * `transform` / `filter` / `will-change` on an ancestor of the editor (a\n * consumer's scroll-parallax wrapper, route-transition, reveal animation…)\n * does exactly that, even while its computed `transform` reads `none` (a\n * running/animated transform still promotes the element). The fixed popover\n * would then be offset by that ancestor's position. Anchoring `absolute`\n * inside the (positioned) popover root instead makes the placement immune:\n * both points are read in viewport space, so the subtraction cancels the\n * ancestor offset, and the popover tracks the editor if the ancestor moves.\n *\n * Read `toLocal` inside a `computed` for a reactive result (recomputes with\n * its viewport-coordinate dependencies), or call it once when a popover opens.\n * Falls back to the viewport coordinates unchanged when no popover root is in\n * scope (isolated component tests / headless callers).\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverPosition(): {\n toLocal: (viewport: { top: number; left: number }) => {\n top: number;\n left: number;\n };\n} {\n const popoverRoot = usePopoverRoot();\n function toLocal(viewport: { top: number; left: number }): {\n top: number;\n left: number;\n } {\n const rect = popoverRoot.value?.getBoundingClientRect();\n if (!rect) return { top: viewport.top, left: viewport.left };\n return { top: viewport.top - rect.top, left: viewport.left - rect.left };\n }\n return { toLocal };\n}\n"],"mappings":";;;AAkCA,IAAa,IAA0C;CACrD,SAAS,CAAC;CACV,aAAa;CACb,oBAAoB;CACpB,gBAAgB,CAAC;AACnB,GASM,IAAmB;AAwBzB,SAAgB,EACd,GACA,IAA2B,GACX;CAIhB,IAAI,GACA;CACJ,IAAI,GAAQ,YAAY,KAAA,GAEtB,AADA,IAAU,EAAS,SACnB,IAAiB,CAAC;MACb;EAEL,AADA,IAAU,CAAC,GACX,IAAiB,CAAC;EAClB,KAAK,IAAM,KAAS,EAAO,SACzB,AAAI,EAAiB,KAAK,CAAK,IAC7B,EAAQ,KAAK,CAAK,IAElB,EAAe,KAAK,CAAK;CAG/B;CAEA,IAAM,IAAuB,GAAQ,eAAe,EAAS,aAEvD,IAAqB,CAAC,KAAwB,EAAQ,WAAW;CAGvE,OAAO;EAAE;EAAS,aAFE,IAAqB,KAAO;EAEjB;EAAoB;CAAe;AACpE;;;AC7FA,SAAgB,EAAoB,GAAuB;CACzD,IAAM,IAAI,4CAA4C,KAAK,EAAM,KAAK,CAAC;CACvE,IAAI,CAAC,GAAG,OAAO;CACf,IAAM,KAAS,MAAc,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CACnE,OAAO,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE;AACnD;AAiBA,SAAgB,EAAqB,GAAuB;CAC1D,IAAM,IAAM,EAAoB,CAAK,GAC/B,IAAQ,qCAAqC,KAAK,CAAG;CAO3D,OANI,IACK,IAAI,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,YAAY,IAEvF,kBAAkB,KAAK,CAAG,IACrB,EAAI,YAAY,IAElB;AACT;;;ACvBA,SAAgB,IAA0C;CACxD,OAAO,EAAO,GAAkB,EAAwB,IAAI,CAAC;AAC/D;;;ACUA,SAAgB,IAKd;CACA,IAAM,IAAc,EAAe;CACnC,SAAS,EAAQ,GAGf;EACA,IAAM,IAAO,EAAY,OAAO,sBAAsB;EAEtD,OADK,IACE;GAAE,KAAK,EAAS,MAAM,EAAK;GAAK,MAAM,EAAS,OAAO,EAAK;EAAK,IADrD;GAAE,KAAK,EAAS;GAAK,MAAM,EAAS;EAAK;CAE7D;CACA,OAAO,EAAE,WAAQ;AACnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as e } from "./draggable-
|
|
2
|
-
import { t } from "./useEditorRoot-
|
|
1
|
+
import { k as e } from "./draggable-BLMjz0GK.js";
|
|
2
|
+
import { t } from "./useEditorRoot-BY-amddA.js";
|
|
3
3
|
//#region src/composables/useScrollToBlock.ts
|
|
4
4
|
function n() {
|
|
5
5
|
let n = t();
|
|
@@ -19,4 +19,4 @@ function r() {
|
|
|
19
19
|
//#endregion
|
|
20
20
|
export { n as t };
|
|
21
21
|
|
|
22
|
-
//# sourceMappingURL=useScrollToBlock-
|
|
22
|
+
//# sourceMappingURL=useScrollToBlock-D6gyIzT1.js.map
|
package/dist/cdn/chunks/{useScrollToBlock-BvWAfWd8.js.map → useScrollToBlock-D6gyIzT1.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollToBlock-
|
|
1
|
+
{"version":3,"file":"useScrollToBlock-D6gyIzT1.js","names":[],"sources":["../../../src/composables/useScrollToBlock.ts"],"sourcesContent":["import { nextTick } from \"vue\";\nimport { useEditorRoot } from \"./useEditorRoot\";\n\n/**\n * Returns a function that brings a block into view on the canvas.\n *\n * Selecting a block is not by itself visible: on a long template the selected\n * block can sit far below the fold while the canvas stays exactly where it was,\n * so an insert or a jump reads as \"nothing happened\". This is what makes the\n * outcome visible at the user's position.\n *\n * Queries through `useEditorRoot()` rather than `document` — in the default\n * shadow-DOM mount the blocks live in the shadow tree, where a document-level\n * query matches nothing.\n *\n * Scrolling is deferred one tick so a block inserted in the same call has\n * rendered by the time it is looked up. `block: \"nearest\"` leaves an\n * already-visible block alone instead of yanking it to the top.\n */\nexport function useScrollToBlock(): (blockId: string) => void {\n const root = useEditorRoot();\n\n return (blockId: string) => {\n void nextTick(() => {\n const target = root.querySelector(`[data-block-id=\"${blockId}\"]`);\n if (!target) return;\n target.scrollIntoView({\n block: \"nearest\",\n behavior: prefersReducedMotion() ? \"auto\" : \"smooth\",\n });\n });\n };\n}\n\nfunction prefersReducedMotion(): boolean {\n // Absent in some embedding contexts; a throw here would break the insert\n // that asked for the scroll, so treat \"can't tell\" as motion allowed.\n if (typeof matchMedia !== \"function\") return false;\n return matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n}\n"],"mappings":";;;AAmBA,SAAgB,IAA8C;CAC5D,IAAM,IAAO,EAAc;CAE3B,QAAQ,MAAoB;EAC1B,QAAoB;GAClB,IAAM,IAAS,EAAK,cAAc,mBAAmB,EAAQ,GAAG;GAC3D,KACL,EAAO,eAAe;IACpB,OAAO;IACP,UAAU,EAAqB,IAAI,SAAS;GAC9C,CAAC;EACH,CAAC;CACH;AACF;AAEA,SAAS,IAAgC;CAIvC,OADI,OAAO,cAAe,cACnB,WAAW,kCAAkC,CAAC,CAAC;AACxD"}
|