-
Notifications
You must be signed in to change notification settings - Fork 63
/
types.ts
112 lines (96 loc) · 2.33 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import type {
Parent,
StaticPhrasingContent,
TableCell as SpecTableCell,
FootnoteReference as FNR,
FootnoteDefinition as FND,
Heading as SpecHeading,
Image as SpecImage,
Admonition as SpecAdmonition,
Code as SpecCode,
ListItem as SpecListItem,
} from 'myst-spec';
export type Delete = Parent & { type: 'delete' };
export type Underline = Parent & { type: 'underline' };
export type Smallcaps = Parent & { type: 'smallcaps' };
export type DefinitionTerm = Parent & { type: 'definitionTerm' };
export type DefinitionDescription = Parent & { type: 'definitionDescription' };
export type DefinitionList = Parent & {
type: 'definitionList';
children: (DefinitionTerm | DefinitionDescription)[];
};
export type CaptionNumber = Parent & {
type: 'captionNumber';
kind: string;
label: string;
identifier: string;
html_id: string;
enumerator: string;
};
export type FootnoteDefinition = FND & {
/** @deprecated this should be enumerator */
number?: number;
enumerator?: string;
};
export type FootnoteReference = FNR & {
/** @deprecated this should be enumerator */
number?: number;
enumerator?: string;
};
export type TableCell = SpecTableCell & { colspan?: number; rowspan?: number; width?: number };
export type TabSet = Parent & {
type: 'tabSet';
};
export type TabItem = Parent & {
type: 'tabItem';
title: string;
sync?: string;
selected?: boolean;
};
export type Heading = SpecHeading & {
html_id?: string;
implicit?: true;
};
export type Image = SpecImage & {
urlSource?: string;
height?: string;
};
export type Admonition = SpecAdmonition & {
icon?: boolean;
};
export type Code = SpecCode & {
executable?: boolean;
};
export type ListItem = SpecListItem & {
checked?: boolean;
};
export type CiteKind = 'narrative' | 'parenthetical';
export type Cite = {
type: 'cite';
kind: CiteKind;
label: string;
children: StaticPhrasingContent[];
error?: boolean;
prefix?: string;
suffix?: string;
};
export type CiteGroup = {
type: 'citeGroup';
kind: CiteKind;
children: Cite[];
};
export type SiUnit = {
type: 'si';
number?: string;
unit?: string;
units?: string[];
alt?: string;
value: string;
};
export type InlineExpression = {
type: 'inlineExpression';
value: string;
identifier?: string;
result?: Record<string, any>;
children?: StaticPhrasingContent[];
};