@isdk/mdast-plus 0.1.2 → 0.2.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.
Files changed (43) hide show
  1. package/README.cn.md +69 -22
  2. package/README.md +69 -22
  3. package/dist/index.d.mts +564 -199
  4. package/dist/index.d.ts +564 -199
  5. package/dist/index.js +1 -1
  6. package/dist/index.mjs +1 -1
  7. package/docs/README.md +69 -22
  8. package/docs/_media/CONTRIBUTING.md +53 -24
  9. package/docs/_media/README.cn.md +69 -22
  10. package/docs/classes/MdastBasePipeline.md +416 -0
  11. package/docs/classes/MdastPipeline.md +611 -0
  12. package/docs/enumerations/PipelineStage.md +62 -0
  13. package/docs/functions/astCompiler.md +25 -0
  14. package/docs/functions/jsonParser.md +24 -0
  15. package/docs/functions/mdast.md +4 -4
  16. package/docs/globals.md +17 -10
  17. package/docs/interfaces/MdastDataOrigin.md +8 -8
  18. package/docs/interfaces/MdastFormat.md +71 -0
  19. package/docs/interfaces/MdastMark.md +4 -4
  20. package/docs/interfaces/MdastPlugin.md +57 -25
  21. package/docs/interfaces/MdastSub.md +4 -4
  22. package/docs/interfaces/MdastSup.md +4 -4
  23. package/docs/interfaces/ReadabilityOptions.md +33 -0
  24. package/docs/type-aliases/PipelineStageName.md +13 -0
  25. package/docs/variables/DefaultPipelineStage.md +13 -0
  26. package/docs/variables/astFormat.md +15 -0
  27. package/docs/variables/htmlFormat.md +6 -4
  28. package/docs/variables/htmlReadability.md +13 -0
  29. package/docs/variables/htmlReadabilityPlugin.md +27 -0
  30. package/docs/variables/htmlReadabilityPlugins.md +13 -0
  31. package/docs/variables/markdownFormat.md +6 -4
  32. package/docs/variables/restoreReadabilityMetaPlugin.md +49 -0
  33. package/package.json +18 -9
  34. package/docs/classes/FluentProcessor.md +0 -210
  35. package/docs/functions/htmlStringify.md +0 -23
  36. package/docs/functions/markdownCommon.md +0 -23
  37. package/docs/interfaces/ConvertResult.md +0 -39
  38. package/docs/interfaces/MdastAsset.md +0 -41
  39. package/docs/interfaces/MdastFormatDefinition.md +0 -51
  40. package/docs/interfaces/MdastReader.md +0 -41
  41. package/docs/interfaces/MdastTransformer.md +0 -33
  42. package/docs/interfaces/MdastWriter.md +0 -47
  43. package/docs/type-aliases/Stage.md +0 -13
