@handlewithcare/react-prosemirror 3.1.0-tiptap.47 → 3.1.0-tiptap.49

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.
@@ -0,0 +1,38 @@
1
+ import { Editor, type EditorOptions } from "@tiptap/core";
2
+ import { DependencyList } from "react";
3
+ /**
4
+ * The options for the `useEditor` hook.
5
+ */
6
+ export type UseEditorOptions = Partial<EditorOptions> & {
7
+ /**
8
+ * Whether to render the editor on the first render.
9
+ * If client-side rendering, set this to `true`.
10
+ * If server-side rendering, set this to `false`.
11
+ * @default true
12
+ */
13
+ immediatelyRender?: boolean;
14
+ /**
15
+ * Whether to re-render the editor on each transaction.
16
+ * This is legacy behavior that will be removed in future versions.
17
+ * @default false
18
+ */
19
+ shouldRerenderOnTransaction?: boolean;
20
+ };
21
+ /**
22
+ * This hook allows you to create an editor instance.
23
+ * @param options The editor options
24
+ * @param deps The dependencies to watch for changes
25
+ * @returns The editor instance
26
+ * @example const editor = useEditor({ extensions: [...] })
27
+ */
28
+ export declare function useEditor(options: UseEditorOptions & {
29
+ immediatelyRender: false;
30
+ }, deps?: DependencyList): Editor | null;
31
+ /**
32
+ * This hook allows you to create an editor instance.
33
+ * @param options The editor options
34
+ * @param deps The dependencies to watch for changes
35
+ * @returns The editor instance
36
+ * @example const editor = useEditor({ extensions: [...] })
37
+ */
38
+ export declare function useEditor(options: UseEditorOptions, deps?: DependencyList): Editor;
@@ -1,4 +1,4 @@
1
- import { useEditor } from "@tiptap/react";
2
1
  import { DependencyList } from "react";
2
+ import { useEditor } from "./useEditor.js";
3
3
  export type UseTiptapEditorOptions = Omit<Parameters<typeof useEditor>[0], "element">;
4
4
  export declare function useTiptapEditor(options: UseTiptapEditorOptions, deps?: DependencyList): import("@tiptap/core").Editor;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handlewithcare/react-prosemirror",
3
- "version": "3.1.0-tiptap.47",
3
+ "version": "3.1.0-tiptap.49",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",