@lexical/code 0.2.3 → 0.2.4
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.
- package/LexicalCode.d.ts +6 -2
- package/package.json +3 -3
package/LexicalCode.d.ts
CHANGED
|
@@ -34,7 +34,9 @@ declare class CodeNode extends ElementNode {
|
|
|
34
34
|
getLanguage(): string | void;
|
|
35
35
|
}
|
|
36
36
|
declare function $createCodeNode(): CodeNode;
|
|
37
|
-
declare function $isCodeNode(
|
|
37
|
+
declare function $isCodeNode(
|
|
38
|
+
node: null | undefined | LexicalNode,
|
|
39
|
+
): node is CodeNode;
|
|
38
40
|
|
|
39
41
|
declare function getFirstCodeHighlightNodeOfLine(
|
|
40
42
|
anchor: LexicalNode,
|
|
@@ -69,6 +71,8 @@ declare function $createCodeHighlightNode(
|
|
|
69
71
|
text: string,
|
|
70
72
|
highlightType?: string,
|
|
71
73
|
): CodeHighlightNode;
|
|
72
|
-
declare function $isCodeHighlightNode(
|
|
74
|
+
declare function $isCodeHighlightNode(
|
|
75
|
+
node: ?LexicalNode,
|
|
76
|
+
): node is CodeHighlightNode;
|
|
73
77
|
|
|
74
78
|
declare function registerCodeHighlighting(editor: LexicalEditor): () => void;
|
package/package.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"code"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.2.
|
|
11
|
+
"version": "0.2.4",
|
|
12
12
|
"main": "LexicalCode.js",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"lexical": "0.2.
|
|
14
|
+
"lexical": "0.2.4"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lexical/utils": "0.2.
|
|
17
|
+
"@lexical/utils": "0.2.4",
|
|
18
18
|
"prismjs": "^1.27.0"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|