kordoc 4.2.7 → 4.2.9

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.
Files changed (89) hide show
  1. package/dist/{-7TEU6IRU.js → -ECUCTQTR.js} +9 -9
  2. package/dist/{chunk-AES6PHIG.js → chunk-27Z4PUZZ.js} +3 -3
  3. package/dist/{chunk-62DHK6KT.js → chunk-3PLF5UIS.js} +2 -2
  4. package/dist/{chunk-G2AS6ICC.js → chunk-3TSTZGCJ.js} +2 -2
  5. package/dist/{chunk-RS5OID2J.cjs → chunk-4ZWKFDUC.cjs} +9 -9
  6. package/dist/{chunk-RS5OID2J.cjs.map → chunk-4ZWKFDUC.cjs.map} +1 -1
  7. package/dist/{chunk-VWXA47AW.cjs → chunk-6GM2QLM3.cjs} +4 -4
  8. package/dist/{chunk-VWXA47AW.cjs.map → chunk-6GM2QLM3.cjs.map} +1 -1
  9. package/dist/{chunk-IVX3YLQH.js → chunk-7ZARSBQ3.js} +2 -2
  10. package/dist/chunk-7ZARSBQ3.js.map +1 -0
  11. package/dist/{chunk-LPRNVK4G.js → chunk-G3DMDTZI.js} +64 -39
  12. package/dist/chunk-G3DMDTZI.js.map +1 -0
  13. package/dist/{chunk-HH4SD5RE.cjs → chunk-GZ7W64QU.cjs} +2 -2
  14. package/dist/{chunk-HH4SD5RE.cjs.map → chunk-GZ7W64QU.cjs.map} +1 -1
  15. package/dist/{chunk-PK5GLL5C.js → chunk-KTPZYXN2.js} +2 -2
  16. package/dist/{chunk-GJO3ORFW.js → chunk-LM7C6HI2.js} +1 -1
  17. package/dist/chunk-LM7C6HI2.js.map +1 -0
  18. package/dist/{chunk-5HFKMCAX.js → chunk-LXE7OR6N.js} +2 -2
  19. package/dist/{chunk-T6BTWUTC.js → chunk-MHMVFI2N.js} +2 -2
  20. package/dist/{chunk-NAWC6HTC.js → chunk-NIISBGSR.js} +2 -2
  21. package/dist/chunk-NIISBGSR.js.map +1 -0
  22. package/dist/{chunk-YTRJDQ4Q.cjs → chunk-PATPZTH7.cjs} +3 -3
  23. package/dist/{chunk-YTRJDQ4Q.cjs.map → chunk-PATPZTH7.cjs.map} +1 -1
  24. package/dist/{chunk-YAQRGQUJ.js → chunk-STYN45MS.js} +2 -2
  25. package/dist/{chunk-2CHFQQXM.js → chunk-VEHC4EJL.js} +2 -2
  26. package/dist/{chunk-FSUCQ6ZM.js → chunk-WTT2KJOM.js} +4 -4
  27. package/dist/chunk-WTT2KJOM.js.map +1 -0
  28. package/dist/{chunk-ESV4KOSE.js → chunk-XU4VWOKL.js} +3 -3
  29. package/dist/{chunk-NKERQ6GB.js → chunk-YR4PF56B.js} +2 -2
  30. package/dist/chunks-VFIMYK36.js +10 -0
  31. package/dist/cli.js +17 -17
  32. package/dist/{image-ocr-UX4QM35J.cjs → image-ocr-J5656BEE.cjs} +9 -9
  33. package/dist/{image-ocr-UX4QM35J.cjs.map → image-ocr-J5656BEE.cjs.map} +1 -1
  34. package/dist/{image-ocr-PGQ7JPDP.js → image-ocr-KZTNJ62U.js} +5 -5
  35. package/dist/{image-ocr-OS4ETBOL.js → image-ocr-PS7XCV6K.js} +4 -4
  36. package/dist/index.cjs +491 -466
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +6 -0
  39. package/dist/index.d.ts +6 -0
  40. package/dist/index.js +60 -35
  41. package/dist/index.js.map +1 -1
  42. package/dist/mcp.js +15 -15
  43. package/dist/{parser-2JAC5WMM.js → parser-A34NAYKA.js} +5 -5
  44. package/dist/{parser-GAZROLSA.cjs → parser-CSYU3CAW.cjs} +24 -24
  45. package/dist/{parser-GAZROLSA.cjs.map → parser-CSYU3CAW.cjs.map} +1 -1
  46. package/dist/{parser-T74C7Q57.js → parser-WNFWMBSL.js} +6 -6
  47. package/dist/pdf-ocr-KBMWPG2L.js +12 -0
  48. package/dist/{pdf-ocr-3A3QLPID.js → pdf-ocr-NPZG67FN.js} +5 -5
  49. package/dist/pdf-ocr-O44DAGTY.cjs +13 -0
  50. package/dist/{pdf-ocr-2SKGRXIR.cjs.map → pdf-ocr-O44DAGTY.cjs.map} +1 -1
  51. package/dist/{profile-io-6GX564CO.js → profile-io-43MF52H6.js} +3 -3
  52. package/dist/{rasterize-4V7PKE7A.js → rasterize-OG7KXBJS.js} +2 -2
  53. package/dist/render-336CJHAS.js +10 -0
  54. package/dist/seal-TM2XCE2R.js +10 -0
  55. package/dist/{watch-JVRAAJNA.js → watch-SOHQMZN2.js} +9 -9
  56. package/package.json +1 -1
  57. package/dist/chunk-FSUCQ6ZM.js.map +0 -1
  58. package/dist/chunk-GJO3ORFW.js.map +0 -1
  59. package/dist/chunk-IVX3YLQH.js.map +0 -1
  60. package/dist/chunk-LPRNVK4G.js.map +0 -1
  61. package/dist/chunk-NAWC6HTC.js.map +0 -1
  62. package/dist/chunks-TLAOHNPB.js +0 -10
  63. package/dist/pdf-ocr-2SKGRXIR.cjs +0 -13
  64. package/dist/pdf-ocr-WBOTDQ4D.js +0 -12
  65. package/dist/render-2AF7GZVN.js +0 -10
  66. package/dist/seal-2ES6UAN6.js +0 -10
  67. /package/dist/{-7TEU6IRU.js.map → -ECUCTQTR.js.map} +0 -0
  68. /package/dist/{chunk-AES6PHIG.js.map → chunk-27Z4PUZZ.js.map} +0 -0
  69. /package/dist/{chunk-62DHK6KT.js.map → chunk-3PLF5UIS.js.map} +0 -0
  70. /package/dist/{chunk-G2AS6ICC.js.map → chunk-3TSTZGCJ.js.map} +0 -0
  71. /package/dist/{chunk-PK5GLL5C.js.map → chunk-KTPZYXN2.js.map} +0 -0
  72. /package/dist/{chunk-5HFKMCAX.js.map → chunk-LXE7OR6N.js.map} +0 -0
  73. /package/dist/{chunk-T6BTWUTC.js.map → chunk-MHMVFI2N.js.map} +0 -0
  74. /package/dist/{chunk-YAQRGQUJ.js.map → chunk-STYN45MS.js.map} +0 -0
  75. /package/dist/{chunk-2CHFQQXM.js.map → chunk-VEHC4EJL.js.map} +0 -0
  76. /package/dist/{chunk-ESV4KOSE.js.map → chunk-XU4VWOKL.js.map} +0 -0
  77. /package/dist/{chunk-NKERQ6GB.js.map → chunk-YR4PF56B.js.map} +0 -0
  78. /package/dist/{chunks-TLAOHNPB.js.map → chunks-VFIMYK36.js.map} +0 -0
  79. /package/dist/{image-ocr-PGQ7JPDP.js.map → image-ocr-KZTNJ62U.js.map} +0 -0
  80. /package/dist/{image-ocr-OS4ETBOL.js.map → image-ocr-PS7XCV6K.js.map} +0 -0
  81. /package/dist/{parser-2JAC5WMM.js.map → parser-A34NAYKA.js.map} +0 -0
  82. /package/dist/{parser-T74C7Q57.js.map → parser-WNFWMBSL.js.map} +0 -0
  83. /package/dist/{pdf-ocr-3A3QLPID.js.map → pdf-ocr-KBMWPG2L.js.map} +0 -0
  84. /package/dist/{pdf-ocr-WBOTDQ4D.js.map → pdf-ocr-NPZG67FN.js.map} +0 -0
  85. /package/dist/{profile-io-6GX564CO.js.map → profile-io-43MF52H6.js.map} +0 -0
  86. /package/dist/{rasterize-4V7PKE7A.js.map → rasterize-OG7KXBJS.js.map} +0 -0
  87. /package/dist/{render-2AF7GZVN.js.map → render-336CJHAS.js.map} +0 -0
  88. /package/dist/{seal-2ES6UAN6.js.map → seal-TM2XCE2R.js.map} +0 -0
  89. /package/dist/{watch-JVRAAJNA.js.map → watch-SOHQMZN2.js.map} +0 -0
