Skip to content

Commit

Permalink
Add commands and search modules back
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong committed Sep 13, 2024
1 parent 157e822 commit ea01daa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
```json
{
"devDependencies": {
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.1.0"
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.2.0"
}
}
```
Expand All @@ -38,7 +38,7 @@ interface MarkEdit {
// Add an extension to MarkEdit.
addExtension: (extension: Extension) => void;
// CodeMirror modules used by MarkEdit.
codemirror: { view, state, language };
codemirror: { view, state, language, commands, search };
// Lezer modules used by MarkEdit.
lezer: { common, highlight, lr },
}
Expand Down
12 changes: 12 additions & 0 deletions markedit.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import type { Extension } from '@codemirror/state';
import type * as cmView from '@codemirror/view';
import type * as cmState from '@codemirror/state';
import type * as cmLanguage from '@codemirror/language';
import type * as cmCommands from '@codemirror/commands';
import type * as cmSearch from '@codemirror/search';

import type * as lezerCommon from '@lezer/common';
import type * as lezerHighlight from '@lezer/highlight';
Expand Down Expand Up @@ -40,6 +42,16 @@ export interface MarkEdit {
* The `@codemirror/language` module.
*/
language: typeof cmLanguage;

/**
* The `@codemirror/commands` module.
*/
commands: typeof cmCommands;

/**
* The `@codemirror/search` module.
*/
search: typeof cmSearch;
};

/**
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "markedit-api",
"version": "0.1.0",
"version": "0.2.0",
"description": "Type definitions for the latest MakrEdit API.",
"main": "main.ts",
"types": "markedit.d.ts",
"license": "MIT",
"peerDependencies": {
"@codemirror/commands": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/search": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@lezer/common": "^1.0.0",
Expand Down

0 comments on commit ea01daa

Please sign in to comment.