@tiptap/react 2.0.0-beta.85 → 2.0.0-beta.89

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.
@@ -21,13 +21,20 @@ declare module '@tiptap/core' {
21
21
  * Default options
22
22
  */
23
23
  defaultOptions?: Options;
24
+ /**
25
+ * Default Options
26
+ */
27
+ addOptions?: (this: {
28
+ name: string;
29
+ parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addOptions'], undefined>;
30
+ }) => Options;
24
31
  /**
25
32
  * Default Storage
26
33
  */
27
34
  addStorage?: (this: {
28
35
  name: string;
29
36
  options: Options;
30
- parent: ParentConfig<ExtensionConfig<Options, Storage>>['addGlobalAttributes'];
37
+ parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addStorage'], undefined>;
31
38
  }) => Storage;
32
39
  /**
33
40
  * Global attributes
@@ -21,13 +21,20 @@ declare module '@tiptap/core' {
21
21
  * Default options
22
22
  */
23
23
  defaultOptions?: Options;
24
+ /**
25
+ * Default Options
26
+ */
27
+ addOptions?: (this: {
28
+ name: string;
29
+ parent: Exclude<ParentConfig<MarkConfig<Options, Storage>>['addOptions'], undefined>;
30
+ }) => Options;
24
31
  /**
25
32
  * Default Storage
26
33
  */
27
34
  addStorage?: (this: {
28
35
  name: string;
29
36
  options: Options;
30
- parent: ParentConfig<MarkConfig<Options, Storage>>['addGlobalAttributes'];
37
+ parent: Exclude<ParentConfig<MarkConfig<Options, Storage>>['addStorage'], undefined>;
31
38
  }) => Storage;
32
39
  /**
33
40
  * Global attributes
@@ -20,13 +20,20 @@ declare module '@tiptap/core' {
20
20
  * Default options
21
21
  */
22
22
  defaultOptions?: Options;
23
+ /**
24
+ * Default Options
25
+ */
26
+ addOptions?: (this: {
27
+ name: string;
28
+ parent: Exclude<ParentConfig<NodeConfig<Options, Storage>>['addOptions'], undefined>;
29
+ }) => Options;
23
30
  /**
24
31
  * Default Storage
25
32
  */
26
33
  addStorage?: (this: {
27
34
  name: string;
28
35
  options: Options;
29
- parent: ParentConfig<NodeConfig<Options, Storage>>['addGlobalAttributes'];
36
+ parent: Exclude<ParentConfig<NodeConfig<Options, Storage>>['addStorage'], undefined>;
30
37
  }) => Storage;
31
38
  /**
32
39
  * Global attributes
@@ -70,7 +70,7 @@ export interface EditorOptions {
70
70
  }
71
71
  export declare type HTMLContent = string;
72
72
  export declare type JSONContent = {
73
- type: string;
73
+ type?: string;
74
74
  attrs?: Record<string, any>;
75
75
  content?: JSONContent[];
76
76
  marks?: {
@@ -1,5 +1,6 @@
1
1
  import { CodeBlockOptions } from '@tiptap/extension-code-block';
2
2
  export interface CodeBlockLowlightOptions extends CodeBlockOptions {
3
3
  lowlight: any;
4
+ defaultLanguage: string | null | undefined;
4
5
  }
5
6
  export declare const CodeBlockLowlight: import("@tiptap/core").Node<CodeBlockLowlightOptions, unknown>;
@@ -1,5 +1,6 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
- export declare function LowlightPlugin({ name, lowlight }: {
2
+ export declare function LowlightPlugin({ name, lowlight, defaultLanguage }: {
3
3
  name: string;
4
4
  lowlight: any;
5
+ defaultLanguage: string | null | undefined;
5
6
  }): Plugin<any, any>;
@@ -1,8 +1,17 @@
1
1
  import { Extension } from '@tiptap/core';
2
+ declare type CollaborationCursorStorage = {
3
+ users: {
4
+ clientId: number;
5
+ [key: string]: any;
6
+ }[];
7
+ };
2
8
  export interface CollaborationCursorOptions {
3
9
  provider: any;
4
10
  user: Record<string, any>;
5
11
  render(user: Record<string, any>): HTMLElement;
12
+ /**
13
+ * @deprecated The "onUpdate" option is deprecated. Please use `editor.storage.collaborationCursor.users` instead. Read more: https://tiptap.dev/api/extensions/collaboration-cursor
14
+ */
6
15
  onUpdate: (users: {
7
16
  clientId: number;
8
17
  [key: string]: any;
@@ -14,8 +23,15 @@ declare module '@tiptap/core' {
14
23
  /**
15
24
  * Update details of the current user
16
25
  */
26
+ updateUser: (attributes: Record<string, any>) => ReturnType;
27
+ /**
28
+ * Update details of the current user
29
+ *
30
+ * @deprecated The "user" command is deprecated. Please use "updateUser" instead. Read more: https://tiptap.dev/api/extensions/collaboration-cursor
31
+ */
17
32
  user: (attributes: Record<string, any>) => ReturnType;
18
33
  };
19
34
  }
20
35
  }
21
- export declare const CollaborationCursor: Extension<CollaborationCursorOptions, any>;
36
+ export declare const CollaborationCursor: Extension<CollaborationCursorOptions, CollaborationCursorStorage>;
37
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/react",
3
3
  "description": "React components for tiptap",
4
- "version": "2.0.0-beta.85",
4
+ "version": "2.0.0-beta.89",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -21,8 +21,8 @@
21
21
  "dist"
22
22
  ],
23
23
  "devDependencies": {
24
- "@types/react": "^17.0.32",
25
- "@types/react-dom": "^17.0.10",
24
+ "@types/react": "^17.0.34",
25
+ "@types/react-dom": "^17.0.11",
26
26
  "react": "^17.0.0",
27
27
  "react-dom": "^17.0.0"
28
28
  },
@@ -32,14 +32,14 @@
32
32
  "react-dom": "^17.0.0"
33
33
  },
34
34
  "dependencies": {
35
- "@tiptap/extension-bubble-menu": "^2.0.0-beta.42",
36
- "@tiptap/extension-floating-menu": "^2.0.0-beta.36",
37
- "prosemirror-view": "^1.20.3"
35
+ "@tiptap/extension-bubble-menu": "^2.0.0-beta.46",
36
+ "@tiptap/extension-floating-menu": "^2.0.0-beta.40",
37
+ "prosemirror-view": "^1.22.0"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",
41
41
  "url": "https://github.com/ueberdosis/tiptap",
42
42
  "directory": "packages/react"
43
43
  },
44
- "gitHead": "9f5a165b4d5de777787c1f8c2a83f2d8c2438e98"
44
+ "gitHead": "926cfcd6025c6a333ed0b53b9a687c238a9a69b3"
45
45
  }