kordoc 4.24.2 → 4.24.3
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 +12 -10
- package/dist/{-SRNEV7LS.js → -Q56U3KCA.js} +11 -11
- package/dist/{chunk-E7B5CXYI.js → chunk-33NZN73M.js} +2 -2
- package/dist/{chunk-NJ5RUDCW.js → chunk-3EWXRIPH.js} +3 -3
- package/dist/{chunk-NMFFIUI6.js → chunk-42FSKT7R.js} +2 -2
- package/dist/{chunk-M46PB75E.js → chunk-4X73CGIL.js} +2 -2
- package/dist/{chunk-PNSALBXH.cjs → chunk-6ZRZLV3J.cjs} +2 -2
- package/dist/{chunk-PNSALBXH.cjs.map → chunk-6ZRZLV3J.cjs.map} +1 -1
- package/dist/{chunk-W24TJJNN.js → chunk-AEEQN6L3.js} +2 -2
- package/dist/{chunk-TW3V6FSH.js → chunk-EEXIFCXC.js} +2 -2
- package/dist/{chunk-LMEF7FN5.js → chunk-EWCJCWTT.js} +2 -2
- package/dist/{chunk-MHNJOJQV.js → chunk-FZT34MUI.js} +4 -4
- package/dist/{chunk-WDSTW3BD.js → chunk-HNX2I7D6.js} +2 -2
- package/dist/{chunk-PNX5FYHC.cjs → chunk-HTG3VVET.cjs} +24 -24
- package/dist/{chunk-PNX5FYHC.cjs.map → chunk-HTG3VVET.cjs.map} +1 -1
- package/dist/{chunk-KUC5I5MB.js → chunk-HU7POUBS.js} +2 -2
- package/dist/{chunk-WJAFE3Z6.js → chunk-I2QETSZN.js} +2 -2
- package/dist/{chunk-DHMBPMKC.js → chunk-J45OVEUM.js} +139 -15
- package/dist/chunk-J45OVEUM.js.map +1 -0
- package/dist/{chunk-UNICY546.cjs → chunk-JILIA5EV.cjs} +23 -23
- package/dist/{chunk-UNICY546.cjs.map → chunk-JILIA5EV.cjs.map} +1 -1
- package/dist/{chunk-TDMBTG7U.js → chunk-KXHNIHLC.js} +2 -2
- package/dist/{chunk-JFUUFJZW.cjs → chunk-N65EY5BI.cjs} +6 -6
- package/dist/{chunk-JFUUFJZW.cjs.map → chunk-N65EY5BI.cjs.map} +1 -1
- package/dist/{chunk-4XC4O7FJ.js → chunk-NKDPCALC.js} +4 -4
- package/dist/{chunk-C6ZVB547.js → chunk-OAOM7IEI.js} +11 -11
- package/dist/{chunk-4745MFQU.js → chunk-PHZDAHZC.js} +3 -3
- package/dist/{chunk-RIRPLFPN.js → chunk-PMX5CPK5.js} +2 -2
- package/dist/{chunk-E6VBLBOO.js → chunk-Q2QKRE4P.js} +2 -2
- package/dist/{chunk-7NTMM6PO.js → chunk-TZ753B6A.js} +2 -2
- package/dist/{chunk-HLTPMSYW.cjs → chunk-VFEI2GIE.cjs} +3 -3
- package/dist/{chunk-HLTPMSYW.cjs.map → chunk-VFEI2GIE.cjs.map} +1 -1
- package/dist/{chunk-3HN65YAL.js → chunk-W6O7KBOD.js} +2 -2
- package/dist/{chunk-VPSF5LEM.js → chunk-XAZ5RGVG.js} +3 -3
- package/dist/{chunk-R2GIGE5H.js → chunk-XNNMMYFO.js} +2 -2
- package/dist/{chunk-JMOAMKAR.js → chunk-XZOAE2Q7.js} +4 -4
- package/dist/{chunk-IGG63DFK.cjs → chunk-YG4YOPK6.cjs} +3 -3
- package/dist/{chunk-IGG63DFK.cjs.map → chunk-YG4YOPK6.cjs.map} +1 -1
- package/dist/chunks-REYSCBPB.js +10 -0
- package/dist/cli.js +30 -30
- package/dist/{formula-HK2MNZ3Q.cjs → formula-2BPHF6O7.cjs} +9 -9
- package/dist/{formula-HK2MNZ3Q.cjs.map → formula-2BPHF6O7.cjs.map} +1 -1
- package/dist/{formula-DSB574H7.js → formula-EA5GDCUD.js} +4 -4
- package/dist/{formula-U2LZ67KI.js → formula-IREEAC4T.js} +3 -3
- package/dist/{image-ocr-QNIMVE5A.cjs → image-ocr-CCTE7HX3.cjs} +17 -17
- package/dist/{image-ocr-QNIMVE5A.cjs.map → image-ocr-CCTE7HX3.cjs.map} +1 -1
- package/dist/{image-ocr-J54Q3YWP.js → image-ocr-JQJC5HWK.js} +6 -6
- package/dist/{image-ocr-3QB2HLSI.js → image-ocr-LGOFUS3O.js} +9 -9
- package/dist/index.cjs +517 -393
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +139 -15
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +23 -23
- package/dist/{model-bundle-CGWU4ALC.js → model-bundle-YW62Y6UD.js} +5 -5
- package/dist/{models-A3TF3BDV.js → models-AAL3IS2R.js} +5 -5
- package/dist/{parse-worker-v2-MNUD4WAR.js → parse-worker-v2-3JAHV7NY.js} +12 -12
- package/dist/{parser-C3ARF26I.js → parser-4FCKKJ2N.js} +18 -14
- package/dist/parser-4FCKKJ2N.js.map +1 -0
- package/dist/{parser-RPAHN3OR.cjs → parser-HE45CCSG.cjs} +163 -159
- package/dist/parser-HE45CCSG.cjs.map +1 -0
- package/dist/{parser-OBGWEWSU.js → parser-ZBP5GOQK.js} +15 -11
- package/dist/parser-ZBP5GOQK.js.map +1 -0
- package/dist/pdf-ocr-7MDCLWAA.cjs +31 -0
- package/dist/{pdf-ocr-GA5QJFNK.cjs.map → pdf-ocr-7MDCLWAA.cjs.map} +1 -1
- package/dist/{pdf-ocr-K53REDNY.js → pdf-ocr-HFAEOA7W.js} +6 -6
- package/dist/{pdf-ocr-ENLVEEYL.js → pdf-ocr-Q4TPGDDI.js} +9 -9
- package/dist/{profile-io-ZGFEO7CB.js → profile-io-EDQTKLLL.js} +3 -3
- package/dist/{rasterize-QMC2SAUT.js → rasterize-VD2XGHUJ.js} +3 -3
- package/dist/{redact-doc-JH6RZZBE.js → redact-doc-TBIBQJCT.js} +11 -11
- package/dist/{render-ZGKQLKPJ.js → render-J5KAZAQH.js} +7 -7
- package/dist/seal-H2JNAZU7.js +10 -0
- package/dist/{setup-LAQGCYQ2.js → setup-5LYHCQRU.js} +3 -3
- package/dist/visual-7EO6GR3M.js +21 -0
- package/dist/{watch-7YPB4TKC.js → watch-YP4IWM75.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-DHMBPMKC.js.map +0 -1
- package/dist/chunks-AL4P5TO5.js +0 -10
- package/dist/parser-C3ARF26I.js.map +0 -1
- package/dist/parser-OBGWEWSU.js.map +0 -1
- package/dist/parser-RPAHN3OR.cjs.map +0 -1
- package/dist/pdf-ocr-GA5QJFNK.cjs +0 -31
- package/dist/seal-KMGYTJAV.js +0 -10
- package/dist/visual-4OYJFGXL.js +0 -21
- /package/dist/{-SRNEV7LS.js.map → -Q56U3KCA.js.map} +0 -0
- /package/dist/{chunk-E7B5CXYI.js.map → chunk-33NZN73M.js.map} +0 -0
- /package/dist/{chunk-NJ5RUDCW.js.map → chunk-3EWXRIPH.js.map} +0 -0
- /package/dist/{chunk-NMFFIUI6.js.map → chunk-42FSKT7R.js.map} +0 -0
- /package/dist/{chunk-M46PB75E.js.map → chunk-4X73CGIL.js.map} +0 -0
- /package/dist/{chunk-W24TJJNN.js.map → chunk-AEEQN6L3.js.map} +0 -0
- /package/dist/{chunk-TW3V6FSH.js.map → chunk-EEXIFCXC.js.map} +0 -0
- /package/dist/{chunk-LMEF7FN5.js.map → chunk-EWCJCWTT.js.map} +0 -0
- /package/dist/{chunk-MHNJOJQV.js.map → chunk-FZT34MUI.js.map} +0 -0
- /package/dist/{chunk-WDSTW3BD.js.map → chunk-HNX2I7D6.js.map} +0 -0
- /package/dist/{chunk-KUC5I5MB.js.map → chunk-HU7POUBS.js.map} +0 -0
- /package/dist/{chunk-WJAFE3Z6.js.map → chunk-I2QETSZN.js.map} +0 -0
- /package/dist/{chunk-TDMBTG7U.js.map → chunk-KXHNIHLC.js.map} +0 -0
- /package/dist/{chunk-4XC4O7FJ.js.map → chunk-NKDPCALC.js.map} +0 -0
- /package/dist/{chunk-C6ZVB547.js.map → chunk-OAOM7IEI.js.map} +0 -0
- /package/dist/{chunk-4745MFQU.js.map → chunk-PHZDAHZC.js.map} +0 -0
- /package/dist/{chunk-RIRPLFPN.js.map → chunk-PMX5CPK5.js.map} +0 -0
- /package/dist/{chunk-E6VBLBOO.js.map → chunk-Q2QKRE4P.js.map} +0 -0
- /package/dist/{chunk-7NTMM6PO.js.map → chunk-TZ753B6A.js.map} +0 -0
- /package/dist/{chunk-3HN65YAL.js.map → chunk-W6O7KBOD.js.map} +0 -0
- /package/dist/{chunk-VPSF5LEM.js.map → chunk-XAZ5RGVG.js.map} +0 -0
- /package/dist/{chunk-R2GIGE5H.js.map → chunk-XNNMMYFO.js.map} +0 -0
- /package/dist/{chunk-JMOAMKAR.js.map → chunk-XZOAE2Q7.js.map} +0 -0
- /package/dist/{chunks-AL4P5TO5.js.map → chunks-REYSCBPB.js.map} +0 -0
- /package/dist/{formula-DSB574H7.js.map → formula-EA5GDCUD.js.map} +0 -0
- /package/dist/{formula-U2LZ67KI.js.map → formula-IREEAC4T.js.map} +0 -0
- /package/dist/{image-ocr-J54Q3YWP.js.map → image-ocr-JQJC5HWK.js.map} +0 -0
- /package/dist/{image-ocr-3QB2HLSI.js.map → image-ocr-LGOFUS3O.js.map} +0 -0
- /package/dist/{model-bundle-CGWU4ALC.js.map → model-bundle-YW62Y6UD.js.map} +0 -0
- /package/dist/{models-A3TF3BDV.js.map → models-AAL3IS2R.js.map} +0 -0
- /package/dist/{parse-worker-v2-MNUD4WAR.js.map → parse-worker-v2-3JAHV7NY.js.map} +0 -0
- /package/dist/{pdf-ocr-ENLVEEYL.js.map → pdf-ocr-HFAEOA7W.js.map} +0 -0
- /package/dist/{pdf-ocr-K53REDNY.js.map → pdf-ocr-Q4TPGDDI.js.map} +0 -0
- /package/dist/{profile-io-ZGFEO7CB.js.map → profile-io-EDQTKLLL.js.map} +0 -0
- /package/dist/{rasterize-QMC2SAUT.js.map → rasterize-VD2XGHUJ.js.map} +0 -0
- /package/dist/{redact-doc-JH6RZZBE.js.map → redact-doc-TBIBQJCT.js.map} +0 -0
- /package/dist/{render-ZGKQLKPJ.js.map → render-J5KAZAQH.js.map} +0 -0
- /package/dist/{seal-KMGYTJAV.js.map → seal-H2JNAZU7.js.map} +0 -0
- /package/dist/{setup-LAQGCYQ2.js.map → setup-5LYHCQRU.js.map} +0 -0
- /package/dist/{visual-4OYJFGXL.js.map → visual-7EO6GR3M.js.map} +0 -0
- /package/dist/{watch-7YPB4TKC.js.map → watch-YP4IWM75.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToPages,
|
|
3
3
|
encodePng
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W6O7KBOD.js";
|
|
5
5
|
import {
|
|
6
6
|
hasRequestedPagesAfter,
|
|
7
7
|
parsePageRange
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
stripAbsorbedRunningLines,
|
|
62
62
|
trimTrailingEmptyTableCols,
|
|
63
63
|
wrapJoiner
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-XZOAE2Q7.js";
|
|
65
65
|
import {
|
|
66
66
|
CELL_BASELINES,
|
|
67
67
|
CELL_EDGES,
|
|
@@ -78,12 +78,12 @@ import {
|
|
|
78
78
|
stripScriptTags,
|
|
79
79
|
unframeLayoutTables,
|
|
80
80
|
validateOcrOptions
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import "./chunk-
|
|
81
|
+
} from "./chunk-EEXIFCXC.js";
|
|
82
|
+
import "./chunk-33NZN73M.js";
|
|
83
83
|
import {
|
|
84
84
|
KordocError,
|
|
85
85
|
sanitizeHref
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-I2QETSZN.js";
|
|
87
87
|
|
|
88
88
|
// src/pdf/image-extract.ts
|
|
89
89
|
import { createHash } from "crypto";
|
|
@@ -1183,9 +1183,13 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
|
|
|
1183
1183
|
const cols = U.length - 1;
|
|
1184
1184
|
if (cols < 1) return null;
|
|
1185
1185
|
const pa = anchorsOf(prev), ca = anchorsOf(curr);
|
|
1186
|
+
const cutOpen = (() => {
|
|
1187
|
+
const u = ROW_RULES.get(prev), d = ROW_RULES.get(curr);
|
|
1188
|
+
return !!u && !!d && !u.bottom && !d.top;
|
|
1189
|
+
})();
|
|
1186
1190
|
let skip = 0, head = 0;
|
|
1187
|
-
while (skip < Math.min(3, curr.rows - 1, prev.rows) && rowText(ca, skip) !== "" && rowText(ca, skip) === rowText(pa, skip)) skip++;
|
|
1188
|
-
for (let h = 1; h <= 2 && !skip; h++) {
|
|
1191
|
+
while (!cutOpen && skip < Math.min(3, curr.rows - 1, prev.rows) && rowText(ca, skip) !== "" && rowText(ca, skip) === rowText(pa, skip)) skip++;
|
|
1192
|
+
for (let h = 1; h <= 2 && !skip && !cutOpen; h++) {
|
|
1189
1193
|
head = h;
|
|
1190
1194
|
while (skip < Math.min(3, curr.rows - 1, prev.rows - h) && hasText(rowText(ca, skip)) && rowText(ca, skip) === rowText(pa, h + skip)) skip++;
|
|
1191
1195
|
}
|
|
@@ -4003,7 +4007,7 @@ function mergeLinkRuns(markdown) {
|
|
|
4003
4007
|
|
|
4004
4008
|
// src/pdf/formula-ocr.ts
|
|
4005
4009
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
4006
|
-
const formulaMod = await import("./formula-
|
|
4010
|
+
const formulaMod = await import("./formula-IREEAC4T.js");
|
|
4007
4011
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
4008
4012
|
await ensureFormulaModels((p) => {
|
|
4009
4013
|
if (p.phase === "download" && p.total) {
|
|
@@ -4430,10 +4434,10 @@ async function parsePdfDocument(buffer, options) {
|
|
|
4430
4434
|
}
|
|
4431
4435
|
if (targets.size > 0) {
|
|
4432
4436
|
try {
|
|
4433
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
4437
|
+
const { runPdfOcr } = await import("./pdf-ocr-HFAEOA7W.js");
|
|
4434
4438
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
4435
4439
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
4436
|
-
const { builtinOcrConfig } = await import("./pdf-ocr-
|
|
4440
|
+
const { builtinOcrConfig } = await import("./pdf-ocr-HFAEOA7W.js");
|
|
4437
4441
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages, builtinOcrConfig(options), ocrLinesOut);
|
|
4438
4442
|
for (const obs of ocrPageBlocks.values()) stripScriptTags({ blocks: obs });
|
|
4439
4443
|
if (ocrPageBlocks.size > 0) {
|
|
@@ -4678,4 +4682,4 @@ export {
|
|
|
4678
4682
|
parsePdfDocument,
|
|
4679
4683
|
removeHeaderFooterBlocks
|
|
4680
4684
|
};
|
|
4681
|
-
//# sourceMappingURL=parser-
|
|
4685
|
+
//# sourceMappingURL=parser-ZBP5GOQK.js.map
|