html-to-markdown 3.11.4 → 3.11.6

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.
data/sig/types.rbs CHANGED
@@ -1,373 +1,373 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:f3a3421ae776c3ce9950a5a7b9e56d5732b7a5d34f283c57b21dac9e54e47606
2
+ # alef:hash:5eb3a899c3b56736b875c46491ee08e8fb18b9bc638dd5f43ac0e2ce4597306b
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
6
6
  module HtmlToMarkdown
7
7
 
8
- VERSION: String
8
+ VERSION: String
9
+
10
+ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
11
+
12
+ class ConversionOptions
13
+ attr_reader heading_style: HeadingStyle
14
+ attr_reader list_indent_type: ListIndentType
15
+ attr_reader list_indent_width: Integer
16
+ attr_reader bullets: String
17
+ attr_reader strong_em_symbol: String
18
+ attr_reader escape_asterisks: bool
19
+ attr_reader escape_underscores: bool
20
+ attr_reader escape_misc: bool
21
+ attr_reader escape_ascii: bool
22
+ attr_reader code_language: String
23
+ attr_reader autolinks: bool
24
+ attr_reader default_title: bool
25
+ attr_reader br_in_tables: bool
26
+ attr_reader compact_tables: bool
27
+ attr_reader highlight_style: HighlightStyle
28
+ attr_reader extract_metadata: bool
29
+ attr_reader whitespace_mode: WhitespaceMode
30
+ attr_reader strip_newlines: bool
31
+ attr_reader wrap: bool
32
+ attr_reader wrap_width: Integer
33
+ attr_reader convert_as_inline: bool
34
+ attr_reader sub_symbol: String
35
+ attr_reader sup_symbol: String
36
+ attr_reader newline_style: NewlineStyle
37
+ attr_reader code_block_style: CodeBlockStyle
38
+ attr_reader keep_inline_images_in: Array[String]
39
+ attr_reader preprocessing: PreprocessingOptions
40
+ attr_reader encoding: String
41
+ attr_reader debug: bool
42
+ attr_reader strip_tags: Array[String]
43
+ attr_reader preserve_tags: Array[String]
44
+ attr_reader skip_images: bool
45
+ attr_reader url_escape_style: UrlEscapeStyle
46
+ attr_reader link_style: LinkStyle
47
+ attr_reader output_format: OutputFormat
48
+ attr_reader include_document_structure: bool
49
+ attr_reader extract_images: bool
50
+ attr_reader max_image_size: Integer
51
+ attr_reader capture_svg: bool
52
+ attr_reader infer_dimensions: bool
53
+ attr_reader max_depth: Integer?
54
+ attr_reader exclude_selectors: Array[String]
55
+ attr_reader tier_strategy: TierStrategy
56
+ attr_reader visitor: VisitorHandle?
57
+
58
+ def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
59
+ end
60
+
61
+ class ConversionOptionsUpdate
62
+ attr_reader heading_style: HeadingStyle?
63
+ attr_reader list_indent_type: ListIndentType?
64
+ attr_reader list_indent_width: Integer?
65
+ attr_reader bullets: String?
66
+ attr_reader strong_em_symbol: String?
67
+ attr_reader escape_asterisks: bool?
68
+ attr_reader escape_underscores: bool?
69
+ attr_reader escape_misc: bool?
70
+ attr_reader escape_ascii: bool?
71
+ attr_reader code_language: String?
72
+ attr_reader autolinks: bool?
73
+ attr_reader default_title: bool?
74
+ attr_reader br_in_tables: bool?
75
+ attr_reader compact_tables: bool?
76
+ attr_reader highlight_style: HighlightStyle?
77
+ attr_reader extract_metadata: bool?
78
+ attr_reader whitespace_mode: WhitespaceMode?
79
+ attr_reader strip_newlines: bool?
80
+ attr_reader wrap: bool?
81
+ attr_reader wrap_width: Integer?
82
+ attr_reader convert_as_inline: bool?
83
+ attr_reader sub_symbol: String?
84
+ attr_reader sup_symbol: String?
85
+ attr_reader newline_style: NewlineStyle?
86
+ attr_reader code_block_style: CodeBlockStyle?
87
+ attr_reader keep_inline_images_in: Array[String]?
88
+ attr_reader preprocessing: PreprocessingOptionsUpdate?
89
+ attr_reader encoding: String?
90
+ attr_reader debug: bool?
91
+ attr_reader strip_tags: Array[String]?
92
+ attr_reader preserve_tags: Array[String]?
93
+ attr_reader skip_images: bool?
94
+ attr_reader url_escape_style: UrlEscapeStyle?
95
+ attr_reader link_style: LinkStyle?
96
+ attr_reader output_format: OutputFormat?
97
+ attr_reader include_document_structure: bool?
98
+ attr_reader extract_images: bool?
99
+ attr_reader max_image_size: Integer?
100
+ attr_reader capture_svg: bool?
101
+ attr_reader infer_dimensions: bool?
102
+ attr_reader max_depth: Integer?
103
+ attr_reader exclude_selectors: Array[String]?
104
+ attr_reader tier_strategy: TierStrategy?
105
+ attr_reader visitor: VisitorHandle?
9
106
 
