From b0af574bd890b3ee9059b8c6cbc2fcaf2b1e332c Mon Sep 17 00:00:00 2001 From: Katsiaryna <47710336+KatsiarynaDzibrova@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:49:12 +0100 Subject: [PATCH 1/6] Fix copying html table with unequal number of cells in a row (#5824) --- .../lexical-react/src/LexicalTablePlugin.ts | 66 ++++++++++++++----- .../lexical-table/src/LexicalTableUtils.ts | 21 ++++-- packages/lexical-table/src/index.ts | 1 + 3 files changed, 67 insertions(+), 21 deletions(-) diff --git a/packages/lexical-react/src/LexicalTablePlugin.ts b/packages/lexical-react/src/LexicalTablePlugin.ts index 3363d6e6423..e237e67b339 100644 --- a/packages/lexical-react/src/LexicalTablePlugin.ts +++ b/packages/lexical-react/src/LexicalTablePlugin.ts @@ -16,6 +16,7 @@ import type {NodeKey} from 'lexical'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { $computeTableMap, + $computeTableMapSkipCellCheck, $createTableCellNode, $createTableNodeWithDimensions, $getNodeTriplet, @@ -28,8 +29,13 @@ import { TableNode, TableRowNode, } from '@lexical/table'; -import {$insertFirst, $insertNodeToNearestRoot} from '@lexical/utils'; import { + $insertFirst, + $insertNodeToNearestRoot, + mergeRegister, +} from '@lexical/utils'; +import { + $createParagraphNode, $getNodeByKey, $isTextNode, $nodesOfType, @@ -57,24 +63,50 @@ export function TablePlugin({ ); } - return editor.registerCommand( - INSERT_TABLE_COMMAND, - ({columns, rows, includeHeaders}) => { - const tableNode = $createTableNodeWithDimensions( - Number(rows), - Number(columns), - includeHeaders, - ); - $insertNodeToNearestRoot(tableNode); + return mergeRegister( + editor.registerCommand( + INSERT_TABLE_COMMAND, + ({columns, rows, includeHeaders}) => { + const tableNode = $createTableNodeWithDimensions( + Number(rows), + Number(columns), + includeHeaders, + ); + $insertNodeToNearestRoot(tableNode); + + const firstDescendant = tableNode.getFirstDescendant(); + if ($isTextNode(firstDescendant)) { + firstDescendant.select(); + } - const firstDescendant = tableNode.getFirstDescendant(); - if ($isTextNode(firstDescendant)) { - firstDescendant.select(); + return true; + }, + COMMAND_PRIORITY_EDITOR, + ), + editor.registerNodeTransform(TableNode, (node) => { + const [gridMap] = $computeTableMapSkipCellCheck(node, null, null); + const maxRowLength = gridMap.reduce((curLength, row) => { + return Math.max(curLength, row.length); + }, 0); + for (let i = 0; i < gridMap.length; ++i) { + const rowLength = gridMap[i].length; + if (rowLength === maxRowLength) { + continue; + } + const lastCellMap = gridMap[i][rowLength - 1]; + const lastRowCell = lastCellMap.cell; + for (let j = rowLength; j < maxRowLength; ++j) { + // TODO: inherit header state from another header or body + const newCell = $createTableCellNode(0); + newCell.append($createParagraphNode()); + if (lastRowCell !== null) { + lastRowCell.insertAfter(newCell); + } else { + $insertFirst(lastRowCell, newCell); + } + } } - - return true; - }, - COMMAND_PRIORITY_EDITOR, + }), ); }, [editor]); diff --git a/packages/lexical-table/src/LexicalTableUtils.ts b/packages/lexical-table/src/LexicalTableUtils.ts index e6e507ba16c..07f366982d8 100644 --- a/packages/lexical-table/src/LexicalTableUtils.ts +++ b/packages/lexical-table/src/LexicalTableUtils.ts @@ -720,6 +720,21 @@ export function $computeTableMap( cellA: TableCellNode, cellB: TableCellNode, ): [TableMapType, TableMapValueType, TableMapValueType] { + const [tableMap, cellAValue, cellBValue] = $computeTableMapSkipCellCheck( + grid, + cellA, + cellB, + ); + invariant(cellAValue !== null, 'Anchor not found in Grid'); + invariant(cellBValue !== null, 'Focus not found in Grid'); + return [tableMap, cellAValue, cellBValue]; +} + +export function $computeTableMapSkipCellCheck( + grid: TableNode, + cellA: null | TableCellNode, + cellB: null | TableCellNode, +): [TableMapType, TableMapValueType | null, TableMapValueType | null] { const tableMap: TableMapType = []; let cellAValue: null | TableMapValueType = null; let cellBValue: null | TableMapValueType = null; @@ -739,10 +754,10 @@ export function $computeTableMap( tableMap[startRow + i][startColumn + j] = value; } } - if (cellA.is(cell)) { + if (cellA !== null && cellA.is(cell)) { cellAValue = value; } - if (cellB.is(cell)) { + if (cellB !== null && cellB.is(cell)) { cellBValue = value; } } @@ -771,8 +786,6 @@ export function $computeTableMap( j += cell.__colSpan; } } - invariant(cellAValue !== null, 'Anchor not found in Grid'); - invariant(cellBValue !== null, 'Focus not found in Grid'); return [tableMap, cellAValue, cellBValue]; } diff --git a/packages/lexical-table/src/index.ts b/packages/lexical-table/src/index.ts index 9c723b483e7..c9f3964cf07 100644 --- a/packages/lexical-table/src/index.ts +++ b/packages/lexical-table/src/index.ts @@ -49,6 +49,7 @@ export { } from './LexicalTableSelectionHelpers'; export { $computeTableMap, + $computeTableMapSkipCellCheck, $createTableNodeWithDimensions, $deleteTableColumn, $deleteTableColumn__EXPERIMENTAL, From 39e6f1f9cce58629214739c615d677cfe732b6f8 Mon Sep 17 00:00:00 2001 From: wnhlee <40269597+2wheeh@users.noreply.github.com> Date: Thu, 18 Apr 2024 01:39:51 +0900 Subject: [PATCH 2/6] Add $ prefix to updateToolbar on react-rich example (#5887) --- examples/react-rich/src/plugins/ToolbarPlugin.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/react-rich/src/plugins/ToolbarPlugin.tsx b/examples/react-rich/src/plugins/ToolbarPlugin.tsx index 69061072306..1ace522d99f 100644 --- a/examples/react-rich/src/plugins/ToolbarPlugin.tsx +++ b/examples/react-rich/src/plugins/ToolbarPlugin.tsx @@ -37,7 +37,7 @@ export default function ToolbarPlugin() { const [isUnderline, setIsUnderline] = useState(false); const [isStrikethrough, setIsStrikethrough] = useState(false); - const updateToolbar = useCallback(() => { + const $updateToolbar = useCallback(() => { const selection = $getSelection(); if ($isRangeSelection(selection)) { // Update text format @@ -52,13 +52,13 @@ export default function ToolbarPlugin() { return mergeRegister( editor.registerUpdateListener(({editorState}) => { editorState.read(() => { - updateToolbar(); + $updateToolbar(); }); }), editor.registerCommand( SELECTION_CHANGE_COMMAND, (_payload, newEditor) => { - updateToolbar(); + $updateToolbar(); return false; }, LowPriority, @@ -80,7 +80,7 @@ export default function ToolbarPlugin() { LowPriority, ), ); - }, [editor, updateToolbar]); + }, [editor, $updateToolbar]); return (
From baf4f457804d3852c1bdc540090e1ad97fe777d5 Mon Sep 17 00:00:00 2001 From: wnhlee <40269597+2wheeh@users.noreply.github.com> Date: Thu, 18 Apr 2024 01:41:08 +0900 Subject: [PATCH 3/6] Minor refactor on ListMaxIndentLevelPlugin (#5886) --- .../plugins/ListMaxIndentLevelPlugin/index.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/lexical-playground/src/plugins/ListMaxIndentLevelPlugin/index.ts b/packages/lexical-playground/src/plugins/ListMaxIndentLevelPlugin/index.ts index b8f3b3ce976..3feb82b9f96 100644 --- a/packages/lexical-playground/src/plugins/ListMaxIndentLevelPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/ListMaxIndentLevelPlugin/index.ts @@ -6,7 +6,7 @@ * */ -import type {RangeSelection} from 'lexical'; +import type {ElementNode, RangeSelection} from 'lexical'; import {$getListDepth, $isListItemNode, $isListNode} from '@lexical/list'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; @@ -15,15 +15,10 @@ import { $isElementNode, $isRangeSelection, COMMAND_PRIORITY_CRITICAL, - ElementNode, INDENT_CONTENT_COMMAND, } from 'lexical'; import {useEffect} from 'react'; -type Props = Readonly<{ - maxDepth: number | null | undefined; -}>; - function getElementNodesInSelection( selection: RangeSelection, ): Set { @@ -41,7 +36,7 @@ function getElementNodesInSelection( ); } -function isIndentPermitted(maxDepth: number): boolean { +function shouldPreventIndent(maxDepth: number): boolean { const selection = $getSelection(); if (!$isRangeSelection(selection)) { @@ -69,16 +64,20 @@ function isIndentPermitted(maxDepth: number): boolean { } } - return totalDepth <= maxDepth; + return totalDepth > maxDepth; } -export default function ListMaxIndentLevelPlugin({maxDepth}: Props): null { +export default function ListMaxIndentLevelPlugin({ + maxDepth = 7, +}: { + maxDepth?: number; +}): null { const [editor] = useLexicalComposerContext(); useEffect(() => { return editor.registerCommand( INDENT_CONTENT_COMMAND, - () => !isIndentPermitted(maxDepth ?? 7), + () => shouldPreventIndent(maxDepth), COMMAND_PRIORITY_CRITICAL, ); }, [editor, maxDepth]); From 368870601df3fa0f0c66a65dad160c0cbf50959b Mon Sep 17 00:00:00 2001 From: Ruslan Piliuta Date: Thu, 18 Apr 2024 19:03:41 +0300 Subject: [PATCH 4/6] fix(lexical): Fix inserting text from Grammarly when full node is selected with forward selection (#5856) --- .../__tests__/e2e/Extensions.spec.mjs | 90 +++++++++++++++++++ packages/lexical/src/LexicalEvents.ts | 12 ++- 2 files changed, 99 insertions(+), 3 deletions(-) diff --git a/packages/lexical-playground/__tests__/e2e/Extensions.spec.mjs b/packages/lexical-playground/__tests__/e2e/Extensions.spec.mjs index e054da712e3..ba54a73aae1 100644 --- a/packages/lexical-playground/__tests__/e2e/Extensions.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/Extensions.spec.mjs @@ -6,6 +6,10 @@ * */ +import { + moveToEditorBeginning, + moveToEditorEnd, +} from '../keyboardShortcuts/index.mjs'; import { assertHTML, assertSelection, @@ -255,4 +259,90 @@ test.describe('Extensions', () => { focusPath: [1, 0, 0], }); }); + + test('document.execCommand("insertText") with all text backward selection', async ({ + page, + }) => { + await focusEditor(page); + + await page.keyboard.type('Paragraph 1'); + await moveToEditorEnd(page); + await page.keyboard.down('Shift'); + await moveToEditorBeginning(page); + await page.keyboard.up('Shift'); + + await assertSelection(page, { + anchorOffset: 11, + anchorPath: [0, 0, 0], + focusOffset: 0, + focusPath: [0, 0, 0], + }); + + await evaluate( + page, + () => { + document.execCommand('insertText', false, 'New text'); + }, + [], + ); + await assertHTML( + page, + html` +

+ New text +

+ `, + ); + await assertSelection(page, { + anchorOffset: 8, + anchorPath: [0, 0, 0], + focusOffset: 8, + focusPath: [0, 0, 0], + }); + }); + + test('document.execCommand("insertText") with all text forward selection', async ({ + page, + }) => { + await focusEditor(page); + + await page.keyboard.type('Paragraph 1'); + await moveToEditorBeginning(page); + await page.keyboard.down('Shift'); + await moveToEditorEnd(page); + await page.keyboard.up('Shift'); + + await assertSelection(page, { + anchorOffset: 0, + anchorPath: [0, 0, 0], + focusOffset: 11, + focusPath: [0, 0, 0], + }); + + await evaluate( + page, + () => { + document.execCommand('insertText', false, 'New text'); + }, + [], + ); + await assertHTML( + page, + html` +

+ New text +

+ `, + ); + await assertSelection(page, { + anchorOffset: 8, + anchorPath: [0, 0, 0], + focusOffset: 8, + focusPath: [0, 0, 0], + }); + }); }); diff --git a/packages/lexical/src/LexicalEvents.ts b/packages/lexical/src/LexicalEvents.ts index edc9dca080b..96cf9ad7c86 100644 --- a/packages/lexical/src/LexicalEvents.ts +++ b/packages/lexical/src/LexicalEvents.ts @@ -826,7 +826,13 @@ function onInput(event: InputEvent, editor: LexicalEditor): void { if (domSelection === null) { return; } - const offset = anchor.offset; + const isBackward = selection.isBackward(); + const startOffset = isBackward + ? selection.anchor.offset + : selection.focus.offset; + const endOffset = isBackward + ? selection.focus.offset + : selection.anchor.offset; // If the content is the same as inserted, then don't dispatch an insertion. // Given onInput doesn't take the current selection (it uses the previous) // we can compare that against what the DOM currently says. @@ -835,9 +841,9 @@ function onInput(event: InputEvent, editor: LexicalEditor): void { selection.isCollapsed() || !$isTextNode(anchorNode) || domSelection.anchorNode === null || - anchorNode.getTextContent().slice(0, offset) + + anchorNode.getTextContent().slice(0, startOffset) + data + - anchorNode.getTextContent().slice(offset + selection.focus.offset) !== + anchorNode.getTextContent().slice(startOffset + endOffset) !== getAnchorTextFromDOM(domSelection.anchorNode) ) { dispatchCommand(editor, CONTROLLED_TEXT_INSERTION_COMMAND, data); From 98b0537710220252b784a7333b6ed9b7e04e3209 Mon Sep 17 00:00:00 2001 From: Vlad Fedosov Date: Thu, 18 Apr 2024 22:02:54 -0400 Subject: [PATCH 5/6] feat(@lexical/devtools): Added Edge support (#5915) --- package-lock.json | 578 +++++++++--------- packages/lexical-devtools/package.json | 7 +- .../src/entrypoints/devtools/main.ts | 2 +- .../lexical-devtools/src/public/icon/logo.svg | 1 + packages/lexical-devtools/wxt.config.ts | 3 + 5 files changed, 286 insertions(+), 305 deletions(-) create mode 100644 packages/lexical-devtools/src/public/icon/logo.svg diff --git a/package-lock.json b/package-lock.json index 041877c3bbc..c3d639bf301 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7343,30 +7343,30 @@ "dev": true }, "node_modules/@webext-pegasus/rpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/rpc/-/rpc-0.0.1.tgz", - "integrity": "sha512-HOBkC7Y6qZFZV5JvIrbJa4cVQhaBInfdoYmFwRYDKPZqUuTAvB55i/b5lYj3LYw+us6/27tYgYrRrWldOBZFHg==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/rpc/-/rpc-0.0.4.tgz", + "integrity": "sha512-PjfJ1vQgwKS/XJBZC3xvbx/i1cljm2x3pb1osFbAbPs4Tnmv2FewdVC2hhBTBNy9i27KyHTsMvd42rttZQvRoA==", "dependencies": { - "@webext-pegasus/transport": "0.0.1", + "@webext-pegasus/transport": "^0.0.4", "type-fest": "^0.21.3" } }, "node_modules/@webext-pegasus/store": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/store/-/store-0.0.1.tgz", - "integrity": "sha512-mo39kISy1yIEsBP612U4t6l86Womx4Aub6hEEbbYikKU29a4Awh8OZZJnDFH46bB1wuveEgNokavUPSjJFjZsA==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/store/-/store-0.0.4.tgz", + "integrity": "sha512-nvfwxlglcGDie0b3pd2WZVLnYbll24tzBVSQ+0XgKa5tL6ntAMjRPqQWO3QNlUJANbmcXabzAd5R+7dxCTrTyw==", "dependencies": { - "@webext-pegasus/rpc": "0.0.1", - "@webext-pegasus/transport": "0.0.1", + "@webext-pegasus/rpc": "^0.0.4", + "@webext-pegasus/transport": "^0.0.4", "type-fest": "^0.21.3" } }, "node_modules/@webext-pegasus/store-zustand": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/store-zustand/-/store-zustand-0.0.1.tgz", - "integrity": "sha512-fbSgBTP04+iqQwbecFzRFFR7mt92tJC39TLCtkS+sMFWqiePFUle7FcAYydLjrockqO8KxUS2qqtGK9jb7rbwA==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/store-zustand/-/store-zustand-0.0.4.tgz", + "integrity": "sha512-5M/ZRwSzno8ebWZeu+A1GplVTVc/ruU/whWCyOkJNtKkCyuKwFZBWLBUfzKKIgNhCqSeGqxwi4F/ggvS42glPQ==", "dependencies": { - "@webext-pegasus/store": "0.0.1", + "@webext-pegasus/store": "^0.0.4", "type-fest": "^0.21.3" }, "peerDependencies": { @@ -7374,16 +7374,29 @@ } }, "node_modules/@webext-pegasus/transport": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/transport/-/transport-0.0.1.tgz", - "integrity": "sha512-A4TYO6Eu/B3V54MuAU6x8C2J2D3j2TgrZzHq31We9RLDR86YZBu0AD63STZyxtKTOX+FQtO9X8bL76Na4vvq3g==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/transport/-/transport-0.0.4.tgz", + "integrity": "sha512-s6iWeo3vpoEa7d3UZtNVDWFQjT3OAdgxN064Z7P0fJNbfIMVa/Twvo8dJtcsSg5VGxxoxIqwLJ7FX6LgmBAmpg==", "dependencies": { "@types/webextension-polyfill": "^0.10.7", - "type-fest": "^0.21.3", - "webext-bridge": "^6.0.1", + "nanoevents": "^6.0.2", + "serialize-error": "^9.0.0", + "tiny-uid": "^1.1.1", + "type-fest": "^2.11.1", "webextension-polyfill": "0.10.0" } }, + "node_modules/@webext-pegasus/transport/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -29187,28 +29200,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/webext-bridge": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/webext-bridge/-/webext-bridge-6.0.1.tgz", - "integrity": "sha512-GruIrN+vNwbxVCi8UW4Dqk5YkcGA9V0ZfJ57jXP9JXHbrsDs5k2N6NNYQR5e+wSCnQpGYOGAGihwUpKlhg8QIw==", - "dependencies": { - "@types/webextension-polyfill": "^0.8.3", - "nanoevents": "^6.0.2", - "serialize-error": "^9.0.0", - "tiny-uid": "^1.1.1", - "webextension-polyfill": "^0.9.0" - } - }, - "node_modules/webext-bridge/node_modules/@types/webextension-polyfill": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.8.3.tgz", - "integrity": "sha512-GN+Hjzy9mXjWoXKmaicTegv3FJ0WFZ3aYz77Wk8TMp1IY3vEzvzj1vnsa0ggV7vMI1i+PUxe4qqnIJKCzf9aTg==" - }, - "node_modules/webext-bridge/node_modules/webextension-polyfill": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.9.0.tgz", - "integrity": "sha512-LTtHb0yR49xa9irkstDxba4GATDAcDw3ncnFH9RImoFwDlW47U95ME5sn5IiQX2ghfaECaf6xyXM8yvClIBkkw==" - }, "node_modules/webextension-polyfill": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", @@ -31329,28 +31320,28 @@ } }, "packages/lexical": { - "version": "0.14.4", + "version": "0.14.5", "license": "MIT" }, "packages/lexical-clipboard": { "name": "@lexical/clipboard", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/html": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/html": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-code": { "name": "@lexical/code", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5", "prismjs": "^1.27.0" }, "devDependencies": { @@ -31359,23 +31350,23 @@ }, "packages/lexical-devtools": { "name": "@lexical/devtools", - "version": "0.14.4", + "version": "0.14.5", "hasInstallScript": true, "dependencies": { - "@webext-pegasus/rpc": "^0.0.1", - "@webext-pegasus/store-zustand": "^0.0.1", - "@webext-pegasus/transport": "^0.0.1", + "@webext-pegasus/rpc": "^0.0.4", + "@webext-pegasus/store-zustand": "^0.0.4", + "@webext-pegasus/transport": "^0.0.4", "react": "^18.2.0", "react-dom": "^18.2.0", "zustand": "^4.5.1" }, "devDependencies": { - "@lexical/devtools-core": "0.14.4", + "@lexical/devtools-core": "0.14.5", "@rollup/plugin-babel": "^6.0.4", "@types/react": "^18.2.46", "@types/react-dom": "^18.2.18", "@vitejs/plugin-react": "^4.2.1", - "lexical": "0.14.4", + "lexical": "0.14.5", "typescript": "^5.3.3", "vite": "^5.2.2", "wxt": "^0.17.0" @@ -31383,15 +31374,15 @@ }, "packages/lexical-devtools-core": { "name": "@lexical/devtools-core", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/html": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/mark": "0.14.4", - "@lexical/table": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/html": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/mark": "0.14.5", + "@lexical/table": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" }, "peerDependencies": { "react": ">=17.x", @@ -31642,144 +31633,144 @@ }, "packages/lexical-dragon": { "name": "@lexical/dragon", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-file": { "name": "@lexical/file", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-hashtag": { "name": "@lexical/hashtag", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-headless": { "name": "@lexical/headless", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-history": { "name": "@lexical/history", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-html": { "name": "@lexical/html", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-link": { "name": "@lexical/link", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-list": { "name": "@lexical/list", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-mark": { "name": "@lexical/mark", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-markdown": { "name": "@lexical/markdown", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/code": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/rich-text": "0.14.4", - "@lexical/text": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/code": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/rich-text": "0.14.5", + "@lexical/text": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-offset": { "name": "@lexical/offset", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-overflow": { "name": "@lexical/overflow", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-plain-text": { "name": "@lexical/plain-text", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/clipboard": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/clipboard": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-playground": { - "version": "0.14.4", + "version": "0.14.5", "dependencies": { "@excalidraw/excalidraw": "^0.17.0", - "@lexical/clipboard": "0.14.4", - "@lexical/code": "0.14.4", - "@lexical/file": "0.14.4", - "@lexical/hashtag": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/mark": "0.14.4", - "@lexical/overflow": "0.14.4", - "@lexical/plain-text": "0.14.4", - "@lexical/react": "0.14.4", - "@lexical/rich-text": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/table": "0.14.4", - "@lexical/utils": "0.14.4", + "@lexical/clipboard": "0.14.5", + "@lexical/code": "0.14.5", + "@lexical/file": "0.14.5", + "@lexical/hashtag": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/mark": "0.14.5", + "@lexical/overflow": "0.14.5", + "@lexical/plain-text": "0.14.5", + "@lexical/react": "0.14.5", + "@lexical/rich-text": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/table": "0.14.5", + "@lexical/utils": "0.14.5", "katex": "^0.15.2", - "lexical": "0.14.4", + "lexical": "0.14.5", "lodash-es": "^4.17.21", "prettier": "^2.3.2", "react": "^18.2.0", @@ -31798,28 +31789,28 @@ }, "packages/lexical-react": { "name": "@lexical/react", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/clipboard": "0.14.4", - "@lexical/code": "0.14.4", - "@lexical/devtools-core": "0.14.4", - "@lexical/dragon": "0.14.4", - "@lexical/hashtag": "0.14.4", - "@lexical/history": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/mark": "0.14.4", - "@lexical/markdown": "0.14.4", - "@lexical/overflow": "0.14.4", - "@lexical/plain-text": "0.14.4", - "@lexical/rich-text": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/table": "0.14.4", - "@lexical/text": "0.14.4", - "@lexical/utils": "0.14.4", - "@lexical/yjs": "0.14.4", - "lexical": "0.14.4", + "@lexical/clipboard": "0.14.5", + "@lexical/code": "0.14.5", + "@lexical/devtools-core": "0.14.5", + "@lexical/dragon": "0.14.5", + "@lexical/hashtag": "0.14.5", + "@lexical/history": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/mark": "0.14.5", + "@lexical/markdown": "0.14.5", + "@lexical/overflow": "0.14.5", + "@lexical/plain-text": "0.14.5", + "@lexical/rich-text": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/table": "0.14.5", + "@lexical/text": "0.14.5", + "@lexical/utils": "0.14.5", + "@lexical/yjs": "0.14.5", + "lexical": "0.14.5", "react-error-boundary": "^3.1.4" }, "peerDependencies": { @@ -31829,49 +31820,49 @@ }, "packages/lexical-rich-text": { "name": "@lexical/rich-text", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/clipboard": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/clipboard": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-selection": { "name": "@lexical/selection", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-table": { "name": "@lexical/table", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-text": { "name": "@lexical/text", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "packages/lexical-utils": { "name": "@lexical/utils", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/list": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/table": "0.14.4", - "lexical": "0.14.4" + "@lexical/list": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/table": "0.14.5", + "lexical": "0.14.5" } }, "packages/lexical-website": { @@ -31902,11 +31893,11 @@ }, "packages/lexical-yjs": { "name": "@lexical/yjs", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "@lexical/offset": "0.14.4", - "lexical": "0.14.4" + "@lexical/offset": "0.14.5", + "lexical": "0.14.5" }, "peerDependencies": { "yjs": ">=13.5.22" @@ -31939,10 +31930,10 @@ } }, "packages/shared": { - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { - "lexical": "0.14.4" + "lexical": "0.14.5" } } }, @@ -35331,34 +35322,34 @@ "@lexical/clipboard": { "version": "file:packages/lexical-clipboard", "requires": { - "@lexical/html": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/html": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/code": { "version": "file:packages/lexical-code", "requires": { - "@lexical/utils": "0.14.4", + "@lexical/utils": "0.14.5", "@types/prismjs": "^1.26.0", - "lexical": "0.14.4", + "lexical": "0.14.5", "prismjs": "^1.27.0" } }, "@lexical/devtools": { "version": "file:packages/lexical-devtools", "requires": { - "@lexical/devtools-core": "0.14.4", + "@lexical/devtools-core": "0.14.5", "@rollup/plugin-babel": "^6.0.4", "@types/react": "^18.2.46", "@types/react-dom": "^18.2.18", "@vitejs/plugin-react": "^4.2.1", - "@webext-pegasus/rpc": "^0.0.1", - "@webext-pegasus/store-zustand": "^0.0.1", - "@webext-pegasus/transport": "^0.0.1", - "lexical": "0.14.4", + "@webext-pegasus/rpc": "^0.0.4", + "@webext-pegasus/store-zustand": "^0.0.4", + "@webext-pegasus/transport": "^0.0.4", + "lexical": "0.14.5", "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": "^5.3.3", @@ -35505,168 +35496,168 @@ "@lexical/devtools-core": { "version": "file:packages/lexical-devtools-core", "requires": { - "@lexical/html": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/mark": "0.14.4", - "@lexical/table": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/html": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/mark": "0.14.5", + "@lexical/table": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/dragon": { "version": "file:packages/lexical-dragon", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/file": { "version": "file:packages/lexical-file", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/hashtag": { "version": "file:packages/lexical-hashtag", "requires": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/headless": { "version": "file:packages/lexical-headless", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/history": { "version": "file:packages/lexical-history", "requires": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/html": { "version": "file:packages/lexical-html", "requires": { - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/link": { "version": "file:packages/lexical-link", "requires": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/list": { "version": "file:packages/lexical-list", "requires": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/mark": { "version": "file:packages/lexical-mark", "requires": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/markdown": { "version": "file:packages/lexical-markdown", "requires": { - "@lexical/code": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/rich-text": "0.14.4", - "@lexical/text": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/code": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/rich-text": "0.14.5", + "@lexical/text": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/offset": { "version": "file:packages/lexical-offset", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/overflow": { "version": "file:packages/lexical-overflow", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/plain-text": { "version": "file:packages/lexical-plain-text", "requires": { - "@lexical/clipboard": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/clipboard": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/react": { "version": "file:packages/lexical-react", "requires": { - "@lexical/clipboard": "0.14.4", - "@lexical/code": "0.14.4", - "@lexical/devtools-core": "0.14.4", - "@lexical/dragon": "0.14.4", - "@lexical/hashtag": "0.14.4", - "@lexical/history": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/mark": "0.14.4", - "@lexical/markdown": "0.14.4", - "@lexical/overflow": "0.14.4", - "@lexical/plain-text": "0.14.4", - "@lexical/rich-text": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/table": "0.14.4", - "@lexical/text": "0.14.4", - "@lexical/utils": "0.14.4", - "@lexical/yjs": "0.14.4", - "lexical": "0.14.4", + "@lexical/clipboard": "0.14.5", + "@lexical/code": "0.14.5", + "@lexical/devtools-core": "0.14.5", + "@lexical/dragon": "0.14.5", + "@lexical/hashtag": "0.14.5", + "@lexical/history": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/mark": "0.14.5", + "@lexical/markdown": "0.14.5", + "@lexical/overflow": "0.14.5", + "@lexical/plain-text": "0.14.5", + "@lexical/rich-text": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/table": "0.14.5", + "@lexical/text": "0.14.5", + "@lexical/utils": "0.14.5", + "@lexical/yjs": "0.14.5", + "lexical": "0.14.5", "react-error-boundary": "^3.1.4" } }, "@lexical/rich-text": { "version": "file:packages/lexical-rich-text", "requires": { - "@lexical/clipboard": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/clipboard": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/selection": { "version": "file:packages/lexical-selection", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/table": { "version": "file:packages/lexical-table", "requires": { - "@lexical/utils": "0.14.4", - "lexical": "0.14.4" + "@lexical/utils": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/text": { "version": "file:packages/lexical-text", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "@lexical/utils": { "version": "file:packages/lexical-utils", "requires": { - "@lexical/list": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/table": "0.14.4", - "lexical": "0.14.4" + "@lexical/list": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/table": "0.14.5", + "lexical": "0.14.5" } }, "@lexical/website": { @@ -35695,8 +35686,8 @@ "@lexical/yjs": { "version": "file:packages/lexical-yjs", "requires": { - "@lexical/offset": "0.14.4", - "lexical": "0.14.4" + "@lexical/offset": "0.14.5", + "lexical": "0.14.5" } }, "@mdx-js/mdx": { @@ -37390,42 +37381,51 @@ "dev": true }, "@webext-pegasus/rpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/rpc/-/rpc-0.0.1.tgz", - "integrity": "sha512-HOBkC7Y6qZFZV5JvIrbJa4cVQhaBInfdoYmFwRYDKPZqUuTAvB55i/b5lYj3LYw+us6/27tYgYrRrWldOBZFHg==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/rpc/-/rpc-0.0.4.tgz", + "integrity": "sha512-PjfJ1vQgwKS/XJBZC3xvbx/i1cljm2x3pb1osFbAbPs4Tnmv2FewdVC2hhBTBNy9i27KyHTsMvd42rttZQvRoA==", "requires": { - "@webext-pegasus/transport": "0.0.1", + "@webext-pegasus/transport": "^0.0.4", "type-fest": "^0.21.3" } }, "@webext-pegasus/store": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/store/-/store-0.0.1.tgz", - "integrity": "sha512-mo39kISy1yIEsBP612U4t6l86Womx4Aub6hEEbbYikKU29a4Awh8OZZJnDFH46bB1wuveEgNokavUPSjJFjZsA==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/store/-/store-0.0.4.tgz", + "integrity": "sha512-nvfwxlglcGDie0b3pd2WZVLnYbll24tzBVSQ+0XgKa5tL6ntAMjRPqQWO3QNlUJANbmcXabzAd5R+7dxCTrTyw==", "requires": { - "@webext-pegasus/rpc": "0.0.1", - "@webext-pegasus/transport": "0.0.1", + "@webext-pegasus/rpc": "^0.0.4", + "@webext-pegasus/transport": "^0.0.4", "type-fest": "^0.21.3" } }, "@webext-pegasus/store-zustand": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/store-zustand/-/store-zustand-0.0.1.tgz", - "integrity": "sha512-fbSgBTP04+iqQwbecFzRFFR7mt92tJC39TLCtkS+sMFWqiePFUle7FcAYydLjrockqO8KxUS2qqtGK9jb7rbwA==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/store-zustand/-/store-zustand-0.0.4.tgz", + "integrity": "sha512-5M/ZRwSzno8ebWZeu+A1GplVTVc/ruU/whWCyOkJNtKkCyuKwFZBWLBUfzKKIgNhCqSeGqxwi4F/ggvS42glPQ==", "requires": { - "@webext-pegasus/store": "0.0.1", + "@webext-pegasus/store": "^0.0.4", "type-fest": "^0.21.3" } }, "@webext-pegasus/transport": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@webext-pegasus/transport/-/transport-0.0.1.tgz", - "integrity": "sha512-A4TYO6Eu/B3V54MuAU6x8C2J2D3j2TgrZzHq31We9RLDR86YZBu0AD63STZyxtKTOX+FQtO9X8bL76Na4vvq3g==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@webext-pegasus/transport/-/transport-0.0.4.tgz", + "integrity": "sha512-s6iWeo3vpoEa7d3UZtNVDWFQjT3OAdgxN064Z7P0fJNbfIMVa/Twvo8dJtcsSg5VGxxoxIqwLJ7FX6LgmBAmpg==", "requires": { "@types/webextension-polyfill": "^0.10.7", - "type-fest": "^0.21.3", - "webext-bridge": "^6.0.1", + "nanoevents": "^6.0.2", + "serialize-error": "^9.0.0", + "tiny-uid": "^1.1.1", + "type-fest": "^2.11.1", "webextension-polyfill": "0.10.0" + }, + "dependencies": { + "type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" + } } }, "@xtuc/ieee754": { @@ -45138,24 +45138,24 @@ "version": "file:packages/lexical-playground", "requires": { "@excalidraw/excalidraw": "^0.17.0", - "@lexical/clipboard": "0.14.4", - "@lexical/code": "0.14.4", - "@lexical/file": "0.14.4", - "@lexical/hashtag": "0.14.4", - "@lexical/link": "0.14.4", - "@lexical/list": "0.14.4", - "@lexical/mark": "0.14.4", - "@lexical/overflow": "0.14.4", - "@lexical/plain-text": "0.14.4", - "@lexical/react": "0.14.4", - "@lexical/rich-text": "0.14.4", - "@lexical/selection": "0.14.4", - "@lexical/table": "0.14.4", - "@lexical/utils": "0.14.4", + "@lexical/clipboard": "0.14.5", + "@lexical/code": "0.14.5", + "@lexical/file": "0.14.5", + "@lexical/hashtag": "0.14.5", + "@lexical/link": "0.14.5", + "@lexical/list": "0.14.5", + "@lexical/mark": "0.14.5", + "@lexical/overflow": "0.14.5", + "@lexical/plain-text": "0.14.5", + "@lexical/react": "0.14.5", + "@lexical/rich-text": "0.14.5", + "@lexical/selection": "0.14.5", + "@lexical/table": "0.14.5", + "@lexical/utils": "0.14.5", "@types/lodash-es": "^4.14.182", "@vitejs/plugin-react": "^1.0.7", "katex": "^0.15.2", - "lexical": "0.14.4", + "lexical": "0.14.5", "lodash-es": "^4.17.21", "prettier": "^2.3.2", "react": "^18.2.0", @@ -50655,7 +50655,7 @@ "shared": { "version": "file:packages/shared", "requires": { - "lexical": "0.14.4" + "lexical": "0.14.5" } }, "shebang-command": { @@ -52843,30 +52843,6 @@ "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==" }, - "webext-bridge": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/webext-bridge/-/webext-bridge-6.0.1.tgz", - "integrity": "sha512-GruIrN+vNwbxVCi8UW4Dqk5YkcGA9V0ZfJ57jXP9JXHbrsDs5k2N6NNYQR5e+wSCnQpGYOGAGihwUpKlhg8QIw==", - "requires": { - "@types/webextension-polyfill": "^0.8.3", - "nanoevents": "^6.0.2", - "serialize-error": "^9.0.0", - "tiny-uid": "^1.1.1", - "webextension-polyfill": "^0.9.0" - }, - "dependencies": { - "@types/webextension-polyfill": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.8.3.tgz", - "integrity": "sha512-GN+Hjzy9mXjWoXKmaicTegv3FJ0WFZ3aYz77Wk8TMp1IY3vEzvzj1vnsa0ggV7vMI1i+PUxe4qqnIJKCzf9aTg==" - }, - "webextension-polyfill": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.9.0.tgz", - "integrity": "sha512-LTtHb0yR49xa9irkstDxba4GATDAcDw3ncnFH9RImoFwDlW47U95ME5sn5IiQX2ghfaECaf6xyXM8yvClIBkkw==" - } - } - }, "webextension-polyfill": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", diff --git a/packages/lexical-devtools/package.json b/packages/lexical-devtools/package.json index 38d690a87e1..89e08125c57 100644 --- a/packages/lexical-devtools/package.json +++ b/packages/lexical-devtools/package.json @@ -7,6 +7,7 @@ "scripts": { "dev": "wxt", "dev:firefox": "wxt -b firefox", + "dev:edge": "wxt -b edge", "build": "wxt build", "build:firefox": "wxt build -b firefox", "zip": "wxt zip", @@ -15,9 +16,9 @@ "postinstall": "wxt prepare" }, "dependencies": { - "@webext-pegasus/rpc": "^0.0.1", - "@webext-pegasus/store-zustand": "^0.0.1", - "@webext-pegasus/transport": "^0.0.1", + "@webext-pegasus/rpc": "^0.0.4", + "@webext-pegasus/store-zustand": "^0.0.4", + "@webext-pegasus/transport": "^0.0.4", "react": "^18.2.0", "react-dom": "^18.2.0", "zustand": "^4.5.1" diff --git a/packages/lexical-devtools/src/entrypoints/devtools/main.ts b/packages/lexical-devtools/src/entrypoints/devtools/main.ts index f8b60cb0cf7..34a845df7f0 100644 --- a/packages/lexical-devtools/src/entrypoints/devtools/main.ts +++ b/packages/lexical-devtools/src/entrypoints/devtools/main.ts @@ -9,6 +9,6 @@ // Create the panel which appears within the browser devtools browser.devtools.panels.create( 'Lexical', - 'icon/128.png', + '/icon/logo.svg', 'devtools-panel.html', ); diff --git a/packages/lexical-devtools/src/public/icon/logo.svg b/packages/lexical-devtools/src/public/icon/logo.svg new file mode 100644 index 00000000000..74ddb15d8a9 --- /dev/null +++ b/packages/lexical-devtools/src/public/icon/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/lexical-devtools/wxt.config.ts b/packages/lexical-devtools/wxt.config.ts index 383cb658650..40916d1fd82 100644 --- a/packages/lexical-devtools/wxt.config.ts +++ b/packages/lexical-devtools/wxt.config.ts @@ -53,6 +53,9 @@ export default defineConfig({ return manifestConf; }, runner: { + binaries: { + edge: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', + }, chromiumArgs: [ '--auto-open-devtools-for-tabs', // Open chrome://version to validate it works From 78bac6c57d0615e7070f6418fc845b8684af25c3 Mon Sep 17 00:00:00 2001 From: Alex Reznik Date: Fri, 19 Apr 2024 14:09:04 +0100 Subject: [PATCH 6/6] Add setTimeout for mousemove handler (#5919) --- .../src/LexicalTableSelectionHelpers.ts | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/lexical-table/src/LexicalTableSelectionHelpers.ts b/packages/lexical-table/src/LexicalTableSelectionHelpers.ts index cf6db409f0b..ed443fc3f17 100644 --- a/packages/lexical-table/src/LexicalTableSelectionHelpers.ts +++ b/packages/lexical-table/src/LexicalTableSelectionHelpers.ts @@ -102,15 +102,18 @@ export function applyTableHandlers( }; const onMouseMove = (moveEvent: MouseEvent) => { - const focusCell = getDOMCellFromTarget(moveEvent.target as Node); - if ( - focusCell !== null && - (tableObserver.anchorX !== focusCell.x || - tableObserver.anchorY !== focusCell.y) - ) { - moveEvent.preventDefault(); - tableObserver.setFocusCellForSelection(focusCell); - } + // delaying mousemove handler to allow selectionchange handler from LexicalEvents.ts to be executed first + setTimeout(() => { + const focusCell = getDOMCellFromTarget(moveEvent.target as Node); + if ( + focusCell !== null && + (tableObserver.anchorX !== focusCell.x || + tableObserver.anchorY !== focusCell.y) + ) { + moveEvent.preventDefault(); + tableObserver.setFocusCellForSelection(focusCell); + } + }, 0); }; return {onMouseMove: onMouseMove, onMouseUp: onMouseUp}; };