slate-react 0.56.1 → 0.57.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +2 -2
- package/dist/components/editable.d.ts.map +1 -1
- package/dist/components/slate.d.ts +3 -2
- package/dist/components/slate.d.ts.map +1 -1
- package/dist/components/text.d.ts.map +1 -1
- package/dist/hooks/use-editor.d.ts +5 -5
- package/dist/hooks/use-editor.d.ts.map +1 -1
- package/dist/hooks/use-slate.d.ts +5 -5
- package/dist/hooks/use-slate.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1712 -1535
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1709 -1533
- package/dist/index.js.map +1 -1
- package/dist/plugin/react-editor.d.ts +13 -0
- package/dist/plugin/react-editor.d.ts.map +1 -1
- package/dist/plugin/with-react.d.ts +2 -1
- package/dist/plugin/with-react.d.ts.map +1 -1
- package/dist/slate-react.js +10436 -9604
- package/dist/slate-react.min.js +1 -6
- package/dist/utils/dom.d.ts +11 -0
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/environment.d.ts +1 -0
- package/dist/utils/environment.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/plugin/react-command.d.ts +0 -18
- package/dist/plugin/react-command.d.ts.map +0 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Editor, Node, Path, Point, Range } from 'slate';
|
|
2
2
|
import { Key } from '../utils/key';
|
|
3
3
|
import { DOMNode, DOMPoint, DOMRange, DOMSelection, DOMStaticRange } from '../utils/dom';
|
|
4
|
+
/**
|
|
5
|
+
* A React and DOM-specific version of the `Editor` interface.
|
|
6
|
+
*/
|
|
4
7
|
export interface ReactEditor extends Editor {
|
|
8
|
+
insertData: (data: DataTransfer) => void;
|
|
9
|
+
setFragmentData: (data: DataTransfer) => void;
|
|
5
10
|
}
|
|
6
11
|
export declare const ReactEditor: {
|
|
7
12
|
/**
|
|
@@ -38,6 +43,14 @@ export declare const ReactEditor: {
|
|
|
38
43
|
hasDOMNode(editor: ReactEditor, target: DOMNode, options?: {
|
|
39
44
|
editable?: boolean | undefined;
|
|
40
45
|
}): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Insert data from a `DataTransfer` into the editor.
|
|
48
|
+
*/
|
|
49
|
+
insertData(editor: ReactEditor, data: DataTransfer): void;
|
|
50
|
+
/**
|
|
51
|
+
* Sets data from the currently selected fragment on a `DataTransfer`.
|
|
52
|
+
*/
|
|
53
|
+
setFragmentData(editor: ReactEditor, data: DataTransfer): void;
|
|
41
54
|
/**
|
|
42
55
|
* Find the native DOM element from a Slate node.
|
|
43
56
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-editor.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/plugin/react-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"react-editor.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/plugin/react-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAA0B,MAAM,OAAO,CAAA;AAEhF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAWlC,OAAO,EAEL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EAGf,MAAM,cAAc,CAAA;AAErB;;GAEG;AAEH,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACxC,eAAe,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;CAC9C;AAED,eAAO,MAAM,WAAW;IACtB;;OAEG;;IAaH;;OAEG;;IAgCH;;OAEG;;IAMH;;OAEG;;IAMH;;OAEG;;IAWH;;OAEG;;IAWH;;OAEG;;IAeH;;OAEG;;;;IAuCH;;OAEG;;IAMH;;OAEG;;IAMH;;OAEG;;IAgBH;;OAEG;;IAkDH;;OAEG;;IA+BH;;OAEG;;IAkBH;;OAEG;;IAgEH;;OAEG;;IA2EH;;OAEG;;CAkDJ,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
|
+
import { ReactEditor } from './react-editor';
|
|
2
3
|
/**
|
|
3
4
|
* `withReact` adds React and DOM specific behaviors to the editor.
|
|
4
5
|
*/
|
|
5
|
-
export declare const withReact: (editor:
|
|
6
|
+
export declare const withReact: <T extends Editor>(editor: T) => T & ReactEditor;
|
|
6
7
|
//# sourceMappingURL=with-react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-react.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/plugin/with-react.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"with-react.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/plugin/with-react.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAA4C,MAAM,OAAO,CAAA;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAK5C;;GAEG;AAEH,eAAO,MAAM,SAAS,kDAgLrB,CAAA"}
|