10
- type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
107
+ def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptionsUpdate, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer?, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
108
+ end
11
109
 
12
- class DocumentMetadata
13
- attr_reader title: String?
14
- attr_reader description: String?
110
+ class ConversionResult
111
+ attr_reader content: String?
112
+ attr_reader document: DocumentStructure?
113
+ attr_reader metadata: HtmlMetadata
114
+ attr_reader tables: Array[TableData]
115
+ attr_reader warnings: Array[ProcessingWarning]
116
+
117
+ def initialize: (?content: String, ?document: DocumentStructure, ?metadata: HtmlMetadata, ?tables: Array[TableData], ?warnings: Array[ProcessingWarning]) -> void
118
+ end
119
+
120
+ class DocumentMetadata
121
+ attr_reader title: String?
122
+ attr_reader description: String?
15
123
  attr_reader keywords: Array[String]
16
- attr_reader author: String?
17
- attr_reader canonical_url: String?
18
- attr_reader base_href: String?
19
- attr_reader language: String?
20
- attr_reader text_direction: TextDirection?
124
+ attr_reader author: String?
125
+ attr_reader canonical_url: String?
126
+ attr_reader base_href: String?
127
+ attr_reader language: String?
128
+ attr_reader text_direction: TextDirection?
21
129
  attr_reader open_graph: Hash[String, String]
22
130
  attr_reader twitter_card: Hash[String, String]
23
131
  attr_reader meta_tags: Hash[String, String]
24
132
 
25
- def initialize: (?title: String, ?description: String, ?keywords: Array[String], ?author: String, ?canonical_url: String, ?base_href: String, ?language: String, ?text_direction: TextDirection, ?open_graph: Hash[String, String], ?twitter_card: Hash[String, String], ?meta_tags: Hash[String, String]) -> void
26
- end
133
+ def initialize: (?title: String, ?description: String, ?keywords: Array[String], ?author: String, ?canonical_url: String, ?base_href: String, ?language: String, ?text_direction: TextDirection, ?open_graph: Hash[String, String], ?twitter_card: Hash[String, String], ?meta_tags: Hash[String, String]) -> void
134
+ end
27
135
 
28
- class HeaderMetadata
29
- attr_reader level: Integer
30
- attr_reader text: String
31
- attr_reader id: String?
32
- attr_reader depth: Integer
33
- attr_reader html_offset: Integer
136
+ class DocumentNode
137
+ attr_reader id: String
138
+ attr_reader content: NodeContent
139
+ attr_reader parent: Integer?
140
+ attr_reader children: Array[Integer]
141
+ attr_reader annotations: Array[TextAnnotation]
142
+ attr_reader attributes: Hash[String, String]?
34
143
 
35
- def initialize: (level: Integer, text: String, ?id: String, depth: Integer, html_offset: Integer) -> void
36
- def is_valid: () -> bool
37
- end
144
+ def initialize: (id: String, content: NodeContent, ?parent: Integer, children: Array[Integer], annotations: Array[TextAnnotation], ?attributes: Hash[String, String]) -> void
145
+ end
38
146
 
