1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 13:51:59 +02:00

Enable Extending Editor types in TypeScript ()

* Change HistoryEditor from type to interface

* v0.60.8

* v0.60.9

* Have ReactEditor and HistoryEditor extend BaseEditor instead of Editor

* v0.60.10
This commit is contained in:
Sunny Hirai 2021-03-20 13:47:33 -07:00 committed by GitHub
parent 1940317d6a
commit 5be428a0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 15 deletions
lerna.json
packages
slate-history
slate-hyperscript
slate-react
slate

@ -1,6 +1,6 @@
{
"lerna": "2.7.1",
"version": "0.60.7",
"version": "0.60.10",
"npmClient": "yarn",
"useWorkspaces": true
}

@ -1,7 +1,7 @@
{
"name": "slate-history",
"description": "An operation-based history implementation for Slate editors.",
"version": "0.60.7",
"version": "0.60.10",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "dist/index.js",
@ -18,8 +18,8 @@
"is-plain-object": "^3.0.0"
},
"devDependencies": {
"slate": "^0.60.7",
"slate-hyperscript": "^0.60.7"
"slate": "^0.60.9",
"slate-hyperscript": "^0.60.9"
},
"peerDependencies": {
"slate": ">=0.55.0"

@ -1,4 +1,4 @@
import { Editor } from 'slate'
import { BaseEditor, Editor } from 'slate'
import { History } from './history'
/**
@ -13,7 +13,7 @@ export const MERGING = new WeakMap<Editor, boolean | undefined>()
* `HistoryEditor` contains helpers for history-enabled editors.
*/
export type HistoryEditor = Editor & {
export interface HistoryEditor extends BaseEditor {
history: History
undo: () => void
redo: () => void

@ -1,7 +1,7 @@
{
"name": "slate-hyperscript",
"description": "A hyperscript helper for creating Slate documents.",
"version": "0.60.7",
"version": "0.60.9",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "dist/index.js",
@ -17,7 +17,7 @@
"is-plain-object": "^3.0.0"
},
"devDependencies": {
"slate": "^0.60.7"
"slate": "^0.60.9"
},
"peerDependencies": {
"slate": ">=0.55.0"

@ -1,7 +1,7 @@
{
"name": "slate-react",
"description": "Tools for building completely customizable richtext editors with React.",
"version": "0.60.7",
"version": "0.60.10",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "dist/index.js",
@ -23,9 +23,9 @@
"scroll-into-view-if-needed": "^2.2.20"
},
"devDependencies": {
"slate": "^0.60.7",
"slate-history": "^0.60.7",
"slate-hyperscript": "^0.60.7"
"slate": "^0.60.9",
"slate-history": "^0.60.10",
"slate-hyperscript": "^0.60.9"
},
"peerDependencies": {
"react": ">=16.8.0",

@ -1,4 +1,4 @@
import { Editor, Node, Path, Point, Range, Transforms, Descendant } from 'slate'
import { Editor, Node, Path, Point, Range, Transforms, BaseEditor } from 'slate'
import { Key } from '../utils/key'
import {
@ -28,7 +28,7 @@ import {
* A React and DOM-specific version of the `Editor` interface.
*/
export interface ReactEditor extends Editor {
export interface ReactEditor extends BaseEditor {
insertData: (data: DataTransfer) => void
setFragmentData: (data: DataTransfer) => void
}

@ -1,7 +1,7 @@
{
"name": "slate",
"description": "A completely customizable framework for building rich text editors.",
"version": "0.60.7",
"version": "0.60.9",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "dist/index.js",