|
1 | | -//import type { InlineMath } from './math'; |
2 | 1 | import type { Role } from './roles'; |
3 | 2 | import type { BlockBreak, Block } from './blocks'; |
| 3 | +import type { AdmonitionTitle, Admonition } from './admonitions'; |
| 4 | +import type { Abbreviation } from './abbreviations'; |
| 5 | +import type { Comment } from './comments'; |
| 6 | +import type { InlineMath, Math } from './math'; |
| 7 | +import type { Directive } from './directives'; |
| 8 | +import type { CrossReference, Target } from './references'; |
| 9 | +import type { Subscript, Superscript, Underline } from './styles'; |
4 | 10 |
|
5 | 11 | declare module 'mdast' { |
6 | | - interface Node { |
7 | | - // Referencing semantics |
8 | | - identifier?: string; |
| 12 | + // Extend Association to include HTML ID |
| 13 | + interface Association { |
9 | 14 | html_id?: string; |
10 | 15 | } |
11 | 16 |
|
| 17 | + // All nodes are referenceable now |
| 18 | + interface Node extends Partial<Association> {} |
| 19 | + |
12 | 20 | interface PhrasingContentMap { |
13 | | - // Extend MDAST to use our types |
14 | | - //inlineMath: InlineMath; |
| 21 | + inlineMath: InlineMath; |
15 | 22 | mystRole: Role; |
16 | | - //subscriptStatic: SubscriptStatic; |
17 | | - //superscriptStatic: SuperscriptStatic; |
18 | | - //underlineStatic: UnderlineStatic; |
| 23 | + subscript: Subscript; |
| 24 | + superscript: Superscript; |
| 25 | + underline: Underline; |
| 26 | + crossReference: CrossReference; |
| 27 | + abbreviation: Abbreviation; |
19 | 28 | } |
20 | 29 |
|
21 | 30 | interface RootContentMap { |
22 | 31 | mystRole: Role; |
23 | 32 | block: Block; |
24 | 33 | blockBreak: BlockBreak; |
| 34 | + admonition: Admonition; |
| 35 | + admonitionTitle: AdmonitionTitle; |
| 36 | + abbreviation: Abbreviation; |
| 37 | + comment: Comment; |
| 38 | + mystDirective: Directive; |
| 39 | + math: Math; |
| 40 | + inlineMath: InlineMath; |
| 41 | + subscript: Subscript; |
| 42 | + superscript: Superscript; |
| 43 | + underline: Underline; |
| 44 | + crossReference: CrossReference; |
| 45 | + mystTarget: Target; |
25 | 46 | } |
26 | 47 | } |
27 | 48 |
|
28 | 49 | export type * from 'mdast'; |
29 | 50 | export type * from './roles'; |
30 | 51 | export type * from './blocks'; |
31 | | -export type * from './flow'; |
| 52 | +export type * from './admonitions'; |
| 53 | +export type * from './abbreviations'; |
| 54 | +export type * from './comments'; |
| 55 | +export type * from './math'; |
| 56 | +export type * from './directives'; |
| 57 | +export type * from './references'; |
| 58 | +export type * from './styles'; |
0 commit comments