kordoc 4.18.0 → 4.18.2
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 +7 -6
- package/dist/{-DHSHP3AB.js → -I3CP33G4.js} +13 -11
- package/dist/{chunk-JUU2M5WI.js → chunk-4B2EXELH.js} +2 -2
- package/dist/{chunk-NYF7AGOX.js → chunk-6OKBTY72.js} +2 -2
- package/dist/{chunk-JU4DNVBP.js → chunk-B2E6C2LH.js} +27 -11
- package/dist/chunk-B2E6C2LH.js.map +1 -0
- package/dist/{chunk-UA7TQ37A.js → chunk-BL7KRE6X.js} +3 -3
- package/dist/{chunk-PGZX5JWZ.js → chunk-C2CVOC5K.js} +4 -4
- package/dist/{chunk-WSYTO525.js → chunk-CKUIFTXJ.js} +2 -2
- package/dist/{chunk-FPU7WPQM.js → chunk-F5HING4Y.js} +25 -9
- package/dist/chunk-F5HING4Y.js.map +1 -0
- package/dist/{chunk-VVJCQKXV.js → chunk-GM7XIZF2.js} +2 -2
- package/dist/chunk-GS7T56RP.cjs.map +1 -1
- package/dist/{chunk-DSF64VZN.js → chunk-IA3UKDHA.js} +4 -4
- package/dist/chunk-IA3UKDHA.js.map +1 -0
- package/dist/chunk-J55UQC5H.cjs.map +1 -1
- package/dist/{chunk-ELTPM4HM.cjs → chunk-KDMAYOWH.cjs} +158 -43
- package/dist/chunk-KDMAYOWH.cjs.map +1 -0
- package/dist/{chunk-Q6SKAFWN.js → chunk-L5RLJPI3.js} +3 -3
- package/dist/{chunk-QBTYETIU.js → chunk-L64QRUMK.js} +202 -7
- package/dist/chunk-L64QRUMK.js.map +1 -0
- package/dist/{chunk-LLD4EY2F.js → chunk-LACO375L.js} +2 -2
- package/dist/{chunk-DT57TAEL.js → chunk-LSOD2A6N.js} +2 -2
- package/dist/{chunk-OLOMR452.js → chunk-M4P7YS2N.js} +395 -58
- package/dist/chunk-M4P7YS2N.js.map +1 -0
- package/dist/{chunk-5JFKSCTE.js → chunk-N5DQFA7L.js} +2 -2
- package/dist/{chunk-DTPALXTW.js → chunk-NZM2SSI4.js} +2 -2
- package/dist/{chunk-GNBQXQDK.js → chunk-O2DI4GHD.js} +2 -2
- package/dist/{chunk-32FQLCUJ.js → chunk-OBILAVWC.js} +2 -2
- package/dist/{chunk-PQZ4BDXT.js → chunk-OGAYGUJF.js} +122 -87
- package/dist/chunk-OGAYGUJF.js.map +1 -0
- package/dist/{chunk-2QBZMCRT.cjs → chunk-OI5ZSSIC.cjs} +12 -12
- package/dist/chunk-OI5ZSSIC.cjs.map +1 -0
- package/dist/{chunk-F4ESJBGU.cjs → chunk-QGFZU3JE.cjs} +31 -15
- package/dist/chunk-QGFZU3JE.cjs.map +1 -0
- package/dist/{chunk-WDJJ77HP.js → chunk-QP7IXF7R.js} +2 -2
- package/dist/{chunk-NKCKN4WW.js → chunk-T4MXCSBP.js} +137 -27
- package/dist/chunk-T4MXCSBP.js.map +1 -0
- package/dist/{chunk-CKMGVW6S.cjs → chunk-UZGZRGYM.cjs} +2 -2
- package/dist/chunk-UZGZRGYM.cjs.map +1 -0
- package/dist/{chunk-NIPT5FJO.js → chunk-VSY5PAJ5.js} +2 -2
- package/dist/{chunk-GP7BPJTU.cjs → chunk-W2YYBPW5.cjs} +3 -3
- package/dist/chunk-W2YYBPW5.cjs.map +1 -0
- package/dist/{chunk-RLVALQZI.cjs → chunk-YNLW6EGU.cjs} +3 -3
- package/dist/chunk-YNLW6EGU.cjs.map +1 -0
- package/dist/chunks-IFFRC5IQ.js +10 -0
- package/dist/cli.js +26 -26
- package/dist/{formula-6Q2SBBQ5.js → formula-AQZODKZF.js} +3 -3
- package/dist/{formula-M6JJBJ3O.js → formula-E3N7KDDG.js} +4 -4
- package/dist/{formula-43KHT3B3.cjs → formula-VY4ITOMN.cjs} +9 -9
- package/dist/formula-VY4ITOMN.cjs.map +1 -0
- package/dist/{image-ocr-22XQ4TMN.cjs → image-ocr-6LYEBMVR.cjs} +15 -15
- package/dist/image-ocr-6LYEBMVR.cjs.map +1 -0
- package/dist/{image-ocr-2FIFDA7I.js → image-ocr-IMYXOHHV.js} +6 -6
- package/dist/{image-ocr-TH2E6E3E.js → image-ocr-LN3GSQPW.js} +9 -9
- package/dist/index.cjs +1042 -603
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +529 -90
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +26 -27
- package/dist/mcp.js.map +1 -1
- package/dist/{model-bundle-MLEDO25V.js → model-bundle-IHKNDLOT.js} +5 -5
- package/dist/{models-MYB5M4XC.js → models-YXITRAMR.js} +5 -5
- package/dist/page-range-QHHFTL7X.cjs.map +1 -1
- package/dist/{parser-L77S4RZC.cjs → parser-7KECZTTP.cjs} +176 -228
- package/dist/parser-7KECZTTP.cjs.map +1 -0
- package/dist/{parser-BKTX4GVM.js → parser-KB4BYQBZ.js} +14 -66
- package/dist/parser-KB4BYQBZ.js.map +1 -0
- package/dist/{parser-WW7NWTUM.js → parser-M3T2EWUN.js} +11 -63
- package/dist/parser-M3T2EWUN.js.map +1 -0
- package/dist/pdf-ocr-4S2OAHUX.js +15 -0
- package/dist/pdf-ocr-IGYCZ7G2.cjs +16 -0
- package/dist/pdf-ocr-IGYCZ7G2.cjs.map +1 -0
- package/dist/pdf-ocr-YEBFWU2K.js +19 -0
- package/dist/{profile-io-XZPNRT4U.js → profile-io-GQWQR7YQ.js} +3 -3
- package/dist/{rasterize-4EWPBCOJ.js → rasterize-Y6TVFQ3M.js} +3 -3
- package/dist/{redact-doc-YYCWBWGL.js → redact-doc-TRPZ3HNW.js} +11 -11
- package/dist/{render-JNMBK4WF.js → render-GHT5HKBO.js} +7 -7
- package/dist/seal-3YTXSABW.js +10 -0
- package/dist/{setup-NM5ICZ4U.js → setup-AGSCEHDB.js} +3 -3
- package/dist/visual-R3E35Q2K.js +20 -0
- package/dist/{watch-PTTCHO32.js → watch-ALSEW4GB.js} +13 -13
- package/dist/watch-ALSEW4GB.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-2QBZMCRT.cjs.map +0 -1
- package/dist/chunk-CKMGVW6S.cjs.map +0 -1
- package/dist/chunk-DSF64VZN.js.map +0 -1
- package/dist/chunk-ELTPM4HM.cjs.map +0 -1
- package/dist/chunk-F4ESJBGU.cjs.map +0 -1
- package/dist/chunk-FPU7WPQM.js.map +0 -1
- package/dist/chunk-GP7BPJTU.cjs.map +0 -1
- package/dist/chunk-JU4DNVBP.js.map +0 -1
- package/dist/chunk-NKCKN4WW.js.map +0 -1
- package/dist/chunk-OLOMR452.js.map +0 -1
- package/dist/chunk-PQZ4BDXT.js.map +0 -1
- package/dist/chunk-QBTYETIU.js.map +0 -1
- package/dist/chunk-RLVALQZI.cjs.map +0 -1
- package/dist/chunks-WTZTE3OL.js +0 -10
- package/dist/formula-43KHT3B3.cjs.map +0 -1
- package/dist/image-ocr-22XQ4TMN.cjs.map +0 -1
- package/dist/parser-BKTX4GVM.js.map +0 -1
- package/dist/parser-L77S4RZC.cjs.map +0 -1
- package/dist/parser-WW7NWTUM.js.map +0 -1
- package/dist/pdf-ocr-IUTBPKOM.js +0 -15
- package/dist/pdf-ocr-RQUU3JBR.js +0 -19
- package/dist/pdf-ocr-ZWF6ZXLP.cjs +0 -16
- package/dist/pdf-ocr-ZWF6ZXLP.cjs.map +0 -1
- package/dist/seal-ZIVUVBLM.js +0 -10
- package/dist/visual-4W4RBIOA.js +0 -20
- package/dist/watch-PTTCHO32.js.map +0 -1
- /package/dist/{-DHSHP3AB.js.map → -I3CP33G4.js.map} +0 -0
- /package/dist/{chunk-JUU2M5WI.js.map → chunk-4B2EXELH.js.map} +0 -0
- /package/dist/{chunk-NYF7AGOX.js.map → chunk-6OKBTY72.js.map} +0 -0
- /package/dist/{chunk-UA7TQ37A.js.map → chunk-BL7KRE6X.js.map} +0 -0
- /package/dist/{chunk-PGZX5JWZ.js.map → chunk-C2CVOC5K.js.map} +0 -0
- /package/dist/{chunk-WSYTO525.js.map → chunk-CKUIFTXJ.js.map} +0 -0
- /package/dist/{chunk-VVJCQKXV.js.map → chunk-GM7XIZF2.js.map} +0 -0
- /package/dist/{chunk-Q6SKAFWN.js.map → chunk-L5RLJPI3.js.map} +0 -0
- /package/dist/{chunk-LLD4EY2F.js.map → chunk-LACO375L.js.map} +0 -0
- /package/dist/{chunk-DT57TAEL.js.map → chunk-LSOD2A6N.js.map} +0 -0
- /package/dist/{chunk-5JFKSCTE.js.map → chunk-N5DQFA7L.js.map} +0 -0
- /package/dist/{chunk-DTPALXTW.js.map → chunk-NZM2SSI4.js.map} +0 -0
- /package/dist/{chunk-GNBQXQDK.js.map → chunk-O2DI4GHD.js.map} +0 -0
- /package/dist/{chunk-32FQLCUJ.js.map → chunk-OBILAVWC.js.map} +0 -0
- /package/dist/{chunk-WDJJ77HP.js.map → chunk-QP7IXF7R.js.map} +0 -0
- /package/dist/{chunk-NIPT5FJO.js.map → chunk-VSY5PAJ5.js.map} +0 -0
- /package/dist/{chunks-WTZTE3OL.js.map → chunks-IFFRC5IQ.js.map} +0 -0
- /package/dist/{formula-6Q2SBBQ5.js.map → formula-AQZODKZF.js.map} +0 -0
- /package/dist/{formula-M6JJBJ3O.js.map → formula-E3N7KDDG.js.map} +0 -0
- /package/dist/{image-ocr-2FIFDA7I.js.map → image-ocr-IMYXOHHV.js.map} +0 -0
- /package/dist/{image-ocr-TH2E6E3E.js.map → image-ocr-LN3GSQPW.js.map} +0 -0
- /package/dist/{model-bundle-MLEDO25V.js.map → model-bundle-IHKNDLOT.js.map} +0 -0
- /package/dist/{models-MYB5M4XC.js.map → models-YXITRAMR.js.map} +0 -0
- /package/dist/{pdf-ocr-IUTBPKOM.js.map → pdf-ocr-4S2OAHUX.js.map} +0 -0
- /package/dist/{pdf-ocr-RQUU3JBR.js.map → pdf-ocr-YEBFWU2K.js.map} +0 -0
- /package/dist/{profile-io-XZPNRT4U.js.map → profile-io-GQWQR7YQ.js.map} +0 -0
- /package/dist/{rasterize-4EWPBCOJ.js.map → rasterize-Y6TVFQ3M.js.map} +0 -0
- /package/dist/{redact-doc-YYCWBWGL.js.map → redact-doc-TRPZ3HNW.js.map} +0 -0
- /package/dist/{render-JNMBK4WF.js.map → render-GHT5HKBO.js.map} +0 -0
- /package/dist/{seal-ZIVUVBLM.js.map → seal-3YTXSABW.js.map} +0 -0
- /package/dist/{setup-NM5ICZ4U.js.map → setup-AGSCEHDB.js.map} +0 -0
- /package/dist/{visual-4W4RBIOA.js.map → visual-R3E35Q2K.js.map} +0 -0
package/dist/mcp.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
assertWithinRoot,
|
|
4
4
|
getAccessRoot,
|
|
5
5
|
isOfflineMode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6OKBTY72.js";
|
|
7
7
|
import {
|
|
8
8
|
APPROVAL_MAX,
|
|
9
9
|
BODY_FONTS,
|
|
@@ -43,25 +43,25 @@ import {
|
|
|
43
43
|
resolveBuiltinTemplate,
|
|
44
44
|
unknownFontWarnings,
|
|
45
45
|
usesGaejosikMunche
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-M4P7YS2N.js";
|
|
47
|
+
import "./chunk-GM7XIZF2.js";
|
|
48
|
+
import "./chunk-L5RLJPI3.js";
|
|
49
49
|
import "./chunk-3WSNLH4B.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-QP7IXF7R.js";
|
|
51
51
|
import {
|
|
52
52
|
detectFormat,
|
|
53
53
|
detectOle2Format,
|
|
54
54
|
detectZipFormat,
|
|
55
55
|
extractHwp5MetadataOnly
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-T4MXCSBP.js";
|
|
57
57
|
import "./chunk-7FCNOKOR.js";
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-F5HING4Y.js";
|
|
59
59
|
import "./chunk-VQFA55IC.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-LACO375L.js";
|
|
61
61
|
import {
|
|
62
62
|
blocksToMarkdown
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-IA3UKDHA.js";
|
|
64
|
+
import "./chunk-CKUIFTXJ.js";
|
|
65
65
|
import {
|
|
66
66
|
KordocError,
|
|
67
67
|
VERSION,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
routeConsoleToStderr,
|
|
70
70
|
sanitizeError,
|
|
71
71
|
toArrayBuffer
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-OBILAVWC.js";
|
|
73
73
|
|
|
74
74
|
// src/mcp.ts
|
|
75
75
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -84,7 +84,7 @@ import { z } from "zod";
|
|
|
84
84
|
import { realpathSync, openSync, readSync, closeSync, lstatSync, constants } from "fs";
|
|
85
85
|
import { readFile, stat, realpath, open } from "fs/promises";
|
|
86
86
|
import { resolve, isAbsolute, extname, dirname, basename, join } from "path";
|
|
87
|
-
var ALLOWED_EXTENSIONS = /* @__PURE__ */ new Set([".hwp", ".hwpx", ".hml", ".pdf", ".xls", ".xlsx", ".docx"]);
|
|
87
|
+
var ALLOWED_EXTENSIONS = /* @__PURE__ */ new Set([".hwp", ".hwpx", ".hml", ".pdf", ".xls", ".xlsx", ".docx", ".pptx"]);
|
|
88
88
|
var PARSE_EXTENSIONS = /* @__PURE__ */ new Set([...ALLOWED_EXTENSIONS, ".png", ".jpg", ".jpeg", ".webp"]);
|
|
89
89
|
var IMAGE_EXTENSIONS = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".bmp"]);
|
|
90
90
|
var PROFILE_EXTENSIONS = /* @__PURE__ */ new Set([".json"]);
|
|
@@ -292,7 +292,7 @@ ${markdown}`);
|
|
|
292
292
|
);
|
|
293
293
|
server2.tool(
|
|
294
294
|
"detect_format",
|
|
295
|
-
"\uD30C\uC77C\uC758 \uD3EC\uB9F7\uC744 \uB9E4\uC9C1 \uBC14\uC774\uD2B8\uC640 \uCEE8\uD14C\uC774\uB108 \uB0B4\uBD80 \uAD6C\uC870\uB85C \uAC10\uC9C0\uD569\uB2C8\uB2E4 (hwpx, hwp, hwp3, hwpml, pdf, xls, xlsx, docx, pptx, image, unknown).
|
|
295
|
+
"\uD30C\uC77C\uC758 \uD3EC\uB9F7\uC744 \uB9E4\uC9C1 \uBC14\uC774\uD2B8\uC640 \uCEE8\uD14C\uC774\uB108 \uB0B4\uBD80 \uAD6C\uC870\uB85C \uAC10\uC9C0\uD569\uB2C8\uB2E4 (hwpx, hwp, hwp3, hwpml, pdf, xls, xlsx, docx, pptx, image, unknown).",
|
|
296
296
|
{
|
|
297
297
|
file_path: z.string().min(1).describe("\uAC10\uC9C0\uD560 \uD30C\uC77C\uC758 \uC808\uB300 \uACBD\uB85C")
|
|
298
298
|
},
|
|
@@ -345,8 +345,6 @@ ${markdown}`);
|
|
|
345
345
|
if (detectOle2Format(buffer) === "xls") effectiveFormat = "xls";
|
|
346
346
|
}
|
|
347
347
|
switch (effectiveFormat) {
|
|
348
|
-
case "pptx":
|
|
349
|
-
throw new KordocError("PPTX \uD30C\uC77C\uC740 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4.");
|
|
350
348
|
case "hwp":
|
|
351
349
|
metadata = extractHwp5MetadataOnly(Buffer.from(buffer));
|
|
352
350
|
break;
|
|
@@ -355,7 +353,7 @@ ${markdown}`);
|
|
|
355
353
|
break;
|
|
356
354
|
case "pdf":
|
|
357
355
|
try {
|
|
358
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
356
|
+
const { extractPdfMetadataOnly } = await import("./parser-KB4BYQBZ.js");
|
|
359
357
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
360
358
|
} catch {
|
|
361
359
|
metadata = void 0;
|
|
@@ -365,7 +363,8 @@ ${markdown}`);
|
|
|
365
363
|
case "hwpml":
|
|
366
364
|
case "xls":
|
|
367
365
|
case "xlsx":
|
|
368
|
-
case "docx":
|
|
366
|
+
case "docx":
|
|
367
|
+
case "pptx": {
|
|
369
368
|
const result = await parse(buffer);
|
|
370
369
|
metadata = result.success ? result.metadata : void 0;
|
|
371
370
|
break;
|
|
@@ -531,7 +530,7 @@ ${tableMarkdown}` }]
|
|
|
531
530
|
if (!parsed.success) {
|
|
532
531
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
533
532
|
}
|
|
534
|
-
const { blocksToChunks } = await import("./chunks-
|
|
533
|
+
const { blocksToChunks } = await import("./chunks-IFFRC5IQ.js");
|
|
535
534
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
536
535
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
537
536
|
} catch (err) {
|
|
@@ -776,7 +775,7 @@ ${previewMd}` }]
|
|
|
776
775
|
}
|
|
777
776
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
778
777
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
779
|
-
const { placeSealHwpx } = await import("./seal-
|
|
778
|
+
const { placeSealHwpx } = await import("./seal-3YTXSABW.js");
|
|
780
779
|
const result = await placeSealHwpx(buffer, [{
|
|
781
780
|
anchor,
|
|
782
781
|
occurrence,
|
|
@@ -893,7 +892,7 @@ ${previewMd}` }]
|
|
|
893
892
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
894
893
|
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 };
|
|
895
894
|
}
|
|
896
|
-
const { redactDocument } = await import("./redact-doc-
|
|
895
|
+
const { redactDocument } = await import("./redact-doc-TRPZ3HNW.js");
|
|
897
896
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
898
897
|
const MAX_LINES = 50;
|
|
899
898
|
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}`);
|
|
@@ -967,7 +966,7 @@ function registerRenderTools(server2) {
|
|
|
967
966
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
968
967
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
969
968
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
970
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
969
|
+
const { renderHwpxToSvg } = await import("./render-GHT5HKBO.js");
|
|
971
970
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
|
|
972
971
|
const summary2 = [
|
|
973
972
|
`\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})`,
|
|
@@ -979,7 +978,7 @@ function registerRenderTools(server2) {
|
|
|
979
978
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
980
979
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
981
980
|
}
|
|
982
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
981
|
+
const { rasterizeSvg } = await import("./rasterize-Y6TVFQ3M.js");
|
|
983
982
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
984
983
|
if (outPath) {
|
|
985
984
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -994,7 +993,7 @@ function registerRenderTools(server2) {
|
|
|
994
993
|
]
|
|
995
994
|
};
|
|
996
995
|
}
|
|
997
|
-
const { renderDocument } = await import("./render-
|
|
996
|
+
const { renderDocument } = await import("./render-GHT5HKBO.js");
|
|
998
997
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
|
|
999
998
|
const summary = [
|
|
1000
999
|
`\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})`,
|
|
@@ -1044,7 +1043,7 @@ function registerRenderTools(server2) {
|
|
|
1044
1043
|
try {
|
|
1045
1044
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1046
1045
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1047
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1046
|
+
const { extractRenderedRegions } = await import("./render-GHT5HKBO.js");
|
|
1048
1047
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1049
1048
|
await mkdir2(dir, { recursive: true });
|
|
1050
1049
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1080,7 +1079,7 @@ function registerRenderTools(server2) {
|
|
|
1080
1079
|
}
|
|
1081
1080
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1082
1081
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1083
|
-
const { extractTables } = await import("./visual-
|
|
1082
|
+
const { extractTables } = await import("./visual-R3E35Q2K.js");
|
|
1084
1083
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1085
1084
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1086
1085
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1137,7 +1136,7 @@ function registerGenerateTools(server2) {
|
|
|
1137
1136
|
try {
|
|
1138
1137
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1139
1138
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1140
|
-
const { hwpxToProfile } = await import("./-
|
|
1139
|
+
const { hwpxToProfile } = await import("./-I3CP33G4.js");
|
|
1141
1140
|
const profile = await hwpxToProfile(buffer);
|
|
1142
1141
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1143
1142
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1244,7 +1243,7 @@ function registerGenerateTools(server2) {
|
|
|
1244
1243
|
}
|
|
1245
1244
|
let profile;
|
|
1246
1245
|
if (profile_path) {
|
|
1247
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1246
|
+
const { parseFormatProfileJson } = await import("./profile-io-GQWQR7YQ.js");
|
|
1248
1247
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1249
1248
|
}
|
|
1250
1249
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|