39
- class LinkMetadata
40
- attr_reader href: String
41
- attr_reader text: String
42
- attr_reader title: String?
43
- attr_reader link_type: LinkType
44
- attr_reader rel: Array[String]
45
- attr_reader attributes: Hash[String, String]
147
+ class DocumentStructure
148
+ attr_reader nodes: Array[DocumentNode]
149
+ attr_reader source_format: String?
46
150
 
47
- def initialize: (href: String, text: String, ?title: String, link_type: LinkType, rel: Array[String], attributes: Hash[String, String]) -> void
48
- end
151
+ def initialize: (nodes: Array[DocumentNode], ?source_format: String) -> void
152
+ end
49
153
 
50
- class ImageMetadata
51
- attr_reader src: String
52
- attr_reader alt: String?
53
- attr_reader title: String?
54
- attr_reader dimensions: ImageDimensions?
55
- attr_reader image_type: ImageType
56
- attr_reader attributes: Hash[String, String]
154
+ class GridCell
155
+ attr_reader content: String
156
+ attr_reader row: Integer
157
+ attr_reader col: Integer
158
+ attr_reader row_span: Integer
159
+ attr_reader col_span: Integer
160
+ attr_reader is_header: bool
57
161
 
58
- def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDimensions, image_type: ImageType, attributes: Hash[String, String]) -> void
59
- end
162
+ def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool) -> void
163
+ end
60
164
 
61
- class StructuredData
62
- attr_reader data_type: StructuredDataType
63
- attr_reader raw_json: String
64
- attr_reader schema_type: String?
165
+ class HeaderMetadata
166
+ attr_reader level: Integer
167
+ attr_reader text: String
168
+ attr_reader id: String?
169
+ attr_reader depth: Integer
170
+ attr_reader html_offset: Integer
65
171
 
66
- def initialize: (data_type: StructuredDataType, raw_json: String, ?schema_type: String) -> void
67
- end
172
+ def initialize: (level: Integer, text: String, ?id: String, depth: Integer, html_offset: Integer) -> void
173
+ def is_valid: () -> bool
174
+ end
68
175
 
69
- class HtmlMetadata
70
- attr_reader document: DocumentMetadata
176
+ class HtmlMetadata
177
+ attr_reader document: DocumentMetadata
71
178
  attr_reader headers: Array[HeaderMetadata]
72
179
  attr_reader links: Array[LinkMetadata]
73
180
  attr_reader images: Array[ImageMetadata]
74
181
  attr_reader structured_data: Array[StructuredData]
75
182
 
