diff --git a/package.json b/package.json index b68f5c5ad..3883b2450 100644 --- a/package.json +++ b/package.json @@ -50,17 +50,12 @@ "@fontsource/inter": "^5.0.0", "@fontsource/roboto-mono": "^5.0.0", "@gamestdio/websocket": "^0.3.2", - "@lexical/clipboard": "^0.11.3", - "@lexical/code": "^0.12.0", - "@lexical/hashtag": "^0.11.3", - "@lexical/html": "^0.11.3", - "@lexical/link": "^0.11.3", - "@lexical/list": "^0.11.3", - "@lexical/react": "^0.11.3", - "@lexical/rich-text": "^0.11.3", - "@lexical/selection": "^0.11.3", - "@lexical/table": "^0.11.3", - "@lexical/utils": "^0.11.3", + "@lexical/clipboard": "^0.12.2", + "@lexical/hashtag": "^0.12.2", + "@lexical/link": "^0.12.2", + "@lexical/react": "^0.12.2", + "@lexical/selection": "^0.12.2", + "@lexical/utils": "^0.12.2", "@popperjs/core": "^2.11.5", "@reach/combobox": "^0.18.0", "@reach/menu-button": "^0.18.0", @@ -123,7 +118,7 @@ "intl-messageformat-parser": "^6.0.0", "intl-pluralrules": "^2.0.0", "leaflet": "^1.8.0", - "lexical": "^0.11.3", + "lexical": "^0.12.2", "line-awesome": "^1.3.0", "localforage": "^1.10.0", "lodash": "^4.7.11", diff --git a/src/features/compose/editor/nodes/image-component.tsx b/src/features/compose/editor/nodes/image-component.tsx deleted file mode 100644 index 0bc917686..000000000 --- a/src/features/compose/editor/nodes/image-component.tsx +++ /dev/null @@ -1,359 +0,0 @@ -/** - * This source code is derived from code from Meta Platforms, Inc. - * and affiliates, licensed under the MIT license located in the - * LICENSE file in the /app/soapbox/features/compose/editor directory. - */ - -import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; -import { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection'; -import { mergeRegister } from '@lexical/utils'; -import clsx from 'clsx'; -import { List as ImmutableList } from 'immutable'; -import { - $getNodeByKey, - $getSelection, - $isNodeSelection, - $setSelection, - CLICK_COMMAND, - COMMAND_PRIORITY_LOW, - DRAGSTART_COMMAND, - KEY_BACKSPACE_COMMAND, - KEY_DELETE_COMMAND, - KEY_ENTER_COMMAND, - KEY_ESCAPE_COMMAND, - SELECTION_CHANGE_COMMAND, -} from 'lexical'; -import * as React from 'react'; -import { Suspense, useCallback, useEffect, useRef, useState } from 'react'; -import { defineMessages, useIntl } from 'react-intl'; - -import { openModal } from 'soapbox/actions/modals'; -import { HStack, IconButton } from 'soapbox/components/ui'; -import { useAppDispatch } from 'soapbox/hooks'; -import { normalizeAttachment } from 'soapbox/normalizers'; - -import { $isImageNode } from './image-node'; - -import type { - GridSelection, - LexicalEditor, - NodeKey, - NodeSelection, - RangeSelection, -} from 'lexical'; - -const messages = defineMessages({ - description: { id: 'upload_form.description', defaultMessage: 'Describe for the visually impaired' }, -}); - -const imageCache = new Set(); - -const useSuspenseImage = (src: string) => { - if (!imageCache.has(src)) { - throw new Promise((resolve) => { - const img = new Image(); - img.src = src; - img.onload = () => { - imageCache.add(src); - resolve(null); - }; - }); - } -}; - -const LazyImage = ({ - altText, - className, - imageRef, - src, -}: { - altText: string - className: string | null - imageRef: {current: null | HTMLImageElement} - src: string -}): JSX.Element => { - useSuspenseImage(src); - return ( - - ); -}; - -const ImageComponent = ({ - src, - altText, - nodeKey, -}: { - altText: string - nodeKey: NodeKey - src: string -}): JSX.Element => { - const intl = useIntl(); - const dispatch = useAppDispatch(); - - const imageRef = useRef(null); - const buttonRef = useRef(null); - const [isSelected, setSelected, clearSelection] = - useLexicalNodeSelection(nodeKey); - const [editor] = useLexicalComposerContext(); - const [selection, setSelection] = useState< - RangeSelection | NodeSelection | GridSelection | null - >(null); - const activeEditorRef = useRef(null); - - const [hovered, setHovered] = useState(false); - const [focused, setFocused] = useState(false); - const [dirtyDescription, setDirtyDescription] = useState(null); - - const deleteNode = useCallback( - () => { - editor.update(() => { - const node = $getNodeByKey(nodeKey); - if ($isImageNode(node)) { - node.remove(); - } - }); - }, - [nodeKey], - ); - - const previewImage = () => { - const image = normalizeAttachment({ - type: 'image', - url: src, - altText, - }); - - dispatch(openModal('MEDIA', { media: ImmutableList.of(image), index: 0 })); - }; - - const onDelete = useCallback( - (payload: KeyboardEvent) => { - if (isSelected && $isNodeSelection($getSelection())) { - const event: KeyboardEvent = payload; - event.preventDefault(); - deleteNode(); - } - return false; - }, - [isSelected, nodeKey], - ); - - const onEnter = useCallback( - (event: KeyboardEvent) => { - const latestSelection = $getSelection(); - const buttonElem = buttonRef.current; - if (isSelected && $isNodeSelection(latestSelection) && latestSelection.getNodes().length === 1) { - if (buttonElem !== null && buttonElem !== document.activeElement) { - event.preventDefault(); - buttonElem.focus(); - return true; - } - } - return false; - }, - [isSelected], - ); - - const onEscape = useCallback( - (event: KeyboardEvent) => { - if (buttonRef.current === event.target) { - $setSelection(null); - editor.update(() => { - setSelected(true); - const parentRootElement = editor.getRootElement(); - if (parentRootElement !== null) { - parentRootElement.focus(); - } - }); - return true; - } - return false; - }, - [editor, setSelected], - ); - - const handleKeyDown: React.KeyboardEventHandler = (e) => { - if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) { - handleInputBlur(); - } - }; - - const handleInputBlur = () => { - setFocused(false); - - if (dirtyDescription !== null) { - editor.update(() => { - const node = $getNodeByKey(nodeKey); - if ($isImageNode(node)) { - node.setAltText(dirtyDescription); - } - - setDirtyDescription(null); - }); - } - }; - - const handleInputChange: React.ChangeEventHandler = e => { - setDirtyDescription(e.target.value); - }; - - const handleMouseEnter = () => { - setHovered(true); - }; - - const handleMouseLeave = () => { - setHovered(false); - }; - - const handleInputFocus = () => { - setFocused(true); - }; - - const handleClick = () => { - setFocused(true); - }; - - useEffect(() => { - let isMounted = true; - const unregister = mergeRegister( - editor.registerUpdateListener(({ editorState }) => { - if (isMounted) { - setSelection(editorState.read(() => $getSelection())); - } - }), - editor.registerCommand( - SELECTION_CHANGE_COMMAND, - (_, activeEditor) => { - activeEditorRef.current = activeEditor; - return false; - }, - COMMAND_PRIORITY_LOW, - ), - editor.registerCommand( - CLICK_COMMAND, - (payload) => { - const event = payload; - - if (event.target === imageRef.current) { - if (event.shiftKey) { - setSelected(!isSelected); - } else { - clearSelection(); - setSelected(true); - } - return true; - } - - return false; - }, - COMMAND_PRIORITY_LOW, - ), - editor.registerCommand( - DRAGSTART_COMMAND, - (event) => { - if (event.target === imageRef.current) { - // TODO This is just a temporary workaround for FF to behave like other browsers. - // Ideally, this handles drag & drop too (and all browsers). - event.preventDefault(); - return true; - } - return false; - }, - COMMAND_PRIORITY_LOW, - ), - editor.registerCommand( - KEY_DELETE_COMMAND, - onDelete, - COMMAND_PRIORITY_LOW, - ), - editor.registerCommand( - KEY_BACKSPACE_COMMAND, - onDelete, - COMMAND_PRIORITY_LOW, - ), - editor.registerCommand(KEY_ENTER_COMMAND, onEnter, COMMAND_PRIORITY_LOW), - editor.registerCommand( - KEY_ESCAPE_COMMAND, - onEscape, - COMMAND_PRIORITY_LOW, - ), - ); - return () => { - isMounted = false; - unregister(); - }; - }, [ - clearSelection, - editor, - isSelected, - nodeKey, - onDelete, - onEnter, - onEscape, - setSelected, - ]); - - const active = hovered || focused; - const description = dirtyDescription || (dirtyDescription !== '' && altText) || ''; - const draggable = isSelected && $isNodeSelection(selection); - - return ( - - <> - - - - - - - - - {intl.formatMessage(messages.description)} - - - - - - - - > - - ); -}; - -export default ImageComponent; diff --git a/src/features/compose/editor/nodes/image-node.tsx b/src/features/compose/editor/nodes/image-node.tsx deleted file mode 100644 index 01bf9ad62..000000000 --- a/src/features/compose/editor/nodes/image-node.tsx +++ /dev/null @@ -1,179 +0,0 @@ -/** - * This source code is derived from code from Meta Platforms, Inc. - * and affiliates, licensed under the MIT license located in the - * LICENSE file in the /app/soapbox/features/compose/editor directory. - */ - -import { $applyNodeReplacement, DecoratorNode } from 'lexical'; -import * as React from 'react'; -import { Suspense } from 'react'; - -import type { - DOMConversionMap, - DOMConversionOutput, - DOMExportOutput, - EditorConfig, - LexicalNode, - NodeKey, - SerializedLexicalNode, - Spread, -} from 'lexical'; - -const ImageComponent = React.lazy(() => import('./image-component')); - -interface ImagePayload { - altText?: string - key?: NodeKey - src: string -} - -const convertImageElement = (domNode: Node): null | DOMConversionOutput => { - if (domNode instanceof HTMLImageElement) { - const { alt: altText, src } = domNode; - const node = $createImageNode({ altText, src }); - return { node }; - } - return null; -}; - -type SerializedImageNode = Spread< - { - altText: string - src: string - }, - SerializedLexicalNode ->; - -class ImageNode extends DecoratorNode { - - __src: string; - __altText: string; - - static getType(): string { - return 'image'; - } - - static clone(node: ImageNode): ImageNode { - return new ImageNode( - node.__src, - node.__altText, - node.__key, - ); - } - - static importJSON(serializedNode: SerializedImageNode): ImageNode { - const { altText, src } = - serializedNode; - const node = $createImageNode({ - altText, - src, - }); - return node; - } - - exportDOM(): DOMExportOutput { - const element = document.createElement('img'); - element.setAttribute('src', this.__src); - element.setAttribute('alt', this.__altText); - return { element }; - } - - static importDOM(): DOMConversionMap | null { - return { - img: (node: Node) => ({ - conversion: convertImageElement, - priority: 0, - }), - }; - } - - constructor( - src: string, - altText: string, - key?: NodeKey, - ) { - super(key); - this.__src = src; - this.__altText = altText; - } - - exportJSON(): SerializedImageNode { - return { - altText: this.getAltText(), - src: this.getSrc(), - type: 'image', - version: 1, - }; - } - - // View - - createDOM(config: EditorConfig): HTMLElement { - const span = document.createElement('span'); - const theme = config.theme; - const className = theme.image; - if (className !== undefined) { - span.className = className; - } - return span; - } - - updateDOM(): false { - return false; - } - - getSrc(): string { - return this.__src; - } - - getAltText(): string { - return this.__altText; - } - - setAltText(altText: string): void { - const writable = this.getWritable(); - - if (altText !== undefined) { - writable.__altText = altText; - } - } - - decorate(): JSX.Element { - return ( - - - - ); - } - -} - -const $createImageNode = ({ - altText = '', - src, - key, -}: ImagePayload): ImageNode => { - return $applyNodeReplacement( - new ImageNode( - src, - altText, - key, - ), - ); -}; - -const $isImageNode = ( - node: LexicalNode | null | undefined, -): node is ImageNode => node instanceof ImageNode; - -export { - type ImagePayload, - type SerializedImageNode, - ImageNode, - $createImageNode, - $isImageNode, -}; diff --git a/src/features/compose/editor/nodes/index.ts b/src/features/compose/editor/nodes/index.ts index 10c197217..de1102a76 100644 --- a/src/features/compose/editor/nodes/index.ts +++ b/src/features/compose/editor/nodes/index.ts @@ -4,25 +4,15 @@ * LICENSE file in the /app/soapbox/features/compose/editor directory. */ -import { CodeHighlightNode, CodeNode } from '@lexical/code'; import { HashtagNode } from '@lexical/hashtag'; -import { AutoLinkNode, LinkNode } from '@lexical/link'; -import { ListItemNode, ListNode } from '@lexical/list'; -import { HorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode'; -import { HeadingNode, QuoteNode } from '@lexical/rich-text'; - -import { useFeatures, useInstance } from 'soapbox/hooks'; +import { AutoLinkNode } from '@lexical/link'; import { EmojiNode } from './emoji-node'; -import { ImageNode } from './image-node'; import { MentionNode } from './mention-node'; import type { Klass, LexicalNode } from 'lexical'; const useNodes = () => { - const features = useFeatures(); - const instance = useInstance(); - const nodes: Array> = [ AutoLinkNode, HashtagNode, @@ -30,21 +20,6 @@ const useNodes = () => { MentionNode, ]; - if (features.richText) { - nodes.push( - CodeHighlightNode, - CodeNode, - HorizontalRuleNode, - LinkNode, - ListItemNode, - ListNode, - QuoteNode, - ); - } - - if (instance.pleroma.getIn(['metadata', 'markup', 'allow_headings'])) nodes.push(HeadingNode); - if (instance.pleroma.getIn(['metadata', 'markup', 'allow_inline_images'])) nodes.push(ImageNode); - return nodes; }; diff --git a/yarn.lock b/yarn.lock index ebb217897..da9f6c4bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1699,25 +1699,17 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lexical/clipboard@0.11.3", "@lexical/clipboard@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/clipboard/-/clipboard-0.11.3.tgz#f4bfac8fad1f41d43a45c4e1ffc79542757314f9" - integrity sha512-6xggT8b0hd4OQy25mBH+yiJsr3Bm8APHjDOd3yINCGeiiHXIC+2qKQn3MG70euxQQuyzq++tYHcSsFq42g8Jyw== - dependencies: - "@lexical/html" "0.11.3" - "@lexical/list" "0.11.3" - "@lexical/selection" "0.11.3" - "@lexical/utils" "0.11.3" - -"@lexical/code@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/code/-/code-0.11.3.tgz#4a5ef193655557859c63dd4a54012c78580585fa" - integrity sha512-BIMPd2op65iP4N9SkKIUVodZoWeSsnk6skNJ8UHBO/Rg0ZxyAqxLpnBhEgHq2QOoTBbEW6OEFtkc7/+f9LINZg== - dependencies: - "@lexical/utils" "0.11.3" - prismjs "^1.27.0" +"@lexical/clipboard@0.12.2", "@lexical/clipboard@^0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/clipboard/-/clipboard-0.12.2.tgz#cfa74da178673624ecd835eb9449545885cbefc7" + integrity sha512-RldmfZquuJJJCJ5WquCyoJ1/eZ+AnNgdksqvd+G+Yn/GyJl/+O3dnHM0QVaDSPvh/PynLFcCtz/57ySLo2kQxQ== + dependencies: + "@lexical/html" "0.12.2" + "@lexical/list" "0.12.2" + "@lexical/selection" "0.12.2" + "@lexical/utils" "0.12.2" -"@lexical/code@^0.12.0": +"@lexical/code@0.12.2": version "0.12.2" resolved "https://registry.yarnpkg.com/@lexical/code/-/code-0.12.2.tgz#2484511cb9c3688bb85f477d448444250939986d" integrity sha512-w2JeJdnMUtYnC/Fx78sL3iJBt9Ug8pFSDOcI9ay/BkMQFQV8oqq1iyuLLBBJSG4FAM8b2DXrVdGklRQ+jTfTVw== @@ -1725,45 +1717,38 @@ "@lexical/utils" "0.12.2" prismjs "^1.27.0" -"@lexical/dragon@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/dragon/-/dragon-0.11.3.tgz#b4254953b09a68c20277ba0fb125548dd6630921" - integrity sha512-S18uwqOOpV2yIAFVWqSvBdhZ5BGadPQO4ejZF15wP8LUuqkxCs+0I/MjLovQ7tx0Cx34KdDaOXtM6XeG74ixYw== - -"@lexical/hashtag@0.11.3", "@lexical/hashtag@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/hashtag/-/hashtag-0.11.3.tgz#9ffb2f7b2bb9a62fa9641355fc06feb9d209273a" - integrity sha512-7auoaWp2QhsX9/Bq0SxLXatUaSwqoT9HlWNTH2vKsw8tdeUBYacTHLuBNncTGrznXLG0/B5+FWoLuM6Pzqq4Ig== - dependencies: - "@lexical/utils" "0.11.3" +"@lexical/dragon@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/dragon/-/dragon-0.12.2.tgz#0ae209449a7ebe57c078584e28edb1b7354ecf99" + integrity sha512-Mt8NLzTOt+VgQtc2DKDbHBwKeRlvKqbLqRIMYUVk60gol+YV7NpVBsP1PAMuYYjrTQLhlckBSC32H1SUHZRavA== -"@lexical/history@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/history/-/history-0.11.3.tgz#bcf7b2e708a5b3b5f90d1a39e07e0ae51bac41df" - integrity sha512-QLJQRH2rbadRwXd4c/U4TqjLWDQna6Q43nCocIZF+SdVG9TlASp7m6dS7hiHfPtV1pkxJUxPhZY6EsB/Ok5WGA== +"@lexical/hashtag@0.12.2", "@lexical/hashtag@^0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/hashtag/-/hashtag-0.12.2.tgz#d9c0f872b4a662b0393b289fa84515ec2c7cd624" + integrity sha512-2vYzIu5Ldf+eYdUrNA2m80c3N3MF3vJ0fIJzpl5QyX8OdViggEWl1bh+lKtw1Ju0H0CUyDIXdDLZ2apW3WDkTA== dependencies: - "@lexical/utils" "0.11.3" + "@lexical/utils" "0.12.2" -"@lexical/html@0.11.3", "@lexical/html@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/html/-/html-0.11.3.tgz#c02b38f512eb808726922c8215dd2374df6b77cc" - integrity sha512-+8AYnxxml9PneZLkGfdTenqDjE2yD1ZfCmQLrD/L1TEn22OjZh4uvKVHb13wEhgUZTuLKF0PNdnuecko9ON/aQ== +"@lexical/history@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/history/-/history-0.12.2.tgz#6870871c8120468a213e47c5b303f5b1dd378cba" + integrity sha512-PM/EDjnUyBPMWh1UiYb7T+FLbvTk14HwUWLXvZxn72S6Kj8ExH/PfLbWZWLCFL8RfzvbP407VwfSN8S0bF5H6g== dependencies: - "@lexical/selection" "0.11.3" + "@lexical/utils" "0.12.2" -"@lexical/link@0.11.3", "@lexical/link@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/link/-/link-0.11.3.tgz#7efab94e3b061a84639314eaec0b915d3457329c" - integrity sha512-stAjIrDrF18dPKK25ExPwMCcMe0KKD0FWVzo3F7ejh9DvrQcLFeBPcs8ze71chS3D5fQDB/CzdwvMjEViKmq2A== +"@lexical/html@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/html/-/html-0.12.2.tgz#6df09c362688b666da0f474d132d889415dbae8a" + integrity sha512-LWUO6OKhDtDZa9X1spHAqzsp+4EF01exis4cz5H9y2sHi7EofogXnRCadZ+fa07NVwPVTZWsStkk5qdSe/NEzg== dependencies: - "@lexical/utils" "0.11.3" + "@lexical/selection" "0.12.2" -"@lexical/list@0.11.3", "@lexical/list@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/list/-/list-0.11.3.tgz#d158ac4b4b42d772b30a1cd2a42ca0462a5a154e" - integrity sha512-Cs9071wDfqi4j1VgodceiR1jTHj13eCoEJDhr3e/FW0x5we7vfbTMtWlOWbveIoryAh+rQNgiD5e8SrAm6Zs3g== +"@lexical/link@0.12.2", "@lexical/link@^0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/link/-/link-0.12.2.tgz#33bf3ecdd98c2b27b2bdd67a8885649e1f528fc2" + integrity sha512-etOIONa7uyRDmwg8GN52kDlf8thD2Zk1LOFLeocHWz1V8fe3i2unGUek5s/rNPkc6ynpPpNsHdN1VEghOLCCmw== dependencies: - "@lexical/utils" "0.11.3" + "@lexical/utils" "0.12.2" "@lexical/list@0.12.2": version "0.12.2" @@ -1772,86 +1757,74 @@ dependencies: "@lexical/utils" "0.12.2" -"@lexical/mark@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/mark/-/mark-0.11.3.tgz#7f87a264d44762e275ba7b3d85e18307bbabd9e3" - integrity sha512-0wAtufmaA0rMVFXoiJ0sY/tiJsQbHuDpgywb1Qa8qnZZcg7ZTrQMz9Go0fEWYcbSp8OH2o0cjbDTz3ACS1qCUA== - dependencies: - "@lexical/utils" "0.11.3" - -"@lexical/markdown@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/markdown/-/markdown-0.11.3.tgz#0656a33bdf8b506899c010bb44960f86276e346b" - integrity sha512-sF8ow32BDme3UvxaKpf+j+vMc4T/XvDEzteZHmvvP7NX/iUtK3yUkTyT7rKuGwiKLYfMBwQaKMGjU3/nlIOzUg== - dependencies: - "@lexical/code" "0.11.3" - "@lexical/link" "0.11.3" - "@lexical/list" "0.11.3" - "@lexical/rich-text" "0.11.3" - "@lexical/text" "0.11.3" - "@lexical/utils" "0.11.3" - -"@lexical/offset@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/offset/-/offset-0.11.3.tgz#55c2ef5f036235d70f2aa762ed295e32dde9593a" - integrity sha512-3H9X8iqDSk0LrMOHZuqYuqX4EYGb78TIhtjrFbLJi/OgKmHaSeLx59xcMZdgd5kBdRitzQYMmvbRDvbLfMgWrA== - -"@lexical/overflow@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/overflow/-/overflow-0.11.3.tgz#a77d72a4fdf8dcc4f558e68a5d0ac210f020472b" - integrity sha512-ShjCG8lICShOBKwrpP+9PjRFKEBCSUUMjbIGZfLnoL//3hyRtGv5aRgRyfJlRgDhCve0ROt5znLJV88EXzGRyA== - -"@lexical/plain-text@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/plain-text/-/plain-text-0.11.3.tgz#ee56c0f0bc10a6333dc9790fb6f27b8d41887da8" - integrity sha512-cQ5Us+GNzShyjjgRqWTnYv0rC+jHJ96LvBA1aSieM77H8/Im5BeoLl6TgBK2NqPkp8fGpj8JnDEdT8h9Qh1jtA== - -"@lexical/react@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/react/-/react-0.11.3.tgz#e889170cf29bf71e3c4799a104d4f4c99499fa2e" - integrity sha512-Rn0Agnrz3uLIWbNyS9PRlkxOxcIDl2kxaVfgBacqQtYKR0ZVB2Hnoi89Cq6VmWPovauPyryx4Q3FC8Y11X7Otg== - dependencies: - "@lexical/clipboard" "0.11.3" - "@lexical/code" "0.11.3" - "@lexical/dragon" "0.11.3" - "@lexical/hashtag" "0.11.3" - "@lexical/history" "0.11.3" - "@lexical/link" "0.11.3" - "@lexical/list" "0.11.3" - "@lexical/mark" "0.11.3" - "@lexical/markdown" "0.11.3" - "@lexical/overflow" "0.11.3" - "@lexical/plain-text" "0.11.3" - "@lexical/rich-text" "0.11.3" - "@lexical/selection" "0.11.3" - "@lexical/table" "0.11.3" - "@lexical/text" "0.11.3" - "@lexical/utils" "0.11.3" - "@lexical/yjs" "0.11.3" - react-error-boundary "^3.1.4" +"@lexical/mark@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/mark/-/mark-0.12.2.tgz#bfcfffc9f74505e5a6160679812b3d6bafea9c78" + integrity sha512-ub+37PDfmThsqAWipRTrwqpgE+83ckqJ5C3mKQUBZvhZfVZW1rEUXZnKjFh2Q3eZK6iT7zVgoVJWJS9ZgEEyag== + dependencies: + "@lexical/utils" "0.12.2" + +"@lexical/markdown@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/markdown/-/markdown-0.12.2.tgz#b11559590e8684525d4a11d2d78108c3498896b9" + integrity sha512-F2jTFtBp7Q+yoA11BeUOEcxhROzW+HUhUGdsn20pSLhuxsWRj3oUuryWFeNKFofpzTCVoqU6dwpaMNMI2mL/sQ== + dependencies: + "@lexical/code" "0.12.2" + "@lexical/link" "0.12.2" + "@lexical/list" "0.12.2" + "@lexical/rich-text" "0.12.2" + "@lexical/text" "0.12.2" + "@lexical/utils" "0.12.2" + +"@lexical/offset@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/offset/-/offset-0.12.2.tgz#9e4a36508790de1d643d4328986c5c3a2d847de0" + integrity sha512-rZLZXfOBmpmM8A2UZsX3cr/CQYw5F/ou67AbaKI0WImb5sjnIgICZqzu9VFUnkKlVNUurEpplV3UG3D1YYh1OQ== + +"@lexical/overflow@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/overflow/-/overflow-0.12.2.tgz#b21ba828d6f02e99456d05df6c1d2771fb82aceb" + integrity sha512-UgE5j3ukO6qRFRpH4T7m/DvnodE9nCtImD7QinyGdsTa0hi5xlRnl0FUo605vH+vz7xEsUNAGwQXYPX9Sc/vig== -"@lexical/rich-text@0.11.3", "@lexical/rich-text@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/rich-text/-/rich-text-0.11.3.tgz#9501789bfe9671c220da7e95bf8589fa92cecf8c" - integrity sha512-fBFs6wMS7GFLbk+mzIWtwpP+EmnTZZ5bHpveuQ5wXONBuUuLcsYF5KO7UhLxXNLmiViV6lxatZPavEzgZdW7oQ== +"@lexical/plain-text@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/plain-text/-/plain-text-0.12.2.tgz#87c51de239190d9202122a62aeaae04cb2477cda" + integrity sha512-Lcg6+ngRnX70//kz34azYhID3bvW66HSHCfu5UPhCXT+vQ/Jkd/InhRKajBwWXpaJxMM1huoi3sjzVDb3luNtw== + +"@lexical/react@^0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/react/-/react-0.12.2.tgz#336805af7a3d8e69d5b0ef3d0efd7bd4cd8f29fb" + integrity sha512-ZBUvf5xmhiYWBw8pPrhYmLAEwFWrbF/cd15y76TUKD9l/2zDwwPs6nJQxBzfz3ei65r2/nnavLDV8W3QfvxfUA== + dependencies: + "@lexical/clipboard" "0.12.2" + "@lexical/code" "0.12.2" + "@lexical/dragon" "0.12.2" + "@lexical/hashtag" "0.12.2" + "@lexical/history" "0.12.2" + "@lexical/link" "0.12.2" + "@lexical/list" "0.12.2" + "@lexical/mark" "0.12.2" + "@lexical/markdown" "0.12.2" + "@lexical/overflow" "0.12.2" + "@lexical/plain-text" "0.12.2" + "@lexical/rich-text" "0.12.2" + "@lexical/selection" "0.12.2" + "@lexical/table" "0.12.2" + "@lexical/text" "0.12.2" + "@lexical/utils" "0.12.2" + "@lexical/yjs" "0.12.2" + react-error-boundary "^3.1.4" -"@lexical/selection@0.11.3", "@lexical/selection@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/selection/-/selection-0.11.3.tgz#f7250fae305a84c6e264a413f5feab056aeabfa3" - integrity sha512-15lQpcKT/vd7XZ5pnF1nb+kpKb72e9Yi1dVqieSxTeXkzt1cAZFKP3NB4RlhOKCv1N+glSBnjSxRwgsFfbD+NQ== +"@lexical/rich-text@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/rich-text/-/rich-text-0.12.2.tgz#9ef44e54777fc222ac8df344adb0d7428c784b25" + integrity sha512-igsEuv7CwBOAj5c8jeE41cnx6zkhI/Bkbu4W7shT6S6lNA/3cnyZpAMlgixwyK5RoqjGRCT+IJK5l6yBxQfNkw== -"@lexical/selection@0.12.2": +"@lexical/selection@0.12.2", "@lexical/selection@^0.12.2": version "0.12.2" resolved "https://registry.yarnpkg.com/@lexical/selection/-/selection-0.12.2.tgz#87e30b953b02923d1691f61d5189eb1be81a19ae" integrity sha512-h+g3oOnihHKIyLTyG6uLCEVR/DmUEVdCcZO1iAoGsuW7nwWiWNPWj6oZ3Cw5J1Mk5u62DHnkkVDQsVSZbAwmtg== -"@lexical/table@0.11.3", "@lexical/table@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/table/-/table-0.11.3.tgz#9b1980d828d7a588aaffa4cb8c6bb61401729034" - integrity sha512-EyRnN39CSPsMceADBR7Kf+sBHNpNQlPEkn/52epeDSnakR6s80woyrA3kIzKo6mLB4afvoqdYc7RfR96M9JLIA== - dependencies: - "@lexical/utils" "0.11.3" - "@lexical/table@0.12.2": version "0.12.2" resolved "https://registry.yarnpkg.com/@lexical/table/-/table-0.12.2.tgz#59be2fd0413a9125017bb119aa950050bf92717b" @@ -1859,21 +1832,12 @@ dependencies: "@lexical/utils" "0.12.2" -"@lexical/text@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/text/-/text-0.11.3.tgz#81ce2b5cd0caa9d89372e52c3548173d9395ad3d" - integrity sha512-gCEN8lJyR6b+yaOwKWGj79pbOfCQPWU/PHWyoNFUkEJXn3KydCzr2EYb6ta2cvQWRQU4G2BClKCR56jL4NS+qg== - -"@lexical/utils@0.11.3", "@lexical/utils@^0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/utils/-/utils-0.11.3.tgz#c4eb953289d29943974008c75f80c8d4e294e009" - integrity sha512-vC4saCrlcmyIJnvrYKw1uYxZojlD1DCIBsFlgmO8kXyRYXjj+o/8PBdn2dsgSQ3rADrC2mUloOm/maekDcYe9Q== - dependencies: - "@lexical/list" "0.11.3" - "@lexical/selection" "0.11.3" - "@lexical/table" "0.11.3" +"@lexical/text@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/text/-/text-0.12.2.tgz#623f8a9a56606e202febf4af80cfb5cf2da2a530" + integrity sha512-HyuIGuQvVi5djJKKBf+jYEBjK+0Eo9cKHf6WS7dlFozuCZvcCQEJkFy2yceWOwIVk+f2kptVQ5uO7aiZHExH2A== -"@lexical/utils@0.12.2": +"@lexical/utils@0.12.2", "@lexical/utils@^0.12.2": version "0.12.2" resolved "https://registry.yarnpkg.com/@lexical/utils/-/utils-0.12.2.tgz#b8325f1a1a0d043fd2b40d59cd00c4d7c038474b" integrity sha512-xW4y4l2Yd37+qLwkBvBGyzsKCA9wnh1ljphBJeR2vreT193i2gaIwuku2ZKlER14VHw4192qNJF7vUoAEmwurQ== @@ -1882,12 +1846,12 @@ "@lexical/selection" "0.12.2" "@lexical/table" "0.12.2" -"@lexical/yjs@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@lexical/yjs/-/yjs-0.11.3.tgz#b7049c0be85945fe0766b614256df8121bb05499" - integrity sha512-TLDQG2FSEw/aOfppEBb0wRlIuzJ57W//8ImfzyZvckSC12tvU0YKQQX8nQz/rybXdyfRy5eN+8gX5K2EyZx+pQ== +"@lexical/yjs@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@lexical/yjs/-/yjs-0.12.2.tgz#c0bebe1795ecb7e68d88d255dcbfcaa02740539d" + integrity sha512-OPJhkJD1Mp9W80mfLzASTB3OFWFMzJteUYA+eSyDgiX9zNi1VGxAqmIITTkDvnCMa+qvw4EfhGeGezpjx6Og4A== dependencies: - "@lexical/offset" "0.11.3" + "@lexical/offset" "0.12.2" "@mdn/browser-compat-data@^5.2.34", "@mdn/browser-compat-data@^5.3.13": version "5.3.16" @@ -6020,10 +5984,10 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lexical@^0.11.3: - version "0.11.3" - resolved "https://registry.yarnpkg.com/lexical/-/lexical-0.11.3.tgz#1ad1a56a657eb55d1b9644733f271bf75a65cbe9" - integrity sha512-xsMKgx/Fa+QHg/nweemU04lCy7TnEr8LyeDtsKUC7fIDN9wH3GqbnQ0+e3Hbg4FmxlhDCiPPt0GcZAROq3R8uw== +lexical@^0.12.2: + version "0.12.2" + resolved "https://registry.yarnpkg.com/lexical/-/lexical-0.12.2.tgz#68535e145715d5788374495c9ee0420e417d792b" + integrity sha512-Kxavd+ETjxtVwG/hvPd6WZfXD44sLOKe9Vlkwxy7lBQ1qZArS+rZfs+u5iXwXe6tX9f2PIM0u3RHsrCEDDE0fw== li@^1.3.0: version "1.3.0" @@ -8620,12 +8584,7 @@ tiny-inflate@^1.0.0: resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4" integrity sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw== -tiny-invariant@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" - integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== - -tiny-invariant@^1.1.0: +tiny-invariant@^1.0.2, tiny-invariant@^1.1.0: version "1.3.1" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==