jarkup-ts 0.3.0 → 0.4.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/dist/index.d.ts +24 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,21 +32,25 @@ export type BlockComponent = BlockComponentMap[keyof BlockComponentMap];
|
|
|
32
32
|
export type Component = ComponentMap[keyof ComponentMap];
|
|
33
33
|
export interface ComponentBase<T extends ComponentType = ComponentType, P = Record<any, any>> {
|
|
34
34
|
type: T;
|
|
35
|
+
id?: string;
|
|
35
36
|
props?: P;
|
|
36
37
|
slots?: Record<string, ComponentBase | ComponentBase[]>;
|
|
37
38
|
}
|
|
38
39
|
export interface InlineComponentBase<T extends InlineComponentType = InlineComponentType, P = Record<any, any>> extends ComponentBase<T, P> {
|
|
39
40
|
type: T;
|
|
41
|
+
id?: string;
|
|
40
42
|
props?: P;
|
|
41
43
|
slots?: undefined;
|
|
42
44
|
}
|
|
43
45
|
export interface BlockComponentBase<T extends BlockComponentType = BlockComponentType, P = Record<any, any>> extends ComponentBase<T, P> {
|
|
44
46
|
type: T;
|
|
47
|
+
id?: string;
|
|
45
48
|
props?: P;
|
|
46
49
|
slots?: Record<string, Component | Component[]>;
|
|
47
50
|
}
|
|
48
51
|
export interface Text extends InlineComponentBase<"Text"> {
|
|
49
52
|
type: "Text";
|
|
53
|
+
id?: string;
|
|
50
54
|
props: {
|
|
51
55
|
text: string;
|
|
52
56
|
color?: string;
|
|
@@ -66,6 +70,7 @@ export interface Text extends InlineComponentBase<"Text"> {
|
|
|
66
70
|
}
|
|
67
71
|
export interface Icon extends InlineComponentBase<"Icon"> {
|
|
68
72
|
type: "Icon";
|
|
73
|
+
id?: string;
|
|
69
74
|
props: {
|
|
70
75
|
src: string;
|
|
71
76
|
alt?: string;
|
|
@@ -74,6 +79,7 @@ export interface Icon extends InlineComponentBase<"Icon"> {
|
|
|
74
79
|
}
|
|
75
80
|
export interface Heading extends BlockComponentBase<"Heading"> {
|
|
76
81
|
type: "Heading";
|
|
82
|
+
id?: string;
|
|
77
83
|
props: {
|
|
78
84
|
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
79
85
|
};
|
|
@@ -83,6 +89,7 @@ export interface Heading extends BlockComponentBase<"Heading"> {
|
|
|
83
89
|
}
|
|
84
90
|
export interface Paragraph extends BlockComponentBase<"Paragraph"> {
|
|
85
91
|
type: "Paragraph";
|
|
92
|
+
id?: string;
|
|
86
93
|
props?: undefined;
|
|
87
94
|
slots: {
|
|
88
95
|
default: InlineComponent[];
|
|
@@ -90,6 +97,7 @@ export interface Paragraph extends BlockComponentBase<"Paragraph"> {
|
|
|
90
97
|
}
|
|
91
98
|
export interface ListItem extends BlockComponentBase<"ListItem"> {
|
|
92
99
|
type: "ListItem";
|
|
100
|
+
id?: string;
|
|
93
101
|
props?: undefined;
|
|
94
102
|
slots: {
|
|
95
103
|
default: InlineComponent[];
|
|
@@ -97,6 +105,7 @@ export interface ListItem extends BlockComponentBase<"ListItem"> {
|
|
|
97
105
|
}
|
|
98
106
|
export interface List extends BlockComponentBase<"List"> {
|
|
99
107
|
type: "List";
|
|
108
|
+
id?: string;
|
|
100
109
|
props?: {
|
|
101
110
|
listStyle?: "unordered" | "ordered";
|
|
102
111
|
};
|
|
@@ -106,6 +115,7 @@ export interface List extends BlockComponentBase<"List"> {
|
|
|
106
115
|
}
|
|
107
116
|
export interface BlockQuote extends BlockComponentBase<"BlockQuote"> {
|
|
108
117
|
type: "BlockQuote";
|
|
118
|
+
id?: string;
|
|
109
119
|
props?: {
|
|
110
120
|
cite?: string;
|
|
111
121
|
};
|
|
@@ -115,6 +125,7 @@ export interface BlockQuote extends BlockComponentBase<"BlockQuote"> {
|
|
|
115
125
|
}
|
|
116
126
|
export interface Callout extends BlockComponentBase<"Callout"> {
|
|
117
127
|
type: "Callout";
|
|
128
|
+
id?: string;
|
|
118
129
|
props?: {
|
|
119
130
|
type?: "note" | "tip" | "important" | "warning" | "caution";
|
|
120
131
|
};
|
|
@@ -124,11 +135,13 @@ export interface Callout extends BlockComponentBase<"Callout"> {
|
|
|
124
135
|
}
|
|
125
136
|
export interface Divider extends BlockComponentBase<"Divider"> {
|
|
126
137
|
type: "Divider";
|
|
138
|
+
id?: string;
|
|
127
139
|
props?: undefined;
|
|
128
140
|
slots?: undefined;
|
|
129
141
|
}
|
|
130
142
|
export interface Toggle extends BlockComponentBase<"Toggle"> {
|
|
131
143
|
type: "Toggle";
|
|
144
|
+
id?: string;
|
|
132
145
|
props?: undefined;
|
|
133
146
|
slots: {
|
|
134
147
|
default: Component[];
|
|
@@ -137,6 +150,7 @@ export interface Toggle extends BlockComponentBase<"Toggle"> {
|
|
|
137
150
|
}
|
|
138
151
|
export interface Bookmark extends BlockComponentBase<"Bookmark"> {
|
|
139
152
|
type: "Bookmark";
|
|
153
|
+
id?: string;
|
|
140
154
|
props: {
|
|
141
155
|
url: string;
|
|
142
156
|
title?: string;
|
|
@@ -147,6 +161,7 @@ export interface Bookmark extends BlockComponentBase<"Bookmark"> {
|
|
|
147
161
|
}
|
|
148
162
|
export interface File extends BlockComponentBase<"File"> {
|
|
149
163
|
type: "File";
|
|
164
|
+
id?: string;
|
|
150
165
|
props: {
|
|
151
166
|
src: string;
|
|
152
167
|
name?: string;
|
|
@@ -155,6 +170,7 @@ export interface File extends BlockComponentBase<"File"> {
|
|
|
155
170
|
}
|
|
156
171
|
export interface Image extends BlockComponentBase<"Image"> {
|
|
157
172
|
type: "Image";
|
|
173
|
+
id?: string;
|
|
158
174
|
props: {
|
|
159
175
|
src: string;
|
|
160
176
|
alt?: string;
|
|
@@ -163,6 +179,7 @@ export interface Image extends BlockComponentBase<"Image"> {
|
|
|
163
179
|
}
|
|
164
180
|
export interface CodeBlock extends BlockComponentBase<"CodeBlock"> {
|
|
165
181
|
type: "CodeBlock";
|
|
182
|
+
id?: string;
|
|
166
183
|
props: {
|
|
167
184
|
code: string;
|
|
168
185
|
language: string;
|
|
@@ -173,6 +190,7 @@ export interface CodeBlock extends BlockComponentBase<"CodeBlock"> {
|
|
|
173
190
|
}
|
|
174
191
|
export interface Katex extends BlockComponentBase<"Katex"> {
|
|
175
192
|
type: "Katex";
|
|
193
|
+
id?: string;
|
|
176
194
|
props: {
|
|
177
195
|
expression: string;
|
|
178
196
|
};
|
|
@@ -180,6 +198,7 @@ export interface Katex extends BlockComponentBase<"Katex"> {
|
|
|
180
198
|
}
|
|
181
199
|
export interface Table extends BlockComponentBase<"Table"> {
|
|
182
200
|
type: "Table";
|
|
201
|
+
id?: string;
|
|
183
202
|
props?: {
|
|
184
203
|
hasColumnHeader?: boolean;
|
|
185
204
|
hasRowHeader?: boolean;
|
|
@@ -192,6 +211,7 @@ export interface Table extends BlockComponentBase<"Table"> {
|
|
|
192
211
|
}
|
|
193
212
|
export interface TableRow extends BlockComponentBase<"TableRow"> {
|
|
194
213
|
type: "TableRow";
|
|
214
|
+
id?: string;
|
|
195
215
|
props?: undefined;
|
|
196
216
|
slots: {
|
|
197
217
|
default: TableCell[];
|
|
@@ -199,6 +219,7 @@ export interface TableRow extends BlockComponentBase<"TableRow"> {
|
|
|
199
219
|
}
|
|
200
220
|
export interface TableCell extends BlockComponentBase<"TableCell"> {
|
|
201
221
|
type: "TableCell";
|
|
222
|
+
id?: string;
|
|
202
223
|
props?: {
|
|
203
224
|
isHeader?: boolean;
|
|
204
225
|
};
|
|
@@ -208,6 +229,7 @@ export interface TableCell extends BlockComponentBase<"TableCell"> {
|
|
|
208
229
|
}
|
|
209
230
|
export interface ColumnList extends BlockComponentBase<"ColumnList"> {
|
|
210
231
|
type: "ColumnList";
|
|
232
|
+
id?: string;
|
|
211
233
|
props?: undefined;
|
|
212
234
|
slots: {
|
|
213
235
|
default: Column[];
|
|
@@ -215,6 +237,7 @@ export interface ColumnList extends BlockComponentBase<"ColumnList"> {
|
|
|
215
237
|
}
|
|
216
238
|
export interface Column extends BlockComponentBase<"Column"> {
|
|
217
239
|
type: "Column";
|
|
240
|
+
id?: string;
|
|
218
241
|
props?: undefined;
|
|
219
242
|
slots: {
|
|
220
243
|
default: Component[];
|
|
@@ -222,6 +245,7 @@ export interface Column extends BlockComponentBase<"Column"> {
|
|
|
222
245
|
}
|
|
223
246
|
export interface Unsupported extends BlockComponentBase<"Unsupported"> {
|
|
224
247
|
type: "Unsupported";
|
|
248
|
+
id?: string;
|
|
225
249
|
props?: {
|
|
226
250
|
details: string;
|
|
227
251
|
};
|