76
- def initialize: (?document: DocumentMetadata, ?headers: Array[HeaderMetadata], ?links: Array[LinkMetadata], ?images: Array[ImageMetadata], ?structured_data: Array[StructuredData]) -> void
77
- end
78
-
79
- class ConversionOptions
80
- attr_reader heading_style: HeadingStyle
81
- attr_reader list_indent_type: ListIndentType
82
- attr_reader list_indent_width: Integer
83
- attr_reader bullets: String
84
- attr_reader strong_em_symbol: String
85
- attr_reader escape_asterisks: bool
86
- attr_reader escape_underscores: bool
87
- attr_reader escape_misc: bool
88
- attr_reader escape_ascii: bool
89
- attr_reader code_language: String
90
- attr_reader autolinks: bool
91
- attr_reader default_title: bool
92
- attr_reader br_in_tables: bool
93
- attr_reader compact_tables: bool
94
- attr_reader highlight_style: HighlightStyle
95
- attr_reader extract_metadata: bool
96
- attr_reader whitespace_mode: WhitespaceMode
97
- attr_reader strip_newlines: bool
98
- attr_reader wrap: bool
99
- attr_reader wrap_width: Integer
100
- attr_reader convert_as_inline: bool
101
- attr_reader sub_symbol: String
102
- attr_reader sup_symbol: String
103
- attr_reader newline_style: NewlineStyle
104
- attr_reader code_block_style: CodeBlockStyle
105
- attr_reader keep_inline_images_in: Array[String]
106
- attr_reader preprocessing: PreprocessingOptions
107
- attr_reader encoding: String
108
- attr_reader debug: bool
109
- attr_reader strip_tags: Array[String]
110
- attr_reader preserve_tags: Array[String]
111
- attr_reader skip_images: bool
112
- attr_reader url_escape_style: UrlEscapeStyle
113
- attr_reader link_style: LinkStyle
114
- attr_reader output_format: OutputFormat
115
- attr_reader include_document_structure: bool
116
- attr_reader extract_images: bool
117
- attr_reader max_image_size: Integer
118
- attr_reader capture_svg: bool
119
- attr_reader infer_dimensions: bool
120
- attr_reader max_depth: Integer?
121
- attr_reader exclude_selectors: Array[String]
122
- attr_reader tier_strategy: TierStrategy
123
- attr_reader visitor: VisitorHandle?
124
-
125
- def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
126
- end
127
-
128
- class ConversionOptionsUpdate
129
- attr_reader heading_style: HeadingStyle?
130
- attr_reader list_indent_type: ListIndentType?
131
- attr_reader list_indent_width: Integer?
132
- attr_reader bullets: String?
133
- attr_reader strong_em_symbol: String?
134
- attr_reader escape_asterisks: bool?
135
- attr_reader escape_underscores: bool?
136
- attr_reader escape_misc: bool?
137
- attr_reader escape_ascii: bool?
138
- attr_reader code_language: String?
139
- attr_reader autolinks: bool?
140
- attr_reader default_title: bool?
141
- attr_reader br_in_tables: bool?
142
- attr_reader compact_tables: bool?
143
- attr_reader highlight_style: HighlightStyle?
144
- attr_reader extract_metadata: bool?
145
- attr_reader whitespace_mode: WhitespaceMode?
146
- attr_reader strip_newlines: bool?
147
- attr_reader wrap: bool?
148
- attr_reader wrap_width: Integer?
149
- attr_reader convert_as_inline: bool?
150
- attr_reader sub_symbol: String?
151
- attr_reader sup_symbol: String?
152
- attr_reader newline_style: NewlineStyle?
153
- attr_reader code_block_style: CodeBlockStyle?
154
- attr_reader keep_inline_images_in: Array[String]?
155
- attr_reader preprocessing: PreprocessingOptionsUpdate?
156
- attr_reader encoding: String?
157
- attr_reader debug: bool?
158
- attr_reader strip_tags: Array[String]?
159
- attr_reader preserve_tags: Array[String]?
160
- attr_reader skip_images: bool?
161
- attr_reader url_escape_style: UrlEscapeStyle?
162
- attr_reader link_style: LinkStyle?
163
- attr_reader output_format: OutputFormat?
164
- attr_reader include_document_structure: bool?
165
- attr_reader extract_images: bool?
166
- attr_reader max_image_size: Integer?
167
- attr_reader capture_svg: bool?
168
- attr_reader infer_dimensions: bool?
169
- attr_reader max_depth: Integer?
170
- attr_reader exclude_selectors: Array[String]?
171
- attr_reader tier_strategy: TierStrategy?
172
- attr_reader visitor: VisitorHandle?
173
-
174
- def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptionsUpdate, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer?, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
175
- end
176
-
177
- class PreprocessingOptions
178
- attr_reader enabled: bool
179
- attr_reader preset: PreprocessingPreset
180
- attr_reader remove_navigation: bool
181
- attr_reader remove_forms: bool
183
+ def initialize: (?document: DocumentMetadata, ?headers: Array[HeaderMetadata], ?links: Array[LinkMetadata], ?images: Array[ImageMetadata], ?structured_data: Array[StructuredData]) -> void
184
+ end
182
185
 
183
- def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
184
- end
185
-
186
- class PreprocessingOptionsUpdate
187
- attr_reader enabled: bool?
188
- attr_reader preset: PreprocessingPreset?
189
- attr_reader remove_navigation: bool?
190
- attr_reader remove_forms: bool?
191
-
192
- def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
193
- end
194
-
195
- class ImageDimensions
196
- attr_reader width: Integer
197
- attr_reader height: Integer
186
+ class ImageDimensions
187
+ attr_reader width: Integer
188
+ attr_reader height: Integer
198
189
 
199
190
  def initialize: (width: Integer, height: Integer) -> void
200
- end
191
+ end
192
+
193
+ class ImageMetadata
194
+ attr_reader src: String
195
+ attr_reader alt: String?
196
+ attr_reader title: String?
197
+ attr_reader dimensions: ImageDimensions?
198
+ attr_reader image_type: ImageType
199
+ attr_reader attributes: Hash[String, String]
201
200
 
