diff --git a/CHANGELOG.md b/CHANGELOG.md index db3ad631fe3..012f91d04ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,91 @@ +## 0.4.0 (September 3, 2022) + +### Breaking Changes + +#### Renamed isReadOnly API to isEditable + +editor.isReadyOnly -> editor.isEditable() +editor.setReadyOnly -> editor.setEditable() +editor.registerReadOnlyListener -> editor.registerEditableListener() +editor config { readOnly: true } -> { editable: boolean } + +https://github.com/facebook/lexical/pull/2912 + +#### Markdown Transformers Require Dependencies + +The "dependencies" property is now required for custom markdown Element and TextMatch Transformers. It takes an array of LexicalNode subclasses and +asserts that they're available in the editor when transforms are registered. + +https://github.com/facebook/lexical/pull/2910 + +#### Selection Updates when isEditable is false (previous ReadOnly mode) + +Lexical will now track and update selection in response to DOM selectionchange events when editor.isEditable is false. This is necessary for enabling some behavior +such as commenting via marks, but may cause other indirect changes such as update listeners firing when they didn't previously. + +- Ensure editor states are cloned if read only (#2936) Dominic Gannaway +- Prevent nested editor event duplication (#2935) Dominic Gannaway +- Avoid preventing default for copy events when there is no selection (#2930) Dominic Gannaway +- Non-Editable Mode Playground Improvements (#2927) Acy Watson +- fix: do not import LexicalTypeaheadMenuPlugin from src folder (#2928) Eric Charles +- Change read only mode API to editable mode (#2912) Dominic Gannaway +- Fix typo (#2925) Tjaart van der Walt +- Remove redundant readonly checks. (#2921) Acy Watson +- allow selection in readonly mode (#2920) Acy Watson +- Remove $getEditor (#2919) Dominic Gannaway +- Use window of current default view (#2918) Dominic Gannaway +- Fix bad CSS on content editable container (#2917) Dominic Gannaway +- Ensure we only mutate a non-readonly editor state (#2915) Dominic Gannaway +- Fix failing build (#2916) John Flockton +- Read only validation server (#2899) Dominic Gannaway +- Add serialized node type exports (#2914) Matthew Lin +- Provide markdown plugin node dependencies (#2910) Dominic Gannaway +- Fixed typo (#2908) Heesung Jang +- Add Flow Types for AutoEmbedPlugin and TypeaheadPlugin (#2904) Tyler Bainbridge +- Fix link pasting (#2903) Maksim Horbachevsky +- Attempt transform of NodeSelection to RangeSelection on mouseDown (#2901) Gerard Rovira +- chore: add e2e tests for maxlength plugin (#2478) Adithya Vardhan +- Added sanitizer to FloatingLinkEditor (#2900) Heesung Jang +- Rename website folder (#2902) John Flockton +- remove unnecessary text append (#2898) John Flockton +- Fix Lexical package main entry points (#2897) Dominic Gannaway +- Fix overriding keyboard controls on internal decorator (#2895) Dominic Gannaway +- Allow code highlighting to run without active selection (#2891) Maksim Horbachevsky +- Fix editor content clipping bug (#2890) Dominic Gannaway +- LexicalTypeaheadMenuPlugin - Increase priority for keyboard commands (#2885) Theo Tillberg +- Remove redundant css property (#2888) Adam Kona +- Playground: Fix collab connect/disconnect toggling (#2887) Maksim Horbachevsky +- Improve heuristics around node selection and keyboard navigation (#2884) Dominic Gannaway +- Don't merge history entries from different editors (#2873) Acy Watson +- Exported DEFAULT_TRANSFORMERS array in react LexicalMarkdownShortcutPlugin (#2878) Kevin Ansfield +- Replaced `addTransform` with `registerNodeTransform` in transforms doc (#2882) Kevin Ansfield +- add example for additional nodes in plugin (#2879) Stefan Huber +- add the corresponding import to react doc (#2881) Stefan Huber +- Fix playground visual styling (#2876) Dominic Gannaway +- chore(deps): bump minimist in /packages/lexical-website-new (#2744) dependabot[bot] +- chore(deps): bump terser from 5.14.1 to 5.14.2 (#2869) dependabot[bot] +- Change linebreak node handling in insertNodes (#2857) Acy Watson +- Add some React Docs (#2858) Acy Watson +- fix delete backward bug (#2870) Dominic Gannaway +- add watch mode for auto-gen doc comments in dev (#2859) Acy Watson +- Update package-lock.json (#2866) ANDRI H.U +- Update package-lock.json (#2865) ANDRI H.U +- Fix issue with emoji (#2853) John Flockton +- Adjust Typeahead Styles (#2846) Tyler Bainbridge +- revert inadvertent change (#2849) Acy Watson +- Fix small type issue (#2847) John Flockton +- Wider (#2848) John Flockton +- Add autogenerated TypeDoc docs (#2837) Acy Watson +- fix: set cursor grab when image can be dragged (#2831) 子瞻 Luci +- fix(lexical-playground): two issues with scrolling-related scenarios (#2724) 子瞻 Luci +- fix: add fallback for code formatting (#2833) Adithya Vardhan +- rename local variables (#2840) Acy Watson +- fix broken links in docs (#2839) Reid Barber +- Fixing grammar on RootNode documentation (#2838) Aaron Freeland +- fix: transfer format and indent info on wrap (#2832) Adithya Vardhan +- fixed getStyleObjectFromRawCSS to handle css values with a colon (#2814) Hayden Warmington +- Add Panel to Display Props for DevTools Nodes (#2803) Will + ## 0.3.11 (August 12, 2022) - fix more code imports (#2828) Acy Watson diff --git a/package-lock.json b/package-lock.json index f127e40cc6f..1b85e991573 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lexical/monorepo", - "version": "0.3.11", + "version": "0.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lexical/monorepo", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "workspaces": [ "packages/*" @@ -4438,12 +4438,6 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -23404,36 +23398,36 @@ } }, "packages/lexical": { - "version": "0.3.11", + "version": "0.4.0", "license": "MIT" }, "packages/lexical-clipboard": { "name": "@lexical/clipboard", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/html": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/utils": "0.3.11" + "@lexical/html": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-code": { "name": "@lexical/code", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11", + "@lexical/utils": "0.4.0", "prismjs": "^1.27.0" }, "devDependencies": { "@types/prismjs": "^1.26.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-devtools": { @@ -23471,157 +23465,157 @@ }, "packages/lexical-dragon": { "name": "@lexical/dragon", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-file": { "name": "@lexical/file", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-hashtag": { "name": "@lexical/hashtag", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-headless": { "name": "@lexical/headless", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-history": { "name": "@lexical/history", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-html": { "name": "@lexical/html", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/selection": "0.3.11" + "@lexical/selection": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-link": { "name": "@lexical/link", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-list": { "name": "@lexical/list", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-mark": { "name": "@lexical/mark", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-markdown": { "name": "@lexical/markdown", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/code": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/text": "0.3.11", - "@lexical/utils": "0.3.11" + "@lexical/code": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/text": "0.4.0", + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-offset": { "name": "@lexical/offset", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-overflow": { "name": "@lexical/overflow", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-plain-text": { "name": "@lexical/plain-text", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "@lexical/clipboard": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/utils": "0.3.11", - "lexical": "0.3.11" + "@lexical/clipboard": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/utils": "0.4.0", + "lexical": "0.4.0" } }, "packages/lexical-playground": { - "version": "0.3.11", + "version": "0.4.0", "dependencies": { "@excalidraw/excalidraw": "0.11.0", - "@lexical/clipboard": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/file": "0.3.11", - "@lexical/hashtag": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/mark": "0.3.11", - "@lexical/overflow": "0.3.11", - "@lexical/plain-text": "0.3.11", - "@lexical/react": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/table": "0.3.11", - "@lexical/utils": "0.3.11", + "@lexical/clipboard": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/file": "0.4.0", + "@lexical/hashtag": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/mark": "0.4.0", + "@lexical/overflow": "0.4.0", + "@lexical/plain-text": "0.4.0", + "@lexical/react": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/table": "0.4.0", + "@lexical/utils": "0.4.0", "katex": "^0.15.2", - "lexical": "0.3.11", + "lexical": "0.4.0", "link-preview-generator": "1.0.7", "lodash-es": "^4.17.21", "prettier": "^2.3.2", @@ -23632,7 +23626,6 @@ }, "devDependencies": { "@types/lodash-es": "^4.14.182", - "@types/minimist": "^1.2.2", "@vitejs/plugin-react": "^1.0.7", "vite": "^2.8.0", "vite-plugin-replace": "0.1.1" @@ -23640,81 +23633,81 @@ }, "packages/lexical-react": { "name": "@lexical/react", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/clipboard": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/dragon": "0.3.11", - "@lexical/hashtag": "0.3.11", - "@lexical/history": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/mark": "0.3.11", - "@lexical/markdown": "0.3.11", - "@lexical/overflow": "0.3.11", - "@lexical/plain-text": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/table": "0.3.11", - "@lexical/text": "0.3.11", - "@lexical/utils": "0.3.11", - "@lexical/yjs": "0.3.11" - }, - "peerDependencies": { - "lexical": "0.3.11", + "@lexical/clipboard": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/dragon": "0.4.0", + "@lexical/hashtag": "0.4.0", + "@lexical/history": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/mark": "0.4.0", + "@lexical/markdown": "0.4.0", + "@lexical/overflow": "0.4.0", + "@lexical/plain-text": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/table": "0.4.0", + "@lexical/text": "0.4.0", + "@lexical/utils": "0.4.0", + "@lexical/yjs": "0.4.0" + }, + "peerDependencies": { + "lexical": "0.4.0", "react": ">=17.x", "react-dom": ">=17.x" } }, "packages/lexical-rich-text": { "name": "@lexical/rich-text", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "@lexical/clipboard": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/utils": "0.3.11", - "lexical": "0.3.11" + "@lexical/clipboard": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/utils": "0.4.0", + "lexical": "0.4.0" } }, "packages/lexical-selection": { "name": "@lexical/selection", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-table": { "name": "@lexical/table", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-text": { "name": "@lexical/text", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-utils": { "name": "@lexical/utils", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/list": "0.3.11", - "@lexical/table": "0.3.11" + "@lexical/list": "0.4.0", + "@lexical/table": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "packages/lexical-website": { @@ -24695,13 +24688,13 @@ }, "packages/lexical-yjs": { "name": "@lexical/yjs", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "@lexical/offset": "0.3.11" + "@lexical/offset": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11", + "lexical": "0.4.0", "yjs": ">=13.5.22" } }, @@ -24730,10 +24723,10 @@ } }, "packages/shared": { - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "dependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" } } }, @@ -27010,16 +27003,16 @@ "@lexical/clipboard": { "version": "file:packages/lexical-clipboard", "requires": { - "@lexical/html": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/utils": "0.3.11" + "@lexical/html": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/utils": "0.4.0" } }, "@lexical/code": { "version": "file:packages/lexical-code", "requires": { - "@lexical/utils": "0.3.11", + "@lexical/utils": "0.4.0", "@types/prismjs": "^1.26.0", "prismjs": "^1.27.0" } @@ -27033,7 +27026,7 @@ "@lexical/hashtag": { "version": "file:packages/lexical-hashtag", "requires": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" } }, "@lexical/headless": { @@ -27042,42 +27035,42 @@ "@lexical/history": { "version": "file:packages/lexical-history", "requires": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" } }, "@lexical/html": { "version": "file:packages/lexical-html", "requires": { - "@lexical/selection": "0.3.11" + "@lexical/selection": "0.4.0" } }, "@lexical/link": { "version": "file:packages/lexical-link", "requires": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" } }, "@lexical/list": { "version": "file:packages/lexical-list", "requires": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" } }, "@lexical/mark": { "version": "file:packages/lexical-mark", "requires": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" } }, "@lexical/markdown": { "version": "file:packages/lexical-markdown", "requires": { - "@lexical/code": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/text": "0.3.11", - "@lexical/utils": "0.3.11" + "@lexical/code": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/text": "0.4.0", + "@lexical/utils": "0.4.0" } }, "@lexical/offset": { @@ -27092,23 +27085,23 @@ "@lexical/react": { "version": "file:packages/lexical-react", "requires": { - "@lexical/clipboard": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/dragon": "0.3.11", - "@lexical/hashtag": "0.3.11", - "@lexical/history": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/mark": "0.3.11", - "@lexical/markdown": "0.3.11", - "@lexical/overflow": "0.3.11", - "@lexical/plain-text": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/table": "0.3.11", - "@lexical/text": "0.3.11", - "@lexical/utils": "0.3.11", - "@lexical/yjs": "0.3.11" + "@lexical/clipboard": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/dragon": "0.4.0", + "@lexical/hashtag": "0.4.0", + "@lexical/history": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/mark": "0.4.0", + "@lexical/markdown": "0.4.0", + "@lexical/overflow": "0.4.0", + "@lexical/plain-text": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/table": "0.4.0", + "@lexical/text": "0.4.0", + "@lexical/utils": "0.4.0", + "@lexical/yjs": "0.4.0" } }, "@lexical/rich-text": { @@ -27120,7 +27113,7 @@ "@lexical/table": { "version": "file:packages/lexical-table", "requires": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" } }, "@lexical/text": { @@ -27129,8 +27122,8 @@ "@lexical/utils": { "version": "file:packages/lexical-utils", "requires": { - "@lexical/list": "0.3.11", - "@lexical/table": "0.3.11" + "@lexical/list": "0.4.0", + "@lexical/table": "0.4.0" } }, "@lexical/website": { @@ -27838,7 +27831,7 @@ "@lexical/yjs": { "version": "file:packages/lexical-yjs", "requires": { - "@lexical/offset": "0.3.11" + "@lexical/offset": "0.4.0" } }, "@mdx-js/mdx": { @@ -28676,12 +28669,6 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -36503,25 +36490,24 @@ "version": "file:packages/lexical-playground", "requires": { "@excalidraw/excalidraw": "0.11.0", - "@lexical/clipboard": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/file": "0.3.11", - "@lexical/hashtag": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/mark": "0.3.11", - "@lexical/overflow": "0.3.11", - "@lexical/plain-text": "0.3.11", - "@lexical/react": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/table": "0.3.11", - "@lexical/utils": "0.3.11", + "@lexical/clipboard": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/file": "0.4.0", + "@lexical/hashtag": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/mark": "0.4.0", + "@lexical/overflow": "0.4.0", + "@lexical/plain-text": "0.4.0", + "@lexical/react": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/table": "0.4.0", + "@lexical/utils": "0.4.0", "@types/lodash-es": "^4.14.182", - "@types/minimist": "^1.2.2", "@vitejs/plugin-react": "^1.0.7", "katex": "^0.15.2", - "lexical": "0.3.11", + "lexical": "0.4.0", "link-preview-generator": "1.0.7", "lodash-es": "^4.17.21", "prettier": "^2.3.2", @@ -40059,7 +40045,7 @@ "shared": { "version": "file:packages/shared", "requires": { - "lexical": "0.3.11" + "lexical": "0.4.0" } }, "shebang-command": { diff --git a/package.json b/package.json index fe93f1efc20..76d1b8e3a00 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@lexical/monorepo", "description": "Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.", - "version": "0.3.11", + "version": "0.4.0", "license": "MIT", "private": true, "workspaces": [ diff --git a/packages/lexical-clipboard/package.json b/packages/lexical-clipboard/package.json index f335894ed49..11ab4e18220 100644 --- a/packages/lexical-clipboard/package.json +++ b/packages/lexical-clipboard/package.json @@ -9,16 +9,16 @@ "paste" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalClipboard.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/html": "0.3.11" + "@lexical/utils": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/html": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-code/package.json b/packages/lexical-code/package.json index bfd13387f83..22c00b884ee 100644 --- a/packages/lexical-code/package.json +++ b/packages/lexical-code/package.json @@ -8,13 +8,13 @@ "code" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalCode.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11", + "@lexical/utils": "0.4.0", "prismjs": "^1.27.0" }, "repository": { diff --git a/packages/lexical-dragon/package.json b/packages/lexical-dragon/package.json index e7e4aaf9597..739d9c4b0b1 100644 --- a/packages/lexical-dragon/package.json +++ b/packages/lexical-dragon/package.json @@ -9,10 +9,10 @@ "accessibility" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalDragon.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-file/package.json b/packages/lexical-file/package.json index 2e07ed9b11e..8fa827ed36d 100644 --- a/packages/lexical-file/package.json +++ b/packages/lexical-file/package.json @@ -10,10 +10,10 @@ "export" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalFile.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-hashtag/package.json b/packages/lexical-hashtag/package.json index 31c190ce37e..13f9414d1fc 100644 --- a/packages/lexical-hashtag/package.json +++ b/packages/lexical-hashtag/package.json @@ -8,13 +8,13 @@ "hashtag" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalHashtag.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-headless/package.json b/packages/lexical-headless/package.json index b587c0310b6..5080594881c 100644 --- a/packages/lexical-headless/package.json +++ b/packages/lexical-headless/package.json @@ -8,10 +8,10 @@ "headless" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalHeadless.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-history/package.json b/packages/lexical-history/package.json index 43a5584bf54..ff9843087cd 100644 --- a/packages/lexical-history/package.json +++ b/packages/lexical-history/package.json @@ -8,13 +8,13 @@ "history" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalHistory.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-html/package.json b/packages/lexical-html/package.json index 39ae952044f..5d81b5ec299 100644 --- a/packages/lexical-html/package.json +++ b/packages/lexical-html/package.json @@ -8,10 +8,10 @@ "html" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalHtml.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", @@ -19,6 +19,6 @@ "directory": "packages/lexical-html" }, "dependencies": { - "@lexical/selection": "0.3.11" + "@lexical/selection": "0.4.0" } } diff --git a/packages/lexical-link/package.json b/packages/lexical-link/package.json index cf325747208..ffe581b76e1 100644 --- a/packages/lexical-link/package.json +++ b/packages/lexical-link/package.json @@ -8,13 +8,13 @@ "link" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalLink.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-list/package.json b/packages/lexical-list/package.json index f06cb560c6c..eea5314760f 100644 --- a/packages/lexical-list/package.json +++ b/packages/lexical-list/package.json @@ -8,13 +8,13 @@ "list" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalList.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-mark/package.json b/packages/lexical-mark/package.json index a85b83f8919..f3de960b119 100644 --- a/packages/lexical-mark/package.json +++ b/packages/lexical-mark/package.json @@ -8,13 +8,13 @@ "mark" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalMark.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-markdown/package.json b/packages/lexical-markdown/package.json index 8ccda1f276f..1bc63eeb854 100644 --- a/packages/lexical-markdown/package.json +++ b/packages/lexical-markdown/package.json @@ -8,18 +8,18 @@ "markdown" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalMarkdown.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/text": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/link": "0.3.11" + "@lexical/utils": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/text": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/link": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-offset/package.json b/packages/lexical-offset/package.json index 264d4c9fc48..05dbd1bf8a1 100644 --- a/packages/lexical-offset/package.json +++ b/packages/lexical-offset/package.json @@ -8,10 +8,10 @@ "offset" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalOffset.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-overflow/package.json b/packages/lexical-overflow/package.json index 281b3c8cb99..4ac47a2e01c 100644 --- a/packages/lexical-overflow/package.json +++ b/packages/lexical-overflow/package.json @@ -8,10 +8,10 @@ "overflow" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalOverflow.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-plain-text/package.json b/packages/lexical-plain-text/package.json index 0d48c2bd86a..995c8d6ec9a 100644 --- a/packages/lexical-plain-text/package.json +++ b/packages/lexical-plain-text/package.json @@ -7,13 +7,13 @@ "plain-text" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalPlainText.js", "peerDependencies": { - "lexical": "0.3.11", - "@lexical/utils": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/clipboard": "0.3.11" + "lexical": "0.4.0", + "@lexical/utils": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/clipboard": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-playground/package.json b/packages/lexical-playground/package.json index f68be6b2a5f..0d43c91a17a 100644 --- a/packages/lexical-playground/package.json +++ b/packages/lexical-playground/package.json @@ -1,6 +1,6 @@ { "name": "lexical-playground", - "version": "0.3.11", + "version": "0.4.0", "private": true, "scripts": { "dev": "vite --host", @@ -11,22 +11,22 @@ }, "dependencies": { "@excalidraw/excalidraw": "0.11.0", - "@lexical/clipboard": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/file": "0.3.11", - "@lexical/hashtag": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/mark": "0.3.11", - "@lexical/overflow": "0.3.11", - "@lexical/plain-text": "0.3.11", - "@lexical/react": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/table": "0.3.11", - "@lexical/utils": "0.3.11", + "@lexical/clipboard": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/file": "0.4.0", + "@lexical/hashtag": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/mark": "0.4.0", + "@lexical/overflow": "0.4.0", + "@lexical/plain-text": "0.4.0", + "@lexical/react": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/table": "0.4.0", + "@lexical/utils": "0.4.0", "katex": "^0.15.2", - "lexical": "0.3.11", + "lexical": "0.4.0", "link-preview-generator": "1.0.7", "lodash-es": "^4.17.21", "prettier": "^2.3.2", diff --git a/packages/lexical-react/flow/LexicalOnChangePlugin.js.flow b/packages/lexical-react/flow/LexicalOnChangePlugin.js.flow index 4841e449872..4186fc21bf0 100644 --- a/packages/lexical-react/flow/LexicalOnChangePlugin.js.flow +++ b/packages/lexical-react/flow/LexicalOnChangePlugin.js.flow @@ -11,7 +11,7 @@ import type {EditorState, LexicalEditor} from 'lexical'; declare export function OnChangePlugin({ ignoreHistoryMergeTagChange?: boolean, - // TODO 0.4 remove + // TODO 0.5 remove ignoreInitialChange?: boolean, ignoreSelectionChange?: boolean, onChange: (editorState: EditorState, editor: LexicalEditor) => void, diff --git a/packages/lexical-react/package.json b/packages/lexical-react/package.json index 01a9e82c5a0..9d416ce56d8 100644 --- a/packages/lexical-react/package.json +++ b/packages/lexical-react/package.json @@ -8,28 +8,28 @@ "rich-text" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "dependencies": { - "@lexical/clipboard": "0.3.11", - "@lexical/code": "0.3.11", - "@lexical/dragon": "0.3.11", - "@lexical/hashtag": "0.3.11", - "@lexical/history": "0.3.11", - "@lexical/link": "0.3.11", - "@lexical/list": "0.3.11", - "@lexical/mark": "0.3.11", - "@lexical/markdown": "0.3.11", - "@lexical/overflow": "0.3.11", - "@lexical/plain-text": "0.3.11", - "@lexical/rich-text": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/table": "0.3.11", - "@lexical/text": "0.3.11", - "@lexical/utils": "0.3.11", - "@lexical/yjs": "0.3.11" + "@lexical/clipboard": "0.4.0", + "@lexical/code": "0.4.0", + "@lexical/dragon": "0.4.0", + "@lexical/hashtag": "0.4.0", + "@lexical/history": "0.4.0", + "@lexical/link": "0.4.0", + "@lexical/list": "0.4.0", + "@lexical/mark": "0.4.0", + "@lexical/markdown": "0.4.0", + "@lexical/overflow": "0.4.0", + "@lexical/plain-text": "0.4.0", + "@lexical/rich-text": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/table": "0.4.0", + "@lexical/text": "0.4.0", + "@lexical/utils": "0.4.0", + "@lexical/yjs": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11", + "lexical": "0.4.0", "react": ">=17.x", "react-dom": ">=17.x" }, diff --git a/packages/lexical-react/src/LexicalOnChangePlugin.ts b/packages/lexical-react/src/LexicalOnChangePlugin.ts index 24519aa44b9..21096d74cc5 100644 --- a/packages/lexical-react/src/LexicalOnChangePlugin.ts +++ b/packages/lexical-react/src/LexicalOnChangePlugin.ts @@ -12,14 +12,14 @@ import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import useLayoutEffect from 'shared/useLayoutEffect'; export function OnChangePlugin({ - // TODO 0.4 flip to true + // TODO 0.5 flip to true ignoreHistoryMergeTagChange = false, ignoreInitialChange = true, ignoreSelectionChange = false, onChange, }: { ignoreHistoryMergeTagChange?: boolean; - // TODO 0.4 remove + // TODO 0.5 remove ignoreInitialChange?: boolean; ignoreSelectionChange?: boolean; onChange: (editorState: EditorState, editor: LexicalEditor) => void; diff --git a/packages/lexical-rich-text/package.json b/packages/lexical-rich-text/package.json index 31954215a18..e88fb97fce6 100644 --- a/packages/lexical-rich-text/package.json +++ b/packages/lexical-rich-text/package.json @@ -7,13 +7,13 @@ "rich-text" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalRichText.js", "peerDependencies": { - "lexical": "0.3.11", - "@lexical/selection": "0.3.11", - "@lexical/clipboard": "0.3.11", - "@lexical/utils": "0.3.11" + "lexical": "0.4.0", + "@lexical/selection": "0.4.0", + "@lexical/clipboard": "0.4.0", + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-selection/package.json b/packages/lexical-selection/package.json index 7f637063349..db9e35f3183 100644 --- a/packages/lexical-selection/package.json +++ b/packages/lexical-selection/package.json @@ -9,10 +9,10 @@ "selection" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalSelection.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-table/package.json b/packages/lexical-table/package.json index 6f79b6a89f3..40832c558b5 100644 --- a/packages/lexical-table/package.json +++ b/packages/lexical-table/package.json @@ -8,13 +8,13 @@ "table" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalTable.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/utils": "0.3.11" + "@lexical/utils": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-text/package.json b/packages/lexical-text/package.json index 7306170bd5a..7165b740551 100644 --- a/packages/lexical-text/package.json +++ b/packages/lexical-text/package.json @@ -9,10 +9,10 @@ "text" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalText.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-text/src/index.ts b/packages/lexical-text/src/index.ts index 51d3c7c6e66..f576da3a34d 100644 --- a/packages/lexical-text/src/index.ts +++ b/packages/lexical-text/src/index.ts @@ -211,7 +211,7 @@ export function $rootTextContent(): string { export function $canShowPlaceholder( isComposing: boolean, - // TODO 0.4 make mandatory + // TODO 0.5 make mandatory isEditable = true, ): boolean { if (!isEditable || !$isRootTextContentEmpty(isComposing, false)) { @@ -256,7 +256,7 @@ export function $canShowPlaceholder( export function $canShowPlaceholderCurry( isEditorComposing: boolean, - // TODO 0.4 make mandatory + // TODO 0.5 make mandatory isEditable = true, ): () => boolean { return () => $canShowPlaceholder(isEditorComposing, isEditable); diff --git a/packages/lexical-utils/package.json b/packages/lexical-utils/package.json index ac5c36069a5..d3bdaea21fd 100644 --- a/packages/lexical-utils/package.json +++ b/packages/lexical-utils/package.json @@ -8,14 +8,14 @@ "utils" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalUtils.js", "peerDependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "dependencies": { - "@lexical/list": "0.3.11", - "@lexical/table": "0.3.11" + "@lexical/list": "0.4.0", + "@lexical/table": "0.4.0" }, "repository": { "type": "git", diff --git a/packages/lexical-yjs/package.json b/packages/lexical-yjs/package.json index a6c62171af9..7e422740e46 100644 --- a/packages/lexical-yjs/package.json +++ b/packages/lexical-yjs/package.json @@ -11,13 +11,13 @@ "crdt" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "LexicalYjs.js", "dependencies": { - "@lexical/offset": "0.3.11" + "@lexical/offset": "0.4.0" }, "peerDependencies": { - "lexical": "0.3.11", + "lexical": "0.4.0", "yjs": ">=13.5.22" }, "repository": { diff --git a/packages/lexical/package.json b/packages/lexical/package.json index 2a1ee6dd11a..c7b5e88dd9b 100644 --- a/packages/lexical/package.json +++ b/packages/lexical/package.json @@ -9,7 +9,7 @@ "rich-text" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "main": "Lexical.js", "repository": { "type": "git", diff --git a/packages/lexical/src/LexicalVersion.ts b/packages/lexical/src/LexicalVersion.ts index ac5ce92947b..25b92fb2849 100644 --- a/packages/lexical/src/LexicalVersion.ts +++ b/packages/lexical/src/LexicalVersion.ts @@ -6,4 +6,4 @@ * */ -export const VERSION = '0.3.11'; +export const VERSION = '0.4.0'; diff --git a/packages/lexical/src/nodes/LexicalTextNode.ts b/packages/lexical/src/nodes/LexicalTextNode.ts index ee988ec28db..4750fb7838f 100644 --- a/packages/lexical/src/nodes/LexicalTextNode.ts +++ b/packages/lexical/src/nodes/LexicalTextNode.ts @@ -508,7 +508,7 @@ export class TextNode extends LexicalNode { return; } - // TODO 0.4 This should just be a `string`. + // TODO 0.5 This should just be a `string`. setFormat(format: TextFormatType | number): this { const self = this.getWritable(); self.__format = @@ -516,7 +516,7 @@ export class TextNode extends LexicalNode { return self; } - // TODO 0.4 This should just be a `string`. + // TODO 0.5 This should just be a `string`. setDetail(detail: TextDetailType | number): this { const self = this.getWritable(); self.__detail = diff --git a/packages/shared/package.json b/packages/shared/package.json index e7c41b03b10..de3e72b494b 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -8,9 +8,9 @@ "rich-text" ], "license": "MIT", - "version": "0.3.11", + "version": "0.4.0", "dependencies": { - "lexical": "0.3.11" + "lexical": "0.4.0" }, "repository": { "type": "git",