kordoc 4.3.0 → 4.4.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.
Files changed (169) hide show
  1. package/NOTICE +176 -0
  2. package/README.md +936 -922
  3. package/THIRD_PARTY/apache-2.0.LICENSE +201 -0
  4. package/THIRD_PARTY/claw-hwp.LICENSE +21 -0
  5. package/THIRD_PARTY/hml-equation-parser.LICENSE +201 -0
  6. package/THIRD_PARTY/hml-equation-parser.txt +35 -0
  7. package/THIRD_PARTY/opendataloader-pdf.txt +32 -0
  8. package/THIRD_PARTY/pix2text.txt +17 -0
  9. package/THIRD_PARTY/rhwp-forms.txt +35 -0
  10. package/dist/{-DYHT3HWH.js → -R6NUMPRV.js} +11 -11
  11. package/dist/{chunk-3FFPHTXD.js → chunk-3H5X63BQ.js} +1 -1
  12. package/dist/chunk-3H5X63BQ.js.map +1 -0
  13. package/dist/{chunk-EFVAY5VE.js → chunk-5KLE3U23.js} +7 -4
  14. package/dist/chunk-5KLE3U23.js.map +1 -0
  15. package/dist/{chunk-6GBLFQMA.js → chunk-5RPYBC2Q.js} +1 -1
  16. package/dist/chunk-5RPYBC2Q.js.map +1 -0
  17. package/dist/{chunk-VXMLENCV.js → chunk-65DYCXGC.js} +4 -4
  18. package/dist/chunk-65DYCXGC.js.map +1 -0
  19. package/dist/{chunk-W34QSJFF.js → chunk-7FCNOKOR.js} +1 -1
  20. package/dist/chunk-7FCNOKOR.js.map +1 -0
  21. package/dist/{chunk-ZSL6MQVE.js → chunk-A73RMJ6B.js} +1 -1
  22. package/dist/chunk-A73RMJ6B.js.map +1 -0
  23. package/dist/{chunk-AL34DGS5.cjs → chunk-AB322K3O.cjs} +6 -6
  24. package/dist/chunk-AB322K3O.cjs.map +1 -0
  25. package/dist/chunk-DCZVOIEO.cjs.map +1 -1
  26. package/dist/{chunk-O5EK52TG.js → chunk-DZIXKL7E.js} +1 -1
  27. package/dist/chunk-DZIXKL7E.js.map +1 -0
  28. package/dist/{chunk-EZHW3RNQ.js → chunk-GHGZU2LQ.js} +2 -2
  29. package/dist/chunk-GHGZU2LQ.js.map +1 -0
  30. package/dist/chunk-GS7T56RP.cjs.map +1 -1
  31. package/dist/{chunk-6XPXIG57.js → chunk-GZDOWYJM.js} +2 -2
  32. package/dist/chunk-GZDOWYJM.js.map +1 -0
  33. package/dist/{chunk-JFV7QT5T.cjs → chunk-H2KMJOB6.cjs} +2 -2
  34. package/dist/chunk-H2KMJOB6.cjs.map +1 -0
  35. package/dist/{chunk-6RAYTNQT.js → chunk-HFJF477F.js} +3 -3
  36. package/dist/chunk-HFJF477F.js.map +1 -0
  37. package/dist/{chunk-SPKBIFSK.js → chunk-HNRULYUH.js} +2 -2
  38. package/dist/chunk-HNRULYUH.js.map +1 -0
  39. package/dist/chunk-MOL7MDBG.js +0 -0
  40. package/dist/{chunk-7MFO4TKP.js → chunk-ONS7JKVA.js} +2 -2
  41. package/dist/chunk-ONS7JKVA.js.map +1 -0
  42. package/dist/{chunk-DRQUAYNT.js → chunk-P7YPCK7C.js} +2 -2
  43. package/dist/chunk-P7YPCK7C.js.map +1 -0
  44. package/dist/{chunk-GSMPTZC7.js → chunk-QXYB74QF.js} +24 -3
  45. package/dist/chunk-QXYB74QF.js.map +1 -0
  46. package/dist/{chunk-NMWXBJ5B.js → chunk-RZURSA4N.js} +6 -4
  47. package/dist/chunk-RZURSA4N.js.map +1 -0
  48. package/dist/{chunk-LPQWKQQQ.cjs → chunk-SKM6KZUH.cjs} +9 -9
  49. package/dist/chunk-SKM6KZUH.cjs.map +1 -0
  50. package/dist/{chunk-YNJDNP44.js → chunk-UAFSPWU7.js} +1 -1
  51. package/dist/chunk-UAFSPWU7.js.map +1 -0
  52. package/dist/{chunk-AUOEZKJE.cjs → chunk-UDGPM5R5.cjs} +26 -5
  53. package/dist/chunk-UDGPM5R5.cjs.map +1 -0
  54. package/dist/{chunk-WFOQFJI4.js → chunk-V35DRUJC.js} +2 -2
  55. package/dist/chunk-V35DRUJC.js.map +1 -0
  56. package/dist/{chunk-4DBCUF3C.js → chunk-W6CUD7V3.js} +3 -3
  57. package/dist/chunk-W6CUD7V3.js.map +1 -0
  58. package/dist/{chunk-US4WFSIQ.js → chunk-XCIC7U6Y.js} +24 -3
  59. package/dist/chunk-XCIC7U6Y.js.map +1 -0
  60. package/dist/{chunk-DRZUJ2RK.js → chunk-YOZ7ZRCD.js} +366 -51
  61. package/dist/chunk-YOZ7ZRCD.js.map +1 -0
  62. package/dist/{chunk-ARXNKC5D.js → chunk-YVYU267E.js} +3 -3
  63. package/dist/chunk-YVYU267E.js.map +1 -0
  64. package/dist/{chunk-MGGU3ZRK.cjs → chunk-ZV5OKQ3Z.cjs} +1 -1
  65. package/dist/chunk-ZV5OKQ3Z.cjs.map +1 -0
  66. package/dist/chunks-QMGCI5DG.js +10 -0
  67. package/dist/cli.js +28 -24
  68. package/dist/cli.js.map +1 -1
  69. package/dist/{formula-IWV5IJ3Y.cjs → formula-CG4S7TWO.cjs} +8 -8
  70. package/dist/formula-CG4S7TWO.cjs.map +1 -0
  71. package/dist/{formula-7ZPC54JO.js → formula-JLYS73QL.js} +2 -2
  72. package/dist/formula-JLYS73QL.js.map +1 -0
  73. package/dist/{formula-EQRHSMYW.js → formula-LIVQSCMM.js} +2 -2
  74. package/dist/formula-LIVQSCMM.js.map +1 -0
  75. package/dist/{image-ocr-XEJFXH6M.cjs → image-ocr-F2BQA26V.cjs} +11 -11
  76. package/dist/image-ocr-F2BQA26V.cjs.map +1 -0
  77. package/dist/{image-ocr-G2LYTEUH.js → image-ocr-U2DRRFL3.js} +5 -5
  78. package/dist/image-ocr-U2DRRFL3.js.map +1 -0
  79. package/dist/{image-ocr-R44RYDBU.js → image-ocr-XC52AQDV.js} +7 -7
  80. package/dist/image-ocr-XC52AQDV.js.map +1 -0
  81. package/dist/index.cjs +858 -537
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.cts +7 -0
  84. package/dist/index.d.ts +7 -0
  85. package/dist/index.js +373 -52
  86. package/dist/index.js.map +1 -1
  87. package/dist/mcp.js +24 -22
  88. package/dist/mcp.js.map +1 -1
  89. package/dist/{models-6VMAVZR6.js → models-6SIKLKRH.js} +3 -3
  90. package/dist/page-range-737B4EZW.js +0 -0
  91. package/dist/page-range-P7SDW6LR.cjs.map +1 -1
  92. package/dist/{parser-W3POOYQQ.js → parser-ESGFWWCT.js} +8 -8
  93. package/dist/parser-ESGFWWCT.js.map +1 -0
  94. package/dist/{parser-W3ZGQUCQ.cjs → parser-FFQN67O6.cjs} +25 -25
  95. package/dist/parser-FFQN67O6.cjs.map +1 -0
  96. package/dist/{parser-2G245MMN.js → parser-TFPGQWCC.js} +6 -6
  97. package/dist/parser-TFPGQWCC.js.map +1 -0
  98. package/dist/pdf-ocr-4R646OO6.js +12 -0
  99. package/dist/pdf-ocr-UQBZH3HE.cjs +13 -0
  100. package/dist/pdf-ocr-UQBZH3HE.cjs.map +1 -0
  101. package/dist/pdf-ocr-WE5TMRFU.js +15 -0
  102. package/dist/{profile-io-72R3B7KO.js → profile-io-O6BDCUJN.js} +3 -3
  103. package/dist/{rasterize-GNJQVURE.js → rasterize-V22VCCE7.js} +2 -2
  104. package/dist/rasterize-V22VCCE7.js.map +1 -0
  105. package/dist/{redact-W5K3ILQH.js → redact-7ILEAUTS.js} +2 -2
  106. package/dist/render-3BSVTTZE.js +10 -0
  107. package/dist/seal-6ZSEJVOD.js +10 -0
  108. package/dist/{setup-I4I75QJU.js → setup-GUQT5ELJ.js} +1 -1
  109. package/dist/setup-GUQT5ELJ.js.map +1 -0
  110. package/dist/{watch-2ADAJLIJ.js → watch-HGKBICED.js} +11 -11
  111. package/dist/watch-HGKBICED.js.map +1 -0
  112. package/package.json +103 -101
  113. package/templates//352/260/204/354/235/264/352/270/260/354/225/210/353/254/270_/354/230/210/354/213/234/352/260/222.json +9 -9
  114. package/templates//354/235/274/353/260/230/352/270/260/354/225/210/353/254/270_/354/204/234/354/213/235.hwpx +0 -0
  115. package/templates//354/235/274/353/260/230/352/270/260/354/225/210/353/254/270_/354/230/210/354/213/234/352/260/222.json +24 -24
  116. package/dist/chunk-3FFPHTXD.js.map +0 -1
  117. package/dist/chunk-4DBCUF3C.js.map +0 -1
  118. package/dist/chunk-6GBLFQMA.js.map +0 -1
  119. package/dist/chunk-6RAYTNQT.js.map +0 -1
  120. package/dist/chunk-6XPXIG57.js.map +0 -1
  121. package/dist/chunk-7MFO4TKP.js.map +0 -1
  122. package/dist/chunk-AL34DGS5.cjs.map +0 -1
  123. package/dist/chunk-ARXNKC5D.js.map +0 -1
  124. package/dist/chunk-AUOEZKJE.cjs.map +0 -1
  125. package/dist/chunk-DRQUAYNT.js.map +0 -1
  126. package/dist/chunk-DRZUJ2RK.js.map +0 -1
  127. package/dist/chunk-EFVAY5VE.js.map +0 -1
  128. package/dist/chunk-EZHW3RNQ.js.map +0 -1
  129. package/dist/chunk-GSMPTZC7.js.map +0 -1
  130. package/dist/chunk-JFV7QT5T.cjs.map +0 -1
  131. package/dist/chunk-LPQWKQQQ.cjs.map +0 -1
  132. package/dist/chunk-MGGU3ZRK.cjs.map +0 -1
  133. package/dist/chunk-NMWXBJ5B.js.map +0 -1
  134. package/dist/chunk-O5EK52TG.js.map +0 -1
  135. package/dist/chunk-SPKBIFSK.js.map +0 -1
  136. package/dist/chunk-US4WFSIQ.js.map +0 -1
  137. package/dist/chunk-VXMLENCV.js.map +0 -1
  138. package/dist/chunk-W34QSJFF.js.map +0 -1
  139. package/dist/chunk-WFOQFJI4.js.map +0 -1
  140. package/dist/chunk-YNJDNP44.js.map +0 -1
  141. package/dist/chunk-ZSL6MQVE.js.map +0 -1
  142. package/dist/chunks-Q7T4SQGW.js +0 -10
  143. package/dist/formula-7ZPC54JO.js.map +0 -1
  144. package/dist/formula-EQRHSMYW.js.map +0 -1
  145. package/dist/formula-IWV5IJ3Y.cjs.map +0 -1
  146. package/dist/image-ocr-G2LYTEUH.js.map +0 -1
  147. package/dist/image-ocr-R44RYDBU.js.map +0 -1
  148. package/dist/image-ocr-XEJFXH6M.cjs.map +0 -1
  149. package/dist/parser-2G245MMN.js.map +0 -1
  150. package/dist/parser-W3POOYQQ.js.map +0 -1
  151. package/dist/parser-W3ZGQUCQ.cjs.map +0 -1
  152. package/dist/pdf-ocr-3GDTJSHF.js +0 -15
  153. package/dist/pdf-ocr-N7IU23UV.cjs +0 -13
  154. package/dist/pdf-ocr-N7IU23UV.cjs.map +0 -1
  155. package/dist/pdf-ocr-U7MEGNBZ.js +0 -12
  156. package/dist/rasterize-GNJQVURE.js.map +0 -1
  157. package/dist/render-6OW6U4L4.js +0 -10
  158. package/dist/seal-GTNLVBJX.js +0 -10
  159. package/dist/setup-I4I75QJU.js.map +0 -1
  160. package/dist/watch-2ADAJLIJ.js.map +0 -1
  161. /package/dist/{-DYHT3HWH.js.map → -R6NUMPRV.js.map} +0 -0
  162. /package/dist/{chunks-Q7T4SQGW.js.map → chunks-QMGCI5DG.js.map} +0 -0
  163. /package/dist/{models-6VMAVZR6.js.map → models-6SIKLKRH.js.map} +0 -0
  164. /package/dist/{pdf-ocr-3GDTJSHF.js.map → pdf-ocr-4R646OO6.js.map} +0 -0
  165. /package/dist/{pdf-ocr-U7MEGNBZ.js.map → pdf-ocr-WE5TMRFU.js.map} +0 -0
  166. /package/dist/{profile-io-72R3B7KO.js.map → profile-io-O6BDCUJN.js.map} +0 -0
  167. /package/dist/{redact-W5K3ILQH.js.map → redact-7ILEAUTS.js.map} +0 -0
  168. /package/dist/{render-6OW6U4L4.js.map → render-3BSVTTZE.js.map} +0 -0
  169. /package/dist/{seal-GTNLVBJX.js.map → seal-6ZSEJVOD.js.map} +0 -0
