@oyat/editor 1.7.9 → 1.7.11

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.
Files changed (36) hide show
  1. package/dist/components/editor/editor-base-kit.d.ts +22 -5
  2. package/dist/components/editor/editor-base-kit.d.ts.map +1 -1
  3. package/dist/components/editor/editor-kit.d.ts +632 -1
  4. package/dist/components/editor/editor-kit.d.ts.map +1 -1
  5. package/dist/components/editor/plugins/align-base-kit.d.ts +1 -1
  6. package/dist/components/editor/plugins/align-base-kit.d.ts.map +1 -1
  7. package/dist/components/editor/plugins/align-kit.d.ts +1 -1
  8. package/dist/components/editor/plugins/align-kit.d.ts.map +1 -1
  9. package/dist/components/editor/plugins/autoformat-kit.d.ts +1 -1
  10. package/dist/components/editor/plugins/autoformat-kit.d.ts.map +1 -1
  11. package/dist/components/editor/plugins/emoji-kit.d.ts +1 -1
  12. package/dist/components/editor/plugins/line-height-base-kit.d.ts +1 -1
  13. package/dist/components/editor/plugins/line-height-base-kit.d.ts.map +1 -1
  14. package/dist/components/editor/plugins/line-height-kit.d.ts +1 -1
  15. package/dist/components/editor/plugins/line-height-kit.d.ts.map +1 -1
  16. package/dist/components/editor/plugins/media-kit.d.ts.map +1 -1
  17. package/dist/components/editor/plugins/table-base-kit.d.ts +18 -1
  18. package/dist/components/editor/plugins/table-base-kit.d.ts.map +1 -1
  19. package/dist/components/editor/plugins/table-kit.d.ts +26 -2
  20. package/dist/components/editor/plugins/table-kit.d.ts.map +1 -1
  21. package/dist/components/editor/plugins/toggle-kit.d.ts +1 -1
  22. package/dist/components/editor/plugins/toggle-kit.d.ts.map +1 -1
  23. package/dist/components/ui/block-context-menu.d.ts.map +1 -1
  24. package/dist/components/ui/block-suggestion.d.ts.map +1 -1
  25. package/dist/components/ui/caption.d.ts +21 -1
  26. package/dist/components/ui/caption.d.ts.map +1 -1
  27. package/dist/components/ui/comment.d.ts.map +1 -1
  28. package/dist/components/ui/dialog.d.ts.map +1 -1
  29. package/dist/components/ui/floating-toolbar.d.ts.map +1 -1
  30. package/dist/components/ui/font-color-toolbar-button.d.ts.map +1 -1
  31. package/dist/components/ui/table-node.d.ts.map +1 -1
  32. package/dist/components/ui/table-toolbar-button.d.ts.map +1 -1
  33. package/dist/components/ui/turn-into-toolbar-button.d.ts.map +1 -1
  34. package/dist/index.js +843 -838
  35. package/dist/index.js.map +1 -1
  36. package/package.json +45 -45
@@ -1,6 +1,637 @@
1
1
  import { Value } from 'platejs';
2
2
  import { TPlateEditor } from 'platejs/react';
