diff --git a/app/components/Editor.js b/app/components/Editor.js index 98eb060c..b349938a 100644 --- a/app/components/Editor.js +++ b/app/components/Editor.js @@ -12,7 +12,6 @@ import ErrorBoundary from "components/ErrorBoundary"; import Tooltip from "components/Tooltip"; import useMediaQuery from "hooks/useMediaQuery"; import useToasts from "hooks/useToasts"; -import { fadeOutCursor } from "styles/animations"; import { type Theme } from "types"; import { isModKey } from "utils/keyboard"; import { uploadFile } from "utils/uploadFile"; @@ -228,7 +227,8 @@ const StyledEditor = styled(RichMarkdownEditor)` visibility: hidden; } - .heading-name:first-child { + .heading-name:first-child, + .heading-name:first-child + .ProseMirror-yjs-cursor { & + h1, & + h2, & + h3, @@ -252,6 +252,10 @@ const StyledEditor = styled(RichMarkdownEditor)` } .ProseMirror { + & > .ProseMirror-yjs-cursor { + display: none; + } + .ProseMirror-yjs-cursor { position: relative; margin-left: -1px; @@ -260,6 +264,7 @@ const StyledEditor = styled(RichMarkdownEditor)` border-right: 1px solid black; height: 1em; word-break: normal; + &:after { content: ""; display: block; @@ -270,7 +275,6 @@ const StyledEditor = styled(RichMarkdownEditor)` bottom: 0; } > div { - animation: ${fadeOutCursor} 2000ms ease-out; opacity: 0; position: absolute; top: -1.8em; diff --git a/package.json b/package.json index 7a0aa9b2..29c66d14 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "react-window": "^1.8.6", "reakit": "^1.3.10", "regenerator-runtime": "^0.13.7", - "rich-markdown-editor": "^11.18.12", + "rich-markdown-editor": "^11.18.17", "semver": "^7.3.2", "sequelize": "^6.3.4", "sequelize-cli": "^6.2.0", @@ -221,7 +221,7 @@ "yarn-deduplicate": "^3.1.0" }, "resolutions": { - "prosemirror-view": "1.18.1", + "prosemirror-view": "1.21.0", "dot-prop": "^5.2.0", "js-yaml": "^3.13.1" }, diff --git a/yarn.lock b/yarn.lock index 96fc4fa9..b2cef7fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11765,10 +11765,10 @@ prosemirror-markdown@^1.5.2: markdown-it "^10.0.0" prosemirror-model "^1.0.0" -prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.13.3, prosemirror-model@^1.8.1: - version "1.13.3" - resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.13.3.tgz#3ccfde73b9c9e706933c72bdf7462906509ff1c9" - integrity sha512-wujIYYQEcxdkbKmIJiekVjqtylKxuoEcc+w2PnN7Itc58m/75J4rCUz2dibygVQJFi3gZrD2DNFLjOS6LP4w1g== +prosemirror-model@^1.0.0, prosemirror-model@^1.13.3, prosemirror-model@^1.14.3, prosemirror-model@^1.8.1: + version "1.15.0" + resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.15.0.tgz#23bc09098daa7c309dba90a76a1b989ce6f61405" + integrity sha512-hQJv7SnIhlAy9ga3lhPPgaufhvCbQB9tHwscJ9E1H1pPHmN8w5V/lURueoYv9Kc3/bpNWoyHa8r3g//m7N0ChQ== dependencies: orderedmap "^1.1.0" @@ -11811,12 +11811,12 @@ prosemirror-utils@^0.9.6: resolved "https://registry.yarnpkg.com/prosemirror-utils/-/prosemirror-utils-0.9.6.tgz#3d97bd85897e3b535555867dc95a51399116a973" integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA== -prosemirror-view@1.18.1, prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3: - version "1.18.1" - resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.18.1.tgz#52ad1c67f51144e27e368bba129142ce87c7791e" - integrity sha512-TZd8byDRfdopLiokBY7T27msCSfWqqRxWs/LnBbdI030F+iI2kS+tO59/XFnpZxMLFKlJgOgGGhM9SzD1Nwdxw== +prosemirror-view@1.18.1, prosemirror-view@1.21.0, prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3: + version "1.21.0" + resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.21.0.tgz#d793cd338eda224026b8fe18a4f3163204963b8b" + integrity sha512-Pjh0vXw/l2Ifc3QcBVKJ/qHej33MX4sdq4/uAVqkSmHLf//bVWTYSZibihMya3lsIxTbDzNl/Z03KrhXWMHaoA== dependencies: - prosemirror-model "^1.1.0" + prosemirror-model "^1.14.3" prosemirror-state "^1.0.0" prosemirror-transform "^1.1.0" @@ -12776,10 +12776,10 @@ retry-as-promised@^3.2.0: dependencies: any-promise "^1.3.0" -rich-markdown-editor@^11.18.12: - version "11.18.12" - resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-11.18.12.tgz#389ac35bda688acc1d60e30db36698f93409c5a5" - integrity sha512-NWgV1qqV6xu//FE3aQJq7PVlsJH3HxF6B9F2UVgYYBO3AUU/Ld5z6EhbJ5EnTw3/16JG/hc38t1yvmcjd9BypQ== +rich-markdown-editor@^11.18.17: + version "11.18.17" + resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-11.18.17.tgz#bab7f14708e61d4baaf1173892ada06844390a35" + integrity sha512-0NJ08igupcoI/DsxkuivAi9ouKIGzmZdGv2L2W4jz/M0Z8p7SaW4vnTJ1Kk8cT9ryPF/Hvbuimnco5xaqiCCHg== dependencies: copy-to-clipboard "^3.0.8" fuzzy-search "^3.2.1"