package/NOTICE ADDED
@@ -0,0 +1,176 @@
1
+ kordoc
2
+ Copyright 2026 chrisryugj
3
+ Licensed under the MIT License
4
+
5
+ This project includes code derived from the following third-party works:
6
+
7
+ ================================================================================
8
+
9
+ OpenDataLoader PDF (opendataloader-pdf)
10
+ https://github.com/opendataloader-project/opendataloader-pdf
11
+
12
+ Copyright 2025-2026 Hancom, Inc.
13
+ Licensed under the Apache License, Version 2.0
14
+
15
+ Used in:
16
+ - src/pdf/line-detector.ts — TableBorderBuilder algorithm (line-based table
17
+ detection via PDF graphics commands, grid construction from line intersections)
18
+ - src/pdf/cluster-detector.ts — ClusterTableConsumer algorithm (cluster-based
19
+ borderless table detection via text alignment patterns)
20
+
21
+ Modifications:
22
+ - TypeScript rewrite from Java/Kotlin
23
+ - pdfjs-dist v4/v5 compatibility layer
24
+ - Korean PDF-specific optimizations (character spacing, cell text merging)
25
+
26
+ You may obtain a copy of the Apache License at:
27
+ http://www.apache.org/licenses/LICENSE-2.0
28
+
29
+ ================================================================================
30
+
31
+ hml-equation-parser
32
+ https://github.com/OpenBapul/hml-equation-parser
33
+
34
+ Copyright 2018 Open Bapul
35
+ Licensed under the Apache License, Version 2.0
36
+
37
+ Used in:
38
+ - src/hwpx/equation.ts — hmlToLatex() (HULK-style HWPX equation script →
39
+ LaTeX) derived from hulkEqParser.py and hulkReplaceMethod.py
40
+
41
+ Modifications:
42
+ - TypeScript rewrite from Python 3
43
+ - Inlined convertMap.json as TS constants
44
+ - Graceful error handling so failed conversion drops the equation rather
45
+ than leaking the HWP alt-text ("수식입니다") through the document
46
+
47
+ See THIRD_PARTY/hml-equation-parser.LICENSE for the full license text.
48
+
49
+ You may obtain a copy of the Apache License at:
50
+ http://www.apache.org/licenses/LICENSE-2.0
51
+
52
+ ================================================================================
53
+
54
+ cfb (Compound File Binary)
55
+ https://github.com/SheetJS/js-cfb
56
+
57
+ Copyright 2013-present SheetJS LLC
58
+ Licensed under the Apache License, Version 2.0
59
+
60
+ Used as a dependency for HWP 5.x OLE2 container parsing.
61
+ No modifications — used as a bundled npm package.
62
+
63
+ ================================================================================
64
+
65
+ pdfjs-dist (PDF.js)
66
+ https://github.com/mozilla/pdf.js
67
+
68
+ Copyright Mozilla Foundation
69
+ Licensed under the Apache License, Version 2.0
70
+
71
+ Used as an optional peer dependency for PDF text extraction.
72
+ No modifications — used as an npm package.
73
+
74
+ ================================================================================
75
+
76
+ JSZip
77
+ https://github.com/Stuk/jszip
78
+
79
+ Copyright 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, Antonio Afonso
80
+ Dual-licensed under the MIT License OR GPL-3.0-or-later
81
+ This project uses JSZip under the MIT License.
82
+
83
+ Used for ZIP-based format parsing (HWPX, XLSX, DOCX).
84
+ No modifications — used as an npm package.
85
+
86
+ ================================================================================
87
+
88
+ rhwp
89
+ https://github.com/edwardkim/rhwp
90
+
91
+ Copyright edwardkim
92
+ Licensed under the MIT License
93
+
94
+ Used in:
95
+ - src/hwp5/cfb-lenient.ts — LenientCfbReader algorithm (FAT/directory/mini-stream
96
+ parsing for corrupted CFB containers)
97
+ - src/hwp5/crypto.ts — Distribution document decryption algorithm (AES key
98
+ extraction from MSVC LCG-scrambled payload)
99
+
100
+ Modifications:
101
+ - TypeScript rewrite from Rust
102
+ - Added sector size validation, chain length limits, and cycle detection
103
+ - Pure JS AES-128 ECB implementation (no native dependency)
104
+
105
+ ================================================================================
106
+
107
+ Pix2Text — Mathematical Formula Detection & Recognition
108
+ https://github.com/breezedeus/Pix2Text
109
+
110
+ Copyright 2023-2024 breezedeus
111
+ MFD (Mathematical Formula Detection): trained on Ultralytics YOLOv8 — MFD model
112
+ weights themselves are distributed under MIT via the HuggingFace repository
113
+ `breezedeus/pix2text-mfd`, but the underlying YOLOv8 architecture carries an
114
+ AGPL-3.0 license from Ultralytics. Users distributing derivative works built on
115
+ MFD outputs should review Ultralytics' licensing terms.
116
+ MFR (Mathematical Formula Recognition): HuggingFace `breezedeus/pix2text-mfr`,
117
+ MIT License.
118
+
119
+ Used in:
120
+ - src/pdf/formula/detector.ts — YOLOv8 letterbox preprocessing, NMS post-processing
121
+ - src/pdf/formula/recognizer.ts — DeiT encoder + TrOCR decoder greedy decoding
122
+ - src/pdf/formula/postprocess.ts — LaTeX output cleanup (derived from Pix2Text
123
+ `latex_ocr.py` post_process)
124
+
125
+ Models are downloaded at runtime from HuggingFace with SHA-256 verification.
126
+ No model weights are redistributed with this package. Algorithm implementations
127
+ are original TypeScript ports referencing the Pix2Text algorithm descriptions.
128
+
129
+ You may obtain a copy of the MIT License at:
130
+ https://opensource.org/licenses/MIT
131
+
132
+ ================================================================================
133
+
134
+ PaddleOCR / PP-OCRv5 — Text Detection & Recognition Models
135
+ https://github.com/PaddlePaddle/PaddleOCR
136
+
137
+ Copyright PaddlePaddle Authors
138
+ Licensed under the Apache License, Version 2.0
139
+
140
+ Model weights (ONNX conversions, downloaded at runtime with SHA-256 verification,
141
+ not redistributed with this package):
142
+ - PP-OCRv5_mobile_det (HuggingFace `PaddlePaddle/PP-OCRv5_mobile_det_onnx`)
143
+ - korean_PP-OCRv5_mobile_rec + character dictionary
144
+ (HuggingFace `PaddlePaddle/korean_PP-OCRv5_mobile_rec_onnx`)
145
+
146
+ Used in:
147
+ - src/ocr/engine.ts — DBNet det pre/post-processing (resize_long 960, thresh/
148
+ box_thresh/unclip per official inference.yml; DB unclip approximated with
149
+ axis-aligned component boxes) + CTC greedy decoding, following the PaddleOCR
150
+ inference operator specifications. Original TypeScript implementation.
151
+ - src/ocr/models.ts — model specs + inference.yml character_dict parser
152
+
153
+ You may obtain a copy of the Apache License 2.0 at:
154
+ https://www.apache.org/licenses/LICENSE-2.0
155
+
156
+ ================================================================================
157
+
158
+ claw-hwp
159
+ https://github.com/DoHyun468/claw-hwp
160
+
161
+ Copyright (c) 2026 DoHyun468
162
+ Licensed under the MIT License
163
+
164
+ Used in:
165
+ - src/hwpx/chart-gen.ts — OOXML chartSpace 조립(buildChartSpace)·차트 타입 20종
166
+ 테이블·계열/축/색 XML 생성을 hwpx-edit.js에서 TS로 이식 (한컴독스 GT 검증 구현)
167
+ - src/form/seal.ts — 도장 부유 배치의 폰트 메트릭 위치 산정(전각/반각 em 폭,
168
+ 정렬 이동 보정)과 부유 개체 속성 규칙(treatAsChar=0 + flowWithText=0 +
169
+ allowOverlap=1)을 cell-patch.js placeSealInPlace에서 이식
170
+ - src/form/match.ts — secure-fill 포맷엔진과 require_occurrence 규칙 이식
171
+ - src/validate.ts — validate.py 의 실측 검사셋 이식
172
+
173
+ 라이선스 전문: THIRD_PARTY/claw-hwp.LICENSE
174
+
175
+ You may obtain a copy of the MIT License at:
176
+ https://opensource.org/licenses/MIT