@isdk/mdast-plus 0.1.1

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.
@@ -0,0 +1,39 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / ConvertResult
6
+
7
+ # Interface: ConvertResult\<T\>
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:50](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L50)
10
+
11
+ Result of a conversion process.
12
+
13
+ ## Type Parameters
14
+
15
+ ### T
16
+
17
+ `T` = `string`
18
+
19
+ The type of the main content (default: string)
20
+
21
+ ## Properties
22
+
23
+ ### assets
24
+
25
+ > **assets**: [`MdastAsset`](MdastAsset.md)[]
26
+
27
+ Defined in: [packages/mdast-plus/src/types.ts:54](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L54)
28
+
29
+ Extracted assets
30
+
31
+ ***
32
+
33
+ ### content
34
+
35
+ > **content**: `T`
36
+
37
+ Defined in: [packages/mdast-plus/src/types.ts:52](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L52)
38
+
39
+ The converted content
@@ -0,0 +1,41 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastAsset
6
+
7
+ # Interface: MdastAsset
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:37](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L37)
10
+
11
+ Represents an asset (e.g., image) extracted during processing.
12
+
13
+ ## Properties
14
+
15
+ ### bytes
16
+
17
+ > **bytes**: `Uint8Array`
18
+
19
+ Defined in: [packages/mdast-plus/src/types.ts:43](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L43)
20
+
21
+ Raw content as bytes
22
+
23
+ ***
24
+
25
+ ### contentType
26
+
27
+ > **contentType**: `string`
28
+
29
+ Defined in: [packages/mdast-plus/src/types.ts:41](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L41)
30
+
31
+ MIME type of the asset
32
+
33
+ ***
34
+
35
+ ### path
36
+
37
+ > **path**: `string`
38
+
39
+ Defined in: [packages/mdast-plus/src/types.ts:39](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L39)
40
+
41
+ Relative path or identifier for the asset
@@ -0,0 +1,45 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastDataOrigin
6
+
7
+ # Interface: MdastDataOrigin
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:60](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L60)
10
+
11
+ Original metadata for a node.
12
+
13
+ ## Indexable
14
+
15
+ \[`k`: `string`\]: `unknown`
16
+
17
+ ## Properties
18
+
19
+ ### format
20
+
21
+ > **format**: `string`
22
+
23
+ Defined in: [packages/mdast-plus/src/types.ts:62](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L62)
24
+
25
+ Source format
26
+
27
+ ***
28
+
29
+ ### hash?
30
+
31
+ > `optional` **hash**: `string`
32
+
33
+ Defined in: [packages/mdast-plus/src/types.ts:66](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L66)
34
+
35
+ Hash of the source content
36
+
37
+ ***
38
+
39
+ ### raw?
40
+
41
+ > `optional` **raw**: `unknown`
42
+
43
+ Defined in: [packages/mdast-plus/src/types.ts:64](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L64)
44
+
45
+ Raw data from the source
@@ -0,0 +1,51 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastFormatDefinition
6
+
7
+ # Interface: MdastFormatDefinition
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:27](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L27)
10
+
11
+ Definition for an mdast format (parser/stringifier).
12
+
13
+ ## Properties
14
+
15
+ ### parse()?
16
+
17
+ > `optional` **parse**: (`processor`) => `void`
18
+
19
+ Defined in: [packages/mdast-plus/src/types.ts:29](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L29)
20
+
21
+ Function to register parser plugins
22
+
23
+ #### Parameters
24
+
25
+ ##### processor
26
+
27
+ `any`
28
+
29
+ #### Returns
30
+
31
+ `void`
32
+
33
+ ***
34
+
35
+ ### stringify()?
36
+
37
+ > `optional` **stringify**: (`processor`) => `void`
38
+
39
+ Defined in: [packages/mdast-plus/src/types.ts:31](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L31)
40
+
41
+ Function to register stringifier plugins
42
+
43
+ #### Parameters
44
+
45
+ ##### processor
46
+
47
+ `any`
48
+
49
+ #### Returns
50
+
51
+ `void`
@@ -0,0 +1,74 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastMark
6
+
7
+ # Interface: MdastMark
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:73](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L73)
10
+
11
+ mdast node for highlighted text (mark).
12
+
13
+ ## Extends
14
+
15
+ - `Parent`
16
+
17
+ ## Properties
18
+
19
+ ### children
20
+
21
+ > **children**: `PhrasingContent`[]
22
+
23
+ Defined in: [packages/mdast-plus/src/types.ts:75](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L75)
24
+
25
+ List of children.
26
+
27
+ #### Overrides
28
+
29
+ `UnistParent.children`
30
+
31
+ ***
32
+
33
+ ### data?
34
+
35
+ > `optional` **data**: `Data`
36
+
37
+ Defined in: node\_modules/.pnpm/@types+unist@3.0.3/node\_modules/@types/unist/index.d.ts:95
38
+
39
+ Info from the ecosystem.
40
+
41
+ #### Inherited from
42
+
43
+ `UnistParent.data`
44
+
45
+ ***
46
+
47
+ ### position?
48
+
49
+ > `optional` **position**: `Position`
50
+
51
+ Defined in: node\_modules/.pnpm/@types+unist@3.0.3/node\_modules/@types/unist/index.d.ts:103
52
+
53
+ Position of a node in a source document.
54
+
55
+ Nodes that are generated (not in the original source document) must not
56
+ have a position.
57
+
58
+ #### Inherited from
59
+
60
+ `UnistParent.position`
61
+
62
+ ***
63
+
64
+ ### type
65
+
66
+ > **type**: `"mark"`
67
+
68
+ Defined in: [packages/mdast-plus/src/types.ts:74](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L74)
69
+
70
+ Node type.
71
+
72
+ #### Overrides
73
+
74
+ `UnistParent.type`
@@ -0,0 +1,65 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastPlugin
6
+
7
+ # Interface: MdastPlugin
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:13](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L13)
10
+
11
+ Definition for an mdast plugin.
12
+
13
+ ## Properties
14
+
15
+ ### name
16
+
17
+ > **name**: `string`
18
+
19
+ Defined in: [packages/mdast-plus/src/types.ts:15](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L15)
20
+
21
+ Plugin name
22
+
23
+ ***
24
+
25
+ ### order?
26
+
27
+ > `optional` **order**: `number`
28
+
29
+ Defined in: [packages/mdast-plus/src/types.ts:19](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L19)
30
+
31
+ Execution order within the stage (lower numbers run first)
32
+
33
+ ***
34
+
35
+ ### stage?
36
+
37
+ > `optional` **stage**: [`Stage`](../type-aliases/Stage.md)
38
+
39
+ Defined in: [packages/mdast-plus/src/types.ts:17](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L17)
40
+
41
+ Processing stage the plugin belongs to
42
+
43
+ ***
44
+
45
+ ### transform()
46
+
47
+ > **transform**: (`tree`, `ctx`) => `void` \| `Promise`\<`void`\>
48
+
49
+ Defined in: [packages/mdast-plus/src/types.ts:21](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L21)
50
+
51
+ Transformation function
52
+
53
+ #### Parameters
54
+
55
+ ##### tree
56
+
57
+ `Root`
58
+
59
+ ##### ctx
60
+
61
+ `any`
62
+
63
+ #### Returns
64
+
65
+ `void` \| `Promise`\<`void`\>
@@ -0,0 +1,41 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastReader
6
+
7
+ # Interface: MdastReader\<I\>
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:131](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L131)
10
+
11
+ Interface for reading input into an mdast tree.
12
+
13
+ ## Type Parameters
14
+
15
+ ### I
16
+
17
+ `I`
18
+
19
+ Input type
20
+
21
+ ## Methods
22
+
23
+ ### read()
24
+
25
+ > **read**(`input`): `Promise`\<`Root`\>
26
+
27
+ Defined in: [packages/mdast-plus/src/types.ts:136](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L136)
28
+
29
+ Reads input and returns an mdast Root node.
30
+
31
+ #### Parameters
32
+
33
+ ##### input
34
+
35
+ `I`
36
+
37
+ The input to read
38
+
39
+ #### Returns
40
+
41
+ `Promise`\<`Root`\>
@@ -0,0 +1,74 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastSub
6
+
7
+ # Interface: MdastSub
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:81](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L81)
10
+
11
+ mdast node for subscript text.
12
+
13
+ ## Extends
14
+
15
+ - `Parent`
16
+
17
+ ## Properties
18
+
19
+ ### children
20
+
21
+ > **children**: `PhrasingContent`[]
22
+
23
+ Defined in: [packages/mdast-plus/src/types.ts:83](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L83)
24
+
25
+ List of children.
26
+
27
+ #### Overrides
28
+
29
+ `UnistParent.children`
30
+
31
+ ***
32
+
33
+ ### data?
34
+
35
+ > `optional` **data**: `Data`
36
+
37
+ Defined in: node\_modules/.pnpm/@types+unist@3.0.3/node\_modules/@types/unist/index.d.ts:95
38
+
39
+ Info from the ecosystem.
40
+
41
+ #### Inherited from
42
+
43
+ `UnistParent.data`
44
+
45
+ ***
46
+
47
+ ### position?
48
+
49
+ > `optional` **position**: `Position`
50
+
51
+ Defined in: node\_modules/.pnpm/@types+unist@3.0.3/node\_modules/@types/unist/index.d.ts:103
52
+
53
+ Position of a node in a source document.
54
+
55
+ Nodes that are generated (not in the original source document) must not
56
+ have a position.
57
+
58
+ #### Inherited from
59
+
60
+ `UnistParent.position`
61
+
62
+ ***
63
+
64
+ ### type
65
+
66
+ > **type**: `"sub"`
67
+
68
+ Defined in: [packages/mdast-plus/src/types.ts:82](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L82)
69
+
70
+ Node type.
71
+
72
+ #### Overrides
73
+
74
+ `UnistParent.type`
@@ -0,0 +1,74 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastSup
6
+
7
+ # Interface: MdastSup
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:89](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L89)
10
+
11
+ mdast node for superscript text.
12
+
13
+ ## Extends
14
+
15
+ - `Parent`
16
+
17
+ ## Properties
18
+
19
+ ### children
20
+
21
+ > **children**: `PhrasingContent`[]
22
+
23
+ Defined in: [packages/mdast-plus/src/types.ts:91](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L91)
24
+
25
+ List of children.
26
+
27
+ #### Overrides
28
+
29
+ `UnistParent.children`
30
+
31
+ ***
32
+
33
+ ### data?
34
+
35
+ > `optional` **data**: `Data`
36
+
37
+ Defined in: node\_modules/.pnpm/@types+unist@3.0.3/node\_modules/@types/unist/index.d.ts:95
38
+
39
+ Info from the ecosystem.
40
+
41
+ #### Inherited from
42
+
43
+ `UnistParent.data`
44
+
45
+ ***
46
+
47
+ ### position?
48
+
49
+ > `optional` **position**: `Position`
50
+
51
+ Defined in: node\_modules/.pnpm/@types+unist@3.0.3/node\_modules/@types/unist/index.d.ts:103
52
+
53
+ Position of a node in a source document.
54
+
55
+ Nodes that are generated (not in the original source document) must not
56
+ have a position.
57
+
58
+ #### Inherited from
59
+
60
+ `UnistParent.position`
61
+
62
+ ***
63
+
64
+ ### type
65
+
66
+ > **type**: `"sup"`
67
+
68
+ Defined in: [packages/mdast-plus/src/types.ts:90](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L90)
69
+
70
+ Node type.
71
+
72
+ #### Overrides
73
+
74
+ `UnistParent.type`
@@ -0,0 +1,33 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastTransformer
6
+
7
+ # Interface: MdastTransformer
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:142](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L142)
10
+
11
+ Interface for transforming an mdast tree.
12
+
13
+ ## Methods
14
+
15
+ ### transform()
16
+
17
+ > **transform**(`tree`): `Promise`\<\{ `assets?`: [`MdastAsset`](MdastAsset.md)[]; `tree`: `Root`; \}\>
18
+
19
+ Defined in: [packages/mdast-plus/src/types.ts:147](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L147)
20
+
21
+ Transforms the given mdast tree.
22
+
23
+ #### Parameters
24
+
25
+ ##### tree
26
+
27
+ `Root`
28
+
29
+ The Root node to transform
30
+
31
+ #### Returns
32
+
33
+ `Promise`\<\{ `assets?`: [`MdastAsset`](MdastAsset.md)[]; `tree`: `Root`; \}\>
@@ -0,0 +1,47 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / MdastWriter
6
+
7
+ # Interface: MdastWriter\<Output\>
8
+
9
+ Defined in: [packages/mdast-plus/src/types.ts:154](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L154)
10
+
11
+ Interface for writing an mdast tree to an output format.
12
+
13
+ ## Type Parameters
14
+
15
+ ### Output
16
+
17
+ `Output` = `string`
18
+
19
+ Output type (default: string)
20
+
21
+ ## Methods
22
+
23
+ ### write()
24
+
25
+ > **write**(`tree`, `assets?`): `Promise`\<[`ConvertResult`](ConvertResult.md)\<`Output`\>\>
26
+
27
+ Defined in: [packages/mdast-plus/src/types.ts:160](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L160)
28
+
29
+ Writes the mdast tree to the target output.
30
+
31
+ #### Parameters
32
+
33
+ ##### tree
34
+
35
+ `Root`
36
+
37
+ The Root node to write
38
+
39
+ ##### assets?
40
+
41
+ [`MdastAsset`](MdastAsset.md)[]
42
+
43
+ Optional assets to include
44
+
45
+ #### Returns
46
+
47
+ `Promise`\<[`ConvertResult`](ConvertResult.md)\<`Output`\>\>
@@ -0,0 +1,13 @@
1
+ [**@isdk/mdast-plus**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/mdast-plus](../globals.md) / Stage
6
+
7
+ # Type Alias: Stage
8
+
9
+ > **Stage** = `"normalize"` \| `"compile"` \| `"finalize"`
10
+
11
+ Defined in: [packages/mdast-plus/src/types.ts:8](https://github.com/isdk/mdast-plus.js/blob/c94d215035e579925cf60814f0a5c05c543ca784/src/types.ts#L8)
12
+
13
+ Stages for mdast-plus pipeline processing.