202
- class DocumentStructure
203
- attr_reader nodes: Array[DocumentNode]
204
- attr_reader source_format: String?
201
+ def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDimensions, image_type: ImageType, attributes: Hash[String, String]) -> void
202
+ end
205
203
 
206
- def initialize: (nodes: Array[DocumentNode], ?source_format: String) -> void
207
- end
204
+ class LinkMetadata
205
+ attr_reader href: String
206
+ attr_reader text: String
207
+ attr_reader title: String?
208
+ attr_reader link_type: LinkType
209
+ attr_reader rel: Array[String]
210
+ attr_reader attributes: Hash[String, String]
208
211
 
209
- class DocumentNode
210
- attr_reader id: String
211
- attr_reader content: NodeContent
212
- attr_reader parent: Integer?
213
- attr_reader children: Array[Integer]
214
- attr_reader annotations: Array[TextAnnotation]
215
- attr_reader attributes: Hash[String, String]?
212
+ def initialize: (href: String, text: String, ?title: String, link_type: LinkType, rel: Array[String], attributes: Hash[String, String]) -> void
213
+ end
216
214
 
217
- def initialize: (id: String, content: NodeContent, ?parent: Integer, children: Array[Integer], annotations: Array[TextAnnotation], ?attributes: Hash[String, String]) -> void
218
- end
215
+ class MetadataEntry
216
+ attr_reader key: String
217
+ attr_reader value: String
219
218
 
220
- class TextAnnotation
221
- attr_reader start: Integer
222
- attr_reader end: Integer
223
- attr_reader kind: AnnotationKind
219
+ def initialize: (key: String, value: String) -> void
220
+ end
224
221
 
225
- def initialize: (start: Integer, end: Integer, kind: AnnotationKind) -> void
226
- end
222
+ class NodeContext
223
+ attr_reader node_type: NodeType
224
+ attr_reader tag_name: String
225
+ attr_reader depth: Integer
226
+ attr_reader index_in_parent: Integer
227
+ attr_reader parent_tag: String?
228
+ attr_reader is_inline: bool
227
229
 
228
- class MetadataEntry
229
- attr_reader key: String
230
- attr_reader value: String
230
+ def initialize: (node_type: NodeType, tag_name: String, depth: Integer, index_in_parent: Integer, ?parent_tag: String, is_inline: bool) -> void
231
+ def attributes: () -> Hash[String, String]
232
+ def into_owned: () -> NodeContext
233
+ end
231
234
 
232
- def initialize: (key: String, value: String) -> void
233
- end
235
+ class PreprocessingOptions
236
+ attr_reader enabled: bool
237
+ attr_reader preset: PreprocessingPreset
238
+ attr_reader remove_navigation: bool
239
+ attr_reader remove_forms: bool
234
240
 
235
- class ConversionResult
236
- attr_reader content: String?
237
- attr_reader document: DocumentStructure?
238
- attr_reader metadata: HtmlMetadata
239
- attr_reader tables: Array[TableData]
240
- attr_reader warnings: Array[ProcessingWarning]
241
+ def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
242
+ end
241
243
 
242
- def initialize: (?content: String, ?document: DocumentStructure, ?metadata: HtmlMetadata, ?tables: Array[TableData], ?warnings: Array[ProcessingWarning]) -> void
243
- end
244
+ class PreprocessingOptionsUpdate
245
+ attr_reader enabled: bool?
246
+ attr_reader preset: PreprocessingPreset?
247
+ attr_reader remove_navigation: bool?
248
+ attr_reader remove_forms: bool?
244
249
 
245
- class TableGrid
246
- attr_reader rows: Integer
247
- attr_reader cols: Integer
248
- attr_reader cells: Array[GridCell]
250
+ def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
251
+ end
252
+
253
+ class ProcessingWarning
254
+ attr_reader message: String
255
+ attr_reader kind: WarningKind
249
256
 
250
- def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> void
251
- end
257
+ def initialize: (message: String, kind: WarningKind) -> void
258
+ end
252
259
 
