@tiptap/extension-strike 2.5.9 → 2.6.1

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.
@@ -16,6 +16,10 @@ export declare class Editor extends EventEmitter<EditorEvents> {
16
16
  schema: Schema;
17
17
  view: EditorView;
18
18
  isFocused: boolean;
19
+ /**
20
+ * The editor is considered initialized after the `create` event has been emitted.
21
+ */
22
+ isInitialized: boolean;
19
23
  extensionStorage: Record<string, any>;
20
24
  options: EditorOptions;
21
25
  constructor(options?: Partial<EditorOptions>);
@@ -17,10 +17,10 @@ declare module '@tiptap/core' {
17
17
  */
18
18
  name: string;
19
19
  /**
20
- * The priority of your extension. The higher, the later it will be called
20
+ * The priority of your extension. The higher, the earlier it will be called
21
21
  * and will take precedence over other extensions with a lower priority.
22
- * @default 1000
23
- * @example 1001
22
+ * @default 100
23
+ * @example 101
24
24
  */
25
25
  priority?: number;
26
26
  /**
@@ -286,6 +286,7 @@ declare module '@tiptap/core' {
286
286
  editor: Editor;
287
287
  parent: ParentConfig<ExtensionConfig<Options, Storage>>['onTransaction'];
288
288
  }, props: {
289
+ editor: Editor;
289
290
  transaction: Transaction;
290
291
  }) => void) | null;
291
292
  /**
@@ -17,10 +17,10 @@ declare module '@tiptap/core' {
17
17
  */
18
18
  name: string;
19
19
  /**
20
- * The priority of your extension. The higher, the later it will be called
20
+ * The priority of your extension. The higher, the earlier it will be called
21
21
  * and will take precedence over other extensions with a lower priority.
22
- * @default 1000
23
- * @example 1001
22
+ * @default 100
23
+ * @example 101
24
24
  */
25
25
  priority?: number;
26
26
  /**
@@ -296,6 +296,7 @@ declare module '@tiptap/core' {
296
296
  type: MarkType;
297
297
  parent: ParentConfig<MarkConfig<Options, Storage>>['onTransaction'];
298
298
  }, props: {
299
+ editor: Editor;
299
300
  transaction: Transaction;
300
301
  }) => void) | null;
301
302
  /**
@@ -17,10 +17,10 @@ declare module '@tiptap/core' {
17
17
  */
18
18
  name: string;
19
19
  /**
20
- * The priority of your extension. The higher, the later it will be called
20
+ * The priority of your extension. The higher, the earlier it will be called
21
21
  * and will take precedence over other extensions with a lower priority.
22
- * @default 1000
23
- * @example 1001
22
+ * @default 100
23
+ * @example 101
24
24
  */
25
25
  priority?: number;
26
26
  /**
@@ -297,6 +297,7 @@ declare module '@tiptap/core' {
297
297
  type: NodeType;
298
298
  parent: ParentConfig<NodeConfig<Options, Storage>>['onTransaction'];
299
299
  }, props: {
300
+ editor: Editor;
300
301
  transaction: Transaction;
301
302
  }) => void) | null;
302
303
  /**
@@ -1,3 +1,4 @@
1
+ import type { Plugin, PluginKey } from '@tiptap/pm/state';
1
2
  import { RawCommands } from '../types.js';
2
3
  declare module '@tiptap/core' {
3
4
  interface Commands<ReturnType> {
@@ -8,7 +9,7 @@ declare module '@tiptap/core' {
8
9
  * @param value The value to store.
9
10
  * @example editor.commands.setMeta('foo', 'bar')
10
11
  */
11
- setMeta: (key: string, value: any) => ReturnType;
12
+ setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType;
12
13
  };
13
14
  }
14
15
  }
@@ -6,9 +6,10 @@ declare module '@tiptap/core' {
6
6
  /**
7
7
  * Splits one list item into two list items.
8
8
  * @param typeOrName The type or name of the node.
9
+ * @param overrideAttrs The attributes to ensure on the new node.
9
10
  * @example editor.commands.splitListItem('listItem')
10
11
  */
11
- splitListItem: (typeOrName: string | NodeType) => ReturnType;
12
+ splitListItem: (typeOrName: string | NodeType, overrideAttrs?: Record<string, any>) => ReturnType;
12
13
  };
13
14
  }
14
15
  }
@@ -1,6 +1,6 @@
1
1
  import { NodeType } from '@tiptap/pm/model';
2
2
  import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
3
- import { ExtendedRegExpMatchArray } from '../types.js';
3
+ import { ExtendedRegExpMatchArray, JSONContent } from '../types.js';
4
4
  /**
5
5
  * Build an paste rule that adds a node when the
6
6
  * matched text is pasted into it.
@@ -10,4 +10,5 @@ export declare function nodePasteRule(config: {
10
10
  find: PasteRuleFinder;
11
11
  type: NodeType;
12
12
  getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null;
13
+ getContent?: JSONContent[] | ((attrs: Record<string, any>) => JSONContent[]) | false | null;
13
14
  }): PasteRule;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-strike",
3
3
  "description": "strike extension for tiptap",
4
- "version": "2.5.9",
4
+ "version": "2.6.1",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -29,10 +29,10 @@
29
29
  "dist"
30
30
  ],
31
31
  "devDependencies": {
32
- "@tiptap/core": "^2.5.9"
32
+ "@tiptap/core": "^2.6.1"
33
33
  },
34
34
  "peerDependencies": {
35
- "@tiptap/core": "^2.5.9"
35
+ "@tiptap/core": "^2.6.1"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",