@nextblock-cms/editor 0.2.15 → 0.2.16

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 (47) hide show
  1. package/index.css +1 -0
  2. package/{index.cjs → index.js} +110 -110
  3. package/index.mjs +23 -17
  4. package/package.json +4 -81
  5. package/index.d.ts +0 -29
  6. package/lib/NotionEditor.d.ts +0 -16
  7. package/lib/components/DragHandle.d.ts +0 -15
  8. package/lib/components/HtmlContent.d.ts +0 -7
  9. package/lib/components/menus/BubbleMenu.d.ts +0 -7
  10. package/lib/components/menus/EnhancedFloatingMenu.d.ts +0 -8
  11. package/lib/components/menus/FloatingMenu.d.ts +0 -7
  12. package/lib/components/menus/ImageToolbar.d.ts +0 -7
  13. package/lib/components/menus/SlashCommandList.d.ts +0 -13
  14. package/lib/components/menus/TableToolbar.d.ts +0 -7
  15. package/lib/components/menus/Toolbar.d.ts +0 -7
  16. package/lib/components/mobile/MobileToolbar.d.ts +0 -8
  17. package/lib/components/test/FeatureValidationTest.d.ts +0 -3
  18. package/lib/components/test/NotionEditorEnhancedTest.d.ts +0 -11
  19. package/lib/components/test/UndoRedoTest.d.ts +0 -15
  20. package/lib/components/ui/AdvancedColorMenu.d.ts +0 -9
  21. package/lib/components/ui/AdvancedFontSizeMenu.d.ts +0 -7
  22. package/lib/components/ui/Toolbar.d.ts +0 -7
  23. package/lib/components/ui/UndoRedoButtons.d.ts +0 -10
  24. package/lib/components/widgets/AlertWidgetComponent.d.ts +0 -3
  25. package/lib/components/widgets/CtaWidgetComponent.d.ts +0 -3
  26. package/lib/editor.d.ts +0 -19
  27. package/lib/extensions/AdvancedPlaceholder.d.ts +0 -3
  28. package/lib/extensions/AlertWidget.d.ts +0 -18
  29. package/lib/extensions/CtaWidgetNode.d.ts +0 -16
  30. package/lib/extensions/DivNode.d.ts +0 -2
  31. package/lib/extensions/DraggableNodes.d.ts +0 -11
  32. package/lib/extensions/EnhancedFocus.d.ts +0 -10
  33. package/lib/extensions/FontSizeMark.d.ts +0 -13
  34. package/lib/extensions/ImageExtended.d.ts +0 -2
  35. package/lib/extensions/KeyboardShortcuts.d.ts +0 -7
  36. package/lib/extensions/PreserveAllAttributesExtension.d.ts +0 -2
  37. package/lib/extensions/ResizableImageView.d.ts +0 -2
  38. package/lib/extensions/ScriptTagNode.d.ts +0 -2
  39. package/lib/extensions/StyleTagNode.d.ts +0 -2
  40. package/lib/extensions/TrailingNode.d.ts +0 -9
  41. package/lib/extensions/components/AlertWidgetComponent.d.ts +0 -3
  42. package/lib/extensions/components/CtaWidgetComponent.d.ts +0 -3
  43. package/lib/extensions/slash-command.d.ts +0 -17
  44. package/lib/hooks/useEditorHistory.d.ts +0 -30
  45. package/lib/kit.d.ts +0 -2
  46. package/lib/utils/formatHTML.d.ts +0 -2
  47. package/lib/utils/mediaPicker.d.ts +0 -11
