slate-react 0.99.0 → 0.100.0-20231020154238
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 -13
- 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 +633 -1271
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +952 -1730
- 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 +20190 -17884
- 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 -51
- package/dist/utils/weak-maps.d.ts.map +1 -1
- package/package.json +24 -24
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'data-slate-
|
|
14
|
-
'data-slate-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JSX } from 'react';
|
|
3
|
+
import { Element, NodeEntry, Range, Text } from 'slate';
|
|
4
|
+
import { ReactEditor } from '../plugin/react-editor';
|
|
5
|
+
import { DOMRange } from '../utils/dom';
|
|
6
|
+
/**
|
|
7
|
+
* `RenderElementProps` are passed to the `renderElement` handler.
|
|
8
|
+
*/
|
|
9
|
+
export interface RenderElementProps {
|
|
10
|
+
children: any;
|
|
11
|
+
element: Element;
|
|
12
|
+
attributes: {
|
|
13
|
+
'data-slate-node': 'element';
|
|
14
|
+
'data-slate-inline'?: true;
|
|
15
|
+
'data-slate-void'?: true;
|
|
16
|
+
dir?: 'rtl';
|
|
17
|
+
ref: any;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* `RenderLeafProps` are passed to the `renderLeaf` handler.
|
|
22
|
+
*/
|
|
23
|
+
export interface RenderLeafProps {
|
|
24
|
+
children: any;
|
|
25
|
+
leaf: Text;
|
|
26
|
+
text: Text;
|
|
27
|
+
attributes: {
|
|
28
|
+
'data-slate-leaf': true;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `EditableProps` are passed to the `<Editable>` component.
|
|
33
|
+
*/
|
|
34
|
+
export type EditableProps = {
|
|
35
|
+
decorate?: (entry: NodeEntry) => Range[];
|
|
36
|
+
onDOMBeforeInput?: (event: InputEvent) => void;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
role?: string;
|
|
40
|
+
style?: React.CSSProperties;
|
|
41
|
+
renderElement?: (props: RenderElementProps) => JSX.Element;
|
|
42
|
+
renderLeaf?: (props: RenderLeafProps) => JSX.Element;
|
|
43
|
+
renderPlaceholder?: (props: RenderPlaceholderProps) => JSX.Element;
|
|
44
|
+
scrollSelectionIntoView?: (editor: ReactEditor, domRange: DOMRange) => void;
|
|
45
|
+
as?: React.ElementType;
|
|
46
|
+
disableDefaultStyles?: boolean;
|
|
47
|
+
} & React.TextareaHTMLAttributes<HTMLDivElement>;
|
|
48
|
+
/**
|
|
49
|
+
* Editable.
|
|
50
|
+
*/
|
|
51
|
+
export declare const Editable: (props: EditableProps) => JSX.Element;
|
|
52
|
+
/**
|
|
53
|
+
* The props that get passed to renderPlaceholder
|
|
54
|
+
*/
|
|
55
|
+
export type RenderPlaceholderProps = {
|
|
56
|
+
children: any;
|
|
57
|
+
attributes: {
|
|
58
|
+
'data-slate-placeholder': boolean;
|
|
59
|
+
dir?: 'rtl';
|
|
60
|
+
contentEditable: boolean;
|
|
61
|
+
ref: React.RefCallback<any>;
|
|
62
|
+
style: React.CSSProperties;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The default placeholder element
|
|
67
|
+
*/
|
|
68
|
+
export declare const DefaultPlaceholder: ({ attributes, children, }: RenderPlaceholderProps) => JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* A default memoized decorate function.
|
|
71
|
+
*/
|
|
72
|
+
export declare const defaultDecorate: (entry: NodeEntry) => Range[];
|
|
73
|
+
/**
|
|
74
|
+
* Check if an event is overrided by a handler.
|
|
75
|
+
*/
|
|
76
|
+
export declare const isEventHandled: <EventType extends React.SyntheticEvent<unknown, unknown>>(event: EventType, handler?: ((event: EventType) => void | boolean) | undefined) => boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Check if the event's target is an input element
|
|
79
|
+
*/
|
|
80
|
+
export declare const isDOMEventTargetInput: <EventType extends React.SyntheticEvent<unknown, unknown>>(event: EventType) => boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Check if a DOM event is overrided by a handler.
|
|
83
|
+
*/
|
|
84
|
+
export declare const isDOMEventHandled: <E extends Event>(event: E, handler?: ((event: E) => void | boolean) | undefined) => boolean;
|
|
84
85
|
//# sourceMappingURL=editable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/components/editable.tsx"],"names":[],"mappings":"AAGA,OAAO,KAON,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,OAAO,EAEL,OAAO,EAEP,SAAS,EAET,KAAK,EACL,IAAI,EAEL,MAAM,OAAO,CAAA;AAQd,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD,OAAO,EAEL,QAAQ,EAMT,MAAM,cAAc,CAAA;AAsCrB;;GAEG;AAEH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,GAAG,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE;QACV,iBAAiB,EAAE,SAAS,CAAA;QAC5B,mBAAmB,CAAC,EAAE,IAAI,CAAA;QAC1B,iBAAiB,CAAC,EAAE,IAAI,CAAA;QACxB,GAAG,CAAC,EAAE,KAAK,CAAA;QACX,GAAG,EAAE,GAAG,CAAA;KACT,CAAA;CACF;AAED;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,GAAG,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE;QACV,iBAAiB,EAAE,IAAI,CAAA;KACxB,CAAA;CACF;AAED;;GAEG;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,KAAK,EAAE,CAAA;IACxC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG,CAAC,OAAO,CAAA;IAC1D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,GAAG,CAAC,OAAO,CAAA;IACpD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,GAAG,CAAC,OAAO,CAAA;IAClE,uBAAuB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAA;IAC3E,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,GAAG,KAAK,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAA;AAEhD;;GAEG;AAEH,eAAO,MAAM,QAAQ,UAAW,aAAa,gBAgjD5C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,GAAG,CAAA;IACb,UAAU,EAAE;QACV,wBAAwB,EAAE,OAAO,CAAA;QACjC,GAAG,CAAC,EAAE,KAAK,CAAA;QACX,eAAe,EAAE,OAAO,CAAA;QACxB,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAC3B,KAAK,EAAE,KAAK,CAAC,aAAa,CAAA;KAC3B,CAAA;CACF,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,kBAAkB,8BAG5B,sBAAsB,gBAOxB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,KAAK,EAAa,CAAA;AA4BtE;;GAEG;AAEH,eAAO,MAAM,cAAc,gHAIO,IAAI,GAAG,OAAO,yBAc/C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,yFAUjC,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,iBAAiB,uDAEJ,IAAI,GAAG,OAAO,yBAevC,CAAA"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JSX } from 'react';
|
|
3
|
+
import { Element as SlateElement, Range } from 'slate';
|
|
4
|
+
import { RenderElementProps, RenderLeafProps, RenderPlaceholderProps } from './editable';
|
|
5
|
+
/**
|
|
6
|
+
* Element.
|
|
7
|
+
*/
|
|
8
|
+
declare const Element: (props: {
|
|
9
|
+
decorations: Range[];
|
|
10
|
+
element: SlateElement;
|
|
11
|
+
renderElement?: ((props: RenderElementProps) => JSX.Element) | undefined;
|
|
12
|
+
renderPlaceholder: (props: RenderPlaceholderProps) => JSX.Element;
|
|
13
|
+
renderLeaf?: ((props: RenderLeafProps) => JSX.Element) | undefined;
|
|
14
|
+
selection: Range | null;
|
|
15
|
+
}) => JSX.Element;
|
|
16
|
+
declare const MemoizedElement: React.MemoExoticComponent<(props: {
|
|
17
|
+
decorations: Range[];
|
|
18
|
+
element: SlateElement;
|
|
19
|
+
renderElement?: ((props: RenderElementProps) => JSX.Element) | undefined;
|
|
20
|
+
renderPlaceholder: (props: RenderPlaceholderProps) => JSX.Element;
|
|
21
|
+
renderLeaf?: ((props: RenderLeafProps) => JSX.Element) | undefined;
|
|
22
|
+
selection: Range | null;
|
|
23
|
+
}) => JSX.Element>;
|
|
24
|
+
/**
|
|
25
|
+
* The default element renderer.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DefaultElement: (props: RenderElementProps) => JSX.Element;
|
|
28
|
+
export default MemoizedElement;
|
|
28
29
|
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/components/element.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAU,OAAO,IAAI,YAAY,EAAQ,KAAK,EAAE,MAAM,OAAO,CAAA;AAWpE,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACvB,MAAM,YAAY,CAAA;AAInB;;GAEG;AAEH,QAAA,MAAM,OAAO;iBACE,KAAK,EAAE;aACX,YAAY;6BACG,kBAAkB,KAAK,WAAW;+BAC/B,sBAAsB,KAAK,WAAW;0BAC5C,eAAe,KAAK,WAAW;eACzC,KAAK,GAAG,IAAI;iBAuGxB,CAAA;AAED,QAAA,MAAM,eAAe;iBA9GN,KAAK,EAAE;aACX,YAAY;6BACG,kBAAkB,KAAK,WAAW;+BAC/B,sBAAsB,KAAK,WAAW;0BAC5C,eAAe,KAAK,WAAW;eACzC,KAAK,GAAG,IAAI;kBAqHvB,CAAA;AAEF;;GAEG;AAEH,eAAO,MAAM,cAAc,UAAW,kBAAkB,gBASvD,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JSX } from 'react';
|
|
3
|
+
import { Element, Text } from 'slate';
|
|
4
|
+
import { RenderLeafProps, RenderPlaceholderProps } from './editable';
|
|
5
|
+
declare const MemoizedLeaf: React.MemoExoticComponent<(props: {
|
|
6
|
+
isLast: boolean;
|
|
7
|
+
leaf: Text;
|
|
8
|
+
parent: Element;
|
|
9
|
+
renderPlaceholder: (props: RenderPlaceholderProps) => JSX.Element;
|
|
10
|
+
renderLeaf?: ((props: RenderLeafProps) => JSX.Element) | undefined;
|
|
11
|
+
text: Text;
|
|
12
|
+
}) => JSX.Element>;
|
|
13
|
+
export declare const DefaultLeaf: (props: RenderLeafProps) => JSX.Element;
|
|
14
|
+
export default MemoizedLeaf;
|
|
14
15
|
//# sourceMappingURL=leaf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leaf.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"leaf.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/components/leaf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQrC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AA8IpE,QAAA,MAAM,YAAY;YAjHR,OAAO;UACT,IAAI;YACF,OAAO;+BACY,sBAAsB,KAAK,WAAW;0BAC5C,eAAe,KAAK,WAAW;UAC9C,IAAI;kBAsHV,CAAA;AAEF,eAAO,MAAM,WAAW,UAAW,eAAe,gBAGjD,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { ReactEditor } from '../../plugin/react-editor';
|
|
3
|
-
export
|
|
4
|
-
registerMutations: (mutations: MutationRecord[]) => void;
|
|
5
|
-
restoreDOM: () => void;
|
|
6
|
-
clear: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const createRestoreDomManager: (editor: ReactEditor, receivedUserInput: RefObject<boolean>) => RestoreDOMManager;
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { ReactEditor } from '../../plugin/react-editor';
|
|
3
|
+
export type RestoreDOMManager = {
|
|
4
|
+
registerMutations: (mutations: MutationRecord[]) => void;
|
|
5
|
+
restoreDOM: () => void;
|
|
6
|
+
clear: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const createRestoreDomManager: (editor: ReactEditor, receivedUserInput: RefObject<boolean>) => RestoreDOMManager;
|
|
9
9
|
//# sourceMappingURL=restore-dom-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore-dom-manager.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"restore-dom-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/slate-react/src/components/restore-dom/restore-dom-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAGvD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iBAAiB,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,IAAI,CAAA;IACxD,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,uBAAuB,WAC1B,WAAW,qBACA,UAAU,OAAO,CAAC,KACpC,iBA+CF,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ComponentType, RefObject } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
1
|
+
import { ComponentType, ReactNode, RefObject } from 'react';
|
|
2
|
+
type RestoreDOMProps = {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
receivedUserInput: RefObject<boolean>;
|
|
5
|
+
node: RefObject<HTMLDivElement>;
|
|
6
|
+
};
|
|
7
|
+
export declare const RestoreDOM: ComponentType<RestoreDOMProps>;
|
|
8
|
+
export {};
|
|
8
9
|
//# sourceMappingURL=restore-dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore-dom.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"restore-dom.d.ts","sourceRoot":"","sources":["../../../../../packages/slate-react/src/components/restore-dom/restore-dom.tsx"],"names":[],"mappings":"AAAA,OAAc,EAEZ,aAAa,EAEb,SAAS,EACT,SAAS,EACV,MAAM,OAAO,CAAA;AAed,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,iBAAiB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IACrC,IAAI,EAAE,SAAS,CAAC,cAAc,CAAC,CAAA;CAChC,CAAA;AAwDD,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,eAAe,CAEjB,CAAA"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Descendant } from 'slate';
|
|
3
|
-
import { ReactEditor } from '../plugin/react-editor';
|
|
4
|
-
/**
|
|
5
|
-
* A wrapper around the provider to handle `onChange` events, because the editor
|
|
6
|
-
* is a mutable singleton so it won't ever register as "changed" otherwise.
|
|
7
|
-
*/
|
|
8
|
-
export declare const Slate: (props: {
|
|
9
|
-
editor: ReactEditor;
|
|
10
|
-
initialValue: Descendant[];
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
onChange?: ((value: Descendant[]) => void) | undefined;
|
|
13
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Descendant, Selection } from 'slate';
|
|
3
|
+
import { ReactEditor } from '../plugin/react-editor';
|
|
4
|
+
/**
|
|
5
|
+
* A wrapper around the provider to handle `onChange` events, because the editor
|
|
6
|
+
* is a mutable singleton so it won't ever register as "changed" otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Slate: (props: {
|
|
9
|
+
editor: ReactEditor;
|
|
10
|
+
initialValue: Descendant[];
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
onChange?: ((value: Descendant[]) => void) | undefined;
|
|
13
|
+
onSelectionChange?: ((selection: Selection) => void) | undefined;
|
|
14
|
+
onValueChange?: ((value: Descendant[]) => void) | undefined;
|
|
15
|
+
}) => React.JSX.Element;
|
|
14
16
|
//# sourceMappingURL=slate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slate.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"slate.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/components/slate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAqC,SAAS,EAAE,MAAM,OAAO,CAAA;AAShF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIpD;;;GAGG;AAEH,eAAO,MAAM,KAAK;YACR,WAAW;kBACL,UAAU,EAAE;cAChB,MAAM,SAAS;wBACN,UAAU,EAAE,KAAK,IAAI;qCACR,SAAS,KAAK,IAAI;6BAC1B,UAAU,EAAE,KAAK,IAAI;uBAuG9C,CAAA"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import { Text, Element } from 'slate';
|
|
3
|
-
/**
|
|
4
|
-
* Leaf content strings.
|
|
5
|
-
*/
|
|
6
|
-
declare const String: (props: {
|
|
7
|
-
isLast: boolean;
|
|
8
|
-
leaf: Text;
|
|
9
|
-
parent: Element;
|
|
10
|
-
text: Text;
|
|
11
|
-
}) => JSX.Element;
|
|
12
|
-
/**
|
|
13
|
-
* Leaf strings without text, render as zero-width strings.
|
|
14
|
-
*/
|
|
15
|
-
export declare const ZeroWidthString: (props: {
|
|
16
|
-
length?: number;
|
|
17
|
-
isLineBreak?: boolean;
|
|
18
|
-
isMarkPlaceholder?: boolean;
|
|
19
|
-
}) => JSX.Element;
|
|
20
|
-
export default String;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, Element } from 'slate';
|
|
3
|
+
/**
|
|
4
|
+
* Leaf content strings.
|
|
5
|
+
*/
|
|
6
|
+
declare const String: (props: {
|
|
7
|
+
isLast: boolean;
|
|
8
|
+
leaf: Text;
|
|
9
|
+
parent: Element;
|
|
10
|
+
text: Text;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Leaf strings without text, render as zero-width strings.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ZeroWidthString: (props: {
|
|
16
|
+
length?: number;
|
|
17
|
+
isLineBreak?: boolean;
|
|
18
|
+
isMarkPlaceholder?: boolean;
|
|
19
|
+
}) => React.JSX.Element;
|
|
20
|
+
export default String;
|
|
21
21
|
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/components/string.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AACjE,OAAO,EAAU,IAAI,EAAQ,OAAO,EAAQ,MAAM,OAAO,CAAA;AAOzD;;GAEG;AAEH,QAAA,MAAM,MAAM,UAAW;IACrB,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,OAAO,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;CACX,sBAuCA,CAAA;AAiDD;;GAEG;AAEH,eAAO,MAAM,eAAe,UAAW;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,sBAsBA,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Element, Range, Text as SlateText } from 'slate';
|
|
3
|
-
import { RenderLeafProps, RenderPlaceholderProps } from './editable';
|
|
4
|
-
declare const MemoizedText: React.MemoExoticComponent<(props: {
|
|
5
|
-
decorations: Range[];
|
|
6
|
-
isLast: boolean;
|
|
7
|
-
parent: Element;
|
|
8
|
-
renderPlaceholder: (props: RenderPlaceholderProps) => JSX.Element;
|
|
9
|
-
renderLeaf?: ((props: RenderLeafProps) => JSX.Element) | undefined;
|
|
10
|
-
text: SlateText;
|
|
11
|
-
}) => JSX.Element>;
|
|
12
|
-
export default MemoizedText;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Element, Range, Text as SlateText } from 'slate';
|
|
3
|
+
import { RenderLeafProps, RenderPlaceholderProps } from './editable';
|
|
4
|
+
declare const MemoizedText: React.MemoExoticComponent<(props: {
|
|
5
|
+
decorations: Range[];
|
|
6
|
+
isLast: boolean;
|
|
7
|
+
parent: Element;
|
|
8
|
+
renderPlaceholder: (props: RenderPlaceholderProps) => JSX.Element;
|
|
9
|
+
renderLeaf?: ((props: RenderLeafProps) => JSX.Element) | undefined;
|
|
10
|
+
text: SlateText;
|
|
11
|
+
}) => React.JSX.Element>;
|
|
12
|
+
export default MemoizedText;
|
|
13
13
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../packages/slate-react/src/components/text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,OAAO,CAAA;AAQzD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAiEpE,QAAA,MAAM,YAAY;iBAzDH,KAAK,EAAE;YACZ,OAAO;YACP,OAAO;+BACY,sBAAsB,KAAK,WAAW;0BAC5C,eAAe,KAAK,WAAW;UAC9C,SAAS;wBA6Df,CAAA;AAEF,eAAe,YAAY,CAAA"}
|
package/dist/custom-types.d.ts
CHANGED
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
import { BaseRange, BaseText } from 'slate';
|
|
2
|
-
import { ReactEditor } from './plugin/react-editor';
|
|
3
|
-
declare module 'slate' {
|
|
4
|
-
interface CustomTypes {
|
|
5
|
-
Editor: ReactEditor;
|
|
6
|
-
Text: BaseText & {
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
onPlaceholderResize?: (node: HTMLElement | null) => void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
import { BaseRange, BaseText } from 'slate';
|
|
2
|
+
import { ReactEditor } from './plugin/react-editor';
|
|
3
|
+
declare module 'slate' {
|
|
4
|
+
interface CustomTypes {
|
|
5
|
+
Editor: ReactEditor;
|
|
6
|
+
Text: BaseText & {
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
onPlaceholderResize?: (node: HTMLElement | null) => void;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
Range: BaseRange & {
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
onPlaceholderResize?: (node: HTMLElement | null) => void;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface Window {
|
|
20
|
+
MSStream: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface DocumentOrShadowRoot {
|
|
23
|
+
getSelection(): Selection | null;
|
|
24
|
+
}
|
|
25
|
+
interface CaretPosition {
|
|
26
|
+
readonly offsetNode: Node;
|
|
27
|
+
readonly offset: number;
|
|
28
|
+
getClientRect(): DOMRect | null;
|
|
29
|
+
}
|
|
30
|
+
interface Document {
|
|
31
|
+
caretPositionFromPoint(x: number, y: number): CaretPosition | null;
|
|
32
|
+
}
|
|
33
|
+
interface Node {
|
|
34
|
+
getRootNode(options?: GetRootNodeOptions): Document | ShadowRoot;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
16
38
|
//# sourceMappingURL=custom-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-types.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"custom-types.d.ts","sourceRoot":"","sources":["../src/custom-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,WAAW;QACnB,MAAM,EAAE,WAAW,CAAA;QACnB,IAAI,EAAE,QAAQ,GAAG;YACf,WAAW,CAAC,EAAE,MAAM,CAAA;YACpB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;YAExD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SACvB,CAAA;QACD,KAAK,EAAE,SAAS,GAAG;YACjB,WAAW,CAAC,EAAE,MAAM,CAAA;YACpB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;YAExD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SACvB,CAAA;KACF;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,QAAQ,EAAE,OAAO,CAAA;KAClB;IACD,UAAU,oBAAoB;QAC5B,YAAY,IAAI,SAAS,GAAG,IAAI,CAAA;KACjC;IAED,UAAU,aAAa;QACrB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAA;QACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,aAAa,IAAI,OAAO,GAAG,IAAI,CAAA;KAChC;IAED,UAAU,QAAQ;QAChB,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAAA;KACnE;IAED,UAAU,IAAI;QACZ,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,QAAQ,GAAG,UAAU,CAAA;KACjE;CACF;AAED,OAAO,EAAE,CAAA"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DebouncedFunc } from 'lodash';
|
|
3
|
-
import { Point, Range } from 'slate';
|
|
4
|
-
import { ReactEditor } from '../../plugin/react-editor';
|
|
5
|
-
export
|
|
6
|
-
at?: Point | Range;
|
|
7
|
-
run: () => void;
|
|
8
|
-
};
|
|
9
|
-
export
|
|
10
|
-
editor: ReactEditor;
|
|
11
|
-
scheduleOnDOMSelectionChange: DebouncedFunc<() => void>;
|
|
12
|
-
onDOMSelectionChange: DebouncedFunc<() => void>;
|
|
13
|
-
};
|
|
14
|
-
export
|
|
15
|
-
flush: () => void;
|
|
16
|
-
scheduleFlush: () => void;
|
|
17
|
-
hasPendingDiffs: () => boolean;
|
|
18
|
-
hasPendingAction: () => boolean;
|
|
19
|
-
hasPendingChanges: () => boolean;
|
|
20
|
-
isFlushing: () => boolean | 'action';
|
|
21
|
-
handleUserSelect: (range: Range | null) => void;
|
|
22
|
-
handleCompositionEnd: (event: React.CompositionEvent<HTMLDivElement>) => void;
|
|
23
|
-
handleCompositionStart: (event: React.CompositionEvent<HTMLDivElement>) => void;
|
|
24
|
-
handleDOMBeforeInput: (event: InputEvent) => void;
|
|
25
|
-
handleKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
26
|
-
handleDomMutations: (mutations: MutationRecord[]) => void;
|
|
27
|
-
handleInput: () => void;
|
|
28
|
-
};
|
|
29
|
-
export declare function createAndroidInputManager({ editor, scheduleOnDOMSelectionChange, onDOMSelectionChange, }: CreateAndroidInputManagerOptions): AndroidInputManager;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DebouncedFunc } from 'lodash';
|
|
3
|
+
import { Point, Range } from 'slate';
|
|
4
|
+
import { ReactEditor } from '../../plugin/react-editor';
|
|
5
|
+
export type Action = {
|
|
6
|
+
at?: Point | Range;
|
|
7
|
+
run: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type CreateAndroidInputManagerOptions = {
|
|
10
|
+
editor: ReactEditor;
|
|
11
|
+
scheduleOnDOMSelectionChange: DebouncedFunc<() => void>;
|
|
12
|
+
onDOMSelectionChange: DebouncedFunc<() => void>;
|
|
13
|
+
};
|
|
14
|
+
export type AndroidInputManager = {
|
|
15
|
+
flush: () => void;
|
|
16
|
+
scheduleFlush: () => void;
|
|
17
|
+
hasPendingDiffs: () => boolean;
|
|
18
|
+
hasPendingAction: () => boolean;
|
|
19
|
+
hasPendingChanges: () => boolean;
|
|
20
|
+
isFlushing: () => boolean | 'action';
|
|
21
|
+
handleUserSelect: (range: Range | null) => void;
|
|
22
|
+
handleCompositionEnd: (event: React.CompositionEvent<HTMLDivElement>) => void;
|
|
23
|
+
handleCompositionStart: (event: React.CompositionEvent<HTMLDivElement>) => void;
|
|
24
|
+
handleDOMBeforeInput: (event: InputEvent) => void;
|
|
25
|
+
handleKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
26
|
+
handleDomMutations: (mutations: MutationRecord[]) => void;
|
|
27
|
+
handleInput: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare function createAndroidInputManager({ editor, scheduleOnDOMSelectionChange, onDOMSelectionChange, }: CreateAndroidInputManagerOptions): AndroidInputManager;
|
|
30
30
|
//# sourceMappingURL=android-input-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-input-manager.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"android-input-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/slate-react/src/hooks/android-input-manager/android-input-manager.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAsB,KAAK,EAAE,KAAK,EAAoB,MAAM,OAAO,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAwBvD,MAAM,MAAM,MAAM,GAAG;IAAE,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,IAAI,CAAA;CAAE,CAAA;AAgB5D,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,WAAW,CAAA;IAEnB,4BAA4B,EAAE,aAAa,CAAC,MAAM,IAAI,CAAC,CAAA;IACvD,oBAAoB,EAAE,aAAa,CAAC,MAAM,IAAI,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,aAAa,EAAE,MAAM,IAAI,CAAA;IAEzB,eAAe,EAAE,MAAM,OAAO,CAAA;IAC9B,gBAAgB,EAAE,MAAM,OAAO,CAAA;IAC/B,iBAAiB,EAAE,MAAM,OAAO,CAAA;IAChC,UAAU,EAAE,MAAM,OAAO,GAAG,QAAQ,CAAA;IAEpC,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IAC7E,sBAAsB,EAAE,CACtB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,KAC1C,IAAI,CAAA;IACT,oBAAoB,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACjD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IAEnE,kBAAkB,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,IAAI,CAAA;IACzD,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,4BAA4B,EAC5B,oBAAoB,GACrB,EAAE,gCAAgC,GAAG,mBAAmB,CAktBxD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { CreateAndroidInputManagerOptions } from './android-input-manager';
|
|
3
|
-
|
|
4
|
-
node: RefObject<HTMLElement>;
|
|
5
|
-
} & Omit<CreateAndroidInputManagerOptions, 'editor' | 'onUserInput' | 'receivedUserInput'>;
|
|
6
|
-
export declare const useAndroidInputManager: ({ node, ...options }: UseAndroidInputManagerOptions) => import("./android-input-manager").AndroidInputManager | null;
|
|
7
|
-
export {};
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { CreateAndroidInputManagerOptions } from './android-input-manager';
|
|
3
|
+
type UseAndroidInputManagerOptions = {
|
|
4
|
+
node: RefObject<HTMLElement>;
|
|
5
|
+
} & Omit<CreateAndroidInputManagerOptions, 'editor' | 'onUserInput' | 'receivedUserInput'>;
|
|
6
|
+
export declare const useAndroidInputManager: ({ node, ...options }: UseAndroidInputManagerOptions) => import("./android-input-manager").AndroidInputManager | null;
|
|
7
|
+
export {};
|
|
8
8
|
//# sourceMappingURL=use-android-input-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-android-input-manager.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"use-android-input-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/slate-react/src/hooks/android-input-manager/use-android-input-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAI3C,OAAO,EAEL,gCAAgC,EACjC,MAAM,yBAAyB,CAAA;AAIhC,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,CAAA;CAC7B,GAAG,IAAI,CACN,gCAAgC,EAChC,QAAQ,GAAG,aAAa,GAAG,mBAAmB,CAC/C,CAAA;AAQD,eAAO,MAAM,sBAAsB,yBAER,6BAA6B,iEA2BnD,CAAA"}
|