@isdk/mdast-plus 0.1.1 → 0.1.3

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 (38) hide show
  1. package/README.cn.md +62 -19
  2. package/README.md +62 -19
  3. package/dist/index.d.mts +192 -125
  4. package/dist/index.d.ts +192 -125
  5. package/dist/index.js +1 -1
  6. package/dist/index.mjs +1 -1
  7. package/docs/README.md +62 -19
  8. package/docs/_media/CONTRIBUTING.md +39 -18
  9. package/docs/_media/README.cn.md +62 -19
  10. package/docs/classes/MdastBasePipeline.md +348 -0
  11. package/docs/classes/MdastPipeline.md +531 -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 +27 -27
  21. package/docs/interfaces/MdastSub.md +4 -4
  22. package/docs/interfaces/MdastSup.md +4 -4
  23. package/docs/type-aliases/PipelineStageName.md +13 -0
  24. package/docs/variables/DefaultPipelineStage.md +13 -0
  25. package/docs/variables/astFormat.md +15 -0
  26. package/docs/variables/htmlFormat.md +16 -0
  27. package/docs/variables/markdownFormat.md +16 -0
  28. package/package.json +11 -9
  29. package/docs/classes/FluentProcessor.md +0 -194
  30. package/docs/functions/htmlFormat.md +0 -24
  31. package/docs/functions/markdownFormat.md +0 -24
  32. package/docs/interfaces/ConvertResult.md +0 -39
  33. package/docs/interfaces/MdastAsset.md +0 -41
  34. package/docs/interfaces/MdastFormatDefinition.md +0 -51
  35. package/docs/interfaces/MdastReader.md +0 -41
  36. package/docs/interfaces/MdastTransformer.md +0 -33
  37. package/docs/interfaces/MdastWriter.md +0 -47
  38. package/docs/type-aliases/Stage.md +0 -13
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Interface: MdastDataOrigin
8
8
 
9
- Defined in: [packages/mdast-plus/src/types.ts:60](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L60)
9
+ Defined in: [packages/mdast-plus/src/types.ts:76](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L76)
10
10
 
11
- Original metadata for a node.
11
+ Metadata capturing the origin of a node during conversion.
12
12
 
13
13
  ## Indexable
14
14
 
@@ -20,9 +20,9 @@ Original metadata for a node.
20
20
 
21
21
  > **format**: `string`
22
22
 
23
- Defined in: [packages/mdast-plus/src/types.ts:62](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L62)
23
+ Defined in: [packages/mdast-plus/src/types.ts:78](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L78)
24
24
 
25
- Source format
25
+ The original source format.
26
26
 
27
27
  ***
28
28
 
@@ -30,9 +30,9 @@ Source format
30
30
 
31
31
  > `optional` **hash**: `string`
32
32
 
33
- Defined in: [packages/mdast-plus/src/types.ts:66](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L66)
33
+ Defined in: [packages/mdast-plus/src/types.ts:82](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L82)
34
34
 
35
- Hash of the source content
35
+ Hash used for caching or change detection.
36
36
 
37
37
  ***
38
38
 
@@ -40,6 +40,6 @@ Hash of the source content
40
40
 
41
41
  > `optional` **raw**: `unknown`
42
42
 
43
- Defined in: [packages/mdast-plus/src/types.ts:64](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L64)
43
+ Defined in: [packages/mdast-plus/src/types.ts:80](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L80)
44
44
 
