diff --git a/.yarn/cache/@lexical-clipboard-npm-0.23.1-961671e399-625e5ab24a.zip b/.yarn/cache/@lexical-clipboard-npm-0.23.1-961671e399-625e5ab24a.zip deleted file mode 100644 index b7e4a3b7e14..00000000000 Binary files a/.yarn/cache/@lexical-clipboard-npm-0.23.1-961671e399-625e5ab24a.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-clipboard-npm-0.30.0-9a6a3731aa-c309ec4d77.zip b/.yarn/cache/@lexical-clipboard-npm-0.30.0-9a6a3731aa-c309ec4d77.zip new file mode 100644 index 00000000000..984a84c366d Binary files /dev/null and b/.yarn/cache/@lexical-clipboard-npm-0.30.0-9a6a3731aa-c309ec4d77.zip differ diff --git a/.yarn/cache/@lexical-clipboard-patch-b5115e3dc0-94c4d2b126.zip b/.yarn/cache/@lexical-clipboard-patch-b5115e3dc0-94c4d2b126.zip deleted file mode 100644 index 250252f9ce5..00000000000 Binary files a/.yarn/cache/@lexical-clipboard-patch-b5115e3dc0-94c4d2b126.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-code-npm-0.23.1-a22a3b12fb-0dfa171794.zip b/.yarn/cache/@lexical-code-npm-0.23.1-a22a3b12fb-0dfa171794.zip deleted file mode 100644 index 3b60a088897..00000000000 Binary files a/.yarn/cache/@lexical-code-npm-0.23.1-a22a3b12fb-0dfa171794.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-code-npm-0.30.0-f4fe155f4c-2170e396ce.zip b/.yarn/cache/@lexical-code-npm-0.30.0-f4fe155f4c-2170e396ce.zip new file mode 100644 index 00000000000..e3f9b1a22e7 Binary files /dev/null and b/.yarn/cache/@lexical-code-npm-0.30.0-f4fe155f4c-2170e396ce.zip differ diff --git a/.yarn/cache/@lexical-devtools-core-npm-0.23.1-565012ce99-17807df723.zip b/.yarn/cache/@lexical-devtools-core-npm-0.23.1-565012ce99-17807df723.zip deleted file mode 100644 index 95cbb36fdf6..00000000000 Binary files a/.yarn/cache/@lexical-devtools-core-npm-0.23.1-565012ce99-17807df723.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-devtools-core-npm-0.30.0-3eccb72b72-acddbb84d4.zip b/.yarn/cache/@lexical-devtools-core-npm-0.30.0-3eccb72b72-acddbb84d4.zip new file mode 100644 index 00000000000..93339903048 Binary files /dev/null and b/.yarn/cache/@lexical-devtools-core-npm-0.30.0-3eccb72b72-acddbb84d4.zip differ diff --git a/.yarn/cache/@lexical-dragon-npm-0.23.1-5640271992-92a644f3f5.zip b/.yarn/cache/@lexical-dragon-npm-0.30.0-7133ac9293-0cb68c43e6.zip similarity index 62% rename from .yarn/cache/@lexical-dragon-npm-0.23.1-5640271992-92a644f3f5.zip rename to .yarn/cache/@lexical-dragon-npm-0.30.0-7133ac9293-0cb68c43e6.zip index 9b9d3aaced0..d6fae345761 100644 Binary files a/.yarn/cache/@lexical-dragon-npm-0.23.1-5640271992-92a644f3f5.zip and b/.yarn/cache/@lexical-dragon-npm-0.30.0-7133ac9293-0cb68c43e6.zip differ diff --git a/.yarn/cache/@lexical-hashtag-npm-0.23.1-95e0101f43-e7006a2abf.zip b/.yarn/cache/@lexical-hashtag-npm-0.30.0-a4b911957d-b28bae6959.zip similarity index 61% rename from .yarn/cache/@lexical-hashtag-npm-0.23.1-95e0101f43-e7006a2abf.zip rename to .yarn/cache/@lexical-hashtag-npm-0.30.0-a4b911957d-b28bae6959.zip index 0b5880b8487..d2c975cd71e 100644 Binary files a/.yarn/cache/@lexical-hashtag-npm-0.23.1-95e0101f43-e7006a2abf.zip and b/.yarn/cache/@lexical-hashtag-npm-0.30.0-a4b911957d-b28bae6959.zip differ diff --git a/.yarn/cache/@lexical-headless-npm-0.23.1-5671932633-e3284935ae.zip b/.yarn/cache/@lexical-headless-npm-0.30.0-2addfef1e5-f9c09d4bdb.zip similarity index 55% rename from .yarn/cache/@lexical-headless-npm-0.23.1-5671932633-e3284935ae.zip rename to .yarn/cache/@lexical-headless-npm-0.30.0-2addfef1e5-f9c09d4bdb.zip index 35c718386e3..1347ded30a8 100644 Binary files a/.yarn/cache/@lexical-headless-npm-0.23.1-5671932633-e3284935ae.zip and b/.yarn/cache/@lexical-headless-npm-0.30.0-2addfef1e5-f9c09d4bdb.zip differ diff --git a/.yarn/cache/@lexical-history-npm-0.23.1-5fd939728f-23b52196a8.zip b/.yarn/cache/@lexical-history-npm-0.30.0-b32499a63d-6491d8d953.zip similarity index 67% rename from .yarn/cache/@lexical-history-npm-0.23.1-5fd939728f-23b52196a8.zip rename to .yarn/cache/@lexical-history-npm-0.30.0-b32499a63d-6491d8d953.zip index c0fbdb4b55b..cf527d36607 100644 Binary files a/.yarn/cache/@lexical-history-npm-0.23.1-5fd939728f-23b52196a8.zip and b/.yarn/cache/@lexical-history-npm-0.30.0-b32499a63d-6491d8d953.zip differ diff --git a/.yarn/cache/@lexical-html-npm-0.23.1-f73bfc78f7-7041f6af6a.zip b/.yarn/cache/@lexical-html-npm-0.23.1-f73bfc78f7-7041f6af6a.zip deleted file mode 100644 index 9b4ba4b3e76..00000000000 Binary files a/.yarn/cache/@lexical-html-npm-0.23.1-f73bfc78f7-7041f6af6a.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-html-npm-0.30.0-c7fc9abb9a-c7b4da1898.zip b/.yarn/cache/@lexical-html-npm-0.30.0-c7fc9abb9a-c7b4da1898.zip new file mode 100644 index 00000000000..6a245764591 Binary files /dev/null and b/.yarn/cache/@lexical-html-npm-0.30.0-c7fc9abb9a-c7b4da1898.zip differ diff --git a/.yarn/cache/@lexical-link-npm-0.23.1-1c3c5f1d89-80076c11de.zip b/.yarn/cache/@lexical-link-npm-0.23.1-1c3c5f1d89-80076c11de.zip deleted file mode 100644 index 351aa0e116b..00000000000 Binary files a/.yarn/cache/@lexical-link-npm-0.23.1-1c3c5f1d89-80076c11de.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-link-npm-0.30.0-0711b491ba-80f4053ca9.zip b/.yarn/cache/@lexical-link-npm-0.30.0-0711b491ba-80f4053ca9.zip new file mode 100644 index 00000000000..ab5f6394e23 Binary files /dev/null and b/.yarn/cache/@lexical-link-npm-0.30.0-0711b491ba-80f4053ca9.zip differ diff --git a/.yarn/cache/@lexical-list-npm-0.23.1-f63f9924a5-b6e802f1ed.zip b/.yarn/cache/@lexical-list-npm-0.23.1-f63f9924a5-b6e802f1ed.zip deleted file mode 100644 index eef2c18b4d4..00000000000 Binary files a/.yarn/cache/@lexical-list-npm-0.23.1-f63f9924a5-b6e802f1ed.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-list-npm-0.30.0-c4f346f2fc-2b7d9f5625.zip b/.yarn/cache/@lexical-list-npm-0.30.0-c4f346f2fc-2b7d9f5625.zip new file mode 100644 index 00000000000..ecb6fd994f3 Binary files /dev/null and b/.yarn/cache/@lexical-list-npm-0.30.0-c4f346f2fc-2b7d9f5625.zip differ diff --git a/.yarn/cache/@lexical-mark-npm-0.23.1-a723bcdd4c-0629188151.zip b/.yarn/cache/@lexical-mark-npm-0.23.1-a723bcdd4c-0629188151.zip deleted file mode 100644 index 34242a6f924..00000000000 Binary files a/.yarn/cache/@lexical-mark-npm-0.23.1-a723bcdd4c-0629188151.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-mark-npm-0.30.0-d4360c9681-d576067928.zip b/.yarn/cache/@lexical-mark-npm-0.30.0-d4360c9681-d576067928.zip new file mode 100644 index 00000000000..1c4d06b34ca Binary files /dev/null and b/.yarn/cache/@lexical-mark-npm-0.30.0-d4360c9681-d576067928.zip differ diff --git a/.yarn/cache/@lexical-markdown-npm-0.23.1-2650e4d3db-097e93c510.zip b/.yarn/cache/@lexical-markdown-npm-0.23.1-2650e4d3db-097e93c510.zip deleted file mode 100644 index 894127eaddb..00000000000 Binary files a/.yarn/cache/@lexical-markdown-npm-0.23.1-2650e4d3db-097e93c510.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-markdown-npm-0.30.0-e6d339469f-03508b722b.zip b/.yarn/cache/@lexical-markdown-npm-0.30.0-e6d339469f-03508b722b.zip new file mode 100644 index 00000000000..ba1831c0199 Binary files /dev/null and b/.yarn/cache/@lexical-markdown-npm-0.30.0-e6d339469f-03508b722b.zip differ diff --git a/.yarn/cache/@lexical-offset-npm-0.23.1-e4cf1d9344-e4692cd251.zip b/.yarn/cache/@lexical-offset-npm-0.23.1-e4cf1d9344-e4692cd251.zip deleted file mode 100644 index 51f3d866705..00000000000 Binary files a/.yarn/cache/@lexical-offset-npm-0.23.1-e4cf1d9344-e4692cd251.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-offset-npm-0.30.0-8e8216bd86-83d550a4bb.zip b/.yarn/cache/@lexical-offset-npm-0.30.0-8e8216bd86-83d550a4bb.zip new file mode 100644 index 00000000000..b11f363999f Binary files /dev/null and b/.yarn/cache/@lexical-offset-npm-0.30.0-8e8216bd86-83d550a4bb.zip differ diff --git a/.yarn/cache/@lexical-overflow-npm-0.23.1-880175fc66-117a58efa7.zip b/.yarn/cache/@lexical-overflow-npm-0.23.1-880175fc66-117a58efa7.zip deleted file mode 100644 index 0beec83009a..00000000000 Binary files a/.yarn/cache/@lexical-overflow-npm-0.23.1-880175fc66-117a58efa7.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-overflow-npm-0.30.0-bffabb5ad3-5e82701a29.zip b/.yarn/cache/@lexical-overflow-npm-0.30.0-bffabb5ad3-5e82701a29.zip new file mode 100644 index 00000000000..02e834cf239 Binary files /dev/null and b/.yarn/cache/@lexical-overflow-npm-0.30.0-bffabb5ad3-5e82701a29.zip differ diff --git a/.yarn/cache/@lexical-plain-text-npm-0.23.1-2df3f43a6c-5405332b1c.zip b/.yarn/cache/@lexical-plain-text-npm-0.23.1-2df3f43a6c-5405332b1c.zip deleted file mode 100644 index 967a0eaf2ae..00000000000 Binary files a/.yarn/cache/@lexical-plain-text-npm-0.23.1-2df3f43a6c-5405332b1c.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-plain-text-npm-0.30.0-3a8363e5ac-201d024289.zip b/.yarn/cache/@lexical-plain-text-npm-0.30.0-3a8363e5ac-201d024289.zip new file mode 100644 index 00000000000..60f12be48e1 Binary files /dev/null and b/.yarn/cache/@lexical-plain-text-npm-0.30.0-3a8363e5ac-201d024289.zip differ diff --git a/.yarn/cache/@lexical-react-npm-0.23.1-207580517e-dd462ea7e1.zip b/.yarn/cache/@lexical-react-npm-0.23.1-207580517e-dd462ea7e1.zip deleted file mode 100644 index 187ef86c9e1..00000000000 Binary files a/.yarn/cache/@lexical-react-npm-0.23.1-207580517e-dd462ea7e1.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-react-npm-0.30.0-db343fc328-7dc461334d.zip b/.yarn/cache/@lexical-react-npm-0.30.0-db343fc328-7dc461334d.zip new file mode 100644 index 00000000000..074446dd95b Binary files /dev/null and b/.yarn/cache/@lexical-react-npm-0.30.0-db343fc328-7dc461334d.zip differ diff --git a/.yarn/cache/@lexical-rich-text-npm-0.23.1-a9f13154ae-54a3a524b5.zip b/.yarn/cache/@lexical-rich-text-npm-0.23.1-a9f13154ae-54a3a524b5.zip deleted file mode 100644 index 5586b388cdd..00000000000 Binary files a/.yarn/cache/@lexical-rich-text-npm-0.23.1-a9f13154ae-54a3a524b5.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-rich-text-npm-0.30.0-53a33799ad-b97d25b4c8.zip b/.yarn/cache/@lexical-rich-text-npm-0.30.0-53a33799ad-b97d25b4c8.zip new file mode 100644 index 00000000000..9d6c80bb3a0 Binary files /dev/null and b/.yarn/cache/@lexical-rich-text-npm-0.30.0-53a33799ad-b97d25b4c8.zip differ diff --git a/.yarn/cache/@lexical-rich-text-patch-a1ae77410d-8d452ef63a.zip b/.yarn/cache/@lexical-rich-text-patch-a1ae77410d-8d452ef63a.zip deleted file mode 100644 index 0c7747706cb..00000000000 Binary files a/.yarn/cache/@lexical-rich-text-patch-a1ae77410d-8d452ef63a.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-selection-npm-0.23.1-5a00f9739d-d5218e5eb3.zip b/.yarn/cache/@lexical-selection-npm-0.23.1-5a00f9739d-d5218e5eb3.zip deleted file mode 100644 index 9aaa7e40f5b..00000000000 Binary files a/.yarn/cache/@lexical-selection-npm-0.23.1-5a00f9739d-d5218e5eb3.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-selection-npm-0.30.0-a6a244f4dd-df1ace2b28.zip b/.yarn/cache/@lexical-selection-npm-0.30.0-a6a244f4dd-df1ace2b28.zip new file mode 100644 index 00000000000..fe96fec7003 Binary files /dev/null and b/.yarn/cache/@lexical-selection-npm-0.30.0-a6a244f4dd-df1ace2b28.zip differ diff --git a/.yarn/cache/@lexical-table-npm-0.23.1-e194dc3c6e-cab32ce7c1.zip b/.yarn/cache/@lexical-table-npm-0.23.1-e194dc3c6e-cab32ce7c1.zip deleted file mode 100644 index b19ba7ba0c8..00000000000 Binary files a/.yarn/cache/@lexical-table-npm-0.23.1-e194dc3c6e-cab32ce7c1.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-table-npm-0.30.0-a836ad573c-10d2dc1835.zip b/.yarn/cache/@lexical-table-npm-0.30.0-a836ad573c-10d2dc1835.zip new file mode 100644 index 00000000000..ee875c434b0 Binary files /dev/null and b/.yarn/cache/@lexical-table-npm-0.30.0-a836ad573c-10d2dc1835.zip differ diff --git a/.yarn/cache/@lexical-text-npm-0.23.1-8550c36cb0-55de1fe8c9.zip b/.yarn/cache/@lexical-text-npm-0.23.1-8550c36cb0-55de1fe8c9.zip deleted file mode 100644 index 94942d221fc..00000000000 Binary files a/.yarn/cache/@lexical-text-npm-0.23.1-8550c36cb0-55de1fe8c9.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-text-npm-0.30.0-9baf407b81-316aa43e7e.zip b/.yarn/cache/@lexical-text-npm-0.30.0-9baf407b81-316aa43e7e.zip new file mode 100644 index 00000000000..120d3d3979a Binary files /dev/null and b/.yarn/cache/@lexical-text-npm-0.30.0-9baf407b81-316aa43e7e.zip differ diff --git a/.yarn/cache/@lexical-utils-npm-0.23.1-6883e66559-fce12e3de7.zip b/.yarn/cache/@lexical-utils-npm-0.23.1-6883e66559-fce12e3de7.zip deleted file mode 100644 index d76f2f76c28..00000000000 Binary files a/.yarn/cache/@lexical-utils-npm-0.23.1-6883e66559-fce12e3de7.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-utils-npm-0.30.0-0ca874f35a-5bec6846b5.zip b/.yarn/cache/@lexical-utils-npm-0.30.0-0ca874f35a-5bec6846b5.zip new file mode 100644 index 00000000000..7e9c579d4d2 Binary files /dev/null and b/.yarn/cache/@lexical-utils-npm-0.30.0-0ca874f35a-5bec6846b5.zip differ diff --git a/.yarn/cache/@lexical-yjs-npm-0.23.1-1077d1dfaf-bb06b140b7.zip b/.yarn/cache/@lexical-yjs-npm-0.23.1-1077d1dfaf-bb06b140b7.zip deleted file mode 100644 index 35dc56d0f4e..00000000000 Binary files a/.yarn/cache/@lexical-yjs-npm-0.23.1-1077d1dfaf-bb06b140b7.zip and /dev/null differ diff --git a/.yarn/cache/@lexical-yjs-npm-0.30.0-7f977b35c8-61530582bd.zip b/.yarn/cache/@lexical-yjs-npm-0.30.0-7f977b35c8-61530582bd.zip new file mode 100644 index 00000000000..4d6218c4a98 Binary files /dev/null and b/.yarn/cache/@lexical-yjs-npm-0.30.0-7f977b35c8-61530582bd.zip differ diff --git a/.yarn/cache/lexical-npm-0.23.1-b61e3ad789-f842a5fc43.zip b/.yarn/cache/lexical-npm-0.23.1-b61e3ad789-f842a5fc43.zip deleted file mode 100644 index bfb71760661..00000000000 Binary files a/.yarn/cache/lexical-npm-0.23.1-b61e3ad789-f842a5fc43.zip and /dev/null differ diff --git a/.yarn/cache/lexical-npm-0.30.0-934d02ea1f-f29359090b.zip b/.yarn/cache/lexical-npm-0.30.0-934d02ea1f-f29359090b.zip new file mode 100644 index 00000000000..fd717f3c35f Binary files /dev/null and b/.yarn/cache/lexical-npm-0.30.0-934d02ea1f-f29359090b.zip differ diff --git a/.yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip b/.yarn/cache/prismjs-npm-1.30.0-c3c5ff824c-a68eddd4c5.zip similarity index 91% rename from .yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip rename to .yarn/cache/prismjs-npm-1.30.0-c3c5ff824c-a68eddd4c5.zip index 25137aad36c..45bcb0ccc4c 100644 Binary files a/.yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip and b/.yarn/cache/prismjs-npm-1.30.0-c3c5ff824c-a68eddd4c5.zip differ diff --git a/.yarn/patches/@lexical-clipboard-npm-0.23.1-961671e399.patch b/.yarn/patches/@lexical-clipboard-npm-0.23.1-961671e399.patch deleted file mode 100644 index 3bf4bd6fd3a..00000000000 --- a/.yarn/patches/@lexical-clipboard-npm-0.23.1-961671e399.patch +++ /dev/null @@ -1,134 +0,0 @@ -diff --git a/LexicalClipboard.dev.js b/LexicalClipboard.dev.js -index 1bc958d606217588101f79ed3706669bb6b398ec..5c4e967e31d660504d41466b62e87449d4925ed2 100644 ---- a/LexicalClipboard.dev.js -+++ b/LexicalClipboard.dev.js -@@ -93,7 +93,7 @@ function $insertDataTransferForPlainText(dataTransfer, selection) { - * @param selection the selection to use as the insertion point for the content in the DataTransfer object - * @param editor the LexicalEditor the content is being inserted into. - */ --function $insertDataTransferForRichText(dataTransfer, selection, editor) { -+function $insertDataTransferForRichText(dataTransfer, selection, editor, event) { - const lexicalString = dataTransfer.getData('application/x-lexical-editor'); - if (lexicalString) { - try { -@@ -106,15 +106,18 @@ function $insertDataTransferForRichText(dataTransfer, selection, editor) { - // Fail silently. - } - } -- const htmlString = dataTransfer.getData('text/html'); -- if (htmlString) { -- try { -- const parser = new DOMParser(); -- const dom = parser.parseFromString(trustHTML(htmlString), 'text/html'); -- const nodes = html.$generateNodesFromDOM(editor, dom); -- return $insertGeneratedNodes(editor, nodes, selection); -- } catch (_unused2) { -- // Fail silently. -+ const shouldIgnoreHTML = event && event.inputType === 'insertReplacementText' && dataTransfer.types.includes('text/plain'); -+ if (!shouldIgnoreHTML) { -+ const htmlString = dataTransfer.getData('text/html'); -+ if (htmlString) { -+ try { -+ const parser = new DOMParser(); -+ const dom = parser.parseFromString(trustHTML(htmlString), 'text/html'); -+ const nodes = html.$generateNodesFromDOM(editor, dom); -+ return $insertGeneratedNodes(editor, nodes, selection); -+ } catch (_unused2) { -+ // Fail silently. -+ } - } - } - -diff --git a/LexicalClipboard.dev.mjs b/LexicalClipboard.dev.mjs -index fd0c1b790dae92b742d569d62752d2c0b5705236..d00179beebd5d9f396fc3f7ab84745eea8959633 100644 ---- a/LexicalClipboard.dev.mjs -+++ b/LexicalClipboard.dev.mjs -@@ -91,7 +91,7 @@ function $insertDataTransferForPlainText(dataTransfer, selection) { - * @param selection the selection to use as the insertion point for the content in the DataTransfer object - * @param editor the LexicalEditor the content is being inserted into. - */ --function $insertDataTransferForRichText(dataTransfer, selection, editor) { -+function $insertDataTransferForRichText(dataTransfer, selection, editor, event) { - const lexicalString = dataTransfer.getData('application/x-lexical-editor'); - if (lexicalString) { - try { -@@ -104,15 +104,18 @@ function $insertDataTransferForRichText(dataTransfer, selection, editor) { - // Fail silently. - } - } -- const htmlString = dataTransfer.getData('text/html'); -- if (htmlString) { -- try { -- const parser = new DOMParser(); -- const dom = parser.parseFromString(trustHTML(htmlString), 'text/html'); -- const nodes = $generateNodesFromDOM(editor, dom); -- return $insertGeneratedNodes(editor, nodes, selection); -- } catch (_unused2) { -- // Fail silently. -+ const shouldIgnoreHTML = event && event.inputType === 'insertReplacementText' && dataTransfer.types.includes('text/plain'); -+ if (!shouldIgnoreHTML) { -+ const htmlString = dataTransfer.getData('text/html'); -+ if (htmlString) { -+ try { -+ const parser = new DOMParser(); -+ const dom = parser.parseFromString(trustHTML(htmlString), 'text/html'); -+ const nodes = $generateNodesFromDOM(editor, dom); -+ return $insertGeneratedNodes(editor, nodes, selection); -+ } catch (_unused2) { -+ // Fail silently. -+ } - } - } - -diff --git a/LexicalClipboard.prod.js b/LexicalClipboard.prod.js -index da19707c8c6cfebbfbf4eab94eb4427e81015e01..afe044183dfe347f4da04277e1dd484ad11052fe 100644 ---- a/LexicalClipboard.prod.js -+++ b/LexicalClipboard.prod.js -@@ -6,15 +6,15 @@ - * - */ - --'use strict';var e=require("@lexical/html"),m=require("@lexical/selection"),n=require("@lexical/utils"),p=require("lexical"),t;function u(a){let b=new URLSearchParams;b.append("code",a);for(let c=1;cb}).createHTML(a):a}function z(a,b,c){a.dispatchCommand(p.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,{nodes:b,selection:c})||c.insertNodes(b)} --function A(a,b,c,d=[]){let f=null!==b?c.isSelected(b):!0,k=p.$isElementNode(c)&&c.excludeFromCopy("html");var g=c;if(null!==b){var h=p.$cloneWithProperties(c);g=h=p.$isTextNode(h)&&null!==b?m.$sliceSelectedTextNodeContent(b,h):h}let q=p.$isElementNode(g)?g.getChildren():[];var l=g;h=l.exportJSON();var r=l.constructor;h.type!==r.getType()&&t(58,r.name);p.$isElementNode(l)&&(Array.isArray(h.children)||t(59,r.name));p.$isTextNode(g)&&(g=g.__text,0{a.update(()=>{h(D(a,b,c))})});var d=a.getRootElement();let f=null==a._window?window.document:a._window.document,k=p.getDOMSelection(a._window);if(null===d||null===k)return!1;let g=f.createElement("span");g.style.cssText="position: fixed; top: -1000px;";g.append(f.createTextNode("#"));d.append(g);d=new Range;d.setStart(g,0);d.setEnd(g,1);k.removeAllRanges();k.addRange(d);return new Promise(h=>{let q= --a.registerCommand(p.COPY_COMMAND,l=>{n.objectKlassEquals(l,ClipboardEvent)&&(q(),null!==C&&(window.clearTimeout(C),C=null),h(D(a,l,c)));return!0},p.COMMAND_PRIORITY_CRITICAL);C=window.setTimeout(()=>{q();C=null;h(!1)},50);f.execCommand("copy");g.remove()})};exports.setLexicalClipboardDataTransfer=F -+exports.$insertDataTransferForRichText=function(a,b,c,d){let h=a.getData("application/x-lexical-editor");if(h)try{let e=JSON.parse(h);if(e.namespace===c._config.namespace&&Array.isArray(e.nodes)){let g=B(e.nodes);return z(c,g,b)}}catch(e){}if(!d||"insertReplacementText"!==d.inputType||!a.types.includes("text/plain"))if(d=a.getData("text/html"))try{var k=(new DOMParser).parseFromString(y(d),"text/html");let e=f.$generateNodesFromDOM(c,k);return z(c,e,b)}catch(e){}a=a.getData("text/plain")||a.getData("text/uri-list"); -+if(null!=a)if(p.$isRangeSelection(b))for(b=a.split(/(\r?\n|\t)/),""===b[b.length-1]&&b.pop(),a=0;a{a.update(()=>{g(D(a,b,c))})});var d=a.getRootElement();let h=null==a._window?window.document:a._window.document,k=p.getDOMSelection(a._window);if(null===d||null===k)return!1;let e=h.createElement("span");e.style.cssText="position: fixed; top: -1000px;";e.append(h.createTextNode("#"));d.append(e);d=new Range;d.setStart(e,0);d.setEnd(e,1);k.removeAllRanges();k.addRange(d);return new Promise(g=>{let q= -+a.registerCommand(p.COPY_COMMAND,l=>{n.objectKlassEquals(l,ClipboardEvent)&&(q(),null!==C&&(window.clearTimeout(C),C=null),g(D(a,l,c)));return!0},p.COMMAND_PRIORITY_CRITICAL);C=window.setTimeout(()=>{q();C=null;g(!1)},50);h.execCommand("copy");e.remove()})};exports.setLexicalClipboardDataTransfer=F -diff --git a/LexicalClipboard.prod.mjs b/LexicalClipboard.prod.mjs -index 0a2b0694926fa9838a417295956bc832a02d5499..68090dd340db822053b4e3ceda8f68e4413c8908 100644 ---- a/LexicalClipboard.prod.mjs -+++ b/LexicalClipboard.prod.mjs -@@ -6,4 +6,4 @@ - * - */ - --import{$generateHtmlFromNodes as t,$generateNodesFromDOM as e}from"@lexical/html";import{$addNodeStyle as n,$sliceSelectedTextNodeContent as o}from"@lexical/selection";import{objectKlassEquals as r}from"@lexical/utils";import{$isRangeSelection as l,$getSelection as i,$createTabNode as s,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND as c,$getRoot as a,$parseSerializedNode as u,$isTextNode as d,getDOMSelection as f,COPY_COMMAND as p,COMMAND_PRIORITY_CRITICAL as m,isSelectionWithinEditor as h,$getEditor as g,$isElementNode as x,$cloneWithProperties as w}from"lexical";function y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T=y((function(t){const e=new URLSearchParams;e.append("code",t);for(let t=1;tt}).createHTML(t)}return t}(c),"text/html");return _(o,e(o,t),n)}catch(t){}const a=t.getData("text/plain")||t.getData("text/uri-list");if(null!=a)if(l(n)){const t=a.split(/(\r?\n|\t)/);""===t[t.length-1]&&t.pop();for(let e=0;e0?a.text=t:l=!1}for(let o=0;o{t.update((()=>{o(E(t,e,n))}))}));const o=t.getRootElement(),l=null==t._window?window.document:t._window.document,i=f(t._window);if(null===o||null===i)return!1;const s=l.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(l.createTextNode("#")),o.append(s);const c=new Range;return c.setStart(s,0),c.setEnd(s,1),i.removeAllRanges(),i.addRange(c),new Promise(((e,o)=>{const i=t.registerCommand(p,(o=>(r(o,ClipboardEvent)&&(i(),null!==S&&(window.clearTimeout(S),S=null),e(E(t,o,n))),!0)),m);S=window.setTimeout((()=>{i(),S=null,e(!1)}),50),l.execCommand("copy"),s.remove()}))}function E(t,e,n){if(void 0===n){const e=f(t._window);if(!e)return!1;const o=e.anchorNode,r=e.focusNode;if(null!==o&&null!==r&&!h(t,o,r))return!1;const l=i();if(null===l)return!1;n=L(l)}e.preventDefault();const o=e.clipboardData;return null!==o&&(b(o,n),!0)}const M=[["text/html",v],["application/x-lexical-editor",C]];function L(t=i()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=g();for(const[o,r]of M){const l=r(n,t);null!==l&&(e[o]=l)}}return e}function b(t,e){for(const n in e){const o=e[n];void 0!==o&&t.setData(n,o)}}export{A as $generateJSONFromSelectedNodes,R as $generateNodesFromSerializedNodes,L as $getClipboardDataFromSelection,v as $getHtmlContent,C as $getLexicalContent,D as $insertDataTransferForPlainText,N as $insertDataTransferForRichText,_ as $insertGeneratedNodes,O as copyToClipboard,b as setLexicalClipboardDataTransfer}; -+import{$generateHtmlFromNodes as t,$generateNodesFromDOM as e}from"@lexical/html";import{$addNodeStyle as n,$sliceSelectedTextNodeContent as o}from"@lexical/selection";import{objectKlassEquals as r}from"@lexical/utils";import{$isRangeSelection as l,$getSelection as i,$createTabNode as s,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND as c,$getRoot as a,$parseSerializedNode as u,$isTextNode as d,getDOMSelection as f,COPY_COMMAND as p,COMMAND_PRIORITY_CRITICAL as m,isSelectionWithinEditor as h,$getEditor as x,$isElementNode as g,$cloneWithProperties as w}from"lexical";function y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T=y((function(t){const e=new URLSearchParams;e.append("code",t);for(let t=1;tt}).createHTML(t)}return t}(r),"text/html");return _(o,e(o,t),n)}catch(t){}}const a=t.getData("text/plain")||t.getData("text/uri-list");if(null!=a)if(l(n)){const t=a.split(/(\r?\n|\t)/);""===t[t.length-1]&&t.pop();for(let e=0;e0?a.text=t:l=!1}for(let o=0;o{t.update((()=>{o(E(t,e,n))}))}));const o=t.getRootElement(),l=null==t._window?window.document:t._window.document,i=f(t._window);if(null===o||null===i)return!1;const s=l.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(l.createTextNode("#")),o.append(s);const c=new Range;return c.setStart(s,0),c.setEnd(s,1),i.removeAllRanges(),i.addRange(c),new Promise(((e,o)=>{const i=t.registerCommand(p,(o=>(r(o,ClipboardEvent)&&(i(),null!==S&&(window.clearTimeout(S),S=null),e(E(t,o,n))),!0)),m);S=window.setTimeout((()=>{i(),S=null,e(!1)}),50),l.execCommand("copy"),s.remove()}))}function E(t,e,n){if(void 0===n){const e=f(t._window);if(!e)return!1;const o=e.anchorNode,r=e.focusNode;if(null!==o&&null!==r&&!h(t,o,r))return!1;const l=i();if(null===l)return!1;n=L(l)}e.preventDefault();const o=e.clipboardData;return null!==o&&(b(o,n),!0)}const M=[["text/html",v],["application/x-lexical-editor",C]];function L(t=i()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=x();for(const[o,r]of M){const l=r(n,t);null!==l&&(e[o]=l)}}return e}function b(t,e){for(const n in e){const o=e[n];void 0!==o&&t.setData(n,o)}}export{R as $generateJSONFromSelectedNodes,A as $generateNodesFromSerializedNodes,L as $getClipboardDataFromSelection,v as $getHtmlContent,C as $getLexicalContent,D as $insertDataTransferForPlainText,N as $insertDataTransferForRichText,_ as $insertGeneratedNodes,O as copyToClipboard,b as setLexicalClipboardDataTransfer}; -diff --git a/clipboard.d.ts b/clipboard.d.ts -index 33ee79d61150403f45566839251c5c2950fba8e0..b7a27d5f4700814f55bfc988eead2709e8f2a040 100644 ---- a/clipboard.d.ts -+++ b/clipboard.d.ts -@@ -51,7 +51,7 @@ export declare function $insertDataTransferForPlainText(dataTransfer: DataTransf - * @param selection the selection to use as the insertion point for the content in the DataTransfer object - * @param editor the LexicalEditor the content is being inserted into. - */ --export declare function $insertDataTransferForRichText(dataTransfer: DataTransfer, selection: BaseSelection, editor: LexicalEditor): void; -+export declare function $insertDataTransferForRichText(dataTransfer: DataTransfer, selection: BaseSelection, editor: LexicalEditor, event?: InputEvent): void; - /** - * Inserts Lexical nodes into the editor using different strategies depending on - * some simple selection-based heuristics. If you're looking for a generic way to diff --git a/.yarn/patches/@lexical-rich-text-npm-0.23.1-a9f13154ae.patch b/.yarn/patches/@lexical-rich-text-npm-0.23.1-a9f13154ae.patch deleted file mode 100644 index 987b906108a..00000000000 --- a/.yarn/patches/@lexical-rich-text-npm-0.23.1-a9f13154ae.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/LexicalRichText.dev.js b/LexicalRichText.dev.js -index 11b41dd9166f30e5b17d9fb7e7cdeae07823c6b0..031ebff11537907cb86c1159be91870fbc07de4a 100644 ---- a/LexicalRichText.dev.js -+++ b/LexicalRichText.dev.js -@@ -479,7 +479,7 @@ function registerRichText(editor) { - } - const dataTransfer = eventOrText.dataTransfer; - if (dataTransfer != null) { -- clipboard.$insertDataTransferForRichText(dataTransfer, selection, editor); -+ clipboard.$insertDataTransferForRichText(dataTransfer, selection, editor, eventOrText); - } else if (lexical.$isRangeSelection(selection)) { - const data = eventOrText.data; - if (data) { -diff --git a/LexicalRichText.dev.mjs b/LexicalRichText.dev.mjs -index 9a93deb67611593607f887d8d1058810ba9c7941..52a927d98582adac61ee6ef2120c43e692e1a2aa 100644 ---- a/LexicalRichText.dev.mjs -+++ b/LexicalRichText.dev.mjs -@@ -477,7 +477,7 @@ function registerRichText(editor) { - } - const dataTransfer = eventOrText.dataTransfer; - if (dataTransfer != null) { -- $insertDataTransferForRichText(dataTransfer, selection, editor); -+ $insertDataTransferForRichText(dataTransfer, selection, editor, eventOrText); - } else if ($isRangeSelection(selection)) { - const data = eventOrText.data; - if (data) { -diff --git a/LexicalRichText.prod.js b/LexicalRichText.prod.js -index 6712b46846b9159dd7859be36fca76c572ecd53f..6c4df012e05dd95a45fb110c1df4102173c341a7 100644 ---- a/LexicalRichText.prod.js -+++ b/LexicalRichText.prod.js -@@ -21,7 +21,7 @@ function I(a){let b=null;h.objectKlassEquals(a,DragEvent)?b=a.dataTransfer:h.obj - function J(a){var b=k.$getSelection();if(!k.$isRangeSelection(b))return!1;let d=new Set;b=b.getNodes();for(let m=0;mk.$isElementNode(u)&&!u.isInline()),null!==e&&(f=e.getKey(),e.canIndent()&&!d.has(f)&&(d.add(f),a(e))))}return 0{const b=k.$getSelection();return k.$isNodeSelection(b)?(b.clear(),!0):!1},0),a.registerCommand(k.DELETE_CHARACTER_COMMAND,b=>{const d=k.$getSelection();if(!k.$isRangeSelection(d))return!1;d.deleteCharacter(b);return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.DELETE_WORD_COMMAND,b=>{const d=k.$getSelection();if(!k.$isRangeSelection(d))return!1;d.deleteWord(b);return!0},k.COMMAND_PRIORITY_EDITOR), --a.registerCommand(k.DELETE_LINE_COMMAND,b=>{const d=k.$getSelection();if(!k.$isRangeSelection(d))return!1;d.deleteLine(b);return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.CONTROLLED_TEXT_INSERTION_COMMAND,b=>{const d=k.$getSelection();if("string"===typeof b)null!==d&&d.insertText(b);else{if(null===d)return!1;const e=b.dataTransfer;null!=e?c.$insertDataTransferForRichText(e,d,a):k.$isRangeSelection(d)&&(b=b.data)&&d.insertText(b)}return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.REMOVE_TEXT_COMMAND, -+a.registerCommand(k.DELETE_LINE_COMMAND,b=>{const d=k.$getSelection();if(!k.$isRangeSelection(d))return!1;d.deleteLine(b);return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.CONTROLLED_TEXT_INSERTION_COMMAND,b=>{const d=k.$getSelection();if("string"===typeof b)null!==d&&d.insertText(b);else{if(null===d)return!1;const e=b.dataTransfer;null!=e?c.$insertDataTransferForRichText(e,d,a,b):k.$isRangeSelection(d)&&(b=b.data)&&d.insertText(b)}return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.REMOVE_TEXT_COMMAND, - ()=>{const b=k.$getSelection();if(!k.$isRangeSelection(b))return!1;b.removeText();return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.FORMAT_TEXT_COMMAND,b=>{const d=k.$getSelection();if(!k.$isRangeSelection(d))return!1;d.formatText(b);return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.FORMAT_ELEMENT_COMMAND,b=>{var d=k.$getSelection();if(!k.$isRangeSelection(d)&&!k.$isNodeSelection(d))return!1;d=d.getNodes();for(const e of d)d=h.$findMatchingParent(e,f=>k.$isElementNode(f)&&!f.isInline()), - null!==d&&d.setFormat(b);return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.INSERT_LINE_BREAK_COMMAND,b=>{const d=k.$getSelection();if(!k.$isRangeSelection(d))return!1;d.insertLineBreak(b);return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.INSERT_PARAGRAPH_COMMAND,()=>{const b=k.$getSelection();if(!k.$isRangeSelection(b))return!1;b.insertParagraph();return!0},k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.INSERT_TAB_COMMAND,()=>{k.$insertNodes([k.$createTabNode()]);return!0},k.COMMAND_PRIORITY_EDITOR), - a.registerCommand(k.INDENT_CONTENT_COMMAND,()=>J(b=>{const d=b.getIndent();b.setIndent(d+1)}),k.COMMAND_PRIORITY_EDITOR),a.registerCommand(k.OUTDENT_CONTENT_COMMAND,()=>J(b=>{const d=b.getIndent();0{var d=k.$getSelection();if(k.$isNodeSelection(d)&&!K(b.target)){if(b=d.getNodes(),0({conversion:Ot,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(i(e)){this.isEmpty()&&e.append(document.createElement("br"));const t=this.getFormatType();e.style.textAlign=t;const n=this.getDirection();n&&(e.dir=n)}return{element:e}}static importJSON(t){return Dt().updateFromJSON(t)}insertNewAfter(t,e){const n=m(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,e),n}collapseAtStart(){const t=m();return this.getChildren().forEach((e=>t.append(e))),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Dt(){return f(new yt)}function xt(t){return t instanceof yt}class wt extends d{static getType(){return"heading"}static clone(t){return new wt(t.__tag,t.__key)}constructor(t,e){super(e),this.__tag=t}getTag(){return this.__tag}setTag(t){const e=this.getWritable();return this.__tag=t,e}createDOM(t){const e=this.__tag,n=document.createElement(e),r=t.theme.heading;if(void 0!==r){const t=r[e];o(n,t)}return n}updateDOM(t,e,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Et,priority:0}),h2:t=>({conversion:Et,priority:0}),h3:t=>({conversion:Et,priority:0}),h4:t=>({conversion:Et,priority:0}),h5:t=>({conversion:Et,priority:0}),h6:t=>({conversion:Et,priority:0}),p:t=>{const e=t.firstChild;return null!==e&&Nt(e)?{conversion:()=>({node:null}),priority:3}:null},span:t=>Nt(t)?{conversion:t=>({node:Tt("h1")}),priority:3}:null}}exportDOM(t){const{element:e}=super.exportDOM(t);if(i(e)){this.isEmpty()&&e.append(document.createElement("br"));const t=this.getFormatType();e.style.textAlign=t;const n=this.getDirection();n&&(e.dir=n)}return{element:e}}static importJSON(t){return Tt(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,e=!0){const n=t?t.anchor.offset:0,r=this.getLastDescendant(),o=!r||t&&t.anchor.key===r.getKey()&&n===r.getTextContentSize()||!t?m():Tt(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,e),0===n&&!this.isEmpty()&&t){const t=m();t.select(),this.replace(t,!0)}return o}collapseAtStart(){const t=this.isEmpty()?m():Tt(this.getTag());return this.getChildren().forEach((e=>t.append(e))),this.replace(t),!0}extractWithChild(){return!0}}function Nt(t){return"span"===t.nodeName.toLowerCase()&&"26pt"===t.style.fontSize}function Et(t){const e=t.nodeName.toLowerCase();let n=null;return"h1"!==e&&"h2"!==e&&"h3"!==e&&"h4"!==e&&"h5"!==e&&"h6"!==e||(n=Tt(e),null!==t.style&&(g(t,n),n.setFormat(t.style.textAlign))),{node:n}}function Ot(t){const e=Dt();return null!==t.style&&(e.setFormat(t.style.textAlign),g(t,e)),{node:e}}function Tt(t="h1"){return f(new wt(t))}function _t(t){return t instanceof wt}function At(t){let e=null;if(s(t,DragEvent)?e=t.dataTransfer:s(t,ClipboardEvent)&&(e=t.clipboardData),null===e)return[!1,[],!1];const n=e.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(e.files),o]}function St(t){const e=h();if(!y(e))return!1;const n=new Set,r=e.getNodes();for(let e=0;e_(t)&&!t.isInline()));if(null===s)continue;const a=s.getKey();s.canIndent()&&!n.has(a)&&(n.add(a),t(s))}return n.size>0}function Ft(t){const e=V(t);return J(e)}function It(t){for(const e of["lowercase","uppercase","capitalize"])t.hasFormat(e)&&t.toggleFormat(e)}function Pt(o){return a(o.registerCommand(p,(t=>{const e=h();return!!C(e)&&(e.clear(),!0)}),0),o.registerCommand(v,(t=>{const e=h();return!!y(e)&&(e.deleteCharacter(t),!0)}),D),o.registerCommand(x,(t=>{const e=h();return!!y(e)&&(e.deleteWord(t),!0)}),D),o.registerCommand(w,(t=>{const e=h();return!!y(e)&&(e.deleteLine(t),!0)}),D),o.registerCommand(N,(e=>{const n=h();if("string"==typeof e)null!==n&&n.insertText(e);else{if(null===n)return!1;const r=e.dataTransfer;if(null!=r)t(r,n,o);else if(y(n)){const t=e.data;return t&&n.insertText(t),!0}}return!0}),D),o.registerCommand(E,(()=>{const t=h();return!!y(t)&&(t.removeText(),!0)}),D),o.registerCommand(O,(t=>{const e=h();return!!y(e)&&(e.formatText(t),!0)}),D),o.registerCommand(T,(t=>{const e=h();if(!y(e)&&!C(e))return!1;const n=e.getNodes();for(const e of n){const n=c(e,(t=>_(t)&&!t.isInline()));null!==n&&n.setFormat(t)}return!0}),D),o.registerCommand(A,(t=>{const e=h();return!!y(e)&&(e.insertLineBreak(t),!0)}),D),o.registerCommand(S,(()=>{const t=h();return!!y(t)&&(t.insertParagraph(),!0)}),D),o.registerCommand(F,(()=>(I([P()]),!0)),D),o.registerCommand(b,(()=>St((t=>{const e=t.getIndent();t.setIndent(e+1)}))),D),o.registerCommand(K,(()=>St((t=>{const e=t.getIndent();e>0&&t.setIndent(e-1)}))),D),o.registerCommand(M,(t=>{const e=h();if(C(e)&&!Ft(t.target)){const t=e.getNodes();if(t.length>0)return t[0].selectPrevious(),!0}else if(y(e)){const n=k(e.focus,!0);if(!t.shiftKey&&J(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),t.preventDefault(),!0}return!1}),D),o.registerCommand(L,(t=>{const e=h();if(C(e)){const t=e.getNodes();if(t.length>0)return t[0].selectNext(0,0),!0}else if(y(e)){if(function(t){const e=t.focus;return"root"===e.key&&e.offset===ut().getChildrenSize()}(e))return t.preventDefault(),!0;const n=k(e.focus,!1);if(!t.shiftKey&&J(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1}),D),o.registerCommand(R,(t=>{const e=h();if(C(e)){const n=e.getNodes();if(n.length>0)return t.preventDefault(),n[0].selectPrevious(),!0}if(!y(e))return!1;if(n(e,!0)){const n=t.shiftKey;return t.preventDefault(),r(e,n,!0),!0}return!1}),D),o.registerCommand(W,(t=>{const e=h();if(C(e)&&!Ft(t.target)){const n=e.getNodes();if(n.length>0)return t.preventDefault(),n[0].selectNext(0,0),!0}if(!y(e))return!1;const o=t.shiftKey;return!!n(e,!1)&&(t.preventDefault(),r(e,o,!1),!0)}),D),o.registerCommand(z,(t=>{if(Ft(t.target))return!1;const e=h();if(!y(e))return!1;const{anchor:n}=e,r=n.getNode();if(e.isCollapsed()&&0===n.offset&&!q(r)){if(u(r).getIndent()>0)return t.preventDefault(),o.dispatchCommand(K,void 0)}return(!pt||"ko-KR"!==navigator.language)&&(t.preventDefault(),o.dispatchCommand(v,!0))}),D),o.registerCommand(X,(t=>{if(Ft(t.target))return!1;const e=h();return!!y(e)&&(t.preventDefault(),o.dispatchCommand(v,!1))}),D),o.registerCommand(Y,(t=>{const e=h();if(!y(e))return!1;if(It(e),null!==t){if((pt||gt||Ct)&&ft)return!1;if(t.preventDefault(),t.shiftKey)return o.dispatchCommand(A,!1)}return o.dispatchCommand(S,void 0)}),D),o.registerCommand(B,(()=>{const t=h();return!!y(t)&&(o.blur(),!0)}),D),o.registerCommand(G,(t=>{const[,e]=At(t);if(e.length>0){const n=lt(t.clientX,t.clientY);if(null!==n){const{offset:t,node:r}=n,i=V(r);if(null!==i){const e=j();if(H(i))e.anchor.set(i.getKey(),t,"text"),e.focus.set(i.getKey(),t,"text");else{const t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}const n=Q(e);U(n)}o.dispatchCommand(vt,e)}return t.preventDefault(),!0}const n=h();return!!y(n)}),D),o.registerCommand(Z,(t=>{const[e]=At(t),n=h();return!(e&&!y(n))}),D),o.registerCommand($,(t=>{const[e]=At(t),n=h();if(e&&!y(n))return!1;const r=lt(t.clientX,t.clientY);if(null!==r){const e=V(r.node);J(e)&&t.preventDefault()}return!0}),D),o.registerCommand(tt,(()=>(et(),!0)),D),o.registerCommand(nt,(t=>(e(o,s(t,ClipboardEvent)?t:null),!0)),D),o.registerCommand(rt,(t=>(async function(t,n){await e(n,s(t,ClipboardEvent)?t:null),n.update((()=>{const t=h();y(t)?t.removeText():C(t)&&t.getNodes().forEach((t=>t.remove()))}))}(t,o),!0)),D),o.registerCommand(ot,(e=>{const[,n,r]=At(e);if(n.length>0&&!r)return o.dispatchCommand(vt,n),!0;if(it(e.target)&&st(e.target))return!1;return null!==h()&&(function(e,n){e.preventDefault(),n.update((()=>{const r=h(),o=s(e,InputEvent)||s(e,KeyboardEvent)?null:e.clipboardData;null!=o&&null!==r&&t(o,r,n)}),{tag:"paste"})}(e,o),!0)}),D),o.registerCommand(at,(t=>{const e=h();return y(e)&&It(e),!1}),D),o.registerCommand(ct,(t=>{const e=h();return y(e)&&It(e),!1}),D))}export{Tt as $createHeadingNode,Dt as $createQuoteNode,_t as $isHeadingNode,xt as $isQuoteNode,vt as DRAG_DROP_PASTE,wt as HeadingNode,yt as QuoteNode,At as eventFiles,Pt as registerRichText}; -+import{$insertDataTransferForRichText as t,copyToClipboard as e}from"@lexical/clipboard";import{$shouldOverrideDefaultCharacterSelection as n,$moveCharacter as r}from"@lexical/selection";import{addClassNamesToElement as o,isHTMLElement as i,objectKlassEquals as s,mergeRegister as a,$findMatchingParent as c,$getNearestBlockElementAncestorOrThrow as u}from"@lexical/utils";import{createCommand as l,ElementNode as d,$createParagraphNode as m,$applyNodeReplacement as f,setNodeIndentFromDOM as g,CLICK_COMMAND as p,$getSelection as h,$isNodeSelection as C,DELETE_CHARACTER_COMMAND as v,$isRangeSelection as y,COMMAND_PRIORITY_EDITOR as D,DELETE_WORD_COMMAND as x,DELETE_LINE_COMMAND as w,CONTROLLED_TEXT_INSERTION_COMMAND as N,REMOVE_TEXT_COMMAND as E,FORMAT_TEXT_COMMAND as O,FORMAT_ELEMENT_COMMAND as T,$isElementNode as _,INSERT_LINE_BREAK_COMMAND as A,INSERT_PARAGRAPH_COMMAND as S,INSERT_TAB_COMMAND as F,$insertNodes as I,$createTabNode as P,INDENT_CONTENT_COMMAND as b,OUTDENT_CONTENT_COMMAND as K,KEY_ARROW_UP_COMMAND as M,$getAdjacentNode as k,$isDecoratorNode as J,KEY_ARROW_DOWN_COMMAND as L,KEY_ARROW_LEFT_COMMAND as R,KEY_ARROW_RIGHT_COMMAND as W,KEY_BACKSPACE_COMMAND as z,$isRootNode as q,KEY_DELETE_COMMAND as X,KEY_ENTER_COMMAND as Y,KEY_ESCAPE_COMMAND as B,DROP_COMMAND as G,$getNearestNodeFromDOMNode as V,$createRangeSelection as j,$isTextNode as H,$normalizeSelection__EXPERIMENTAL as Q,$setSelection as U,DRAGSTART_COMMAND as Z,DRAGOVER_COMMAND as $,SELECT_ALL_COMMAND as tt,$selectAll as et,COPY_COMMAND as nt,CUT_COMMAND as rt,PASTE_COMMAND as ot,isDOMNode as it,isSelectionCapturedInDecoratorInput as st,KEY_SPACE_COMMAND as at,KEY_TAB_COMMAND as ct,$getRoot as ut}from"lexical";function lt(t,e){if(void 0!==document.caretRangeFromPoint){const n=document.caretRangeFromPoint(t,e);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("undefined"!==document.caretPositionFromPoint){const n=document.caretPositionFromPoint(t,e);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}const dt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,mt=dt&&"documentMode"in document?document.documentMode:null,ft=!(!dt||!("InputEvent"in window)||mt)&&"getTargetRanges"in new window.InputEvent("input"),gt=dt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),pt=dt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ht=dt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Ct=dt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ht,vt=l("DRAG_DROP_PASTE_FILE");class yt extends d{static getType(){return"quote"}static clone(t){return new yt(t.__key)}createDOM(t){const e=document.createElement("blockquote");return o(e,t.theme.quote),e}updateDOM(t,e){return!1}static importDOM(){return{blockquote:t=>({conversion:Ot,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(i(e)){this.isEmpty()&&e.append(document.createElement("br"));const t=this.getFormatType();e.style.textAlign=t;const n=this.getDirection();n&&(e.dir=n)}return{element:e}}static importJSON(t){return Dt().updateFromJSON(t)}insertNewAfter(t,e){const n=m(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,e),n}collapseAtStart(){const t=m();return this.getChildren().forEach((e=>t.append(e))),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Dt(){return f(new yt)}function xt(t){return t instanceof yt}class wt extends d{static getType(){return"heading"}static clone(t){return new wt(t.__tag,t.__key)}constructor(t,e){super(e),this.__tag=t}getTag(){return this.__tag}setTag(t){const e=this.getWritable();return this.__tag=t,e}createDOM(t){const e=this.__tag,n=document.createElement(e),r=t.theme.heading;if(void 0!==r){const t=r[e];o(n,t)}return n}updateDOM(t,e,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Et,priority:0}),h2:t=>({conversion:Et,priority:0}),h3:t=>({conversion:Et,priority:0}),h4:t=>({conversion:Et,priority:0}),h5:t=>({conversion:Et,priority:0}),h6:t=>({conversion:Et,priority:0}),p:t=>{const e=t.firstChild;return null!==e&&Nt(e)?{conversion:()=>({node:null}),priority:3}:null},span:t=>Nt(t)?{conversion:t=>({node:Tt("h1")}),priority:3}:null}}exportDOM(t){const{element:e}=super.exportDOM(t);if(i(e)){this.isEmpty()&&e.append(document.createElement("br"));const t=this.getFormatType();e.style.textAlign=t;const n=this.getDirection();n&&(e.dir=n)}return{element:e}}static importJSON(t){return Tt(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,e=!0){const n=t?t.anchor.offset:0,r=this.getLastDescendant(),o=!r||t&&t.anchor.key===r.getKey()&&n===r.getTextContentSize()||!t?m():Tt(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,e),0===n&&!this.isEmpty()&&t){const t=m();t.select(),this.replace(t,!0)}return o}collapseAtStart(){const t=this.isEmpty()?m():Tt(this.getTag());return this.getChildren().forEach((e=>t.append(e))),this.replace(t),!0}extractWithChild(){return!0}}function Nt(t){return"span"===t.nodeName.toLowerCase()&&"26pt"===t.style.fontSize}function Et(t){const e=t.nodeName.toLowerCase();let n=null;return"h1"!==e&&"h2"!==e&&"h3"!==e&&"h4"!==e&&"h5"!==e&&"h6"!==e||(n=Tt(e),null!==t.style&&(g(t,n),n.setFormat(t.style.textAlign))),{node:n}}function Ot(t){const e=Dt();return null!==t.style&&(e.setFormat(t.style.textAlign),g(t,e)),{node:e}}function Tt(t="h1"){return f(new wt(t))}function _t(t){return t instanceof wt}function At(t){let e=null;if(s(t,DragEvent)?e=t.dataTransfer:s(t,ClipboardEvent)&&(e=t.clipboardData),null===e)return[!1,[],!1];const n=e.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(e.files),o]}function St(t){const e=h();if(!y(e))return!1;const n=new Set,r=e.getNodes();for(let e=0;e_(t)&&!t.isInline()));if(null===s)continue;const a=s.getKey();s.canIndent()&&!n.has(a)&&(n.add(a),t(s))}return n.size>0}function Ft(t){const e=V(t);return J(e)}function It(t){for(const e of["lowercase","uppercase","capitalize"])t.hasFormat(e)&&t.toggleFormat(e)}function Pt(o){return a(o.registerCommand(p,(t=>{const e=h();return!!C(e)&&(e.clear(),!0)}),0),o.registerCommand(v,(t=>{const e=h();return!!y(e)&&(e.deleteCharacter(t),!0)}),D),o.registerCommand(x,(t=>{const e=h();return!!y(e)&&(e.deleteWord(t),!0)}),D),o.registerCommand(w,(t=>{const e=h();return!!y(e)&&(e.deleteLine(t),!0)}),D),o.registerCommand(N,(e=>{const n=h();if("string"==typeof e)null!==n&&n.insertText(e);else{if(null===n)return!1;const r=e.dataTransfer;if(null!=r)t(r,n,o,e);else if(y(n)){const t=e.data;return t&&n.insertText(t),!0}}return!0}),D),o.registerCommand(E,(()=>{const t=h();return!!y(t)&&(t.removeText(),!0)}),D),o.registerCommand(O,(t=>{const e=h();return!!y(e)&&(e.formatText(t),!0)}),D),o.registerCommand(T,(t=>{const e=h();if(!y(e)&&!C(e))return!1;const n=e.getNodes();for(const e of n){const n=c(e,(t=>_(t)&&!t.isInline()));null!==n&&n.setFormat(t)}return!0}),D),o.registerCommand(A,(t=>{const e=h();return!!y(e)&&(e.insertLineBreak(t),!0)}),D),o.registerCommand(S,(()=>{const t=h();return!!y(t)&&(t.insertParagraph(),!0)}),D),o.registerCommand(F,(()=>(I([P()]),!0)),D),o.registerCommand(b,(()=>St((t=>{const e=t.getIndent();t.setIndent(e+1)}))),D),o.registerCommand(K,(()=>St((t=>{const e=t.getIndent();e>0&&t.setIndent(e-1)}))),D),o.registerCommand(M,(t=>{const e=h();if(C(e)&&!Ft(t.target)){const t=e.getNodes();if(t.length>0)return t[0].selectPrevious(),!0}else if(y(e)){const n=k(e.focus,!0);if(!t.shiftKey&&J(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),t.preventDefault(),!0}return!1}),D),o.registerCommand(L,(t=>{const e=h();if(C(e)){const t=e.getNodes();if(t.length>0)return t[0].selectNext(0,0),!0}else if(y(e)){if(function(t){const e=t.focus;return"root"===e.key&&e.offset===ut().getChildrenSize()}(e))return t.preventDefault(),!0;const n=k(e.focus,!1);if(!t.shiftKey&&J(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1}),D),o.registerCommand(R,(t=>{const e=h();if(C(e)){const n=e.getNodes();if(n.length>0)return t.preventDefault(),n[0].selectPrevious(),!0}if(!y(e))return!1;if(n(e,!0)){const n=t.shiftKey;return t.preventDefault(),r(e,n,!0),!0}return!1}),D),o.registerCommand(W,(t=>{const e=h();if(C(e)&&!Ft(t.target)){const n=e.getNodes();if(n.length>0)return t.preventDefault(),n[0].selectNext(0,0),!0}if(!y(e))return!1;const o=t.shiftKey;return!!n(e,!1)&&(t.preventDefault(),r(e,o,!1),!0)}),D),o.registerCommand(z,(t=>{if(Ft(t.target))return!1;const e=h();if(!y(e))return!1;const{anchor:n}=e,r=n.getNode();if(e.isCollapsed()&&0===n.offset&&!q(r)){if(u(r).getIndent()>0)return t.preventDefault(),o.dispatchCommand(K,void 0)}return(!pt||"ko-KR"!==navigator.language)&&(t.preventDefault(),o.dispatchCommand(v,!0))}),D),o.registerCommand(X,(t=>{if(Ft(t.target))return!1;const e=h();return!!y(e)&&(t.preventDefault(),o.dispatchCommand(v,!1))}),D),o.registerCommand(Y,(t=>{const e=h();if(!y(e))return!1;if(It(e),null!==t){if((pt||gt||Ct)&&ft)return!1;if(t.preventDefault(),t.shiftKey)return o.dispatchCommand(A,!1)}return o.dispatchCommand(S,void 0)}),D),o.registerCommand(B,(()=>{const t=h();return!!y(t)&&(o.blur(),!0)}),D),o.registerCommand(G,(t=>{const[,e]=At(t);if(e.length>0){const n=lt(t.clientX,t.clientY);if(null!==n){const{offset:t,node:r}=n,i=V(r);if(null!==i){const e=j();if(H(i))e.anchor.set(i.getKey(),t,"text"),e.focus.set(i.getKey(),t,"text");else{const t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}const n=Q(e);U(n)}o.dispatchCommand(vt,e)}return t.preventDefault(),!0}const n=h();return!!y(n)}),D),o.registerCommand(Z,(t=>{const[e]=At(t),n=h();return!(e&&!y(n))}),D),o.registerCommand($,(t=>{const[e]=At(t),n=h();if(e&&!y(n))return!1;const r=lt(t.clientX,t.clientY);if(null!==r){const e=V(r.node);J(e)&&t.preventDefault()}return!0}),D),o.registerCommand(tt,(()=>(et(),!0)),D),o.registerCommand(nt,(t=>(e(o,s(t,ClipboardEvent)?t:null),!0)),D),o.registerCommand(rt,(t=>(async function(t,n){await e(n,s(t,ClipboardEvent)?t:null),n.update((()=>{const t=h();y(t)?t.removeText():C(t)&&t.getNodes().forEach((t=>t.remove()))}))}(t,o),!0)),D),o.registerCommand(ot,(e=>{const[,n,r]=At(e);if(n.length>0&&!r)return o.dispatchCommand(vt,n),!0;if(it(e.target)&&st(e.target))return!1;return null!==h()&&(function(e,n){e.preventDefault(),n.update((()=>{const r=h(),o=s(e,InputEvent)||s(e,KeyboardEvent)?null:e.clipboardData;null!=o&&null!==r&&t(o,r,n)}),{tag:"paste"})}(e,o),!0)}),D),o.registerCommand(at,(t=>{const e=h();return y(e)&&It(e),!1}),D),o.registerCommand(ct,(t=>{const e=h();return y(e)&&It(e),!1}),D))}export{Tt as $createHeadingNode,Dt as $createQuoteNode,_t as $isHeadingNode,xt as $isQuoteNode,vt as DRAG_DROP_PASTE,wt as HeadingNode,yt as QuoteNode,At as eventFiles,Pt as registerRichText}; diff --git a/package.json b/package.json index 8dc08e5008c..7a16bd37843 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,6 @@ "@types/react-native-vector-icons/@types/react": "17.0.2", "@types/react-native/@types/react": "17.0.2", "@types/hoist-non-react-statics/@types/react": "17.0.2", - "@lexical/clipboard@0.23.1": "patch:@lexical/clipboard@npm:0.23.1#.yarn/patches/@lexical-clipboard-npm-0.23.1-961671e399.patch", - "@lexical/rich-text@0.23.1": "patch:@lexical/rich-text@npm:0.23.1#.yarn/patches/@lexical-rich-text-npm-0.23.1-a9f13154ae.patch", "node-abi": "^4.2.0" }, "dependencies": { diff --git a/packages/mobile/fastlane/Fastfile b/packages/mobile/fastlane/Fastfile index 66942c9d7cb..dfc3d749c98 100755 --- a/packages/mobile/fastlane/Fastfile +++ b/packages/mobile/fastlane/Fastfile @@ -15,6 +15,7 @@ platform :ios do end def build_ios(scheme) + xcversion(version: "16.1") increment_version_number( version_number: ENV['PACKAGE_VERSION'], xcodeproj: 'ios/StandardNotes.xcodeproj' diff --git a/packages/web/package.json b/packages/web/package.json index 048e5342df7..c3298a7e53c 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -108,17 +108,17 @@ }, "dependencies": { "@ariakit/react": "^0.3.9", - "@lexical/clipboard": "0.23.1", - "@lexical/headless": "0.23.1", - "@lexical/link": "0.23.1", - "@lexical/list": "0.23.1", - "@lexical/react": "0.23.1", - "@lexical/rich-text": "0.23.1", - "@lexical/utils": "0.23.1", + "@lexical/clipboard": "0.30.0", + "@lexical/headless": "0.30.0", + "@lexical/link": "0.30.0", + "@lexical/list": "0.30.0", + "@lexical/react": "0.30.0", + "@lexical/rich-text": "0.30.0", + "@lexical/utils": "0.30.0", "@radix-ui/react-slot": "^1.0.1", "@react-pdf/renderer": "^3.3.2", "comlink": "^4.4.1", "fast-diff": "^1.3.0", - "lexical": "0.23.1" + "lexical": "0.30.0" } } diff --git a/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx b/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx index c0674a935f2..80a0d86efda 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx @@ -5,7 +5,7 @@ import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin' import { ClearEditorPlugin } from '@lexical/react/LexicalClearEditorPlugin' import { MarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin' import { TablePlugin } from '@lexical/react/LexicalTablePlugin' -import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary' +import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary' import { HashtagPlugin } from '@lexical/react/LexicalHashtagPlugin' import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin' import { LinkPlugin } from '@lexical/react/LexicalLinkPlugin' diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx index a0ddfe70487..7809d3fef91 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx @@ -1,4 +1,4 @@ -import { $isListItemNode, INSERT_CHECK_LIST_COMMAND, insertList, ListNode } from '@lexical/list' +import { $insertList, $isListItemNode, INSERT_CHECK_LIST_COMMAND, ListNode } from '@lexical/list' import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext' import { calculateZoomLevel, isHTMLElement, mergeRegister } from '@lexical/utils' import { @@ -23,7 +23,7 @@ export function CheckListPlugin(): null { editor.registerCommand( INSERT_CHECK_LIST_COMMAND, () => { - insertList(editor, 'check') + $insertList('check') return true }, COMMAND_PRIORITY_LOW, diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/CollapsiblePlugin/index.ts b/packages/web/src/javascripts/Components/SuperEditor/Plugins/CollapsiblePlugin/index.ts index 68929ee7da1..781d1def5af 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/CollapsiblePlugin/index.ts +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/CollapsiblePlugin/index.ts @@ -12,23 +12,15 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext import { $findMatchingParent, mergeRegister, $insertNodeToNearestRoot } from '@lexical/utils' import { $createParagraphNode, - $getNodeByKey, - $getPreviousSelection, $getSelection, - $isElementNode, $isRangeSelection, - $setSelection, - COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_LOW, createCommand, - DELETE_CHARACTER_COMMAND, INSERT_PARAGRAPH_COMMAND, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_LEFT_COMMAND, KEY_ARROW_RIGHT_COMMAND, KEY_ARROW_UP_COMMAND, - LexicalNode, - NodeKey, } from 'lexical' import { useEffect } from 'react' @@ -45,7 +37,6 @@ import { import { $createCollapsibleTitleNode, $isCollapsibleTitleNode, CollapsibleTitleNode } from './CollapsibleTitleNode' export const INSERT_COLLAPSIBLE_COMMAND = createCommand() -export const TOGGLE_COLLAPSIBLE_COMMAND = createCommand() export default function CollapsiblePlugin(): JSX.Element | null { const [editor] = useLexicalComposerContext() @@ -56,7 +47,7 @@ export default function CollapsiblePlugin(): JSX.Element | null { ) } - const onEscapeUp = () => { + const $onEscapeUp = () => { const selection = $getSelection() if ($isRangeSelection(selection) && selection.isCollapsed() && selection.anchor.offset === 0) { const container = $findMatchingParent(selection.anchor.getNode(), $isCollapsibleContainerNode) @@ -76,7 +67,7 @@ export default function CollapsiblePlugin(): JSX.Element | null { return false } - const onEscapeDown = () => { + const $onEscapeDown = () => { const selection = $getSelection() if ($isRangeSelection(selection) && selection.isCollapsed()) { const container = $findMatchingParent(selection.anchor.getNode(), $isCollapsibleContainerNode) @@ -84,8 +75,8 @@ export default function CollapsiblePlugin(): JSX.Element | null { if ($isCollapsibleContainerNode(container)) { const parent = container.getParent() if (parent !== null && parent.getLastChild() === container) { - const titleParagraph = container.getFirstDescendant() - const contentParagraph = container.getLastDescendant() + const titleParagraph = container.getFirstDescendant() + const contentParagraph = container.getLastDescendant() if ( (contentParagraph !== null && @@ -133,69 +124,34 @@ export default function CollapsiblePlugin(): JSX.Element | null { node.remove() } }), - // This handles the case when container is collapsed and we delete its previous sibling - // into it, it would cause collapsed content deleted (since it's display: none, and selection - // swallows it when deletes single char). Instead we expand container, which is although - // not perfect, but avoids bigger problem - editor.registerCommand( - DELETE_CHARACTER_COMMAND, - () => { - const selection = $getSelection() - if (!$isRangeSelection(selection) || !selection.isCollapsed() || selection.anchor.offset !== 0) { - return false - } - - const anchorNode = selection.anchor.getNode() - const topLevelElement = anchorNode.getTopLevelElement() - if (topLevelElement === null) { - return false - } - - const container = topLevelElement.getPreviousSibling() - if (!$isCollapsibleContainerNode(container) || container.getOpen()) { - return false - } - - container.setOpen(true) - return true - }, - COMMAND_PRIORITY_LOW, - ), // When collapsible is the last child pressing down/right arrow will insert paragraph // below it to allow adding more content. It's similar what $insertBlockNode // (mainly for decorators), except it'll always be possible to continue adding // new content even if trailing paragraph is accidentally deleted - editor.registerCommand(KEY_ARROW_DOWN_COMMAND, onEscapeDown, COMMAND_PRIORITY_LOW), - editor.registerCommand(KEY_ARROW_RIGHT_COMMAND, onEscapeDown, COMMAND_PRIORITY_LOW), + editor.registerCommand(KEY_ARROW_DOWN_COMMAND, $onEscapeDown, COMMAND_PRIORITY_LOW), + editor.registerCommand(KEY_ARROW_RIGHT_COMMAND, $onEscapeDown, COMMAND_PRIORITY_LOW), // When collapsible is the first child pressing up/left arrow will insert paragraph // above it to allow adding more content. It's similar what $insertBlockNode // (mainly for decorators), except it'll always be possible to continue adding // new content even if leading paragraph is accidentally deleted - editor.registerCommand(KEY_ARROW_UP_COMMAND, onEscapeUp, COMMAND_PRIORITY_LOW), - editor.registerCommand(KEY_ARROW_LEFT_COMMAND, onEscapeUp, COMMAND_PRIORITY_LOW), + editor.registerCommand(KEY_ARROW_UP_COMMAND, $onEscapeUp, COMMAND_PRIORITY_LOW), + editor.registerCommand(KEY_ARROW_LEFT_COMMAND, $onEscapeUp, COMMAND_PRIORITY_LOW), // Handling CMD+Enter to toggle collapsible element collapsed state editor.registerCommand( INSERT_PARAGRAPH_COMMAND, () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - const windowEvent: KeyboardEvent | undefined = editor._window?.event - - if (windowEvent && (windowEvent.ctrlKey || windowEvent.metaKey) && windowEvent.key === 'Enter') { - const selection = $getPreviousSelection() - if ($isRangeSelection(selection) && selection.isCollapsed()) { - const parent = $findMatchingParent( - selection.anchor.getNode(), - (node) => $isElementNode(node) && !node.isInline(), - ) + const selection = $getSelection() + if ($isRangeSelection(selection)) { + const titleNode = $findMatchingParent(selection.anchor.getNode(), (node) => $isCollapsibleTitleNode(node)) - if ($isCollapsibleTitleNode(parent)) { - const container = parent.getParent() - if ($isCollapsibleContainerNode(container)) { + if ($isCollapsibleTitleNode(titleNode)) { + const container = titleNode.getParent() + if (container && $isCollapsibleContainerNode(container)) { + if (!container.getOpen()) { container.toggleOpen() - $setSelection(selection.clone()) - return true } + titleNode.getNextSibling()?.selectEnd() + return true } } } @@ -209,32 +165,18 @@ export default function CollapsiblePlugin(): JSX.Element | null { () => { editor.update(() => { const title = $createCollapsibleTitleNode() + const paragraph = $createParagraphNode() $insertNodeToNearestRoot( $createCollapsibleContainerNode(true).append( - title, + title.append(paragraph), $createCollapsibleContentNode().append($createParagraphNode()), ), ) - title.select() - }) - - return true - }, - COMMAND_PRIORITY_EDITOR, - ), - editor.registerCommand( - TOGGLE_COLLAPSIBLE_COMMAND, - (key: NodeKey) => { - editor.update(() => { - const containerNode = $getNodeByKey(key) - if ($isCollapsibleContainerNode(containerNode)) { - containerNode.toggleOpen() - } + paragraph.select() }) - return true }, - COMMAND_PRIORITY_EDITOR, + COMMAND_PRIORITY_LOW, ), ) }, [editor]) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/TableCellActionMenuPlugin/index.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/TableCellActionMenuPlugin/index.tsx index 746df77810e..900c7476189 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/TableCellActionMenuPlugin/index.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/TableCellActionMenuPlugin/index.tsx @@ -18,17 +18,17 @@ import { } from 'lexical' import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext' -import useLexicalEditable from '@lexical/react/useLexicalEditable' +import { useLexicalEditable } from '@lexical/react/useLexicalEditable' import { - $deleteTableColumn__EXPERIMENTAL, - $deleteTableRow__EXPERIMENTAL, + $deleteTableColumnAtSelection, + $deleteTableRowAtSelection, $getNodeTriplet, $getTableCellNodeFromLexicalNode, $getTableColumnIndexFromTableCellNode, $getTableNodeFromLexicalNodeOrThrow, $getTableRowIndexFromTableCellNode, - $insertTableColumn__EXPERIMENTAL, - $insertTableRow__EXPERIMENTAL, + $insertTableColumnAtSelection, + $insertTableRowAtSelection, $isTableCellNode, $isTableRowNode, $isTableSelection, @@ -249,7 +249,7 @@ function TableActionMenu({ onClose, tableCellNode: _tableCellNode, cellMerge }: const insertTableRowAtSelection = useCallback( (shouldInsertAfter: boolean) => { editor.update(() => { - $insertTableRow__EXPERIMENTAL(shouldInsertAfter) + $insertTableRowAtSelection(shouldInsertAfter) onClose() }) }, @@ -260,7 +260,7 @@ function TableActionMenu({ onClose, tableCellNode: _tableCellNode, cellMerge }: (shouldInsertAfter: boolean) => { editor.update(() => { for (let i = 0; i < selectionCounts.columns; i++) { - $insertTableColumn__EXPERIMENTAL(shouldInsertAfter) + $insertTableColumnAtSelection(shouldInsertAfter) } onClose() }) @@ -270,7 +270,7 @@ function TableActionMenu({ onClose, tableCellNode: _tableCellNode, cellMerge }: const deleteTableRowAtSelection = useCallback(() => { editor.update(() => { - $deleteTableRow__EXPERIMENTAL() + $deleteTableRowAtSelection() onClose() }) }, [editor, onClose]) @@ -287,7 +287,7 @@ function TableActionMenu({ onClose, tableCellNode: _tableCellNode, cellMerge }: const deleteTableColumnAtSelection = useCallback(() => { editor.update(() => { - $deleteTableColumn__EXPERIMENTAL() + $deleteTableColumnAtSelection() onClose() }) }, [editor, onClose]) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx index 69a86fcea63..07e6e951410 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx @@ -63,7 +63,7 @@ import { Toolbar, ToolbarItem, useToolbarStore } from '@ariakit/react' import { PasswordBlock } from '../Blocks/Password' import { URL_REGEX } from '@/Constants/Constants' import Popover from '@/Components/Popover/Popover' -import LexicalTableOfContents from '@lexical/react/LexicalTableOfContents' +import { TableOfContentsPlugin } from '@lexical/react/LexicalTableOfContentsPlugin' import Menu from '@/Components/Menu/Menu' import MenuItem, { MenuItemProps } from '@/Components/Menu/MenuItem' import { debounce, remToPx } from '@/Utils' @@ -823,7 +823,7 @@ const ToolbarPlugin = () => { documentElement={popoverDocumentElement} >
Table of Contents
- + {(tableOfContents) => { if (!tableOfContents.length) { return
No headings found
@@ -871,7 +871,7 @@ const ToolbarPlugin = () => { ) }} -
+ =17.x" react-dom: ">=17.x" - checksum: 17807df72311abfdda8f692cc4bcb1223d1e77b1db3c24e1c460d021b00742ad7bb8bd7aa2346af3570470e21284317087e8645e79eeb8a5819cb9e6a2e63d1d + checksum: acddbb84d4aa0599fd632adb248bb8e1575d7bf05f886941a4553bf6b0fa1e3ad551bf302ea66b2d3b4a295bde3a0d46cc3fbbe3ba2307871c216b911f56e310 languageName: node linkType: hard -"@lexical/dragon@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/dragon@npm:0.23.1" +"@lexical/dragon@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/dragon@npm:0.30.0" dependencies: - lexical: 0.23.1 - checksum: 92a644f3f59f65dc21185ccf7914b293e3d25699624d18da880c64af646eec8aaf972b36f458ed6aaeeb0bf6b2c2ceef7caf143957705c3ed9d9468a10b6e1d7 + lexical: 0.30.0 + checksum: 0cb68c43e6626d1713e1479bd8a11e03c957bcc01b0b23614b24512e98969ee338ee0134c2106d41ddb90ff12892f47e63096d626d8e62e1c8a6a58ed49a7e4c languageName: node linkType: hard -"@lexical/hashtag@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/hashtag@npm:0.23.1" +"@lexical/hashtag@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/hashtag@npm:0.30.0" dependencies: - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: e7006a2abffe06ff4743c568baf2c5e8339ee8eba2cdc87d0fe696517842ef83055ca09fa3c66f28078f99d3329c1174c64fbd7269cbc24d321a8fd03c033960 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: b28bae6959f0e5dee68431f6dba2ac06452095d32faca0ec51e18770290c9d503597b04339ad3207f5aaa404e541280ed959df37f252a8921e39e83c2767be5a languageName: node linkType: hard -"@lexical/headless@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/headless@npm:0.23.1" +"@lexical/headless@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/headless@npm:0.30.0" dependencies: - lexical: 0.23.1 - checksum: e3284935aefef50d66e5733e9e6f4ec1dd0236ac9411c62f6cce53fbdfa3d471dc28260611f252c7a8cd4eac5b53e1d0dd4b45cd822d3bc06ca4652cab2b9e44 + lexical: 0.30.0 + checksum: f9c09d4bdb6ea0ff77ed93014e762a6c5eb5c650a793beecf0351b53936dd6d7521425ebc15e55c114ba52c7e9bc790f4447a4572ee17d34874fc0a182e2252c languageName: node linkType: hard -"@lexical/history@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/history@npm:0.23.1" +"@lexical/history@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/history@npm:0.30.0" dependencies: - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 23b52196a866f0ce4d42794f648ebaa56537b19f0d3217fbb4f731c7edcf18bbf3b682b670bc2d2b6f674b32e8e6e91f4e60f9d3f1e73587494ae1df5ad550b5 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: 6491d8d95386379d5b87acc72fd17e8335f2fc4ee942fa04191e0cf4b9c74c7a6297e5a0662ba2d1630cb5a7715e19a5c23443d762487287318ab936dd7eedd5 languageName: node linkType: hard -"@lexical/html@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/html@npm:0.23.1" +"@lexical/html@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/html@npm:0.30.0" dependencies: - "@lexical/selection": 0.23.1 - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 7041f6af6ac8a08e2a6c2ce433f250e30d8b9095e104753f0b712b8a0c467908e640b2cd074ff73b71fca571fe0ea75433fe6f5c081cbfa38d3515945f33e818 + "@lexical/selection": 0.30.0 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: c7b4da1898fbc8b97e8293a200230138b6f5b5c605fc6a9812518fd93813eb30479ac3553e264f7dea268ebe7dd7a80e60ea5da9200170ed875f7ea14f8b26f0 languageName: node linkType: hard -"@lexical/link@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/link@npm:0.23.1" +"@lexical/link@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/link@npm:0.30.0" dependencies: - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 80076c11de17d40748f1e085cb8d33b1f0a6592a3a0bf10bfd3292d26d95cb06f9959ae013fc74ff273d5ea4b45ffa75b372dd43b368186bc4e2d90e5320b18f + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: 80f4053ca96f2e74f7e4dcd9cff1bb0cd802015452c1d2db0b7ce4abe6829b90ecfd14847691e2f5dbbdd1be6d50612d242714e472879a439555227e5328065e languageName: node linkType: hard -"@lexical/list@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/list@npm:0.23.1" +"@lexical/list@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/list@npm:0.30.0" dependencies: - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: b6e802f1ed241c90e434829dadc947f613cc6c701ddf87f241f77fd3553eaec8ef2ef5550ba7f1be892b9b962aa7b77d3d6b1953005dac5a01afb1843d6564d6 + "@lexical/selection": 0.30.0 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: 2b7d9f56255f20557c4852a69c1cb34ea25a14b250ed61d91c4d9752f20cb471be5d0562df74eb6838f116177adceca4a94f753c3f941daa07a908971524ba0a languageName: node linkType: hard -"@lexical/mark@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/mark@npm:0.23.1" +"@lexical/mark@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/mark@npm:0.30.0" dependencies: - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 06291881510439cddb235680d27ffaa2b94dd8d75c76743d2a208fa9eac6dfdfa6fcc135a40e834d05be8b87dca611c8b0ad7a22c9e5bb547af701ea92660a69 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: d576067928267788eae1194c9335ecc63eac005909f6a2580d744e924f862e59ba9e0458bd33d654dd8157db053181711a851c140511447f2c36677aa6bd37ce languageName: node linkType: hard -"@lexical/markdown@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/markdown@npm:0.23.1" +"@lexical/markdown@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/markdown@npm:0.30.0" dependencies: - "@lexical/code": 0.23.1 - "@lexical/link": 0.23.1 - "@lexical/list": 0.23.1 - "@lexical/rich-text": 0.23.1 - "@lexical/text": 0.23.1 - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 097e93c5109c0c71b8eedb151a85e295f4e8f555f7395f3a42a1587b553872bb2972ce5246a0c3782c2d98981d332f484c3b610247a9c2da53c790baa2e18bba + "@lexical/code": 0.30.0 + "@lexical/link": 0.30.0 + "@lexical/list": 0.30.0 + "@lexical/rich-text": 0.30.0 + "@lexical/text": 0.30.0 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: 03508b722be2534164aefd8863ac3cc543540f5e6471bc0556331346c1b13f117720b0194c79c0f22f90ae981b3e7884aa975e4b7e3c1fe3b46725daa318676c languageName: node linkType: hard -"@lexical/offset@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/offset@npm:0.23.1" +"@lexical/offset@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/offset@npm:0.30.0" dependencies: - lexical: 0.23.1 - checksum: e4692cd251802228c926cdfd790c95736127ba892c4eef613649d73de28f4c06ad8426360f2e5218ed9f9b7467aeff52038fc514359341a311900c28f9e9d718 + lexical: 0.30.0 + checksum: 83d550a4bb46e0ce19bb10b040d055f128f7069b3611ed0a2f9b839b03990252e1d5fd842754e33a59b229571565dcf00d5b03eb570c3b73ad3a0bfde01c46ff languageName: node linkType: hard -"@lexical/overflow@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/overflow@npm:0.23.1" +"@lexical/overflow@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/overflow@npm:0.30.0" dependencies: - lexical: 0.23.1 - checksum: 117a58efa7647979ba6dc83eeeb88534c6c38cba51dd6667b6a4d5d6840271e9bf4895f2d0dcbc5ec0cc2c579dc175134fbd1386c9a8d335fb45ca80e8ac8a65 + lexical: 0.30.0 + checksum: 5e82701a2928a87c2c2bcf06afb0da1f505098552811ba3b5febfa741bb137e38ea541c376b673dadb8e6b9e91c8105157fa91ec1cb07d831b2b098f46641ba8 languageName: node linkType: hard -"@lexical/plain-text@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/plain-text@npm:0.23.1" +"@lexical/plain-text@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/plain-text@npm:0.30.0" dependencies: - "@lexical/clipboard": 0.23.1 - "@lexical/selection": 0.23.1 - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 5405332b1c559223e8941915ac48cc2a630648848d0135340d7e798858f2a59326eaa413612b5d39bbb6471aa6c0f94e42dffd20f98c71ea1c3a4d6ab38f9bb0 + "@lexical/clipboard": 0.30.0 + "@lexical/selection": 0.30.0 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: 201d02428929934259357a52536d6397ede43cff7c6d5502246a5a4277f51c9862b437ed153ddc299c43b3819470a185e33032dabab6e56105e6205be645c15c languageName: node linkType: hard -"@lexical/react@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/react@npm:0.23.1" +"@lexical/react@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/react@npm:0.30.0" dependencies: - "@lexical/clipboard": 0.23.1 - "@lexical/code": 0.23.1 - "@lexical/devtools-core": 0.23.1 - "@lexical/dragon": 0.23.1 - "@lexical/hashtag": 0.23.1 - "@lexical/history": 0.23.1 - "@lexical/link": 0.23.1 - "@lexical/list": 0.23.1 - "@lexical/mark": 0.23.1 - "@lexical/markdown": 0.23.1 - "@lexical/overflow": 0.23.1 - "@lexical/plain-text": 0.23.1 - "@lexical/rich-text": 0.23.1 - "@lexical/selection": 0.23.1 - "@lexical/table": 0.23.1 - "@lexical/text": 0.23.1 - "@lexical/utils": 0.23.1 - "@lexical/yjs": 0.23.1 - lexical: 0.23.1 + "@lexical/devtools-core": 0.30.0 + "@lexical/dragon": 0.30.0 + "@lexical/hashtag": 0.30.0 + "@lexical/history": 0.30.0 + "@lexical/link": 0.30.0 + "@lexical/list": 0.30.0 + "@lexical/mark": 0.30.0 + "@lexical/markdown": 0.30.0 + "@lexical/overflow": 0.30.0 + "@lexical/plain-text": 0.30.0 + "@lexical/rich-text": 0.30.0 + "@lexical/table": 0.30.0 + "@lexical/text": 0.30.0 + "@lexical/utils": 0.30.0 + "@lexical/yjs": 0.30.0 + lexical: 0.30.0 react-error-boundary: ^3.1.4 peerDependencies: react: ">=17.x" react-dom: ">=17.x" - checksum: dd462ea7e1827ecb8f0ff18ae6f1e66c16f7b9e69011c004b713fb139e8937247c5b293a059bd59ca8dd51881ab0558be78d937ddd2441da03b1bdc5f9e9b355 - languageName: node - linkType: hard - -"@lexical/rich-text@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/rich-text@npm:0.23.1" - dependencies: - "@lexical/clipboard": 0.23.1 - "@lexical/selection": 0.23.1 - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 54a3a524b54d2cfc8b7373d8768ac79de570cbca0940986ead2f2dde2fa3ceaf33122809710786a9dfc906cd4d222e6200e2c271ec7c8828ef6a2f48b6d51e28 + checksum: 7dc461334d59a871861470da1dc8eb101d1766270e1cf08957b9979d0cbeffa3e7f40c01bfac364a752ce2646c712b4ae33613a78f3b6a3113993a8f8db14d0e languageName: node linkType: hard -"@lexical/rich-text@patch:@lexical/rich-text@npm:0.23.1#.yarn/patches/@lexical-rich-text-npm-0.23.1-a9f13154ae.patch::locator=%40standardnotes%2Fapp-monorepo%40workspace%3A.": - version: 0.23.1 - resolution: "@lexical/rich-text@patch:@lexical/rich-text@npm%3A0.23.1#.yarn/patches/@lexical-rich-text-npm-0.23.1-a9f13154ae.patch::version=0.23.1&hash=9d0a4e&locator=%40standardnotes%2Fapp-monorepo%40workspace%3A." +"@lexical/rich-text@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/rich-text@npm:0.30.0" dependencies: - "@lexical/clipboard": 0.23.1 - "@lexical/selection": 0.23.1 - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: 8d452ef63a3fedc193f67d0fe57697ebca8815183e07ae6b7246064d11cb7efdc4051925a58d4b15b8cf7c0dee875ad58db11240538378ab50901df0b2b3ed64 + "@lexical/clipboard": 0.30.0 + "@lexical/selection": 0.30.0 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: b97d25b4c8bf8fff567a0cd727e98dcadc8fcba3b1c5c8c6c497f597a12157a12fbcad0751e127898069430e0b55b3995c192ce6795f3c47b451989be160ef1e languageName: node linkType: hard -"@lexical/selection@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/selection@npm:0.23.1" +"@lexical/selection@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/selection@npm:0.30.0" dependencies: - lexical: 0.23.1 - checksum: d5218e5eb35754b3a63472c25630c0399e561c5cbbd17b1387c318083dfee519b76ae9554d44c31d1a483ed3a427c4023f2ceb32a0d99a5f4521742cde71158a + lexical: 0.30.0 + checksum: df1ace2b289257654824f881771fd9f53ebd82ed6f7dd44c9d368766e1e9383470ed6e7b0a3fd245527340e7ec08bddf0a8e7ae9635b81670a82e47ba99a3561 languageName: node linkType: hard -"@lexical/table@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/table@npm:0.23.1" +"@lexical/table@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/table@npm:0.30.0" dependencies: - "@lexical/clipboard": 0.23.1 - "@lexical/utils": 0.23.1 - lexical: 0.23.1 - checksum: cab32ce7c1ddf033dc30f89e20d3336ade747b4026bc47088c5ec762f162966f7ccb1ea01603c00c6552516a4b78d84ba17f346814113198bd2468bd3acd93f9 + "@lexical/clipboard": 0.30.0 + "@lexical/utils": 0.30.0 + lexical: 0.30.0 + checksum: 10d2dc18350e01e664db9903b842371051d0bc0a8ad76d25d5028f1051e3baff3c0e20a4c73db2b22b1eb95e0cab2b81755882d2db18a5e71245f61b9e927381 languageName: node linkType: hard -"@lexical/text@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/text@npm:0.23.1" +"@lexical/text@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/text@npm:0.30.0" dependencies: - lexical: 0.23.1 - checksum: 55de1fe8c999f7dd8e3e29eb6dff78483d2c5a41e8e05c63e484ffcfeac21464d8c212eb4735e72354fd44038e9ba0fa228da0699fd1c8b1c18007bd54f3a9dd + lexical: 0.30.0 + checksum: 316aa43e7e44de6de285168a1093e5067079a5123ae53c13a933cdcd5be595364b9dcedd4a23700fc64b948186497e33dab57ce997dc8a6237a736e0b5b40de2 languageName: node linkType: hard -"@lexical/utils@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/utils@npm:0.23.1" +"@lexical/utils@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/utils@npm:0.30.0" dependencies: - "@lexical/list": 0.23.1 - "@lexical/selection": 0.23.1 - "@lexical/table": 0.23.1 - lexical: 0.23.1 - checksum: fce12e3de78ba6f7d54692cc962d196206f396fc32ded2258094b625c91213b68c97062488bb02711dac6394a7f8e1be1a2cf025102a058a661f866ba18d916d + "@lexical/list": 0.30.0 + "@lexical/selection": 0.30.0 + "@lexical/table": 0.30.0 + lexical: 0.30.0 + checksum: 5bec6846b556b46b0716decf1d4f238541e87597ddbdef25ab0062309b7a3c91752c7faeff1f1bf5383550495244dc900687f601e089b4e481fef0a3974fb5cd languageName: node linkType: hard -"@lexical/yjs@npm:0.23.1": - version: 0.23.1 - resolution: "@lexical/yjs@npm:0.23.1" +"@lexical/yjs@npm:0.30.0": + version: 0.30.0 + resolution: "@lexical/yjs@npm:0.30.0" dependencies: - "@lexical/offset": 0.23.1 - "@lexical/selection": 0.23.1 - lexical: 0.23.1 + "@lexical/offset": 0.30.0 + "@lexical/selection": 0.30.0 + lexical: 0.30.0 peerDependencies: yjs: ">=13.5.22" - checksum: bb06b140b74fc8c381be849138b48271b6286fca06fe481b926e6662d57e2499af67639295f46e42fbbf6240a59145d725789a58f1fcf29ef2396bc6232eaf32 + checksum: 61530582bd669096f8bf15b97156f1fc3d4de473df06e12222738893c61752b46f6661f6c2d58b0518f4916c2180066aacee49d9ec7f57a087c2da99b36f3b1a languageName: node linkType: hard @@ -8793,13 +8766,13 @@ __metadata: "@babel/plugin-transform-react-jsx": ^7.19.0 "@babel/preset-env": "*" "@babel/preset-typescript": ^7.21.5 - "@lexical/clipboard": 0.23.1 - "@lexical/headless": 0.23.1 - "@lexical/link": 0.23.1 - "@lexical/list": 0.23.1 - "@lexical/react": 0.23.1 - "@lexical/rich-text": 0.23.1 - "@lexical/utils": 0.23.1 + "@lexical/clipboard": 0.30.0 + "@lexical/headless": 0.30.0 + "@lexical/link": 0.30.0 + "@lexical/list": 0.30.0 + "@lexical/react": 0.30.0 + "@lexical/rich-text": 0.30.0 + "@lexical/utils": 0.30.0 "@pmmmwh/react-refresh-webpack-plugin": ^0.5.10 "@radix-ui/react-slot": ^1.0.1 "@react-pdf/renderer": ^3.3.2 @@ -8851,7 +8824,7 @@ __metadata: identity-obj-proxy: ^3.0.0 jest: ^29.3.1 jest-environment-jsdom: ^29.3.1 - lexical: 0.23.1 + lexical: 0.30.0 lint-staged: ">=13" mini-css-extract-plugin: ^2.7.2 minimatch: ^5.1.1 @@ -20057,10 +20030,10 @@ __metadata: languageName: node linkType: hard -"lexical@npm:0.23.1": - version: 0.23.1 - resolution: "lexical@npm:0.23.1" - checksum: f842a5fc435c5e26bcaf3a1403822896f8d2eedd4783d179b7de94979a9d28a2b1ba43c0f7ff729db2e80dfa526858f08d0c84fd41a3f57f06adfe864d18e1c1 +"lexical@npm:0.30.0": + version: 0.30.0 + resolution: "lexical@npm:0.30.0" + checksum: f29359090bbe5dcd7ca9f8b14d64644dd4f8075a71787f79ae1741995eca2b1934402d4d35101511f43167b979cb7f2dca92997011f7a92818c508208c5bceb3 languageName: node linkType: hard @@ -23742,10 +23715,10 @@ __metadata: languageName: node linkType: hard -"prismjs@npm:^1.27.0": - version: 1.29.0 - resolution: "prismjs@npm:1.29.0" - checksum: 007a8869d4456ff8049dc59404e32d5666a07d99c3b0e30a18bd3b7676dfa07d1daae9d0f407f20983865fd8da56de91d09cb08e6aa61f5bc420a27c0beeaf93 +"prismjs@npm:^1.30.0": + version: 1.30.0 + resolution: "prismjs@npm:1.30.0" + checksum: a68eddd4c5f1c506badb5434b0b28a7cc2479ed1df91bc4218e6833c7971ef40c50ec481ea49749ac964256acb78d8b66a6bd11554938e8998e46c18b5f9a580 languageName: node linkType: hard