@kreuzberg/node 4.4.6 → 4.5.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.
package/README.md CHANGED
@@ -22,7 +22,7 @@
22
22
  <img src="https://img.shields.io/maven-central/v/dev.kreuzberg/kreuzberg?label=Java&color=007ec6" alt="Java">
23
23
  </a>
24
24
  <a href="https://github.com/kreuzberg-dev/kreuzberg/releases">
25
- <img src="https://img.shields.io/github/v/tag/kreuzberg-dev/kreuzberg?label=Go&color=007ec6&filter=v4.4.6" alt="Go">
25
+ <img src="https://img.shields.io/github/v/tag/kreuzberg-dev/kreuzberg?label=Go&color=007ec6&filter=v4.5.1" alt="Go">
26
26
  </a>
27
27
  <a href="https://www.nuget.org/packages/Kreuzberg/">
28
28
  <img src="https://img.shields.io/nuget/v/Kreuzberg?label=C%23&color=007ec6" alt="C#">
@@ -47,6 +47,9 @@
47
47
  <a href="https://docs.kreuzberg.dev">
48
48
  <img src="https://img.shields.io/badge/docs-kreuzberg.dev-blue" alt="Documentation">
49
49
  </a>
50
+ <a href="https://huggingface.co/Kreuzberg">
51
+ <img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Models-yellow" alt="Hugging Face">
52
+ </a>
50
53
  </div>
51
54
 
52
55
  <img width="1128" height="191" alt="Banner2" src="https://github.com/user-attachments/assets/419fc06c-8313-4324-b159-4b4d3cfce5c0" />
package/dist/index.d.mts CHANGED
@@ -1191,6 +1191,6 @@ declare function __resetBindingForTests(): void;
1191
1191
  * @module @kreuzberg/node
1192
1192
  */
1193
1193
 
1194
- declare const __version__ = "4.4.6";
1194
+ declare const __version__ = "4.5.1";
1195
1195
 
1196
1196
  export { type EmbeddingPreset, ErrorClassification, ExtractionConfig, ExtractionResult, OcrBackendProtocol, PanicContext, PostProcessorProtocol, ValidatorProtocol, WorkerPool, WorkerPoolStats, __resetBindingForTests, __setBindingForTests, __version__, batchExtractBytes, batchExtractBytesSync, batchExtractFiles, batchExtractFilesInWorker, batchExtractFilesSync, classifyError, clearDocumentExtractors, clearOcrBackends, clearPostProcessors, clearValidators, closeWorkerPool, createWorkerPool, detectMimeType, detectMimeTypeFromPath, extractBytes, extractBytesSync, extractFile, extractFileInWorker, extractFileSync, getEmbeddingPreset, getErrorCodeDescription, getErrorCodeName, getExtensionsForMime, getLastErrorCode, getLastPanicContext, getWorkerPoolStats, listDocumentExtractors, listEmbeddingPresets, listOcrBackends, listPostProcessors, listValidators, loadConfigFile, loadConfigFromPath, registerOcrBackend, registerPostProcessor, registerValidator, unregisterDocumentExtractor, unregisterOcrBackend, unregisterPostProcessor, unregisterValidator, validateMimeType };
package/dist/index.d.ts CHANGED
@@ -1191,6 +1191,6 @@ declare function __resetBindingForTests(): void;
1191
1191
  * @module @kreuzberg/node
1192
1192
  */
1193
1193
 
1194
- declare const __version__ = "4.4.6";
1194
+ declare const __version__ = "4.5.1";
1195
1195
 
1196
1196
  export { type EmbeddingPreset, ErrorClassification, ExtractionConfig, ExtractionResult, OcrBackendProtocol, PanicContext, PostProcessorProtocol, ValidatorProtocol, WorkerPool, WorkerPoolStats, __resetBindingForTests, __setBindingForTests, __version__, batchExtractBytes, batchExtractBytesSync, batchExtractFiles, batchExtractFilesInWorker, batchExtractFilesSync, classifyError, clearDocumentExtractors, clearOcrBackends, clearPostProcessors, clearValidators, closeWorkerPool, createWorkerPool, detectMimeType, detectMimeTypeFromPath, extractBytes, extractBytesSync, extractFile, extractFileInWorker, extractFileSync, getEmbeddingPreset, getErrorCodeDescription, getErrorCodeName, getExtensionsForMime, getLastErrorCode, getLastPanicContext, getWorkerPoolStats, listDocumentExtractors, listEmbeddingPresets, listOcrBackends, listPostProcessors, listValidators, loadConfigFile, loadConfigFromPath, registerOcrBackend, registerPostProcessor, registerValidator, unregisterDocumentExtractor, unregisterOcrBackend, unregisterPostProcessor, unregisterValidator, validateMimeType };
package/dist/index.js CHANGED
@@ -533,10 +533,22 @@ function normalizeExtractionConfig(config) {
533
533
  setIfDefined(normalized, "pages", pages);
534
534
  const htmlOptions = normalizeHtmlOptions(config.htmlOptions);
535
535
  setIfDefined(normalized, "htmlOptions", htmlOptions);
536
+ const layout = normalizeLayoutDetectionConfig(config.layout);
537
+ setIfDefined(normalized, "layout", layout);
536
538
  setIfDefined(normalized, "outputFormat", config.outputFormat);
537
539
  setIfDefined(normalized, "resultFormat", config.resultFormat);
538
540
  return normalized;
539
541
  }
542
+ function normalizeLayoutDetectionConfig(config) {
543
+ if (!config) {
544
+ return void 0;
545
+ }
546
+ const normalized = {};
547
+ setIfDefined(normalized, "preset", config.preset);
548
+ setIfDefined(normalized, "confidenceThreshold", config.confidenceThreshold);
549
+ setIfDefined(normalized, "applyHeuristics", config.applyHeuristics);
550
+ return normalized;
551
+ }
540
552
 
541
553
  // typescript/core/type-converters.ts
542
554
  function parseMetadata(metadataStr) {
@@ -1218,7 +1230,7 @@ function getEmbeddingPreset(name) {
1218
1230
  }
1219
1231
 
1220
1232
  // typescript/index.ts
1221
- var __version__ = "4.4.6";
1233
+ var __version__ = "4.5.1";
1222
1234
  // Annotate the CommonJS export names for ESM import in node:
1223
1235
  0 && (module.exports = {
1224
1236
  CacheError,