@nuxtjs/mdc 0.8.1 → 0.8.3
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/README.md +2 -2
- package/dist/config.d.mts +4 -49
- package/dist/config.d.ts +4 -49
- package/dist/module.d.mts +443 -2
- package/dist/module.d.ts +443 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -0
- package/dist/runtime/components/MDC.vue +1 -1
- package/dist/runtime/components/MDCRenderer.vue.d.ts +1 -1
- package/dist/runtime/highlighter/rehype-nuxt.d.ts +1 -1
- package/dist/runtime/highlighter/rehype.d.ts +1 -5
- package/dist/runtime/highlighter/shiki.d.ts +1 -2
- package/dist/runtime/highlighter/shiki.js +16 -6
- package/dist/runtime/parser/compiler.d.ts +1 -1
- package/dist/runtime/parser/index.d.ts +1 -1
- package/dist/runtime/parser/options.d.ts +1 -1
- package/dist/runtime/parser/toc.d.ts +1 -1
- package/dist/runtime/parser/utils/plugins.d.ts +3 -2
- package/dist/runtime/utils/ast.d.ts +1 -1
- package/dist/runtime/utils/node.d.ts +1 -1
- package/dist/shared/mdc.4762b8bc.d.mts +66 -0
- package/dist/shared/mdc.4762b8bc.d.ts +66 -0
- package/dist/types.d.mts +1 -17
- package/dist/types.d.ts +1 -17
- package/package.json +18 -17
- package/dist/shared/mdc.a6f76af4.d.mts +0 -9
- package/dist/shared/mdc.a6f76af4.d.ts +0 -9
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ This component will take the result of [`parseMarkdown`](#parsing-markdown) func
|
|
|
76
76
|
<script setup lang="ts">
|
|
77
77
|
import { parseMarkdown } from '@nuxtjs/mdc/runtime'
|
|
78
78
|
|
|
79
|
-
const ast = await useAsyncData('markdown', () => parseMarkdown('::alert\nMissing markdown input\n::'))
|
|
79
|
+
const { data: ast } = await useAsyncData('markdown', () => parseMarkdown('::alert\nMissing markdown input\n::'))
|
|
80
80
|
</script>
|
|
81
81
|
|
|
82
82
|
<template>
|
|
@@ -196,7 +196,7 @@ The `parseMarkdown` function is a universal helper, and you can also use it in t
|
|
|
196
196
|
<script setup lang="ts">
|
|
197
197
|
import { parseMarkdown } from '@nuxtjs/mdc/runtime'
|
|
198
198
|
|
|
199
|
-
const ast = await useAsyncData('markdown', () => parseMarkdown('::alert\nMissing markdown input\n::'))
|
|
199
|
+
const { data: ast } = await useAsyncData('markdown', () => parseMarkdown('::alert\nMissing markdown input\n::'))
|
|
200
200
|
</script>
|
|
201
201
|
|
|
202
202
|
<template>
|
package/dist/config.d.mts
CHANGED
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
type Awaitable<T> = T | Promise<T>;
|
|
6
|
-
interface MdcConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Hooks for the unified markdown pipeline
|
|
9
|
-
*/
|
|
10
|
-
unified?: {
|
|
11
|
-
/**
|
|
12
|
-
* Custom setup for unified processor before other plugins
|
|
13
|
-
*/
|
|
14
|
-
pre?: (processor: Processor) => Awaitable<void | Processor>;
|
|
15
|
-
/**
|
|
16
|
-
* Custom setup for unified processor after remark but before rehype
|
|
17
|
-
*/
|
|
18
|
-
remark?: (processor: Processor) => Awaitable<void | Processor>;
|
|
19
|
-
/**
|
|
20
|
-
* Custom setup for unified processor after rehype
|
|
21
|
-
*/
|
|
22
|
-
rehype?: (processor: Processor) => Awaitable<void | Processor>;
|
|
23
|
-
/**
|
|
24
|
-
* Custom setup for unified processor after all plugins
|
|
25
|
-
*/
|
|
26
|
-
post?: (processor: Processor) => Awaitable<void | Processor>;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Custom hightlighter, available when `highlighter` is set to `custom`
|
|
30
|
-
*/
|
|
31
|
-
highlighter?: Highlighter;
|
|
32
|
-
/**
|
|
33
|
-
* Hooks for shiki
|
|
34
|
-
*/
|
|
35
|
-
shiki?: {
|
|
36
|
-
/**
|
|
37
|
-
* Get transformers for shiki
|
|
38
|
-
*/
|
|
39
|
-
transformers?: ShikiTransformer[] | ((code: string, lang: string, theme: MdcThemeOptions, options: Partial<HighlighterOptions>) => Awaitable<ShikiTransformer[]>);
|
|
40
|
-
/**
|
|
41
|
-
* Custom setup for shiki instance, only called once on server or client
|
|
42
|
-
*/
|
|
43
|
-
setup?: (highlighter: HighlighterCore) => Awaitable<void>;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare function defineConfig(config: MdcConfig): MdcConfig;
|
|
48
|
-
|
|
49
|
-
export { defineConfig };
|
|
1
|
+
export { d as defineConfig } from './shared/mdc.4762b8bc.mjs';
|
|
2
|
+
import 'shiki';
|
|
3
|
+
import 'unified';
|
|
4
|
+
import 'hast';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
type Awaitable<T> = T | Promise<T>;
|
|
6
|
-
interface MdcConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Hooks for the unified markdown pipeline
|
|
9
|
-
*/
|
|
10
|
-
unified?: {
|
|
11
|
-
/**
|
|
12
|
-
* Custom setup for unified processor before other plugins
|
|
13
|
-
*/
|
|
14
|
-
pre?: (processor: Processor) => Awaitable<void | Processor>;
|
|
15
|
-
/**
|
|
16
|
-
* Custom setup for unified processor after remark but before rehype
|
|
17
|
-
*/
|
|
18
|
-
remark?: (processor: Processor) => Awaitable<void | Processor>;
|
|
19
|
-
/**
|
|
20
|
-
* Custom setup for unified processor after rehype
|
|
21
|
-
*/
|
|
22
|
-
rehype?: (processor: Processor) => Awaitable<void | Processor>;
|
|
23
|
-
/**
|
|
24
|
-
* Custom setup for unified processor after all plugins
|
|
25
|
-
*/
|
|
26
|
-
post?: (processor: Processor) => Awaitable<void | Processor>;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Custom hightlighter, available when `highlighter` is set to `custom`
|
|
30
|
-
*/
|
|
31
|
-
highlighter?: Highlighter;
|
|
32
|
-
/**
|
|
33
|
-
* Hooks for shiki
|
|
34
|
-
*/
|
|
35
|
-
shiki?: {
|
|
36
|
-
/**
|
|
37
|
-
* Get transformers for shiki
|
|
38
|
-
*/
|
|
39
|
-
transformers?: ShikiTransformer[] | ((code: string, lang: string, theme: MdcThemeOptions, options: Partial<HighlighterOptions>) => Awaitable<ShikiTransformer[]>);
|
|
40
|
-
/**
|
|
41
|
-
* Custom setup for shiki instance, only called once on server or client
|
|
42
|
-
*/
|
|
43
|
-
setup?: (highlighter: HighlighterCore) => Awaitable<void>;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare function defineConfig(config: MdcConfig): MdcConfig;
|
|
48
|
-
|
|
49
|
-
export { defineConfig };
|
|
1
|
+
export { d as defineConfig } from './shared/mdc.4762b8bc.js';
|
|
2
|
+
import 'shiki';
|
|
3
|
+
import 'unified';
|
|
4
|
+
import 'hast';
|
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,84 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { BundledLanguage, LanguageRegistration, BundledTheme, ThemeRegistrationAny } from 'shiki';
|
|
3
|
-
import {
|
|
3
|
+
import { Options } from 'remark-rehype';
|
|
4
|
+
import { R as RehypeHighlightOption, M as MdcConfig, a as MdcThemeOptions } from './shared/mdc.4762b8bc.mjs';
|
|
5
|
+
export { A as Awaitable, b as HighlightResult, c as Highlighter, H as HighlighterOptions, d as defineConfig } from './shared/mdc.4762b8bc.mjs';
|
|
6
|
+
import 'unified';
|
|
7
|
+
import 'hast';
|
|
8
|
+
|
|
9
|
+
type MDCText = {
|
|
10
|
+
type: 'text';
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
type MDCComment = {
|
|
14
|
+
type: 'comment';
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
type MDCElement = {
|
|
18
|
+
type: 'element';
|
|
19
|
+
tag: string;
|
|
20
|
+
props: Record<string, any> | undefined;
|
|
21
|
+
children: Array<MDCElement | MDCText | MDCComment>;
|
|
22
|
+
};
|
|
23
|
+
type MDCNode = MDCElement | MDCText | MDCComment;
|
|
24
|
+
type MDCRoot = {
|
|
25
|
+
type: 'root';
|
|
26
|
+
children: Array<MDCNode>;
|
|
27
|
+
};
|
|
28
|
+
interface MDCData extends Record<string, any> {
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface TocLink {
|
|
34
|
+
id: string;
|
|
35
|
+
text: string;
|
|
36
|
+
depth: number;
|
|
37
|
+
children?: TocLink[];
|
|
38
|
+
}
|
|
39
|
+
interface Toc {
|
|
40
|
+
title: string;
|
|
41
|
+
depth: number;
|
|
42
|
+
searchDepth: number;
|
|
43
|
+
links: TocLink[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface RemarkPlugin {
|
|
47
|
+
instance?: any;
|
|
48
|
+
options?: Array<any> | Record<string, any>;
|
|
49
|
+
}
|
|
50
|
+
interface RehypePlugin {
|
|
51
|
+
instance?: any;
|
|
52
|
+
options?: Array<any> | Record<string, any>;
|
|
53
|
+
}
|
|
54
|
+
interface MDCParseOptions {
|
|
55
|
+
remark?: {
|
|
56
|
+
plugins?: Record<string, false | RemarkPlugin>;
|
|
57
|
+
};
|
|
58
|
+
rehype?: {
|
|
59
|
+
options?: Options;
|
|
60
|
+
plugins?: Record<string, false | RehypePlugin>;
|
|
61
|
+
};
|
|
62
|
+
highlight?: RehypeHighlightOption | false;
|
|
63
|
+
toc?: {
|
|
64
|
+
/**
|
|
65
|
+
* Maximum heading depth to include in the table of contents.
|
|
66
|
+
*/
|
|
67
|
+
depth?: number;
|
|
68
|
+
searchDepth?: number;
|
|
69
|
+
};
|
|
70
|
+
keepComments?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Inline mdc.config.ts
|
|
73
|
+
*/
|
|
74
|
+
configs?: MdcConfig[];
|
|
75
|
+
}
|
|
76
|
+
interface MDCParserResult {
|
|
77
|
+
data: MDCData;
|
|
78
|
+
body: MDCRoot;
|
|
79
|
+
excerpt: MDCRoot | undefined;
|
|
80
|
+
toc: Toc | undefined;
|
|
81
|
+
}
|
|
4
82
|
|
|
5
83
|
interface UnistPlugin {
|
|
6
84
|
src?: string;
|
|
@@ -69,6 +147,369 @@ interface ModuleOptions {
|
|
|
69
147
|
};
|
|
70
148
|
}
|
|
71
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Info associated with nodes by the ecosystem.
|
|
152
|
+
*
|
|
153
|
+
* This space is guaranteed to never be specified by unist or specifications
|
|
154
|
+
* implementing unist.
|
|
155
|
+
* But you can use it in utilities and plugins to store data.
|
|
156
|
+
*
|
|
157
|
+
* This type can be augmented to register custom data.
|
|
158
|
+
* For example:
|
|
159
|
+
*
|
|
160
|
+
* ```ts
|
|
161
|
+
* declare module 'unist' {
|
|
162
|
+
* interface Data {
|
|
163
|
+
* // `someNode.data.myId` is typed as `number | undefined`
|
|
164
|
+
* myId?: number | undefined
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
interface Data$1 {
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* One place in a source file.
|
|
173
|
+
*/
|
|
174
|
+
interface Point {
|
|
175
|
+
/**
|
|
176
|
+
* Line in a source file (1-indexed integer).
|
|
177
|
+
*/
|
|
178
|
+
line: number;
|
|
179
|
+
/**
|
|
180
|
+
* Column in a source file (1-indexed integer).
|
|
181
|
+
*/
|
|
182
|
+
column: number;
|
|
183
|
+
/**
|
|
184
|
+
* Character in a source file (0-indexed integer).
|
|
185
|
+
*/
|
|
186
|
+
offset?: number | undefined;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Position of a node in a source document.
|
|
190
|
+
*
|
|
191
|
+
* A position is a range between two points.
|
|
192
|
+
*/
|
|
193
|
+
interface Position {
|
|
194
|
+
/**
|
|
195
|
+
* Place of the first character of the parsed source region.
|
|
196
|
+
*/
|
|
197
|
+
start: Point;
|
|
198
|
+
/**
|
|
199
|
+
* Place of the first character after the parsed source region.
|
|
200
|
+
*/
|
|
201
|
+
end: Point;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Abstract unist node that contains the smallest possible value.
|
|
205
|
+
*
|
|
206
|
+
* This interface is supposed to be extended.
|
|
207
|
+
*
|
|
208
|
+
* For example, in HTML, a `text` node is a leaf that contains text.
|
|
209
|
+
*/
|
|
210
|
+
interface Literal$1 extends Node$1 {
|
|
211
|
+
/**
|
|
212
|
+
* Plain value.
|
|
213
|
+
*/
|
|
214
|
+
value: unknown;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Abstract unist node.
|
|
218
|
+
*
|
|
219
|
+
* The syntactic unit in unist syntax trees are called nodes.
|
|
220
|
+
*
|
|
221
|
+
* This interface is supposed to be extended.
|
|
222
|
+
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
223
|
+
* But for example in markdown, a `thematicBreak` (`***`), is neither literal
|
|
224
|
+
* nor parent, but still a node.
|
|
225
|
+
*/
|
|
226
|
+
interface Node$1 {
|
|
227
|
+
/**
|
|
228
|
+
* Node type.
|
|
229
|
+
*/
|
|
230
|
+
type: string;
|
|
231
|
+
/**
|
|
232
|
+
* Info from the ecosystem.
|
|
233
|
+
*/
|
|
234
|
+
data?: Data$1 | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Position of a node in a source document.
|
|
237
|
+
*
|
|
238
|
+
* Nodes that are generated (not in the original source document) must not
|
|
239
|
+
* have a position.
|
|
240
|
+
*/
|
|
241
|
+
position?: Position | undefined;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Abstract unist node that contains other nodes (*children*).
|
|
245
|
+
*
|
|
246
|
+
* This interface is supposed to be extended.
|
|
247
|
+
*
|
|
248
|
+
* For example, in XML, an element is a parent of different things, such as
|
|
249
|
+
* comments, text, and further elements.
|
|
250
|
+
*/
|
|
251
|
+
interface Parent$1 extends Node$1 {
|
|
252
|
+
/**
|
|
253
|
+
* List of children.
|
|
254
|
+
*/
|
|
255
|
+
children: Node$1[];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Info associated with hast nodes by the ecosystem.
|
|
260
|
+
*
|
|
261
|
+
* This space is guaranteed to never be specified by unist or hast.
|
|
262
|
+
* But you can use it in utilities and plugins to store data.
|
|
263
|
+
*
|
|
264
|
+
* This type can be augmented to register custom data.
|
|
265
|
+
* For example:
|
|
266
|
+
*
|
|
267
|
+
* ```ts
|
|
268
|
+
* declare module 'hast' {
|
|
269
|
+
* interface Data {
|
|
270
|
+
* // `someNode.data.myId` is typed as `number | undefined`
|
|
271
|
+
* myId?: number | undefined
|
|
272
|
+
* }
|
|
273
|
+
* }
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
interface Data extends Data$1 {
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Info associated with an element.
|
|
280
|
+
*/
|
|
281
|
+
interface Properties {
|
|
282
|
+
[PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Union of registered hast nodes that can occur in {@link Element}.
|
|
286
|
+
*
|
|
287
|
+
* To register mote custom hast nodes, add them to {@link ElementContentMap}.
|
|
288
|
+
* They will be automatically added here.
|
|
289
|
+
*/
|
|
290
|
+
type ElementContent = ElementContentMap[keyof ElementContentMap];
|
|
291
|
+
/**
|
|
292
|
+
* Registry of all hast nodes that can occur as children of {@link Element}.
|
|
293
|
+
*
|
|
294
|
+
* For a union of all {@link Element} children, see {@link ElementContent}.
|
|
295
|
+
*/
|
|
296
|
+
interface ElementContentMap {
|
|
297
|
+
comment: Comment;
|
|
298
|
+
element: Element;
|
|
299
|
+
text: Text;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Union of registered hast nodes that can occur in {@link Root}.
|
|
303
|
+
*
|
|
304
|
+
* To register custom hast nodes, add them to {@link RootContentMap}.
|
|
305
|
+
* They will be automatically added here.
|
|
306
|
+
*/
|
|
307
|
+
type RootContent = RootContentMap[keyof RootContentMap];
|
|
308
|
+
/**
|
|
309
|
+
* Registry of all hast nodes that can occur as children of {@link Root}.
|
|
310
|
+
*
|
|
311
|
+
* > 👉 **Note**: {@link Root} does not need to be an entire document.
|
|
312
|
+
* > it can also be a fragment.
|
|
313
|
+
*
|
|
314
|
+
* For a union of all {@link Root} children, see {@link RootContent}.
|
|
315
|
+
*/
|
|
316
|
+
interface RootContentMap {
|
|
317
|
+
comment: Comment;
|
|
318
|
+
doctype: Doctype;
|
|
319
|
+
element: Element;
|
|
320
|
+
text: Text;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Union of registered hast nodes that can occur in {@link Root}.
|
|
324
|
+
*
|
|
325
|
+
* @deprecated Use {@link RootContent} instead.
|
|
326
|
+
*/
|
|
327
|
+
type Content = RootContent;
|
|
328
|
+
/**
|
|
329
|
+
* Union of registered hast literals.
|
|
330
|
+
*
|
|
331
|
+
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
|
332
|
+
* places where relevant.
|
|
333
|
+
* They will be automatically added here.
|
|
334
|
+
*/
|
|
335
|
+
type Literals = Extract<Nodes, Literal$1>;
|
|
336
|
+
/**
|
|
337
|
+
* Union of registered hast nodes.
|
|
338
|
+
*
|
|
339
|
+
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
|
340
|
+
* places where relevant.
|
|
341
|
+
* They will be automatically added here.
|
|
342
|
+
*/
|
|
343
|
+
type Nodes = Root | RootContent;
|
|
344
|
+
/**
|
|
345
|
+
* Union of registered hast parents.
|
|
346
|
+
*
|
|
347
|
+
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
|
348
|
+
* places where relevant.
|
|
349
|
+
* They will be automatically added here.
|
|
350
|
+
*/
|
|
351
|
+
type Parents = Extract<Nodes, Parent$1>;
|
|
352
|
+
/**
|
|
353
|
+
* Abstract hast node.
|
|
354
|
+
*
|
|
355
|
+
* This interface is supposed to be extended.
|
|
356
|
+
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
357
|
+
* But for example in HTML, a `Doctype` is neither literal nor parent, but
|
|
358
|
+
* still a node.
|
|
359
|
+
*
|
|
360
|
+
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
|
361
|
+
* places where relevant (such as {@link ElementContentMap}).
|
|
362
|
+
*
|
|
363
|
+
* For a union of all registered hast nodes, see {@link Nodes}.
|
|
364
|
+
*/
|
|
365
|
+
interface Node extends Node$1 {
|
|
366
|
+
/**
|
|
367
|
+
* Info from the ecosystem.
|
|
368
|
+
*/
|
|
369
|
+
data?: Data | undefined;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Abstract hast node that contains the smallest possible value.
|
|
373
|
+
*
|
|
374
|
+
* This interface is supposed to be extended if you make custom hast nodes.
|
|
375
|
+
*
|
|
376
|
+
* For a union of all registered hast literals, see {@link Literals}.
|
|
377
|
+
*/
|
|
378
|
+
interface Literal extends Node {
|
|
379
|
+
/**
|
|
380
|
+
* Plain-text value.
|
|
381
|
+
*/
|
|
382
|
+
value: string;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Abstract hast node that contains other hast nodes (*children*).
|
|
386
|
+
*
|
|
387
|
+
* This interface is supposed to be extended if you make custom hast nodes.
|
|
388
|
+
*
|
|
389
|
+
* For a union of all registered hast parents, see {@link Parents}.
|
|
390
|
+
*/
|
|
391
|
+
interface Parent extends Node {
|
|
392
|
+
/**
|
|
393
|
+
* List of children.
|
|
394
|
+
*/
|
|
395
|
+
children: RootContent[];
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* HTML comment.
|
|
399
|
+
*/
|
|
400
|
+
interface Comment extends Literal {
|
|
401
|
+
/**
|
|
402
|
+
* Node type of HTML comments in hast.
|
|
403
|
+
*/
|
|
404
|
+
type: 'comment';
|
|
405
|
+
/**
|
|
406
|
+
* Data associated with the comment.
|
|
407
|
+
*/
|
|
408
|
+
data?: CommentData | undefined;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Info associated with hast comments by the ecosystem.
|
|
412
|
+
*/
|
|
413
|
+
interface CommentData extends Data {
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* HTML document type.
|
|
417
|
+
*/
|
|
418
|
+
interface Doctype extends Node$1 {
|
|
419
|
+
/**
|
|
420
|
+
* Node type of HTML document types in hast.
|
|
421
|
+
*/
|
|
422
|
+
type: 'doctype';
|
|
423
|
+
/**
|
|
424
|
+
* Data associated with the doctype.
|
|
425
|
+
*/
|
|
426
|
+
data?: DoctypeData | undefined;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Info associated with hast doctypes by the ecosystem.
|
|
430
|
+
*/
|
|
431
|
+
interface DoctypeData extends Data {
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* HTML element.
|
|
435
|
+
*/
|
|
436
|
+
interface Element extends Parent {
|
|
437
|
+
/**
|
|
438
|
+
* Node type of elements.
|
|
439
|
+
*/
|
|
440
|
+
type: 'element';
|
|
441
|
+
/**
|
|
442
|
+
* Tag name (such as `'body'`) of the element.
|
|
443
|
+
*/
|
|
444
|
+
tagName: string;
|
|
445
|
+
/**
|
|
446
|
+
* Info associated with the element.
|
|
447
|
+
*/
|
|
448
|
+
properties: Properties;
|
|
449
|
+
/**
|
|
450
|
+
* Children of element.
|
|
451
|
+
*/
|
|
452
|
+
children: ElementContent[];
|
|
453
|
+
/**
|
|
454
|
+
* When the `tagName` field is `'template'`, a `content` field can be
|
|
455
|
+
* present.
|
|
456
|
+
*/
|
|
457
|
+
content?: Root | undefined;
|
|
458
|
+
/**
|
|
459
|
+
* Data associated with the element.
|
|
460
|
+
*/
|
|
461
|
+
data?: ElementData | undefined;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Info associated with hast elements by the ecosystem.
|
|
465
|
+
*/
|
|
466
|
+
interface ElementData extends Data {
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Document fragment or a whole document.
|
|
470
|
+
*
|
|
471
|
+
* Should be used as the root of a tree and must not be used as a child.
|
|
472
|
+
*
|
|
473
|
+
* Can also be used as the value for the content field on a `'template'` element.
|
|
474
|
+
*/
|
|
475
|
+
interface Root extends Parent {
|
|
476
|
+
/**
|
|
477
|
+
* Node type of hast root.
|
|
478
|
+
*/
|
|
479
|
+
type: 'root';
|
|
480
|
+
/**
|
|
481
|
+
* Children of root.
|
|
482
|
+
*/
|
|
483
|
+
children: RootContent[];
|
|
484
|
+
/**
|
|
485
|
+
* Data associated with the hast root.
|
|
486
|
+
*/
|
|
487
|
+
data?: RootData | undefined;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Info associated with hast root nodes by the ecosystem.
|
|
491
|
+
*/
|
|
492
|
+
interface RootData extends Data {
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* HTML character data (plain text).
|
|
496
|
+
*/
|
|
497
|
+
interface Text extends Literal {
|
|
498
|
+
/**
|
|
499
|
+
* Node type of HTML character data (plain text) in hast.
|
|
500
|
+
*/
|
|
501
|
+
type: 'text';
|
|
502
|
+
/**
|
|
503
|
+
* Data associated with the text.
|
|
504
|
+
*/
|
|
505
|
+
data?: TextData | undefined;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Info associated with hast texts by the ecosystem.
|
|
509
|
+
*/
|
|
510
|
+
interface TextData extends Data {
|
|
511
|
+
}
|
|
512
|
+
|
|
72
513
|
declare const DefaultHighlightLangs: BundledLanguage[];
|
|
73
514
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
74
515
|
|
|
@@ -101,4 +542,4 @@ declare module '@nuxt/schema' {
|
|
|
101
542
|
}
|
|
102
543
|
}
|
|
103
544
|
|
|
104
|
-
export { DefaultHighlightLangs, type ModuleOptions, type UnistPlugin, _default as default };
|
|
545
|
+
export { type Comment, type CommentData, type Content, type Data, DefaultHighlightLangs, type Doctype, type DoctypeData, type Element, type ElementContent, type ElementContentMap, type ElementData, type Literal, type Literals, type MDCComment, type MDCData, type MDCElement, type MDCNode, type MDCParseOptions, type MDCParserResult, type MDCRoot, type MDCText, MdcConfig, MdcThemeOptions, type ModuleOptions, type Node, type Nodes, type Parent, type Parents, type Properties, RehypeHighlightOption, type RehypePlugin, type RemarkPlugin, type Root, type RootContent, type RootContentMap, type RootData, type Text, type TextData, type Toc, type TocLink, type UnistPlugin, _default as default };
|