@docling/docling-client 2.131.0 → 2.133.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.
package/dist/index.d.cts CHANGED
@@ -12,13 +12,13 @@ interface DoclingDocument {
12
12
  name: string;
13
13
  [key: string]: unknown;
14
14
  }
15
- type InputFormat = 'docx' | 'doc' | 'pptx' | 'html' | 'image' | 'pdf' | 'asciidoc' | 'md' | 'csv' | 'xlsx' | 'xml_uspto' | 'xml_jats' | 'json_docling' | 'dclx' | 'audio' | 'vtt' | 'xml_xbrl' | 'mets_gbs' | 'latex' | 'ppt' | 'xls' | 'odt' | 'ods' | 'odp' | 'xml_doclang' | 'video' | 'email' | 'epub' | 'boxnote' | 'ebcdic';
16
- type OutputFormat = 'md' | 'json' | 'yaml' | 'html' | 'html_split_page' | 'text' | 'doctags' | 'vtt' | 'doclang' | 'dclx' | 'chunks';
17
- type ProcessingPipeline = 'legacy' | 'standard' | 'vlm' | 'asr';
15
+ type InputFormat = 'docx' | 'doc' | 'rtf' | 'pptx' | 'ppt' | 'html' | 'mhtml' | 'image' | 'pdf' | 'asciidoc' | 'md' | 'csv' | 'xlsx' | 'xls' | 'odt' | 'ods' | 'odp' | 'xml_uspto' | 'xml_jats' | 'xml_xbrl' | 'xml_doclang' | 'dclx' | 'mets_gbs' | 'json_docling' | 'audio' | 'video' | 'vtt' | 'latex' | 'email' | 'epub' | 'boxnote' | 'iwork_pages' | 'iwork_keynote' | 'ebcdic' | 'afp';
16
+ type OutputFormat = 'md' | 'json' | 'yaml' | 'html' | 'html_split_page' | 'text' | 'doctags' | 'vtt' | 'doclang' | 'dclx' | 'chunks' | 'latex';
17
+ type ProcessingPipeline = 'legacy' | 'standard' | 'native' | 'vlm' | 'asr';
18
18
  type TableMode = 'fast' | 'accurate';
19
19
  type ImageExportMode = 'placeholder' | 'embedded' | 'referenced';
20
- type PdfBackend = 'pypdfium2' | 'docling_parse' | 'threaded_docling_parse' | 'dlparse_v1' | 'dlparse_v2' | 'dlparse_v4';
21
- type VlmResponseFormat = 'doctags' | 'doclang' | 'markdown' | 'deepseekocr_markdown' | 'html' | 'otsl' | 'plaintext' | 'chandra_html' | 'dots_json';
20
+ type PdfBackend = 'pypdfium2' | 'docling_parse' | 'threaded_docling_parse' | '_docling_parse' | 'dlparse_v1' | 'dlparse_v2' | 'dlparse_v4';
21
+ type VlmResponseFormat = 'doctags' | 'doclang' | 'markdown' | 'deepseekocr_markdown' | 'unlimited_ocr_markdown' | 'html' | 'otsl' | 'plaintext' | 'chandra_html' | 'dots_json' | 'nemotron_parse_v2' | 'mineru2';
22
22
  type VlmInferenceFramework = 'mlx' | 'transformers' | 'vllm';
23
23
  type TransformersModelType = 'automodel' | 'automodel-causallm' | 'automodel-imagetexttotext';
24
24
  type LegacyVlmModelType = 'smoldocling' | 'smoldocling_vllm' | 'granite_vision' | 'granite_vision_vllm' | 'granite_vision_ollama' | 'got_ocr_2' | 'granite_docling' | 'granite_docling_vllm' | 'nanonets_ocr2' | 'nanonets_ocr2_vllm' | 'nanonets_ocr2_lmstudio' | 'glm_ocr' | 'glm_ocr_vllm' | 'lightonocr' | 'lightonocr_vllm' | 'deepseekocr_ollama';
@@ -404,6 +404,8 @@ interface ExportDocumentResponse<TDocument = DoclingDocument> {
404
404
  }
