@tiptap/extension-code-block-lowlight 2.3.2 → 2.4.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.
@@ -1,6 +1,18 @@
1
1
  import { CodeBlockOptions } from '@tiptap/extension-code-block';
2
2
  export interface CodeBlockLowlightOptions extends CodeBlockOptions {
3
+ /**
4
+ * The lowlight instance.
5
+ */
3
6
  lowlight: any;
7
+ /**
8
+ * The default language.
9
+ * @default null
10
+ * @example 'javascript'
11
+ */
4
12
  defaultLanguage: string | null | undefined;
5
13
  }
14
+ /**
15
+ * This extension allows you to highlight code blocks with lowlight.
16
+ * @see https://tiptap.dev/api/nodes/code-block-lowlight
17
+ */
6
18
  export declare const CodeBlockLowlight: import("@tiptap/core").Node<CodeBlockLowlightOptions, any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-code-block-lowlight",
3
3
  "description": "code block extension for tiptap",
4
- "version": "2.3.2",
4
+ "version": "2.4.0",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -29,9 +29,9 @@
29
29
  "dist"
30
30
  ],
31
31
  "devDependencies": {
32
- "@tiptap/core": "^2.3.2",
33
- "@tiptap/extension-code-block": "^2.3.2",
34
- "@tiptap/pm": "^2.3.2"
32
+ "@tiptap/core": "^2.4.0",
33
+ "@tiptap/extension-code-block": "^2.4.0",
34
+ "@tiptap/pm": "^2.4.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@tiptap/core": "^2.0.0",
@@ -3,10 +3,23 @@ import CodeBlock, { CodeBlockOptions } from '@tiptap/extension-code-block'
3
3
  import { LowlightPlugin } from './lowlight-plugin.js'
4
4
 
5
5
  export interface CodeBlockLowlightOptions extends CodeBlockOptions {
6
+ /**
7
+ * The lowlight instance.
8
+ */
6
9
  lowlight: any,
10
+
11
+ /**
12
+ * The default language.
13
+ * @default null
14
+ * @example 'javascript'
15
+ */
7
16
  defaultLanguage: string | null | undefined,
8
17
  }
9
18
 
19
+ /**
20
+ * This extension allows you to highlight code blocks with lowlight.
21
+ * @see https://tiptap.dev/api/nodes/code-block-lowlight
22
+ */
10
23
  export const CodeBlockLowlight = CodeBlock.extend<CodeBlockLowlightOptions>({
11
24
  addOptions() {
12
25
  return {