45
- Raw data from the source
45
+ The raw content from the source before conversion.
@@ -0,0 +1,71 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastFormat
6
+
7
+ # Interface: MdastFormat
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:56](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L56)
10
+
11
+ Defines a document format, encompassing its input (parsing) and output (serialization) strategies.
12
+
13
+ ## Properties
14
+
15
+ ### extensions?
16
+
17
+ > `optional` **extensions**: `string`[]
18
+
19
+ Defined in: [packages/mdast-plus/src/types.ts:62](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L62)
20
+
21
+ File extensions associated with this format.
22
+
23
+ ***
24
+
25
+ ### id
26
+
27
+ > **id**: `string`
28
+
29
+ Defined in: [packages/mdast-plus/src/types.ts:58](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L58)
30
+
31
+ Unique identifier for the format (e.g., 'markdown', 'html').
32
+
33
+ ***
34
+
35
+ ### input?
36
+
37
+ > `optional` **input**: [`MdastPlugin`](MdastPlugin.md)[]
38
+
39
+ Defined in: [packages/mdast-plus/src/types.ts:67](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L67)
40
+
41
+ Plugins used for reading this format into a standard AST (Parser + Normalizer).
42
+
43
+ ***
44
+
45
+ ### mediaTypes?
46
+
47
+ > `optional` **mediaTypes**: `string`[]
48
+
49
+ Defined in: [packages/mdast-plus/src/types.ts:64](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L64)
50
+
51
+ MIME types associated with this format.
52
+
53
+ ***
54
+
55
+ ### output?
56
+
57
+ > `optional` **output**: [`MdastPlugin`](MdastPlugin.md)[]
58
+
59
+ Defined in: [packages/mdast-plus/src/types.ts:70](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L70)
60
+
61
+ Plugins used for serializing the AST into this format (Finalizer + Stringifier).
62
+
63
+ ***
64
+
65
+ ### title?
66
+
67
+ > `optional` **title**: `string`
68
+
69
+ Defined in: [packages/mdast-plus/src/types.ts:60](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L60)
70
+
71
+ Human-readable title.
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Interface: MdastMark
8
8
 
9
- Defined in: [packages/mdast-plus/src/types.ts:73](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L73)
9
+ Defined in: [packages/mdast-plus/src/types.ts:87](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L87)
10
10
 
11
- mdast node for highlighted text (mark).
11
+ Represents a highlighted text (mark) node in mdast.
12
12
 
13
13
  ## Extends
14
14
 
@@ -20,7 +20,7 @@ mdast node for highlighted text (mark).
20
20
 
21
21
  > **children**: `PhrasingContent`[]
22
22
 
23
- Defined in: [packages/mdast-plus/src/types.ts:75](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L75)
23
+ Defined in: [packages/mdast-plus/src/types.ts:89](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L89)
24
24
 
25
25
  List of children.
26
26
 
@@ -65,7 +65,7 @@ have a position.
65
65
 
66
66
  > **type**: `"mark"`
67
67
 
68
- Defined in: [packages/mdast-plus/src/types.ts:74](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L74)
68
+ Defined in: [packages/mdast-plus/src/types.ts:88](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L88)
69
69
 
70
70
  Node type.
71
71
 
@@ -6,60 +6,60 @@
6
6
 
7
7
  # Interface: MdastPlugin
8
8
 
9
- Defined in: [packages/mdast-plus/src/types.ts:13](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L13)
9
+ Defined in: [packages/mdast-plus/src/types.ts:33](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L33)
10
10
 
11
- Definition for an mdast plugin.
11
+ Configuration for a plugin within the mdast-plus pipeline.
12
+ It wraps a standard unified plugin with execution metadata.
12
13
 
13
14
  ## Properties
14
15
 
15
- ### name
16
+ ### name?
16
17
 
17
- > **name**: `string`
18
+ > `optional` **name**: `string`
18
19
 
19
- Defined in: [packages/mdast-plus/src/types.ts:15](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L15)
20
+ Defined in: [packages/mdast-plus/src/types.ts:39](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L39)
20
21
 
21
- Plugin name
22
+ Optional name for the plugin.
23
+ Used for identification in overrides and logging.
24
+ If not provided, defaults to the plugin function's name.
22
25
 
23
26
  ***
24
27
 
25
- ### order?
28
+ ### options?
26
29
 
27
- > `optional` **order**: `number`
30
+ > `optional` **options**: `any`[]
28
31
 
