slate 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/dist/create-editor.d.ts +1 -1
- package/dist/create-editor.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +4435 -6433
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4435 -6434
- package/dist/index.js.map +1 -1
- package/dist/interfaces/editor.d.ts +344 -0
- package/dist/interfaces/editor.d.ts.map +1 -0
- package/dist/interfaces/text.d.ts +5 -0
- package/dist/interfaces/text.d.ts.map +1 -1
- package/dist/slate.js +8269 -7673
- package/dist/slate.min.js +3 -3
- package/dist/transforms/general.d.ts +8 -0
- package/dist/transforms/general.d.ts.map +1 -0
- package/dist/transforms/index.d.ts +108 -0
- package/dist/transforms/index.d.ts.map +1 -0
- package/dist/{interfaces/editor/transforms → transforms}/node.d.ts +1 -1
- package/dist/transforms/node.d.ts.map +1 -0
- package/dist/{interfaces/editor/transforms → transforms}/selection.d.ts +1 -1
- package/dist/transforms/selection.d.ts.map +1 -0
- package/dist/{interfaces/editor/transforms → transforms}/text.d.ts +1 -1
- package/dist/transforms/text.d.ts.map +1 -0
- package/dist/utils/string.d.ts +12 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/weak-maps.d.ts +8 -0
- package/dist/utils/weak-maps.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/interfaces/command.d.ts +0 -91
- package/dist/interfaces/command.d.ts.map +0 -1
- package/dist/interfaces/editor/index.d.ts +0 -235
- package/dist/interfaces/editor/index.d.ts.map +0 -1
- package/dist/interfaces/editor/queries/element.d.ts +0 -20
- package/dist/interfaces/editor/queries/element.d.ts.map +0 -1
- package/dist/interfaces/editor/queries/general.d.ts +0 -69
- package/dist/interfaces/editor/queries/general.d.ts.map +0 -1
- package/dist/interfaces/editor/queries/location.d.ts +0 -170
- package/dist/interfaces/editor/queries/location.d.ts.map +0 -1
- package/dist/interfaces/editor/queries/range.d.ts +0 -10
- package/dist/interfaces/editor/queries/range.d.ts.map +0 -1
- package/dist/interfaces/editor/transforms/general.d.ts +0 -15
- package/dist/interfaces/editor/transforms/general.d.ts.map +0 -1
- package/dist/interfaces/editor/transforms/node.d.ts.map +0 -1
- package/dist/interfaces/editor/transforms/selection.d.ts.map +0 -1
- package/dist/interfaces/editor/transforms/text.d.ts.map +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare const Transforms: {
|
|
2
|
+
delete(editor: import("..").Editor, options?: {
|
|
3
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
4
|
+
distance?: number | undefined;
|
|
5
|
+
unit?: "character" | "word" | "line" | "block" | undefined;
|
|
6
|
+
reverse?: boolean | undefined;
|
|
7
|
+
hanging?: boolean | undefined;
|
|
8
|
+
voids?: boolean | undefined;
|
|
9
|
+
}): void;
|
|
10
|
+
insertFragment(editor: import("..").Editor, fragment: import("..").Node[], options?: {
|
|
11
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
12
|
+
hanging?: boolean | undefined;
|
|
13
|
+
voids?: boolean | undefined;
|
|
14
|
+
}): void;
|
|
15
|
+
insertText(editor: import("..").Editor, text: string, options?: {
|
|
16
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
17
|
+
voids?: boolean | undefined;
|
|
18
|
+
}): void;
|
|
19
|
+
collapse(editor: import("..").Editor, options?: {
|
|
20
|
+
edge?: "anchor" | "focus" | "start" | "end" | undefined;
|
|
21
|
+
}): void;
|
|
22
|
+
deselect(editor: import("..").Editor): void;
|
|
23
|
+
move(editor: import("..").Editor, options?: {
|
|
24
|
+
distance?: number | undefined;
|
|
25
|
+
unit?: "offset" | "character" | "word" | "line" | undefined;
|
|
26
|
+
reverse?: boolean | undefined;
|
|
27
|
+
edge?: "anchor" | "focus" | "start" | "end" | undefined;
|
|
28
|
+
}): void;
|
|
29
|
+
select(editor: import("..").Editor, target: import("..").Location): void;
|
|
30
|
+
setPoint(editor: import("..").Editor, props: Partial<import("..").Point>, options: {
|
|
31
|
+
edge?: "anchor" | "focus" | "start" | "end" | undefined;
|
|
32
|
+
}): void;
|
|
33
|
+
setSelection(editor: import("..").Editor, props: Partial<import("..").Range>): void;
|
|
34
|
+
insertNodes(editor: import("..").Editor, nodes: import("..").Editor | import("..").Element | import("..").Text | import("..").Node[], options?: {
|
|
35
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
36
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
37
|
+
mode?: "highest" | "lowest" | undefined;
|
|
38
|
+
hanging?: boolean | undefined;
|
|
39
|
+
select?: boolean | undefined;
|
|
40
|
+
voids?: boolean | undefined;
|
|
41
|
+
}): void;
|
|
42
|
+
liftNodes(editor: import("..").Editor, options?: {
|
|
43
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
44
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
45
|
+
mode?: "highest" | "lowest" | "all" | undefined;
|
|
46
|
+
voids?: boolean | undefined;
|
|
47
|
+
}): void;
|
|
48
|
+
mergeNodes(editor: import("..").Editor, options?: {
|
|
49
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
50
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
51
|
+
mode?: "highest" | "lowest" | undefined;
|
|
52
|
+
hanging?: boolean | undefined;
|
|
53
|
+
voids?: boolean | undefined;
|
|
54
|
+
}): void;
|
|
55
|
+
moveNodes(editor: import("..").Editor, options: {
|
|
56
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
57
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
58
|
+
mode?: "highest" | "lowest" | "all" | undefined;
|
|
59
|
+
to: import("..").Path;
|
|
60
|
+
voids?: boolean | undefined;
|
|
61
|
+
}): void;
|
|
62
|
+
removeNodes(editor: import("..").Editor, options?: {
|
|
63
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
64
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
65
|
+
mode?: "highest" | "lowest" | undefined;
|
|
66
|
+
hanging?: boolean | undefined;
|
|
67
|
+
voids?: boolean | undefined;
|
|
68
|
+
}): void;
|
|
69
|
+
setNodes(editor: import("..").Editor, props: Partial<import("..").Editor> | Partial<import("..").Element> | Partial<import("..").Text>, options?: {
|
|
70
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
71
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
72
|
+
mode?: "highest" | "lowest" | "all" | undefined;
|
|
73
|
+
hanging?: boolean | undefined;
|
|
74
|
+
split?: boolean | undefined;
|
|
75
|
+
voids?: boolean | undefined;
|
|
76
|
+
}): void;
|
|
77
|
+
splitNodes(editor: import("..").Editor, options?: {
|
|
78
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
79
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
80
|
+
mode?: "highest" | "lowest" | undefined;
|
|
81
|
+
always?: boolean | undefined;
|
|
82
|
+
height?: number | undefined;
|
|
83
|
+
voids?: boolean | undefined;
|
|
84
|
+
}): void;
|
|
85
|
+
unsetNodes(editor: import("..").Editor, props: string | string[], options?: {
|
|
86
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
87
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
88
|
+
mode?: "highest" | "lowest" | "all" | undefined;
|
|
89
|
+
split?: boolean | undefined;
|
|
90
|
+
voids?: boolean | undefined;
|
|
91
|
+
}): void;
|
|
92
|
+
unwrapNodes(editor: import("..").Editor, options: {
|
|
93
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
94
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
95
|
+
mode?: "highest" | "lowest" | "all" | undefined;
|
|
96
|
+
split?: boolean | undefined;
|
|
97
|
+
voids?: boolean | undefined;
|
|
98
|
+
}): void;
|
|
99
|
+
wrapNodes(editor: import("..").Editor, element: import("..").Element, options?: {
|
|
100
|
+
at?: import("..").Path | import("..").Point | import("..").Range | undefined;
|
|
101
|
+
match?: ((node: import("..").Node) => boolean) | undefined;
|
|
102
|
+
mode?: "highest" | "lowest" | "all" | undefined;
|
|
103
|
+
split?: boolean | undefined;
|
|
104
|
+
voids?: boolean | undefined;
|
|
105
|
+
}): void;
|
|
106
|
+
transform(editor: import("..").Editor, op: import("..").Operation): void;
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/slate/src/transforms/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../packages/slate/src/transforms/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,OAAO,EAEP,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,EACL,IAAI,EAEL,MAAM,IAAI,CAAA;AAEX,eAAO,MAAM,cAAc;IACzB;;OAEG;;;;;;;;;IAmHH;;;OAGG;;;;;;;IA4DH;;;OAGG;;;;;;;;IAyIH;;OAEG;;;;;;;;IAgDH;;OAEG;;;;;;;;IA4CH;;OAEG;;;;;;;;;IAiGH;;OAEG;;;;;;;;;IA8HH;;OAEG;;;;;;;;IA0BH;;;OAGG;;;;;;;;IAwDH;;;OAGG;;;;;;;;CA+FJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../packages/slate/src/transforms/selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAc,MAAM,IAAI,CAAA;AAE/D,eAAO,MAAM,mBAAmB;IAC9B;;OAEG;;;;IA0BH;;OAEG;;IAcH;;OAEG;;;;;;;IAsDH;;OAEG;;IA0BH;;OAEG;;;;IAgCH;;OAEG;;CAkCJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../packages/slate/src/transforms/text.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EAGN,IAAI,EAEJ,IAAI,EAEJ,KAAK,EACL,KAAK,EAEN,MAAM,IAAI,CAAA;AAEX,eAAO,MAAM,cAAc;IACzB;;OAEG;;;;;;;;;IA0KH;;OAEG;;;;;;IAqNH;;OAEG;;;;;CA+CJ,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for string distance checking.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Get the distance to the end of the first character in a string of text.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getCharacterDistance: (text: string) => number;
|
|
8
|
+
/**
|
|
9
|
+
* Get the distance to the end of the first word in a string of text.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getWordDistance: (text: string) => number;
|
|
12
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../packages/slate/src/utils/string.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH;;GAEG;AAEH,eAAO,MAAM,oBAAoB,0BAuEhC,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,eAAe,0BAwB3B,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Editor, Path, PathRef, PointRef, RangeRef } from '..';
|
|
2
|
+
export declare const DIRTY_PATHS: WeakMap<Editor, Path[]>;
|
|
3
|
+
export declare const FLUSHING: WeakMap<Editor, boolean>;
|
|
4
|
+
export declare const NORMALIZING: WeakMap<Editor, boolean>;
|
|
5
|
+
export declare const PATH_REFS: WeakMap<Editor, Set<PathRef>>;
|
|
6
|
+
export declare const POINT_REFS: WeakMap<Editor, Set<PointRef>>;
|
|
7
|
+
export declare const RANGE_REFS: WeakMap<Editor, Set<RangeRef>>;
|
|
8
|
+
//# sourceMappingURL=weak-maps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weak-maps.d.ts","sourceRoot":"","sources":["../packages/slate/src/utils/weak-maps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAA;AAE9D,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAiB,CAAA;AACjE,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAiB,CAAA;AAC/D,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAiB,CAAA;AAClE,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAiB,CAAA;AACrE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAiB,CAAA;AACvE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slate",
|
|
3
3
|
"description": "A completely customizable framework for building rich text editors.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.57.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "git://github.com/ianstormtaylor/slate.git",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"wysiwyg",
|
|
42
42
|
"wysiwym"
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "036ee664aff6b4eb1f43b0790c96a3984beb954a"
|
|
45
45
|
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Node } from '..';
|
|
2
|
-
/**
|
|
3
|
-
* `Command` objects represent an action that a user is taking on the editor.
|
|
4
|
-
* They capture the semantic "intent" of a user while they edit a document.
|
|
5
|
-
*/
|
|
6
|
-
export interface Command {
|
|
7
|
-
type: string;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
10
|
-
export declare const Command: {
|
|
11
|
-
/**
|
|
12
|
-
* Check if a value is a `Command` object.
|
|
13
|
-
*/
|
|
14
|
-
isCommand(value: any): value is Command;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* The `AddMarkCommand` adds properties to the text nodes in the selection.
|
|
18
|
-
*/
|
|
19
|
-
export interface AddMarkCommand {
|
|
20
|
-
type: 'add_mark';
|
|
21
|
-
key: string;
|
|
22
|
-
value: any;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The `DeleteBackwardCommand` delete's content backward, meaning before the
|
|
26
|
-
* current selection, by a specific `unit` of distance.
|
|
27
|
-
*/
|
|
28
|
-
export interface DeleteBackwardCommand {
|
|
29
|
-
type: 'delete_backward';
|
|
30
|
-
unit: 'character' | 'word' | 'line' | 'block';
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* The `DeleteForwardCommand` delete's content forward, meaning after the
|
|
34
|
-
* current selection, by a specific `unit` of distance.
|
|
35
|
-
*/
|
|
36
|
-
export interface DeleteForwardCommand {
|
|
37
|
-
type: 'delete_forward';
|
|
38
|
-
unit: 'character' | 'word' | 'line' | 'block';
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The `DeleteFragmentCommand` delete's the content of the current selection.
|
|
42
|
-
*/
|
|
43
|
-
export interface DeleteFragmentCommand {
|
|
44
|
-
type: 'delete_fragment';
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The `InsertBreakCommand` breaks a block in two at the current selection.
|
|
48
|
-
*/
|
|
49
|
-
export interface InsertBreakCommand {
|
|
50
|
-
type: 'insert_break';
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The `InsertFragmentCommand` inserts a list of nodes at the current selection.
|
|
54
|
-
*/
|
|
55
|
-
export interface InsertFragmentCommand {
|
|
56
|
-
type: 'insert_fragment';
|
|
57
|
-
fragment: Node[];
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The `InsertNodeCommand` inserts a node at the current selection.
|
|
61
|
-
*/
|
|
62
|
-
export interface InsertNodeCommand {
|
|
63
|
-
type: 'insert_node';
|
|
64
|
-
node: Node;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* The `InsertTextCommand` inserts a string of text at the current selection.
|
|
68
|
-
*/
|
|
69
|
-
export interface InsertTextCommand {
|
|
70
|
-
type: 'insert_text';
|
|
71
|
-
text: string;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* The `RemoveMarkCommand` removes properties from text nodes in the selection.
|
|
75
|
-
*/
|
|
76
|
-
export interface RemoveMarkCommand {
|
|
77
|
-
type: 'remove_mark';
|
|
78
|
-
key: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* The `CoreCommand` union is a set of all of the commands that are recognized
|
|
82
|
-
* by Slate's "core" out of the box.
|
|
83
|
-
*/
|
|
84
|
-
export declare type CoreCommand = AddMarkCommand | DeleteBackwardCommand | DeleteForwardCommand | DeleteFragmentCommand | InsertBreakCommand | InsertFragmentCommand | InsertNodeCommand | InsertTextCommand | RemoveMarkCommand;
|
|
85
|
-
export declare const CoreCommand: {
|
|
86
|
-
/**
|
|
87
|
-
* Check if a value is a `CoreCommand` object.
|
|
88
|
-
*/
|
|
89
|
-
isCoreCommand(value: any): value is CoreCommand;
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../packages/slate/src/interfaces/command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAA;AAEzB;;;GAGG;AAEH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,eAAO,MAAM,OAAO;IAClB;;OAEG;;CAKJ,CAAA;AAED;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,GAAG,CAAA;CACX;AAED;;;GAGG;AAEH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAA;IACvB,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAC9C;AAED;;;GAGG;AAEH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAA;IACtB,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAC9C;AAED;;GAEG;AAEH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAA;CACxB;AAED;;GAEG;AAEH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAA;CACrB;AAED;;GAEG;AAEH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAA;IACvB,QAAQ,EAAE,IAAI,EAAE,CAAA;CACjB;AAED;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,IAAI,CAAA;CACX;AAED;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;GAGG;AAEH,oBAAY,WAAW,GACnB,cAAc,GACd,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,CAAA;AAErB,eAAO,MAAM,WAAW;IACtB;;OAEG;;CA4BJ,CAAA"}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { Command, Element, Operation, Range, Node, NodeEntry } from '../..';
|
|
2
|
-
/**
|
|
3
|
-
* The `Editor` interface stores all the state of a Slate editor. It is extended
|
|
4
|
-
* by plugins that wish to add their own helpers and implement new behaviors.
|
|
5
|
-
*/
|
|
6
|
-
export interface Editor {
|
|
7
|
-
children: Node[];
|
|
8
|
-
selection: Range | null;
|
|
9
|
-
operations: Operation[];
|
|
10
|
-
marks: Record<string, any> | null;
|
|
11
|
-
apply: (operation: Operation) => void;
|
|
12
|
-
exec: (command: Command) => void;
|
|
13
|
-
isInline: (element: Element) => boolean;
|
|
14
|
-
isVoid: (element: Element) => boolean;
|
|
15
|
-
normalizeNode: (entry: NodeEntry) => void;
|
|
16
|
-
onChange: () => void;
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
export declare const Editor: {
|
|
20
|
-
delete(editor: Editor, options?: {
|
|
21
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
22
|
-
distance?: number | undefined;
|
|
23
|
-
unit?: "character" | "word" | "line" | "block" | undefined;
|
|
24
|
-
reverse?: boolean | undefined;
|
|
25
|
-
hanging?: boolean | undefined;
|
|
26
|
-
voids?: boolean | undefined;
|
|
27
|
-
}): void;
|
|
28
|
-
insertFragment(editor: Editor, fragment: Node[], options?: {
|
|
29
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
30
|
-
hanging?: boolean | undefined;
|
|
31
|
-
voids?: boolean | undefined;
|
|
32
|
-
}): void;
|
|
33
|
-
insertText(editor: Editor, text: string, options?: {
|
|
34
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
35
|
-
voids?: boolean | undefined;
|
|
36
|
-
}): void;
|
|
37
|
-
collapse(editor: Editor, options?: {
|
|
38
|
-
edge?: "start" | "end" | "anchor" | "focus" | undefined;
|
|
39
|
-
}): void;
|
|
40
|
-
deselect(editor: Editor): void;
|
|
41
|
-
move(editor: Editor, options?: {
|
|
42
|
-
distance?: number | undefined;
|
|
43
|
-
unit?: "offset" | "character" | "word" | "line" | undefined;
|
|
44
|
-
reverse?: boolean | undefined;
|
|
45
|
-
edge?: "start" | "end" | "anchor" | "focus" | undefined;
|
|
46
|
-
}): void;
|
|
47
|
-
select(editor: Editor, target: import("../location").Location): void;
|
|
48
|
-
setPoint(editor: Editor, props: Partial<import("../point").Point>, options: {
|
|
49
|
-
edge?: "start" | "end" | "anchor" | "focus" | undefined;
|
|
50
|
-
}): void;
|
|
51
|
-
setSelection(editor: Editor, props: Partial<Range>): void;
|
|
52
|
-
unhangRange(editor: Editor, range: Range, options?: {
|
|
53
|
-
voids?: boolean | undefined;
|
|
54
|
-
}): Range;
|
|
55
|
-
insertNodes(editor: Editor, nodes: Editor | Element | import("../text").Text | Node[], options?: {
|
|
56
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
57
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
58
|
-
mode?: "highest" | "lowest" | undefined;
|
|
59
|
-
hanging?: boolean | undefined;
|
|
60
|
-
select?: boolean | undefined;
|
|
61
|
-
voids?: boolean | undefined;
|
|
62
|
-
}): void;
|
|
63
|
-
liftNodes(editor: Editor, options?: {
|
|
64
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
65
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
66
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
67
|
-
voids?: boolean | undefined;
|
|
68
|
-
}): void;
|
|
69
|
-
mergeNodes(editor: Editor, options?: {
|
|
70
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
71
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
72
|
-
mode?: "highest" | "lowest" | undefined;
|
|
73
|
-
hanging?: boolean | undefined;
|
|
74
|
-
voids?: boolean | undefined;
|
|
75
|
-
}): void;
|
|
76
|
-
moveNodes(editor: Editor, options: {
|
|
77
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
78
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
79
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
80
|
-
to: import("../path").Path;
|
|
81
|
-
voids?: boolean | undefined;
|
|
82
|
-
}): void;
|
|
83
|
-
removeNodes(editor: Editor, options?: {
|
|
84
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
85
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
86
|
-
mode?: "highest" | "lowest" | undefined;
|
|
87
|
-
hanging?: boolean | undefined;
|
|
88
|
-
voids?: boolean | undefined;
|
|
89
|
-
}): void;
|
|
90
|
-
setNodes(editor: Editor, props: Partial<Editor> | Partial<Element> | Partial<import("../text").Text>, options?: {
|
|
91
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
92
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
93
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
94
|
-
hanging?: boolean | undefined;
|
|
95
|
-
split?: boolean | undefined;
|
|
96
|
-
voids?: boolean | undefined;
|
|
97
|
-
}): void;
|
|
98
|
-
splitNodes(editor: Editor, options?: {
|
|
99
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
100
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
101
|
-
mode?: "highest" | "lowest" | undefined;
|
|
102
|
-
always?: boolean | undefined;
|
|
103
|
-
height?: number | undefined;
|
|
104
|
-
voids?: boolean | undefined;
|
|
105
|
-
}): void;
|
|
106
|
-
unsetNodes(editor: Editor, props: string | string[], options?: {
|
|
107
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
108
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
109
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
110
|
-
split?: boolean | undefined;
|
|
111
|
-
voids?: boolean | undefined;
|
|
112
|
-
}): void;
|
|
113
|
-
unwrapNodes(editor: Editor, options: {
|
|
114
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
115
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
116
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
117
|
-
split?: boolean | undefined;
|
|
118
|
-
voids?: boolean | undefined;
|
|
119
|
-
}): void;
|
|
120
|
-
wrapNodes(editor: Editor, element: Element, options?: {
|
|
121
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
122
|
-
match?: ((node: Node) => boolean) | undefined;
|
|
123
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
124
|
-
split?: boolean | undefined;
|
|
125
|
-
voids?: boolean | undefined;
|
|
126
|
-
}): void;
|
|
127
|
-
above<T extends import("../node").Ancestor>(editor: Editor, options?: {
|
|
128
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
129
|
-
match?: ((node: Node) => boolean) | ((node: Node) => node is T) | undefined;
|
|
130
|
-
mode?: "highest" | "lowest" | undefined;
|
|
131
|
-
voids?: boolean | undefined;
|
|
132
|
-
}): NodeEntry<T> | undefined;
|
|
133
|
-
after(editor: Editor, at: import("../location").Location, options?: {
|
|
134
|
-
distance?: number | undefined;
|
|
135
|
-
unit?: "offset" | "character" | "word" | "line" | "block" | undefined;
|
|
136
|
-
}): import("../point").Point | undefined;
|
|
137
|
-
before(editor: Editor, at: import("../location").Location, options?: {
|
|
138
|
-
distance?: number | undefined;
|
|
139
|
-
unit?: "offset" | "character" | "word" | "line" | "block" | undefined;
|
|
140
|
-
}): import("../point").Point | undefined;
|
|
141
|
-
edges(editor: Editor, at: import("../location").Location): [import("../point").Point, import("../point").Point];
|
|
142
|
-
end(editor: Editor, at: import("../location").Location): import("../point").Point;
|
|
143
|
-
first(editor: Editor, at: import("../location").Location): NodeEntry<Node>;
|
|
144
|
-
fragment(editor: Editor, at: import("../location").Location): import("../node").Descendant[];
|
|
145
|
-
isEnd(editor: Editor, point: import("../point").Point, at: import("../location").Location): boolean;
|
|
146
|
-
isEdge(editor: Editor, point: import("../point").Point, at: import("../location").Location): boolean;
|
|
147
|
-
isStart(editor: Editor, point: import("../point").Point, at: import("../location").Location): boolean;
|
|
148
|
-
last(editor: Editor, at: import("../location").Location): NodeEntry<Node>;
|
|
149
|
-
leaf(editor: Editor, at: import("../location").Location, options?: {
|
|
150
|
-
depth?: number | undefined;
|
|
151
|
-
edge?: "start" | "end" | undefined;
|
|
152
|
-
}): NodeEntry<import("../text").Text>;
|
|
153
|
-
levels<T_1 extends Node>(editor: Editor, options?: {
|
|
154
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
155
|
-
match?: ((node: Node) => boolean) | ((node: Node) => node is T_1) | undefined;
|
|
156
|
-
reverse?: boolean | undefined;
|
|
157
|
-
voids?: boolean | undefined;
|
|
158
|
-
}): Iterable<NodeEntry<T_1>>;
|
|
159
|
-
next<T_2 extends Node>(editor: Editor, options?: {
|
|
160
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
161
|
-
match?: ((node: Node) => boolean) | ((node: Node) => node is T_2) | undefined;
|
|
162
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
163
|
-
voids?: boolean | undefined;
|
|
164
|
-
}): NodeEntry<T_2> | undefined;
|
|
165
|
-
node(editor: Editor, at: import("../location").Location, options?: {
|
|
166
|
-
depth?: number | undefined;
|
|
167
|
-
edge?: "start" | "end" | undefined;
|
|
168
|
-
}): NodeEntry<Node>;
|
|
169
|
-
nodes<T_3 extends Node>(editor: Editor, options?: {
|
|
170
|
-
at?: Range | import("../path").Path | import("../point").Point | import("../location").Span | undefined;
|
|
171
|
-
match?: ((node: Node) => boolean) | ((node: Node) => node is T_3) | undefined;
|
|
172
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
173
|
-
universal?: boolean | undefined;
|
|
174
|
-
reverse?: boolean | undefined;
|
|
175
|
-
voids?: boolean | undefined;
|
|
176
|
-
}): Iterable<NodeEntry<T_3>>;
|
|
177
|
-
parent(editor: Editor, at: import("../location").Location, options?: {
|
|
178
|
-
depth?: number | undefined;
|
|
179
|
-
edge?: "start" | "end" | undefined;
|
|
180
|
-
}): NodeEntry<import("../node").Ancestor>;
|
|
181
|
-
path(editor: Editor, at: import("../location").Location, options?: {
|
|
182
|
-
depth?: number | undefined;
|
|
183
|
-
edge?: "start" | "end" | undefined;
|
|
184
|
-
}): import("../path").Path;
|
|
185
|
-
point(editor: Editor, at: import("../location").Location, options?: {
|
|
186
|
-
edge?: "start" | "end" | undefined;
|
|
187
|
-
}): import("../point").Point;
|
|
188
|
-
positions(editor: Editor, options?: {
|
|
189
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
190
|
-
unit?: "offset" | "character" | "word" | "line" | "block" | undefined;
|
|
191
|
-
reverse?: boolean | undefined;
|
|
192
|
-
}): Iterable<import("../point").Point>;
|
|
193
|
-
previous<T_4 extends Node>(editor: Editor, options?: {
|
|
194
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
195
|
-
match?: ((node: Node) => boolean) | ((node: Node) => node is T_4) | undefined;
|
|
196
|
-
mode?: "highest" | "lowest" | "all" | undefined;
|
|
197
|
-
voids?: boolean | undefined;
|
|
198
|
-
}): NodeEntry<T_4> | undefined;
|
|
199
|
-
range(editor: Editor, at: import("../location").Location, to?: Range | import("../path").Path | import("../point").Point | undefined): Range;
|
|
200
|
-
start(editor: Editor, at: import("../location").Location): import("../point").Point;
|
|
201
|
-
string(editor: Editor, at: import("../location").Location): string;
|
|
202
|
-
void(editor: Editor, options?: {
|
|
203
|
-
at?: Range | import("../path").Path | import("../point").Point | undefined;
|
|
204
|
-
mode?: "highest" | "lowest" | undefined;
|
|
205
|
-
voids?: boolean | undefined;
|
|
206
|
-
}): NodeEntry<Element> | undefined;
|
|
207
|
-
normalize(editor: Editor, options?: {
|
|
208
|
-
force?: boolean | undefined;
|
|
209
|
-
}): void;
|
|
210
|
-
transform(editor: Editor, op: Operation): void;
|
|
211
|
-
isBlock(editor: Editor, value: any): value is Element;
|
|
212
|
-
isEditor(value: any): value is Editor;
|
|
213
|
-
isInline(editor: Editor, value: any): value is Element;
|
|
214
|
-
isNormalizing(editor: Editor): boolean;
|
|
215
|
-
isVoid(editor: Editor, value: any): value is Element;
|
|
216
|
-
marks(editor: Editor): Record<string, any> | null;
|
|
217
|
-
pathRef(editor: Editor, path: import("../path").Path, options?: {
|
|
218
|
-
affinity?: "backward" | "forward" | null | undefined;
|
|
219
|
-
}): import("../path-ref").PathRef;
|
|
220
|
-
pathRefs(editor: Editor): Set<import("../path-ref").PathRef>;
|
|
221
|
-
pointRef(editor: Editor, point: import("../point").Point, options?: {
|
|
222
|
-
affinity?: "backward" | "forward" | null | undefined;
|
|
223
|
-
}): import("../point-ref").PointRef;
|
|
224
|
-
pointRefs(editor: Editor): Set<import("../point-ref").PointRef>;
|
|
225
|
-
rangeRef(editor: Editor, range: Range, options?: {
|
|
226
|
-
affinity?: "backward" | "forward" | "outward" | "inward" | null | undefined;
|
|
227
|
-
}): import("../range-ref").RangeRef;
|
|
228
|
-
rangeRefs(editor: Editor): Set<import("../range-ref").RangeRef>;
|
|
229
|
-
withoutNormalizing(editor: Editor, fn: () => void): void;
|
|
230
|
-
hasBlocks(editor: Editor, element: Element): boolean;
|
|
231
|
-
hasInlines(editor: Editor, element: Element): boolean;
|
|
232
|
-
hasTexts(editor: Editor, element: Element): boolean;
|
|
233
|
-
isEmpty(editor: Editor, element: Element): boolean;
|
|
234
|
-
};
|
|
235
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/slate/src/interfaces/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAW3E;;;GAGG;AAEH,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,IAAI,EAAE,CAAA;IAChB,SAAS,EAAE,KAAK,GAAG,IAAI,CAAA;IACvB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;IACrC,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAA;IACvC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAA;IACrC,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASlB,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Editor, Element } from '../../..';
|
|
2
|
-
export declare const ElementQueries: {
|
|
3
|
-
/**
|
|
4
|
-
* Check if a node has block children.
|
|
5
|
-
*/
|
|
6
|
-
hasBlocks(editor: Editor, element: Element): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Check if a node has inline and text children.
|
|
9
|
-
*/
|
|
10
|
-
hasInlines(editor: Editor, element: Element): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Check if a node has text children.
|
|
13
|
-
*/
|
|
14
|
-
hasTexts(editor: Editor, element: Element): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Check if an element is empty, accounting for void nodes.
|
|
17
|
-
*/
|
|
18
|
-
isEmpty(editor: Editor, element: Element): boolean;
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../packages/slate/src/interfaces/editor/queries/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAA;AAEhD,eAAO,MAAM,cAAc;IACzB;;OAEG;;IAMH;;OAEG;;IAQH;;OAEG;;IAMH;;OAEG;;CAaJ,CAAA"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Editor, Path, Point, PathRef, PointRef, Element, Range, RangeRef } from '../../..';
|
|
2
|
-
export declare const NORMALIZING: WeakMap<Editor, boolean>;
|
|
3
|
-
export declare const PATH_REFS: WeakMap<Editor, Set<PathRef>>;
|
|
4
|
-
export declare const POINT_REFS: WeakMap<Editor, Set<PointRef>>;
|
|
5
|
-
export declare const RANGE_REFS: WeakMap<Editor, Set<RangeRef>>;
|
|
6
|
-
export declare const GeneralQueries: {
|
|
7
|
-
/**
|
|
8
|
-
* Check if a value is a block `Element` object.
|
|
9
|
-
*/
|
|
10
|
-
isBlock(editor: Editor, value: any): value is Element;
|
|
11
|
-
/**
|
|
12
|
-
* Check if a value is an `Editor` object.
|
|
13
|
-
*/
|
|
14
|
-
isEditor(value: any): value is Editor;
|
|
15
|
-
/**
|
|
16
|
-
* Check if a value is an inline `Element` object.
|
|
17
|
-
*/
|
|
18
|
-
isInline(editor: Editor, value: any): value is Element;
|
|
19
|
-
/**
|
|
20
|
-
* Check if the editor is currently normalizing after each operation.
|
|
21
|
-
*/
|
|
22
|
-
isNormalizing(editor: Editor): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Check if a value is a void `Element` object.
|
|
25
|
-
*/
|
|
26
|
-
isVoid(editor: Editor, value: any): value is Element;
|
|
27
|
-
/**
|
|
28
|
-
* Get the marks that would be added to text at the current selection.
|
|
29
|
-
*/
|
|
30
|
-
marks(editor: Editor): Record<string, any> | null;
|
|
31
|
-
/**
|
|
32
|
-
* Create a mutable ref for a `Path` object, which will stay in sync as new
|
|
33
|
-
* operations are applied to the editor.
|
|
34
|
-
*/
|
|
35
|
-
pathRef(editor: Editor, path: Path, options?: {
|
|
36
|
-
affinity?: "backward" | "forward" | null | undefined;
|
|
37
|
-
}): PathRef;
|
|
38
|
-
/**
|
|
39
|
-
* Get the set of currently tracked path refs of the editor.
|
|
40
|
-
*/
|
|
41
|
-
pathRefs(editor: Editor): Set<PathRef>;
|
|
42
|
-
/**
|
|
43
|
-
* Create a mutable ref for a `Point` object, which will stay in sync as new
|
|
44
|
-
* operations are applied to the editor.
|
|
45
|
-
*/
|
|
46
|
-
pointRef(editor: Editor, point: Point, options?: {
|
|
47
|
-
affinity?: "backward" | "forward" | null | undefined;
|
|
48
|
-
}): PointRef;
|
|
49
|
-
/**
|
|
50
|
-
* Get the set of currently tracked point refs of the editor.
|
|
51
|
-
*/
|
|
52
|
-
pointRefs(editor: Editor): Set<PointRef>;
|
|
53
|
-
/**
|
|
54
|
-
* Create a mutable ref for a `Range` object, which will stay in sync as new
|
|
55
|
-
* operations are applied to the editor.
|
|
56
|
-
*/
|
|
57
|
-
rangeRef(editor: Editor, range: Range, options?: {
|
|
58
|
-
affinity?: "backward" | "forward" | "outward" | "inward" | null | undefined;
|
|
59
|
-
}): RangeRef;
|
|
60
|
-
/**
|
|
61
|
-
* Get the set of currently tracked range refs of the editor.
|
|
62
|
-
*/
|
|
63
|
-
rangeRefs(editor: Editor): Set<RangeRef>;
|
|
64
|
-
/**
|
|
65
|
-
* Call a function, deferring normalization until after it completes.
|
|
66
|
-
*/
|
|
67
|
-
withoutNormalizing(editor: Editor, fn: () => void): void;
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=general.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../packages/slate/src/interfaces/editor/queries/general.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EAEN,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,QAAQ,EACR,OAAO,EAEP,KAAK,EACL,QAAQ,EAET,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAiB,CAAA;AAClE,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAiB,CAAA;AACrE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAiB,CAAA;AACvE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAiB,CAAA;AAEvE,eAAO,MAAM,cAAc;IACzB;;OAEG;;IAMH;;OAEG;;IAkBH;;OAEG;;IAMH;;OAEG;;IAOH;;OAEG;;IAMH;;OAEG;;IAiDH;;;OAGG;;;;IA2BH;;OAEG;;IAaH;;;OAGG;;;;IA2BH;;OAEG;;IAaH;;;OAGG;;;;IA2BH;;OAEG;;IAaH;;OAEG;;CASJ,CAAA"}
|