Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17,396 changes: 9,950 additions & 7,446 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"@types/trusted-types": "^2.0.7",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"child-process-promise": "^2.2.1",
"child-process-promise": "^2.1.3",
"chokidar": "^3.5.2",
"concurrently": "^8.2.2",
"confusing-browser-globals": "^1.0.10",
Expand All @@ -162,7 +162,7 @@
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"flow-bin": "^0.280.0",
"flow-typed": "^4.1.1",
"flow-typed": "^2.6.2",
"fs-extra": "^10.0.0",
"glob": "^10.4.1",
"google-closure-compiler": "^20220202.0.0",
Expand Down Expand Up @@ -195,6 +195,8 @@
"vitest": "^3.2.4"
},
"dependencies": {
"@excalidraw/excalidraw": "^0.18.0",
"wxt": "0.20.10",
"yjs": "^13.5.42"
}
}
4 changes: 3 additions & 1 deletion packages/lexical-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
"@chakra-ui/react": "^2.8.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@excalidraw/excalidraw": "0.17.6",
"@webext-pegasus/rpc": "^0.3.0",
"@webext-pegasus/store-zustand": "^0.3.0",
"@webext-pegasus/transport": "^0.3.0",
"child-process-promise": "2.1.3",
"framer-motion": "^11.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -49,7 +51,7 @@
"lexical": "0.35.0",
"typescript": "^5.4.5",
"vite": "^5.2.2",
"wxt": "^0.17.0"
"wxt": "^0.20.10"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/lexical-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"preview": "vite preview"
},
"dependencies": {
"@excalidraw/excalidraw": "^0.18.0",
"@excalidraw/excalidraw": "^0.17.6",
"@lexical/clipboard": "0.35.0",
"@lexical/code": "0.35.0",
"@lexical/code-shiki": "0.35.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import type {ExcalidrawInitialElements} from '../../ui/ExcalidrawModal';
import type {AppState, BinaryFiles} from '@excalidraw/excalidraw/types';
import type {JSX} from 'react';

import '@excalidraw/excalidraw/index.css';

import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
import {$wrapNodeInElement} from '@lexical/utils';
import {
Expand Down
3 changes: 1 addition & 2 deletions packages/lexical-playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {defineConfig} from 'vite';

import viteMonorepoResolutionPlugin from '../shared/lexicalMonorepoPlugin';
import viteCopyEsm from './viteCopyEsm';
import viteCopyExcalidrawAssets from './viteCopyExcalidrawAssets';

const require = createRequire(import.meta.url);

Expand Down Expand Up @@ -68,7 +67,7 @@ export default defineConfig(({mode}) => ({
presets: [['@babel/preset-react', {runtime: 'automatic'}]],
}),
react(),
...viteCopyExcalidrawAssets(),

viteCopyEsm(),
commonjs({
// This is required for React 19 (at least 19.0.0-beta-26f2496093-20240514)
Expand Down
17 changes: 16 additions & 1 deletion packages/lexical/src/LexicalEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,6 @@ function hasStoppedLexicalPropagation(event: Event): boolean {
const stopped = event._lexicalHandled === true;
return stopped;
}

export type EventHandler = (event: Event, editor: LexicalEditor) => void;

export function addRootElementEvents(
Expand Down Expand Up @@ -1421,6 +1420,22 @@ export function addRootElementEvents(
rootElement.removeEventListener(eventName, eventHandler);
});
}
// Firefox sometimes fails to trigger blur when clicking outside the editor
if (
typeof navigator !== 'undefined' &&
navigator.userAgent.includes('Firefox')
) {
const handleDocumentClick = (event: MouseEvent) => {
if (!rootElement.contains(event.target as Node)) {
dispatchCommand(editor, BLUR_COMMAND, event as unknown as FocusEvent);
}
};

doc.addEventListener('mousedown', handleDocumentClick);
removeHandles.push(() => {
doc.removeEventListener('mousedown', handleDocumentClick);
});
}
}

const rootElementNotRegisteredWarning = warnOnlyOnce(
Expand Down
Loading