@mdit-vue/plugin-headers 0.4.0 → 0.7.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.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/dist/index.d.ts +6 -3
- package/package.json +5 -4
- package/src/headers-plugin.ts +1 -1
- package/src/types.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.7.0](https://github.com/mdit-vue/mdit-vue/compare/v0.6.0...v0.7.0) (2022-07-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @mdit-vue/plugin-headers
|
|
9
|
+
|
|
10
|
+
# [0.6.0](https://github.com/mdit-vue/mdit-vue/compare/v0.5.0...v0.6.0) (2022-07-11)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **types:** extract types from shared package ([5fc56ce](https://github.com/mdit-vue/mdit-vue/commit/5fc56ce6439159584e09e13ca9a6e87abe8f4389))
|
|
15
|
+
|
|
16
|
+
# [0.5.0](https://github.com/mdit-vue/mdit-vue/compare/v0.4.0...v0.5.0) (2022-07-06)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @mdit-vue/plugin-headers
|
|
19
|
+
|
|
6
20
|
# [0.4.0](https://github.com/mdit-vue/mdit-vue/compare/v0.3.1...v0.4.0) (2022-07-02)
|
|
7
21
|
|
|
8
22
|
### Features
|
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ npm i @mdit-vue/plugin-headers
|
|
|
18
18
|
```ts
|
|
19
19
|
import MarkdownIt from 'markdown-it';
|
|
20
20
|
import { headersPlugin } from '@mdit-vue/plugin-headers';
|
|
21
|
+
import type { MarkdownItEnv } from '@mdit-vue/types';
|
|
21
22
|
|
|
22
23
|
const md = MarkdownIt({ html: true }).use(headersPlugin, {
|
|
23
24
|
// options
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginWithOptions } from 'markdown-it';
|
|
2
|
-
import { MarkdownItHeader } from '@mdit-vue/
|
|
3
|
-
export { MarkdownItHeader } from '@mdit-vue/
|
|
2
|
+
import { MarkdownItHeader } from '@mdit-vue/types';
|
|
3
|
+
export { MarkdownItHeader } from '@mdit-vue/types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Options of @mdit-vue/plugin-headers
|
|
@@ -27,8 +27,11 @@ interface HeadersPluginOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
level?: number[];
|
|
29
29
|
}
|
|
30
|
-
declare module '@mdit-vue/
|
|
30
|
+
declare module '@mdit-vue/types' {
|
|
31
31
|
interface MarkdownItEnv {
|
|
32
|
+
/**
|
|
33
|
+
* The headers that extracted by `@mdit-vue/plugin-headers`
|
|
34
|
+
*/
|
|
32
35
|
headers?: MarkdownItHeader[];
|
|
33
36
|
}
|
|
34
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdit-vue/plugin-headers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A markdown-it plugin to get markdown headers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown-it",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"test": "vitest"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@mdit-vue/shared": "0.
|
|
37
|
+
"@mdit-vue/shared": "0.7.0",
|
|
38
|
+
"@mdit-vue/types": "0.7.0",
|
|
38
39
|
"@types/markdown-it": "^12.2.3",
|
|
39
40
|
"markdown-it": "^13.0.1"
|
|
40
41
|
},
|
|
@@ -42,10 +43,10 @@
|
|
|
42
43
|
"c8": "^7.11.3",
|
|
43
44
|
"markdown-it-anchor": "^8.6.4",
|
|
44
45
|
"unbuild": "^0.7.4",
|
|
45
|
-
"vitest": "^0.
|
|
46
|
+
"vitest": "^0.18.1"
|
|
46
47
|
},
|
|
47
48
|
"publishConfig": {
|
|
48
49
|
"access": "public"
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "dd30ddd75ca461f775ccc35556132851ebc5e58a"
|
|
51
52
|
}
|
package/src/headers-plugin.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
slugify as defaultSlugify,
|
|
3
3
|
resolveHeadersFromTokens,
|
|
4
4
|
} from '@mdit-vue/shared';
|
|
5
|
-
import type { MarkdownItEnv, MarkdownItHeader } from '@mdit-vue/
|
|
5
|
+
import type { MarkdownItEnv, MarkdownItHeader } from '@mdit-vue/types';
|
|
6
6
|
import type { PluginWithOptions } from 'markdown-it';
|
|
7
7
|
import type { HeadersPluginOptions } from './types';
|
|
8
8
|
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MarkdownItHeader } from '@mdit-vue/
|
|
1
|
+
import type { MarkdownItHeader } from '@mdit-vue/types';
|
|
2
2
|
|
|
3
3
|
export type { MarkdownItHeader };
|
|
4
4
|
|
|
@@ -30,8 +30,11 @@ export interface HeadersPluginOptions {
|
|
|
30
30
|
level?: number[];
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
declare module '@mdit-vue/
|
|
33
|
+
declare module '@mdit-vue/types' {
|
|
34
34
|
interface MarkdownItEnv {
|
|
35
|
+
/**
|
|
36
|
+
* The headers that extracted by `@mdit-vue/plugin-headers`
|
|
37
|
+
*/
|
|
35
38
|
headers?: MarkdownItHeader[];
|
|
36
39
|
}
|
|
37
40
|
}
|