@oyat/editor 1.6.5 → 1.7.1

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 (100) hide show
  1. package/README.md +53 -36
  2. package/dist/components/editor/editor-base-kit.d.ts +283 -1
  3. package/dist/components/editor/editor-base-kit.d.ts.map +1 -1
  4. package/dist/components/editor/editor-kit.d.ts +604 -1
  5. package/dist/components/editor/editor-kit.d.ts.map +1 -1
  6. package/dist/components/editor/plate-editor.d.ts +11 -1
  7. package/dist/components/editor/plate-editor.d.ts.map +1 -1
  8. package/dist/components/editor/plugins/discussion-kit.d.ts +4 -24
  9. package/dist/components/editor/plugins/discussion-kit.d.ts.map +1 -1
  10. package/dist/components/editor/plugins/media-base-kit.d.ts +2 -2
  11. package/dist/components/editor/plugins/media-base-kit.d.ts.map +1 -1
  12. package/dist/components/editor/plugins/media-kit.d.ts +2 -2
  13. package/dist/components/editor/plugins/media-kit.d.ts.map +1 -1
  14. package/dist/components/editor/plugins/suggestion-kit.d.ts.map +1 -1
  15. package/dist/components/ui/block-suggestion.d.ts.map +1 -1
  16. package/dist/components/ui/callout-node-static.d.ts +4 -0
  17. package/dist/components/ui/callout-node-static.d.ts.map +1 -1
  18. package/dist/components/ui/caption.d.ts +11 -0
  19. package/dist/components/ui/caption.d.ts.map +1 -0
  20. package/dist/components/ui/code-block-node-static.d.ts +7 -0
  21. package/dist/components/ui/code-block-node-static.d.ts.map +1 -1
  22. package/dist/components/ui/column-node-static.d.ts +8 -0
  23. package/dist/components/ui/column-node-static.d.ts.map +1 -1
  24. package/dist/components/ui/comment.d.ts.map +1 -1
  25. package/dist/components/ui/editor.d.ts +1 -1
  26. package/dist/components/ui/equation-node-static.d.ts +10 -0
  27. package/dist/components/ui/equation-node-static.d.ts.map +1 -1
  28. package/dist/components/ui/fixed-toolbar-buttons.d.ts.map +1 -1
  29. package/dist/components/ui/floating-toolbar-buttons.d.ts.map +1 -1
  30. package/dist/components/ui/font-color-toolbar-button.d.ts +23 -0
  31. package/dist/components/ui/font-color-toolbar-button.d.ts.map +1 -0
  32. package/dist/components/ui/insert-image-url-toolbar-button.d.ts +2 -0
  33. package/dist/components/ui/insert-image-url-toolbar-button.d.ts.map +1 -0
  34. package/dist/components/ui/insert-toolbar-button.d.ts.map +1 -1
  35. package/dist/components/ui/media-picker-toolbar-trigger.d.ts +2 -0
  36. package/dist/components/ui/media-picker-toolbar-trigger.d.ts.map +1 -0
  37. package/dist/components/ui/more-toolbar-button.d.ts.map +1 -1
  38. package/dist/components/ui/toc-node-static.d.ts +5 -0
  39. package/dist/components/ui/toc-node-static.d.ts.map +1 -1
  40. package/dist/components/ui/tooltip.d.ts.map +1 -1
  41. package/dist/components/ui/turn-into-toolbar-button.d.ts.map +1 -1
  42. package/dist/contexts/media-picker-context.d.ts +14 -0
  43. package/dist/contexts/media-picker-context.d.ts.map +1 -0
  44. package/dist/contexts/media-picker-provider.d.ts +8 -0
  45. package/dist/contexts/media-picker-provider.d.ts.map +1 -0
  46. package/dist/demo/MockMediaPicker.d.ts +6 -0
  47. package/dist/demo/MockMediaPicker.d.ts.map +1 -0
  48. package/dist/demo/discussions.d.ts +3 -0
  49. package/dist/demo/discussions.d.ts.map +1 -0
  50. package/dist/demo/value.d.ts +3 -0
  51. package/dist/demo/value.d.ts.map +1 -0
  52. package/dist/index.d.ts +4 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +829 -841
  55. package/dist/index.js.map +1 -1
  56. package/package.json +37 -50
  57. package/dist/components/editor/plate-types.d.ts +0 -85
  58. package/dist/components/editor/plate-types.d.ts.map +0 -1
  59. package/dist/components/editor/plugins/basic-nodes-kit.d.ts +0 -24
  60. package/dist/components/editor/plugins/basic-nodes-kit.d.ts.map +0 -1
  61. package/dist/components/editor/plugins/emoji-kit.d.ts +0 -6
  62. package/dist/components/editor/plugins/emoji-kit.d.ts.map +0 -1
  63. package/dist/components/editor/settings-dialog.d.ts +0 -8
  64. package/dist/components/editor/settings-dialog.d.ts.map +0 -1
  65. package/dist/components/editor/use-chat.d.ts +0 -64
  66. package/dist/components/editor/use-chat.d.ts.map +0 -1
  67. package/dist/components/ui/ai-chat-editor.d.ts +0 -5
  68. package/dist/components/ui/ai-chat-editor.d.ts.map +0 -1
  69. package/dist/components/ui/ai-menu.d.ts +0 -8
  70. package/dist/components/ui/ai-menu.d.ts.map +0 -1
  71. package/dist/components/ui/ai-node.d.ts +0 -4
  72. package/dist/components/ui/ai-node.d.ts.map +0 -1
  73. package/dist/components/ui/ai-toolbar-button.d.ts +0 -4
  74. package/dist/components/ui/ai-toolbar-button.d.ts.map +0 -1
  75. package/dist/components/ui/editor-static.d.ts +0 -9
  76. package/dist/components/ui/editor-static.d.ts.map +0 -1
  77. package/dist/components/ui/emoji-node.d.ts +0 -3
  78. package/dist/components/ui/emoji-node.d.ts.map +0 -1
  79. package/dist/components/ui/equation-toolbar-button.d.ts +0 -4
  80. package/dist/components/ui/equation-toolbar-button.d.ts.map +0 -1
  81. package/dist/components/ui/export-toolbar-button.d.ts +0 -3
  82. package/dist/components/ui/export-toolbar-button.d.ts.map +0 -1
  83. package/dist/components/ui/font-size-toolbar-button.d.ts +0 -2
  84. package/dist/components/ui/font-size-toolbar-button.d.ts.map +0 -1
  85. package/dist/components/ui/ghost-text.d.ts +0 -2
  86. package/dist/components/ui/ghost-text.d.ts.map +0 -1
  87. package/dist/components/ui/import-toolbar-button.d.ts +0 -3
  88. package/dist/components/ui/import-toolbar-button.d.ts.map +0 -1
  89. package/dist/components/ui/line-height-toolbar-button.d.ts +0 -3
  90. package/dist/components/ui/line-height-toolbar-button.d.ts.map +0 -1
  91. package/dist/components/ui/media-embed-node.d.ts +0 -5
  92. package/dist/components/ui/media-embed-node.d.ts.map +0 -1
  93. package/dist/components/ui/media-video-node-static.d.ts +0 -4
  94. package/dist/components/ui/media-video-node-static.d.ts.map +0 -1
  95. package/dist/components/ui/media-video-node.d.ts +0 -5
  96. package/dist/components/ui/media-video-node.d.ts.map +0 -1
  97. package/dist/components/ui/mode-toolbar-button.d.ts +0 -3
  98. package/dist/components/ui/mode-toolbar-button.d.ts.map +0 -1
  99. package/dist/components/ui/toggle-toolbar-button.d.ts +0 -4
  100. package/dist/components/ui/toggle-toolbar-button.d.ts.map +0 -1