package/index.mjs CHANGED
@@ -4,7 +4,13 @@ import W, { createRef as h1, memo as f1, createContext as cg, createElement as e
4
4
  import * as g1 from "react-dom";
5
5
  import y1, { flushSync as b1 } from "react-dom";
6
6
  import { cn as Ie } from "@nextblock-cms/utils";
7
- import { Button as ae, Input as ss, Popover as Gs, PopoverTrigger as Js, PopoverContent as Ys, Separator as Vt, DropdownMenu as ug, DropdownMenuTrigger as hg, DropdownMenuContent as fg, DropdownMenuItem as Pt, DropdownMenuSeparator as ef, Card as Fs, CardContent as Us, CardHeader as Yc, CardTitle as Xc, Badge as x1 } from "@nextblock-cms/ui";
7
+ import { Popover as Gs, PopoverTrigger as Js, PopoverContent as Ys } from "@nextblock-cms/ui/popover";
8
+ import { Button as ae } from "@nextblock-cms/ui/button";
9
+ import { Input as ss } from "@nextblock-cms/ui/input";
10
+ import { Separator as Vt } from "@nextblock-cms/ui/separator";
11
+ import { DropdownMenu as ug, DropdownMenuTrigger as hg, DropdownMenuContent as fg, DropdownMenuItem as Pt, DropdownMenuSeparator as ef } from "@nextblock-cms/ui/dropdown-menu";
12
+ import { Card as Fs, CardContent as Us, CardHeader as Yc, CardTitle as Xc } from "@nextblock-cms/ui/card";
13
+ import { Badge as x1 } from "@nextblock-cms/ui/badge";
8
14
  function pg(t) {
9
15
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
10
16
  }
@@ -38612,7 +38618,7 @@ const Cw = (t) => {
38612
38618
  clearHistory: o,
38613
38619
  getHistoryState: l
38614
38620
  };
38615
- }, Mj = (t, e) => t ? e === "undo" ? t.can().undo() : t.can().redo() : !1, Xj = (t, e) => {
38621
+ }, Mj = (t, e) => t ? e === "undo" ? t.can().undo() : t.can().redo() : !1, rP = (t, e) => {
38616
38622
  if (!t || !Mj(t, e)) return !1;
38617
38623
  try {
38618
38624
  return e === "undo" ? t.chain().focus().undo().run() : t.chain().focus().redo().run();
@@ -39945,7 +39951,7 @@ var Bj = (t) => {
39945
39951
  };
39946
39952
  }, [c, r, i, s, a, o, l]), /* @__PURE__ */ m.jsx("div", { className: e, style: { visibility: "hidden", position: "absolute" }, ref: d, children: n });
39947
39953
  }, Hj = Bj;
39948
- const Zj = ({
39954
+ const sP = ({
39949
39955
  editor: t,
39950
39956
  className: e,
39951
39957
  onDragStart: n,
@@ -40040,7 +40046,7 @@ const Zj = ({
40040
40046
  /* @__PURE__ */ m.jsx("path", { d: "M15 17C13.8954 17 13 17.8954 13 19C13 20.1046 13.8954 21 15 21C16.1046 21 17 20.1046 17 19C17 17.8954 16.1046 17 15 17Z" })
40041
40047
  ]
40042
40048
  }
40043
- ), Qj = ({ html: t, className: e }) => {
40049
+ ), iP = ({ html: t, className: e }) => {
40044
40050
  const n = Ze(null);
40045
40051
  return pe(() => {
40046
40052
  const r = n.current;
@@ -40068,7 +40074,7 @@ const Zj = ({
40068
40074
  });
40069
40075
  };
40070
40076
  }, [t]), /* @__PURE__ */ m.jsx("div", { ref: n, className: e });
40071
- }, eP = ue.create({
40077
+ }, oP = ue.create({
40072
40078
  name: "enhancedFocus",
40073
40079
  addOptions() {
40074
40080
  return {
@@ -40166,7 +40172,7 @@ const Zj = ({
40166
40172
  onBlur() {
40167
40173
  this.editor.view.dom.classList.remove("editor-focused"), this.storage.isFocused = !1;
40168
40174
  }
40169
- }), tP = ue.create({
40175
+ }), lP = ue.create({
40170
40176
  name: "keyboardShortcuts",
40171
40177
  addOptions() {
40172
40178
  return {
@@ -40303,7 +40309,7 @@ ${s}`) : !1;
40303
40309
  ] }
40304
40310
  ]);
40305
40311
  }
40306
- }), nP = () => {
40312
+ }), aP = () => {
40307
40313
  const [t, e] = Q("<p>Start testing...</p>"), [n, r] = Q([]), [s, i] = Q(!1), [o, l] = Q(""), a = (x) => ({
40308
40314
  name: x,
40309
40315
  tests: [],
@@ -40687,7 +40693,7 @@ ${s}`) : !1;
40687
40693
  ] })
40688
40694
  ] })
40689
40695
  ] });
40690
- }, rP = () => {
40696
+ }, cP = () => {
40691
40697
  const [t, e] = Q(`
40692
40698
  <h1>Undo/Redo Test Document</h1>
40693
40699
  <p>This document tests the enhanced undo/redo functionality with various content types.</p>
@@ -40829,7 +40835,7 @@ ${s}`) : !1;
40829
40835
  ] })