29
- Defined in: [packages/mdast-plus/src/types.ts:19](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L19)
32
+ Defined in: [packages/mdast-plus/src/types.ts:46](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L46)
30
33
 
31
- Execution order within the stage (lower numbers run first)
34
+ Arguments passed to the plugin.
35
+ MUST be an array of arguments (e.g., [optionsObject]).
32
36
 
33
37
  ***
34
38
 
35
- ### stage?
39
+ ### order?
36
40
 
37
- > `optional` **stage**: [`Stage`](../type-aliases/Stage.md)
41
+ > `optional` **order**: `number`
38
42
 
39
- Defined in: [packages/mdast-plus/src/types.ts:17](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L17)
43
+ Defined in: [packages/mdast-plus/src/types.ts:50](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L50)
40
44
 
41
- Processing stage the plugin belongs to
45
+ Execution priority within the same stage. Lower values run earlier.
42
46
 
43
47
  ***
44
48
 
45
- ### transform()
49
+ ### plugin
46
50
 
47
- > **transform**: (`tree`, `ctx`) => `void` \| `Promise`\<`void`\>
51
+ > **plugin**: `Plugin`\<`any`[], `any`, `any`\>
48
52
 
49
- Defined in: [packages/mdast-plus/src/types.ts:21](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L21)
53
+ Defined in: [packages/mdast-plus/src/types.ts:41](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L41)
50
54
 
51
- Transformation function
55
+ The standard unified plugin (attacher) function.
52
56
 
53
- #### Parameters
54
-
55
- ##### tree
56
-
57
- `Root`
57
+ ***
58
58
 
59
- ##### ctx
59
+ ### stage?
60
60
 
61
- `any`
61
+ > `optional` **stage**: [`PipelineStage`](../enumerations/PipelineStage.md) \| `"parse"` \| `"normalize"` \| `"compile"` \| `"finalize"` \| `"stringify"`
62
62
 
63
- #### Returns
63
+ Defined in: [packages/mdast-plus/src/types.ts:48](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L48)
64
64
 
65
- `void` \| `Promise`\<`void`\>
65
+ The stage in which this plugin should run.
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Interface: MdastSub
8
8
 
9
- Defined in: [packages/mdast-plus/src/types.ts:81](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L81)
9
+ Defined in: [packages/mdast-plus/src/types.ts:93](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L93)
10
10
 
11
- mdast node for subscript text.
11
+ Represents a subscript text node in mdast.
12
12
 
13
13
  ## Extends
14
14
 
@@ -20,7 +20,7 @@ mdast node for subscript text.
20
20
 
21
21
  > **children**: `PhrasingContent`[]
22
22
 
23
- Defined in: [packages/mdast-plus/src/types.ts:83](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L83)
23
+ Defined in: [packages/mdast-plus/src/types.ts:95](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L95)
24
24
 
25
25
  List of children.
26
26
 
@@ -65,7 +65,7 @@ have a position.
65
65
 
66
66
  > **type**: `"sub"`
67
67
 
68
- Defined in: [packages/mdast-plus/src/types.ts:82](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L82)
68
+ Defined in: [packages/mdast-plus/src/types.ts:94](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L94)
69
69
 
70
70
  Node type.
71
71
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  # Interface: MdastSup
8
8
 
9
- Defined in: [packages/mdast-plus/src/types.ts:89](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L89)
9
+ Defined in: [packages/mdast-plus/src/types.ts:99](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L99)
10
10
 
11
- mdast node for superscript text.
11
+ Represents a superscript text node in mdast.
12
12
 
13
13
  ## Extends
14
14
 
@@ -20,7 +20,7 @@ mdast node for superscript text.
20
20
 
21
21
  > **children**: `PhrasingContent`[]
22
22
 
23
- Defined in: [packages/mdast-plus/src/types.ts:91](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L91)
23
+ Defined in: [packages/mdast-plus/src/types.ts:101](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L101)
24
24
 
25
25
  List of children.
26
26
 
@@ -65,7 +65,7 @@ have a position.
65
65
 
