tiptop-editor 1.2.0 → 1.3.0

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/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Extensions } from '@tiptap/core';
1
2
  import { Editor, EditorContentProps, Range, UseEditorOptions } from '@tiptap/react';
2
3
  import { icons } from 'lucide-react';
3
4
  export type ImageUploadResponseResolver = string | string[] | ((response: Record<string, unknown>) => string | null | undefined);
@@ -27,6 +28,12 @@ export type TiptopEditorOptions = Omit<Partial<UseEditorOptions & {
27
28
  * @default true
28
29
  */
29
30
  showDragHandle?: boolean;
31
+ /**
32
+ * Additional Tiptap extensions to append after the built-in editor set.
33
+ * Use this to add feature-specific extensions like AI commands or collaboration.
34
+ * @default undefined
35
+ */
36
+ extraExtensions?: Extensions;
30
37
  }>, 'extensions'>;
31
38
  export interface EditorButtonProps {
32
39
  tooltipText?: React.ReactNode;
@@ -64,6 +71,7 @@ export type TiptopEditorProps = Omit<EditorContentProps, 'editor'> & {
64
71
  * implementation.
65
72
  */
66
73
  editorOptions?: TiptopEditorOptions;
74
+ slots?: TiptopEditorSlots;
67
75
  };
68
76
  export interface ColorButtonProps {
69
77
  editor: Editor;
@@ -79,6 +87,18 @@ export interface TextSelectionMenuProps {
79
87
  prepend?: React.ReactNode;
80
88
  append?: React.ReactNode;
81
89
  }
90
+ export interface TiptopEditorSlotProps {
91
+ editor: Editor;
92
+ }
93
+ export type TiptopEditorSlot = React.ReactNode | ((props: TiptopEditorSlotProps) => React.ReactNode);
94
+ export interface TiptopEditorSlots {
95
+ editorTop?: TiptopEditorSlot;
96
+ editorBottom?: TiptopEditorSlot;
97
+ selectionMenuPrepend?: TiptopEditorSlot;
98
+ selectionMenuAppend?: TiptopEditorSlot;
99
+ tableMenuPrepend?: TiptopEditorSlot;
100
+ tableMenuAppend?: TiptopEditorSlot;
101
+ }
82
102
  export interface TiptopEditorHandle {
83
103
  getEditor: () => Editor | null;
84
104
  on: Editor['on'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiptop-editor",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Notion-like editor built with Tiptap v3 and HeroUI",
5
5
  "type": "module",
6
6
  "main": "./dist/tiptop-editor.umd.js",