@nuxtjs/mdc 0.16.1 → 0.17.1

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.
Files changed (67) hide show
  1. package/README.md +8 -8
  2. package/dist/config.d.mts +1 -1
  3. package/dist/module.d.mts +18 -39
  4. package/dist/module.json +3 -3
  5. package/dist/module.mjs +11 -6
  6. package/dist/runtime/components/MDC.vue +25 -33
  7. package/dist/runtime/components/MDC.vue.d.ts +140 -0
  8. package/dist/runtime/components/MDCCached.vue +117 -0
  9. package/dist/runtime/components/MDCCached.vue.d.ts +155 -0
  10. package/dist/runtime/components/MDCRenderer.vue +19 -13
  11. package/dist/runtime/components/MDCRenderer.vue.d.ts +11 -123
  12. package/dist/runtime/components/MDCSlot.vue.d.ts +2 -2
  13. package/dist/runtime/components/prose/ProseA.vue +5 -7
  14. package/dist/runtime/components/prose/ProseA.vue.d.ts +36 -0
  15. package/dist/runtime/components/prose/ProseBlockquote.vue.d.ts +12 -0
  16. package/dist/runtime/components/prose/ProseCode.vue.d.ts +12 -0
  17. package/dist/runtime/components/prose/ProseEm.vue.d.ts +12 -0
  18. package/dist/runtime/components/prose/ProseH1.vue +7 -7
  19. package/dist/runtime/components/prose/ProseH1.vue.d.ts +17 -0
  20. package/dist/runtime/components/prose/ProseH2.vue +7 -7
  21. package/dist/runtime/components/prose/ProseH2.vue.d.ts +17 -0
  22. package/dist/runtime/components/prose/ProseH3.vue +7 -7
  23. package/dist/runtime/components/prose/ProseH3.vue.d.ts +17 -0
  24. package/dist/runtime/components/prose/ProseH4.vue +7 -7
  25. package/dist/runtime/components/prose/ProseH4.vue.d.ts +17 -0
  26. package/dist/runtime/components/prose/ProseH5.vue +7 -7
  27. package/dist/runtime/components/prose/ProseH5.vue.d.ts +17 -0
  28. package/dist/runtime/components/prose/ProseH6.vue +7 -7
  29. package/dist/runtime/components/prose/ProseH6.vue.d.ts +17 -0
  30. package/dist/runtime/components/prose/ProseHr.vue.d.ts +2 -0
  31. package/dist/runtime/components/prose/ProseImg.vue +15 -18
  32. package/dist/runtime/components/prose/ProseImg.vue.d.ts +41 -0
  33. package/dist/runtime/components/prose/ProseLi.vue.d.ts +12 -0
  34. package/dist/runtime/components/prose/ProseOl.vue.d.ts +12 -0
  35. package/dist/runtime/components/prose/ProseP.vue.d.ts +12 -0
  36. package/dist/runtime/components/prose/ProsePre.vue +4 -4
  37. package/dist/runtime/components/prose/ProsePre.vue.d.ts +69 -0
  38. package/dist/runtime/components/prose/ProseScript.vue +4 -4
  39. package/dist/runtime/components/prose/ProseScript.vue.d.ts +14 -0
  40. package/dist/runtime/components/prose/ProseStrong.vue.d.ts +12 -0
  41. package/dist/runtime/components/prose/ProseTable.vue.d.ts +12 -0
  42. package/dist/runtime/components/prose/ProseTbody.vue.d.ts +12 -0
  43. package/dist/runtime/components/prose/ProseTd.vue.d.ts +12 -0
  44. package/dist/runtime/components/prose/ProseTh.vue.d.ts +12 -0
  45. package/dist/runtime/components/prose/ProseThead.vue.d.ts +12 -0
  46. package/dist/runtime/components/prose/ProseTr.vue.d.ts +12 -0
  47. package/dist/runtime/components/prose/ProseUl.vue.d.ts +12 -0
  48. package/dist/runtime/highlighter/shiki.d.ts +1 -1
  49. package/dist/runtime/highlighter/shiki.js +9 -6
  50. package/dist/runtime/index.d.ts +1 -0
  51. package/dist/runtime/index.js +1 -0
  52. package/dist/runtime/parser/cached.d.ts +2 -0
  53. package/dist/runtime/parser/cached.js +44 -0
  54. package/dist/runtime/parser/compiler.js +11 -9
  55. package/dist/runtime/parser/handlers/utils.js +6 -2
  56. package/dist/runtime/parser/index.js +9 -5
  57. package/dist/runtime/stringify/index.d.ts +1 -1
  58. package/dist/runtime/stringify/mdc-remark.js +50 -14
  59. package/dist/runtime/utils/slot.d.ts +1 -1
  60. package/dist/shared/{mdc.86c0ccda.d.ts → mdc.BkZUOs7X.d.mts} +3 -18
  61. package/dist/types.d.mts +3 -5
  62. package/package.json +36 -38
  63. package/dist/config.d.ts +0 -4
  64. package/dist/module.cjs +0 -5
  65. package/dist/module.d.ts +0 -603
  66. package/dist/shared/mdc.86c0ccda.d.mts +0 -82
  67. package/dist/types.d.ts +0 -7
