Skip to content

Commit ea01daa

Browse files
committed
Add commands and search modules back
1 parent 157e822 commit ea01daa

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
1616
```json
1717
{
1818
"devDependencies": {
19-
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.1.0"
19+
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.2.0"
2020
}
2121
}
2222
```
@@ -38,7 +38,7 @@ interface MarkEdit {
3838
// Add an extension to MarkEdit.
3939
addExtension: (extension: Extension) => void;
4040
// CodeMirror modules used by MarkEdit.
41-
codemirror: { view, state, language };
41+
codemirror: { view, state, language, commands, search };
4242
// Lezer modules used by MarkEdit.
4343
lezer: { common, highlight, lr },
4444
}

markedit.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import type { Extension } from '@codemirror/state';
44
import type * as cmView from '@codemirror/view';
55
import type * as cmState from '@codemirror/state';
66
import type * as cmLanguage from '@codemirror/language';
7+
import type * as cmCommands from '@codemirror/commands';
8+
import type * as cmSearch from '@codemirror/search';
79

810
import type * as lezerCommon from '@lezer/common';
911
import type * as lezerHighlight from '@lezer/highlight';
@@ -40,6 +42,16 @@ export interface MarkEdit {
4042
* The `@codemirror/language` module.
4143
*/
4244
language: typeof cmLanguage;
45+
46+
/**
47+
* The `@codemirror/commands` module.
48+
*/
49+
commands: typeof cmCommands;
50+
51+
/**
52+
* The `@codemirror/search` module.
53+
*/
54+
search: typeof cmSearch;
4355
};
4456

4557
/**

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "markedit-api",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Type definitions for the latest MakrEdit API.",
55
"main": "main.ts",
66
"types": "markedit.d.ts",
77
"license": "MIT",
88
"peerDependencies": {
9+
"@codemirror/commands": "^6.0.0",
910
"@codemirror/language": "^6.0.0",
11+
"@codemirror/search": "^6.0.0",
1012
"@codemirror/state": "^6.0.0",
1113
"@codemirror/view": "^6.0.0",
1214
"@lezer/common": "^1.0.0",

0 commit comments

Comments
 (0)