docling.rs-wasm 1.43.0 → 1.55.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.
@@ -85,6 +85,13 @@ export class ScannedConverter {
85
85
  * Number of pages converted so far (progress display).
86
86
  */
87
87
  page_count(): number;
88
+ /**
89
+ * Attach a text-detection session (#429): detected lines no layout region
90
+ * or recognized cell covers — a diagram's labels, a margin note — get
91
+ * recognized and placed as orphan text, as the native pipeline and
92
+ * docling's OCR engines do. Call once before the first `add_page`.
93
+ */
94
+ setDetector(det: any): void;
88
95
  }
89
96
 
90
97
  /**
@@ -240,6 +240,16 @@ export class ScannedConverter {
240
240
  const ret = wasm.scannedconverter_page_count(this.__wbg_ptr);
241
241
  return ret >>> 0;
242
242
  }
243
+ /**
244
+ * Attach a text-detection session (#429): detected lines no layout region
245
+ * or recognized cell covers — a diagram's labels, a margin note — get
246
+ * recognized and placed as orphan text, as the native pipeline and
247
+ * docling's OCR engines do. Call once before the first `add_page`.
248
+ * @param {any} det
249
+ */
250
+ setDetector(det) {
251
+ wasm.scannedconverter_setDetector(this.__wbg_ptr, det);
252
+ }
243
253
  }
244
254
  if (Symbol.dispose) ScannedConverter.prototype[Symbol.dispose] = ScannedConverter.prototype.free;
245
255
 