405
405
  interface ExportResult<TDocument = DoclingDocument> {
406
406
  kind: 'ExportResult';
407
+ document: ExportDocumentResponse<TDocument>;
408
+ /** @deprecated Use `document` instead. */
407
409
  content: ExportDocumentResponse<TDocument>;
408
410
  status: ConversionStatus;
409
411
  errors: ErrorItem[];
package/dist/index.d.ts CHANGED
@@ -12,13 +12,13 @@ interface DoclingDocument {
12
12
  name: string;
13
13
  [key: string]: unknown;
14
14
  }
15
- type InputFormat = 'docx' | 'doc' | 'pptx' | 'html' | 'image' | 'pdf' | 'asciidoc' | 'md' | 'csv' | 'xlsx' | 'xml_uspto' | 'xml_jats' | 'json_docling' | 'dclx' | 'audio' | 'vtt' | 'xml_xbrl' | 'mets_gbs' | 'latex' | 'ppt' | 'xls' | 'odt' | 'ods' | 'odp' | 'xml_doclang' | 'video' | 'email' | 'epub' | 'boxnote' | 'ebcdic';
16
- type OutputFormat = 'md' | 'json' | 'yaml' | 'html' | 'html_split_page' | 'text' | 'doctags' | 'vtt' | 'doclang' | 'dclx' | 'chunks';
17
- type ProcessingPipeline = 'legacy' | 'standard' | 'vlm' | 'asr';
15
+ type InputFormat = 'docx' | 'doc' | 'rtf' | 'pptx' | 'ppt' | 'html' | 'mhtml' | 'image' | 'pdf' | 'asciidoc' | 'md' | 'csv' | 'xlsx' | 'xls' | 'odt' | 'ods' | 'odp' | 'xml_uspto' | 'xml_jats' | 'xml_xbrl' | 'xml_doclang' | 'dclx' | 'mets_gbs' | 'json_docling' | 'audio' | 'video' | 'vtt' | 'latex' | 'email' | 'epub' | 'boxnote' | 'iwork_pages' | 'iwork_keynote' | 'ebcdic' | 'afp';
16
+ type OutputFormat = 'md' | 'json' | 'yaml' | 'html' | 'html_split_page' | 'text' | 'doctags' | 'vtt' | 'doclang' | 'dclx' | 'chunks' | 'latex';
17
+ type ProcessingPipeline = 'legacy' | 'standard' | 'native' | 'vlm' | 'asr';
18
18
  type TableMode = 'fast' | 'accurate';
19
19
  type ImageExportMode = 'placeholder' | 'embedded' | 'referenced';
20
- type PdfBackend = 'pypdfium2' | 'docling_parse' | 'threaded_docling_parse' | 'dlparse_v1' | 'dlparse_v2' | 'dlparse_v4';
21
- type VlmResponseFormat = 'doctags' | 'doclang' | 'markdown' | 'deepseekocr_markdown' | 'html' | 'otsl' | 'plaintext' | 'chandra_html' | 'dots_json';
20
+ type PdfBackend = 'pypdfium2' | 'docling_parse' | 'threaded_docling_parse' | '_docling_parse' | 'dlparse_v1' | 'dlparse_v2' | 'dlparse_v4';
21
+ type VlmResponseFormat = 'doctags' | 'doclang' | 'markdown' | 'deepseekocr_markdown' | 'unlimited_ocr_markdown' | 'html' | 'otsl' | 'plaintext' | 'chandra_html' | 'dots_json' | 'nemotron_parse_v2' | 'mineru2';
22
22
  type VlmInferenceFramework = 'mlx' | 'transformers' | 'vllm';
23
23
  type TransformersModelType = 'automodel' | 'automodel-causallm' | 'automodel-imagetexttotext';
24
24
  type LegacyVlmModelType = 'smoldocling' | 'smoldocling_vllm' | 'granite_vision' | 'granite_vision_vllm' | 'granite_vision_ollama' | 'got_ocr_2' | 'granite_docling' | 'granite_docling_vllm' | 'nanonets_ocr2' | 'nanonets_ocr2_vllm' | 'nanonets_ocr2_lmstudio' | 'glm_ocr' | 'glm_ocr_vllm' | 'lightonocr' | 'lightonocr_vllm' | 'deepseekocr_ollama';
@@ -404,6 +404,8 @@ interface ExportDocumentResponse<TDocument = DoclingDocument> {
404
404
  }
405
405
  interface ExportResult<TDocument = DoclingDocument> {
406
406
  kind: 'ExportResult';
407
+ document: ExportDocumentResponse<TDocument>;
408
+ /** @deprecated Use `document` instead. */
407
409
  content: ExportDocumentResponse<TDocument>;
408
410
  status: ConversionStatus;
409
411
  errors: ErrorItem[];
package/dist/index.js CHANGED
@@ -722,6 +722,7 @@ var EXTENSION_FORMATS = {
722
722
  dotm: "docx",
723
723
  doc: "doc",
724
724
  dot: "doc",
725
+ rtf: "rtf",
725
726
  pptx: "pptx",
726
727
  potx: "pptx",
727
728
  ppsx: "pptx",
@@ -734,6 +735,8 @@ var EXTENSION_FORMATS = {
734
735
  html: "html",
735
736
  htm: "html",
736
737
  xhtml: "html",
738
+ mhtml: "mhtml",
739
+ mht: "mhtml",
737
740
  md: "md",
738
741
  markdown: "md",
739
742
  txt: "md",
@@ -743,6 +746,8 @@ var EXTENSION_FORMATS = {
743
746
  csv: "csv",
744
747
  xlsx: "xlsx",
745
748
  xlsm: "xlsx",
749
+ xltx: "xlsx",
750
+ xltm: "xlsx",
746
751
  xls: "xls",
747
752
  xlt: "xls",
748
753
  asciidoc: "asciidoc",
@@ -763,6 +768,7 @@ var EXTENSION_FORMATS = {
763
768
  tiff: "image",
764
769
  bmp: "image",
765
770
  webp: "image",
771
+ gif: "image",
766
772
  wav: "audio",
767
773
  mp3: "audio",
768
774
  m4a: "audio",
@@ -784,8 +790,14 @@ var EXTENSION_FORMATS = {
784
790
  tex: "latex",
785
791
  latex: "latex",
786
792
  eml: "email",
793
+ msg: "email",
787
794
  epub: "epub",
788
- boxnote: "boxnote"
795
+ boxnote: "boxnote",
796
+ pages: "iwork_pages",
797
+ key: "iwork_keynote",
798
+ ebc: "ebcdic",
799
+ ebcdic: "ebcdic",
800
+ afp: "afp"
789
801
  };
790
802
  async function normalizeSourceInput(input, signal) {
791
803
  throwIfAborted(signal);
@@ -1232,12 +1244,15 @@ function guessMimeType(filename) {
1232
1244
  pdf: "application/pdf",
1233
1245
  doc: "application/msword",
1234
1246
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1247
+ rtf: "application/rtf",
1235
1248
  ppt: "application/vnd.ms-powerpoint",
1236
1249
  pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
1237
1250
  xls: "application/vnd.ms-excel",
1238
1251
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1239
1252
  html: "text/html",
1240
1253
  htm: "text/html",
1254
+ mhtml: "application/x-mimearchive",
1255
+ mht: "application/x-mimearchive",
1241
1256
  md: "text/markdown",
1242
1257
  txt: "text/plain",
1243
1258
  csv: "text/csv",
@@ -1247,44 +1262,54 @@ function guessMimeType(filename) {
1247
1262
  jpeg: "image/jpeg",
1248
1263
  tif: "image/tiff",
1249
1264
  tiff: "image/tiff",
1265
+ gif: "image/gif",
1266
+ webp: "image/webp",
1267
+ bmp: "image/bmp",
1250
1268
  wav: "audio/wav",
1251
1269
  mp3: "audio/mpeg",
1252
1270
  mp4: "video/mp4",
1253
1271
  vtt: "text/vtt",
1254
1272
  eml: "message/rfc822",
1273
+ msg: "application/vnd.ms-outlook",
1255
1274
  epub: "application/epub+zip"
1256
1275
  }[extension] ?? "application/octet-stream";
1257
1276
  }
1258
1277
  var INPUT_FORMATS = /* @__PURE__ */ new Set([
1259
1278
  "docx",
1260
1279
  "doc",
1280
+ "rtf",
1261
1281
  "pptx",
1282
+ "ppt",
1262
1283
  "html",
1284
+ "mhtml",
1263
1285
  "image",
1264
1286
  "pdf",
1265
1287
  "asciidoc",
1266
1288
  "md",
1267
1289
  "csv",
1268
1290
  "xlsx",
1269
- "xml_uspto",
1270
- "xml_jats",
1271
- "json_docling",
1272
- "dclx",
1273
- "audio",
1274
- "vtt",
1275
- "xml_xbrl",
1276
- "mets_gbs",
1277
- "latex",
1278
- "ppt",
1279
1291
  "xls",
1280
1292
  "odt",
1281
1293
  "ods",
1282
1294
  "odp",
1295
+ "xml_uspto",
1296
+ "xml_jats",
1297
+ "xml_xbrl",
1283
1298
  "xml_doclang",
1299
+ "dclx",
1300
+ "mets_gbs",
1301
+ "json_docling",
1302
+ "audio",
1284
1303
  "video",
1304
+ "vtt",
1305
+ "latex",
1285
1306
  "email",
1286
1307
  "epub",
1287
- "boxnote"
1308
+ "boxnote",
1309
+ "iwork_pages",
1310
+ "iwork_keynote",
1311
+ "ebcdic",
1312
+ "afp"
1288
1313
  ]);
1289
1314
  var OUTPUT_FORMATS = /* @__PURE__ */ new Set([
1290
1315
  "md",
@@ -1297,15 +1322,17 @@ var OUTPUT_FORMATS = /* @__PURE__ */ new Set([
1297
1322
  "vtt",
1298
1323
  "doclang",
1299
1324
  "dclx",
1300
- "chunks"
1325
+ "chunks",
1326
+ "latex"
1301
1327
  ]);
1302
- var PIPELINES = /* @__PURE__ */ new Set(["legacy", "standard", "vlm", "asr"]);
1328
+ var PIPELINES = /* @__PURE__ */ new Set(["legacy", "standard", "native", "vlm", "asr"]);
1303
1329
  var IMAGE_EXPORT_MODES = /* @__PURE__ */ new Set(["placeholder", "embedded", "referenced"]);
1304
1330
  var TABLE_MODES = /* @__PURE__ */ new Set(["fast", "accurate"]);
1305
1331
  var PDF_BACKENDS = /* @__PURE__ */ new Set([
1306
1332
  "pypdfium2",
1307
1333
  "docling_parse",
1308
1334
  "threaded_docling_parse",
1335
+ "_docling_parse",
1309
1336
  "dlparse_v1",
1310
1337
  "dlparse_v2",
1311
1338
  "dlparse_v4"
@@ -1333,11 +1360,14 @@ var VLM_RESPONSE_FORMATS = /* @__PURE__ */ new Set([
1333
1360
  "doclang",
1334
1361
  "markdown",
1335
1362
  "deepseekocr_markdown",
1363
+ "unlimited_ocr_markdown",
1336
1364
  "html",
1337
1365
  "otsl",
1338
1366
  "plaintext",
1339
1367
  "chandra_html",
1340
- "dots_json"
1368
+ "dots_json",
1369
+ "nemotron_parse_v2",
1370
+ "mineru2"
1341
1371
  ]);
1342
1372
  var VLM_INFERENCE_FRAMEWORKS = /* @__PURE__ */ new Set(["mlx", "transformers", "vllm"]);
1343
1373
  var TRANSFORMERS_MODEL_TYPES = /* @__PURE__ */ new Set([
@@ -3292,6 +3322,7 @@ function parseExportResult(value, path) {
3292
3322
  });
3293
3323
  return {
3294
3324
  kind: "ExportResult",
3325
+ document: parsed.document,
3295
3326
  content: parsed.document,
3296
3327
  status: parsed.status,
3297
3328
  errors: parsed.errors,