slate-react 0.100.0-2023920121024 → 0.100.0
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/dist/components/editable.d.ts +84 -83
- package/dist/components/editable.d.ts.map +1 -1
- package/dist/components/element.d.ts +28 -27
- package/dist/components/element.d.ts.map +1 -1
- package/dist/components/leaf.d.ts +14 -13
- package/dist/components/leaf.d.ts.map +1 -1
- package/dist/components/restore-dom/restore-dom-manager.d.ts +8 -8
- package/dist/components/restore-dom/restore-dom-manager.d.ts.map +1 -1
- package/dist/components/restore-dom/restore-dom.d.ts +8 -7
- package/dist/components/restore-dom/restore-dom.d.ts.map +1 -1
- package/dist/components/slate.d.ts +15 -15
- package/dist/components/slate.d.ts.map +1 -1
- package/dist/components/string.d.ts +20 -20
- package/dist/components/string.d.ts.map +1 -1
- package/dist/components/text.d.ts +12 -12
- package/dist/components/text.d.ts.map +1 -1
- package/dist/custom-types.d.ts +37 -15
- package/dist/custom-types.d.ts.map +1 -1
- package/dist/hooks/android-input-manager/android-input-manager.d.ts +29 -29
- package/dist/hooks/android-input-manager/android-input-manager.d.ts.map +1 -1
- package/dist/hooks/android-input-manager/use-android-input-manager.d.ts +7 -7
- package/dist/hooks/android-input-manager/use-android-input-manager.d.ts.map +1 -1
- package/dist/hooks/use-children.d.ts +15 -15
- package/dist/hooks/use-children.d.ts.map +1 -1
- package/dist/hooks/use-decorate.d.ts +10 -10
- package/dist/hooks/use-decorate.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-focused.d.ts +9 -9
- package/dist/hooks/use-focused.d.ts.map +1 -1
- package/dist/hooks/use-is-mounted.d.ts +1 -1
- package/dist/hooks/use-is-mounted.d.ts.map +1 -1
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +5 -5
- package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/dist/hooks/use-mutation-observer.d.ts +2 -2
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
- package/dist/hooks/use-read-only.d.ts +9 -9
- package/dist/hooks/use-read-only.d.ts.map +1 -1
- package/dist/hooks/use-selected.d.ts +9 -9
- package/dist/hooks/use-selected.d.ts.map +1 -1
- package/dist/hooks/use-slate-selection.d.ts +6 -6
- package/dist/hooks/use-slate-selection.d.ts.map +1 -1
- package/dist/hooks/use-slate-selector.d.ts +31 -31
- package/dist/hooks/use-slate-selector.d.ts.map +1 -1
- package/dist/hooks/use-slate-static.d.ts +11 -11
- package/dist/hooks/use-slate-static.d.ts.map +1 -1
- package/dist/hooks/use-slate.d.ts +23 -23
- package/dist/hooks/use-slate.d.ts.map +1 -1
- package/dist/hooks/use-track-user-input.d.ts +5 -5
- package/dist/hooks/use-track-user-input.d.ts.map +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +624 -1275
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +943 -1734
- package/dist/index.js.map +1 -1
- package/dist/plugin/react-editor.d.ts +150 -150
- package/dist/plugin/react-editor.d.ts.map +1 -1
- package/dist/plugin/with-react.d.ts +11 -11
- package/dist/plugin/with-react.d.ts.map +1 -1
- package/dist/slate-react.js +20187 -17894
- package/dist/slate-react.min.js +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/diff-text.d.ts +44 -44
- package/dist/utils/diff-text.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +83 -83
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/environment.d.ts +15 -15
- package/dist/utils/environment.d.ts.map +1 -1
- package/dist/utils/hotkeys.d.ts +30 -30
- package/dist/utils/hotkeys.d.ts.map +1 -1
- package/dist/utils/key.d.ts +11 -11
- package/dist/utils/key.d.ts.map +1 -1
- package/dist/utils/lines.d.ts +14 -14
- package/dist/utils/lines.d.ts.map +1 -1
- package/dist/utils/range-list.d.ts +22 -18
- package/dist/utils/range-list.d.ts.map +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/utils/weak-maps.d.ts +53 -77
- package/dist/utils/weak-maps.d.ts.map +1 -1
- package/package.json +24 -24
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
import { BaseEditor, Editor, Node, Path, Point, Range } from 'slate';
|
|
2
|
-
import { TextDiff } from '../utils/diff-text';
|
|
3
|
-
import { DOMNode, DOMPoint, DOMRange, DOMSelection, DOMStaticRange } from '../utils/dom';
|
|
4
|
-
import { Key } from '../utils/key';
|
|
5
|
-
/**
|
|
6
|
-
* A React and DOM-specific version of the `Editor` interface.
|
|
7
|
-
*/
|
|
8
|
-
export interface ReactEditor extends BaseEditor {
|
|
9
|
-
hasEditableTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
10
|
-
hasRange: (editor: ReactEditor, range: Range) => boolean;
|
|
11
|
-
hasSelectableTarget: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
12
|
-
hasTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
13
|
-
insertData: (data: DataTransfer) => void;
|
|
14
|
-
insertFragmentData: (data: DataTransfer) => boolean;
|
|
15
|
-
insertTextData: (data: DataTransfer) => boolean;
|
|
16
|
-
isTargetInsideNonReadonlyVoid: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
17
|
-
setFragmentData: (data: DataTransfer, originEvent?: 'drag' | 'copy' | 'cut') => void;
|
|
18
|
-
}
|
|
19
|
-
export interface ReactEditorInterface {
|
|
20
|
-
/**
|
|
21
|
-
* Experimental and android specific: Get pending diffs
|
|
22
|
-
*/
|
|
23
|
-
androidPendingDiffs: (editor: Editor) => TextDiff[] | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Experimental and android specific: Flush all pending diffs and cancel composition at the next possible time.
|
|
26
|
-
*/
|
|
27
|
-
androidScheduleFlush: (editor: Editor) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Blur the editor.
|
|
30
|
-
*/
|
|
31
|
-
blur: (editor: ReactEditor) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Deselect the editor.
|
|
34
|
-
*/
|
|
35
|
-
deselect: (editor: ReactEditor) => void;
|
|
36
|
-
/**
|
|
37
|
-
* Find the DOM node that implements DocumentOrShadowRoot for the editor.
|
|
38
|
-
*/
|
|
39
|
-
findDocumentOrShadowRoot: (editor: ReactEditor) => Document | ShadowRoot;
|
|
40
|
-
/**
|
|
41
|
-
* Get the target range from a DOM `event`.
|
|
42
|
-
*/
|
|
43
|
-
findEventRange: (editor: ReactEditor, event: any) => Range;
|
|
44
|
-
/**
|
|
45
|
-
* Find a key for a Slate node.
|
|
46
|
-
*/
|
|
47
|
-
findKey: (editor: ReactEditor, node: Node) => Key;
|
|
48
|
-
/**
|
|
49
|
-
* Find the path of Slate node.
|
|
50
|
-
*/
|
|
51
|
-
findPath: (editor: ReactEditor, node: Node) => Path;
|
|
52
|
-
/**
|
|
53
|
-
* Focus the editor.
|
|
54
|
-
*/
|
|
55
|
-
focus: (editor: ReactEditor) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Return the host window of the current editor.
|
|
58
|
-
*/
|
|
59
|
-
getWindow: (editor: ReactEditor) => Window;
|
|
60
|
-
/**
|
|
61
|
-
* Check if a DOM node is within the editor.
|
|
62
|
-
*/
|
|
63
|
-
hasDOMNode: (editor: ReactEditor, target: DOMNode, options?: {
|
|
64
|
-
editable?: boolean;
|
|
65
|
-
}) => boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Check if the target is editable and in the editor.
|
|
68
|
-
*/
|
|
69
|
-
hasEditableTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
hasRange: (editor: ReactEditor, range: Range) => boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Check if the target can be selectable
|
|
76
|
-
*/
|
|
77
|
-
hasSelectableTarget: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Check if the target is in the editor.
|
|
80
|
-
*/
|
|
81
|
-
hasTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
82
|
-
/**
|
|
83
|
-
* Insert data from a `DataTransfer` into the editor.
|
|
84
|
-
*/
|
|
85
|
-
insertData: (editor: ReactEditor, data: DataTransfer) => void;
|
|
86
|
-
/**
|
|
87
|
-
* Insert fragment data from a `DataTransfer` into the editor.
|
|
88
|
-
*/
|
|
89
|
-
insertFragmentData: (editor: ReactEditor, data: DataTransfer) => boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Insert text data from a `DataTransfer` into the editor.
|
|
92
|
-
*/
|
|
93
|
-
insertTextData: (editor: ReactEditor, data: DataTransfer) => boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Check if the user is currently composing inside the editor.
|
|
96
|
-
*/
|
|
97
|
-
isComposing: (editor: ReactEditor) => boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Check if the editor is focused.
|
|
100
|
-
*/
|
|
101
|
-
isFocused: (editor: ReactEditor) => boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Check if the editor is in read-only mode.
|
|
104
|
-
*/
|
|
105
|
-
isReadOnly: (editor: ReactEditor) => boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Check if the target is inside void and in an non-readonly editor.
|
|
108
|
-
*/
|
|
109
|
-
isTargetInsideNonReadonlyVoid: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Sets data from the currently selected fragment on a `DataTransfer`.
|
|
112
|
-
*/
|
|
113
|
-
setFragmentData: (editor: ReactEditor, data: DataTransfer, originEvent?: 'drag' | 'copy' | 'cut') => void;
|
|
114
|
-
/**
|
|
115
|
-
* Find the native DOM element from a Slate node.
|
|
116
|
-
*/
|
|
117
|
-
toDOMNode: (editor: ReactEditor, node: Node) => HTMLElement;
|
|
118
|
-
/**
|
|
119
|
-
* Find a native DOM selection point from a Slate point.
|
|
120
|
-
*/
|
|
121
|
-
toDOMPoint: (editor: ReactEditor, point: Point) => DOMPoint;
|
|
122
|
-
/**
|
|
123
|
-
* Find a native DOM range from a Slate `range`.
|
|
124
|
-
*
|
|
125
|
-
* Notice: the returned range will always be ordinal regardless of the direction of Slate `range` due to DOM API limit.
|
|
126
|
-
*
|
|
127
|
-
* there is no way to create a reverse DOM Range using Range.setStart/setEnd
|
|
128
|
-
* according to https://dom.spec.whatwg.org/#concept-range-bp-set.
|
|
129
|
-
*/
|
|
130
|
-
toDOMRange: (editor: ReactEditor, range: Range) => DOMRange;
|
|
131
|
-
/**
|
|
132
|
-
* Find a Slate node from a native DOM `element`.
|
|
133
|
-
*/
|
|
134
|
-
toSlateNode: (editor: ReactEditor, domNode: DOMNode) => Node;
|
|
135
|
-
/**
|
|
136
|
-
* Find a Slate point from a DOM selection's `domNode` and `domOffset`.
|
|
137
|
-
*/
|
|
138
|
-
toSlatePoint: <T extends boolean>(editor: ReactEditor, domPoint: DOMPoint, options: {
|
|
139
|
-
exactMatch: boolean;
|
|
140
|
-
suppressThrow: T;
|
|
141
|
-
}) => T extends true ? Point | null : Point;
|
|
142
|
-
/**
|
|
143
|
-
* Find a Slate range from a DOM range or selection.
|
|
144
|
-
*/
|
|
145
|
-
toSlateRange: <T extends boolean>(editor: ReactEditor, domRange: DOMRange | DOMStaticRange | DOMSelection, options: {
|
|
146
|
-
exactMatch: boolean;
|
|
147
|
-
suppressThrow: T;
|
|
148
|
-
}) => T extends true ? Range | null : Range;
|
|
149
|
-
}
|
|
150
|
-
export declare const ReactEditor: ReactEditorInterface;
|
|
1
|
+
import { BaseEditor, Editor, Node, Path, Point, Range } from 'slate';
|
|
2
|
+
import { TextDiff } from '../utils/diff-text';
|
|
3
|
+
import { DOMNode, DOMPoint, DOMRange, DOMSelection, DOMStaticRange } from '../utils/dom';
|
|
4
|
+
import { Key } from '../utils/key';
|
|
5
|
+
/**
|
|
6
|
+
* A React and DOM-specific version of the `Editor` interface.
|
|
7
|
+
*/
|
|
8
|
+
export interface ReactEditor extends BaseEditor {
|
|
9
|
+
hasEditableTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
10
|
+
hasRange: (editor: ReactEditor, range: Range) => boolean;
|
|
11
|
+
hasSelectableTarget: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
12
|
+
hasTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
13
|
+
insertData: (data: DataTransfer) => void;
|
|
14
|
+
insertFragmentData: (data: DataTransfer) => boolean;
|
|
15
|
+
insertTextData: (data: DataTransfer) => boolean;
|
|
16
|
+
isTargetInsideNonReadonlyVoid: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
17
|
+
setFragmentData: (data: DataTransfer, originEvent?: 'drag' | 'copy' | 'cut') => void;
|
|
18
|
+
}
|
|
19
|
+
export interface ReactEditorInterface {
|
|
20
|
+
/**
|
|
21
|
+
* Experimental and android specific: Get pending diffs
|
|
22
|
+
*/
|
|
23
|
+
androidPendingDiffs: (editor: Editor) => TextDiff[] | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Experimental and android specific: Flush all pending diffs and cancel composition at the next possible time.
|
|
26
|
+
*/
|
|
27
|
+
androidScheduleFlush: (editor: Editor) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Blur the editor.
|
|
30
|
+
*/
|
|
31
|
+
blur: (editor: ReactEditor) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Deselect the editor.
|
|
34
|
+
*/
|
|
35
|
+
deselect: (editor: ReactEditor) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Find the DOM node that implements DocumentOrShadowRoot for the editor.
|
|
38
|
+
*/
|
|
39
|
+
findDocumentOrShadowRoot: (editor: ReactEditor) => Document | ShadowRoot;
|
|
40
|
+
/**
|
|
41
|
+
* Get the target range from a DOM `event`.
|
|
42
|
+
*/
|
|
43
|
+
findEventRange: (editor: ReactEditor, event: any) => Range;
|
|
44
|
+
/**
|
|
45
|
+
* Find a key for a Slate node.
|
|
46
|
+
*/
|
|
47
|
+
findKey: (editor: ReactEditor, node: Node) => Key;
|
|
48
|
+
/**
|
|
49
|
+
* Find the path of Slate node.
|
|
50
|
+
*/
|
|
51
|
+
findPath: (editor: ReactEditor, node: Node) => Path;
|
|
52
|
+
/**
|
|
53
|
+
* Focus the editor.
|
|
54
|
+
*/
|
|
55
|
+
focus: (editor: ReactEditor) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Return the host window of the current editor.
|
|
58
|
+
*/
|
|
59
|
+
getWindow: (editor: ReactEditor) => Window;
|
|
60
|
+
/**
|
|
61
|
+
* Check if a DOM node is within the editor.
|
|
62
|
+
*/
|
|
63
|
+
hasDOMNode: (editor: ReactEditor, target: DOMNode, options?: {
|
|
64
|
+
editable?: boolean;
|
|
65
|
+
}) => boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Check if the target is editable and in the editor.
|
|
68
|
+
*/
|
|
69
|
+
hasEditableTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
hasRange: (editor: ReactEditor, range: Range) => boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Check if the target can be selectable
|
|
76
|
+
*/
|
|
77
|
+
hasSelectableTarget: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Check if the target is in the editor.
|
|
80
|
+
*/
|
|
81
|
+
hasTarget: (editor: ReactEditor, target: EventTarget | null) => target is DOMNode;
|
|
82
|
+
/**
|
|
83
|
+
* Insert data from a `DataTransfer` into the editor.
|
|
84
|
+
*/
|
|
85
|
+
insertData: (editor: ReactEditor, data: DataTransfer) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Insert fragment data from a `DataTransfer` into the editor.
|
|
88
|
+
*/
|
|
89
|
+
insertFragmentData: (editor: ReactEditor, data: DataTransfer) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Insert text data from a `DataTransfer` into the editor.
|
|
92
|
+
*/
|
|
93
|
+
insertTextData: (editor: ReactEditor, data: DataTransfer) => boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Check if the user is currently composing inside the editor.
|
|
96
|
+
*/
|
|
97
|
+
isComposing: (editor: ReactEditor) => boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Check if the editor is focused.
|
|
100
|
+
*/
|
|
101
|
+
isFocused: (editor: ReactEditor) => boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Check if the editor is in read-only mode.
|
|
104
|
+
*/
|
|
105
|
+
isReadOnly: (editor: ReactEditor) => boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Check if the target is inside void and in an non-readonly editor.
|
|
108
|
+
*/
|
|
109
|
+
isTargetInsideNonReadonlyVoid: (editor: ReactEditor, target: EventTarget | null) => boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Sets data from the currently selected fragment on a `DataTransfer`.
|
|
112
|
+
*/
|
|
113
|
+
setFragmentData: (editor: ReactEditor, data: DataTransfer, originEvent?: 'drag' | 'copy' | 'cut') => void;
|
|
114
|
+
/**
|
|
115
|
+
* Find the native DOM element from a Slate node.
|
|
116
|
+
*/
|
|
117
|
+
toDOMNode: (editor: ReactEditor, node: Node) => HTMLElement;
|
|
118
|
+
/**
|
|
119
|
+
* Find a native DOM selection point from a Slate point.
|
|
120
|
+
*/
|
|
121
|
+
toDOMPoint: (editor: ReactEditor, point: Point) => DOMPoint;
|
|
122
|
+
/**
|
|
123
|
+
* Find a native DOM range from a Slate `range`.
|
|
124
|
+
*
|
|
125
|
+
* Notice: the returned range will always be ordinal regardless of the direction of Slate `range` due to DOM API limit.
|
|
126
|
+
*
|
|
127
|
+
* there is no way to create a reverse DOM Range using Range.setStart/setEnd
|
|
128
|
+
* according to https://dom.spec.whatwg.org/#concept-range-bp-set.
|
|
129
|
+
*/
|
|
130
|
+
toDOMRange: (editor: ReactEditor, range: Range) => DOMRange;
|
|
131
|
+
/**
|
|
132
|
+
* Find a Slate node from a native DOM `element`.
|
|
133
|
+
*/
|
|
134
|
+
toSlateNode: (editor: ReactEditor, domNode: DOMNode) => Node;
|
|
135
|
+
/**
|
|
136
|
+
* Find a Slate point from a DOM selection's `domNode` and `domOffset`.
|
|
137
|
+
*/
|
|
138
|
+
toSlatePoint: <T extends boolean>(editor: ReactEditor, domPoint: DOMPoint, options: {
|
|
139
|
+
exactMatch: boolean;
|
|
140
|
+
suppressThrow: T;
|
|
141
|
+
}) => T extends true ? Point | null : Point;
|
|
142
|
+
/**
|
|
143
|
+
* Find a Slate range from a DOM range or selection.
|
|
144
|
+
*/
|
|
145
|
+
toSlateRange: <T extends boolean>(editor: ReactEditor, domRange: DOMRange | DOMStaticRange | DOMSelection, options: {
|
|
146
|
+
exactMatch: boolean;
|
|
147
|
+
suppressThrow: T;
|
|
148
|
+
}) => T extends true ? Range | null : Range;
|
|
149
|
+
}
|
|
150
|
+
export declare const ReactEditor: ReactEditorInterface;
|
|
151
151
|
//# sourceMappingURL=react-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-editor.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"react-editor.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/plugin/react-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,MAAM,EAEN,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,EAGN,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAEL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EAOf,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAgBlC;;GAEG;AAEH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7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I,GAAG,KAAK,CAAA;IAE1C;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,SAAS,OAAO,EAC9B,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,GAAG,cAAc,GAAG,YAAY,EAClD,OAAO,EAAE;QACP,UAAU,EAAE,OAAO,CAAA;QACnB,aAAa,EAAE,CAAC,CAAA;KACjB,KACE,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;CAC3C;AAGD,eAAO,MAAM,WAAW,EAAE,oBA6tBzB,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BaseEditor } from 'slate';
|
|
2
|
-
import { ReactEditor } from './react-editor';
|
|
3
|
-
/**
|
|
4
|
-
* `withReact` adds React and DOM specific behaviors to the editor.
|
|
5
|
-
*
|
|
6
|
-
* If you are using TypeScript, you must extend Slate's CustomTypes to use
|
|
7
|
-
* this plugin.
|
|
8
|
-
*
|
|
9
|
-
* See https://docs.slatejs.org/concepts/11-typescript to learn how.
|
|
10
|
-
*/
|
|
11
|
-
export declare const withReact: <T extends BaseEditor>(editor: T, clipboardFormatKey?: string) => T & ReactEditor;
|
|
1
|
+
import { BaseEditor } from 'slate';
|
|
2
|
+
import { ReactEditor } from './react-editor';
|
|
3
|
+
/**
|
|
4
|
+
* `withReact` adds React and DOM specific behaviors to the editor.
|
|
5
|
+
*
|
|
6
|
+
* If you are using TypeScript, you must extend Slate's CustomTypes to use
|
|
7
|
+
* this plugin.
|
|
8
|
+
*
|
|
9
|
+
* See https://docs.slatejs.org/concepts/11-typescript to learn how.
|
|
10
|
+
*/
|
|
11
|
+
export declare const withReact: <T extends BaseEditor>(editor: T, clipboardFormatKey?: string) => T & ReactEditor;
|
|
12
12
|
//# sourceMappingURL=with-react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-react.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"with-react.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/plugin/with-react.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EAUX,MAAM,OAAO,CAAA;AA0Bd,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAG5C;;;;;;;GAOG;AAEH,eAAO,MAAM,SAAS,mFAmUrB,CAAA"}
|