@@ -1,6 +1,609 @@
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, setNodesOptions?: import('platejs').SetNodesOptions | undefined) => 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
+ currentUser: string;
309
+ discussions: import('./plugins/discussion-kit').TDiscussion[];
310
+ }, {}, {}, {
311
+ currentUserInfo: () => {
312
+ id: string;
313
+ name: string;
314
+ };
315
+ user: (id: string) => {
316
+ id: string;
317
+ name: string;
318
+ };
319
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"suggestion", {
320
+ currentUserId: string | null;
321
+ isSuggesting: boolean;
322
+ } & {
323
+ activeId: string | null;
324
+ hoverId: string | null;
325
+ uniquePathMap: Map<string, import('platejs').Path>;
326
+ }, {
327
+ suggestion: {
328
+ dataList: (node: import('platejs').TSuggestionText) => import('platejs').TInlineSuggestionData[];
329
+ isBlockSuggestion: (node: import('platejs').TNode) => node is import('platejs').TSuggestionElement;
330
+ node: (options?: import('platejs').EditorNodesOptions & {
331
+ id?: string;
332
+ isText?: boolean;
333
+ }) => import('platejs').NodeEntry<import('platejs').TSuggestionElement | import('platejs').TSuggestionText> | undefined;
334
+ nodeId: (node: import('platejs').TElement | import('platejs').TSuggestionText) => string | undefined;
335
+ nodes: (options?: import('platejs').EditorNodesOptions & {
336
+ transient?: boolean;
337
+ }) => import('platejs').NodeEntry<import('platejs').TElement | import('platejs').TSuggestionText>[];
338
+ suggestionData: (node: import('platejs').TElement | import('platejs').TSuggestionText) => import('platejs').TInlineSuggestionData | import('platejs').TSuggestionElement["suggestion"] | undefined;
339
+ withoutSuggestions: (fn: () => void) => void;
340
+ };
341
+ }, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"placeholder", import('@platejs/media').MediaPlaceholderOptions & {
342
+ disableEmptyPlaceholder: boolean;
343
+ disableFileDrop: boolean;
344
+ uploadConfig: import('@platejs/media/react').UploadConfig;
345
+ uploadingFiles: Record<string, File>;
346
+ error?: import('@platejs/media/react').UploadError | null;
347
+ maxFileCount?: number;
348
+ multiple?: boolean;
349
+ }, {
350
+ placeholder: import('@platejs/media/react').PlaceholderApi;
351
+ } & Record<"placeholder", {
352
+ addUploadingFile: (id: string, file: File) => void;
353
+ getUploadingFile: (id: string) => File;
354
+ removeUploadingFile: (id: string) => void;
355
+ }>, {
356
+ insert: {
357
+ media: (files: FileList, options?: (Omit<import('platejs').InsertNodesOptions, "at"> & {
358
+ at?: import('platejs').Path;
359
+ }) | undefined) => any;
360
+ };
361
+ }, {}>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"docx", {}, {}, {}, {}>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"juice", {}, {}, {}, {}>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"exitBreak", {}, {}, Record<"exitBreak", {
362
+ insert: (options: Omit<import('platejs').InsertExitBreakOptions, "reverse">) => true | undefined;
363
+ insertBefore: (options: Omit<import('platejs').InsertExitBreakOptions, "reverse">) => true | undefined;
364
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"table", {
365
+ _cellIndices: Record<string, {
366
+ col: number;
367
+ row: number;
368
+ }>;
369
+ selectedCells: import('platejs').TElement[] | null;
370
+ selectedTables: import('platejs').TElement[] | null;
371
+ disableExpandOnInsert?: boolean;
372
+ disableMarginLeft?: boolean;
373
+ disableMerge?: boolean;
374
+ enableUnsetSingleColSize?: boolean;
375
+ initialTableWidth?: number;
376
+ minColumnWidth?: number;
377
+ }, {
378
+ create: {
379
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import('@platejs/table').GetEmptyTableNodeOptions) => import('platejs').TTableElement>;
380
+ tableCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { children, header, row }?: import('@platejs/table').CreateCellOptions) => {
381
+ children: import('platejs').Descendant[];
382
+ type: string;
383
+ }>;
384
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, ...cellOptions }?: import('@platejs/table').GetEmptyRowNodeOptions) => {
385
+ children: {
386
+ children: import('platejs').Descendant[];
387
+ type: string;
388
+ }[];
389
+ type: string;
390
+ }>;
391
+ };
392
+ table: {
393
+ getCellBorders: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, defaultBorder, element }: {
394
+ element: import('platejs').TTableCellElement;
395
+ cellIndices?: import('@platejs/table').CellIndices;
396
+ defaultBorder?: import('platejs').TTableCellBorder;
397
+ }) => import('@platejs/table').BorderStylesDefault>;
398
+ getCellSize: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, colSizes, element, rowSize }: {
399
+ element: import('platejs').TTableCellElement;
400
+ cellIndices?: import('@platejs/table').CellIndices;
401
+ colSizes?: number[];
402
+ rowSize?: number;
403
+ }) => {
404
+ minHeight: number | undefined;
405
+ width: number;
406
+ }>;
407
+ getColSpan: (cellElem: import('platejs').TTableCellElement) => number;
408
+ getRowSpan: (cellElem: import('platejs').TTableCellElement) => number;
409
+ getCellChildren: (cell: import('platejs').TTableCellElement) => import('platejs').Descendant[];
410
+ };
411
+ } & {
412
+ create: {
413
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import('@platejs/table').GetEmptyTableNodeOptions) => import('platejs').TTableElement>;
414
+ tableCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { children, header, row }?: import('@platejs/table').CreateCellOptions) => {
415
+ children: import('platejs').Descendant[];
416
+ type: string;
417
+ }>;
418
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, ...cellOptions }?: import('@platejs/table').GetEmptyRowNodeOptions) => {
419
+ children: {
420
+ children: import('platejs').Descendant[];
421
+ type: string;
422
+ }[];
423
+ type: string;
424
+ }>;
425
+ };
426
+ table: {
427
+ getCellBorders: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, defaultBorder, element }: {
428
+ element: import('platejs').TTableCellElement;
429
+ cellIndices?: import('@platejs/table').CellIndices;
430
+ defaultBorder?: import('platejs').TTableCellBorder;
431
+ }) => import('@platejs/table').BorderStylesDefault>;
432
+ getCellSize: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, colSizes, element, rowSize }: {
433
+ element: import('platejs').TTableCellElement;
434
+ cellIndices?: import('@platejs/table').CellIndices;
435
+ colSizes?: number[];
436
+ rowSize?: number;
437
+ }) => {
438
+ minHeight: number | undefined;
439
+ width: number;
440
+ }>;
441
+ getColSpan: (cellElem: import('platejs').TTableCellElement) => number;
442
+ getRowSpan: (cellElem: import('platejs').TTableCellElement) => number;
443
+ getCellChildren: (cell: import('platejs').TTableCellElement) => import('platejs').Descendant[];
444
+ };
445
+ }, {
446
+ insert: {
447
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount }?: import('@platejs/table').GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import('platejs').InsertNodesOptions) => void>;
448
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
449
+ at?: import('platejs').Path;
450
+ before?: boolean;
451
+ fromCell?: import('platejs').Path;
452
+ header?: boolean;
453
+ select?: boolean;
454
+ }) => void>;
455
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
456
+ at?: import('platejs').Path;
457
+ before?: boolean;
458
+ fromRow?: import('platejs').Path;
459
+ header?: boolean;
460
+ select?: boolean;
461
+ }) => void>;
462
+ };
463
+ remove: {
464
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
465
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
466
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
467
+ };
468
+ table: {
469
+ merge: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
470
+ split: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
471
+ };
472
+ } & {
473
+ insert: {
474
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount }?: import('@platejs/table').GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import('platejs').InsertNodesOptions) => void>;
475
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
476
+ at?: import('platejs').Path;
477
+ before?: boolean;
478
+ fromCell?: import('platejs').Path;
479
+ header?: boolean;
480
+ select?: boolean;
481
+ }) => void>;
482
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
483
+ at?: import('platejs').Path;
484
+ before?: boolean;
485
+ fromRow?: import('platejs').Path;
486
+ header?: boolean;
487
+ select?: boolean;
488
+ }) => void>;
489
+ };
490
+ remove: {
491
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
492
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
493
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
494
+ };
495
+ table: {
496
+ merge: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
497
+ split: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
498
+ };
499
+ }, {
500
+ cellIndices?: (id: string) => import('@platejs/table').CellIndices;
501
+ }>> | 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", {
502
+ addMark: (value: string) => void;
503
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"backgroundColor", {}, {}, Record<"backgroundColor", {
504
+ addMark: (value: string) => void;
505
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"fontSize", {}, {}, Record<"fontSize", {
506
+ addMark: (value: string) => void;
507
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"fontFamily", {}, {}, Record<"fontFamily", {
508
+ addMark: (value: string) => void;
509
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"lineHeight", {}, {}, Record<"lineHeight", {
510
+ setNodes: (value: number, setNodesOptions?: import('platejs').SetNodesOptions | undefined) => void;
511
+ }>, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"a", {
512
+ allowedSchemes?: string[];
513
+ dangerouslySkipSanitization?: boolean;
514
+ defaultLinkAttributes?: React.AnchorHTMLAttributes<HTMLAnchorElement>;
515
+ forceSubmit?: boolean;
516
+ keepSelectedTextOnPaste?: boolean;
517
+ rangeBeforeOptions?: import('platejs').EditorBeforeOptions;
518
+ triggerFloatingLinkHotkeys?: string[] | string;
519
+ getLinkUrl?: (prevUrl: string | null) => Promise<string | null>;
520
+ getUrlHref?: (url: string) => string | undefined;
521
+ isUrl?: (text: string) => boolean;
522
+ transformInput?: (url: string) => string | undefined;
523
+ } & {
524
+ isEditing: boolean;
525
+ mode: import('@platejs/link/react').FloatingLinkMode;
526
+ mouseDown: boolean;
527
+ newTab: boolean;
528
+ openEditorId: string | null;
529
+ text: string;
530
+ updated: boolean;
531
+ url: string;
532
+ triggerFloatingLinkHotkeys?: string;
533
+ }, {
534
+ floatingLink: {
535
+ hide: () => void;
536
+ reset: () => void;
537
+ show: (mode: import('@platejs/link/react').FloatingLinkMode, editorId: string) => void;
538
+ };
539
+ link: {
540
+ getAttributes: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, link: import('platejs').TLinkElement) => Pick<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "target"> & import('platejs').UnknownObject>;
541
+ };
542
+ }, {}, {
543
+ isOpen?: (editorId: string) => boolean;
544
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"indent", {
545
+ indentMax?: number;
546
+ offset?: number;
547
+ unit?: string;
548
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"list", {
549
+ getSiblingListOptions?: import('@platejs/list').GetSiblingListOptions<import('platejs').TElement>;
550
+ getListStyleType?: (element: HTMLElement) => import('@platejs/list').ListStyleType;
551
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"inline_equation", {}, {}, {
552
+ insert: {
553
+ inlineEquation: (texExpression?: string | undefined, options?: import('platejs').InsertNodesOptions | undefined) => void;
554
+ };
555
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"equation", {}, {}, {
556
+ insert: {
557
+ equation: (options?: import('platejs').InsertNodesOptions | undefined) => void;
558
+ };
559
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"img", {
560
+ disableEmbedInsert?: boolean;
561
+ disableUploadInsert?: boolean;
562
+ uploadImage?: (dataUrl: ArrayBuffer | string) => ArrayBuffer | Promise<ArrayBuffer | string> | string;
563
+ } & import('@platejs/media').MediaPluginOptions, {}, {
564
+ insert: {
565
+ imageFromFiles: (files: FileList, options?: import('platejs').InsertNodesOptions | undefined) => void;
566
+ };
567
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"audio", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"file", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"caption", {
568
+ focusEndPath: import('platejs').Path | null;
569
+ focusStartPath: import('platejs').Path | null;
570
+ query: {
571
+ allow: string[];
572
+ };
573
+ visibleId: string | null;
574
+ }, {}, {}, {
575
+ isVisible?: (elementId: string) => boolean;
576
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"mention", {
577
+ insertSpaceAfterMention?: boolean;
578
+ } & import('@platejs/combobox').TriggerComboboxPluginOptions, {}, {
579
+ insert: {
580
+ mention: (options: {
581
+ search: string;
582
+ value: any;
583
+ key?: any;
584
+ }) => void;
585
+ };
586
+ }, {}>> | 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", {
587
+ isScroll: boolean;
588
+ topOffset: number;
589
+ queryHeading?: (editor: import('platejs').SlateEditor) => import('@platejs/toc').Heading[];
590
+ }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"toggle", {
591
+ openIds?: Set<string>;
592
+ } & {
593
+ toggleIndex?: ReturnType<(elements: Value) => Map<string, string[]>>;
594
+ }, {
595
+ toggle: {
596
+ toggleIds: (ids: string[], force?: boolean | null) => void;
597
+ };
598
+ }, {}, {
599
+ isOpen?: (toggleId: string) => boolean;
600
+ someClosed?: (toggleIds: string[]) => boolean;
601
+ }>> | import('platejs').SlatePlugin<import('platejs').PluginConfig<"trailingBlock", {
602
+ type: string;
603
+ } & {
604
+ level?: number;
605
+ type?: string;
606
+ } & import('platejs').QueryNodeOptions, {}, {}, {}>>)[];
4
607
  export type MyEditor = TPlateEditor<Value, (typeof EditorKit)[number]>;
5
608
  export declare const useEditor: () => MyEditor | null;
6
609
  //# 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,EAAE,GAAG,EAkD1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEvE,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,8 +1,18 @@
1
1
  import { Value } from 'platejs';
2
+ import { MediaPickerRenderProp } from '../../contexts/media-picker-provider';
3
+ import { TDiscussion } from './plugins/discussion-kit';
2
4
  export interface PlateEditorProps {
3
5
  initialValue?: Value | string;
4
6
  onChange?: (value: Value) => void;
5
7
  mode?: 'draft' | 'full';
8
+ /** Host-supplied media picker for image insertion. Receives { open, onSelect } and returns a ReactNode (e.g. trigger button). */
9
+ mediaPicker?: MediaPickerRenderProp;
10
+ /** Discussion/collaboration data - pass to control discussions from outside */
11
+ discussions?: TDiscussion[];
12
+ /** Current user in "id:name" format, e.g. "id123:Orcun Yuksel" */
13
+ currentUser?: string;
14
+ /** Called when discussions change (e.g. new comment added, resolved, etc.) */
15
+ onDiscussionsChange?: (discussions: TDiscussion[]) => void;
6
16
  }
7
- export declare function PlateEditor({ initialValue, onChange, mode, }: PlateEditorProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function PlateEditor({ initialValue, onChange, mode, mediaPicker, discussions, currentUser, onDiscussionsChange, }: PlateEditorProps): import("react/jsx-runtime").JSX.Element;
8
18
  //# sourceMappingURL=plate-editor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plate-editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/plate-editor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB;AAsDD,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,QAAQ,EACR,IAAc,GACf,EAAE,gBAAgB,2CAsBlB"}
1
+ {"version":3,"file":"plate-editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/plate-editor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAOrC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,iIAAiI;IACjI,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,+EAA+E;IAC/E,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CAC5D;AA4GD,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,QAAQ,EACR,IAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,mBAAmB,GACpB,EAAE,gBAAgB,2CA0BlB"}