@notectl/core 1.7.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +56 -31
- package/custom-elements.json +350 -6
- package/dist/chunks/AttrRegistry-Ckj9eCHj.mjs +2 -0
- package/dist/chunks/AttrRegistry-Ckj9eCHj.mjs.map +1 -0
- package/dist/chunks/AttributedMarkCommands-x7h4Xy7V.mjs +2 -0
- package/dist/chunks/AttributedMarkCommands-x7h4Xy7V.mjs.map +1 -0
- package/dist/chunks/BlockInsertion-zPxm6oa_.mjs +2 -0
- package/dist/chunks/BlockInsertion-zPxm6oa_.mjs.map +1 -0
- package/dist/chunks/BlockTypePickerRegistry-DcSE6IXB.mjs +2 -0
- package/dist/chunks/BlockTypePickerRegistry-DcSE6IXB.mjs.map +1 -0
- package/dist/chunks/ColorGrid-CpkbKfXg.mjs +2 -0
- package/dist/chunks/ColorGrid-CpkbKfXg.mjs.map +1 -0
- package/dist/chunks/ColorPickerPopup-CDUvkgcK.mjs +2 -0
- package/dist/chunks/ColorPickerPopup-CDUvkgcK.mjs.map +1 -0
- package/dist/chunks/ColorValidation-DCSKq9B2.mjs +2 -0
- package/dist/chunks/{ColorValidation-CV4f1wu6.mjs.map → ColorValidation-DCSKq9B2.mjs.map} +1 -1
- package/dist/chunks/Commands-DwXBBVGR.mjs +2 -0
- package/dist/chunks/Commands-DwXBBVGR.mjs.map +1 -0
- package/dist/chunks/Decoration-D49mFXrH.mjs +2 -0
- package/dist/chunks/Decoration-D49mFXrH.mjs.map +1 -0
- package/dist/chunks/Document-HC8s50qJ.mjs +2 -0
- package/dist/chunks/Document-HC8s50qJ.mjs.map +1 -0
- package/dist/chunks/DocumentParser-w70-Axud.mjs +2 -0
- package/dist/chunks/DocumentParser-w70-Axud.mjs.map +1 -0
- package/dist/chunks/DomUtils-CznMAZZg.mjs +2 -0
- package/dist/chunks/DomUtils-CznMAZZg.mjs.map +1 -0
- package/dist/chunks/HTMLUtils-Cxy99Ak2.mjs +2 -0
- package/dist/chunks/HTMLUtils-Cxy99Ak2.mjs.map +1 -0
- package/dist/chunks/HeadingPlugin-B-LF-AMM.mjs +2 -0
- package/dist/chunks/HeadingPlugin-B-LF-AMM.mjs.map +1 -0
- package/dist/chunks/KeyboardNav-DsYhKKuV.mjs +2 -0
- package/dist/chunks/KeyboardNav-DsYhKKuV.mjs.map +1 -0
- package/dist/chunks/MarkCommands-CTuVDqnn.mjs +2 -0
- package/dist/chunks/MarkCommands-CTuVDqnn.mjs.map +1 -0
- package/dist/chunks/NavigationQueries-DCOv4Ca5.mjs +2 -0
- package/dist/chunks/NavigationQueries-DCOv4Ca5.mjs.map +1 -0
- package/dist/chunks/NotectlEditor-DBBJkPCW.mjs +3 -0
- package/dist/chunks/NotectlEditor-DBBJkPCW.mjs.map +1 -0
- package/dist/chunks/Platform-CU6itXZo.mjs +2 -0
- package/dist/chunks/Platform-CU6itXZo.mjs.map +1 -0
- package/dist/chunks/PluginHelpers-CdPR0MuT.mjs +2 -0
- package/dist/chunks/PluginHelpers-CdPR0MuT.mjs.map +1 -0
- package/dist/chunks/PopupManager-Du3dYnsJ.mjs +2 -0
- package/dist/chunks/PopupManager-Du3dYnsJ.mjs.map +1 -0
- package/dist/chunks/PopupPositioning-DtvqMSop.mjs +2 -0
- package/dist/chunks/PopupPositioning-DtvqMSop.mjs.map +1 -0
- package/dist/chunks/PrintTypes-DukwDSWS.mjs +2 -0
- package/dist/chunks/PrintTypes-DukwDSWS.mjs.map +1 -0
- package/dist/chunks/RangeIterator-CprUbOWv.mjs +2 -0
- package/dist/chunks/{RangeIterator-Bh4Vl_6D.mjs.map → RangeIterator-CprUbOWv.mjs.map} +1 -1
- package/dist/chunks/Selection-DhbizDM4.mjs +2 -0
- package/dist/chunks/{Selection-BRTab5hO.mjs.map → Selection-DhbizDM4.mjs.map} +1 -1
- package/dist/chunks/SelectionTransactions-DB3YDIEa.mjs +2 -0
- package/dist/chunks/SelectionTransactions-DB3YDIEa.mjs.map +1 -0
- package/dist/chunks/ShortcutFormatting-BLKS0Gys.mjs +2 -0
- package/dist/chunks/ShortcutFormatting-BLKS0Gys.mjs.map +1 -0
- package/dist/chunks/StyleRuntime-BmsLoEa8.mjs +2 -0
- package/dist/chunks/{StyleRuntime-CP4NCwKT.mjs.map → StyleRuntime-BmsLoEa8.mjs.map} +1 -1
- package/dist/chunks/TextDirectionLocale-BraFI9JF.mjs +2 -0
- package/dist/chunks/TextDirectionLocale-BraFI9JF.mjs.map +1 -0
- package/dist/chunks/TypeBrands-Bp_Z_o5Y.mjs +2 -0
- package/dist/chunks/{TypeBrands-C09nE2qO.mjs.map → TypeBrands-Bp_Z_o5Y.mjs.map} +1 -1
- package/dist/chunks/XmlPatterns-DxQXGjP8.mjs +2 -0
- package/dist/chunks/XmlPatterns-DxQXGjP8.mjs.map +1 -0
- package/dist/chunks/ar-B93SPJT7.mjs +2 -0
- package/dist/chunks/ar-B93SPJT7.mjs.map +1 -0
- package/dist/chunks/ar-BAmGa08u.mjs +2 -0
- package/dist/chunks/ar-BAmGa08u.mjs.map +1 -0
- package/dist/chunks/ar-BYNFEVLc.mjs +2 -0
- package/dist/chunks/ar-BYNFEVLc.mjs.map +1 -0
- package/dist/chunks/ar-Bnc7y8BP.mjs +2 -0
- package/dist/chunks/ar-Bnc7y8BP.mjs.map +1 -0
- package/dist/chunks/ar-Bp3rDZky.mjs +2 -0
- package/dist/chunks/ar-Bp3rDZky.mjs.map +1 -0
- package/dist/chunks/ar-BtOQ7lro.mjs +2 -0
- package/dist/chunks/ar-BtOQ7lro.mjs.map +1 -0
- package/dist/chunks/ar-C5JEHhw9.mjs +2 -0
- package/dist/chunks/ar-C5JEHhw9.mjs.map +1 -0
- package/dist/chunks/ar-CL3QL0tw.mjs +2 -0
- package/dist/chunks/ar-CL3QL0tw.mjs.map +1 -0
- package/dist/chunks/ar-CYtG-XlN.mjs +2 -0
- package/dist/chunks/ar-CYtG-XlN.mjs.map +1 -0
- package/dist/chunks/ar-CzVj8p__.mjs +2 -0
- package/dist/chunks/ar-CzVj8p__.mjs.map +1 -0
- package/dist/chunks/ar-D7PS3e2g.mjs +2 -0
- package/dist/chunks/ar-D7PS3e2g.mjs.map +1 -0
- package/dist/chunks/ar-D8adM2Uy.mjs +2 -0
- package/dist/chunks/ar-D8adM2Uy.mjs.map +1 -0
- package/dist/chunks/ar-D9jyShaB.mjs +2 -0
- package/dist/chunks/ar-D9jyShaB.mjs.map +1 -0
- package/dist/chunks/ar-DR6OA3ZO.mjs +2 -0
- package/dist/chunks/ar-DR6OA3ZO.mjs.map +1 -0
- package/dist/chunks/ar-Deibepjm.mjs +2 -0
- package/dist/chunks/ar-Deibepjm.mjs.map +1 -0
- package/dist/chunks/ar-Dlb5riUN.mjs +2 -0
- package/dist/chunks/ar-Dlb5riUN.mjs.map +1 -0
- package/dist/chunks/ar-DmmxE2W7.mjs +2 -0
- package/dist/chunks/ar-DmmxE2W7.mjs.map +1 -0
- package/dist/chunks/ar-Ds6Z2Gzf.mjs +2 -0
- package/dist/chunks/ar-Ds6Z2Gzf.mjs.map +1 -0
- package/dist/chunks/ar-DtIHQ8nU.mjs +2 -0
- package/dist/chunks/ar-DtIHQ8nU.mjs.map +1 -0
- package/dist/chunks/ar-J8B-on-0.mjs +2 -0
- package/dist/chunks/ar-J8B-on-0.mjs.map +1 -0
- package/dist/chunks/ar-b6VdnxAs.mjs +2 -0
- package/dist/chunks/ar-b6VdnxAs.mjs.map +1 -0
- package/dist/chunks/ar-iU02mRe5.mjs +2 -0
- package/dist/chunks/ar-iU02mRe5.mjs.map +1 -0
- package/dist/chunks/ar-mSCYQYnL.mjs +2 -0
- package/dist/chunks/ar-mSCYQYnL.mjs.map +1 -0
- package/dist/chunks/color-picker-Byjl_xr9.mjs +2 -0
- package/dist/chunks/color-picker-Byjl_xr9.mjs.map +1 -0
- package/dist/chunks/de-8aCC5jBM.mjs +2 -0
- package/dist/chunks/de-8aCC5jBM.mjs.map +1 -0
- package/dist/chunks/de-B4y4ndUw.mjs +2 -0
- package/dist/chunks/de-B4y4ndUw.mjs.map +1 -0
- package/dist/chunks/de-B5fcZ0FQ.mjs +2 -0
- package/dist/chunks/de-B5fcZ0FQ.mjs.map +1 -0
- package/dist/chunks/de-BT9VmwoJ.mjs +2 -0
- package/dist/chunks/de-BT9VmwoJ.mjs.map +1 -0
- package/dist/chunks/de-BZWSyJTG.mjs +2 -0
- package/dist/chunks/de-BZWSyJTG.mjs.map +1 -0
- package/dist/chunks/de-CFD_Wgik.mjs +2 -0
- package/dist/chunks/de-CFD_Wgik.mjs.map +1 -0
- package/dist/chunks/de-CLYtb6kD.mjs +2 -0
- package/dist/chunks/de-CLYtb6kD.mjs.map +1 -0
- package/dist/chunks/de-CP5v-98M.mjs +2 -0
- package/dist/chunks/de-CP5v-98M.mjs.map +1 -0
- package/dist/chunks/de-CYJ6uWno.mjs +2 -0
- package/dist/chunks/de-CYJ6uWno.mjs.map +1 -0
- package/dist/chunks/de-ChcKkF7A.mjs +2 -0
- package/dist/chunks/de-ChcKkF7A.mjs.map +1 -0
- package/dist/chunks/de-CicoU066.mjs +2 -0
- package/dist/chunks/de-CicoU066.mjs.map +1 -0
- package/dist/chunks/de-CjLAdBt2.mjs +2 -0
- package/dist/chunks/de-CjLAdBt2.mjs.map +1 -0
- package/dist/chunks/de-CtFvAXwF.mjs +2 -0
- package/dist/chunks/de-CtFvAXwF.mjs.map +1 -0
- package/dist/chunks/de-D1OAXtxJ.mjs +2 -0
- package/dist/chunks/de-D1OAXtxJ.mjs.map +1 -0
- package/dist/chunks/de-DBbzCQrm.mjs +2 -0
- package/dist/chunks/de-DBbzCQrm.mjs.map +1 -0
- package/dist/chunks/de-DOLwx_M7.mjs +2 -0
- package/dist/chunks/de-DOLwx_M7.mjs.map +1 -0
- package/dist/chunks/de-De2miMxo.mjs +2 -0
- package/dist/chunks/de-De2miMxo.mjs.map +1 -0
- package/dist/chunks/de-OTfhhinm.mjs +2 -0
- package/dist/chunks/de-OTfhhinm.mjs.map +1 -0
- package/dist/chunks/de-PZ9-LlBp.mjs +2 -0
- package/dist/chunks/de-PZ9-LlBp.mjs.map +1 -0
- package/dist/chunks/de-UREymH-5.mjs +2 -0
- package/dist/chunks/de-UREymH-5.mjs.map +1 -0
- package/dist/chunks/de-chYdoK9q.mjs +2 -0
- package/dist/chunks/de-chYdoK9q.mjs.map +1 -0
- package/dist/chunks/de-fXvs5vQT.mjs +2 -0
- package/dist/chunks/de-fXvs5vQT.mjs.map +1 -0
- package/dist/chunks/de-xJh5C_pk.mjs +2 -0
- package/dist/chunks/de-xJh5C_pk.mjs.map +1 -0
- package/dist/chunks/es-B9UhsaEI.mjs +2 -0
- package/dist/chunks/es-B9UhsaEI.mjs.map +1 -0
- package/dist/chunks/es-BHGwPgrP.mjs +2 -0
- package/dist/chunks/es-BHGwPgrP.mjs.map +1 -0
- package/dist/chunks/es-BTqy_aQ4.mjs +2 -0
- package/dist/chunks/es-BTqy_aQ4.mjs.map +1 -0
- package/dist/chunks/es-BbGOZGS_.mjs +2 -0
- package/dist/chunks/es-BbGOZGS_.mjs.map +1 -0
- package/dist/chunks/es-BjPsub0k.mjs +2 -0
- package/dist/chunks/es-BjPsub0k.mjs.map +1 -0
- package/dist/chunks/es-Bk0bRDFE.mjs +2 -0
- package/dist/chunks/es-Bk0bRDFE.mjs.map +1 -0
- package/dist/chunks/es-BkS6DsrM.mjs +2 -0
- package/dist/chunks/es-BkS6DsrM.mjs.map +1 -0
- package/dist/chunks/es-BzEpr4Bk.mjs +2 -0
- package/dist/chunks/es-BzEpr4Bk.mjs.map +1 -0
- package/dist/chunks/es-C2lnWyA0.mjs +2 -0
- package/dist/chunks/es-C2lnWyA0.mjs.map +1 -0
- package/dist/chunks/es-C7e35Muh.mjs +2 -0
- package/dist/chunks/es-C7e35Muh.mjs.map +1 -0
- package/dist/chunks/es-CBk43isB.mjs +2 -0
- package/dist/chunks/es-CBk43isB.mjs.map +1 -0
- package/dist/chunks/es-CE8t9fuM.mjs +2 -0
- package/dist/chunks/es-CE8t9fuM.mjs.map +1 -0
- package/dist/chunks/es-CFjzqIbS.mjs +2 -0
- package/dist/chunks/es-CFjzqIbS.mjs.map +1 -0
- package/dist/chunks/es-Ce-AEYxc.mjs +2 -0
- package/dist/chunks/es-Ce-AEYxc.mjs.map +1 -0
- package/dist/chunks/es-Co4AJr8Y.mjs +2 -0
- package/dist/chunks/es-Co4AJr8Y.mjs.map +1 -0
- package/dist/chunks/es-Cu5_OA4X.mjs +2 -0
- package/dist/chunks/es-Cu5_OA4X.mjs.map +1 -0
- package/dist/chunks/es-Cud6JXHf.mjs +2 -0
- package/dist/chunks/es-Cud6JXHf.mjs.map +1 -0
- package/dist/chunks/es-D-II7LZC.mjs +2 -0
- package/dist/chunks/es-D-II7LZC.mjs.map +1 -0
- package/dist/chunks/es-DBBSeOaD.mjs +2 -0
- package/dist/chunks/es-DBBSeOaD.mjs.map +1 -0
- package/dist/chunks/es-DCwjeUUu.mjs +2 -0
- package/dist/chunks/es-DCwjeUUu.mjs.map +1 -0
- package/dist/chunks/es-DvgH3-WZ.mjs +2 -0
- package/dist/chunks/es-DvgH3-WZ.mjs.map +1 -0
- package/dist/chunks/es-MgguVgIs.mjs +2 -0
- package/dist/chunks/es-MgguVgIs.mjs.map +1 -0
- package/dist/chunks/es-yXjjcxgb.mjs +2 -0
- package/dist/chunks/es-yXjjcxgb.mjs.map +1 -0
- package/dist/chunks/fr-B-_yKIAY.mjs +2 -0
- package/dist/chunks/fr-B-_yKIAY.mjs.map +1 -0
- package/dist/chunks/fr-BGyF2ym0.mjs +2 -0
- package/dist/chunks/fr-BGyF2ym0.mjs.map +1 -0
- package/dist/chunks/fr-BoRJ3B2-.mjs +2 -0
- package/dist/chunks/fr-BoRJ3B2-.mjs.map +1 -0
- package/dist/chunks/fr-BrKk4SPg.mjs +2 -0
- package/dist/chunks/fr-BrKk4SPg.mjs.map +1 -0
- package/dist/chunks/fr-C-y09LKg.mjs +2 -0
- package/dist/chunks/fr-C-y09LKg.mjs.map +1 -0
- package/dist/chunks/fr-C1W7jyd6.mjs +2 -0
- package/dist/chunks/fr-C1W7jyd6.mjs.map +1 -0
- package/dist/chunks/fr-C8CtmWBj.mjs +2 -0
- package/dist/chunks/fr-C8CtmWBj.mjs.map +1 -0
- package/dist/chunks/fr-C9oiPW0k.mjs +2 -0
- package/dist/chunks/fr-C9oiPW0k.mjs.map +1 -0
- package/dist/chunks/fr-CEkk4UyZ.mjs +2 -0
- package/dist/chunks/fr-CEkk4UyZ.mjs.map +1 -0
- package/dist/chunks/fr-Ccaetiwi.mjs +2 -0
- package/dist/chunks/fr-Ccaetiwi.mjs.map +1 -0
- package/dist/chunks/fr-Ccku5KzA.mjs +2 -0
- package/dist/chunks/fr-Ccku5KzA.mjs.map +1 -0
- package/dist/chunks/fr-CfUg1FxU.mjs +2 -0
- package/dist/chunks/fr-CfUg1FxU.mjs.map +1 -0
- package/dist/chunks/fr-DDkBcjmO.mjs +2 -0
- package/dist/chunks/fr-DDkBcjmO.mjs.map +1 -0
- package/dist/chunks/fr-DNwLChcm.mjs +2 -0
- package/dist/chunks/fr-DNwLChcm.mjs.map +1 -0
- package/dist/chunks/fr-DvneSjCf.mjs +2 -0
- package/dist/chunks/fr-DvneSjCf.mjs.map +1 -0
- package/dist/chunks/fr-Dx4Qqimj.mjs +2 -0
- package/dist/chunks/fr-Dx4Qqimj.mjs.map +1 -0
- package/dist/chunks/fr-RHXmueoO.mjs +2 -0
- package/dist/chunks/fr-RHXmueoO.mjs.map +1 -0
- package/dist/chunks/fr-VdiCNF4J.mjs +2 -0
- package/dist/chunks/fr-VdiCNF4J.mjs.map +1 -0
- package/dist/chunks/fr-Wiobfk5s.mjs +2 -0
- package/dist/chunks/fr-Wiobfk5s.mjs.map +1 -0
- package/dist/chunks/fr-YMiDtWuG.mjs +2 -0
- package/dist/chunks/fr-YMiDtWuG.mjs.map +1 -0
- package/dist/chunks/fr-_Oxf0k66.mjs +2 -0
- package/dist/chunks/fr-_Oxf0k66.mjs.map +1 -0
- package/dist/chunks/fr-gurfH-7T.mjs +2 -0
- package/dist/chunks/fr-gurfH-7T.mjs.map +1 -0
- package/dist/chunks/fr-zP7EjxDL.mjs +2 -0
- package/dist/chunks/fr-zP7EjxDL.mjs.map +1 -0
- package/dist/chunks/hi-B2W8pFqK.mjs +2 -0
- package/dist/chunks/hi-B2W8pFqK.mjs.map +1 -0
- package/dist/chunks/hi-B2m69ZCq.mjs +2 -0
- package/dist/chunks/hi-B2m69ZCq.mjs.map +1 -0
- package/dist/chunks/hi-BMIt3y_-.mjs +2 -0
- package/dist/chunks/hi-BMIt3y_-.mjs.map +1 -0
- package/dist/chunks/hi-BdtVhAzs.mjs +2 -0
- package/dist/chunks/hi-BdtVhAzs.mjs.map +1 -0
- package/dist/chunks/hi-BmkfaZpg.mjs +2 -0
- package/dist/chunks/hi-BmkfaZpg.mjs.map +1 -0
- package/dist/chunks/hi-C-l_R2SO.mjs +2 -0
- package/dist/chunks/hi-C-l_R2SO.mjs.map +1 -0
- package/dist/chunks/hi-C1LhM-oY.mjs +2 -0
- package/dist/chunks/hi-C1LhM-oY.mjs.map +1 -0
- package/dist/chunks/hi-CGEbGI1l.mjs +2 -0
- package/dist/chunks/hi-CGEbGI1l.mjs.map +1 -0
- package/dist/chunks/hi-CPuhj7IA.mjs +2 -0
- package/dist/chunks/hi-CPuhj7IA.mjs.map +1 -0
- package/dist/chunks/hi-CT5WERqi.mjs +2 -0
- package/dist/chunks/hi-CT5WERqi.mjs.map +1 -0
- package/dist/chunks/hi-CbLPPQ0b.mjs +2 -0
- package/dist/chunks/hi-CbLPPQ0b.mjs.map +1 -0
- package/dist/chunks/hi-ClvEtEKe.mjs +2 -0
- package/dist/chunks/hi-ClvEtEKe.mjs.map +1 -0
- package/dist/chunks/hi-CpBWHmYH.mjs +2 -0
- package/dist/chunks/hi-CpBWHmYH.mjs.map +1 -0
- package/dist/chunks/hi-DAfl8nU_.mjs +2 -0
- package/dist/chunks/hi-DAfl8nU_.mjs.map +1 -0
- package/dist/chunks/hi-DVof3w0y.mjs +2 -0
- package/dist/chunks/hi-DVof3w0y.mjs.map +1 -0
- package/dist/chunks/hi-DtlvSQkD.mjs +2 -0
- package/dist/chunks/hi-DtlvSQkD.mjs.map +1 -0
- package/dist/chunks/hi-FH3CAJuR.mjs +2 -0
- package/dist/chunks/hi-FH3CAJuR.mjs.map +1 -0
- package/dist/chunks/hi-Ga9h9a_1.mjs +2 -0
- package/dist/chunks/hi-Ga9h9a_1.mjs.map +1 -0
- package/dist/chunks/hi-Zc17M1T-.mjs +2 -0
- package/dist/chunks/hi-Zc17M1T-.mjs.map +1 -0
- package/dist/chunks/hi-g7i0bmig.mjs +2 -0
- package/dist/chunks/hi-g7i0bmig.mjs.map +1 -0
- package/dist/chunks/hi-js2P6byR.mjs +2 -0
- package/dist/chunks/hi-js2P6byR.mjs.map +1 -0
- package/dist/chunks/hi-ntUsOspQ.mjs +2 -0
- package/dist/chunks/hi-ntUsOspQ.mjs.map +1 -0
- package/dist/chunks/hi-yxAcR3w6.mjs +2 -0
- package/dist/chunks/hi-yxAcR3w6.mjs.map +1 -0
- package/dist/chunks/index-CVwf0cdH.mjs +2 -0
- package/dist/chunks/index-CVwf0cdH.mjs.map +1 -0
- package/dist/chunks/index-D3BZFsAD.mjs +2 -0
- package/dist/chunks/index-D3BZFsAD.mjs.map +1 -0
- package/dist/chunks/pt--IiroJQw.mjs +2 -0
- package/dist/chunks/pt--IiroJQw.mjs.map +1 -0
- package/dist/chunks/pt-BF72W8M5.mjs +2 -0
- package/dist/chunks/pt-BF72W8M5.mjs.map +1 -0
- package/dist/chunks/pt-BX_t4luI.mjs +2 -0
- package/dist/chunks/pt-BX_t4luI.mjs.map +1 -0
- package/dist/chunks/pt-B_XJ2s9X.mjs +2 -0
- package/dist/chunks/pt-B_XJ2s9X.mjs.map +1 -0
- package/dist/chunks/pt-C-Vp7Rxj.mjs +2 -0
- package/dist/chunks/pt-C-Vp7Rxj.mjs.map +1 -0
- package/dist/chunks/pt-CD2aCZXf.mjs +2 -0
- package/dist/chunks/pt-CD2aCZXf.mjs.map +1 -0
- package/dist/chunks/pt-CFjzqIbS.mjs +2 -0
- package/dist/chunks/pt-CFjzqIbS.mjs.map +1 -0
- package/dist/chunks/pt-CHjmBegF.mjs +2 -0
- package/dist/chunks/pt-CHjmBegF.mjs.map +1 -0
- package/dist/chunks/pt-CQRzEocL.mjs +2 -0
- package/dist/chunks/pt-CQRzEocL.mjs.map +1 -0
- package/dist/chunks/pt-Cem2WxUk.mjs +2 -0
- package/dist/chunks/pt-Cem2WxUk.mjs.map +1 -0
- package/dist/chunks/pt-D6kdF3fH.mjs +2 -0
- package/dist/chunks/pt-D6kdF3fH.mjs.map +1 -0
- package/dist/chunks/pt-DJfJVeY8.mjs +2 -0
- package/dist/chunks/pt-DJfJVeY8.mjs.map +1 -0
- package/dist/chunks/pt-DfB-IaYi.mjs +2 -0
- package/dist/chunks/pt-DfB-IaYi.mjs.map +1 -0
- package/dist/chunks/pt-DlNdH9pu.mjs +2 -0
- package/dist/chunks/pt-DlNdH9pu.mjs.map +1 -0
- package/dist/chunks/pt-DrJ0-8Yo.mjs +2 -0
- package/dist/chunks/pt-DrJ0-8Yo.mjs.map +1 -0
- package/dist/chunks/pt-DsBJpgpe.mjs +2 -0
- package/dist/chunks/pt-DsBJpgpe.mjs.map +1 -0
- package/dist/chunks/pt-DwdSYJzC.mjs +2 -0
- package/dist/chunks/pt-DwdSYJzC.mjs.map +1 -0
- package/dist/chunks/pt-Dx9UkZ3j.mjs +2 -0
- package/dist/chunks/pt-Dx9UkZ3j.mjs.map +1 -0
- package/dist/chunks/pt-K0BUlM9X.mjs +2 -0
- package/dist/chunks/pt-K0BUlM9X.mjs.map +1 -0
- package/dist/chunks/pt-TuA3_GDM.mjs +2 -0
- package/dist/chunks/pt-TuA3_GDM.mjs.map +1 -0
- package/dist/chunks/pt-cN6r-f7f.mjs +2 -0
- package/dist/chunks/pt-cN6r-f7f.mjs.map +1 -0
- package/dist/chunks/pt-uNGpVM3D.mjs +2 -0
- package/dist/chunks/pt-uNGpVM3D.mjs.map +1 -0
- package/dist/chunks/pt-v1E9u-Jx.mjs +2 -0
- package/dist/chunks/pt-v1E9u-Jx.mjs.map +1 -0
- package/dist/chunks/ru-0h51zrqE.mjs +2 -0
- package/dist/chunks/ru-0h51zrqE.mjs.map +1 -0
- package/dist/chunks/ru-4S8w6UN_.mjs +2 -0
- package/dist/chunks/ru-4S8w6UN_.mjs.map +1 -0
- package/dist/chunks/ru-B0cRw90L.mjs +2 -0
- package/dist/chunks/ru-B0cRw90L.mjs.map +1 -0
- package/dist/chunks/ru-B3O7WXNM.mjs +2 -0
- package/dist/chunks/ru-B3O7WXNM.mjs.map +1 -0
- package/dist/chunks/ru-B6zVAzvI.mjs +2 -0
- package/dist/chunks/ru-B6zVAzvI.mjs.map +1 -0
- package/dist/chunks/ru-B8teJin_.mjs +2 -0
- package/dist/chunks/ru-B8teJin_.mjs.map +1 -0
- package/dist/chunks/ru-BCriPw-8.mjs +2 -0
- package/dist/chunks/ru-BCriPw-8.mjs.map +1 -0
- package/dist/chunks/ru-BNOU16E5.mjs +2 -0
- package/dist/chunks/ru-BNOU16E5.mjs.map +1 -0
- package/dist/chunks/ru-BO6BIS5W.mjs +2 -0
- package/dist/chunks/ru-BO6BIS5W.mjs.map +1 -0
- package/dist/chunks/ru-Bdy1lLuc.mjs +2 -0
- package/dist/chunks/ru-Bdy1lLuc.mjs.map +1 -0
- package/dist/chunks/ru-BgBctNVm.mjs +2 -0
- package/dist/chunks/ru-BgBctNVm.mjs.map +1 -0
- package/dist/chunks/ru-CNLx7T3O.mjs +2 -0
- package/dist/chunks/ru-CNLx7T3O.mjs.map +1 -0
- package/dist/chunks/ru-CVSCT776.mjs +2 -0
- package/dist/chunks/ru-CVSCT776.mjs.map +1 -0
- package/dist/chunks/ru-CZvkdGnf.mjs +2 -0
- package/dist/chunks/ru-CZvkdGnf.mjs.map +1 -0
- package/dist/chunks/ru-CegMPuML.mjs +2 -0
- package/dist/chunks/ru-CegMPuML.mjs.map +1 -0
- package/dist/chunks/ru-CiLrD2Nz.mjs +2 -0
- package/dist/chunks/ru-CiLrD2Nz.mjs.map +1 -0
- package/dist/chunks/ru-ClEM6OKY.mjs +2 -0
- package/dist/chunks/ru-ClEM6OKY.mjs.map +1 -0
- package/dist/chunks/ru-CrbxCeQf.mjs +2 -0
- package/dist/chunks/ru-CrbxCeQf.mjs.map +1 -0
- package/dist/chunks/ru-D3j2x2xu.mjs +2 -0
- package/dist/chunks/ru-D3j2x2xu.mjs.map +1 -0
- package/dist/chunks/ru-DdHqb4Mh.mjs +2 -0
- package/dist/chunks/ru-DdHqb4Mh.mjs.map +1 -0
- package/dist/chunks/ru-DjgNdOdJ.mjs +2 -0
- package/dist/chunks/ru-DjgNdOdJ.mjs.map +1 -0
- package/dist/chunks/ru-Tzd5N37W.mjs +2 -0
- package/dist/chunks/ru-Tzd5N37W.mjs.map +1 -0
- package/dist/chunks/ru-XKNCzkR2.mjs +2 -0
- package/dist/chunks/ru-XKNCzkR2.mjs.map +1 -0
- package/dist/chunks/zh--oNSMazK.mjs +2 -0
- package/dist/chunks/zh--oNSMazK.mjs.map +1 -0
- package/dist/chunks/zh-BfeWdPIz.mjs +2 -0
- package/dist/chunks/zh-BfeWdPIz.mjs.map +1 -0
- package/dist/chunks/zh-BnOxGKxF.mjs +2 -0
- package/dist/chunks/zh-BnOxGKxF.mjs.map +1 -0
- package/dist/chunks/zh-BqMtE-jN.mjs +2 -0
- package/dist/chunks/zh-BqMtE-jN.mjs.map +1 -0
- package/dist/chunks/zh-C3aI7A2o.mjs +2 -0
- package/dist/chunks/zh-C3aI7A2o.mjs.map +1 -0
- package/dist/chunks/zh-C6YALJZt.mjs +2 -0
- package/dist/chunks/zh-C6YALJZt.mjs.map +1 -0
- package/dist/chunks/zh-CWdTbUOP.mjs +2 -0
- package/dist/chunks/zh-CWdTbUOP.mjs.map +1 -0
- package/dist/chunks/zh-CY01pMD4.mjs +2 -0
- package/dist/chunks/zh-CY01pMD4.mjs.map +1 -0
- package/dist/chunks/zh-Cmt7n9FY.mjs +2 -0
- package/dist/chunks/zh-Cmt7n9FY.mjs.map +1 -0
- package/dist/chunks/zh-CpP2kee3.mjs +2 -0
- package/dist/chunks/zh-CpP2kee3.mjs.map +1 -0
- package/dist/chunks/zh-Cpbg4evx.mjs +2 -0
- package/dist/chunks/zh-Cpbg4evx.mjs.map +1 -0
- package/dist/chunks/zh-Cqb55JWa.mjs +2 -0
- package/dist/chunks/zh-Cqb55JWa.mjs.map +1 -0
- package/dist/chunks/zh-DCQZ6gss.mjs +2 -0
- package/dist/chunks/zh-DCQZ6gss.mjs.map +1 -0
- package/dist/chunks/zh-DG2CNTUU.mjs +2 -0
- package/dist/chunks/zh-DG2CNTUU.mjs.map +1 -0
- package/dist/chunks/zh-DTiTJbzz.mjs +2 -0
- package/dist/chunks/zh-DTiTJbzz.mjs.map +1 -0
- package/dist/chunks/zh-Da1z6qbB.mjs +2 -0
- package/dist/chunks/zh-Da1z6qbB.mjs.map +1 -0
- package/dist/chunks/zh-Di3WqY4_.mjs +2 -0
- package/dist/chunks/zh-Di3WqY4_.mjs.map +1 -0
- package/dist/chunks/zh-DlBt06Pr.mjs +2 -0
- package/dist/chunks/zh-DlBt06Pr.mjs.map +1 -0
- package/dist/chunks/zh-Dt-wVrNr.mjs +2 -0
- package/dist/chunks/zh-Dt-wVrNr.mjs.map +1 -0
- package/dist/chunks/zh-ND6vW2M-.mjs +2 -0
- package/dist/chunks/zh-ND6vW2M-.mjs.map +1 -0
- package/dist/chunks/zh-Yd3GNsa0.mjs +2 -0
- package/dist/chunks/zh-Yd3GNsa0.mjs.map +1 -0
- package/dist/chunks/zh-lhynyH6Q.mjs +2 -0
- package/dist/chunks/zh-lhynyH6Q.mjs.map +1 -0
- package/dist/chunks/zh-v9NmlEIN.mjs +2 -0
- package/dist/chunks/zh-v9NmlEIN.mjs.map +1 -0
- package/dist/commands/BlockInsertion.d.ts +64 -0
- package/dist/commands/BlockInsertion.d.ts.map +1 -0
- package/dist/commands/CommandHelpers.d.ts +4 -0
- package/dist/commands/CommandHelpers.d.ts.map +1 -1
- package/dist/commands/Commands.d.ts +9 -3
- package/dist/commands/Commands.d.ts.map +1 -1
- package/dist/commands/GapCursorCommands.d.ts.map +1 -1
- package/dist/commands/MovementCommands.d.ts +1 -4
- package/dist/commands/MovementCommands.d.ts.map +1 -1
- package/dist/commands/NodeSelectionCommands.d.ts +3 -1
- package/dist/commands/NodeSelectionCommands.d.ts.map +1 -1
- package/dist/commands/PasteCommand.d.ts.map +1 -1
- package/dist/commands/WordBoundary.d.ts +4 -9
- package/dist/commands/WordBoundary.d.ts.map +1 -1
- package/dist/editor/Announcer.d.ts +1 -2
- package/dist/editor/Announcer.d.ts.map +1 -1
- package/dist/{model → editor}/BuiltinSpecs.d.ts +1 -1
- package/dist/editor/BuiltinSpecs.d.ts.map +1 -0
- package/dist/editor/ContentSerializer.d.ts +24 -0
- package/dist/editor/ContentSerializer.d.ts.map +1 -0
- package/dist/editor/EditorConfigController.d.ts +38 -0
- package/dist/editor/EditorConfigController.d.ts.map +1 -0
- package/dist/editor/EditorDOM.d.ts +3 -4
- package/dist/editor/EditorDOM.d.ts.map +1 -1
- package/dist/editor/EditorEventEmitter.d.ts +30 -0
- package/dist/editor/EditorEventEmitter.d.ts.map +1 -0
- package/dist/editor/EditorLifecycleCoordinator.d.ts +24 -0
- package/dist/editor/EditorLifecycleCoordinator.d.ts.map +1 -0
- package/dist/editor/EditorLocale.d.ts +9 -0
- package/dist/editor/EditorLocale.d.ts.map +1 -0
- package/dist/editor/EditorStyleCoordinator.d.ts +9 -0
- package/dist/editor/EditorStyleCoordinator.d.ts.map +1 -0
- package/dist/editor/EditorThemeController.d.ts.map +1 -1
- package/dist/editor/NotectlEditor.d.ts +20 -54
- package/dist/editor/NotectlEditor.d.ts.map +1 -1
- package/dist/editor/PaperLayoutController.d.ts +1 -1
- package/dist/editor/PaperLayoutController.d.ts.map +1 -1
- package/dist/editor/PluginBootstrapper.d.ts +18 -0
- package/dist/editor/PluginBootstrapper.d.ts.map +1 -0
- package/dist/editor/locales/ar.d.ts +4 -0
- package/dist/editor/locales/ar.d.ts.map +1 -0
- package/dist/editor/locales/de.d.ts +4 -0
- package/dist/editor/locales/de.d.ts.map +1 -0
- package/dist/editor/locales/es.d.ts +4 -0
- package/dist/editor/locales/es.d.ts.map +1 -0
- package/dist/editor/locales/fr.d.ts +4 -0
- package/dist/editor/locales/fr.d.ts.map +1 -0
- package/dist/editor/locales/hi.d.ts +4 -0
- package/dist/editor/locales/hi.d.ts.map +1 -0
- package/dist/editor/locales/pt.d.ts +4 -0
- package/dist/editor/locales/pt.d.ts.map +1 -0
- package/dist/editor/locales/ru.d.ts +4 -0
- package/dist/editor/locales/ru.d.ts.map +1 -0
- package/dist/editor/locales/zh.d.ts +4 -0
- package/dist/editor/locales/zh.d.ts.map +1 -0
- package/dist/editor/styles/base.d.ts +1 -1
- package/dist/editor/styles/base.d.ts.map +1 -1
- package/dist/editor/styles/code-block.d.ts +1 -1
- package/dist/editor/styles/code-block.d.ts.map +1 -1
- package/dist/editor/styles/font-select.d.ts +1 -1
- package/dist/editor/styles/font-select.d.ts.map +1 -1
- package/dist/editor/styles/font-size-select.d.ts +1 -1
- package/dist/editor/styles/font-size-select.d.ts.map +1 -1
- package/dist/editor/styles/heading-select.d.ts +1 -1
- package/dist/editor/styles/heading-select.d.ts.map +1 -1
- package/dist/editor/styles/image.d.ts +1 -1
- package/dist/editor/styles/image.d.ts.map +1 -1
- package/dist/editor/styles/list.d.ts +1 -1
- package/dist/editor/styles/list.d.ts.map +1 -1
- package/dist/editor/styles/table.d.ts +1 -1
- package/dist/editor/styles/table.d.ts.map +1 -1
- package/dist/editor/styles/toolbar.d.ts +1 -1
- package/dist/editor/styles/toolbar.d.ts.map +1 -1
- package/dist/editor/theme/ThemeEngine.d.ts.map +1 -1
- package/dist/editor/theme/ThemeTokens.d.ts +17 -1
- package/dist/editor/theme/ThemeTokens.d.ts.map +1 -1
- package/dist/fonts.mjs +1 -6
- package/dist/fonts.mjs.map +1 -1
- package/dist/full.d.ts +46 -0
- package/dist/full.d.ts.map +1 -0
- package/dist/full.mjs +2 -0
- package/dist/full.mjs.map +1 -0
- package/dist/html.d.ts +16 -0
- package/dist/html.d.ts.map +1 -0
- package/dist/html.mjs +2 -0
- package/dist/html.mjs.map +1 -0
- package/dist/i18n/Locale.d.ts +1 -0
- package/dist/i18n/Locale.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +0 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/index.d.ts +30 -94
- package/dist/index.d.ts.map +1 -1
- package/dist/input/ClipboardHandler.d.ts +22 -0
- package/dist/input/ClipboardHandler.d.ts.map +1 -1
- package/dist/input/CompositionTracker.d.ts +2 -1
- package/dist/input/CompositionTracker.d.ts.map +1 -1
- package/dist/{model → input}/HTMLParser.d.ts +3 -3
- package/dist/input/HTMLParser.d.ts.map +1 -0
- package/dist/input/InputHandler.d.ts +1 -1
- package/dist/input/InputHandler.d.ts.map +1 -1
- package/dist/input/InputManager.d.ts +37 -0
- package/dist/input/InputManager.d.ts.map +1 -0
- package/dist/input/InternalClipboard.d.ts +3 -13
- package/dist/input/InternalClipboard.d.ts.map +1 -1
- package/dist/input/KeyboardHandler.d.ts +12 -1
- package/dist/input/KeyboardHandler.d.ts.map +1 -1
- package/dist/input/PasteHandler.d.ts +28 -17
- package/dist/input/PasteHandler.d.ts.map +1 -1
- package/dist/model/AttrRegistry.d.ts +1 -1
- package/dist/model/AttrRegistry.d.ts.map +1 -1
- package/dist/model/BlockAlignment.d.ts +8 -0
- package/dist/model/BlockAlignment.d.ts.map +1 -0
- package/dist/model/BlockTypeLabels.d.ts +7 -0
- package/dist/model/BlockTypeLabels.d.ts.map +1 -0
- package/dist/model/CompositionState.d.ts +8 -0
- package/dist/model/CompositionState.d.ts.map +1 -0
- package/dist/model/Document.d.ts.map +1 -1
- package/dist/{input → model}/FileHandlerRegistry.d.ts +1 -1
- package/dist/{input → model}/FileHandlerRegistry.d.ts.map +1 -1
- package/dist/model/HTMLUtils.d.ts +8 -0
- package/dist/model/HTMLUtils.d.ts.map +1 -1
- package/dist/{input → model}/InputRule.d.ts.map +1 -1
- package/dist/{input → model}/InputRuleRegistry.d.ts.map +1 -1
- package/dist/{input → model}/Keymap.d.ts.map +1 -1
- package/dist/{input → model}/KeymapRegistry.d.ts.map +1 -1
- package/dist/model/MarkSpec.d.ts +2 -2
- package/dist/model/MarkSpec.d.ts.map +1 -1
- package/dist/model/NodeSpec.d.ts +0 -3
- package/dist/model/NodeSpec.d.ts.map +1 -1
- package/dist/model/PaperSize.d.ts.map +1 -0
- package/dist/model/PasteInterceptor.d.ts +21 -0
- package/dist/model/PasteInterceptor.d.ts.map +1 -0
- package/dist/model/RichBlockData.d.ts +24 -0
- package/dist/model/RichBlockData.d.ts.map +1 -0
- package/dist/model/SchemaRegistry.d.ts +2 -0
- package/dist/model/SchemaRegistry.d.ts.map +1 -1
- package/dist/model/WordBoundary.d.ts +12 -0
- package/dist/model/WordBoundary.d.ts.map +1 -0
- package/dist/notectl-core.mjs +1 -3888
- package/dist/notectl-core.mjs.map +1 -1
- package/dist/notectl-core.umd.js +1 -9523
- package/dist/notectl-core.umd.js.map +1 -1
- package/dist/{view → platform}/Platform.d.ts +2 -0
- package/dist/platform/Platform.d.ts.map +1 -0
- package/dist/plugins/Plugin.d.ts +8 -5
- package/dist/plugins/Plugin.d.ts.map +1 -1
- package/dist/plugins/PluginManager.d.ts +10 -3
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/alignment/AlignmentLocale.d.ts +3 -10
- package/dist/plugins/alignment/AlignmentLocale.d.ts.map +1 -1
- package/dist/plugins/alignment/AlignmentPlugin.d.ts +3 -13
- package/dist/plugins/alignment/AlignmentPlugin.d.ts.map +1 -1
- package/dist/plugins/alignment/index.d.ts +3 -1
- package/dist/plugins/alignment/index.d.ts.map +1 -1
- package/dist/plugins/alignment/locales/ar.d.ts +4 -0
- package/dist/plugins/alignment/locales/ar.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/de.d.ts +4 -0
- package/dist/plugins/alignment/locales/de.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/es.d.ts +4 -0
- package/dist/plugins/alignment/locales/es.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/fr.d.ts +4 -0
- package/dist/plugins/alignment/locales/fr.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/hi.d.ts +4 -0
- package/dist/plugins/alignment/locales/hi.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/pt.d.ts +4 -0
- package/dist/plugins/alignment/locales/pt.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/ru.d.ts +4 -0
- package/dist/plugins/alignment/locales/ru.d.ts.map +1 -0
- package/dist/plugins/alignment/locales/zh.d.ts +4 -0
- package/dist/plugins/alignment/locales/zh.d.ts.map +1 -0
- package/dist/plugins/alignment.mjs +1 -5
- package/dist/plugins/alignment.mjs.map +1 -1
- package/dist/plugins/blockquote/BlockquoteKeyboardHandlers.d.ts +4 -0
- package/dist/plugins/blockquote/BlockquoteKeyboardHandlers.d.ts.map +1 -0
- package/dist/plugins/blockquote/BlockquoteLocale.d.ts +1 -8
- package/dist/plugins/blockquote/BlockquoteLocale.d.ts.map +1 -1
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts +1 -3
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts.map +1 -1
- package/dist/plugins/blockquote/BlockquoteStyles.d.ts +3 -0
- package/dist/plugins/blockquote/BlockquoteStyles.d.ts.map +1 -0
- package/dist/plugins/blockquote/index.d.ts +2 -0
- package/dist/plugins/blockquote/index.d.ts.map +1 -1
- package/dist/plugins/blockquote/locales/ar.d.ts +4 -0
- package/dist/plugins/blockquote/locales/ar.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/de.d.ts +4 -0
- package/dist/plugins/blockquote/locales/de.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/es.d.ts +4 -0
- package/dist/plugins/blockquote/locales/es.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/fr.d.ts +4 -0
- package/dist/plugins/blockquote/locales/fr.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/hi.d.ts +4 -0
- package/dist/plugins/blockquote/locales/hi.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/pt.d.ts +4 -0
- package/dist/plugins/blockquote/locales/pt.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/ru.d.ts +4 -0
- package/dist/plugins/blockquote/locales/ru.d.ts.map +1 -0
- package/dist/plugins/blockquote/locales/zh.d.ts +4 -0
- package/dist/plugins/blockquote/locales/zh.d.ts.map +1 -0
- package/dist/plugins/blockquote.mjs +1 -4
- package/dist/plugins/blockquote.mjs.map +1 -1
- package/dist/plugins/caret-navigation/CaretNavigationLocale.d.ts +21 -0
- package/dist/plugins/caret-navigation/CaretNavigationLocale.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/CaretNavigationPlugin.d.ts +2 -1
- package/dist/plugins/caret-navigation/CaretNavigationPlugin.d.ts.map +1 -1
- package/dist/plugins/caret-navigation/index.d.ts +2 -0
- package/dist/plugins/caret-navigation/index.d.ts.map +1 -1
- package/dist/plugins/caret-navigation/locales/ar.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/ar.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/de.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/de.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/es.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/es.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/fr.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/fr.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/hi.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/hi.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/pt.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/pt.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/ru.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/ru.d.ts.map +1 -0
- package/dist/plugins/caret-navigation/locales/zh.d.ts +4 -0
- package/dist/plugins/caret-navigation/locales/zh.d.ts.map +1 -0
- package/dist/plugins/caret-navigation.mjs +1 -4
- package/dist/plugins/caret-navigation.mjs.map +1 -1
- package/dist/plugins/code-block/CodeBlockKeyboardHandlers.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockLocale.d.ts +5 -8
- package/dist/plugins/code-block/CodeBlockLocale.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockNodeView.d.ts +2 -1
- package/dist/plugins/code-block/CodeBlockNodeView.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockPlugin.d.ts +7 -2
- package/dist/plugins/code-block/CodeBlockPlugin.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockService.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockTypes.d.ts +7 -1
- package/dist/plugins/code-block/CodeBlockTypes.d.ts.map +1 -1
- package/dist/plugins/code-block/highlighter/RegexTokenizer.d.ts +14 -0
- package/dist/plugins/code-block/highlighter/RegexTokenizer.d.ts.map +1 -0
- package/dist/plugins/code-block/highlighter/TokenizerTypes.d.ts +15 -0
- package/dist/plugins/code-block/highlighter/TokenizerTypes.d.ts.map +1 -0
- package/dist/plugins/code-block/highlighter/languages/index.d.ts +3 -0
- package/dist/plugins/code-block/highlighter/languages/index.d.ts.map +1 -0
- package/dist/plugins/code-block/highlighter/languages/json.d.ts +3 -0
- package/dist/plugins/code-block/highlighter/languages/json.d.ts.map +1 -0
- package/dist/plugins/code-block/highlighter/languages/xml.d.ts +3 -0
- package/dist/plugins/code-block/highlighter/languages/xml.d.ts.map +1 -0
- package/dist/plugins/code-block/index.d.ts +7 -1
- package/dist/plugins/code-block/index.d.ts.map +1 -1
- package/dist/plugins/code-block/locales/ar.d.ts +4 -0
- package/dist/plugins/code-block/locales/ar.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/de.d.ts +4 -0
- package/dist/plugins/code-block/locales/de.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/es.d.ts +4 -0
- package/dist/plugins/code-block/locales/es.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/fr.d.ts +4 -0
- package/dist/plugins/code-block/locales/fr.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/hi.d.ts +4 -0
- package/dist/plugins/code-block/locales/hi.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/pt.d.ts +4 -0
- package/dist/plugins/code-block/locales/pt.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/ru.d.ts +4 -0
- package/dist/plugins/code-block/locales/ru.d.ts.map +1 -0
- package/dist/plugins/code-block/locales/zh.d.ts +4 -0
- package/dist/plugins/code-block/locales/zh.d.ts.map +1 -0
- package/dist/plugins/code-block.mjs +1 -5
- package/dist/plugins/code-block.mjs.map +1 -1
- package/dist/plugins/font/FontLocale.d.ts +1 -8
- package/dist/plugins/font/FontLocale.d.ts.map +1 -1
- package/dist/plugins/font/FontPlugin.d.ts +1 -3
- package/dist/plugins/font/FontPlugin.d.ts.map +1 -1
- package/dist/plugins/font/index.d.ts +2 -0
- package/dist/plugins/font/index.d.ts.map +1 -1
- package/dist/plugins/font/locales/ar.d.ts +4 -0
- package/dist/plugins/font/locales/ar.d.ts.map +1 -0
- package/dist/plugins/font/locales/de.d.ts +4 -0
- package/dist/plugins/font/locales/de.d.ts.map +1 -0
- package/dist/plugins/font/locales/es.d.ts +4 -0
- package/dist/plugins/font/locales/es.d.ts.map +1 -0
- package/dist/plugins/font/locales/fr.d.ts +4 -0
- package/dist/plugins/font/locales/fr.d.ts.map +1 -0
- package/dist/plugins/font/locales/hi.d.ts +4 -0
- package/dist/plugins/font/locales/hi.d.ts.map +1 -0
- package/dist/plugins/font/locales/pt.d.ts +4 -0
- package/dist/plugins/font/locales/pt.d.ts.map +1 -0
- package/dist/plugins/font/locales/ru.d.ts +4 -0
- package/dist/plugins/font/locales/ru.d.ts.map +1 -0
- package/dist/plugins/font/locales/zh.d.ts +4 -0
- package/dist/plugins/font/locales/zh.d.ts.map +1 -0
- package/dist/plugins/font-size/FontSizeLocale.d.ts +1 -8
- package/dist/plugins/font-size/FontSizeLocale.d.ts.map +1 -1
- package/dist/plugins/font-size/FontSizePlugin.d.ts +1 -3
- package/dist/plugins/font-size/FontSizePlugin.d.ts.map +1 -1
- package/dist/plugins/font-size/FontSizePopup.d.ts +1 -1
- package/dist/plugins/font-size/FontSizePopup.d.ts.map +1 -1
- package/dist/plugins/font-size/index.d.ts +2 -0
- package/dist/plugins/font-size/index.d.ts.map +1 -1
- package/dist/plugins/font-size/locales/ar.d.ts +4 -0
- package/dist/plugins/font-size/locales/ar.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/de.d.ts +4 -0
- package/dist/plugins/font-size/locales/de.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/es.d.ts +4 -0
- package/dist/plugins/font-size/locales/es.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/fr.d.ts +4 -0
- package/dist/plugins/font-size/locales/fr.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/hi.d.ts +4 -0
- package/dist/plugins/font-size/locales/hi.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/pt.d.ts +4 -0
- package/dist/plugins/font-size/locales/pt.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/ru.d.ts +4 -0
- package/dist/plugins/font-size/locales/ru.d.ts.map +1 -0
- package/dist/plugins/font-size/locales/zh.d.ts +4 -0
- package/dist/plugins/font-size/locales/zh.d.ts.map +1 -0
- package/dist/plugins/font-size.mjs +1 -4
- package/dist/plugins/font-size.mjs.map +1 -1
- package/dist/plugins/font.mjs +1 -4
- package/dist/plugins/font.mjs.map +1 -1
- package/dist/plugins/gap-cursor/GapCursorLocale.d.ts +7 -0
- package/dist/plugins/gap-cursor/GapCursorLocale.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/GapCursorPlugin.d.ts +7 -3
- package/dist/plugins/gap-cursor/GapCursorPlugin.d.ts.map +1 -1
- package/dist/plugins/gap-cursor/locales/ar.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/ar.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/de.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/de.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/es.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/es.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/fr.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/fr.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/hi.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/hi.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/pt.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/pt.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/ru.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/ru.d.ts.map +1 -0
- package/dist/plugins/gap-cursor/locales/zh.d.ts +4 -0
- package/dist/plugins/gap-cursor/locales/zh.d.ts.map +1 -0
- package/dist/plugins/gap-cursor.mjs +1 -64
- package/dist/plugins/gap-cursor.mjs.map +1 -1
- package/dist/plugins/hard-break.mjs +1 -4
- package/dist/plugins/hard-break.mjs.map +1 -1
- package/dist/plugins/heading/HeadingBlockTypePicker.d.ts +1 -1
- package/dist/plugins/heading/HeadingBlockTypePicker.d.ts.map +1 -1
- package/dist/plugins/heading/HeadingInputRules.d.ts.map +1 -1
- package/dist/plugins/heading/HeadingKeyboardHandlers.d.ts.map +1 -1
- package/dist/plugins/heading/HeadingLocale.d.ts +1 -8
- package/dist/plugins/heading/HeadingLocale.d.ts.map +1 -1
- package/dist/plugins/heading/HeadingPlugin.d.ts +2 -4
- package/dist/plugins/heading/HeadingPlugin.d.ts.map +1 -1
- package/dist/plugins/heading/index.d.ts +3 -0
- package/dist/plugins/heading/index.d.ts.map +1 -1
- package/dist/plugins/heading/locales/ar.d.ts +4 -0
- package/dist/plugins/heading/locales/ar.d.ts.map +1 -0
- package/dist/plugins/heading/locales/de.d.ts +4 -0
- package/dist/plugins/heading/locales/de.d.ts.map +1 -0
- package/dist/plugins/heading/locales/es.d.ts +4 -0
- package/dist/plugins/heading/locales/es.d.ts.map +1 -0
- package/dist/plugins/heading/locales/fr.d.ts +4 -0
- package/dist/plugins/heading/locales/fr.d.ts.map +1 -0
- package/dist/plugins/heading/locales/hi.d.ts +4 -0
- package/dist/plugins/heading/locales/hi.d.ts.map +1 -0
- package/dist/plugins/heading/locales/pt.d.ts +4 -0
- package/dist/plugins/heading/locales/pt.d.ts.map +1 -0
- package/dist/plugins/heading/locales/ru.d.ts +4 -0
- package/dist/plugins/heading/locales/ru.d.ts.map +1 -0
- package/dist/plugins/heading/locales/zh.d.ts +4 -0
- package/dist/plugins/heading/locales/zh.d.ts.map +1 -0
- package/dist/plugins/heading.mjs +1 -4
- package/dist/plugins/heading.mjs.map +1 -1
- package/dist/plugins/highlight/HighlightLocale.d.ts +1 -8
- package/dist/plugins/highlight/HighlightLocale.d.ts.map +1 -1
- package/dist/plugins/highlight/HighlightPlugin.d.ts +1 -3
- package/dist/plugins/highlight/HighlightPlugin.d.ts.map +1 -1
- package/dist/plugins/highlight/index.d.ts +2 -0
- package/dist/plugins/highlight/index.d.ts.map +1 -1
- package/dist/plugins/highlight/locales/ar.d.ts +4 -0
- package/dist/plugins/highlight/locales/ar.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/de.d.ts +4 -0
- package/dist/plugins/highlight/locales/de.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/es.d.ts +4 -0
- package/dist/plugins/highlight/locales/es.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/fr.d.ts +4 -0
- package/dist/plugins/highlight/locales/fr.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/hi.d.ts +4 -0
- package/dist/plugins/highlight/locales/hi.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/pt.d.ts +4 -0
- package/dist/plugins/highlight/locales/pt.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/ru.d.ts +4 -0
- package/dist/plugins/highlight/locales/ru.d.ts.map +1 -0
- package/dist/plugins/highlight/locales/zh.d.ts +4 -0
- package/dist/plugins/highlight/locales/zh.d.ts.map +1 -0
- package/dist/plugins/highlight.mjs +1 -4
- package/dist/plugins/highlight.mjs.map +1 -1
- package/dist/plugins/horizontal-rule/HorizontalRuleLocale.d.ts +1 -8
- package/dist/plugins/horizontal-rule/HorizontalRuleLocale.d.ts.map +1 -1
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts +1 -3
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts.map +1 -1
- package/dist/plugins/horizontal-rule/index.d.ts +2 -0
- package/dist/plugins/horizontal-rule/index.d.ts.map +1 -1
- package/dist/plugins/horizontal-rule/locales/ar.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/ar.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/de.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/de.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/es.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/es.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/fr.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/fr.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/hi.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/hi.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/pt.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/pt.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/ru.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/ru.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/locales/zh.d.ts +4 -0
- package/dist/plugins/horizontal-rule/locales/zh.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule.mjs +1 -4
- package/dist/plugins/horizontal-rule.mjs.map +1 -1
- package/dist/plugins/image/ImageLocale.d.ts +9 -8
- package/dist/plugins/image/ImageLocale.d.ts.map +1 -1
- package/dist/plugins/image/ImageNodeView.d.ts +8 -1
- package/dist/plugins/image/ImageNodeView.d.ts.map +1 -1
- package/dist/plugins/image/ImagePlugin.d.ts +2 -3
- package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
- package/dist/plugins/image/ImagePopup.d.ts +11 -0
- package/dist/plugins/image/ImagePopup.d.ts.map +1 -0
- package/dist/plugins/image/ImageUpload.d.ts +1 -2
- package/dist/plugins/image/ImageUpload.d.ts.map +1 -1
- package/dist/plugins/image/index.d.ts +2 -0
- package/dist/plugins/image/index.d.ts.map +1 -1
- package/dist/plugins/image/locales/ar.d.ts +4 -0
- package/dist/plugins/image/locales/ar.d.ts.map +1 -0
- package/dist/plugins/image/locales/de.d.ts +4 -0
- package/dist/plugins/image/locales/de.d.ts.map +1 -0
- package/dist/plugins/image/locales/es.d.ts +4 -0
- package/dist/plugins/image/locales/es.d.ts.map +1 -0
- package/dist/plugins/image/locales/fr.d.ts +4 -0
- package/dist/plugins/image/locales/fr.d.ts.map +1 -0
- package/dist/plugins/image/locales/hi.d.ts +4 -0
- package/dist/plugins/image/locales/hi.d.ts.map +1 -0
- package/dist/plugins/image/locales/pt.d.ts +4 -0
- package/dist/plugins/image/locales/pt.d.ts.map +1 -0
- package/dist/plugins/image/locales/ru.d.ts +4 -0
- package/dist/plugins/image/locales/ru.d.ts.map +1 -0
- package/dist/plugins/image/locales/zh.d.ts +4 -0
- package/dist/plugins/image/locales/zh.d.ts.map +1 -0
- package/dist/plugins/image.mjs +1 -6
- package/dist/plugins/image.mjs.map +1 -1
- package/dist/plugins/link/LinkLocale.d.ts +1 -8
- package/dist/plugins/link/LinkLocale.d.ts.map +1 -1
- package/dist/plugins/link/LinkPlugin.d.ts +1 -3
- package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
- package/dist/plugins/link/index.d.ts +2 -0
- package/dist/plugins/link/index.d.ts.map +1 -1
- package/dist/plugins/link/locales/ar.d.ts +4 -0
- package/dist/plugins/link/locales/ar.d.ts.map +1 -0
- package/dist/plugins/link/locales/de.d.ts +4 -0
- package/dist/plugins/link/locales/de.d.ts.map +1 -0
- package/dist/plugins/link/locales/es.d.ts +4 -0
- package/dist/plugins/link/locales/es.d.ts.map +1 -0
- package/dist/plugins/link/locales/fr.d.ts +4 -0
- package/dist/plugins/link/locales/fr.d.ts.map +1 -0
- package/dist/plugins/link/locales/hi.d.ts +4 -0
- package/dist/plugins/link/locales/hi.d.ts.map +1 -0
- package/dist/plugins/link/locales/pt.d.ts +4 -0
- package/dist/plugins/link/locales/pt.d.ts.map +1 -0
- package/dist/plugins/link/locales/ru.d.ts +4 -0
- package/dist/plugins/link/locales/ru.d.ts.map +1 -0
- package/dist/plugins/link/locales/zh.d.ts +4 -0
- package/dist/plugins/link/locales/zh.d.ts.map +1 -0
- package/dist/plugins/link.mjs +1 -4
- package/dist/plugins/link.mjs.map +1 -1
- package/dist/plugins/list/ListLocale.d.ts +1 -8
- package/dist/plugins/list/ListLocale.d.ts.map +1 -1
- package/dist/plugins/list/ListPlugin.d.ts +1 -3
- package/dist/plugins/list/ListPlugin.d.ts.map +1 -1
- package/dist/plugins/list/index.d.ts +2 -0
- package/dist/plugins/list/index.d.ts.map +1 -1
- package/dist/plugins/list/locales/ar.d.ts +4 -0
- package/dist/plugins/list/locales/ar.d.ts.map +1 -0
- package/dist/plugins/list/locales/de.d.ts +4 -0
- package/dist/plugins/list/locales/de.d.ts.map +1 -0
- package/dist/plugins/list/locales/es.d.ts +4 -0
- package/dist/plugins/list/locales/es.d.ts.map +1 -0
- package/dist/plugins/list/locales/fr.d.ts +4 -0
- package/dist/plugins/list/locales/fr.d.ts.map +1 -0
- package/dist/plugins/list/locales/hi.d.ts +4 -0
- package/dist/plugins/list/locales/hi.d.ts.map +1 -0
- package/dist/plugins/list/locales/pt.d.ts +4 -0
- package/dist/plugins/list/locales/pt.d.ts.map +1 -0
- package/dist/plugins/list/locales/ru.d.ts +4 -0
- package/dist/plugins/list/locales/ru.d.ts.map +1 -0
- package/dist/plugins/list/locales/zh.d.ts +4 -0
- package/dist/plugins/list/locales/zh.d.ts.map +1 -0
- package/dist/plugins/list.mjs +1 -4
- package/dist/plugins/list.mjs.map +1 -1
- package/dist/plugins/print/PrintLocale.d.ts +1 -8
- package/dist/plugins/print/PrintLocale.d.ts.map +1 -1
- package/dist/plugins/print/PrintPlugin.d.ts +1 -1
- package/dist/plugins/print/PrintPlugin.d.ts.map +1 -1
- package/dist/plugins/print/PrintServiceImpl.d.ts.map +1 -1
- package/dist/plugins/print/PrintStyleCollector.d.ts.map +1 -1
- package/dist/plugins/print/PrintTypes.d.ts +1 -1
- package/dist/plugins/print/PrintTypes.d.ts.map +1 -1
- package/dist/plugins/print/index.d.ts +5 -0
- package/dist/plugins/print/index.d.ts.map +1 -0
- package/dist/plugins/print/locales/ar.d.ts +4 -0
- package/dist/plugins/print/locales/ar.d.ts.map +1 -0
- package/dist/plugins/print/locales/de.d.ts +4 -0
- package/dist/plugins/print/locales/de.d.ts.map +1 -0
- package/dist/plugins/print/locales/es.d.ts +4 -0
- package/dist/plugins/print/locales/es.d.ts.map +1 -0
- package/dist/plugins/print/locales/fr.d.ts +4 -0
- package/dist/plugins/print/locales/fr.d.ts.map +1 -0
- package/dist/plugins/print/locales/hi.d.ts +4 -0
- package/dist/plugins/print/locales/hi.d.ts.map +1 -0
- package/dist/plugins/print/locales/pt.d.ts +4 -0
- package/dist/plugins/print/locales/pt.d.ts.map +1 -0
- package/dist/plugins/print/locales/ru.d.ts +4 -0
- package/dist/plugins/print/locales/ru.d.ts.map +1 -0
- package/dist/plugins/print/locales/zh.d.ts +4 -0
- package/dist/plugins/print/locales/zh.d.ts.map +1 -0
- package/dist/plugins/print.mjs +2 -0
- package/dist/plugins/print.mjs.map +1 -0
- package/dist/plugins/shared/ColorGrid.d.ts.map +1 -1
- package/dist/plugins/shared/ColorMarkOperations.d.ts +1 -2
- package/dist/plugins/shared/ColorMarkOperations.d.ts.map +1 -1
- package/dist/plugins/shared/ColorPickerPopup.d.ts +1 -8
- package/dist/plugins/shared/ColorPickerPopup.d.ts.map +1 -1
- package/dist/plugins/shared/KeyboardNav.d.ts +17 -0
- package/dist/plugins/shared/KeyboardNav.d.ts.map +1 -0
- package/dist/plugins/shared/PluginHelpers.d.ts +18 -0
- package/dist/plugins/shared/PluginHelpers.d.ts.map +1 -0
- package/dist/plugins/shared/PopupKeyboardPatterns.d.ts +1 -1
- package/dist/plugins/shared/PopupKeyboardPatterns.d.ts.map +1 -1
- package/dist/plugins/shared/PopupManager.d.ts +2 -0
- package/dist/plugins/shared/PopupManager.d.ts.map +1 -1
- package/dist/plugins/shared/PopupPositioning.d.ts +1 -0
- package/dist/plugins/shared/PopupPositioning.d.ts.map +1 -1
- package/dist/plugins/shared/ShortcutFormatting.d.ts +9 -0
- package/dist/plugins/shared/ShortcutFormatting.d.ts.map +1 -0
- package/dist/plugins/shared/XmlPatterns.d.ts +10 -0
- package/dist/plugins/shared/XmlPatterns.d.ts.map +1 -0
- package/dist/plugins/shared/index.d.ts +13 -0
- package/dist/plugins/shared/index.d.ts.map +1 -0
- package/dist/plugins/shared.mjs +2 -0
- package/dist/plugins/shared.mjs.map +1 -0
- package/dist/plugins/smart-paste/SmartPasteLocale.d.ts +7 -0
- package/dist/plugins/smart-paste/SmartPasteLocale.d.ts.map +1 -0
- package/dist/plugins/smart-paste/SmartPastePlugin.d.ts +19 -0
- package/dist/plugins/smart-paste/SmartPastePlugin.d.ts.map +1 -0
- package/dist/plugins/smart-paste/SmartPasteTypes.d.ts +24 -0
- package/dist/plugins/smart-paste/SmartPasteTypes.d.ts.map +1 -0
- package/dist/plugins/smart-paste/detectors/JsonDetector.d.ts +6 -0
- package/dist/plugins/smart-paste/detectors/JsonDetector.d.ts.map +1 -0
- package/dist/plugins/smart-paste/detectors/XmlDetector.d.ts +26 -0
- package/dist/plugins/smart-paste/detectors/XmlDetector.d.ts.map +1 -0
- package/dist/plugins/smart-paste/index.d.ts +7 -0
- package/dist/plugins/smart-paste/index.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/ar.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/ar.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/de.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/de.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/es.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/es.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/fr.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/fr.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/hi.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/hi.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/pt.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/pt.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/ru.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/ru.d.ts.map +1 -0
- package/dist/plugins/smart-paste/locales/zh.d.ts +4 -0
- package/dist/plugins/smart-paste/locales/zh.d.ts.map +1 -0
- package/dist/plugins/smart-paste.mjs +2 -0
- package/dist/plugins/smart-paste.mjs.map +1 -0
- package/dist/plugins/strikethrough/StrikethroughLocale.d.ts +1 -8
- package/dist/plugins/strikethrough/StrikethroughLocale.d.ts.map +1 -1
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts +1 -3
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts.map +1 -1
- package/dist/plugins/strikethrough/index.d.ts +2 -0
- package/dist/plugins/strikethrough/index.d.ts.map +1 -1
- package/dist/plugins/strikethrough/locales/ar.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/ar.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/de.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/de.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/es.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/es.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/fr.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/fr.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/hi.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/hi.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/pt.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/pt.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/ru.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/ru.d.ts.map +1 -0
- package/dist/plugins/strikethrough/locales/zh.d.ts +4 -0
- package/dist/plugins/strikethrough/locales/zh.d.ts.map +1 -0
- package/dist/plugins/strikethrough.mjs +1 -4
- package/dist/plugins/strikethrough.mjs.map +1 -1
- package/dist/plugins/super-sub/SuperSubLocale.d.ts +1 -8
- package/dist/plugins/super-sub/SuperSubLocale.d.ts.map +1 -1
- package/dist/plugins/super-sub/SuperSubPlugin.d.ts +1 -3
- package/dist/plugins/super-sub/SuperSubPlugin.d.ts.map +1 -1
- package/dist/plugins/super-sub/index.d.ts +2 -0
- package/dist/plugins/super-sub/index.d.ts.map +1 -1
- package/dist/plugins/super-sub/locales/ar.d.ts +4 -0
- package/dist/plugins/super-sub/locales/ar.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/de.d.ts +4 -0
- package/dist/plugins/super-sub/locales/de.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/es.d.ts +4 -0
- package/dist/plugins/super-sub/locales/es.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/fr.d.ts +4 -0
- package/dist/plugins/super-sub/locales/fr.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/hi.d.ts +4 -0
- package/dist/plugins/super-sub/locales/hi.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/pt.d.ts +4 -0
- package/dist/plugins/super-sub/locales/pt.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/ru.d.ts +4 -0
- package/dist/plugins/super-sub/locales/ru.d.ts.map +1 -0
- package/dist/plugins/super-sub/locales/zh.d.ts +4 -0
- package/dist/plugins/super-sub/locales/zh.d.ts.map +1 -0
- package/dist/plugins/super-sub.mjs +1 -4
- package/dist/plugins/super-sub.mjs.map +1 -1
- package/dist/plugins/table/TableCommands.d.ts +8 -8
- package/dist/plugins/table/TableCommands.d.ts.map +1 -1
- package/dist/plugins/table/TableContextMenu.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsDOM.d.ts +4 -4
- package/dist/plugins/table/TableControlsDOM.d.ts.map +1 -1
- package/dist/plugins/table/TableLocale.d.ts +1 -8
- package/dist/plugins/table/TableLocale.d.ts.map +1 -1
- package/dist/plugins/table/TableNavigation.d.ts +1 -1
- package/dist/plugins/table/TableNavigation.d.ts.map +1 -1
- package/dist/plugins/table/TablePlugin.d.ts +3 -5
- package/dist/plugins/table/TablePlugin.d.ts.map +1 -1
- package/dist/plugins/table/TableSelection.d.ts +2 -0
- package/dist/plugins/table/TableSelection.d.ts.map +1 -1
- package/dist/plugins/table/index.d.ts +1 -5
- package/dist/plugins/table/index.d.ts.map +1 -1
- package/dist/plugins/table/locales/ar.d.ts +4 -0
- package/dist/plugins/table/locales/ar.d.ts.map +1 -0
- package/dist/plugins/table/locales/de.d.ts +4 -0
- package/dist/plugins/table/locales/de.d.ts.map +1 -0
- package/dist/plugins/table/locales/es.d.ts +4 -0
- package/dist/plugins/table/locales/es.d.ts.map +1 -0
- package/dist/plugins/table/locales/fr.d.ts +4 -0
- package/dist/plugins/table/locales/fr.d.ts.map +1 -0
- package/dist/plugins/table/locales/hi.d.ts +4 -0
- package/dist/plugins/table/locales/hi.d.ts.map +1 -0
- package/dist/plugins/table/locales/pt.d.ts +4 -0
- package/dist/plugins/table/locales/pt.d.ts.map +1 -0
- package/dist/plugins/table/locales/ru.d.ts +4 -0
- package/dist/plugins/table/locales/ru.d.ts.map +1 -0
- package/dist/plugins/table/locales/zh.d.ts +4 -0
- package/dist/plugins/table/locales/zh.d.ts.map +1 -0
- package/dist/plugins/table.mjs +1 -20
- package/dist/plugins/table.mjs.map +1 -1
- package/dist/plugins/text-color/TextColorLocale.d.ts +1 -8
- package/dist/plugins/text-color/TextColorLocale.d.ts.map +1 -1
- package/dist/plugins/text-color/TextColorPlugin.d.ts +1 -3
- package/dist/plugins/text-color/TextColorPlugin.d.ts.map +1 -1
- package/dist/plugins/text-color/index.d.ts +2 -0
- package/dist/plugins/text-color/index.d.ts.map +1 -1
- package/dist/plugins/text-color/locales/ar.d.ts +4 -0
- package/dist/plugins/text-color/locales/ar.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/de.d.ts +4 -0
- package/dist/plugins/text-color/locales/de.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/es.d.ts +4 -0
- package/dist/plugins/text-color/locales/es.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/fr.d.ts +4 -0
- package/dist/plugins/text-color/locales/fr.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/hi.d.ts +4 -0
- package/dist/plugins/text-color/locales/hi.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/pt.d.ts +4 -0
- package/dist/plugins/text-color/locales/pt.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/ru.d.ts +4 -0
- package/dist/plugins/text-color/locales/ru.d.ts.map +1 -0
- package/dist/plugins/text-color/locales/zh.d.ts +4 -0
- package/dist/plugins/text-color/locales/zh.d.ts.map +1 -0
- package/dist/plugins/text-color.mjs +1 -4
- package/dist/plugins/text-color.mjs.map +1 -1
- package/dist/plugins/text-direction/DirectionDetection.d.ts +17 -0
- package/dist/plugins/text-direction/DirectionDetection.d.ts.map +1 -0
- package/dist/plugins/text-direction/ShiftDirectionHandler.d.ts +12 -0
- package/dist/plugins/text-direction/ShiftDirectionHandler.d.ts.map +1 -0
- package/dist/plugins/text-direction/TextDirectionCorePlugin.d.ts +35 -0
- package/dist/plugins/text-direction/TextDirectionCorePlugin.d.ts.map +1 -0
- package/dist/plugins/text-direction/TextDirectionLocale.d.ts +20 -0
- package/dist/plugins/text-direction/TextDirectionLocale.d.ts.map +1 -0
- package/dist/plugins/text-direction/TextDirectionMiddleware.d.ts +18 -0
- package/dist/plugins/text-direction/TextDirectionMiddleware.d.ts.map +1 -0
- package/dist/plugins/text-direction/TextDirectionPlugin.d.ts +59 -0
- package/dist/plugins/text-direction/TextDirectionPlugin.d.ts.map +1 -0
- package/dist/plugins/text-direction/index.d.ts +5 -0
- package/dist/plugins/text-direction/index.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/ar.d.ts +4 -0
- package/dist/plugins/text-direction/locales/ar.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/de.d.ts +4 -0
- package/dist/plugins/text-direction/locales/de.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/es.d.ts +4 -0
- package/dist/plugins/text-direction/locales/es.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/fr.d.ts +4 -0
- package/dist/plugins/text-direction/locales/fr.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/hi.d.ts +4 -0
- package/dist/plugins/text-direction/locales/hi.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/pt.d.ts +4 -0
- package/dist/plugins/text-direction/locales/pt.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/ru.d.ts +4 -0
- package/dist/plugins/text-direction/locales/ru.d.ts.map +1 -0
- package/dist/plugins/text-direction/locales/zh.d.ts +4 -0
- package/dist/plugins/text-direction/locales/zh.d.ts.map +1 -0
- package/dist/plugins/text-direction-advanced/index.d.ts +5 -0
- package/dist/plugins/text-direction-advanced/index.d.ts.map +1 -0
- package/dist/plugins/text-direction-advanced.mjs +2 -0
- package/dist/plugins/text-direction-advanced.mjs.map +1 -0
- package/dist/plugins/text-direction.mjs +2 -0
- package/dist/plugins/text-direction.mjs.map +1 -0
- package/dist/plugins/text-formatting/TextFormattingLocale.d.ts +1 -8
- package/dist/plugins/text-formatting/TextFormattingLocale.d.ts.map +1 -1
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts +1 -3
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts.map +1 -1
- package/dist/plugins/text-formatting/index.d.ts +2 -0
- package/dist/plugins/text-formatting/index.d.ts.map +1 -1
- package/dist/plugins/text-formatting/locales/ar.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/ar.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/de.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/de.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/es.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/es.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/fr.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/fr.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/hi.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/hi.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/pt.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/pt.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/ru.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/ru.d.ts.map +1 -0
- package/dist/plugins/text-formatting/locales/zh.d.ts +4 -0
- package/dist/plugins/text-formatting/locales/zh.d.ts.map +1 -0
- package/dist/plugins/text-formatting.mjs +1 -4
- package/dist/plugins/text-formatting.mjs.map +1 -1
- package/dist/plugins/toolbar/ToolbarItem.d.ts +2 -18
- package/dist/plugins/toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarKeyboardNav.d.ts +5 -11
- package/dist/plugins/toolbar/ToolbarKeyboardNav.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarLocale.d.ts +2 -8
- package/dist/plugins/toolbar/ToolbarLocale.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarOverflowController.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts +2 -2
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarPopupController.d.ts +3 -1
- package/dist/plugins/toolbar/ToolbarPopupController.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarRenderers.d.ts +2 -1
- package/dist/plugins/toolbar/ToolbarRenderers.d.ts.map +1 -1
- package/dist/plugins/toolbar/index.d.ts +4 -1
- package/dist/plugins/toolbar/index.d.ts.map +1 -1
- package/dist/plugins/toolbar/locales/ar.d.ts +4 -0
- package/dist/plugins/toolbar/locales/ar.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/de.d.ts +4 -0
- package/dist/plugins/toolbar/locales/de.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/es.d.ts +4 -0
- package/dist/plugins/toolbar/locales/es.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/fr.d.ts +4 -0
- package/dist/plugins/toolbar/locales/fr.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/hi.d.ts +4 -0
- package/dist/plugins/toolbar/locales/hi.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/pt.d.ts +4 -0
- package/dist/plugins/toolbar/locales/pt.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/ru.d.ts +4 -0
- package/dist/plugins/toolbar/locales/ru.d.ts.map +1 -0
- package/dist/plugins/toolbar/locales/zh.d.ts +4 -0
- package/dist/plugins/toolbar/locales/zh.d.ts.map +1 -0
- package/dist/plugins/toolbar.mjs +1 -7
- package/dist/plugins/toolbar.mjs.map +1 -1
- package/dist/presets/FullPreset.d.ts +4 -1
- package/dist/presets/FullPreset.d.ts.map +1 -1
- package/dist/presets/MinimalPreset.d.ts +3 -0
- package/dist/presets/MinimalPreset.d.ts.map +1 -1
- package/dist/presets/PresetTypes.d.ts +4 -0
- package/dist/presets/PresetTypes.d.ts.map +1 -1
- package/dist/presets/full.d.ts +17 -0
- package/dist/presets/full.d.ts.map +1 -0
- package/dist/presets/full.mjs +2 -0
- package/dist/presets/full.mjs.map +1 -0
- package/dist/presets/minimal.d.ts +17 -0
- package/dist/presets/minimal.d.ts.map +1 -0
- package/dist/presets/minimal.mjs +2 -0
- package/dist/presets/minimal.mjs.map +1 -0
- package/dist/presets.d.ts +20 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.mjs +2 -0
- package/dist/presets.mjs.map +1 -0
- package/dist/serialization/CSSClassCollector.d.ts.map +1 -0
- package/dist/serialization/ContentHTMLTypes.d.ts.map +1 -0
- package/dist/serialization/DocumentParser.d.ts.map +1 -0
- package/dist/{editor → serialization}/DocumentSerializer.d.ts +2 -0
- package/dist/serialization/DocumentSerializer.d.ts.map +1 -0
- package/dist/{editor → serialization}/MarkSerializer.d.ts +3 -2
- package/dist/serialization/MarkSerializer.d.ts.map +1 -0
- package/dist/serialization/index.d.ts +12 -0
- package/dist/serialization/index.d.ts.map +1 -0
- package/dist/state/BlockBoundaryMovement.d.ts +7 -0
- package/dist/state/BlockBoundaryMovement.d.ts.map +1 -0
- package/dist/state/InlineContentOps.d.ts.map +1 -1
- package/dist/{model/NavigationUtils.d.ts → state/NavigationQueries.d.ts} +3 -3
- package/dist/state/NavigationQueries.d.ts.map +1 -0
- package/dist/state/StepInversion.d.ts +7 -0
- package/dist/state/StepInversion.d.ts.map +1 -0
- package/dist/state/Steps.d.ts +108 -0
- package/dist/state/Steps.d.ts.map +1 -0
- package/dist/state/Transaction.d.ts +5 -174
- package/dist/state/Transaction.d.ts.map +1 -1
- package/dist/state/TransactionBuilder.d.ts +69 -0
- package/dist/state/TransactionBuilder.d.ts.map +1 -0
- package/dist/test/PluginTestUtils.d.ts +0 -2
- package/dist/test/PluginTestUtils.d.ts.map +1 -1
- package/dist/test/TestUtils.d.ts +2 -2
- package/dist/test/TestUtils.d.ts.map +1 -1
- package/dist/view/BlockRendering.d.ts +10 -0
- package/dist/view/BlockRendering.d.ts.map +1 -0
- package/dist/view/BlockWrapperManagement.d.ts +27 -0
- package/dist/view/BlockWrapperManagement.d.ts.map +1 -0
- package/dist/view/CaretNavigation.d.ts +1 -8
- package/dist/view/CaretNavigation.d.ts.map +1 -1
- package/dist/view/CursorWrapper.d.ts.map +1 -1
- package/dist/view/DecorationRendering.d.ts +17 -0
- package/dist/view/DecorationRendering.d.ts.map +1 -0
- package/dist/view/DomUtils.d.ts +13 -0
- package/dist/view/DomUtils.d.ts.map +1 -0
- package/dist/view/EditorView.d.ts +9 -12
- package/dist/view/EditorView.d.ts.map +1 -1
- package/dist/view/GapCursorNavigation.d.ts +12 -0
- package/dist/view/GapCursorNavigation.d.ts.map +1 -0
- package/dist/view/InlineRendering.d.ts +11 -0
- package/dist/view/InlineRendering.d.ts.map +1 -0
- package/dist/view/MarkRendering.d.ts +5 -0
- package/dist/view/MarkRendering.d.ts.map +1 -1
- package/dist/view/Reconciler.d.ts +2 -6
- package/dist/view/Reconciler.d.ts.map +1 -1
- package/dist/view/SelectionSync.d.ts +41 -2
- package/dist/view/SelectionSync.d.ts.map +1 -1
- package/dist/view/ViewMovementCommands.d.ts.map +1 -1
- package/package.json +218 -8
- package/dist/chunks/AttrRegistry-D9Jx_RVb.mjs +0 -16
- package/dist/chunks/AttrRegistry-D9Jx_RVb.mjs.map +0 -1
- package/dist/chunks/AttributedMarkCommands-BtLea72z.mjs +0 -80
- package/dist/chunks/AttributedMarkCommands-BtLea72z.mjs.map +0 -1
- package/dist/chunks/CaretNavigation-7JYpIKbs.mjs +0 -311
- package/dist/chunks/CaretNavigation-7JYpIKbs.mjs.map +0 -1
- package/dist/chunks/ColorGrid--lBQ7jCK.mjs +0 -81
- package/dist/chunks/ColorGrid--lBQ7jCK.mjs.map +0 -1
- package/dist/chunks/ColorPickerPopup-TpIRlXc8.mjs +0 -37
- package/dist/chunks/ColorPickerPopup-TpIRlXc8.mjs.map +0 -1
- package/dist/chunks/ColorValidation-CV4f1wu6.mjs +0 -39
- package/dist/chunks/Document-Brtw2jL1.mjs +0 -190
- package/dist/chunks/Document-Brtw2jL1.mjs.map +0 -1
- package/dist/chunks/HTMLUtils-DTqQzcKR.mjs +0 -35
- package/dist/chunks/HTMLUtils-DTqQzcKR.mjs.map +0 -1
- package/dist/chunks/MarkCommands-6RUJ4L3r.mjs +0 -94
- package/dist/chunks/MarkCommands-6RUJ4L3r.mjs.map +0 -1
- package/dist/chunks/NavigationUtils-Cspt2ZrK.mjs +0 -47
- package/dist/chunks/NavigationUtils-Cspt2ZrK.mjs.map +0 -1
- package/dist/chunks/NodeResolver-C2XYkeOi.mjs +0 -81
- package/dist/chunks/NodeResolver-C2XYkeOi.mjs.map +0 -1
- package/dist/chunks/NodeSpec-NZVvcCuH.mjs +0 -8
- package/dist/chunks/NodeSpec-NZVvcCuH.mjs.map +0 -1
- package/dist/chunks/Platform-S_xqIqcM.mjs +0 -26
- package/dist/chunks/Platform-S_xqIqcM.mjs.map +0 -1
- package/dist/chunks/PopupPositioning-CgjgAKjp.mjs +0 -34
- package/dist/chunks/PopupPositioning-CgjgAKjp.mjs.map +0 -1
- package/dist/chunks/RangeIterator-Bh4Vl_6D.mjs +0 -16
- package/dist/chunks/Selection-BRTab5hO.mjs +0 -52
- package/dist/chunks/StyleRuntime-CP4NCwKT.mjs +0 -235
- package/dist/chunks/ToolbarItem-BpZggUGo.mjs +0 -8
- package/dist/chunks/ToolbarItem-BpZggUGo.mjs.map +0 -1
- package/dist/chunks/ToolbarKeyboardNav-DhpL8zNV.mjs +0 -46
- package/dist/chunks/ToolbarKeyboardNav-DhpL8zNV.mjs.map +0 -1
- package/dist/chunks/TypeBrands-C09nE2qO.mjs +0 -27
- package/dist/chunks/index--7pBhSF4.mjs +0 -542
- package/dist/chunks/index--7pBhSF4.mjs.map +0 -1
- package/dist/chunks/index-BXCkjDax.mjs +0 -161
- package/dist/chunks/index-BXCkjDax.mjs.map +0 -1
- package/dist/chunks/index-BXtw5PNN.mjs +0 -39
- package/dist/chunks/index-BXtw5PNN.mjs.map +0 -1
- package/dist/chunks/index-BcDRT4K2.mjs +0 -1019
- package/dist/chunks/index-BcDRT4K2.mjs.map +0 -1
- package/dist/chunks/index-BjFBWBOC.mjs +0 -168
- package/dist/chunks/index-BjFBWBOC.mjs.map +0 -1
- package/dist/chunks/index-C1opJocO.mjs +0 -92
- package/dist/chunks/index-C1opJocO.mjs.map +0 -1
- package/dist/chunks/index-CCyqQ0Dz.mjs +0 -228
- package/dist/chunks/index-CCyqQ0Dz.mjs.map +0 -1
- package/dist/chunks/index-Cd3uJLP3.mjs +0 -73
- package/dist/chunks/index-Cd3uJLP3.mjs.map +0 -1
- package/dist/chunks/index-DSAuGP4n.mjs +0 -410
- package/dist/chunks/index-DSAuGP4n.mjs.map +0 -1
- package/dist/chunks/index-DtRfqsq5.mjs +0 -924
- package/dist/chunks/index-DtRfqsq5.mjs.map +0 -1
- package/dist/chunks/index-Dum8yE_t.mjs +0 -62
- package/dist/chunks/index-Dum8yE_t.mjs.map +0 -1
- package/dist/chunks/index-DxbQirny.mjs +0 -63
- package/dist/chunks/index-DxbQirny.mjs.map +0 -1
- package/dist/chunks/index-ErZ5_a1o.mjs +0 -296
- package/dist/chunks/index-ErZ5_a1o.mjs.map +0 -1
- package/dist/chunks/index-WpbK_s_H.mjs +0 -119
- package/dist/chunks/index-WpbK_s_H.mjs.map +0 -1
- package/dist/chunks/index-WrqH1wG8.mjs +0 -50
- package/dist/chunks/index-WrqH1wG8.mjs.map +0 -1
- package/dist/chunks/index-fsVJLutn.mjs +0 -118
- package/dist/chunks/index-fsVJLutn.mjs.map +0 -1
- package/dist/chunks/index-fx3KIap3.mjs +0 -50
- package/dist/chunks/index-fx3KIap3.mjs.map +0 -1
- package/dist/chunks/index-oOJo-ywB.mjs +0 -467
- package/dist/chunks/index-oOJo-ywB.mjs.map +0 -1
- package/dist/chunks/index-toj88jtL.mjs +0 -101
- package/dist/chunks/index-toj88jtL.mjs.map +0 -1
- package/dist/chunks/resolvePluginLocale-B4w1OkPy.mjs +0 -34
- package/dist/chunks/resolvePluginLocale-B4w1OkPy.mjs.map +0 -1
- package/dist/editor/CSSClassCollector.d.ts.map +0 -1
- package/dist/editor/ContentHTMLTypes.d.ts.map +0 -1
- package/dist/editor/DocumentParser.d.ts.map +0 -1
- package/dist/editor/DocumentSerializer.d.ts.map +0 -1
- package/dist/editor/MarkSerializer.d.ts.map +0 -1
- package/dist/editor/PaperSize.d.ts.map +0 -1
- package/dist/i18n/resolvePluginLocale.d.ts +0 -3
- package/dist/i18n/resolvePluginLocale.d.ts.map +0 -1
- package/dist/model/BuiltinSpecs.d.ts.map +0 -1
- package/dist/model/HTMLParser.d.ts.map +0 -1
- package/dist/model/NavigationUtils.d.ts.map +0 -1
- package/dist/view/Platform.d.ts.map +0 -1
- /package/dist/{input → model}/InputRule.d.ts +0 -0
- /package/dist/{input → model}/InputRuleRegistry.d.ts +0 -0
- /package/dist/{input → model}/Keymap.d.ts +0 -0
- /package/dist/{input → model}/KeymapRegistry.d.ts +0 -0
- /package/dist/{editor → model}/PaperSize.d.ts +0 -0
- /package/dist/{editor → serialization}/CSSClassCollector.d.ts +0 -0
- /package/dist/{editor → serialization}/ContentHTMLTypes.d.ts +0 -0
- /package/dist/{editor → serialization}/DocumentParser.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../../src/plugins/image/locales/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,QAAA,MAAM,MAAM,EAAE,WAmCb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../src/plugins/image/locales/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,QAAA,MAAM,MAAM,EAAE,WAoDb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/plugins/image/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,QAAA,MAAM,MAAM,EAAE,WAsCb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/plugins/image.mjs
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import { D, c, I } from "../chunks/index-DSAuGP4n.mjs";
|
|
2
|
-
export {
|
|
3
|
-
D as DEFAULT_IMAGE_KEYMAP,
|
|
4
|
-
c as IMAGE_UPLOAD_SERVICE,
|
|
5
|
-
I as ImagePlugin
|
|
6
|
-
};
|
|
1
|
+
import{a as t}from"../chunks/HTMLUtils-Cxy99Ak2.mjs";import{h as e,g as n,c as i,b as r}from"../chunks/Selection-DhbizDM4.mjs";import{a as o,g as a,s,b as c}from"../chunks/StyleRuntime-BmsLoEa8.mjs";import{c as l}from"../chunks/DomUtils-CznMAZZg.mjs";import{S as d,r as g}from"../chunks/PluginHelpers-CdPR0MuT.mjs";import{f as u}from"../chunks/ShortcutFormatting-BLKS0Gys.mjs";import{n as m,c as h,g as p}from"../chunks/Document-HC8s50qJ.mjs";import{n as f}from"../chunks/TypeBrands-Bp_Z_o5Y.mjs";import{g as b}from"../chunks/Platform-CU6itXZo.mjs";function v(t,i){const o=t.getState(),a=o.selection,s={src:i.src,alt:i.alt??"",align:i.align??"center",...void 0!==i.width?{width:i.width}:{},...void 0!==i.height?{height:i.height}:{}};if(n(a))return!1;const c=e(a)?a.nodeId:a.anchor.blockId,l=function(t,e){const n=t.getBlock(e);if("table_cell"===n?.type)return e;const i=t.getNodePath(e);if(i)for(const r of i){const e=t.getBlock(r);if("table_cell"===e?.type)return r}}(o,c);return l?function(t,e,n,i){const o=t.getNodePath(n);if(!o)return!1;const a=h(f("image"),[],void 0,i),s=t.getBlock(n);if(!s)return!1;const c=t.transaction("command"),l=p(s);for(let r=l.length-1;r>=0;r--){const t=s.children.findIndex(t=>m(t)&&t.id===l[r]?.id);-1!==t&&c.removeNode(o,t)}return c.insertNode(o,0,a),c.setSelection(r(a.id,[...o,a.id])),e.dispatch(c.build()),!0}(o,t,l,s):function(t,e,n,i){const o=t.doc.children.findIndex(t=>t.id===n);if(-1===o)return!1;const a=h(f("image"),[],void 0,i),s=h(f("paragraph")),c=t.transaction("command").insertNode([],o+1,a).insertNode([],o+2,s).setSelection(r(a.id,[])).build();return e.dispatch(c),!0}(o,t,c,s)}function x(t,n,i){const r=t.getState(),o=r.selection;if(!e(o))return!1;const a=r.getBlock(o.nodeId);if(!a||"image"!==a.type)return!1;const s=a.attrs?.width,c=a.attrs?.height;if(void 0===s||void 0===c)return!1;const l=c>0?s/c:1,d=Math.max(50,Math.min(i,s+n)),g=Math.round(d/l);return(d!==s||g!==c)&&function(t,n){const i=t.getState(),r=i.selection;if(!e(r))return!1;const o=i.getBlock(r.nodeId);if(!o||"image"!==o.type)return!1;const a=i.getNodePath(r.nodeId);if(!a)return!1;const s={...o.attrs??{},...n},c=i.transaction("command").setNodeAttr(a,s).build();return t.dispatch(c),!0}(t,{width:d,height:g})}const w={insertImage:"Insert Image",insertImageTooltip:"Insert Image",uploadFromComputer:"Upload from computer",uploadAria:"Upload image from computer",separator:"or",urlPlaceholder:"https://...",urlAria:"Image URL",insertButton:"Insert",insertAria:"Insert image",imageAria:(t,e,n)=>{const i=[t||"Image"];return void 0!==e&&void 0!==n&&i.push(`${e} by ${n} pixels`),i.join(", ")},resetToNaturalSize:"Image reset to natural size.",uploadFailed:"Upload failed.",uploading:"Uploading...",resizeHandleLabel:t=>`Resize ${t}`,imageSelected:"Image selected.",altTextPrefix:"Alt text: ",imageSizeAnnounce:(t,e)=>`Size: ${t} by ${e} pixels.`,resizeHint:(t,e)=>`${t} / ${e} to resize.`,imageResized:(t,e)=>`Image resized to ${t} by ${e} pixels.`,keyboardResizeHint:(t,e)=>`${t} / ${e} to resize`},z=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("../chunks/ar-C5JEHhw9.mjs"),"./locales/de.ts":()=>import("../chunks/de-xJh5C_pk.mjs"),"./locales/es.ts":()=>import("../chunks/es-DvgH3-WZ.mjs"),"./locales/fr.ts":()=>import("../chunks/fr-Ccaetiwi.mjs"),"./locales/hi.ts":()=>import("../chunks/hi-DVof3w0y.mjs"),"./locales/pt.ts":()=>import("../chunks/pt-DlNdH9pu.mjs"),"./locales/ru.ts":()=>import("../chunks/ru-CrbxCeQf.mjs"),"./locales/zh.ts":()=>import("../chunks/zh-C6YALJZt.mjs")});async function y(t){if("en"===t)return w;const e=z[`./locales/${t}.ts`];if(!e)return w;try{return(await e()).default}catch{return w}}const _={start:"notectl-image--start",center:"notectl-image--center",end:"notectl-image--end"},k={nw:"nwse-resize",ne:"nesw-resize",sw:"nesw-resize",se:"nwse-resize"},S={nw:-1,ne:1,sw:-1,se:1},I={nw:"top-left",ne:"top-right",sw:"bottom-left",se:"bottom-right"},L={nw:"top-right",ne:"top-left",sw:"bottom-right",se:"bottom-left"},A={nw:"nesw-resize",ne:"nwse-resize",sw:"nwse-resize",se:"nesw-resize"};function C(t,e,n=w){const i=(e?L:I)[t];return n.resizeHandleLabel(i)}let N=null;function j(){N&&(N.remove(),N=null)}function E(t,e,n,i=w){return(r,c,l)=>{const d=document.createElement("figure");d.className="notectl-image",d.setAttribute("data-block-id",r.id),d.setAttribute("data-void","true"),d.setAttribute("data-selectable","true");const g=document.createElement("div");g.className="notectl-image__container";const m=document.createElement("img");m.className="notectl-image__img",m.draggable=!1;const h=document.createElement("div");h.className="notectl-image__overlay",g.appendChild(m),g.appendChild(h),d.appendChild(g);let p=r.id,f=null;function v(t){const n=t.attrs?.src??"",r=t.attrs?.alt??"",a=t.attrs?.width,s=t.attrs?.height,c=t.attrs?.align??"center";m.src!==n&&(m.src=n),m.alt=r,o(m,"width",void 0!==a?`${a}px`:""),o(m,"height",void 0!==s?`${s}px`:"");for(const e of Object.values(_))d.classList.remove(e);const l=_[c];l&&d.classList.add(l);const g=e.get(t.id)??"idle",u="uploading"===g;h.classList.toggle("notectl-image__overlay--uploading",u),h.classList.toggle("notectl-image__overlay--error","error"===g),h.textContent=u?i.uploading:"error"===g?i.uploadFailed:"",u?d.setAttribute("aria-busy","true"):d.removeAttribute("aria-busy"),function(t){const e=t.attrs?.alt??"",n=t.attrs?.width,r=t.attrs?.height;d.setAttribute("aria-label",i.imageAria(e,n,r))}(t)}v(r);let x=!1;function w(e,n,i,r){let o=0,g=0,u=1,h=S[n];const p=e=>{const n=e.clientX-o,i=(a=g+n*h,Math.max(50,Math.min(t.maxWidth,a)));var a;const c=Math.round(i/u);s(m,{width:`${i}px`,height:`${c}px`}),r.textContent=`${Math.round(i)} × ${c}`},f=t=>{document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",f),d.classList.remove("notectl-image--resizing"),r.classList.remove("notectl-image__size-indicator--visible"),j();const e=Math.round(m.getBoundingClientRect().width),n=Math.round(e/u);!function(t,e,n){const i=c(),r=i.getBlock(t);if(!r)return;const o=r.attrs?.width,a=r.attrs?.height;if(o===e&&a===n)return;const s=i.getNodePath(t);if(!s)return;const d={...r.attrs??{},width:e,height:n},g=i.transaction("command").setNodeAttr(s,d).build();l(g)}(i,e,n),t.target?.releasePointerCapture?.(t.pointerId)};e.addEventListener("pointerdown",t=>{t.preventDefault(),t.stopPropagation();const e="rtl"===b(d);h=function(t,e){const n=S[t];return e?-n:n}(n,e),o=t.clientX,g=m.getBoundingClientRect().width;const i=m.getBoundingClientRect().height;u=i>0?g/i:1,d.classList.add("notectl-image--resizing"),r.textContent=`${Math.round(g)} × ${Math.round(i)}`,r.classList.add("notectl-image__size-indicator--visible"),function(t,e){j(),N=document.createElement("style");const n=e?a(e):void 0;n&&N.setAttribute("nonce",n),N.textContent=`*{cursor:${t}!important;user-select:none!important}`,document.head.appendChild(N)}(e?A[n]:k[n],d),t.target.setPointerCapture(t.pointerId),document.addEventListener("pointermove",p),document.addEventListener("pointerup",f)})}function z(){j(),f&&(f.remove(),f=null)}return m.addEventListener("load",()=>{if(x)return;const e=c(),n=e.getBlock(p);if(!n||"image"!==n.type)return;const i=void 0!==n.attrs?.width,r=void 0!==n.attrs?.height;if(i&&r)return void(x=!0);const o=m.naturalWidth,a=m.naturalHeight;if(0===o||0===a)return;const s=Math.min(o,t.maxWidth),d=o>0?a/o:1,g=Math.round(s*d),u=e.getNodePath(p);if(!u)return;const h={...n.attrs??{},width:s,height:g},f=e.transaction("command").setNodeAttr(u,h).build();l(f),x=!0}),{dom:d,contentDOM:null,update:t=>"image"===t.type&&(p=t.id,d.setAttribute("data-block-id",t.id),v(t),!0),selectNode(){d.classList.add("notectl-image--selected"),function(e){if(!t.resizable||f)return;f=document.createElement("div"),f.className="notectl-image__resize-overlay",f.setAttribute("data-notectl-no-print","");const r=document.createElement("div");r.className="notectl-image__size-indicator",f.appendChild(r);const o="rtl"===b(d),a=["nw","ne","sw","se"];for(const t of a){const n=document.createElement("div");n.className=`notectl-image__resize-handle notectl-image__resize-handle--${t}`,n.setAttribute("role","separator"),n.setAttribute("aria-label",C(t,o,i)),w(n,t,e,r),f.appendChild(n)}if(n){const t=function(t,e){const n=t.shrinkWidth??null,i=t.growWidth??null;return n&&i?e.keyboardResizeHint(u(n),u(i)):""}(n,i);if(t){const e=document.createElement("div");e.className="notectl-image__keyboard-hint",e.setAttribute("aria-hidden","true"),e.textContent=t,f.appendChild(e)}}g.appendChild(f)}(p)},deselectNode(){d.classList.remove("notectl-image--selected"),z()},destroy(){z()}}}}const $=new d("image:upload"),R={growWidth:"Mod-Shift-ArrowRight",shrinkWidth:"Mod-Shift-ArrowLeft",growWidthLarge:"Mod-Shift-Alt-ArrowRight",shrinkWidthLarge:"Mod-Shift-Alt-ArrowLeft",resetSize:"Mod-Shift-0"},M={maxWidth:800,maxFileSize:10485760,acceptedTypes:["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"],resizable:!0,resizeStep:10,resizeStepLarge:50};class T{id="image";name="Image";priority=45;config;resolvedKeymap;uploadStates=/* @__PURE__ */new Map;blobUrls=/* @__PURE__ */new Set;context=null;locale;constructor(t){this.config={...M,...t},this.resolvedKeymap={...R,...t?.keymap}}async init(t){this.locale=await g(t,this.config.locale,w,y),t.registerStyleSheet('\n/* Image */\n.notectl-image {\n\tmargin: 8px 0;\n\tuser-select: none;\n\tline-height: 0;\n}\n\n.notectl-image--center {\n\ttext-align: center;\n}\n\n.notectl-image--start {\n\ttext-align: start;\n}\n\n.notectl-image--end {\n\ttext-align: end;\n}\n\n.notectl-image__container {\n\tdisplay: inline-block;\n\tposition: relative;\n\tline-height: 0;\n}\n\n.notectl-image__img {\n\tdisplay: block;\n\tmax-width: 100%;\n\tborder-radius: 4px;\n}\n\n.notectl-image--selected .notectl-image__container {\n\toutline: 2px solid var(--notectl-primary);\n\toutline-offset: 2px;\n\tborder-radius: 6px;\n}\n\n/* Alignment toolbar (appears on image selection) */\n.notectl-image__align-toolbar {\n\tdisplay: flex;\n\tgap: 2px;\n\tposition: absolute;\n\ttop: -36px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tbackground: var(--notectl-surface-overlay);\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: 6px;\n\tpadding: 2px;\n\tbox-shadow: 0 2px 8px var(--notectl-shadow);\n\tz-index: 10;\n}\n\n.notectl-image__align-btn {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 28px;\n\theight: 28px;\n\tborder: none;\n\tbackground: transparent;\n\tborder-radius: 4px;\n\tcursor: pointer;\n\tcolor: var(--notectl-fg);\n}\n\n.notectl-image__align-btn:hover {\n\tbackground: var(--notectl-hover-bg);\n}\n\n.notectl-image__align-btn--active {\n\tbackground: var(--notectl-active-bg);\n\tcolor: var(--notectl-primary-fg);\n}\n\n.notectl-image__align-btn svg {\n\twidth: 16px;\n\theight: 16px;\n\tfill: currentColor;\n}\n\n/* Upload overlay */\n.notectl-image__overlay {\n\tposition: absolute;\n\tinset: 0;\n\tdisplay: none;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tborder-radius: 4px;\n\tfont-size: 13px;\n\tcolor: var(--notectl-fg-muted);\n}\n\n.notectl-image__overlay--uploading {\n\tdisplay: flex;\n}\n\n.notectl-image__overlay--error {\n\tdisplay: flex;\n\tbackground: var(--notectl-danger-muted);\n\tcolor: var(--notectl-danger);\n}\n\n/* Resize overlay + handles */\n.notectl-image__resize-overlay {\n\tposition: absolute;\n\tinset: 0;\n\tpointer-events: none;\n}\n\n.notectl-image__resize-handle {\n\tposition: absolute;\n\twidth: 10px;\n\theight: 10px;\n\tbackground: var(--notectl-bg);\n\tborder: 2px solid var(--notectl-primary);\n\tborder-radius: 50%;\n\tpointer-events: all;\n\tz-index: 2;\n\ttransition: transform 0.1s, background 0.1s;\n}\n\n.notectl-image__resize-handle:hover {\n\tbackground: var(--notectl-primary);\n\ttransform: scale(1.3);\n}\n\n.notectl-image--resizing .notectl-image__resize-handle {\n\tbackground: var(--notectl-primary);\n}\n\n.notectl-image__resize-handle--nw {\n\ttop: -5px;\n\tinset-inline-start: -5px;\n\tcursor: nwse-resize;\n}\n\n.notectl-image__resize-handle--ne {\n\ttop: -5px;\n\tinset-inline-end: -5px;\n\tcursor: nesw-resize;\n}\n\n.notectl-image__resize-handle--sw {\n\tbottom: -5px;\n\tinset-inline-start: -5px;\n\tcursor: nesw-resize;\n}\n\n.notectl-image__resize-handle--se {\n\tbottom: -5px;\n\tinset-inline-end: -5px;\n\tcursor: nwse-resize;\n}\n\n/* RTL cursor overrides — flip diagonal cursors when in RTL context */\n[dir="rtl"] .notectl-image__resize-handle--nw {\n\tcursor: nesw-resize;\n}\n\n[dir="rtl"] .notectl-image__resize-handle--ne {\n\tcursor: nwse-resize;\n}\n\n[dir="rtl"] .notectl-image__resize-handle--sw {\n\tcursor: nwse-resize;\n}\n\n[dir="rtl"] .notectl-image__resize-handle--se {\n\tcursor: nesw-resize;\n}\n\n/* Size indicator tooltip */\n.notectl-image__size-indicator {\n\tposition: absolute;\n\tbottom: -28px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tpadding: 2px 8px;\n\tbackground: var(--notectl-tooltip-bg);\n\tcolor: var(--notectl-tooltip-fg);\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tborder-radius: 4px;\n\twhite-space: nowrap;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity 0.15s;\n\tz-index: 3;\n}\n\n.notectl-image__size-indicator--visible {\n\topacity: 1;\n}\n\n/* Keyboard resize hint (shown on selection, hidden during drag) */\n.notectl-image__keyboard-hint {\n\tdisplay: none;\n\tposition: absolute;\n\tbottom: -28px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tpadding: 2px 8px;\n\tfont-size: 11px;\n\tcolor: var(--notectl-fg-muted);\n\twhite-space: nowrap;\n\tpointer-events: none;\n\tz-index: 3;\n}\n\n.notectl-image--selected .notectl-image__keyboard-hint {\n\tdisplay: block;\n}\n\n.notectl-image--resizing .notectl-image__keyboard-hint {\n\tdisplay: none;\n}\n\n/* Resizing feedback */\n.notectl-image--resizing .notectl-image__img {\n\topacity: 0.85;\n}\n'),this.context=t,this.registerNodeSpec(t),this.registerNodeView(t),function(t){t.registerCommand("insertImage",()=>v(t,{src:""})),t.registerCommand("removeImage",()=>function(t){const n=t.getState(),r=n.selection;if(!e(r))return!1;const o=n.getBlock(r.nodeId);if(!o||"image"!==o.type)return!1;const a=n.getNodePath(r.nodeId);if(!a||0===a.length)return!1;const s=a.slice(0,-1);let c;if(0===s.length)c=n.doc;else{const t=s[s.length-1];c=t?n.getBlock(t):void 0}if(!c)return!1;const l=c.children.findIndex(t=>m(t)&&t.id===r.nodeId);if(-1===l)return!1;const d=function(t,e,n){if(0===e.length){const e=t.doc.children,i=e.findIndex(t=>t.id===n),r=e[i+1]??e[i-1];return r?.id}return e[e.length-1]}(n,s,r.nodeId);if(!d)return!1;const g=n.transaction("command").removeNode(s,l).setSelection(i(d,0)).build();return t.dispatch(g),!0}(t))}(t),this.registerResizeCommands(t),this.registerResizeKeymaps(t),this.registerFileHandler(t),this.registerToolbarItem(t)}destroy(){for(const t of this.blobUrls)URL.revokeObjectURL(t);this.blobUrls.clear(),this.uploadStates.clear(),this.context=null}onStateChange(t,e,n){if(!this.context)return;for(const o of this.uploadStates.keys())e.getBlock(o)||this.uploadStates.delete(o);const i=this.isImageSelected(t),r=this.isImageSelected(e);!i&&r&&this.announceImageSelection(e)}registerNodeSpec(e){const n=this.locale;e.registerNodeSpec({type:"image",group:"block",isVoid:!0,selectable:!0,attrs:{src:{default:""},alt:{default:""},align:{default:"center"}},toDOM(t){const e=l("figure",t.id);e.className="notectl-image",e.setAttribute("data-void","true"),e.setAttribute("data-selectable","true");const i=document.createElement("div");i.className="notectl-image__container";const r=t.attrs?.alt??"",a=t.attrs?.width,s=t.attrs?.height,c=document.createElement("img");c.className="notectl-image__img",c.src=t.attrs?.src??"",c.alt=r,c.draggable=!1,void 0!==a&&o(c,"width",`${a}px`),void 0!==s&&o(c,"height",`${s}px`);const d={start:"notectl-image--start",center:"notectl-image--center",end:"notectl-image--end"}[t.attrs?.align??"center"];return d&&e.classList.add(d),e.setAttribute("aria-label",n.imageAria(r,a,s)),i.appendChild(c),e.appendChild(i),e},toHTML(e){const n=t(e.attrs?.src??""),i=t(e.attrs?.alt??""),r=e.attrs?.width,o=e.attrs?.height;return`<figure><img src="${n}" alt="${i}"${(void 0!==r?` width="${r}"`:"")+(void 0!==o?` height="${o}"`:"")}></figure>`},parseHTML:[{tag:"figure",getAttrs(t){const e=t.querySelector("img");if(!e)return!1;const n={src:e.getAttribute("src")??"",alt:e.getAttribute("alt")??"",align:"center"},i=e.getAttribute("width"),r=e.getAttribute("height");i&&(n.width=Number.parseInt(i,10)),r&&(n.height=Number.parseInt(r,10));const o=t.style?.textAlign??"";return"start"===o||"end"===o||"center"===o?n.align=o:"left"===o?n.align="start":"right"===o?n.align="end":t.classList.contains("notectl-align-start")||t.classList.contains("notectl-align-left")||t.classList.contains("notectl-image--start")||t.classList.contains("notectl-image--left")?n.align="start":t.classList.contains("notectl-align-end")||t.classList.contains("notectl-align-right")||t.classList.contains("notectl-image--end")||t.classList.contains("notectl-image--right")?n.align="end":t.classList.contains("notectl-align-center")&&(n.align="center"),n}},{tag:"img",getAttrs(t){const e={src:t.getAttribute("src")??"",alt:t.getAttribute("alt")??"",align:"center"},n=t.getAttribute("width"),i=t.getAttribute("height");return n&&(e.width=Number.parseInt(n,10)),i&&(e.height=Number.parseInt(i,10)),e}}],sanitize:{tags:["figure","img"],attrs:["src","alt","width","height","class","style"]}})}registerNodeView(t){t.registerNodeView("image",E(this.config,this.uploadStates,this.resolvedKeymap,this.locale))}registerResizeCommands(t){const n=this.config.resizeStep??10,i=this.config.resizeStepLarge??50,r=this.config.maxWidth;t.registerCommand("resizeImageGrow",()=>{const e=x(t,n,r);return e&&this.announceCurrentSize(t),e}),t.registerCommand("resizeImageShrink",()=>{const e=x(t,-n,r);return e&&this.announceCurrentSize(t),e}),t.registerCommand("resizeImageGrowLarge",()=>{const e=x(t,i,r);return e&&this.announceCurrentSize(t),e}),t.registerCommand("resizeImageShrinkLarge",()=>{const e=x(t,-i,r);return e&&this.announceCurrentSize(t),e}),t.registerCommand("resetImageSize",()=>{const n=function(t){const n=t.getState(),i=n.selection;if(!e(i))return!1;const r=n.getBlock(i.nodeId);if(!r||"image"!==r.type)return!1;const o=n.getNodePath(i.nodeId);if(!o)return!1;const a={...r.attrs??{}},s=Object.fromEntries(Object.entries(a).filter(([t])=>"width"!==t&&"height"!==t)),c=n.transaction("command").setNodeAttr(o,s).build();return t.dispatch(c),!0}(t);return n&&t.announce(this.locale.resetToNaturalSize),n})}registerResizeKeymaps(t){const e={},n={growWidth:"resizeImageGrow",shrinkWidth:"resizeImageShrink",growWidthLarge:"resizeImageGrowLarge",shrinkWidthLarge:"resizeImageShrinkLarge",resetSize:"resetImageSize"};for(const[i,r]of Object.entries(n)){const n=this.resolvedKeymap[i]??null;n&&(e[n]=()=>t.executeCommand(r))}Object.keys(e).length>0&&t.registerKeymap(e)}registerFileHandler(t){t.registerFileHandler("image/*",async(e,n)=>!!this.isAcceptedType(e.type)&&(this.handleFileInsert(t,e),!0))}handleFileInsert(t,n){if(n.size>this.config.maxFileSize)return;const i=URL.createObjectURL(n);if(this.blobUrls.add(i),!v(t,{src:i}))return URL.revokeObjectURL(i),void this.blobUrls.delete(i);const r=t.getState().selection;if(!e(r))return;const o=r.nodeId;this.uploadStates.set(o,"uploading"),t.getService($)?this.uploadFile(t,n,o,i):this.uploadStates.set(o,"complete")}async uploadFile(t,e,n,i){const r=t.getService($);if(r)try{const o=await r.upload(e);this.uploadStates.set(n,"complete");const a=t.getState(),s=a.getBlock(n);if(!s)return;const c=a.getNodePath(n);if(!c)return;const l={...s.attrs??{},src:o.url,...void 0!==o.width?{width:o.width}:{},...void 0!==o.height?{height:o.height}:{}},d=a.transaction("command").setNodeAttr(c,l).build();t.dispatch(d),URL.revokeObjectURL(i),this.blobUrls.delete(i)}catch{this.uploadStates.set(n,"error"),t.announce(this.locale.uploadFailed)}}registerToolbarItem(t){t.registerToolbarItem({id:"image",group:"insert",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>',label:this.locale.insertImage,tooltip:this.locale.insertImageTooltip,command:"insertImage",popupType:"custom",renderPopup:(t,e,n)=>{!function(t,e,n){o(t,"padding","8px"),o(t,"minWidth","240px"),function(t,e,n){const i=document.createElement("input");i.type="file",i.accept=n.acceptedTypes.join(","),c(i,"position:absolute;width:0;height:0;overflow:hidden;opacity:0;");const r=document.createElement("button");r.type="button",r.textContent=n.locale.uploadFromComputer,r.setAttribute("aria-label",n.locale.uploadAria),c(r,"display:block;width:100%;padding:8px 12px;cursor:pointer;text-align:center;box-sizing:border-box;border:1px solid var(--notectl-border);border-radius:4px;background:var(--notectl-surface-raised);color:var(--notectl-fg);"),r.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),i.click()}),i.addEventListener("change",()=>{const t=i.files?.[0];t&&(n.onFileInsert(e,t),n.onClose(),e.getContainer().focus())}),t.appendChild(i),t.appendChild(r)}(t,e,n),function(t,e){const n=document.createElement("div");c(n,"display:flex;align-items:center;margin:8px 0;color:var(--notectl-fg-muted);font-size:12px;");const i=document.createElement("span");c(i,"flex:1;height:1px;background:var(--notectl-border);");const r=document.createElement("span");r.textContent=e.separator,c(r,"padding:0 8px;");const o=document.createElement("span");c(o,"flex:1;height:1px;background:var(--notectl-border);"),n.appendChild(i),n.appendChild(r),n.appendChild(o),t.appendChild(n)}(t,n.locale),function(t,e,n){const i=document.createElement("input");i.type="url",i.placeholder=n.locale.urlPlaceholder,i.setAttribute("aria-label",n.locale.urlAria),c(i,"width:100%;padding:6px 8px;box-sizing:border-box;border:1px solid var(--notectl-border);border-radius:4px;background:var(--notectl-bg);color:var(--notectl-fg);");const r=document.createElement("button");r.type="button",r.textContent=n.locale.insertButton,r.setAttribute("aria-label",n.locale.insertAria),c(r,"width:100%;padding:8px 12px;margin-top:4px;cursor:pointer;border:1px solid var(--notectl-border);border-radius:4px;background:var(--notectl-surface-raised);color:var(--notectl-fg);");const o=()=>{const t=i.value.trim();t&&(v(e,{src:t}),n.onClose(),e.getContainer().focus())};r.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),o()}),i.addEventListener("keydown",t=>{"Enter"===t.key&&(t.preventDefault(),o())}),t.appendChild(i),t.appendChild(r),requestAnimationFrame(()=>i.focus())}(t,e,n)}(t,e,{acceptedTypes:this.config.acceptedTypes,locale:this.locale,onFileInsert:(t,e)=>this.handleFileInsert(t,e),onClose:n})}})}isAcceptedType(t){return this.config.acceptedTypes.some(e=>e===t||e.endsWith("/*")&&t.startsWith(e.slice(0,-1)))}isImageSelected(t){const n=t.selection;if(!e(n))return!1;const i=t.getBlock(n.nodeId);return"image"===i?.type}announceImageSelection(t){if(!this.context)return;const n=t.selection;if(!e(n))return;const i=t.getBlock(n.nodeId);if(!i||"image"!==i.type)return;const r=i.attrs?.alt??"",o=i.attrs?.width,a=i.attrs?.height,s=[this.locale.imageSelected];r&&s.push(`${this.locale.altTextPrefix}${r}.`),void 0!==o&&void 0!==a&&s.push(this.locale.imageSizeAnnounce(o,a));const c=this.resolvedKeymap.shrinkWidth??null,l=this.resolvedKeymap.growWidth??null;c&&l&&s.push(this.locale.resizeHint(u(c),u(l))),this.context.announce(s.join(" "))}announceCurrentSize(t){const n=t.getState(),i=n.selection;if(!e(i))return;const r=n.getBlock(i.nodeId);if(!r||"image"!==r.type)return;const o=r.attrs?.width,a=r.attrs?.height;void 0!==o&&void 0!==a&&t.announce(this.locale.imageResized(o,a))}}export{R as DEFAULT_IMAGE_KEYMAP,w as IMAGE_LOCALE_EN,$ as IMAGE_UPLOAD_SERVICE,T as ImagePlugin,y as loadImageLocale};
|
|
7
2
|
//# sourceMappingURL=image.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"image.mjs","sources":["../../src/plugins/image/ImageCommands.ts","../../src/plugins/image/ImageLocale.ts","../../src/plugins/image/ImageNodeView.ts","../../src/plugins/image/ImageUpload.ts","../../src/plugins/image/ImagePlugin.ts","../../src/editor/styles/image.ts","../../src/plugins/image/ImagePopup.ts"],"sourcesContent":["/**\n * Image plugin commands: insert, remove, and attribute updates.\n * Supports both root-level and nested contexts (e.g. images inside table cells).\n */\n\nimport type { BlockAttrs, BlockNode } from '../../model/Document.js';\nimport { createBlockNode, getBlockChildren, isBlockNode } from '../../model/Document.js';\nimport {\n\tcreateCollapsedSelection,\n\tcreateNodeSelection,\n\tisGapCursor,\n\tisNodeSelection,\n} from '../../model/Selection.js';\nimport type { BlockId } from '../../model/TypeBrands.js';\nimport { nodeType } from '../../model/TypeBrands.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport type { PluginContext } from '../Plugin.js';\nimport type { ImageAttrs } from './ImageUpload.js';\n\n/**\n * Inserts an image block. When the cursor is inside a table cell,\n * the image is inserted as a child of the cell. Otherwise it is\n * inserted after the current block at document root.\n */\nexport function insertImage(\n\tcontext: PluginContext,\n\tattrs: Partial<ImageAttrs> & { readonly src: string },\n): boolean {\n\tconst state = context.getState();\n\tconst sel = state.selection;\n\n\tconst imageAttrs: BlockAttrs = {\n\t\tsrc: attrs.src,\n\t\talt: attrs.alt ?? '',\n\t\talign: attrs.align ?? 'center',\n\t\t...(attrs.width !== undefined ? { width: attrs.width } : {}),\n\t\t...(attrs.height !== undefined ? { height: attrs.height } : {}),\n\t};\n\n\tif (isGapCursor(sel)) return false;\n\n\tconst anchorBlockId: BlockId = isNodeSelection(sel) ? sel.nodeId : sel.anchor.blockId;\n\n\t// Check if we're inside a table cell\n\tconst cellId: BlockId | undefined = findTableCellAncestor(state, anchorBlockId);\n\tif (cellId) {\n\t\treturn insertImageIntoCell(state, context, cellId, imageAttrs);\n\t}\n\n\treturn insertImageAtRoot(state, context, anchorBlockId, imageAttrs);\n}\n\n/** Finds a table_cell ancestor for the given block (or the block itself). */\nfunction findTableCellAncestor(state: EditorState, bid: BlockId): BlockId | undefined {\n\tconst block: BlockNode | undefined = state.getBlock(bid);\n\tif (block?.type === 'table_cell') return bid;\n\n\tconst path: BlockId[] | undefined = state.getNodePath(bid);\n\tif (!path) return undefined;\n\n\tfor (const id of path) {\n\t\tconst node: BlockNode | undefined = state.getBlock(id);\n\t\tif (node?.type === 'table_cell') return id;\n\t}\n\treturn undefined;\n}\n\n/** Inserts an image at document root after the anchor block. */\nfunction insertImageAtRoot(\n\tstate: EditorState,\n\tcontext: PluginContext,\n\tanchorBlockId: BlockId,\n\timageAttrs: BlockAttrs,\n): boolean {\n\tconst blockIndex: number = state.doc.children.findIndex((b) => b.id === anchorBlockId);\n\tif (blockIndex === -1) return false;\n\n\tconst imageBlock: BlockNode = createBlockNode(nodeType('image'), [], undefined, imageAttrs);\n\tconst newParagraph: BlockNode = createBlockNode(nodeType('paragraph'));\n\n\tconst tr = state\n\t\t.transaction('command')\n\t\t.insertNode([], blockIndex + 1, imageBlock)\n\t\t.insertNode([], blockIndex + 2, newParagraph)\n\t\t.setSelection(createNodeSelection(imageBlock.id, []))\n\t\t.build();\n\n\tcontext.dispatch(tr);\n\treturn true;\n}\n\n/** Inserts an image as a child of a table cell. */\nfunction insertImageIntoCell(\n\tstate: EditorState,\n\tcontext: PluginContext,\n\tcellId: BlockId,\n\timageAttrs: BlockAttrs,\n): boolean {\n\tconst cellPath: BlockId[] | undefined = state.getNodePath(cellId);\n\tif (!cellPath) return false;\n\n\tconst imageBlock: BlockNode = createBlockNode(nodeType('image'), [], undefined, imageAttrs);\n\n\t// Remove existing block children first (if any)\n\tconst cell: BlockNode | undefined = state.getBlock(cellId);\n\tif (!cell) return false;\n\n\tconst builder = state.transaction('command');\n\tconst blockChildren: readonly BlockNode[] = getBlockChildren(cell);\n\tfor (let i = blockChildren.length - 1; i >= 0; i--) {\n\t\t// Find the raw index in children array\n\t\tconst rawIndex: number = cell.children.findIndex(\n\t\t\t(c) => isBlockNode(c) && c.id === blockChildren[i]?.id,\n\t\t);\n\t\tif (rawIndex !== -1) {\n\t\t\tbuilder.removeNode(cellPath, rawIndex);\n\t\t}\n\t}\n\n\t// Insert image at index 0 (before any text nodes)\n\tbuilder.insertNode(cellPath, 0, imageBlock);\n\tbuilder.setSelection(createNodeSelection(imageBlock.id, [...cellPath, imageBlock.id]));\n\n\tcontext.dispatch(builder.build());\n\treturn true;\n}\n\n/** Removes the currently selected image block (works for nested images too). */\nexport function removeImage(context: PluginContext): boolean {\n\tconst state = context.getState();\n\tconst sel = state.selection;\n\tif (!isNodeSelection(sel)) return false;\n\n\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\tif (!block || block.type !== 'image') return false;\n\n\tconst nodePath: BlockId[] | undefined = state.getNodePath(sel.nodeId);\n\tif (!nodePath || nodePath.length === 0) return false;\n\n\t// parentPath = all IDs except the last (the image itself)\n\tconst parentPath: BlockId[] = nodePath.slice(0, -1);\n\n\t// Find the index of the image in its parent's children\n\tlet parent: BlockNode | { readonly children: readonly BlockNode[] } | undefined;\n\tif (parentPath.length === 0) {\n\t\tparent = state.doc;\n\t} else {\n\t\tconst parentId: BlockId | undefined = parentPath[parentPath.length - 1];\n\t\tparent = parentId ? state.getBlock(parentId) : undefined;\n\t}\n\tif (!parent) return false;\n\n\tconst imageIndex: number = parent.children.findIndex(\n\t\t(c) => isBlockNode(c) && c.id === sel.nodeId,\n\t);\n\tif (imageIndex === -1) return false;\n\n\t// Determine where to place the cursor after removal\n\tconst selectionTarget: BlockId | undefined = findSelectionTargetAfterRemoval(\n\t\tstate,\n\t\tparentPath,\n\t\tsel.nodeId,\n\t);\n\tif (!selectionTarget) return false;\n\n\tconst tr = state\n\t\t.transaction('command')\n\t\t.removeNode(parentPath, imageIndex)\n\t\t.setSelection(createCollapsedSelection(selectionTarget, 0))\n\t\t.build();\n\n\tcontext.dispatch(tr);\n\treturn true;\n}\n\n/** Finds a suitable block to select after removing an image. */\nfunction findSelectionTargetAfterRemoval(\n\tstate: EditorState,\n\tparentPath: readonly BlockId[],\n\tremovedId: BlockId,\n): BlockId | undefined {\n\tif (parentPath.length === 0) {\n\t\t// Root level: select adjacent block\n\t\tconst rootChildren: readonly BlockNode[] = state.doc.children;\n\t\tconst idx: number = rootChildren.findIndex((b) => b.id === removedId);\n\t\tconst adjacent: BlockNode | undefined = rootChildren[idx + 1] ?? rootChildren[idx - 1];\n\t\treturn adjacent?.id;\n\t}\n\n\t// Nested (e.g. inside table cell): select the cell itself\n\tconst cellId: BlockId | undefined = parentPath[parentPath.length - 1];\n\treturn cellId;\n}\n\n/** Updates attributes on the currently selected image block. */\nexport function setImageAttr(context: PluginContext, attrs: Partial<ImageAttrs>): boolean {\n\tconst state = context.getState();\n\tconst sel = state.selection;\n\tif (!isNodeSelection(sel)) return false;\n\n\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\tif (!block || block.type !== 'image') return false;\n\n\tconst path: BlockId[] | undefined = state.getNodePath(sel.nodeId);\n\tif (!path) return false;\n\n\tconst merged: BlockAttrs = { ...(block.attrs ?? {}), ...attrs };\n\tconst tr = state.transaction('command').setNodeAttr(path, merged).build();\n\n\tcontext.dispatch(tr);\n\treturn true;\n}\n\n/** Minimum image width in pixels (shared with NodeView). */\nexport const MIN_IMAGE_WIDTH = 50;\n\n/**\n * Resizes the currently selected image by a pixel delta, preserving aspect ratio.\n * Returns false if no image is selected or the image has no width/height attributes.\n */\nexport function resizeImageByDelta(\n\tcontext: PluginContext,\n\tdelta: number,\n\tmaxWidth: number,\n): boolean {\n\tconst state = context.getState();\n\tconst sel = state.selection;\n\tif (!isNodeSelection(sel)) return false;\n\n\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\tif (!block || block.type !== 'image') return false;\n\n\tconst currentWidth: number | undefined = block.attrs?.width as number | undefined;\n\tconst currentHeight: number | undefined = block.attrs?.height as number | undefined;\n\tif (currentWidth === undefined || currentHeight === undefined) return false;\n\n\tconst aspectRatio: number = currentHeight > 0 ? currentWidth / currentHeight : 1;\n\tconst clampedWidth: number = Math.max(MIN_IMAGE_WIDTH, Math.min(maxWidth, currentWidth + delta));\n\tconst newHeight: number = Math.round(clampedWidth / aspectRatio);\n\n\tif (clampedWidth === currentWidth && newHeight === currentHeight) return false;\n\n\treturn setImageAttr(context, { width: clampedWidth, height: newHeight });\n}\n\n/** Resets the currently selected image to its natural size by removing width/height. */\nexport function resetImageSize(context: PluginContext): boolean {\n\tconst state = context.getState();\n\tconst sel = state.selection;\n\tif (!isNodeSelection(sel)) return false;\n\n\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\tif (!block || block.type !== 'image') return false;\n\n\tconst path: BlockId[] | undefined = state.getNodePath(sel.nodeId);\n\tif (!path) return false;\n\n\tconst attrs: BlockAttrs = { ...(block.attrs ?? {}) };\n\tconst cleaned: BlockAttrs = Object.fromEntries(\n\t\tObject.entries(attrs).filter(([k]) => k !== 'width' && k !== 'height'),\n\t);\n\n\tconst tr = state.transaction('command').setNodeAttr(path, cleaned).build();\n\tcontext.dispatch(tr);\n\treturn true;\n}\n\n/** Registers all image commands on the plugin context. */\nexport function registerImageCommands(context: PluginContext): void {\n\tcontext.registerCommand('insertImage', () => {\n\t\treturn insertImage(context, { src: '' });\n\t});\n\n\tcontext.registerCommand('removeImage', () => {\n\t\treturn removeImage(context);\n\t});\n}\n","/** Locale interface and default English locale for the ImagePlugin. */\n\n// --- Locale Interface ---\n\nexport interface ImageLocale {\n\treadonly insertImage: string;\n\treadonly insertImageTooltip: string;\n\treadonly uploadFromComputer: string;\n\treadonly uploadAria: string;\n\treadonly separator: string;\n\treadonly urlPlaceholder: string;\n\treadonly urlAria: string;\n\treadonly insertButton: string;\n\treadonly insertAria: string;\n\treadonly imageAria: (alt: string, width?: number, height?: number) => string;\n\treadonly resetToNaturalSize: string;\n\treadonly uploadFailed: string;\n\treadonly uploading: string;\n\treadonly resizeHandleLabel: (position: string) => string;\n\treadonly imageSelected: string;\n\treadonly altTextPrefix: string;\n\treadonly imageSizeAnnounce: (w: number, h: number) => string;\n\treadonly resizeHint: (shrink: string, grow: string) => string;\n\treadonly imageResized: (w: number, h: number) => string;\n\treadonly keyboardResizeHint: (shrink: string, grow: string) => string;\n}\n\n// --- Default English Locale ---\n\nexport const IMAGE_LOCALE_EN: ImageLocale = {\n\tinsertImage: 'Insert Image',\n\tinsertImageTooltip: 'Insert Image',\n\tuploadFromComputer: 'Upload from computer',\n\tuploadAria: 'Upload image from computer',\n\tseparator: 'or',\n\turlPlaceholder: 'https://...',\n\turlAria: 'Image URL',\n\tinsertButton: 'Insert',\n\tinsertAria: 'Insert image',\n\timageAria: (alt: string, width?: number, height?: number) => {\n\t\tconst parts: string[] = [alt || 'Image'];\n\t\tif (width !== undefined && height !== undefined) {\n\t\t\tparts.push(`${width} by ${height} pixels`);\n\t\t}\n\t\treturn parts.join(', ');\n\t},\n\tresetToNaturalSize: 'Image reset to natural size.',\n\tuploadFailed: 'Upload failed.',\n\tuploading: 'Uploading...',\n\tresizeHandleLabel: (position: string) => `Resize ${position}`,\n\timageSelected: 'Image selected.',\n\taltTextPrefix: 'Alt text: ',\n\timageSizeAnnounce: (w: number, h: number) => `Size: ${w} by ${h} pixels.`,\n\tresizeHint: (shrink: string, grow: string) => `${shrink} / ${grow} to resize.`,\n\timageResized: (w: number, h: number) => `Image resized to ${w} by ${h} pixels.`,\n\tkeyboardResizeHint: (shrink: string, grow: string) => `${shrink} / ${grow} to resize`,\n};\n\n// --- Lazy Locale Loader ---\n\nconst localeModules: Record<string, () => Promise<{ default: ImageLocale }>> = import.meta.glob<{\n\tdefault: ImageLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadImageLocale(lang: string): Promise<ImageLocale> {\n\tif (lang === 'en') return IMAGE_LOCALE_EN;\n\tconst loader = localeModules[`./locales/${lang}.ts`];\n\tif (!loader) return IMAGE_LOCALE_EN;\n\ttry {\n\t\tconst mod = await loader();\n\t\treturn mod.default;\n\t} catch {\n\t\treturn IMAGE_LOCALE_EN;\n\t}\n}\n","/**\n * NodeView factory for image blocks.\n * Renders <figure> with <img>, handles selection state, upload overlay,\n * resize with 4 corner handles + live size indicator, and a keyboard-hint\n * showing resize shortcuts when the image is selected.\n */\n\nimport type { BlockAttrs, BlockNode } from '../../model/Document.js';\nimport type { BlockId } from '../../model/TypeBrands.js';\nimport { getTextDirection } from '../../platform/Platform.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport type { Transaction } from '../../state/Transaction.js';\nimport {\n\tgetStyleNonceForNode,\n\tsetStyleProperties,\n\tsetStyleProperty,\n} from '../../style/StyleRuntime.js';\nimport type { NodeView, NodeViewFactory } from '../../view/NodeView.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport { IMAGE_LOCALE_EN, type ImageLocale } from './ImageLocale.js';\nimport type { ImageKeymap, ImagePluginConfig, UploadState } from './ImageUpload.js';\n\nconst ALIGNMENT_CLASSES: Record<string, string> = {\n\tstart: 'notectl-image--start',\n\tcenter: 'notectl-image--center',\n\tend: 'notectl-image--end',\n};\n\nconst MIN_IMAGE_WIDTH = 50;\n\ntype HandlePosition = 'nw' | 'ne' | 'sw' | 'se';\n\nconst HANDLE_CURSORS: Readonly<Record<HandlePosition, string>> = {\n\tnw: 'nwse-resize',\n\tne: 'nesw-resize',\n\tsw: 'nesw-resize',\n\tse: 'nwse-resize',\n};\n\n/** +1 means dragging right increases width; -1 means dragging left does. */\nconst HANDLE_X_SIGN: Readonly<Record<HandlePosition, 1 | -1>> = {\n\tnw: -1,\n\tne: 1,\n\tsw: -1,\n\tse: 1,\n};\n\nconst HANDLE_POSITIONS_LTR: Readonly<Record<HandlePosition, string>> = {\n\tnw: 'top-left',\n\tne: 'top-right',\n\tsw: 'bottom-left',\n\tse: 'bottom-right',\n};\n\nconst HANDLE_POSITIONS_RTL: Readonly<Record<HandlePosition, string>> = {\n\tnw: 'top-right',\n\tne: 'top-left',\n\tsw: 'bottom-right',\n\tse: 'bottom-left',\n};\n\nconst RTL_CURSOR_MAP: Readonly<Record<HandlePosition, string>> = {\n\tnw: 'nesw-resize',\n\tne: 'nwse-resize',\n\tsw: 'nwse-resize',\n\tse: 'nesw-resize',\n};\n\n/** Returns the direction-aware ARIA label for a resize handle. */\nexport function getHandleLabel(\n\tposition: HandlePosition,\n\tisRtl: boolean,\n\tlocale: ImageLocale = IMAGE_LOCALE_EN,\n): string {\n\tconst positionName: string = (isRtl ? HANDLE_POSITIONS_RTL : HANDLE_POSITIONS_LTR)[position];\n\treturn locale.resizeHandleLabel(positionName);\n}\n\n/** Returns the X-sign for resize drag, flipped in RTL. */\nexport function getResizeXSign(position: HandlePosition, isRtl: boolean): 1 | -1 {\n\tconst sign: 1 | -1 = HANDLE_X_SIGN[position];\n\treturn isRtl ? (-sign as 1 | -1) : sign;\n}\n\n// --- Global cursor override during resize ---\n\nlet activeCursorStyle: HTMLStyleElement | null = null;\n\nfunction setGlobalResizeCursor(cursor: string, referenceNode?: Node): void {\n\tclearGlobalResizeCursor();\n\tactiveCursorStyle = document.createElement('style');\n\tconst nonce = referenceNode ? getStyleNonceForNode(referenceNode) : undefined;\n\tif (nonce) {\n\t\tactiveCursorStyle.setAttribute('nonce', nonce);\n\t}\n\tactiveCursorStyle.textContent = `*{cursor:${cursor}!important;user-select:none!important}`;\n\tdocument.head.appendChild(activeCursorStyle);\n}\n\nfunction clearGlobalResizeCursor(): void {\n\tif (activeCursorStyle) {\n\t\tactiveCursorStyle.remove();\n\t\tactiveCursorStyle = null;\n\t}\n}\n\n/** Builds the keyboard-hint text from the resolved keymap. */\nfunction buildKeyboardHintText(\n\tresolvedKeymap: Readonly<Record<keyof ImageKeymap, string | null>>,\n\tlocale: ImageLocale,\n): string {\n\tconst shrink: string | null = resolvedKeymap.shrinkWidth ?? null;\n\tconst grow: string | null = resolvedKeymap.growWidth ?? null;\n\tif (!shrink || !grow) return '';\n\treturn locale.keyboardResizeHint(formatShortcut(shrink), formatShortcut(grow));\n}\n\n/** Creates a NodeViewFactory for image blocks. */\nexport function createImageNodeViewFactory(\n\tconfig: ImagePluginConfig,\n\tuploadStates: Map<BlockId, UploadState>,\n\tresolvedKeymap?: Readonly<Record<keyof ImageKeymap, string | null>>,\n\tlocale: ImageLocale = IMAGE_LOCALE_EN,\n): NodeViewFactory {\n\treturn (\n\t\tnode: BlockNode,\n\t\tgetState: () => EditorState,\n\t\tdispatch: (tr: Transaction) => void,\n\t): NodeView => {\n\t\t// --- DOM Construction ---\n\t\tconst figure: HTMLElement = document.createElement('figure');\n\t\tfigure.className = 'notectl-image';\n\t\tfigure.setAttribute('data-block-id', node.id);\n\t\tfigure.setAttribute('data-void', 'true');\n\t\tfigure.setAttribute('data-selectable', 'true');\n\n\t\tconst container: HTMLDivElement = document.createElement('div');\n\t\tcontainer.className = 'notectl-image__container';\n\n\t\tconst img: HTMLImageElement = document.createElement('img');\n\t\timg.className = 'notectl-image__img';\n\t\timg.draggable = false;\n\n\t\tconst overlay: HTMLDivElement = document.createElement('div');\n\t\toverlay.className = 'notectl-image__overlay';\n\n\t\tcontainer.appendChild(img);\n\t\tcontainer.appendChild(overlay);\n\t\tfigure.appendChild(container);\n\n\t\tlet currentNodeId: BlockId = node.id;\n\t\tlet resizeOverlay: HTMLDivElement | null = null;\n\n\t\t// --- ARIA Label ---\n\n\t\tfunction updateAriaLabel(n: BlockNode): void {\n\t\t\tconst alt: string = (n.attrs?.alt as string | undefined) ?? '';\n\t\t\tconst width: number | undefined = n.attrs?.width as number | undefined;\n\t\t\tconst height: number | undefined = n.attrs?.height as number | undefined;\n\t\t\tfigure.setAttribute('aria-label', locale.imageAria(alt, width, height));\n\t\t}\n\n\t\t// --- Attribute Application ---\n\n\t\tfunction applyAttrs(n: BlockNode): void {\n\t\t\tconst src: string = (n.attrs?.src as string | undefined) ?? '';\n\t\t\tconst alt: string = (n.attrs?.alt as string | undefined) ?? '';\n\t\t\tconst width: number | undefined = n.attrs?.width as number | undefined;\n\t\t\tconst height: number | undefined = n.attrs?.height as number | undefined;\n\t\t\tconst align: string = (n.attrs?.align as string | undefined) ?? 'center';\n\n\t\t\t// Only update src when it changes to avoid re-triggering load events\n\t\t\tif (img.src !== src) img.src = src;\n\t\t\timg.alt = alt;\n\n\t\t\tif (width !== undefined) {\n\t\t\t\tsetStyleProperty(img, 'width', `${width}px`);\n\t\t\t} else {\n\t\t\t\tsetStyleProperty(img, 'width', '');\n\t\t\t}\n\t\t\tif (height !== undefined) {\n\t\t\t\tsetStyleProperty(img, 'height', `${height}px`);\n\t\t\t} else {\n\t\t\t\tsetStyleProperty(img, 'height', '');\n\t\t\t}\n\n\t\t\tfor (const cls of Object.values(ALIGNMENT_CLASSES)) {\n\t\t\t\tfigure.classList.remove(cls);\n\t\t\t}\n\t\t\tconst alignClass: string | undefined = ALIGNMENT_CLASSES[align];\n\t\t\tif (alignClass) {\n\t\t\t\tfigure.classList.add(alignClass);\n\t\t\t}\n\n\t\t\tconst uploadState: UploadState = uploadStates.get(n.id) ?? 'idle';\n\t\t\tconst isUploading: boolean = uploadState === 'uploading';\n\t\t\toverlay.classList.toggle('notectl-image__overlay--uploading', isUploading);\n\t\t\toverlay.classList.toggle('notectl-image__overlay--error', uploadState === 'error');\n\n\t\t\tif (isUploading) {\n\t\t\t\toverlay.textContent = locale.uploading;\n\t\t\t} else if (uploadState === 'error') {\n\t\t\t\toverlay.textContent = locale.uploadFailed;\n\t\t\t} else {\n\t\t\t\toverlay.textContent = '';\n\t\t\t}\n\n\t\t\tif (isUploading) {\n\t\t\t\tfigure.setAttribute('aria-busy', 'true');\n\t\t\t} else {\n\t\t\t\tfigure.removeAttribute('aria-busy');\n\t\t\t}\n\n\t\t\tupdateAriaLabel(n);\n\t\t}\n\n\t\tapplyAttrs(node);\n\n\t\t// --- Commit natural dimensions on first load ---\n\n\t\tlet dimensionsCommitted = false;\n\n\t\timg.addEventListener('load', () => {\n\t\t\tif (dimensionsCommitted) return;\n\n\t\t\tconst state: EditorState = getState();\n\t\t\tconst block: BlockNode | undefined = state.getBlock(currentNodeId);\n\t\t\tif (!block || block.type !== 'image') return;\n\n\t\t\tconst hasWidth: boolean = block.attrs?.width !== undefined;\n\t\t\tconst hasHeight: boolean = block.attrs?.height !== undefined;\n\t\t\tif (hasWidth && hasHeight) {\n\t\t\t\tdimensionsCommitted = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst naturalW: number = img.naturalWidth;\n\t\t\tconst naturalH: number = img.naturalHeight;\n\t\t\tif (naturalW === 0 || naturalH === 0) return;\n\n\t\t\tconst clampedW: number = Math.min(naturalW, config.maxWidth);\n\t\t\tconst ratio: number = naturalW > 0 ? naturalH / naturalW : 1;\n\t\t\tconst clampedH: number = Math.round(clampedW * ratio);\n\n\t\t\tconst path: BlockId[] | undefined = state.getNodePath(currentNodeId);\n\t\t\tif (!path) return;\n\n\t\t\tconst merged: BlockAttrs = {\n\t\t\t\t...(block.attrs ?? {}),\n\t\t\t\twidth: clampedW,\n\t\t\t\theight: clampedH,\n\t\t\t};\n\n\t\t\tconst tr: Transaction = state.transaction('command').setNodeAttr(path, merged).build();\n\t\t\tdispatch(tr);\n\t\t\tdimensionsCommitted = true;\n\t\t});\n\n\t\t// --- Resize Logic ---\n\n\t\tfunction clampWidth(width: number): number {\n\t\t\treturn Math.max(MIN_IMAGE_WIDTH, Math.min(config.maxWidth, width));\n\t\t}\n\n\t\tfunction commitResize(nodeId: BlockId, width: number, height: number): void {\n\t\t\tconst state: EditorState = getState();\n\t\t\tconst block: BlockNode | undefined = state.getBlock(nodeId);\n\t\t\tif (!block) return;\n\n\t\t\tconst prevWidth: number | undefined = block.attrs?.width as number | undefined;\n\t\t\tconst prevHeight: number | undefined = block.attrs?.height as number | undefined;\n\t\t\tif (prevWidth === width && prevHeight === height) return;\n\n\t\t\tconst path: BlockId[] | undefined = state.getNodePath(nodeId);\n\t\t\tif (!path) return;\n\n\t\t\tconst merged: BlockAttrs = {\n\t\t\t\t...(block.attrs ?? {}),\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t};\n\n\t\t\tconst tr: Transaction = state.transaction('command').setNodeAttr(path, merged).build();\n\t\t\tdispatch(tr);\n\t\t}\n\n\t\tfunction attachHandleListeners(\n\t\t\thandle: HTMLDivElement,\n\t\t\tposition: HandlePosition,\n\t\t\tnodeId: BlockId,\n\t\t\tsizeIndicator: HTMLDivElement,\n\t\t): void {\n\t\t\tlet startX = 0;\n\t\t\tlet startWidth = 0;\n\t\t\tlet aspectRatio = 1;\n\t\t\tlet xSign: 1 | -1 = HANDLE_X_SIGN[position];\n\n\t\t\tconst onPointerMove = (e: PointerEvent): void => {\n\t\t\t\tconst deltaX: number = e.clientX - startX;\n\t\t\t\tconst newWidth: number = clampWidth(startWidth + deltaX * xSign);\n\t\t\t\tconst newHeight: number = Math.round(newWidth / aspectRatio);\n\n\t\t\t\tsetStyleProperties(img, {\n\t\t\t\t\twidth: `${newWidth}px`,\n\t\t\t\t\theight: `${newHeight}px`,\n\t\t\t\t});\n\n\t\t\t\tsizeIndicator.textContent = `${Math.round(newWidth)} \\u00D7 ${newHeight}`;\n\t\t\t};\n\n\t\t\tconst onPointerUp = (e: PointerEvent): void => {\n\t\t\t\tdocument.removeEventListener('pointermove', onPointerMove);\n\t\t\t\tdocument.removeEventListener('pointerup', onPointerUp);\n\n\t\t\t\tfigure.classList.remove('notectl-image--resizing');\n\t\t\t\tsizeIndicator.classList.remove('notectl-image__size-indicator--visible');\n\t\t\t\tclearGlobalResizeCursor();\n\n\t\t\t\tconst finalWidth: number = Math.round(img.getBoundingClientRect().width);\n\t\t\t\tconst finalHeight: number = Math.round(finalWidth / aspectRatio);\n\n\t\t\t\tcommitResize(nodeId, finalWidth, finalHeight);\n\n\t\t\t\t(e.target as HTMLElement | null)?.releasePointerCapture?.(e.pointerId);\n\t\t\t};\n\n\t\t\thandle.addEventListener('pointerdown', (e: PointerEvent) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\n\t\t\t\tconst isRtl: boolean = getTextDirection(figure) === 'rtl';\n\t\t\t\txSign = getResizeXSign(position, isRtl);\n\n\t\t\t\tstartX = e.clientX;\n\t\t\t\tstartWidth = img.getBoundingClientRect().width;\n\t\t\t\tconst imgHeight: number = img.getBoundingClientRect().height;\n\t\t\t\taspectRatio = imgHeight > 0 ? startWidth / imgHeight : 1;\n\n\t\t\t\tfigure.classList.add('notectl-image--resizing');\n\t\t\t\tsizeIndicator.textContent = `${Math.round(startWidth)} \\u00D7 ${Math.round(imgHeight)}`;\n\t\t\t\tsizeIndicator.classList.add('notectl-image__size-indicator--visible');\n\t\t\t\tconst cursor: string = isRtl ? RTL_CURSOR_MAP[position] : HANDLE_CURSORS[position];\n\t\t\t\tsetGlobalResizeCursor(cursor, figure);\n\n\t\t\t\t(e.target as HTMLElement).setPointerCapture(e.pointerId);\n\t\t\t\tdocument.addEventListener('pointermove', onPointerMove);\n\t\t\t\tdocument.addEventListener('pointerup', onPointerUp);\n\t\t\t});\n\t\t}\n\n\t\tfunction createResizeOverlay(nodeId: BlockId): void {\n\t\t\tif (!config.resizable || resizeOverlay) return;\n\n\t\t\tresizeOverlay = document.createElement('div');\n\t\t\tresizeOverlay.className = 'notectl-image__resize-overlay';\n\t\t\tresizeOverlay.setAttribute('data-notectl-no-print', '');\n\n\t\t\tconst sizeIndicator: HTMLDivElement = document.createElement('div');\n\t\t\tsizeIndicator.className = 'notectl-image__size-indicator';\n\t\t\tresizeOverlay.appendChild(sizeIndicator);\n\n\t\t\tconst isRtl: boolean = getTextDirection(figure) === 'rtl';\n\t\t\tconst positions: readonly HandlePosition[] = ['nw', 'ne', 'sw', 'se'];\n\t\t\tfor (const pos of positions) {\n\t\t\t\tconst handle: HTMLDivElement = document.createElement('div');\n\t\t\t\thandle.className = `notectl-image__resize-handle notectl-image__resize-handle--${pos}`;\n\t\t\t\thandle.setAttribute('role', 'separator');\n\t\t\t\thandle.setAttribute('aria-label', getHandleLabel(pos, isRtl, locale));\n\t\t\t\tattachHandleListeners(handle, pos, nodeId, sizeIndicator);\n\t\t\t\tresizeOverlay.appendChild(handle);\n\t\t\t}\n\n\t\t\t// Keyboard hint (hidden from screenreaders, visual only)\n\t\t\tif (resolvedKeymap) {\n\t\t\t\tconst hintText: string = buildKeyboardHintText(resolvedKeymap, locale);\n\t\t\t\tif (hintText) {\n\t\t\t\t\tconst hint: HTMLDivElement = document.createElement('div');\n\t\t\t\t\thint.className = 'notectl-image__keyboard-hint';\n\t\t\t\t\thint.setAttribute('aria-hidden', 'true');\n\t\t\t\t\thint.textContent = hintText;\n\t\t\t\t\tresizeOverlay.appendChild(hint);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcontainer.appendChild(resizeOverlay);\n\t\t}\n\n\t\tfunction removeResizeOverlay(): void {\n\t\t\tclearGlobalResizeCursor();\n\t\t\tif (resizeOverlay) {\n\t\t\t\tresizeOverlay.remove();\n\t\t\t\tresizeOverlay = null;\n\t\t\t}\n\t\t}\n\n\t\t// --- NodeView Interface ---\n\n\t\treturn {\n\t\t\tdom: figure,\n\t\t\tcontentDOM: null,\n\n\t\t\tupdate(updatedNode: BlockNode): boolean {\n\t\t\t\tif (updatedNode.type !== 'image') return false;\n\t\t\t\tcurrentNodeId = updatedNode.id;\n\t\t\t\tfigure.setAttribute('data-block-id', updatedNode.id);\n\t\t\t\tapplyAttrs(updatedNode);\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\tselectNode(): void {\n\t\t\t\tfigure.classList.add('notectl-image--selected');\n\t\t\t\tcreateResizeOverlay(currentNodeId);\n\t\t\t},\n\n\t\t\tdeselectNode(): void {\n\t\t\t\tfigure.classList.remove('notectl-image--selected');\n\t\t\t\tremoveResizeOverlay();\n\t\t\t},\n\n\t\t\tdestroy(): void {\n\t\t\t\tremoveResizeOverlay();\n\t\t\t\t// Do NOT revoke blob URLs here — the URL may still be referenced\n\t\t\t\t// by the clipboard (cut/paste) or undo history. Blob URLs are\n\t\t\t\t// automatically released when the document is unloaded.\n\t\t\t},\n\t\t};\n\t};\n}\n","/**\n * Image plugin types, configuration, and service key.\n */\n\nimport { ServiceKey } from '../Plugin.js';\nimport type { ImageLocale } from './ImageLocale.js';\n\n// --- Image Attributes ---\n\nexport interface ImageAttrs {\n\treadonly src: string;\n\treadonly alt: string;\n\treadonly width?: number;\n\treadonly height?: number;\n\treadonly align: 'start' | 'center' | 'end';\n}\n\n// --- Upload Types ---\n\nexport interface ImageUploadResult {\n\treadonly url: string;\n\treadonly width?: number;\n\treadonly height?: number;\n}\n\nexport interface ImageUploadService {\n\tupload(file: File): Promise<ImageUploadResult>;\n}\n\nexport const IMAGE_UPLOAD_SERVICE = new ServiceKey<ImageUploadService>('image:upload');\n\nexport type UploadState = 'idle' | 'uploading' | 'complete' | 'error';\n\n// --- Keyboard Bindings ---\n\n/**\n * Configurable keyboard bindings for image resize actions.\n * Omit a slot to use the default; set to `null` to disable the binding.\n *\n * Key descriptor format: `'Mod-Shift-ArrowRight'`, etc.\n * `Mod` resolves to Cmd on macOS, Ctrl on Windows/Linux.\n */\nexport interface ImageKeymap {\n\treadonly growWidth?: string | null;\n\treadonly shrinkWidth?: string | null;\n\treadonly growWidthLarge?: string | null;\n\treadonly shrinkWidthLarge?: string | null;\n\treadonly resetSize?: string | null;\n}\n\nexport const DEFAULT_IMAGE_KEYMAP: Readonly<Record<keyof ImageKeymap, string>> = {\n\tgrowWidth: 'Mod-Shift-ArrowRight',\n\tshrinkWidth: 'Mod-Shift-ArrowLeft',\n\tgrowWidthLarge: 'Mod-Shift-Alt-ArrowRight',\n\tshrinkWidthLarge: 'Mod-Shift-Alt-ArrowLeft',\n\tresetSize: 'Mod-Shift-0',\n};\n\n// --- Configuration ---\n\nexport interface ImagePluginConfig {\n\treadonly maxWidth: number;\n\treadonly maxFileSize: number;\n\treadonly acceptedTypes: readonly string[];\n\treadonly resizable: boolean;\n\t/** Pixels to grow/shrink per small resize step. @default 10 */\n\treadonly resizeStep?: number;\n\t/** Pixels to grow/shrink per large resize step. @default 50 */\n\treadonly resizeStepLarge?: number;\n\t/** Customize keyboard bindings for image resize actions. */\n\treadonly keymap?: ImageKeymap;\n\t/** Locale override for user-facing strings. */\n\treadonly locale?: ImageLocale;\n}\n\nexport const DEFAULT_IMAGE_CONFIG: ImagePluginConfig = {\n\tmaxWidth: 800,\n\tmaxFileSize: 10 * 1024 * 1024,\n\tacceptedTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/svg+xml'],\n\tresizable: true,\n\tresizeStep: 10,\n\tresizeStepLarge: 50,\n};\n","/**\n * ImagePlugin: registers an image void block type with NodeSpec,\n * NodeView, commands, file handler, toolbar button, and accessible\n * keyboard resize with screenreader announcements.\n */\n\nimport { IMAGE_CSS } from '../../editor/styles/image.js';\nimport type { BlockAttrs, BlockNode } from '../../model/Document.js';\nimport { escapeHTML } from '../../model/HTMLUtils.js';\nimport { isNodeSelection } from '../../model/Selection.js';\nimport type { BlockId } from '../../model/TypeBrands.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport type { Transaction } from '../../state/Transaction.js';\nimport { setStyleProperty } from '../../style/StyleRuntime.js';\nimport { createBlockElement } from '../../view/DomUtils.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { resolveLocale } from '../shared/PluginHelpers.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport {\n\tinsertImage,\n\tregisterImageCommands,\n\tresetImageSize,\n\tresizeImageByDelta,\n} from './ImageCommands.js';\nimport { IMAGE_LOCALE_EN, type ImageLocale, loadImageLocale } from './ImageLocale.js';\nimport { createImageNodeViewFactory } from './ImageNodeView.js';\nimport { renderImagePopup } from './ImagePopup.js';\nimport {\n\tDEFAULT_IMAGE_CONFIG,\n\tDEFAULT_IMAGE_KEYMAP,\n\tIMAGE_UPLOAD_SERVICE,\n\ttype ImageKeymap,\n\ttype ImagePluginConfig,\n\ttype UploadState,\n} from './ImageUpload.js';\n\n// --- Attribute Registry Augmentation ---\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface NodeAttrRegistry {\n\t\timage: {\n\t\t\tsrc: string;\n\t\t\talt: string;\n\t\t\twidth?: number;\n\t\t\theight?: number;\n\t\t\talign: 'start' | 'center' | 'end';\n\t\t};\n\t}\n}\n\n// --- Plugin ---\n\nexport class ImagePlugin implements Plugin {\n\treadonly id = 'image';\n\treadonly name = 'Image';\n\treadonly priority = 45;\n\n\tprivate readonly config: ImagePluginConfig;\n\tprivate readonly resolvedKeymap: Readonly<Record<keyof ImageKeymap, string | null>>;\n\tprivate readonly uploadStates = new Map<BlockId, UploadState>();\n\tprivate readonly blobUrls = new Set<string>();\n\tprivate context: PluginContext | null = null;\n\tprivate locale!: ImageLocale;\n\n\tconstructor(config?: Partial<ImagePluginConfig>) {\n\t\tthis.config = { ...DEFAULT_IMAGE_CONFIG, ...config };\n\t\tthis.resolvedKeymap = { ...DEFAULT_IMAGE_KEYMAP, ...config?.keymap };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tIMAGE_LOCALE_EN,\n\t\t\tloadImageLocale,\n\t\t);\n\t\tcontext.registerStyleSheet(IMAGE_CSS);\n\t\tthis.context = context;\n\t\tthis.registerNodeSpec(context);\n\t\tthis.registerNodeView(context);\n\t\tregisterImageCommands(context);\n\t\tthis.registerResizeCommands(context);\n\t\tthis.registerResizeKeymaps(context);\n\t\tthis.registerFileHandler(context);\n\t\tthis.registerToolbarItem(context);\n\t}\n\n\tdestroy(): void {\n\t\tfor (const url of this.blobUrls) {\n\t\t\tURL.revokeObjectURL(url);\n\t\t}\n\t\tthis.blobUrls.clear();\n\t\tthis.uploadStates.clear();\n\t\tthis.context = null;\n\t}\n\n\tonStateChange(oldState: EditorState, newState: EditorState, _tr: Transaction): void {\n\t\tif (!this.context) return;\n\n\t\t// Clean up upload states for removed blocks (searches full tree)\n\t\tfor (const id of this.uploadStates.keys()) {\n\t\t\tif (!newState.getBlock(id)) {\n\t\t\t\tthis.uploadStates.delete(id);\n\t\t\t}\n\t\t}\n\n\t\t// Announce image selection for screenreaders\n\t\tconst oldIsImage: boolean = this.isImageSelected(oldState);\n\t\tconst nowIsImage: boolean = this.isImageSelected(newState);\n\n\t\tif (!oldIsImage && nowIsImage) {\n\t\t\tthis.announceImageSelection(newState);\n\t\t}\n\t}\n\n\tprivate registerNodeSpec(context: PluginContext): void {\n\t\tconst locale = this.locale;\n\t\tcontext.registerNodeSpec({\n\t\t\ttype: 'image',\n\t\t\tgroup: 'block',\n\t\t\tisVoid: true,\n\t\t\tselectable: true,\n\t\t\tattrs: {\n\t\t\t\tsrc: { default: '' },\n\t\t\t\talt: { default: '' },\n\t\t\t\talign: { default: 'center' },\n\t\t\t},\n\t\t\ttoDOM(node) {\n\t\t\t\tconst figure = createBlockElement('figure', node.id);\n\t\t\t\tfigure.className = 'notectl-image';\n\t\t\t\tfigure.setAttribute('data-void', 'true');\n\t\t\t\tfigure.setAttribute('data-selectable', 'true');\n\n\t\t\t\tconst imgContainer: HTMLDivElement = document.createElement('div');\n\t\t\t\timgContainer.className = 'notectl-image__container';\n\n\t\t\t\tconst alt: string = (node.attrs?.alt as string | undefined) ?? '';\n\t\t\t\tconst width: number | undefined = node.attrs?.width as number | undefined;\n\t\t\t\tconst height: number | undefined = node.attrs?.height as number | undefined;\n\n\t\t\t\tconst img: HTMLImageElement = document.createElement('img');\n\t\t\t\timg.className = 'notectl-image__img';\n\t\t\t\timg.src = (node.attrs?.src as string | undefined) ?? '';\n\t\t\t\timg.alt = alt;\n\t\t\t\timg.draggable = false;\n\n\t\t\t\tif (width !== undefined) setStyleProperty(img, 'width', `${width}px`);\n\t\t\t\tif (height !== undefined) setStyleProperty(img, 'height', `${height}px`);\n\n\t\t\t\tconst align: string = (node.attrs?.align as string | undefined) ?? 'center';\n\t\t\t\tconst alignClass: string | undefined = {\n\t\t\t\t\tstart: 'notectl-image--start',\n\t\t\t\t\tcenter: 'notectl-image--center',\n\t\t\t\t\tend: 'notectl-image--end',\n\t\t\t\t}[align];\n\t\t\t\tif (alignClass) figure.classList.add(alignClass);\n\n\t\t\t\tfigure.setAttribute('aria-label', locale.imageAria(alt, width, height));\n\n\t\t\t\timgContainer.appendChild(img);\n\t\t\t\tfigure.appendChild(imgContainer);\n\t\t\t\treturn figure;\n\t\t\t},\n\t\t\ttoHTML(node) {\n\t\t\t\tconst src: string = escapeHTML((node.attrs?.src as string | undefined) ?? '');\n\t\t\t\tconst alt: string = escapeHTML((node.attrs?.alt as string | undefined) ?? '');\n\t\t\t\tconst width: number | undefined = node.attrs?.width as number | undefined;\n\t\t\t\tconst height: number | undefined = node.attrs?.height as number | undefined;\n\n\t\t\t\tconst sizeAttrs: string =\n\t\t\t\t\t(width !== undefined ? ` width=\"${width}\"` : '') +\n\t\t\t\t\t(height !== undefined ? ` height=\"${height}\"` : '');\n\n\t\t\t\t// Alignment is handled by the serializer's alignment injection,\n\t\t\t\t// which works in both inline-style and CSS-class modes.\n\t\t\t\treturn `<figure><img src=\"${src}\" alt=\"${alt}\"${sizeAttrs}></figure>`;\n\t\t\t},\n\t\t\tparseHTML: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'figure',\n\t\t\t\t\tgetAttrs(el) {\n\t\t\t\t\t\tconst img: HTMLImageElement | null = el.querySelector('img');\n\t\t\t\t\t\tif (!img) return false;\n\t\t\t\t\t\tconst attrs: Record<string, string | number | boolean> = {\n\t\t\t\t\t\t\tsrc: img.getAttribute('src') ?? '',\n\t\t\t\t\t\t\talt: img.getAttribute('alt') ?? '',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst width: string | null = img.getAttribute('width');\n\t\t\t\t\t\tconst height: string | null = img.getAttribute('height');\n\t\t\t\t\t\tif (width) attrs.width = Number.parseInt(width, 10);\n\t\t\t\t\t\tif (height) attrs.height = Number.parseInt(height, 10);\n\n\t\t\t\t\t\t// Check inline style first, then class names (new + legacy)\n\t\t\t\t\t\tconst textAlign: string = el.style?.textAlign ?? '';\n\t\t\t\t\t\tif (textAlign === 'start' || textAlign === 'end' || textAlign === 'center') {\n\t\t\t\t\t\t\tattrs.align = textAlign;\n\t\t\t\t\t\t} else if (textAlign === 'left') {\n\t\t\t\t\t\t\tattrs.align = 'start';\n\t\t\t\t\t\t} else if (textAlign === 'right') {\n\t\t\t\t\t\t\tattrs.align = 'end';\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tel.classList.contains('notectl-align-start') ||\n\t\t\t\t\t\t\tel.classList.contains('notectl-align-left') ||\n\t\t\t\t\t\t\tel.classList.contains('notectl-image--start') ||\n\t\t\t\t\t\t\tel.classList.contains('notectl-image--left')\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tattrs.align = 'start';\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tel.classList.contains('notectl-align-end') ||\n\t\t\t\t\t\t\tel.classList.contains('notectl-align-right') ||\n\t\t\t\t\t\t\tel.classList.contains('notectl-image--end') ||\n\t\t\t\t\t\t\tel.classList.contains('notectl-image--right')\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tattrs.align = 'end';\n\t\t\t\t\t\t} else if (el.classList.contains('notectl-align-center')) {\n\t\t\t\t\t\t\tattrs.align = 'center';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn attrs;\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'img',\n\t\t\t\t\tgetAttrs(el) {\n\t\t\t\t\t\tconst attrs: Record<string, string | number | boolean> = {\n\t\t\t\t\t\t\tsrc: el.getAttribute('src') ?? '',\n\t\t\t\t\t\t\talt: el.getAttribute('alt') ?? '',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst width: string | null = el.getAttribute('width');\n\t\t\t\t\t\tconst height: string | null = el.getAttribute('height');\n\t\t\t\t\t\tif (width) attrs.width = Number.parseInt(width, 10);\n\t\t\t\t\t\tif (height) attrs.height = Number.parseInt(height, 10);\n\t\t\t\t\t\treturn attrs;\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\tsanitize: {\n\t\t\t\ttags: ['figure', 'img'],\n\t\t\t\tattrs: ['src', 'alt', 'width', 'height', 'class', 'style'],\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate registerNodeView(context: PluginContext): void {\n\t\tcontext.registerNodeView(\n\t\t\t'image',\n\t\t\tcreateImageNodeViewFactory(this.config, this.uploadStates, this.resolvedKeymap, this.locale),\n\t\t);\n\t}\n\n\tprivate registerResizeCommands(context: PluginContext): void {\n\t\tconst step: number = this.config.resizeStep ?? 10;\n\t\tconst stepLarge: number = this.config.resizeStepLarge ?? 50;\n\t\tconst maxWidth: number = this.config.maxWidth;\n\n\t\tcontext.registerCommand('resizeImageGrow', () => {\n\t\t\tconst result: boolean = resizeImageByDelta(context, step, maxWidth);\n\t\t\tif (result) this.announceCurrentSize(context);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('resizeImageShrink', () => {\n\t\t\tconst result: boolean = resizeImageByDelta(context, -step, maxWidth);\n\t\t\tif (result) this.announceCurrentSize(context);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('resizeImageGrowLarge', () => {\n\t\t\tconst result: boolean = resizeImageByDelta(context, stepLarge, maxWidth);\n\t\t\tif (result) this.announceCurrentSize(context);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('resizeImageShrinkLarge', () => {\n\t\t\tconst result: boolean = resizeImageByDelta(context, -stepLarge, maxWidth);\n\t\t\tif (result) this.announceCurrentSize(context);\n\t\t\treturn result;\n\t\t});\n\n\t\tcontext.registerCommand('resetImageSize', () => {\n\t\t\tconst result: boolean = resetImageSize(context);\n\t\t\tif (result) context.announce(this.locale.resetToNaturalSize);\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tprivate registerResizeKeymaps(context: PluginContext): void {\n\t\tconst bindings: Record<string, () => boolean> = {};\n\t\tconst commands: Record<keyof ImageKeymap, string> = {\n\t\t\tgrowWidth: 'resizeImageGrow',\n\t\t\tshrinkWidth: 'resizeImageShrink',\n\t\t\tgrowWidthLarge: 'resizeImageGrowLarge',\n\t\t\tshrinkWidthLarge: 'resizeImageShrinkLarge',\n\t\t\tresetSize: 'resetImageSize',\n\t\t};\n\n\t\tfor (const [slot, commandName] of Object.entries(commands)) {\n\t\t\tconst binding: string | null = this.resolvedKeymap[slot as keyof ImageKeymap] ?? null;\n\t\t\tif (binding) {\n\t\t\t\tbindings[binding] = () => context.executeCommand(commandName);\n\t\t\t}\n\t\t}\n\n\t\tif (Object.keys(bindings).length > 0) {\n\t\t\tcontext.registerKeymap(bindings);\n\t\t}\n\t}\n\n\tprivate registerFileHandler(context: PluginContext): void {\n\t\tcontext.registerFileHandler('image/*', async (file, _position) => {\n\t\t\tif (!this.isAcceptedType(file.type)) return false;\n\t\t\tthis.handleFileInsert(context, file);\n\t\t\treturn true;\n\t\t});\n\t}\n\n\tprivate handleFileInsert(context: PluginContext, file: File): void {\n\t\tif (file.size > this.config.maxFileSize) return;\n\n\t\tconst blobUrl: string = URL.createObjectURL(file);\n\t\tthis.blobUrls.add(blobUrl);\n\n\t\tconst inserted: boolean = insertImage(context, { src: blobUrl });\n\t\tif (!inserted) {\n\t\t\tURL.revokeObjectURL(blobUrl);\n\t\t\tthis.blobUrls.delete(blobUrl);\n\t\t\treturn;\n\t\t}\n\n\t\t// Find the newly inserted image block\n\t\tconst state: EditorState = context.getState();\n\t\tconst sel = state.selection;\n\t\tif (!isNodeSelection(sel)) return;\n\t\tconst imageBlockId: BlockId = sel.nodeId;\n\n\t\tthis.uploadStates.set(imageBlockId, 'uploading');\n\n\t\t// Upload if service is registered\n\t\tconst uploadService = context.getService(IMAGE_UPLOAD_SERVICE);\n\t\tif (uploadService) {\n\t\t\tthis.uploadFile(context, file, imageBlockId, blobUrl);\n\t\t} else {\n\t\t\tthis.uploadStates.set(imageBlockId, 'complete');\n\t\t}\n\t}\n\n\tprivate async uploadFile(\n\t\tcontext: PluginContext,\n\t\tfile: File,\n\t\timageBlockId: BlockId,\n\t\tblobUrl: string,\n\t): Promise<void> {\n\t\tconst uploadService = context.getService(IMAGE_UPLOAD_SERVICE);\n\t\tif (!uploadService) return;\n\n\t\ttry {\n\t\t\tconst result = await uploadService.upload(file);\n\t\t\tthis.uploadStates.set(imageBlockId, 'complete');\n\n\t\t\t// Replace blob URL with uploaded URL\n\t\t\tconst state: EditorState = context.getState();\n\t\t\tconst block: BlockNode | undefined = state.getBlock(imageBlockId);\n\t\t\tif (!block) return;\n\n\t\t\tconst path: BlockId[] | undefined = state.getNodePath(imageBlockId);\n\t\t\tif (!path) return;\n\n\t\t\tconst merged: BlockAttrs = {\n\t\t\t\t...(block.attrs ?? {}),\n\t\t\t\tsrc: result.url,\n\t\t\t\t...(result.width !== undefined ? { width: result.width } : {}),\n\t\t\t\t...(result.height !== undefined ? { height: result.height } : {}),\n\t\t\t};\n\n\t\t\tconst tr: Transaction = state.transaction('command').setNodeAttr(path, merged).build();\n\t\t\tcontext.dispatch(tr);\n\n\t\t\t// Clean up blob URL\n\t\t\tURL.revokeObjectURL(blobUrl);\n\t\t\tthis.blobUrls.delete(blobUrl);\n\t\t} catch {\n\t\t\tthis.uploadStates.set(imageBlockId, 'error');\n\t\t\tcontext.announce(this.locale.uploadFailed);\n\t\t}\n\t}\n\n\tprivate registerToolbarItem(context: PluginContext): void {\n\t\tconst icon =\n\t\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"/></svg>';\n\n\t\tcontext.registerToolbarItem({\n\t\t\tid: 'image',\n\t\t\tgroup: 'insert',\n\t\t\ticon,\n\t\t\tlabel: this.locale.insertImage,\n\t\t\ttooltip: this.locale.insertImageTooltip,\n\t\t\tcommand: 'insertImage',\n\t\t\tpopupType: 'custom',\n\t\t\trenderPopup: (container, ctx, onClose) => {\n\t\t\t\trenderImagePopup(container, ctx, {\n\t\t\t\t\tacceptedTypes: this.config.acceptedTypes,\n\t\t\t\t\tlocale: this.locale,\n\t\t\t\t\tonFileInsert: (c, file) => this.handleFileInsert(c, file),\n\t\t\t\t\tonClose,\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate isAcceptedType(mimeType: string): boolean {\n\t\treturn this.config.acceptedTypes.some(\n\t\t\t(accepted) =>\n\t\t\t\taccepted === mimeType ||\n\t\t\t\t(accepted.endsWith('/*') && mimeType.startsWith(accepted.slice(0, -1))),\n\t\t);\n\t}\n\n\tprivate isImageSelected(state: EditorState): boolean {\n\t\tconst sel = state.selection;\n\t\tif (!isNodeSelection(sel)) return false;\n\t\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\t\treturn block?.type === 'image';\n\t}\n\n\tprivate announceImageSelection(state: EditorState): void {\n\t\tif (!this.context) return;\n\t\tconst sel = state.selection;\n\t\tif (!isNodeSelection(sel)) return;\n\n\t\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\t\tif (!block || block.type !== 'image') return;\n\n\t\tconst alt: string = (block.attrs?.alt as string | undefined) ?? '';\n\t\tconst width: number | undefined = block.attrs?.width as number | undefined;\n\t\tconst height: number | undefined = block.attrs?.height as number | undefined;\n\n\t\tconst parts: string[] = [this.locale.imageSelected];\n\t\tif (alt) parts.push(`${this.locale.altTextPrefix}${alt}.`);\n\t\tif (width !== undefined && height !== undefined) {\n\t\t\tparts.push(this.locale.imageSizeAnnounce(width, height));\n\t\t}\n\n\t\tconst shrinkKey: string | null = this.resolvedKeymap.shrinkWidth ?? null;\n\t\tconst growKey: string | null = this.resolvedKeymap.growWidth ?? null;\n\t\tif (shrinkKey && growKey) {\n\t\t\tparts.push(this.locale.resizeHint(formatShortcut(shrinkKey), formatShortcut(growKey)));\n\t\t}\n\n\t\tthis.context.announce(parts.join(' '));\n\t}\n\n\tprivate announceCurrentSize(context: PluginContext): void {\n\t\tconst state = context.getState();\n\t\tconst sel = state.selection;\n\t\tif (!isNodeSelection(sel)) return;\n\n\t\tconst block: BlockNode | undefined = state.getBlock(sel.nodeId);\n\t\tif (!block || block.type !== 'image') return;\n\n\t\tconst width: number | undefined = block.attrs?.width as number | undefined;\n\t\tconst height: number | undefined = block.attrs?.height as number | undefined;\n\t\tif (width !== undefined && height !== undefined) {\n\t\t\tcontext.announce(this.locale.imageResized(width, height));\n\t\t}\n\t}\n}\n","/** Image styles — display, alignment, resize handles, upload overlay. */\nexport const IMAGE_CSS = `\n/* Image */\n.notectl-image {\n\tmargin: 8px 0;\n\tuser-select: none;\n\tline-height: 0;\n}\n\n.notectl-image--center {\n\ttext-align: center;\n}\n\n.notectl-image--start {\n\ttext-align: start;\n}\n\n.notectl-image--end {\n\ttext-align: end;\n}\n\n.notectl-image__container {\n\tdisplay: inline-block;\n\tposition: relative;\n\tline-height: 0;\n}\n\n.notectl-image__img {\n\tdisplay: block;\n\tmax-width: 100%;\n\tborder-radius: 4px;\n}\n\n.notectl-image--selected .notectl-image__container {\n\toutline: 2px solid var(--notectl-primary);\n\toutline-offset: 2px;\n\tborder-radius: 6px;\n}\n\n/* Alignment toolbar (appears on image selection) */\n.notectl-image__align-toolbar {\n\tdisplay: flex;\n\tgap: 2px;\n\tposition: absolute;\n\ttop: -36px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tbackground: var(--notectl-surface-overlay);\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: 6px;\n\tpadding: 2px;\n\tbox-shadow: 0 2px 8px var(--notectl-shadow);\n\tz-index: 10;\n}\n\n.notectl-image__align-btn {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 28px;\n\theight: 28px;\n\tborder: none;\n\tbackground: transparent;\n\tborder-radius: 4px;\n\tcursor: pointer;\n\tcolor: var(--notectl-fg);\n}\n\n.notectl-image__align-btn:hover {\n\tbackground: var(--notectl-hover-bg);\n}\n\n.notectl-image__align-btn--active {\n\tbackground: var(--notectl-active-bg);\n\tcolor: var(--notectl-primary-fg);\n}\n\n.notectl-image__align-btn svg {\n\twidth: 16px;\n\theight: 16px;\n\tfill: currentColor;\n}\n\n/* Upload overlay */\n.notectl-image__overlay {\n\tposition: absolute;\n\tinset: 0;\n\tdisplay: none;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tborder-radius: 4px;\n\tfont-size: 13px;\n\tcolor: var(--notectl-fg-muted);\n}\n\n.notectl-image__overlay--uploading {\n\tdisplay: flex;\n}\n\n.notectl-image__overlay--error {\n\tdisplay: flex;\n\tbackground: var(--notectl-danger-muted);\n\tcolor: var(--notectl-danger);\n}\n\n/* Resize overlay + handles */\n.notectl-image__resize-overlay {\n\tposition: absolute;\n\tinset: 0;\n\tpointer-events: none;\n}\n\n.notectl-image__resize-handle {\n\tposition: absolute;\n\twidth: 10px;\n\theight: 10px;\n\tbackground: var(--notectl-bg);\n\tborder: 2px solid var(--notectl-primary);\n\tborder-radius: 50%;\n\tpointer-events: all;\n\tz-index: 2;\n\ttransition: transform 0.1s, background 0.1s;\n}\n\n.notectl-image__resize-handle:hover {\n\tbackground: var(--notectl-primary);\n\ttransform: scale(1.3);\n}\n\n.notectl-image--resizing .notectl-image__resize-handle {\n\tbackground: var(--notectl-primary);\n}\n\n.notectl-image__resize-handle--nw {\n\ttop: -5px;\n\tinset-inline-start: -5px;\n\tcursor: nwse-resize;\n}\n\n.notectl-image__resize-handle--ne {\n\ttop: -5px;\n\tinset-inline-end: -5px;\n\tcursor: nesw-resize;\n}\n\n.notectl-image__resize-handle--sw {\n\tbottom: -5px;\n\tinset-inline-start: -5px;\n\tcursor: nesw-resize;\n}\n\n.notectl-image__resize-handle--se {\n\tbottom: -5px;\n\tinset-inline-end: -5px;\n\tcursor: nwse-resize;\n}\n\n/* RTL cursor overrides — flip diagonal cursors when in RTL context */\n[dir=\"rtl\"] .notectl-image__resize-handle--nw {\n\tcursor: nesw-resize;\n}\n\n[dir=\"rtl\"] .notectl-image__resize-handle--ne {\n\tcursor: nwse-resize;\n}\n\n[dir=\"rtl\"] .notectl-image__resize-handle--sw {\n\tcursor: nwse-resize;\n}\n\n[dir=\"rtl\"] .notectl-image__resize-handle--se {\n\tcursor: nesw-resize;\n}\n\n/* Size indicator tooltip */\n.notectl-image__size-indicator {\n\tposition: absolute;\n\tbottom: -28px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tpadding: 2px 8px;\n\tbackground: var(--notectl-tooltip-bg);\n\tcolor: var(--notectl-tooltip-fg);\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tborder-radius: 4px;\n\twhite-space: nowrap;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity 0.15s;\n\tz-index: 3;\n}\n\n.notectl-image__size-indicator--visible {\n\topacity: 1;\n}\n\n/* Keyboard resize hint (shown on selection, hidden during drag) */\n.notectl-image__keyboard-hint {\n\tdisplay: none;\n\tposition: absolute;\n\tbottom: -28px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tpadding: 2px 8px;\n\tfont-size: 11px;\n\tcolor: var(--notectl-fg-muted);\n\twhite-space: nowrap;\n\tpointer-events: none;\n\tz-index: 3;\n}\n\n.notectl-image--selected .notectl-image__keyboard-hint {\n\tdisplay: block;\n}\n\n.notectl-image--resizing .notectl-image__keyboard-hint {\n\tdisplay: none;\n}\n\n/* Resizing feedback */\n.notectl-image--resizing .notectl-image__img {\n\topacity: 0.85;\n}\n`;\n","/**\n * Renders the image insert popup with file upload and URL input,\n * following the same pattern as FontSizePopup.\n */\n\nimport { setStyleProperty, setStyleText } from '../../style/StyleRuntime.js';\nimport type { PluginContext } from '../Plugin.js';\nimport { insertImage } from './ImageCommands.js';\nimport type { ImageLocale } from './ImageLocale.js';\n\n// --- Config ---\n\nexport interface ImagePopupConfig {\n\treadonly acceptedTypes: readonly string[];\n\treadonly locale: ImageLocale;\n\treadonly onFileInsert: (context: PluginContext, file: File) => void;\n\treadonly onClose: () => void;\n}\n\n// --- Public Entry Point ---\n\n/** Builds the image insert popup DOM inside the given container. */\nexport function renderImagePopup(\n\tcontainer: HTMLElement,\n\tcontext: PluginContext,\n\tconfig: ImagePopupConfig,\n): void {\n\tsetStyleProperty(container, 'padding', '8px');\n\tsetStyleProperty(container, 'minWidth', '240px');\n\n\tappendFileUploadSection(container, context, config);\n\tappendSeparator(container, config.locale);\n\tappendUrlSection(container, context, config);\n}\n\n// --- File Upload Section ---\n\nfunction appendFileUploadSection(\n\tcontainer: HTMLElement,\n\tcontext: PluginContext,\n\tconfig: ImagePopupConfig,\n): void {\n\tconst fileInput: HTMLInputElement = document.createElement('input');\n\tfileInput.type = 'file';\n\tfileInput.accept = config.acceptedTypes.join(',');\n\tsetStyleText(fileInput, 'position:absolute;width:0;height:0;overflow:hidden;opacity:0;');\n\n\tconst uploadBtn: HTMLButtonElement = document.createElement('button');\n\tuploadBtn.type = 'button';\n\tuploadBtn.textContent = config.locale.uploadFromComputer;\n\tuploadBtn.setAttribute('aria-label', config.locale.uploadAria);\n\tsetStyleText(\n\t\tuploadBtn,\n\t\t'display:block;width:100%;padding:8px 12px;cursor:pointer;' +\n\t\t\t'text-align:center;box-sizing:border-box;' +\n\t\t\t'border:1px solid var(--notectl-border);border-radius:4px;' +\n\t\t\t'background:var(--notectl-surface-raised);color:var(--notectl-fg);',\n\t);\n\n\tuploadBtn.addEventListener('mousedown', (e: MouseEvent) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tfileInput.click();\n\t});\n\n\tfileInput.addEventListener('change', () => {\n\t\tconst file: File | undefined = fileInput.files?.[0];\n\t\tif (file) {\n\t\t\tconfig.onFileInsert(context, file);\n\t\t\tconfig.onClose();\n\t\t\tcontext.getContainer().focus();\n\t\t}\n\t});\n\n\tcontainer.appendChild(fileInput);\n\tcontainer.appendChild(uploadBtn);\n}\n\n// --- Separator ---\n\nfunction appendSeparator(container: HTMLElement, locale: ImageLocale): void {\n\tconst separator: HTMLDivElement = document.createElement('div');\n\tsetStyleText(\n\t\tseparator,\n\t\t'display:flex;align-items:center;margin:8px 0;' +\n\t\t\t'color:var(--notectl-fg-muted);font-size:12px;',\n\t);\n\n\tconst line1: HTMLSpanElement = document.createElement('span');\n\tsetStyleText(line1, 'flex:1;height:1px;background:var(--notectl-border);');\n\n\tconst orText: HTMLSpanElement = document.createElement('span');\n\torText.textContent = locale.separator;\n\tsetStyleText(orText, 'padding:0 8px;');\n\n\tconst line2: HTMLSpanElement = document.createElement('span');\n\tsetStyleText(line2, 'flex:1;height:1px;background:var(--notectl-border);');\n\n\tseparator.appendChild(line1);\n\tseparator.appendChild(orText);\n\tseparator.appendChild(line2);\n\tcontainer.appendChild(separator);\n}\n\n// --- URL Input Section ---\n\nfunction appendUrlSection(\n\tcontainer: HTMLElement,\n\tcontext: PluginContext,\n\tconfig: ImagePopupConfig,\n): void {\n\tconst urlInput: HTMLInputElement = document.createElement('input');\n\turlInput.type = 'url';\n\turlInput.placeholder = config.locale.urlPlaceholder;\n\turlInput.setAttribute('aria-label', config.locale.urlAria);\n\tsetStyleText(\n\t\turlInput,\n\t\t'width:100%;padding:6px 8px;box-sizing:border-box;' +\n\t\t\t'border:1px solid var(--notectl-border);border-radius:4px;' +\n\t\t\t'background:var(--notectl-bg);color:var(--notectl-fg);',\n\t);\n\n\tconst insertBtn: HTMLButtonElement = document.createElement('button');\n\tinsertBtn.type = 'button';\n\tinsertBtn.textContent = config.locale.insertButton;\n\tinsertBtn.setAttribute('aria-label', config.locale.insertAria);\n\tsetStyleText(\n\t\tinsertBtn,\n\t\t'width:100%;padding:8px 12px;margin-top:4px;cursor:pointer;' +\n\t\t\t'border:1px solid var(--notectl-border);border-radius:4px;' +\n\t\t\t'background:var(--notectl-surface-raised);color:var(--notectl-fg);',\n\t);\n\n\tconst applyUrl = (): void => {\n\t\tconst src: string = urlInput.value.trim();\n\t\tif (src) {\n\t\t\tinsertImage(context, { src });\n\t\t\tconfig.onClose();\n\t\t\tcontext.getContainer().focus();\n\t\t}\n\t};\n\n\tinsertBtn.addEventListener('mousedown', (e: MouseEvent) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tapplyUrl();\n\t});\n\n\turlInput.addEventListener('keydown', (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter') {\n\t\t\te.preventDefault();\n\t\t\tapplyUrl();\n\t\t}\n\t});\n\n\tcontainer.appendChild(urlInput);\n\tcontainer.appendChild(insertBtn);\n\n\trequestAnimationFrame(() => urlInput.focus());\n}\n"],"names":["insertImage","context","attrs","state","getState","sel","selection","imageAttrs","src","alt","align","width","height","isGapCursor","anchorBlockId","isNodeSelection","nodeId","anchor","blockId","cellId","bid","block","getBlock","type","path","getNodePath","id","node","findTableCellAncestor","cellPath","imageBlock","createBlockNode","nodeType","cell","builder","transaction","blockChildren","getBlockChildren","i","length","rawIndex","children","findIndex","c","isBlockNode","removeNode","insertNode","setSelection","createNodeSelection","dispatch","build","insertImageIntoCell","blockIndex","doc","b","newParagraph","tr","insertImageAtRoot","resizeImageByDelta","delta","maxWidth","currentWidth","currentHeight","aspectRatio","clampedWidth","Math","max","min","newHeight","round","merged","setNodeAttr","setImageAttr","IMAGE_LOCALE_EN","insertImageTooltip","uploadFromComputer","uploadAria","separator","urlPlaceholder","urlAria","insertButton","insertAria","imageAria","parts","push","join","resetToNaturalSize","uploadFailed","uploading","resizeHandleLabel","position","imageSelected","altTextPrefix","imageSizeAnnounce","w","h","resizeHint","shrink","grow","imageResized","keyboardResizeHint","localeModules","assign","import","async","loadImageLocale","lang","loader","default","ALIGNMENT_CLASSES","start","center","end","HANDLE_CURSORS","nw","ne","sw","se","HANDLE_X_SIGN","HANDLE_POSITIONS_LTR","HANDLE_POSITIONS_RTL","RTL_CURSOR_MAP","getHandleLabel","isRtl","locale","positionName","activeCursorStyle","clearGlobalResizeCursor","remove","createImageNodeViewFactory","config","uploadStates","resolvedKeymap","figure","document","createElement","className","setAttribute","container","img","draggable","overlay","appendChild","currentNodeId","resizeOverlay","applyAttrs","n","setStyleProperty","cls","Object","values","classList","alignClass","add","uploadState","get","isUploading","toggle","textContent","removeAttribute","updateAriaLabel","dimensionsCommitted","attachHandleListeners","handle","sizeIndicator","startX","startWidth","xSign","onPointerMove","e","deltaX","clientX","newWidth","setStyleProperties","onPointerUp","removeEventListener","finalWidth","getBoundingClientRect","finalHeight","prevWidth","prevHeight","commitResize","target","releasePointerCapture","pointerId","addEventListener","preventDefault","stopPropagation","getTextDirection","sign","getResizeXSign","imgHeight","cursor","referenceNode","nonce","getStyleNonceForNode","head","setGlobalResizeCursor","setPointerCapture","removeResizeOverlay","hasWidth","hasHeight","naturalW","naturalWidth","naturalH","naturalHeight","clampedW","ratio","clampedH","dom","contentDOM","update","updatedNode","selectNode","resizable","positions","pos","hintText","shrinkWidth","growWidth","formatShortcut","buildKeyboardHintText","hint","createResizeOverlay","deselectNode","destroy","IMAGE_UPLOAD_SERVICE","ServiceKey","DEFAULT_IMAGE_KEYMAP","growWidthLarge","shrinkWidthLarge","resetSize","DEFAULT_IMAGE_CONFIG","maxFileSize","acceptedTypes","resizeStep","resizeStepLarge","ImagePlugin","name","priority","Map","blobUrls","Set","constructor","this","keymap","init","resolveLocale","registerStyleSheet","registerNodeSpec","registerNodeView","registerCommand","nodePath","parentPath","slice","parent","parentId","imageIndex","selectionTarget","removedId","rootChildren","idx","adjacent","findSelectionTargetAfterRemoval","createCollapsedSelection","removeImage","registerImageCommands","registerResizeCommands","registerResizeKeymaps","registerFileHandler","registerToolbarItem","url","URL","revokeObjectURL","clear","onStateChange","oldState","newState","_tr","keys","delete","oldIsImage","isImageSelected","nowIsImage","announceImageSelection","group","isVoid","selectable","toDOM","createBlockElement","imgContainer","toHTML","escapeHTML","parseHTML","tag","getAttrs","el","querySelector","getAttribute","Number","parseInt","textAlign","style","contains","sanitize","tags","step","stepLarge","result","announceCurrentSize","cleaned","fromEntries","entries","filter","k","resetImageSize","announce","bindings","commands","slot","commandName","binding","executeCommand","registerKeymap","file","_position","isAcceptedType","handleFileInsert","size","blobUrl","createObjectURL","imageBlockId","set","getService","uploadFile","uploadService","upload","icon","label","tooltip","command","popupType","renderPopup","ctx","onClose","fileInput","accept","setStyleText","uploadBtn","click","files","onFileInsert","getContainer","focus","appendFileUploadSection","line1","orText","line2","appendSeparator","urlInput","placeholder","insertBtn","applyUrl","value","trim","key","requestAnimation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EAA4BU,EAAMnB,OAAOS,MACzCC,EAA6BS,EAAMnB,OAAOU,OAE1CuE,EAAkB,CAACiK,KAAKxH,OAAOjC,eACjClF,KAAW2E,KAAK,GAAGgK,KAAKxH,OAAOhC,gBAAgBnF,WACrC,IAAVE,QAAkC,IAAXC,GAC1BuE,EAAMC,KAAKgK,KAAKxH,OAAO/B,kBAAkBlF,EAAOC,IAGjD,MAAM0W,EAA2BlI,KAAKhH,eAAesF,aAAe,KAC9D6J,EAAyBnI,KAAKhH,eAAeuF,WAAa,KAC5D2J,GAAaC,GAChBpS,EAAMC,KAAKgK,KAAKxH,OAAO5B,WAAW4H,EAAe0J,GAAY1J,EAAe2J,KAG7EnI,KAAKnP,QAAQ2T,SAASzO,EAAME,KAAK,KAClC,CAEQ,mBAAAgO,CAAoBpT,GAC3B,MAAME,EAAQF,EAAQG,WAChBC,EAAMF,EAAMG,UAClB,IAAKS,EAAgBV,GAAM,OAE3B,MAAMgB,EAA+BlB,EAAMmB,SAASjB,EAAIW,QACxD,IAAKK,GAAwB,UAAfA,EAAME,KAAkB,OAEtC,MAAMZ,EAA4BU,EAAMnB,OAAOS,MACzCC,EAA6BS,EAAMnB,OAAOU,YAClC,IAAVD,QAAkC,IAAXC,GAC1BX,EAAQ2T,SAASxE,KAAKxH,OAAOzB,aAAaxF,EAAOC,GAEnD"}
|
|
@@ -12,12 +12,5 @@ export interface LinkLocale {
|
|
|
12
12
|
readonly applyAria: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const LINK_LOCALE_EN: LinkLocale;
|
|
15
|
-
export declare
|
|
16
|
-
export declare const LINK_LOCALE_ES: LinkLocale;
|
|
17
|
-
export declare const LINK_LOCALE_FR: LinkLocale;
|
|
18
|
-
export declare const LINK_LOCALE_ZH: LinkLocale;
|
|
19
|
-
export declare const LINK_LOCALE_RU: LinkLocale;
|
|
20
|
-
export declare const LINK_LOCALE_AR: LinkLocale;
|
|
21
|
-
export declare const LINK_LOCALE_HI: LinkLocale;
|
|
22
|
-
export declare const LINK_LOCALES: Record<string, LinkLocale>;
|
|
15
|
+
export declare function loadLinkLocale(lang: string): Promise<LinkLocale>;
|
|
23
16
|
//# sourceMappingURL=LinkLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkLocale.d.ts","sourceRoot":"","sources":["../../../src/plugins/link/LinkLocale.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAID,eAAO,MAAM,cAAc,EAAE,UAS5B,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkLocale.d.ts","sourceRoot":"","sources":["../../../src/plugins/link/LinkLocale.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAID,eAAO,MAAM,cAAc,EAAE,UAS5B,CAAC;AAQF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAUtE"}
|
|
@@ -10,8 +10,6 @@ declare module '../../model/AttrRegistry.js' {
|
|
|
10
10
|
export interface LinkConfig {
|
|
11
11
|
/** Whether to add rel="noopener noreferrer" and target="_blank" by default. */
|
|
12
12
|
readonly openInNewTab: boolean;
|
|
13
|
-
/** When true, a separator is rendered after the link toolbar item. */
|
|
14
|
-
readonly separatorAfter?: boolean;
|
|
15
13
|
readonly locale?: LinkLocale;
|
|
16
14
|
}
|
|
17
15
|
export declare class LinkPlugin implements Plugin {
|
|
@@ -21,7 +19,7 @@ export declare class LinkPlugin implements Plugin {
|
|
|
21
19
|
private readonly config;
|
|
22
20
|
private locale;
|
|
23
21
|
constructor(config?: Partial<LinkConfig>);
|
|
24
|
-
init(context: PluginContext): void
|
|
22
|
+
init(context: PluginContext): Promise<void>;
|
|
25
23
|
private registerMarkSpec;
|
|
26
24
|
private registerCommands;
|
|
27
25
|
private registerKeymap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/link/LinkPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"LinkPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/link/LinkPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,EAAkB,KAAK,UAAU,EAAkB,MAAM,iBAAiB,CAAC;AAIlF,OAAO,QAAQ,6BAA6B,CAAC;IAC5C,UAAU,gBAAgB;QACzB,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KACvB;CACD;AAID,MAAM,WAAW,UAAU;IAC1B,+EAA+E;IAC/E,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;CAC7B;AAQD,qBAAa,UAAW,YAAW,MAAM;IACxC,QAAQ,CAAC,EAAE,UAAU;IACrB,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,MAAM,CAAc;gBAEhB,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;IAIlC,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjD,OAAO,CAAC,gBAAgB;IAuCxB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,UAAU;IAuDlB,OAAO,CAAC,eAAe;CAoEvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,KAAK,UAAU,GACf,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,KAAK,UAAU,GACf,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACN,cAAc,EACd,cAAc,GACd,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/ar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/fr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hi.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/hi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/plugins/link/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,UASb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/plugins/link.mjs
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
L as LinkPlugin
|
|
4
|
-
};
|
|
1
|
+
import{i as t,a as e,r as n}from"../chunks/AttributedMarkCommands-x7h4Xy7V.mjs";import{m as r}from"../chunks/Document-HC8s50qJ.mjs";import{a as s}from"../chunks/HTMLUtils-Cxy99Ak2.mjs";import{i as o,j as i}from"../chunks/Selection-DhbizDM4.mjs";import{m as a}from"../chunks/TypeBrands-Bp_Z_o5Y.mjs";import{r as l}from"../chunks/PluginHelpers-CdPR0MuT.mjs";import{f as c}from"../chunks/ShortcutFormatting-BLKS0Gys.mjs";const p={label:"Link",tooltip:t=>`Insert Link (${t})`,removeLink:"Remove Link",removeLinkAria:"Remove link",urlPlaceholder:"https://...",urlAria:"Link URL",apply:"Apply",applyAria:"Apply link"},m=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("../chunks/ar-Deibepjm.mjs"),"./locales/de.ts":()=>import("../chunks/de-B5fcZ0FQ.mjs"),"./locales/es.ts":()=>import("../chunks/es-BbGOZGS_.mjs"),"./locales/fr.ts":()=>import("../chunks/fr-_Oxf0k66.mjs"),"./locales/hi.ts":()=>import("../chunks/hi-B2m69ZCq.mjs"),"./locales/pt.ts":()=>import("../chunks/pt-DsBJpgpe.mjs"),"./locales/ru.ts":()=>import("../chunks/ru-DdHqb4Mh.mjs"),"./locales/zh.ts":()=>import("../chunks/zh-v9NmlEIN.mjs")});async function u(t){if("en"===t)return p;const e=m[`./locales/${t}.ts`];if(!e)return p;try{return(await e()).default}catch{return p}}const h={openInNewTab:!0};class k{id="link";name="Link";priority=25;config;locale;constructor(t){this.config={...h,...t}}async init(t){this.locale=await l(t,this.config.locale,p,u),this.registerMarkSpec(t),this.registerCommands(t),this.registerKeymap(t),this.registerToolbarItem(t)}registerMarkSpec(t){const e=this.config.openInNewTab;t.registerMarkSpec({type:"link",rank:10,attrs:{href:{default:""}},toDOM(t){const n=document.createElement("a"),r=t.attrs?.href??"";return n.setAttribute("href",r),e&&(n.setAttribute("target","_blank"),n.setAttribute("rel","noopener noreferrer")),n},toHTMLString:(t,n)=>{const r=s(String(t.attrs?.href??""));return e?`<a href="${r}" target="_blank" rel="noopener noreferrer">${n}</a>`:`<a href="${r}">${n}</a>`},parseHTML:[{tag:"a",getAttrs:t=>({href:t.getAttribute("href")??""})}],sanitize:{tags:["a"],attrs:["href","target","rel"]}})}registerCommands(t){t.registerCommand("toggleLink",()=>{const e=t.getState();return this.toggleLink(t,e)}),t.registerCommand("setLink",()=>!1),t.registerCommand("removeLink",()=>{const e=t.getState();return this.removeLink(t,e)})}registerKeymap(t){t.registerKeymap({"Mod-K":()=>t.executeCommand("toggleLink")})}registerToolbarItem(t){t.registerToolbarItem({id:"link",group:"insert",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',label:this.locale.label,tooltip:this.locale.tooltip(c("Mod-K")),command:"toggleLink",popupType:"custom",renderPopup:(t,e,n)=>{this.renderLinkPopup(t,e,n)},isActive:t=>this.isLinkActive(t),isEnabled:t=>!o(t.selection)})}isLinkActive(e){return t(e,"link")}toggleLink(t,e){return!!this.isLinkActive(e)&&this.removeLink(t,e)}addLink(t,n,r){const s=n.selection;if(!i(s))return!1;if(o(s))return!1;const l={type:a("link"),attrs:{href:r}},c=e(n,l);return!!c&&(t.dispatch(c),!0)}removeLink(t,e){const s=e.selection;if(!i(s))return!1;if(o(s)){const n=e.getBlock(s.anchor.blockId);if(!n)return!1;const o=[];let i=0;for(const t of n.children){if(!("text"in t))continue;const e=i+t.text.length;o.push({pos:i,end:e,hasLink:r(t.marks,a("link"))}),i=e}const l=o.findIndex(t=>s.anchor.offset>=t.pos&&s.anchor.offset<=t.end),c=l>=0?o[l]:void 0;if(-1===l||!c?.hasLink)return!1;let p=l;for(;p>0&&o[p-1]?.hasLink;)p--;let m=l;for(;m<o.length-1&&o[m+1]?.hasLink;)m++;const u=o[p],h=o[m];if(!u||!h)return!1;const k=u.pos,d=h.end,g=e.transaction("command");return g.removeMark(s.anchor.blockId,k,d,{type:a("link")}),g.setSelection(s),t.dispatch(g.build()),!0}const l=n(e,a("link"));return!!l&&(t.dispatch(l),!0)}renderLinkPopup(t,e,n){t.classList.add("notectl-link-popup");const r=e.getState();if(this.isLinkActive(r)){const r=document.createElement("button");r.type="button",r.className="notectl-link-popup__button",r.textContent=this.locale.removeLink,r.setAttribute("aria-label",this.locale.removeLinkAria),r.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.executeCommand("removeLink"),n(),e.getContainer().focus()}),t.appendChild(r)}else{const r=document.createElement("input");r.type="url",r.className="notectl-link-popup__input",r.placeholder=this.locale.urlPlaceholder,r.setAttribute("aria-label",this.locale.urlAria);const s=document.createElement("button");s.type="button",s.className="notectl-link-popup__button notectl-link-popup__button--apply",s.textContent=this.locale.apply,s.setAttribute("aria-label",this.locale.applyAria);const o=()=>{const t=r.value.trim();t&&(this.addLink(e,e.getState(),t),n(),e.getContainer().focus())};s.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),o()}),r.addEventListener("keydown",t=>{"Enter"===t.key&&(t.preventDefault(),o())}),t.appendChild(r),t.appendChild(s),requestAnimationFrame(()=>r.focus())}}}export{p as LINK_LOCALE_EN,k as LinkPlugin,u as loadLinkLocale};
|
|
5
2
|
//# sourceMappingURL=link.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"link.mjs","sources":["../../src/plugins/link/LinkLocale.ts","../../src/plugins/link/LinkPlugin.ts"],"sourcesContent":["/**\n * Locale interface and default English locale for the LinkPlugin.\n */\n\n// --- Locale Interface ---\n\nexport interface LinkLocale {\n\treadonly label: string;\n\treadonly tooltip: (shortcut: string) => string;\n\treadonly removeLink: string;\n\treadonly removeLinkAria: string;\n\treadonly urlPlaceholder: string;\n\treadonly urlAria: string;\n\treadonly apply: string;\n\treadonly applyAria: string;\n}\n\n// --- Default English Locale ---\n\nexport const LINK_LOCALE_EN: LinkLocale = {\n\tlabel: 'Link',\n\ttooltip: (shortcut: string) => `Insert Link (${shortcut})`,\n\tremoveLink: 'Remove Link',\n\tremoveLinkAria: 'Remove link',\n\turlPlaceholder: 'https://...',\n\turlAria: 'Link URL',\n\tapply: 'Apply',\n\tapplyAria: 'Apply link',\n};\n\n// --- Lazy Locale Loader ---\n\nconst localeModules: Record<string, () => Promise<{ default: LinkLocale }>> = import.meta.glob<{\n\tdefault: LinkLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadLinkLocale(lang: string): Promise<LinkLocale> {\n\tif (lang === 'en') return LINK_LOCALE_EN;\n\tconst loader = localeModules[`./locales/${lang}.ts`];\n\tif (!loader) return LINK_LOCALE_EN;\n\ttry {\n\t\tconst mod = await loader();\n\t\treturn mod.default;\n\t} catch {\n\t\treturn LINK_LOCALE_EN;\n\t}\n}\n","/**\n * LinkPlugin: registers a link mark type with href attribute,\n * toggle command, keyboard shortcut (Mod-K), and toolbar button\n * with a URL input popup.\n */\n\nimport {\n\tapplyAttributedMark,\n\tisAttributedMarkActive,\n\tremoveAttributedMark,\n} from '../../commands/AttributedMarkCommands.js';\nimport { hasMark } from '../../model/Document.js';\nimport { escapeHTML } from '../../model/HTMLUtils.js';\nimport { isCollapsed, isTextSelection } from '../../model/Selection.js';\nimport { markType } from '../../model/TypeBrands.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { resolveLocale } from '../shared/PluginHelpers.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport { LINK_LOCALE_EN, type LinkLocale, loadLinkLocale } from './LinkLocale.js';\n\n// --- Attribute Registry Augmentation ---\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface MarkAttrRegistry {\n\t\tlink: { href: string };\n\t}\n}\n\n// --- Configuration ---\n\nexport interface LinkConfig {\n\t/** Whether to add rel=\"noopener noreferrer\" and target=\"_blank\" by default. */\n\treadonly openInNewTab: boolean;\n\treadonly locale?: LinkLocale;\n}\n\nconst DEFAULT_CONFIG: LinkConfig = {\n\topenInNewTab: true,\n};\n\n// --- Plugin ---\n\nexport class LinkPlugin implements Plugin {\n\treadonly id = 'link';\n\treadonly name = 'Link';\n\treadonly priority = 25;\n\n\tprivate readonly config: LinkConfig;\n\tprivate locale!: LinkLocale;\n\n\tconstructor(config?: Partial<LinkConfig>) {\n\t\tthis.config = { ...DEFAULT_CONFIG, ...config };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(context, this.config.locale, LINK_LOCALE_EN, loadLinkLocale);\n\t\tthis.registerMarkSpec(context);\n\t\tthis.registerCommands(context);\n\t\tthis.registerKeymap(context);\n\t\tthis.registerToolbarItem(context);\n\t}\n\n\tprivate registerMarkSpec(context: PluginContext): void {\n\t\tconst openInNewTab = this.config.openInNewTab;\n\n\t\tcontext.registerMarkSpec({\n\t\t\ttype: 'link',\n\t\t\trank: 10,\n\t\t\tattrs: {\n\t\t\t\thref: { default: '' },\n\t\t\t},\n\t\t\ttoDOM(mark) {\n\t\t\t\tconst a = document.createElement('a');\n\t\t\t\tconst href = mark.attrs?.href ?? '';\n\t\t\t\ta.setAttribute('href', href);\n\t\t\t\tif (openInNewTab) {\n\t\t\t\t\ta.setAttribute('target', '_blank');\n\t\t\t\t\ta.setAttribute('rel', 'noopener noreferrer');\n\t\t\t\t}\n\t\t\t\treturn a;\n\t\t\t},\n\t\t\ttoHTMLString: (mark, content) => {\n\t\t\t\tconst href: string = escapeHTML(String(mark.attrs?.href ?? ''));\n\t\t\t\tif (openInNewTab) {\n\t\t\t\t\treturn `<a href=\"${href}\" target=\"_blank\" rel=\"noopener noreferrer\">${content}</a>`;\n\t\t\t\t}\n\t\t\t\treturn `<a href=\"${href}\">${content}</a>`;\n\t\t\t},\n\t\t\tparseHTML: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'a',\n\t\t\t\t\tgetAttrs: (el) => {\n\t\t\t\t\t\tconst href: string = el.getAttribute('href') ?? '';\n\t\t\t\t\t\treturn { href };\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\tsanitize: { tags: ['a'], attrs: ['href', 'target', 'rel'] },\n\t\t});\n\t}\n\n\tprivate registerCommands(context: PluginContext): void {\n\t\tcontext.registerCommand('toggleLink', () => {\n\t\t\tconst state = context.getState();\n\t\t\treturn this.toggleLink(context, state);\n\t\t});\n\n\t\tcontext.registerCommand('setLink', () => {\n\t\t\t// setLink is called by the popup after URL input\n\t\t\t// The actual URL is set via the popup's custom render\n\t\t\treturn false;\n\t\t});\n\n\t\tcontext.registerCommand('removeLink', () => {\n\t\t\tconst state = context.getState();\n\t\t\treturn this.removeLink(context, state);\n\t\t});\n\t}\n\n\tprivate registerKeymap(context: PluginContext): void {\n\t\tcontext.registerKeymap({\n\t\t\t'Mod-K': () => context.executeCommand('toggleLink'),\n\t\t});\n\t}\n\n\tprivate registerToolbarItem(context: PluginContext): void {\n\t\tconst icon =\n\t\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z\"/></svg>';\n\n\t\tcontext.registerToolbarItem({\n\t\t\tid: 'link',\n\t\t\tgroup: 'insert',\n\t\t\ticon,\n\t\t\tlabel: this.locale.label,\n\t\t\ttooltip: this.locale.tooltip(formatShortcut('Mod-K')),\n\t\t\tcommand: 'toggleLink',\n\t\t\tpopupType: 'custom',\n\t\t\trenderPopup: (container, ctx, onClose) => {\n\t\t\t\tthis.renderLinkPopup(container, ctx, onClose);\n\t\t\t},\n\t\t\tisActive: (state) => this.isLinkActive(state),\n\t\t\tisEnabled: (state) => !isCollapsed(state.selection),\n\t\t});\n\t}\n\n\tprivate isLinkActive(state: EditorState): boolean {\n\t\treturn isAttributedMarkActive(state, 'link');\n\t}\n\n\tprivate toggleLink(context: PluginContext, state: EditorState): boolean {\n\t\tif (this.isLinkActive(state)) {\n\t\t\treturn this.removeLink(context, state);\n\t\t}\n\t\t// Adding links requires the toolbar popup for URL input\n\t\treturn false;\n\t}\n\n\tprivate addLink(context: PluginContext, state: EditorState, href: string): boolean {\n\t\tconst sel = state.selection;\n\t\tif (!isTextSelection(sel)) return false;\n\t\tif (isCollapsed(sel)) return false;\n\n\t\tconst mark = { type: markType('link'), attrs: { href } };\n\t\tconst tr = applyAttributedMark(state, mark);\n\t\tif (!tr) return false;\n\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t}\n\n\tprivate removeLink(context: PluginContext, state: EditorState): boolean {\n\t\tconst sel = state.selection;\n\t\tif (!isTextSelection(sel)) return false;\n\n\t\tif (isCollapsed(sel)) {\n\t\t\t// Remove link from entire link span around cursor (plugin-specific extent scan)\n\t\t\tconst block = state.getBlock(sel.anchor.blockId);\n\t\t\tif (!block) return false;\n\n\t\t\tconst textChildren: { pos: number; end: number; hasLink: boolean }[] = [];\n\t\t\tlet pos = 0;\n\t\t\tfor (const child of block.children) {\n\t\t\t\tif (!('text' in child)) continue;\n\t\t\t\tconst end = pos + child.text.length;\n\t\t\t\ttextChildren.push({ pos, end, hasLink: hasMark(child.marks, markType('link')) });\n\t\t\t\tpos = end;\n\t\t\t}\n\n\t\t\tconst cursorIdx = textChildren.findIndex(\n\t\t\t\t(c) => sel.anchor.offset >= c.pos && sel.anchor.offset <= c.end,\n\t\t\t);\n\t\t\tconst cursorEntry = cursorIdx >= 0 ? textChildren[cursorIdx] : undefined;\n\t\t\tif (cursorIdx === -1 || !cursorEntry?.hasLink) return false;\n\n\t\t\tlet startIdx = cursorIdx;\n\t\t\twhile (startIdx > 0 && textChildren[startIdx - 1]?.hasLink) {\n\t\t\t\tstartIdx--;\n\t\t\t}\n\n\t\t\tlet endIdx = cursorIdx;\n\t\t\twhile (endIdx < textChildren.length - 1 && textChildren[endIdx + 1]?.hasLink) {\n\t\t\t\tendIdx++;\n\t\t\t}\n\n\t\t\tconst startEntry = textChildren[startIdx];\n\t\t\tconst endEntry = textChildren[endIdx];\n\t\t\tif (!startEntry || !endEntry) return false;\n\n\t\t\tconst linkStart = startEntry.pos;\n\t\t\tconst linkEnd = endEntry.end;\n\n\t\t\tconst builder = state.transaction('command');\n\t\t\tbuilder.removeMark(sel.anchor.blockId, linkStart, linkEnd, { type: markType('link') });\n\t\t\tbuilder.setSelection(sel);\n\t\t\tcontext.dispatch(builder.build());\n\t\t\treturn true;\n\t\t}\n\n\t\t// Range selection: delegate to shared helper\n\t\tconst tr = removeAttributedMark(state, markType('link'));\n\t\tif (!tr) return false;\n\t\tcontext.dispatch(tr);\n\t\treturn true;\n\t}\n\n\tprivate renderLinkPopup(\n\t\tcontainer: HTMLElement,\n\t\tcontext: PluginContext,\n\t\tonClose: () => void,\n\t): void {\n\t\tcontainer.classList.add('notectl-link-popup');\n\n\t\tconst state = context.getState();\n\t\tconst isActive = this.isLinkActive(state);\n\n\t\tif (isActive) {\n\t\t\t// Show remove link button\n\t\t\tconst removeBtn = document.createElement('button');\n\t\t\tremoveBtn.type = 'button';\n\t\t\tremoveBtn.className = 'notectl-link-popup__button';\n\t\t\tremoveBtn.textContent = this.locale.removeLink;\n\t\t\tremoveBtn.setAttribute('aria-label', this.locale.removeLinkAria);\n\t\t\tremoveBtn.addEventListener('mousedown', (e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tcontext.executeCommand('removeLink');\n\t\t\t\tonClose();\n\t\t\t\tcontext.getContainer().focus();\n\t\t\t});\n\t\t\tcontainer.appendChild(removeBtn);\n\t\t} else {\n\t\t\t// Show URL input\n\t\t\tconst input = document.createElement('input');\n\t\t\tinput.type = 'url';\n\t\t\tinput.className = 'notectl-link-popup__input';\n\t\t\tinput.placeholder = this.locale.urlPlaceholder;\n\t\t\tinput.setAttribute('aria-label', this.locale.urlAria);\n\n\t\t\tconst applyBtn = document.createElement('button');\n\t\t\tapplyBtn.type = 'button';\n\t\t\tapplyBtn.className = 'notectl-link-popup__button notectl-link-popup__button--apply';\n\t\t\tapplyBtn.textContent = this.locale.apply;\n\t\t\tapplyBtn.setAttribute('aria-label', this.locale.applyAria);\n\n\t\t\tconst applyLink = (): void => {\n\t\t\t\tconst href = input.value.trim();\n\t\t\t\tif (href) {\n\t\t\t\t\tthis.addLink(context, context.getState(), href);\n\t\t\t\t\tonClose();\n\t\t\t\t\tcontext.getContainer().focus();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tapplyBtn.addEventListener('mousedown', (e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tapplyLink();\n\t\t\t});\n\n\t\t\tinput.addEventListener('keydown', (e) => {\n\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tapplyLink();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tcontainer.appendChild(input);\n\t\t\tcontainer.appendChild(applyBtn);\n\n\t\t\t// Auto-focus input\n\t\t\trequestAnimationFrame(() => input.focus());\n\t\t}\n\t}\n}\n"],"names":["LINK_LOCALE_EN","label","tooltip","shortcut","removeLink","removeLinkAria","urlPlaceholder","urlAria","apply","applyAria","localeModules","assign","import","async","loadLinkLocale","lang","loader","default","DEFAULT_CONFIG","openInNewTab","LinkPlugin","id","name","priority","config","locale","constructor","this","init","context","resolveLocale","registerMarkSpec","registerCommands","registerKeymap","registerToolbarItem","type","rank","attrs","href","toDOM","mark","a","document","createElement","setAttribute","toHTMLString","content","escapeHTML","String","parseHTML","tag","getAttrs","el","getAttribute","sanitize","tags","registerCommand","state","getState","toggleLink","executeCommand","group","icon","formatShortcut","command","popupType","renderPopup","container","ctx","onClose","renderLinkPopup","isActive","isLinkActive","isEnabled","isCollapsed","selection","isAttributedMarkActive","addLink","sel","isTextSelection","markType","tr","applyAttributedMark","dispatch","block","getBlock","anchor","blockId","textChildren","pos","child","children","end","text","length","push","hasLink","hasMark","marks","cursorIdx","findIndex","c","offset","cursorEntry","startIdx","endIdx","startEntry","endEntry","linkStart","linkEnd","builder","transaction","removeMark","setSelection","build","removeAttributedMark","classList","add","removeBtn","className","textContent","addEventListener","e","preventDefault","stopPropagation","getContainer","focus","appendChild","input","placeholder","applyBtn","applyLink","value","trim","key","requestAnimationFrame"],"mappings":"kaAmBO,MAAMA,EAA6B,C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D,EAAEE,kBACFO,MAGDH,EAAMP,iBAAiB,UAAYC,IACpB,UAAVA,EAAEY,MACLZ,EAAEC,iBACFQ,OAIFhE,EAAU4D,YAAYC,GACtB7D,EAAU4D,YAAYG,GAGtBK,sBAAsB,IAAMP,EAAMF,QACnC,CACD"}
|
|
@@ -7,12 +7,5 @@ export interface ListLocale {
|
|
|
7
7
|
readonly checklist: string;
|
|
8
8
|
}
|
|
9
9
|
export declare const LIST_LOCALE_EN: ListLocale;
|
|
10
|
-
export declare
|
|
11
|
-
export declare const LIST_LOCALE_ES: ListLocale;
|
|
12
|
-
export declare const LIST_LOCALE_FR: ListLocale;
|
|
13
|
-
export declare const LIST_LOCALE_ZH: ListLocale;
|
|
14
|
-
export declare const LIST_LOCALE_RU: ListLocale;
|
|
15
|
-
export declare const LIST_LOCALE_AR: ListLocale;
|
|
16
|
-
export declare const LIST_LOCALE_HI: ListLocale;
|
|
17
|
-
export declare const LIST_LOCALES: Record<string, ListLocale>;
|
|
10
|
+
export declare function loadListLocale(lang: string): Promise<ListLocale>;
|
|
18
11
|
//# sourceMappingURL=ListLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListLocale.d.ts","sourceRoot":"","sources":["../../../src/plugins/list/ListLocale.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAID,eAAO,MAAM,cAAc,EAAE,UAI5B,CAAC;
|
|
1
|
+
{"version":3,"file":"ListLocale.d.ts","sourceRoot":"","sources":["../../../src/plugins/list/ListLocale.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAID,eAAO,MAAM,cAAc,EAAE,UAI5B,CAAC;AAQF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAUtE"}
|
|
@@ -15,8 +15,6 @@ export interface ListConfig {
|
|
|
15
15
|
readonly types: readonly ListType[];
|
|
16
16
|
/** Maximum indent depth. Defaults to 4. */
|
|
17
17
|
readonly maxIndent: number;
|
|
18
|
-
/** When true, a separator is rendered after the last list toolbar item. */
|
|
19
|
-
readonly separatorAfter?: boolean;
|
|
20
18
|
/**
|
|
21
19
|
* When true, checklist checkboxes remain interactive even in read-only mode.
|
|
22
20
|
* Defaults to false (checkboxes are fully read-only).
|
|
@@ -33,7 +31,7 @@ export declare class ListPlugin implements Plugin {
|
|
|
33
31
|
private context;
|
|
34
32
|
private checkboxClickHandler;
|
|
35
33
|
constructor(config?: Partial<ListConfig>);
|
|
36
|
-
init(context: PluginContext): void
|
|
34
|
+
init(context: PluginContext): Promise<void>;
|
|
37
35
|
destroy(): void;
|
|
38
36
|
private registerNodeSpec;
|
|
39
37
|
private registerCommands;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/list/ListPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"ListPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/list/ListPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAkB,KAAK,UAAU,EAAkB,MAAM,iBAAiB,CAAC;AAIlF,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAE1D,OAAO,QAAQ,6BAA6B,CAAC;IAC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