Skip to content

Commit 0aa0387

Browse files
committed
Expose @codemirror/lang-markdown and @codemirror/autocomplete
1 parent 8dbf1b7 commit 0aa0387

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
@@ -19,7 +19,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
1919
```json
2020
{
2121
"devDependencies": {
22-
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.13.0"
22+
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.14.0"
2323
}
2424
}
2525
```
@@ -45,7 +45,7 @@ interface MarkEdit {
4545
// Retrieves a generative language model by name.
4646
languageModel(name: LanguageModelName): LanguageModel;
4747
// CodeMirror modules used by MarkEdit.
48-
codemirror: { view, state, language, commands, search };
48+
codemirror: { view, state, language, langMarkdown, commands, search, autocomplete };
4949
// Lezer modules used by MarkEdit.
5050
lezer: { common, highlight, markdown, lr };
5151
// Get notified when the editor is initialized.

index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ import type { MarkdownConfig } from '@lezer/markdown';
1515
import type * as cmView from '@codemirror/view';
1616
import type * as cmState from '@codemirror/state';
1717
import type * as cmLanguage from '@codemirror/language';
18+
import type * as cmLangMarkdown from '@codemirror/lang-markdown';
1819
import type * as cmCommands from '@codemirror/commands';
1920
import type * as cmSearch from '@codemirror/search';
21+
import type * as cmAutocomplete from '@codemirror/autocomplete';
2022

2123
import type * as lezerCommon from '@lezer/common';
2224
import type * as lezerHighlight from '@lezer/highlight';
@@ -72,6 +74,11 @@ export interface MarkEdit {
7274
*/
7375
language: typeof cmLanguage;
7476

77+
/**
78+
* The `@codemirror/lang-markdown` module.
79+
*/
80+
langMarkdown: typeof cmLangMarkdown;
81+
7582
/**
7683
* The `@codemirror/commands` module.
7784
*/
@@ -81,6 +88,11 @@ export interface MarkEdit {
8188
* The `@codemirror/search` module.
8289
*/
8390
search: typeof cmSearch;
91+
92+
/**
93+
* The `@codemirror/autocomplete` module.
94+
*/
95+
autocomplete: typeof cmAutocomplete;
8496
};
8597

8698
/**

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"name": "markedit-api",
3-
"version": "0.13.0",
3+
"version": "0.14.0",
44
"description": "Type definitions for the latest MakrEdit API.",
55
"main": "./index.cjs",
66
"module": "./index.js",
77
"types": "./index.d.ts",
88
"license": "MIT",
99
"peerDependencies": {
10+
"@codemirror/autocomplete": "^6.0.0",
1011
"@codemirror/commands": "^6.0.0",
12+
"@codemirror/lang-markdown": "^6.0.0",
1113
"@codemirror/language": "^6.0.0",
1214
"@codemirror/search": "^6.0.0",
1315
"@codemirror/state": "^6.0.0",

0 commit comments

Comments
 (0)