@jackuait/blok 0.10.0-beta.6 → 0.10.0-beta.8
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 +0 -2
- package/codemod/test.js +0 -6
- package/dist/blok.mjs +2 -2
- 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-BdlR_lX6.mjs → blok-CRvF-xVm.mjs} +2142 -2171
- 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-Byubey_H.mjs → chunk-D6kmoKXy.mjs} +5 -5
- 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-Cp8O0UfP.mjs → constants-BOZ5plBi.mjs} +49 -50
- 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/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-loader-oDO9ZKUV.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-NjLaA6AJ.mjs → katex-CmTPfM0f.mjs} +1 -1
- package/dist/chunks/kotlin-DjnvsrfO.mjs +3 -0
- package/dist/chunks/latex-24n3TcOR.mjs +5 -0
- package/dist/chunks/{lightweight-i18n-DTySD6f6.mjs → lightweight-i18n-Cvv8CWh4.mjs} +13 -0
- 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-yS0EygZV.mjs → mdast-util-math-BlK2Zu-1.mjs} +1 -1
- 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-BYQ769S5.mjs → chunks/messages-8IHf7ZP3.mjs} +26 -1
- package/dist/chunks/{messages-DRv4g-IA.mjs → messages-A_MkXDlG.mjs} +26 -1
- package/dist/chunks/{messages-vN4T4r67.mjs → messages-B0vPBsWq.mjs} +26 -1
- package/dist/chunks/{messages-BDXl53cy2.mjs → messages-B2N4fUi72.mjs} +26 -1
- package/dist/chunks/{messages-DopbvJlg.mjs → messages-B4UMuyjT.mjs} +31 -6
- package/dist/{messages-uCsQjz7M.mjs → chunks/messages-B9kmbUWV.mjs} +26 -1
- package/dist/{messages-JK9Okzsy2.mjs → chunks/messages-BA8Iv99Y2.mjs} +26 -1
- package/dist/chunks/{messages-yszqJukE.mjs → messages-BAsb5CgZ.mjs} +26 -1
- package/dist/{messages-CEEzfqMO2.mjs → chunks/messages-BDZA10kl2.mjs} +29 -4
- package/dist/{messages-BeI2HORe2.mjs → chunks/messages-BE6lHKwf.mjs} +26 -1
- package/dist/{messages--cUQf9JX.mjs → chunks/messages-BQYvBqm2.mjs} +27 -2
- package/dist/{messages-CsiGzUSP2.mjs → chunks/messages-BSghd0ez.mjs} +26 -1
- package/dist/chunks/{messages-BXn9Vzbx2.mjs → messages-BUVhHx0q2.mjs} +26 -1
- package/dist/chunks/{messages-5ArOv8cj.mjs → messages-BVjoM7P0.mjs} +26 -1
- package/dist/chunks/{messages-CvlMT1e62.mjs → messages-BXM80fdr2.mjs} +26 -1
- package/dist/chunks/{messages-BlcRm2I3.mjs → messages-BYlSMRkd.mjs} +26 -1
- package/dist/chunks/{messages-bmwto4UV.mjs → messages-BYxLFj7y.mjs} +26 -1
- package/dist/chunks/{messages-SSDr5fGF2.mjs → messages-BeFqtIrc2.mjs} +26 -1
- package/dist/{messages-CD8K1g_t2.mjs → chunks/messages-Bfnq1xv4.mjs} +26 -1
- package/dist/chunks/{messages-B5fKJXd6.mjs → messages-BhzzNkN-.mjs} +26 -1
- package/dist/{messages-Dq_v7slw2.mjs → chunks/messages-BjadX8jR2.mjs} +26 -1
- package/dist/{messages-x353UCBI.mjs → chunks/messages-Bp8qin1R.mjs} +26 -1
- package/dist/{messages-hrSlVSHp.mjs → chunks/messages-Bphq_Bt3.mjs} +33 -8
- package/dist/chunks/{messages-CF_PfacZ.mjs → messages-Bxvi1ebN.mjs} +26 -1
- package/dist/chunks/{messages-DdmWzF5M.mjs → messages-C0HvoMPb.mjs} +27 -2
- package/dist/chunks/{messages-C5aCWL7B.mjs → messages-C3aX3q0H.mjs} +26 -1
- package/dist/{messages-DbZsJAff.mjs → chunks/messages-C6Mpiacw.mjs} +26 -1
- package/dist/{messages-PvMdmlxI.mjs → chunks/messages-C7VGpihw.mjs} +28 -3
- package/dist/chunks/{messages-DGD6BiGd.mjs → messages-CKBhDGI3.mjs} +28 -3
- package/dist/chunks/{messages-BaoJwsEZ.mjs → messages-COO5xmcA.mjs} +26 -1
- package/dist/chunks/{messages-Dz3UhEco2.mjs → messages-CSJ_zb3a2.mjs} +26 -1
- package/dist/chunks/{messages-CjVPwkVy.mjs → messages-CSL-6xfb2.mjs} +26 -1
- package/dist/{messages-B4lhNMKm2.mjs → chunks/messages-CVdpweyf2.mjs} +28 -3
- package/dist/chunks/{messages-DQ5ng0_t2.mjs → messages-Cdf0W9H02.mjs} +26 -1
- package/dist/{messages-Bug6Du35.mjs → chunks/messages-Ck81cQkn2.mjs} +26 -1
- package/dist/chunks/{messages-DUGEqDEG.mjs → messages-Cmf6NhSC.mjs} +26 -1
- package/dist/chunks/{messages-BMq9k_lI.mjs → messages-Cs81Z_Bh.mjs} +26 -1
- package/dist/{messages-B3Yhiycb2.mjs → chunks/messages-Cu-Wevxs2.mjs} +27 -2
- package/dist/{messages-DIKCwGog.mjs → chunks/messages-D3zojZ94.mjs} +30 -5
- package/dist/{messages-Bdk4ocMI.mjs → chunks/messages-D55HRx5O2.mjs} +26 -1
- package/dist/{messages-CvvbLyTy2.mjs → chunks/messages-D9N2MvQx2.mjs} +26 -1
- package/dist/{messages-C5Uufygq.mjs → chunks/messages-DG-4DPmP.mjs} +26 -1
- package/dist/{messages-C8f1I5EQ2.mjs → chunks/messages-DGL1ySqb2.mjs} +27 -2
- package/dist/chunks/{messages-D8-N0FmU.mjs → messages-DJoNVjqP.mjs} +27 -2
- package/dist/chunks/{messages-CcyIKgGU.mjs → messages-DMVXnAYj.mjs} +30 -5
- package/dist/chunks/{messages-CZ5Sbf8U.mjs → messages-DOuS1Qge.mjs} +26 -1
- package/dist/chunks/{messages-BXSXk3oS2.mjs → messages-DWu1r4gc2.mjs} +28 -3
- package/dist/{messages-KqWQKmIu2.mjs → chunks/messages-DlLXpgWM2.mjs} +27 -2
- package/dist/{messages-DQN1y6E9.mjs → chunks/messages-DlonA3wa.mjs} +28 -3
- package/dist/chunks/{messages-DVKifYlq.mjs → messages-Dr0Ekmbz.mjs} +49 -24
- package/dist/{messages-DACg1XAu.mjs → chunks/messages-DzTk8bJ5.mjs} +26 -1
- package/dist/{messages-BOE2mzCj2.mjs → chunks/messages-FWfsxpBz.mjs} +26 -1
- package/dist/{messages-CBPiFbEf2.mjs → chunks/messages-G416eyjY.mjs} +26 -1
- package/dist/chunks/{messages-DZwCufSb.mjs → messages-Je5YvxiY.mjs} +26 -1
- package/dist/chunks/{messages-DN-194c32.mjs → messages-JyvWu4rf2.mjs} +26 -1
- package/dist/chunks/{messages-CqgEz7C5.mjs → messages-KdawW5Na.mjs} +26 -1
- package/dist/{messages-X80Nh0ib.mjs → chunks/messages-MxpWO1db.mjs} +27 -2
- package/dist/chunks/{messages-CnQydQJd2.mjs → messages-NEqrrYvE2.mjs} +26 -1
- package/dist/{messages-DkvQ-6HC2.mjs → chunks/messages-RInp1ytX.mjs} +28 -3
- package/dist/chunks/{messages-DSO2U-ul.mjs → messages-TRUuyiFB.mjs} +26 -1
- package/dist/chunks/{messages-BhcYsC_M2.mjs → messages-aZcy0JQq2.mjs} +26 -1
- package/dist/chunks/{messages-ByAqzAhB.mjs → messages-iS34FHFB.mjs} +26 -1
- package/dist/{messages-12_eyAo-.mjs → chunks/messages-ihCjSFJI2.mjs} +26 -1
- package/dist/{messages-mipkPgwQ2.mjs → chunks/messages-jfVpL9c-2.mjs} +26 -1
- package/dist/{messages-Cb3wXGnc.mjs → chunks/messages-p1mbe__S.mjs} +27 -2
- package/dist/chunks/{messages-Dgng6KN8.mjs → messages-rCd0Rrw6.mjs} +28 -3
- package/dist/{messages-Dj79y02X.mjs → chunks/messages-xuqyb6Ff2.mjs} +26 -1
- package/dist/chunks/{micromark-extension-math-CCEGWpdz.mjs → micromark-extension-math-BbkUb36G.mjs} +2 -2
- package/dist/chunks/mindmap-definition-QFDTVHPH-hNnyBkEP.mjs +1013 -0
- 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-DGOsJbHH.mjs → tools-CnqCfv2L.mjs} +2116 -1268
- 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 +3 -3
- package/dist/locales.mjs +80 -67
- package/dist/markdown.mjs +385 -393
- package/dist/{chunks/messages-9l49jauY.mjs → messages-5jvKxQNu2.mjs} +26 -1
- package/dist/{messages-CkySRhtd2.mjs → messages-7QD-X6XT2.mjs} +26 -1
- package/dist/{chunks/messages-Btr121zI2.mjs → messages-96iaAUds2.mjs} +27 -2
- package/dist/{chunks/messages-BAP2OAQk.mjs → messages-B19o-Teb.mjs} +28 -3
- package/dist/{messages-DJU4YLij.mjs → messages-B1ZUQagA.mjs} +26 -1
- package/dist/{messages-Dg2CDXZi2.mjs → messages-B7ieAJBd2.mjs} +26 -1
- package/dist/{messages-CByBLxWk.mjs → messages-BECMxmfX.mjs} +26 -1
- package/dist/{messages-CwCEcbWG.mjs → messages-BIHc0KHY.mjs} +27 -2
- package/dist/{messages-D8WvwU42.mjs → messages-BIoeoik5.mjs} +26 -1
- package/dist/{messages-D38h5XlF.mjs → messages-BJeGJksD.mjs} +26 -1
- package/dist/{messages-Cd23UgLV2.mjs → messages-BRZX964b2.mjs} +27 -2
- package/dist/{chunks/messages-B9N__q552.mjs → messages-BTQPpoM42.mjs} +29 -4
- package/dist/{messages-CUzBNjnc.mjs → messages-BYNcD6uR.mjs} +26 -1
- package/dist/{messages-DjWfVYHS2.mjs → messages-BYmmMDrN2.mjs} +26 -1
- package/dist/{chunks/messages-DkTxBa1V.mjs → messages-BbYq1pk-.mjs} +26 -1
- package/dist/{chunks/messages-BHhbHLoq.mjs → messages-BiUGXvYr2.mjs} +26 -1
- package/dist/{messages-So3SHdIc2.mjs → messages-BiiongNz2.mjs} +26 -1
- package/dist/{chunks/messages-BxBID_0B.mjs → messages-Bm0Feca1.mjs} +30 -5
- package/dist/{messages-C2veeQpU.mjs → messages-BmAn22OX.mjs} +26 -1
- package/dist/{messages-KbYSpNrE.mjs → messages-Bq3F2Tp_.mjs} +26 -1
- package/dist/{chunks/messages-Dux1S0-D2.mjs → messages-BsycN_JI2.mjs} +26 -1
- package/dist/{messages-DRU_IgoW.mjs → messages-BwHs4cm1.mjs} +30 -5
- package/dist/{messages-Cv-DKlZd.mjs → messages-CJTy6JZt.mjs} +26 -1
- package/dist/{chunks/messages-D7n_wJK7.mjs → messages-CR_L_UtK.mjs} +26 -1
- package/dist/{messages-DnhEzmXJ2.mjs → messages-CSUHBs4c2.mjs} +26 -1
- package/dist/{messages-C_HmWyXc2.mjs → messages-CWIXvnDf2.mjs} +26 -1
- package/dist/{messages-KSxF8eib.mjs → messages-CcF4y-E4.mjs} +26 -1
- package/dist/{chunks/messages-CL3mCbi6.mjs → messages-Ce6KVEbT.mjs} +27 -2
- package/dist/{chunks/messages-C-jA6Rf7.mjs → messages-Ci0KqX-J.mjs} +33 -8
- package/dist/{chunks/messages-DMyRdafk2.mjs → messages-CjbnogEC.mjs} +26 -1
- package/dist/{chunks/messages-BlO_37l_.mjs → messages-CmB406HW.mjs} +28 -3
- package/dist/{messages-Cho2VTAX.mjs → messages-CqXtJTpU.mjs} +26 -1
- package/dist/{messages-CWEL1WDy2.mjs → messages-D0aw5_0k2.mjs} +28 -3
- package/dist/{messages-CgEDVri-2.mjs → messages-D8FQWulF2.mjs} +26 -1
- package/dist/{chunks/messages-B5aAzExz.mjs → messages-DBiVgUs2.mjs} +27 -2
- package/dist/{chunks/messages-DYizZHT2.mjs → messages-DIJlIqlQ2.mjs} +26 -1
- package/dist/{messages-BPL7riv-.mjs → messages-DLX_iBDJ.mjs} +26 -1
- package/dist/{messages-vptt-pVF.mjs → messages-DLlc9QPw.mjs} +26 -1
- package/dist/{chunks/messages-876bKyUj2.mjs → messages-DMr62KiO2.mjs} +26 -1
- package/dist/{chunks/messages-CgedvWCf.mjs → messages-DPA-mMWC2.mjs} +27 -2
- package/dist/{messages-vcoib5Ga.mjs → messages-DTh9a8mR.mjs} +26 -1
- package/dist/{chunks/messages-DgEGJECT.mjs → messages-DY4IqlhY.mjs} +26 -1
- package/dist/{chunks/messages-CdzF0Hvl.mjs → messages-DYTTu0O12.mjs} +26 -1
- package/dist/{messages-rbox5gSb2.mjs → messages-DbySKTKt2.mjs} +28 -3
- package/dist/{chunks/messages-BGCQCeWd.mjs → messages-Ddnj2iTG2.mjs} +26 -1
- package/dist/{chunks/messages-CNEJxD8q2.mjs → messages-DkLU_rWm.mjs} +26 -1
- package/dist/{chunks/messages-FYl9woii2.mjs → messages-Dl3Sv6Rq2.mjs} +27 -2
- package/dist/{messages-Clsh86WQ.mjs → messages-Dl5Y2-Ia.mjs} +49 -24
- package/dist/{chunks/messages-CKRJDX0K2.mjs → messages-DnG0ef8t2.mjs} +28 -3
- package/dist/{chunks/messages-CyxDkx8a.mjs → messages-DnGJD4TL.mjs} +26 -1
- package/dist/{chunks/messages-DnJHflSh.mjs → messages-Dnp9N6RU2.mjs} +26 -1
- package/dist/{chunks/messages-Jps5Tc77.mjs → messages-Dvn35ksS.mjs} +26 -1
- package/dist/{messages-ChTWmxS8.mjs → messages-Dw__BcTj.mjs} +26 -1
- package/dist/{messages-D7juvhHp.mjs → messages-Dy-Y_nEI.mjs} +26 -1
- package/dist/{messages-CNNcKuGH.mjs → messages-E_ZuzGDt.mjs} +26 -1
- package/dist/{chunks/messages-DJO0ERQT.mjs → messages-F2xRoY1w.mjs} +26 -1
- package/dist/{messages-DqJTZbwt.mjs → messages-Smt4GBbj.mjs} +31 -6
- package/dist/{chunks/messages-D8dKkyII2.mjs → messages-aMXpHt5X2.mjs} +26 -1
- package/dist/{chunks/messages-DWD0ry9x.mjs → messages-aWZH50vu2.mjs} +28 -3
- package/dist/{chunks/messages-BbfLRqLh2.mjs → messages-dv19AkyJ.mjs} +26 -1
- package/dist/{chunks/messages-Dw2rmKMi2.mjs → messages-hWwSRF-2.mjs} +26 -1
- package/dist/{messages-En8LDjUB.mjs → messages-j7o5rT9s.mjs} +26 -1
- package/dist/{chunks/messages-NJsvFwJj.mjs → messages-nUVjeh7K.mjs} +27 -2
- package/dist/{messages-Cg1CF4pw.mjs → messages-nlhESX9t.mjs} +26 -1
- package/dist/{messages-CSl0Wla62.mjs → messages-rk-A1Wa42.mjs} +28 -3
- package/dist/{messages-nOe1gJYu.mjs → messages-xh2eOLvs.mjs} +26 -1
- package/dist/{messages-B_sKqaeK.mjs → messages-ynAe7ewZ.mjs} +26 -1
- package/dist/react.mjs +26 -25
- package/dist/tools.mjs +2 -2
- package/dist/vendor.LICENSE.txt +4065 -316
- package/package.json +2 -1
- package/src/components/constants/data-attributes.ts +0 -2
- package/src/components/i18n/locales/am/messages.json +26 -1
- package/src/components/i18n/locales/ar/messages.json +26 -1
- package/src/components/i18n/locales/az/messages.json +26 -1
- package/src/components/i18n/locales/bg/messages.json +26 -1
- package/src/components/i18n/locales/bn/messages.json +26 -1
- package/src/components/i18n/locales/bs/messages.json +28 -3
- package/src/components/i18n/locales/cs/messages.json +30 -5
- package/src/components/i18n/locales/da/messages.json +33 -8
- package/src/components/i18n/locales/de/messages.json +31 -6
- package/src/components/i18n/locales/dv/messages.json +26 -1
- package/src/components/i18n/locales/el/messages.json +26 -1
- package/src/components/i18n/locales/en/messages.json +13 -0
- package/src/components/i18n/locales/es/messages.json +27 -2
- package/src/components/i18n/locales/et/messages.json +30 -5
- package/src/components/i18n/locales/fa/messages.json +26 -1
- package/src/components/i18n/locales/fi/messages.json +26 -1
- package/src/components/i18n/locales/fil/messages.json +49 -24
- package/src/components/i18n/locales/fr/messages.json +27 -2
- package/src/components/i18n/locales/gu/messages.json +26 -1
- package/src/components/i18n/locales/he/messages.json +26 -1
- package/src/components/i18n/locales/hi/messages.json +26 -1
- package/src/components/i18n/locales/hr/messages.json +28 -3
- package/src/components/i18n/locales/hu/messages.json +27 -2
- package/src/components/i18n/locales/hy/messages.json +26 -1
- package/src/components/i18n/locales/id/messages.json +26 -1
- package/src/components/i18n/locales/it/messages.json +27 -2
- package/src/components/i18n/locales/ja/messages.json +26 -1
- package/src/components/i18n/locales/ka/messages.json +26 -1
- package/src/components/i18n/locales/km/messages.json +26 -1
- package/src/components/i18n/locales/kn/messages.json +26 -1
- package/src/components/i18n/locales/ko/messages.json +26 -1
- package/src/components/i18n/locales/ku/messages.json +26 -1
- package/src/components/i18n/locales/lo/messages.json +26 -1
- package/src/components/i18n/locales/lt/messages.json +26 -1
- package/src/components/i18n/locales/lv/messages.json +26 -1
- package/src/components/i18n/locales/mk/messages.json +26 -1
- package/src/components/i18n/locales/ml/messages.json +26 -1
- package/src/components/i18n/locales/mn/messages.json +26 -1
- package/src/components/i18n/locales/mr/messages.json +26 -1
- package/src/components/i18n/locales/ms/messages.json +28 -3
- package/src/components/i18n/locales/my/messages.json +26 -1
- package/src/components/i18n/locales/ne/messages.json +26 -1
- package/src/components/i18n/locales/nl/messages.json +28 -3
- package/src/components/i18n/locales/no/messages.json +29 -4
- package/src/components/i18n/locales/pa/messages.json +26 -1
- package/src/components/i18n/locales/pl/messages.json +27 -2
- package/src/components/i18n/locales/ps/messages.json +26 -1
- package/src/components/i18n/locales/pt/messages.json +27 -2
- package/src/components/i18n/locales/ro/messages.json +27 -2
- package/src/components/i18n/locales/ru/messages.json +26 -1
- package/src/components/i18n/locales/sd/messages.json +26 -1
- package/src/components/i18n/locales/si/messages.json +26 -1
- package/src/components/i18n/locales/sk/messages.json +28 -3
- package/src/components/i18n/locales/sl/messages.json +28 -3
- package/src/components/i18n/locales/sq/messages.json +27 -2
- package/src/components/i18n/locales/sr/messages.json +26 -1
- package/src/components/i18n/locales/sv/messages.json +28 -3
- package/src/components/i18n/locales/sw/messages.json +26 -1
- package/src/components/i18n/locales/ta/messages.json +26 -1
- package/src/components/i18n/locales/te/messages.json +26 -1
- package/src/components/i18n/locales/th/messages.json +26 -1
- package/src/components/i18n/locales/tr/messages.json +26 -1
- package/src/components/i18n/locales/ug/messages.json +26 -1
- package/src/components/i18n/locales/uk/messages.json +26 -1
- package/src/components/i18n/locales/ur/messages.json +26 -1
- package/src/components/i18n/locales/vi/messages.json +26 -1
- package/src/components/i18n/locales/yi/messages.json +26 -1
- package/src/components/i18n/locales/zh/messages.json +26 -1
- package/src/components/icons/index.ts +38 -0
- package/src/components/modules/api/ui.ts +0 -3
- package/src/components/modules/ui.ts +0 -13
- package/src/stories/EditorModes.stories.ts +0 -60
- package/src/styles/main.css +44 -2
- package/src/tools/callout/emoji-picker/index.ts +3 -2
- package/src/tools/code/code-keyboard.ts +16 -9
- package/src/tools/code/constants.ts +26 -3
- package/src/tools/code/dom-builder.ts +40 -5
- package/src/tools/code/highlight-applier.ts +229 -0
- package/src/tools/code/index.ts +141 -1
- package/src/tools/code/mermaid-loader.ts +45 -0
- package/src/tools/code/shiki-loader.ts +135 -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 +194 -11
- package/src/tools/table/table-cell-blocks.ts +9 -6
- package/src/tools/table/table-cell-clipboard.ts +6 -1
- 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 +78 -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/types/data-attributes.d.ts +0 -1
- package/types/tools/code.d.ts +2 -0
- /package/dist/chunks/{am-CS-JjQ0N.mjs → am-BxlkYGsI.mjs} +0 -0
- /package/dist/chunks/{ar-Dt4XzR5U.mjs → ar-9vlpr9V8.mjs} +0 -0
- /package/dist/chunks/{az-CaDTXby8.mjs → az-ON63W_FP.mjs} +0 -0
- /package/dist/chunks/{bg-D1pLog-R.mjs → bg-CtXWTP5w.mjs} +0 -0
- /package/dist/chunks/{bn-Db_ae60m.mjs → bn-BERvhXM4.mjs} +0 -0
- /package/dist/chunks/{bs-DJTg1R9e.mjs → bs-CBg8NVPG.mjs} +0 -0
- /package/dist/chunks/{cs-_Gc21gSL.mjs → cs-DeQddxS7.mjs} +0 -0
- /package/dist/chunks/{da-xDB8uhCd.mjs → da-DyTo-ec_.mjs} +0 -0
- /package/dist/chunks/{de-B6gVjh1Z.mjs → de-Cu7545m1.mjs} +0 -0
- /package/dist/chunks/{default-DIfXCS2E.mjs → default-qigT1Xpq.mjs} +0 -0
- /package/dist/chunks/{el-ClbRSnOs.mjs → el-oiubLRBq.mjs} +0 -0
- /package/dist/chunks/{es-CuY9rnLK.mjs → es-DZUC6Klv.mjs} +0 -0
- /package/dist/chunks/{et-BLu5lDVc.mjs → et-CDeklAog.mjs} +0 -0
- /package/dist/chunks/{fa-P3gnrZH8.mjs → fa-Cafp7_Li.mjs} +0 -0
- /package/dist/chunks/{fi-B8PVHLjq.mjs → fi-BD_V_aVW.mjs} +0 -0
- /package/dist/chunks/{fil-B9JII5iF.mjs → fil-Crsfbtx4.mjs} +0 -0
- /package/dist/chunks/{fr-BWLDZdcc.mjs → fr-BGGc04Zv.mjs} +0 -0
- /package/dist/chunks/{gu-BH3R_s4c.mjs → gu-Vg_BgCTp.mjs} +0 -0
- /package/dist/chunks/{he-CCmeCVR_.mjs → he-DTY9chlZ.mjs} +0 -0
- /package/dist/chunks/{hi-BBav00DN.mjs → hi-DChMXk0x.mjs} +0 -0
- /package/dist/chunks/{hr-B5ZX0r9G.mjs → hr-BWVgNU8k.mjs} +0 -0
- /package/dist/chunks/{hu-1jgDa3YU.mjs → hu-B37awHXA.mjs} +0 -0
- /package/dist/chunks/{hy-LX4Kp2PE.mjs → hy-DGC_GDHh.mjs} +0 -0
- /package/dist/chunks/{i18next-KNC_XV5x.mjs → i18next-CXx5niYF.mjs} +0 -0
- /package/dist/chunks/{id-CcG40D1H.mjs → id-V7cw6La2.mjs} +0 -0
- /package/dist/chunks/{it-Cb8_K72W.mjs → it-DrTGP8Rn.mjs} +0 -0
- /package/dist/chunks/{ja-ipCH91mv.mjs → ja-DS4pbJEG.mjs} +0 -0
- /package/dist/chunks/{ka-BRvREIgq.mjs → ka-BueyosRh.mjs} +0 -0
- /package/dist/chunks/{km-BJwVw7Fg.mjs → km-B0K891yW.mjs} +0 -0
- /package/dist/chunks/{kn-BPgUazCC.mjs → kn-BQ__skg8.mjs} +0 -0
- /package/dist/chunks/{ko-CQLzxe7k.mjs → ko-BuPxi_7e.mjs} +0 -0
- /package/dist/chunks/{ku-BHhHu8Iz.mjs → ku-nQjwPRw2.mjs} +0 -0
- /package/dist/chunks/{lo-DsTgYblY.mjs → lo-K5NVFoq1.mjs} +0 -0
- /package/dist/chunks/{lt-CDzHJm71.mjs → lt-D3xD6Eb2.mjs} +0 -0
- /package/dist/chunks/{lv-MLLIAnIX.mjs → lv-DH13mzZj.mjs} +0 -0
- /package/dist/chunks/{micromark-factory-space-WwmyBO_J.mjs → micromark-factory-space-y4SDWQKm.mjs} +0 -0
- /package/dist/chunks/{mk-DQdmUquZ.mjs → mk-Bb48BcDA.mjs} +0 -0
- /package/dist/chunks/{ml-DqehZnra.mjs → ml-BHPEj1kD.mjs} +0 -0
- /package/dist/chunks/{mn-4cFkKFjW.mjs → mn-BNGzpdI6.mjs} +0 -0
- /package/dist/chunks/{mr-DWiztOP4.mjs → mr-D5PgU-cH.mjs} +0 -0
- /package/dist/chunks/{ms-BSz-iSnc.mjs → ms-DPkxqKz5.mjs} +0 -0
- /package/dist/chunks/{my-DbtbM1MW.mjs → my-DZGcyfxy.mjs} +0 -0
- /package/dist/chunks/{native-CzYG0YgY.mjs → native-D0cfLXsM.mjs} +0 -0
- /package/dist/chunks/{ne-CqALWw_f.mjs → ne-BU_Wh4Wv.mjs} +0 -0
- /package/dist/chunks/{nl-D_ra6RvH.mjs → nl-DtAPk1mK.mjs} +0 -0
- /package/dist/chunks/{no-Cg_kz_jl.mjs → no-CdW3n3BY.mjs} +0 -0
- /package/dist/chunks/{notifier-BOwxj_Ok.mjs → notifier-CuvTt9pe.mjs} +0 -0
- /package/dist/chunks/{pa-NLAsNqwY.mjs → pa-BacCHz87.mjs} +0 -0
- /package/dist/chunks/{pl-NHKp4YDg.mjs → pl-8zBJbmhZ.mjs} +0 -0
- /package/dist/chunks/{ps-D1zEqNeg.mjs → ps-c6nGXD-W.mjs} +0 -0
- /package/dist/chunks/{pt-DBtqbUEB.mjs → pt-B5yR8Qhr.mjs} +0 -0
- /package/dist/chunks/{ro-lqr63ai5.mjs → ro-Nscylsqb.mjs} +0 -0
- /package/dist/chunks/{ru-BycNnDyN.mjs → ru-DxERQkVJ.mjs} +0 -0
- /package/dist/chunks/{sd-DpHpIN9Z.mjs → sd-5z-QY3q9.mjs} +0 -0
- /package/dist/chunks/{si-BwiwaC7N.mjs → si-DTL0mzrx.mjs} +0 -0
- /package/dist/chunks/{sk-CqRHT2Gp.mjs → sk-DrGczTvY.mjs} +0 -0
- /package/dist/chunks/{sl-DA348uQ_.mjs → sl-D8nJjig4.mjs} +0 -0
- /package/dist/chunks/{sq-D7JNgve1.mjs → sq-C74Hm3YL.mjs} +0 -0
- /package/dist/chunks/{sr-D8RK6Kwp.mjs → sr-DAwB05Gj.mjs} +0 -0
- /package/dist/chunks/{sv-dwgT67ZG.mjs → sv-BkHBsN4y.mjs} +0 -0
- /package/dist/chunks/{sw-ZRRJnkem.mjs → sw-BBQLTq_z.mjs} +0 -0
- /package/dist/chunks/{ta-5x4L5Krl.mjs → ta-DRRzdKky.mjs} +0 -0
- /package/dist/chunks/{te-BZpEimwA.mjs → te-CedXLsKM.mjs} +0 -0
- /package/dist/chunks/{th-Bhr-33kv.mjs → th-DDOlGA0W.mjs} +0 -0
- /package/dist/chunks/{tr-6tSNKGNB.mjs → tr-ClgvwOlL.mjs} +0 -0
- /package/dist/chunks/{ug-_e-jvr2b.mjs → ug-bXxwiinM.mjs} +0 -0
- /package/dist/chunks/{uk-DooSc2Ja.mjs → uk-Dp46o_VT.mjs} +0 -0
- /package/dist/chunks/{ur-rb-krkIO.mjs → ur-MfEEhdFq.mjs} +0 -0
- /package/dist/chunks/{vi-CQkLn2AQ.mjs → vi-bt-3LPGO.mjs} +0 -0
- /package/dist/chunks/{zh-CXQ40Q2_.mjs → zh-Dgyb5Ly8.mjs} +0 -0
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"tools.table.clearSelection": "אויסמעקן",
|
|
57
57
|
"tools.table.copySelection": "קאָפּירן",
|
|
58
58
|
"tools.table.cellColor": "קאָליר",
|
|
59
|
+
"tools.table.mergeCells": "פֿאַראייניקן צעלן",
|
|
60
|
+
"tools.table.splitCell": "צעטיילן צעל",
|
|
59
61
|
"tools.table.headerColumn": "קעפּל שפּאַלט",
|
|
60
62
|
"tools.table.insertColumnLeft": "אַרײַנשטעלן שפּאַלט לינקס",
|
|
61
63
|
"tools.table.insertColumnRight": "אַרײַנשטעלן שפּאַלט רעכטס",
|
|
@@ -158,5 +160,28 @@
|
|
|
158
160
|
"tools.quote.defaultSize": "שטאַנדאַרד",
|
|
159
161
|
"tools.quote.largeSize": "גרויס",
|
|
160
162
|
"tools.code.codeTab": "קאָד",
|
|
161
|
-
"tools.code.previewTab": "פֿאָרויסבליק"
|
|
163
|
+
"tools.code.previewTab": "פֿאָרויסבליק",
|
|
164
|
+
"tools.table.placement": "אָרט",
|
|
165
|
+
"tools.table.placementTopLeft": "אויבן לינקס",
|
|
166
|
+
"tools.table.placementTopCenter": "אויבן מיטן",
|
|
167
|
+
"tools.table.placementTopRight": "אויבן רעכטס",
|
|
168
|
+
"tools.table.placementMiddleLeft": "מיטן לינקס",
|
|
169
|
+
"tools.table.placementMiddleCenter": "מיטן",
|
|
170
|
+
"tools.table.placementMiddleRight": "מיטן רעכטס",
|
|
171
|
+
"tools.table.placementBottomLeft": "אונטן לינקס",
|
|
172
|
+
"tools.table.placementBottomCenter": "אונטן מיטן",
|
|
173
|
+
"tools.table.placementBottomRight": "אונטן רעכטס",
|
|
174
|
+
"toolNames.code": "קאָד",
|
|
175
|
+
"toolNames.inlineCode": "קאָד",
|
|
176
|
+
"tools.code.placeholder": "שרײַב קאָד…",
|
|
177
|
+
"tools.code.language": "שפּראַך",
|
|
178
|
+
"tools.code.copied": "קאָפּירט!",
|
|
179
|
+
"tools.code.copyCode": "קאָפּירן קאָד",
|
|
180
|
+
"tools.code.wrapLines": "שורות אומוויקלען",
|
|
181
|
+
"tools.code.searchLanguage": "זוכן שפּראַך...",
|
|
182
|
+
"tools.code.lineNumbers": "שורה נומערן",
|
|
183
|
+
"searchTerms.code": "קאָד",
|
|
184
|
+
"searchTerms.snippet": "שניצל",
|
|
185
|
+
"searchTerms.program": "פּראָגראַם",
|
|
186
|
+
"searchTerms.pre": "pre"
|
|
162
187
|
}
|
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
"tools.table.clearSelection": "清除",
|
|
72
72
|
"tools.table.copySelection": "复制",
|
|
73
73
|
"tools.table.cellColor": "颜色",
|
|
74
|
+
"tools.table.mergeCells": "合并单元格",
|
|
75
|
+
"tools.table.splitCell": "拆分单元格",
|
|
74
76
|
"tools.table.headerColumn": "标题列",
|
|
75
77
|
"tools.table.insertColumnLeft": "在左侧插入列",
|
|
76
78
|
"tools.table.insertColumnRight": "在右侧插入列",
|
|
@@ -158,5 +160,28 @@
|
|
|
158
160
|
"tools.quote.defaultSize": "默认",
|
|
159
161
|
"tools.quote.largeSize": "大",
|
|
160
162
|
"tools.code.codeTab": "代码",
|
|
161
|
-
"tools.code.previewTab": "预览"
|
|
163
|
+
"tools.code.previewTab": "预览",
|
|
164
|
+
"tools.table.placement": "位置",
|
|
165
|
+
"tools.table.placementTopLeft": "左上",
|
|
166
|
+
"tools.table.placementTopCenter": "居中上",
|
|
167
|
+
"tools.table.placementTopRight": "右上",
|
|
168
|
+
"tools.table.placementMiddleLeft": "左中",
|
|
169
|
+
"tools.table.placementMiddleCenter": "居中",
|
|
170
|
+
"tools.table.placementMiddleRight": "右中",
|
|
171
|
+
"tools.table.placementBottomLeft": "左下",
|
|
172
|
+
"tools.table.placementBottomCenter": "居中下",
|
|
173
|
+
"tools.table.placementBottomRight": "右下",
|
|
174
|
+
"toolNames.code": "代码",
|
|
175
|
+
"toolNames.inlineCode": "代码",
|
|
176
|
+
"tools.code.placeholder": "编写代码…",
|
|
177
|
+
"tools.code.language": "语言",
|
|
178
|
+
"tools.code.copied": "已复制!",
|
|
179
|
+
"tools.code.copyCode": "复制代码",
|
|
180
|
+
"tools.code.wrapLines": "自动换行",
|
|
181
|
+
"tools.code.searchLanguage": "搜索语言...",
|
|
182
|
+
"tools.code.lineNumbers": "行号",
|
|
183
|
+
"searchTerms.code": "代码",
|
|
184
|
+
"searchTerms.snippet": "片段",
|
|
185
|
+
"searchTerms.program": "程序",
|
|
186
|
+
"searchTerms.pre": "pre"
|
|
162
187
|
}
|
|
@@ -488,6 +488,17 @@ export const IconWrap = `
|
|
|
488
488
|
</svg>
|
|
489
489
|
`;
|
|
490
490
|
|
|
491
|
+
// Line numbers icon (gutter marks + code lines)
|
|
492
|
+
export const IconLineNumbers = `
|
|
493
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
494
|
+
<path d="M7 4v12" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" opacity="0.35"/>
|
|
495
|
+
<circle cx="4.5" cy="7" r="0.75" fill="currentColor"/>
|
|
496
|
+
<circle cx="4.5" cy="10" r="0.75" fill="currentColor"/>
|
|
497
|
+
<circle cx="4.5" cy="13" r="0.75" fill="currentColor"/>
|
|
498
|
+
<path d="M10 7h6M10 10h6M10 13h4" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
499
|
+
</svg>
|
|
500
|
+
`;
|
|
501
|
+
|
|
491
502
|
// Emoji Picker Category Icons
|
|
492
503
|
|
|
493
504
|
// Star icon (Callout category)
|
|
@@ -577,3 +588,30 @@ export const IconEmojiFlag = `
|
|
|
577
588
|
<path d="M5 3c2 0 3 1.5 5 1.5S14 3 16 3v8c-2 0-3 1.5-5 1.5S7 11 5 11" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
578
589
|
</svg>
|
|
579
590
|
`;
|
|
591
|
+
|
|
592
|
+
// Merge cells icon (two cells merging into one)
|
|
593
|
+
export const IconMergeCells = `
|
|
594
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
595
|
+
<path d="M10 4v12" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-dasharray="1.5 2"/>
|
|
596
|
+
<path d="M5.5 7 8.5 10 5.5 13" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
597
|
+
<path d="M14.5 7 11.5 10 14.5 13" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
598
|
+
</svg>
|
|
599
|
+
`;
|
|
600
|
+
|
|
601
|
+
// Split cell icon (one cell splitting into two)
|
|
602
|
+
export const IconSplitCell = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 3v18"/><path d="M8 8l4 4-4 4"/><path d="M16 8l-4 4 4 4"/></svg>`;
|
|
603
|
+
|
|
604
|
+
// Placement icon (3x3 alignment dot grid)
|
|
605
|
+
export const IconPlacement = `
|
|
606
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
607
|
+
<circle cx="6" cy="6" r="1.25" fill="currentColor"/>
|
|
608
|
+
<circle cx="10" cy="6" r="1.25" fill="currentColor"/>
|
|
609
|
+
<circle cx="14" cy="6" r="1.25" fill="currentColor"/>
|
|
610
|
+
<circle cx="6" cy="10" r="1.25" fill="currentColor"/>
|
|
611
|
+
<circle cx="10" cy="10" r="1.25" fill="currentColor"/>
|
|
612
|
+
<circle cx="14" cy="10" r="1.25" fill="currentColor"/>
|
|
613
|
+
<circle cx="6" cy="14" r="1.25" fill="currentColor"/>
|
|
614
|
+
<circle cx="10" cy="14" r="1.25" fill="currentColor"/>
|
|
615
|
+
<circle cx="14" cy="14" r="1.25" fill="currentColor"/>
|
|
616
|
+
</svg>
|
|
617
|
+
`;
|
|
@@ -467,25 +467,12 @@ export class UI extends Module<UINodes> {
|
|
|
467
467
|
this.nodes.wrapper.setAttribute(DATA_ATTR.rtl, 'true');
|
|
468
468
|
}
|
|
469
469
|
this.nodes.redactor = $.make('div', [
|
|
470
|
-
// Narrow mode: add left margin on non-mobile screens to make room for toolbar buttons
|
|
471
|
-
'not-mobile:group-data-[blok-narrow=true]:ml-(--spacing-narrow-mode-padding)',
|
|
472
|
-
// RTL narrow mode: add right margin instead
|
|
473
|
-
'not-mobile:group-data-[blok-rtl=true]:group-data-[blok-narrow=true]:mr-(--spacing-narrow-mode-padding)',
|
|
474
|
-
'not-mobile:group-data-[blok-rtl=true]:group-data-[blok-narrow=true]:ml-0',
|
|
475
470
|
// Firefox empty contenteditable fix
|
|
476
471
|
'[&_[contenteditable]:empty]:after:content-["\\feff_"]',
|
|
477
472
|
]);
|
|
478
473
|
this.nodes.redactor.setAttribute(DATA_ATTR.redactor, '');
|
|
479
474
|
this.nodes.redactor.setAttribute('data-blok-testid', 'redactor');
|
|
480
475
|
|
|
481
|
-
/**
|
|
482
|
-
* If Blok has injected into the narrow container, enable Narrow Mode
|
|
483
|
-
* @todo Forced layout. Get rid of this feature
|
|
484
|
-
*/
|
|
485
|
-
if (this.nodes.holder.offsetWidth < this.contentRect.width) {
|
|
486
|
-
this.nodes.wrapper.setAttribute(DATA_ATTR.narrow, 'true');
|
|
487
|
-
}
|
|
488
|
-
|
|
489
476
|
/**
|
|
490
477
|
* Create dedicated bottom zone element
|
|
491
478
|
*/
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* - ReadOnlyMode: Editor in read-only state
|
|
6
6
|
* - EmptyEditor: Editor with no initial content
|
|
7
7
|
* - ToolboxOpenedMode: Editor with toolbox popover open
|
|
8
|
-
* - NarrowMode: Editor in constrained width container
|
|
9
8
|
*
|
|
10
9
|
* Do not duplicate these stories in other files.
|
|
11
10
|
*/
|
|
@@ -84,52 +83,6 @@ export const ReadOnlyMode: Story = {
|
|
|
84
83
|
},
|
|
85
84
|
};
|
|
86
85
|
|
|
87
|
-
/**
|
|
88
|
-
* Narrow mode - editor in a constrained width container.
|
|
89
|
-
* Toolbar actions move inside the content area.
|
|
90
|
-
*/
|
|
91
|
-
export const NarrowMode: Story = {
|
|
92
|
-
args: {
|
|
93
|
-
data: sampleData,
|
|
94
|
-
readOnly: false,
|
|
95
|
-
width: 400,
|
|
96
|
-
},
|
|
97
|
-
parameters: {
|
|
98
|
-
chromatic: { delay: 500 },
|
|
99
|
-
},
|
|
100
|
-
play: async ({ canvasElement, step }) => {
|
|
101
|
-
await step('Wait for editor and toolbar to initialize', async () => {
|
|
102
|
-
await waitFor(
|
|
103
|
-
() => {
|
|
104
|
-
const block = canvasElement.querySelector(BLOCK_TESTID);
|
|
105
|
-
|
|
106
|
-
expect(block).toBeInTheDocument();
|
|
107
|
-
},
|
|
108
|
-
TIMEOUT_INIT
|
|
109
|
-
);
|
|
110
|
-
// Wait for toolbar to be created (happens in requestIdleCallback)
|
|
111
|
-
await waitForToolbar(canvasElement);
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
await step('Click block to show toolbar in narrow mode', async () => {
|
|
115
|
-
const block = canvasElement.querySelector(BLOCK_TESTID);
|
|
116
|
-
|
|
117
|
-
if (block) {
|
|
118
|
-
simulateClick(block);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
await waitFor(
|
|
122
|
-
() => {
|
|
123
|
-
const toolbar = canvasElement.querySelector(TOOLBAR_TESTID);
|
|
124
|
-
|
|
125
|
-
expect(toolbar).toHaveAttribute('data-blok-opened', 'true');
|
|
126
|
-
},
|
|
127
|
-
TIMEOUT_ACTION
|
|
128
|
-
);
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
|
|
133
86
|
/**
|
|
134
87
|
* Empty editor state - no blocks.
|
|
135
88
|
*/
|
|
@@ -214,7 +167,6 @@ export const ToolboxOpenedMode: Story = {
|
|
|
214
167
|
args: {
|
|
215
168
|
data: sampleData,
|
|
216
169
|
readOnly: false,
|
|
217
|
-
width: 450,
|
|
218
170
|
},
|
|
219
171
|
parameters: {
|
|
220
172
|
chromatic: { delay: 500 },
|
|
@@ -269,18 +221,6 @@ export const ToolboxOpenedMode: Story = {
|
|
|
269
221
|
},
|
|
270
222
|
};
|
|
271
223
|
|
|
272
|
-
/**
|
|
273
|
-
* Compact narrow editor (mobile-like).
|
|
274
|
-
*/
|
|
275
|
-
export const CompactNarrow: Story = {
|
|
276
|
-
args: {
|
|
277
|
-
data: sampleData,
|
|
278
|
-
readOnly: false,
|
|
279
|
-
width: 320,
|
|
280
|
-
minHeight: 200,
|
|
281
|
-
},
|
|
282
|
-
};
|
|
283
|
-
|
|
284
224
|
/**
|
|
285
225
|
* RTL (Right-to-Left) mode for languages like Arabic and Hebrew.
|
|
286
226
|
* Text direction and toolbar positioning are mirrored.
|
package/src/styles/main.css
CHANGED
|
@@ -491,7 +491,7 @@
|
|
|
491
491
|
|
|
492
492
|
/* Spacing (also powers w-*, h-*, min-w-*, min-h-*, size-*) */
|
|
493
493
|
--spacing-content-width: 650px;
|
|
494
|
-
|
|
494
|
+
|
|
495
495
|
--spacing-toolbox-btn: 26px;
|
|
496
496
|
--spacing-toolbox-btn-mobile: 36px;
|
|
497
497
|
--spacing-icon: 20px;
|
|
@@ -1128,8 +1128,12 @@
|
|
|
1128
1128
|
/**
|
|
1129
1129
|
* Content alignment
|
|
1130
1130
|
* Applies horizontal alignment to block content based on the editor's contentAlign setting.
|
|
1131
|
-
* Left alignment
|
|
1131
|
+
* Left alignment overrides the mx-auto Tailwind class on [data-blok-element-content].
|
|
1132
1132
|
*/
|
|
1133
|
+
[data-blok-content-align="left"] [data-blok-element-content] {
|
|
1134
|
+
margin-left: 0;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1133
1137
|
[data-blok-content-align="center"] [data-blok-element-content] {
|
|
1134
1138
|
margin-left: auto;
|
|
1135
1139
|
margin-right: auto;
|
|
@@ -1204,6 +1208,44 @@
|
|
|
1204
1208
|
@apply p-0 m-0 min-h-[1.6em];
|
|
1205
1209
|
}
|
|
1206
1210
|
|
|
1211
|
+
/* ─── Cell content placement ──────────────────────────────────── */
|
|
1212
|
+
|
|
1213
|
+
[data-blok-cell-placement="top-center"] {
|
|
1214
|
+
align-items: center;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
[data-blok-cell-placement="top-right"] {
|
|
1218
|
+
align-items: flex-end;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
[data-blok-cell-placement="middle-left"] {
|
|
1222
|
+
justify-content: center;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
[data-blok-cell-placement="middle-center"] {
|
|
1226
|
+
align-items: center;
|
|
1227
|
+
justify-content: center;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
[data-blok-cell-placement="middle-right"] {
|
|
1231
|
+
align-items: flex-end;
|
|
1232
|
+
justify-content: center;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
[data-blok-cell-placement="bottom-left"] {
|
|
1236
|
+
justify-content: flex-end;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
[data-blok-cell-placement="bottom-center"] {
|
|
1240
|
+
align-items: center;
|
|
1241
|
+
justify-content: flex-end;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
[data-blok-cell-placement="bottom-right"] {
|
|
1245
|
+
align-items: flex-end;
|
|
1246
|
+
justify-content: flex-end;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1207
1249
|
/**
|
|
1208
1250
|
* Exclude bare 'color' from transition-property inside table cells.
|
|
1209
1251
|
* StyleManager applies transition-colors (which includes 'color') for smooth
|
|
@@ -613,8 +613,9 @@ export class EmojiPicker {
|
|
|
613
613
|
this._body.appendChild(section);
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
// Standard categories
|
|
617
|
-
const
|
|
616
|
+
// Standard categories (exclude curated emojis to avoid duplicates)
|
|
617
|
+
const curatedSet = new Set(CURATED_CALLOUT_EMOJIS);
|
|
618
|
+
const byCategory = groupEmojisByCategory(emojis.filter(e => !curatedSet.has(e.native)));
|
|
618
619
|
|
|
619
620
|
for (const [category, categoryEmojis] of byCategory) {
|
|
620
621
|
visibleCategories.add(category);
|
|
@@ -15,7 +15,7 @@ export function handleCodeKeydown(
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
if (event.key === 'Enter') {
|
|
18
|
-
insertNewline();
|
|
18
|
+
insertNewline(codeElement);
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -32,20 +32,27 @@ export function handleCodeKeydown(
|
|
|
32
32
|
return false;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function insertNewline(): void {
|
|
35
|
+
function insertNewline(codeElement: HTMLElement): void {
|
|
36
36
|
const selection = window.getSelection();
|
|
37
37
|
if (!selection || selection.rangeCount === 0) return;
|
|
38
38
|
|
|
39
39
|
const range = selection.getRangeAt(0);
|
|
40
|
-
range.deleteContents();
|
|
41
40
|
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
range.
|
|
45
|
-
|
|
41
|
+
const preCaretRange = range.cloneRange();
|
|
42
|
+
preCaretRange.selectNodeContents(codeElement);
|
|
43
|
+
preCaretRange.setEnd(range.startContainer, range.startOffset);
|
|
44
|
+
const caretOffset = preCaretRange.toString().length;
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const text = codeElement.textContent ?? '';
|
|
47
|
+
const before = text.substring(0, caretOffset);
|
|
48
|
+
const after = text.substring(caretOffset);
|
|
49
|
+
|
|
50
|
+
while (codeElement.firstChild) {
|
|
51
|
+
codeElement.removeChild(codeElement.firstChild);
|
|
52
|
+
}
|
|
53
|
+
codeElement.appendChild(document.createTextNode(before + '\n' + after));
|
|
54
|
+
|
|
55
|
+
restoreCaretOffset(codeElement, caretOffset + 1);
|
|
49
56
|
}
|
|
50
57
|
|
|
51
58
|
function insertTab(): void {
|
|
@@ -34,6 +34,7 @@ export const LANGUAGES: LanguageEntry[] = [
|
|
|
34
34
|
{ id: 'swift', name: 'Swift' },
|
|
35
35
|
{ id: 'kotlin', name: 'Kotlin' },
|
|
36
36
|
{ id: 'latex', name: 'LaTeX' },
|
|
37
|
+
{ id: 'mermaid', name: 'Mermaid' },
|
|
37
38
|
{ id: 'sql', name: 'SQL' },
|
|
38
39
|
{ id: 'html', name: 'HTML' },
|
|
39
40
|
{ id: 'css', name: 'CSS' },
|
|
@@ -56,11 +57,11 @@ export const WRAPPER_STYLES = 'flex flex-col rounded-lg bg-bg-secondary overflow
|
|
|
56
57
|
export const HEADER_STYLES = 'flex items-center gap-1 px-3 py-1.5 border-b border-border-primary text-xs text-gray-text';
|
|
57
58
|
export const LANGUAGE_BUTTON_STYLES = 'px-1.5 py-0.5 rounded cursor-pointer bg-transparent border-0 text-xs text-gray-text font-medium transition-colors can-hover:hover:bg-item-hover-bg select-none';
|
|
58
59
|
export const HEADER_BUTTON_STYLES = 'p-1 rounded cursor-pointer bg-transparent border-0 text-gray-text transition-colors can-hover:hover:bg-item-hover-bg flex items-center justify-center';
|
|
59
|
-
export const CODE_AREA_STYLES = 'px-4 py-3 font-mono text-sm leading-relaxed outline-hidden whitespace-pre-wrap overflow-x-auto min-h-[1.5em]';
|
|
60
|
+
export const CODE_AREA_STYLES = 'block px-4 py-3 font-mono text-sm leading-relaxed outline-hidden whitespace-pre-wrap overflow-x-auto min-h-[1.5em]';
|
|
60
61
|
export const COPIED_FEEDBACK_STYLES = 'text-xs text-gray-text font-medium select-none';
|
|
61
62
|
|
|
62
63
|
// Languages that support preview rendering
|
|
63
|
-
export const PREVIEWABLE_LANGUAGES = new Set(['latex']);
|
|
64
|
+
export const PREVIEWABLE_LANGUAGES = new Set(['latex', 'mermaid']);
|
|
64
65
|
|
|
65
66
|
// i18n keys — preview tabs
|
|
66
67
|
export const CODE_TAB_KEY = 'tools.code.codeTab';
|
|
@@ -70,4 +71,26 @@ export const PREVIEW_TAB_KEY = 'tools.code.previewTab';
|
|
|
70
71
|
export const TAB_STYLES = 'px-2 py-0.5 rounded text-xs font-medium cursor-pointer border-0 transition-colors select-none';
|
|
71
72
|
export const TAB_ACTIVE_STYLES = 'bg-blue-500 text-white';
|
|
72
73
|
export const TAB_INACTIVE_STYLES = 'bg-transparent text-gray-text can-hover:hover:bg-item-hover-bg';
|
|
73
|
-
export const PREVIEW_AREA_STYLES = 'px-4 py-3 overflow-x-auto min-h-[1.5em]';
|
|
74
|
+
export const PREVIEW_AREA_STYLES = 'px-4 py-3 overflow-x-auto min-h-[1.5em] flex justify-center';
|
|
75
|
+
|
|
76
|
+
// Shiki theme names for syntax highlighting
|
|
77
|
+
export const SHIKI_LIGHT_THEME = 'one-light';
|
|
78
|
+
export const SHIKI_DARK_THEME = 'vitesse-dark';
|
|
79
|
+
|
|
80
|
+
// CSS selector for dark mode (Tailwind convention)
|
|
81
|
+
export const DARK_MODE_SELECTOR = '.dark';
|
|
82
|
+
|
|
83
|
+
// Languages that support syntax highlighting (all except plain text)
|
|
84
|
+
export const HIGHLIGHTABLE_LANGUAGES = new Set(
|
|
85
|
+
LANGUAGES
|
|
86
|
+
.map((lang) => lang.id)
|
|
87
|
+
.filter((id) => id !== DEFAULT_LANGUAGE)
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// i18n key — line numbers toggle
|
|
91
|
+
export const LINE_NUMBERS_KEY = 'tools.code.lineNumbers';
|
|
92
|
+
|
|
93
|
+
// CSS — line number gutter
|
|
94
|
+
export const CODE_BODY_STYLES = 'flex overflow-hidden';
|
|
95
|
+
export const GUTTER_STYLES = 'select-none text-right pr-3 py-3 font-mono text-sm leading-relaxed text-gray-text/40 border-r border-border-primary shrink-0';
|
|
96
|
+
export const GUTTER_LINE_STYLES = 'leading-relaxed';
|
|
@@ -8,16 +8,21 @@ import {
|
|
|
8
8
|
TAB_ACTIVE_STYLES,
|
|
9
9
|
TAB_INACTIVE_STYLES,
|
|
10
10
|
PREVIEW_AREA_STYLES,
|
|
11
|
+
CODE_BODY_STYLES,
|
|
12
|
+
GUTTER_STYLES,
|
|
13
|
+
GUTTER_LINE_STYLES,
|
|
11
14
|
} from './constants';
|
|
12
|
-
import { IconCopy, IconWrap } from '../../components/icons';
|
|
15
|
+
import { IconCopy, IconWrap, IconLineNumbers } from '../../components/icons';
|
|
13
16
|
|
|
14
17
|
export interface CodeDOMRefs {
|
|
15
18
|
wrapper: HTMLElement;
|
|
16
19
|
languageButton: HTMLButtonElement;
|
|
20
|
+
lineNumbersButton: HTMLButtonElement;
|
|
17
21
|
copyButton: HTMLButtonElement;
|
|
18
22
|
wrapButton: HTMLButtonElement;
|
|
19
23
|
preElement: HTMLPreElement;
|
|
20
24
|
codeElement: HTMLElement;
|
|
25
|
+
gutterElement: HTMLElement;
|
|
21
26
|
codeTab: HTMLButtonElement | null;
|
|
22
27
|
previewTab: HTMLButtonElement | null;
|
|
23
28
|
previewElement: HTMLDivElement | null;
|
|
@@ -29,6 +34,7 @@ export interface BuildCodeDOMOptions {
|
|
|
29
34
|
readOnly: boolean;
|
|
30
35
|
copyLabel: string;
|
|
31
36
|
wrapLabel: string;
|
|
37
|
+
lineNumbersLabel?: string;
|
|
32
38
|
previewable?: boolean;
|
|
33
39
|
codeTabLabel?: string;
|
|
34
40
|
previewTabLabel?: string;
|
|
@@ -61,7 +67,7 @@ function buildPreviewElements(
|
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
export function buildCodeDOM(options: BuildCodeDOMOptions): CodeDOMRefs {
|
|
64
|
-
const { code, languageName, readOnly, copyLabel, wrapLabel, previewable, codeTabLabel, previewTabLabel } = options;
|
|
70
|
+
const { code, languageName, readOnly, copyLabel, wrapLabel, lineNumbersLabel, previewable, codeTabLabel, previewTabLabel } = options;
|
|
65
71
|
|
|
66
72
|
// Wrapper
|
|
67
73
|
const wrapper = document.createElement('div');
|
|
@@ -96,6 +102,14 @@ export function buildCodeDOM(options: BuildCodeDOMOptions): CodeDOMRefs {
|
|
|
96
102
|
wrapButton.setAttribute('aria-label', wrapLabel);
|
|
97
103
|
wrapButton.setAttribute('data-blok-testid', 'code-wrap-btn');
|
|
98
104
|
|
|
105
|
+
// Line numbers toggle button
|
|
106
|
+
const lineNumbersButton = document.createElement('button');
|
|
107
|
+
lineNumbersButton.type = 'button';
|
|
108
|
+
lineNumbersButton.className = HEADER_BUTTON_STYLES;
|
|
109
|
+
lineNumbersButton.innerHTML = IconLineNumbers;
|
|
110
|
+
lineNumbersButton.setAttribute('aria-label', lineNumbersLabel ?? 'Line numbers');
|
|
111
|
+
lineNumbersButton.setAttribute('data-blok-testid', 'code-line-numbers-btn');
|
|
112
|
+
|
|
99
113
|
// Copy button
|
|
100
114
|
const copyButton = document.createElement('button');
|
|
101
115
|
copyButton.type = 'button';
|
|
@@ -114,10 +128,24 @@ export function buildCodeDOM(options: BuildCodeDOMOptions): CodeDOMRefs {
|
|
|
114
128
|
}
|
|
115
129
|
|
|
116
130
|
if (!readOnly) {
|
|
117
|
-
codeElement.setAttribute('contenteditable', '
|
|
131
|
+
codeElement.setAttribute('contenteditable', 'plaintext-only');
|
|
118
132
|
codeElement.setAttribute('spellcheck', 'false');
|
|
119
133
|
}
|
|
120
134
|
|
|
135
|
+
// Line number gutter
|
|
136
|
+
const gutterElement = document.createElement('div');
|
|
137
|
+
gutterElement.className = GUTTER_STYLES;
|
|
138
|
+
gutterElement.setAttribute('aria-hidden', 'true');
|
|
139
|
+
gutterElement.setAttribute('data-blok-testid', 'code-gutter');
|
|
140
|
+
|
|
141
|
+
const lineCount = code ? code.split('\n').length : 1;
|
|
142
|
+
Array.from({ length: lineCount }, (_, idx) => {
|
|
143
|
+
const lineEl = document.createElement('div');
|
|
144
|
+
lineEl.className = GUTTER_LINE_STYLES;
|
|
145
|
+
lineEl.textContent = String(idx + 1);
|
|
146
|
+
gutterElement.appendChild(lineEl);
|
|
147
|
+
});
|
|
148
|
+
|
|
121
149
|
// Assemble header
|
|
122
150
|
header.appendChild(languageButton);
|
|
123
151
|
header.appendChild(spacer);
|
|
@@ -127,6 +155,7 @@ export function buildCodeDOM(options: BuildCodeDOMOptions): CodeDOMRefs {
|
|
|
127
155
|
header.appendChild(previewTab);
|
|
128
156
|
}
|
|
129
157
|
|
|
158
|
+
header.appendChild(lineNumbersButton);
|
|
130
159
|
header.appendChild(wrapButton);
|
|
131
160
|
header.appendChild(copyButton);
|
|
132
161
|
|
|
@@ -134,13 +163,19 @@ export function buildCodeDOM(options: BuildCodeDOMOptions): CodeDOMRefs {
|
|
|
134
163
|
const preElement = document.createElement('pre');
|
|
135
164
|
preElement.appendChild(codeElement);
|
|
136
165
|
|
|
166
|
+
// Code body container (flex: gutter + pre)
|
|
167
|
+
const codeBody = document.createElement('div');
|
|
168
|
+
codeBody.className = CODE_BODY_STYLES;
|
|
169
|
+
codeBody.appendChild(gutterElement);
|
|
170
|
+
codeBody.appendChild(preElement);
|
|
171
|
+
|
|
137
172
|
// Assemble wrapper
|
|
138
173
|
wrapper.appendChild(header);
|
|
139
|
-
wrapper.appendChild(
|
|
174
|
+
wrapper.appendChild(codeBody);
|
|
140
175
|
|
|
141
176
|
if (previewElement) {
|
|
142
177
|
wrapper.appendChild(previewElement);
|
|
143
178
|
}
|
|
144
179
|
|
|
145
|
-
return { wrapper, languageButton, copyButton, wrapButton, preElement, codeElement, codeTab, previewTab, previewElement };
|
|
180
|
+
return { wrapper, languageButton, lineNumbersButton, copyButton, wrapButton, preElement, codeElement, gutterElement, codeTab, previewTab, previewElement };
|
|
146
181
|
}
|