253
- class GridCell
254
- attr_reader content: String
255
- attr_reader row: Integer
256
- attr_reader col: Integer
257
- attr_reader row_span: Integer
258
- attr_reader col_span: Integer
259
- attr_reader is_header: bool
260
+ class StructuredData
261
+ attr_reader data_type: StructuredDataType
262
+ attr_reader raw_json: String
263
+ attr_reader schema_type: String?
260
264
 
261
- def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool) -> void
262
- end
265
+ def initialize: (data_type: StructuredDataType, raw_json: String, ?schema_type: String) -> void
266
+ end
263
267
 
264
- class TableData
265
- attr_reader grid: TableGrid
266
- attr_reader markdown: String
268
+ class TableData
269
+ attr_reader grid: TableGrid
270
+ attr_reader markdown: String
267
271
 
268
272
  def initialize: (grid: TableGrid, markdown: String) -> void
269
- end
273
+ end
270
274
 
271
- class ProcessingWarning
272
- attr_reader message: String
273
- attr_reader kind: WarningKind
275
+ class TableGrid
276
+ attr_reader rows: Integer
277
+ attr_reader cols: Integer
278
+ attr_reader cells: Array[GridCell]
274
279
 
275
- def initialize: (message: String, kind: WarningKind) -> void
276
- end
280
+ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> void
281
+ end
277
282
 
278
- class VisitorHandle
279
- end
283
+ class TextAnnotation
284
+ attr_reader start: Integer
285
+ attr_reader end: Integer
286
+ attr_reader kind: AnnotationKind
280
287
 
281
- class NodeContext
282
- attr_reader node_type: NodeType
283
- attr_reader tag_name: String
284
- attr_reader depth: Integer
285
- attr_reader index_in_parent: Integer
286
- attr_reader parent_tag: String?
287
- attr_reader is_inline: bool
288
+ def initialize: (start: Integer, end: Integer, kind: AnnotationKind) -> void
289
+ end
288
290
 
289
- def initialize: (node_type: NodeType, tag_name: String, depth: Integer, index_in_parent: Integer, ?parent_tag: String, is_inline: bool) -> void
290
- def attributes: () -> Hash[String, String]
291
- def into_owned: () -> NodeContext
292
- end
291
+ class VisitorHandle
292
+ end
293
293
 
294
- class TextDirection
295
- type value = :ltr | :rtl | :auto
296
- end
294
+ class AnnotationKind
295
+ end
297
296
 
298
- class LinkType
299
- type value = :anchor | :internal | :external | :email | :phone | :other
300
- end
297
+ class CodeBlockStyle
298
+ type value = :Indented | :Backticks | :Tildes
299
+ end
301
300
 
302
- class ImageType
303
- type value = :data_uri | :inline_svg | :external | :relative
304
- end
301
+ class HeadingStyle
302
+ type value = :Underlined | :Atx | :AtxClosed
303
+ end
305
304
 
306
- class StructuredDataType
307
- type value = :json_ld | :microdata | :rdfa
308
- end
305
+ class HighlightStyle
306
+ type value = :DoubleEqual | :Html | :Bold | :None
307
+ end
309
308
 
310
- class TierStrategy
311
- type value = :auto | :tier2 | :tier1
312
- end
309
+ class ImageType
310
+ type value = :data_uri | :inline_svg | :external | :relative
311
+ end
313
312
 
314
- class PreprocessingPreset
315
- type value = :Minimal | :Standard | :Aggressive
316
- end
313
+ class LinkStyle
314
+ type value = :Inline | :Reference
315
+ end
317
316
 
318
- class HeadingStyle
319
- type value = :Underlined | :Atx | :AtxClosed
320
- end
317
+ class LinkType
318
+ type value = :anchor | :internal | :external | :email | :phone | :other
319
+ end
321
320
 
322
- class ListIndentType
323
- type value = :Spaces | :Tabs
324
- end
321
+ class ListIndentType
322
+ type value = :Spaces | :Tabs
323
+ end
325
324
 
326
- class WhitespaceMode
327
- type value = :Normalized | :Strict
328
- end
325
+ class NewlineStyle
326
+ type value = :Spaces | :Backslash
327
+ end
329
328
 
330
- class NewlineStyle
331
- type value = :Spaces | :Backslash
332
- end
329
+ class NodeContent
330
+ end
333
331
 