@@ -410,7 +420,7 @@ export function __wbg___wbindgen_throw_5d9e815e6fdf150f(arg0, arg1) {
410
420
  export function __wbg__wbg_cb_unref_997e73d32238e655(arg0) {
411
421
  arg0._wbg_cb_unref();
412
422
  }
413
- export function __wbg_bbox_f4ad691007164f29() { return handleError(function (arg0, arg1, arg2) {
423
+ export function __wbg_bbox_b2402904a0d81742() { return handleError(function (arg0, arg1, arg2) {
414
424
  const ret = arg0.bbox(arg1, arg2 >>> 0);
415
425
  return ret;
416
426
  }, arguments); }
@@ -418,7 +428,7 @@ export function __wbg_call_6bcf8d3e20937e46() { return handleError(function (arg
418
428
  const ret = arg0.call(arg1, arg2);
419
429
  return ret;
420
430
  }, arguments); }
421
- export function __wbg_encode_835572da87b9e2af() { return handleError(function (arg0, arg1) {
431
+ export function __wbg_encode_40a9600eeb2a2090() { return handleError(function (arg0, arg1) {
422
432
  const ret = arg0.encode(arg1);
423
433
  return ret;
424
434
  }, arguments); }
@@ -506,14 +516,18 @@ export function __wbg_resolve_35ec7e0c6af4c82c(arg0) {
506
516
  const ret = Promise.resolve(arg0);
507
517
  return ret;
508
518
  }
509
- export function __wbg_run_5e70fea58ca6be63() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
519
+ export function __wbg_run_357dec13fbe40415() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
510
520
  const ret = arg0.run(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4);
511
521
  return ret;
512
522
  }, arguments); }
513
- export function __wbg_run_b50d20d8195be8c0() { return handleError(function (arg0, arg1) {
523
+ export function __wbg_run_37900aa10786b382() { return handleError(function (arg0, arg1) {
514
524
  const ret = arg0.run(arg1);
515
525
  return ret;
516
526
  }, arguments); }
527
+ export function __wbg_run_f0e88d47b0548f9f() { return handleError(function (arg0, arg1, arg2, arg3) {
528
+ const ret = arg0.run(arg1 >>> 0, arg2 >>> 0, arg3);
529
+ return ret;
530
+ }, arguments); }
517
531
  export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
518
532
  const ret = arg1.stack;
519
533
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -537,7 +551,7 @@ export function __wbg_static_accessor_WINDOW_fd0bc376bf0f8b42() {
537
551
  const ret = typeof window === 'undefined' ? null : window;
538
552
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
539
553
  }
540
- export function __wbg_step_b03f30167331bda5() { return handleError(function (arg0, arg1) {
554
+ export function __wbg_step_43bd0a9281efe7c6() { return handleError(function (arg0, arg1) {
541
555
  const ret = arg0.step(arg1);
542
556
  return ret;
543
557
  }, arguments); }
Binary file
@@ -17,6 +17,7 @@ export const scannedconverter_add_page: (a: number, b: number, c: number, d: num
17
17
  export const scannedconverter_finish: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
18
18
  export const scannedconverter_new: (a: number, b: number) => number;
19
19
  export const scannedconverter_page_count: (a: number) => number;
20
+ export const scannedconverter_setDetector: (a: number, b: any) => void;
20
21
  export const start: () => void;
21
22
  export const supported_extensions: () => [number, number];
22
23
  export const version: () => [number, number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docling.rs-wasm",
3
- "version": "1.43.0",
3
+ "version": "1.55.0",
4
4
  "description": "In-browser document conversion: DOCX, HTML, XLSX, PPTX, EPUB, Markdown, … and the text layer of PDFs → Markdown / docling JSON / DocLang, fully client-side (docling.rs compiled to WebAssembly)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -85,6 +85,13 @@ export class ScannedConverter {
85
85
  * Number of pages converted so far (progress display).
86
86
  */
87
87
  page_count(): number;
88
+ /**
89
+ * Attach a text-detection session (#429): detected lines no layout region
90
+ * or recognized cell covers — a diagram's labels, a margin note — get
91
+ * recognized and placed as orphan text, as the native pipeline and
92
+ * docling's OCR engines do. Call once before the first `add_page`.
93
+ */
94
+ setDetector(det: any): void;
88
95
  }
89
96
 
90
97
  /**
@@ -152,6 +159,7 @@ export interface InitOutput {
152
159
  readonly scannedconverter_finish: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
153
160
  readonly scannedconverter_new: (a: number, b: number) => number;
154
161
  readonly scannedconverter_page_count: (a: number) => number;
162
+ readonly scannedconverter_setDetector: (a: number, b: any) => void;
155
163
  readonly start: () => void;
156
164
  readonly supported_extensions: () => [number, number];
157
165
  readonly version: () => [number, number];
@@ -242,6 +242,16 @@ export class ScannedConverter {
242
242
  const ret = wasm.scannedconverter_page_count(this.__wbg_ptr);
243
243
  return ret >>> 0;
244
244
  }
245
+ /**
246
+ * Attach a text-detection session (#429): detected lines no layout region
247
+ * or recognized cell covers — a diagram's labels, a margin note — get
248
+ * recognized and placed as orphan text, as the native pipeline and
249
+ * docling's OCR engines do. Call once before the first `add_page`.
250
+ * @param {any} det
251
+ */
252
+ setDetector(det) {
253
+ wasm.scannedconverter_setDetector(this.__wbg_ptr, det);
254
+ }
245
255
  }
246
256
  if (Symbol.dispose) ScannedConverter.prototype[Symbol.dispose] = ScannedConverter.prototype.free;
247
257
 
@@ -415,7 +425,7 @@ function __wbg_get_imports() {
415
425
  __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
416
426
  arg0._wbg_cb_unref();
417
427
  },
418
- __wbg_bbox_f4ad691007164f29: function() { return handleError(function (arg0, arg1, arg2) {
428
+ __wbg_bbox_b2402904a0d81742: function() { return handleError(function (arg0, arg1, arg2) {
419
429
  const ret = arg0.bbox(arg1, arg2 >>> 0);
420
430
  return ret;
421
431
  }, arguments); },
@@ -423,7 +433,7 @@ function __wbg_get_imports() {
423
433
  const ret = arg0.call(arg1, arg2);
424
434
  return ret;
425
435
  }, arguments); },
426
- __wbg_encode_835572da87b9e2af: function() { return handleError(function (arg0, arg1) {
436
+ __wbg_encode_40a9600eeb2a2090: function() { return handleError(function (arg0, arg1) {
427
437
  const ret = arg0.encode(arg1);
428
438
  return ret;
429
439
  }, arguments); },
@@ -511,14 +521,18 @@ function __wbg_get_imports() {
511
521
  const ret = Promise.resolve(arg0);
512
522
  return ret;
513
523
  },
514
- __wbg_run_5e70fea58ca6be63: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
524
+ __wbg_run_357dec13fbe40415: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
515
525
  const ret = arg0.run(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4);
516
526
  return ret;
517
527
  }, arguments); },
518
- __wbg_run_b50d20d8195be8c0: function() { return handleError(function (arg0, arg1) {
528
+ __wbg_run_37900aa10786b382: function() { return handleError(function (arg0, arg1) {
519
529
  const ret = arg0.run(arg1);
520
530
  return ret;
521
531
  }, arguments); },
532
+ __wbg_run_f0e88d47b0548f9f: function() { return handleError(function (arg0, arg1, arg2, arg3) {
533
+ const ret = arg0.run(arg1 >>> 0, arg2 >>> 0, arg3);
534
+ return ret;
535
+ }, arguments); },
522
536
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
523
537
  const ret = arg1.stack;
524
538
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -542,7 +556,7 @@ function __wbg_get_imports() {
542
556
  const ret = typeof window === 'undefined' ? null : window;
543
557
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
544
558
  },
545
- __wbg_step_b03f30167331bda5: function() { return handleError(function (arg0, arg1) {
559
+ __wbg_step_43bd0a9281efe7c6: function() { return handleError(function (arg0, arg1) {
546
560
  const ret = arg0.step(arg1);
547
561
  return ret;
548
562
  }, arguments); },
Binary file
@@ -17,6 +17,7 @@ export const scannedconverter_add_page: (a: number, b: number, c: number, d: num
17
17
  export const scannedconverter_finish: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
18
18
  export const scannedconverter_new: (a: number, b: number) => number;
19
19
  export const scannedconverter_page_count: (a: number) => number;
20
+ export const scannedconverter_setDetector: (a: number, b: any) => void;
20
21
  export const start: () => void;
21
22
  export const supported_extensions: () => [number, number];
22
23
  export const version: () => [number, number];