From 1e2c4788b69bf821d4d5a06fa035ce6cfdeb93a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 22 Aug 2023 23:56:32 +0200 Subject: [PATCH] Actually switch to my fork of lexical-remark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../features/compose/editor/handlers/image.ts | 2 +- app/soapbox/features/compose/editor/index.tsx | 2 +- package.json | 2 +- yarn.lock | 27 ++++++++++--------- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/soapbox/features/compose/editor/handlers/image.ts b/app/soapbox/features/compose/editor/handlers/image.ts index 58178e242..69215bd46 100644 --- a/app/soapbox/features/compose/editor/handlers/image.ts +++ b/app/soapbox/features/compose/editor/handlers/image.ts @@ -1,7 +1,7 @@ import { $createImageNode } from '../nodes/image-node'; +import type { ImportHandler } from '@mkljczk/lexical-remark'; import type { LexicalNode } from 'lexical'; -import type { ImportHandler } from 'lexical-remark'; const importImage: ImportHandler /* TODO */ = (node: LexicalNode, parser) => { const lexicalNode = $createImageNode({ altText: node.alt ?? '', src: node.url }); diff --git a/app/soapbox/features/compose/editor/index.tsx b/app/soapbox/features/compose/editor/index.tsx index 60a2973cf..e38e410bf 100644 --- a/app/soapbox/features/compose/editor/index.tsx +++ b/app/soapbox/features/compose/editor/index.tsx @@ -14,9 +14,9 @@ import { LinkPlugin } from '@lexical/react/LexicalLinkPlugin'; import { ListPlugin } from '@lexical/react/LexicalListPlugin'; import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'; import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'; +import { $createRemarkExport, $createRemarkImport } from '@mkljczk/lexical-remark'; import clsx from 'clsx'; import { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'; -import { $createRemarkExport, $createRemarkImport } from 'lexical-remark'; import React, { useMemo, useState } from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/package.json b/package.json index 1f9ccdb8e..c74cff869 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@lexical/table": "^0.11.3", "@lexical/utils": "^0.11.3", "@metamask/providers": "^10.0.0", + "@mkljczk/lexical-remark": "^0.3.9", "@popperjs/core": "^2.11.5", "@reach/combobox": "^0.18.0", "@reach/menu-button": "^0.18.0", @@ -138,7 +139,6 @@ "intl-pluralrules": "^1.3.1", "leaflet": "^1.8.0", "lexical": "^0.11.3", - "lexical-remark": "https://github.com/mkljczk/lexical-remark#v0.3.9", "libphonenumber-js": "^1.10.8", "line-awesome": "^1.3.0", "localforage": "^1.10.0", diff --git a/yarn.lock b/yarn.lock index 6585a0a17..5686b59c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2420,6 +2420,20 @@ resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== +"@mkljczk/lexical-remark@^0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@mkljczk/lexical-remark/-/lexical-remark-0.3.9.tgz#188c3f7ab1eb1b1628685cd39519c9ed46b51bd2" + integrity sha512-ln9qQqIceHxpwtDtmmU+r/yw9x00GwSMeGK0EuePX7u4zG5CXAg9lrCFuXZ+SoqXaPoe1KYkQO2zKnFZKjJwcA== + dependencies: + "@nexusmods/eslint-plugin-nexusmods" "^0.0.6" + eslint "^8.41.0" + mdast-util-from-markdown "^1.3.0" + remark-parse "^10.0.1" + remark-stringify "^10.0.2" + unified "^10.1.2" + unist-util-visit "^4.1.2" + zwitch "^2.0.4" + "@nexusmods/eslint-plugin-nexusmods@^0.0.6": version "0.0.6" resolved "https://registry.yarnpkg.com/@nexusmods/eslint-plugin-nexusmods/-/eslint-plugin-nexusmods-0.0.6.tgz#733a188637f863c8b86bc0581b311291f1689c5f" @@ -9344,19 +9358,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -"lexical-remark@https://github.com/mkljczk/lexical-remark#v0.3.9": - version "0.3.9" - resolved "https://github.com/mkljczk/lexical-remark#391a1993c09ae448982fce2e75aedae1f03febf2" - dependencies: - "@nexusmods/eslint-plugin-nexusmods" "^0.0.6" - eslint "^8.41.0" - mdast-util-from-markdown "^1.3.0" - remark-parse "^10.0.1" - remark-stringify "^10.0.2" - unified "^10.1.2" - unist-util-visit "^4.1.2" - zwitch "^2.0.4" - lexical@^0.11.3: version "0.11.3" resolved "https://registry.yarnpkg.com/lexical/-/lexical-0.11.3.tgz#1ad1a56a657eb55d1b9644733f271bf75a65cbe9"