@@ -40,9 +40,9 @@ import {
40
40
  renderHtml,
41
41
  unknownFontWarnings,
42
42
  validateHwpx
43
- } from "./chunk-LPRNVK4G.js";
43
+ } from "./chunk-G3DMDTZI.js";
44
44
  import "./chunk-7FCNOKOR.js";
45
- import "./chunk-GJO3ORFW.js";
45
+ import "./chunk-LM7C6HI2.js";
46
46
  import {
47
47
  detectFormat,
48
48
  detectOle2Format,
@@ -59,7 +59,7 @@ import {
59
59
  buildRangeSplices,
60
60
  placeSealHwpx,
61
61
  scanSectionXml
62
- } from "./chunk-ESV4KOSE.js";
62
+ } from "./chunk-XU4VWOKL.js";
63
63
  import {
64
64
  DEFAULT_REDACT_RULES,
65
65
  redactMarkdown,
@@ -67,10 +67,10 @@ import {
67
67
  } from "./chunk-DZIXKL7E.js";
68
68
  import {
69
69
  blocksToChunks
70
- } from "./chunk-PK5GLL5C.js";
70
+ } from "./chunk-KTPZYXN2.js";
71
71
  import {
72
72
  blocksToMarkdown
73
- } from "./chunk-T6BTWUTC.js";
73
+ } from "./chunk-MHMVFI2N.js";
74
74
  import {
75
75
  SPACE_EM_FIXED,
76
76
  SPACE_EM_FONT,
@@ -80,11 +80,11 @@ import {
80
80
  renderHwpxToSvg,
81
81
  simulateWrap,
82
82
  simulateWrapKeepWord
83
- } from "./chunk-FSUCQ6ZM.js";
84
- import "./chunk-NAWC6HTC.js";
83
+ } from "./chunk-WTT2KJOM.js";
84
+ import "./chunk-NIISBGSR.js";
85
85
  import {
86
86
  VERSION
87
- } from "./chunk-G2AS6ICC.js";
87
+ } from "./chunk-3TSTZGCJ.js";
88
88
  export {
89
89
  DEFAULT_REDACT_RULES,
90
90
  HwpxSession,
@@ -153,4 +153,4 @@ export {
153
153
  unknownFontWarnings,
154
154
  validateHwpx
155
155
  };
156
- //# sourceMappingURL=-7TEU6IRU.js.map
156
+ //# sourceMappingURL=-ECUCTQTR.js.map
@@ -3,11 +3,11 @@ import {
3
3
  HEADING_RATIO_H1,
4
4
  HEADING_RATIO_H2,
5
5
  HEADING_RATIO_H3
6
- } from "./chunk-GJO3ORFW.js";
6
+ } from "./chunk-LM7C6HI2.js";
7
7
  import {
8
8
  safeMax,
9
9
  safeMin
10
- } from "./chunk-G2AS6ICC.js";
10
+ } from "./chunk-3TSTZGCJ.js";
11
11
 