@@ -0,0 +1,611 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastPipeline
6
+
7
+ # Class: MdastPipeline
8
+
9
+ Defined in: [packages/mdast-plus/src/pipeline.ts:399](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L399)
10
+
11
+ Extended pipeline with convenience methods for common formats.
12
+
13
+ ## Extends
14
+
15
+ - [`MdastBasePipeline`](MdastBasePipeline.md)
16
+
17
+ ## Constructors
18
+
19
+ ### Constructor
20
+
21
+ > **new MdastPipeline**(`input`): `MdastPipeline`
22
+
23
+ Defined in: [packages/mdast-plus/src/pipeline.ts:54](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L54)
24
+
25
+ Initializes a new pipeline instance with the given input.
26
+
27
+ #### Parameters
28
+
29
+ ##### input
30
+
31
+ `Compatible`
32
+
33
+ Content to process (string, Buffer, VFile, or AST Node).
34
+
35
+ #### Returns
36
+
37
+ `MdastPipeline`
38
+
39
+ #### Inherited from
40
+
41
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`constructor`](MdastBasePipeline.md#constructor)
42
+
43
+ ## Properties
44
+
45
+ ### \_data
46
+
47
+ > `protected` **\_data**: `Record`\<`string`, `any`\> = `{}`
48
+
49
+ Defined in: [packages/mdast-plus/src/pipeline.ts:48](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L48)
50
+
51
+ #### Inherited from
52
+
53
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`_data`](MdastBasePipeline.md#_data)
54
+
55
+ ***
56
+
57
+ ### input
58
+
59
+ > `protected` **input**: `Compatible`
60
+
61
+ Defined in: [packages/mdast-plus/src/pipeline.ts:46](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L46)
62
+
63
+ #### Inherited from
64
+
65
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`input`](MdastBasePipeline.md#input)
66
+
67
+ ***
68
+
69
+ ### queue
70
+
71
+ > `protected` **queue**: [`MdastPlugin`](../interfaces/MdastPlugin.md)[] = `[]`
72
+
73
+ Defined in: [packages/mdast-plus/src/pipeline.ts:47](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L47)
74
+
75
+ #### Inherited from
76
+
77
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`queue`](MdastBasePipeline.md#queue)
78
+
79
+ ## Methods
80
+
81
+ ### assembleProcessor()
82
+
83
+ > `protected` **assembleProcessor**(`queue`): `Processor`
84
+
85
+ Defined in: [packages/mdast-plus/src/pipeline.ts:326](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L326)
86
+
87
+ Assembles a unified processor based on the sorted plugin queue.
88
+
89
+ #### Parameters
90
+
91
+ ##### queue
92
+
93
+ [`MdastPlugin`](../interfaces/MdastPlugin.md)[]
94
+
95
+ #### Returns
96
+
97
+ `Processor`
98
+
99
+ #### Inherited from
100
+
101
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`assembleProcessor`](MdastBasePipeline.md#assembleprocessor)
102
+
103
+ ***
104
+
105
+ ### data()
106
+
107
+ > **data**(`key`, `value?`): `this`
108
+
109
+ Defined in: [packages/mdast-plus/src/pipeline.ts:64](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L64)
110
+
111
+ Configures global data for the pipeline, which will be available to all plugins via this.data().
112
+
113
+ #### Parameters
114
+
115
+ ##### key
116
+
117
+ Data key or a record of multiple data entries.
118
+
119
+ `string` | `Record`\<`string`, `any`\>
120
+
121
+ ##### value?
122
+
123
+ `any`
124
+
125
+ Value to set (if key is a string).
126
+
127
+ #### Returns
128
+
129
+ `this`
130
+
131
+ The pipeline instance for chaining.
132
+
133
+ #### Inherited from
134
+
135
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`data`](MdastBasePipeline.md#data)
136
+
137
+ ***
138
+
139
+ ### ensureInputPlugins()
140
+
141
+ > `protected` **ensureInputPlugins**(`queue`, `overrides?`, `maxStage?`): `void`
142
+
143
+ Defined in: [packages/mdast-plus/src/pipeline.ts:149](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L149)
144
+
145
+ Ensures that input plugins (parser, normalizers) are present in the queue.
146
+ Adds implicit plugins if no parser is detected.
147
+
148
+ #### Parameters
149
+
150
+ ##### queue
151
+
152
+ [`MdastPlugin`](../interfaces/MdastPlugin.md)[]
153
+
154
+ ##### overrides?
155
+
156
+ `Record`\<`string`, `any`\>
157
+
158
+ ##### maxStage?
159
+
160
+ [`PipelineStage`](../enumerations/PipelineStage.md) = `PipelineStage.stringify`
161
+
162
+ #### Returns
163
+
164
+ `void`
165
+
166
+ #### Inherited from
167
+
168
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`ensureInputPlugins`](MdastBasePipeline.md#ensureinputplugins)
169
+
170
+ ***
171
+
172
+ ### from()
173
+
174
+ > **from**(`fmt`, `overrides?`): `this`
175
+
176
+ Defined in: [packages/mdast-plus/src/pipeline.ts:178](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L178)
177
+
178
+ Configures the input format and adds its associated plugins to the pipeline.
179
+
180
+ #### Parameters
181
+
182
+ ##### fmt
183
+
184
+ Format ID or definition.
185
+
186
+ `string` | [`MdastFormat`](../interfaces/MdastFormat.md)
187
+
188
+ ##### overrides?
189
+
190
+ `Record`\<`string`, `any`\>
191
+
192
+ Optional map to override plugin options by plugin name.
193
+
194
+ #### Returns
195
+
196
+ `this`
197
+
198
+ The pipeline instance for chaining.
199
+
200
+ #### Inherited from
201
+
202
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`from`](MdastBasePipeline.md#from)
203
+
204
+ ***
205
+
206
+ ### getFormat()
207
+
208
+ > **getFormat**(`id`): `undefined` \| [`MdastFormat`](../interfaces/MdastFormat.md)
209
+
210
+ Defined in: [packages/mdast-plus/src/pipeline.ts:76](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L76)
211
+
212
+ Instance-level access to the global format registry.
213
+
214
+ #### Parameters
215
+
216
+ ##### id
217
+
218
+ `string`
219
+
220
+ #### Returns
221
+
222
+ `undefined` \| [`MdastFormat`](../interfaces/MdastFormat.md)
223
+
224
+ #### Inherited from
225
+
226
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`getFormat`](MdastBasePipeline.md#getformat)
227
+
228
+ ***
229
+
230
+ ### priority()
231
+
232
+ > **priority**(`order`): `this`
233
+
234
+ Defined in: [packages/mdast-plus/src/pipeline.ts:314](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L314)
235
+
236
+ Sets the priority order for the most recently added plugin.
237
+ Plugins with lower order run earlier within the same stage.
238
+
239
+ #### Parameters
240
+
241
+ ##### order
242
+
243
+ `number`
244
+
245
+ Numeric priority.
246
+
247
+ #### Returns
248
+
249
+ `this`
250
+
251
+ The pipeline instance for chaining.
252
+
253
+ #### Inherited from
254
+
255
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`priority`](MdastBasePipeline.md#priority)
256
+
257
+ ***
258
+
259
+ ### to()
260
+
261
+ > **to**(`fmt`, `overrides?`): `Promise`\<`VFile`\>
262
+
263
+ Defined in: [packages/mdast-plus/src/pipeline.ts:198](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L198)
264
+
265
+ Processes the pipeline and serializes the result into the specified format.
266
+
267
+ #### Parameters
268
+
269
+ ##### fmt
270
+
271
+ Target format ID or definition.
272
+
273
+ `string` | [`MdastFormat`](../interfaces/MdastFormat.md)
274
+
275
+ ##### overrides?
276
+
277
+ `Record`\<`string`, `any`\>
278
+
279
+ Optional map to override plugin options.
280
+
281
+ #### Returns
282
+
283
+ `Promise`\<`VFile`\>
284
+
285
+ A promise resolving to a VFile containing the result.
286
+
287
+ #### Inherited from
288
+
289
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`to`](MdastBasePipeline.md#to)
290
+
291
+ ***
292
+
293
+ ### toAst()
294
+
295
+ > **toAst**(`options?`): `Promise`\<`Root`\>
296
+
297
+ Defined in: [packages/mdast-plus/src/pipeline.ts:436](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L436)
298
+
299
+ Finalizes the pipeline and returns the resulting AST (Root node).
300
+
301
+ #### Parameters
302
+
303
+ ##### options?
304
+
305
+ Configuration for the extraction.
306
+
307
+ ###### overrides?
308
+
309
+ `Record`\<`string`, `any`\>
310
+
311
+ Map for plugin option overrides.
312
+
313
+ ###### stage?
314
+
315
+ `"parse"` \| `"normalize"` \| `"compile"` \| `"finalize"` \| `"stringify"`
316
+
317
+ Run the pipeline up to this stage only.
318
+
319
+ #### Returns
320
+
321
+ `Promise`\<`Root`\>
322
+
323
+ ***
324
+
325
+ ### toAST()
326
+
327
+ > **toAST**(`options?`): `Promise`\<`Root`\>
328
+
329
+ Defined in: [packages/mdast-plus/src/pipeline.ts:474](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L474)
330
+
331
+ Alias for toAst()
332
+
333
+ #### Parameters
334
+
335
+ ##### options?
336
+
337
+ ###### overrides?
338
+
339
+ `Record`\<`string`, `any`\>
340
+
341
+ ###### stage?
342
+
343
+ `"parse"` \| `"normalize"` \| `"compile"` \| `"finalize"` \| `"stringify"`
344
+
345
+ #### Returns
346
+
347
+ `Promise`\<`Root`\>
348
+
349
+ ***
350
+
351
+ ### toHtml()
352
+
353
+ > **toHtml**(): `Promise`\<`string`\>
354
+
355
+ Defined in: [packages/mdast-plus/src/pipeline.ts:418](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L418)
356
+
357
+ Finalizes the pipeline and returns the result as an HTML string.
358
+
359
+ #### Returns
360
+
361
+ `Promise`\<`string`\>
362
+
363
+ ***
364
+
365
+ ### toHTML()
366
+
367
+ > **toHTML**(): `Promise`\<`string`\>
368
+
369
+ Defined in: [packages/mdast-plus/src/pipeline.ts:472](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L472)
370
+
371
+ Alias for toHtml()
372
+
373
+ #### Returns
374
+
375
+ `Promise`\<`string`\>
376
+
377
+ ***
378
+
379
+ ### toHtmlVFile()
380
+
381
+ > **toHtmlVFile**(): `Promise`\<`VFile`\>
382
+
383
+ Defined in: [packages/mdast-plus/src/pipeline.ts:426](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L426)
384
+
385
+ Finalizes the pipeline and returns a VFile containing the HTML result.
386
+
387
+ #### Returns
388
+
389
+ `Promise`\<`VFile`\>
390
+
391
+ ***
392
+
393
+ ### toMarkdown()
394
+
395
+ > **toMarkdown**(): `Promise`\<`string`\>
396
+
397
+ Defined in: [packages/mdast-plus/src/pipeline.ts:403](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L403)
398
+
399
+ Finalizes the pipeline and returns the result as a Markdown string.
400
+
401
+ #### Returns
402
+
403
+ `Promise`\<`string`\>
404
+
405
+ ***
406
+
407
+ ### toMarkdownVFile()
408
+
409
+ > **toMarkdownVFile**(): `Promise`\<`VFile`\>
410
+
411
+ Defined in: [packages/mdast-plus/src/pipeline.ts:411](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L411)
412
+
413
+ Finalizes the pipeline and returns a VFile containing the Markdown result.
414
+
415
+ #### Returns
416
+
417
+ `Promise`\<`VFile`\>
418
+
419
+ ***
420
+
421
+ ### toRuntimeEntry()
422
+
423
+ > `protected` **toRuntimeEntry**(`entry`, `defaultStage`, `overrides?`): [`MdastPlugin`](../interfaces/MdastPlugin.md) & `object`
424
+
425
+ Defined in: [packages/mdast-plus/src/pipeline.ts:100](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L100)
426
+
427
+ Normalizes a plugin entry for runtime execution.
428
+
429
+ #### Parameters
430
+
431
+ ##### entry
432
+
433
+ [`MdastPlugin`](../interfaces/MdastPlugin.md)
434
+
435
+ ##### defaultStage
436
+
437
+ [`PipelineStage`](../enumerations/PipelineStage.md)
438
+
439
+ ##### overrides?
440
+
441
+ `Record`\<`string`, `any`\>
442
+
443
+ #### Returns
444
+
445
+ [`MdastPlugin`](../interfaces/MdastPlugin.md) & `object`
446
+
447
+ #### Inherited from
448
+
449
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`toRuntimeEntry`](MdastBasePipeline.md#toruntimeentry)
450
+
451
+ ***
452
+
453
+ ### use()
454
+
455
+ > **use**(`plugin`, ...`options`): `this`
456
+
457
+ Defined in: [packages/mdast-plus/src/pipeline.ts:241](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L241)
458
+
459
+ Adds a plugin or an array of plugins to the pipeline's compile stage.
460
+
461
+ #### Parameters
462
+
463
+ ##### plugin
464
+
465
+ The unified plugin function, a MdastPlugin object, or an array of them.
466
+
467
+ [`MdastPlugin`](../interfaces/MdastPlugin.md) | `Plugin` | ([`MdastPlugin`](../interfaces/MdastPlugin.md) \| `Plugin`)[]
468
+
469
+ ##### options
470
+
471
+ ...`any`[]
472
+
473
+ Arguments for the plugin(s).
474
+
475
+ #### Returns
476
+
477
+ `this`
478
+
479
+ The pipeline instance for chaining.
480
+
481
+ #### Inherited from
482
+
483
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`use`](MdastBasePipeline.md#use)
484
+
485
+ ***
486
+
487
+ ### useAt()
488
+
489
+ #### Call Signature
490
+
491
+ > **useAt**(`stage`, `plugin`, ...`options`): `this`
492
+
493
+ Defined in: [packages/mdast-plus/src/pipeline.ts:252](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L252)
494
+
495
+ Adds a plugin or an array of plugins to the pipeline at a specific stage.
496
+
497
+ ##### Parameters
498
+
499
+ ###### stage
500
+
501
+ The stage name or numeric value.
502
+
503
+ `"parse"` | `"normalize"` | `"compile"` | `"finalize"` | `"stringify"`
504
+
505
+ ###### plugin
506
+
507
+ The unified plugin function, a MdastPlugin object, or an array of them.
508
+
509
+ [`MdastPlugin`](../interfaces/MdastPlugin.md) | `Plugin` | ([`MdastPlugin`](../interfaces/MdastPlugin.md) \| `Plugin`)[]
510
+
511
+ ###### options
512
+
513
+ ...`any`[]
514
+
515
+ Arguments for the plugin(s).
516
+
517
+ ##### Returns
518
+
519
+ `this`
520
+
521
+ The pipeline instance for chaining.
522
+
523
+ ##### Inherited from
524
+
525
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`useAt`](MdastBasePipeline.md#useat)
526
+
527
+ #### Call Signature
528
+
529
+ > **useAt**(`plugin`, ...`options`): `this`
530
+
531
+ Defined in: [packages/mdast-plus/src/pipeline.ts:259](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L259)
532
+
533
+ Adds a plugin or an array of plugins to the pipeline. The stage is taken from the plugin object(s).
534
+
535
+ ##### Parameters
536
+
537
+ ###### plugin
538
+
539
+ The MdastPlugin object or an array of them.
540
+
541
+ [`MdastPlugin`](../interfaces/MdastPlugin.md) | ([`MdastPlugin`](../interfaces/MdastPlugin.md) \| `Plugin`)[]
542
+
543
+ ###### options
544
+
545
+ ...`any`[]
546
+
547
+ Arguments for the plugin(s) (overrides plugin.options if provided).
548
+
549
+ ##### Returns
550
+
551
+ `this`
552
+
553
+ The pipeline instance for chaining.
554
+
555
+ ##### Inherited from
556
+
557
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`useAt`](MdastBasePipeline.md#useat)
558
+
559
+ ***
560
+
561
+ ### getFormat()
562
+
563
+ > `static` **getFormat**(`id`): `undefined` \| [`MdastFormat`](../interfaces/MdastFormat.md)
564
+
565
+ Defined in: [packages/mdast-plus/src/pipeline.ts:42](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L42)
566
+
567
+ Retrieves a registered format by its ID.
568
+
569
+ #### Parameters
570
+
571
+ ##### id
572
+
573
+ `string`
574
+
575
+ The format identifier.
576
+
577
+ #### Returns
578
+
579
+ `undefined` \| [`MdastFormat`](../interfaces/MdastFormat.md)
580
+
581
+ The format definition or undefined if not found.
582
+
583
+ #### Inherited from
584
+
585
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`getFormat`](MdastBasePipeline.md#getformat-2)
586
+
587
+ ***
588
+
589
+ ### register()
590
+
591
+ > `static` **register**(`format`): `void`
592
+
593
+ Defined in: [packages/mdast-plus/src/pipeline.ts:33](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/pipeline.ts#L33)
594
+
595
+ Registers a global document format.
596
+
597
+ #### Parameters
598
+
599
+ ##### format
600
+
601
+ [`MdastFormat`](../interfaces/MdastFormat.md)
602
+
603
+ The format definition to register.
604
+
605
+ #### Returns
606
+
607
+ `void`
608
+
609
+ #### Inherited from
610
+
611
+ [`MdastBasePipeline`](MdastBasePipeline.md).[`register`](MdastBasePipeline.md#register)
@@ -0,0 +1,62 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / PipelineStage
6
+
7
+ # Enumeration: PipelineStage
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:10](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/types.ts#L10)
10
+
11
+ PipelineStage defines the execution order of plugins in the processing pipeline.
12
+ Plugins are sorted and executed in ascending order based on these stage values.
13
+
14
+ ## Enumeration Members
15
+
16
+ ### compile
17
+
18
+ > **compile**: `200`
19
+
20
+ Defined in: [packages/mdast-plus/src/types.ts:16](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/types.ts#L16)
21
+
22
+ Transformation stage for semantic changes and custom high-level logic.
23
+
24
+ ***
25
+
26
+ ### finalize
27
+
28
+ > **finalize**: `300`
29
+
30
+ Defined in: [packages/mdast-plus/src/types.ts:18](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/types.ts#L18)
31
+
32
+ Finalization stage for preparing the AST for output (e.g., Sanitize, bridge to HAST).
33
+
34
+ ***
35
+
36
+ ### normalize
37
+
38
+ > **normalize**: `100`
39
+
40
+ Defined in: [packages/mdast-plus/src/types.ts:14](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/types.ts#L14)
41
+
42
+ Normalization stage for cleaning up and canonicalizing the AST (e.g., GFM, Directives).
43
+
44
+ ***
45
+
46
+ ### parse
47
+
48
+ > **parse**: `0`
49
+
50
+ Defined in: [packages/mdast-plus/src/types.ts:12](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/types.ts#L12)
51
+
52
+ Initial stage for parsing raw input (e.g., string to AST).
53
+
54
+ ***
55
+
56
+ ### stringify
57
+
58
+ > **stringify**: `400`
59
+
60
+ Defined in: [packages/mdast-plus/src/types.ts:20](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/types.ts#L20)
61
+
62
+ Final stage for serializing the AST to the target format result.
@@ -0,0 +1,25 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / astCompiler
6
+
7
+ # Function: astCompiler()
8
+
9
+ > **astCompiler**(`this`): `void`
10
+
11
+ Defined in: [packages/mdast-plus/src/formats/ast.ts:16](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/formats/ast.ts#L16)
12
+
13
+ Pass-through compiler that returns the AST as-is.
14
+ Essential for unified processes that should output an object (the AST)
15
+ instead of a serialized string.
16
+
17
+ ## Parameters
18
+
19
+ ### this
20
+
21
+ `any`
22
+
23
+ ## Returns
24
+
25
+ `void`
@@ -0,0 +1,24 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / jsonParser
6
+
7
+ # Function: jsonParser()
8
+
9
+ > **jsonParser**(`this`): `void`
10
+
11
+ Defined in: [packages/mdast-plus/src/formats/ast.ts:24](https://github.com/isdk/mdast-plus.js/blob/8870eec4ef97dd48bead818813d06479ceff9450/src/formats/ast.ts#L24)
12
+
13
+ Parser for stringified JSON AST input.
14
+ Allows the pipeline to accept a JSON string and treat it as a unist tree.
15
+
16
+ ## Parameters
17
+
18
+ ### this
19
+
20
+ `any`
21
+
22
+ ## Returns
23
+
24
+ `void`