3
- export declare const EditorKit: any[];
3
+ export declare const EditorKit: (import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"textAlign", {}, {}, Record<"textAlign", {
4
+ setNodes: (value: import('@platejs/basic-styles').Alignment, options?: import('platejs').SetNodesOptions) => void;
5
+ }>, {}>> | import('platejs').SlatePlugin<import('@platejs/autoformat').AutoformatConfig> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"p", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<any, {}, {}, Record<any, {
6
+ toggle: () => void;
7
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"blockquote", {}, {}, Record<"blockquote", {
8
+ toggle: () => void;
9
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"hr", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"bold", {}, {}, Record<"bold", {
10
+ toggle: () => void;
11
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"italic", {}, {}, Record<"italic", {
12
+ toggle: () => void;
13
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"underline", {}, {}, Record<"underline", {
14
+ toggle: () => void;
15
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"code", {}, {}, Record<"code", {
16
+ toggle: () => void;
17
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"strikethrough", {}, {}, Record<"strikethrough", {
18
+ toggle: () => void;
19
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"subscript", {}, {}, Record<"subscript", {
20
+ toggle: () => void;
21
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"superscript", {}, {}, Record<"superscript", {
22
+ toggle: () => void;
23
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"highlight", {}, {}, Record<"highlight", {
24
+ toggle: () => void;
25
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"kbd", {}, {}, Record<"kbd", {
26
+ toggle: () => void;
27
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"blockMenu", {
28
+ openId: ((string & {}) | "context") | null;
29
+ position: {
30
+ x: number;
31
+ y: number;
32
+ };
33
+ }, {
34
+ blockMenu: {
35
+ hide: () => void;
36
+ show: (id: (string & {}) | "context", position?: {
37
+ x: number;
38
+ y: number;
39
+ }) => void;
40
+ showContextMenu: (blockId: string, position: {
41
+ x: number;
42
+ y: number;
43
+ }) => void;
44
+ };
45
+ } & Record<"blockMenu", Partial<{
46
+ hide: () => void;
47
+ show: (id: (string & {}) | "context", position?: {
48
+ x: number;
49
+ y: number;
50
+ }) => void;
51
+ showContextMenu: (blockId: string, position: {
52
+ x: number;
53
+ y: number;
54
+ }) => void;
55
+ }>>, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"blockSelection", {
56
+ anchorId?: string | null;
57
+ areaOptions?: {
58
+ document?: Document;
59
+ } & {
60
+ container?: (string | HTMLElement | (string | HTMLElement)[]) | undefined;
61
+ behaviour?: {
62
+ intersect?: ("center" | "cover" | "touch") | undefined;
63
+ overlap?: ("drop" | "invert" | "keep") | undefined;
64
+ scrolling?: {
65
+ manualSpeed?: number | undefined;
66
+ speedDivider?: number | undefined;
67
+ startScrollMargins?: {
68
+ x?: number | undefined;
69
+ y?: number | undefined;
70
+ } | undefined;
71
+ } | undefined;
72
+ startThreshold?: number | {
73
+ x?: number | undefined;
74
+ y?: number | undefined;
75
+ } | undefined;
76
+ triggers?: ((0 | 1 | 2 | 3 | 4) | {
77
+ button: 0 | 1 | 2 | 3 | 4;
78
+ modifiers: ("shift" | "alt" | "ctrl")[];
79
+ })[] | undefined;
80
+ } | undefined;
81
+ boundaries?: (string | HTMLElement | (string | HTMLElement)[]) | undefined;
82
+ features?: {
83
+ range?: boolean | undefined;
84
+ singleTap?: {
85
+ allow?: boolean | undefined;
86
+ intersect?: ("touch" | "native") | undefined;
87
+ } | undefined;
88
+ touch?: boolean | undefined;
89
+ } | undefined;
90
+ selectables?: (string | string[]) | undefined;
91
+ selectionAreaClass?: string | undefined;
92
+ startAreas?: (string | HTMLElement | (string | HTMLElement)[]) | undefined;
93
+ };
94
+ editorPaddingRight?: import('react').CSSProperties["width"];
95
+ enableContextMenu?: boolean;
96
+ disableSelectAll?: boolean;
97
+ isSelecting?: boolean;
98
+ isSelectionAreaVisible?: boolean;
99
+ rightSelectionAreaClassName?: string;
100
+ selectedIds?: Set<string>;
101
+ shadowInputRef?: React.RefObject<HTMLInputElement | null>;
102
+ isSelectable?: (element: import('platejs').TElement, path: import('platejs').Path) => boolean;
103
+ onKeyDownSelecting?: (editor: import('platejs').SlateEditor, e: KeyboardEvent) => void;
104
+ }, {
105
+ blockSelection: {
106
+ addOnContextMenu: import('platejs').OmitFirst<(editor: import('platejs/react').PlateEditor, { disabledWhenFocused, element, event }: {
107
+ element: import('platejs').TElement;
108
+ event: React.MouseEvent<HTMLDivElement, MouseEvent>;
109
+ disabledWhenFocused?: boolean;
110
+ }) => void>;
111
+ setSelectedIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { added, ids, removed }: Partial<{
112
+ added: Element[];
113
+ removed: Element[];
114
+ }> & {
115
+ ids?: string[];
116
+ }) => void>;
117
+ add: (id: string[] | string) => void;
118
+ addSelectedRow: (id: string, options?: {
119
+ clear?: boolean;
120
+ delay?: number;
121
+ }) => void;
122
+ clear: () => void;
123
+ delete: (id: string[] | string) => void;
124
+ deselect: () => void;
125
+ first: () => import('platejs').NodeEntry<import('platejs').TIdElement> | null;
126
+ focus: () => void;
127
+ getNodes: (options?: {
128
+ collapseTableRows?: boolean;
129
+ selectionFallback?: boolean;
130
+ sort?: boolean;
131
+ }) => import('platejs').NodeEntry<import('platejs').TIdElement>[];
132
+ has: (id: string[] | string) => boolean;
133
+ isSelectable: (element: import('platejs').TElement, path: import('platejs').Path) => boolean;
134
+ moveSelection: (direction: "down" | "up") => void;
135
+ resetSelectedIds: () => void;
136
+ selectAll: () => void;
137
+ set: (id: string[] | string) => void;
138
+ shiftSelection: (direction: "down" | "up") => void;
139
+ unselect: () => void;
140
+ };
141
+ } & Record<"blockSelection", Partial<{
142
+ addOnContextMenu: import('platejs').OmitFirst<(editor: import('platejs/react').PlateEditor, { disabledWhenFocused, element, event }: {
143
+ element: import('platejs').TElement;
144
+ event: React.MouseEvent<HTMLDivElement, MouseEvent>;
145
+ disabledWhenFocused?: boolean;
146
+ }) => void>;
147
+ setSelectedIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { added, ids, removed }: Partial<{
148
+ added: Element[];
149
+ removed: Element[];
150
+ }> & {
151
+ ids?: string[];
152
+ }) => void>;
153
+ add: (id: string[] | string) => void;
154
+ addSelectedRow: (id: string, options?: {
155
+ clear?: boolean;
156
+ delay?: number;
157
+ }) => void;
158
+ clear: () => void;
159
+ delete: (id: string[] | string) => void;
160
+ deselect: () => void;
161
+ first: () => import('platejs').NodeEntry<import('platejs').TIdElement> | null;
162
+ focus: () => void;
163
+ getNodes: (options?: {
164
+ collapseTableRows?: boolean;
165
+ selectionFallback?: boolean;
166
+ sort?: boolean;
167
+ }) => import('platejs').NodeEntry<import('platejs').TIdElement>[];
168
+ has: (id: string[] | string) => boolean;
169
+ isSelectable: (element: import('platejs').TElement, path: import('platejs').Path) => boolean;
170
+ moveSelection: (direction: "down" | "up") => void;
171
+ resetSelectedIds: () => void;
172
+ selectAll: () => void;
173
+ set: (id: string[] | string) => void;
174
+ shiftSelection: (direction: "down" | "up") => void;
175
+ unselect: () => void;
176
+ }>>, Record<"blockSelection", {
177
+ duplicate: () => void;
178
+ insertBlocksAndSelect: (nodes: import('platejs').TElement[], args_1: {
179
+ at: import('platejs').Path;
180
+ insertedCallback?: () => void;
181
+ }) => void;
182
+ removeNodes: () => void;
183
+ select: () => void;
184
+ selectBlocks: (at: import('platejs').Path | import('platejs').TNode) => void;
185
+ setIndent: (indent: number, options?: import('platejs').SetNodesOptions | undefined) => void;
186
+ setNodes: (props: Partial<Omit<import('platejs').TElement, "children">>, options?: import('platejs').SetNodesOptions | undefined) => void;
187
+ setTexts: (props: Partial<Omit<import('platejs').TText, "text">>, options?: Omit<import('platejs').SetNodesOptions, "at"> | undefined) => void;
188
+ }>, {
189
+ isSelected?: (id?: string) => boolean;
190
+ isSelectingSome?: () => boolean;
191
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"dnd", {
192
+ _isOver?: boolean;
193
+ draggingId?: string[] | string | null;
194
+ dropTarget?: {
195
+ id: string | null;
196
+ line: import('@platejs/dnd').DropLineDirection;
197
+ };
198
+ enableScroller?: boolean;
199
+ isDragging?: boolean;
200
+ multiplePreviewRef?: React.RefObject<HTMLDivElement | null> | null;
201
+ scrollerProps?: Partial<import('@platejs/dnd').ScrollerProps>;
202
+ onDropFiles?: (props: {
203
+ id: string;
204
+ dragItem: import('@platejs/dnd').FileDragItemNode;
205
+ editor: import('platejs/react').PlateEditor;
206
+ monitor: import('react-dnd').DropTargetMonitor<import('@platejs/dnd').DragItemNode, unknown>;
207
+ nodeRef: any;
208
+ target?: import('platejs').Path;
209
+ }) => void;
210
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"blockPlaceholder", {
211
+ _target: {
212
+ node: import('platejs').TElement;
213
+ placeholder: string;
214
+ } | null;
215
+ placeholders: Record<string, string>;
216
+ query: (context: import('platejs/react').PlatePluginContext<import('platejs/react').BlockPlaceholderConfig> & {
217
+ node: import('platejs').TElement;
218
+ path: import('platejs').Path;
219
+ }) => boolean;
220
+ className?: string;
221
+ }, {}, {}, {
222
+ placeholder: (node: import('platejs').TElement) => string | undefined;
223
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"callout", {}, {}, {
224
+ insert: {
225
+ callout: (args_0?: ({
226
+ batchDirty?: boolean;
227
+ hanging?: boolean;
228
+ nextBlock?: boolean;
229
+ removeEmpty?: import('platejs').QueryNodeOptions | boolean;
230
+ select?: boolean;
231
+ } & {
232
+ id?: boolean | string;
233
+ block?: boolean;
234
+ empty?: boolean;
235
+ match?: import('platejs').Predicate<import('platejs').NodeIn<Value>> | undefined;
236
+ text?: boolean;
237
+ } & import('platejs').QueryAt & import('platejs').QueryMode & import('platejs').QueryVoids & {
238
+ icon?: string;
239
+ variant?: (string & {}) | import('platejs').TCalloutElement["variant"];
240
+ }) | undefined) => void;
241
+ };
242
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"code_block", {
243
+ defaultLanguage?: string | null;
244
+ lowlight?: ReturnType<typeof import('lowlight').createLowlight> | null;
245
+ }, {}, Record<"code_block", {
246
+ toggle: () => void;
247
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<any, {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"code_syntax", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"column_group", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"column", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"comment", {
248
+ activeId: string | null;
249
+ commentingBlock: import('platejs').Path | null;
250
+ hoverId: string | null;
251
+ uniquePathMap: Map<string, import('platejs').Path>;
252
+ }, {
253
+ comment: {
254
+ has: (options: {
255
+ id: string;
256
+ }) => boolean;
257
+ node: (options?: import('platejs').EditorNodesOptions & {
258
+ id?: string;
259
+ isDraft?: boolean;
260
+ }) => import('platejs').NodeEntry<import('platejs').TCommentText> | undefined;
261
+ nodeId: (leaf: import('platejs').TCommentText) => string | undefined;
262
+ nodes: (options?: import('platejs').EditorNodesOptions & {
263
+ id?: string;
264
+ isDraft?: boolean;
265
+ transient?: boolean;
266
+ }) => import('platejs').NodeEntry<import('platejs').TCommentText>[];
267
+ };
268
+ }, {
269
+ comment: {
270
+ removeMark: () => void;
271
+ setDraft: (options?: import('platejs').SetNodesOptions) => void;
272
+ unsetMark: (options: {
273
+ id?: string;
274
+ transient?: boolean;
275
+ }) => void;
276
+ };
277
+ } & Record<"comment", {
278
+ setDraft: () => void;
279
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"cursorOverlay", {
280
+ cursors: Record<string, import('@platejs/selection/react').CursorState<import('@platejs/selection/react').CursorData>>;
281
+ }, {
282
+ cursorOverlay: {
283
+ addCursor: (id: string, cursor: Omit<import('@platejs/selection/react').CursorState<import('@platejs/selection/react').CursorData>, "id">) => void;
284
+ removeCursor: (id: (string & {}) | "drag" | "selection") => void;
285
+ };
286
+ } & Record<"cursorOverlay", {
287
+ addCursor: (id: string, cursor: Omit<import('@platejs/selection/react').CursorState<import('@platejs/selection/react').CursorData>, "id">) => void;
288
+ removeCursor: (id: (string & {}) | "drag" | "selection") => void;
289
+ }>, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"date", {}, {}, {
290
+ insert: {
291
+ date: (args_0?: ({
292
+ date?: string;
293
+ } & {
294
+ batchDirty?: boolean;
295
+ hanging?: boolean;
296
+ nextBlock?: boolean;
297
+ removeEmpty?: import('platejs').QueryNodeOptions | boolean;
298
+ select?: boolean;
299
+ } & {
300
+ id?: boolean | string;
301
+ block?: boolean;
302
+ empty?: boolean;
303
+ match?: import('platejs').Predicate<import('platejs').NodeIn<Value>> | undefined;
304
+ text?: boolean;
305
+ } & import('platejs').QueryAt & import('platejs').QueryMode & import('platejs').QueryVoids) | undefined) => void;
306
+ };
307
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"discussion", {
308
+ commenting: boolean;
309
+ currentUser: string;
310
+ discussions: import('./plugins/discussion-kit').TDiscussion[];
311
+ }, {}, {}, {
312
+ currentUserInfo: () => {
313
+ id: string;
314
+ name: string;
315
+ };
316
+ user: (id: string) => {
317
+ id: string;
318
+ name: string;
319
+ };
320
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"suggestion", {
321
+ currentUserId: string | null;
322
+ isSuggesting: boolean;
323
+ } & {
324
+ activeId: string | null;
325
+ hoverId: string | null;
326
+ uniquePathMap: Map<string, import('platejs').Path>;
327
+ }, {
328
+ suggestion: {
329
+ dataList: (node: import('platejs').TSuggestionText) => import('platejs').TInlineSuggestionData[];
330
+ isBlockSuggestion: (node: import('platejs').TNode) => node is import('platejs').TSuggestionElement;
331
+ node: (options?: import('platejs').EditorNodesOptions & {
332
+ id?: string;
333
+ isText?: boolean;
334
+ }) => import('platejs').NodeEntry<import('platejs').TSuggestionElement | import('platejs').TSuggestionText> | undefined;
335
+ nodeId: (node: import('platejs').TElement | import('platejs').TSuggestionText) => string | undefined;
336
+ nodes: (options?: import('platejs').EditorNodesOptions & {
337
+ transient?: boolean;
338
+ }) => import('platejs').NodeEntry<import('platejs').TElement | import('platejs').TSuggestionText>[];
339
+ suggestionData: (node: import('platejs').TElement | import('platejs').TSuggestionText) => import('platejs').TInlineSuggestionData | import('platejs').TSuggestionElement["suggestion"] | undefined;
340
+ withoutSuggestions: (fn: () => void) => void;
341
+ };
342
+ }, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"placeholder", import('@platejs/media').MediaPlaceholderOptions & {
343
+ disableEmptyPlaceholder: boolean;
344
+ disableFileDrop: boolean;
345
+ uploadConfig: import('@platejs/media/react').UploadConfig;
346
+ uploadingFiles: Record<string, File>;
347
+ error?: import('@platejs/media/react').UploadError | null;
348
+ maxFileCount?: number;
349
+ multiple?: boolean;
350
+ }, {
351
+ placeholder: import('@platejs/media/react').PlaceholderApi;
352
+ } & Record<"placeholder", {
353
+ addUploadingFile: (id: string, file: File) => void;
354
+ getUploadingFile: (id: string) => File;
355
+ removeUploadingFile: (id: string) => void;
356
+ }>, {
357
+ insert: {
358
+ media: (files: FileList, options?: (Omit<import('platejs').InsertNodesOptions, "at"> & {
359
+ at?: import('platejs').Path;
360
+ }) | undefined) => any;
361
+ };
362
+ }, {}>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"docx", {}, {}, {}, {}>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"juice", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"emoji", {
363
+ data?: import('@emoji-mart/data').EmojiMartData;
364
+ createEmojiNode?: (emoji: import('@emoji-mart/data').Emoji) => any;
365
+ } & import('@platejs/combobox').TriggerComboboxPluginOptions, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"emoji_input", {}, {}, {}, {}>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"exitBreak", {}, {}, Record<"exitBreak", {
366
+ insert: (options: Omit<import('platejs').InsertExitBreakOptions, "reverse">) => true | undefined;
367
+ insertBefore: (options: Omit<import('platejs').InsertExitBreakOptions, "reverse">) => true | undefined;
368
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"table", {
369
+ _cellIndices: Record<string, {
370
+ col: number;
371
+ row: number;
372
+ }>;
373
+ _selectedCellIds: string[] | null | undefined;
374
+ _selectedTableIds: string[] | null | undefined;
375
+ _selectionVersion: number;
376
+ selectedCells: import('platejs').TElement[] | null;
377
+ selectedTables: import('platejs').TElement[] | null;
378
+ disableExpandOnInsert?: boolean;
379
+ disableMarginLeft?: boolean;
380
+ disableMerge?: boolean;
381
+ enableUnsetSingleColSize?: boolean;
382
+ initialTableWidth?: number;
383
+ minColumnWidth?: number;
384
+ }, {
385
+ create: {
386
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import('@platejs/table').GetEmptyTableNodeOptions) => import('platejs').TTableElement>;
387
+ tableCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { children, header, row }?: import('@platejs/table').CreateCellOptions) => {
388
+ children: import('platejs').Descendant[];
389
+ type: string;
390
+ }>;
391
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, ...cellOptions }?: import('@platejs/table').GetEmptyRowNodeOptions) => {
392
+ children: {
393
+ children: import('platejs').Descendant[];
394
+ type: string;
395
+ }[];
396
+ type: string;
397
+ }>;
398
+ };
399
+ table: {
400
+ getCellBorders: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, defaultBorder, element }: {
401
+ element: import('platejs').TTableCellElement;
402
+ cellIndices?: import('@platejs/table').CellIndices;
403
+ defaultBorder?: import('platejs').TTableCellBorder;
404
+ }) => import('@platejs/table').BorderStylesDefault>;
405
+ getCellSize: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, colSizes, element, rowSize }: {
406
+ element: import('platejs').TTableCellElement;
407
+ cellIndices?: import('@platejs/table').CellIndices;
408
+ colSizes?: number[];
409
+ rowSize?: number;
410
+ }) => {
411
+ minHeight: number;
412
+ width: number;
413
+ }>;
414
+ getSelectedCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => import('platejs').TElement | null>;
415
+ getSelectedCellIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
416
+ getSelectedCells: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
417
+ getSelectedTableIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
418
+ getSelectedTables: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
419
+ getColSpan: (cellElem: import('platejs').TTableCellElement) => number;
420
+ getRowSpan: (cellElem: import('platejs').TTableCellElement) => number;
421
+ getCellChildren: (cell: import('platejs').TTableCellElement) => import('platejs').Descendant[];
422
+ isCellSelected: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => boolean>;
423
+ isSelectingCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => boolean>;
424
+ };
425
+ } & {
426
+ create: {
427
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import('@platejs/table').GetEmptyTableNodeOptions) => import('platejs').TTableElement>;
428
+ tableCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { children, header, row }?: import('@platejs/table').CreateCellOptions) => {
429
+ children: import('platejs').Descendant[];
430
+ type: string;
431
+ }>;
432
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, ...cellOptions }?: import('@platejs/table').GetEmptyRowNodeOptions) => {
433
+ children: {
434
+ children: import('platejs').Descendant[];
435
+ type: string;
436
+ }[];
437
+ type: string;
438
+ }>;
439
+ };
440
+ table: {
441
+ getCellBorders: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, defaultBorder, element }: {
442
+ element: import('platejs').TTableCellElement;
443
+ cellIndices?: import('@platejs/table').CellIndices;
444
+ defaultBorder?: import('platejs').TTableCellBorder;
445
+ }) => import('@platejs/table').BorderStylesDefault>;
446
+ getCellSize: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, colSizes, element, rowSize }: {
447
+ element: import('platejs').TTableCellElement;
448
+ cellIndices?: import('@platejs/table').CellIndices;
449
+ colSizes?: number[];
450
+ rowSize?: number;
451
+ }) => {
452
+ minHeight: number;
453
+ width: number;
454
+ }>;
455
+ getSelectedCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => import('platejs').TElement | null>;
456
+ getSelectedCellIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
457
+ getSelectedCells: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
458
+ getSelectedTableIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
459
+ getSelectedTables: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
460
+ getColSpan: (cellElem: import('platejs').TTableCellElement) => number;
461
+ getRowSpan: (cellElem: import('platejs').TTableCellElement) => number;
462
+ getCellChildren: (cell: import('platejs').TTableCellElement) => import('platejs').Descendant[];
463
+ isCellSelected: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => boolean>;
464
+ isSelectingCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => boolean>;
465
+ };
466
+ }, {
467
+ insert: {
468
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount }?: import('@platejs/table').GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import('platejs').InsertNodesOptions) => void>;
469
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
470
+ at?: import('platejs').Path;
471
+ before?: boolean;
472
+ fromCell?: import('platejs').Path;
473
+ header?: boolean;
474
+ select?: boolean;
475
+ }) => void>;
476
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
477
+ at?: import('platejs').Path;
478
+ before?: boolean;
479
+ fromRow?: import('platejs').Path;
480
+ header?: boolean;
481
+ select?: boolean;
482
+ }) => void>;
483
+ };
484
+ remove: {
485
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
486
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
487
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
488
+ };
489
+ table: {
490
+ merge: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
491
+ split: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
492
+ };
493
+ } & {
494
+ insert: {
495
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount }?: import('@platejs/table').GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import('platejs').InsertNodesOptions) => void>;
496
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
497
+ at?: import('platejs').Path;
498
+ before?: boolean;
499
+ fromCell?: import('platejs').Path;
500
+ header?: boolean;
501
+ select?: boolean;
502
+ }) => void>;
503
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
504
+ at?: import('platejs').Path;
505
+ before?: boolean;
506
+ fromRow?: import('platejs').Path;
507
+ header?: boolean;
508
+ select?: boolean;
509
+ }) => void>;
510
+ };
511
+ remove: {
512
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
513
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
514
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
515
+ };
516
+ table: {
517
+ merge: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
518
+ split: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
519
+ };
520
+ }, {
521
+ cellIndices?: (id: string) => import('@platejs/table').CellIndices;
522
+ isCellSelected?: (id?: string | null) => boolean;
523
+ isSelectingCell?: () => boolean;
524
+ selectedCell?: (id?: string | null) => import('platejs').TElement | null;
525
+ selectedCellIds?: () => string[] | null;
526
+ selectedCells?: () => import('platejs').TElement[] | null;
527
+ selectedTableIds?: () => string[] | null;
528
+ selectedTables?: () => import('platejs').TElement[] | null;
529
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"fixed-toolbar", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"floating-toolbar", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"color", {}, {}, Record<"color", {
530
+ addMark: (value: string) => void;
531
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"backgroundColor", {}, {}, Record<"backgroundColor", {
532
+ addMark: (value: string) => void;
533
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"fontSize", {}, {}, Record<"fontSize", {
534
+ addMark: (value: string) => void;
535
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"fontFamily", {}, {}, Record<"fontFamily", {
536
+ addMark: (value: string) => void;
537
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"lineHeight", {}, {}, Record<"lineHeight", {
538
+ setNodes: (value: number, options?: import('platejs').SetNodesOptions) => void;
539
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"a", {
540
+ allowedSchemes?: string[];
541
+ dangerouslySkipSanitization?: boolean;
542
+ defaultLinkAttributes?: React.AnchorHTMLAttributes<HTMLAnchorElement>;
543
+ forceSubmit?: boolean;
544
+ keepSelectedTextOnPaste?: boolean;
545
+ rangeBeforeOptions?: import('platejs').EditorBeforeOptions;
546
+ triggerFloatingLinkHotkeys?: string[] | string;
547
+ getLinkUrl?: (prevUrl: string | null) => Promise<string | null>;
548
+ getUrlHref?: (url: string) => string | undefined;
549
+ isUrl?: (text: string) => boolean;
550
+ transformInput?: (url: string) => string | undefined;
551
+ } & {
552
+ isEditing: boolean;
553
+ mode: import('@platejs/link/react').FloatingLinkMode;
554
+ mouseDown: boolean;
555
+ newTab: boolean;
556
+ openEditorId: string | null;
557
+ text: string;
558
+ updated: boolean;
559
+ url: string;
560
+ triggerFloatingLinkHotkeys?: string;
561
+ }, {
562
+ floatingLink: {
563
+ hide: () => void;
564
+ reset: () => void;
565
+ show: (mode: import('@platejs/link/react').FloatingLinkMode, editorId: string) => void;
566
+ };
567
+ link: {
568
+ getAttributes: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, link: import('platejs').TLinkElement) => Pick<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "target"> & import('platejs').UnknownObject>;
569
+ };
570
+ }, {}, {
571
+ isOpen?: (editorId: string) => boolean;
572
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"indent", {
573
+ indentMax?: number;
574
+ offset?: number;
575
+ unit?: string;
576
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"list", {
577
+ getSiblingListOptions?: import('@platejs/list').GetSiblingListOptions<import('platejs').TElement>;
578
+ getListStyleType?: (element: HTMLElement) => import('@platejs/list').ListStyleType;
579
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"inline_equation", {}, {}, {
580
+ insert: {
581
+ inlineEquation: (texExpression?: string | undefined, options?: import('platejs').InsertNodesOptions | undefined) => void;
582
+ };
583
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"equation", {}, {}, {
584
+ insert: {
585
+ equation: (options?: import('platejs').InsertNodesOptions | undefined) => void;
586
+ };
587
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"img", {
588
+ disableEmbedInsert?: boolean;
589
+ disableUploadInsert?: boolean;
590
+ uploadImage?: (dataUrl: ArrayBuffer | string) => ArrayBuffer | Promise<ArrayBuffer | string> | string;
591
+ } & import('@platejs/media').MediaPluginOptions, {}, {
592
+ insert: {
593
+ imageFromFiles: (files: FileList, options?: import('platejs').InsertNodesOptions | undefined) => void;
594
+ };
595
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"audio", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"file", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"caption", {
596
+ focusEndPath: import('platejs').Path | null;
597
+ focusStartPath: import('platejs').Path | null;
598
+ query: {
599
+ allow: string[];
600
+ };
601
+ visibleId: string | null;
602
+ }, {}, {}, {
603
+ isVisible?: (elementId: string) => boolean;
604
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"mention", {
605
+ insertSpaceAfterMention?: boolean;
606
+ } & import('@platejs/combobox').TriggerComboboxPluginOptions, {}, {
607
+ insert: {
608
+ mention: (options: {
609
+ search: string;
610
+ value: any;
611
+ key?: any;
612
+ }) => void;
613
+ };
614
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"mention_input", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"slash_command", import('@platejs/combobox').TriggerComboboxPluginOptions, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"slash_input", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"tr", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"td", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"th", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"toc", {
615
+ isScroll: boolean;
616
+ topOffset: number;
617
+ queryHeading?: (editor: import('platejs').SlateEditor) => import('@platejs/toc').Heading[];
618
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"toggle", {
619
+ openIds?: Set<string>;
620
+ } & {
621
+ toggleIndex?: ReturnType<(elements: any[]) => Map<string, string[]>>;
622
+ }, {
623
+ toggle: {
624
+ toggleIds: (ids: string[], force?: boolean | null) => void;
625
+ };
626
+ }, {}, {
627
+ isOpen?: (toggleId: string) => boolean;
628
+ someClosed?: (toggleIds: string[]) => boolean;
629
+ }>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"trailingBlock", {
630
+ type: string;
631
+ } & {
632
+ level?: number;
633
+ type?: string;
634
+ } & import('platejs').QueryNodeOptions, {}, {}, {}>>)[];
4
635
  export type MyEditor = TPlateEditor<Value, (typeof EditorKit)[number]>;
5
636
  export declare const useEditor: () => MyEditor | null;
6
637
  //# sourceMappingURL=editor-kit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor-kit.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor-kit.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAuB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,eAAe,CAAC;AAqChE,eAAO,MAAM,SAAS,OAkDrB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAGvE,eAAO,MAAM,SAAS,QAAO,QAAQ,GAAG,IAAgC,CAAC"}
1
+ {"version":3,"file":"editor-kit.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor-kit.tsx"],"names":[],"mappings":"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"}
@@ -1,4 +1,4 @@
1
1
  export declare const BaseAlignKit: import('platejs').SlatePlugin<import('platejs').PluginConfig<"textAlign", {}, {}, Record<"textAlign", {
2
- setNodes: (value: import('@platejs/basic-styles').Alignment, setNodesOptions?: import('platejs').SetNodesOptions | undefined) => void;
2
+ setNodes: (value: import('@platejs/basic-styles').Alignment, options?: import('platejs').SetNodesOptions) => void;
3
3
  }>, {}>>[];
4
4
  //# sourceMappingURL=align-base-kit.d.ts.map