kordoc 4.24.49 → 4.24.50
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 +3 -3
- package/dist/{-22V6D2US.js → -C2A4JYBB.js} +42 -42
- package/dist/{chunk-R2RLNUNK.js → chunk-3HX37NQI.js} +6 -6
- package/dist/{chunk-IRAZCKQ6.cjs → chunk-4H2CKUZC.cjs} +3 -3
- package/dist/{chunk-IRAZCKQ6.cjs.map → chunk-4H2CKUZC.cjs.map} +1 -1
- package/dist/{chunk-EUJX7HTR.js → chunk-5HFHRDXF.js} +9 -9
- package/dist/{chunk-EUJX7HTR.js.map → chunk-5HFHRDXF.js.map} +1 -1
- package/dist/{chunk-Y4MFHEK4.cjs → chunk-5R65VE7S.cjs} +3 -3
- package/dist/{chunk-Y4MFHEK4.cjs.map → chunk-5R65VE7S.cjs.map} +1 -1
- package/dist/{chunk-UU54HN5I.js → chunk-6X5OZ32D.js} +5 -5
- package/dist/{chunk-7KKL3PRK.js → chunk-7TFSVTEI.js} +12 -4
- package/dist/chunk-7TFSVTEI.js.map +1 -0
- package/dist/{chunk-S54DZB2Z.js → chunk-CFN65SO4.js} +47 -4
- package/dist/chunk-CFN65SO4.js.map +1 -0
- package/dist/{chunk-OAETOHH3.js → chunk-CV7R6GFL.js} +3 -3
- package/dist/{chunk-M5RQ2PNP.js → chunk-DWLDRIUW.js} +14 -6
- package/dist/chunk-DWLDRIUW.js.map +1 -0
- package/dist/{chunk-67GSFYG7.js → chunk-EEXZI6FB.js} +2 -2
- package/dist/{chunk-367WLMPO.cjs → chunk-FMY77Z2C.cjs} +65 -57
- package/dist/chunk-FMY77Z2C.cjs.map +1 -0
- package/dist/{chunk-DAAJO62F.js → chunk-FTUYGBVA.js} +2 -2
- package/dist/{chunk-HW7WVYBF.js → chunk-G3COIDD5.js} +2 -2
- package/dist/{chunk-LOSCIAHY.js → chunk-H5WXX55M.js} +2 -2
- package/dist/{chunk-HETGOJ6V.js → chunk-JLXFH46H.js} +2 -2
- package/dist/{chunk-RQLEGKEV.js → chunk-KKVUDW3R.js} +2 -2
- package/dist/{chunk-AUAJVQQK.js → chunk-LJP2C7HY.js} +2 -2
- package/dist/{chunk-CCQMSIZQ.js → chunk-MFHYWNRB.js} +19 -19
- package/dist/{chunk-4MWUBTAE.js → chunk-MGASIGAK.js} +2 -2
- package/dist/{chunk-TQOAPKLU.cjs → chunk-NTTH2JV3.cjs} +6 -6
- package/dist/{chunk-TQOAPKLU.cjs.map → chunk-NTTH2JV3.cjs.map} +1 -1
- package/dist/{chunk-TAHS42ED.js → chunk-O3LGWNKF.js} +10 -10
- package/dist/{chunk-TAHS42ED.js.map → chunk-O3LGWNKF.js.map} +1 -1
- package/dist/{chunk-EYSXMDA7.js → chunk-PSUE7IEJ.js} +17 -17
- package/dist/{chunk-WLFZOBZR.js → chunk-R2KOKVE6.js} +3 -3
- package/dist/{chunk-UBY2PLKR.cjs → chunk-R34M3KZ5.cjs} +31 -31
- package/dist/{chunk-UBY2PLKR.cjs.map → chunk-R34M3KZ5.cjs.map} +1 -1
- package/dist/{chunk-ZF24SO45.js → chunk-RFMTK6QQ.js} +2 -2
- package/dist/{chunk-LCRSRVFJ.js → chunk-SAJPPKP6.js} +2 -2
- package/dist/{chunk-PVV6OY4M.cjs → chunk-SBNHRZX5.cjs} +139 -96
- package/dist/chunk-SBNHRZX5.cjs.map +1 -0
- package/dist/{chunk-L3JP55ZY.js → chunk-SFNUS2L2.js} +2 -2
- package/dist/{chunk-4HJKBRZJ.js → chunk-SHPWOK54.js} +18 -18
- package/dist/{chunk-PMGJQWSW.js → chunk-SSITTA7K.js} +2 -2
- package/dist/{chunk-Q7FDPJUS.js → chunk-TAVJD44R.js} +10 -10
- package/dist/{chunk-VMOUAWGD.js → chunk-TBVTRCQO.js} +7 -7
- package/dist/{chunk-KXHUHGMC.js → chunk-UGVLPUEO.js} +2 -2
- package/dist/{chunk-AXW2FMVR.js → chunk-UHNUEHHP.js} +2 -2
- package/dist/{chunk-2UWWWM4Q.cjs → chunk-ULZEBO6D.cjs} +98 -98
- package/dist/{chunk-2UWWWM4Q.cjs.map → chunk-ULZEBO6D.cjs.map} +1 -1
- package/dist/{chunk-6BFWLS7E.js → chunk-WI5QVMJ2.js} +3 -3
- package/dist/{chunk-Y6QW3FJQ.js → chunk-WJZJYJCP.js} +2 -2
- package/dist/{chunk-MLBX6KQM.js → chunk-XKGH2UJU.js} +2 -2
- package/dist/{chunk-PW7MQZI4.cjs → chunk-XOL2UOIW.cjs} +2 -2
- package/dist/{chunk-PW7MQZI4.cjs.map → chunk-XOL2UOIW.cjs.map} +1 -1
- package/dist/{chunk-KB4ORA7M.js → chunk-YJJGETLN.js} +2 -2
- package/dist/{chunk-DA5AXURC.js → chunk-YV27LZOV.js} +48 -5
- package/dist/chunk-YV27LZOV.js.map +1 -0
- package/dist/{chunk-LFFARZYZ.js → chunk-YXG74TXU.js} +2 -2
- package/dist/{chunk-MIJTZKWF.js → chunk-ZYMXAFG6.js} +2 -2
- package/dist/chunks-2XOX7XKP.js +11 -0
- package/dist/cli.js +52 -51
- package/dist/cli.js.map +1 -1
- package/dist/{formula-BYEDWWZU.js → formula-CSMUW37Z.js} +4 -4
- package/dist/{formula-QJEOIVKR.cjs → formula-MQDZV5BS.cjs} +9 -9
- package/dist/{formula-QJEOIVKR.cjs.map → formula-MQDZV5BS.cjs.map} +1 -1
- package/dist/{formula-FQLMMBDP.js → formula-NEZQU4VT.js} +3 -3
- package/dist/generator-J2I6FY5A.js +17 -0
- package/dist/generator-U6KPAHRC.cjs +11 -0
- package/dist/{generator-FTM6GOGB.cjs.map → generator-U6KPAHRC.cjs.map} +1 -1
- package/dist/generator-V7WALYIG.js +10 -0
- package/dist/hancom-44AG42NH.js +85 -0
- package/dist/hancom-44AG42NH.js.map +1 -0
- package/dist/hancom-ICXEFG55.js +84 -0
- package/dist/hancom-ICXEFG55.js.map +1 -0
- package/dist/hancom-R7UQ45EN.cjs +85 -0
- package/dist/hancom-R7UQ45EN.cjs.map +1 -0
- package/dist/{image-ocr-VIGZE4YL.js → image-ocr-EDD2FWK3.js} +7 -7
- package/dist/{image-ocr-7Y3FCGRR.js → image-ocr-KGEUPOG5.js} +10 -10
- package/dist/{image-ocr-WRILL3WO.cjs → image-ocr-VVLMGTRH.cjs} +28 -28
- package/dist/{image-ocr-WRILL3WO.cjs.map → image-ocr-VVLMGTRH.cjs.map} +1 -1
- package/dist/index.cjs +1116 -1116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +72 -72
- package/dist/mcp.js +42 -41
- package/dist/mcp.js.map +1 -1
- package/dist/memo-HW332L2B.js +17 -0
- package/dist/{model-bundle-UJRQPYUU.js → model-bundle-JQBHF6XK.js} +5 -5
- package/dist/{models-64YLAWTI.js → models-YWD5GLFW.js} +5 -5
- package/dist/{parse-worker-v2-QWQZKFQO.js → parse-worker-v2-NXKUXGGX.js} +23 -23
- package/dist/{parser-XFU3VRWM.js → parser-5E4Z3ME5.js} +16 -16
- package/dist/{parser-JPWANPLM.js → parser-FPBBI4AE.js} +12 -12
- package/dist/{parser-RB6CBNAM.cjs → parser-W4MNQL73.cjs} +166 -166
- package/dist/{parser-RB6CBNAM.cjs.map → parser-W4MNQL73.cjs.map} +1 -1
- package/dist/{pdf-ocr-ZV3KYIIE.js → pdf-ocr-GHVGOTJG.js} +9 -9
- package/dist/pdf-ocr-SPAU33VI.cjs +42 -0
- package/dist/{pdf-ocr-NOJHEH4M.cjs.map → pdf-ocr-SPAU33VI.cjs.map} +1 -1
- package/dist/{pdf-ocr-XTZZEYKJ.js → pdf-ocr-ZXEEUV72.js} +6 -6
- package/dist/{profile-io-FAJORRD2.js → profile-io-RF7AHAZE.js} +3 -3
- package/dist/{rasterize-4ZJUA2DZ.js → rasterize-GJH24CGX.js} +3 -3
- package/dist/{redact-doc-JPNROEH6.js → redact-doc-W4DR6BTT.js} +29 -29
- package/dist/{render-D4WBOBKI.js → render-OLEQELZH.js} +12 -12
- package/dist/{rewrite-fallback-OF3QI6CX.js → rewrite-fallback-4MVCADX7.js} +13 -13
- package/dist/seal-JJLC6UDD.js +16 -0
- package/dist/{setup-YC25YCQB.js → setup-BMJI6RBB.js} +3 -3
- package/dist/to-hwpx-2Y5V456C.cjs +16 -0
- package/dist/{to-hwpx-LUA6F5RR.cjs.map → to-hwpx-2Y5V456C.cjs.map} +1 -1
- package/dist/{to-hwpx-ZWN64NCQ.js → to-hwpx-XHJFVCD4.js} +4 -4
- package/dist/{to-hwpx-D7OMPDUQ.js → to-hwpx-Z5WGF6YZ.js} +7 -7
- package/dist/visual-QGD23ZDN.js +37 -0
- package/dist/{watch-ZU576VSR.js → watch-F5TGSLKR.js} +23 -23
- package/package.json +1 -1
- package/dist/chunk-367WLMPO.cjs.map +0 -1
- package/dist/chunk-7KKL3PRK.js.map +0 -1
- package/dist/chunk-DA5AXURC.js.map +0 -1
- package/dist/chunk-M5RQ2PNP.js.map +0 -1
- package/dist/chunk-PVV6OY4M.cjs.map +0 -1
- package/dist/chunk-S54DZB2Z.js.map +0 -1
- package/dist/chunks-Q7242OJE.js +0 -11
- package/dist/generator-FTM6GOGB.cjs +0 -11
- package/dist/generator-Q3L7RNUY.js +0 -17
- package/dist/generator-SU73HZHR.js +0 -10
- package/dist/memo-T5ZQEXEA.js +0 -17
- package/dist/pdf-ocr-NOJHEH4M.cjs +0 -42
- package/dist/seal-DQWEHIAM.js +0 -16
- package/dist/to-hwpx-LUA6F5RR.cjs +0 -16
- package/dist/visual-SW7NPY6K.js +0 -37
- /package/dist/{-22V6D2US.js.map → -C2A4JYBB.js.map} +0 -0
- /package/dist/{chunk-R2RLNUNK.js.map → chunk-3HX37NQI.js.map} +0 -0
- /package/dist/{chunk-UU54HN5I.js.map → chunk-6X5OZ32D.js.map} +0 -0
- /package/dist/{chunk-OAETOHH3.js.map → chunk-CV7R6GFL.js.map} +0 -0
- /package/dist/{chunk-67GSFYG7.js.map → chunk-EEXZI6FB.js.map} +0 -0
- /package/dist/{chunk-DAAJO62F.js.map → chunk-FTUYGBVA.js.map} +0 -0
- /package/dist/{chunk-HW7WVYBF.js.map → chunk-G3COIDD5.js.map} +0 -0
- /package/dist/{chunk-LOSCIAHY.js.map → chunk-H5WXX55M.js.map} +0 -0
- /package/dist/{chunk-HETGOJ6V.js.map → chunk-JLXFH46H.js.map} +0 -0
- /package/dist/{chunk-RQLEGKEV.js.map → chunk-KKVUDW3R.js.map} +0 -0
- /package/dist/{chunk-AUAJVQQK.js.map → chunk-LJP2C7HY.js.map} +0 -0
- /package/dist/{chunk-CCQMSIZQ.js.map → chunk-MFHYWNRB.js.map} +0 -0
- /package/dist/{chunk-4MWUBTAE.js.map → chunk-MGASIGAK.js.map} +0 -0
- /package/dist/{chunk-EYSXMDA7.js.map → chunk-PSUE7IEJ.js.map} +0 -0
- /package/dist/{chunk-WLFZOBZR.js.map → chunk-R2KOKVE6.js.map} +0 -0
- /package/dist/{chunk-ZF24SO45.js.map → chunk-RFMTK6QQ.js.map} +0 -0
- /package/dist/{chunk-LCRSRVFJ.js.map → chunk-SAJPPKP6.js.map} +0 -0
- /package/dist/{chunk-L3JP55ZY.js.map → chunk-SFNUS2L2.js.map} +0 -0
- /package/dist/{chunk-4HJKBRZJ.js.map → chunk-SHPWOK54.js.map} +0 -0
- /package/dist/{chunk-PMGJQWSW.js.map → chunk-SSITTA7K.js.map} +0 -0
- /package/dist/{chunk-Q7FDPJUS.js.map → chunk-TAVJD44R.js.map} +0 -0
- /package/dist/{chunk-VMOUAWGD.js.map → chunk-TBVTRCQO.js.map} +0 -0
- /package/dist/{chunk-KXHUHGMC.js.map → chunk-UGVLPUEO.js.map} +0 -0
- /package/dist/{chunk-AXW2FMVR.js.map → chunk-UHNUEHHP.js.map} +0 -0
- /package/dist/{chunk-6BFWLS7E.js.map → chunk-WI5QVMJ2.js.map} +0 -0
- /package/dist/{chunk-Y6QW3FJQ.js.map → chunk-WJZJYJCP.js.map} +0 -0
- /package/dist/{chunk-MLBX6KQM.js.map → chunk-XKGH2UJU.js.map} +0 -0
- /package/dist/{chunk-KB4ORA7M.js.map → chunk-YJJGETLN.js.map} +0 -0
- /package/dist/{chunk-LFFARZYZ.js.map → chunk-YXG74TXU.js.map} +0 -0
- /package/dist/{chunk-MIJTZKWF.js.map → chunk-ZYMXAFG6.js.map} +0 -0
- /package/dist/{chunks-Q7242OJE.js.map → chunks-2XOX7XKP.js.map} +0 -0
- /package/dist/{formula-BYEDWWZU.js.map → formula-CSMUW37Z.js.map} +0 -0
- /package/dist/{formula-FQLMMBDP.js.map → formula-NEZQU4VT.js.map} +0 -0
- /package/dist/{generator-Q3L7RNUY.js.map → generator-J2I6FY5A.js.map} +0 -0
- /package/dist/{generator-SU73HZHR.js.map → generator-V7WALYIG.js.map} +0 -0
- /package/dist/{image-ocr-VIGZE4YL.js.map → image-ocr-EDD2FWK3.js.map} +0 -0
- /package/dist/{image-ocr-7Y3FCGRR.js.map → image-ocr-KGEUPOG5.js.map} +0 -0
- /package/dist/{memo-T5ZQEXEA.js.map → memo-HW332L2B.js.map} +0 -0
- /package/dist/{model-bundle-UJRQPYUU.js.map → model-bundle-JQBHF6XK.js.map} +0 -0
- /package/dist/{models-64YLAWTI.js.map → models-YWD5GLFW.js.map} +0 -0
- /package/dist/{parse-worker-v2-QWQZKFQO.js.map → parse-worker-v2-NXKUXGGX.js.map} +0 -0
- /package/dist/{parser-XFU3VRWM.js.map → parser-5E4Z3ME5.js.map} +0 -0
- /package/dist/{parser-JPWANPLM.js.map → parser-FPBBI4AE.js.map} +0 -0
- /package/dist/{pdf-ocr-XTZZEYKJ.js.map → pdf-ocr-GHVGOTJG.js.map} +0 -0
- /package/dist/{pdf-ocr-ZV3KYIIE.js.map → pdf-ocr-ZXEEUV72.js.map} +0 -0
- /package/dist/{profile-io-FAJORRD2.js.map → profile-io-RF7AHAZE.js.map} +0 -0
- /package/dist/{rasterize-4ZJUA2DZ.js.map → rasterize-GJH24CGX.js.map} +0 -0
- /package/dist/{redact-doc-JPNROEH6.js.map → redact-doc-W4DR6BTT.js.map} +0 -0
- /package/dist/{render-D4WBOBKI.js.map → render-OLEQELZH.js.map} +0 -0
- /package/dist/{rewrite-fallback-OF3QI6CX.js.map → rewrite-fallback-4MVCADX7.js.map} +0 -0
- /package/dist/{seal-DQWEHIAM.js.map → seal-JJLC6UDD.js.map} +0 -0
- /package/dist/{setup-YC25YCQB.js.map → setup-BMJI6RBB.js.map} +0 -0
- /package/dist/{to-hwpx-D7OMPDUQ.js.map → to-hwpx-XHJFVCD4.js.map} +0 -0
- /package/dist/{to-hwpx-ZWN64NCQ.js.map → to-hwpx-Z5WGF6YZ.js.map} +0 -0
- /package/dist/{visual-SW7NPY6K.js.map → visual-QGD23ZDN.js.map} +0 -0
- /package/dist/{watch-ZU576VSR.js.map → watch-F5TGSLKR.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1686,14 +1686,17 @@ declare function markdownToHwpx(markdown: string, options?: MarkdownToHwpxOption
|
|
|
1686
1686
|
interface HwpToHwpxOptions {
|
|
1687
1687
|
/** 암호 문서의 열기 암호 */
|
|
1688
1688
|
password?: string;
|
|
1689
|
+
/** 변환 엔진 (convertToHwpx 만 본다). "kordoc"(기본): 자체 변환 — 어디서나. "hancom": 한/글 자체 저장(Windows + 한/글, 팝업 없이) —
|
|
1690
|
+
* HWP 3.x·HWPML 도 서식 그대로. "auto": 한/글이 있으면 hancom, 없으면 kordoc */
|
|
1691
|
+
engine?: "kordoc" | "hancom" | "auto";
|
|
1689
1692
|
}
|
|
1690
1693
|
declare function hwpToHwpx(input: Uint8Array | ArrayBuffer, options?: HwpToHwpxOptions): Promise<Uint8Array>;
|
|
1691
1694
|
interface ConvertToHwpxResult {
|
|
1692
1695
|
data: Uint8Array;
|
|
1693
1696
|
/** preserve: 서식 그대로(HWP 5.x), content: 글·표만 옮겨 kordoc 기본 서식으로(HWP 3.x 등) */
|
|
1694
1697
|
mode: "preserve" | "content";
|
|
1695
|
-
/**
|
|
1696
|
-
engine: "kordoc";
|
|
1698
|
+
/** 실제로 쓴 엔진 */
|
|
1699
|
+
engine: "kordoc" | "hancom";
|
|
1697
1700
|
warnings: string[];
|
|
1698
1701
|
}
|
|
1699
1702
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1686,14 +1686,17 @@ declare function markdownToHwpx(markdown: string, options?: MarkdownToHwpxOption
|
|
|
1686
1686
|
interface HwpToHwpxOptions {
|
|
1687
1687
|
/** 암호 문서의 열기 암호 */
|
|
1688
1688
|
password?: string;
|
|
1689
|
+
/** 변환 엔진 (convertToHwpx 만 본다). "kordoc"(기본): 자체 변환 — 어디서나. "hancom": 한/글 자체 저장(Windows + 한/글, 팝업 없이) —
|
|
1690
|
+
* HWP 3.x·HWPML 도 서식 그대로. "auto": 한/글이 있으면 hancom, 없으면 kordoc */
|
|
1691
|
+
engine?: "kordoc" | "hancom" | "auto";
|
|
1689
1692
|
}
|
|
1690
1693
|
declare function hwpToHwpx(input: Uint8Array | ArrayBuffer, options?: HwpToHwpxOptions): Promise<Uint8Array>;
|
|
1691
1694
|
interface ConvertToHwpxResult {
|
|
1692
1695
|
data: Uint8Array;
|
|
1693
1696
|
/** preserve: 서식 그대로(HWP 5.x), content: 글·표만 옮겨 kordoc 기본 서식으로(HWP 3.x 등) */
|
|
1694
1697
|
mode: "preserve" | "content";
|
|
1695
|
-
/**
|
|
1696
|
-
engine: "kordoc";
|
|
1698
|
+
/** 실제로 쓴 엔진 */
|
|
1699
|
+
engine: "kordoc" | "hancom";
|
|
1697
1700
|
warnings: string[];
|
|
1698
1701
|
}
|
|
1699
1702
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FLAG_COMPRESSED,
|
|
3
|
+
FLAG_DISTRIBUTION,
|
|
4
|
+
FLAG_DRM,
|
|
5
|
+
FLAG_ENCRYPTED,
|
|
6
|
+
FLAG_TRACK_CHANGES,
|
|
7
|
+
INLINE_TABLE_MARK,
|
|
8
|
+
TAG_CHAR_SHAPE,
|
|
9
|
+
TAG_CTRL_HEADER,
|
|
10
|
+
TAG_DOC_CHAR_SHAPE,
|
|
11
|
+
TAG_DOC_PARA_SHAPE,
|
|
12
|
+
TAG_FACE_NAME,
|
|
13
|
+
TAG_ID_MAPPINGS,
|
|
14
|
+
TAG_LIST_HEADER,
|
|
15
|
+
TAG_PARA_HEADER,
|
|
16
|
+
TAG_PARA_LINE_SEG,
|
|
17
|
+
TAG_PARA_TEXT,
|
|
18
|
+
TAG_SHAPE_COMPONENT,
|
|
19
|
+
TAG_SHAPE_COMPONENT_PICTURE,
|
|
20
|
+
TAG_TABLE,
|
|
21
|
+
appendParaText,
|
|
22
|
+
blocksPlainText,
|
|
23
|
+
buildAddressedTable,
|
|
24
|
+
cellTextFromBlocks,
|
|
25
|
+
convertToHwpx,
|
|
26
|
+
createParaTextState,
|
|
27
|
+
decompressStream,
|
|
28
|
+
detectImageMime,
|
|
29
|
+
emitParagraphBlocks,
|
|
30
|
+
fileTimeText,
|
|
31
|
+
formatNumber,
|
|
32
|
+
hasRealStrike,
|
|
33
|
+
hasRealUnderline,
|
|
34
|
+
hwpEquationToLatex,
|
|
35
|
+
hwpToHwpx,
|
|
36
|
+
indexHwp5Tables,
|
|
37
|
+
isClickHereGuideText,
|
|
38
|
+
isExtendedOnlyCtrlChar,
|
|
39
|
+
locateMemoBlocks,
|
|
40
|
+
memosMarkdown,
|
|
41
|
+
openHwp5Container,
|
|
42
|
+
parseDocInfo,
|
|
43
|
+
parseFileHeader,
|
|
44
|
+
parseHwp5Document,
|
|
45
|
+
readHwp5BinData,
|
|
46
|
+
readHwp5DocInfoRecords,
|
|
47
|
+
readHwp5SectionRecords,
|
|
48
|
+
readHwp5SectionStreams,
|
|
49
|
+
readRecords,
|
|
50
|
+
resolveImageBlocks,
|
|
51
|
+
unfilledClickHereGuide
|
|
52
|
+
} from "./chunk-7TFSVTEI.js";
|
|
1
53
|
import {
|
|
2
54
|
WEBP_OPTIONS,
|
|
3
55
|
blocksToPages,
|
|
4
56
|
loadSharp,
|
|
5
57
|
readImageQrCodes,
|
|
6
58
|
toBuffer
|
|
7
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-XKGH2UJU.js";
|
|
60
|
+
import {
|
|
61
|
+
MAX_PIXELS,
|
|
62
|
+
bmpToPng,
|
|
63
|
+
bmpToRgba,
|
|
64
|
+
inlineImagesIntoMarkdown
|
|
65
|
+
} from "./chunk-UJELMNOU.js";
|
|
66
|
+
import {
|
|
67
|
+
parsePageRange
|
|
68
|
+
} from "./chunk-V4BH5SRQ.js";
|
|
8
69
|
import {
|
|
9
70
|
detectFormat,
|
|
10
71
|
detectOle2Format,
|
|
@@ -14,6 +75,9 @@ import {
|
|
|
14
75
|
isPdfFile,
|
|
15
76
|
isZipFile
|
|
16
77
|
} from "./chunk-S6H3ZPYQ.js";
|
|
78
|
+
import {
|
|
79
|
+
parseLenientCfb
|
|
80
|
+
} from "./chunk-PDI54TF2.js";
|
|
17
81
|
import {
|
|
18
82
|
validateOcrOptions
|
|
19
83
|
} from "./chunk-TBGGAR7W.js";
|
|
@@ -171,71 +235,7 @@ import {
|
|
|
171
235
|
unescapeGfm,
|
|
172
236
|
unescapeGfmCell,
|
|
173
237
|
wordHunks
|
|
174
|
-
} from "./chunk-
|
|
175
|
-
import {
|
|
176
|
-
FLAG_COMPRESSED,
|
|
177
|
-
FLAG_DISTRIBUTION,
|
|
178
|
-
FLAG_DRM,
|
|
179
|
-
FLAG_ENCRYPTED,
|
|
180
|
-
FLAG_TRACK_CHANGES,
|
|
181
|
-
INLINE_TABLE_MARK,
|
|
182
|
-
TAG_CHAR_SHAPE,
|
|
183
|
-
TAG_CTRL_HEADER,
|
|
184
|
-
TAG_DOC_CHAR_SHAPE,
|
|
185
|
-
TAG_DOC_PARA_SHAPE,
|
|
186
|
-
TAG_FACE_NAME,
|
|
187
|
-
TAG_ID_MAPPINGS,
|
|
188
|
-
TAG_LIST_HEADER,
|
|
189
|
-
TAG_PARA_HEADER,
|
|
190
|
-
TAG_PARA_LINE_SEG,
|
|
191
|
-
TAG_PARA_TEXT,
|
|
192
|
-
TAG_SHAPE_COMPONENT,
|
|
193
|
-
TAG_SHAPE_COMPONENT_PICTURE,
|
|
194
|
-
TAG_TABLE,
|
|
195
|
-
appendParaText,
|
|
196
|
-
blocksPlainText,
|
|
197
|
-
buildAddressedTable,
|
|
198
|
-
cellTextFromBlocks,
|
|
199
|
-
convertToHwpx,
|
|
200
|
-
createParaTextState,
|
|
201
|
-
decompressStream,
|
|
202
|
-
detectImageMime,
|
|
203
|
-
emitParagraphBlocks,
|
|
204
|
-
fileTimeText,
|
|
205
|
-
formatNumber,
|
|
206
|
-
hasRealStrike,
|
|
207
|
-
hasRealUnderline,
|
|
208
|
-
hwpEquationToLatex,
|
|
209
|
-
hwpToHwpx,
|
|
210
|
-
indexHwp5Tables,
|
|
211
|
-
isClickHereGuideText,
|
|
212
|
-
isExtendedOnlyCtrlChar,
|
|
213
|
-
locateMemoBlocks,
|
|
214
|
-
memosMarkdown,
|
|
215
|
-
openHwp5Container,
|
|
216
|
-
parseDocInfo,
|
|
217
|
-
parseFileHeader,
|
|
218
|
-
parseHwp5Document,
|
|
219
|
-
readHwp5BinData,
|
|
220
|
-
readHwp5DocInfoRecords,
|
|
221
|
-
readHwp5SectionRecords,
|
|
222
|
-
readHwp5SectionStreams,
|
|
223
|
-
readRecords,
|
|
224
|
-
resolveImageBlocks,
|
|
225
|
-
unfilledClickHereGuide
|
|
226
|
-
} from "./chunk-7KKL3PRK.js";
|
|
227
|
-
import {
|
|
228
|
-
MAX_PIXELS,
|
|
229
|
-
bmpToPng,
|
|
230
|
-
bmpToRgba,
|
|
231
|
-
inlineImagesIntoMarkdown
|
|
232
|
-
} from "./chunk-UJELMNOU.js";
|
|
233
|
-
import {
|
|
234
|
-
parsePageRange
|
|
235
|
-
} from "./chunk-V4BH5SRQ.js";
|
|
236
|
-
import {
|
|
237
|
-
parseLenientCfb
|
|
238
|
-
} from "./chunk-PDI54TF2.js";
|
|
238
|
+
} from "./chunk-R2KOKVE6.js";
|
|
239
239
|
import "./chunk-LT4QALSF.js";
|
|
240
240
|
import {
|
|
241
241
|
MAX_COLS,
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
tidyScriptTags,
|
|
259
259
|
unframeLayoutTables,
|
|
260
260
|
wrapScript
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-YXG74TXU.js";
|
|
262
262
|
import {
|
|
263
263
|
KordocError,
|
|
264
264
|
OPTIONAL_DEP_INSTALL_HINT,
|
|
@@ -274,7 +274,7 @@ import {
|
|
|
274
274
|
stripDtd,
|
|
275
275
|
toArrayBuffer,
|
|
276
276
|
unzipLimitBytes
|
|
277
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-FTUYGBVA.js";
|
|
278
278
|
|
|
279
279
|
// src/plain-markdown.ts
|
|
280
280
|
function toPlainMarkdown(md2) {
|
|
@@ -17853,7 +17853,7 @@ var MIN_SIDE = 24;
|
|
|
17853
17853
|
async function ocrEmbeddedImages(blocks, options, warnings) {
|
|
17854
17854
|
const ocr = options?.ocr;
|
|
17855
17855
|
if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
|
|
17856
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
17856
|
+
const { parseImageDocument } = await import("./image-ocr-EDD2FWK3.js");
|
|
17857
17857
|
let inserted = false, unreadable = 0;
|
|
17858
17858
|
let failed = null;
|
|
17859
17859
|
const walk = async (list, depth) => {
|
|
@@ -33981,7 +33981,7 @@ function scriptsOff(r, off) {
|
|
|
33981
33981
|
}
|
|
33982
33982
|
async function parseImage(buffer, options) {
|
|
33983
33983
|
try {
|
|
33984
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
33984
|
+
const { parseImageDocument } = await import("./image-ocr-EDD2FWK3.js");
|
|
33985
33985
|
const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
|
|
33986
33986
|
stripScriptTags({ blocks });
|
|
33987
33987
|
return {
|
|
@@ -34053,7 +34053,7 @@ async function parseHwp(buffer, options) {
|
|
|
34053
34053
|
async function parsePdf(buffer, options) {
|
|
34054
34054
|
let parsePdfDocument;
|
|
34055
34055
|
try {
|
|
34056
|
-
const mod = await import("./parser-
|
|
34056
|
+
const mod = await import("./parser-5E4Z3ME5.js");
|
|
34057
34057
|
parsePdfDocument = mod.parsePdfDocument;
|
|
34058
34058
|
} catch {
|
|
34059
34059
|
return {
|
|
@@ -34133,7 +34133,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
|
|
|
34133
34133
|
throw new Error(`hwpx-preserve \uD3EC\uB9F7\uC740 HWPX\xB7HWP 5.x \uC785\uB825\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${zipFormat})`);
|
|
34134
34134
|
}
|
|
34135
34135
|
} else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
|
|
34136
|
-
const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-
|
|
34136
|
+
const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-XHJFVCD4.js");
|
|
34137
34137
|
const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
|
|
34138
34138
|
buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
|
|
34139
34139
|
} else {
|
package/dist/mcp.js
CHANGED
|
@@ -45,45 +45,45 @@ import {
|
|
|
45
45
|
unknownFontWarnings,
|
|
46
46
|
usesGaejosikMunche,
|
|
47
47
|
usesLogicStructure
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-SHPWOK54.js";
|
|
49
|
+
import "./chunk-TAVJD44R.js";
|
|
50
|
+
import "./chunk-RFMTK6QQ.js";
|
|
50
51
|
import {
|
|
51
52
|
extractHwpxMetadataOnly,
|
|
52
53
|
patchHwp,
|
|
53
54
|
patchHwpx
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-PSUE7IEJ.js";
|
|
56
|
+
import "./chunk-CV7R6GFL.js";
|
|
55
57
|
import {
|
|
56
58
|
AGENCY_COMMON_NAME,
|
|
57
59
|
PRESET_ALIAS,
|
|
58
60
|
agencyNames,
|
|
59
61
|
incompatibleGongmunWarnings,
|
|
60
62
|
markdownToHwpx
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-MFHYWNRB.js";
|
|
64
|
+
import "./chunk-ZYMXAFG6.js";
|
|
65
|
+
import "./chunk-3HX37NQI.js";
|
|
66
|
+
import "./chunk-TBVTRCQO.js";
|
|
67
|
+
import "./chunk-KKVUDW3R.js";
|
|
68
|
+
import "./chunk-WJZJYJCP.js";
|
|
65
69
|
import {
|
|
66
70
|
extractFormFields,
|
|
67
71
|
fillWithUniqueGuard
|
|
68
72
|
} from "./chunk-3AHL6YEA.js";
|
|
73
|
+
import "./chunk-YJJGETLN.js";
|
|
69
74
|
import {
|
|
70
75
|
hwpToHwpx
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-3WSNLH4B.js";
|
|
73
|
-
import "./chunk-L3JP55ZY.js";
|
|
74
|
-
import "./chunk-Q7FDPJUS.js";
|
|
75
|
-
import "./chunk-OAETOHH3.js";
|
|
76
|
-
import "./chunk-MIJTZKWF.js";
|
|
77
|
-
import "./chunk-RQLEGKEV.js";
|
|
78
|
-
import "./chunk-KB4ORA7M.js";
|
|
76
|
+
} from "./chunk-DWLDRIUW.js";
|
|
79
77
|
import {
|
|
80
78
|
extractHwp5MetadataOnly
|
|
81
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-6X5OZ32D.js";
|
|
82
80
|
import "./chunk-FU6ZDWCI.js";
|
|
83
81
|
import "./chunk-OFVHQ2TZ.js";
|
|
84
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-H5WXX55M.js";
|
|
85
83
|
import "./chunk-WFKFG2RT.js";
|
|
86
|
-
import "./chunk-
|
|
84
|
+
import "./chunk-3WSNLH4B.js";
|
|
85
|
+
import "./chunk-SFNUS2L2.js";
|
|
86
|
+
import "./chunk-EEXZI6FB.js";
|
|
87
87
|
import "./chunk-VQFA55IC.js";
|
|
88
88
|
import {
|
|
89
89
|
detectFormat,
|
|
@@ -92,16 +92,16 @@ import {
|
|
|
92
92
|
} from "./chunk-GHHVT4Q5.js";
|
|
93
93
|
import "./chunk-H7K5YHWQ.js";
|
|
94
94
|
import "./chunk-IIOBUTXH.js";
|
|
95
|
-
import "./chunk-
|
|
95
|
+
import "./chunk-SAJPPKP6.js";
|
|
96
96
|
import {
|
|
97
97
|
blocksToMarkdown
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-JLXFH46H.js";
|
|
99
99
|
import "./chunk-KFF47XZ7.js";
|
|
100
100
|
import {
|
|
101
101
|
assertWithinRoot,
|
|
102
102
|
getAccessRoot,
|
|
103
103
|
isOfflineMode
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-UHNUEHHP.js";
|
|
105
105
|
import {
|
|
106
106
|
KordocError,
|
|
107
107
|
VERSION,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
routeConsoleToStderr,
|
|
110
110
|
sanitizeError,
|
|
111
111
|
toArrayBuffer
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-UGVLPUEO.js";
|
|
113
113
|
|
|
114
114
|
// src/mcp.ts
|
|
115
115
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -426,7 +426,7 @@ ${markdown}`);
|
|
|
426
426
|
break;
|
|
427
427
|
case "pdf":
|
|
428
428
|
try {
|
|
429
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
429
|
+
const { extractPdfMetadataOnly } = await import("./parser-FPBBI4AE.js");
|
|
430
430
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
431
431
|
} catch {
|
|
432
432
|
metadata = void 0;
|
|
@@ -603,7 +603,7 @@ ${tableMarkdown}` }]
|
|
|
603
603
|
if (!parsed.success) {
|
|
604
604
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
605
605
|
}
|
|
606
|
-
const { blocksToChunks } = await import("./chunks-
|
|
606
|
+
const { blocksToChunks } = await import("./chunks-2XOX7XKP.js");
|
|
607
607
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
608
608
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
609
609
|
} catch (err) {
|
|
@@ -883,7 +883,7 @@ ${previewMd}` }]
|
|
|
883
883
|
}
|
|
884
884
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
885
885
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
886
|
-
const { placeSealHwpx } = await import("./seal-
|
|
886
|
+
const { placeSealHwpx } = await import("./seal-JJLC6UDD.js");
|
|
887
887
|
const result = await placeSealHwpx(buffer, [{
|
|
888
888
|
anchor,
|
|
889
889
|
occurrence,
|
|
@@ -939,7 +939,7 @@ ${previewMd}` }]
|
|
|
939
939
|
if (format !== "hwpx") {
|
|
940
940
|
return { content: [{ type: "text", text: `add_memo \uB294 HWPX\xB7HWP 5.x \uD30C\uC77C\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${format}).` }], isError: true };
|
|
941
941
|
}
|
|
942
|
-
const { addMemoHwpx } = await import("./memo-
|
|
942
|
+
const { addMemoHwpx } = await import("./memo-HW332L2B.js");
|
|
943
943
|
const result = await addMemoHwpx(buffer, [{ anchor, text, author, occurrence }]);
|
|
944
944
|
await mkdir(dirname2(outPath), { recursive: true });
|
|
945
945
|
await writeOutputFile(outPath, Buffer.from(result.buffer));
|
|
@@ -981,7 +981,7 @@ ${previewMd}` }]
|
|
|
981
981
|
}
|
|
982
982
|
const original = new Uint8Array(buffer);
|
|
983
983
|
const result = isHwpx ? await patchHwpx(original, edited_markdown, structure === false ? { structure: false } : void 0) : await patchHwp(original, edited_markdown);
|
|
984
|
-
const { needsRewrite, rewriteEdited, rewritePath } = await import("./rewrite-fallback-
|
|
984
|
+
const { needsRewrite, rewriteEdited, rewritePath } = await import("./rewrite-fallback-4MVCADX7.js");
|
|
985
985
|
const rewrite = needsRewrite(result) ? await rewriteEdited(original, isHwpx, edited_markdown, result.success) : null;
|
|
986
986
|
const rwOut = rewrite ? safeOutputPath(rewritePath(out), /* @__PURE__ */ new Set([".hwpx"])) : void 0;
|
|
987
987
|
if (rewrite && rwOut) {
|
|
@@ -1050,7 +1050,7 @@ ${rewriteLine}` }] };
|
|
|
1050
1050
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
1051
1051
|
return { content: [{ type: "text", text: "output_path\uAC00 \uC785\uB825 \uD30C\uC77C\uACFC \uAC19\uC2B5\uB2C8\uB2E4 \u2014 \uC6D0\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
|
|
1052
1052
|
}
|
|
1053
|
-
const { redactDocument } = await import("./redact-doc-
|
|
1053
|
+
const { redactDocument } = await import("./redact-doc-W4DR6BTT.js");
|
|
1054
1054
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
1055
1055
|
const MAX_LINES = 50;
|
|
1056
1056
|
const listed = r.fileHits.length > 0 ? r.fileHits.map((h) => ` - [${h.rule}] ${h.masked} (${h.where} @ ${h.part})`) : r.markdownHits.map((h) => ` - [${h.rule}] ${h.masked}`);
|
|
@@ -1125,7 +1125,7 @@ function registerRenderTools(server2) {
|
|
|
1125
1125
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1126
1126
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
1127
1127
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
1128
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
1128
|
+
const { renderHwpxToSvg } = await import("./render-OLEQELZH.js");
|
|
1129
1129
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode, password });
|
|
1130
1130
|
const summary2 = [
|
|
1131
1131
|
`\uB80C\uB354 \uC644\uB8CC: ${result.pageCount}\uD398\uC774\uC9C0, ${Math.round(result.width)}x${Math.round(result.height)}pt (\uD14D\uC2A4\uD2B8 ${result.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${result.stats.images}\xB7\uD45C ${result.stats.tables})`,
|
|
@@ -1137,7 +1137,7 @@ function registerRenderTools(server2) {
|
|
|
1137
1137
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
1138
1138
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
1139
1139
|
}
|
|
1140
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
1140
|
+
const { rasterizeSvg } = await import("./rasterize-GJH24CGX.js");
|
|
1141
1141
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
1142
1142
|
if (outPath) {
|
|
1143
1143
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -1152,7 +1152,7 @@ function registerRenderTools(server2) {
|
|
|
1152
1152
|
]
|
|
1153
1153
|
};
|
|
1154
1154
|
}
|
|
1155
|
-
const { renderDocument } = await import("./render-
|
|
1155
|
+
const { renderDocument } = await import("./render-OLEQELZH.js");
|
|
1156
1156
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px, password });
|
|
1157
1157
|
const summary = [
|
|
1158
1158
|
`\uB80C\uB354 \uC644\uB8CC: \uBB38\uC11C ${scene.pages.length}\uD398\uC774\uC9C0 \uC911 ${assets.filter((a) => a.page !== void 0).length || 1}\uAC74 (\uD14D\uC2A4\uD2B8 ${scene.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${scene.stats.images}\xB7\uD45C ${scene.stats.tables}\xB7\uB3C4\uD615 ${scene.stats.shapes})`,
|
|
@@ -1202,7 +1202,7 @@ function registerRenderTools(server2) {
|
|
|
1202
1202
|
try {
|
|
1203
1203
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1204
1204
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1205
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1205
|
+
const { extractRenderedRegions } = await import("./render-OLEQELZH.js");
|
|
1206
1206
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1207
1207
|
await mkdir2(dir, { recursive: true });
|
|
1208
1208
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1238,7 +1238,7 @@ function registerRenderTools(server2) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1240
1240
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1241
|
-
const { extractTables } = await import("./visual-
|
|
1241
|
+
const { extractTables } = await import("./visual-QGD23ZDN.js");
|
|
1242
1242
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1243
1243
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1244
1244
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1295,7 +1295,7 @@ function registerGenerateTools(server2) {
|
|
|
1295
1295
|
try {
|
|
1296
1296
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1297
1297
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1298
|
-
const { hwpxToProfile } = await import("./-
|
|
1298
|
+
const { hwpxToProfile } = await import("./-C2A4JYBB.js");
|
|
1299
1299
|
const profile = await hwpxToProfile(buffer);
|
|
1300
1300
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1301
1301
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1448,7 +1448,7 @@ ${g.blocking.map((f) => `- ${formatGateFinding(f)}`).join("\n")}` }],
|
|
|
1448
1448
|
}
|
|
1449
1449
|
let profile;
|
|
1450
1450
|
if (profile_path) {
|
|
1451
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1451
|
+
const { parseFormatProfileJson } = await import("./profile-io-RF7AHAZE.js");
|
|
1452
1452
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1453
1453
|
}
|
|
1454
1454
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1599,7 +1599,7 @@ function registerLintTools(server2) {
|
|
|
1599
1599
|
let irBlocks;
|
|
1600
1600
|
if (file_path !== void 0) {
|
|
1601
1601
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, ALLOWED_EXTENSIONS);
|
|
1602
|
-
const { parse: parse2 } = await import("./-
|
|
1602
|
+
const { parse: parse2 } = await import("./-C2A4JYBB.js");
|
|
1603
1603
|
const parsed = await parse2(buffer, { filePath: resolved });
|
|
1604
1604
|
if (!parsed.success) throw new KordocError(`\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 \u2014 ${parsed.error}`);
|
|
1605
1605
|
body = parsed.markdown;
|
|
@@ -1647,9 +1647,10 @@ function registerConvertTools(server2) {
|
|
|
1647
1647
|
{
|
|
1648
1648
|
file_path: z6.string().min(1).describe("\uBCC0\uD658\uD560 HWP \uD30C\uC77C\uC758 \uC808\uB300 \uACBD\uB85C"),
|
|
1649
1649
|
output_path: z6.string().min(1).optional().describe("\uC800\uC7A5\uD560 .hwpx \uACBD\uB85C (\uAE30\uBCF8: \uC785\uB825\uACFC \uAC19\uC740 \uD3F4\uB354\xB7\uAC19\uC740 \uC774\uB984\uC758 .hwpx \u2014 \uADF8 \uD30C\uC77C\uC774 \uC774\uBBF8 \uC788\uC73C\uBA74 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uACE0 \uC2E4\uD328\uD558\uB2C8 \uADF8\uB54C\uB294 \uACBD\uB85C\uB97C \uC9C0\uC815)"),
|
|
1650
|
-
password: z6.string().optional().describe("\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP \uC758 \uC5F4\uAE30 \uC554\uD638")
|
|
1650
|
+
password: z6.string().optional().describe("\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP \uC758 \uC5F4\uAE30 \uC554\uD638"),
|
|
1651
|
+
engine: z6.enum(["kordoc", "hancom", "auto"]).optional().describe('\uBCC0\uD658 \uC5D4\uC9C4 \u2014 "kordoc"(\uAE30\uBCF8, \uC5B4\uB514\uC11C\uB098) | "hancom"(Windows \uD55C/\uAE00 \uC790\uCCB4 \uC800\uC7A5, \uD31D\uC5C5 \uC5C6\uC774 \u2014 HWP 3.x \uB3C4 \uC11C\uC2DD \uADF8\uB300\uB85C) | "auto"(\uD55C/\uAE00\uC774 \uC788\uC73C\uBA74 hancom)')
|
|
1651
1652
|
},
|
|
1652
|
-
async ({ file_path, output_path, password }) => {
|
|
1653
|
+
async ({ file_path, output_path, password, engine }) => {
|
|
1653
1654
|
try {
|
|
1654
1655
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwp", ".hml"]));
|
|
1655
1656
|
const outPath = safeOutputPath(output_path ?? resolved.replace(/\.(hwp|hml)$/i, "") + ".hwpx", /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1657,13 +1658,13 @@ function registerConvertTools(server2) {
|
|
|
1657
1658
|
if (!output_path && await access(outPath).then(() => true, () => false)) {
|
|
1658
1659
|
throw new KordocError(`${outPath} \uC774(\uAC00) \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB36E\uC5B4\uC4F0\uB824\uBA74 output_path \uB85C \uACBD\uB85C\uB97C \uC9C1\uC811 \uC9C0\uC815\uD558\uC138\uC694`);
|
|
1659
1660
|
}
|
|
1660
|
-
const { convertToHwpx, validateHwpx } = await import("./-
|
|
1661
|
-
const result = await convertToHwpx(buffer, { password });
|
|
1661
|
+
const { convertToHwpx, validateHwpx } = await import("./-C2A4JYBB.js");
|
|
1662
|
+
const result = await convertToHwpx(buffer, { password, engine });
|
|
1662
1663
|
const check = await validateHwpx(result.data);
|
|
1663
1664
|
await mkdir4(dirname5(outPath), { recursive: true });
|
|
1664
1665
|
await writeOutputFile(outPath, result.data);
|
|
1665
1666
|
const lines = [
|
|
1666
|
-
`${result.mode === "preserve" ? "\uC11C\uC2DD \uADF8\uB300\uB85C" : "\uAE00\xB7\uD45C\uB9CC"} HWPX \uB85C \uBCC0\uD658\uD588\uC2B5\uB2C8\uB2E4: ${outPath} (${result.data.length.toLocaleString()} \uBC14\uC774\uD2B8)`,
|
|
1667
|
+
`${result.mode === "preserve" ? "\uC11C\uC2DD \uADF8\uB300\uB85C" : "\uAE00\xB7\uD45C\uB9CC"} HWPX \uB85C \uBCC0\uD658\uD588\uC2B5\uB2C8\uB2E4${result.engine === "hancom" ? "(\uD55C/\uAE00 \uC800\uC7A5)" : ""}: ${outPath} (${result.data.length.toLocaleString()} \uBC14\uC774\uD2B8)`,
|
|
1667
1668
|
...result.warnings.map((w) => `\u26A0\uFE0F ${w}`),
|
|
1668
1669
|
...check.ok ? [] : check.issues.map((i) => `\u2717 \uAD6C\uC870 \uBB38\uC81C ${i.path ? `${i.path}: ` : ""}${i.message}`)
|
|
1669
1670
|
];
|