andesine 0.0.1-alpha.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.
@@ -0,0 +1,231 @@
1
+ import { C as ContentPiece } from './shared/andesine.5e4b2db8.cjs';
2
+
3
+ type BoldMark = {
4
+ type: "bold";
5
+ attrs: {};
6
+ };
7
+ type ItalicMark = {
8
+ type: "italic";
9
+ attrs: {};
10
+ };
11
+ type StrikeMark = {
12
+ type: "strike";
13
+ attrs: {};
14
+ };
15
+ type CodeMark = {
16
+ type: "code";
17
+ attrs: {};
18
+ };
19
+ type LinkMark = {
20
+ type: "link";
21
+ attrs: {
22
+ href: string;
23
+ };
24
+ };
25
+ type UnderlineMark = {
26
+ type: "underline";
27
+ attrs: {};
28
+ };
29
+ type HighlightMark = {
30
+ type: "highlight";
31
+ attrs: {};
32
+ };
33
+ type SubscriptMark = {
34
+ type: "subscript";
35
+ attrs: {};
36
+ };
37
+ type SuperscriptMark = {
38
+ type: "superscript";
39
+ attrs: {};
40
+ };
41
+ type CommentMark = {
42
+ type: "comment";
43
+ attrs: {
44
+ thread: string;
45
+ };
46
+ };
47
+ type JSONContentMark = {
48
+ bold: BoldMark;
49
+ italic: ItalicMark;
50
+ strike: StrikeMark;
51
+ code: CodeMark;
52
+ link: LinkMark;
53
+ highlight: HighlightMark;
54
+ underline: UnderlineMark;
55
+ subscript: SubscriptMark;
56
+ superscript: SuperscriptMark;
57
+ comment: CommentMark;
58
+ };
59
+ type TextNode = {
60
+ type: "text";
61
+ text: string;
62
+ marks?: Array<BoldMark | ItalicMark | StrikeMark | CodeMark | LinkMark | HighlightMark | UnderlineMark | SubscriptMark | SuperscriptMark | CommentMark>;
63
+ };
64
+ type HardBreakNode = {
65
+ type: "hardBreak";
66
+ };
67
+ type ParagraphNode = {
68
+ type: "paragraph";
69
+ content?: Array<TextNode | HardBreakNode>;
70
+ };
71
+ type HeadingNode = {
72
+ type: "heading";
73
+ attrs: {
74
+ level: 1 | 2 | 3 | 4 | 5 | 6;
75
+ };
76
+ content?: TextNode[];
77
+ };
78
+ type BlockquoteNode = {
79
+ type: "blockquote";
80
+ content?: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
81
+ };
82
+ type ElementNode = {
83
+ type: "element";
84
+ attrs: {
85
+ type: string;
86
+ props: Record<string, any>;
87
+ };
88
+ content?: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
89
+ };
90
+ type ImageNode = {
91
+ type: "image";
92
+ attrs?: {
93
+ src?: string;
94
+ alt?: string;
95
+ caption?: string;
96
+ };
97
+ };
98
+ type CodeBlockNode = {
99
+ type: "codeBlock";
100
+ attrs?: {
101
+ lang?: string;
102
+ meta?: string;
103
+ title?: string;
104
+ };
105
+ content: TextNode[];
106
+ };
107
+ type EmbedNode = {
108
+ type: "embed";
109
+ attrs?: {
110
+ embed: "codepen" | "codesandbox" | "youtube";
111
+ input?: string;
112
+ src?: string;
113
+ };
114
+ };
115
+ type BulletListNode = {
116
+ type: "bulletList";
117
+ content: ListItemNode[];
118
+ };
119
+ type OrderedListNode = {
120
+ type: "orderedList";
121
+ attrs: {
122
+ start: number;
123
+ };
124
+ content: ListItemNode[];
125
+ };
126
+ type TaskListNode = {
127
+ type: "taskList";
128
+ content: TaskItemNode[];
129
+ };
130
+ type ListItemNode = {
131
+ type: "listItem";
132
+ content: Array<ParagraphNode | HeadingNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
133
+ };
134
+ type TaskItemNode = {
135
+ type: "taskItem";
136
+ attrs: {
137
+ checked: boolean;
138
+ };
139
+ content: Array<ParagraphNode | HeadingNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
140
+ };
141
+ type HorizontalRuleNode = {
142
+ type: "horizontalRule";
143
+ };
144
+ type TableNode = {
145
+ type: "table";
146
+ content: TableRowNode[];
147
+ };
148
+ type TableRowNode = {
149
+ type: "tableRow";
150
+ content: Array<TableCellNode | TableHeaderNode>;
151
+ };
152
+ type TableCellNode = {
153
+ type: "tableCell";
154
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
155
+ attrs: {
156
+ colspan: number;
157
+ rowspan: number;
158
+ };
159
+ };
160
+ type TableHeaderNode = {
161
+ type: "tableHeader";
162
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
163
+ attrs: {
164
+ colspan: number;
165
+ rowspan: number;
166
+ };
167
+ };
168
+ type DocNode = {
169
+ type: "doc";
170
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
171
+ };
172
+ type JSONContentNode = {
173
+ text: TextNode;
174
+ hardBreak: HardBreakNode;
175
+ paragraph: ParagraphNode;
176
+ heading: HeadingNode;
177
+ blockquote: BlockquoteNode;
178
+ element: ElementNode;
179
+ image: ImageNode;
180
+ codeBlock: CodeBlockNode;
181
+ embed: EmbedNode;
182
+ bulletList: BulletListNode;
183
+ orderedList: OrderedListNode;
184
+ taskList: TaskListNode;
185
+ listItem: ListItemNode;
186
+ taskItem: TaskItemNode;
187
+ horizontalRule: HorizontalRuleNode;
188
+ table: TableNode;
189
+ tableRow: TableRowNode;
190
+ tableCell: TableCellNode;
191
+ tableHeader: TableHeaderNode;
192
+ doc: DocNode;
193
+ };
194
+ type GenericJSONContentMark = {
195
+ type: string;
196
+ attrs?: Record<string, any>;
197
+ };
198
+ type GenericJSONContentNode = {
199
+ type: string;
200
+ text?: string;
201
+ attrs?: Record<string, any>;
202
+ content?: GenericJSONContentNode[];
203
+ marks?: GenericJSONContentMark[];
204
+ };
205
+ type WithRequired<T, K extends keyof T> = T & {
206
+ [P in K]-?: T[P];
207
+ };
208
+ interface JSONContentNodeWalker<N extends GenericJSONContentNode = GenericJSONContentNode> {
209
+ node: N;
210
+ index: number;
211
+ parent: JSONContentNodeWalker | null;
212
+ children: Array<JSONContentNodeWalker<NonNullable<WithRequired<N, "content">["content"]>[number]>>;
213
+ ancestors: JSONContentNodeWalker[];
214
+ previousSibling(): JSONContentNodeWalker | null;
215
+ nextSibling(): JSONContentNodeWalker | null;
216
+ }
217
+ declare const createContentWalker: (node: GenericJSONContentNode) => JSONContentNodeWalker;
218
+
219
+ type OutputTransformer<Output = string, CustomData extends Record<string, any> = Record<string, any>> = (contentNode: GenericJSONContentNode, contentPiece?: Pick<ContentPiece<CustomData>, "date" | "title" | "description" | "tags" | "members" | "slug" | "filename" | "coverUrl" | "coverAlt" | "customData" | "canonicalLink" | "coverWidth">) => Output;
220
+ declare const createOutputTransformer: <Output = string, CustomData extends Record<string, any> = Record<string, any>>(outputTransformer: OutputTransformer<Output, CustomData>) => OutputTransformer<Output, CustomData>;
221
+ declare const gfmOutputTransformer: OutputTransformer<string, Record<string, any>>;
222
+ declare const htmlOutputTransformer: OutputTransformer<string, Record<string, any>>;
223
+
224
+ type InputTransformer<Input = string, CustomData extends Record<string, any> = Record<string, any>> = (input: Input) => {
225
+ content: string;
226
+ contentPiece?: Partial<Pick<ContentPiece<CustomData>, "date" | "title" | "slug" | "description" | "tags" | "members" | "coverUrl" | "coverAlt" | "customData" | "canonicalLink" | "coverWidth">>;
227
+ };
228
+ declare const createInputTransformer: <Input = string, CustomData extends Record<string, any> = Record<string, any>>(inputTransformer: InputTransformer<Input, CustomData>) => InputTransformer<Input, CustomData>;
229
+ declare const gfmInputTransformer: InputTransformer<string, Record<string, any>>;
230
+
231
+ export { type GenericJSONContentMark, type GenericJSONContentNode, type InputTransformer, type JSONContentMark, type JSONContentNode, type JSONContentNodeWalker, type OutputTransformer, createContentWalker, createInputTransformer, createOutputTransformer, gfmInputTransformer, gfmOutputTransformer, htmlOutputTransformer };
@@ -0,0 +1,231 @@
1
+ import { C as ContentPiece } from './shared/andesine.5e4b2db8.mjs';
2
+
3
+ type BoldMark = {
4
+ type: "bold";
5
+ attrs: {};
6
+ };
7
+ type ItalicMark = {
8
+ type: "italic";
9
+ attrs: {};
10
+ };
11
+ type StrikeMark = {
12
+ type: "strike";
13
+ attrs: {};
14
+ };
15
+ type CodeMark = {
16
+ type: "code";
17
+ attrs: {};
18
+ };
19
+ type LinkMark = {
20
+ type: "link";
21
+ attrs: {
22
+ href: string;
23
+ };
24
+ };
25
+ type UnderlineMark = {
26
+ type: "underline";
27
+ attrs: {};
28
+ };
29
+ type HighlightMark = {
30
+ type: "highlight";
31
+ attrs: {};
32
+ };
33
+ type SubscriptMark = {
34
+ type: "subscript";
35
+ attrs: {};
36
+ };
37
+ type SuperscriptMark = {
38
+ type: "superscript";
39
+ attrs: {};
40
+ };
41
+ type CommentMark = {
42
+ type: "comment";
43
+ attrs: {
44
+ thread: string;
45
+ };
46
+ };
47
+ type JSONContentMark = {
48
+ bold: BoldMark;
49
+ italic: ItalicMark;
50
+ strike: StrikeMark;
51
+ code: CodeMark;
52
+ link: LinkMark;
53
+ highlight: HighlightMark;
54
+ underline: UnderlineMark;
55
+ subscript: SubscriptMark;
56
+ superscript: SuperscriptMark;
57
+ comment: CommentMark;
58
+ };
59
+ type TextNode = {
60
+ type: "text";
61
+ text: string;
62
+ marks?: Array<BoldMark | ItalicMark | StrikeMark | CodeMark | LinkMark | HighlightMark | UnderlineMark | SubscriptMark | SuperscriptMark | CommentMark>;
63
+ };
64
+ type HardBreakNode = {
65
+ type: "hardBreak";
66
+ };
67
+ type ParagraphNode = {
68
+ type: "paragraph";
69
+ content?: Array<TextNode | HardBreakNode>;
70
+ };
71
+ type HeadingNode = {
72
+ type: "heading";
73
+ attrs: {
74
+ level: 1 | 2 | 3 | 4 | 5 | 6;
75
+ };
76
+ content?: TextNode[];
77
+ };
78
+ type BlockquoteNode = {
79
+ type: "blockquote";
80
+ content?: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
81
+ };
82
+ type ElementNode = {
83
+ type: "element";
84
+ attrs: {
85
+ type: string;
86
+ props: Record<string, any>;
87
+ };
88
+ content?: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
89
+ };
90
+ type ImageNode = {
91
+ type: "image";
92
+ attrs?: {
93
+ src?: string;
94
+ alt?: string;
95
+ caption?: string;
96
+ };
97
+ };
98
+ type CodeBlockNode = {
99
+ type: "codeBlock";
100
+ attrs?: {
101
+ lang?: string;
102
+ meta?: string;
103
+ title?: string;
104
+ };
105
+ content: TextNode[];
106
+ };
107
+ type EmbedNode = {
108
+ type: "embed";
109
+ attrs?: {
110
+ embed: "codepen" | "codesandbox" | "youtube";
111
+ input?: string;
112
+ src?: string;
113
+ };
114
+ };
115
+ type BulletListNode = {
116
+ type: "bulletList";
117
+ content: ListItemNode[];
118
+ };
119
+ type OrderedListNode = {
120
+ type: "orderedList";
121
+ attrs: {
122
+ start: number;
123
+ };
124
+ content: ListItemNode[];
125
+ };
126
+ type TaskListNode = {
127
+ type: "taskList";
128
+ content: TaskItemNode[];
129
+ };
130
+ type ListItemNode = {
131
+ type: "listItem";
132
+ content: Array<ParagraphNode | HeadingNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
133
+ };
134
+ type TaskItemNode = {
135
+ type: "taskItem";
136
+ attrs: {
137
+ checked: boolean;
138
+ };
139
+ content: Array<ParagraphNode | HeadingNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
140
+ };
141
+ type HorizontalRuleNode = {
142
+ type: "horizontalRule";
143
+ };
144
+ type TableNode = {
145
+ type: "table";
146
+ content: TableRowNode[];
147
+ };
148
+ type TableRowNode = {
149
+ type: "tableRow";
150
+ content: Array<TableCellNode | TableHeaderNode>;
151
+ };
152
+ type TableCellNode = {
153
+ type: "tableCell";
154
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
155
+ attrs: {
156
+ colspan: number;
157
+ rowspan: number;
158
+ };
159
+ };
160
+ type TableHeaderNode = {
161
+ type: "tableHeader";
162
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
163
+ attrs: {
164
+ colspan: number;
165
+ rowspan: number;
166
+ };
167
+ };
168
+ type DocNode = {
169
+ type: "doc";
170
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
171
+ };
172
+ type JSONContentNode = {
173
+ text: TextNode;
174
+ hardBreak: HardBreakNode;
175
+ paragraph: ParagraphNode;
176
+ heading: HeadingNode;
177
+ blockquote: BlockquoteNode;
178
+ element: ElementNode;
179
+ image: ImageNode;
180
+ codeBlock: CodeBlockNode;
181
+ embed: EmbedNode;
182
+ bulletList: BulletListNode;
183
+ orderedList: OrderedListNode;
184
+ taskList: TaskListNode;
185
+ listItem: ListItemNode;
186
+ taskItem: TaskItemNode;
187
+ horizontalRule: HorizontalRuleNode;
188
+ table: TableNode;
189
+ tableRow: TableRowNode;
190
+ tableCell: TableCellNode;
191
+ tableHeader: TableHeaderNode;
192
+ doc: DocNode;
193
+ };
194
+ type GenericJSONContentMark = {
195
+ type: string;
196
+ attrs?: Record<string, any>;
197
+ };
198
+ type GenericJSONContentNode = {
199
+ type: string;
200
+ text?: string;
201
+ attrs?: Record<string, any>;
202
+ content?: GenericJSONContentNode[];
203
+ marks?: GenericJSONContentMark[];
204
+ };
205
+ type WithRequired<T, K extends keyof T> = T & {
206
+ [P in K]-?: T[P];
207
+ };
208
+ interface JSONContentNodeWalker<N extends GenericJSONContentNode = GenericJSONContentNode> {
209
+ node: N;
210
+ index: number;
211
+ parent: JSONContentNodeWalker | null;
212
+ children: Array<JSONContentNodeWalker<NonNullable<WithRequired<N, "content">["content"]>[number]>>;
213
+ ancestors: JSONContentNodeWalker[];
214
+ previousSibling(): JSONContentNodeWalker | null;
215
+ nextSibling(): JSONContentNodeWalker | null;
216
+ }
217
+ declare const createContentWalker: (node: GenericJSONContentNode) => JSONContentNodeWalker;
218
+
219
+ type OutputTransformer<Output = string, CustomData extends Record<string, any> = Record<string, any>> = (contentNode: GenericJSONContentNode, contentPiece?: Pick<ContentPiece<CustomData>, "date" | "title" | "description" | "tags" | "members" | "slug" | "filename" | "coverUrl" | "coverAlt" | "customData" | "canonicalLink" | "coverWidth">) => Output;
220
+ declare const createOutputTransformer: <Output = string, CustomData extends Record<string, any> = Record<string, any>>(outputTransformer: OutputTransformer<Output, CustomData>) => OutputTransformer<Output, CustomData>;
221
+ declare const gfmOutputTransformer: OutputTransformer<string, Record<string, any>>;
222
+ declare const htmlOutputTransformer: OutputTransformer<string, Record<string, any>>;
223
+
224
+ type InputTransformer<Input = string, CustomData extends Record<string, any> = Record<string, any>> = (input: Input) => {
225
+ content: string;
226
+ contentPiece?: Partial<Pick<ContentPiece<CustomData>, "date" | "title" | "slug" | "description" | "tags" | "members" | "coverUrl" | "coverAlt" | "customData" | "canonicalLink" | "coverWidth">>;
227
+ };
228
+ declare const createInputTransformer: <Input = string, CustomData extends Record<string, any> = Record<string, any>>(inputTransformer: InputTransformer<Input, CustomData>) => InputTransformer<Input, CustomData>;
229
+ declare const gfmInputTransformer: InputTransformer<string, Record<string, any>>;
230
+
231
+ export { type GenericJSONContentMark, type GenericJSONContentNode, type InputTransformer, type JSONContentMark, type JSONContentNode, type JSONContentNodeWalker, type OutputTransformer, createContentWalker, createInputTransformer, createOutputTransformer, gfmInputTransformer, gfmOutputTransformer, htmlOutputTransformer };
@@ -0,0 +1,231 @@
1
+ import { C as ContentPiece } from './shared/andesine.5e4b2db8.js';
2
+
3
+ type BoldMark = {
4
+ type: "bold";
5
+ attrs: {};
6
+ };
7
+ type ItalicMark = {
8
+ type: "italic";
9
+ attrs: {};
10
+ };
11
+ type StrikeMark = {
12
+ type: "strike";
13
+ attrs: {};
14
+ };
15
+ type CodeMark = {
16
+ type: "code";
17
+ attrs: {};
18
+ };
19
+ type LinkMark = {
20
+ type: "link";
21
+ attrs: {
22
+ href: string;
23
+ };
24
+ };
25
+ type UnderlineMark = {
26
+ type: "underline";
27
+ attrs: {};
28
+ };
29
+ type HighlightMark = {
30
+ type: "highlight";
31
+ attrs: {};
32
+ };
33
+ type SubscriptMark = {
34
+ type: "subscript";
35
+ attrs: {};
36
+ };
37
+ type SuperscriptMark = {
38
+ type: "superscript";
39
+ attrs: {};
40
+ };
41
+ type CommentMark = {
42
+ type: "comment";
43
+ attrs: {
44
+ thread: string;
45
+ };
46
+ };
47
+ type JSONContentMark = {
48
+ bold: BoldMark;
49
+ italic: ItalicMark;
50
+ strike: StrikeMark;
51
+ code: CodeMark;
52
+ link: LinkMark;
53
+ highlight: HighlightMark;
54
+ underline: UnderlineMark;
55
+ subscript: SubscriptMark;
56
+ superscript: SuperscriptMark;
57
+ comment: CommentMark;
58
+ };
59
+ type TextNode = {
60
+ type: "text";
61
+ text: string;
62
+ marks?: Array<BoldMark | ItalicMark | StrikeMark | CodeMark | LinkMark | HighlightMark | UnderlineMark | SubscriptMark | SuperscriptMark | CommentMark>;
63
+ };
64
+ type HardBreakNode = {
65
+ type: "hardBreak";
66
+ };
67
+ type ParagraphNode = {
68
+ type: "paragraph";
69
+ content?: Array<TextNode | HardBreakNode>;
70
+ };
71
+ type HeadingNode = {
72
+ type: "heading";
73
+ attrs: {
74
+ level: 1 | 2 | 3 | 4 | 5 | 6;
75
+ };
76
+ content?: TextNode[];
77
+ };
78
+ type BlockquoteNode = {
79
+ type: "blockquote";
80
+ content?: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
81
+ };
82
+ type ElementNode = {
83
+ type: "element";
84
+ attrs: {
85
+ type: string;
86
+ props: Record<string, any>;
87
+ };
88
+ content?: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
89
+ };
90
+ type ImageNode = {
91
+ type: "image";
92
+ attrs?: {
93
+ src?: string;
94
+ alt?: string;
95
+ caption?: string;
96
+ };
97
+ };
98
+ type CodeBlockNode = {
99
+ type: "codeBlock";
100
+ attrs?: {
101
+ lang?: string;
102
+ meta?: string;
103
+ title?: string;
104
+ };
105
+ content: TextNode[];
106
+ };
107
+ type EmbedNode = {
108
+ type: "embed";
109
+ attrs?: {
110
+ embed: "codepen" | "codesandbox" | "youtube";
111
+ input?: string;
112
+ src?: string;
113
+ };
114
+ };
115
+ type BulletListNode = {
116
+ type: "bulletList";
117
+ content: ListItemNode[];
118
+ };
119
+ type OrderedListNode = {
120
+ type: "orderedList";
121
+ attrs: {
122
+ start: number;
123
+ };
124
+ content: ListItemNode[];
125
+ };
126
+ type TaskListNode = {
127
+ type: "taskList";
128
+ content: TaskItemNode[];
129
+ };
130
+ type ListItemNode = {
131
+ type: "listItem";
132
+ content: Array<ParagraphNode | HeadingNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
133
+ };
134
+ type TaskItemNode = {
135
+ type: "taskItem";
136
+ attrs: {
137
+ checked: boolean;
138
+ };
139
+ content: Array<ParagraphNode | HeadingNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
140
+ };
141
+ type HorizontalRuleNode = {
142
+ type: "horizontalRule";
143
+ };
144
+ type TableNode = {
145
+ type: "table";
146
+ content: TableRowNode[];
147
+ };
148
+ type TableRowNode = {
149
+ type: "tableRow";
150
+ content: Array<TableCellNode | TableHeaderNode>;
151
+ };
152
+ type TableCellNode = {
153
+ type: "tableCell";
154
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
155
+ attrs: {
156
+ colspan: number;
157
+ rowspan: number;
158
+ };
159
+ };
160
+ type TableHeaderNode = {
161
+ type: "tableHeader";
162
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
163
+ attrs: {
164
+ colspan: number;
165
+ rowspan: number;
166
+ };
167
+ };
168
+ type DocNode = {
169
+ type: "doc";
170
+ content: Array<ParagraphNode | HeadingNode | BlockquoteNode | ElementNode | ImageNode | CodeBlockNode | EmbedNode | BulletListNode | OrderedListNode | TaskListNode | HorizontalRuleNode | TableNode>;
171
+ };
172
+ type JSONContentNode = {
173
+ text: TextNode;
174
+ hardBreak: HardBreakNode;
175
+ paragraph: ParagraphNode;
176
+ heading: HeadingNode;
177
+ blockquote: BlockquoteNode;
178
+ element: ElementNode;
179
+ image: ImageNode;
180
+ codeBlock: CodeBlockNode;
181
+ embed: EmbedNode;
182
+ bulletList: BulletListNode;
183
+ orderedList: OrderedListNode;
184
+ taskList: TaskListNode;
185
+ listItem: ListItemNode;
186
+ taskItem: TaskItemNode;
187
+ horizontalRule: HorizontalRuleNode;
188
+ table: TableNode;
189
+ tableRow: TableRowNode;
190
+ tableCell: TableCellNode;
191
+ tableHeader: TableHeaderNode;
192
+ doc: DocNode;
193
+ };
194
+ type GenericJSONContentMark = {
195
+ type: string;
196
+ attrs?: Record<string, any>;
197
+ };
198
+ type GenericJSONContentNode = {
199
+ type: string;
200
+ text?: string;
201
+ attrs?: Record<string, any>;
202
+ content?: GenericJSONContentNode[];
203
+ marks?: GenericJSONContentMark[];
204
+ };
205
+ type WithRequired<T, K extends keyof T> = T & {
206
+ [P in K]-?: T[P];
207
+ };
208
+ interface JSONContentNodeWalker<N extends GenericJSONContentNode = GenericJSONContentNode> {
209
+ node: N;
210
+ index: number;
211
+ parent: JSONContentNodeWalker | null;
212
+ children: Array<JSONContentNodeWalker<NonNullable<WithRequired<N, "content">["content"]>[number]>>;
213
+ ancestors: JSONContentNodeWalker[];
214
+ previousSibling(): JSONContentNodeWalker | null;
215
+ nextSibling(): JSONContentNodeWalker | null;
216
+ }
217
+ declare const createContentWalker: (node: GenericJSONContentNode) => JSONContentNodeWalker;
218
+
219
+ type OutputTransformer<Output = string, CustomData extends Record<string, any> = Record<string, any>> = (contentNode: GenericJSONContentNode, contentPiece?: Pick<ContentPiece<CustomData>, "date" | "title" | "description" | "tags" | "members" | "slug" | "filename" | "coverUrl" | "coverAlt" | "customData" | "canonicalLink" | "coverWidth">) => Output;
220
+ declare const createOutputTransformer: <Output = string, CustomData extends Record<string, any> = Record<string, any>>(outputTransformer: OutputTransformer<Output, CustomData>) => OutputTransformer<Output, CustomData>;
221
+ declare const gfmOutputTransformer: OutputTransformer<string, Record<string, any>>;
222
+ declare const htmlOutputTransformer: OutputTransformer<string, Record<string, any>>;
223
+
224
+ type InputTransformer<Input = string, CustomData extends Record<string, any> = Record<string, any>> = (input: Input) => {
225
+ content: string;
226
+ contentPiece?: Partial<Pick<ContentPiece<CustomData>, "date" | "title" | "slug" | "description" | "tags" | "members" | "coverUrl" | "coverAlt" | "customData" | "canonicalLink" | "coverWidth">>;
227
+ };
228
+ declare const createInputTransformer: <Input = string, CustomData extends Record<string, any> = Record<string, any>>(inputTransformer: InputTransformer<Input, CustomData>) => InputTransformer<Input, CustomData>;
229
+ declare const gfmInputTransformer: InputTransformer<string, Record<string, any>>;
230
+
231
+ export { type GenericJSONContentMark, type GenericJSONContentNode, type InputTransformer, type JSONContentMark, type JSONContentNode, type JSONContentNodeWalker, type OutputTransformer, createContentWalker, createInputTransformer, createOutputTransformer, gfmInputTransformer, gfmOutputTransformer, htmlOutputTransformer };