vantage-md 0.6.1 → 0.7.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/CHANGELOG.md +211 -0
- package/README.md +3 -2
- package/dist/index.cjs +210 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1128 -95
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1128 -95
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +205 -32
- package/dist/index.js.map +1 -1
- package/dist/prose.css +1 -1
- package/dist/react.cjs +159 -33
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1021 -56
- package/dist/react.d.cts.map +1 -1
- package/dist/react.d.ts +1021 -56
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +159 -33
- package/dist/react.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,1038 @@
|
|
|
1
1
|
import { PluggableList, Plugin } from "unified";
|
|
2
2
|
import { defaultSchema } from "rehype-sanitize";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../node_modules/@types/unist/index.d.ts
|
|
4
|
+
// ## Interfaces
|
|
5
|
+
/**
|
|
6
|
+
* Info associated with nodes by the ecosystem.
|
|
7
|
+
*
|
|
8
|
+
* This space is guaranteed to never be specified by unist or specifications
|
|
9
|
+
* implementing unist.
|
|
10
|
+
* But you can use it in utilities and plugins to store data.
|
|
11
|
+
*
|
|
12
|
+
* This type can be augmented to register custom data.
|
|
13
|
+
* For example:
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* declare module 'unist' {
|
|
17
|
+
* interface Data {
|
|
18
|
+
* // `someNode.data.myId` is typed as `number | undefined`
|
|
19
|
+
* myId?: number | undefined
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
interface Data$2 {}
|
|
25
|
+
/**
|
|
26
|
+
* One place in a source file.
|
|
27
|
+
*/
|
|
28
|
+
interface Point {
|
|
29
|
+
/**
|
|
30
|
+
* Line in a source file (1-indexed integer).
|
|
31
|
+
*/
|
|
32
|
+
line: number;
|
|
33
|
+
/**
|
|
34
|
+
* Column in a source file (1-indexed integer).
|
|
35
|
+
*/
|
|
36
|
+
column: number;
|
|
37
|
+
/**
|
|
38
|
+
* Character in a source file (0-indexed integer).
|
|
39
|
+
*/
|
|
40
|
+
offset?: number | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Position of a node in a source document.
|
|
44
|
+
*
|
|
45
|
+
* A position is a range between two points.
|
|
46
|
+
*/
|
|
47
|
+
interface Position {
|
|
48
|
+
/**
|
|
49
|
+
* Place of the first character of the parsed source region.
|
|
50
|
+
*/
|
|
51
|
+
start: Point;
|
|
52
|
+
/**
|
|
53
|
+
* Place of the first character after the parsed source region.
|
|
54
|
+
*/
|
|
55
|
+
end: Point;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Abstract unist node.
|
|
59
|
+
*
|
|
60
|
+
* The syntactic unit in unist syntax trees are called nodes.
|
|
61
|
+
*
|
|
62
|
+
* This interface is supposed to be extended.
|
|
63
|
+
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
64
|
+
* But for example in markdown, a `thematicBreak` (`***`), is neither literal
|
|
65
|
+
* nor parent, but still a node.
|
|
66
|
+
*/
|
|
67
|
+
interface Node$2 {
|
|
68
|
+
/**
|
|
69
|
+
* Node type.
|
|
70
|
+
*/
|
|
71
|
+
type: string;
|
|
72
|
+
/**
|
|
73
|
+
* Info from the ecosystem.
|
|
74
|
+
*/
|
|
75
|
+
data?: Data$2 | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Position of a node in a source document.
|
|
78
|
+
*
|
|
79
|
+
* Nodes that are generated (not in the original source document) must not
|
|
80
|
+
* have a position.
|
|
81
|
+
*/
|
|
82
|
+
position?: Position | undefined;
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../node_modules/@types/mdast/index.d.ts
|
|
86
|
+
// ## Enumeration
|
|
87
|
+
/**
|
|
88
|
+
* How phrasing content is aligned
|
|
89
|
+
* ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}).
|
|
90
|
+
*
|
|
91
|
+
* * `'left'`: See the
|
|
92
|
+
* {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left}
|
|
93
|
+
* value of the `text-align` CSS property
|
|
94
|
+
* * `'right'`: See the
|
|
95
|
+
* {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right}
|
|
96
|
+
* value of the `text-align` CSS property
|
|
97
|
+
* * `'center'`: See the
|
|
98
|
+
* {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center}
|
|
99
|
+
* value of the `text-align` CSS property
|
|
100
|
+
* * `null`: phrasing content is aligned as defined by the host environment
|
|
101
|
+
*
|
|
102
|
+
* Used in GFM tables.
|
|
103
|
+
*/
|
|
104
|
+
type AlignType = "center" | "left" | "right" | null;
|
|
105
|
+
/**
|
|
106
|
+
* Explicitness of a reference.
|
|
107
|
+
*
|
|
108
|
+
* `'shortcut'`: the reference is implicit, its identifier inferred from its
|
|
109
|
+
* content
|
|
110
|
+
* `'collapsed'`: the reference is explicit, its identifier inferred from its
|
|
111
|
+
* content
|
|
112
|
+
* `'full'`: the reference is explicit, its identifier explicitly set
|
|
113
|
+
*/
|
|
114
|
+
type ReferenceType = "shortcut" | "collapsed" | "full";
|
|
115
|
+
// ## Mixin
|
|
116
|
+
/**
|
|
117
|
+
* Node with a fallback.
|
|
118
|
+
*/
|
|
119
|
+
interface Alternative {
|
|
120
|
+
/**
|
|
121
|
+
* Equivalent content for environments that cannot represent the node as
|
|
122
|
+
* intended.
|
|
123
|
+
*/
|
|
124
|
+
alt?: string | null | undefined;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Internal relation from one node to another.
|
|
128
|
+
*
|
|
129
|
+
* Whether the value of `identifier` is expected to be a unique identifier or
|
|
130
|
+
* not depends on the type of node including the Association.
|
|
131
|
+
* An example of this is that they should be unique on {@link Definition},
|
|
132
|
+
* whereas multiple {@link LinkReference}s can be non-unique to be associated
|
|
133
|
+
* with one definition.
|
|
134
|
+
*/
|
|
135
|
+
interface Association {
|
|
136
|
+
/**
|
|
137
|
+
* Relation of association.
|
|
138
|
+
*
|
|
139
|
+
* `identifier` is a source value: character escapes and character
|
|
140
|
+
* references are not parsed.
|
|
141
|
+
*
|
|
142
|
+
* It can match another node.
|
|
143
|
+
*
|
|
144
|
+
* Its value must be normalized.
|
|
145
|
+
* To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
|
|
146
|
+
* trim the optional initial and/or final space, and perform Unicode-aware
|
|
147
|
+
* case-folding.
|
|
148
|
+
*/
|
|
149
|
+
identifier: string;
|
|
150
|
+
/**
|
|
151
|
+
* Relation of association, in parsed form.
|
|
152
|
+
*
|
|
153
|
+
* `label` is a `string` value: it works just like `title` on {@link Link}
|
|
154
|
+
* or a `lang` on {@link Code}: character escapes and character references
|
|
155
|
+
* are parsed.
|
|
156
|
+
*
|
|
157
|
+
* It can match another node.
|
|
158
|
+
*/
|
|
159
|
+
label?: string | null | undefined;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Marker that is associated to another node.
|
|
163
|
+
*/
|
|
164
|
+
interface Reference extends Association {
|
|
165
|
+
/**
|
|
166
|
+
* Explicitness of the reference.
|
|
167
|
+
*/
|
|
168
|
+
referenceType: ReferenceType;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Reference to resource.
|
|
172
|
+
*/
|
|
173
|
+
interface Resource {
|
|
174
|
+
/**
|
|
175
|
+
* URL to the referenced resource.
|
|
176
|
+
*/
|
|
177
|
+
url: string;
|
|
178
|
+
/**
|
|
179
|
+
* Advisory information for the resource, such as would be appropriate for
|
|
180
|
+
* a tooltip.
|
|
181
|
+
*/
|
|
182
|
+
title?: string | null | undefined;
|
|
183
|
+
}
|
|
184
|
+
// ## Interfaces
|
|
185
|
+
/**
|
|
186
|
+
* Info associated with mdast nodes by the ecosystem.
|
|
187
|
+
*
|
|
188
|
+
* This space is guaranteed to never be specified by unist or mdast.
|
|
189
|
+
* But you can use it in utilities and plugins to store data.
|
|
190
|
+
*
|
|
191
|
+
* This type can be augmented to register custom data.
|
|
192
|
+
* For example:
|
|
193
|
+
*
|
|
194
|
+
* ```ts
|
|
195
|
+
* declare module 'mdast' {
|
|
196
|
+
* interface Data {
|
|
197
|
+
* // `someNode.data.myId` is typed as `number | undefined`
|
|
198
|
+
* myId?: number | undefined
|
|
199
|
+
* }
|
|
200
|
+
* }
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
interface Data$1 extends Data$2 {}
|
|
204
|
+
// ## Content maps
|
|
205
|
+
/**
|
|
206
|
+
* Union of registered mdast nodes that can occur where block content is
|
|
207
|
+
* expected.
|
|
208
|
+
*
|
|
209
|
+
* To register custom mdast nodes, add them to {@link BlockContentMap}.
|
|
210
|
+
* They will be automatically added here.
|
|
211
|
+
*/
|
|
212
|
+
type BlockContent = BlockContentMap[keyof BlockContentMap];
|
|
213
|
+
/**
|
|
214
|
+
* Registry of all mdast nodes that can occur where {@link BlockContent} is
|
|
215
|
+
* expected.
|
|
216
|
+
*
|
|
217
|
+
* This interface can be augmented to register custom node types:
|
|
218
|
+
*
|
|
219
|
+
* ```ts
|
|
220
|
+
* declare module 'mdast' {
|
|
221
|
+
* interface BlockContentMap {
|
|
222
|
+
* // Allow using MDX ESM nodes defined by `remark-mdx`.
|
|
223
|
+
* mdxjsEsm: MdxjsEsm;
|
|
224
|
+
* }
|
|
225
|
+
* }
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* For a union of all block content, see {@link RootContent}.
|
|
229
|
+
*/
|
|
230
|
+
interface BlockContentMap {
|
|
231
|
+
blockquote: Blockquote;
|
|
232
|
+
code: Code;
|
|
233
|
+
heading: Heading;
|
|
234
|
+
html: Html;
|
|
235
|
+
list: List;
|
|
236
|
+
paragraph: Paragraph;
|
|
237
|
+
table: Table;
|
|
238
|
+
thematicBreak: ThematicBreak;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Union of registered mdast nodes that can occur where definition content is
|
|
242
|
+
* expected.
|
|
243
|
+
*
|
|
244
|
+
* To register custom mdast nodes, add them to {@link DefinitionContentMap}.
|
|
245
|
+
* They will be automatically added here.
|
|
246
|
+
*/
|
|
247
|
+
type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap];
|
|
248
|
+
/**
|
|
249
|
+
* Registry of all mdast nodes that can occur where {@link DefinitionContent}
|
|
250
|
+
* is expected.
|
|
251
|
+
*
|
|
252
|
+
* This interface can be augmented to register custom node types:
|
|
253
|
+
*
|
|
254
|
+
* ```ts
|
|
255
|
+
* declare module 'mdast' {
|
|
256
|
+
* interface DefinitionContentMap {
|
|
257
|
+
* custom: Custom;
|
|
258
|
+
* }
|
|
259
|
+
* }
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
* For a union of all definition content, see {@link RootContent}.
|
|
263
|
+
*/
|
|
264
|
+
interface DefinitionContentMap {
|
|
265
|
+
definition: Definition;
|
|
266
|
+
footnoteDefinition: FootnoteDefinition;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Union of registered mdast nodes that can occur where list content is
|
|
270
|
+
* expected.
|
|
271
|
+
*
|
|
272
|
+
* To register custom mdast nodes, add them to {@link ListContentMap}.
|
|
273
|
+
* They will be automatically added here.
|
|
274
|
+
*/
|
|
275
|
+
type ListContent = ListContentMap[keyof ListContentMap];
|
|
276
|
+
/**
|
|
277
|
+
* Registry of all mdast nodes that can occur where {@link ListContent}
|
|
278
|
+
* is expected.
|
|
279
|
+
*
|
|
280
|
+
* This interface can be augmented to register custom node types:
|
|
281
|
+
*
|
|
282
|
+
* ```ts
|
|
283
|
+
* declare module 'mdast' {
|
|
284
|
+
* interface ListContentMap {
|
|
285
|
+
* custom: Custom;
|
|
286
|
+
* }
|
|
287
|
+
* }
|
|
288
|
+
* ```
|
|
289
|
+
*
|
|
290
|
+
* For a union of all list content, see {@link RootContent}.
|
|
291
|
+
*/
|
|
292
|
+
interface ListContentMap {
|
|
293
|
+
listItem: ListItem;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Union of registered mdast nodes that can occur where phrasing content is
|
|
297
|
+
* expected.
|
|
298
|
+
*
|
|
299
|
+
* To register custom mdast nodes, add them to {@link PhrasingContentMap}.
|
|
300
|
+
* They will be automatically added here.
|
|
301
|
+
*/
|
|
302
|
+
type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap];
|
|
303
|
+
/**
|
|
304
|
+
* Registry of all mdast nodes that can occur where {@link PhrasingContent}
|
|
305
|
+
* is expected.
|
|
306
|
+
*
|
|
307
|
+
* This interface can be augmented to register custom node types:
|
|
308
|
+
*
|
|
309
|
+
* ```ts
|
|
310
|
+
* declare module 'mdast' {
|
|
311
|
+
* interface PhrasingContentMap {
|
|
312
|
+
* // Allow using MDX JSX (text) nodes defined by `remark-mdx`.
|
|
313
|
+
* mdxJsxTextElement: MDXJSXTextElement;
|
|
314
|
+
* }
|
|
315
|
+
* }
|
|
316
|
+
* ```
|
|
317
|
+
*
|
|
318
|
+
* For a union of all phrasing content, see {@link RootContent}.
|
|
319
|
+
*/
|
|
320
|
+
interface PhrasingContentMap {
|
|
321
|
+
break: Break;
|
|
322
|
+
delete: Delete;
|
|
323
|
+
emphasis: Emphasis;
|
|
324
|
+
footnoteReference: FootnoteReference;
|
|
325
|
+
html: Html;
|
|
326
|
+
image: Image;
|
|
327
|
+
imageReference: ImageReference;
|
|
328
|
+
inlineCode: InlineCode;
|
|
329
|
+
link: Link;
|
|
330
|
+
linkReference: LinkReference;
|
|
331
|
+
strong: Strong;
|
|
332
|
+
text: Text$1;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Union of registered mdast nodes that can occur in {@link Root}.
|
|
336
|
+
*
|
|
337
|
+
* To register custom mdast nodes, add them to {@link RootContentMap}.
|
|
338
|
+
* They will be automatically added here.
|
|
339
|
+
*/
|
|
340
|
+
type RootContent$1 = RootContentMap$1[keyof RootContentMap$1];
|
|
341
|
+
/**
|
|
342
|
+
* Registry of all mdast nodes that can occur as children of {@link Root}.
|
|
343
|
+
*
|
|
344
|
+
* > **Note**: {@link Root} does not need to be an entire document.
|
|
345
|
+
* > it can also be a fragment.
|
|
346
|
+
*
|
|
347
|
+
* This interface can be augmented to register custom node types:
|
|
348
|
+
*
|
|
349
|
+
* ```ts
|
|
350
|
+
* declare module 'mdast' {
|
|
351
|
+
* interface RootContentMap {
|
|
352
|
+
* // Allow using toml nodes defined by `remark-frontmatter`.
|
|
353
|
+
* toml: TOML;
|
|
354
|
+
* }
|
|
355
|
+
* }
|
|
356
|
+
* ```
|
|
357
|
+
*
|
|
358
|
+
* For a union of all {@link Root} children, see {@link RootContent}.
|
|
359
|
+
*/
|
|
360
|
+
interface RootContentMap$1 {
|
|
361
|
+
blockquote: Blockquote;
|
|
362
|
+
break: Break;
|
|
363
|
+
code: Code;
|
|
364
|
+
definition: Definition;
|
|
365
|
+
delete: Delete;
|
|
366
|
+
emphasis: Emphasis;
|
|
367
|
+
footnoteDefinition: FootnoteDefinition;
|
|
368
|
+
footnoteReference: FootnoteReference;
|
|
369
|
+
heading: Heading;
|
|
370
|
+
html: Html;
|
|
371
|
+
image: Image;
|
|
372
|
+
imageReference: ImageReference;
|
|
373
|
+
inlineCode: InlineCode;
|
|
374
|
+
link: Link;
|
|
375
|
+
linkReference: LinkReference;
|
|
376
|
+
list: List;
|
|
377
|
+
listItem: ListItem;
|
|
378
|
+
paragraph: Paragraph;
|
|
379
|
+
strong: Strong;
|
|
380
|
+
table: Table;
|
|
381
|
+
tableCell: TableCell;
|
|
382
|
+
tableRow: TableRow;
|
|
383
|
+
text: Text$1;
|
|
384
|
+
thematicBreak: ThematicBreak;
|
|
385
|
+
yaml: Yaml;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Union of registered mdast nodes that can occur where row content is
|
|
389
|
+
* expected.
|
|
390
|
+
*
|
|
391
|
+
* To register custom mdast nodes, add them to {@link RowContentMap}.
|
|
392
|
+
* They will be automatically added here.
|
|
393
|
+
*/
|
|
394
|
+
type RowContent = RowContentMap[keyof RowContentMap];
|
|
395
|
+
/**
|
|
396
|
+
* Registry of all mdast nodes that can occur where {@link RowContent}
|
|
397
|
+
* is expected.
|
|
398
|
+
*
|
|
399
|
+
* This interface can be augmented to register custom node types:
|
|
400
|
+
*
|
|
401
|
+
* ```ts
|
|
402
|
+
* declare module 'mdast' {
|
|
403
|
+
* interface RowContentMap {
|
|
404
|
+
* custom: Custom;
|
|
405
|
+
* }
|
|
406
|
+
* }
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* For a union of all row content, see {@link RootContent}.
|
|
410
|
+
*/
|
|
411
|
+
interface RowContentMap {
|
|
412
|
+
tableCell: TableCell;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Union of registered mdast nodes that can occur where table content is
|
|
416
|
+
* expected.
|
|
417
|
+
*
|
|
418
|
+
* To register custom mdast nodes, add them to {@link TableContentMap}.
|
|
419
|
+
* They will be automatically added here.
|
|
420
|
+
*/
|
|
421
|
+
type TableContent = TableContentMap[keyof TableContentMap];
|
|
422
|
+
/**
|
|
423
|
+
* Registry of all mdast nodes that can occur where {@link TableContent}
|
|
424
|
+
* is expected.
|
|
425
|
+
*
|
|
426
|
+
* This interface can be augmented to register custom node types:
|
|
427
|
+
*
|
|
428
|
+
* ```ts
|
|
429
|
+
* declare module 'mdast' {
|
|
430
|
+
* interface TableContentMap {
|
|
431
|
+
* custom: Custom;
|
|
432
|
+
* }
|
|
433
|
+
* }
|
|
434
|
+
* ```
|
|
435
|
+
*
|
|
436
|
+
* For a union of all table content, see {@link RootContent}.
|
|
437
|
+
*/
|
|
438
|
+
interface TableContentMap {
|
|
439
|
+
tableRow: TableRow;
|
|
440
|
+
}
|
|
441
|
+
// ## Abstract nodes
|
|
442
|
+
/**
|
|
443
|
+
* Abstract mdast node that contains the smallest possible value.
|
|
444
|
+
*
|
|
445
|
+
* This interface is supposed to be extended if you make custom mdast nodes.
|
|
446
|
+
*
|
|
447
|
+
* For a union of all registered mdast literals, see {@link Literals}.
|
|
448
|
+
*/
|
|
449
|
+
interface Literal$1 extends Node$1 {
|
|
450
|
+
/**
|
|
451
|
+
* Plain-text value.
|
|
452
|
+
*/
|
|
453
|
+
value: string;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Abstract mdast node.
|
|
457
|
+
*
|
|
458
|
+
* This interface is supposed to be extended.
|
|
459
|
+
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
460
|
+
* But for example in markdown, a thematic break (`***`) is neither literal nor
|
|
461
|
+
* parent, but still a node.
|
|
462
|
+
*
|
|
463
|
+
* To register custom mdast nodes, add them to {@link RootContentMap} and other
|
|
464
|
+
* places where relevant (such as {@link ElementContentMap}).
|
|
465
|
+
*
|
|
466
|
+
* For a union of all registered mdast nodes, see {@link Nodes}.
|
|
467
|
+
*/
|
|
468
|
+
interface Node$1 extends Node$2 {
|
|
469
|
+
/**
|
|
470
|
+
* Info from the ecosystem.
|
|
471
|
+
*/
|
|
472
|
+
data?: Data$1 | undefined;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Abstract mdast node that contains other mdast nodes (*children*).
|
|
476
|
+
*
|
|
477
|
+
* This interface is supposed to be extended if you make custom mdast nodes.
|
|
478
|
+
*
|
|
479
|
+
* For a union of all registered mdast parents, see {@link Parents}.
|
|
480
|
+
*/
|
|
481
|
+
interface Parent$1 extends Node$1 {
|
|
482
|
+
/**
|
|
483
|
+
* List of children.
|
|
484
|
+
*/
|
|
485
|
+
children: RootContent$1[];
|
|
486
|
+
}
|
|
487
|
+
// ## Concrete nodes
|
|
488
|
+
/**
|
|
489
|
+
* Markdown block quote.
|
|
490
|
+
*/
|
|
491
|
+
interface Blockquote extends Parent$1 {
|
|
492
|
+
/**
|
|
493
|
+
* Node type of mdast block quote.
|
|
494
|
+
*/
|
|
495
|
+
type: "blockquote";
|
|
496
|
+
/**
|
|
497
|
+
* Children of block quote.
|
|
498
|
+
*/
|
|
499
|
+
children: Array<BlockContent | DefinitionContent>;
|
|
500
|
+
/**
|
|
501
|
+
* Data associated with the mdast block quote.
|
|
502
|
+
*/
|
|
503
|
+
data?: BlockquoteData | undefined;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Info associated with mdast block quote nodes by the ecosystem.
|
|
507
|
+
*/
|
|
508
|
+
interface BlockquoteData extends Data$1 {}
|
|
509
|
+
/**
|
|
510
|
+
* Markdown break.
|
|
511
|
+
*/
|
|
512
|
+
interface Break extends Node$1 {
|
|
513
|
+
/**
|
|
514
|
+
* Node type of mdast break.
|
|
515
|
+
*/
|
|
516
|
+
type: "break";
|
|
517
|
+
/**
|
|
518
|
+
* Data associated with the mdast break.
|
|
519
|
+
*/
|
|
520
|
+
data?: BreakData | undefined;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Info associated with mdast break nodes by the ecosystem.
|
|
524
|
+
*/
|
|
525
|
+
interface BreakData extends Data$1 {}
|
|
526
|
+
/**
|
|
527
|
+
* Markdown code (flow) (block).
|
|
528
|
+
*/
|
|
529
|
+
interface Code extends Literal$1 {
|
|
530
|
+
/**
|
|
531
|
+
* Node type of mdast code (flow).
|
|
532
|
+
*/
|
|
533
|
+
type: "code";
|
|
534
|
+
/**
|
|
535
|
+
* Language of computer code being marked up.
|
|
536
|
+
*/
|
|
537
|
+
lang?: string | null | undefined;
|
|
538
|
+
/**
|
|
539
|
+
* Custom information relating to the node.
|
|
540
|
+
*
|
|
541
|
+
* If the lang field is present, a meta field can be present.
|
|
542
|
+
*/
|
|
543
|
+
meta?: string | null | undefined;
|
|
544
|
+
/**
|
|
545
|
+
* Data associated with the mdast code (flow).
|
|
546
|
+
*/
|
|
547
|
+
data?: CodeData | undefined;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Info associated with mdast code (flow) (block) nodes by the ecosystem.
|
|
551
|
+
*/
|
|
552
|
+
interface CodeData extends Data$1 {}
|
|
553
|
+
/**
|
|
554
|
+
* Markdown definition.
|
|
555
|
+
*/
|
|
556
|
+
interface Definition extends Node$1, Association, Resource {
|
|
557
|
+
/**
|
|
558
|
+
* Node type of mdast definition.
|
|
559
|
+
*/
|
|
560
|
+
type: "definition";
|
|
561
|
+
/**
|
|
562
|
+
* Data associated with the mdast definition.
|
|
563
|
+
*/
|
|
564
|
+
data?: DefinitionData | undefined;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Info associated with mdast definition nodes by the ecosystem.
|
|
568
|
+
*/
|
|
569
|
+
interface DefinitionData extends Data$1 {}
|
|
570
|
+
/**
|
|
571
|
+
* Markdown GFM delete (strikethrough).
|
|
572
|
+
*/
|
|
573
|
+
interface Delete extends Parent$1 {
|
|
574
|
+
/**
|
|
575
|
+
* Node type of mdast GFM delete.
|
|
576
|
+
*/
|
|
577
|
+
type: "delete";
|
|
578
|
+
/**
|
|
579
|
+
* Children of GFM delete.
|
|
580
|
+
*/
|
|
581
|
+
children: PhrasingContent[];
|
|
582
|
+
/**
|
|
583
|
+
* Data associated with the mdast GFM delete.
|
|
584
|
+
*/
|
|
585
|
+
data?: DeleteData | undefined;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Info associated with mdast GFM delete nodes by the ecosystem.
|
|
589
|
+
*/
|
|
590
|
+
interface DeleteData extends Data$1 {}
|
|
591
|
+
/**
|
|
592
|
+
* Markdown emphasis.
|
|
593
|
+
*/
|
|
594
|
+
interface Emphasis extends Parent$1 {
|
|
595
|
+
/**
|
|
596
|
+
* Node type of mdast emphasis.
|
|
597
|
+
*/
|
|
598
|
+
type: "emphasis";
|
|
599
|
+
/**
|
|
600
|
+
* Children of emphasis.
|
|
601
|
+
*/
|
|
602
|
+
children: PhrasingContent[];
|
|
603
|
+
/**
|
|
604
|
+
* Data associated with the mdast emphasis.
|
|
605
|
+
*/
|
|
606
|
+
data?: EmphasisData | undefined;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Info associated with mdast emphasis nodes by the ecosystem.
|
|
610
|
+
*/
|
|
611
|
+
interface EmphasisData extends Data$1 {}
|
|
612
|
+
/**
|
|
613
|
+
* Markdown GFM footnote definition.
|
|
614
|
+
*/
|
|
615
|
+
interface FootnoteDefinition extends Parent$1, Association {
|
|
616
|
+
/**
|
|
617
|
+
* Node type of mdast GFM footnote definition.
|
|
618
|
+
*/
|
|
619
|
+
type: "footnoteDefinition";
|
|
620
|
+
/**
|
|
621
|
+
* Children of GFM footnote definition.
|
|
622
|
+
*/
|
|
623
|
+
children: Array<BlockContent | DefinitionContent>;
|
|
624
|
+
/**
|
|
625
|
+
* Data associated with the mdast GFM footnote definition.
|
|
626
|
+
*/
|
|
627
|
+
data?: FootnoteDefinitionData | undefined;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Info associated with mdast GFM footnote definition nodes by the ecosystem.
|
|
631
|
+
*/
|
|
632
|
+
interface FootnoteDefinitionData extends Data$1 {}
|
|
633
|
+
/**
|
|
634
|
+
* Markdown GFM footnote reference.
|
|
635
|
+
*/
|
|
636
|
+
interface FootnoteReference extends Association, Node$1 {
|
|
637
|
+
/**
|
|
638
|
+
* Node type of mdast GFM footnote reference.
|
|
639
|
+
*/
|
|
640
|
+
type: "footnoteReference";
|
|
641
|
+
/**
|
|
642
|
+
* Data associated with the mdast GFM footnote reference.
|
|
643
|
+
*/
|
|
644
|
+
data?: FootnoteReferenceData | undefined;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Info associated with mdast GFM footnote reference nodes by the ecosystem.
|
|
648
|
+
*/
|
|
649
|
+
interface FootnoteReferenceData extends Data$1 {}
|
|
650
|
+
/**
|
|
651
|
+
* Markdown heading.
|
|
652
|
+
*/
|
|
653
|
+
interface Heading extends Parent$1 {
|
|
654
|
+
/**
|
|
655
|
+
* Node type of mdast heading.
|
|
656
|
+
*/
|
|
657
|
+
type: "heading";
|
|
658
|
+
/**
|
|
659
|
+
* Heading rank.
|
|
660
|
+
*
|
|
661
|
+
* A value of `1` is said to be the highest rank and `6` the lowest.
|
|
662
|
+
*/
|
|
663
|
+
depth: 1 | 2 | 3 | 4 | 5 | 6;
|
|
664
|
+
/**
|
|
665
|
+
* Children of heading.
|
|
666
|
+
*/
|
|
667
|
+
children: PhrasingContent[];
|
|
668
|
+
/**
|
|
669
|
+
* Data associated with the mdast heading.
|
|
670
|
+
*/
|
|
671
|
+
data?: HeadingData | undefined;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Info associated with mdast heading nodes by the ecosystem.
|
|
675
|
+
*/
|
|
676
|
+
interface HeadingData extends Data$1 {}
|
|
677
|
+
/**
|
|
678
|
+
* Markdown HTML.
|
|
679
|
+
*/
|
|
680
|
+
interface Html extends Literal$1 {
|
|
681
|
+
/**
|
|
682
|
+
* Node type of mdast HTML.
|
|
683
|
+
*/
|
|
684
|
+
type: "html";
|
|
685
|
+
/**
|
|
686
|
+
* Data associated with the mdast HTML.
|
|
687
|
+
*/
|
|
688
|
+
data?: HtmlData | undefined;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* Info associated with mdast HTML nodes by the ecosystem.
|
|
692
|
+
*/
|
|
693
|
+
interface HtmlData extends Data$1 {}
|
|
694
|
+
/**
|
|
695
|
+
* Markdown image.
|
|
696
|
+
*/
|
|
697
|
+
interface Image extends Alternative, Node$1, Resource {
|
|
698
|
+
/**
|
|
699
|
+
* Node type of mdast image.
|
|
700
|
+
*/
|
|
701
|
+
type: "image";
|
|
702
|
+
/**
|
|
703
|
+
* Data associated with the mdast image.
|
|
704
|
+
*/
|
|
705
|
+
data?: ImageData | undefined;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Info associated with mdast image nodes by the ecosystem.
|
|
709
|
+
*/
|
|
710
|
+
interface ImageData extends Data$1 {}
|
|
711
|
+
/**
|
|
712
|
+
* Markdown image reference.
|
|
713
|
+
*/
|
|
714
|
+
interface ImageReference extends Alternative, Node$1, Reference {
|
|
715
|
+
/**
|
|
716
|
+
* Node type of mdast image reference.
|
|
717
|
+
*/
|
|
718
|
+
type: "imageReference";
|
|
719
|
+
/**
|
|
720
|
+
* Data associated with the mdast image reference.
|
|
721
|
+
*/
|
|
722
|
+
data?: ImageReferenceData | undefined;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Info associated with mdast image reference nodes by the ecosystem.
|
|
726
|
+
*/
|
|
727
|
+
interface ImageReferenceData extends Data$1 {}
|
|
728
|
+
/**
|
|
729
|
+
* Markdown code (text) (inline).
|
|
730
|
+
*/
|
|
731
|
+
interface InlineCode extends Literal$1 {
|
|
732
|
+
/**
|
|
733
|
+
* Node type of mdast code (text).
|
|
734
|
+
*/
|
|
735
|
+
type: "inlineCode";
|
|
736
|
+
/**
|
|
737
|
+
* Data associated with the mdast code (text).
|
|
738
|
+
*/
|
|
739
|
+
data?: InlineCodeData | undefined;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Info associated with mdast code (text) (inline) nodes by the ecosystem.
|
|
743
|
+
*/
|
|
744
|
+
interface InlineCodeData extends Data$1 {}
|
|
745
|
+
/**
|
|
746
|
+
* Markdown link.
|
|
747
|
+
*/
|
|
748
|
+
interface Link extends Parent$1, Resource {
|
|
749
|
+
/**
|
|
750
|
+
* Node type of mdast link.
|
|
751
|
+
*/
|
|
752
|
+
type: "link";
|
|
753
|
+
/**
|
|
754
|
+
* Children of link.
|
|
755
|
+
*/
|
|
756
|
+
children: PhrasingContent[];
|
|
757
|
+
/**
|
|
758
|
+
* Data associated with the mdast link.
|
|
759
|
+
*/
|
|
760
|
+
data?: LinkData | undefined;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Info associated with mdast link nodes by the ecosystem.
|
|
764
|
+
*/
|
|
765
|
+
interface LinkData extends Data$1 {}
|
|
766
|
+
/**
|
|
767
|
+
* Markdown link reference.
|
|
768
|
+
*/
|
|
769
|
+
interface LinkReference extends Parent$1, Reference {
|
|
770
|
+
/**
|
|
771
|
+
* Node type of mdast link reference.
|
|
772
|
+
*/
|
|
773
|
+
type: "linkReference";
|
|
774
|
+
/**
|
|
775
|
+
* Children of link reference.
|
|
776
|
+
*/
|
|
777
|
+
children: PhrasingContent[];
|
|
778
|
+
/**
|
|
779
|
+
* Data associated with the mdast link reference.
|
|
780
|
+
*/
|
|
781
|
+
data?: LinkReferenceData | undefined;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Info associated with mdast link reference nodes by the ecosystem.
|
|
785
|
+
*/
|
|
786
|
+
interface LinkReferenceData extends Data$1 {}
|
|
787
|
+
/**
|
|
788
|
+
* Markdown list.
|
|
789
|
+
*/
|
|
790
|
+
interface List extends Parent$1 {
|
|
791
|
+
/**
|
|
792
|
+
* Node type of mdast list.
|
|
793
|
+
*/
|
|
794
|
+
type: "list";
|
|
795
|
+
/**
|
|
796
|
+
* Whether the items have been intentionally ordered (when `true`), or that
|
|
797
|
+
* the order of items is not important (when `false` or not present).
|
|
798
|
+
*/
|
|
799
|
+
ordered?: boolean | null | undefined;
|
|
800
|
+
/**
|
|
801
|
+
* The starting number of the list, when the `ordered` field is `true`.
|
|
802
|
+
*/
|
|
803
|
+
start?: number | null | undefined;
|
|
804
|
+
/**
|
|
805
|
+
* Whether one or more of the children are separated with a blank line from
|
|
806
|
+
* its siblings (when `true`), or not (when `false` or not present).
|
|
807
|
+
*/
|
|
808
|
+
spread?: boolean | null | undefined;
|
|
809
|
+
/**
|
|
810
|
+
* Children of list.
|
|
811
|
+
*/
|
|
812
|
+
children: ListContent[];
|
|
813
|
+
/**
|
|
814
|
+
* Data associated with the mdast list.
|
|
815
|
+
*/
|
|
816
|
+
data?: ListData | undefined;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Info associated with mdast list nodes by the ecosystem.
|
|
820
|
+
*/
|
|
821
|
+
interface ListData extends Data$1 {}
|
|
822
|
+
/**
|
|
823
|
+
* Markdown list item.
|
|
824
|
+
*/
|
|
825
|
+
interface ListItem extends Parent$1 {
|
|
826
|
+
/**
|
|
827
|
+
* Node type of mdast list item.
|
|
828
|
+
*/
|
|
829
|
+
type: "listItem";
|
|
830
|
+
/**
|
|
831
|
+
* Whether the item is a tasklist item (when `boolean`).
|
|
832
|
+
*
|
|
833
|
+
* When `true`, the item is complete.
|
|
834
|
+
* When `false`, the item is incomplete.
|
|
835
|
+
*/
|
|
836
|
+
checked?: boolean | null | undefined;
|
|
837
|
+
/**
|
|
838
|
+
* Whether one or more of the children are separated with a blank line from
|
|
839
|
+
* its siblings (when `true`), or not (when `false` or not present).
|
|
840
|
+
*/
|
|
841
|
+
spread?: boolean | null | undefined;
|
|
842
|
+
/**
|
|
843
|
+
* Children of list item.
|
|
844
|
+
*/
|
|
845
|
+
children: Array<BlockContent | DefinitionContent>;
|
|
846
|
+
/**
|
|
847
|
+
* Data associated with the mdast list item.
|
|
848
|
+
*/
|
|
849
|
+
data?: ListItemData | undefined;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Info associated with mdast list item nodes by the ecosystem.
|
|
853
|
+
*/
|
|
854
|
+
interface ListItemData extends Data$1 {}
|
|
855
|
+
/**
|
|
856
|
+
* Markdown paragraph.
|
|
857
|
+
*/
|
|
858
|
+
interface Paragraph extends Parent$1 {
|
|
859
|
+
/**
|
|
860
|
+
* Node type of mdast paragraph.
|
|
861
|
+
*/
|
|
862
|
+
type: "paragraph";
|
|
863
|
+
/**
|
|
864
|
+
* Children of paragraph.
|
|
865
|
+
*/
|
|
866
|
+
children: PhrasingContent[];
|
|
867
|
+
/**
|
|
868
|
+
* Data associated with the mdast paragraph.
|
|
869
|
+
*/
|
|
870
|
+
data?: ParagraphData | undefined;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Info associated with mdast paragraph nodes by the ecosystem.
|
|
874
|
+
*/
|
|
875
|
+
interface ParagraphData extends Data$1 {}
|
|
876
|
+
/**
|
|
877
|
+
* Document fragment or a whole document.
|
|
878
|
+
*
|
|
879
|
+
* Should be used as the root of a tree and must not be used as a child.
|
|
880
|
+
*/
|
|
881
|
+
interface Root$1 extends Parent$1 {
|
|
882
|
+
/**
|
|
883
|
+
* Node type of mdast root.
|
|
884
|
+
*/
|
|
885
|
+
type: "root";
|
|
886
|
+
/**
|
|
887
|
+
* Data associated with the mdast root.
|
|
888
|
+
*/
|
|
889
|
+
data?: RootData$1 | undefined;
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* Info associated with mdast root nodes by the ecosystem.
|
|
893
|
+
*/
|
|
894
|
+
interface RootData$1 extends Data$1 {}
|
|
895
|
+
/**
|
|
896
|
+
* Markdown strong.
|
|
897
|
+
*/
|
|
898
|
+
interface Strong extends Parent$1 {
|
|
899
|
+
/**
|
|
900
|
+
* Node type of mdast strong.
|
|
901
|
+
*/
|
|
902
|
+
type: "strong";
|
|
903
|
+
/**
|
|
904
|
+
* Children of strong.
|
|
905
|
+
*/
|
|
906
|
+
children: PhrasingContent[];
|
|
907
|
+
/**
|
|
908
|
+
* Data associated with the mdast strong.
|
|
909
|
+
*/
|
|
910
|
+
data?: StrongData | undefined;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Info associated with mdast strong nodes by the ecosystem.
|
|
914
|
+
*/
|
|
915
|
+
interface StrongData extends Data$1 {}
|
|
916
|
+
/**
|
|
917
|
+
* Markdown GFM table.
|
|
918
|
+
*/
|
|
919
|
+
interface Table extends Parent$1 {
|
|
920
|
+
/**
|
|
921
|
+
* Node type of mdast GFM table.
|
|
922
|
+
*/
|
|
923
|
+
type: "table";
|
|
924
|
+
/**
|
|
925
|
+
* How cells in columns are aligned.
|
|
926
|
+
*/
|
|
927
|
+
align?: AlignType[] | null | undefined;
|
|
928
|
+
/**
|
|
929
|
+
* Children of GFM table.
|
|
930
|
+
*/
|
|
931
|
+
children: TableContent[];
|
|
932
|
+
/**
|
|
933
|
+
* Data associated with the mdast GFM table.
|
|
934
|
+
*/
|
|
935
|
+
data?: TableData | undefined;
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Info associated with mdast GFM table nodes by the ecosystem.
|
|
939
|
+
*/
|
|
940
|
+
interface TableData extends Data$1 {}
|
|
941
|
+
/**
|
|
942
|
+
* Markdown GFM table row.
|
|
943
|
+
*/
|
|
944
|
+
interface TableRow extends Parent$1 {
|
|
945
|
+
/**
|
|
946
|
+
* Node type of mdast GFM table row.
|
|
947
|
+
*/
|
|
948
|
+
type: "tableRow";
|
|
949
|
+
/**
|
|
950
|
+
* Children of GFM table row.
|
|
951
|
+
*/
|
|
952
|
+
children: RowContent[];
|
|
953
|
+
/**
|
|
954
|
+
* Data associated with the mdast GFM table row.
|
|
955
|
+
*/
|
|
956
|
+
data?: TableRowData | undefined;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Info associated with mdast GFM table row nodes by the ecosystem.
|
|
960
|
+
*/
|
|
961
|
+
interface TableRowData extends Data$1 {}
|
|
962
|
+
/**
|
|
963
|
+
* Markdown GFM table cell.
|
|
964
|
+
*/
|
|
965
|
+
interface TableCell extends Parent$1 {
|
|
966
|
+
/**
|
|
967
|
+
* Node type of mdast GFM table cell.
|
|
968
|
+
*/
|
|
969
|
+
type: "tableCell";
|
|
970
|
+
/**
|
|
971
|
+
* Children of GFM table cell.
|
|
972
|
+
*/
|
|
973
|
+
children: PhrasingContent[];
|
|
974
|
+
/**
|
|
975
|
+
* Data associated with the mdast GFM table cell.
|
|
976
|
+
*/
|
|
977
|
+
data?: TableCellData | undefined;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Info associated with mdast GFM table cell nodes by the ecosystem.
|
|
981
|
+
*/
|
|
982
|
+
interface TableCellData extends Data$1 {}
|
|
983
|
+
/**
|
|
984
|
+
* Markdown text.
|
|
985
|
+
*/
|
|
986
|
+
interface Text$1 extends Literal$1 {
|
|
987
|
+
/**
|
|
988
|
+
* Node type of mdast text.
|
|
989
|
+
*/
|
|
990
|
+
type: "text";
|
|
991
|
+
/**
|
|
992
|
+
* Data associated with the mdast text.
|
|
993
|
+
*/
|
|
994
|
+
data?: TextData$1 | undefined;
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* Info associated with mdast text nodes by the ecosystem.
|
|
998
|
+
*/
|
|
999
|
+
interface TextData$1 extends Data$1 {}
|
|
1000
|
+
/**
|
|
1001
|
+
* Markdown thematic break (horizontal rule).
|
|
1002
|
+
*/
|
|
1003
|
+
interface ThematicBreak extends Node$1 {
|
|
1004
|
+
/**
|
|
1005
|
+
* Node type of mdast thematic break.
|
|
1006
|
+
*/
|
|
1007
|
+
type: "thematicBreak";
|
|
1008
|
+
/**
|
|
1009
|
+
* Data associated with the mdast thematic break.
|
|
1010
|
+
*/
|
|
1011
|
+
data?: ThematicBreakData | undefined;
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Info associated with mdast thematic break nodes by the ecosystem.
|
|
1015
|
+
*/
|
|
1016
|
+
interface ThematicBreakData extends Data$1 {}
|
|
1017
|
+
/**
|
|
1018
|
+
* Markdown YAML.
|
|
1019
|
+
*/
|
|
1020
|
+
interface Yaml extends Literal$1 {
|
|
1021
|
+
/**
|
|
1022
|
+
* Node type of mdast YAML.
|
|
1023
|
+
*/
|
|
1024
|
+
type: "yaml";
|
|
1025
|
+
/**
|
|
1026
|
+
* Data associated with the mdast YAML.
|
|
1027
|
+
*/
|
|
1028
|
+
data?: YamlData | undefined;
|
|
1029
|
+
}
|
|
4
1030
|
/**
|
|
5
|
-
*
|
|
6
|
-
* Uses the same remark/rehype chain as the Vantage viewer.
|
|
1031
|
+
* Info associated with mdast YAML nodes by the ecosystem.
|
|
7
1032
|
*/
|
|
1033
|
+
interface YamlData extends Data$1 {}
|
|
1034
|
+
//#endregion
|
|
1035
|
+
//#region src/renderMarkdown.d.ts
|
|
8
1036
|
interface RenderOptions {
|
|
9
1037
|
/** Enable GFM tables, strikethrough, task lists (default: true) */
|
|
10
1038
|
gfm?: boolean;
|
|
@@ -18,6 +1046,25 @@ interface RenderOptions {
|
|
|
18
1046
|
sanitize?: boolean;
|
|
19
1047
|
/** Parse and strip frontmatter (default: true) */
|
|
20
1048
|
frontmatter?: boolean;
|
|
1049
|
+
/**
|
|
1050
|
+
* The body's mdast, already parsed — an optimization, not a second input.
|
|
1051
|
+
*
|
|
1052
|
+
* Parsing is the most expensive step in this function: measured over
|
|
1053
|
+
* `docs/design/`, `remark-parse` with GFM costs about twice what the whole
|
|
1054
|
+
* rehype half costs. A caller that already holds the tree — the CLI checker
|
|
1055
|
+
* does, because every `mdast` rule ran on it before the render rule got its
|
|
1056
|
+
* turn — was paying for the same parse twice.
|
|
1057
|
+
*
|
|
1058
|
+
* The tree must have been parsed by **this package's remark half with these
|
|
1059
|
+
* same options** (`buildRemarkPlugins`, which is exported for exactly that
|
|
1060
|
+
* reason). Anything parsed some other way renders through a chain the viewer
|
|
1061
|
+
* does not use, which is the one thing the shared pipeline exists to prevent,
|
|
1062
|
+
* and nothing here can detect it: a tree is a tree.
|
|
1063
|
+
*
|
|
1064
|
+
* `content` is still read, for its frontmatter. The two have to describe the
|
|
1065
|
+
* same document.
|
|
1066
|
+
*/
|
|
1067
|
+
tree?: Root$1;
|
|
21
1068
|
}
|
|
22
1069
|
interface RenderResult {
|
|
23
1070
|
/** The rendered HTML string */
|
|
@@ -45,88 +1092,6 @@ interface RenderResult {
|
|
|
45
1092
|
*/
|
|
46
1093
|
export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
47
1094
|
//#endregion
|
|
48
|
-
//#region ../../node_modules/@types/unist/index.d.ts
|
|
49
|
-
// ## Interfaces
|
|
50
|
-
/**
|
|
51
|
-
* Info associated with nodes by the ecosystem.
|
|
52
|
-
*
|
|
53
|
-
* This space is guaranteed to never be specified by unist or specifications
|
|
54
|
-
* implementing unist.
|
|
55
|
-
* But you can use it in utilities and plugins to store data.
|
|
56
|
-
*
|
|
57
|
-
* This type can be augmented to register custom data.
|
|
58
|
-
* For example:
|
|
59
|
-
*
|
|
60
|
-
* ```ts
|
|
61
|
-
* declare module 'unist' {
|
|
62
|
-
* interface Data {
|
|
63
|
-
* // `someNode.data.myId` is typed as `number | undefined`
|
|
64
|
-
* myId?: number | undefined
|
|
65
|
-
* }
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
interface Data$1 {}
|
|
70
|
-
/**
|
|
71
|
-
* One place in a source file.
|
|
72
|
-
*/
|
|
73
|
-
interface Point {
|
|
74
|
-
/**
|
|
75
|
-
* Line in a source file (1-indexed integer).
|
|
76
|
-
*/
|
|
77
|
-
line: number;
|
|
78
|
-
/**
|
|
79
|
-
* Column in a source file (1-indexed integer).
|
|
80
|
-
*/
|
|
81
|
-
column: number;
|
|
82
|
-
/**
|
|
83
|
-
* Character in a source file (0-indexed integer).
|
|
84
|
-
*/
|
|
85
|
-
offset?: number | undefined;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Position of a node in a source document.
|
|
89
|
-
*
|
|
90
|
-
* A position is a range between two points.
|
|
91
|
-
*/
|
|
92
|
-
interface Position {
|
|
93
|
-
/**
|
|
94
|
-
* Place of the first character of the parsed source region.
|
|
95
|
-
*/
|
|
96
|
-
start: Point;
|
|
97
|
-
/**
|
|
98
|
-
* Place of the first character after the parsed source region.
|
|
99
|
-
*/
|
|
100
|
-
end: Point;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Abstract unist node.
|
|
104
|
-
*
|
|
105
|
-
* The syntactic unit in unist syntax trees are called nodes.
|
|
106
|
-
*
|
|
107
|
-
* This interface is supposed to be extended.
|
|
108
|
-
* If you can use {@link Literal} or {@link Parent}, you should.
|
|
109
|
-
* But for example in markdown, a `thematicBreak` (`***`), is neither literal
|
|
110
|
-
* nor parent, but still a node.
|
|
111
|
-
*/
|
|
112
|
-
interface Node$1 {
|
|
113
|
-
/**
|
|
114
|
-
* Node type.
|
|
115
|
-
*/
|
|
116
|
-
type: string;
|
|
117
|
-
/**
|
|
118
|
-
* Info from the ecosystem.
|
|
119
|
-
*/
|
|
120
|
-
data?: Data$1 | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* Position of a node in a source document.
|
|
123
|
-
*
|
|
124
|
-
* Nodes that are generated (not in the original source document) must not
|
|
125
|
-
* have a position.
|
|
126
|
-
*/
|
|
127
|
-
position?: Position | undefined;
|
|
128
|
-
}
|
|
129
|
-
//#endregion
|
|
130
1095
|
//#region ../../node_modules/@types/hast/index.d.ts
|
|
131
1096
|
// ## Interfaces
|
|
132
1097
|
/**
|
|
@@ -147,7 +1112,7 @@ interface Node$1 {
|
|
|
147
1112
|
* }
|
|
148
1113
|
* ```
|
|
149
1114
|
*/
|
|
150
|
-
interface Data extends Data$
|
|
1115
|
+
interface Data extends Data$2 {}
|
|
151
1116
|
/**
|
|
152
1117
|
* Info associated with an element.
|
|
153
1118
|
*/
|
|
@@ -849,7 +1814,7 @@ interface RootContentMap {
|
|
|
849
1814
|
*
|
|
850
1815
|
* For a union of all registered hast nodes, see {@link Nodes}.
|
|
851
1816
|
*/
|
|
852
|
-
interface Node extends Node$
|
|
1817
|
+
interface Node extends Node$2 {
|
|
853
1818
|
/**
|
|
854
1819
|
* Info from the ecosystem.
|
|
855
1820
|
*/
|
|
@@ -902,7 +1867,7 @@ interface CommentData extends Data {}
|
|
|
902
1867
|
/**
|
|
903
1868
|
* HTML document type.
|
|
904
1869
|
*/
|
|
905
|
-
interface Doctype extends Node$
|
|
1870
|
+
interface Doctype extends Node$2 {
|
|
906
1871
|
/**
|
|
907
1872
|
* Node type of HTML document types in hast.
|
|
908
1873
|
*/
|
|
@@ -1133,6 +2098,51 @@ export declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
|
1133
2098
|
* and said nothing, which is the D5 break this module exists to prevent.
|
|
1134
2099
|
*/
|
|
1135
2100
|
export declare const VANTAGE_OQ_HOST_TARGETS: ("p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "li" | "blockquote")[];
|
|
2101
|
+
/**
|
|
2102
|
+
* The status emoji the documentation convention marks an Open Question with, and
|
|
2103
|
+
* what each one means to a reader deciding whether the question wants them.
|
|
2104
|
+
*
|
|
2105
|
+
* These are *prose* — ordinary characters in the question's title, not part of
|
|
2106
|
+
* any directive — which is exactly why they need a home that both readers of
|
|
2107
|
+
* them can import. Two consumers ask what a marker means and they must not
|
|
2108
|
+
* answer differently: the checker's `vantage/oq-missing`, which demands a
|
|
2109
|
+
* directive on an open question and must never demand one on a blocked one, and
|
|
2110
|
+
* the viewer's contents column, which shows the marker and needs a word for it
|
|
2111
|
+
* that a screen reader can say. They were private constants in the checker until
|
|
2112
|
+
* the second consumer arrived.
|
|
2113
|
+
*
|
|
2114
|
+
* `open` is the only state that wants a one-click answer. `settled` and
|
|
2115
|
+
* `blocked` deliberately carry no directive at all — a control offering to
|
|
2116
|
+
* answer a question that is already decided, or that cannot be answered yet, is
|
|
2117
|
+
* a lie — so the checker keys on the distinction rather than on the word
|
|
2118
|
+
* "Leaning:" alone. Either non-open marker wins when both appear on one item.
|
|
2119
|
+
*/
|
|
2120
|
+
export declare const VANTAGE_OQ_STATUS: {
|
|
2121
|
+
/** 💬 — an active decision awaiting a ruling. */
|
|
2122
|
+
readonly open: "💬";
|
|
2123
|
+
/** ✅ — decided, awaiting compaction into a Decision Ledger. */
|
|
2124
|
+
readonly settled: "✅";
|
|
2125
|
+
/** 🔒 — blocked on an upstream decision or experiment. */
|
|
2126
|
+
readonly blocked: "🔒";
|
|
2127
|
+
};
|
|
2128
|
+
/** One of the convention's three states, as [VANTAGE_OQ_STATUS] names them. */
|
|
2129
|
+
type VantageOqStatus = keyof typeof VANTAGE_OQ_STATUS;
|
|
2130
|
+
/**
|
|
2131
|
+
* What a marker says, in words, for somewhere an emoji cannot go.
|
|
2132
|
+
*
|
|
2133
|
+
* An accessible name is the reason this exists: a contents entry whose whole
|
|
2134
|
+
* status is one glyph says nothing to a screen reader, and "speech bubble" —
|
|
2135
|
+
* which is what it would otherwise read out — is worse than nothing.
|
|
2136
|
+
*/
|
|
2137
|
+
export declare const VANTAGE_OQ_STATUS_LABEL: Readonly<Record<VantageOqStatus, string>>;
|
|
2138
|
+
/**
|
|
2139
|
+
* The state `text` is marked with, or `null` when it carries no marker.
|
|
2140
|
+
*
|
|
2141
|
+
* Non-open wins over open, the resolution `vantage/oq-missing` has always made:
|
|
2142
|
+
* a question marked both 💬 and ✅ has been answered and the stale marker simply
|
|
2143
|
+
* has not been cleared yet, so treating it as open would re-open a ruling.
|
|
2144
|
+
*/
|
|
2145
|
+
export declare function vantageOqStatus(text: string): VantageOqStatus | null;
|
|
1136
2146
|
/** `null` for a key the grammar accepts but no closed set covers. */
|
|
1137
2147
|
type KeyVocabulary = readonly string[] | null;
|
|
1138
2148
|
/** The keys one directive name accepts. `undefined` for an unknown key. */
|
|
@@ -1205,7 +2215,7 @@ interface PipelineOptions {
|
|
|
1205
2215
|
highlight?: boolean;
|
|
1206
2216
|
/** `data-source-line` attributes for line anchors (default: true) */
|
|
1207
2217
|
sourceLines?: boolean;
|
|
1208
|
-
/** XSS
|
|
2218
|
+
/** XSS sanitization (default: true) */
|
|
1209
2219
|
sanitize?: boolean;
|
|
1210
2220
|
/**
|
|
1211
2221
|
* Lines the frontmatter consumed, added to every emitted line number so
|
|
@@ -1266,7 +2276,7 @@ export declare function scrollToLineAnchor(container: HTMLElement, hash: string)
|
|
|
1266
2276
|
*
|
|
1267
2277
|
* Split out from scrollToLineAnchor.ts so that non-browser consumers — the
|
|
1268
2278
|
* `vantage-check` CLI, which validates `#L42` links against the file on disk —
|
|
1269
|
-
* can share the *same* syntax the viewer
|
|
2279
|
+
* can share the *same* syntax the viewer honors instead of reimplementing it
|
|
1270
2280
|
* and drifting.
|
|
1271
2281
|
*/
|
|
1272
2282
|
/**
|
|
@@ -1290,7 +2300,7 @@ type FrontmatterFormat = "yaml" | "toml" | "none";
|
|
|
1290
2300
|
*
|
|
1291
2301
|
* The parser deliberately never throws: a document whose frontmatter is broken
|
|
1292
2302
|
* still renders, with the block treated as body text. That is the right
|
|
1293
|
-
*
|
|
2303
|
+
* behavior for a viewer and the wrong one for an author, who gets no signal
|
|
1294
2304
|
* at all — so the reason is recorded here for anything that wants to report it
|
|
1295
2305
|
* (`vantage-check` does; see its frontmatter rules).
|
|
1296
2306
|
*
|
|
@@ -1352,7 +2362,7 @@ type DocStatus = (typeof DOC_STATUSES)[number];
|
|
|
1352
2362
|
/** Every key this build knows under `vantage:`. Closed. */
|
|
1353
2363
|
export declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
1354
2364
|
/**
|
|
1355
|
-
* Which tone each status borrows its
|
|
2365
|
+
* Which tone each status borrows its colors from.
|
|
1356
2366
|
*
|
|
1357
2367
|
* The chip has no palette of its own: it reuses the tone chips
|
|
1358
2368
|
* (`.vantage-chip--<tone>` in `styles/directives.css`), which is also what makes
|
|
@@ -1413,7 +2423,7 @@ export declare const SAFE_STYLE: RegExp;
|
|
|
1413
2423
|
* `false` — comments are not elements, so `tagNames` has nothing to do with it.
|
|
1414
2424
|
* `rehypeVantageDirectives` relies on that deletion: it consumes a
|
|
1415
2425
|
* `<!-- vantage: … -->` comment into attributes and deliberately leaves the node
|
|
1416
|
-
* for the
|
|
2426
|
+
* for the sanitizer. Turning the switch on readmits every directive comment —
|
|
1417
2427
|
* valid and malformed alike — into the rendered HTML, which breaks the carrier's
|
|
1418
2428
|
* whole premise. `vantageDirectives.test.ts` ("leaves no comment in the rendered
|
|
1419
2429
|
* markup") is the guard.
|
|
@@ -1455,6 +2465,29 @@ interface RenderMermaidOptions {
|
|
|
1455
2465
|
*/
|
|
1456
2466
|
export declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1457
2467
|
//#endregion
|
|
2468
|
+
//#region src/mermaidTheme.d.ts
|
|
2469
|
+
/**
|
|
2470
|
+
* The attribute on `<html>` naming the active color theme. Absent means the
|
|
2471
|
+
* built-in look. The app sets it only once the theme's stylesheet has loaded,
|
|
2472
|
+
* so a reader of this attribute can trust the theme's variables are in effect.
|
|
2473
|
+
*/
|
|
2474
|
+
export declare const COLOR_THEME_ATTRIBUTE = "data-vantage-theme";
|
|
2475
|
+
/**
|
|
2476
|
+
* The attribute on `<html>` saying where the active theme came from: `"user"`
|
|
2477
|
+
* for a stylesheet in the reader's themes directory, `"built-in"` for one the
|
|
2478
|
+
* app ships. Set with {@link COLOR_THEME_ATTRIBUTE}, and absent with it.
|
|
2479
|
+
*
|
|
2480
|
+
* It exists because an id alone is not a palette. A user theme may share a
|
|
2481
|
+
* built-in's id — that is how a reader tweaks one — and the app applies the
|
|
2482
|
+
* stored built-in synchronously, then swaps in the same-id user file once
|
|
2483
|
+
* /api/themes answers. Keyed on the id, the diagrams drawn in between kept the
|
|
2484
|
+
* built-in's colors: the key did not change, so neither the cache nor
|
|
2485
|
+
* `useSyncExternalStore` saw a reason to redraw.
|
|
2486
|
+
*/
|
|
2487
|
+
export declare const COLOR_THEME_SOURCE_ATTRIBUTE = "data-vantage-theme-source";
|
|
2488
|
+
/** The active color theme's id, or `""` for the built-in look. */
|
|
2489
|
+
export declare function currentColorTheme(): string;
|
|
2490
|
+
//#endregion
|
|
1458
2491
|
//#region src/resolveLinks.d.ts
|
|
1459
2492
|
/**
|
|
1460
2493
|
* Rewrite relative links in rendered markdown HTML.
|
|
@@ -1516,7 +2549,7 @@ export declare function resolveLinks(html: string, options?: ResolveLinkOptions)
|
|
|
1516
2549
|
* Every rule stated here should be one a checker can enforce or a renderer
|
|
1517
2550
|
* actually cares about — if a line is neither, it does not belong.
|
|
1518
2551
|
*/
|
|
1519
|
-
export declare const STYLE_GUIDE = "## Markdown style guide (for Vantage viewer)\n\nWhen writing or updating markdown documents that will be viewed in Vantage, follow these conventions:\n\n### Structure\n- Use headings (## and ###) to organize content — they become navigable outline anchors.\n- Keep paragraphs focused and concise. Break up dense text with subheadings, lists, or tables.\n\n### Links and cross-references\n- **Relative paths only**: Always link relative to the *current file's directory*:\n - Sibling in same folder: `[Other Doc](./other-doc.md)` or `[Other Doc](other-doc.md)`\n - Subdirectory: `[Design Doc](./design/auth.md)`\n - Parent / sibling folder: `[Overview](../overview.md)` or `[Spec](../specs/api.md)`\n- **Never use leading slashes**:\n - ❌ `[Doc](/docs/guide.md)` (breaks web routing and multi-repo scoping)\n - ✅ `[Doc](../docs/guide.md)` or `[Doc](./guide.md)`\n- **Never use absolute filesystem paths or URI schemes**:\n - ❌ `file:///workspace/docs/guide.md`, `/workspace/docs/guide.md`, `C:\\...`\n - ✅ `[Doc](./guide.md)` or `[Doc](../guide.md)`\n- **Always include the file extension**: Use `.md`, `.ts`, `.go`, etc. (e.g. `[Model](model.go)`).\n- **Line anchors and ranges**:\n - Link to specific lines: `[Handler](../server/api.go#L42)` or `[Range](../server/api.go#L42-L58)`\n - Same-file line anchor: `[See lines](#L10-L25)`\n - Vantage scrolls to and highlights the target lines.\n- **Section anchors**:\n - Same doc: `[Usage](#usage)`\n - Cross-doc: `[Architecture](../overview.md#system-architecture)`\n - Anchor slugs are lowercase, hyphenated, and punctuation-stripped.\n- **Backticks in links**: Place backticks inside the link label, not around the markdown link syntax:\n - ✅ `[`config.json`](./config.json)` or `[config.json](./config.json)`\n - ❌ ``[config.json](./config.json)``\n\n### Frontmatter (Metadata)\n- Include structured metadata at the very top of docs delimited by `---` (YAML) or `+++` (TOML). Vantage renders this as a metadata card:\n```yaml\n---\ntitle: \"Feature Specification\"\nauthor: \"Agent\"\ndate: 2026-08-15\nstatus: in-review # draft | in-review | accepted | deprecated\ntags: [architecture, backend, api]\nsummary: \"Brief description of the document purpose.\"\nvantage:\n status-chip: true # show `status` as a chip above the metadata card\n---\n```\n- **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a `<!-- vantage: … -->` directive. Frontmatter is
|
|
2552
|
+
export declare const STYLE_GUIDE = "## Markdown style guide (for Vantage viewer)\n\nWhen writing or updating markdown documents that will be viewed in Vantage, follow these conventions:\n\n### Structure\n- Use headings (## and ###) to organize content — they become navigable outline anchors.\n- Keep paragraphs focused and concise. Break up dense text with subheadings, lists, or tables.\n\n### Links and cross-references\n- **Relative paths only**: Always link relative to the *current file's directory*:\n - Sibling in same folder: `[Other Doc](./other-doc.md)` or `[Other Doc](other-doc.md)`\n - Subdirectory: `[Design Doc](./design/auth.md)`\n - Parent / sibling folder: `[Overview](../overview.md)` or `[Spec](../specs/api.md)`\n- **Never use leading slashes**:\n - ❌ `[Doc](/docs/guide.md)` (breaks web routing and multi-repo scoping)\n - ✅ `[Doc](../docs/guide.md)` or `[Doc](./guide.md)`\n- **Never use absolute filesystem paths or URI schemes**:\n - ❌ `file:///workspace/docs/guide.md`, `/workspace/docs/guide.md`, `C:\\...`\n - ✅ `[Doc](./guide.md)` or `[Doc](../guide.md)`\n- **Always include the file extension**: Use `.md`, `.ts`, `.go`, etc. (e.g. `[Model](model.go)`).\n- **Line anchors and ranges**:\n - Link to specific lines: `[Handler](../server/api.go#L42)` or `[Range](../server/api.go#L42-L58)`\n - Same-file line anchor: `[See lines](#L10-L25)`\n - Vantage scrolls to and highlights the target lines.\n- **Section anchors**:\n - Same doc: `[Usage](#usage)`\n - Cross-doc: `[Architecture](../overview.md#system-architecture)`\n - Anchor slugs are lowercase, hyphenated, and punctuation-stripped.\n- **Backticks in links**: Place backticks inside the link label, not around the markdown link syntax:\n - ✅ `[`config.json`](./config.json)` or `[config.json](./config.json)`\n - ❌ ``[config.json](./config.json)``\n\n### Frontmatter (Metadata)\n- Include structured metadata at the very top of docs delimited by `---` (YAML) or `+++` (TOML). Vantage renders this as a metadata card:\n```yaml\n---\ntitle: \"Feature Specification\"\nauthor: \"Agent\"\ndate: 2026-08-15\nstatus: in-review # draft | in-review | accepted | deprecated\ntags: [architecture, backend, api]\nsummary: \"Brief description of the document purpose.\"\nvantage:\n status-chip: true # show `status` as a chip above the metadata card\n---\n```\n- **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a `<!-- vantage: … -->` directive. Frontmatter is recognized only at the very first byte of the file (in Vantage, on GitHub, and in every other reader), so one line above it turns the whole block into body text: a horizontal rule followed by a heading made of the raw keys, with every field lost. `vantage-check` reports it as `frontmatter/not-at-top`.\n- **`vantage:` is Vantage's own reserved key.** It holds chrome that belongs to the file rather than to a section, it never shows up in the metadata card, and every other renderer ignores it. One key today: `status-chip`.\n- **Prefer `status-chip: true`**, which shows the document's own `status:` and therefore cannot disagree with it. A literal `status-chip: accepted` is accepted too, but it is a second value that goes stale on its own — `vantage-check` reports the disagreement.\n- The chip's vocabulary is `status`'s, exactly: `draft | in-review | accepted | deprecated`, lowercase. `Draft` renders no chip at all, silently.\n\n### Mermaid diagrams\n- Use ```mermaid code blocks for flowcharts, sequence diagrams, and architecture diagrams. Vantage provides interactive zoom, pan, dark/light theme adaptation, and SVG export.\n- **Quote labels with special characters**: Always quote node labels containing parentheses, brackets, or colons to prevent syntax errors:\n```mermaid\nflowchart TD\n client[\"Client (React SPA)\"] -->|WebSocket| srv[\"Vantage Server (Go)\"]\n srv --> git[\"Git CLI (git diff)\"]\n```\n\n### Code blocks and diffs\n- Always tag fenced code blocks with language identifiers (`ts`, `go`, `python`, `bash`, `json`, `yaml`, `diff`, `sql`, etc.) for syntax highlighting.\n- For proposed code modifications, use ```diff blocks with `+` and `-` prefixes:\n```diff\n-const oldUrl = \"/api/v1\";\n+const newUrl = \"/api/v2\";\n```\n\n### Callouts and alerts\n- Use GitHub-style blockquote callouts for notes, tips, and warnings:\n> [!NOTE]\n> Background context or helpful explanation.\n\n> [!TIP]\n> Best practice advice or optimization suggestions.\n\n> [!IMPORTANT]\n> Key requirements or crucial information.\n\n> [!WARNING]\n> Urgent caution, breaking changes, or potential pitfalls.\n\n> [!CAUTION]\n> High-risk actions that could cause data loss or security issues.\n\n### Vantage directives (optional, and Vantage-only)\n\nVantage reads a few styling hints from ordinary HTML comments. Every other renderer — GitHub included — drops them, so a document has to read exactly the same without them: directives decorate, they never carry meaning. One goes on a line of its own, with a blank line after it, and applies to the block that follows:\n\n```markdown\n<!-- vantage: section tone=warning badge=stale -->\n\n## Migration path\n\nThe steps below predate the rewrite.\n```\n\n- **Three names**: `section` (the heading and everything under it), `block` (the one block after it), `oq` (one answerable Open Question).\n- **The keys and values are a closed set**: `tone` = `note | tip | important | warning | caution | muted`; `emphasis` = `strong | normal | quiet`; `badge` = `draft | stale | blocked | done | wip`; `collapsed` = `true | false`. Name a *tone*, never a color — the theme decides what a warning looks like, in light mode, in dark mode, and in print.\n- **Use them sparingly.** One or two per document, on the sections that genuinely differ. A document where everything is toned says nothing, and a rainbow one is harder to read than a plain one.\n- **Anything outside those sets is silently ignored** — nothing breaks, and nothing styles either. Run `vantage-check` on the document: the `vantage/*` rules are the only thing that will ever tell you a directive did nothing.\n- **Always close the comment with `-->`.** Never `--!>`, and never leave it open: Markdown reads every line below an unclosed `<!--` as part of the comment, and the whole rest of the document vanishes from the page. For the same reason `-->` cannot appear *inside* a value — it ends the comment early and spills the remainder into the page as literal text.\n- **In a list, indent the directive inside the item**, with blank lines around it (below). At the start of a line between two items it ends the list and starts a second one, which changes the numbering and the spacing in every renderer — the one thing a directive must never do.\n- **An open question's id is `OQ-` then an optional short uppercase prefix then digits** — `OQ-9`, `OQ-TP6`, `OQ-A03`. The prefix is what keeps ids distinct once one document references another's questions, so use one in both whenever they cross-reference. `vantage-check` reports anything outside that shape as `vantage/oq-id-format`, and the same id twice in one document as `vantage/oq-id-duplicate` — both are silent otherwise, because the id becomes the block's anchor and a refused or duplicated one simply goes nowhere.\n- **A reference is a link, or it is a lie.** An `OQ-` id, a `§N` section number and a filename all read like pointers, and written as bare prose none of them can be followed or checked — which is exactly why a stale one is never caught. Link the question to its anchor (`[OQ-4](#OQ-4)`, or the Decision Ledger once it is compacted), the section to its heading, the filename to the file. `vantage-check` reports all three (`ref/*`) as errors, and checks that the link points at the thing the reference names rather than merely at something. Writing a specimen rather than a reference? Put it in a fenced block, which the rules never read.\n- **Every open question (💬) with a stated leaning gets an `oq` directive.** The convention's prose — the emoji, the `OQ-N` id, the `_Leaning:_` line, the fill-in `**Answer:**` — produces no button on its own. Writing the convention and stopping there is the most common way this feature goes missing: the questions look complete, review mode is on, and there is nothing to click. **`vantage-check` reports it as an error** (`vantage/oq-missing`), because a question awaiting a ruling that the reviewer cannot file is not a style preference. Mark it 🔒 if it is blocked on something upstream and cannot be answered yet, or ✅ once it is decided; either state needs no directive.\n- **A `leaning` restates the leaning; it is never \"yes\".** The one-click button in review mode files that text as a review comment, and the comment is all the agent reading it has — nobody remembers which button was clicked. `leaning=\"Yes\"` beside a two-branch question is a support ticket.\n\n```markdown\n1. **OQ-9: Queue position on re-entry.**\n\n <!-- vantage: oq id=OQ-9 leaning=\"Back of the queue — the fix might interact with what merged while it was out.\" -->\n\n _Leaning:_ Back of the queue.\n```\n\n### Tables, task lists, and math\n- **Tables**: Use standard markdown tables for structured comparisons and schemas.\n- **Task lists**: Use `- [ ]` and `- [x]` for actionable checklists and status tracking.\n- **LaTeX Math**: Use `$$...$$` for *all* KaTeX math — display blocks (`$$` alone on its own lines) and inline alike (`$$E = mc^2$$` mid-sentence).\n - Single dollars are **not** math delimiters: `$HOME` and `$100` stay literal, so prose and shell snippets are safe to write as-is.\n";
|
|
1520
2553
|
//#endregion
|
|
1521
|
-
export { type DirectivePair, type DirectiveParse, type DirectiveVocabulary, type DocStatus, type FrontmatterFormat, type FrontmatterProblem, type KeyTable, type KeyVocabulary, type MalformedDirective, type ParsedDirective, type ParsedFrontmatter, type Pipeline, type PipelineOptions, type RenderMermaidOptions, type RenderOptions, type RenderResult, type ResolveLinkOptions, type VantageAlert, type VantageFrontmatter, type VantageFrontmatterIssue, rehypeSourceLines, rehypeVantageAnchors, rehypeVantageDirectives };
|
|
2554
|
+
export { type DirectivePair, type DirectiveParse, type DirectiveVocabulary, type DocStatus, type FrontmatterFormat, type FrontmatterProblem, type KeyTable, type KeyVocabulary, type MalformedDirective, type ParsedDirective, type ParsedFrontmatter, type Pipeline, type PipelineOptions, type RenderMermaidOptions, type RenderOptions, type RenderResult, type ResolveLinkOptions, type VantageAlert, type VantageFrontmatter, type VantageFrontmatterIssue, type VantageOqStatus, rehypeSourceLines, rehypeVantageAnchors, rehypeVantageDirectives };
|
|
1522
2555
|
//# sourceMappingURL=index.d.cts.map
|