12
12
  // src/pdf/image-regions.ts
13
13
  import { OPS } from "pdfjs-dist/legacy/build/pdf.mjs";
@@ -3343,4 +3343,4 @@ export {
3343
3343
  extractPageBlocksWithLines,
3344
3344
  mergeCrossPageTables
3345
3345
  };
3346
- //# sourceMappingURL=chunk-AES6PHIG.js.map
3346
+ //# sourceMappingURL=chunk-27Z4PUZZ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  HEADING_RATIO_H3,
5
5
  safeMax,
6
6
  safeMin
7
- } from "./chunk-IVX3YLQH.js";
7
+ } from "./chunk-7ZARSBQ3.js";
8
8
 
9
9
  // src/pdf/image-regions.ts
10
10
  import { OPS } from "pdfjs-dist/legacy/build/pdf.mjs";
@@ -3340,4 +3340,4 @@ export {
3340
3340
  extractPageBlocksWithLines,
3341
3341
  mergeCrossPageTables
3342
3342
  };
3343
- //# sourceMappingURL=chunk-62DHK6KT.js.map
3343
+ //# sourceMappingURL=chunk-3PLF5UIS.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/utils.ts
4
- var VERSION = true ? "4.2.7" : "0.0.0-dev";
4
+ var VERSION = true ? "4.2.9" : "0.0.0-dev";
5
5
  function toArrayBuffer(buf) {
6
6
  if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
7
7
  return buf.buffer;
@@ -121,4 +121,4 @@ export {
121
121
  safeMax,
122
122
  classifyError
123
123
  };
124
- //# sourceMappingURL=chunk-G2AS6ICC.js.map
124
+ //# sourceMappingURL=chunk-3TSTZGCJ.js.map
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkHH4SD5REcjs = require('./chunk-HH4SD5RE.cjs');
7
+ var _chunkGZ7W64QUcjs = require('./chunk-GZ7W64QU.cjs');
8
8
 
9
9
  // src/pdf/image-regions.ts
10
10
  var _pdfmjs = require('pdfjs-dist/legacy/build/pdf.mjs');
@@ -1536,9 +1536,9 @@ function detectHeadings(blocks, medianFontSize) {
1536
1536
  if (/^\d+$/.test(text)) continue;
1537
1537
  const ratio = block.style.fontSize / medianFontSize;
1538
1538
  let level = 0;
1539
- if (ratio >= _chunkHH4SD5REcjs.HEADING_RATIO_H1) level = 1;
1540
- else if (ratio >= _chunkHH4SD5REcjs.HEADING_RATIO_H2) level = 2;
1541
- else if (ratio >= _chunkHH4SD5REcjs.HEADING_RATIO_H3) level = 3;
1539
+ if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H1) level = 1;
1540
+ else if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H2) level = 2;
1541
+ else if (ratio >= _chunkGZ7W64QUcjs.HEADING_RATIO_H3) level = 3;
1542
1542
  if (level > 0) {
1543
1543
  block.type = "heading";
1544
1544
  block.level = level;
@@ -2658,14 +2658,14 @@ function isProseSpread(items) {
2658
2658
  for (let i = 1; i < sorted.length; i++) {
2659
2659
  gaps.push(sorted[i].x - (sorted[i - 1].x + sorted[i - 1].w));
2660
2660
  }
2661
- const maxGap = _chunkHH4SD5REcjs.safeMax.call(void 0, gaps);
2661
+ const maxGap = _chunkGZ7W64QUcjs.safeMax.call(void 0, gaps);
2662
2662
  const avgLen = items.reduce((s, i) => s + i.text.length, 0) / items.length;
2663
2663
  return maxGap < 40 && avgLen < 5;
2664
2664
  }
2665
2665
  function detectColumns(yLines) {
2666
2666
  const allItems = yLines.flat();
2667
2667
  if (allItems.length === 0) return null;
2668
- const pageWidth = _chunkHH4SD5REcjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunkHH4SD5REcjs.safeMin.call(void 0, allItems.map((i) => i.x));
2668
+ const pageWidth = _chunkGZ7W64QUcjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunkGZ7W64QUcjs.safeMin.call(void 0, allItems.map((i) => i.x));
2669
2669
  if (pageWidth < 100) return null;
2670
2670
  let bigoLineIdx = -1;
2671
2671
  for (let i = 0; i < yLines.length; i++) {
@@ -3113,7 +3113,7 @@ function extractBlocksWithGrids(items, pageNum, grids, horizontals, verticals) {
3113
3113
  let finalTextBlocks = [];
3114
3114
  if (remaining.length > 0) {
3115
3115
  const allY = remaining.map((i) => i.y);
3116
- const pageH = _chunkHH4SD5REcjs.safeMax.call(void 0, allY) - _chunkHH4SD5REcjs.safeMin.call(void 0, allY);
3116
+ const pageH = _chunkGZ7W64QUcjs.safeMax.call(void 0, allY) - _chunkGZ7W64QUcjs.safeMin.call(void 0, allY);
3117
3117
  const groups = xyCutOrder(remaining, Math.max(15, pageH * 0.03));
3118
3118
  const textBlocks = [];
3119
3119
  for (const group of groups) {
@@ -3301,7 +3301,7 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false) {
3301
3301
  blocks.push({ type: "paragraph", text: tableText, pageNumber: pageNum, bbox, style: dominantStyle(items) });
3302
3302
  } else {
3303
3303
  const allY = items.map((i) => i.y);
3304
- const pageHeight = _chunkHH4SD5REcjs.safeMax.call(void 0, allY) - _chunkHH4SD5REcjs.safeMin.call(void 0, allY);
3304
+ const pageHeight = _chunkGZ7W64QUcjs.safeMax.call(void 0, allY) - _chunkGZ7W64QUcjs.safeMin.call(void 0, allY);
3305
3305
  const gapThreshold = Math.max(15, pageHeight * 0.03);
3306
3306
  const orderedGroups = proseCutX !== null ? splitTwoColumnProse(items, proseCutX) : xyCutOrder(items, gapThreshold);
3307
3307
  for (const group of orderedGroups) {
@@ -3340,4 +3340,4 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false) {
3340
3340
 
3341
3341
 
3342
3342
  exports.extractImageRegions = extractImageRegions; exports.filterHiddenText = filterHiddenText; exports.collapseEvenSpacing = collapseEvenSpacing; exports.normalizeItems = normalizeItems; exports.computeMedianFontSizeFromFreq = computeMedianFontSizeFromFreq; exports.detectHeadings = detectHeadings; exports.detectMarkerHeadings = detectMarkerHeadings; exports.detectTableCaptions = detectTableCaptions; exports.detectKoreanListBlocks = detectKoreanListBlocks; exports.removeHeaderFooterBlocks = removeHeaderFooterBlocks; exports.extractPageBlocksWithLines = extractPageBlocksWithLines; exports.mergeCrossPageTables = mergeCrossPageTables;
3343
- //# sourceMappingURL=chunk-RS5OID2J.cjs.map
3343
+ //# sourceMappingURL=chunk-4ZWKFDUC.cjs.map