package/dist/module.d.ts DELETED
@@ -1,603 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import type { BundledLanguage, BundledTheme, LanguageRegistration, ThemeRegistrationAny } from 'shiki';
3
- import type { Options } from 'remark-rehype';
4
- import type { M as MdcConfig, R as RehypeHighlightOption, a as MdcThemeOptions } from './shared/mdc.86c0ccda.js';
5
- export { A as Awaitable, b as HighlightResult, c as Highlighter, H as HighlighterOptions, d as defineConfig } from './shared/mdc.86c0ccda.js';
6
- import type { Options as Options$1 } from 'remark-stringify';
7
- import 'unified';
8
- import 'hast';
9
-
10
- type MDCText = {
11
- type: 'text';
12
- value: string;
13
- };
14
- type MDCComment = {
15
- type: 'comment';
16
- value: string;
17
- };
18
- type MDCElement = {
19
- type: 'element';
20
- tag: string;
21
- props: Record<string, any> | undefined;
22
- children: Array<MDCElement | MDCText | MDCComment>;
23
- };
24
- type MDCNode = MDCElement | MDCText | MDCComment;
25
- type MDCRoot = {
26
- type: 'root';
27
- children: Array<MDCNode>;
28
- };
29
- interface MDCData extends Record<string, any> {
30
- title: string;
31
- description: string;
32
- }
33
-
34
- interface TocLink {
35
- id: string;
36
- text: string;
37
- depth: number;
38
- children?: TocLink[];
39
- }
40
- interface Toc {
41
- title: string;
42
- depth: number;
43
- searchDepth: number;
44
- links: TocLink[];
45
- }
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
- interface RemarkPlugin {
56
- instance?: any;
57
- options?: Array<any> | Record<string, any>;
58
- }
59
- interface RehypePlugin {
60
- instance?: any;
61
- options?: Array<any> | Record<string, any>;
62
- }
63
- interface MDCParseOptions {
64
- remark?: {
65
- plugins?: Record<string, false | RemarkPlugin>;
66
- };
67
- rehype?: {
68
- options?: Options;
69
- plugins?: Record<string, false | RehypePlugin>;
70
- };
71
- highlight?: RehypeHighlightOption | false;
72
- toc?: {
73
- /**
74
- * Maximum heading depth to include in the table of contents.
75
- */
76
- depth?: number;
77
- searchDepth?: number;
78
- } | false;
79
- keepComments?: boolean;
80
- /**
81
- * Extract content heading from the markdown file.
82
- *
83
- * @default true
84
- */
85
- contentHeading?: boolean;
86
- /**
87
- * Inline mdc.config.ts
88
- */
89
- configs?: MdcConfig[];
90
- }
91
- interface MDCParserResult {
92
- data: MDCData;
93
- body: MDCRoot;
94
- excerpt: MDCRoot | undefined;
95
- toc: Toc | undefined;
96
- }
97
-
98
-
99
-
100
- interface MDCStringifyOptions {
101
- plugins?: {
102
- remarkStringify?: {
103
- options?: Options$1;
104
- };
105
- };
106
- }
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- interface UnistPlugin {
118
- src?: string;
119
- options?: Record<string, any>;
120
- }
121
- interface ModuleOptions {
122
- /**
123
- * A map of remark plugins to be used for processing markdown.
124
- */
125
- remarkPlugins?: Record<string, UnistPlugin | false>;
126
- /**
127
- * A map of remark plugins to be used for processing markdown.
128
- */
129
- rehypePlugins?: Record<string, UnistPlugin | false>;
130
- highlight?: {
131
- /**
132
- * The highlighter to be used for highlighting code blocks.
133
- *
134
- * Set to `custom` to provide your own highlighter function in `mdc.config.ts`.
135
- * Set to `shiki` to use the builtin highlighter based on Shiki.
136
- * Or provide the path to your own highlighter module with the default export.
137
- *
138
- * @default 'shiki'
139
- */
140
- highlighter?: 'shiki' | 'custom' | string;
141
- /**
142
- * Default theme that will be used for highlighting code blocks.
143
- */
144
- theme?: MdcThemeOptions;
145
- /**
146
- * Languages to be bundled loaded by Shiki
147
- *
148
- * All languages used has to be included in this list at build time, to create granular bundles.
149
- *
150
- * Unlike the `preload` option, when this option is provided, it will override the default languages.
151
- *
152
- * @default ['js','jsx','json','ts','tsx','vue','css','html','bash','md','mdc','yaml']
153
- */
154
- langs?: (BundledLanguage | LanguageRegistration)[];
155
- /**
156
- * Additional themes to be bundled loaded by Shiki
157
- */
158
- themes?: (BundledTheme | ThemeRegistrationAny)[];
159
- /**
160
- * Engine to be used for Shiki
161
- *
162
- * Note that the `javascript` engine still in experimental, use with caution.
163
- *
164
- * @see https://shiki.style/guide/regex-engines
165
- * @default 'oniguruma'
166
- */
167
- shikiEngine?: 'oniguruma' | 'javascript';
168
- /**
169
- * Preloaded languages that will be available for highlighting code blocks.
170
- *
171
- * @deprecated use `langs` instead.
172
- */
173
- preload?: string[];
174
- /**
175
- * Inject background color to code block wrapper
176
- *
177
- * @default false
178
- */
179
- wrapperStyle?: boolean | string;
180
- noApiRoute?: boolean;
181
- } | false;
182
- headings?: {
183
- anchorLinks?: {
184
- [heading in 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6']?: boolean;
185
- } | boolean;
186
- };
187
- keepComments?: boolean;
188
- components?: {
189
- prose?: boolean;
190
- map?: Record<string, string>;
191
- };
192
- }
193
-
194
- /**
195
- * Info associated with nodes by the ecosystem.
196
- *
197
- * This space is guaranteed to never be specified by unist or specifications
198
- * implementing unist.
199
- * But you can use it in utilities and plugins to store data.
200
- *
201
- * This type can be augmented to register custom data.
202
- * For example:
203
- *
204
- * ```ts
205
- * declare module 'unist' {
206
- * interface Data {
207
- * // `someNode.data.myId` is typed as `number | undefined`
208
- * myId?: number | undefined
209
- * }
210
- * }
211
- * ```
212
- */
213
- interface Data$1 {
214
- [key: string]: unknown;
215
- }
216
- /**
217
- * One place in a source file.
218
- */
219
- interface Point {
220
- /**
221
- * Line in a source file (1-indexed integer).
222
- */
223
- line: number;
224
- /**
225
- * Column in a source file (1-indexed integer).
226
- */
227
- column: number;
228
- /**
229
- * Character in a source file (0-indexed integer).
230
- */
231
- offset?: number | undefined;
232
- }
233
- /**
234
- * Position of a node in a source document.
235
- *
236
- * A position is a range between two points.
237
- */
238
- interface Position {
239
- /**
240
- * Place of the first character of the parsed source region.
241
- */
242
- start: Point;
243
- /**
244
- * Place of the first character after the parsed source region.
245
- */
246
- end: Point;
247
- }
248
- /**
249
- * Abstract unist node that contains the smallest possible value.
250
- *
251
- * This interface is supposed to be extended.
252
- *
253
- * For example, in HTML, a `text` node is a leaf that contains text.
254
- */
255
- interface Literal$1 extends Node$1 {
256
- /**
257
- * Plain value.
258
- */
259
- value: unknown;
260
- }
261
- /**
262
- * Abstract unist node.
263
- *
264
- * The syntactic unit in unist syntax trees are called nodes.
265
- *
266
- * This interface is supposed to be extended.
267
- * If you can use {@link Literal} or {@link Parent}, you should.
268
- * But for example in markdown, a `thematicBreak` (`***`), is neither literal
269
- * nor parent, but still a node.
270
- */
271
- interface Node$1 {
272
- /**
273
- * Node type.
274
- */
275
- type: string;
276
- /**
277
- * Info from the ecosystem.
278
- */
279
- data?: Data$1 | undefined;
280
- /**
281
- * Position of a node in a source document.
282
- *
283
- * Nodes that are generated (not in the original source document) must not
284
- * have a position.
285
- */
286
- position?: Position | undefined;
287
- }
288
- /**
289
- * Abstract unist node that contains other nodes (*children*).
290
- *
291
- * This interface is supposed to be extended.
292
- *
293
- * For example, in XML, an element is a parent of different things, such as
294
- * comments, text, and further elements.
295
- */
296
- interface Parent$1 extends Node$1 {
297
- /**
298
- * List of children.
299
- */
300
- children: Node$1[];
301
- }
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
- /**
312
- * Info associated with hast nodes by the ecosystem.
313
- *
314
- * This space is guaranteed to never be specified by unist or hast.
315
- * But you can use it in utilities and plugins to store data.
316
- *
317
- * This type can be augmented to register custom data.
318
- * For example:
319
- *
320
- * ```ts
321
- * declare module 'hast' {
322
- * interface Data {
323
- * // `someNode.data.myId` is typed as `number | undefined`
324
- * myId?: number | undefined
325
- * }
326
- * }
327
- * ```
328
- */
329
- type Data = Data$1;
330
- /**
331
- * Info associated with an element.
332
- */
333
- interface Properties {
334
- [PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
335
- }
336
- /**
337
- * Union of registered hast nodes that can occur in {@link Element}.
338
- *
339
- * To register mote custom hast nodes, add them to {@link ElementContentMap}.
340
- * They will be automatically added here.
341
- */
342
- type ElementContent = ElementContentMap[keyof ElementContentMap];
343
- /**
344
- * Registry of all hast nodes that can occur as children of {@link Element}.
345
- *
346
- * For a union of all {@link Element} children, see {@link ElementContent}.
347
- */
348
- interface ElementContentMap {
349
- comment: Comment;
350
- element: Element;
351
- text: Text;
352
- }
353
- /**
354
- * Union of registered hast nodes that can occur in {@link Root}.
355
- *
356
- * To register custom hast nodes, add them to {@link RootContentMap}.
357
- * They will be automatically added here.
358
- */
359
- type RootContent = RootContentMap[keyof RootContentMap];
360
- /**
361
- * Registry of all hast nodes that can occur as children of {@link Root}.
362
- *
363
- * > 👉 **Note**: {@link Root} does not need to be an entire document.
364
- * > it can also be a fragment.
365
- *
366
- * For a union of all {@link Root} children, see {@link RootContent}.
367
- */
368
- interface RootContentMap {
369
- comment: Comment;
370
- doctype: Doctype;
371
- element: Element;
372
- text: Text;
373
- }
374
- /**
375
- * Union of registered hast nodes that can occur in {@link Root}.
376
- *
377
- * @deprecated Use {@link RootContent} instead.
378
- */
379
- type Content = RootContent;
380
- /**
381
- * Union of registered hast literals.
382
- *
383
- * To register custom hast nodes, add them to {@link RootContentMap} and other
384
- * places where relevant.
385
- * They will be automatically added here.
386
- */
387
- type Literals = Extract<Nodes, Literal$1>;
388
- /**
389
- * Union of registered hast nodes.
390
- *
391
- * To register custom hast nodes, add them to {@link RootContentMap} and other
392
- * places where relevant.
393
- * They will be automatically added here.
394
- */
395
- type Nodes = Root | RootContent;
396
- /**
397
- * Union of registered hast parents.
398
- *
399
- * To register custom hast nodes, add them to {@link RootContentMap} and other
400
- * places where relevant.
401
- * They will be automatically added here.
402
- */
403
- type Parents = Extract<Nodes, Parent$1>;
404
- /**
405
- * Abstract hast node.
406
- *
407
- * This interface is supposed to be extended.
408
- * If you can use {@link Literal} or {@link Parent}, you should.
409
- * But for example in HTML, a `Doctype` is neither literal nor parent, but
410
- * still a node.
411
- *
412
- * To register custom hast nodes, add them to {@link RootContentMap} and other
413
- * places where relevant (such as {@link ElementContentMap}).
414
- *
415
- * For a union of all registered hast nodes, see {@link Nodes}.
416
- */
417
- interface Node extends Node$1 {
418
- /**
419
- * Info from the ecosystem.
420
- */
421
- data?: Data | undefined;
422
- }
423
- /**
424
- * Abstract hast node that contains the smallest possible value.
425
- *
426
- * This interface is supposed to be extended if you make custom hast nodes.
427
- *
428
- * For a union of all registered hast literals, see {@link Literals}.
429
- */
430
- interface Literal extends Node {
431
- /**
432
- * Plain-text value.
433
- */
434
- value: string;
435
- }
436
- /**
437
- * Abstract hast node that contains other hast nodes (*children*).
438
- *
439
- * This interface is supposed to be extended if you make custom hast nodes.
440
- *
441
- * For a union of all registered hast parents, see {@link Parents}.
442
- */
443
- interface Parent extends Node {
444
- /**
445
- * List of children.
446
- */
447
- children: RootContent[];
448
- }
449
- /**
450
- * HTML comment.
451
- */
452
- interface Comment extends Literal {
453
- /**
454
- * Node type of HTML comments in hast.
455
- */
456
- type: 'comment';
457
- /**
458
- * Data associated with the comment.
459
- */
460
- data?: CommentData | undefined;
461
- }
462
- /**
463
- * Info associated with hast comments by the ecosystem.
464
- */
465
- type CommentData = Data;
466
- /**
467
- * HTML document type.
468
- */
469
- interface Doctype extends Node$1 {
470
- /**
471
- * Node type of HTML document types in hast.
472
- */
473
- type: 'doctype';
474
- /**
475
- * Data associated with the doctype.
476
- */
477
- data?: DoctypeData | undefined;
478
- }
479
- /**
480
- * Info associated with hast doctypes by the ecosystem.
481
- */
482
- type DoctypeData = Data;
483
- /**
484
- * HTML element.
485
- */
486
- interface Element extends Parent {
487
- /**
488
- * Node type of elements.
489
- */
490
- type: 'element';
491
- /**
492
- * Tag name (such as `'body'`) of the element.
493
- */
494
- tagName: string;
495
- /**
496
- * Info associated with the element.
497
- */
498
- properties: Properties;
499
- /**
500
- * Children of element.
501
- */
502
- children: ElementContent[];
503
- /**
504
- * When the `tagName` field is `'template'`, a `content` field can be
505
- * present.
506
- */
507
- content?: Root | undefined;
508
- /**
509
- * Data associated with the element.
510
- */
511
- data?: ElementData | undefined;
512
- }
513
- /**
514
- * Info associated with hast elements by the ecosystem.
515
- */
516
- type ElementData = Data;
517
- /**
518
- * Document fragment or a whole document.
519
- *
520
- * Should be used as the root of a tree and must not be used as a child.
521
- *
522
- * Can also be used as the value for the content field on a `'template'` element.
523
- */
524
- interface Root extends Parent {
525
- /**
526
- * Node type of hast root.
527
- */
528
- type: 'root';
529
- /**
530
- * Children of root.
531
- */
532
- children: RootContent[];
533
- /**
534
- * Data associated with the hast root.
535
- */
536
- data?: RootData | undefined;
537
- }
538
- /**
539
- * Info associated with hast root nodes by the ecosystem.
540
- */
541
- type RootData = Data;
542
- /**
543
- * HTML character data (plain text).
544
- */
545
- interface Text extends Literal {
546
- /**
547
- * Node type of HTML character data (plain text) in hast.
548
- */
549
- type: 'text';
550
- /**
551
- * Data associated with the text.
552
- */
553
- data?: TextData | undefined;
554
- }
555
- /**
556
- * Info associated with hast texts by the ecosystem.
557
- */
558
- type TextData = Data;
559
-
560
-
561
-
562
- interface MDCRenderOptions {
563
- documentMeta: MDCData;
564
- parentScope: any;
565
- resolveComponent: (component: any) => any;
566
- }
567
-
568
-
569
-
570
-
571
- declare const DefaultHighlightLangs: BundledLanguage[];
572
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
573
-
574
- declare module '@nuxt/schema' {
575
- interface NuxtHooks {
576
- 'mdc:configSources': (configs: string[]) => void;
577
- }
578
- interface PublicRuntimeConfig {
579
- mdc: {
580
- components: {
581
- prose: boolean;
582
- map: Record<string, string>;
583
- };
584
- headings: ModuleOptions['headings'];
585
- };
586
- }
587
- interface ConfigSchema {
588
- runtimeConfig: {
589
- public?: {
590
- mdc: {
591
- components: {
592
- prose: boolean;
593
- map: Record<string, string>;
594
- };
595
- };
596
- headings: ModuleOptions['headings'];
597
- };
598
- };
599
- }
600
- }
601
-
602
- export { DefaultHighlightLangs, _default as default };
603
- export type { Comment, CommentData, Content, Data, Doctype, DoctypeData, Element, ElementContent, ElementContentMap, ElementData, Literal, Literals, MDCComment, MDCData, MDCElement, MDCNode, MDCParseOptions, MDCParserResult, MDCRenderOptions, MDCRoot, MDCStringifyOptions, MDCText, MdcConfig, MdcThemeOptions, ModuleOptions, Node, Nodes, Parent, Parents, Properties, RehypeHighlightOption, RehypePlugin, RemarkPlugin, Root, RootContent, RootContentMap, RootData, Text, TextData, Toc, TocLink, UnistPlugin };
@@ -1,82 +0,0 @@
1
- import type { BuiltinTheme, Highlighter as Highlighter$1, HighlighterCore, ShikiTransformer } from 'shiki';
2
- import type { Processor } from 'unified';
3
- import type { ElementContent } from 'hast';
4
-
5
-
6
-
7
-
8
- type MdcThemeOptions = BuiltinTheme | string | Record<string, BuiltinTheme | string>;
9
- interface HighlighterOptions {
10
- highlights?: number[];
11
- meta?: string;
12
- }
13
- interface HighlightResult {
14
- tree: ElementContent[];
15
- className?: string;
16
- style?: string;
17
- inlineStyle?: string;
18
- }
19
- type Highlighter = (code: string, lang: string, theme: MdcThemeOptions, options: Partial<HighlighterOptions>) => Promise<HighlightResult>;
20
- interface RehypeHighlightOption {
21
- theme?: MdcThemeOptions;
22
- highlighter?: Highlighter;
23
- }
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
- type Awaitable<T> = T | Promise<T>;
36
- interface MdcConfig {
37
- /**
38
- * Hooks for the unified markdown pipeline
39
- */
40
- unified?: {
41
- /**
42
- * Custom setup for unified processor before other plugins
43
- */
44
- pre?: (processor: Processor) => Awaitable<void | Processor>;
45
- /**
46
- * Custom setup for unified processor after remark but before rehype
47
- */
48
- remark?: (processor: Processor) => Awaitable<void | Processor>;
49
- /**
50
- * Custom setup for unified processor after rehype
51
- */
52
- rehype?: (processor: Processor) => Awaitable<void | Processor>;
53
- /**
54
- * Custom setup for unified processor after all plugins
55
- */
56
- post?: (processor: Processor) => Awaitable<void | Processor>;
57
- };
58
- /**
59
- * Custom hightlighter, available when `highlighter` is set to `custom`
60
- */
61
- highlighter?: Highlighter$1;
62
- /**
63
- * Hooks for shiki
64
- */
65
- shiki?: {
66
- /**
67
- * Get transformers for shiki
68
- */
69
- transformers?: ShikiTransformer[] | ((code: string, lang: string, theme: MdcThemeOptions, options: Partial<HighlighterOptions>) => Awaitable<ShikiTransformer[]>);
70
- /**
71
- * Custom setup for shiki instance, only called once on server or client
72
- */
73
- setup?: (highlighter: HighlighterCore) => Awaitable<void>;
74
- };
75
- }
76
-
77
-
78
-
79
- declare function defineConfig(config: MdcConfig): MdcConfig;
80
-
81
- export { defineConfig as d };
82
- export type { Awaitable as A, HighlighterOptions as H, MdcConfig as M, RehypeHighlightOption as R, MdcThemeOptions as a, HighlightResult as b, Highlighter as c };
package/dist/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { type Awaitable, type HighlightResult, type Highlighter, type HighlighterOptions, type defineConfig } from './module'