From 9fc0ee9ea5f900c45980233756f025581fc17c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 29 Sep 2021 09:06:10 +0200 Subject: [PATCH 01/17] build: fix ts files --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 8201a95a..2161b344 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -94,7 +94,7 @@ async function build(commandLineArgs) { '@tiptap/*': ['packages/*/src'], }, }, - include: [], + include: null, }, }), ], From 4151e2fd81ae6c007d32b72ac41feac3c81e438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 29 Sep 2021 23:56:43 +0200 Subject: [PATCH 02/17] =?UTF-8?q?fix:=20remove=20node=20before=20hr=20if?= =?UTF-8?q?=20it=E2=80=99s=20an=20empty=20text=20block,=20fix=20#1665?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/extension-horizontal-rule/src/horizontal-rule.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/extension-horizontal-rule/src/horizontal-rule.ts b/packages/extension-horizontal-rule/src/horizontal-rule.ts index a460f96d..03ebd40f 100644 --- a/packages/extension-horizontal-rule/src/horizontal-rule.ts +++ b/packages/extension-horizontal-rule/src/horizontal-rule.ts @@ -55,9 +55,11 @@ export const HorizontalRule = Node.create({ return true } - const posBefore = $anchor.before() + const from = $anchor.before() + const to = $anchor.start() - tr.deleteRange(posBefore, posBefore + 1) + tr.deleteRange(from, to) + tr.setSelection(TextSelection.create(tr.doc, from)) return true }) From 14f62dddb377701c9409495cc1a99922bb5f725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 00:21:36 +0200 Subject: [PATCH 03/17] Publish - @tiptap/core@2.0.0-beta.115 - @tiptap/extension-bubble-menu@2.0.0-beta.38 - @tiptap/extension-floating-menu@2.0.0-beta.32 - @tiptap/extension-gapcursor@2.0.0-beta.23 - @tiptap/extension-hard-break@2.0.0-beta.20 - @tiptap/extension-highlight@2.0.0-beta.20 - @tiptap/extension-horizontal-rule@2.0.0-beta.20 - @tiptap/html@2.0.0-beta.114 - @tiptap/react@2.0.0-beta.75 - @tiptap/starter-kit@2.0.0-beta.114 - @tiptap/vue-2@2.0.0-beta.56 - @tiptap/vue-3@2.0.0-beta.66 --- packages/core/CHANGELOG.md | 8 ++++++++ packages/core/package.json | 2 +- packages/extension-bubble-menu/CHANGELOG.md | 8 ++++++++ packages/extension-bubble-menu/package.json | 2 +- packages/extension-floating-menu/CHANGELOG.md | 8 ++++++++ packages/extension-floating-menu/package.json | 2 +- packages/extension-gapcursor/CHANGELOG.md | 8 ++++++++ packages/extension-gapcursor/package.json | 2 +- packages/extension-hard-break/CHANGELOG.md | 8 ++++++++ packages/extension-hard-break/package.json | 2 +- packages/extension-highlight/CHANGELOG.md | 8 ++++++++ packages/extension-highlight/package.json | 2 +- packages/extension-horizontal-rule/CHANGELOG.md | 11 +++++++++++ packages/extension-horizontal-rule/package.json | 2 +- packages/html/CHANGELOG.md | 8 ++++++++ packages/html/package.json | 4 ++-- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 6 +++--- packages/starter-kit/CHANGELOG.md | 8 ++++++++ packages/starter-kit/package.json | 10 +++++----- packages/vue-2/CHANGELOG.md | 8 ++++++++ packages/vue-2/package.json | 6 +++--- packages/vue-3/CHANGELOG.md | 8 ++++++++ packages/vue-3/package.json | 6 +++--- 24 files changed, 122 insertions(+), 23 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 730331e1..6248bda2 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.114...@tiptap/core@2.0.0-beta.115) (2021-09-29) + +**Note:** Version bump only for package @tiptap/core + + + + + # [2.0.0-beta.114](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.113...@tiptap/core@2.0.0-beta.114) (2021-09-28) diff --git a/packages/core/package.json b/packages/core/package.json index f6fb8969..6a630740 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/core", "description": "headless rich text editor", - "version": "2.0.0-beta.114", + "version": "2.0.0-beta.115", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-bubble-menu/CHANGELOG.md b/packages/extension-bubble-menu/CHANGELOG.md index 0a39314d..c68548df 100644 --- a/packages/extension-bubble-menu/CHANGELOG.md +++ b/packages/extension-bubble-menu/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.38](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.37...@tiptap/extension-bubble-menu@2.0.0-beta.38) (2021-09-29) + +**Note:** Version bump only for package @tiptap/extension-bubble-menu + + + + + # [2.0.0-beta.37](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.36...@tiptap/extension-bubble-menu@2.0.0-beta.37) (2021-09-28) **Note:** Version bump only for package @tiptap/extension-bubble-menu diff --git a/packages/extension-bubble-menu/package.json b/packages/extension-bubble-menu/package.json index 4115409e..3b86752a 100644 --- a/packages/extension-bubble-menu/package.json +++ b/packages/extension-bubble-menu/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-bubble-menu", "description": "bubble-menu extension for tiptap", - "version": "2.0.0-beta.37", + "version": "2.0.0-beta.38", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-floating-menu/CHANGELOG.md b/packages/extension-floating-menu/CHANGELOG.md index 975d6228..7e1ecfdc 100644 --- a/packages/extension-floating-menu/CHANGELOG.md +++ b/packages/extension-floating-menu/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.32](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.31...@tiptap/extension-floating-menu@2.0.0-beta.32) (2021-09-29) + +**Note:** Version bump only for package @tiptap/extension-floating-menu + + + + + # [2.0.0-beta.31](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.30...@tiptap/extension-floating-menu@2.0.0-beta.31) (2021-09-28) **Note:** Version bump only for package @tiptap/extension-floating-menu diff --git a/packages/extension-floating-menu/package.json b/packages/extension-floating-menu/package.json index f93bf64d..0f003c2f 100644 --- a/packages/extension-floating-menu/package.json +++ b/packages/extension-floating-menu/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-floating-menu", "description": "floating-menu extension for tiptap", - "version": "2.0.0-beta.31", + "version": "2.0.0-beta.32", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-gapcursor/CHANGELOG.md b/packages/extension-gapcursor/CHANGELOG.md index c70877c8..17a8d563 100644 --- a/packages/extension-gapcursor/CHANGELOG.md +++ b/packages/extension-gapcursor/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.23](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.22...@tiptap/extension-gapcursor@2.0.0-beta.23) (2021-09-29) + +**Note:** Version bump only for package @tiptap/extension-gapcursor + + + + + # [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.21...@tiptap/extension-gapcursor@2.0.0-beta.22) (2021-09-28) **Note:** Version bump only for package @tiptap/extension-gapcursor diff --git a/packages/extension-gapcursor/package.json b/packages/extension-gapcursor/package.json index aa2aaac3..0b900f16 100644 --- a/packages/extension-gapcursor/package.json +++ b/packages/extension-gapcursor/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-gapcursor", "description": "gapcursor extension for tiptap", - "version": "2.0.0-beta.22", + "version": "2.0.0-beta.23", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-hard-break/CHANGELOG.md b/packages/extension-hard-break/CHANGELOG.md index cc6de08f..85af41de 100644 --- a/packages/extension-hard-break/CHANGELOG.md +++ b/packages/extension-hard-break/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.19...@tiptap/extension-hard-break@2.0.0-beta.20) (2021-09-29) + +**Note:** Version bump only for package @tiptap/extension-hard-break + + + + + # [2.0.0-beta.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.18...@tiptap/extension-hard-break@2.0.0-beta.19) (2021-09-28) **Note:** Version bump only for package @tiptap/extension-hard-break diff --git a/packages/extension-hard-break/package.json b/packages/extension-hard-break/package.json index d7474107..b47a2667 100644 --- a/packages/extension-hard-break/package.json +++ b/packages/extension-hard-break/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-hard-break", "description": "hard break extension for tiptap", - "version": "2.0.0-beta.19", + "version": "2.0.0-beta.20", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-highlight/CHANGELOG.md b/packages/extension-highlight/CHANGELOG.md index 2e87488c..f3e92e3f 100644 --- a/packages/extension-highlight/CHANGELOG.md +++ b/packages/extension-highlight/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.19...@tiptap/extension-highlight@2.0.0-beta.20) (2021-09-29) + +**Note:** Version bump only for package @tiptap/extension-highlight + + + + + # [2.0.0-beta.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.18...@tiptap/extension-highlight@2.0.0-beta.19) (2021-09-28) **Note:** Version bump only for package @tiptap/extension-highlight diff --git a/packages/extension-highlight/package.json b/packages/extension-highlight/package.json index de277936..5bb81770 100644 --- a/packages/extension-highlight/package.json +++ b/packages/extension-highlight/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-highlight", "description": "highlight extension for tiptap", - "version": "2.0.0-beta.19", + "version": "2.0.0-beta.20", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-horizontal-rule/CHANGELOG.md b/packages/extension-horizontal-rule/CHANGELOG.md index 8f056d4c..e64ada4f 100644 --- a/packages/extension-horizontal-rule/CHANGELOG.md +++ b/packages/extension-horizontal-rule/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.19...@tiptap/extension-horizontal-rule@2.0.0-beta.20) (2021-09-29) + + +### Bug Fixes + +* remove node before hr if itโ€™s an empty text block, fix [#1665](https://github.com/ueberdosis/tiptap/issues/1665) ([4151e2f](https://github.com/ueberdosis/tiptap/commit/4151e2fd81ae6c007d32b72ac41feac3c81e438b)) + + + + + # [2.0.0-beta.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.18...@tiptap/extension-horizontal-rule@2.0.0-beta.19) (2021-08-12) diff --git a/packages/extension-horizontal-rule/package.json b/packages/extension-horizontal-rule/package.json index b30a8323..94aec61d 100644 --- a/packages/extension-horizontal-rule/package.json +++ b/packages/extension-horizontal-rule/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-horizontal-rule", "description": "horizontal rule extension for tiptap", - "version": "2.0.0-beta.19", + "version": "2.0.0-beta.20", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/html/CHANGELOG.md b/packages/html/CHANGELOG.md index 544f5277..155827ee 100644 --- a/packages/html/CHANGELOG.md +++ b/packages/html/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.114](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.113...@tiptap/html@2.0.0-beta.114) (2021-09-29) + +**Note:** Version bump only for package @tiptap/html + + + + + # [2.0.0-beta.113](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.112...@tiptap/html@2.0.0-beta.113) (2021-09-28) **Note:** Version bump only for package @tiptap/html diff --git a/packages/html/package.json b/packages/html/package.json index 56441463..b583eccb 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/html", "description": "utility package to render tiptap JSON as HTML", - "version": "2.0.0-beta.113", + "version": "2.0.0-beta.114", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.114", + "@tiptap/core": "^2.0.0-beta.115", "hostic-dom": "^0.8.7", "prosemirror-model": "^1.14.3" }, diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index fb2fe637..948b8afd 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.75](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.74...@tiptap/react@2.0.0-beta.75) (2021-09-29) + +**Note:** Version bump only for package @tiptap/react + + + + + # [2.0.0-beta.74](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.73...@tiptap/react@2.0.0-beta.74) (2021-09-28) **Note:** Version bump only for package @tiptap/react diff --git a/packages/react/package.json b/packages/react/package.json index 65f99991..da9587c5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/react", "description": "React components for tiptap", - "version": "2.0.0-beta.74", + "version": "2.0.0-beta.75", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -32,8 +32,8 @@ "react-dom": "^17.0.0" }, "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.37", - "@tiptap/extension-floating-menu": "^2.0.0-beta.31", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.38", + "@tiptap/extension-floating-menu": "^2.0.0-beta.32", "prosemirror-view": "^1.20.1" }, "repository": { diff --git a/packages/starter-kit/CHANGELOG.md b/packages/starter-kit/CHANGELOG.md index f4d5e79a..b6c2ce59 100644 --- a/packages/starter-kit/CHANGELOG.md +++ b/packages/starter-kit/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.114](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.113...@tiptap/starter-kit@2.0.0-beta.114) (2021-09-29) + +**Note:** Version bump only for package @tiptap/starter-kit + + + + + # [2.0.0-beta.113](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.112...@tiptap/starter-kit@2.0.0-beta.113) (2021-09-28) **Note:** Version bump only for package @tiptap/starter-kit diff --git a/packages/starter-kit/package.json b/packages/starter-kit/package.json index df301d60..12017afa 100644 --- a/packages/starter-kit/package.json +++ b/packages/starter-kit/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/starter-kit", "description": "starter kit for tiptap", - "version": "2.0.0-beta.113", + "version": "2.0.0-beta.114", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.114", + "@tiptap/core": "^2.0.0-beta.115", "@tiptap/extension-blockquote": "^2.0.0-beta.15", "@tiptap/extension-bold": "^2.0.0-beta.15", "@tiptap/extension-bullet-list": "^2.0.0-beta.15", @@ -29,11 +29,11 @@ "@tiptap/extension-code-block": "^2.0.0-beta.18", "@tiptap/extension-document": "^2.0.0-beta.13", "@tiptap/extension-dropcursor": "^2.0.0-beta.19", - "@tiptap/extension-gapcursor": "^2.0.0-beta.22", - "@tiptap/extension-hard-break": "^2.0.0-beta.19", + "@tiptap/extension-gapcursor": "^2.0.0-beta.23", + "@tiptap/extension-hard-break": "^2.0.0-beta.20", "@tiptap/extension-heading": "^2.0.0-beta.15", "@tiptap/extension-history": "^2.0.0-beta.16", - "@tiptap/extension-horizontal-rule": "^2.0.0-beta.19", + "@tiptap/extension-horizontal-rule": "^2.0.0-beta.20", "@tiptap/extension-italic": "^2.0.0-beta.15", "@tiptap/extension-list-item": "^2.0.0-beta.14", "@tiptap/extension-ordered-list": "^2.0.0-beta.16", diff --git a/packages/vue-2/CHANGELOG.md b/packages/vue-2/CHANGELOG.md index a2049f5c..414c8c89 100644 --- a/packages/vue-2/CHANGELOG.md +++ b/packages/vue-2/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.56](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.55...@tiptap/vue-2@2.0.0-beta.56) (2021-09-29) + +**Note:** Version bump only for package @tiptap/vue-2 + + + + + # [2.0.0-beta.55](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.54...@tiptap/vue-2@2.0.0-beta.55) (2021-09-28) **Note:** Version bump only for package @tiptap/vue-2 diff --git a/packages/vue-2/package.json b/packages/vue-2/package.json index 6f535a46..5e51a4a7 100644 --- a/packages/vue-2/package.json +++ b/packages/vue-2/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/vue-2", "description": "Vue components for tiptap", - "version": "2.0.0-beta.55", + "version": "2.0.0-beta.56", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -28,8 +28,8 @@ "vue": "^2.6.0" }, "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.37", - "@tiptap/extension-floating-menu": "^2.0.0-beta.31", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.38", + "@tiptap/extension-floating-menu": "^2.0.0-beta.32", "prosemirror-view": "^1.20.1" }, "repository": { diff --git a/packages/vue-3/CHANGELOG.md b/packages/vue-3/CHANGELOG.md index 46cba43a..30bbe150 100644 --- a/packages/vue-3/CHANGELOG.md +++ b/packages/vue-3/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.66](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.65...@tiptap/vue-3@2.0.0-beta.66) (2021-09-29) + +**Note:** Version bump only for package @tiptap/vue-3 + + + + + # [2.0.0-beta.65](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.64...@tiptap/vue-3@2.0.0-beta.65) (2021-09-28) **Note:** Version bump only for package @tiptap/vue-3 diff --git a/packages/vue-3/package.json b/packages/vue-3/package.json index 9a3e3bc1..91163a48 100644 --- a/packages/vue-3/package.json +++ b/packages/vue-3/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/vue-3", "description": "Vue components for tiptap", - "version": "2.0.0-beta.65", + "version": "2.0.0-beta.66", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -28,8 +28,8 @@ "vue": "^3.0.0" }, "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.37", - "@tiptap/extension-floating-menu": "^2.0.0-beta.31", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.38", + "@tiptap/extension-floating-menu": "^2.0.0-beta.32", "prosemirror-state": "^1.3.4", "prosemirror-view": "^1.20.1" }, From 54e85fd28491fcf2d5a88fb5abda1f8414ada92b Mon Sep 17 00:00:00 2001 From: HuiiBuh <46561026+HuiiBuh@users.noreply.github.com> Date: Thu, 30 Sep 2021 09:25:40 +0200 Subject: [PATCH 04/17] feat: #1898 Made the EventEmitter generic to improve the types of the tiptap events (#1959) --- .gitignore | 2 ++ packages/core/src/Editor.ts | 6 +++--- packages/core/src/EventEmitter.ts | 12 ++++++++---- packages/core/src/types.ts | 31 +++++++++++++++++++++---------- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index fabfc461..68e25220 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ yarn-error.log* tests/cypress/videos /tests/cypress/screenshots +# Ignore intellij project files +.idea diff --git a/packages/core/src/Editor.ts b/packages/core/src/Editor.ts index c71ffb5c..c242e497 100644 --- a/packages/core/src/Editor.ts +++ b/packages/core/src/Editor.ts @@ -23,7 +23,7 @@ import { CanCommands, ChainedCommands, SingleCommands, - TextSerializer, + TextSerializer, EditorEvents, } from './types' import * as extensions from './extensions' import style from './style' @@ -34,7 +34,7 @@ export interface HTMLElement { editor?: Editor } -export class Editor extends EventEmitter { +export class Editor extends EventEmitter { private commandManager!: CommandManager @@ -195,7 +195,7 @@ export class Editor extends EventEmitter { /** * Unregister a ProseMirror plugin. * - * @param name The plugins name + * @param nameOrPluginKey The plugins name */ public unregisterPlugin(nameOrPluginKey: string | PluginKey): void { if (this.isDestroyed) { diff --git a/packages/core/src/EventEmitter.ts b/packages/core/src/EventEmitter.ts index e7eb8a7b..68777c93 100644 --- a/packages/core/src/EventEmitter.ts +++ b/packages/core/src/EventEmitter.ts @@ -1,8 +1,12 @@ -export default class EventEmitter { +type StringKeyOf = Extract; +type CallbackType, EVENT extends StringKeyOf> = T[EVENT] extends any[] ? T[EVENT] : [T[EVENT]]; +type CallbackFunction, EVENT extends StringKeyOf> = (...props: CallbackType) => any + +export default class EventEmitter> { private callbacks: { [key: string]: Function[] } = {} - public on(event: string, fn: Function): this { + public on>(event: EVENT, fn: CallbackFunction): this { if (!this.callbacks[event]) { this.callbacks[event] = [] } @@ -12,7 +16,7 @@ export default class EventEmitter { return this } - protected emit(event: string, ...args: any): this { + protected emit>(event: EVENT, ...args: CallbackType): this { const callbacks = this.callbacks[event] if (callbacks) { @@ -22,7 +26,7 @@ export default class EventEmitter { return this } - public off(event: string, fn?: Function): this { + public off>(event: EVENT, fn?: CallbackFunction): this { const callbacks = this.callbacks[event] if (callbacks) { diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 25682574..454639f7 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -39,6 +39,17 @@ export type MaybeReturnType = T extends (...args: any) => any ? ReturnType : T +export interface EditorEvents { + beforeCreate: { editor: Editor } + create: { editor: Editor } + update: { editor: Editor, transaction: Transaction } + selectionUpdate: { editor: Editor, transaction: Transaction } + transaction: { editor: Editor, transaction: Transaction } + focus: { editor: Editor, event: FocusEvent, transaction: Transaction } + blur: { editor: Editor, event: FocusEvent, transaction: Transaction } + destroy: void +} + export interface EditorOptions { element: Element, content: Content, @@ -51,14 +62,14 @@ export interface EditorOptions { enableInputRules: boolean, enablePasteRules: boolean, enableCoreExtensions: boolean, - onBeforeCreate: (props: { editor: Editor }) => void, - onCreate: (props: { editor: Editor }) => void, - onUpdate: (props: { editor: Editor, transaction: Transaction }) => void, - onSelectionUpdate: (props: { editor: Editor, transaction: Transaction }) => void, - onTransaction: (props: { editor: Editor, transaction: Transaction }) => void, - onFocus: (props: { editor: Editor, event: FocusEvent, transaction: Transaction }) => void, - onBlur: (props: { editor: Editor, event: FocusEvent, transaction: Transaction }) => void, - onDestroy: () => void, + onBeforeCreate: (props: EditorEvents['beforeCreate']) => void, + onCreate: (props: EditorEvents['create']) => void, + onUpdate: (props: EditorEvents['update']) => void, + onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void, + onTransaction: (props: EditorEvents['transaction']) => void, + onFocus: (props: EditorEvents['focus']) => void, + onBlur: (props: EditorEvents['blur']) => void, + onDestroy: (props: EditorEvents['destroy']) => void, } export type HTMLContent = string @@ -122,7 +133,7 @@ export type GlobalAttributes = { export type PickValue = T[K] -export type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I)=>void) +export type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never @@ -133,7 +144,7 @@ export type Overwrite = Pick> & U; export type ValuesOf = T[keyof T]; -export type KeysWithTypeOf = ({[P in keyof T]: T[P] extends Type ? P : never })[keyof T] +export type KeysWithTypeOf = ({ [P in keyof T]: T[P] extends Type ? P : never })[keyof T] export type NodeViewProps = { editor: Editor, From 8db5a943d281d259cab997a2570441ecbb9bd4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 09:34:45 +0200 Subject: [PATCH 05/17] refactoring --- packages/core/src/Editor.ts | 3 ++- packages/core/src/EventEmitter.ts | 18 ++++++++++++------ packages/core/src/types.ts | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/core/src/Editor.ts b/packages/core/src/Editor.ts index c242e497..dfa947dc 100644 --- a/packages/core/src/Editor.ts +++ b/packages/core/src/Editor.ts @@ -23,7 +23,8 @@ import { CanCommands, ChainedCommands, SingleCommands, - TextSerializer, EditorEvents, + TextSerializer, + EditorEvents, } from './types' import * as extensions from './extensions' import style from './style' diff --git a/packages/core/src/EventEmitter.ts b/packages/core/src/EventEmitter.ts index 68777c93..56ba9886 100644 --- a/packages/core/src/EventEmitter.ts +++ b/packages/core/src/EventEmitter.ts @@ -1,12 +1,18 @@ -type StringKeyOf = Extract; -type CallbackType, EVENT extends StringKeyOf> = T[EVENT] extends any[] ? T[EVENT] : [T[EVENT]]; -type CallbackFunction, EVENT extends StringKeyOf> = (...props: CallbackType) => any +type StringKeyOf = Extract +type CallbackType< + T extends Record, + EventName extends StringKeyOf, +> = T[EventName] extends any[] ? T[EventName] : [T[EventName]] +type CallbackFunction< + T extends Record, + EventName extends StringKeyOf, +> = (...props: CallbackType) => any export default class EventEmitter> { private callbacks: { [key: string]: Function[] } = {} - public on>(event: EVENT, fn: CallbackFunction): this { + public on>(event: EventName, fn: CallbackFunction): this { if (!this.callbacks[event]) { this.callbacks[event] = [] } @@ -16,7 +22,7 @@ export default class EventEmitter> { return this } - protected emit>(event: EVENT, ...args: CallbackType): this { + protected emit>(event: EventName, ...args: CallbackType): this { const callbacks = this.callbacks[event] if (callbacks) { @@ -26,7 +32,7 @@ export default class EventEmitter> { return this } - public off>(event: EVENT, fn?: CallbackFunction): this { + public off>(event: EventName, fn?: CallbackFunction): this { const callbacks = this.callbacks[event] if (callbacks) { diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 454639f7..712528b1 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -140,9 +140,9 @@ export type UnionToIntersection = (U extends any ? (k: U) => void : never) ex export type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T] -export type Overwrite = Pick> & U; +export type Overwrite = Pick> & U -export type ValuesOf = T[keyof T]; +export type ValuesOf = T[keyof T] export type KeysWithTypeOf = ({ [P in keyof T]: T[P] extends Type ? P : never })[keyof T] From e61521c858945c6af4246713575219188c3ab164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 09:38:57 +0200 Subject: [PATCH 06/17] refactoring --- packages/core/src/types.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 712528b1..a0d6f129 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -40,14 +40,14 @@ export type MaybeReturnType = T extends (...args: any) => any : T export interface EditorEvents { - beforeCreate: { editor: Editor } - create: { editor: Editor } - update: { editor: Editor, transaction: Transaction } - selectionUpdate: { editor: Editor, transaction: Transaction } - transaction: { editor: Editor, transaction: Transaction } - focus: { editor: Editor, event: FocusEvent, transaction: Transaction } - blur: { editor: Editor, event: FocusEvent, transaction: Transaction } - destroy: void + beforeCreate: { editor: Editor }, + create: { editor: Editor }, + update: { editor: Editor, transaction: Transaction }, + selectionUpdate: { editor: Editor, transaction: Transaction }, + transaction: { editor: Editor, transaction: Transaction }, + focus: { editor: Editor, event: FocusEvent, transaction: Transaction }, + blur: { editor: Editor, event: FocusEvent, transaction: Transaction }, + destroy: void, } export interface EditorOptions { From e0f77b8fd6fedbd2afca9bf756c581bc4d148064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 09:41:27 +0200 Subject: [PATCH 07/17] dependencies: update --- demos/package.json | 10 +- package.json | 8 +- packages/core/package.json | 2 +- packages/react/package.json | 2 +- yarn.lock | 196 ++++++++++++++++++++++-------------- 5 files changed, 130 insertions(+), 88 deletions(-) diff --git a/demos/package.json b/demos/package.json index 08739366..276c12c3 100644 --- a/demos/package.json +++ b/demos/package.json @@ -9,7 +9,7 @@ "ts": "tsc --project tsconfig.base.json --noEmit && tsc --project tsconfig.react.json --noEmit && tsc --project tsconfig.vue-2.json --noEmit && tsc --project tsconfig.vue-3.json --noEmit" }, "dependencies": { - "d3": "^7.0.3", + "d3": "^7.0.4", "remixicon": "^2.5.0", "shiki": "^0.9.11", "simplify-js": "^1.2.4", @@ -21,15 +21,15 @@ "devDependencies": { "@types/uuid": "^8.3.1", "@vitejs/plugin-react-refresh": "^1.3.6", - "@vitejs/plugin-vue": "^1.9.0", - "autoprefixer": "^10.3.5", + "@vitejs/plugin-vue": "^1.9.2", + "autoprefixer": "^10.3.6", "globby": "^12.0.2", "iframe-resizer": "^4.3.2", - "postcss": "^8.3.7", + "postcss": "^8.3.8", "react": "^17.0.2", "react-dom": "^17.0.2", "sass": "^1.42.1", - "tailwindcss": "^2.2.15", + "tailwindcss": "^2.2.16", "typescript": "^4.4.3", "uuid": "^8.3.2", "vite": "^2.5.10", diff --git a/package.json b/package.json index 28ec2340..1f699e84 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,10 @@ "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.5", - "@typescript-eslint/eslint-plugin": "^4.31.2", - "@typescript-eslint/parser": "^4.31.2", + "@typescript-eslint/eslint-plugin": "^4.32.0", + "@typescript-eslint/parser": "^4.32.0", "babel-loader": "^8.2.2", - "cypress": "^8.4.1", + "cypress": "^8.5.0", "eslint": "^7.32.0", "eslint-config-airbnb-base": "^14.2.0", "eslint-plugin-cypress": "^2.12.1", @@ -54,6 +54,6 @@ "rollup-plugin-typescript2": "^0.30.0", "ts-loader": "^9.2.6", "typescript": "^4.4.3", - "webpack": "^5.53.0" + "webpack": "^5.55.1" } } diff --git a/packages/core/package.json b/packages/core/package.json index 6a630740..3d907dd0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -38,7 +38,7 @@ "prosemirror-model": "^1.14.3", "prosemirror-schema-list": "^1.1.6", "prosemirror-state": "^1.3.4", - "prosemirror-transform": "^1.3.2", + "prosemirror-transform": "^1.3.3", "prosemirror-view": "^1.20.1" }, "repository": { diff --git a/packages/react/package.json b/packages/react/package.json index da9587c5..075905c5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -21,7 +21,7 @@ "dist" ], "devDependencies": { - "@types/react": "^17.0.24", + "@types/react": "^17.0.25", "@types/react-dom": "^17.0.7", "react": "^17.0.0", "react-dom": "^17.0.0" diff --git a/yarn.lock b/yarn.lock index 4c692b25..9ea7080d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2166,7 +2166,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^17.0.24": +"@types/react@*": version "17.0.24" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.24.tgz#7e1b3f78d0fc53782543f9bce6d949959a5880bd" integrity sha512-eIpyco99gTH+FTI3J7Oi/OH8MZoFMJuztNRimDOJwH4iGIsKV2qkGnk4M9VzlaVWeEEWLWSQRy0FEA0Kz218cg== @@ -2175,6 +2175,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^17.0.25": + version "17.0.25" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.25.tgz#8b88c226e54910762decc9de2aa36b4dc9240503" + integrity sha512-IXrzSOr3CVbEQgmjEdCWF57J7CVaJ7lL/n4penxHm8h0XIcr0AxqGucogh2zj3qRxgk4M4JImOP/MfomkPOhvQ== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" @@ -2209,73 +2218,74 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.2.tgz#9f41efaee32cdab7ace94b15bd19b756dd099b0a" - integrity sha512-w63SCQ4bIwWN/+3FxzpnWrDjQRXVEGiTt9tJTRptRXeFvdZc/wLiz3FQUwNQ2CVoRGI6KUWMNUj/pk63noUfcA== +"@typescript-eslint/eslint-plugin@^4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.32.0.tgz#46d2370ae9311092f2a6f7246d28357daf2d4e89" + integrity sha512-+OWTuWRSbWI1KDK8iEyG/6uK2rTm3kpS38wuVifGUTDB6kjEuNrzBI1MUtxnkneuWG/23QehABe2zHHrj+4yuA== dependencies: - "@typescript-eslint/experimental-utils" "4.31.2" - "@typescript-eslint/scope-manager" "4.31.2" + "@typescript-eslint/experimental-utils" "4.32.0" + "@typescript-eslint/scope-manager" "4.32.0" debug "^4.3.1" functional-red-black-tree "^1.0.1" + ignore "^5.1.8" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.2.tgz#98727a9c1e977dd5d20c8705e69cd3c2a86553fa" - integrity sha512-3tm2T4nyA970yQ6R3JZV9l0yilE2FedYg8dcXrTar34zC9r6JB7WyBQbpIVongKPlhEMjhQ01qkwrzWy38Bk1Q== +"@typescript-eslint/experimental-utils@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.32.0.tgz#53a8267d16ca5a79134739129871966c56a59dc4" + integrity sha512-WLoXcc+cQufxRYjTWr4kFt0DyEv6hDgSaFqYhIzQZ05cF+kXfqXdUh+//kgquPJVUBbL3oQGKQxwPbLxHRqm6A== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.31.2" - "@typescript-eslint/types" "4.31.2" - "@typescript-eslint/typescript-estree" "4.31.2" + "@typescript-eslint/scope-manager" "4.32.0" + "@typescript-eslint/types" "4.32.0" + "@typescript-eslint/typescript-estree" "4.32.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.31.2.tgz#54aa75986e3302d91eff2bbbaa6ecfa8084e9c34" - integrity sha512-EcdO0E7M/sv23S/rLvenHkb58l3XhuSZzKf6DBvLgHqOYdL6YFMYVtreGFWirxaU2mS1GYDby3Lyxco7X5+Vjw== +"@typescript-eslint/parser@^4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.32.0.tgz#751ecca0e2fecd3d44484a9b3049ffc1871616e5" + integrity sha512-lhtYqQ2iEPV5JqV7K+uOVlPePjClj4dOw7K4/Z1F2yvjIUvyr13yJnDzkK6uon4BjHYuHy3EG0c2Z9jEhFk56w== dependencies: - "@typescript-eslint/scope-manager" "4.31.2" - "@typescript-eslint/types" "4.31.2" - "@typescript-eslint/typescript-estree" "4.31.2" + "@typescript-eslint/scope-manager" "4.32.0" + "@typescript-eslint/types" "4.32.0" + "@typescript-eslint/typescript-estree" "4.32.0" debug "^4.3.1" -"@typescript-eslint/scope-manager@4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.31.2.tgz#1d528cb3ed3bcd88019c20a57c18b897b073923a" - integrity sha512-2JGwudpFoR/3Czq6mPpE8zBPYdHWFGL6lUNIGolbKQeSNv4EAiHaR5GVDQaLA0FwgcdcMtRk+SBJbFGL7+La5w== +"@typescript-eslint/scope-manager@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz#e03c8668f8b954072b3f944d5b799c0c9225a7d5" + integrity sha512-DK+fMSHdM216C0OM/KR1lHXjP1CNtVIhJ54kQxfOE6x8UGFAjha8cXgDMBEIYS2XCYjjCtvTkjQYwL3uvGOo0w== dependencies: - "@typescript-eslint/types" "4.31.2" - "@typescript-eslint/visitor-keys" "4.31.2" + "@typescript-eslint/types" "4.32.0" + "@typescript-eslint/visitor-keys" "4.32.0" -"@typescript-eslint/types@4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.31.2.tgz#2aea7177d6d744521a168ed4668eddbd912dfadf" - integrity sha512-kWiTTBCTKEdBGrZKwFvOlGNcAsKGJSBc8xLvSjSppFO88AqGxGNYtF36EuEYG6XZ9vT0xX8RNiHbQUKglbSi1w== +"@typescript-eslint/types@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.32.0.tgz#52c633c18da47aee09449144bf59565ab36df00d" + integrity sha512-LE7Z7BAv0E2UvqzogssGf1x7GPpUalgG07nGCBYb1oK4mFsOiFC/VrSMKbZQzFJdN2JL5XYmsx7C7FX9p9ns0w== -"@typescript-eslint/typescript-estree@4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.2.tgz#abfd50594d8056b37e7428df3b2d185ef2d0060c" - integrity sha512-ieBq8U9at6PvaC7/Z6oe8D3czeW5d//Fo1xkF/s9394VR0bg/UaMYPdARiWyKX+lLEjY3w/FNZJxitMsiWv+wA== +"@typescript-eslint/typescript-estree@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.32.0.tgz#db00ccc41ccedc8d7367ea3f50c6994b8efa9f3b" + integrity sha512-tRYCgJ3g1UjMw1cGG8Yn1KzOzNlQ6u1h9AmEtPhb5V5a1TmiHWcRyF/Ic+91M4f43QeChyYlVTcf3DvDTZR9vw== dependencies: - "@typescript-eslint/types" "4.31.2" - "@typescript-eslint/visitor-keys" "4.31.2" + "@typescript-eslint/types" "4.32.0" + "@typescript-eslint/visitor-keys" "4.32.0" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.2.tgz#7d5b4a4705db7fe59ecffb273c1d082760f635cc" - integrity sha512-PrBId7EQq2Nibns7dd/ch6S6/M4/iwLM9McbgeEbCXfxdwRUNxJ4UNreJ6Gh3fI2GNKNrWnQxKL7oCPmngKBug== +"@typescript-eslint/visitor-keys@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.32.0.tgz#455ba8b51242f2722a497ffae29313f33b14cb7f" + integrity sha512-e7NE0qz8W+atzv3Cy9qaQ7BTLwWsm084Z0c4nIO2l3Bp6u9WIgdqCgyPyV5oSPDMIW3b20H59OOCmVk3jw3Ptw== dependencies: - "@typescript-eslint/types" "4.31.2" + "@typescript-eslint/types" "4.32.0" eslint-visitor-keys "^2.0.0" "@vitejs/plugin-react-refresh@^1.3.6": @@ -2289,10 +2299,10 @@ "@rollup/pluginutils" "^4.1.1" react-refresh "^0.10.0" -"@vitejs/plugin-vue@^1.9.0": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.9.1.tgz#69a92d066f7fabde656c5a9ed983bf8c066bcd8b" - integrity sha512-9YuxaU2nLoSS/S1Ep4QTG/pEIh96LlauNM1g7LN/EOJ14Nj8HBeSy1OL26ydxb+MPhKn5XKGARh5wQF0UjHbLw== +"@vitejs/plugin-vue@^1.9.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.9.2.tgz#7234efb8c3c3d60c7eac350a935074ab1820ae0e" + integrity sha512-QnUQJvGmY+YT9xTidLcjr6NAjKWNdSuul1M+BZ6uwTQaO5vpAY9USBncXESATk742dYMZGJenegJgeJhG/HMNQ== "@vue/compiler-core@3.2.16": version "3.2.16" @@ -2824,15 +2834,15 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@^10.3.5: - version "10.3.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.5.tgz#762e6c13e30c5a0e650bf81d9ffd5713f1c8f344" - integrity sha512-2H5kQSsyoOMdIehTzIt/sC9ZDIgWqlkG/dbevm9B9xQZ1TDPBHpNUDW5ENqqQQzuaBWEo75JkV0LJe+o5Lnr5g== +autoprefixer@^10.3.6: + version "10.3.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.6.tgz#537c8a046e32ec46bfe528bcc9e2a5f2d87cd4c4" + integrity sha512-3bDjTfF0MfZntwVCSd18XAT2Zndufh3Mep+mafbzdIQEeWbncVRUVDjH8/EPANV9Hq40seJ24QcYAyhUsFz7gQ== dependencies: browserslist "^4.17.1" - caniuse-lite "^1.0.30001259" + caniuse-lite "^1.0.30001260" fraction.js "^4.1.1" - nanocolors "^0.1.5" + nanocolors "^0.2.8" normalize-range "^0.1.2" postcss-value-parser "^4.1.0" @@ -3088,6 +3098,11 @@ caniuse-lite@^1.0.30001259: dependencies: nanocolors "^0.1.0" +caniuse-lite@^1.0.30001260: + version "1.0.30001261" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001261.tgz#96d89813c076ea061209a4e040d8dcf0c66a1d01" + integrity sha512-vM8D9Uvp7bHIN0fZ2KQ4wnmYFpJo/Etb4Vwsuc+ka0tfGDHvOPrFm6S/7CCNLSOkAUjenT2HnUPESdOIL91FaA== + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -3528,10 +3543,10 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.9.tgz#6410af31b26bd0520933d02cbc64fce9ce3fbf0b" integrity sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw== -cypress@^8.4.1: - version "8.4.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.4.1.tgz#8b5898bf49359cadc28f02ba05d51f63b8e3a717" - integrity sha512-itJXq0Vx3sXCUrDyBi2IUrkxVu/gTTp1VhjB5tzGgkeCR8Ae+/T8WV63rsZ7fS8Tpq7LPPXiyoM/sEdOX7cR6A== +cypress@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.5.0.tgz#5712ca170913f8344bf167301205c4217c1eb9bd" + integrity sha512-MMkXIS+Ro2KETn4gAlG3tIc/7FiljuuCZP0zpd9QsRG6MZSyZW/l1J3D4iQM6WHsVxuX4rFChn5jPFlC2tNSvQ== dependencies: "@cypress/request" "^2.88.6" "@cypress/xvfb" "^1.2.4" @@ -3567,6 +3582,7 @@ cypress@^8.4.1: minimist "^1.2.5" ospath "^1.2.2" pretty-bytes "^5.6.0" + proxy-from-env "1.0.0" ramda "~0.27.1" request-progress "^3.0.0" supports-color "^8.1.1" @@ -3783,10 +3799,10 @@ d3-zoom@3: d3-selection "2 - 3" d3-transition "2 - 3" -d3@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/d3/-/d3-7.0.3.tgz#5c100c0522fedadc2aec43243b16e881e8c07143" - integrity sha512-BEQCpEXI+Z9OnnlXLaS6txoYZZvvXuRyjZoudPuAnWGVOzHxGWC0TL8XRUs7V7IeZQPLfvGztcl54+jgOe122g== +d3@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/d3/-/d3-7.0.4.tgz#37dfeb3b526f64a0de2ddb705ea61649325207bd" + integrity sha512-ruRiyPYZEGeJBOOjVS5pHliNUZM2HAllEY7HKB2ff+9ENxOti4N+S+WZqo9ggUMr8tSPMm+riqKpJd1oYEDN5Q== dependencies: d3-array "3" d3-axis "3" @@ -4113,7 +4129,7 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.8.0: +enhanced-resolve@^5.0.0, enhanced-resolve@^5.8.3: version "5.8.3" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0" integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA== @@ -4196,10 +4212,10 @@ es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-module-lexer@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.7.1.tgz#c2c8e0f46f2df06274cdaf0dd3f3b33e0a0b267d" - integrity sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw== +es-module-lexer@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.1.tgz#f203bf394a630a552d381acf01a17ef08843b140" + integrity sha512-17Ed9misDnpyNBJh63g1OhW3qUFecDgGOivI85JeZY/LGhDum8e+cltukbkSK8pcJnXXEkya56sp4vSS1nzoUw== es-to-primitive@^1.2.1: version "1.2.1" @@ -6304,6 +6320,11 @@ nanocolors@^0.1.0, nanocolors@^0.1.5: resolved "https://registry.yarnpkg.com/nanocolors/-/nanocolors-0.1.12.tgz#8577482c58cbd7b5bb1681db4cf48f11a87fd5f6" integrity sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ== +nanocolors@^0.2.2, nanocolors@^0.2.8: + version "0.2.12" + resolved "https://registry.yarnpkg.com/nanocolors/-/nanocolors-0.2.12.tgz#4d05932e70116078673ea4cc6699a1c56cc77777" + integrity sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug== + nanoid@^3.1.25: version "3.1.25" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" @@ -6978,7 +6999,7 @@ postcss-value-parser@^4.1.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^8.1.10, postcss@^8.1.6, postcss@^8.2.1, postcss@^8.3.6, postcss@^8.3.7: +postcss@^8.1.10, postcss@^8.1.6, postcss@^8.2.1, postcss@^8.3.6: version "8.3.7" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.7.tgz#ec88563588c8da8e58e7226f7633b51ae221eeda" integrity sha512-9SaY7nnyQ63/WittqZYAvkkYPyKxchMKH71UDzeTmWuLSvxTRpeEeABZAzlCi55cuGcoFyoV/amX2BdsafQidQ== @@ -6987,6 +7008,15 @@ postcss@^8.1.10, postcss@^8.1.6, postcss@^8.2.1, postcss@^8.3.6, postcss@^8.3.7: nanoid "^3.1.25" source-map-js "^0.6.2" +postcss@^8.3.8: + version "8.3.8" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.8.tgz#9ebe2a127396b4b4570ae9f7770e7fb83db2bac1" + integrity sha512-GT5bTjjZnwDifajzczOC+r3FI3Cu+PgPvrsjhQdRqa2kTJ4968/X9CUce9xttIB0xOs5c6xf0TCWZo/y9lF6bA== + dependencies: + nanocolors "^0.2.2" + nanoid "^3.1.25" + source-map-js "^0.6.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -7119,13 +7149,20 @@ prosemirror-tables@^1.1.1: prosemirror-transform "^1.2.1" prosemirror-view "^1.13.3" -prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1, prosemirror-transform@^1.3.2: +prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.3.2.tgz#5620ebe7379e6fae4f34ecc881886cb22ce96579" integrity sha512-/G6d/u9Mf6Bv3H1XR8VxhpjmUO75LYmnvj+s3ZfZpakU1hnQbsvCEybml1B3f2IWUAAQRFkbO1PnsbFhLZsYsw== dependencies: prosemirror-model "^1.0.0" +prosemirror-transform@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.3.3.tgz#5f6712b0577a119cc418686fe7588b6dd9b7464d" + integrity sha512-9NLVXy1Sfa2G6qPqhWMkEvwQQMTw7OyTqOZbJaGQWsCeH3hH5Cw+c5eNaLM1Uu75EyKLsEZhJ93XpHJBa6RX8A== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.20.1: version "1.20.1" resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.20.1.tgz#174ba8ca358c73cc05e9a92a3d252bcf181ea337" @@ -7145,6 +7182,11 @@ protocols@^1.1.0, protocols@^1.4.0: resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== +proxy-from-env@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -8153,10 +8195,10 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" -tailwindcss@^2.2.15: - version "2.2.15" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.15.tgz#8bee3ebe68b988c050508ce20633f35b040dd9fe" - integrity sha512-WgV41xTMbnSoTNMNnJvShQZ+8GmY86DmXTrCgnsveNZJdlybfwCItV8kAqjYmU49YiFr+ofzmT1JlAKajBZboQ== +tailwindcss@^2.2.16: + version "2.2.16" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.16.tgz#32f81bdf1758b639cb83b9d30bf7cbecdda49e5e" + integrity sha512-EireCtpQyyJ4Xz8NYzHafBoy4baCOO96flM0+HgtsFcIQ9KFy/YBK3GEtlnD+rXen0e4xm8t3WiUcKBJmN6yjg== dependencies: arg "^5.0.1" bytes "^3.0.0" @@ -8765,10 +8807,10 @@ webpack-sources@^3.2.0: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.1.tgz#251a7d9720d75ada1469ca07dbb62f3641a05b6d" integrity sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA== -webpack@^5.53.0: - version "5.53.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.53.0.tgz#f463cd9c6fc1356ae4b9b7ac911fd1f5b2df86af" - integrity sha512-RZ1Z3z3ni44snoWjfWeHFyzvd9HMVYDYC5VXmlYUT6NWgEOWdCNpad5Fve2CzzHoRED7WtsKe+FCyP5Vk4pWiQ== +webpack@^5.55.1: + version "5.55.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.55.1.tgz#426ebe54c15fa57f7b242590f65fd182382b5998" + integrity sha512-EYp9lwaOOAs+AA/KviNZ7bQiITHm4bXQvyTPewD2+f5YGjv6sfiClm40yeX5FgBMxh5bxcB6LryiFoP09B97Ug== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -8779,8 +8821,8 @@ webpack@^5.53.0: acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.8.0" - es-module-lexer "^0.7.1" + enhanced-resolve "^5.8.3" + es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" From b2a08e4a78dd936d05e76bcb9ca17cd974f1d6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 09:44:29 +0200 Subject: [PATCH 08/17] Publish - @tiptap/core@2.0.0-beta.116 - @tiptap/html@2.0.0-beta.115 - @tiptap/react@2.0.0-beta.76 - @tiptap/starter-kit@2.0.0-beta.115 --- packages/core/CHANGELOG.md | 11 +++++++++++ packages/core/package.json | 2 +- packages/html/CHANGELOG.md | 8 ++++++++ packages/html/package.json | 4 ++-- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 2 +- packages/starter-kit/CHANGELOG.md | 8 ++++++++ packages/starter-kit/package.json | 4 ++-- 8 files changed, 41 insertions(+), 6 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 6248bda2..e9dcf31f 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.115...@tiptap/core@2.0.0-beta.116) (2021-09-30) + + +### Features + +* [#1898](https://github.com/ueberdosis/tiptap/issues/1898) Made the EventEmitter generic to improve the types of the tiptap events ([#1959](https://github.com/ueberdosis/tiptap/issues/1959)) ([54e85fd](https://github.com/ueberdosis/tiptap/commit/54e85fd28491fcf2d5a88fb5abda1f8414ada92b)) + + + + + # [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.114...@tiptap/core@2.0.0-beta.115) (2021-09-29) **Note:** Version bump only for package @tiptap/core diff --git a/packages/core/package.json b/packages/core/package.json index 3d907dd0..e9897aa7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/core", "description": "headless rich text editor", - "version": "2.0.0-beta.115", + "version": "2.0.0-beta.116", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/html/CHANGELOG.md b/packages/html/CHANGELOG.md index 155827ee..f9a76f64 100644 --- a/packages/html/CHANGELOG.md +++ b/packages/html/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.114...@tiptap/html@2.0.0-beta.115) (2021-09-30) + +**Note:** Version bump only for package @tiptap/html + + + + + # [2.0.0-beta.114](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.113...@tiptap/html@2.0.0-beta.114) (2021-09-29) **Note:** Version bump only for package @tiptap/html diff --git a/packages/html/package.json b/packages/html/package.json index b583eccb..ab8520e9 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/html", "description": "utility package to render tiptap JSON as HTML", - "version": "2.0.0-beta.114", + "version": "2.0.0-beta.115", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.115", + "@tiptap/core": "^2.0.0-beta.116", "hostic-dom": "^0.8.7", "prosemirror-model": "^1.14.3" }, diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 948b8afd..6851925d 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.76](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.75...@tiptap/react@2.0.0-beta.76) (2021-09-30) + +**Note:** Version bump only for package @tiptap/react + + + + + # [2.0.0-beta.75](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.74...@tiptap/react@2.0.0-beta.75) (2021-09-29) **Note:** Version bump only for package @tiptap/react diff --git a/packages/react/package.json b/packages/react/package.json index 075905c5..8ff82227 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/react", "description": "React components for tiptap", - "version": "2.0.0-beta.75", + "version": "2.0.0-beta.76", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/starter-kit/CHANGELOG.md b/packages/starter-kit/CHANGELOG.md index b6c2ce59..1b50df79 100644 --- a/packages/starter-kit/CHANGELOG.md +++ b/packages/starter-kit/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.114...@tiptap/starter-kit@2.0.0-beta.115) (2021-09-30) + +**Note:** Version bump only for package @tiptap/starter-kit + + + + + # [2.0.0-beta.114](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.113...@tiptap/starter-kit@2.0.0-beta.114) (2021-09-29) **Note:** Version bump only for package @tiptap/starter-kit diff --git a/packages/starter-kit/package.json b/packages/starter-kit/package.json index 12017afa..ea6b5518 100644 --- a/packages/starter-kit/package.json +++ b/packages/starter-kit/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/starter-kit", "description": "starter kit for tiptap", - "version": "2.0.0-beta.114", + "version": "2.0.0-beta.115", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.115", + "@tiptap/core": "^2.0.0-beta.116", "@tiptap/extension-blockquote": "^2.0.0-beta.15", "@tiptap/extension-bold": "^2.0.0-beta.15", "@tiptap/extension-bullet-list": "^2.0.0-beta.15", From fc9a8febbc9182ac4b0144542a0ba7b9c6db2db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 11:43:51 +0200 Subject: [PATCH 09/17] demos: revert switch to modules only --- demos/package.json | 3 +-- demos/postcss.config.js | 14 +++++--------- demos/tailwind.config.js | 4 ++-- demos/vite.config.ts | 17 ++++++----------- yarn.lock | 24 +----------------------- 5 files changed, 15 insertions(+), 47 deletions(-) diff --git a/demos/package.json b/demos/package.json index 276c12c3..bd82433c 100644 --- a/demos/package.json +++ b/demos/package.json @@ -2,7 +2,6 @@ "name": "tiptap-demos", "version": "0.0.0", "private": true, - "type": "module", "scripts": { "start": "vite --host", "build": "yarn ts && vite build", @@ -10,6 +9,7 @@ }, "dependencies": { "d3": "^7.0.4", + "fast-glob": "^3.2.7", "remixicon": "^2.5.0", "shiki": "^0.9.11", "simplify-js": "^1.2.4", @@ -23,7 +23,6 @@ "@vitejs/plugin-react-refresh": "^1.3.6", "@vitejs/plugin-vue": "^1.9.2", "autoprefixer": "^10.3.6", - "globby": "^12.0.2", "iframe-resizer": "^4.3.2", "postcss": "^8.3.8", "react": "^17.0.2", diff --git a/demos/postcss.config.js b/demos/postcss.config.js index b8d8788d..33ad091d 100644 --- a/demos/postcss.config.js +++ b/demos/postcss.config.js @@ -1,10 +1,6 @@ -import tailwind from 'tailwindcss' -import autoprefixer from 'autoprefixer' -import tailwindConfig from './tailwind.config.js' - -export default { - plugins: [ - tailwind(tailwindConfig), - autoprefixer, - ], +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, } diff --git a/demos/tailwind.config.js b/demos/tailwind.config.js index 6934b4fe..d7b2165d 100644 --- a/demos/tailwind.config.js +++ b/demos/tailwind.config.js @@ -1,6 +1,6 @@ -import defaultTheme from 'tailwindcss/defaultTheme.js' +const defaultTheme = require('tailwindcss/defaultTheme') -export default { +module.exports = { mode: 'jit', purge: [ './preview/**/*.{vue,js,ts,jsx,tsx}', diff --git a/demos/vite.config.ts b/demos/vite.config.ts index 335b98dc..81452c3b 100644 --- a/demos/vite.config.ts +++ b/demos/vite.config.ts @@ -6,11 +6,10 @@ import { } from 'path' import { v4 as uuid } from 'uuid' import fs from 'fs' -import { globbySync } from 'globby' +import fg from 'fast-glob' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import reactRefresh from '@vitejs/plugin-react-refresh' -import postcss from './postcss.config.js' // import checker from 'vite-plugin-checker' const includeDependencies = fs.readFileSync('./includeDependencies.txt') @@ -24,13 +23,9 @@ export default defineConfig({ include: includeDependencies, }, - css: { - postcss, - }, - build: { rollupOptions: { - input: globbySync('./**/index.html', { + input: fg.sync('./**/index.html', { ignore: ['dist'], }), }, @@ -73,10 +68,10 @@ export default defineConfig({ }, load(id) { if (id === '@demos') { - const demos = globbySync('./src/*/*', { onlyDirectories: true }) + const demos = fg.sync('./src/*/*', { onlyDirectories: true }) .map(demoPath => { const name = demoPath.replace('./src/', '') - const tabs = globbySync(`./src/${name}/*`, { onlyDirectories: true }) + const tabs = fg.sync(`./src/${name}/*`, { onlyDirectories: true }) .map(tabPath => ({ name: basename(tabPath), })) @@ -102,7 +97,7 @@ export default defineConfig({ load(id) { if (id.startsWith('source!')) { const path = id.split('!!')[0].replace('source!', '') - const files = globbySync(`${path}/**/*`, { + const files = fg.sync(`${path}/**/*`, { ignore: [ '**/index.html', '**/*.spec.js', @@ -167,7 +162,7 @@ export default defineConfig({ resolve: { alias: [ - ...globbySync('../packages/*', { onlyDirectories: true }) + ...fg.sync('../packages/*', { onlyDirectories: true }) .map(name => name.replace('../packages/', '')) .map(name => { return { find: `@tiptap/${name}`, replacement: resolve(`../packages/${name}/src/index.ts`) } diff --git a/yarn.lock b/yarn.lock index 9ea7080d..364337b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2763,11 +2763,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-union@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-3.0.1.tgz#da52630d327f8b88cfbfb57728e2af5cd9b6b975" - integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== - array.prototype.flat@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" @@ -4937,18 +4932,6 @@ globby@^11.0.2, globby@^11.0.3: merge2 "^1.3.0" slash "^3.0.0" -globby@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-12.0.2.tgz#53788b2adf235602ed4cabfea5c70a1139e1ab11" - integrity sha512-lAsmb/5Lww4r7MM9nCCliDZVIKbZTavrsunAsHLr9oHthrZP1qi7/gAnHOsUs9bLvEt2vKVJhHmxuL7QbDuPdQ== - dependencies: - array-union "^3.0.1" - dir-glob "^3.0.1" - fast-glob "^3.2.7" - ignore "^5.1.8" - merge2 "^1.4.1" - slash "^4.0.0" - graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" @@ -6120,7 +6103,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -7858,11 +7841,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" From b10f3eca400989a47f887221cc8354ef20518081 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 30 Sep 2021 16:27:45 +0200 Subject: [PATCH 10/17] Delete add-labels.yml --- .github/workflows/add-labels.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/add-labels.yml diff --git a/.github/workflows/add-labels.yml b/.github/workflows/add-labels.yml deleted file mode 100644 index 4cf60839..00000000 --- a/.github/workflows/add-labels.yml +++ /dev/null @@ -1,23 +0,0 @@ -# A GitHub Action that labels issues/PRs if the creator is a sponsor of the owner -# Documentation: https://github.com/JasonEtco/is-sponsor-label-action - -name: add labels - -on: - pull_request: - types: [opened] - issues: - types: [opened] - -jobs: - build: - name: is-sponsor-label - - runs-on: ubuntu-latest - - steps: - - uses: JasonEtco/is-sponsor-label-action@v1 - with: - label: sponsor ๐Ÿ’– - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f9493c289f3efa87661bbe408a7ce1124f3973e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 21:00:03 +0200 Subject: [PATCH 11/17] dependencies: update --- demos/package.json | 2 +- packages/react/package.json | 2 +- yarn.lock | 131 +++++++++++++++++++++++++++++++----- 3 files changed, 116 insertions(+), 19 deletions(-) diff --git a/demos/package.json b/demos/package.json index bd82433c..d023c0d5 100644 --- a/demos/package.json +++ b/demos/package.json @@ -31,7 +31,7 @@ "tailwindcss": "^2.2.16", "typescript": "^4.4.3", "uuid": "^8.3.2", - "vite": "^2.5.10", + "vite": "^2.6.2", "vite-plugin-checker": "^0.3.4", "vue": "^3.0.5", "vue-router": "^4.0.11" diff --git a/packages/react/package.json b/packages/react/package.json index 8ff82227..33b658c7 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -21,7 +21,7 @@ "dist" ], "devDependencies": { - "@types/react": "^17.0.25", + "@types/react": "^17.0.26", "@types/react-dom": "^17.0.7", "react": "^17.0.0", "react-dom": "^17.0.0" diff --git a/yarn.lock b/yarn.lock index 364337b7..f3eed2a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2175,10 +2175,10 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17.0.25": - version "17.0.25" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.25.tgz#8b88c226e54910762decc9de2aa36b4dc9240503" - integrity sha512-IXrzSOr3CVbEQgmjEdCWF57J7CVaJ7lL/n4penxHm8h0XIcr0AxqGucogh2zj3qRxgk4M4JImOP/MfomkPOhvQ== +"@types/react@^17.0.26": + version "17.0.26" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.26.tgz#960ea4b3518cc154ed7df3b35656c508df653331" + integrity sha512-MXxuXrH2xOcv5cp/su4oz69dNQnSA90JjFw5HBd5wifw6Ihi94j7dRJm7qNsB30tnruXSCPc9qmlhGop4nh9Hw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -4221,10 +4221,107 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.12.17: - version "0.12.29" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.29.tgz#be602db7c4dc78944a9dbde0d1ea19d36c1f882d" - integrity sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g== +esbuild-android-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.3.tgz#ef734c76eeff42e8c53acdffe901da090164a890" + integrity sha512-jc9E8vGTHkzb0Vwl74H8liANV9BWsqtzLHaKvcsRgf1M+aVCBSF0gUheduAKfDsbDMT0judeMLhwBP34EUesTA== + +esbuild-darwin-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.3.tgz#35f29376b7451add79f0640980683ef923365385" + integrity sha512-8bG3Zq+ZNuLlIJebOO2+weI7P2LVf33sOzaUfHj8MuJ+1Ixe4KtQxfYp7qhFnP6xP2ToJaYHxGUfLeiUCEz9hw== + +esbuild-darwin-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.3.tgz#530a1326e7d18d62c9a54b6dce70f2b77ed50eec" + integrity sha512-5E81eImYtTgh8pY7Gq4WQHhWkR/LvYadUXmuYeZBiP+3ADZJZcG60UFceZrjqNPaFOWKr/xmh4aNocwagEubcA== + +esbuild-freebsd-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.3.tgz#ce2896ac362e06eb82ca5dec06b2568901eb5afc" + integrity sha512-ou+f91KkTGexi8HvF/BdtsITL6plbciQfZGys7QX6/QEwyE96PmL5KnU6ZQwoU7E99Ts6Sc9bUDq8HXJubKtBA== + +esbuild-freebsd-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.3.tgz#a20454f99e060bea4e465d131556a9f0533f403f" + integrity sha512-F1zV7nySjHswJuvIgjkiG5liZ63MeazDGXGKViTCeegjZ71sAhOChcaGhKcu6vq9+vqZxlfEi1fmXlx6Pc3coQ== + +esbuild-linux-32@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.3.tgz#ad56f18208ecf007cd9ab16cd39626ca0312b8ee" + integrity sha512-mHHc2v6uLrHH4zaaq5RB/5IWzgimEJ1HGldzf1qtGI513KZWfH0HRRQ8p1di4notJgBn7tDzWQ1f34ZHy69viQ== + +esbuild-linux-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.3.tgz#be1eabadf68d153897ed887678f7496d3949810f" + integrity sha512-FJ1De2O89mrOuqtaEXu41qIYJU6R41F+OA6vheNwcAQcX8fu0aiA13FJeLABq29BYJuTVgRj3cyC8q+tz19/dQ== + +esbuild-linux-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.3.tgz#329348bb4a19cfb5e9046cc5d97ba5017d8f74ad" + integrity sha512-Cauhr45KSo+wRUojs+1qfycQqQCAXTOvsWvkZ6xmEMAXLAm+f8RQGDQeP8CAf8Yeelnegcn6UNdvzdzLHhWDFg== + +esbuild-linux-arm@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.3.tgz#b3b3167c9d5d3038894fbc75b194a4fbe93eaf09" + integrity sha512-9BJNRtLwBh3OP22cln9g3AJdbAQUcjRHqA4BScx9k4RZpGqPokFr548zpeplxWhcwrIjT8qPebwH9CrRVy8Bsw== + +esbuild-linux-mips64le@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.3.tgz#ea1687f28ea2c85399ecc2fe23a48ab343b7b35d" + integrity sha512-YVzJUGCncuuLm2boYyVeuMFsak4ZAhdiBwi0xNDZCC8sy+tS6Boe2mzcrD2uubv5JKAUOrpN186S1DtU4WgBgw== + +esbuild-linux-ppc64le@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.3.tgz#a462cf42eae3d7fc29a9f277679f5adee70afa67" + integrity sha512-GU6CqqKtJEoyxC2QWHiJtmuOz9wc/jMv8ZloK2WwiGY5yMvAmM3PI103Dj7xcjebNTHBqITTUw/aigY1wx5A3w== + +esbuild-openbsd-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.3.tgz#0cb15bd86d20eb19cb548b530f1a533197532cf9" + integrity sha512-HVpkgpn4BQt4BPDAjTOpeMub6mzNWw6Y3gaLQJrpbO24pws6ZwYkY24OI3/Uo3LDCbH6856MM81JxECt92OWjA== + +esbuild-sunos-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.3.tgz#53a941241f881010969cc8f1acb1ada49c4cd3c2" + integrity sha512-XncBVOtnEfUbPV4CaiFBxh38ychnBfwCxuTm9iAqcHzIwkmeNRN5qMzDyfE1jyfJje+Bbt6AvIfz6SdYt8/UEQ== + +esbuild-windows-32@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.3.tgz#265dc0d0cdb5374685a851c584857055e12865a4" + integrity sha512-ZlgDz7d1nk8wQACi+z8IDzNZVUlN9iprAme+1YSTsfFDlkyI8jeaGWPk9EQFNY7rJzsLVYm6eZ2mhPioc7uT5A== + +esbuild-windows-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.3.tgz#ae710c0629ec8c39c5ef1f69e86ed5592bb4128f" + integrity sha512-YX7KvRez3TR+GudlQm9tND/ssj2FsF9vb8ZWzAoZOLxpPzE3y+3SFJNrfDzzQKPzJ0Pnh9KBP4gsaMwJjKHDhw== + +esbuild-windows-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.3.tgz#a236199a26b1205573dcb571f966189326a4c953" + integrity sha512-nP7H0Y2a6OJd3Qi1Q8sehhyP4x4JoXK4S5y6FzH2vgaJgiyEurzFxjUufGdMaw+RxtxiwD/uRndUgwaZ2JD8lg== + +esbuild@^0.13.2: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.3.tgz#cc9fc347fc81ff6440cdd1fdb9fe65c02eddcc97" + integrity sha512-98xovMLKnyhv3gcReUuAEi5Ig1rK6SIgvsJuBIcfwzqGSEHsV8UJjMlmkhHoHMf9XZybMpE9Zax8AA8f7i2hlQ== + optionalDependencies: + esbuild-android-arm64 "0.13.3" + esbuild-darwin-64 "0.13.3" + esbuild-darwin-arm64 "0.13.3" + esbuild-freebsd-64 "0.13.3" + esbuild-freebsd-arm64 "0.13.3" + esbuild-linux-32 "0.13.3" + esbuild-linux-64 "0.13.3" + esbuild-linux-arm "0.13.3" + esbuild-linux-arm64 "0.13.3" + esbuild-linux-mips64le "0.13.3" + esbuild-linux-ppc64le "0.13.3" + esbuild-openbsd-64 "0.13.3" + esbuild-sunos-64 "0.13.3" + esbuild-windows-32 "0.13.3" + esbuild-windows-64 "0.13.3" + esbuild-windows-arm64 "0.13.3" escalade@^3.1.1: version "3.1.1" @@ -6982,7 +7079,7 @@ postcss-value-parser@^4.1.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^8.1.10, postcss@^8.1.6, postcss@^8.2.1, postcss@^8.3.6: +postcss@^8.1.10, postcss@^8.1.6, postcss@^8.2.1: version "8.3.7" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.7.tgz#ec88563588c8da8e58e7226f7633b51ae221eeda" integrity sha512-9SaY7nnyQ63/WittqZYAvkkYPyKxchMKH71UDzeTmWuLSvxTRpeEeABZAzlCi55cuGcoFyoV/amX2BdsafQidQ== @@ -7641,7 +7738,7 @@ rollup-plugin-typescript2@^0.30.0: resolve "1.20.0" tslib "2.1.0" -rollup@^2.38.5, rollup@^2.57.0: +rollup@^2.57.0: version "2.57.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.57.0.tgz#c1694475eb22e1022477c0f4635fd0ac80713173" integrity sha512-bKQIh1rWKofRee6mv8SrF2HdP6pea5QkwBZSMImJysFj39gQuiV8MEPBjXOCpzk3wSYp63M2v2wkWBmFC8O/rg== @@ -8653,15 +8750,15 @@ vite-plugin-checker@^0.3.4: vscode-languageserver-textdocument "^1.0.1" vscode-uri "^3.0.2" -vite@^2.5.10: - version "2.5.10" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.5.10.tgz#c598e3b5a7e1956ffc52eb3b3420d177fc2ed2a5" - integrity sha512-0ObiHTi5AHyXdJcvZ67HMsDgVpjT5RehvVKv6+Q0jFZ7zDI28PF5zK9mYz2avxdA+4iJMdwCz6wnGNnn4WX5Gg== +vite@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.6.2.tgz#5bbb4afe1f69ed9d6482e51a0f761f8cfc230e22" + integrity sha512-HSIg9U15LOnbD3CUxX364Pdrm7DUjftuBljowGxvkFHgDZU/SKPqApg9t86MX/Qq1VCO7wS+mGJHlfuTF7c0Sg== dependencies: - esbuild "^0.12.17" - postcss "^8.3.6" + esbuild "^0.13.2" + postcss "^8.3.8" resolve "^1.20.0" - rollup "^2.38.5" + rollup "^2.57.0" optionalDependencies: fsevents "~2.3.2" From dead82625095031bc4d32b47b205044bf75769bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20K=C3=BChn?= Date: Thu, 30 Sep 2021 21:13:37 +0200 Subject: [PATCH 12/17] fix: use ref to move contentDOM (#1960), fix #1942 --- packages/react/src/NodeViewContent.tsx | 14 ++++----- packages/react/src/ReactNodeViewRenderer.tsx | 31 ++++++++------------ packages/react/src/useReactNodeView.ts | 2 +- 3 files changed, 18 insertions(+), 29 deletions(-) diff --git a/packages/react/src/NodeViewContent.tsx b/packages/react/src/NodeViewContent.tsx index e9a9e96f..03ab6c55 100644 --- a/packages/react/src/NodeViewContent.tsx +++ b/packages/react/src/NodeViewContent.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import React from 'react' import { useReactNodeView } from './useReactNodeView' export interface NodeViewContentProps { @@ -6,18 +6,14 @@ export interface NodeViewContentProps { as?: React.ElementType, } -export const NodeViewContent: React.FC = React.forwardRef((props, ref) => { +export const NodeViewContent: React.FC = props => { const Tag = props.as || 'div' - const { maybeMoveContentDOM } = useReactNodeView() - - useEffect(() => { - maybeMoveContentDOM?.() - }, []) + const { nodeViewContentRef } = useReactNodeView() return ( = React.forwardRef( }} /> ) -}) +} diff --git a/packages/react/src/ReactNodeViewRenderer.tsx b/packages/react/src/ReactNodeViewRenderer.tsx index dfc6831f..e13945f2 100644 --- a/packages/react/src/ReactNodeViewRenderer.tsx +++ b/packages/react/src/ReactNodeViewRenderer.tsx @@ -10,7 +10,7 @@ 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 } from './useReactNodeView' +import { ReactNodeViewContext, ReactNodeViewContextProps } from './useReactNodeView' export interface ReactNodeViewRendererOptions extends NodeViewRendererOptions { update: ((props: { @@ -49,12 +49,20 @@ class ReactNodeView extends NodeView { - const onDragStart = this.onDragStart.bind(this) - const maybeMoveContentDOM = this.maybeMoveContentDOM.bind(this) 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 ( - + ) @@ -98,27 +106,12 @@ class ReactNodeView extends NodeView) => { this.renderer.updateProps(props) - this.maybeMoveContentDOM() } if (typeof this.options.update === 'function') { diff --git a/packages/react/src/useReactNodeView.ts b/packages/react/src/useReactNodeView.ts index 1cad98a2..6127ea4a 100644 --- a/packages/react/src/useReactNodeView.ts +++ b/packages/react/src/useReactNodeView.ts @@ -2,7 +2,7 @@ import { createContext, useContext } from 'react' export interface ReactNodeViewContextProps { onDragStart: (event: DragEvent) => void, - maybeMoveContentDOM: () => void, + nodeViewContentRef: (element: HTMLElement | null) => void, } export const ReactNodeViewContext = createContext>({ From f79347e128be11860ee54109d8d333b436426b45 Mon Sep 17 00:00:00 2001 From: MO <9125255+fengzilong@users.noreply.github.com> Date: Fri, 1 Oct 2021 03:34:20 +0800 Subject: [PATCH 13/17] fix: compatibility with lowlight v2 (#1939) --- .../extension-code-block-lowlight/src/lowlight-plugin.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts index f0aa9b26..6f873557 100644 --- a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts +++ b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts @@ -34,8 +34,8 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s const { language } = block.node.attrs const languages = lowlight.listLanguages() const nodes = language && languages.includes(language) - ? lowlight.highlight(language, block.node.textContent).value - : lowlight.highlightAuto(block.node.textContent).value + ? getHighlightNodes(lowlight.highlight(language, block.node.textContent)) + : getHighlightNodes(lowlight.highlightAuto(block.node.textContent)) parseNodes(nodes).forEach(node => { const to = from + node.text.length @@ -51,6 +51,11 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s from = to }) }) + + function getHighlightNodes(result) { + // `.value` for lowlight v1, `.children` for lowlight v2 + return result.value || result.children || [] + } return DecorationSet.create(doc, decorations) } From cf1e8ef1845eb66004cd35af6fbc75b259a16c0a Mon Sep 17 00:00:00 2001 From: philippkuehn Date: Thu, 30 Sep 2021 19:35:31 +0000 Subject: [PATCH 14/17] ci: fix code style linting errors --- packages/extension-code-block-lowlight/src/lowlight-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts index 6f873557..3ff2351f 100644 --- a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts +++ b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts @@ -51,7 +51,7 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s from = to }) }) - + function getHighlightNodes(result) { // `.value` for lowlight v1, `.children` for lowlight v2 return result.value || result.children || [] From d4e70619aeb4de41c38ee6f40c9a80783a07af52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 21:35:51 +0200 Subject: [PATCH 15/17] fix lint error --- .../src/lowlight-plugin.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts index 6f873557..25b95556 100644 --- a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts +++ b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts @@ -25,6 +25,11 @@ function parseNodes(nodes: any[], className: string[] = []): { text: string, cla .flat() } +function getHighlightNodes(result: any) { + // `.value` for lowlight v1, `.children` for lowlight v2 + return result.value || result.children || [] +} + function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: string, lowlight: any }) { const decorations: Decoration[] = [] @@ -51,11 +56,6 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s from = to }) }) - - function getHighlightNodes(result) { - // `.value` for lowlight v1, `.children` for lowlight v2 - return result.value || result.children || [] - } return DecorationSet.create(doc, decorations) } From 78ef673fc7f3d3fa4c9be687bbe93e698052220b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 21:39:13 +0200 Subject: [PATCH 16/17] fix lint error --- .../src/lowlight-plugin.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts index 3ff2351f..25b95556 100644 --- a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts +++ b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts @@ -25,6 +25,11 @@ function parseNodes(nodes: any[], className: string[] = []): { text: string, cla .flat() } +function getHighlightNodes(result: any) { + // `.value` for lowlight v1, `.children` for lowlight v2 + return result.value || result.children || [] +} + function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: string, lowlight: any }) { const decorations: Decoration[] = [] @@ -52,11 +57,6 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s }) }) - function getHighlightNodes(result) { - // `.value` for lowlight v1, `.children` for lowlight v2 - return result.value || result.children || [] - } - return DecorationSet.create(doc, decorations) } From b37309005d4f8028d27c4fd3e8cbd40e3d2abc00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 30 Sep 2021 21:41:29 +0200 Subject: [PATCH 17/17] Publish - @tiptap/extension-code-block-lowlight@2.0.0-beta.40 - @tiptap/react@2.0.0-beta.77 --- packages/extension-code-block-lowlight/CHANGELOG.md | 11 +++++++++++ packages/extension-code-block-lowlight/package.json | 2 +- packages/react/CHANGELOG.md | 11 +++++++++++ packages/react/package.json | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/extension-code-block-lowlight/CHANGELOG.md b/packages/extension-code-block-lowlight/CHANGELOG.md index ab1ddd4e..5357a80e 100644 --- a/packages/extension-code-block-lowlight/CHANGELOG.md +++ b/packages/extension-code-block-lowlight/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.40](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.39...@tiptap/extension-code-block-lowlight@2.0.0-beta.40) (2021-09-30) + + +### Bug Fixes + +* compatibility with lowlight v2 ([#1939](https://github.com/ueberdosis/tiptap/issues/1939)) ([f79347e](https://github.com/ueberdosis/tiptap/commit/f79347e128be11860ee54109d8d333b436426b45)) + + + + + # [2.0.0-beta.39](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.38...@tiptap/extension-code-block-lowlight@2.0.0-beta.39) (2021-09-21) diff --git a/packages/extension-code-block-lowlight/package.json b/packages/extension-code-block-lowlight/package.json index d9ee1280..59c15923 100644 --- a/packages/extension-code-block-lowlight/package.json +++ b/packages/extension-code-block-lowlight/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-code-block-lowlight", "description": "code block extension for tiptap", - "version": "2.0.0-beta.39", + "version": "2.0.0-beta.40", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 6851925d..3816f44a 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.77](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.76...@tiptap/react@2.0.0-beta.77) (2021-09-30) + + +### Bug Fixes + +* use ref to move contentDOM ([#1960](https://github.com/ueberdosis/tiptap/issues/1960)), fix [#1942](https://github.com/ueberdosis/tiptap/issues/1942) ([dead826](https://github.com/ueberdosis/tiptap/commit/dead82625095031bc4d32b47b205044bf75769bd)) + + + + + # [2.0.0-beta.76](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.75...@tiptap/react@2.0.0-beta.76) (2021-09-30) **Note:** Version bump only for package @tiptap/react diff --git a/packages/react/package.json b/packages/react/package.json index 33b658c7..8cc92e78 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/react", "description": "React components for tiptap", - "version": "2.0.0-beta.76", + "version": "2.0.0-beta.77", "homepage": "https://tiptap.dev", "keywords": [ "tiptap",