66
66
  > **type**: `"sup"`
67
67
 
68
- Defined in: [packages/mdast-plus/src/types.ts:90](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L90)
68
+ Defined in: [packages/mdast-plus/src/types.ts:100](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L100)
69
69
 
70
70
  Node type.
71
71
 
@@ -0,0 +1,13 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / PipelineStageName
6
+
7
+ # Type Alias: PipelineStageName
8
+
9
+ > **PipelineStageName** = keyof *typeof* [`PipelineStage`](../enumerations/PipelineStage.md)
10
+
11
+ Defined in: [packages/mdast-plus/src/types.ts:27](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L27)
12
+
13
+ String names corresponding to the PipelineStage levels.
@@ -0,0 +1,13 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / DefaultPipelineStage
6
+
7
+ # Variable: DefaultPipelineStage
8
+
9
+ > `const` **DefaultPipelineStage**: [`compile`](../enumerations/PipelineStage.md#compile) = `PipelineStage.compile`
10
+
11
+ Defined in: [packages/mdast-plus/src/types.ts:24](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/types.ts#L24)
12
+
13
+ The default stage assigned to a plugin if none is specified.
@@ -0,0 +1,15 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / astFormat
6
+
7
+ # Variable: astFormat
8
+
9
+ > `const` **astFormat**: [`MdastFormat`](../interfaces/MdastFormat.md)
10
+
11
+ Defined in: [packages/mdast-plus/src/formats/ast.ts:35](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/formats/ast.ts#L35)
12
+
13
+ AST (MDAST) format definition.
14
+ Supports reading from JSON strings and provides full normalization
15
+ through the standard mdast-plus plugin set.
@@ -0,0 +1,16 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / htmlFormat
6
+
7
+ # Variable: htmlFormat
8
+
9
+ > `const` **htmlFormat**: [`MdastFormat`](../interfaces/MdastFormat.md)
10
+
11
+ Defined in: [packages/mdast-plus/src/formats/html.ts:70](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/formats/html.ts#L70)
12
+
13
+ HTML format definition.
14
+
15
+ Provides a bidirectional mapping between HTML strings and mdast-plus ASTs.
16
+ Includes built-in sanitization and support for table spans and image dimensions.
@@ -0,0 +1,16 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / markdownFormat
6
+
7
+ # Variable: markdownFormat
8
+
9
+ > `const` **markdownFormat**: [`MdastFormat`](../interfaces/MdastFormat.md)
10
+
11
+ Defined in: [packages/mdast-plus/src/formats/markdown.ts:103](https://github.com/isdk/mdast-plus.js/blob/bacb4922529058fef775e3f4b4e71c98ac1cab17/src/formats/markdown.ts#L103)
12
+
13
+ Markdown format definition.
14
+
15
+ Supports GFM, Directives, Math, and Frontmatter.
16
+ Provides a bidirectional mapping between Markdown strings and mdast-plus ASTs.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@isdk/mdast-plus",
3
3
  "description": "A semantic-first Markdown processing toolkit based on unified, remark, and rehype with a Fluent API and staged plugin system.",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "license": "MIT",
6
6
  "author": "Riceball LEE <snowyu.lee@gmail.com>",
7
7
  "homepage": "https://github.com/isdk/mdast-plus.js",
@@ -24,28 +24,30 @@
24
24
  "dependencies": {
25
25
  "ajv": "^8.17.1",
26
26
  "ajv-formats": "^3.0.1",
27
- "lodash-es": "^4.17.22",
28
- "mdast-util-to-hast": "^13.2.1",
29
27
  "hast-util-to-mdast": "^10.1.2",
28
+ "lodash-es": "^4.17.22",
30
29
  "mdast-util-directive": "^3.1.0",
31
30
  "mdast-util-gfm": "^3.1.0",
32
31
  "mdast-util-math": "^3.0.0",
32
+ "mdast-util-to-hast": "^13.2.1",
33
+ "rehype-parse": "^9.0.1",
34
+ "rehype-remark": "^10.0.1",
35
+ "rehype-sanitize": "^6.0.0",
36
+ "rehype-stringify": "^10.0.1",
33
37
  "remark-directive": "^4.0.0",
34
38
  "remark-frontmatter": "^5.0.0",
35
39
  "remark-gfm": "^4.0.1",
36
40
  "remark-math": "^6.0.0",
37
41
  "remark-parse": "^11.0.0",
38
- "remark-stringify": "^11.0.0",
39
- "rehype-parse": "^9.0.1",
40
- "rehype-stringify": "^10.0.1",
41
- "rehype-remark": "^10.0.1",
42
42
  "remark-rehype": "^11.1.2",
43
- "rehype-sanitize": "^6.0.0",
43
+ "remark-stringify": "^11.0.0",
44
44
  "shell-quote": "^1.8.3",
45
45
  "unified": "^11.0.5",
46
46
  "unist-util-select": "^5.1.0",
47
47
  "unist-util-visit": "^5.0.0",
48
- "util-ex": "^2.4.0"
48
+ "util-ex": "^2.4.0",
49
+ "vfile": "^6.0.3",
50
+ "yaml": "^2.8.2"
49
51
  },
50
52
  "devDependencies": {
51
53
  "@antfu/eslint-config": "^4.10.1",
@@ -1,194 +0,0 @@
1
- [**@isdk/mdast-plus**](../README.md)
2
-
3
- ***
4
-
5
- [@isdk/mdast-plus](../globals.md) / FluentProcessor
6
-
7
- # Class: FluentProcessor
8
-
9
- Defined in: [packages/mdast-plus/src/pipeline.ts:24](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L24)
10
-
11
- Fluent processor for mdast transformations.
12
- Allows chaining configuration and finally converting to a target format.
13
-
14
- ## Constructors
15
-
16
- ### Constructor
17
-
18
- > **new FluentProcessor**(`input`): `FluentProcessor`
19
-
20
- Defined in: [packages/mdast-plus/src/pipeline.ts:59](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L59)
21
-
22
- Creates a new FluentProcessor instance.
23
-
24
- #### Parameters
25
-
26
- ##### input
27
-
28
- `any`
29
-
30
- The input content (string or mdast tree)
31
-
32
- #### Returns
33
-
34
- `FluentProcessor`
35
-
36
- ## Properties
37
-
38
- ### formats
39
-
40
- > `static` **formats**: `Record`\<`string`, [`MdastFormatDefinition`](../interfaces/MdastFormatDefinition.md)\>
41
-
42
- Defined in: [packages/mdast-plus/src/pipeline.ts:26](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L26)
43
-
44
- Map of registered format definitions
45
-
46
- ## Methods
47
-
48
- ### data()
49
-
50
- > **data**(`data`): `this`
51
-
52
- Defined in: [packages/mdast-plus/src/pipeline.ts:93](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L93)
53
-
54
- Merges global data into the processor.
55
-
56
- #### Parameters
57
-
58
- ##### data
59
-
60
- `Record`\<`string`, `any`\>
61
-
62
- Key-value pairs to store in global data
63
-
64
- #### Returns
65
-
66
- `this`
67
-
68
- ***
69
-
70
- ### from()
71
-
72
- > **from**(`format`): `this`
73
-
74
- Defined in: [packages/mdast-plus/src/pipeline.ts:75](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L75)
75
-
76
- Specifies the input format.
77
-
78
- #### Parameters
79
-
80
- ##### format
81
-
82
- `string`
83
-
84
- The input format name (default: 'markdown')
85
-
86
- #### Returns
87
-
88
- `this`
89
-
90
- ***
91
-
92
- ### to()
93
-
94
- > **to**(`format`): `Promise`\<[`ConvertResult`](../interfaces/ConvertResult.md)\<`string`\>\>
95
-
96
- Defined in: [packages/mdast-plus/src/pipeline.ts:103](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L103)
97
-
98
- Converts the input content to the specified format.
99
-
100
- #### Parameters
101
-
102
- ##### format
103
-
104
- `string`
105
-
106
- The output format name
107
-
108
- #### Returns
109
-
110
- `Promise`\<[`ConvertResult`](../interfaces/ConvertResult.md)\<`string`\>\>
111
-
112
- A promise resolving to the conversion result (content and assets)
113
-
114
- ***
115
-
116
- ### toHTML()
117
-
118
- > **toHTML**(): `Promise`\<`string`\>
119
-
120
- Defined in: [packages/mdast-plus/src/pipeline.ts:173](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L173)
121
-
122
- Helper to convert content to HTML.
123
-
124
- #### Returns
125
-
126
- `Promise`\<`string`\>
127
-
128
- A promise resolving to the HTML string
129
-
130
- ***
131
-
132
- ### toMarkdown()
133
-
134
- > **toMarkdown**(): `Promise`\<`string`\>
135
-
136
- Defined in: [packages/mdast-plus/src/pipeline.ts:164](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L164)
137
-
138
- Helper to convert content to Markdown.
139
-
140
- #### Returns
141
-
142
- `Promise`\<`string`\>
143
-
144
- A promise resolving to the Markdown string
145
-
146
- ***
147
-
148
- ### use()
149
-
150
- > **use**(`plugin`): `this`
151
-
152
- Defined in: [packages/mdast-plus/src/pipeline.ts:84](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L84)
153
-
154
- Adds a plugin to the processing pipeline.
155
-
156
- #### Parameters
157
-
158
- ##### plugin
159
-
160
- [`MdastPlugin`](../interfaces/MdastPlugin.md)
161
-
162
- The mdast plugin to use
163
-
164
- #### Returns
165
-
166
- `this`
167
-
168
- ***
169
-
170
- ### registerFormat()
171
-
172
- > `static` **registerFormat**(`name`, `definition`): `void`
173
-
174
- Defined in: [packages/mdast-plus/src/pipeline.ts:45](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/pipeline.ts#L45)
175
-
176
- Registers a new format definition.
177
-
178
- #### Parameters
179
-
180
- ##### name
181
-
182
- `string`
183
-
184
- The name of the format (e.g., 'docx')
185
-
186
- ##### definition
187
-
188
- [`MdastFormatDefinition`](../interfaces/MdastFormatDefinition.md)
189
-
190
- The format definition containing parse/stringify logic
191
-
192
- #### Returns
193
-
194
- `void`
@@ -1,24 +0,0 @@
1
- [**@isdk/mdast-plus**](../README.md)
2
-
3
- ***
4
-
5
- [@isdk/mdast-plus](../globals.md) / htmlFormat
6
-
7
- # Function: htmlFormat()
8
-
9
- > **htmlFormat**(`this`): `void`
10
-
11
- Defined in: [packages/mdast-plus/src/formats/html.ts:9](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/formats/html.ts#L9)
12
-
13
- Unified plugin/configuration for HTML format.
14
- Includes mdast-to-hast conversion, sanitization (with table span support), and stringification.
15
-
16
- ## Parameters
17
-
18
- ### this
19
-
20
- `any`
21
-
22
- ## Returns
23
-
24
- `void`
@@ -1,24 +0,0 @@
1
- [**@isdk/mdast-plus**](../README.md)
2
-
3
- ***
4
-
5
- [@isdk/mdast-plus](../globals.md) / markdownFormat
6
-
7
- # Function: markdownFormat()
8
-
9
- > **markdownFormat**(`this`): `void`
10
-
11
- Defined in: [packages/mdast-plus/src/formats/markdown.ts:10](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/formats/markdown.ts#L10)
12
-
13
- Unified plugin/configuration for Markdown format.
14
- Includes GFM, directives, math, and frontmatter.
15
-
16
- ## Parameters
17
-
18
- ### this
19
-
20
- `any`
21
-
22
- ## Returns
23
-
24
- `void`