@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 +4 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.mts +18 -1
- package/dist/types.d.ts +18 -1
- package/dist/types.js.map +1 -1
- package/index.d.ts +103 -10
- package/index.js +52 -52
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -460,10 +460,22 @@ function normalizeExtractionConfig(config) {
|
|
|
460
460
|
setIfDefined(normalized, "pages", pages);
|
|
461
461
|
const htmlOptions = normalizeHtmlOptions(config.htmlOptions);
|
|
462
462
|
setIfDefined(normalized, "htmlOptions", htmlOptions);
|
|
463
|
+
const layout = normalizeLayoutDetectionConfig(config.layout);
|
|
464
|
+
setIfDefined(normalized, "layout", layout);
|
|
463
465
|
setIfDefined(normalized, "outputFormat", config.outputFormat);
|
|
464
466
|
setIfDefined(normalized, "resultFormat", config.resultFormat);
|
|
465
467
|
return normalized;
|
|
466
468
|
}
|
|
469
|
+
function normalizeLayoutDetectionConfig(config) {
|
|
470
|
+
if (!config) {
|
|
471
|
+
return void 0;
|
|
472
|
+
}
|
|
473
|
+
const normalized = {};
|
|
474
|
+
setIfDefined(normalized, "preset", config.preset);
|
|
475
|
+
setIfDefined(normalized, "confidenceThreshold", config.confidenceThreshold);
|
|
476
|
+
setIfDefined(normalized, "applyHeuristics", config.applyHeuristics);
|
|
477
|
+
return normalized;
|
|
478
|
+
}
|
|
467
479
|
|
|
468
480
|
// typescript/core/type-converters.ts
|
|
469
481
|
function parseMetadata(metadataStr) {
|
|
@@ -1145,7 +1157,7 @@ function getEmbeddingPreset(name) {
|
|
|
1145
1157
|
}
|
|
1146
1158
|
|
|
1147
1159
|
// typescript/index.ts
|
|
1148
|
-
var __version__ = "4.
|
|
1160
|
+
var __version__ = "4.5.1";
|
|
1149
1161
|
export {
|
|
1150
1162
|
CacheError,
|
|
1151
1163
|
ErrorCode,
|