tiptop-editor 1.6.5 → 2.1.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/README.md +78 -0
- package/dist/components/editor/TiptopDragHandle.d.ts +2 -1
- package/dist/components/editor/TiptopEditor.stories.d.ts +2 -0
- package/dist/components/editor/createDefaultExtensions.d.ts +2 -1
- package/dist/components/ui/EditorButton.d.ts +1 -1
- package/dist/helpers.d.ts +3 -2
- package/dist/tiptop-editor.css +1 -1
- package/dist/tiptop-editor.es.js +14435 -24851
- package/dist/tiptop-editor.umd.js +25 -28
- package/dist/types.d.ts +19 -2
- package/package.json +3 -3
- package/dist/hero.d.ts +0 -2
- package/dist/index-SfZMAM5z.js +0 -5
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export type TiptopEditorOptions = Omit<Partial<UseEditorOptions & {
|
|
|
18
18
|
*/
|
|
19
19
|
imgUploadResponseKey?: ImageUploadResponseResolver;
|
|
20
20
|
/**
|
|
21
|
+
* Custom HTTP headers to include in the image upload request.
|
|
22
|
+
* Useful for passing authorization tokens or other API headers.
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
imgUploadHeaders?: Record<string, string>;
|
|
26
|
+
/**
|
|
21
27
|
* Disables the default Card wrapper and removes the editor's built-in padding.
|
|
22
28
|
* Use this when you want to embed the editor inside your own layout container.
|
|
23
29
|
* @default false
|
|
@@ -45,8 +51,7 @@ export interface EditorButtonProps {
|
|
|
45
51
|
editor: Editor;
|
|
46
52
|
iconClass?: string;
|
|
47
53
|
icon?: keyof typeof icons;
|
|
48
|
-
variant?: "
|
|
49
|
-
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
54
|
+
variant?: "primary" | "secondary" | "tertiary" | "outline" | "ghost" | "danger" | "danger-soft";
|
|
50
55
|
onPressed?: () => void;
|
|
51
56
|
}
|
|
52
57
|
export interface SlashCommandGroupCommandsProps {
|
|
@@ -92,12 +97,23 @@ export interface TiptopEditorSlotProps {
|
|
|
92
97
|
}
|
|
93
98
|
export type TiptopEditorSlot = React.ReactNode | ((props: TiptopEditorSlotProps) => React.ReactNode);
|
|
94
99
|
export interface TiptopEditorSlots {
|
|
100
|
+
/** The slot before the actual editor content.*/
|
|
95
101
|
editorTop?: TiptopEditorSlot;
|
|
102
|
+
/** The slot after the actual editor content.*/
|
|
96
103
|
editorBottom?: TiptopEditorSlot;
|
|
104
|
+
/** The slot at the start of the selection Menu, right before the Bold button.*/
|
|
97
105
|
selectionMenuPrepend?: TiptopEditorSlot;
|
|
106
|
+
/** The slot at the end of the selection Menu, right before the More options button.*/
|
|
98
107
|
selectionMenuAppend?: TiptopEditorSlot;
|
|
108
|
+
/** The slot at the start of the table selection Menu.*/
|
|
99
109
|
tableMenuPrepend?: TiptopEditorSlot;
|
|
110
|
+
/** The slot at the end of the table selection Menu.*/
|
|
100
111
|
tableMenuAppend?: TiptopEditorSlot;
|
|
112
|
+
/** The slot after the first section in the Drag Handle Menu.
|
|
113
|
+
*
|
|
114
|
+
* Must have a parent of type DropdownSection in order to be displayed.
|
|
115
|
+
*/
|
|
116
|
+
dragHandleDropdown?: TiptopEditorSlot;
|
|
101
117
|
}
|
|
102
118
|
export interface DocumentWord {
|
|
103
119
|
/** 0-based index of this word within its block node */
|
|
@@ -203,6 +219,7 @@ export interface ImageUploaderExtensionOptions {
|
|
|
203
219
|
imgUploadResponseKey?: ImageUploadResponseResolver;
|
|
204
220
|
allowedMimeTypes?: string[];
|
|
205
221
|
maxFileSize: number;
|
|
222
|
+
imgUploadHeaders?: Record<string, string>;
|
|
206
223
|
}
|
|
207
224
|
export interface ImageUploaderExtensionStorage {
|
|
208
225
|
uploadImageFromFile: (editor: Editor, file: File, id: string, updateExisting?: boolean, pos?: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiptop-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.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",
|
|
@@ -48,10 +48,9 @@
|
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@floating-ui/dom": "^1.7.0",
|
|
51
|
-
"@heroui/
|
|
51
|
+
"@heroui/styles": "^3.0.1",
|
|
52
52
|
"@tiptap/core": "^3.0.0",
|
|
53
53
|
"@tiptap/react": "^3.0.0",
|
|
54
|
-
"framer-motion": "^12.0.0",
|
|
55
54
|
"lowlight": "^3.0.0",
|
|
56
55
|
"lucide-react": "^0.500.0",
|
|
57
56
|
"prosemirror-commands": "^1.5.0",
|
|
@@ -72,6 +71,7 @@
|
|
|
72
71
|
"yjs": "^13.0.0"
|
|
73
72
|
},
|
|
74
73
|
"dependencies": {
|
|
74
|
+
"@heroui/react": "^3.0.1",
|
|
75
75
|
"@tiptap/extension-bubble-menu": "^3.0.9",
|
|
76
76
|
"@tiptap/extension-code-block-lowlight": "^3.0.9",
|
|
77
77
|
"@tiptap/extension-drag-handle": "^3.0.9",
|
package/dist/hero.d.ts
DELETED