kordoc 4.18.13 → 4.19.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/README.md +2 -1
- package/dist/{-DC2OO5KO.js → -I3DEUQUC.js} +11 -11
- package/dist/{chunk-K6WSMTVU.cjs → chunk-34RIECIF.cjs} +2 -2
- package/dist/{chunk-K6WSMTVU.cjs.map → chunk-34RIECIF.cjs.map} +1 -1
- package/dist/{chunk-EBXJ45VZ.js → chunk-5B55S4JU.js} +2 -2
- package/dist/{chunk-EBXJ45VZ.js.map → chunk-5B55S4JU.js.map} +1 -1
- package/dist/{chunk-6CQZMVXW.cjs → chunk-5ZSQ2ZIH.cjs} +3 -3
- package/dist/{chunk-6CQZMVXW.cjs.map → chunk-5ZSQ2ZIH.cjs.map} +1 -1
- package/dist/{chunk-GGMIPTM5.cjs → chunk-7TVRQJXI.cjs} +12 -12
- package/dist/{chunk-GGMIPTM5.cjs.map → chunk-7TVRQJXI.cjs.map} +1 -1
- package/dist/{chunk-6AYTYTFY.js → chunk-AAE765MK.js} +3 -3
- package/dist/{chunk-ISC2TH24.js → chunk-AMDDV4CI.js} +2 -2
- package/dist/{chunk-GUH6HYSZ.js → chunk-C4JHZNRL.js} +25 -22
- package/dist/chunk-C4JHZNRL.js.map +1 -0
- package/dist/{chunk-EZSWBHHI.js → chunk-CR4RXHXO.js} +2 -2
- package/dist/{chunk-32ZUIHSY.js → chunk-DEYCTP2S.js} +3 -3
- package/dist/{chunk-SVIOP7PE.js → chunk-DGXGVC4Z.js} +7 -7
- package/dist/{chunk-SVIOP7PE.js.map → chunk-DGXGVC4Z.js.map} +1 -1
- package/dist/{chunk-JPSLMPFI.js → chunk-DH75ZUYF.js} +95 -11
- package/dist/chunk-DH75ZUYF.js.map +1 -0
- package/dist/{chunk-DHEUQXXR.js → chunk-FJE3TMZ7.js} +2 -2
- package/dist/{chunk-ZNY5BRV6.js → chunk-GCYLNOTJ.js} +4 -4
- package/dist/{chunk-GSW7W7AL.js → chunk-GYQVQF2J.js} +7 -4
- package/dist/chunk-GYQVQF2J.js.map +1 -0
- package/dist/{chunk-7LOD4IGO.js → chunk-HFMIAMEO.js} +4 -4
- package/dist/{chunk-XVB3PUPJ.js → chunk-L5KNWOGR.js} +2 -2
- package/dist/chunk-L5KNWOGR.js.map +1 -0
- package/dist/{chunk-RQEDNI4P.cjs → chunk-LLVF6X5W.cjs} +3 -3
- package/dist/{chunk-RQEDNI4P.cjs.map → chunk-LLVF6X5W.cjs.map} +1 -1
- package/dist/{chunk-6FW3AZWN.cjs → chunk-LNU54ZKV.cjs} +117 -33
- package/dist/chunk-LNU54ZKV.cjs.map +1 -0
- package/dist/{chunk-IRN5SDY2.js → chunk-OMJWAJBD.js} +2 -2
- package/dist/{chunk-V7LKQNC4.js → chunk-QHN7N2QA.js} +2 -2
- package/dist/{chunk-INESPVEV.js → chunk-RYKNAYKC.js} +3 -3
- package/dist/{chunk-LKA7Z2NH.js → chunk-UCTD3BXH.js} +2 -2
- package/dist/{chunk-PN5WWW56.js → chunk-UTVNSCEI.js} +2 -2
- package/dist/{chunk-PN5WWW56.js.map → chunk-UTVNSCEI.js.map} +1 -1
- package/dist/{chunk-JWTZ3OVZ.js → chunk-VZSOPECZ.js} +2 -2
- package/dist/{chunk-VDEENOPW.js → chunk-W5XX2GKO.js} +2 -2
- package/dist/{chunk-PHMWSWHJ.js → chunk-XIWGPC3V.js} +2 -2
- package/dist/{chunk-JKHU7HID.js → chunk-XXUXQHUC.js} +95 -11
- package/dist/chunk-XXUXQHUC.js.map +1 -0
- package/dist/{chunk-3FGHQWJP.cjs → chunk-YV4PWWRW.cjs} +22 -22
- package/dist/{chunk-3FGHQWJP.cjs.map → chunk-YV4PWWRW.cjs.map} +1 -1
- package/dist/chunks-JPNLQOVD.js +10 -0
- package/dist/cli.js +39 -28
- package/dist/cli.js.map +1 -1
- package/dist/{formula-YCAO5IVW.js → formula-DUEAYGIG.js} +4 -4
- package/dist/{formula-DAMFHLQO.js → formula-I4MAHCTZ.js} +3 -3
- package/dist/{formula-HJNQGPRC.cjs → formula-L2BKGA4J.cjs} +9 -9
- package/dist/{formula-HJNQGPRC.cjs.map → formula-L2BKGA4J.cjs.map} +1 -1
- package/dist/{image-ocr-VH54SDZ7.js → image-ocr-B32G24XW.js} +6 -6
- package/dist/{image-ocr-PAF76DAW.js → image-ocr-NUL3JKXM.js} +9 -9
- package/dist/{image-ocr-AZ25IOC7.cjs → image-ocr-ZWRJZKYR.cjs} +15 -15
- package/dist/{image-ocr-AZ25IOC7.cjs.map → image-ocr-ZWRJZKYR.cjs.map} +1 -1
- package/dist/index.cjs +669 -663
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +26 -20
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +25 -23
- package/dist/mcp.js.map +1 -1
- package/dist/{model-bundle-53CHDYCG.js → model-bundle-OBIKG4K5.js} +5 -5
- package/dist/{models-UVLAKK3M.js → models-2OZHOPPM.js} +5 -5
- package/dist/{parser-HWAOPQYK.cjs → parser-DMWCXX7A.cjs} +131 -129
- package/dist/parser-DMWCXX7A.cjs.map +1 -0
- package/dist/{parser-I4D3TRGU.js → parser-FDE6GQST.js} +14 -12
- package/dist/{parser-Z6PHB54O.js.map → parser-FDE6GQST.js.map} +1 -1
- package/dist/{parser-Z6PHB54O.js → parser-YW3NMSJE.js} +11 -9
- package/dist/{parser-I4D3TRGU.js.map → parser-YW3NMSJE.js.map} +1 -1
- package/dist/pdf-ocr-7MR56U4P.js +16 -0
- package/dist/pdf-ocr-K2OK7FNQ.cjs +17 -0
- package/dist/{pdf-ocr-HR6CXGTX.cjs.map → pdf-ocr-K2OK7FNQ.cjs.map} +1 -1
- package/dist/pdf-ocr-YHC4X67W.js +20 -0
- package/dist/{profile-io-WHCWCOPW.js → profile-io-6WCU4KHY.js} +3 -3
- package/dist/{rasterize-5DZ3DHGH.js → rasterize-X3I7SWXF.js} +3 -3
- package/dist/{redact-doc-RNJVMFGQ.js → redact-doc-6H7WPUQD.js} +11 -11
- package/dist/{render-NZ6RA6SW.js → render-PBQJGZT3.js} +7 -7
- package/dist/seal-E2E7CFZJ.js +10 -0
- package/dist/{setup-U3EQNK4Z.js → setup-UORJSR3M.js} +3 -3
- package/dist/visual-4GDT5BRH.js +20 -0
- package/dist/{watch-GB2M7XU6.js → watch-S2ZMDDZU.js} +12 -12
- package/package.json +3 -2
- package/dist/chunk-6FW3AZWN.cjs.map +0 -1
- package/dist/chunk-GSW7W7AL.js.map +0 -1
- package/dist/chunk-GUH6HYSZ.js.map +0 -1
- package/dist/chunk-JKHU7HID.js.map +0 -1
- package/dist/chunk-JPSLMPFI.js.map +0 -1
- package/dist/chunk-XVB3PUPJ.js.map +0 -1
- package/dist/chunks-JZW2TXIZ.js +0 -10
- package/dist/parser-HWAOPQYK.cjs.map +0 -1
- package/dist/pdf-ocr-F4ICXO7W.js +0 -20
- package/dist/pdf-ocr-HR6CXGTX.cjs +0 -17
- package/dist/pdf-ocr-JI3K7JIN.js +0 -16
- package/dist/seal-WHJ6O5HT.js +0 -10
- package/dist/visual-JDAS4R43.js +0 -20
- /package/dist/{-DC2OO5KO.js.map → -I3DEUQUC.js.map} +0 -0
- /package/dist/{chunk-6AYTYTFY.js.map → chunk-AAE765MK.js.map} +0 -0
- /package/dist/{chunk-ISC2TH24.js.map → chunk-AMDDV4CI.js.map} +0 -0
- /package/dist/{chunk-EZSWBHHI.js.map → chunk-CR4RXHXO.js.map} +0 -0
- /package/dist/{chunk-32ZUIHSY.js.map → chunk-DEYCTP2S.js.map} +0 -0
- /package/dist/{chunk-DHEUQXXR.js.map → chunk-FJE3TMZ7.js.map} +0 -0
- /package/dist/{chunk-ZNY5BRV6.js.map → chunk-GCYLNOTJ.js.map} +0 -0
- /package/dist/{chunk-7LOD4IGO.js.map → chunk-HFMIAMEO.js.map} +0 -0
- /package/dist/{chunk-IRN5SDY2.js.map → chunk-OMJWAJBD.js.map} +0 -0
- /package/dist/{chunk-V7LKQNC4.js.map → chunk-QHN7N2QA.js.map} +0 -0
- /package/dist/{chunk-INESPVEV.js.map → chunk-RYKNAYKC.js.map} +0 -0
- /package/dist/{chunk-LKA7Z2NH.js.map → chunk-UCTD3BXH.js.map} +0 -0
- /package/dist/{chunk-JWTZ3OVZ.js.map → chunk-VZSOPECZ.js.map} +0 -0
- /package/dist/{chunk-VDEENOPW.js.map → chunk-W5XX2GKO.js.map} +0 -0
- /package/dist/{chunk-PHMWSWHJ.js.map → chunk-XIWGPC3V.js.map} +0 -0
- /package/dist/{chunks-JZW2TXIZ.js.map → chunks-JPNLQOVD.js.map} +0 -0
- /package/dist/{formula-YCAO5IVW.js.map → formula-DUEAYGIG.js.map} +0 -0
- /package/dist/{formula-DAMFHLQO.js.map → formula-I4MAHCTZ.js.map} +0 -0
- /package/dist/{image-ocr-VH54SDZ7.js.map → image-ocr-B32G24XW.js.map} +0 -0
- /package/dist/{image-ocr-PAF76DAW.js.map → image-ocr-NUL3JKXM.js.map} +0 -0
- /package/dist/{model-bundle-53CHDYCG.js.map → model-bundle-OBIKG4K5.js.map} +0 -0
- /package/dist/{models-UVLAKK3M.js.map → models-2OZHOPPM.js.map} +0 -0
- /package/dist/{pdf-ocr-F4ICXO7W.js.map → pdf-ocr-7MR56U4P.js.map} +0 -0
- /package/dist/{pdf-ocr-JI3K7JIN.js.map → pdf-ocr-YHC4X67W.js.map} +0 -0
- /package/dist/{profile-io-WHCWCOPW.js.map → profile-io-6WCU4KHY.js.map} +0 -0
- /package/dist/{rasterize-5DZ3DHGH.js.map → rasterize-X3I7SWXF.js.map} +0 -0
- /package/dist/{redact-doc-RNJVMFGQ.js.map → redact-doc-6H7WPUQD.js.map} +0 -0
- /package/dist/{render-NZ6RA6SW.js.map → render-PBQJGZT3.js.map} +0 -0
- /package/dist/{seal-WHJ6O5HT.js.map → seal-E2E7CFZJ.js.map} +0 -0
- /package/dist/{setup-U3EQNK4Z.js.map → setup-UORJSR3M.js.map} +0 -0
- /package/dist/{visual-JDAS4R43.js.map → visual-4GDT5BRH.js.map} +0 -0
- /package/dist/{watch-GB2M7XU6.js.map → watch-S2ZMDDZU.js.map} +0 -0
|
@@ -50,15 +50,15 @@ import {
|
|
|
50
50
|
startsNewItem,
|
|
51
51
|
trimTrailingEmptyTableCols,
|
|
52
52
|
wrapJoiner
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-RYKNAYKC.js";
|
|
54
54
|
import {
|
|
55
55
|
ocrModelsCached
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-UCTD3BXH.js";
|
|
57
|
+
import "./chunk-VZSOPECZ.js";
|
|
58
|
+
import "./chunk-AMDDV4CI.js";
|
|
59
59
|
import {
|
|
60
60
|
blocksToPages
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-QHN7N2QA.js";
|
|
62
62
|
import {
|
|
63
63
|
encodePng
|
|
64
64
|
} from "./chunk-7FCNOKOR.js";
|
|
@@ -68,20 +68,21 @@ import {
|
|
|
68
68
|
escapeLiteralTags,
|
|
69
69
|
stripScriptTags,
|
|
70
70
|
unframeLayoutTables
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-L5KNWOGR.js";
|
|
72
72
|
import {
|
|
73
73
|
hasRequestedPagesAfter,
|
|
74
74
|
parsePageRange
|
|
75
75
|
} from "./chunk-VQFA55IC.js";
|
|
76
76
|
import {
|
|
77
77
|
WINGDINGS,
|
|
78
|
+
assignTableIds,
|
|
78
79
|
blocksToMarkdown,
|
|
79
80
|
escapeLiteralDollar
|
|
80
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-XXUXQHUC.js";
|
|
81
82
|
import {
|
|
82
83
|
KordocError,
|
|
83
84
|
sanitizeHref
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-UTVNSCEI.js";
|
|
85
86
|
|
|
86
87
|
// src/pdf/ocr-region-merge.ts
|
|
87
88
|
function mergeOcrImageRegions(blocks, page, regions, ocrBlocks) {
|
|
@@ -2882,7 +2883,7 @@ function mergeLinkRuns(markdown) {
|
|
|
2882
2883
|
|
|
2883
2884
|
// src/pdf/formula-ocr.ts
|
|
2884
2885
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
2885
|
-
const formulaMod = await import("./formula-
|
|
2886
|
+
const formulaMod = await import("./formula-DUEAYGIG.js");
|
|
2886
2887
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
2887
2888
|
await ensureFormulaModels((p) => {
|
|
2888
2889
|
if (p.phase === "download" && p.total) {
|
|
@@ -3303,7 +3304,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3303
3304
|
}
|
|
3304
3305
|
if (targets.size > 0) {
|
|
3305
3306
|
try {
|
|
3306
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3307
|
+
const { runPdfOcr } = await import("./pdf-ocr-YHC4X67W.js");
|
|
3307
3308
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3308
3309
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3309
3310
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3456,7 +3457,8 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3456
3457
|
blocks.length = 0;
|
|
3457
3458
|
for (const b of kept) blocks.push(b);
|
|
3458
3459
|
}
|
|
3459
|
-
const finishMarkdown = (bs) => mergeLinkRuns(cleanPdfText(blocksToMarkdown(bs), { keepLoneNumbers: true }));
|
|
3460
|
+
const finishMarkdown = (bs) => mergeLinkRuns(cleanPdfText(blocksToMarkdown(bs, { tableFormat: options?.tableFormat }), { keepLoneNumbers: true }));
|
|
3461
|
+
if (options?.tableFormat === "gfm") assignTableIds(blocks);
|
|
3460
3462
|
let markdown = finishMarkdown(outBlocks);
|
|
3461
3463
|
return {
|
|
3462
3464
|
markdown,
|
|
@@ -3540,4 +3542,4 @@ export {
|
|
|
3540
3542
|
parsePdfDocument,
|
|
3541
3543
|
removeHeaderFooterBlocks
|
|
3542
3544
|
};
|
|
3543
|
-
//# sourceMappingURL=parser-
|
|
3545
|
+
//# sourceMappingURL=parser-FDE6GQST.js.map
|