334
- class CodeBlockStyle
335
- type value = :Indented | :Backticks | :Tildes
336
- end
332
+ class NodeType
333
+ type value = :Text | :Element | :Heading | :Paragraph | :Div | :Blockquote | :Pre | :Hr | :List | :ListItem | :DefinitionList | :DefinitionTerm | :DefinitionDescription | :Table | :TableRow | :TableCell | :TableHeader | :TableBody | :TableHead | :TableFoot | :Link | :Image | :Strong | :Em | :Code | :Strikethrough | :Underline | :Subscript | :Superscript | :Mark | :Small | :Br | :Span | :Article | :Section | :Nav | :Aside | :Header | :Footer | :Main | :Figure | :Figcaption | :Time | :Details | :Summary | :Form | :Input | :Select | :Option | :Button | :Textarea | :Label | :Fieldset | :Legend | :Audio | :Video | :Picture | :Source | :Iframe | :Svg | :Canvas | :Ruby | :Rt | :Rp | :Abbr | :Kbd | :Samp | :Var | :Cite | :Q | :Del | :Ins | :Data | :Meter | :Progress | :Output | :Template | :Slot | :Html | :Head | :Body | :Title | :Meta | :LinkTag | :Style | :Script | :Base | :Custom
334
+ end
337
335
 
338
- class HighlightStyle
339
- type value = :DoubleEqual | :Html | :Bold | :None
340
- end
336
+ class OutputFormat
337
+ type value = :Markdown | :Djot | :Plain
338
+ end
341
339
 
342
- class LinkStyle
343
- type value = :Inline | :Reference
344
- end
340
+ class PreprocessingPreset
341
+ type value = :Minimal | :Standard | :Aggressive
342
+ end
345
343
 
346
- class UrlEscapeStyle
347
- type value = :Angle | :Percent
348
- end
344
+ class StructuredDataType
345
+ type value = :json_ld | :microdata | :rdfa
346
+ end
349
347
 
350
- class OutputFormat
351
- type value = :Markdown | :Djot | :Plain
352
- end
348
+ class TextDirection
349
+ type value = :ltr | :rtl | :auto
350
+ end
353
351
 
354
- class NodeContent
355
- end
352
+ class TierStrategy
353
+ type value = :auto | :tier2 | :tier1
354
+ end
356
355
 
357
- class AnnotationKind
358
- end
356
+ class UrlEscapeStyle
357
+ type value = :Angle | :Percent
358
+ end
359
359
 
360
- class WarningKind
361
- type value = :image_extraction_failed | :encoding_fallback | :truncated_input | :malformed_html | :sanitization_applied | :depth_limit_exceeded
362
- end
360
+ class VisitResult
361
+ end
363
362
 
364
- class NodeType
365
- type value = :Text | :Element | :Heading | :Paragraph | :Div | :Blockquote | :Pre | :Hr | :List | :ListItem | :DefinitionList | :DefinitionTerm | :DefinitionDescription | :Table | :TableRow | :TableCell | :TableHeader | :TableBody | :TableHead | :TableFoot | :Link | :Image | :Strong | :Em | :Code | :Strikethrough | :Underline | :Subscript | :Superscript | :Mark | :Small | :Br | :Span | :Article | :Section | :Nav | :Aside | :Header | :Footer | :Main | :Figure | :Figcaption | :Time | :Details | :Summary | :Form | :Input | :Select | :Option | :Button | :Textarea | :Label | :Fieldset | :Legend | :Audio | :Video | :Picture | :Source | :Iframe | :Svg | :Canvas | :Ruby | :Rt | :Rp | :Abbr | :Kbd | :Samp | :Var | :Cite | :Q | :Del | :Ins | :Data | :Meter | :Progress | :Output | :Template | :Slot | :Html | :Head | :Body | :Title | :Meta | :LinkTag | :Style | :Script | :Base | :Custom
366
- end
363
+ class WarningKind
364
+ type value = :image_extraction_failed | :encoding_fallback | :truncated_input | :malformed_html | :sanitization_applied | :depth_limit_exceeded
365
+ end
367
366
 
368
- class VisitResult
369
- end
367
+ class WhitespaceMode
368
+ type value = :Normalized | :Strict
369
+ end
370
370
 
371
- def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
371
+ def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
372
372
 
373
373
  end