@tiptap/extensions 3.30.2 → 3.30.4
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/character-count/index.cjs +84 -128
- package/dist/character-count/index.cjs.map +1 -1
- package/dist/character-count/index.d.cts +59 -58
- package/dist/character-count/index.d.cts.map +1 -0
- package/dist/character-count/index.d.ts +59 -58
- package/dist/character-count/index.d.ts.map +1 -0
- package/dist/character-count/index.js +82 -100
- package/dist/character-count/index.js.map +1 -1
- package/dist/drop-cursor/index.cjs +24 -44
- package/dist/drop-cursor/index.cjs.map +1 -1
- package/dist/drop-cursor/index.d.cts +23 -22
- package/dist/drop-cursor/index.d.cts.map +1 -0
- package/dist/drop-cursor/index.d.ts +23 -22
- package/dist/drop-cursor/index.d.ts.map +1 -0
- package/dist/drop-cursor/index.js +22 -16
- package/dist/drop-cursor/index.js.map +1 -1
- package/dist/focus/index.cjs +45 -92
- package/dist/focus/index.cjs.map +1 -1
- package/dist/focus/index.d.cts +22 -21
- package/dist/focus/index.d.cts.map +1 -0
- package/dist/focus/index.d.ts +22 -21
- package/dist/focus/index.d.ts.map +1 -0
- package/dist/focus/index.js +42 -63
- package/dist/focus/index.js.map +1 -1
- package/dist/gap-cursor/index.cjs +26 -48
- package/dist/gap-cursor/index.cjs.map +1 -1
- package/dist/gap-cursor/index.d.cts +16 -15
- package/dist/gap-cursor/index.d.cts.map +1 -0
- package/dist/gap-cursor/index.d.ts +16 -15
- package/dist/gap-cursor/index.d.ts.map +1 -0
- package/dist/gap-cursor/index.js +25 -21
- package/dist/gap-cursor/index.js.map +1 -1
- package/dist/index.cjs +667 -742
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +231 -220
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +231 -220
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +654 -703
- package/dist/index.js.map +1 -1
- package/dist/placeholder/index.cjs +344 -376
- package/dist/placeholder/index.cjs.map +1 -1
- package/dist/placeholder/index.d.cts +73 -69
- package/dist/placeholder/index.d.cts.map +1 -0
- package/dist/placeholder/index.d.ts +73 -69
- package/dist/placeholder/index.d.ts.map +1 -0
- package/dist/placeholder/index.js +340 -346
- package/dist/placeholder/index.js.map +1 -1
- package/dist/selection/index.cjs +62 -86
- package/dist/selection/index.cjs.map +1 -1
- package/dist/selection/index.d.cts +11 -10
- package/dist/selection/index.d.cts.map +1 -0
- package/dist/selection/index.d.ts +11 -10
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/selection/index.js +58 -56
- package/dist/selection/index.js.map +1 -1
- package/dist/trailing-node/index.cjs +59 -89
- package/dist/trailing-node/index.cjs.map +1 -1
- package/dist/trailing-node/index.d.cts +17 -16
- package/dist/trailing-node/index.d.cts.map +1 -0
- package/dist/trailing-node/index.d.ts +17 -16
- package/dist/trailing-node/index.d.ts.map +1 -0
- package/dist/trailing-node/index.js +55 -59
- package/dist/trailing-node/index.js.map +1 -1
- package/dist/undo-redo/index.cjs +45 -63
- package/dist/undo-redo/index.cjs.map +1 -1
- package/dist/undo-redo/index.d.cts +31 -30
- package/dist/undo-redo/index.d.cts.map +1 -0
- package/dist/undo-redo/index.d.ts +31 -30
- package/dist/undo-redo/index.d.ts.map +1 -0
- package/dist/undo-redo/index.js +43 -35
- package/dist/undo-redo/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,92 +1,93 @@
|
|
|
1
|
-
import { Extension, ParentConfig
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { Editor, Extension, ParentConfig } from "@tiptap/core";
|
|
2
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
3
|
+
import { DecorationSet } from "@tiptap/pm/view";
|
|
4
|
+
import { Node } from "@tiptap/pm/model";
|
|
5
|
+
//#region src/character-count/character-count.d.ts
|
|
6
6
|
interface CharacterCountOptions {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The maximum number of characters that should be allowed. Defaults to `0`.
|
|
9
|
+
* @default null
|
|
10
|
+
* @example 180
|
|
11
|
+
*/
|
|
12
|
+
limit: number | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.
|
|
15
|
+
* If set to `nodeSize`, the nodeSize of the document is used.
|
|
16
|
+
* @default 'textSize'
|
|
17
|
+
* @example 'textSize'
|
|
18
|
+
*/
|
|
19
|
+
mode: 'textSize' | 'nodeSize';
|
|
20
|
+
/**
|
|
21
|
+
* Sets whether the content will be automatically trimmed when programatically setting content over the limit.
|
|
22
|
+
* If set to false, the user will be able to trim the text manually.
|
|
23
|
+
* @default true
|
|
24
|
+
* @example false
|
|
25
|
+
*/
|
|
26
|
+
autoTrim?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The text counter function to use. Defaults to a simple character count.
|
|
29
|
+
* @default (text) => text.length
|
|
30
|
+
* @example (text) => [...new Intl.Segmenter().segment(text)].length
|
|
31
|
+
*/
|
|
32
|
+
textCounter: (text: string) => number;
|
|
33
|
+
/**
|
|
34
|
+
* The word counter function to use. Defaults to a simple word count.
|
|
35
|
+
* @default (text) => text.split(' ').filter(word => word !== '').length
|
|
36
|
+
* @example (text) => text.split(/\s+/).filter(word => word !== '').length
|
|
37
|
+
*/
|
|
38
|
+
wordCounter: (text: string) => number;
|
|
39
39
|
}
|
|
40
40
|
interface CharacterCountStorage {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Get the number of characters for the current document.
|
|
43
|
+
* @param options The options for the character count. (optional)
|
|
44
|
+
* @param options.node The node to get the characters from. Defaults to the current document.
|
|
45
|
+
* @param options.mode The mode by which the size is calculated. If set to `textSize`, the textContent of the document is used.
|
|
46
|
+
*/
|
|
47
|
+
characters: (options?: {
|
|
48
|
+
node?: Node;
|
|
49
|
+
mode?: 'textSize' | 'nodeSize';
|
|
50
|
+
}) => number;
|
|
51
|
+
/**
|
|
52
|
+
* Get the number of words for the current document.
|
|
53
|
+
* @param options The options for the character count. (optional)
|
|
54
|
+
* @param options.node The node to get the words from. Defaults to the current document.
|
|
55
|
+
*/
|
|
56
|
+
words: (options?: {
|
|
57
|
+
node?: Node;
|
|
58
|
+
}) => number;
|
|
59
59
|
}
|
|
60
60
|
declare module '@tiptap/core' {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
interface Storage {
|
|
62
|
+
characterCount: CharacterCountStorage;
|
|
63
|
+
}
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* This extension allows you to count the characters and words of your document.
|
|
67
67
|
* @see https://tiptap.dev/api/extensions/character-count
|
|
68
68
|
*/
|
|
69
69
|
declare const CharacterCount: Extension<CharacterCountOptions, CharacterCountStorage>;
|
|
70
|
-
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/drop-cursor/drop-cursor.d.ts
|
|
71
72
|
interface DropcursorOptions {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The color of the drop cursor. Use `false` to apply no color and rely only on class.
|
|
75
|
+
* @default 'currentColor'
|
|
76
|
+
* @example 'red'
|
|
77
|
+
*/
|
|
78
|
+
color?: string | false;
|
|
79
|
+
/**
|
|
80
|
+
* The width of the drop cursor
|
|
81
|
+
* @default 1
|
|
82
|
+
* @example 2
|
|
83
|
+
*/
|
|
84
|
+
width: number | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* The class of the drop cursor
|
|
87
|
+
* @default undefined
|
|
88
|
+
* @example 'drop-cursor'
|
|
89
|
+
*/
|
|
90
|
+
class: string | undefined;
|
|
90
91
|
}
|
|
91
92
|
/**
|
|
92
93
|
* This extension allows you to add a drop cursor to your editor.
|
|
@@ -95,45 +96,47 @@ interface DropcursorOptions {
|
|
|
95
96
|
* @see https://tiptap.dev/api/extensions/dropcursor
|
|
96
97
|
*/
|
|
97
98
|
declare const Dropcursor: Extension<DropcursorOptions, any>;
|
|
98
|
-
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/focus/focus.d.ts
|
|
99
101
|
interface FocusOptions {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
102
|
+
/**
|
|
103
|
+
* The class name that should be added to the focused node.
|
|
104
|
+
* @default 'has-focus'
|
|
105
|
+
* @example 'is-focused'
|
|
106
|
+
*/
|
|
107
|
+
className: string;
|
|
108
|
+
/**
|
|
109
|
+
* The mode by which the focused node is determined.
|
|
110
|
+
* - All: All nodes are marked as focused.
|
|
111
|
+
* - Deepest: Only the deepest node is marked as focused.
|
|
112
|
+
* - Shallowest: Only the shallowest node is marked as focused.
|
|
113
|
+
*
|
|
114
|
+
* @default 'all'
|
|
115
|
+
* @example 'deepest'
|
|
116
|
+
* @example 'shallowest'
|
|
117
|
+
*/
|
|
118
|
+
mode: 'all' | 'deepest' | 'shallowest';
|
|
117
119
|
}
|
|
118
120
|
/**
|
|
119
121
|
* This extension allows you to add a class to the focused node.
|
|
120
122
|
* @see https://www.tiptap.dev/api/extensions/focus
|
|
121
123
|
*/
|
|
122
124
|
declare const Focus: Extension<FocusOptions, any>;
|
|
123
|
-
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/gap-cursor/gap-cursor.d.ts
|
|
124
127
|
declare module '@tiptap/core' {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
interface NodeConfig<Options, Storage> {
|
|
129
|
+
/**
|
|
130
|
+
* A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.
|
|
131
|
+
* @default null
|
|
132
|
+
*/
|
|
133
|
+
allowGapCursor?: boolean | null | ((this: {
|
|
134
|
+
name: string;
|
|
135
|
+
options: Options;
|
|
136
|
+
storage: Storage;
|
|
137
|
+
parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'];
|
|
138
|
+
}) => boolean | null);
|
|
139
|
+
}
|
|
137
140
|
}
|
|
138
141
|
/**
|
|
139
142
|
* This extension allows you to add a gap cursor to your editor.
|
|
@@ -142,95 +145,100 @@ declare module '@tiptap/core' {
|
|
|
142
145
|
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
143
146
|
*/
|
|
144
147
|
declare const Gapcursor: Extension<any, any>;
|
|
145
|
-
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/placeholder/constants.d.ts
|
|
146
150
|
/** The default data attribute label */
|
|
147
151
|
declare const DEFAULT_DATA_ATTRIBUTE = "placeholder";
|
|
148
152
|
/** The plugin key used to store and read the placeholder decoration set */
|
|
149
153
|
declare const PLUGIN_KEY: PluginKey<DecorationSet>;
|
|
150
|
-
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/placeholder/types.d.ts
|
|
151
156
|
interface PlaceholderOptions {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
157
|
+
/**
|
|
158
|
+
* **The class name for the empty editor**
|
|
159
|
+
* @default 'is-editor-empty'
|
|
160
|
+
*/
|
|
161
|
+
emptyEditorClass: string;
|
|
162
|
+
/**
|
|
163
|
+
* **The class name for empty nodes**
|
|
164
|
+
*
|
|
165
|
+
* You can use a function to return a dynamic class name or a string.
|
|
166
|
+
* @default 'is-empty'
|
|
167
|
+
*/
|
|
168
|
+
emptyNodeClass: ((EmptyNodeClassProps: {
|
|
169
|
+
editor: Editor;
|
|
170
|
+
node: Node;
|
|
171
|
+
pos: number;
|
|
172
|
+
hasAnchor: boolean;
|
|
173
|
+
}) => string) | string;
|
|
174
|
+
/**
|
|
175
|
+
* **The data-attribute used for the placeholder label**
|
|
176
|
+
* Will be prepended with `data-` and converted to kebab-case and cleaned of special characters.
|
|
177
|
+
* @default 'placeholder'
|
|
178
|
+
*/
|
|
179
|
+
dataAttribute: string;
|
|
180
|
+
/**
|
|
181
|
+
* **The placeholder content**
|
|
182
|
+
*
|
|
183
|
+
* You can use a function to return a dynamic placeholder or a string.
|
|
184
|
+
* @default 'Write something …'
|
|
185
|
+
*/
|
|
186
|
+
placeholder: ((PlaceholderProps: {
|
|
187
|
+
editor: Editor;
|
|
188
|
+
node: Node;
|
|
189
|
+
pos: number;
|
|
190
|
+
hasAnchor: boolean;
|
|
191
|
+
}) => string) | string;
|
|
192
|
+
/**
|
|
193
|
+
* **Checks if the placeholder should be only shown when the editor is editable.**
|
|
194
|
+
*
|
|
195
|
+
* If true, the placeholder will only be shown when the editor is editable.
|
|
196
|
+
* If false, the placeholder will always be shown.
|
|
197
|
+
* @default true
|
|
198
|
+
*/
|
|
199
|
+
showOnlyWhenEditable: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* **Checks if the placeholder should be only shown when the current node is empty.**
|
|
202
|
+
*
|
|
203
|
+
* If true, the placeholder will only be shown when the current node is empty.
|
|
204
|
+
* If false, the placeholder will be shown when any node is empty.
|
|
205
|
+
* @default true
|
|
206
|
+
*/
|
|
207
|
+
showOnlyCurrent: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* **Controls if the placeholder should be shown for all descendants.**
|
|
210
|
+
*
|
|
211
|
+
* If true, the placeholder will be shown for all descendants.
|
|
212
|
+
* If false, the placeholder will only be shown for the current node.
|
|
213
|
+
* @default false
|
|
214
|
+
*/
|
|
215
|
+
includeChildren: boolean;
|
|
211
216
|
}
|
|
212
|
-
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/placeholder/placeholder.d.ts
|
|
213
219
|
/**
|
|
214
220
|
* This extension allows you to add a placeholder to your editor.
|
|
215
221
|
* A placeholder is a text that appears when the editor or a node is empty.
|
|
216
222
|
* @see https://www.tiptap.dev/api/extensions/placeholder
|
|
217
223
|
*/
|
|
218
224
|
declare const Placeholder: Extension<PlaceholderOptions, any>;
|
|
219
|
-
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/placeholder/utils/preparePlaceholderAttribute.d.ts
|
|
220
227
|
/**
|
|
221
228
|
* Prepares the placeholder attribute by ensuring it is properly formatted.
|
|
222
229
|
* @param attr - The placeholder attribute string.
|
|
223
230
|
* @returns The prepared placeholder attribute string.
|
|
224
231
|
*/
|
|
225
232
|
declare function preparePlaceholderAttribute(attr: string): string;
|
|
226
|
-
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/selection/selection.d.ts
|
|
227
235
|
type SelectionOptions = {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
/**
|
|
237
|
+
* The class name that should be added to the selected text.
|
|
238
|
+
* @default 'selection'
|
|
239
|
+
* @example 'is-selected'
|
|
240
|
+
*/
|
|
241
|
+
className: string;
|
|
234
242
|
};
|
|
235
243
|
/**
|
|
236
244
|
* This extension allows you to add a class to the selected text when the editor is blurred.
|
|
@@ -239,7 +247,8 @@ type SelectionOptions = {
|
|
|
239
247
|
* @see https://www.tiptap.dev/api/extensions/selection
|
|
240
248
|
*/
|
|
241
249
|
declare const Selection: Extension<SelectionOptions, any>;
|
|
242
|
-
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/trailing-node/trailing-node.d.ts
|
|
243
252
|
declare const skipTrailingNodeMeta = "skipTrailingNode";
|
|
244
253
|
/**
|
|
245
254
|
* Extension based on:
|
|
@@ -247,54 +256,55 @@ declare const skipTrailingNodeMeta = "skipTrailingNode";
|
|
|
247
256
|
* - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
|
|
248
257
|
*/
|
|
249
258
|
interface TrailingNodeOptions {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
/**
|
|
260
|
+
* The node type that should be inserted at the end of the document.
|
|
261
|
+
* @note the node will always be added to the `notAfter` lists to
|
|
262
|
+
* prevent an infinite loop.
|
|
263
|
+
* @default undefined
|
|
264
|
+
*/
|
|
265
|
+
node?: string;
|
|
266
|
+
/**
|
|
267
|
+
* The node types after which the trailing node should not be inserted.
|
|
268
|
+
* @default ['paragraph']
|
|
269
|
+
*/
|
|
270
|
+
notAfter?: string | string[];
|
|
262
271
|
}
|
|
263
272
|
/**
|
|
264
273
|
* This extension allows you to add an extra node at the end of the document.
|
|
265
274
|
* @see https://www.tiptap.dev/api/extensions/trailing-node
|
|
266
275
|
*/
|
|
267
276
|
declare const TrailingNode: Extension<TrailingNodeOptions, any>;
|
|
268
|
-
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/undo-redo/undo-redo.d.ts
|
|
269
279
|
interface UndoRedoOptions {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
/**
|
|
281
|
+
* The amount of history events that are collected before the oldest events are discarded.
|
|
282
|
+
* @default 100
|
|
283
|
+
* @example 50
|
|
284
|
+
*/
|
|
285
|
+
depth: number;
|
|
286
|
+
/**
|
|
287
|
+
* The delay (in milliseconds) between changes after which a new group should be started.
|
|
288
|
+
* @default 500
|
|
289
|
+
* @example 1000
|
|
290
|
+
*/
|
|
291
|
+
newGroupDelay: number;
|
|
282
292
|
}
|
|
283
293
|
declare module '@tiptap/core' {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
interface Commands<ReturnType> {
|
|
295
|
+
undoRedo: {
|
|
296
|
+
/**
|
|
297
|
+
* Undo recent changes
|
|
298
|
+
* @example editor.commands.undo()
|
|
299
|
+
*/
|
|
300
|
+
undo: () => ReturnType;
|
|
301
|
+
/**
|
|
302
|
+
* Reapply reverted changes
|
|
303
|
+
* @example editor.commands.redo()
|
|
304
|
+
*/
|
|
305
|
+
redo: () => ReturnType;
|
|
306
|
+
};
|
|
307
|
+
}
|
|
298
308
|
}
|
|
299
309
|
/**
|
|
300
310
|
* This extension allows you to undo and redo recent changes.
|
|
@@ -306,5 +316,6 @@ declare module '@tiptap/core' {
|
|
|
306
316
|
* `@tiptap/extension-collaboration` uses its own history implementation.
|
|
307
317
|
*/
|
|
308
318
|
declare const UndoRedo: Extension<UndoRedoOptions, any>;
|
|
309
|
-
|
|
310
|
-
export { CharacterCount,
|
|
319
|
+
//#endregion
|
|
320
|
+
export { CharacterCount, CharacterCountOptions, CharacterCountStorage, DEFAULT_DATA_ATTRIBUTE, Dropcursor, DropcursorOptions, Focus, FocusOptions, Gapcursor, PLUGIN_KEY, Placeholder, PlaceholderOptions, Selection, SelectionOptions, TrailingNode, TrailingNodeOptions, UndoRedo, UndoRedoOptions, preparePlaceholderAttribute, skipTrailingNodeMeta };
|
|
321
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/character-count/character-count.ts","../src/drop-cursor/drop-cursor.ts","../src/focus/focus.ts","../src/gap-cursor/gap-cursor.ts","../src/placeholder/constants.ts","../src/placeholder/types.ts","../src/placeholder/placeholder.ts","../src/placeholder/utils/preparePlaceholderAttribute.ts","../src/selection/selection.ts","../src/trailing-node/trailing-node.ts","../src/undo-redo/undo-redo.ts"],"mappings":";;;;;UAIiB;;;;;;EAMf;;;;;;;EAOA;;;;;;;EAOA;;;;;;EAMA,cAAc;;;;;;EAMd,cAAc;;UAGC;;;;;;;EAOf,aAAa;IAAY,OAAO;IAAiB;;;;;;;EAOjD,QAAQ;IAAY,OAAO;;;;YAIjB;IACR,gBAAgB;;;;;;;cAQP,gBAAc,UAAA,uBAAA;;;UC/DV;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;;;cASW,YAAU,UAAA;;;UC5BN;;;;;;EAMf;;;;;;;;;;;EAYA;;;;;;cAOW,OAAK,UAAA;;;;YCxBN,WAAW,SAAS;;;;;IAK5B,oCAGM;MACA;MACA,SAAS;MACT,SAAS;MACT,QAAQ,aAAa,WAAW;;;;;;;;;;cAW7B,WAAS;;;;cCxBT;;cAGA,YAAU,UAAA;;;UCJN;;;;;EAKf;;;;;;;EAQA,kBACM;IACA,QAAQ;IACR,MAAM;IACN;IACA;;;;;;;EASN;;;;;;;EAQA,eACM;IACA,QAAQ;IACR,MAAM;IACN;IACA;;;;;;;;;EAWN;;;;;;;;EASA;;;;;;;;EASA;;;;;;;;;cC7DW,aAAW,UAAA;;;;;;;;iBCNR,4BAA4B;;;KCAhC;;;;;;EAMV;;;;;;;;cAqCW,WAAS,UAAA;;;cC5CT;;;;;;UAkBI;;;;;;;EAOf;;;;;EAKA;;;;;;cAOW,cAAY,UAAA;;;UCtCR;;;;;;EAMf;;;;;;EAOA;;;YAIU,SAAS;IACjB;;;;;MAKE,YAAY;;;;;MAKZ,YAAY;;;;;;;;;;;;;cAcL,UAAQ,UAAA"}
|