40830
40836
  ] })
40831
40837
  ] }) });
40832
- }, sP = () => {
40838
+ }, dP = () => {
40833
40839
  const [t, e] = Q(`
40834
40840
  <h1>Enhanced NotionEditor Test</h1>
40835
40841
  <p>This is a test of the enhanced NotionEditor with undo/redo buttons and improved drag handles.</p>
@@ -40915,20 +40921,20 @@ export {
40915
40921
  _L as AdvancedPlaceholder,
40916
40922
  OL as AlertWidget,
40917
40923
  LL as CtaWidgetNode,
40918
- Zj as DragHandle,
40924
+ sP as DragHandle,
40919
40925
  m2 as DraggableNodes,
40920
40926
  Aw as Editor,
40921
40927
  kw as EditorBubbleMenu,
40922
40928
  vw as EditorFloatingMenu,
40923
40929
  Mw as EditorToolbar,
40924
40930
  kj as EnhancedFloatingMenu,
40925
- eP as EnhancedFocus,
40926
- nP as FeatureValidationTest,
40927
- Qj as HtmlContent,
40928
- tP as KeyboardShortcuts,
40931
+ oP as EnhancedFocus,
40932
+ aP as FeatureValidationTest,
40933
+ iP as HtmlContent,
40934
+ lP as KeyboardShortcuts,
40929
40935
  Rj as MobileToolbar,
40930
40936
  Lj as NotionEditor,
40931
- sP as NotionEditorEnhancedTest,
40937
+ dP as NotionEditorEnhancedTest,
40932
40938
  h2 as SlashCommand,
40933
40939
  aw as SlashCommandList,
40934
40940
  Ij as Toolbar,
@@ -40937,11 +40943,11 @@ export {
40937
40943
  $j as ToolbarSeparator,
40938
40944
  ML as TrailingNode,
40939
40945
  Ew as UndoRedoButtons,
40940
- rP as UndoRedoTest,
40946
+ cP as UndoRedoTest,
40941
40947
  Mj as canExecuteHistoryAction,
40942
40948
  Aw as default,
40943
40949
  cw as editorExtensions,
40944
- Xj as executeHistoryAction,
40950
+ rP as executeHistoryAction,
40945
40951
  lg as getHistoryShortcut,
40946
40952
  Cw as useEditorHistory
40947
40953
  };
package/package.json CHANGED
@@ -1,84 +1,7 @@
1
1
  {
2
2
  "name": "@nextblock-cms/editor",
3
- "version": "0.2.15",
4
- "main": "index.cjs",
5
- "module": "index.mjs",
6
- "types": "index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./index.d.ts",
10
- "require": "./index.cjs",
11
- "default": "./index.mjs"
12
- },
13
- "./package.json": "./package.json",
14
- "./styles/*": "./styles/*"
15
- },
16
- "files": [
17
- "index.d.ts",
18
- "*.cjs",
19
- "*.mjs",
20
- "lib",
21
- "styles"
22
- ],
23
- "peerDependencies": {
24
- "react": ">=18.0.0",
25
- "react-dom": ">=18.0.0"
26
- },
27
- "dependencies": {
28
- "@nextblock-cms/ui": "^0.2.8",
29
- "@nextblock-cms/utils": "latest",
30
- "@tiptap/core": "^3.9.0",
31
- "@tiptap/extension-blockquote": "^3.9.0",
32
- "@tiptap/extension-bold": "^3.9.0",
33
- "@tiptap/extension-bubble-menu": "^3.9.0",
34
- "@tiptap/extension-bullet-list": "^3.9.0",
35
- "@tiptap/extension-character-count": "^3.9.0",
36
- "@tiptap/extension-code": "^3.9.0",
37
- "@tiptap/extension-code-block-lowlight": "^3.9.0",
38
- "@tiptap/extension-color": "^3.9.0",
39
- "@tiptap/extension-details": "^3.9.0",
40
- "@tiptap/extension-drag-handle": "^3.9.0",
41
- "@tiptap/extension-drag-handle-react": "^3.9.0",
42
- "@tiptap/extension-dropcursor": "^3.9.0",
43
- "@tiptap/extension-emoji": "^3.9.0",
44
- "@tiptap/extension-floating-menu": "^3.9.0",
45
- "@tiptap/extension-focus": "^3.9.0",
46
- "@tiptap/extension-font-family": "^3.9.0",
47
- "@tiptap/extension-gapcursor": "^3.9.0",
48
- "@tiptap/extension-hard-break": "^3.9.0",
49
- "@tiptap/extension-heading": "^3.9.0",
50
- "@tiptap/extension-highlight": "^3.9.0",
51
- "@tiptap/extension-history": "^3.9.0",
52
- "@tiptap/extension-horizontal-rule": "^3.9.0",
53
- "@tiptap/extension-image": "^3.9.0",
54
- "@tiptap/extension-italic": "^3.9.0",
55
- "@tiptap/extension-link": "^3.9.0",
56
- "@tiptap/extension-list-item": "^3.9.0",
57
- "@tiptap/extension-mathematics": "^3.9.0",
58
- "@tiptap/extension-mention": "^3.9.0",
59
- "@tiptap/extension-node-range": "^3.9.0",
60
- "@tiptap/extension-ordered-list": "^3.9.0",
61
- "@tiptap/extension-placeholder": "^3.9.0",
62
- "@tiptap/extension-strike": "^3.9.0",
63
- "@tiptap/extension-subscript": "^3.9.0",
64
- "@tiptap/extension-superscript": "^3.9.0",
65
- "@tiptap/extension-table": "^3.9.0",
66
- "@tiptap/extension-table-cell": "^3.9.0",
67
- "@tiptap/extension-table-header": "^3.9.0",
68
- "@tiptap/extension-table-row": "^3.9.0",
69
- "@tiptap/extension-task-item": "^3.9.0",
70
- "@tiptap/extension-task-list": "^3.9.0",
71
- "@tiptap/extension-text-align": "^3.9.0",
72
- "@tiptap/extension-text-style": "^3.9.0",
73
- "@tiptap/extension-typography": "^3.9.0",
74
- "@tiptap/extension-underline": "^3.9.0",
75
- "@tiptap/extension-youtube": "^3.9.0",
76
- "@tiptap/pm": "^3.9.0",
77
- "@tiptap/react": "^3.9.0",
78
- "@tiptap/starter-kit": "^3.9.0",
79
- "@tiptap/suggestion": "^3.9.0",
80
- "lucide-react": "^0.548.0",
81
- "react-colorful": "^5.6.1",
82
- "react-hot-toast": "^2.4.1"
83
- }
3
+ "version": "0.2.16",
4
+ "main": "index.cjs.js",
5
+ "module": "index.es.js",
6
+ "types": "index.d.ts"
84
7
  }
package/index.d.ts DELETED
@@ -1,29 +0,0 @@
1
- export { Editor } from './lib/editor';
2
- export { Editor as default } from './lib/editor';
3
- export { NotionEditor } from './lib/NotionEditor';
4
- export { EditorBubbleMenu } from './lib/components/menus/BubbleMenu';
5
- export { EditorFloatingMenu } from './lib/components/menus/FloatingMenu';
6
- export { EnhancedFloatingMenu } from './lib/components/menus/EnhancedFloatingMenu';
7
- export { EditorToolbar } from './lib/components/menus/Toolbar';
8
- export { SlashCommandList } from './lib/components/menus/SlashCommandList';
9
- export { Toolbar, ToolbarGroup, ToolbarButton, ToolbarSeparator } from './lib/components/ui/Toolbar';
10
- export { UndoRedoButtons } from './lib/components/ui/UndoRedoButtons';
11
- export { DragHandle } from './lib/components/DragHandle';
12
- export { HtmlContent } from './lib/components/HtmlContent';
13
- export { MobileToolbar } from './lib/components/mobile/MobileToolbar';
14
- export { editorExtensions } from './lib/kit';
15
- export { SlashCommand } from './lib/extensions/slash-command';
16
- export { TrailingNode } from './lib/extensions/TrailingNode';
17
- export { default as AlertWidget } from './lib/extensions/AlertWidget';
18
- export { default as CtaWidgetNode } from './lib/extensions/CtaWidgetNode';
19
- export { DraggableNodes } from './lib/extensions/DraggableNodes';
20
- export { AdvancedPlaceholder } from './lib/extensions/AdvancedPlaceholder';
21
- export { EnhancedFocus } from './lib/extensions/EnhancedFocus';
22
- export { KeyboardShortcuts } from './lib/extensions/KeyboardShortcuts';
23
- export { useEditorHistory, canExecuteHistoryAction, executeHistoryAction, getHistoryShortcut } from './lib/hooks/useEditorHistory';
24
- export { FeatureValidationTest } from './lib/components/test/FeatureValidationTest';
25
- export { UndoRedoTest } from './lib/components/test/UndoRedoTest';
26
- export { NotionEditorEnhancedTest } from './lib/components/test/NotionEditorEnhancedTest';
27
- export type { CommandItemProps } from './lib/extensions/slash-command';
28
- export type { CommandListRef } from './lib/components/menus/SlashCommandList';
29
- export type { EditorHistoryState, EditorHistoryActions } from './lib/hooks/useEditorHistory';
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- import { OpenImagePicker } from './utils/mediaPicker';
3
- interface NotionEditorProps {
4
- content: string;
5
- onChange: (content: string) => void;
6
- placeholder?: string;
7
- editable?: boolean;
8
- showToolbar?: boolean;
9
- showCharacterCount?: boolean;
10
- className?: string;
11
- onFocus?: () => void;
12
- onBlur?: () => void;
13
- openImagePicker?: OpenImagePicker;
14
- }
15
- export declare const NotionEditor: React.FC<NotionEditorProps>;
16
- export default NotionEditor;
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/react';
3
- interface DragHandleProps {
4
- editor: Editor | null;
5
- className?: string;
6
- onDragStart?: (event: DragEvent) => void;
7
- onDragEnd?: (event: DragEvent) => void;
8
- onNodeChange?: (params: {
9
- node: any;
10
- editor: Editor;
11
- pos: number;
12
- }) => void;
13
- }
14
- export declare const DragHandle: React.FC<DragHandleProps>;
15
- export default DragHandle;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface HtmlContentProps {
3
- html: string;
4
- className?: string;
5
- }
6
- export declare const HtmlContent: React.FC<HtmlContentProps>;
7
- export default HtmlContent;
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface BubbleMenuComponentProps {
4
- editor: Editor;
5
- }
6
- export declare const EditorBubbleMenu: FC<BubbleMenuComponentProps>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { FC, default as React } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface EnhancedFloatingMenuProps {
4
- editor: Editor;
5
- wrapperRef?: React.RefObject<HTMLDivElement | null>;
6
- }
7
- export declare const EnhancedFloatingMenu: FC<EnhancedFloatingMenuProps>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface FloatingMenuComponentProps {
4
- editor: Editor;
5
- }
6
- export declare const EditorFloatingMenu: FC<FloatingMenuComponentProps>;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface ImageToolbarProps {
4
- editor: Editor;
5
- }
6
- export declare const ImageToolbar: React.FC<ImageToolbarProps>;
7
- export default ImageToolbar;
@@ -1,13 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CommandItemProps } from '../../extensions/slash-command';
3
- interface SlashCommandListProps {
4
- items: CommandItemProps[];
5
- command: (item: CommandItemProps) => void;
6
- }
7
- export interface CommandListRef {
8
- onKeyDown: ({ event }: {
9
- event: KeyboardEvent;
10
- }) => boolean;
11
- }
12
- export declare const SlashCommandList: React.ForwardRefExoticComponent<SlashCommandListProps & React.RefAttributes<CommandListRef>>;
13
- export {};
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface TableToolbarProps {
4
- editor: Editor;
5
- }
6
- export declare const TableToolbar: React.FC<TableToolbarProps>;
7
- export default TableToolbar;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface EditorToolbarProps {
4
- editor: Editor;
5
- }
6
- export declare const EditorToolbar: React.FC<EditorToolbarProps>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface MobileToolbarProps {
4
- editor: Editor;
5
- className?: string;
6
- }
7
- export declare const MobileToolbar: React.FC<MobileToolbarProps>;
8
- export {};
@@ -1,3 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const FeatureValidationTest: React.FC;
3
- export default FeatureValidationTest;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- /**
3
- * Test component to verify NotionEditor enhanced functionality
4
- * Tests:
5
- * 1. Undo/Redo buttons are visible in toolbar
6
- * 2. Drag handles appear on block hover
7
- * 3. Enhanced styling and spacing
8
- * 4. All existing features still work
9
- */
10
- export declare const NotionEditorEnhancedTest: React.FC;
11
- export default NotionEditorEnhancedTest;
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- /**
3
- * Test component to verify undo/redo functionality with all content types
4
- * This component demonstrates the enhanced undo/redo features working with:
5
- * - Text formatting (bold, italic, etc.)
6
- * - Headings and paragraphs
7
- * - Lists (bullet, ordered, task)
8
- * - Tables
9
- * - Images
10
- * - Code blocks
11
- * - Custom widgets
12
- * - Drag and drop operations
13
- */
14
- export declare const UndoRedoTest: React.FC;
15
- export default UndoRedoTest;
@@ -1,9 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- type Mode = "text" | "highlight";
3
- interface AdvancedColorMenuProps {
4
- editor: Editor;
5
- className?: string;
6
- initialMode?: Mode;
7
- }
8
- export declare function AdvancedColorMenu({ editor, className, initialMode }: AdvancedColorMenuProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,7 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- interface AdvancedFontSizeMenuProps {
3
- editor: Editor;
4
- className?: string;
5
- }
6
- export declare function AdvancedFontSizeMenu({ editor, className }: AdvancedFontSizeMenuProps): import("react/jsx-runtime").JSX.Element;
7
- export default AdvancedFontSizeMenu;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const Toolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
- export declare const ToolbarGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
- export declare const ToolbarButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
5
- isActive?: boolean;
6
- } & React.RefAttributes<HTMLButtonElement>>;
7
- export declare const ToolbarSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Editor } from '@tiptap/core';
3
- interface UndoRedoButtonsProps {
4
- editor: Editor;
5
- className?: string;
6
- showLabels?: boolean;
7
- size?: 'sm' | 'md' | 'lg';
8
- }
9
- export declare const UndoRedoButtons: React.FC<UndoRedoButtonsProps>;
10
- export default UndoRedoButtons;
@@ -1,3 +0,0 @@
1
- import { NodeViewProps } from '@tiptap/react';
2
- declare const AlertWidgetComponent: ({ node, updateAttributes, editor }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
3
- export default AlertWidgetComponent;
@@ -1,3 +0,0 @@
1
- import { NodeViewProps } from '@tiptap/react';
2
- declare const CtaWidgetComponent: ({ node, updateAttributes, editor }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
3
- export default CtaWidgetComponent;
package/lib/editor.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- interface EditorProps {
3
- content: string;
4
- onChange: (content: string) => void;
5
- placeholder?: string;
6
- editable?: boolean;
7
- showToolbar?: boolean;
8
- showCharacterCount?: boolean;
9
- className?: string;
10
- onFocus?: () => void;
11
- onBlur?: () => void;
12
- useEnhancedFloatingMenu?: boolean;
13
- showMobileToolbar?: boolean;
14
- enableAdvancedPlaceholders?: boolean;
15
- enableFocusMode?: boolean;
16
- showKeyboardShortcuts?: boolean;
17
- }
18
- export declare const Editor: React.FC<EditorProps>;
19
- export default Editor;
@@ -1,3 +0,0 @@
1
- import { PlaceholderOptions } from '@tiptap/extension-placeholder';
2
- export type AdvancedPlaceholderOptions = PlaceholderOptions;
3
- export declare const AdvancedPlaceholder: import('@tiptap/core').Extension<PlaceholderOptions, any>;
@@ -1,18 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export type AlertAttrs = {
3
- type?: 'info' | 'warning' | 'error' | 'success';
4
- title?: string;
5
- message?: string;
6
- align?: 'left' | 'center' | 'right';
7
- size?: 'small' | 'medium' | 'large';
8
- textAlign?: 'left' | 'center' | 'right';
9
- };
10
- declare module '@tiptap/core' {
11
- interface Commands<ReturnType> {
12
- alertWidget: {
13
- setAlertWidget: (attrs?: AlertAttrs) => ReturnType;
14
- };
15
- }
16
- }
17
- declare const AlertWidget: Node<any, any>;
18
- export default AlertWidget;
@@ -1,16 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- declare const _default: Node<any, any>;
3
- export default _default;
4
- declare module '@tiptap/core' {
5
- interface Commands<ReturnType> {
6
- ctaWidget: {
7
- setCtaWidget: (options?: {
8
- text?: string;
9
- url?: string;
10
- style?: string;
11
- size?: string;
12
- textAlign?: string;
13
- }) => ReturnType;
14
- };
15
- }
16
- }
@@ -1,2 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export declare const DivNode: Node<any, any>;
@@ -1,11 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export declare const DraggableParagraph: import('@tiptap/core').Node<import('@tiptap/extension-paragraph').ParagraphOptions, any>;
3
- export declare const DraggableHeading: import('@tiptap/core').Node<import('@tiptap/extension-heading').HeadingOptions, any>;
4
- export declare const DraggableBlockquote: import('@tiptap/core').Node<import('@tiptap/extension-blockquote').BlockquoteOptions, any>;
5
- export declare const DraggableBulletList: import('@tiptap/core').Node<import('@tiptap/extension-list').BulletListOptions, any>;
6
- export declare const DraggableOrderedList: import('@tiptap/core').Node<import('@tiptap/extension-list').OrderedListOptions, any>;
7
- export declare const DraggableTaskList: import('@tiptap/core').Node<import('@tiptap/extension-list').TaskListOptions, any>;
8
- export declare const DraggableTaskItem: import('@tiptap/core').Node<import('@tiptap/extension-list').TaskItemOptions, any>;
9
- export declare const DraggableCodeBlock: import('@tiptap/core').Node<import('@tiptap/extension-code-block-lowlight').CodeBlockLowlightOptions, any>;
10
- export declare const DraggableImage: import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any>;
11
- export declare const DraggableNodes: Extension<any, any>;
@@ -1,10 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface EnhancedFocusOptions {
3
- className: string;
4
- mode: 'all' | 'deepest' | 'shallowest';
5
- showFocusRing: boolean;
6
- highlightSelection: boolean;
7
- dimUnfocused: boolean;
8
- animateTransitions: boolean;
9
- }
10
- export declare const EnhancedFocus: Extension<EnhancedFocusOptions, any>;
@@ -1,13 +0,0 @@
1
- import { Mark } from '@tiptap/core';
2
- export interface FontSizeOptions {
3
- HTMLAttributes: Record<string, unknown>;
4
- }
5
- declare module '@tiptap/core' {
6
- interface Commands<ReturnType> {
7
- fontSize: {
8
- setFontSize: (className: string) => ReturnType;
9
- unsetFontSize: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const FontSizeMark: Mark<FontSizeOptions, any>;
@@ -1,2 +0,0 @@
1
- declare const ImageExtended: import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any>;
2
- export default ImageExtended;
@@ -1,7 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface KeyboardShortcutsOptions {
3
- enableAdvancedShortcuts: boolean;
4
- enableCustomShortcuts: boolean;
5
- showShortcutHints: boolean;
6
- }
7
- export declare const KeyboardShortcuts: Extension<KeyboardShortcutsOptions, any>;
@@ -1,2 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export declare const PreserveAllAttributesExtension: Extension<any, any>;
@@ -1,2 +0,0 @@
1
- import { NodeViewProps } from '@tiptap/react';
2
- export default function ResizableImageView(props: NodeViewProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export declare const ScriptTagNode: Node<any, any>;
@@ -1,2 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export declare const StyleTagNode: Node<any, any>;
@@ -1,9 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface TrailingNodeOptions {
3
- /** Name of the node to append at the end (must exist in your schema) */
4
- node: string;
5
- /** If the last node’s type is in this list, do nothing */
6
- notAfter: string[];
7
- }
8
- export declare const TrailingNode: Extension<TrailingNodeOptions, any>;
9
- export default TrailingNode;
@@ -1,3 +0,0 @@
1
- import { NodeViewProps } from '@tiptap/react';
2
- declare const AlertWidgetComponent: ({ node, updateAttributes, editor }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
3
- export default AlertWidgetComponent;
@@ -1,3 +0,0 @@
1
- import { NodeViewProps } from '@tiptap/react';
2
- declare const CtaWidgetComponent: ({ node, updateAttributes, editor }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
3
- export default CtaWidgetComponent;
@@ -1,17 +0,0 @@
1
- import { Extension, Editor, Range } from '@tiptap/core';
2
- import { SuggestionOptions } from '@tiptap/suggestion';
3
- import { default as React } from 'react';
4
- export interface CommandItemProps {
5
- title: string;
6
- description: string;
7
- icon: React.ReactNode;
8
- command: ({ editor, range }: {
9
- editor: Editor;
10
- range: Range;
11
- }) => void;
12
- }
13
- interface SlashCommandOptions {
14
- suggestion: Partial<SuggestionOptions>;
15
- }
16
- export declare const SlashCommand: Extension<SlashCommandOptions, any>;
17
- export {};