From 13074237d365cd6e4d94a382b5f0180fb6eabdd6 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Mon, 6 Jun 2022 20:01:09 +0200 Subject: [PATCH 01/12] refactor: upgrade prosemirror packages to new typescript versions --- package-lock.json | 521 +++++------------- packages/core/package.json | 23 +- packages/core/src/Editor.ts | 4 +- packages/extension-bubble-menu/package.json | 6 +- .../extension-character-count/package.json | 6 +- .../package.json | 8 +- packages/extension-code-block/package.json | 4 +- packages/extension-collaboration/package.json | 4 +- packages/extension-dropcursor/package.json | 5 +- packages/extension-floating-menu/package.json | 6 +- packages/extension-focus/package.json | 6 +- packages/extension-gapcursor/package.json | 5 +- packages/extension-history/package.json | 5 +- .../extension-horizontal-rule/package.json | 4 +- packages/extension-link/package.json | 6 +- packages/extension-mention/package.json | 6 +- packages/extension-placeholder/package.json | 8 +- packages/extension-table/package.json | 10 +- packages/extension-task-item/package.json | 4 +- packages/html/package.json | 4 +- packages/react/package.json | 4 +- packages/suggestion/package.json | 14 +- packages/vue-2/package.json | 4 +- packages/vue-3/package.json | 6 +- 24 files changed, 216 insertions(+), 457 deletions(-) diff --git a/package-lock.json b/package-lock.json index 49cf491265a..e6a48136917 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4686,11 +4686,6 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "node_modules/@types/orderedmap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/orderedmap/-/orderedmap-1.0.0.tgz", - "integrity": "sha512-dxKo80TqYx3YtBipHwA/SdFmMMyLCnP+5mkEqN0eMjcTBzHkiiX0ES118DsjDBjvD+zeSsSU9jULTZ+frog+Gw==" - }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -4703,99 +4698,6 @@ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", "dev": true }, - "node_modules/@types/prosemirror-commands": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-commands/-/prosemirror-commands-1.0.4.tgz", - "integrity": "sha512-utDNYB3EXLjAfYIcRWJe6pn3kcQ5kG4RijbT/0Y/TFOm6yhvYS/D9eJVnijdg9LDjykapcezchxGRqFD5LcyaQ==", - "dependencies": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*", - "@types/prosemirror-view": "*" - } - }, - "node_modules/@types/prosemirror-dropcursor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-dropcursor/-/prosemirror-dropcursor-1.0.3.tgz", - "integrity": "sha512-b0/8njnJ4lwyHKcGuCMf3x7r1KjxyugB1R/c2iMCjplsJHSC7UY9+OysqgJR5uUXRekUSGniiLgBtac/lvH6wg==", - "dependencies": { - "@types/prosemirror-state": "*" - } - }, - "node_modules/@types/prosemirror-gapcursor": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-gapcursor/-/prosemirror-gapcursor-1.0.4.tgz", - "integrity": "sha512-9xKjFIG5947dzerFvkLWp6F53JwrUYoYwh3SgcTFEp8SbSfNNrez/PFYVZKPnoqPoaK5WtTdQTaMwpCV9rXQIg==", - "dependencies": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, - "node_modules/@types/prosemirror-history": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-history/-/prosemirror-history-1.0.3.tgz", - "integrity": "sha512-5TloMDRavgLjOAKXp1Li8u0xcsspzbT1Cm9F2pwHOkgvQOz1jWQb2VIXO7RVNsFjLBZdIXlyfSLivro3DuMWXg==", - "dependencies": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, - "node_modules/@types/prosemirror-keymap": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz", - "integrity": "sha512-ycevwkqUh+jEQtPwqO7sWGcm+Sybmhu8MpBsM8DlO3+YTKnXbKA6SDz/+q14q1wK3UA8lHJyfR+v+GPxfUSemg==", - "dependencies": { - "@types/prosemirror-commands": "*", - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*", - "@types/prosemirror-view": "*" - } - }, - "node_modules/@types/prosemirror-model": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@types/prosemirror-model/-/prosemirror-model-1.16.2.tgz", - "integrity": "sha512-1XPJopkKP3oHSBP61uuSuW13DIDZPWvAzP6Pv2/6mixk8EBPUeRGIW548DjJTicMo23gEg1zvCZy9asblQdWag==", - "dependencies": { - "@types/orderedmap": "*" - } - }, - "node_modules/@types/prosemirror-schema-list": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-schema-list/-/prosemirror-schema-list-1.0.3.tgz", - "integrity": "sha512-uWybOf+M2Ea7rlbs0yLsS4YJYNGXYtn4N+w8HCw3Vvfl6wBAROzlMt0gV/D/VW/7J/LlAjwMezuGe8xi24HzXA==", - "dependencies": { - "@types/orderedmap": "*", - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, - "node_modules/@types/prosemirror-state": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.3.0.tgz", - "integrity": "sha512-nMdUF6w8B++NH4V54X+4GvDty7M02UfuHQW0s1AS25Z4ZrOW4RSY2+s57doXBbeMSjzYV/QoMxCY2sT3KQ2VdQ==", - "dependencies": { - "@types/prosemirror-model": "*", - "@types/prosemirror-transform": "*", - "@types/prosemirror-view": "*" - } - }, - "node_modules/@types/prosemirror-transform": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@types/prosemirror-transform/-/prosemirror-transform-1.4.0.tgz", - "integrity": "sha512-ntfuTl9nJWHvFykCmqJj4YQMws6G5H9nBaxHW0xRqfTxDxUvX2bCloqRN7bQTWg9h3VSP2lx45UuET1fn/oQ9Q==", - "dependencies": { - "@types/prosemirror-model": "*" - } - }, - "node_modules/@types/prosemirror-view": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.23.3.tgz", - "integrity": "sha512-T5dPDmZiXAazJVSvnx55D6h4mcpiH2q2wTyO9zIeOdox5zx964+zcDl9dFNaXG3qCGlERwMPckhBZL1HCxyygw==", - "dependencies": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*", - "@types/prosemirror-transform": "*" - } - }, "node_modules/@types/react": { "version": "18.0.9", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz", @@ -13592,9 +13494,9 @@ } }, "node_modules/prosemirror-commands": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.2.2.tgz", - "integrity": "sha512-TX+KpWudMon06frryfpO/u7hsQv2hu8L4VSVbCpi3/7wXHBgl+35mV85qfa3RpT8xD2f3MdeoTqH0vy5JdbXPg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.3.0.tgz", + "integrity": "sha512-BwBbZ5OAScPcm0x7H8SPbqjuEJnCU2RJT9LDyOiiIl/3NbL1nJZI4SFNHwU2e/tRr2Xe7JsptpzseqvZvToLBQ==", "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", @@ -13602,9 +13504,9 @@ } }, "node_modules/prosemirror-dropcursor": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.4.0.tgz", - "integrity": "sha512-6+YwTjmqDwlA/Dm+5wK67ezgqgjA/MhSDgaNxKUzH97SmeuWFXyLeDRxxOPZeSo7yTxcDGUCWTEjmQZsVBuMrQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.5.0.tgz", + "integrity": "sha512-vy7i77ddKyXlu8kKBB3nlxLBnsWyKUmQIPB5x8RkYNh01QNp/qqGmdd5yZefJs0s3rtv5r7Izfu2qbtr+tYAMQ==", "dependencies": { "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.1.0", @@ -13612,9 +13514,9 @@ } }, "node_modules/prosemirror-gapcursor": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.2.2.tgz", - "integrity": "sha512-7YzuRBbu9W7HGQde84kCHfIjaRLNcAdeijbgqrm/R9dsdTWkV+rrdcmic/sCc+bptiNpvjCEE+R6hrbT8zFQeQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.0.tgz", + "integrity": "sha512-9Tdx83xB2W4Oqchm12FtCkSizbqvi64cjs1I9TRPblqdA5TUWoVZ4ZI+t71Jh6HSEh4cDMPzx3UwfryJtKlb/w==", "dependencies": { "prosemirror-keymap": "^1.0.0", "prosemirror-model": "^1.0.0", @@ -13623,9 +13525,9 @@ } }, "node_modules/prosemirror-history": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.2.0.tgz", - "integrity": "sha512-B9v9xtf4fYbKxQwIr+3wtTDNLDZcmMMmGiI3TAPShnUzvo+Rmv1GiUrsQChY1meetHl7rhML2cppF3FTs7f7UQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.3.0.tgz", + "integrity": "sha512-qo/9Wn4B/Bq89/YD+eNWFbAytu6dmIM85EhID+fz9Jcl9+DfGEo8TTSrRhP15+fFEoaPqpHSxlvSzSEbmlxlUA==", "dependencies": { "prosemirror-state": "^1.2.2", "prosemirror-transform": "^1.0.0", @@ -13633,35 +13535,36 @@ } }, "node_modules/prosemirror-keymap": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.5.tgz", - "integrity": "sha512-8SZgPH3K+GLsHL2wKuwBD9rxhsbnVBTwpHCO4VUO5GmqUQlxd/2GtBVWTsyLq4Dp3N9nGgPd3+lZFKUDuVp+Vw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.0.tgz", + "integrity": "sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==", "dependencies": { "prosemirror-state": "^1.0.0", "w3c-keyname": "^2.2.0" } }, "node_modules/prosemirror-model": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.16.1.tgz", - "integrity": "sha512-r1/w0HDU40TtkXp0DyKBnFPYwd8FSlUSJmGCGFv4DeynfeSlyQF2FD0RQbVEMOe6P3PpUSXM6LZBV7W/YNZ4mA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.17.0.tgz", + "integrity": "sha512-RJBDgZs/W26yyx1itrk5b3H9FxIro3K7Xjc2QWJI99Gu1nxYAnIggqI3fIOD8Jd/6QZfM+t6elZFJPycVexMTA==", "dependencies": { "orderedmap": "^1.1.0" } }, "node_modules/prosemirror-schema-list": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.6.tgz", - "integrity": "sha512-aFGEdaCWmJzouZ8DwedmvSsL50JpRkqhQ6tcpThwJONVVmCgI36LJHtoQ4VGZbusMavaBhXXr33zyD2IVsTlkw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.2.0.tgz", + "integrity": "sha512-8PT/9xOx1HHdC7fDNNfhQ50Z8Mzu7nKyA1KCDltSpcZVZIbB0k7KtsHrnXyuIhbLlScoymBiLZ00c5MH6wdFsA==", "dependencies": { "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.0.0" } }, "node_modules/prosemirror-state": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.3.4.tgz", - "integrity": "sha512-Xkkrpd1y/TQ6HKzN3agsQIGRcLckUMA9u3j207L04mt8ToRgpGeyhbVv0HI7omDORIBHjR29b7AwlATFFf2GLA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.0.tgz", + "integrity": "sha512-mVDZdjNX/YT5FvypiwbphJe9psA5h+j9apsSszVRFc6oKFoIInvzdujh8QW9f9lwHtSYajLxNiM1hPhd0Sl1XA==", "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" @@ -13680,17 +13583,17 @@ } }, "node_modules/prosemirror-transform": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.4.2.tgz", - "integrity": "sha512-bcIsf3uRZhfab0xRfyyxOEh6eqSszq/hJbDbmUumFnbHBoWhB/uXbpz6vvUxfk0XiEvrZDJ+5pXRrNDc1Hu3vQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.6.0.tgz", + "integrity": "sha512-MAp7AjsjEGEqQY0sSMufNIUuEyB1ZR9Fqlm8dTwwWwpEJRv/plsKjWXBbx52q3Ml8MtaMcd7ic14zAHVB3WaMw==", "dependencies": { "prosemirror-model": "^1.0.0" } }, "node_modules/prosemirror-view": { - "version": "1.23.13", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.23.13.tgz", - "integrity": "sha512-X/NcwZv8pgcEWfs3n++Wz4nDgqDIeDvJ9kfCk6DCoC9XUlDekqJLFt9wCcCUBXedb8hs/dmd+JmcaLgbr67XZw==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.25.0.tgz", + "integrity": "sha512-9eJ7VYOqUl/l2P3Q126PoUhfrWAGF0GU4zHXZssbVnhqLZBKpHTcTYx1W9DMg1PCuS69sHLMJdm3UFHmD5SGdw==", "dependencies": { "prosemirror-model": "^1.16.0", "prosemirror-state": "^1.0.0", @@ -17103,20 +17006,13 @@ "version": "2.0.0-beta.176", "license": "MIT", "dependencies": { - "@types/prosemirror-commands": "^1.0.4", - "@types/prosemirror-keymap": "^1.0.4", - "@types/prosemirror-model": "^1.16.0", - "@types/prosemirror-schema-list": "^1.0.3", - "@types/prosemirror-state": "^1.2.8", - "@types/prosemirror-transform": "^1.1.5", - "@types/prosemirror-view": "^1.23.1", - "prosemirror-commands": "^1.2.1", - "prosemirror-keymap": "^1.1.5", - "prosemirror-model": "^1.16.1", - "prosemirror-schema-list": "^1.1.6", - "prosemirror-state": "^1.3.4", - "prosemirror-transform": "^1.3.3", - "prosemirror-view": "^1.23.6" + "prosemirror-commands": "^1.3.0", + "prosemirror-keymap": "^1.2.0", + "prosemirror-model": "^1.17.0", + "prosemirror-schema-list": "^1.2.0", + "prosemirror-state": "^1.4.0", + "prosemirror-transform": "^1.6.0", + "prosemirror-view": "^1.25.0" }, "funding": { "type": "github", @@ -17152,8 +17048,8 @@ "version": "2.0.0-beta.56", "license": "MIT", "dependencies": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "tippy.js": "^6.3.7" }, "funding": { @@ -17181,8 +17077,8 @@ "version": "2.0.0-beta.26", "license": "MIT", "dependencies": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" }, "funding": { "type": "github", @@ -17209,7 +17105,7 @@ "version": "2.0.0-beta.37", "license": "MIT", "dependencies": { - "prosemirror-state": "^1.3.4" + "prosemirror-state": "^1.4.0" }, "funding": { "type": "github", @@ -17227,9 +17123,9 @@ "@tiptap/extension-code-block": "^2.0.0-beta.37", "@types/lowlight": "^0.0.3", "lowlight": "^1.20.0", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "funding": { "type": "github", @@ -17244,7 +17140,7 @@ "version": "2.0.0-beta.33", "license": "MIT", "dependencies": { - "prosemirror-state": "^1.3.4", + "prosemirror-state": "^1.4.0", "y-prosemirror": "^1.0.14" }, "funding": { @@ -17300,8 +17196,7 @@ "version": "2.0.0-beta.25", "license": "MIT", "dependencies": { - "@types/prosemirror-dropcursor": "^1.0.3", - "prosemirror-dropcursor": "^1.4.0" + "prosemirror-dropcursor": "^1.5.0" }, "funding": { "type": "github", @@ -17316,8 +17211,8 @@ "version": "2.0.0-beta.51", "license": "MIT", "dependencies": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "tippy.js": "^6.3.7" }, "funding": { @@ -17333,8 +17228,8 @@ "version": "2.0.0-beta.40", "license": "MIT", "dependencies": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "funding": { "type": "github", @@ -17362,8 +17257,7 @@ "version": "2.0.0-beta.34", "license": "MIT", "dependencies": { - "@types/prosemirror-gapcursor": "^1.0.4", - "prosemirror-gapcursor": "^1.2.1" + "prosemirror-gapcursor": "^1.3.0" }, "funding": { "type": "github", @@ -17414,8 +17308,7 @@ "version": "2.0.0-beta.21", "license": "MIT", "dependencies": { - "@types/prosemirror-history": "^1.0.3", - "prosemirror-history": "^1.2.0" + "prosemirror-history": "^1.3.0" }, "funding": { "type": "github", @@ -17430,7 +17323,7 @@ "version": "2.0.0-beta.31", "license": "MIT", "dependencies": { - "prosemirror-state": "^1.3.4" + "prosemirror-state": "^1.4.0" }, "funding": { "type": "github", @@ -17470,8 +17363,8 @@ "license": "MIT", "dependencies": { "linkifyjs": "^3.0.5", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" }, "funding": { "type": "github", @@ -17499,8 +17392,8 @@ "license": "MIT", "dependencies": { "@tiptap/suggestion": "^2.0.0-beta.92", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" }, "funding": { "type": "github", @@ -17539,9 +17432,9 @@ "version": "2.0.0-beta.48", "license": "MIT", "dependencies": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "funding": { "type": "github", @@ -17592,12 +17485,10 @@ "version": "2.0.0-beta.49", "license": "MIT", "dependencies": { - "@types/prosemirror-model": "^1.16.0", - "@types/prosemirror-state": "^1.2.8", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", "prosemirror-tables": "^1.1.1", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" }, "funding": { "type": "github", @@ -17653,7 +17544,7 @@ }, "peerDependencies": { "@tiptap/core": "^2.0.0-beta.1", - "prosemirror-model": "^1.16.1" + "prosemirror-model": "^1.17.0" } }, "packages/extension-task-list": { @@ -17734,7 +17625,7 @@ "license": "MIT", "dependencies": { "@tiptap/core": "^2.0.0-beta.176", - "prosemirror-model": "^1.16.1", + "prosemirror-model": "^1.17.0", "zeed-dom": "^0.9.19" }, "funding": { @@ -17749,7 +17640,7 @@ "dependencies": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" }, "devDependencies": { "@types/react": "^18.0.1", @@ -17802,15 +17693,11 @@ "version": "2.0.0-beta.92", "license": "MIT", "dependencies": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" - }, - "devDependencies": { - "@types/prosemirror-model": "^1.16.1", - "@types/prosemirror-state": "^1.2.8", - "@types/prosemirror-view": "^1.23.1" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, + "devDependencies": {}, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -17826,7 +17713,7 @@ "dependencies": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" }, "devDependencies": { "vue": "^2.6.0" @@ -17852,8 +17739,8 @@ "dependencies": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "devDependencies": { "vue": "^3.0.0" @@ -21113,20 +21000,13 @@ "@tiptap/core": { "version": "file:packages/core", "requires": { - "@types/prosemirror-commands": "^1.0.4", - "@types/prosemirror-keymap": "^1.0.4", - "@types/prosemirror-model": "^1.16.0", - "@types/prosemirror-schema-list": "^1.0.3", - "@types/prosemirror-state": "^1.2.8", - "@types/prosemirror-transform": "^1.1.5", - "@types/prosemirror-view": "^1.23.1", - "prosemirror-commands": "^1.2.1", - "prosemirror-keymap": "^1.1.5", - "prosemirror-model": "^1.16.1", - "prosemirror-schema-list": "^1.1.6", - "prosemirror-state": "^1.3.4", - "prosemirror-transform": "^1.3.3", - "prosemirror-view": "^1.23.6" + "prosemirror-commands": "^1.3.0", + "prosemirror-keymap": "^1.2.0", + "prosemirror-model": "^1.17.0", + "prosemirror-schema-list": "^1.2.0", + "prosemirror-state": "^1.4.0", + "prosemirror-transform": "^1.6.0", + "prosemirror-view": "^1.25.0" } }, "@tiptap/extension-blockquote": { @@ -21140,8 +21020,8 @@ "@tiptap/extension-bubble-menu": { "version": "file:packages/extension-bubble-menu", "requires": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "tippy.js": "^6.3.7" } }, @@ -21152,8 +21032,8 @@ "@tiptap/extension-character-count": { "version": "file:packages/extension-character-count", "requires": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" } }, "@tiptap/extension-code": { @@ -21163,7 +21043,7 @@ "@tiptap/extension-code-block": { "version": "file:packages/extension-code-block", "requires": { - "prosemirror-state": "^1.3.4" + "prosemirror-state": "^1.4.0" } }, "@tiptap/extension-code-block-lowlight": { @@ -21172,15 +21052,15 @@ "@tiptap/extension-code-block": "^2.0.0-beta.37", "@types/lowlight": "^0.0.3", "lowlight": "^1.20.0", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" } }, "@tiptap/extension-collaboration": { "version": "file:packages/extension-collaboration", "requires": { - "prosemirror-state": "^1.3.4", + "prosemirror-state": "^1.4.0", "y-prosemirror": "^1.0.14" } }, @@ -21201,23 +21081,22 @@ "@tiptap/extension-dropcursor": { "version": "file:packages/extension-dropcursor", "requires": { - "@types/prosemirror-dropcursor": "^1.0.3", - "prosemirror-dropcursor": "^1.4.0" + "prosemirror-dropcursor": "^1.5.0" } }, "@tiptap/extension-floating-menu": { "version": "file:packages/extension-floating-menu", "requires": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "tippy.js": "^6.3.7" } }, "@tiptap/extension-focus": { "version": "file:packages/extension-focus", "requires": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" } }, "@tiptap/extension-font-family": { @@ -21227,8 +21106,7 @@ "@tiptap/extension-gapcursor": { "version": "file:packages/extension-gapcursor", "requires": { - "@types/prosemirror-gapcursor": "^1.0.4", - "prosemirror-gapcursor": "^1.2.1" + "prosemirror-gapcursor": "^1.3.0" } }, "@tiptap/extension-hard-break": { @@ -21246,14 +21124,13 @@ "@tiptap/extension-history": { "version": "file:packages/extension-history", "requires": { - "@types/prosemirror-history": "^1.0.3", - "prosemirror-history": "^1.2.0" + "prosemirror-history": "^1.3.0" } }, "@tiptap/extension-horizontal-rule": { "version": "file:packages/extension-horizontal-rule", "requires": { - "prosemirror-state": "^1.3.4" + "prosemirror-state": "^1.4.0" } }, "@tiptap/extension-image": { @@ -21268,8 +21145,8 @@ "version": "file:packages/extension-link", "requires": { "linkifyjs": "^3.0.5", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" } }, "@tiptap/extension-list-item": { @@ -21280,8 +21157,8 @@ "version": "file:packages/extension-mention", "requires": { "@tiptap/suggestion": "^2.0.0-beta.92", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" } }, "@tiptap/extension-ordered-list": { @@ -21295,9 +21172,9 @@ "@tiptap/extension-placeholder": { "version": "file:packages/extension-placeholder", "requires": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" } }, "@tiptap/extension-strike": { @@ -21315,12 +21192,10 @@ "@tiptap/extension-table": { "version": "file:packages/extension-table", "requires": { - "@types/prosemirror-model": "^1.16.0", - "@types/prosemirror-state": "^1.2.8", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", "prosemirror-tables": "^1.1.1", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" } }, "@tiptap/extension-table-cell": { @@ -21367,7 +21242,7 @@ "version": "file:packages/html", "requires": { "@tiptap/core": "^2.0.0-beta.176", - "prosemirror-model": "^1.16.1", + "prosemirror-model": "^1.17.0", "zeed-dom": "^0.9.19" } }, @@ -21378,7 +21253,7 @@ "@tiptap/extension-floating-menu": "^2.0.0-beta.51", "@types/react": "^18.0.1", "@types/react-dom": "^18.0.0", - "prosemirror-view": "^1.23.6", + "prosemirror-view": "^1.25.0", "react": "^18.0.0", "react-dom": "^18.0.0" } @@ -21410,12 +21285,9 @@ "@tiptap/suggestion": { "version": "file:packages/suggestion", "requires": { - "@types/prosemirror-model": "^1.16.1", - "@types/prosemirror-state": "^1.2.8", - "@types/prosemirror-view": "^1.23.1", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" } }, "@tiptap/vue-2": { @@ -21423,7 +21295,7 @@ "requires": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-view": "^1.23.6", + "prosemirror-view": "^1.25.0", "vue": "^2.6.0" }, "dependencies": { @@ -21438,8 +21310,8 @@ "requires": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "vue": "^3.0.0" } }, @@ -21516,11 +21388,6 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "@types/orderedmap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/orderedmap/-/orderedmap-1.0.0.tgz", - "integrity": "sha512-dxKo80TqYx3YtBipHwA/SdFmMMyLCnP+5mkEqN0eMjcTBzHkiiX0ES118DsjDBjvD+zeSsSU9jULTZ+frog+Gw==" - }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -21533,99 +21400,6 @@ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", "dev": true }, - "@types/prosemirror-commands": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-commands/-/prosemirror-commands-1.0.4.tgz", - "integrity": "sha512-utDNYB3EXLjAfYIcRWJe6pn3kcQ5kG4RijbT/0Y/TFOm6yhvYS/D9eJVnijdg9LDjykapcezchxGRqFD5LcyaQ==", - "requires": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*", - "@types/prosemirror-view": "*" - } - }, - "@types/prosemirror-dropcursor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-dropcursor/-/prosemirror-dropcursor-1.0.3.tgz", - "integrity": "sha512-b0/8njnJ4lwyHKcGuCMf3x7r1KjxyugB1R/c2iMCjplsJHSC7UY9+OysqgJR5uUXRekUSGniiLgBtac/lvH6wg==", - "requires": { - "@types/prosemirror-state": "*" - } - }, - "@types/prosemirror-gapcursor": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-gapcursor/-/prosemirror-gapcursor-1.0.4.tgz", - "integrity": "sha512-9xKjFIG5947dzerFvkLWp6F53JwrUYoYwh3SgcTFEp8SbSfNNrez/PFYVZKPnoqPoaK5WtTdQTaMwpCV9rXQIg==", - "requires": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, - "@types/prosemirror-history": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-history/-/prosemirror-history-1.0.3.tgz", - "integrity": "sha512-5TloMDRavgLjOAKXp1Li8u0xcsspzbT1Cm9F2pwHOkgvQOz1jWQb2VIXO7RVNsFjLBZdIXlyfSLivro3DuMWXg==", - "requires": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, - "@types/prosemirror-keymap": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz", - "integrity": "sha512-ycevwkqUh+jEQtPwqO7sWGcm+Sybmhu8MpBsM8DlO3+YTKnXbKA6SDz/+q14q1wK3UA8lHJyfR+v+GPxfUSemg==", - "requires": { - "@types/prosemirror-commands": "*", - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*", - "@types/prosemirror-view": "*" - } - }, - "@types/prosemirror-model": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@types/prosemirror-model/-/prosemirror-model-1.16.2.tgz", - "integrity": "sha512-1XPJopkKP3oHSBP61uuSuW13DIDZPWvAzP6Pv2/6mixk8EBPUeRGIW548DjJTicMo23gEg1zvCZy9asblQdWag==", - "requires": { - "@types/orderedmap": "*" - } - }, - "@types/prosemirror-schema-list": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-schema-list/-/prosemirror-schema-list-1.0.3.tgz", - "integrity": "sha512-uWybOf+M2Ea7rlbs0yLsS4YJYNGXYtn4N+w8HCw3Vvfl6wBAROzlMt0gV/D/VW/7J/LlAjwMezuGe8xi24HzXA==", - "requires": { - "@types/orderedmap": "*", - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, - "@types/prosemirror-state": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.3.0.tgz", - "integrity": "sha512-nMdUF6w8B++NH4V54X+4GvDty7M02UfuHQW0s1AS25Z4ZrOW4RSY2+s57doXBbeMSjzYV/QoMxCY2sT3KQ2VdQ==", - "requires": { - "@types/prosemirror-model": "*", - "@types/prosemirror-transform": "*", - "@types/prosemirror-view": "*" - } - }, - "@types/prosemirror-transform": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@types/prosemirror-transform/-/prosemirror-transform-1.4.0.tgz", - "integrity": "sha512-ntfuTl9nJWHvFykCmqJj4YQMws6G5H9nBaxHW0xRqfTxDxUvX2bCloqRN7bQTWg9h3VSP2lx45UuET1fn/oQ9Q==", - "requires": { - "@types/prosemirror-model": "*" - } - }, - "@types/prosemirror-view": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.23.3.tgz", - "integrity": "sha512-T5dPDmZiXAazJVSvnx55D6h4mcpiH2q2wTyO9zIeOdox5zx964+zcDl9dFNaXG3qCGlERwMPckhBZL1HCxyygw==", - "requires": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*", - "@types/prosemirror-transform": "*" - } - }, "@types/react": { "version": "18.0.9", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz", @@ -28206,9 +27980,9 @@ } }, "prosemirror-commands": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.2.2.tgz", - "integrity": "sha512-TX+KpWudMon06frryfpO/u7hsQv2hu8L4VSVbCpi3/7wXHBgl+35mV85qfa3RpT8xD2f3MdeoTqH0vy5JdbXPg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.3.0.tgz", + "integrity": "sha512-BwBbZ5OAScPcm0x7H8SPbqjuEJnCU2RJT9LDyOiiIl/3NbL1nJZI4SFNHwU2e/tRr2Xe7JsptpzseqvZvToLBQ==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", @@ -28216,9 +27990,9 @@ } }, "prosemirror-dropcursor": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.4.0.tgz", - "integrity": "sha512-6+YwTjmqDwlA/Dm+5wK67ezgqgjA/MhSDgaNxKUzH97SmeuWFXyLeDRxxOPZeSo7yTxcDGUCWTEjmQZsVBuMrQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.5.0.tgz", + "integrity": "sha512-vy7i77ddKyXlu8kKBB3nlxLBnsWyKUmQIPB5x8RkYNh01QNp/qqGmdd5yZefJs0s3rtv5r7Izfu2qbtr+tYAMQ==", "requires": { "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.1.0", @@ -28226,9 +28000,9 @@ } }, "prosemirror-gapcursor": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.2.2.tgz", - "integrity": "sha512-7YzuRBbu9W7HGQde84kCHfIjaRLNcAdeijbgqrm/R9dsdTWkV+rrdcmic/sCc+bptiNpvjCEE+R6hrbT8zFQeQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.0.tgz", + "integrity": "sha512-9Tdx83xB2W4Oqchm12FtCkSizbqvi64cjs1I9TRPblqdA5TUWoVZ4ZI+t71Jh6HSEh4cDMPzx3UwfryJtKlb/w==", "requires": { "prosemirror-keymap": "^1.0.0", "prosemirror-model": "^1.0.0", @@ -28237,9 +28011,9 @@ } }, "prosemirror-history": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.2.0.tgz", - "integrity": "sha512-B9v9xtf4fYbKxQwIr+3wtTDNLDZcmMMmGiI3TAPShnUzvo+Rmv1GiUrsQChY1meetHl7rhML2cppF3FTs7f7UQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.3.0.tgz", + "integrity": "sha512-qo/9Wn4B/Bq89/YD+eNWFbAytu6dmIM85EhID+fz9Jcl9+DfGEo8TTSrRhP15+fFEoaPqpHSxlvSzSEbmlxlUA==", "requires": { "prosemirror-state": "^1.2.2", "prosemirror-transform": "^1.0.0", @@ -28247,35 +28021,36 @@ } }, "prosemirror-keymap": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.5.tgz", - "integrity": "sha512-8SZgPH3K+GLsHL2wKuwBD9rxhsbnVBTwpHCO4VUO5GmqUQlxd/2GtBVWTsyLq4Dp3N9nGgPd3+lZFKUDuVp+Vw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.0.tgz", + "integrity": "sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==", "requires": { "prosemirror-state": "^1.0.0", "w3c-keyname": "^2.2.0" } }, "prosemirror-model": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.16.1.tgz", - "integrity": "sha512-r1/w0HDU40TtkXp0DyKBnFPYwd8FSlUSJmGCGFv4DeynfeSlyQF2FD0RQbVEMOe6P3PpUSXM6LZBV7W/YNZ4mA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.17.0.tgz", + "integrity": "sha512-RJBDgZs/W26yyx1itrk5b3H9FxIro3K7Xjc2QWJI99Gu1nxYAnIggqI3fIOD8Jd/6QZfM+t6elZFJPycVexMTA==", "requires": { "orderedmap": "^1.1.0" } }, "prosemirror-schema-list": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.6.tgz", - "integrity": "sha512-aFGEdaCWmJzouZ8DwedmvSsL50JpRkqhQ6tcpThwJONVVmCgI36LJHtoQ4VGZbusMavaBhXXr33zyD2IVsTlkw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.2.0.tgz", + "integrity": "sha512-8PT/9xOx1HHdC7fDNNfhQ50Z8Mzu7nKyA1KCDltSpcZVZIbB0k7KtsHrnXyuIhbLlScoymBiLZ00c5MH6wdFsA==", "requires": { "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.0.0" } }, "prosemirror-state": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.3.4.tgz", - "integrity": "sha512-Xkkrpd1y/TQ6HKzN3agsQIGRcLckUMA9u3j207L04mt8ToRgpGeyhbVv0HI7omDORIBHjR29b7AwlATFFf2GLA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.0.tgz", + "integrity": "sha512-mVDZdjNX/YT5FvypiwbphJe9psA5h+j9apsSszVRFc6oKFoIInvzdujh8QW9f9lwHtSYajLxNiM1hPhd0Sl1XA==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" @@ -28294,17 +28069,17 @@ } }, "prosemirror-transform": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.4.2.tgz", - "integrity": "sha512-bcIsf3uRZhfab0xRfyyxOEh6eqSszq/hJbDbmUumFnbHBoWhB/uXbpz6vvUxfk0XiEvrZDJ+5pXRrNDc1Hu3vQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.6.0.tgz", + "integrity": "sha512-MAp7AjsjEGEqQY0sSMufNIUuEyB1ZR9Fqlm8dTwwWwpEJRv/plsKjWXBbx52q3Ml8MtaMcd7ic14zAHVB3WaMw==", "requires": { "prosemirror-model": "^1.0.0" } }, "prosemirror-view": { - "version": "1.23.13", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.23.13.tgz", - "integrity": "sha512-X/NcwZv8pgcEWfs3n++Wz4nDgqDIeDvJ9kfCk6DCoC9XUlDekqJLFt9wCcCUBXedb8hs/dmd+JmcaLgbr67XZw==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.25.0.tgz", + "integrity": "sha512-9eJ7VYOqUl/l2P3Q126PoUhfrWAGF0GU4zHXZssbVnhqLZBKpHTcTYx1W9DMg1PCuS69sHLMJdm3UFHmD5SGdw==", "requires": { "prosemirror-model": "^1.16.0", "prosemirror-state": "^1.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index f958b3e5bab..1b44ef95f11 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -24,20 +24,13 @@ "dist" ], "dependencies": { - "@types/prosemirror-commands": "^1.0.4", - "@types/prosemirror-keymap": "^1.0.4", - "@types/prosemirror-model": "^1.16.0", - "@types/prosemirror-schema-list": "^1.0.3", - "@types/prosemirror-state": "^1.2.8", - "@types/prosemirror-transform": "^1.1.5", - "@types/prosemirror-view": "^1.23.1", - "prosemirror-commands": "^1.2.1", - "prosemirror-keymap": "^1.1.5", - "prosemirror-model": "^1.16.1", - "prosemirror-schema-list": "^1.1.6", - "prosemirror-state": "^1.3.4", - "prosemirror-transform": "^1.3.3", - "prosemirror-view": "^1.23.6" + "prosemirror-commands": "^1.3.0", + "prosemirror-keymap": "^1.2.0", + "prosemirror-model": "^1.17.0", + "prosemirror-schema-list": "^1.2.0", + "prosemirror-state": "^1.4.0", + "prosemirror-transform": "^1.6.0", + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", @@ -45,4 +38,4 @@ "directory": "packages/core" }, "sideEffects": false -} +} \ No newline at end of file diff --git a/packages/core/src/Editor.ts b/packages/core/src/Editor.ts index a3c2984555b..ce99a89c7af 100644 --- a/packages/core/src/Editor.ts +++ b/packages/core/src/Editor.ts @@ -197,7 +197,7 @@ export class Editor extends EventEmitter { */ public registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): void { const plugins = isFunction(handlePlugins) - ? handlePlugins(plugin, this.state.plugins) + ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin] const state = this.state.reconfigure({ plugins }) @@ -270,7 +270,7 @@ export class Editor extends EventEmitter { dispatchTransaction: this.dispatchTransaction.bind(this), state: EditorState.create({ doc, - selection, + selection: selection || undefined, }), }) diff --git a/packages/extension-bubble-menu/package.json b/packages/extension-bubble-menu/package.json index 3a2630aed46..8cc7d57ed3f 100644 --- a/packages/extension-bubble-menu/package.json +++ b/packages/extension-bubble-menu/package.json @@ -24,8 +24,8 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "tippy.js": "^6.3.7" }, "repository": { @@ -34,4 +34,4 @@ "directory": "packages/extension-bubble-menu" }, "sideEffects": false -} +} \ No newline at end of file diff --git a/packages/extension-character-count/package.json b/packages/extension-character-count/package.json index 1ffde26f136..89a5b98e284 100644 --- a/packages/extension-character-count/package.json +++ b/packages/extension-character-count/package.json @@ -24,12 +24,12 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-character-count" } -} +} \ No newline at end of file diff --git a/packages/extension-code-block-lowlight/package.json b/packages/extension-code-block-lowlight/package.json index b3c2b2eafc5..415aa014bbe 100644 --- a/packages/extension-code-block-lowlight/package.json +++ b/packages/extension-code-block-lowlight/package.json @@ -27,13 +27,13 @@ "@tiptap/extension-code-block": "^2.0.0-beta.37", "@types/lowlight": "^0.0.3", "lowlight": "^1.20.0", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-code-block-lowlight" } -} +} \ No newline at end of file diff --git a/packages/extension-code-block/package.json b/packages/extension-code-block/package.json index b2b93ce8a04..47028f76976 100644 --- a/packages/extension-code-block/package.json +++ b/packages/extension-code-block/package.json @@ -24,11 +24,11 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-state": "^1.3.4" + "prosemirror-state": "^1.4.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-code-block" } -} +} \ No newline at end of file diff --git a/packages/extension-collaboration/package.json b/packages/extension-collaboration/package.json index 373c92798ee..939f7c12e67 100644 --- a/packages/extension-collaboration/package.json +++ b/packages/extension-collaboration/package.json @@ -24,7 +24,7 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-state": "^1.3.4", + "prosemirror-state": "^1.4.0", "y-prosemirror": "^1.0.14" }, "repository": { @@ -32,4 +32,4 @@ "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-collaboration" } -} +} \ No newline at end of file diff --git a/packages/extension-dropcursor/package.json b/packages/extension-dropcursor/package.json index 82eb6bf7913..b4b14c67992 100644 --- a/packages/extension-dropcursor/package.json +++ b/packages/extension-dropcursor/package.json @@ -24,12 +24,11 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "@types/prosemirror-dropcursor": "^1.0.3", - "prosemirror-dropcursor": "^1.4.0" + "prosemirror-dropcursor": "^1.5.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-dropcursor" } -} +} \ No newline at end of file diff --git a/packages/extension-floating-menu/package.json b/packages/extension-floating-menu/package.json index 326983543d6..f7a78c578dc 100644 --- a/packages/extension-floating-menu/package.json +++ b/packages/extension-floating-menu/package.json @@ -24,8 +24,8 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0", "tippy.js": "^6.3.7" }, "repository": { @@ -34,4 +34,4 @@ "directory": "packages/extension-floating-menu" }, "sideEffects": false -} +} \ No newline at end of file diff --git a/packages/extension-focus/package.json b/packages/extension-focus/package.json index 10f2a0b14ce..b67db00dfaa 100644 --- a/packages/extension-focus/package.json +++ b/packages/extension-focus/package.json @@ -24,12 +24,12 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-focus" } -} +} \ No newline at end of file diff --git a/packages/extension-gapcursor/package.json b/packages/extension-gapcursor/package.json index 2977c7dda5d..0d2c0f1edaf 100644 --- a/packages/extension-gapcursor/package.json +++ b/packages/extension-gapcursor/package.json @@ -24,12 +24,11 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "@types/prosemirror-gapcursor": "^1.0.4", - "prosemirror-gapcursor": "^1.2.1" + "prosemirror-gapcursor": "^1.3.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-gapcursor" } -} +} \ No newline at end of file diff --git a/packages/extension-history/package.json b/packages/extension-history/package.json index d04f7266852..c9c1a9ffd4b 100644 --- a/packages/extension-history/package.json +++ b/packages/extension-history/package.json @@ -24,12 +24,11 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "@types/prosemirror-history": "^1.0.3", - "prosemirror-history": "^1.2.0" + "prosemirror-history": "^1.3.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-history" } -} +} \ No newline at end of file diff --git a/packages/extension-horizontal-rule/package.json b/packages/extension-horizontal-rule/package.json index 13466a98b65..69662203e08 100644 --- a/packages/extension-horizontal-rule/package.json +++ b/packages/extension-horizontal-rule/package.json @@ -24,11 +24,11 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-state": "^1.3.4" + "prosemirror-state": "^1.4.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-horizontal-rule" } -} +} \ No newline at end of file diff --git a/packages/extension-link/package.json b/packages/extension-link/package.json index f9645ded92a..4c21bdd022b 100644 --- a/packages/extension-link/package.json +++ b/packages/extension-link/package.json @@ -25,12 +25,12 @@ }, "dependencies": { "linkifyjs": "^3.0.5", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-link" } -} +} \ No newline at end of file diff --git a/packages/extension-mention/package.json b/packages/extension-mention/package.json index e34b6f042a2..8b24efd21c2 100644 --- a/packages/extension-mention/package.json +++ b/packages/extension-mention/package.json @@ -25,12 +25,12 @@ }, "dependencies": { "@tiptap/suggestion": "^2.0.0-beta.92", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-mention" } -} +} \ No newline at end of file diff --git a/packages/extension-placeholder/package.json b/packages/extension-placeholder/package.json index 949fd44bf04..29c63661b1a 100644 --- a/packages/extension-placeholder/package.json +++ b/packages/extension-placeholder/package.json @@ -24,13 +24,13 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-placeholder" } -} +} \ No newline at end of file diff --git a/packages/extension-table/package.json b/packages/extension-table/package.json index cf2f2399426..2169f5ed3dd 100644 --- a/packages/extension-table/package.json +++ b/packages/extension-table/package.json @@ -24,16 +24,14 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "@types/prosemirror-model": "^1.16.0", - "@types/prosemirror-state": "^1.2.8", - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", "prosemirror-tables": "^1.1.1", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-table" } -} +} \ No newline at end of file diff --git a/packages/extension-task-item/package.json b/packages/extension-task-item/package.json index ef140eed6d8..4404312c910 100644 --- a/packages/extension-task-item/package.json +++ b/packages/extension-task-item/package.json @@ -22,11 +22,11 @@ ], "peerDependencies": { "@tiptap/core": "^2.0.0-beta.1", - "prosemirror-model": "^1.16.1" + "prosemirror-model": "^1.17.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-task-item" } -} +} \ No newline at end of file diff --git a/packages/html/package.json b/packages/html/package.json index 515c8ac87de..2fb049a6984 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -22,7 +22,7 @@ ], "dependencies": { "@tiptap/core": "^2.0.0-beta.176", - "prosemirror-model": "^1.16.1", + "prosemirror-model": "^1.17.0", "zeed-dom": "^0.9.19" }, "repository": { @@ -30,4 +30,4 @@ "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/html" } -} +} \ No newline at end of file diff --git a/packages/react/package.json b/packages/react/package.json index 1613fcc2ae5..11fa5602802 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -34,7 +34,7 @@ "dependencies": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", @@ -42,4 +42,4 @@ "directory": "packages/react" }, "sideEffects": false -} +} \ No newline at end of file diff --git a/packages/suggestion/package.json b/packages/suggestion/package.json index 78f179eb135..94269d8c1a8 100644 --- a/packages/suggestion/package.json +++ b/packages/suggestion/package.json @@ -20,22 +20,18 @@ "src", "dist" ], - "devDependencies": { - "@types/prosemirror-model": "^1.16.1", - "@types/prosemirror-state": "^1.2.8", - "@types/prosemirror-view": "^1.23.1" - }, + "devDependencies": {}, "peerDependencies": { "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { - "prosemirror-model": "^1.16.1", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/suggestion" } -} +} \ No newline at end of file diff --git a/packages/vue-2/package.json b/packages/vue-2/package.json index a800736467d..a3e7cc488e1 100644 --- a/packages/vue-2/package.json +++ b/packages/vue-2/package.json @@ -30,7 +30,7 @@ "dependencies": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-view": "^1.23.6" + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", @@ -38,4 +38,4 @@ "directory": "packages/vue-2" }, "sideEffects": false -} +} \ No newline at end of file diff --git a/packages/vue-3/package.json b/packages/vue-3/package.json index 5fc7932e684..2039ceecc4c 100644 --- a/packages/vue-3/package.json +++ b/packages/vue-3/package.json @@ -30,8 +30,8 @@ "dependencies": { "@tiptap/extension-bubble-menu": "^2.0.0-beta.56", "@tiptap/extension-floating-menu": "^2.0.0-beta.51", - "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.23.6" + "prosemirror-state": "^1.4.0", + "prosemirror-view": "^1.25.0" }, "repository": { "type": "git", @@ -39,4 +39,4 @@ "directory": "packages/vue-3" }, "sideEffects": false -} +} \ No newline at end of file From bc1e7e83fde9c1f4725153b97d8b0024398e072b Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Tue, 7 Jun 2022 02:27:05 +0200 Subject: [PATCH 02/12] refactor: migrate to new typings from prosemirror --- packages/core/src/InputRule.ts | 2 +- packages/core/src/NodeView.ts | 13 +- packages/core/src/PasteRule.ts | 15 +- packages/core/src/extensions/tabindex.ts | 9 +- .../core/src/helpers/createChainableState.ts | 1 + packages/core/src/helpers/getMarkRange.ts | 11 +- packages/core/src/helpers/getTextBetween.ts | 19 ++- .../src/helpers/getTextContentFromNodes.ts | 2 +- .../src/lowlight-plugin.ts | 9 +- .../extension-dropcursor/src/dropcursor.ts | 11 +- .../extension-link/src/helpers/autolink.ts | 2 +- .../extension-placeholder/src/placeholder.ts | 7 +- packages/extension-subscript/src/subscript.ts | 1 + .../extension-superscript/src/superscript.ts | 1 + .../src/utilities/createCell.ts | 6 +- .../src/utilities/createTable.ts | 5 +- packages/html/src/getHTMLFromFragment.ts | 6 +- packages/react/src/ReactNodeViewRenderer.tsx | 152 +++++++++--------- packages/suggestion/src/suggestion.ts | 8 +- packages/vue-2/src/VueNodeViewRenderer.ts | 6 +- packages/vue-3/src/VueNodeViewRenderer.ts | 30 ++-- 21 files changed, 168 insertions(+), 148 deletions(-) diff --git a/packages/core/src/InputRule.ts b/packages/core/src/InputRule.ts index 0a6b85b1bc8..1ee86c61356 100644 --- a/packages/core/src/InputRule.ts +++ b/packages/core/src/InputRule.ts @@ -188,7 +188,7 @@ export function inputRulesPlugin(props: { editor: Editor, rules: InputRule[] }): return null }, apply(tr, prev) { - const stored = tr.getMeta(this) + const stored = tr.getMeta(plugin) if (stored) { return stored diff --git a/packages/core/src/NodeView.ts b/packages/core/src/NodeView.ts index 38b9d8703ff..183e7681a5c 100644 --- a/packages/core/src/NodeView.ts +++ b/packages/core/src/NodeView.ts @@ -1,10 +1,11 @@ -import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' -import { NodeSelection } from 'prosemirror-state' import { Node as ProseMirrorNode } from 'prosemirror-model' +import { NodeSelection } from 'prosemirror-state' +import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' + import { Editor as CoreEditor } from './Editor' import { Node } from './Node' +import { NodeViewRendererOptions, NodeViewRendererProps } from './types' import { isiOS } from './utilities/isiOS' -import { NodeViewRendererProps, NodeViewRendererOptions } from './types' export class NodeView< Component, @@ -48,11 +49,11 @@ export class NodeView< return } - get dom(): Element | null { - return null + get dom(): HTMLElement { + return this.editor.view.dom } - get contentDOM(): Element | null { + get contentDOM(): HTMLElement | null { return null } diff --git a/packages/core/src/PasteRule.ts b/packages/core/src/PasteRule.ts index 5e107674610..c68b385fe6e 100644 --- a/packages/core/src/PasteRule.ts +++ b/packages/core/src/PasteRule.ts @@ -1,16 +1,17 @@ import { EditorState, Plugin } from 'prosemirror-state' -import { Editor } from './Editor' + import { CommandManager } from './CommandManager' +import { Editor } from './Editor' import { createChainableState } from './helpers/createChainableState' -import { isRegExp } from './utilities/isRegExp' -import { isNumber } from './utilities/isNumber' import { - Range, + CanCommands, + ChainedCommands, ExtendedRegExpMatchArray, + Range, SingleCommands, - ChainedCommands, - CanCommands, } from './types' +import { isNumber } from './utilities/isNumber' +import { isRegExp } from './utilities/isRegExp' export type PasteRuleMatch = { index: number, @@ -190,7 +191,7 @@ export function pasteRulesPlugin(props: { editor: Editor, rules: PasteRule[] }): }, paste: (view, event) => { - const html = event.clipboardData?.getData('text/html') + const html = (event as ClipboardEvent).clipboardData?.getData('text/html') isPastedFromProseMirror = !!html?.includes('data-pm-slice') diff --git a/packages/core/src/extensions/tabindex.ts b/packages/core/src/extensions/tabindex.ts index 37751a733a0..47993f6ea33 100644 --- a/packages/core/src/extensions/tabindex.ts +++ b/packages/core/src/extensions/tabindex.ts @@ -1,4 +1,5 @@ import { Plugin, PluginKey } from 'prosemirror-state' + import { Extension } from '../Extension' export const Tabindex = Extension.create({ @@ -9,13 +10,7 @@ export const Tabindex = Extension.create({ new Plugin({ key: new PluginKey('tabindex'), props: { - attributes: () => { - if (this.editor.isEditable) { - return { - tabindex: '0', - } - } - }, + attributes: this.editor.isEditable ? { tabindex: '0' } : {}, }, }), ] diff --git a/packages/core/src/helpers/createChainableState.ts b/packages/core/src/helpers/createChainableState.ts index 2fda98099bb..b7411ec1c8c 100644 --- a/packages/core/src/helpers/createChainableState.ts +++ b/packages/core/src/helpers/createChainableState.ts @@ -13,6 +13,7 @@ export function createChainableState(config: { ...state, schema: state.schema, plugins: state.plugins, + filterTransaction: state.filterTransaction, apply: state.apply.bind(state), applyTransaction: state.applyTransaction.bind(state), reconfigure: state.reconfigure.bind(state), diff --git a/packages/core/src/helpers/getMarkRange.ts b/packages/core/src/helpers/getMarkRange.ts index 5119817e3de..cae24e60c1c 100644 --- a/packages/core/src/helpers/getMarkRange.ts +++ b/packages/core/src/helpers/getMarkRange.ts @@ -1,6 +1,7 @@ -import { Mark as ProseMirrorMark, MarkType, ResolvedPos } from 'prosemirror-model' -import { objectIncludes } from '../utilities/objectIncludes' +import { MarkType, Mark as ProseMirrorMark, ResolvedPos } from 'prosemirror-model' + import { Range } from '../types' +import { objectIncludes } from '../utilities/objectIncludes' function findMarkInSet( marks: ProseMirrorMark[], @@ -39,7 +40,7 @@ export function getMarkRange( return } - const mark = findMarkInSet(start.node.marks, type, attributes) + const mark = findMarkInSet([...start.node.marks], type, attributes) if (!mark) { return @@ -50,7 +51,7 @@ export function getMarkRange( let endIndex = startIndex + 1 let endPos = startPos + start.node.nodeSize - findMarkInSet(start.node.marks, type, attributes) + findMarkInSet([...start.node.marks], type, attributes) while (startIndex > 0 && mark.isInSet($pos.parent.child(startIndex - 1).marks)) { startIndex -= 1 @@ -59,7 +60,7 @@ export function getMarkRange( while ( endIndex < $pos.parent.childCount - && isMarkInSet($pos.parent.child(endIndex).marks, type, attributes) + && isMarkInSet([...$pos.parent.child(endIndex).marks], type, attributes) ) { endPos += $pos.parent.child(endIndex).nodeSize endIndex += 1 diff --git a/packages/core/src/helpers/getTextBetween.ts b/packages/core/src/helpers/getTextBetween.ts index 3780874e111..7fe09fe344f 100644 --- a/packages/core/src/helpers/getTextBetween.ts +++ b/packages/core/src/helpers/getTextBetween.ts @@ -1,6 +1,7 @@ -import { Range, TextSerializer } from '../types' import { Node as ProseMirrorNode } from 'prosemirror-model' +import { Range, TextSerializer } from '../types' + export function getTextBetween( startNode: ProseMirrorNode, range: Range, @@ -26,13 +27,15 @@ export function getTextBetween( separated = true } - text += textSerializer({ - node, - pos, - parent, - index, - range, - }) + if (parent) { + text += textSerializer({ + node, + pos, + parent, + index, + range, + }) + } } else if (node.isText) { text += node?.text?.slice(Math.max(from, pos) - pos, to - pos) separated = false diff --git a/packages/core/src/helpers/getTextContentFromNodes.ts b/packages/core/src/helpers/getTextContentFromNodes.ts index 03e94cee536..a0d54530eb7 100644 --- a/packages/core/src/helpers/getTextContentFromNodes.ts +++ b/packages/core/src/helpers/getTextContentFromNodes.ts @@ -1,6 +1,6 @@ import { ResolvedPos } from 'prosemirror-model' -export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => { +export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => { let textBefore = '' $from.parent.nodesBetween( diff --git a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts index 333d87fce59..be3015c8ef4 100644 --- a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts +++ b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts @@ -1,6 +1,7 @@ +import { Node as ProsemirrorNode } from 'prosemirror-model' import { Plugin, PluginKey } from 'prosemirror-state' import { Decoration, DecorationSet } from 'prosemirror-view' -import { Node as ProsemirrorNode } from 'prosemirror-model' + import { findChildren } from '@tiptap/core' function parseNodes(nodes: any[], className: string[] = []): { text: string, classes: string[] }[] { @@ -74,7 +75,7 @@ export function LowlightPlugin({ name, lowlight, defaultLanguage }: { name: stri throw Error('You should provide an instance of lowlight to use the code-block-lowlight extension') } - return new Plugin({ + const lowlightPlugin: Plugin = new Plugin({ key: new PluginKey('lowlight'), state: { @@ -129,8 +130,10 @@ export function LowlightPlugin({ name, lowlight, defaultLanguage }: { name: stri props: { decorations(state) { - return this.getState(state) + return lowlightPlugin.getState(state) }, }, }) + + return lowlightPlugin } diff --git a/packages/extension-dropcursor/src/dropcursor.ts b/packages/extension-dropcursor/src/dropcursor.ts index 303e43087a0..39b4d1b5957 100644 --- a/packages/extension-dropcursor/src/dropcursor.ts +++ b/packages/extension-dropcursor/src/dropcursor.ts @@ -1,10 +1,11 @@ -import { Extension } from '@tiptap/core' import { dropCursor } from 'prosemirror-dropcursor' +import { Extension } from '@tiptap/core' + export interface DropcursorOptions { - color: string | null, - width: number | null, - class: string | null, + color: string | undefined, + width: number | undefined, + class: string | undefined, } export const Dropcursor = Extension.create({ @@ -14,7 +15,7 @@ export const Dropcursor = Extension.create({ return { color: 'currentColor', width: 1, - class: null, + class: undefined, } }, diff --git a/packages/extension-link/src/helpers/autolink.ts b/packages/extension-link/src/helpers/autolink.ts index f413792bb53..43cb88e823c 100644 --- a/packages/extension-link/src/helpers/autolink.ts +++ b/packages/extension-link/src/helpers/autolink.ts @@ -27,7 +27,7 @@ export function autolink(options: AutolinkOptions): Plugin { } const { tr } = newState - const transform = combineTransactionSteps(oldState.doc, transactions) + const transform = combineTransactionSteps(oldState.doc, [...transactions]) const { mapping } = transform const changes = getChangedRanges(transform) diff --git a/packages/extension-placeholder/src/placeholder.ts b/packages/extension-placeholder/src/placeholder.ts index 1ecd8398c17..1daa84aab19 100644 --- a/packages/extension-placeholder/src/placeholder.ts +++ b/packages/extension-placeholder/src/placeholder.ts @@ -1,7 +1,8 @@ -import { Editor, Extension } from '@tiptap/core' import { Node as ProsemirrorNode } from 'prosemirror-model' -import { Decoration, DecorationSet } from 'prosemirror-view' import { Plugin } from 'prosemirror-state' +import { Decoration, DecorationSet } from 'prosemirror-view' + +import { Editor, Extension } from '@tiptap/core' export interface PlaceholderOptions { emptyEditorClass: string, @@ -41,7 +42,7 @@ export const Placeholder = Extension.create({ const decorations: Decoration[] = [] if (!active) { - return + return null } doc.descendants((node, pos) => { diff --git a/packages/extension-subscript/src/subscript.ts b/packages/extension-subscript/src/subscript.ts index 2861eeb6309..f28851c926a 100644 --- a/packages/extension-subscript/src/subscript.ts +++ b/packages/extension-subscript/src/subscript.ts @@ -46,6 +46,7 @@ export const Subscript = Mark.create({ } // If it falls through we’ll match, and this mark will be applied. + return null }, }, ] diff --git a/packages/extension-superscript/src/superscript.ts b/packages/extension-superscript/src/superscript.ts index f0b888e720b..d26bccaec57 100644 --- a/packages/extension-superscript/src/superscript.ts +++ b/packages/extension-superscript/src/superscript.ts @@ -46,6 +46,7 @@ export const Superscript = Mark.create({ } // If it falls through we’ll match, and this mark will be applied. + return null }, }, ] diff --git a/packages/extension-table/src/utilities/createCell.ts b/packages/extension-table/src/utilities/createCell.ts index 65d52df3133..b2507ff15b6 100644 --- a/packages/extension-table/src/utilities/createCell.ts +++ b/packages/extension-table/src/utilities/createCell.ts @@ -1,10 +1,10 @@ import { - NodeType, Fragment, + Fragment, + NodeType, Node as ProsemirrorNode, - Schema, } from 'prosemirror-model' -export function createCell(cellType: NodeType, cellContent?: Fragment | ProsemirrorNode | Array>): ProsemirrorNode | null | undefined { +export function createCell(cellType: NodeType, cellContent?: Fragment | ProsemirrorNode | Array): ProsemirrorNode | null | undefined { if (cellContent) { return cellType.createChecked(null, cellContent) } diff --git a/packages/extension-table/src/utilities/createTable.ts b/packages/extension-table/src/utilities/createTable.ts index 812fc49120f..029ade4e96c 100644 --- a/packages/extension-table/src/utilities/createTable.ts +++ b/packages/extension-table/src/utilities/createTable.ts @@ -1,8 +1,9 @@ -import { Schema, Fragment, Node as ProsemirrorNode } from 'prosemirror-model' +import { Fragment, Node as ProsemirrorNode, Schema } from 'prosemirror-model' + import { createCell } from './createCell' import { getTableNodeTypes } from './getTableNodeTypes' -export function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment | ProsemirrorNode | Array>): ProsemirrorNode { +export function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment | ProsemirrorNode | Array): ProsemirrorNode { const types = getTableNodeTypes(schema) const headerCells = [] const cells = [] diff --git a/packages/html/src/getHTMLFromFragment.ts b/packages/html/src/getHTMLFromFragment.ts index 96b7a7771c8..b7ff1db1716 100644 --- a/packages/html/src/getHTMLFromFragment.ts +++ b/packages/html/src/getHTMLFromFragment.ts @@ -1,11 +1,11 @@ -import { Node, DOMSerializer, Schema } from 'prosemirror-model' -import { createHTMLDocument, VHTMLDocument } from 'zeed-dom' +import { DOMSerializer, Node, Schema } from 'prosemirror-model' +import { VHTMLDocument, createHTMLDocument } from 'zeed-dom' export function getHTMLFromFragment(doc: Node, schema: Schema): string { const document = DOMSerializer .fromSchema(schema) .serializeFragment(doc.content, { - document: createHTMLDocument(), + document: (createHTMLDocument() as unknown as Document), }) as unknown as VHTMLDocument return document.render() diff --git a/packages/react/src/ReactNodeViewRenderer.tsx b/packages/react/src/ReactNodeViewRenderer.tsx index a8b4ac3b835..aca46c1f5d9 100644 --- a/packages/react/src/ReactNodeViewRenderer.tsx +++ b/packages/react/src/ReactNodeViewRenderer.tsx @@ -1,34 +1,41 @@ -import React from 'react' +import { Node as ProseMirrorNode } from "prosemirror-model"; +import { Decoration, NodeView as ProseMirrorNodeView } from "prosemirror-view"; +import React from "react"; + import { NodeView, NodeViewProps, NodeViewRenderer, - NodeViewRendererProps, NodeViewRendererOptions, -} from '@tiptap/core' -import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' -import { Node as ProseMirrorNode } from 'prosemirror-model' -import { Editor } from './Editor' -import { ReactRenderer } from './ReactRenderer' -import { ReactNodeViewContext, ReactNodeViewContextProps } from './useReactNodeView' + NodeViewRendererProps, +} from "@tiptap/core"; + +import { Editor } from "./Editor"; +import { ReactRenderer } from "./ReactRenderer"; +import { ReactNodeViewContext, ReactNodeViewContextProps } from "./useReactNodeView"; export interface ReactNodeViewRendererOptions extends NodeViewRendererOptions { - update: ((props: { - oldNode: ProseMirrorNode, - oldDecorations: Decoration[], - newNode: ProseMirrorNode, - newDecorations: Decoration[], - updateProps: () => void, - }) => boolean) | null, - as?: string, - className?: string, + update: + | ((props: { + oldNode: ProseMirrorNode; + oldDecorations: Decoration[]; + newNode: ProseMirrorNode; + newDecorations: Decoration[]; + updateProps: () => void; + }) => boolean) + | null; + as?: string; + className?: string; } -class ReactNodeView extends NodeView { - - renderer!: ReactRenderer +class ReactNodeView extends NodeView< + React.FunctionComponent, + Editor, + ReactNodeViewRendererOptions +> { + renderer!: ReactRenderer; - contentDOMElement!: HTMLElement | null + contentDOMElement!: HTMLElement | null; mount() { const props: NodeViewProps = { @@ -40,99 +47,95 @@ class ReactNodeView extends NodeView this.getPos(), updateAttributes: (attributes = {}) => this.updateAttributes(attributes), deleteNode: () => this.deleteNode(), - } + }; if (!(this.component as any).displayName) { const capitalizeFirstChar = (string: string): string => { - return string.charAt(0).toUpperCase() + string.substring(1) - } + return string.charAt(0).toUpperCase() + string.substring(1); + }; - this.component.displayName = capitalizeFirstChar(this.extension.name) + this.component.displayName = capitalizeFirstChar(this.extension.name); } - const ReactNodeViewProvider: React.FunctionComponent = componentProps => { - const Component = this.component - const onDragStart = this.onDragStart.bind(this) - const nodeViewContentRef: ReactNodeViewContextProps['nodeViewContentRef'] = element => { - if ( - element - && this.contentDOMElement - && element.firstChild !== this.contentDOMElement - ) { - element.appendChild(this.contentDOMElement) + const ReactNodeViewProvider: React.FunctionComponent = (componentProps) => { + const Component = this.component; + const onDragStart = this.onDragStart.bind(this); + const nodeViewContentRef: ReactNodeViewContextProps["nodeViewContentRef"] = (element) => { + if (element && this.contentDOMElement && element.firstChild !== this.contentDOMElement) { + element.appendChild(this.contentDOMElement); } - } + }; return ( - ) - } + ); + }; - ReactNodeViewProvider.displayName = 'ReactNodeView' + ReactNodeViewProvider.displayName = "ReactNodeView"; this.contentDOMElement = this.node.isLeaf ? null - : document.createElement(this.node.isInline ? 'span' : 'div') + : document.createElement(this.node.isInline ? "span" : "div"); if (this.contentDOMElement) { // For some reason the whiteSpace prop is not inherited properly in Chrome and Safari // With this fix it seems to work fine // See: https://github.com/ueberdosis/tiptap/issues/1197 - this.contentDOMElement.style.whiteSpace = 'inherit' + this.contentDOMElement.style.whiteSpace = "inherit"; } - let as = this.node.isInline ? 'span' : 'div' + let as = this.node.isInline ? "span" : "div"; if (this.options.as) { - as = this.options.as + as = this.options.as; } - const { className = '' } = this.options + const { className = "" } = this.options; this.renderer = new ReactRenderer(ReactNodeViewProvider, { editor: this.editor, props, as, className: `node-${this.node.type.name} ${className}`.trim(), - }) + }); } get dom() { if ( - this.renderer.element.firstElementChild - && !this.renderer.element.firstElementChild?.hasAttribute('data-node-view-wrapper') + this.renderer.element.firstElementChild && + !this.renderer.element.firstElementChild?.hasAttribute("data-node-view-wrapper") ) { - throw Error('Please use the NodeViewWrapper component for your node view.') + throw Error("Please use the NodeViewWrapper component for your node view."); } - return this.renderer.element + return this.renderer.element as HTMLElement; } get contentDOM() { if (this.node.isLeaf) { - return null + return null; } - return this.contentDOMElement + return this.contentDOMElement; } update(node: ProseMirrorNode, decorations: Decoration[]) { const updateProps = (props?: Record) => { - this.renderer.updateProps(props) - } + this.renderer.updateProps(props); + }; if (node.type !== this.node.type) { - return false + return false; } - if (typeof this.options.update === 'function') { - const oldNode = this.node - const oldDecorations = this.decorations + if (typeof this.options.update === "function") { + const oldNode = this.node; + const oldDecorations = this.decorations; - this.node = node - this.decorations = decorations + this.node = node; + this.decorations = decorations; return this.options.update({ oldNode, @@ -140,48 +143,51 @@ class ReactNodeView extends NodeView updateProps({ node, decorations }), - }) + }); } if (node === this.node && this.decorations === decorations) { - return true + return true; } - this.node = node - this.decorations = decorations + this.node = node; + this.decorations = decorations; - updateProps({ node, decorations }) + updateProps({ node, decorations }); - return true + return true; } selectNode() { this.renderer.updateProps({ selected: true, - }) + }); } deselectNode() { this.renderer.updateProps({ selected: false, - }) + }); } destroy() { - this.renderer.destroy() - this.contentDOMElement = null + this.renderer.destroy(); + this.contentDOMElement = null; } } -export function ReactNodeViewRenderer(component: any, options?: Partial): NodeViewRenderer { +export function ReactNodeViewRenderer( + component: any, + options?: Partial +): NodeViewRenderer { return (props: NodeViewRendererProps) => { // try to get the parent component // this is important for vue devtools to show the component hierarchy correctly // maybe it’s `undefined` because isn’t rendered yet if (!(props.editor as Editor).contentComponent) { - return {} + return {}; } - return new ReactNodeView(component, props, options) as ProseMirrorNodeView - } + return new ReactNodeView(component, props, options) as unknown as ProseMirrorNodeView; + }; } diff --git a/packages/suggestion/src/suggestion.ts b/packages/suggestion/src/suggestion.ts index 82f25e48e4a..63cbdbf3916 100644 --- a/packages/suggestion/src/suggestion.ts +++ b/packages/suggestion/src/suggestion.ts @@ -75,7 +75,7 @@ export function Suggestion({ let props: SuggestionProps | undefined const renderer = render?.() - return new Plugin({ + const plugin: Plugin = new Plugin({ key: pluginKey, view() { @@ -242,7 +242,7 @@ export function Suggestion({ props: { // Call the keydown hook if suggestion is active. handleKeyDown(view, event) { - const { active, range } = this.getState(view.state) + const { active, range } = plugin.getState(view.state) if (!active) { return false @@ -253,7 +253,7 @@ export function Suggestion({ // Setup decorator on the currently active suggestion. decorations(state) { - const { active, range, decorationId } = this.getState(state) + const { active, range, decorationId } = plugin.getState(state) if (!active) { return null @@ -269,4 +269,6 @@ export function Suggestion({ }, }, }) + + return plugin } diff --git a/packages/vue-2/src/VueNodeViewRenderer.ts b/packages/vue-2/src/VueNodeViewRenderer.ts index 6e1b080462f..a22a6779745 100644 --- a/packages/vue-2/src/VueNodeViewRenderer.ts +++ b/packages/vue-2/src/VueNodeViewRenderer.ts @@ -111,7 +111,7 @@ class VueNodeView extends NodeView<(Vue | VueConstructor), Editor, VueNodeViewRe throw Error('Please use the NodeViewWrapper component for your node view.') } - return this.renderer.element + return this.renderer.element as HTMLElement } get contentDOM() { @@ -121,7 +121,7 @@ class VueNodeView extends NodeView<(Vue | VueConstructor), Editor, VueNodeViewRe const contentElement = this.dom.querySelector('[data-node-view-content]') - return contentElement || this.dom + return (contentElement || this.dom) as HTMLElement | null } update(node: ProseMirrorNode, decorations: Decoration[]) { @@ -197,6 +197,6 @@ export function VueNodeViewRenderer(component: Vue | VueConstructor, options?: P return {} } - return new VueNodeView(component, props, options) as ProseMirrorNodeView + return new VueNodeView(component, props, options) as unknown as ProseMirrorNodeView } } diff --git a/packages/vue-3/src/VueNodeViewRenderer.ts b/packages/vue-3/src/VueNodeViewRenderer.ts index 128d84dc7ad..b84a1639304 100644 --- a/packages/vue-3/src/VueNodeViewRenderer.ts +++ b/packages/vue-3/src/VueNodeViewRenderer.ts @@ -1,20 +1,22 @@ +import { Node as ProseMirrorNode } from 'prosemirror-model' +import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' +import { + Component, + PropType, + Ref, + defineComponent, + provide, + ref, +} from 'vue' + import { NodeView, NodeViewProps, NodeViewRenderer, - NodeViewRendererProps, NodeViewRendererOptions, + NodeViewRendererProps, } from '@tiptap/core' -import { - ref, - Ref, - provide, - PropType, - Component, - defineComponent, -} from 'vue' -import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' -import { Node as ProseMirrorNode } from 'prosemirror-model' + import { Editor } from './Editor' import { VueRenderer } from './VueRenderer' @@ -118,7 +120,7 @@ class VueNodeView extends NodeView Date: Tue, 7 Jun 2022 02:34:10 +0200 Subject: [PATCH 03/12] style: fix linting issues --- packages/react/src/ReactNodeViewRenderer.tsx | 122 +++++++++---------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/packages/react/src/ReactNodeViewRenderer.tsx b/packages/react/src/ReactNodeViewRenderer.tsx index aca46c1f5d9..a5a6af01363 100644 --- a/packages/react/src/ReactNodeViewRenderer.tsx +++ b/packages/react/src/ReactNodeViewRenderer.tsx @@ -1,6 +1,6 @@ -import { Node as ProseMirrorNode } from "prosemirror-model"; -import { Decoration, NodeView as ProseMirrorNodeView } from "prosemirror-view"; -import React from "react"; +import { Node as ProseMirrorNode } from 'prosemirror-model' +import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' +import React from 'react' import { NodeView, @@ -8,24 +8,24 @@ import { NodeViewRenderer, NodeViewRendererOptions, NodeViewRendererProps, -} from "@tiptap/core"; +} from '@tiptap/core' -import { Editor } from "./Editor"; -import { ReactRenderer } from "./ReactRenderer"; -import { ReactNodeViewContext, ReactNodeViewContextProps } from "./useReactNodeView"; +import { Editor } from './Editor' +import { ReactRenderer } from './ReactRenderer' +import { ReactNodeViewContext, ReactNodeViewContextProps } from './useReactNodeView' export interface ReactNodeViewRendererOptions extends NodeViewRendererOptions { update: | ((props: { - oldNode: ProseMirrorNode; - oldDecorations: Decoration[]; - newNode: ProseMirrorNode; - newDecorations: Decoration[]; - updateProps: () => void; + oldNode: ProseMirrorNode + oldDecorations: Decoration[] + newNode: ProseMirrorNode + newDecorations: Decoration[] + updateProps: () => void }) => boolean) - | null; - as?: string; - className?: string; + | null + as?: string + className?: string } class ReactNodeView extends NodeView< @@ -33,9 +33,9 @@ class ReactNodeView extends NodeView< Editor, ReactNodeViewRendererOptions > { - renderer!: ReactRenderer; + renderer!: ReactRenderer - contentDOMElement!: HTMLElement | null; + contentDOMElement!: HTMLElement | null mount() { const props: NodeViewProps = { @@ -47,95 +47,95 @@ class ReactNodeView extends NodeView< getPos: () => this.getPos(), updateAttributes: (attributes = {}) => this.updateAttributes(attributes), deleteNode: () => this.deleteNode(), - }; + } if (!(this.component as any).displayName) { const capitalizeFirstChar = (string: string): string => { - return string.charAt(0).toUpperCase() + string.substring(1); - }; + return string.charAt(0).toUpperCase() + string.substring(1) + } - this.component.displayName = capitalizeFirstChar(this.extension.name); + this.component.displayName = capitalizeFirstChar(this.extension.name) } const ReactNodeViewProvider: React.FunctionComponent = (componentProps) => { - const Component = this.component; - const onDragStart = this.onDragStart.bind(this); - const nodeViewContentRef: ReactNodeViewContextProps["nodeViewContentRef"] = (element) => { + const Component = this.component + const onDragStart = this.onDragStart.bind(this) + const nodeViewContentRef: ReactNodeViewContextProps['nodeViewContentRef'] = (element) => { if (element && this.contentDOMElement && element.firstChild !== this.contentDOMElement) { - element.appendChild(this.contentDOMElement); + element.appendChild(this.contentDOMElement) } - }; + } return ( - ); - }; + ) + } - ReactNodeViewProvider.displayName = "ReactNodeView"; + ReactNodeViewProvider.displayName = 'ReactNodeView' this.contentDOMElement = this.node.isLeaf ? null - : document.createElement(this.node.isInline ? "span" : "div"); + : document.createElement(this.node.isInline ? 'span' : 'div') if (this.contentDOMElement) { // For some reason the whiteSpace prop is not inherited properly in Chrome and Safari // With this fix it seems to work fine // See: https://github.com/ueberdosis/tiptap/issues/1197 - this.contentDOMElement.style.whiteSpace = "inherit"; + this.contentDOMElement.style.whiteSpace = 'inherit' } - let as = this.node.isInline ? "span" : "div"; + let as = this.node.isInline ? 'span' : 'div' if (this.options.as) { - as = this.options.as; + as = this.options.as } - const { className = "" } = this.options; + const { className = '' } = this.options this.renderer = new ReactRenderer(ReactNodeViewProvider, { editor: this.editor, props, as, className: `node-${this.node.type.name} ${className}`.trim(), - }); + }) } get dom() { if ( this.renderer.element.firstElementChild && - !this.renderer.element.firstElementChild?.hasAttribute("data-node-view-wrapper") + !this.renderer.element.firstElementChild?.hasAttribute('data-node-view-wrapper') ) { - throw Error("Please use the NodeViewWrapper component for your node view."); + throw Error('Please use the NodeViewWrapper component for your node view.') } - return this.renderer.element as HTMLElement; + return this.renderer.element as HTMLElement } get contentDOM() { if (this.node.isLeaf) { - return null; + return null } - return this.contentDOMElement; + return this.contentDOMElement } update(node: ProseMirrorNode, decorations: Decoration[]) { const updateProps = (props?: Record) => { - this.renderer.updateProps(props); - }; + this.renderer.updateProps(props) + } if (node.type !== this.node.type) { - return false; + return false } - if (typeof this.options.update === "function") { - const oldNode = this.node; - const oldDecorations = this.decorations; + if (typeof this.options.update === 'function') { + const oldNode = this.node + const oldDecorations = this.decorations - this.node = node; - this.decorations = decorations; + this.node = node + this.decorations = decorations return this.options.update({ oldNode, @@ -143,36 +143,36 @@ class ReactNodeView extends NodeView< newNode: node, newDecorations: decorations, updateProps: () => updateProps({ node, decorations }), - }); + }) } if (node === this.node && this.decorations === decorations) { - return true; + return true } - this.node = node; - this.decorations = decorations; + this.node = node + this.decorations = decorations - updateProps({ node, decorations }); + updateProps({ node, decorations }) - return true; + return true } selectNode() { this.renderer.updateProps({ selected: true, - }); + }) } deselectNode() { this.renderer.updateProps({ selected: false, - }); + }) } destroy() { - this.renderer.destroy(); - this.contentDOMElement = null; + this.renderer.destroy() + this.contentDOMElement = null } } @@ -185,9 +185,9 @@ export function ReactNodeViewRenderer( // this is important for vue devtools to show the component hierarchy correctly // maybe it’s `undefined` because isn’t rendered yet if (!(props.editor as Editor).contentComponent) { - return {}; + return {} } - return new ReactNodeView(component, props, options) as unknown as ProseMirrorNodeView; - }; + return new ReactNodeView(component, props, options) as unknown as ProseMirrorNodeView + } } From 2ecedb6955537ae30e1501f5e840e7e19ae27908 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Tue, 7 Jun 2022 02:37:13 +0200 Subject: [PATCH 04/12] style: fix linting issues --- packages/react/src/ReactNodeViewRenderer.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react/src/ReactNodeViewRenderer.tsx b/packages/react/src/ReactNodeViewRenderer.tsx index a5a6af01363..0784f963bf3 100644 --- a/packages/react/src/ReactNodeViewRenderer.tsx +++ b/packages/react/src/ReactNodeViewRenderer.tsx @@ -57,10 +57,10 @@ class ReactNodeView extends NodeView< this.component.displayName = capitalizeFirstChar(this.extension.name) } - const ReactNodeViewProvider: React.FunctionComponent = (componentProps) => { + const ReactNodeViewProvider: React.FunctionComponent = componentProps => { const Component = this.component const onDragStart = this.onDragStart.bind(this) - const nodeViewContentRef: ReactNodeViewContextProps['nodeViewContentRef'] = (element) => { + const nodeViewContentRef: ReactNodeViewContextProps['nodeViewContentRef'] = element => { if (element && this.contentDOMElement && element.firstChild !== this.contentDOMElement) { element.appendChild(this.contentDOMElement) } @@ -104,8 +104,8 @@ class ReactNodeView extends NodeView< get dom() { if ( - this.renderer.element.firstElementChild && - !this.renderer.element.firstElementChild?.hasAttribute('data-node-view-wrapper') + this.renderer.element.firstElementChild + && !this.renderer.element.firstElementChild?.hasAttribute('data-node-view-wrapper') ) { throw Error('Please use the NodeViewWrapper component for your node view.') } @@ -178,7 +178,7 @@ class ReactNodeView extends NodeView< export function ReactNodeViewRenderer( component: any, - options?: Partial + options?: Partial, ): NodeViewRenderer { return (props: NodeViewRendererProps) => { // try to get the parent component From 177d0ebbe71a282b5e03b64badf54c7b3441b653 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Fri, 17 Jun 2022 20:48:09 +0200 Subject: [PATCH 05/12] style: fix linting issues --- .../extension-dropcursor/src/dropcursor.ts | 3 +- packages/react/src/ReactNodeViewRenderer.tsx | 113 +++++++++--------- 2 files changed, 57 insertions(+), 59 deletions(-) diff --git a/packages/extension-dropcursor/src/dropcursor.ts b/packages/extension-dropcursor/src/dropcursor.ts index 39b4d1b5957..681939a2dbc 100644 --- a/packages/extension-dropcursor/src/dropcursor.ts +++ b/packages/extension-dropcursor/src/dropcursor.ts @@ -1,6 +1,5 @@ -import { dropCursor } from 'prosemirror-dropcursor' - import { Extension } from '@tiptap/core' +import { dropCursor } from 'prosemirror-dropcursor' export interface DropcursorOptions { color: string | undefined, diff --git a/packages/react/src/ReactNodeViewRenderer.tsx b/packages/react/src/ReactNodeViewRenderer.tsx index aca46c1f5d9..77d9721c242 100644 --- a/packages/react/src/ReactNodeViewRenderer.tsx +++ b/packages/react/src/ReactNodeViewRenderer.tsx @@ -1,18 +1,17 @@ -import { Node as ProseMirrorNode } from "prosemirror-model"; -import { Decoration, NodeView as ProseMirrorNodeView } from "prosemirror-view"; -import React from "react"; - import { NodeView, NodeViewProps, NodeViewRenderer, NodeViewRendererOptions, NodeViewRendererProps, -} from "@tiptap/core"; +} from '@tiptap/core' +import { Node as ProseMirrorNode } from 'prosemirror-model' +import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view' +import React from 'react' -import { Editor } from "./Editor"; -import { ReactRenderer } from "./ReactRenderer"; -import { ReactNodeViewContext, ReactNodeViewContextProps } from "./useReactNodeView"; +import { Editor } from './Editor' +import { ReactRenderer } from './ReactRenderer' +import { ReactNodeViewContext, ReactNodeViewContextProps } from './useReactNodeView' export interface ReactNodeViewRendererOptions extends NodeViewRendererOptions { update: @@ -33,9 +32,9 @@ class ReactNodeView extends NodeView< Editor, ReactNodeViewRendererOptions > { - renderer!: ReactRenderer; + renderer!: ReactRenderer - contentDOMElement!: HTMLElement | null; + contentDOMElement!: HTMLElement | null mount() { const props: NodeViewProps = { @@ -47,95 +46,95 @@ class ReactNodeView extends NodeView< getPos: () => this.getPos(), updateAttributes: (attributes = {}) => this.updateAttributes(attributes), deleteNode: () => this.deleteNode(), - }; + } if (!(this.component as any).displayName) { const capitalizeFirstChar = (string: string): string => { - return string.charAt(0).toUpperCase() + string.substring(1); - }; + return string.charAt(0).toUpperCase() + string.substring(1) + } - this.component.displayName = capitalizeFirstChar(this.extension.name); + this.component.displayName = capitalizeFirstChar(this.extension.name) } - const ReactNodeViewProvider: React.FunctionComponent = (componentProps) => { - const Component = this.component; - const onDragStart = this.onDragStart.bind(this); - const nodeViewContentRef: ReactNodeViewContextProps["nodeViewContentRef"] = (element) => { + const ReactNodeViewProvider: React.FunctionComponent = componentProps => { + const Component = this.component + const onDragStart = this.onDragStart.bind(this) + const nodeViewContentRef: ReactNodeViewContextProps['nodeViewContentRef'] = element => { if (element && this.contentDOMElement && element.firstChild !== this.contentDOMElement) { - element.appendChild(this.contentDOMElement); + element.appendChild(this.contentDOMElement) } - }; + } return ( - ); - }; + ) + } - ReactNodeViewProvider.displayName = "ReactNodeView"; + ReactNodeViewProvider.displayName = 'ReactNodeView' this.contentDOMElement = this.node.isLeaf ? null - : document.createElement(this.node.isInline ? "span" : "div"); + : document.createElement(this.node.isInline ? 'span' : 'div') if (this.contentDOMElement) { // For some reason the whiteSpace prop is not inherited properly in Chrome and Safari // With this fix it seems to work fine // See: https://github.com/ueberdosis/tiptap/issues/1197 - this.contentDOMElement.style.whiteSpace = "inherit"; + this.contentDOMElement.style.whiteSpace = 'inherit' } - let as = this.node.isInline ? "span" : "div"; + let as = this.node.isInline ? 'span' : 'div' if (this.options.as) { - as = this.options.as; + as = this.options.as } - const { className = "" } = this.options; + const { className = '' } = this.options this.renderer = new ReactRenderer(ReactNodeViewProvider, { editor: this.editor, props, as, className: `node-${this.node.type.name} ${className}`.trim(), - }); + }) } get dom() { if ( - this.renderer.element.firstElementChild && - !this.renderer.element.firstElementChild?.hasAttribute("data-node-view-wrapper") + this.renderer.element.firstElementChild + && !this.renderer.element.firstElementChild?.hasAttribute('data-node-view-wrapper') ) { - throw Error("Please use the NodeViewWrapper component for your node view."); + throw Error('Please use the NodeViewWrapper component for your node view.') } - return this.renderer.element as HTMLElement; + return this.renderer.element as HTMLElement } get contentDOM() { if (this.node.isLeaf) { - return null; + return null } - return this.contentDOMElement; + return this.contentDOMElement } update(node: ProseMirrorNode, decorations: Decoration[]) { const updateProps = (props?: Record) => { - this.renderer.updateProps(props); - }; + this.renderer.updateProps(props) + } if (node.type !== this.node.type) { - return false; + return false } - if (typeof this.options.update === "function") { - const oldNode = this.node; - const oldDecorations = this.decorations; + if (typeof this.options.update === 'function') { + const oldNode = this.node + const oldDecorations = this.decorations - this.node = node; - this.decorations = decorations; + this.node = node + this.decorations = decorations return this.options.update({ oldNode, @@ -143,51 +142,51 @@ class ReactNodeView extends NodeView< newNode: node, newDecorations: decorations, updateProps: () => updateProps({ node, decorations }), - }); + }) } if (node === this.node && this.decorations === decorations) { - return true; + return true } - this.node = node; - this.decorations = decorations; + this.node = node + this.decorations = decorations - updateProps({ node, decorations }); + updateProps({ node, decorations }) - return true; + return true } selectNode() { this.renderer.updateProps({ selected: true, - }); + }) } deselectNode() { this.renderer.updateProps({ selected: false, - }); + }) } destroy() { - this.renderer.destroy(); - this.contentDOMElement = null; + this.renderer.destroy() + this.contentDOMElement = null } } export function ReactNodeViewRenderer( component: any, - options?: Partial + options?: Partial, ): NodeViewRenderer { return (props: NodeViewRendererProps) => { // try to get the parent component // this is important for vue devtools to show the component hierarchy correctly // maybe it’s `undefined` because isn’t rendered yet if (!(props.editor as Editor).contentComponent) { - return {}; + return {} } - return new ReactNodeView(component, props, options) as unknown as ProseMirrorNodeView; - }; + return new ReactNodeView(component, props, options) as unknown as ProseMirrorNodeView + } } From 9d4d30992dd43833447d968c6426af3196e9ec9c Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sat, 18 Jun 2022 12:17:19 +0200 Subject: [PATCH 06/12] fix(ci): fix build process by reimplement filterTransaction --- package-lock.json | 1 + packages/core/src/helpers/createChainableState.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8df71638209..f3253e00157 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16023,6 +16023,7 @@ } }, "packages/extension-youtube": { + "name": "@tiptap/extension-youtube", "version": "2.0.0-beta.4", "license": "MIT", "funding": { diff --git a/packages/core/src/helpers/createChainableState.ts b/packages/core/src/helpers/createChainableState.ts index 2fda98099bb..7911c075c7c 100644 --- a/packages/core/src/helpers/createChainableState.ts +++ b/packages/core/src/helpers/createChainableState.ts @@ -11,10 +11,11 @@ export function createChainableState(config: { return { ...state, - schema: state.schema, - plugins: state.plugins, apply: state.apply.bind(state), applyTransaction: state.applyTransaction.bind(state), + filterTransaction: state.filterTransaction, + plugins: state.plugins, + schema: state.schema, reconfigure: state.reconfigure.bind(state), toJSON: state.toJSON.bind(state), get storedMarks() { From 63146e4a69123fc009ee1369fe64f1a62e91ba94 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sat, 18 Jun 2022 13:01:02 +0200 Subject: [PATCH 07/12] fix(extension-test): fix broken build because of wrong output file names --- demos/src/Experiments/Youtube/React/index.jsx | 4 +++- packages/extension-youtube/package.json | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/demos/src/Experiments/Youtube/React/index.jsx b/demos/src/Experiments/Youtube/React/index.jsx index 948e6b8b287..306e8d38595 100644 --- a/demos/src/Experiments/Youtube/React/index.jsx +++ b/demos/src/Experiments/Youtube/React/index.jsx @@ -43,7 +43,9 @@ export default () => { const editor = useEditor({ extensions: [ StarterKit, - Youtube, + Youtube.configure({ + controls: false, + }), ], content: `

Tiptap now supports youtube embeds! Awesome!

diff --git a/packages/extension-youtube/package.json b/packages/extension-youtube/package.json index 75b2f983fd2..5c4d056ce91 100644 --- a/packages/extension-youtube/package.json +++ b/packages/extension-youtube/package.json @@ -12,10 +12,10 @@ "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, - "main": "dist/tiptap-extension-video.cjs.js", - "umd": "dist/tiptap-extension-video.umd.js", - "module": "dist/tiptap-extension-video.esm.js", - "types": "dist/packages/extension-video/src/index.d.ts", + "main": "dist/tiptap-extension-youtube.cjs.js", + "umd": "dist/tiptap-extension-youtube.umd.js", + "module": "dist/tiptap-extension-youtube.esm.js", + "types": "dist/packages/extension-youtube/src/index.d.ts", "files": [ "src", "dist" @@ -26,6 +26,6 @@ "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", - "directory": "packages/extension-video" + "directory": "packages/extension-youtube" } } From 5301636a8363f602300a16d98378b78806d5d998 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sat, 18 Jun 2022 13:22:52 +0200 Subject: [PATCH 08/12] fix: fix prosemirror-tables not being bundled correctly for ES6 --- packages/extension-table/package.json | 7 ++++++- packages/extension-task-item/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/extension-table/package.json b/packages/extension-table/package.json index ab278872f2e..a4ef5057b6f 100644 --- a/packages/extension-table/package.json +++ b/packages/extension-table/package.json @@ -29,9 +29,14 @@ "prosemirror-tables": "^1.1.1", "prosemirror-view": "^1.25.0" }, + "resolutions": { + "prosemirror-tables": { + "prosemirror-tables-contently": "1.1.2" + } + }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-table" } -} \ No newline at end of file +} diff --git a/packages/extension-task-item/package.json b/packages/extension-task-item/package.json index 738d1cca060..6d083d3f1df 100644 --- a/packages/extension-task-item/package.json +++ b/packages/extension-task-item/package.json @@ -29,4 +29,4 @@ "url": "https://github.com/ueberdosis/tiptap", "directory": "packages/extension-task-item" } -} \ No newline at end of file +} From 6eb28558749ff0b0d8053646f98735ccf18cb8c0 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sat, 18 Jun 2022 14:04:30 +0200 Subject: [PATCH 09/12] fix: move to prosemirror-tables-contently until es6 build is working --- demos/includeDependencies.txt | 2 +- package-lock.json | 17 +- packages/extension-table/package-lock.json | 412 ++++++++++++++++++ packages/extension-table/package.json | 7 +- packages/extension-table/src/table.ts | 2 +- .../src/utilities/isCellSelection.ts | 2 +- 6 files changed, 426 insertions(+), 16 deletions(-) create mode 100644 packages/extension-table/package-lock.json diff --git a/demos/includeDependencies.txt b/demos/includeDependencies.txt index f7eb421a309..779a6caef2a 100644 --- a/demos/includeDependencies.txt +++ b/demos/includeDependencies.txt @@ -10,7 +10,7 @@ prosemirror-keymap prosemirror-model prosemirror-schema-list prosemirror-state -prosemirror-tables +prosemirror-tables-contently prosemirror-transform prosemirror-view shiki diff --git a/package-lock.json b/package-lock.json index f3253e00157..72d4cea7a8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12242,9 +12242,10 @@ "prosemirror-transform": "^1.0.0" } }, - "node_modules/prosemirror-tables": { - "version": "1.1.1", - "license": "MIT", + "node_modules/prosemirror-tables-contently": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prosemirror-tables-contently/-/prosemirror-tables-contently-1.1.2.tgz", + "integrity": "sha512-REa13GZyVcmwUef6eFfGIZ4IIT3n+95+FEQC0mIg3F7MlwBp5q2lL5y/Pl8EcSIDDagoXp/8oW6uaYy0tWhb6A==", "dependencies": { "prosemirror-keymap": "^1.1.2", "prosemirror-model": "^1.8.1", @@ -15890,7 +15891,7 @@ "dependencies": { "prosemirror-model": "^1.17.0", "prosemirror-state": "^1.4.0", - "prosemirror-tables": "^1.1.1", + "prosemirror-tables-contently": "^1.1.2", "prosemirror-view": "^1.25.0" }, "funding": { @@ -19037,7 +19038,7 @@ "requires": { "prosemirror-model": "^1.17.0", "prosemirror-state": "^1.4.0", - "prosemirror-tables": "^1.1.1", + "prosemirror-tables-contently": "^1.1.2", "prosemirror-view": "^1.25.0" } }, @@ -24290,8 +24291,10 @@ "prosemirror-transform": "^1.0.0" } }, - "prosemirror-tables": { - "version": "1.1.1", + "prosemirror-tables-contently": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prosemirror-tables-contently/-/prosemirror-tables-contently-1.1.2.tgz", + "integrity": "sha512-REa13GZyVcmwUef6eFfGIZ4IIT3n+95+FEQC0mIg3F7MlwBp5q2lL5y/Pl8EcSIDDagoXp/8oW6uaYy0tWhb6A==", "requires": { "prosemirror-keymap": "^1.1.2", "prosemirror-model": "^1.8.1", diff --git a/packages/extension-table/package-lock.json b/packages/extension-table/package-lock.json new file mode 100644 index 00000000000..b352b834a40 --- /dev/null +++ b/packages/extension-table/package-lock.json @@ -0,0 +1,412 @@ +{ + "name": "@tiptap/extension-table", + "version": "2.0.0-beta.52", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@tiptap/extension-table", + "version": "2.0.0-beta.52", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.17.0", + "prosemirror-state": "^1.4.0", + "prosemirror-tables-contently": "^1.1.2", + "prosemirror-view": "^1.25.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0-beta.1" + } + }, + "node_modules/@tiptap/core": { + "version": "2.0.0-beta.179", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.179.tgz", + "integrity": "sha512-weJKZ761+PCimMCSLILsN4IodEGPmnsu+stD+MkUTJSKAp/nCDH0FcIgq80FOF7+TMqRHXWuGoeHf9GSvSMZHQ==", + "peer": true, + "dependencies": { + "@types/prosemirror-commands": "^1.0.4", + "@types/prosemirror-keymap": "^1.0.4", + "@types/prosemirror-model": "^1.16.0", + "@types/prosemirror-schema-list": "^1.0.3", + "@types/prosemirror-state": "^1.2.8", + "@types/prosemirror-transform": "^1.1.5", + "@types/prosemirror-view": "^1.23.1", + "prosemirror-commands": "^1.2.1", + "prosemirror-keymap": "^1.1.5", + "prosemirror-model": "^1.16.1", + "prosemirror-schema-list": "^1.1.6", + "prosemirror-state": "^1.3.4", + "prosemirror-transform": "^1.3.3", + "prosemirror-view": "^1.23.6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + } + }, + "node_modules/@types/orderedmap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/orderedmap/-/orderedmap-1.0.0.tgz", + "integrity": "sha512-dxKo80TqYx3YtBipHwA/SdFmMMyLCnP+5mkEqN0eMjcTBzHkiiX0ES118DsjDBjvD+zeSsSU9jULTZ+frog+Gw==", + "peer": true + }, + "node_modules/@types/prosemirror-commands": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/prosemirror-commands/-/prosemirror-commands-1.0.4.tgz", + "integrity": "sha512-utDNYB3EXLjAfYIcRWJe6pn3kcQ5kG4RijbT/0Y/TFOm6yhvYS/D9eJVnijdg9LDjykapcezchxGRqFD5LcyaQ==", + "peer": true, + "dependencies": { + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*", + "@types/prosemirror-view": "*" + } + }, + "node_modules/@types/prosemirror-keymap": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz", + "integrity": "sha512-ycevwkqUh+jEQtPwqO7sWGcm+Sybmhu8MpBsM8DlO3+YTKnXbKA6SDz/+q14q1wK3UA8lHJyfR+v+GPxfUSemg==", + "peer": true, + "dependencies": { + "@types/prosemirror-commands": "*", + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*", + "@types/prosemirror-view": "*" + } + }, + "node_modules/@types/prosemirror-model": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/@types/prosemirror-model/-/prosemirror-model-1.16.2.tgz", + "integrity": "sha512-1XPJopkKP3oHSBP61uuSuW13DIDZPWvAzP6Pv2/6mixk8EBPUeRGIW548DjJTicMo23gEg1zvCZy9asblQdWag==", + "peer": true, + "dependencies": { + "@types/orderedmap": "*" + } + }, + "node_modules/@types/prosemirror-schema-list": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/prosemirror-schema-list/-/prosemirror-schema-list-1.0.3.tgz", + "integrity": "sha512-uWybOf+M2Ea7rlbs0yLsS4YJYNGXYtn4N+w8HCw3Vvfl6wBAROzlMt0gV/D/VW/7J/LlAjwMezuGe8xi24HzXA==", + "peer": true, + "dependencies": { + "@types/orderedmap": "*", + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*" + } + }, + "node_modules/@types/prosemirror-state": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.3.0.tgz", + "integrity": "sha512-nMdUF6w8B++NH4V54X+4GvDty7M02UfuHQW0s1AS25Z4ZrOW4RSY2+s57doXBbeMSjzYV/QoMxCY2sT3KQ2VdQ==", + "peer": true, + "dependencies": { + "@types/prosemirror-model": "*", + "@types/prosemirror-transform": "*", + "@types/prosemirror-view": "*" + } + }, + "node_modules/@types/prosemirror-transform": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@types/prosemirror-transform/-/prosemirror-transform-1.4.2.tgz", + "integrity": "sha512-FZNzjYm6YUkb1XXOrw2193TiFzwM92ui1nycNaRSd5JDbugf9yBLkXm4Rq3HGJJxBBkRcUE8niqUW5aWlXQQiQ==", + "peer": true, + "dependencies": { + "@types/prosemirror-model": "*" + } + }, + "node_modules/@types/prosemirror-view": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.23.3.tgz", + "integrity": "sha512-T5dPDmZiXAazJVSvnx55D6h4mcpiH2q2wTyO9zIeOdox5zx964+zcDl9dFNaXG3qCGlERwMPckhBZL1HCxyygw==", + "peer": true, + "dependencies": { + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*", + "@types/prosemirror-transform": "*" + } + }, + "node_modules/orderedmap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.0.0.tgz", + "integrity": "sha512-buf4PoAMlh45b8a8gsGy/X6w279TSqkyAS0C0wdTSJwFSU+ljQFJON5I8NfjLHoCXwpSROIo2wr0g33T+kQshQ==" + }, + "node_modules/prosemirror-commands": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.3.0.tgz", + "integrity": "sha512-BwBbZ5OAScPcm0x7H8SPbqjuEJnCU2RJT9LDyOiiIl/3NbL1nJZI4SFNHwU2e/tRr2Xe7JsptpzseqvZvToLBQ==", + "peer": true, + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-keymap": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.0.tgz", + "integrity": "sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==", + "dependencies": { + "prosemirror-state": "^1.0.0", + "w3c-keyname": "^2.2.0" + } + }, + "node_modules/prosemirror-model": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.18.1.tgz", + "integrity": "sha512-IxSVBKAEMjD7s3n8cgtwMlxAXZrC7Mlag7zYsAKDndAqnDScvSmp/UdnRTV/B33lTCVU3CCm7dyAn/rVVD0mcw==", + "dependencies": { + "orderedmap": "^2.0.0" + } + }, + "node_modules/prosemirror-schema-list": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.2.0.tgz", + "integrity": "sha512-8PT/9xOx1HHdC7fDNNfhQ50Z8Mzu7nKyA1KCDltSpcZVZIbB0k7KtsHrnXyuIhbLlScoymBiLZ00c5MH6wdFsA==", + "peer": true, + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-state": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.0.tgz", + "integrity": "sha512-mVDZdjNX/YT5FvypiwbphJe9psA5h+j9apsSszVRFc6oKFoIInvzdujh8QW9f9lwHtSYajLxNiM1hPhd0Sl1XA==", + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-tables-contently": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prosemirror-tables-contently/-/prosemirror-tables-contently-1.1.2.tgz", + "integrity": "sha512-REa13GZyVcmwUef6eFfGIZ4IIT3n+95+FEQC0mIg3F7MlwBp5q2lL5y/Pl8EcSIDDagoXp/8oW6uaYy0tWhb6A==", + "dependencies": { + "prosemirror-keymap": "^1.1.2", + "prosemirror-model": "^1.8.1", + "prosemirror-state": "^1.3.1", + "prosemirror-transform": "^1.2.1", + "prosemirror-view": "^1.13.3" + } + }, + "node_modules/prosemirror-transform": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.6.0.tgz", + "integrity": "sha512-MAp7AjsjEGEqQY0sSMufNIUuEyB1ZR9Fqlm8dTwwWwpEJRv/plsKjWXBbx52q3Ml8MtaMcd7ic14zAHVB3WaMw==", + "dependencies": { + "prosemirror-model": "^1.0.0" + } + }, + "node_modules/prosemirror-view": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.26.1.tgz", + "integrity": "sha512-8MEuEFQ64zoIRSz24A97WhtSqtZynTwTsECt0kOh0TotNx/YRPKWozEmUJUmJGUYsFowZNdsI0gm1bvX1x3/9Q==", + "dependencies": { + "prosemirror-model": "^1.16.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0" + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", + "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" + } + }, + "dependencies": { + "@tiptap/core": { + "version": "2.0.0-beta.179", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.179.tgz", + "integrity": "sha512-weJKZ761+PCimMCSLILsN4IodEGPmnsu+stD+MkUTJSKAp/nCDH0FcIgq80FOF7+TMqRHXWuGoeHf9GSvSMZHQ==", + "peer": true, + "requires": { + "@types/prosemirror-commands": "^1.0.4", + "@types/prosemirror-keymap": "^1.0.4", + "@types/prosemirror-model": "^1.16.0", + "@types/prosemirror-schema-list": "^1.0.3", + "@types/prosemirror-state": "^1.2.8", + "@types/prosemirror-transform": "^1.1.5", + "@types/prosemirror-view": "^1.23.1", + "prosemirror-commands": "^1.2.1", + "prosemirror-keymap": "^1.1.5", + "prosemirror-model": "^1.16.1", + "prosemirror-schema-list": "^1.1.6", + "prosemirror-state": "^1.3.4", + "prosemirror-transform": "^1.3.3", + "prosemirror-view": "^1.23.6" + } + }, + "@types/orderedmap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/orderedmap/-/orderedmap-1.0.0.tgz", + "integrity": "sha512-dxKo80TqYx3YtBipHwA/SdFmMMyLCnP+5mkEqN0eMjcTBzHkiiX0ES118DsjDBjvD+zeSsSU9jULTZ+frog+Gw==", + "peer": true + }, + "@types/prosemirror-commands": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/prosemirror-commands/-/prosemirror-commands-1.0.4.tgz", + "integrity": "sha512-utDNYB3EXLjAfYIcRWJe6pn3kcQ5kG4RijbT/0Y/TFOm6yhvYS/D9eJVnijdg9LDjykapcezchxGRqFD5LcyaQ==", + "peer": true, + "requires": { + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*", + "@types/prosemirror-view": "*" + } + }, + "@types/prosemirror-keymap": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz", + "integrity": "sha512-ycevwkqUh+jEQtPwqO7sWGcm+Sybmhu8MpBsM8DlO3+YTKnXbKA6SDz/+q14q1wK3UA8lHJyfR+v+GPxfUSemg==", + "peer": true, + "requires": { + "@types/prosemirror-commands": "*", + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*", + "@types/prosemirror-view": "*" + } + }, + "@types/prosemirror-model": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/@types/prosemirror-model/-/prosemirror-model-1.16.2.tgz", + "integrity": "sha512-1XPJopkKP3oHSBP61uuSuW13DIDZPWvAzP6Pv2/6mixk8EBPUeRGIW548DjJTicMo23gEg1zvCZy9asblQdWag==", + "peer": true, + "requires": { + "@types/orderedmap": "*" + } + }, + "@types/prosemirror-schema-list": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/prosemirror-schema-list/-/prosemirror-schema-list-1.0.3.tgz", + "integrity": "sha512-uWybOf+M2Ea7rlbs0yLsS4YJYNGXYtn4N+w8HCw3Vvfl6wBAROzlMt0gV/D/VW/7J/LlAjwMezuGe8xi24HzXA==", + "peer": true, + "requires": { + "@types/orderedmap": "*", + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*" + } + }, + "@types/prosemirror-state": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.3.0.tgz", + "integrity": "sha512-nMdUF6w8B++NH4V54X+4GvDty7M02UfuHQW0s1AS25Z4ZrOW4RSY2+s57doXBbeMSjzYV/QoMxCY2sT3KQ2VdQ==", + "peer": true, + "requires": { + "@types/prosemirror-model": "*", + "@types/prosemirror-transform": "*", + "@types/prosemirror-view": "*" + } + }, + "@types/prosemirror-transform": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@types/prosemirror-transform/-/prosemirror-transform-1.4.2.tgz", + "integrity": "sha512-FZNzjYm6YUkb1XXOrw2193TiFzwM92ui1nycNaRSd5JDbugf9yBLkXm4Rq3HGJJxBBkRcUE8niqUW5aWlXQQiQ==", + "peer": true, + "requires": { + "@types/prosemirror-model": "*" + } + }, + "@types/prosemirror-view": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.23.3.tgz", + "integrity": "sha512-T5dPDmZiXAazJVSvnx55D6h4mcpiH2q2wTyO9zIeOdox5zx964+zcDl9dFNaXG3qCGlERwMPckhBZL1HCxyygw==", + "peer": true, + "requires": { + "@types/prosemirror-model": "*", + "@types/prosemirror-state": "*", + "@types/prosemirror-transform": "*" + } + }, + "orderedmap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.0.0.tgz", + "integrity": "sha512-buf4PoAMlh45b8a8gsGy/X6w279TSqkyAS0C0wdTSJwFSU+ljQFJON5I8NfjLHoCXwpSROIo2wr0g33T+kQshQ==" + }, + "prosemirror-commands": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.3.0.tgz", + "integrity": "sha512-BwBbZ5OAScPcm0x7H8SPbqjuEJnCU2RJT9LDyOiiIl/3NbL1nJZI4SFNHwU2e/tRr2Xe7JsptpzseqvZvToLBQ==", + "peer": true, + "requires": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-keymap": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.0.tgz", + "integrity": "sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==", + "requires": { + "prosemirror-state": "^1.0.0", + "w3c-keyname": "^2.2.0" + } + }, + "prosemirror-model": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.18.1.tgz", + "integrity": "sha512-IxSVBKAEMjD7s3n8cgtwMlxAXZrC7Mlag7zYsAKDndAqnDScvSmp/UdnRTV/B33lTCVU3CCm7dyAn/rVVD0mcw==", + "requires": { + "orderedmap": "^2.0.0" + } + }, + "prosemirror-schema-list": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.2.0.tgz", + "integrity": "sha512-8PT/9xOx1HHdC7fDNNfhQ50Z8Mzu7nKyA1KCDltSpcZVZIbB0k7KtsHrnXyuIhbLlScoymBiLZ00c5MH6wdFsA==", + "peer": true, + "requires": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-state": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.0.tgz", + "integrity": "sha512-mVDZdjNX/YT5FvypiwbphJe9psA5h+j9apsSszVRFc6oKFoIInvzdujh8QW9f9lwHtSYajLxNiM1hPhd0Sl1XA==", + "requires": { + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-tables-contently": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prosemirror-tables-contently/-/prosemirror-tables-contently-1.1.2.tgz", + "integrity": "sha512-REa13GZyVcmwUef6eFfGIZ4IIT3n+95+FEQC0mIg3F7MlwBp5q2lL5y/Pl8EcSIDDagoXp/8oW6uaYy0tWhb6A==", + "requires": { + "prosemirror-keymap": "^1.1.2", + "prosemirror-model": "^1.8.1", + "prosemirror-state": "^1.3.1", + "prosemirror-transform": "^1.2.1", + "prosemirror-view": "^1.13.3" + } + }, + "prosemirror-transform": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.6.0.tgz", + "integrity": "sha512-MAp7AjsjEGEqQY0sSMufNIUuEyB1ZR9Fqlm8dTwwWwpEJRv/plsKjWXBbx52q3Ml8MtaMcd7ic14zAHVB3WaMw==", + "requires": { + "prosemirror-model": "^1.0.0" + } + }, + "prosemirror-view": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.26.1.tgz", + "integrity": "sha512-8MEuEFQ64zoIRSz24A97WhtSqtZynTwTsECt0kOh0TotNx/YRPKWozEmUJUmJGUYsFowZNdsI0gm1bvX1x3/9Q==", + "requires": { + "prosemirror-model": "^1.16.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0" + } + }, + "w3c-keyname": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", + "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" + } + } +} diff --git a/packages/extension-table/package.json b/packages/extension-table/package.json index a4ef5057b6f..a145d5a13a7 100644 --- a/packages/extension-table/package.json +++ b/packages/extension-table/package.json @@ -26,14 +26,9 @@ "dependencies": { "prosemirror-model": "^1.17.0", "prosemirror-state": "^1.4.0", - "prosemirror-tables": "^1.1.1", + "prosemirror-tables-contently": "^1.1.2", "prosemirror-view": "^1.25.0" }, - "resolutions": { - "prosemirror-tables": { - "prosemirror-tables-contently": "1.1.2" - } - }, "repository": { "type": "git", "url": "https://github.com/ueberdosis/tiptap", diff --git a/packages/extension-table/src/table.ts b/packages/extension-table/src/table.ts index d4250eb0e23..e7dd2b27c85 100644 --- a/packages/extension-table/src/table.ts +++ b/packages/extension-table/src/table.ts @@ -24,7 +24,7 @@ import { tableEditing, toggleHeader, toggleHeaderCell, -} from 'prosemirror-tables' +} from 'prosemirror-tables-contently' import { NodeView } from 'prosemirror-view' import { TableView } from './TableView' diff --git a/packages/extension-table/src/utilities/isCellSelection.ts b/packages/extension-table/src/utilities/isCellSelection.ts index 4fc826e6c97..1eadd6ae97a 100644 --- a/packages/extension-table/src/utilities/isCellSelection.ts +++ b/packages/extension-table/src/utilities/isCellSelection.ts @@ -1,4 +1,4 @@ -import { CellSelection } from 'prosemirror-tables' +import { CellSelection } from 'prosemirror-tables-contently' export function isCellSelection(value: unknown): value is CellSelection { return value instanceof CellSelection From b711affa0ed335241247a9cc9eba38e6d47345f8 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sat, 18 Jun 2022 14:40:04 +0200 Subject: [PATCH 10/12] fix: fix tests for youtube --- demos/src/Examples/CollaborativeEditing/React/index.spec.js | 4 ++-- demos/src/Examples/CollaborativeEditing/Vue/index.spec.js | 4 ++-- demos/src/Experiments/Youtube/Vue/index.vue | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/demos/src/Examples/CollaborativeEditing/React/index.spec.js b/demos/src/Examples/CollaborativeEditing/React/index.spec.js index ced25843dd0..07d88687f58 100644 --- a/demos/src/Examples/CollaborativeEditing/React/index.spec.js +++ b/demos/src/Examples/CollaborativeEditing/React/index.spec.js @@ -4,7 +4,7 @@ context('/src/Examples/CollaborativeEditing/React/', () => { }) it('should show the current room with participants', () => { - cy.wait(3000) + cy.wait(6000) cy.get('.editor__status') .should('contain', 'rooms.') .should('contain', 'users online') @@ -14,7 +14,7 @@ context('/src/Examples/CollaborativeEditing/React/', () => { cy.window().then(win => { cy.stub(win, 'prompt').returns('John Doe') cy.get('.editor__name > button').click() - cy.wait(3000) + cy.wait(6000) cy.get('.editor__name').should('contain', 'John Doe') }) diff --git a/demos/src/Examples/CollaborativeEditing/Vue/index.spec.js b/demos/src/Examples/CollaborativeEditing/Vue/index.spec.js index a9318665021..bba0f59fd7c 100644 --- a/demos/src/Examples/CollaborativeEditing/Vue/index.spec.js +++ b/demos/src/Examples/CollaborativeEditing/Vue/index.spec.js @@ -4,7 +4,7 @@ context('/src/Examples/CollaborativeEditing/Vue/', () => { }) it('should show the current room with participants', () => { - cy.wait(3000) + cy.wait(6000) cy.get('.editor__status') .should('contain', 'rooms.') .should('contain', 'users online') @@ -14,7 +14,7 @@ context('/src/Examples/CollaborativeEditing/Vue/', () => { cy.window().then(win => { cy.stub(win, 'prompt').returns('John Doe') cy.get('.editor__name > button').click() - cy.wait(3000) + cy.wait(6000) cy.get('.editor__name').should('contain', 'John Doe') }) }) diff --git a/demos/src/Experiments/Youtube/Vue/index.vue b/demos/src/Experiments/Youtube/Vue/index.vue index 203833fdd6e..67e71f53591 100644 --- a/demos/src/Experiments/Youtube/Vue/index.vue +++ b/demos/src/Experiments/Youtube/Vue/index.vue @@ -43,7 +43,9 @@ export default { this.editor = new Editor({ extensions: [ StarterKit, - Youtube, + Youtube.configure({ + controls: true, + }), ], content: `

Tiptap now supports youtube embeds! Awesome!

From 7e6a20ed17114f48c84a7a97dc6606da837547c5 Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sat, 18 Jun 2022 15:14:20 +0200 Subject: [PATCH 11/12] fix: fix youtube test --- demos/src/Experiments/Youtube/Vue/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/src/Experiments/Youtube/Vue/index.vue b/demos/src/Experiments/Youtube/Vue/index.vue index 67e71f53591..6a6eec53300 100644 --- a/demos/src/Experiments/Youtube/Vue/index.vue +++ b/demos/src/Experiments/Youtube/Vue/index.vue @@ -44,7 +44,7 @@ export default { extensions: [ StarterKit, Youtube.configure({ - controls: true, + controls: false, }), ], content: ` From 75740d3181ccffba4554a27a6e1165c8e3e56cfe Mon Sep 17 00:00:00 2001 From: Dominik Biedebach Date: Sun, 19 Jun 2022 03:20:40 +0200 Subject: [PATCH 12/12] fix(demos): fix demos build --- demos/includeDependencies.txt | 6 +- demos/package.json | 1 + .../GlobalDragHandle/Vue/DragHandle.js | 2 +- package-lock.json | 87 +++++++------------ 4 files changed, 34 insertions(+), 62 deletions(-) diff --git a/demos/includeDependencies.txt b/demos/includeDependencies.txt index 779a6caef2a..9768c4e44b8 100644 --- a/demos/includeDependencies.txt +++ b/demos/includeDependencies.txt @@ -13,12 +13,12 @@ prosemirror-state prosemirror-tables-contently prosemirror-transform prosemirror-view +react +react-dom +react-dom/client shiki simplify-js tippy.js uuid y-webrtc yjs -react -react-dom -react-dom/client diff --git a/demos/package.json b/demos/package.json index 95f8062bbe2..16bb113c7d7 100644 --- a/demos/package.json +++ b/demos/package.json @@ -16,6 +16,7 @@ "simplify-js": "^1.2.4", "y-webrtc": "^10.2.2", "yjs": "^13.5.26", + "y-prosemirror": "1.0.20", "lowlight": "^1.20.0" }, "devDependencies": { diff --git a/demos/src/Experiments/GlobalDragHandle/Vue/DragHandle.js b/demos/src/Experiments/GlobalDragHandle/Vue/DragHandle.js index f38afd68d23..feb71e0011c 100644 --- a/demos/src/Experiments/GlobalDragHandle/Vue/DragHandle.js +++ b/demos/src/Experiments/GlobalDragHandle/Vue/DragHandle.js @@ -1,6 +1,6 @@ import { Extension } from '@tiptap/core' import { NodeSelection, Plugin } from 'prosemirror-state' -import { serializeForClipboard } from 'prosemirror-view/src/clipboard' +import { __serializeForClipboard as serializeForClipboard } from 'prosemirror-view' function removeNode(node) { node.parentNode.removeChild(node) diff --git a/package-lock.json b/package-lock.json index 72d4cea7a8e..84343db2830 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,7 @@ "remixicon": "^2.5.0", "shiki": "^0.10.0", "simplify-js": "^1.2.4", + "y-prosemirror": "1.0.20", "y-webrtc": "^10.2.2", "yjs": "^13.5.26" }, @@ -15242,6 +15243,25 @@ "node": ">=0.4" } }, + "node_modules/y-prosemirror": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.0.20.tgz", + "integrity": "sha512-LVMtu3qWo0emeYiP+0jgNcvZkqhzE/otOoro+87q0iVKxy/sMKuiJZnokfJdR4cn9qKx0Un5fIxXqbAlR2bFkA==", + "dependencies": { + "lib0": "^0.2.42" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + }, + "peerDependencies": { + "prosemirror-model": "^1.7.1", + "prosemirror-state": "^1.2.3", + "prosemirror-view": "^1.9.10", + "y-protocols": "^1.0.1", + "yjs": "^13.3.2" + } + }, "node_modules/y-protocols": { "version": "1.0.5", "license": "MIT", @@ -15532,44 +15552,6 @@ "@tiptap/core": "^2.0.0-beta.1" } }, - "packages/extension-collaboration-cursor/node_modules/y-prosemirror": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.0.20.tgz", - "integrity": "sha512-LVMtu3qWo0emeYiP+0jgNcvZkqhzE/otOoro+87q0iVKxy/sMKuiJZnokfJdR4cn9qKx0Un5fIxXqbAlR2bFkA==", - "dependencies": { - "lib0": "^0.2.42" - }, - "funding": { - "type": "GitHub Sponsors ❤", - "url": "https://github.com/sponsors/dmonad" - }, - "peerDependencies": { - "prosemirror-model": "^1.7.1", - "prosemirror-state": "^1.2.3", - "prosemirror-view": "^1.9.10", - "y-protocols": "^1.0.1", - "yjs": "^13.3.2" - } - }, - "packages/extension-collaboration/node_modules/y-prosemirror": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.0.20.tgz", - "integrity": "sha512-LVMtu3qWo0emeYiP+0jgNcvZkqhzE/otOoro+87q0iVKxy/sMKuiJZnokfJdR4cn9qKx0Un5fIxXqbAlR2bFkA==", - "dependencies": { - "lib0": "^0.2.42" - }, - "funding": { - "type": "GitHub Sponsors ❤", - "url": "https://github.com/sponsors/dmonad" - }, - "peerDependencies": { - "prosemirror-model": "^1.7.1", - "prosemirror-state": "^1.2.3", - "prosemirror-view": "^1.9.10", - "y-protocols": "^1.0.1", - "yjs": "^13.3.2" - } - }, "packages/extension-color": { "name": "@tiptap/extension-color", "version": "2.0.0-beta.12", @@ -18886,32 +18868,12 @@ "requires": { "prosemirror-state": "^1.4.0", "y-prosemirror": "1.0.20" - }, - "dependencies": { - "y-prosemirror": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.0.20.tgz", - "integrity": "sha512-LVMtu3qWo0emeYiP+0jgNcvZkqhzE/otOoro+87q0iVKxy/sMKuiJZnokfJdR4cn9qKx0Un5fIxXqbAlR2bFkA==", - "requires": { - "lib0": "^0.2.42" - } - } } }, "@tiptap/extension-collaboration-cursor": { "version": "file:packages/extension-collaboration-cursor", "requires": { "y-prosemirror": "1.0.20" - }, - "dependencies": { - "y-prosemirror": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.0.20.tgz", - "integrity": "sha512-LVMtu3qWo0emeYiP+0jgNcvZkqhzE/otOoro+87q0iVKxy/sMKuiJZnokfJdR4cn9qKx0Un5fIxXqbAlR2bFkA==", - "requires": { - "lib0": "^0.2.42" - } - } } }, "@tiptap/extension-color": { @@ -25517,6 +25479,7 @@ "vite-plugin-checker": "^0.3.4", "vue": "^3.0.5", "vue-router": "^4.0.11", + "y-prosemirror": "1.0.20", "y-webrtc": "^10.2.2", "yjs": "^13.5.26" } @@ -26270,6 +26233,14 @@ "version": "4.0.2", "dev": true }, + "y-prosemirror": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/y-prosemirror/-/y-prosemirror-1.0.20.tgz", + "integrity": "sha512-LVMtu3qWo0emeYiP+0jgNcvZkqhzE/otOoro+87q0iVKxy/sMKuiJZnokfJdR4cn9qKx0Un5fIxXqbAlR2bFkA==", + "requires": { + "lib0": "^0.2.42" + } + }, "y-protocols": { "version": "1.0.5", "requires": {