@jackuait/blok 0.6.0-beta.0 → 0.6.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/README.md +16 -169
- package/bin/blok.mjs +10 -0
- package/dist/blok.mjs +2 -2
- package/dist/chunks/{blok-Bu9S3SsR.mjs → blok-Buf0btS7.mjs} +2267 -2024
- package/dist/chunks/{i18next-loader-CKuXJ0Av.mjs → i18next-loader-CVf_ZfwA.mjs} +1 -1
- package/dist/chunks/{index-jtZaryNw.mjs → index-C6jsfLLp.mjs} +1 -1
- package/dist/chunks/{inline-tool-convert-CFjyrH30.mjs → inline-tool-convert-BKKEoOqB.mjs} +710 -570
- package/dist/chunks/{messages-C5b7hr_E.mjs → messages-1fC8IMyX.mjs} +16 -2
- package/dist/chunks/{messages-CQj2JU2j.mjs → messages-7QoX8DkW.mjs} +23 -9
- package/dist/{messages-LvFKBBPa.mjs → chunks/messages-7W4d0DwD.mjs} +15 -1
- package/dist/{messages-Bn253WWC.mjs → chunks/messages-9SihnaXQ.mjs} +14 -0
- package/dist/{messages-Bf6Y3_GI.mjs → chunks/messages-B1Aww8q7.mjs} +16 -2
- package/dist/{messages-pA5TvcAj.mjs → chunks/messages-BB5z9Uba.mjs} +14 -0
- package/dist/chunks/{messages-wdqp4610.mjs → messages-BC86qLvI.mjs} +17 -3
- package/dist/chunks/{messages-o24dK6CU.mjs → messages-BELRf6DU.mjs} +16 -2
- package/dist/chunks/{messages-CUZ1x1QD.mjs → messages-BFG6Wlgy.mjs} +16 -2
- package/dist/{messages-B5puUm7R.mjs → chunks/messages-BL0tXcDf.mjs} +15 -1
- package/dist/chunks/{messages-zS1AXZ0y.mjs → messages-BMXCuEKO.mjs} +19 -5
- package/dist/{messages-CyDU5lz9.mjs → chunks/messages-BMv4xwIr.mjs} +16 -2
- package/dist/chunks/{messages-BeUhMpsr.mjs → messages-BSbjsyHY.mjs} +25 -11
- package/dist/chunks/{messages-JGsXAReJ.mjs → messages-BU2nlrLK.mjs} +16 -2
- package/dist/chunks/{messages-srxrv8Yh.mjs → messages-BWF-zUpY.mjs} +17 -3
- package/dist/{messages-CXHd9SUK.mjs → chunks/messages-BYyy6Wqf.mjs} +14 -0
- package/dist/chunks/{messages-DOlC_Tty.mjs → messages-BdeLo0N9.mjs} +24 -10
- package/dist/chunks/{messages-B5jGUnOy.mjs → messages-Bmu_S7GM.mjs} +14 -0
- package/dist/chunks/{messages-BmKCChWZ.mjs → messages-BoJc_p1r.mjs} +14 -0
- package/dist/chunks/{messages-CvaqJFN-.mjs → messages-BogRq8lt.mjs} +15 -1
- package/dist/chunks/{messages-NP1myMGI.mjs → messages-BrPFGbM-.mjs} +14 -0
- package/dist/chunks/{messages-D00OjS2n.mjs → messages-C2htQ_3F.mjs} +24 -10
- package/dist/chunks/{messages-BiExzWJv.mjs → messages-C99mq906.mjs} +15 -1
- package/dist/chunks/{messages-CkFT2gle.mjs → messages-C9eaarcK.mjs} +20 -6
- package/dist/chunks/{messages-BrJHUxQL.mjs → messages-CJdUsQ-c.mjs} +15 -1
- package/dist/chunks/messages-CKI54h6O.mjs +62 -0
- package/dist/{messages-CrsJ1TEJ.mjs → chunks/messages-CLhcMlTc.mjs} +15 -1
- package/dist/{messages-CnvW8Slp.mjs → chunks/messages-CMkNSDTo.mjs} +17 -3
- package/dist/{messages-BlpqL8vG.mjs → chunks/messages-CQwpzUFp.mjs} +19 -5
- package/dist/chunks/{messages-Cu08aLS3.mjs → messages-CVw84KdI.mjs} +21 -7
- package/dist/chunks/{messages-B9Oba7sq.mjs → messages-CY8_RyFE.mjs} +15 -1
- package/dist/chunks/{messages-B5hdXZwA.mjs → messages-CZygwLwM.mjs} +15 -1
- package/dist/chunks/{messages-CVeWVKsV.mjs → messages-CnwibSvh.mjs} +14 -0
- package/dist/chunks/{messages-DbVquYKN.mjs → messages-CqWJcCbY.mjs} +14 -0
- package/dist/{messages-Dg92dXZ5.mjs → chunks/messages-CvGLfqmV.mjs} +14 -0
- package/dist/{messages-AHESHJm_.mjs → chunks/messages-CzTufCHu.mjs} +14 -0
- package/dist/chunks/{messages-Cj-t1bdy.mjs → messages-CznZadDf.mjs} +15 -1
- package/dist/chunks/{messages-DMQIHGRj.mjs → messages-D-ZtY5v0.mjs} +14 -0
- package/dist/chunks/{messages-rRSHQDCX.mjs → messages-D1Hv8XGo.mjs} +14 -0
- package/dist/chunks/{messages-0tDXLuyH.mjs → messages-D5C3J9qr.mjs} +15 -1
- package/dist/chunks/{messages-RvMHb2Ht.mjs → messages-D5iv1Kox.mjs} +16 -2
- package/dist/{messages-zSzDzXej.mjs → chunks/messages-DBRw-7Zc.mjs} +16 -2
- package/dist/chunks/{messages-CeCjVKMW.mjs → messages-DBn76jVV.mjs} +16 -2
- package/dist/chunks/{messages-C7I_AVH2.mjs → messages-DJDG55Vq.mjs} +16 -2
- package/dist/{messages-DDLgIPDF.mjs → chunks/messages-DLfR5bMd.mjs} +16 -2
- package/dist/{messages-CbhuIWRJ.mjs → chunks/messages-DT4dP5uK.mjs} +15 -1
- package/dist/chunks/{messages-B66ZSDCJ.mjs → messages-DhLKYm2j.mjs} +15 -1
- package/dist/{messages-BPqWKx5Z.mjs → chunks/messages-Diu6jAaR.mjs} +17 -3
- package/dist/{messages-BA0rcTCY.mjs → chunks/messages-DnIhyAJk.mjs} +18 -4
- package/dist/chunks/{messages-DV6shA9b.mjs → messages-DnXLrlHh.mjs} +14 -0
- package/dist/chunks/{messages-DcKOuncK.mjs → messages-DprmQg6V.mjs} +16 -2
- package/dist/{messages-CJoBtXU6.mjs → chunks/messages-DqM1LFg5.mjs} +14 -0
- package/dist/chunks/{messages-Cyi2AMmz.mjs → messages-DvFLX36Q.mjs} +25 -11
- package/dist/chunks/{messages-DnbbyJT3.mjs → messages-Dz9L52ol.mjs} +16 -2
- package/dist/chunks/{messages-GC2PhgV3.mjs → messages-Dzwxv9v1.mjs} +23 -9
- package/dist/chunks/{messages-Q4kc_ZtL.mjs → messages-JELdtT6E.mjs} +15 -1
- package/dist/{messages-DY94ykcE.mjs → chunks/messages-LPVfA-8K.mjs} +14 -0
- package/dist/{messages-Cr-RJ7YB.mjs → chunks/messages-O5tQus_0.mjs} +14 -0
- package/dist/chunks/{messages-CbMyJSzS.mjs → messages-Q7AO_FLv.mjs} +17 -3
- package/dist/chunks/{messages-2_xedlYw.mjs → messages-R3hUSvr3.mjs} +15 -1
- package/dist/{messages-CUy1vn-b.mjs → chunks/messages-Xq8UmkVs.mjs} +14 -0
- package/dist/chunks/{messages-BBJgd5jG.mjs → messages-Z9nEU2xK.mjs} +16 -2
- package/dist/chunks/{messages-Cm9aLHeX.mjs → messages-_ErNTNhk.mjs} +15 -1
- package/dist/chunks/{messages-JZUhXTuV.mjs → messages-_ncGrKHh.mjs} +16 -2
- package/dist/chunks/{messages-ftMcCEuO.mjs → messages-kep5wtm4.mjs} +15 -1
- package/dist/chunks/{messages-DteYq0rv.mjs → messages-uKX8WBaD.mjs} +16 -2
- package/dist/chunks/{messages-Bdv-IkfG.mjs → messages-w7v1GNaE.mjs} +15 -1
- package/dist/cli.mjs +50 -0
- package/dist/full.mjs +15 -15
- package/dist/locales.mjs +102 -88
- package/dist/{messages-C5b7hr_E.mjs → messages-1fC8IMyX.mjs} +16 -2
- package/dist/{messages-CQj2JU2j.mjs → messages-7QoX8DkW.mjs} +23 -9
- package/dist/{chunks/messages-LvFKBBPa.mjs → messages-7W4d0DwD.mjs} +15 -1
- package/dist/{chunks/messages-Bn253WWC.mjs → messages-9SihnaXQ.mjs} +14 -0
- package/dist/{chunks/messages-Bf6Y3_GI.mjs → messages-B1Aww8q7.mjs} +16 -2
- package/dist/{chunks/messages-pA5TvcAj.mjs → messages-BB5z9Uba.mjs} +14 -0
- package/dist/{messages-wdqp4610.mjs → messages-BC86qLvI.mjs} +17 -3
- package/dist/{messages-o24dK6CU.mjs → messages-BELRf6DU.mjs} +16 -2
- package/dist/{messages-CUZ1x1QD.mjs → messages-BFG6Wlgy.mjs} +16 -2
- package/dist/{chunks/messages-B5puUm7R.mjs → messages-BL0tXcDf.mjs} +15 -1
- package/dist/{messages-zS1AXZ0y.mjs → messages-BMXCuEKO.mjs} +19 -5
- package/dist/{chunks/messages-CyDU5lz9.mjs → messages-BMv4xwIr.mjs} +16 -2
- package/dist/{messages-BeUhMpsr.mjs → messages-BSbjsyHY.mjs} +25 -11
- package/dist/{messages-JGsXAReJ.mjs → messages-BU2nlrLK.mjs} +16 -2
- package/dist/{messages-srxrv8Yh.mjs → messages-BWF-zUpY.mjs} +17 -3
- package/dist/{chunks/messages-CXHd9SUK.mjs → messages-BYyy6Wqf.mjs} +14 -0
- package/dist/{messages-DOlC_Tty.mjs → messages-BdeLo0N9.mjs} +24 -10
- package/dist/{messages-B5jGUnOy.mjs → messages-Bmu_S7GM.mjs} +14 -0
- package/dist/{messages-BmKCChWZ.mjs → messages-BoJc_p1r.mjs} +14 -0
- package/dist/{messages-CvaqJFN-.mjs → messages-BogRq8lt.mjs} +15 -1
- package/dist/{messages-NP1myMGI.mjs → messages-BrPFGbM-.mjs} +14 -0
- package/dist/{messages-D00OjS2n.mjs → messages-C2htQ_3F.mjs} +24 -10
- package/dist/{messages-BiExzWJv.mjs → messages-C99mq906.mjs} +15 -1
- package/dist/{messages-CkFT2gle.mjs → messages-C9eaarcK.mjs} +20 -6
- package/dist/{messages-BrJHUxQL.mjs → messages-CJdUsQ-c.mjs} +15 -1
- package/dist/messages-CKI54h6O.mjs +62 -0
- package/dist/{chunks/messages-CrsJ1TEJ.mjs → messages-CLhcMlTc.mjs} +15 -1
- package/dist/{chunks/messages-CnvW8Slp.mjs → messages-CMkNSDTo.mjs} +17 -3
- package/dist/{chunks/messages-BlpqL8vG.mjs → messages-CQwpzUFp.mjs} +19 -5
- package/dist/{messages-Cu08aLS3.mjs → messages-CVw84KdI.mjs} +21 -7
- package/dist/{messages-B9Oba7sq.mjs → messages-CY8_RyFE.mjs} +15 -1
- package/dist/{messages-B5hdXZwA.mjs → messages-CZygwLwM.mjs} +15 -1
- package/dist/{messages-CVeWVKsV.mjs → messages-CnwibSvh.mjs} +14 -0
- package/dist/{messages-DbVquYKN.mjs → messages-CqWJcCbY.mjs} +14 -0
- package/dist/{chunks/messages-Dg92dXZ5.mjs → messages-CvGLfqmV.mjs} +14 -0
- package/dist/{chunks/messages-AHESHJm_.mjs → messages-CzTufCHu.mjs} +14 -0
- package/dist/{messages-Cj-t1bdy.mjs → messages-CznZadDf.mjs} +15 -1
- package/dist/{messages-DMQIHGRj.mjs → messages-D-ZtY5v0.mjs} +14 -0
- package/dist/{messages-rRSHQDCX.mjs → messages-D1Hv8XGo.mjs} +14 -0
- package/dist/{messages-0tDXLuyH.mjs → messages-D5C3J9qr.mjs} +15 -1
- package/dist/{messages-RvMHb2Ht.mjs → messages-D5iv1Kox.mjs} +16 -2
- package/dist/{chunks/messages-zSzDzXej.mjs → messages-DBRw-7Zc.mjs} +16 -2
- package/dist/{messages-CeCjVKMW.mjs → messages-DBn76jVV.mjs} +16 -2
- package/dist/{messages-C7I_AVH2.mjs → messages-DJDG55Vq.mjs} +16 -2
- package/dist/{chunks/messages-DDLgIPDF.mjs → messages-DLfR5bMd.mjs} +16 -2
- package/dist/{chunks/messages-CbhuIWRJ.mjs → messages-DT4dP5uK.mjs} +15 -1
- package/dist/{messages-B66ZSDCJ.mjs → messages-DhLKYm2j.mjs} +15 -1
- package/dist/{chunks/messages-BPqWKx5Z.mjs → messages-Diu6jAaR.mjs} +17 -3
- package/dist/{chunks/messages-BA0rcTCY.mjs → messages-DnIhyAJk.mjs} +18 -4
- package/dist/{messages-DV6shA9b.mjs → messages-DnXLrlHh.mjs} +14 -0
- package/dist/{messages-DcKOuncK.mjs → messages-DprmQg6V.mjs} +16 -2
- package/dist/{chunks/messages-CJoBtXU6.mjs → messages-DqM1LFg5.mjs} +14 -0
- package/dist/{messages-Cyi2AMmz.mjs → messages-DvFLX36Q.mjs} +25 -11
- package/dist/{messages-DnbbyJT3.mjs → messages-Dz9L52ol.mjs} +16 -2
- package/dist/{messages-GC2PhgV3.mjs → messages-Dzwxv9v1.mjs} +23 -9
- package/dist/{messages-Q4kc_ZtL.mjs → messages-JELdtT6E.mjs} +15 -1
- package/dist/{chunks/messages-DY94ykcE.mjs → messages-LPVfA-8K.mjs} +14 -0
- package/dist/{chunks/messages-Cr-RJ7YB.mjs → messages-O5tQus_0.mjs} +14 -0
- package/dist/{messages-CbMyJSzS.mjs → messages-Q7AO_FLv.mjs} +17 -3
- package/dist/{messages-2_xedlYw.mjs → messages-R3hUSvr3.mjs} +15 -1
- package/dist/{chunks/messages-CUy1vn-b.mjs → messages-Xq8UmkVs.mjs} +14 -0
- package/dist/{messages-BBJgd5jG.mjs → messages-Z9nEU2xK.mjs} +16 -2
- package/dist/{messages-Cm9aLHeX.mjs → messages-_ErNTNhk.mjs} +15 -1
- package/dist/{messages-JZUhXTuV.mjs → messages-_ncGrKHh.mjs} +16 -2
- package/dist/{messages-ftMcCEuO.mjs → messages-kep5wtm4.mjs} +15 -1
- package/dist/{messages-DteYq0rv.mjs → messages-uKX8WBaD.mjs} +16 -2
- package/dist/{messages-Bdv-IkfG.mjs → messages-w7v1GNaE.mjs} +15 -1
- package/dist/tools.mjs +2005 -1267
- package/dist/vendor.LICENSE.txt +1 -1
- package/package.json +15 -14
- package/src/cli/commands/migration.ts +16 -0
- package/src/cli/commands/migrationContent.ts +6 -0
- package/src/cli/index.ts +47 -0
- package/src/cli/utils/output.ts +10 -0
- package/src/components/block-tunes/block-tune-delete.ts +3 -2
- package/src/components/blocks.ts +23 -6
- package/src/components/constants/data-attributes.ts +2 -0
- package/src/components/i18n/locales/am/messages.json +15 -1
- package/src/components/i18n/locales/ar/messages.json +14 -0
- package/src/components/i18n/locales/az/messages.json +14 -0
- package/src/components/i18n/locales/bg/messages.json +14 -0
- package/src/components/i18n/locales/bn/messages.json +25 -11
- package/src/components/i18n/locales/bs/messages.json +15 -1
- package/src/components/i18n/locales/cs/messages.json +14 -0
- package/src/components/i18n/locales/da/messages.json +14 -0
- package/src/components/i18n/locales/de/messages.json +14 -0
- package/src/components/i18n/locales/dv/messages.json +15 -1
- package/src/components/i18n/locales/el/messages.json +15 -1
- package/src/components/i18n/locales/en/messages.json +14 -0
- package/src/components/i18n/locales/es/messages.json +14 -0
- package/src/components/i18n/locales/et/messages.json +14 -0
- package/src/components/i18n/locales/fa/messages.json +15 -1
- package/src/components/i18n/locales/fi/messages.json +15 -1
- package/src/components/i18n/locales/fil/messages.json +20 -6
- package/src/components/i18n/locales/fr/messages.json +15 -1
- package/src/components/i18n/locales/gu/messages.json +15 -1
- package/src/components/i18n/locales/he/messages.json +14 -0
- package/src/components/i18n/locales/hi/messages.json +23 -9
- package/src/components/i18n/locales/hr/messages.json +14 -0
- package/src/components/i18n/locales/hu/messages.json +14 -0
- package/src/components/i18n/locales/hy/messages.json +16 -2
- package/src/components/i18n/locales/id/messages.json +19 -5
- package/src/components/i18n/locales/it/messages.json +14 -0
- package/src/components/i18n/locales/ja/messages.json +14 -0
- package/src/components/i18n/locales/ka/messages.json +15 -1
- package/src/components/i18n/locales/km/messages.json +16 -2
- package/src/components/i18n/locales/kn/messages.json +16 -2
- package/src/components/i18n/locales/ko/messages.json +14 -0
- package/src/components/i18n/locales/ku/messages.json +16 -2
- package/src/components/i18n/locales/lo/messages.json +15 -1
- package/src/components/i18n/locales/lt/messages.json +15 -1
- package/src/components/i18n/locales/lv/messages.json +15 -1
- package/src/components/i18n/locales/mk/messages.json +16 -2
- package/src/components/i18n/locales/ml/messages.json +16 -2
- package/src/components/i18n/locales/mn/messages.json +16 -2
- package/src/components/i18n/locales/mr/messages.json +24 -10
- package/src/components/i18n/locales/ms/messages.json +17 -3
- package/src/components/i18n/locales/my/messages.json +16 -2
- package/src/components/i18n/locales/ne/messages.json +24 -10
- package/src/components/i18n/locales/nl/messages.json +15 -1
- package/src/components/i18n/locales/no/messages.json +16 -2
- package/src/components/i18n/locales/pa/messages.json +15 -1
- package/src/components/i18n/locales/pl/messages.json +14 -0
- package/src/components/i18n/locales/ps/messages.json +17 -3
- package/src/components/i18n/locales/pt/messages.json +14 -0
- package/src/components/i18n/locales/ro/messages.json +15 -1
- package/src/components/i18n/locales/ru/messages.json +14 -0
- package/src/components/i18n/locales/sd/messages.json +16 -2
- package/src/components/i18n/locales/si/messages.json +23 -9
- package/src/components/i18n/locales/sk/messages.json +15 -1
- package/src/components/i18n/locales/sl/messages.json +16 -2
- package/src/components/i18n/locales/sq/messages.json +16 -2
- package/src/components/i18n/locales/sr/messages.json +16 -2
- package/src/components/i18n/locales/sv/messages.json +16 -2
- package/src/components/i18n/locales/sw/messages.json +16 -2
- package/src/components/i18n/locales/ta/messages.json +21 -7
- package/src/components/i18n/locales/te/messages.json +40 -26
- package/src/components/i18n/locales/th/messages.json +19 -5
- package/src/components/i18n/locales/tr/messages.json +15 -1
- package/src/components/i18n/locales/ug/messages.json +16 -2
- package/src/components/i18n/locales/uk/messages.json +15 -1
- package/src/components/i18n/locales/ur/messages.json +15 -1
- package/src/components/i18n/locales/vi/messages.json +25 -11
- package/src/components/i18n/locales/yi/messages.json +16 -2
- package/src/components/i18n/locales/zh/messages.json +15 -1
- package/src/components/icons/index.ts +104 -83
- package/src/components/modules/api/blocks.ts +35 -2
- package/src/components/modules/api/history.ts +64 -0
- package/src/components/modules/api/index.ts +2 -0
- package/src/components/modules/api/readonly.ts +11 -1
- package/src/components/modules/blockEvents/composers/markdownShortcuts.ts +12 -1
- package/src/components/modules/blockManager/blockManager.ts +7 -0
- package/src/components/modules/blockManager/operations.ts +3 -2
- package/src/components/modules/blockManager/types.ts +3 -1
- package/src/components/modules/blockManager/yjs-sync.ts +12 -2
- package/src/components/modules/index.ts +3 -0
- package/src/components/modules/normalizeInlineImages.ts +263 -0
- package/src/components/modules/readonly.ts +11 -0
- package/src/components/modules/rectangleSelection.ts +19 -3
- package/src/components/modules/saver.ts +7 -3
- package/src/components/modules/toolbar/blockSettings.ts +3 -3
- package/src/components/modules/toolbar/index.ts +72 -14
- package/src/components/modules/toolbar/plus-button.ts +24 -3
- package/src/components/modules/toolbar/settings-toggler.ts +3 -5
- package/src/components/modules/ui.ts +46 -68
- package/src/components/modules/uiControllers/controllers/blockHover.ts +49 -61
- package/src/components/modules/uiControllers/controllers/keyboard.ts +17 -11
- package/src/components/modules/uiControllers/handlers/click.ts +0 -12
- package/src/components/modules/yjs/index.ts +23 -0
- package/src/components/ui/toolbox.ts +41 -6
- package/src/components/utils/placeholder.ts +16 -0
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.const.ts +2 -1
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts +6 -1
- package/src/components/utils/popover/index.ts +1 -0
- package/src/components/utils/popover/popover-abstract.ts +11 -1
- package/src/components/utils/popover/popover-desktop.ts +27 -8
- package/src/components/utils/popover/popover-registry.ts +188 -0
- package/src/components/utils/sanitizer.ts +23 -2
- package/src/components/utils/tooltip.ts +2 -24
- package/src/styles/main.css +22 -0
- package/src/tools/paragraph/index.ts +12 -4
- package/src/tools/table/data-normalizer.ts +1 -0
- package/src/tools/table/index.ts +283 -346
- package/src/tools/table/table-add-controls.ts +353 -47
- package/src/tools/table/table-cell-blocks.ts +95 -7
- package/src/tools/table/table-cell-selection.ts +648 -0
- package/src/tools/table/table-core.ts +21 -32
- package/src/tools/table/table-grip-visuals.ts +96 -0
- package/src/tools/table/table-heading-toggle.ts +127 -0
- package/src/tools/table/table-operations.ts +475 -0
- package/src/tools/table/table-resize.ts +27 -6
- package/src/tools/table/table-restrictions.ts +64 -0
- package/src/tools/table/table-row-col-action-handler.ts +190 -0
- package/src/tools/table/table-row-col-controls.ts +265 -211
- package/src/tools/table/table-row-col-drag.ts +4 -4
- package/src/tools/table/table-row-col-popover.ts +225 -0
- package/src/tools/table/types.ts +4 -0
- package/src/types-internal/blok-modules.d.ts +2 -0
- package/types/api/blocks.d.ts +8 -0
- package/types/api/history.d.ts +33 -0
- package/types/api/index.d.ts +1 -0
- package/types/api/readonly.d.ts +12 -2
- package/types/index.d.ts +10 -0
- package/types/tools/table.d.ts +67 -0
- package/types/tools-entry.d.ts +4 -0
- package/types/utils/popover/popover-item.d.ts +6 -0
- package/types/utils/popover/popover.d.ts +7 -0
- package/dist/chunks/messages-CySyfkMU.mjs +0 -48
- package/dist/messages-CySyfkMU.mjs +0 -48
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Cross/Close icon
|
|
2
2
|
export const IconCross = `
|
|
3
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
-
<path d="
|
|
3
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path d="m5 15 10-10m0 10L5 5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
5
|
</svg>
|
|
6
6
|
`;
|
|
7
7
|
|
|
8
8
|
// Bold icon
|
|
9
9
|
export const IconBold = `
|
|
10
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
11
|
<path
|
|
12
12
|
d="M5.5 11h4.9231c.6528 0 1.2789-.3161 1.7405-.8787.4617-.56259.721-1.32565.721-2.1213 0-.79565-.2593-1.55871-.721-2.12132C11.702 5.31607 11.0759 5 10.4231 5H5.5v6Zm0 0h5.5385c.6528 0 1.2789.3161 1.7405.8787.4617.5626.721 1.3257.721 2.1213 0 .7956-.2593 1.5587-.721 2.1213-.4616.5626-1.0877.8787-1.7405.8787H5.5v-6Z"
|
|
13
13
|
stroke="currentColor"
|
|
@@ -20,10 +20,11 @@ export const IconBold = `
|
|
|
20
20
|
|
|
21
21
|
// Italic icon
|
|
22
22
|
export const IconItalic = `
|
|
23
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24
24
|
<path
|
|
25
25
|
d="M8.5 5h6m-10 12h6m1-12-4 12"
|
|
26
26
|
stroke="currentColor"
|
|
27
|
+
stroke-width="1.25"
|
|
27
28
|
stroke-linecap="round"
|
|
28
29
|
stroke-linejoin="round"
|
|
29
30
|
/>
|
|
@@ -32,78 +33,70 @@ export const IconItalic = `
|
|
|
32
33
|
|
|
33
34
|
// Link icon
|
|
34
35
|
export const IconLink = `
|
|
35
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
-
<path
|
|
37
|
-
|
|
38
|
-
stroke="currentColor"
|
|
39
|
-
stroke-width=".784151"
|
|
40
|
-
stroke-linecap="round"
|
|
41
|
-
stroke-linejoin="round"
|
|
42
|
-
/>
|
|
36
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
37
|
+
<path d="M8.5 11.5a3.5 3.5 0 0 0 5 0l2-2a3.536 3.536 0 0 0-5-5l-1 1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
38
|
+
<path d="M11.5 8.5a3.5 3.5 0 0 0-5 0l-2 2a3.536 3.536 0 0 0 5 5l1-1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
43
39
|
</svg>
|
|
44
40
|
`;
|
|
45
41
|
|
|
46
42
|
// Replace/Convert icon
|
|
47
43
|
export const IconReplace = `
|
|
48
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
-
<path
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
stroke-linecap="round"
|
|
54
|
-
/>
|
|
44
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
<path d="M14.5 6.5l2-2-2-2" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
46
|
+
<path d="M16.5 4.5h-4a5 5 0 0 0-5 5v1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
47
|
+
<path d="M5.5 13.5l-2 2 2 2" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
48
|
+
<path d="M3.5 15.5h4a5 5 0 0 0 5-5v-1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
55
49
|
</svg>
|
|
56
50
|
`;
|
|
57
51
|
|
|
58
|
-
// Menu icon
|
|
52
|
+
// Menu icon (6-dot grip)
|
|
59
53
|
export const IconMenu = `
|
|
60
|
-
<svg width="
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/>
|
|
54
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
55
|
+
<circle cx="7.5" cy="5.5" r="1" fill="currentColor"/>
|
|
56
|
+
<circle cx="12.5" cy="5.5" r="1" fill="currentColor"/>
|
|
57
|
+
<circle cx="7.5" cy="10" r="1" fill="currentColor"/>
|
|
58
|
+
<circle cx="12.5" cy="10" r="1" fill="currentColor"/>
|
|
59
|
+
<circle cx="7.5" cy="14.5" r="1" fill="currentColor"/>
|
|
60
|
+
<circle cx="12.5" cy="14.5" r="1" fill="currentColor"/>
|
|
65
61
|
</svg>
|
|
66
62
|
`;
|
|
67
63
|
|
|
68
64
|
// Plus/Add icon
|
|
69
65
|
export const IconPlus = `
|
|
70
|
-
<svg width="
|
|
71
|
-
<path d="M4.5
|
|
66
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
67
|
+
<path d="M4.5 10h11M10 4.5v11" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
72
68
|
</svg>
|
|
73
69
|
`;
|
|
74
70
|
|
|
75
71
|
// Chevron Left icon
|
|
76
72
|
export const IconChevronLeft = `
|
|
77
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
78
|
-
<path d="m12
|
|
73
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
74
|
+
<path d="m12 5-5 5 5 5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
79
75
|
</svg>
|
|
80
76
|
`;
|
|
81
77
|
|
|
82
78
|
// Chevron Right icon
|
|
83
79
|
export const IconChevronRight = `
|
|
84
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
85
|
-
<path d="
|
|
80
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
81
|
+
<path d="m8 5 5 5-5 5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
86
82
|
</svg>
|
|
87
83
|
`;
|
|
88
84
|
|
|
89
85
|
// Search icon
|
|
90
86
|
export const IconSearch = `
|
|
91
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
stroke="currentColor"
|
|
95
|
-
stroke-linecap="round"
|
|
96
|
-
stroke-linejoin="round"
|
|
97
|
-
/>
|
|
87
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
88
|
+
<circle cx="9" cy="9" r="4.5" stroke="currentColor" stroke-width="1.25"/>
|
|
89
|
+
<path d="m12.5 12.5 3.5 3.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
98
90
|
</svg>
|
|
99
91
|
`;
|
|
100
92
|
|
|
101
93
|
// Heading 1 icon
|
|
102
94
|
export const IconH1 = `
|
|
103
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
95
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
104
96
|
<path
|
|
105
97
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 5 2.5-1.66667V15"
|
|
106
98
|
stroke="currentColor"
|
|
99
|
+
stroke-width="1.25"
|
|
107
100
|
stroke-linecap="round"
|
|
108
101
|
stroke-linejoin="round"
|
|
109
102
|
/>
|
|
@@ -112,10 +105,11 @@ export const IconH1 = `
|
|
|
112
105
|
|
|
113
106
|
// Heading 2 icon
|
|
114
107
|
export const IconH2 = `
|
|
115
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
108
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
116
109
|
<path
|
|
117
110
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m7.5 10h-3.3333c0-3.3333 3.3333-2.5 3.3333-5 0-1.25-1.6667-2.08333-3.3333-.83333"
|
|
118
111
|
stroke="currentColor"
|
|
112
|
+
stroke-width="1.25"
|
|
119
113
|
stroke-linecap="round"
|
|
120
114
|
stroke-linejoin="round"
|
|
121
115
|
/>
|
|
@@ -124,10 +118,11 @@ export const IconH2 = `
|
|
|
124
118
|
|
|
125
119
|
// Heading 3 icon
|
|
126
120
|
export const IconH3 = `
|
|
127
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
121
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
128
122
|
<path
|
|
129
123
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.5833 3.75C16 7.91667 17.5 8.75 17.5 10c0 .442-.1756.866-.4882 1.1785-.3125.3126-.7364.4882-1.1785.4882.4421 0 .866.1756 1.1785.4881.3126.3126.4882.7365.4882 1.1785 0 1.5-1.6667 2.5-3.3333 1.25"
|
|
130
124
|
stroke="currentColor"
|
|
125
|
+
stroke-width="1.25"
|
|
131
126
|
stroke-linecap="round"
|
|
132
127
|
stroke-linejoin="round"
|
|
133
128
|
/>
|
|
@@ -139,7 +134,8 @@ export const IconH4 = `
|
|
|
139
134
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
140
135
|
<path
|
|
141
136
|
d="M10 15V5M14.1667 8.33333V10.8333C14.1667 11.0543 14.2545 11.2663 14.4107 11.4226C14.567 11.5789 14.779 11.6667 15 11.6667H17.5M17.5 8.33333V15M3.33334 10H10M3.33334 15V5"
|
|
142
|
-
stroke="
|
|
137
|
+
stroke="currentColor"
|
|
138
|
+
stroke-width="1.25"
|
|
143
139
|
stroke-linecap="round"
|
|
144
140
|
stroke-linejoin="round"
|
|
145
141
|
/>
|
|
@@ -151,7 +147,8 @@ export const IconH5 = `
|
|
|
151
147
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
152
148
|
<path
|
|
153
149
|
d="M3.33334 10H10M3.33334 15V5M10 15V5M17.5 8.33333H14.1667V10.8333H15.25C16.5 10.8333 17.5 11.75 17.5 12.9167C17.5 14.0833 16.5 15 15.25 15C14.8333 15 14.5 14.9167 14.1667 14.75"
|
|
154
|
-
stroke="
|
|
150
|
+
stroke="currentColor"
|
|
151
|
+
stroke-width="1.25"
|
|
155
152
|
stroke-linecap="round"
|
|
156
153
|
stroke-linejoin="round"
|
|
157
154
|
/>
|
|
@@ -160,22 +157,24 @@ export const IconH5 = `
|
|
|
160
157
|
|
|
161
158
|
// Heading 6 icon
|
|
162
159
|
export const IconH6 = `
|
|
163
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
160
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
164
161
|
<path
|
|
165
162
|
d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 8.3333c0 .9205.7462 1.6667 1.6666 1.6667.9205 0 1.6667-.7462 1.6667-1.6667 0-.9204-.7462-1.6666-1.6667-1.6666-.9204 0-1.6666.7462-1.6666 1.6666Zm0 0c0-2.0833.8333-3.3333 2.5-4.99997"
|
|
166
163
|
stroke="currentColor"
|
|
164
|
+
stroke-width="1.25"
|
|
167
165
|
stroke-linecap="round"
|
|
168
166
|
stroke-linejoin="round"
|
|
169
167
|
/>
|
|
170
168
|
</svg>
|
|
171
169
|
`;
|
|
172
170
|
|
|
173
|
-
// Heading
|
|
171
|
+
// Heading icon
|
|
174
172
|
export const IconHeading = `
|
|
175
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
173
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
176
174
|
<path
|
|
177
175
|
d="M6.5 10h6.6667M6.5 15V5m6.6667 10V5"
|
|
178
176
|
stroke="currentColor"
|
|
177
|
+
stroke-width="1.25"
|
|
179
178
|
stroke-linecap="round"
|
|
180
179
|
stroke-linejoin="round"
|
|
181
180
|
/>
|
|
@@ -184,10 +183,11 @@ export const IconHeading = `
|
|
|
184
183
|
|
|
185
184
|
// Text/Paragraph icon
|
|
186
185
|
export const IconText = `
|
|
187
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
186
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
188
187
|
<path
|
|
189
188
|
d="M14.5 7.28571V6h-9v1.28571M10 6v9m0 0H8.71429M10 15h1.2857"
|
|
190
189
|
stroke="currentColor"
|
|
190
|
+
stroke-width="1.25"
|
|
191
191
|
stroke-linecap="round"
|
|
192
192
|
stroke-linejoin="round"
|
|
193
193
|
/>
|
|
@@ -196,25 +196,19 @@ export const IconText = `
|
|
|
196
196
|
|
|
197
197
|
// Warning icon
|
|
198
198
|
export const IconWarning = `
|
|
199
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
200
|
-
<path
|
|
201
|
-
|
|
202
|
-
stroke="currentColor"
|
|
203
|
-
stroke-width="1.06667"
|
|
204
|
-
stroke-linecap="round"
|
|
205
|
-
stroke-linejoin="round"
|
|
206
|
-
/>
|
|
207
|
-
<rect x="9.75" y="14.25" width=".5" height=".5" rx=".25" fill="currentColor" stroke="currentColor" stroke-width=".5"/>
|
|
208
|
-
<rect x="9.75" y="8.25" width=".5" height="4.5" rx=".25" fill="currentColor" stroke="currentColor" stroke-width=".5"/>
|
|
199
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
200
|
+
<path d="M10 4 3 16h14Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
201
|
+
<path d="M10 8.5v3.5m0 2v.01" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
209
202
|
</svg>
|
|
210
203
|
`;
|
|
211
204
|
|
|
212
205
|
// Bulleted List icon
|
|
213
206
|
export const IconListBulleted = `
|
|
214
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
207
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
215
208
|
<path
|
|
216
209
|
d="M8 5h9M8 10h9M8 15h9M4 5h.01M4 10h.01M4 15h.01"
|
|
217
210
|
stroke="currentColor"
|
|
211
|
+
stroke-width="1.25"
|
|
218
212
|
stroke-linecap="round"
|
|
219
213
|
stroke-linejoin="round"
|
|
220
214
|
/>
|
|
@@ -223,17 +217,24 @@ export const IconListBulleted = `
|
|
|
223
217
|
|
|
224
218
|
// Numbered List icon
|
|
225
219
|
export const IconListNumbered = `
|
|
226
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
227
|
-
<path
|
|
220
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
221
|
+
<path
|
|
222
|
+
d="M8 5h9M8 10h9M8 15h9M3.5 4.5l1-1v3M3.5 9.5a1 1 0 1 1 2 0c0 .75-2 1.25-2 2h2M3.5 13.5h1a.75.75 0 0 1 0 1.5.75.75 0 0 1 0 1.5h-1"
|
|
223
|
+
stroke="currentColor"
|
|
224
|
+
stroke-width="1.25"
|
|
225
|
+
stroke-linecap="round"
|
|
226
|
+
stroke-linejoin="round"
|
|
227
|
+
/>
|
|
228
228
|
</svg>
|
|
229
229
|
`;
|
|
230
230
|
|
|
231
231
|
// Checklist icon
|
|
232
232
|
export const IconListChecklist = `
|
|
233
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
233
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
234
234
|
<path
|
|
235
235
|
d="M10 5h7M10 10h7M10 15h7M3 5l1 1 2-2M3 10l1 1 2-2M3 15l1 1 2-2"
|
|
236
236
|
stroke="currentColor"
|
|
237
|
+
stroke-width="1.25"
|
|
237
238
|
stroke-linecap="round"
|
|
238
239
|
stroke-linejoin="round"
|
|
239
240
|
/>
|
|
@@ -242,72 +243,92 @@ export const IconListChecklist = `
|
|
|
242
243
|
|
|
243
244
|
// Table icon
|
|
244
245
|
export const IconTable = `
|
|
245
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
246
|
-
<
|
|
247
|
-
<path d="
|
|
246
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
247
|
+
<rect x="3" y="4" width="14" height="12" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
|
|
248
|
+
<path d="M3 8h14M3 12h14M7.5 4v12M12.5 4v12" stroke="currentColor" stroke-width="1.25"/>
|
|
249
|
+
</svg>
|
|
250
|
+
`;
|
|
251
|
+
|
|
252
|
+
// Table with highlighted top row (header row)
|
|
253
|
+
export const IconHeaderRow = `
|
|
254
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
255
|
+
<path d="M4.5 4h11A1.5 1.5 0 0 1 17 5.5V8H3V5.5A1.5 1.5 0 0 1 4.5 4Z" fill="currentColor"/>
|
|
256
|
+
<rect x="3" y="4" width="14" height="12" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
|
|
257
|
+
<path d="M3 8h14M3 12h14M7.5 4v12M12.5 4v12" stroke="currentColor" stroke-width="1.25"/>
|
|
258
|
+
</svg>
|
|
259
|
+
`;
|
|
260
|
+
|
|
261
|
+
// Table with highlighted left column (header column)
|
|
262
|
+
export const IconHeaderColumn = `
|
|
263
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
264
|
+
<path d="M4.5 4H7.5v12H4.5A1.5 1.5 0 0 1 3 14.5v-9A1.5 1.5 0 0 1 4.5 4Z" fill="currentColor"/>
|
|
265
|
+
<rect x="3" y="4" width="14" height="12" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
|
|
266
|
+
<path d="M3 8h14M3 12h14M7.5 4v12M12.5 4v12" stroke="currentColor" stroke-width="1.25"/>
|
|
248
267
|
</svg>
|
|
249
268
|
`;
|
|
250
269
|
|
|
251
270
|
// Insert row above icon
|
|
252
271
|
export const IconInsertAbove = `
|
|
253
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
254
|
-
<path d="M10
|
|
272
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
273
|
+
<path d="M10 4l-3 3m3-3l3 3M10 4v7M5 16h10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
255
274
|
</svg>
|
|
256
275
|
`;
|
|
257
276
|
|
|
258
277
|
// Insert row below icon
|
|
259
278
|
export const IconInsertBelow = `
|
|
260
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
261
|
-
<path d="M10
|
|
279
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
280
|
+
<path d="M10 16l-3-3m3 3l3-3M10 16V9M5 4h10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
262
281
|
</svg>
|
|
263
282
|
`;
|
|
264
283
|
|
|
265
284
|
// Insert column left icon
|
|
266
285
|
export const IconInsertLeft = `
|
|
267
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
268
|
-
<path d="
|
|
286
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
287
|
+
<path d="M4 10l3-3M4 10l3 3M4 10h7M16 5v10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
269
288
|
</svg>
|
|
270
289
|
`;
|
|
271
290
|
|
|
272
291
|
// Insert column right icon
|
|
273
292
|
export const IconInsertRight = `
|
|
274
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
275
|
-
<path d="
|
|
293
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
294
|
+
<path d="M16 10l-3-3m3 3l-3 3M16 10H9M4 5v10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
276
295
|
</svg>
|
|
277
296
|
`;
|
|
278
297
|
|
|
279
298
|
// Move up icon
|
|
280
299
|
export const IconMoveUp = `
|
|
281
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
282
|
-
<path d="M10 16V4m0 0-
|
|
300
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
301
|
+
<path d="M10 16V4m0 0-3 3m3-3 3 3" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
283
302
|
</svg>
|
|
284
303
|
`;
|
|
285
304
|
|
|
286
305
|
// Move down icon
|
|
287
306
|
export const IconMoveDown = `
|
|
288
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
289
|
-
<path d="M10 4v12m0 0
|
|
307
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
308
|
+
<path d="M10 4v12m0 0 3-3m-3 3-3-3" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
290
309
|
</svg>
|
|
291
310
|
`;
|
|
292
311
|
|
|
293
312
|
// Move left icon
|
|
294
313
|
export const IconMoveLeft = `
|
|
295
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
296
|
-
<path d="M16 10H4m0 0
|
|
314
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
315
|
+
<path d="M16 10H4m0 0 3-3M4 10l3 3" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
297
316
|
</svg>
|
|
298
317
|
`;
|
|
299
318
|
|
|
300
319
|
// Move right icon
|
|
301
320
|
export const IconMoveRight = `
|
|
302
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
303
|
-
<path d="M4 10h12m0 0-
|
|
321
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
322
|
+
<path d="M4 10h12m0 0-3-3m3 3-3 3" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
304
323
|
</svg>
|
|
305
324
|
`;
|
|
306
325
|
|
|
307
326
|
// Trash/Delete icon
|
|
308
327
|
export const IconTrash = `
|
|
309
|
-
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
310
|
-
<path d="
|
|
328
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
329
|
+
<path d="M4.5 6.5h11" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
330
|
+
<path d="M8 6.5V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
331
|
+
<path d="M6.5 6.5l.5 8.5a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1l.5-8.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
332
|
+
<path d="M8.5 9.5v3.5M11.5 9.5v3.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
311
333
|
</svg>
|
|
312
334
|
`;
|
|
313
|
-
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BlockToolData, OutputBlockData, OutputData, ToolConfig } from '../../../../types';
|
|
2
2
|
import type { BlockAPI as BlockAPIInterface, Blocks } from '../../../../types/api';
|
|
3
3
|
import type { BlockTuneData } from '../../../../types/block-tunes/block-tune-data';
|
|
4
|
+
import { isInsideTableCell, isRestrictedInTableCell } from '../../../tools/table/table-restrictions';
|
|
4
5
|
import { Module } from '../../__module';
|
|
5
6
|
import { Block } from '../../block';
|
|
6
7
|
import { BlockAPI } from '../../block/api';
|
|
@@ -37,6 +38,7 @@ export class BlocksAPI extends Module {
|
|
|
37
38
|
update: this.update,
|
|
38
39
|
composeBlockData: this.composeBlockData,
|
|
39
40
|
convert: this.convert,
|
|
41
|
+
setBlockParent: (blockId: string, parentId: string | null): void => this.setBlockParent(blockId, parentId),
|
|
40
42
|
stopBlockMutationWatching: (index: number): void => this.stopBlockMutationWatching(index),
|
|
41
43
|
splitBlock: this.splitBlock,
|
|
42
44
|
};
|
|
@@ -114,7 +116,7 @@ export class BlocksAPI extends Module {
|
|
|
114
116
|
const block = this.Blok.BlockManager.getBlock(element);
|
|
115
117
|
|
|
116
118
|
if (block === undefined) {
|
|
117
|
-
logLabeled(`There is no block corresponding to element <${element.tagName
|
|
119
|
+
logLabeled(`There is no block corresponding to element <${element.tagName?.toLowerCase() ?? 'unknown'}>`, 'warn');
|
|
118
120
|
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
@@ -242,7 +244,21 @@ export class BlocksAPI extends Module {
|
|
|
242
244
|
replace?: boolean,
|
|
243
245
|
id?: string
|
|
244
246
|
): BlockAPIInterface => {
|
|
245
|
-
const
|
|
247
|
+
const defaultTool = type ?? (this.config.defaultBlock);
|
|
248
|
+
const tool = (() => {
|
|
249
|
+
if (!defaultTool) {
|
|
250
|
+
return defaultTool;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const targetIndex = index ?? this.Blok.BlockManager.currentBlockIndex;
|
|
254
|
+
const targetBlock = this.Blok.BlockManager.getBlockByIndex(targetIndex);
|
|
255
|
+
|
|
256
|
+
if (targetBlock !== undefined && isInsideTableCell(targetBlock) && isRestrictedInTableCell(defaultTool)) {
|
|
257
|
+
return 'paragraph';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return defaultTool;
|
|
261
|
+
})();
|
|
246
262
|
|
|
247
263
|
const insertedBlock = this.Blok.BlockManager.insert({
|
|
248
264
|
id,
|
|
@@ -361,6 +377,23 @@ export class BlocksAPI extends Module {
|
|
|
361
377
|
return blocksToInsert.map((block) => new BlockAPI(block));
|
|
362
378
|
};
|
|
363
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Sets the parent of a block, updating both the block's parentId and the parent's contentIds.
|
|
382
|
+
* @param blockId - id of the block to reparent
|
|
383
|
+
* @param parentId - id of the new parent block, or null for root level
|
|
384
|
+
*/
|
|
385
|
+
private setBlockParent(blockId: string, parentId: string | null): void {
|
|
386
|
+
const block = this.Blok.BlockManager.getBlockById(blockId);
|
|
387
|
+
|
|
388
|
+
if (block === undefined) {
|
|
389
|
+
logLabeled('There is no block with id `' + blockId + '`', 'warn');
|
|
390
|
+
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
this.Blok.BlockManager.setBlockParent(block, parentId);
|
|
395
|
+
}
|
|
396
|
+
|
|
364
397
|
/**
|
|
365
398
|
* Stops mutation watching on a block at the specified index.
|
|
366
399
|
* This is used to prevent spurious block-changed events during block replacement.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module HistoryAPI
|
|
3
|
+
* @copyright <CodeX> 2018
|
|
4
|
+
*
|
|
5
|
+
* Provides public methods for undo/redo operations
|
|
6
|
+
*/
|
|
7
|
+
import type { History } from '../../../../types/api';
|
|
8
|
+
import { Module } from '../../__module';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @class HistoryAPI
|
|
12
|
+
*/
|
|
13
|
+
export class HistoryAPI extends Module {
|
|
14
|
+
/**
|
|
15
|
+
* Available methods
|
|
16
|
+
* @returns {History}
|
|
17
|
+
*/
|
|
18
|
+
public get methods(): History {
|
|
19
|
+
return {
|
|
20
|
+
undo: (): void => this.undo(),
|
|
21
|
+
redo: (): void => this.redo(),
|
|
22
|
+
canUndo: (): boolean => this.canUndo(),
|
|
23
|
+
canRedo: (): boolean => this.canRedo(),
|
|
24
|
+
clear: (): void => this.clear(),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Undo the last operation
|
|
30
|
+
*/
|
|
31
|
+
public undo(): void {
|
|
32
|
+
this.Blok.YjsManager.undo();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Redo the last undone operation
|
|
37
|
+
*/
|
|
38
|
+
public redo(): void {
|
|
39
|
+
this.Blok.YjsManager.redo();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if undo is available
|
|
44
|
+
* @returns {boolean} true if undo is available
|
|
45
|
+
*/
|
|
46
|
+
public canUndo(): boolean {
|
|
47
|
+
return this.Blok.YjsManager.canUndo();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if redo is available
|
|
52
|
+
* @returns {boolean} true if redo is available
|
|
53
|
+
*/
|
|
54
|
+
public canRedo(): boolean {
|
|
55
|
+
return this.Blok.YjsManager.canRedo();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Clear all history
|
|
60
|
+
*/
|
|
61
|
+
public clear(): void {
|
|
62
|
+
this.Blok.YjsManager.clear();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -21,6 +21,7 @@ export class API extends Module {
|
|
|
21
21
|
caret: this.Blok.CaretAPI.methods,
|
|
22
22
|
tools: this.Blok.ToolsAPI.methods,
|
|
23
23
|
events: this.Blok.EventsAPI.methods,
|
|
24
|
+
history: this.Blok.HistoryAPI.methods,
|
|
24
25
|
listeners: this.Blok.ListenersAPI.methods,
|
|
25
26
|
notifier: this.Blok.NotifierAPI.methods,
|
|
26
27
|
sanitizer: this.Blok.SanitizerAPI.methods,
|
|
@@ -33,6 +34,7 @@ export class API extends Module {
|
|
|
33
34
|
i18n: this.Blok.I18nAPI.methods,
|
|
34
35
|
readOnly: this.Blok.ReadOnlyAPI.methods,
|
|
35
36
|
ui: this.Blok.UiAPI.methods,
|
|
37
|
+
rectangleSelection: this.Blok.RectangleSelection,
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -12,9 +12,10 @@ export class ReadOnlyAPI extends Module {
|
|
|
12
12
|
public get methods(): ReadOnly {
|
|
13
13
|
const getIsEnabled = (): boolean => this.isEnabled;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
return {
|
|
17
17
|
toggle: (state): Promise<boolean> => this.toggle(state),
|
|
18
|
+
set: (state): Promise<boolean> => this.set(state),
|
|
18
19
|
get isEnabled(): boolean {
|
|
19
20
|
return getIsEnabled();
|
|
20
21
|
},
|
|
@@ -30,6 +31,15 @@ export class ReadOnlyAPI extends Module {
|
|
|
30
31
|
return this.Blok.ReadOnly.toggle(state);
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Set read-only mode to the specified boolean state
|
|
36
|
+
* @param {boolean} state - read-only state to set
|
|
37
|
+
* @returns {Promise<boolean>} the new read-only state
|
|
38
|
+
*/
|
|
39
|
+
public set(state: boolean): Promise<boolean> {
|
|
40
|
+
return this.Blok.ReadOnly.set(state);
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
/**
|
|
34
44
|
* Returns current read-only state
|
|
35
45
|
*/
|
|
@@ -153,7 +153,18 @@ export class MarkdownShortcuts extends BlockEventComposer {
|
|
|
153
153
|
const { BlockManager, Tools } = this.Blok;
|
|
154
154
|
const currentBlock = BlockManager.currentBlock;
|
|
155
155
|
|
|
156
|
-
if (!currentBlock
|
|
156
|
+
if (!currentBlock) {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Check if inside table cell
|
|
161
|
+
const isInsideTableCell = currentBlock.holder.closest('[data-blok-table-cell-blocks]') !== null;
|
|
162
|
+
|
|
163
|
+
if (isInsideTableCell) {
|
|
164
|
+
return false; // Don't convert to header
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (!currentBlock.tool.isDefault) {
|
|
157
168
|
return false;
|
|
158
169
|
}
|
|
159
170
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type { BlockToolData, OutputBlockData, PasteEvent } from '../../../../types';
|
|
8
8
|
import type { BlockTuneData } from '../../../../types/block-tunes/block-tune-data';
|
|
9
9
|
import type { BlockMutationEventMap, BlockMutationType } from '../../../../types/events/block';
|
|
10
|
+
import { BlockAddedMutationType } from '../../../../types/events/block/BlockAdded';
|
|
10
11
|
import { BlockChangedMutationType } from '../../../../types/events/block/BlockChanged';
|
|
11
12
|
import { BlockRemovedMutationType } from '../../../../types/events/block/BlockRemoved';
|
|
12
13
|
import { Module } from '../../__module';
|
|
@@ -307,6 +308,12 @@ export class BlockManager extends Module {
|
|
|
307
308
|
replaceBlock: (index, newBlock) => {
|
|
308
309
|
this.blocksStore.replace(index, newBlock);
|
|
309
310
|
},
|
|
311
|
+
onBlockRemoved: (block, index) => {
|
|
312
|
+
this.blockDidMutated(BlockRemovedMutationType, block, { index });
|
|
313
|
+
},
|
|
314
|
+
onBlockAdded: (block, index) => {
|
|
315
|
+
this.blockDidMutated(BlockAddedMutationType, block, { index });
|
|
316
|
+
},
|
|
310
317
|
},
|
|
311
318
|
this.blocksStore
|
|
312
319
|
);
|