@jackuait/blok 0.9.0 → 0.10.0-beta.10
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/codemod/migrate-editorjs-to-blok.js +50 -2
- package/codemod/test.js +39 -6
- package/dist/blok.mjs +3 -3
- package/dist/chunks/_basePickBy-DISiGhsr.mjs +410 -0
- package/dist/chunks/_baseUniq-gAuHRtRF.mjs +1045 -0
- package/dist/chunks/_getTag-Aj56Wgor.mjs +26 -0
- package/dist/chunks/arc-D-pL2Ftf.mjs +80 -0
- package/dist/chunks/architecture-YZFGNWBL-CuqTb_ae.mjs +3 -0
- package/dist/chunks/architectureDiagram-Q4EWVU46-DS7mqjL2.mjs +4066 -0
- package/dist/chunks/array-BsrkCVSZ.mjs +6 -0
- package/dist/chunks/blockDiagram-DXYQGD6D-BTtcn4NG.mjs +3259 -0
- package/dist/chunks/{blok-RJ3hyzDH.mjs → blok-Bg3-zpSu.mjs} +2192 -2156
- package/dist/chunks/c-C6JXJf5K.mjs +5 -0
- package/dist/chunks/c4Diagram-AHTNJAMY-Y4Dcwcoo.mjs +2956 -0
- package/dist/chunks/ccount-C9Y7nqDe.mjs +10 -0
- package/dist/chunks/channel-Cln-eWE0.mjs +5 -0
- package/dist/chunks/chunk-2KRD3SAO-DkM7qh-k.mjs +20 -0
- package/dist/chunks/chunk-336JU56O-B17AtzlK.mjs +49 -0
- package/dist/chunks/chunk-426QAEUC-D6UAVUog.mjs +13 -0
- package/dist/chunks/chunk-4BX2VUAB-CgIkjF7Z.mjs +19 -0
- package/dist/chunks/chunk-4TB4RGXK-BUP4eON3.mjs +3250 -0
- package/dist/chunks/chunk-55IACEB6-zZ-IgaSt.mjs +8 -0
- package/dist/chunks/chunk-5FUZZQ4R-DsZnJYxM.mjs +3786 -0
- package/dist/chunks/chunk-5PVQY5BW-CORl9dnu.mjs +1692 -0
- package/dist/chunks/chunk-67CJDMHE-m0UKdcSH.mjs +20 -0
- package/dist/chunks/chunk-7N4EOEYR-DKNajFZd.mjs +29 -0
- package/dist/chunks/chunk-AA7GKIK3-BeLhNzKa.mjs +24 -0
- package/dist/chunks/chunk-BSJP7CBP-CJExmx8a.mjs +83 -0
- package/dist/chunks/chunk-CIAEETIT-CTikoJ19.mjs +20 -0
- package/dist/chunks/chunk-D6kmoKXy.mjs +20 -0
- package/dist/chunks/chunk-EDXVE4YY-DjInnnwb.mjs +26 -0
- package/dist/chunks/chunk-ENJZ2VHE-CIl5FRDA.mjs +566 -0
- package/dist/chunks/chunk-FMBD7UC4-DjV0W7UE.mjs +5 -0
- package/dist/chunks/chunk-FOC6F5B3-LmHCCWYY.mjs +20 -0
- package/dist/chunks/chunk-ICPOFSXX-BHZIN46A.mjs +3290 -0
- package/dist/chunks/chunk-K5T4RW27-BPZ6fFnW.mjs +16370 -0
- package/dist/chunks/chunk-KGLVRYIC-S1OQdW76.mjs +20 -0
- package/dist/chunks/chunk-LIHQZDEY-CjtyJlI6.mjs +55 -0
- package/dist/chunks/chunk-ORNJ4GCN-CdO0hAge.mjs +25 -0
- package/dist/chunks/chunk-OYMX7WX6-ApX8eV4o.mjs +2038 -0
- package/dist/chunks/chunk-QZHKN3VN-BGFuA6-k.mjs +12 -0
- package/dist/chunks/chunk-U2HBQHQK-B88ZUOTL.mjs +1875 -0
- package/dist/chunks/chunk-X2U36JSP-1VS5TyCr.mjs +68 -0
- package/dist/chunks/chunk-XPW4576I-BMupdrvo.mjs +1146 -0
- package/dist/chunks/chunk-YZCP3GAM-BQ7eEsm2.mjs +60 -0
- package/dist/chunks/chunk-ZZ45TVLE-D1xks9zd.mjs +33 -0
- package/dist/chunks/classDiagram-6PBFFD2Q-C59BZJxp.mjs +30 -0
- package/dist/chunks/classDiagram-v2-HSJHXN6E-7a0qeMsE.mjs +30 -0
- package/dist/chunks/clone-Ckjt1LtE.mjs +8 -0
- package/dist/chunks/{constants-A3iVmQL8.mjs → constants-D7zjGD5W.mjs} +529 -530
- package/dist/chunks/core-Bm6DWt7D.mjs +4501 -0
- package/dist/chunks/cose-bilkent-S5V4N54A-Bpcs2jA_.mjs +2246 -0
- package/dist/chunks/cpp-BdjvAny0.mjs +16 -0
- package/dist/chunks/csharp-YHxeHpeH.mjs +3 -0
- package/dist/chunks/css-DdLevFaX.mjs +3 -0
- package/dist/chunks/cytoscape.esm-BvD8wo00.mjs +18108 -0
- package/dist/chunks/dagre-CGNbYTKq.mjs +1536 -0
- package/dist/chunks/dagre-KV5264BT-DUD9ikgN.mjs +298 -0
- package/dist/chunks/dart-DrPWqfcC.mjs +3 -0
- package/dist/chunks/default-qigT1Xpq.mjs +4 -0
- package/dist/chunks/defaultLocale-ChuSeAxU.mjs +201 -0
- package/dist/chunks/diagram-5BDNPKRD-CZGfTYEe.mjs +112 -0
- package/dist/chunks/diagram-G4DWMVQ6-CuS0-h95.mjs +546 -0
- package/dist/chunks/diagram-MMDJMWI5-C-AEApYz.mjs +234 -0
- package/dist/chunks/diagram-TYMM5635-CiwAJVMq.mjs +144 -0
- package/dist/chunks/dist-Ctq-pyfb.mjs +59 -0
- package/dist/chunks/dockerfile-C68ALcaN.mjs +3 -0
- package/dist/chunks/engine-javascript-CJpnSvzf.mjs +2373 -0
- package/dist/chunks/erDiagram-SMLLAGMA-DeH5yck2.mjs +1712 -0
- package/dist/chunks/flowDiagram-DWJPFMVM-Cr6dwmQ5.mjs +4175 -0
- package/dist/chunks/ganttDiagram-T4ZO3ILL-K-divBg_.mjs +3083 -0
- package/dist/chunks/gitGraph-7Q5UKJZL-Dl-vQzrq.mjs +3 -0
- package/dist/chunks/gitGraphDiagram-UUTBAWPF-UytPZv72.mjs +792 -0
- package/dist/chunks/go-Fm5N96DN.mjs +3 -0
- package/dist/chunks/graphlib-Cye9EPNq.mjs +223 -0
- package/dist/chunks/graphql-BSnqmqgO.mjs +11 -0
- package/dist/chunks/html-BLNeZvnp.mjs +10 -0
- package/dist/chunks/{i18next-Ch0gVA3V.mjs → i18next-CXx5niYF.mjs} +1 -1
- package/dist/chunks/{i18next-loader-dH3UPF7S.mjs → i18next-loader-CwsYu0n6.mjs} +2 -2
- package/dist/chunks/info-OMHHGYJF-BOejJvJR.mjs +3 -0
- package/dist/chunks/infoDiagram-42DDH7IO-DuYnDbF3.mjs +29 -0
- package/dist/chunks/init-C6T-mugb.mjs +15 -0
- package/dist/chunks/ishikawaDiagram-UXIWVN3A-CHc59dLn.mjs +719 -0
- package/dist/chunks/java-83DWBpzu.mjs +5 -0
- package/dist/chunks/javascript-CBgeF1Xx.mjs +3 -0
- package/dist/chunks/journeyDiagram-VCZTEJTY-CD25C4_n.mjs +885 -0
- package/dist/chunks/json-BI17y-1H.mjs +3 -0
- package/dist/chunks/kanban-definition-6JOO6SKY-CTCT6N_p.mjs +980 -0
- package/dist/chunks/katex-CmTPfM0f.mjs +22026 -0
- package/dist/chunks/kotlin-DjnvsrfO.mjs +3 -0
- package/dist/chunks/latex-24n3TcOR.mjs +5 -0
- package/dist/chunks/{lightweight-i18n-1rbaxIZW.mjs → lightweight-i18n-Cvv8CWh4.mjs} +69 -2
- package/dist/chunks/line-Dct5pMmw.mjs +34 -0
- package/dist/chunks/linear-BRCpMvtr.mjs +289 -0
- package/dist/chunks/lua-DV0fuZWx.mjs +5 -0
- package/dist/chunks/markdown-BqQYT45f.mjs +3 -0
- package/dist/chunks/mdast-util-math-BlK2Zu-1.mjs +151 -0
- package/dist/chunks/mermaid-parser.core-CA3DKkuk.mjs +57 -0
- package/dist/chunks/mermaid-vF0cEnZ0.mjs +3 -0
- package/dist/chunks/mermaid.core-CA8nc1sZ.mjs +989 -0
- package/dist/{messages-DaOnbI6d.mjs → chunks/messages-8IHf7ZP3.mjs} +68 -1
- package/dist/chunks/{messages-C9aKfCro.mjs → messages-A_MkXDlG.mjs} +68 -1
- package/dist/{messages-BLEVLZve.mjs → chunks/messages-B0vPBsWq.mjs} +68 -1
- package/dist/chunks/{messages-C0hQPZmh2.mjs → messages-B2N4fUi72.mjs} +68 -1
- package/dist/{messages-HNAtlVax.mjs → chunks/messages-B4UMuyjT.mjs} +73 -6
- package/dist/chunks/{messages-DRUkmDVZ.mjs → messages-B9kmbUWV.mjs} +68 -1
- package/dist/{messages-Dbsx9m5q2.mjs → chunks/messages-BA8Iv99Y2.mjs} +68 -1
- package/dist/chunks/{messages-Da-SOTFW.mjs → messages-BAsb5CgZ.mjs} +68 -1
- package/dist/{messages-D1P0QGLz2.mjs → chunks/messages-BDZA10kl2.mjs} +68 -1
- package/dist/chunks/{messages-ComLU2T32.mjs → messages-BE6lHKwf.mjs} +68 -1
- package/dist/chunks/{messages-gaxTO-87.mjs → messages-BQYvBqm2.mjs} +68 -1
- package/dist/chunks/{messages-BwKs-9DF.mjs → messages-BSghd0ez.mjs} +68 -1
- package/dist/{messages-BPRR6TMf.mjs → chunks/messages-BUVhHx0q2.mjs} +68 -1
- package/dist/{messages-B7jZvo-m.mjs → chunks/messages-BVjoM7P0.mjs} +68 -1
- package/dist/{messages-C-4z1-Dh.mjs → chunks/messages-BXM80fdr2.mjs} +68 -1
- package/dist/{messages-Bm0nvUuj2.mjs → chunks/messages-BYlSMRkd.mjs} +68 -1
- package/dist/chunks/{messages-DLPrj3Dh.mjs → messages-BYxLFj7y.mjs} +68 -1
- package/dist/{messages-BRcLIBCd2.mjs → chunks/messages-BeFqtIrc2.mjs} +68 -1
- package/dist/{messages-zHkURG6V2.mjs → chunks/messages-Bfnq1xv4.mjs} +68 -1
- package/dist/chunks/{messages-Z762-GLL.mjs → messages-BhzzNkN-.mjs} +68 -1
- package/dist/chunks/{messages-COJ0CbVV2.mjs → messages-BjadX8jR2.mjs} +68 -1
- package/dist/{messages-B2ZwD4n9.mjs → chunks/messages-Bp8qin1R.mjs} +68 -1
- package/dist/chunks/{messages-DdEWnfAR.mjs → messages-Bphq_Bt3.mjs} +71 -4
- package/dist/{messages-CUDbNJG5.mjs → chunks/messages-Bxvi1ebN.mjs} +68 -1
- package/dist/chunks/{messages-B0t2L3bi.mjs → messages-C0HvoMPb.mjs} +68 -1
- package/dist/{messages-D6qfWi6H2.mjs → chunks/messages-C3aX3q0H.mjs} +68 -1
- package/dist/chunks/{messages-v9NkxRcL.mjs → messages-C6Mpiacw.mjs} +68 -1
- package/dist/chunks/{messages-CqZ9vFyx.mjs → messages-C7VGpihw.mjs} +69 -2
- package/dist/chunks/{messages-Yj4Q1_uX2.mjs → messages-CKBhDGI3.mjs} +69 -2
- package/dist/chunks/{messages-DxtnwNPo.mjs → messages-COO5xmcA.mjs} +68 -1
- package/dist/{messages-CZTcgUzd.mjs → chunks/messages-CSJ_zb3a2.mjs} +68 -1
- package/dist/{messages-A8aZS7d_2.mjs → chunks/messages-CSL-6xfb2.mjs} +68 -1
- package/dist/{messages-CxruHsuD2.mjs → chunks/messages-CVdpweyf2.mjs} +69 -2
- package/dist/{messages-D2Mf9z2D.mjs → chunks/messages-Cdf0W9H02.mjs} +68 -1
- package/dist/chunks/{messages-DAbCNake2.mjs → messages-Ck81cQkn2.mjs} +68 -1
- package/dist/chunks/{messages-Dyku8Cut.mjs → messages-Cmf6NhSC.mjs} +68 -1
- package/dist/chunks/{messages-DQ6bFum9.mjs → messages-Cs81Z_Bh.mjs} +68 -1
- package/dist/chunks/{messages-cegxHurd2.mjs → messages-Cu-Wevxs2.mjs} +68 -1
- package/dist/{messages-D2HwpoUE.mjs → chunks/messages-D3zojZ94.mjs} +69 -2
- package/dist/{messages-BfTBVFd9.mjs → chunks/messages-D55HRx5O2.mjs} +68 -1
- package/dist/chunks/{messages-Dl03jd4b2.mjs → messages-D9N2MvQx2.mjs} +68 -1
- package/dist/{messages-DfXh-i9o.mjs → chunks/messages-DG-4DPmP.mjs} +68 -1
- package/dist/chunks/{messages-DmJf9laH2.mjs → messages-DGL1ySqb2.mjs} +68 -1
- package/dist/chunks/{messages-DfU4yvkL.mjs → messages-DJoNVjqP.mjs} +68 -1
- package/dist/{messages-Bsd4ruEY.mjs → chunks/messages-DMVXnAYj.mjs} +70 -3
- package/dist/{messages-3WhPEFd7.mjs → chunks/messages-DOuS1Qge.mjs} +68 -1
- package/dist/chunks/{messages-B1kDfIN82.mjs → messages-DWu1r4gc2.mjs} +68 -1
- package/dist/{messages-Dtih3ffa2.mjs → chunks/messages-DlLXpgWM2.mjs} +68 -1
- package/dist/chunks/{messages-DKNULJpc.mjs → messages-DlonA3wa.mjs} +69 -2
- package/dist/{messages-C5pBfa_W.mjs → chunks/messages-Dr0Ekmbz.mjs} +81 -14
- package/dist/{messages-Du62vI49.mjs → chunks/messages-DzTk8bJ5.mjs} +68 -1
- package/dist/{messages-DNAp0U4l2.mjs → chunks/messages-FWfsxpBz.mjs} +68 -1
- package/dist/{messages-B2YeJw8s2.mjs → chunks/messages-G416eyjY.mjs} +68 -1
- package/dist/chunks/{messages-C5-aaU2b.mjs → messages-Je5YvxiY.mjs} +68 -1
- package/dist/chunks/{messages-DHHZUf_H2.mjs → messages-JyvWu4rf2.mjs} +68 -1
- package/dist/chunks/{messages-D_6vPBzT.mjs → messages-KdawW5Na.mjs} +68 -1
- package/dist/chunks/{messages-DnuhgHG0.mjs → messages-MxpWO1db.mjs} +68 -1
- package/dist/{messages-DT4rHATO2.mjs → chunks/messages-NEqrrYvE2.mjs} +68 -1
- package/dist/chunks/{messages-DeSSxLsh.mjs → messages-RInp1ytX.mjs} +68 -1
- package/dist/{messages-DfEPVRdJ.mjs → chunks/messages-TRUuyiFB.mjs} +68 -1
- package/dist/chunks/{messages--eH7tTJV2.mjs → messages-aZcy0JQq2.mjs} +68 -1
- package/dist/{messages-O6z1uabG.mjs → chunks/messages-iS34FHFB.mjs} +68 -1
- package/dist/{messages-BE0DjTEC.mjs → chunks/messages-ihCjSFJI2.mjs} +68 -1
- package/dist/chunks/{messages-_5Pg5fKy2.mjs → messages-jfVpL9c-2.mjs} +68 -1
- package/dist/chunks/{messages-CaRSYuhO.mjs → messages-p1mbe__S.mjs} +68 -1
- package/dist/chunks/{messages-BGssMBWM2.mjs → messages-rCd0Rrw6.mjs} +69 -2
- package/dist/{messages-COgvIEeW.mjs → chunks/messages-xuqyb6Ff2.mjs} +68 -1
- package/dist/chunks/micromark-extension-math-BbkUb36G.mjs +169 -0
- package/dist/chunks/micromark-factory-space-y4SDWQKm.mjs +36 -0
- package/dist/chunks/mindmap-definition-QFDTVHPH-hNnyBkEP.mjs +1013 -0
- package/dist/chunks/{notifier-Butv4Dvo.mjs → notifier-CuvTt9pe.mjs} +1 -1
- package/dist/chunks/objectWithoutProperties-D0XxKB4n.mjs +23 -0
- package/dist/chunks/one-light-DmNO_Y4X.mjs +4 -0
- package/dist/chunks/ordinal-B-kolV-i.mjs +65 -0
- package/dist/chunks/packet-4T2RLAQJ-B5ZMgwzZ.mjs +3 -0
- package/dist/chunks/path-rIMjg_tH.mjs +85 -0
- package/dist/chunks/php-DmXKyPwJ.mjs +18 -0
- package/dist/chunks/pie-ZZUOXDRM-B9l6y0XJ.mjs +3 -0
- package/dist/chunks/pieDiagram-DEJITSTG-Gw-fsc6U.mjs +179 -0
- package/dist/chunks/python-DfwfY9t5.mjs +3 -0
- package/dist/chunks/quadrantDiagram-34T5L4WZ-CQ5fGYI5.mjs +1960 -0
- package/dist/chunks/r-BD2D7qEW.mjs +5 -0
- package/dist/chunks/radar-PYXPWWZC-D5kYmUaB.mjs +3 -0
- package/dist/chunks/requirementDiagram-MS252O5E-DjWKB42c.mjs +2224 -0
- package/dist/chunks/rough.esm-cmMIcj7N.mjs +1353 -0
- package/dist/chunks/ruby-DdOo03Kg.mjs +33 -0
- package/dist/chunks/rust-DEDueB5R.mjs +3 -0
- package/dist/chunks/sankeyDiagram-XADWPNL6-BIN2evSB.mjs +909 -0
- package/dist/chunks/scala-CsjqvxE4.mjs +3 -0
- package/dist/chunks/sequenceDiagram-FGHM5R23-CQz2lMoS.mjs +4181 -0
- package/dist/chunks/shellscript-Bh5zEpnQ.mjs +3 -0
- package/dist/chunks/sql-D9CrOi1i.mjs +3 -0
- package/dist/chunks/src-DVJl6f6s.mjs +2149 -0
- package/dist/chunks/stateDiagram-FHFEXIEX-BIBFsF65.mjs +218 -0
- package/dist/chunks/stateDiagram-v2-QKLJ7IA2-BZUmAVw7.mjs +28 -0
- package/dist/chunks/swift-Dpyt0s2c.mjs +3 -0
- package/dist/chunks/timeline-definition-GMOUNBTQ-CzvQ7Lav.mjs +1084 -0
- package/dist/chunks/{tools-nT6zA9QL.mjs → tools-CrRhWn8L.mjs} +3043 -1303
- package/dist/chunks/treeView-SZITEDCU-BNtnNxpI.mjs +3 -0
- package/dist/chunks/treemap-W4RFUUIX-DYENULz2.mjs +3 -0
- package/dist/chunks/typescript-DO5cd4m8.mjs +5 -0
- package/dist/chunks/vennDiagram-DHZGUBPP-B0DmLQqe.mjs +1876 -0
- package/dist/chunks/vitesse-dark-CcorSKT2.mjs +4 -0
- package/dist/chunks/wardley-RL74JXVD-ByNHVBTb.mjs +3 -0
- package/dist/chunks/wardleyDiagram-NUSXRM2D-CzoKesUw.mjs +594 -0
- package/dist/chunks/xml-g8kXXALs.mjs +5 -0
- package/dist/chunks/xychartDiagram-5P7HB3ND-CixwR8r2.mjs +2017 -0
- package/dist/chunks/yaml-CrNNZyLb.mjs +3 -0
- package/dist/cli.mjs +1 -1
- package/dist/full.mjs +14 -14
- package/dist/locales.mjs +135 -68
- package/dist/markdown.mjs +3954 -0
- package/dist/{messages-D_CUdqU12.mjs → messages-5jvKxQNu2.mjs} +68 -1
- package/dist/{chunks/messages-CFfpHyTU.mjs → messages-7QD-X6XT2.mjs} +68 -1
- package/dist/{messages-CdX1odk_2.mjs → messages-96iaAUds2.mjs} +68 -1
- package/dist/{messages-C8ca-jEa.mjs → messages-B19o-Teb.mjs} +69 -2
- package/dist/{messages-I03yFhup.mjs → messages-B1ZUQagA.mjs} +68 -1
- package/dist/{chunks/messages-BSw88lIo2.mjs → messages-B7ieAJBd2.mjs} +68 -1
- package/dist/{messages-sNSXCkeB.mjs → messages-BECMxmfX.mjs} +68 -1
- package/dist/{messages-DgGZsxBB.mjs → messages-BIHc0KHY.mjs} +68 -1
- package/dist/{messages-yZj20Fvf.mjs → messages-BIoeoik5.mjs} +68 -1
- package/dist/{chunks/messages-D8JFu42v.mjs → messages-BJeGJksD.mjs} +68 -1
- package/dist/{messages-BSLErTnW2.mjs → messages-BRZX964b2.mjs} +68 -1
- package/dist/{chunks/messages-BW8arxf72.mjs → messages-BTQPpoM42.mjs} +68 -1
- package/dist/{messages-C52AiyVV.mjs → messages-BYNcD6uR.mjs} +68 -1
- package/dist/{messages-BxJv0qBn2.mjs → messages-BYmmMDrN2.mjs} +68 -1
- package/dist/{messages-CoCy2JIP.mjs → messages-BbYq1pk-.mjs} +68 -1
- package/dist/{messages-Cnz_SHE32.mjs → messages-BiUGXvYr2.mjs} +68 -1
- package/dist/{chunks/messages-Dl6SVT1Z.mjs → messages-BiiongNz2.mjs} +68 -1
- package/dist/{chunks/messages-C912bk5I.mjs → messages-Bm0Feca1.mjs} +69 -2
- package/dist/{chunks/messages-CTuCPqpJ.mjs → messages-BmAn22OX.mjs} +68 -1
- package/dist/{messages-DdiPWkV8.mjs → messages-Bq3F2Tp_.mjs} +68 -1
- package/dist/{chunks/messages-DJxXZi1D2.mjs → messages-BsycN_JI2.mjs} +68 -1
- package/dist/{chunks/messages-OdEuBvgf.mjs → messages-BwHs4cm1.mjs} +70 -3
- package/dist/{chunks/messages-C4ZAJzBh.mjs → messages-CJTy6JZt.mjs} +68 -1
- package/dist/{chunks/messages-D2OZ9dbO.mjs → messages-CR_L_UtK.mjs} +68 -1
- package/dist/{messages-ypuLZyw12.mjs → messages-CSUHBs4c2.mjs} +68 -1
- package/dist/{chunks/messages-BkES2MDr2.mjs → messages-CWIXvnDf2.mjs} +68 -1
- package/dist/{messages-Cpeko5kB.mjs → messages-CcF4y-E4.mjs} +68 -1
- package/dist/{messages-BmnC-s4X.mjs → messages-Ce6KVEbT.mjs} +68 -1
- package/dist/{messages-DTNfG4ZH.mjs → messages-Ci0KqX-J.mjs} +71 -4
- package/dist/{chunks/messages-CGh56r-H2.mjs → messages-CjbnogEC.mjs} +68 -1
- package/dist/{messages-B3jq5Hpa.mjs → messages-CmB406HW.mjs} +69 -2
- package/dist/{chunks/messages-BsZz1Hnn2.mjs → messages-CqXtJTpU.mjs} +68 -1
- package/dist/{messages-DL000FUf2.mjs → messages-D0aw5_0k2.mjs} +68 -1
- package/dist/{chunks/messages-Df2RYuup2.mjs → messages-D8FQWulF2.mjs} +68 -1
- package/dist/{messages-CxHn7cs2.mjs → messages-DBiVgUs2.mjs} +68 -1
- package/dist/{chunks/messages-Dsapm4K9.mjs → messages-DIJlIqlQ2.mjs} +68 -1
- package/dist/{chunks/messages-517llQmh.mjs → messages-DLX_iBDJ.mjs} +68 -1
- package/dist/{chunks/messages-BG8Nq35G.mjs → messages-DLlc9QPw.mjs} +68 -1
- package/dist/{messages-cokJPuUp2.mjs → messages-DMr62KiO2.mjs} +68 -1
- package/dist/{chunks/messages-Dkp-Eyu02.mjs → messages-DPA-mMWC2.mjs} +68 -1
- package/dist/{chunks/messages-7uCUVFea.mjs → messages-DTh9a8mR.mjs} +68 -1
- package/dist/{messages-VBFioL2M.mjs → messages-DY4IqlhY.mjs} +68 -1
- package/dist/{chunks/messages-C4X0xP3h.mjs → messages-DYTTu0O12.mjs} +68 -1
- package/dist/{messages-diSPQ2Da2.mjs → messages-DbySKTKt2.mjs} +69 -2
- package/dist/{chunks/messages-BGE43_6M.mjs → messages-Ddnj2iTG2.mjs} +68 -1
- package/dist/{chunks/messages-BtUqUzMG2.mjs → messages-DkLU_rWm.mjs} +68 -1
- package/dist/{messages-DSX2HaeN2.mjs → messages-Dl3Sv6Rq2.mjs} +68 -1
- package/dist/{chunks/messages-BDvpl6Ox.mjs → messages-Dl5Y2-Ia.mjs} +81 -14
- package/dist/{chunks/messages-C7plNvNE2.mjs → messages-DnG0ef8t2.mjs} +69 -2
- package/dist/{chunks/messages-qS8tM3Dk.mjs → messages-DnGJD4TL.mjs} +68 -1
- package/dist/{messages-Ct468oX22.mjs → messages-Dnp9N6RU2.mjs} +68 -1
- package/dist/{chunks/messages-CjIA--kO.mjs → messages-Dvn35ksS.mjs} +68 -1
- package/dist/{messages-BRxNqmJ8.mjs → messages-Dw__BcTj.mjs} +68 -1
- package/dist/{chunks/messages-0zhE8A9X.mjs → messages-Dy-Y_nEI.mjs} +68 -1
- package/dist/{chunks/messages-CCH4OETw2.mjs → messages-E_ZuzGDt.mjs} +68 -1
- package/dist/{chunks/messages-DZzoT0T_.mjs → messages-F2xRoY1w.mjs} +68 -1
- package/dist/{chunks/messages-zGdqNZbH.mjs → messages-Smt4GBbj.mjs} +73 -6
- package/dist/{messages-CvIxHHp92.mjs → messages-aMXpHt5X2.mjs} +68 -1
- package/dist/{messages-C8JVJUp12.mjs → messages-aWZH50vu2.mjs} +68 -1
- package/dist/{messages-Phrqr7a6.mjs → messages-dv19AkyJ.mjs} +68 -1
- package/dist/{chunks/messages-DngM4hda2.mjs → messages-hWwSRF-2.mjs} +68 -1
- package/dist/{messages-DpGo_Da5.mjs → messages-j7o5rT9s.mjs} +68 -1
- package/dist/{messages-C6WJx6Z0.mjs → messages-nUVjeh7K.mjs} +68 -1
- package/dist/{messages-CbVilNPE.mjs → messages-nlhESX9t.mjs} +68 -1
- package/dist/{messages-C6o0FVy02.mjs → messages-rk-A1Wa42.mjs} +69 -2
- package/dist/{messages-D4mCIODv.mjs → messages-xh2eOLvs.mjs} +68 -1
- package/dist/{chunks/messages-Ct9UUOrl2.mjs → messages-ynAe7ewZ.mjs} +68 -1
- package/dist/react.mjs +26 -25
- package/dist/tools.mjs +3 -3
- package/dist/vendor.LICENSE.txt +5404 -80
- package/package.json +16 -1
- package/src/components/blocks.ts +26 -1
- package/src/components/constants/data-attributes.ts +2 -2
- package/src/components/i18n/locales/am/messages.json +68 -1
- package/src/components/i18n/locales/ar/messages.json +68 -1
- package/src/components/i18n/locales/az/messages.json +68 -1
- package/src/components/i18n/locales/bg/messages.json +68 -1
- package/src/components/i18n/locales/bn/messages.json +68 -1
- package/src/components/i18n/locales/bs/messages.json +69 -2
- package/src/components/i18n/locales/cs/messages.json +70 -3
- package/src/components/i18n/locales/da/messages.json +71 -4
- package/src/components/i18n/locales/de/messages.json +73 -6
- package/src/components/i18n/locales/dv/messages.json +68 -1
- package/src/components/i18n/locales/el/messages.json +68 -1
- package/src/components/i18n/locales/en/messages.json +68 -1
- package/src/components/i18n/locales/es/messages.json +68 -1
- package/src/components/i18n/locales/et/messages.json +69 -2
- package/src/components/i18n/locales/fa/messages.json +68 -1
- package/src/components/i18n/locales/fi/messages.json +68 -1
- package/src/components/i18n/locales/fil/messages.json +81 -14
- package/src/components/i18n/locales/fr/messages.json +68 -1
- package/src/components/i18n/locales/gu/messages.json +68 -1
- package/src/components/i18n/locales/he/messages.json +68 -1
- package/src/components/i18n/locales/hi/messages.json +68 -1
- package/src/components/i18n/locales/hr/messages.json +69 -2
- package/src/components/i18n/locales/hu/messages.json +68 -1
- package/src/components/i18n/locales/hy/messages.json +68 -1
- package/src/components/i18n/locales/id/messages.json +68 -1
- package/src/components/i18n/locales/it/messages.json +68 -1
- package/src/components/i18n/locales/ja/messages.json +68 -1
- package/src/components/i18n/locales/ka/messages.json +68 -1
- package/src/components/i18n/locales/km/messages.json +68 -1
- package/src/components/i18n/locales/kn/messages.json +68 -1
- package/src/components/i18n/locales/ko/messages.json +68 -1
- package/src/components/i18n/locales/ku/messages.json +68 -1
- package/src/components/i18n/locales/lo/messages.json +68 -1
- package/src/components/i18n/locales/lt/messages.json +68 -1
- package/src/components/i18n/locales/lv/messages.json +68 -1
- package/src/components/i18n/locales/mk/messages.json +68 -1
- package/src/components/i18n/locales/ml/messages.json +68 -1
- package/src/components/i18n/locales/mn/messages.json +68 -1
- package/src/components/i18n/locales/mr/messages.json +68 -1
- package/src/components/i18n/locales/ms/messages.json +69 -2
- package/src/components/i18n/locales/my/messages.json +68 -1
- package/src/components/i18n/locales/ne/messages.json +68 -1
- package/src/components/i18n/locales/nl/messages.json +68 -1
- package/src/components/i18n/locales/no/messages.json +68 -1
- package/src/components/i18n/locales/pa/messages.json +68 -1
- package/src/components/i18n/locales/pl/messages.json +68 -1
- package/src/components/i18n/locales/ps/messages.json +68 -1
- package/src/components/i18n/locales/pt/messages.json +68 -1
- package/src/components/i18n/locales/ro/messages.json +68 -1
- package/src/components/i18n/locales/ru/messages.json +68 -1
- package/src/components/i18n/locales/sd/messages.json +68 -1
- package/src/components/i18n/locales/si/messages.json +68 -1
- package/src/components/i18n/locales/sk/messages.json +69 -2
- package/src/components/i18n/locales/sl/messages.json +69 -2
- package/src/components/i18n/locales/sq/messages.json +68 -1
- package/src/components/i18n/locales/sr/messages.json +68 -1
- package/src/components/i18n/locales/sv/messages.json +68 -1
- package/src/components/i18n/locales/sw/messages.json +68 -1
- package/src/components/i18n/locales/ta/messages.json +68 -1
- package/src/components/i18n/locales/te/messages.json +68 -1
- package/src/components/i18n/locales/th/messages.json +68 -1
- package/src/components/i18n/locales/tr/messages.json +68 -1
- package/src/components/i18n/locales/ug/messages.json +68 -1
- package/src/components/i18n/locales/uk/messages.json +68 -1
- package/src/components/i18n/locales/ur/messages.json +68 -1
- package/src/components/i18n/locales/vi/messages.json +68 -1
- package/src/components/i18n/locales/yi/messages.json +68 -1
- package/src/components/i18n/locales/zh/messages.json +68 -1
- package/src/components/icons/index.ts +78 -0
- package/src/components/inline-tools/inline-tool-code.ts +399 -0
- package/src/components/modules/api/blocks.ts +17 -0
- package/src/components/modules/api/ui.ts +0 -3
- package/src/components/modules/blockEvents/composers/blockSelectionKeys.ts +20 -3
- package/src/components/modules/paste/handlers/html-handler.ts +13 -10
- package/src/components/modules/paste/handlers/index.ts +1 -0
- package/src/components/modules/paste/index.ts +6 -0
- package/src/components/modules/renderer.ts +17 -0
- package/src/components/modules/ui.ts +1 -13
- package/src/components/ui/toolbox.ts +9 -0
- package/src/components/utils/caret/boundaries.ts +15 -4
- package/src/components/utils/popover/popover-desktop.ts +11 -0
- package/src/markdown/index.ts +63 -0
- package/src/markdown/markdown-handler.ts +110 -0
- package/src/markdown/mdast-to-blocks.ts +418 -0
- package/src/markdown/phrasing-to-html.ts +60 -0
- package/src/markdown/types.ts +42 -0
- package/src/stories/EditorModes.stories.ts +0 -60
- package/src/styles/main.css +57 -2
- package/src/tools/callout/constants.ts +2 -1
- package/src/tools/callout/emoji-picker/index.ts +41 -2
- package/src/tools/callout/index.ts +25 -0
- package/src/tools/code/code-keyboard.ts +142 -0
- package/src/tools/code/constants.ts +96 -0
- package/src/tools/code/dom-builder.ts +181 -0
- package/src/tools/code/highlight-applier.ts +229 -0
- package/src/tools/code/index.ts +462 -0
- package/src/tools/code/katex-loader.ts +50 -0
- package/src/tools/code/language-picker.ts +241 -0
- package/src/tools/code/mermaid-loader.ts +45 -0
- package/src/tools/code/shiki-loader.ts +135 -0
- package/src/tools/divider/index.ts +11 -2
- package/src/tools/header/index.ts +2 -0
- package/src/tools/index.ts +6 -0
- package/src/tools/list/block-operations.ts +3 -1
- package/src/tools/list/depth-validator.ts +4 -7
- package/src/tools/list/dom-builder.ts +5 -3
- package/src/tools/list/index.ts +21 -3
- package/src/tools/list/list-helpers.ts +9 -2
- package/src/tools/list/list-keyboard.ts +56 -14
- package/src/tools/list/list-lifecycle.ts +3 -1
- package/src/tools/list/marker-calculator.ts +37 -0
- package/src/tools/list/ordered-marker-manager.ts +4 -2
- package/src/tools/list/style-config.ts +3 -0
- package/src/tools/paragraph/index.ts +1 -0
- package/src/tools/quote/index.ts +229 -0
- package/src/tools/table/core/table-commands.ts +16 -0
- package/src/tools/table/core/table-controller.ts +29 -0
- package/src/tools/table/core/table-events.ts +17 -0
- package/src/tools/table/index.ts +220 -14
- package/src/tools/table/table-cell-blocks.ts +51 -6
- package/src/tools/table/table-cell-clipboard.ts +7 -2
- package/src/tools/table/table-cell-placement-picker.ts +133 -0
- package/src/tools/table/table-cell-selection.ts +174 -19
- package/src/tools/table/table-core.ts +321 -113
- package/src/tools/table/table-map.ts +279 -0
- package/src/tools/table/table-model.ts +901 -1
- package/src/tools/table/table-operations.ts +87 -44
- package/src/tools/table/table-resize.ts +19 -17
- package/src/tools/table/table-row-col-drag.ts +24 -10
- package/src/tools/table/types.ts +24 -2
- package/src/tools/toggle/index.ts +1 -0
- package/types/configs/blok-config.d.ts +7 -0
- package/types/data-attributes.d.ts +0 -1
- package/types/markdown.d.ts +2 -0
- package/types/tools/callout.d.ts +16 -0
- package/types/tools/code.d.ts +13 -0
- package/types/tools/quote.d.ts +13 -0
- package/types/tools/tool-settings.d.ts +7 -0
- package/types/tools-entry.d.ts +7 -0
- /package/dist/chunks/{am-CHDDMHkd.mjs → am-BxlkYGsI.mjs} +0 -0
- /package/dist/chunks/{ar-DoqfNqut.mjs → ar-9vlpr9V8.mjs} +0 -0
- /package/dist/chunks/{az-C34P9iEa.mjs → az-ON63W_FP.mjs} +0 -0
- /package/dist/chunks/{bg-jroXLY8Y.mjs → bg-CtXWTP5w.mjs} +0 -0
- /package/dist/chunks/{bn-BRI-WqxY.mjs → bn-BERvhXM4.mjs} +0 -0
- /package/dist/chunks/{bs-CCGUpNHu.mjs → bs-CBg8NVPG.mjs} +0 -0
- /package/dist/chunks/{cs-D5qZOGuc.mjs → cs-DeQddxS7.mjs} +0 -0
- /package/dist/chunks/{da-DrJ7W37K.mjs → da-DyTo-ec_.mjs} +0 -0
- /package/dist/chunks/{de-BW6-kp2c.mjs → de-Cu7545m1.mjs} +0 -0
- /package/dist/chunks/{el-C-Vc_Otu.mjs → el-oiubLRBq.mjs} +0 -0
- /package/dist/chunks/{es-B6fI5K9i.mjs → es-DZUC6Klv.mjs} +0 -0
- /package/dist/chunks/{et-BhVlZ-Yz.mjs → et-CDeklAog.mjs} +0 -0
- /package/dist/chunks/{fa-D55Ijdqa.mjs → fa-Cafp7_Li.mjs} +0 -0
- /package/dist/chunks/{fi-jNLjhKUQ.mjs → fi-BD_V_aVW.mjs} +0 -0
- /package/dist/chunks/{fil-DYd0T5aX.mjs → fil-Crsfbtx4.mjs} +0 -0
- /package/dist/chunks/{fr-yxy5xWw_.mjs → fr-BGGc04Zv.mjs} +0 -0
- /package/dist/chunks/{gu-CcY_LJe7.mjs → gu-Vg_BgCTp.mjs} +0 -0
- /package/dist/chunks/{he-DL9s7wNw.mjs → he-DTY9chlZ.mjs} +0 -0
- /package/dist/chunks/{hi-C8eGXgw5.mjs → hi-DChMXk0x.mjs} +0 -0
- /package/dist/chunks/{hr-DLpybOhU.mjs → hr-BWVgNU8k.mjs} +0 -0
- /package/dist/chunks/{hu-BkT0gT00.mjs → hu-B37awHXA.mjs} +0 -0
- /package/dist/chunks/{hy-CVFDCp2S.mjs → hy-DGC_GDHh.mjs} +0 -0
- /package/dist/chunks/{id-0P4W9Az0.mjs → id-V7cw6La2.mjs} +0 -0
- /package/dist/chunks/{it-mLY6_uoW.mjs → it-DrTGP8Rn.mjs} +0 -0
- /package/dist/chunks/{ja-7RkeRNWG.mjs → ja-DS4pbJEG.mjs} +0 -0
- /package/dist/chunks/{ka-C7Lx-Qsh.mjs → ka-BueyosRh.mjs} +0 -0
- /package/dist/chunks/{km-Q8udaraH.mjs → km-B0K891yW.mjs} +0 -0
- /package/dist/chunks/{kn-BiETM-iq.mjs → kn-BQ__skg8.mjs} +0 -0
- /package/dist/chunks/{ko-tiB80pF1.mjs → ko-BuPxi_7e.mjs} +0 -0
- /package/dist/chunks/{ku-CY-OABkR.mjs → ku-nQjwPRw2.mjs} +0 -0
- /package/dist/chunks/{lo-CTBhEnyk.mjs → lo-K5NVFoq1.mjs} +0 -0
- /package/dist/chunks/{lt-BHKHEtqK.mjs → lt-D3xD6Eb2.mjs} +0 -0
- /package/dist/chunks/{lv-DWxgtfUg.mjs → lv-DH13mzZj.mjs} +0 -0
- /package/dist/chunks/{mk-BjookGdx.mjs → mk-Bb48BcDA.mjs} +0 -0
- /package/dist/chunks/{ml-L-NnZcp9.mjs → ml-BHPEj1kD.mjs} +0 -0
- /package/dist/chunks/{mn-OMWi7Hl_.mjs → mn-BNGzpdI6.mjs} +0 -0
- /package/dist/chunks/{mr-B6JPzITo.mjs → mr-D5PgU-cH.mjs} +0 -0
- /package/dist/chunks/{ms-CG3S-sPB.mjs → ms-DPkxqKz5.mjs} +0 -0
- /package/dist/chunks/{my-BLAmGfhT.mjs → my-DZGcyfxy.mjs} +0 -0
- /package/dist/chunks/{native-BPcABu9z.mjs → native-D0cfLXsM.mjs} +0 -0
- /package/dist/chunks/{ne-D1JHLfYw.mjs → ne-BU_Wh4Wv.mjs} +0 -0
- /package/dist/chunks/{nl-Ca7Q8FnY.mjs → nl-DtAPk1mK.mjs} +0 -0
- /package/dist/chunks/{no-Coxcohcz.mjs → no-CdW3n3BY.mjs} +0 -0
- /package/dist/chunks/{objectSpread2-CyPxu8-u.mjs → objectSpread2-CWwMYL_U.mjs} +0 -0
- /package/dist/chunks/{pa-CCaXqpaI.mjs → pa-BacCHz87.mjs} +0 -0
- /package/dist/chunks/{pl-Cl_fAZ84.mjs → pl-8zBJbmhZ.mjs} +0 -0
- /package/dist/chunks/{ps-WD5qGAWy.mjs → ps-c6nGXD-W.mjs} +0 -0
- /package/dist/chunks/{pt-C4zvLfvq.mjs → pt-B5yR8Qhr.mjs} +0 -0
- /package/dist/chunks/{ro-DbefHcmM.mjs → ro-Nscylsqb.mjs} +0 -0
- /package/dist/chunks/{ru-uU1J14jd.mjs → ru-DxERQkVJ.mjs} +0 -0
- /package/dist/chunks/{sd-DKu368Ip.mjs → sd-5z-QY3q9.mjs} +0 -0
- /package/dist/chunks/{si-BsJCiPkZ.mjs → si-DTL0mzrx.mjs} +0 -0
- /package/dist/chunks/{sk-CD-a3SN6.mjs → sk-DrGczTvY.mjs} +0 -0
- /package/dist/chunks/{sl-CXhrPJe_.mjs → sl-D8nJjig4.mjs} +0 -0
- /package/dist/chunks/{sq-CTctCoFQ.mjs → sq-C74Hm3YL.mjs} +0 -0
- /package/dist/chunks/{sr-BZkhBwXj.mjs → sr-DAwB05Gj.mjs} +0 -0
- /package/dist/chunks/{sv-NmRZb_xi.mjs → sv-BkHBsN4y.mjs} +0 -0
- /package/dist/chunks/{sw-Be5ik3H6.mjs → sw-BBQLTq_z.mjs} +0 -0
- /package/dist/chunks/{ta-DsXh6neL.mjs → ta-DRRzdKky.mjs} +0 -0
- /package/dist/chunks/{te-CwpCbM8M.mjs → te-CedXLsKM.mjs} +0 -0
- /package/dist/chunks/{th-CcZ15OLk.mjs → th-DDOlGA0W.mjs} +0 -0
- /package/dist/chunks/{tr-q3bTgvhW.mjs → tr-ClgvwOlL.mjs} +0 -0
- /package/dist/chunks/{tw-DmW6-pCY.mjs → tw-CqxBf-1Y.mjs} +0 -0
- /package/dist/chunks/{ug-919EhLsL.mjs → ug-bXxwiinM.mjs} +0 -0
- /package/dist/chunks/{uk-aNMEzd0Y.mjs → uk-Dp46o_VT.mjs} +0 -0
- /package/dist/chunks/{ur-BwQI77sh.mjs → ur-MfEEhdFq.mjs} +0 -0
- /package/dist/chunks/{vi-Dxq806-F.mjs → vi-bt-3LPGO.mjs} +0 -0
- /package/dist/chunks/{zh-BcHuy1Ti.mjs → zh-Dgyb5Ly8.mjs} +0 -0
|
@@ -77,24 +77,28 @@ export class HtmlHandler extends BasePasteHandler implements PasteHandler {
|
|
|
77
77
|
const isDetailsElement =
|
|
78
78
|
node.nodeType === Node.ELEMENT_NODE &&
|
|
79
79
|
(node as HTMLElement).tagName === 'DETAILS';
|
|
80
|
+
const isAsideElement =
|
|
81
|
+
node.nodeType === Node.ELEMENT_NODE &&
|
|
82
|
+
(node as HTMLElement).tagName === 'ASIDE';
|
|
80
83
|
|
|
81
|
-
if (!isDetailsElement) {
|
|
84
|
+
if (!isDetailsElement && !isAsideElement) {
|
|
82
85
|
expandedNodes.push({ node });
|
|
83
86
|
continue;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
|
-
const
|
|
89
|
+
const parentExpandedIndex = expandedNodes.length;
|
|
87
90
|
|
|
88
91
|
expandedNodes.push({ node });
|
|
89
92
|
|
|
90
93
|
// Only direct children are extracted (not deeply nested structures), which
|
|
91
94
|
// is correct for Google Docs DETAILS format where children are flat siblings.
|
|
95
|
+
// For ASIDE, ALL children become child blocks (no SUMMARY to skip).
|
|
92
96
|
const childElements = Array.from((node as HTMLElement).children).filter(
|
|
93
|
-
(child) => child.tagName !== 'SUMMARY'
|
|
97
|
+
(child) => isAsideElement || child.tagName !== 'SUMMARY'
|
|
94
98
|
);
|
|
95
99
|
|
|
96
100
|
for (const child of childElements) {
|
|
97
|
-
expandedNodes.push({ node: child, parentExpandedIndex
|
|
101
|
+
expandedNodes.push({ node: child, parentExpandedIndex });
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
|
|
@@ -247,12 +251,11 @@ export class HtmlHandler extends BasePasteHandler implements PasteHandler {
|
|
|
247
251
|
|
|
248
252
|
const isSubstitutable = tags.includes(element.tagName);
|
|
249
253
|
|
|
250
|
-
// DETAILS
|
|
251
|
-
// atomic
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
|
|
255
|
-
if (isSubstitutable && element.tagName === 'DETAILS') {
|
|
254
|
+
// DETAILS and ASIDE are container-type substitutable elements. Always return
|
|
255
|
+
// them as atomic blocks so the tool's onPaste receives the full element
|
|
256
|
+
// (including children), rather than having them split into flat blocks when
|
|
257
|
+
// the paragraph tool's <p> registration triggers containsAnotherToolTags = true.
|
|
258
|
+
if (isSubstitutable && (element.tagName === 'DETAILS' || element.tagName === 'ASIDE')) {
|
|
256
259
|
return [...nodes, destNode, element];
|
|
257
260
|
}
|
|
258
261
|
|
|
@@ -7,3 +7,4 @@ export { HtmlHandler } from './html-handler';
|
|
|
7
7
|
export { PatternHandler } from './pattern-handler';
|
|
8
8
|
export { TableCellsHandler } from './table-cells-handler';
|
|
9
9
|
export { TextHandler } from './text-handler';
|
|
10
|
+
export { MarkdownHandler } from '../../../../markdown/markdown-handler';
|
|
@@ -9,6 +9,7 @@ import type { PasteHandler } from './handlers/base';
|
|
|
9
9
|
import { BlokDataHandler } from './handlers/blok-data-handler';
|
|
10
10
|
import { FilesHandler } from './handlers/files-handler';
|
|
11
11
|
import { HtmlHandler } from './handlers/html-handler';
|
|
12
|
+
import { MarkdownHandler } from '../../../markdown/markdown-handler';
|
|
12
13
|
import { PatternHandler } from './handlers/pattern-handler';
|
|
13
14
|
import { TableCellsHandler } from './handlers/table-cells-handler';
|
|
14
15
|
import { TextHandler } from './handlers/text-handler';
|
|
@@ -50,6 +51,7 @@ export class Paste extends Module {
|
|
|
50
51
|
new TableCellsHandler(this.Blok, this.toolRegistry, this.sanitizerBuilder),
|
|
51
52
|
new FilesHandler(this.Blok, this.toolRegistry, this.sanitizerBuilder),
|
|
52
53
|
new PatternHandler(this.Blok, this.toolRegistry, this.sanitizerBuilder),
|
|
54
|
+
new MarkdownHandler(this.Blok, this.toolRegistry, this.sanitizerBuilder),
|
|
53
55
|
new HtmlHandler(this.Blok, this.toolRegistry, this.sanitizerBuilder),
|
|
54
56
|
new TextHandler(this.Blok, this.toolRegistry, this.sanitizerBuilder, this.config),
|
|
55
57
|
];
|
|
@@ -192,6 +194,10 @@ export class Paste extends Module {
|
|
|
192
194
|
return plainData;
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
if (handler instanceof MarkdownHandler) {
|
|
198
|
+
return plainData;
|
|
199
|
+
}
|
|
200
|
+
|
|
195
201
|
if (handler instanceof TextHandler) {
|
|
196
202
|
return plainData;
|
|
197
203
|
}
|
|
@@ -12,6 +12,14 @@ import {
|
|
|
12
12
|
} from '../utils/data-model-transform';
|
|
13
13
|
import { migrateMarkColors } from '../utils/color-migration';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Map of legacy EditorJS tool names to their Blok equivalents.
|
|
17
|
+
* Used during rendering to transparently migrate old article data.
|
|
18
|
+
*/
|
|
19
|
+
const TOOL_ALIASES: Readonly<Record<string, string>> = {
|
|
20
|
+
delimiter: 'divider',
|
|
21
|
+
};
|
|
22
|
+
|
|
15
23
|
/**
|
|
16
24
|
* Module that responsible for rendering Blocks on blok initialization
|
|
17
25
|
*/
|
|
@@ -111,6 +119,15 @@ export class Renderer extends Module {
|
|
|
111
119
|
};
|
|
112
120
|
}
|
|
113
121
|
|
|
122
|
+
const aliasTarget = TOOL_ALIASES[originalTool];
|
|
123
|
+
|
|
124
|
+
if (aliasTarget !== undefined && Tools.available.has(aliasTarget)) {
|
|
125
|
+
return {
|
|
126
|
+
tool: aliasTarget,
|
|
127
|
+
data: blockToolData,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
114
131
|
logLabeled(`Tool «${originalTool}» is not found. Check 'tools' property at the Blok config.`, 'warn');
|
|
115
132
|
|
|
116
133
|
return {
|
|
@@ -462,29 +462,17 @@ export class UI extends Module<UINodes> {
|
|
|
462
462
|
this.nodes.wrapper.setAttribute(DATA_ATTR.interface, BLOK_INTERFACE_VALUE);
|
|
463
463
|
this.nodes.wrapper.setAttribute(DATA_ATTR.editor, '');
|
|
464
464
|
this.nodes.wrapper.setAttribute('data-blok-testid', 'blok-editor');
|
|
465
|
+
this.nodes.wrapper.setAttribute(DATA_ATTR.contentAlign, this.config.style?.contentAlign ?? 'left');
|
|
465
466
|
if (this.isRtl) {
|
|
466
467
|
this.nodes.wrapper.setAttribute(DATA_ATTR.rtl, 'true');
|
|
467
468
|
}
|
|
468
469
|
this.nodes.redactor = $.make('div', [
|
|
469
|
-
// Narrow mode: add left margin on non-mobile screens to make room for toolbar buttons
|
|
470
|
-
'not-mobile:group-data-[blok-narrow=true]:ml-(--spacing-narrow-mode-padding)',
|
|
471
|
-
// RTL narrow mode: add right margin instead
|
|
472
|
-
'not-mobile:group-data-[blok-rtl=true]:group-data-[blok-narrow=true]:mr-(--spacing-narrow-mode-padding)',
|
|
473
|
-
'not-mobile:group-data-[blok-rtl=true]:group-data-[blok-narrow=true]:ml-0',
|
|
474
470
|
// Firefox empty contenteditable fix
|
|
475
471
|
'[&_[contenteditable]:empty]:after:content-["\\feff_"]',
|
|
476
472
|
]);
|
|
477
473
|
this.nodes.redactor.setAttribute(DATA_ATTR.redactor, '');
|
|
478
474
|
this.nodes.redactor.setAttribute('data-blok-testid', 'redactor');
|
|
479
475
|
|
|
480
|
-
/**
|
|
481
|
-
* If Blok has injected into the narrow container, enable Narrow Mode
|
|
482
|
-
* @todo Forced layout. Get rid of this feature
|
|
483
|
-
*/
|
|
484
|
-
if (this.nodes.holder.offsetWidth < this.contentRect.width) {
|
|
485
|
-
this.nodes.wrapper.setAttribute(DATA_ATTR.narrow, 'true');
|
|
486
|
-
}
|
|
487
|
-
|
|
488
476
|
/**
|
|
489
477
|
* Create dedicated bottom zone element
|
|
490
478
|
*/
|
|
@@ -535,6 +535,15 @@ export class Toolbox extends EventsDispatcher<ToolboxEventMap> {
|
|
|
535
535
|
const userSearchTerms = tool.searchTerms ?? [];
|
|
536
536
|
const mergedSearchTerms = [...new Set([...librarySearchTerms, ...userSearchTerms])];
|
|
537
537
|
|
|
538
|
+
// Resolve translated search aliases from searchTermKeys
|
|
539
|
+
for (const key of toolboxItem.searchTermKeys ?? []) {
|
|
540
|
+
const fullKey = `searchTerms.${key}`;
|
|
541
|
+
|
|
542
|
+
if (this.i18n.has(fullKey)) {
|
|
543
|
+
mergedSearchTerms.push(this.i18n.t(fullKey));
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
538
547
|
// Use entry-level shortcut if available, otherwise fall back to tool-level shortcut (for first entry only)
|
|
539
548
|
const shortcut = toolboxItem.shortcut ?? (displaySecondaryLabel ? tool.shortcut : undefined);
|
|
540
549
|
|
|
@@ -56,13 +56,24 @@ export const checkContenteditableSliceForEmptiness = (
|
|
|
56
56
|
/**
|
|
57
57
|
* Check if we have any tags in the slice
|
|
58
58
|
* We should not ignore them to allow navigation inside (e.g. empty bold tag)
|
|
59
|
+
*
|
|
60
|
+
* When checking the right side, trailing <br> tags are browser artifacts
|
|
61
|
+
* in contenteditable elements (sentinels for cursor positioning after Shift+Enter).
|
|
62
|
+
* If the only significant tags are <br> and there's no text content,
|
|
63
|
+
* the slice is effectively empty — skip the early return.
|
|
59
64
|
*/
|
|
60
|
-
const
|
|
65
|
+
const significantTags = tempDiv.querySelectorAll(
|
|
61
66
|
'img, br, hr, input, area, base, col, embed, link, meta, param, source, track, wbr'
|
|
62
|
-
)
|
|
67
|
+
);
|
|
63
68
|
|
|
64
|
-
if (
|
|
65
|
-
|
|
69
|
+
if (significantTags.length > 0) {
|
|
70
|
+
const isOnlyTrailingBrs = direction === 'right'
|
|
71
|
+
&& tempDiv.querySelectorAll('img, hr, input, area, base, col, embed, link, meta, param, source, track, wbr').length === 0
|
|
72
|
+
&& textContent.trim() === '';
|
|
73
|
+
|
|
74
|
+
if (!isOnlyTrailingBrs) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
/**
|
|
@@ -1078,6 +1078,17 @@ export class PopoverDesktop extends PopoverAbstract {
|
|
|
1078
1078
|
|
|
1079
1079
|
this.toggleNothingFoundMessage(isNothingFound);
|
|
1080
1080
|
|
|
1081
|
+
// Recalculate position since popover height may have changed (trigger-based popovers only;
|
|
1082
|
+
// non-trigger popovers use CSS variable positioning that doesn't need pixel recalculation)
|
|
1083
|
+
if (this.trigger && this.nodes.popover.hasAttribute(DATA_ATTR.popoverOpened)) {
|
|
1084
|
+
const { top, left, openTop, openLeft } = this.calculatePosition();
|
|
1085
|
+
|
|
1086
|
+
this.nodes.popover.style.top = `${top}px`;
|
|
1087
|
+
this.nodes.popover.style.left = `${left}px`;
|
|
1088
|
+
this.setOpenTop(openTop);
|
|
1089
|
+
this.setOpenLeft(openLeft);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1081
1092
|
// Build flippable elements list: top-level matches + promoted items
|
|
1082
1093
|
const topLevelFlippable = isEmptyQuery
|
|
1083
1094
|
? this.flippableElements
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
2
|
+
import type { Extension as MdastExtension } from 'mdast-util-from-markdown';
|
|
3
|
+
import { gfm } from 'micromark-extension-gfm';
|
|
4
|
+
import { gfmFromMarkdown } from 'mdast-util-gfm';
|
|
5
|
+
import type { Extension as MicromarkExtension } from 'micromark-util-types';
|
|
6
|
+
import type { OutputBlockData } from '../../types/data-formats/output-data';
|
|
7
|
+
import type { MarkdownImportConfig } from './types';
|
|
8
|
+
import { mdastToBlocks } from './mdast-to-blocks';
|
|
9
|
+
|
|
10
|
+
export type { MarkdownImportConfig, ToolMapEntry } from './types';
|
|
11
|
+
|
|
12
|
+
const MATH_SIGNAL = /\$\$[\s\S]+?\$\$|(?<!\$)\$(?!\$)(?=\S)[^$]+(?<=\S)\$(?!\$)/;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Lazily load math micromark/mdast extensions only when needed.
|
|
16
|
+
*/
|
|
17
|
+
async function loadMathExtensions(): Promise<{
|
|
18
|
+
mathSyntax: MicromarkExtension;
|
|
19
|
+
mathFromMarkdown: MdastExtension;
|
|
20
|
+
}> {
|
|
21
|
+
const [{ math }, { mathFromMarkdown }] = await Promise.all([
|
|
22
|
+
import('micromark-extension-math'),
|
|
23
|
+
import('mdast-util-math'),
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
return { mathSyntax: math(), mathFromMarkdown: mathFromMarkdown() };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Convert a Markdown string to an array of Blok OutputBlockData.
|
|
31
|
+
*
|
|
32
|
+
* @param md - Markdown source string
|
|
33
|
+
* @param config - Optional configuration for tool mapping, GFM, and extensions
|
|
34
|
+
* @returns Array of OutputBlockData ready for `blok.blocks.render()` or `blok.blocks.insertMany()`
|
|
35
|
+
*/
|
|
36
|
+
export async function markdownToBlocks(md: string, config: MarkdownImportConfig = {}): Promise<OutputBlockData[]> {
|
|
37
|
+
const enableGfm = config.gfm !== false;
|
|
38
|
+
const hasMath = MATH_SIGNAL.test(md);
|
|
39
|
+
|
|
40
|
+
const extensions = [
|
|
41
|
+
...(enableGfm ? [gfm()] : []),
|
|
42
|
+
...(config.extensions ?? []),
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const mdastExtensions = [
|
|
46
|
+
...(enableGfm ? [gfmFromMarkdown()] : []),
|
|
47
|
+
...(config.mdastExtensions ?? []),
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
if (hasMath) {
|
|
51
|
+
const { mathSyntax, mathFromMarkdown } = await loadMathExtensions();
|
|
52
|
+
|
|
53
|
+
extensions.push(mathSyntax);
|
|
54
|
+
mdastExtensions.push(mathFromMarkdown);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const tree = fromMarkdown(md, {
|
|
58
|
+
extensions,
|
|
59
|
+
mdastExtensions,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return mdastToBlocks(tree, config);
|
|
63
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { BlockToolData } from '../../types';
|
|
2
|
+
import type { BlokModules } from '../types-internal/blok-modules';
|
|
3
|
+
import type { SanitizerConfigBuilder } from '../components/modules/paste/sanitizer-config';
|
|
4
|
+
import type { ToolRegistry } from '../components/modules/paste/tool-registry';
|
|
5
|
+
import type { HandlerContext } from '../components/modules/paste/types';
|
|
6
|
+
import type { PasteHandler } from '../components/modules/paste/handlers/base';
|
|
7
|
+
import { BasePasteHandler } from '../components/modules/paste/handlers/base';
|
|
8
|
+
import { Block } from '../components/block';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Patterns that indicate text is likely Markdown rather than plain text.
|
|
12
|
+
* Each must be unlikely to appear in normal prose.
|
|
13
|
+
*/
|
|
14
|
+
const MARKDOWN_SIGNALS: RegExp[] = [
|
|
15
|
+
/^#{1,6}\s/m, // ATX headings: # Heading
|
|
16
|
+
/^```/m, // Fenced code blocks
|
|
17
|
+
/\|\s*---/, // GFM table separator: | --- |
|
|
18
|
+
/^- \[[ x]\]/m, // Task list items: - [ ] or - [x]
|
|
19
|
+
/\[.+?\]\(.+?\)/, // Markdown links: [text](url)
|
|
20
|
+
/\*\*.+?\*\*/, // Bold: **text**
|
|
21
|
+
/!\[/, // Image: ![
|
|
22
|
+
/\$\$[\s\S]+?\$\$/, // Block math: $$...$$
|
|
23
|
+
/(?<!\$)\$(?!\$)(?=\S)[^$]+(?<=\S)\$(?!\$)/, // Inline math: $...$
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Check if a plain-text string contains strong Markdown signals.
|
|
28
|
+
*/
|
|
29
|
+
export function hasMarkdownSignals(text: string): boolean {
|
|
30
|
+
if (!text) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return MARKDOWN_SIGNALS.some((pattern) => pattern.test(text));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Paste handler that detects and converts Markdown text.
|
|
39
|
+
* Priority 30: between TextHandler (10) and HtmlHandler (40).
|
|
40
|
+
* Lazy-loads the converter on first use.
|
|
41
|
+
*
|
|
42
|
+
* Uses BlockManager.insertMany() to insert converted blocks directly,
|
|
43
|
+
* preserving all block data (list depth, table cells, etc.) that
|
|
44
|
+
* would be lost if mapped through the DOM-based paste pipeline.
|
|
45
|
+
*/
|
|
46
|
+
export class MarkdownHandler extends BasePasteHandler implements PasteHandler {
|
|
47
|
+
constructor(
|
|
48
|
+
Blok: BlokModules,
|
|
49
|
+
toolRegistry: ToolRegistry,
|
|
50
|
+
sanitizerBuilder: SanitizerConfigBuilder
|
|
51
|
+
) {
|
|
52
|
+
super(Blok, toolRegistry, sanitizerBuilder);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
canHandle(data: unknown): number {
|
|
56
|
+
if (typeof data !== 'string' || !data.trim()) {
|
|
57
|
+
return 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return hasMarkdownSignals(data) ? 30 : 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async handle(data: unknown, context: HandlerContext): Promise<boolean> {
|
|
64
|
+
if (typeof data !== 'string') {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const { markdownToBlocks } = await import('./index');
|
|
69
|
+
const outputBlocks = await markdownToBlocks(data);
|
|
70
|
+
|
|
71
|
+
if (!outputBlocks.length) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const { BlockManager, Caret } = this.Blok;
|
|
76
|
+
|
|
77
|
+
// Replace empty default block if present
|
|
78
|
+
const currentBlock = BlockManager.currentBlock;
|
|
79
|
+
const shouldReplace = context.canReplaceCurrentBlock && currentBlock !== undefined && currentBlock.isEmpty;
|
|
80
|
+
const insertIndex = shouldReplace
|
|
81
|
+
? BlockManager.currentBlockIndex
|
|
82
|
+
: BlockManager.currentBlockIndex + 1;
|
|
83
|
+
|
|
84
|
+
// Compose Block instances from OutputBlockData
|
|
85
|
+
const blocksToInsert = outputBlocks.map(({ id, type, data: blockData, parent }) =>
|
|
86
|
+
BlockManager.composeBlock({
|
|
87
|
+
id,
|
|
88
|
+
tool: type,
|
|
89
|
+
data: blockData as BlockToolData,
|
|
90
|
+
parentId: parent,
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
BlockManager.insertMany(blocksToInsert, insertIndex);
|
|
95
|
+
|
|
96
|
+
// Remove the replaced empty block
|
|
97
|
+
if (shouldReplace && currentBlock !== undefined) {
|
|
98
|
+
await BlockManager.removeBlock(currentBlock, false);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Set caret to end of last inserted block
|
|
102
|
+
const lastBlock = blocksToInsert[blocksToInsert.length - 1];
|
|
103
|
+
|
|
104
|
+
if (lastBlock instanceof Block) {
|
|
105
|
+
Caret.setToBlock(lastBlock, Caret.positions.END);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}
|