1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-15 11:44:05 +02:00

Upgrade next.js to 12 and related packages (#5042)

* Upgrade next.js and source-map-loader

* Add changeset

* Upgrade eslint and typescript

* improve reliability of iframe test

* fix lint
This commit is contained in:
Bryan Haakman
2022-07-15 15:14:18 +02:00
committed by GitHub
parent f96b659755
commit 11a93e65de
31 changed files with 817 additions and 1396 deletions

View File

@@ -35,7 +35,7 @@
"react-test-renderer": ">=16.8.0",
"slate": "^0.81.0",
"slate-hyperscript": "^0.77.0",
"source-map-loader": "^0.2.4"
"source-map-loader": "^4.0.0"
},
"peerDependencies": {
"react": ">=16.8.0",

View File

@@ -1479,6 +1479,7 @@ const defaultScrollSelectionIntoView = (
scrollIntoView(leafEl, {
scrollMode: 'if-needed',
})
// @ts-expect-error an unorthodox delete D:
delete leafEl.getBoundingClientRect
}
}

View File

@@ -51,6 +51,7 @@ export interface ReactEditor extends BaseEditor {
hasRange: (editor: ReactEditor, range: Range) => boolean
}
// eslint-disable-next-line no-redeclare
export const ReactEditor = {
/**
* Check if the user is currently composing inside the editor.