kordoc 4.24.78 → 4.24.80
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 +4 -4
- package/dist/{-3INLR7KZ.js → -E4WGZQZR.js} +24 -22
- package/dist/{chunk-PNKLL5TE.js → chunk-3FXO2TVH.js} +2 -2
- package/dist/{chunk-5JKGN6YF.js → chunk-4GZJWSI4.js} +2 -2
- package/dist/{chunk-ELOZVH5S.cjs → chunk-4OA4D6TW.cjs} +8 -8
- package/dist/{chunk-ELOZVH5S.cjs.map → chunk-4OA4D6TW.cjs.map} +1 -1
- package/dist/{chunk-7RQDJ63R.js → chunk-4VGY5JDF.js} +11 -9
- package/dist/chunk-4VGY5JDF.js.map +1 -0
- package/dist/{chunk-36KS4PDO.js → chunk-4ZMHVX2V.js} +2 -2
- package/dist/{chunk-PLF5QVIR.cjs → chunk-5FYOSM43.cjs} +6 -6
- package/dist/{chunk-PLF5QVIR.cjs.map → chunk-5FYOSM43.cjs.map} +1 -1
- package/dist/{chunk-HBKSG62C.js → chunk-5GQREWXW.js} +2 -2
- package/dist/{chunk-PGTOBYRX.js → chunk-5MXMBV4W.js} +5 -5
- package/dist/{chunk-DJVCW5YA.js → chunk-6YJHMQPK.js} +12 -9
- package/dist/chunk-6YJHMQPK.js.map +1 -0
- package/dist/{chunk-EU7LGFMR.cjs → chunk-7WYZNELF.cjs} +97 -94
- package/dist/chunk-7WYZNELF.cjs.map +1 -0
- package/dist/{chunk-Q62ZOF73.js → chunk-ABOFK6HZ.js} +2 -2
- package/dist/{chunk-VZRUNNZ2.js → chunk-C33LHSPS.js} +2 -2
- package/dist/{chunk-LVRS6HPA.js → chunk-CJJLFK33.js} +6 -6
- package/dist/{chunk-AEQJOD3U.js → chunk-DBVH7R77.js} +2 -2
- package/dist/{chunk-FAJO643G.js → chunk-DDBVS2ZV.js} +5 -5
- package/dist/{chunk-EQO6PYJF.cjs → chunk-DFFUNHVL.cjs} +33 -31
- package/dist/chunk-DFFUNHVL.cjs.map +1 -0
- package/dist/{chunk-3JZINNV6.cjs → chunk-DXDR5FAQ.cjs} +104 -104
- package/dist/{chunk-3JZINNV6.cjs.map → chunk-DXDR5FAQ.cjs.map} +1 -1
- package/dist/{chunk-KM5P2HJ2.js → chunk-EM5OCOC6.js} +2 -2
- package/dist/{chunk-ENUL3MLZ.js → chunk-HDV2R6EA.js} +3 -3
- package/dist/{chunk-MQYI7KWD.js → chunk-HPOA47C4.js} +2 -2
- package/dist/{chunk-BXNK6DQL.js → chunk-HPUD7YTY.js} +2 -2
- package/dist/{chunk-7ASPTCTD.js → chunk-I56ES2MC.js} +2 -2
- package/dist/{chunk-YRYL75TY.js → chunk-IRANRVQC.js} +2 -2
- package/dist/{chunk-F5RCXSUO.js → chunk-IYJYGFOR.js} +2 -2
- package/dist/{chunk-YDONOMUK.js → chunk-LDLAHPQG.js} +2 -2
- package/dist/{chunk-VEIPW7QU.js → chunk-LGRQWTSU.js} +13 -10
- package/dist/chunk-LGRQWTSU.js.map +1 -0
- package/dist/{chunk-Z4RKJYK4.js → chunk-MAJRVJ2U.js} +10 -10
- package/dist/{chunk-QRNA3W7B.cjs → chunk-PBTLZYKW.cjs} +3 -3
- package/dist/{chunk-QRNA3W7B.cjs.map → chunk-PBTLZYKW.cjs.map} +1 -1
- package/dist/{chunk-TFKBIIDY.js → chunk-PG7TASMF.js} +67 -21
- package/dist/chunk-PG7TASMF.js.map +1 -0
- package/dist/{chunk-WENH6GSY.cjs → chunk-RKCEXNWT.cjs} +58 -58
- package/dist/{chunk-WENH6GSY.cjs.map → chunk-RKCEXNWT.cjs.map} +1 -1
- package/dist/{chunk-SJF2ZMOH.js → chunk-SN3TFJAE.js} +2 -2
- package/dist/{chunk-DSUKSIMD.js → chunk-T7CMM4FT.js} +6 -6
- package/dist/{chunk-PSWNPOWW.js → chunk-T7REBC3M.js} +2 -2
- package/dist/{chunk-NWAA7CP7.js → chunk-UCRDNRX2.js} +3 -3
- package/dist/{chunk-V5JHID6L.js → chunk-V5D7ZTXL.js} +3 -3
- package/dist/{chunk-Y2NIFMWC.js → chunk-VQFUQFK6.js} +7 -7
- package/dist/{chunk-7BAKREYA.cjs → chunk-VWW5C2PU.cjs} +3 -3
- package/dist/{chunk-7BAKREYA.cjs.map → chunk-VWW5C2PU.cjs.map} +1 -1
- package/dist/{chunk-M5VCRPXU.js → chunk-WC5XP6HM.js} +5 -5
- package/dist/{chunk-H6ZJK5KA.js → chunk-WETI4A4A.js} +2 -2
- package/dist/{chunk-6RJGAVYA.js → chunk-WFG6JYP7.js} +2 -2
- package/dist/{chunk-ZE4OZOSO.js → chunk-WXZFE5IB.js} +12 -10
- package/dist/chunk-WXZFE5IB.js.map +1 -0
- package/dist/{chunk-ZOOI4PGA.js → chunk-XLQ6LFEL.js} +2 -2
- package/dist/{chunk-QXAQIVOI.js → chunk-XZH7DOXJ.js} +2 -2
- package/dist/{chunk-XMNGFHK6.cjs → chunk-Y7LMYK5C.cjs} +2 -2
- package/dist/{chunk-XMNGFHK6.cjs.map → chunk-Y7LMYK5C.cjs.map} +1 -1
- package/dist/{chunk-KK77Q5NA.js → chunk-Z4LANE4Z.js} +2 -2
- package/dist/{chunk-7YAXU4XB.js → chunk-ZSQYW7N2.js} +11 -11
- package/dist/chunks-MNMVIRMB.js +11 -0
- package/dist/cli.js +61 -56
- package/dist/cli.js.map +1 -1
- package/dist/{formula-X4J6TPFE.cjs → formula-OOTFS5XV.cjs} +9 -9
- package/dist/{formula-X4J6TPFE.cjs.map → formula-OOTFS5XV.cjs.map} +1 -1
- package/dist/{formula-OYCTBHT6.js → formula-QVNBTQJF.js} +4 -4
- package/dist/{formula-OVW7R4O5.js → formula-YQWTOSSV.js} +3 -3
- package/dist/generator-DJCS2MTC.cjs +12 -0
- package/dist/{generator-BCGW5ITF.cjs.map → generator-DJCS2MTC.cjs.map} +1 -1
- package/dist/generator-SEJ54C76.js +11 -0
- package/dist/generator-V7ZB27P6.js +18 -0
- package/dist/{hancom-O4E5BLIX.js → hancom-OMBHPCJR.js} +2 -2
- package/dist/{hancom-KYUZYWLO.js → hancom-S6GK2PKJ.js} +2 -2
- package/dist/{hancom-WH7WXXZH.cjs → hancom-UJRXSASQ.cjs} +5 -5
- package/dist/{hancom-WH7WXXZH.cjs.map → hancom-UJRXSASQ.cjs.map} +1 -1
- package/dist/{image-ocr-GY4K5NOY.js → image-ocr-3RDTZPUH.js} +8 -8
- package/dist/{image-ocr-5ZFMCHZL.cjs → image-ocr-4FQ54QPG.cjs} +36 -36
- package/dist/{image-ocr-5ZFMCHZL.cjs.map → image-ocr-4FQ54QPG.cjs.map} +1 -1
- package/dist/{image-ocr-OPDOCCLA.js → image-ocr-FA2UAUB5.js} +11 -11
- package/dist/index.cjs +1484 -1438
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +65 -19
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +51 -46
- package/dist/mcp.js.map +1 -1
- package/dist/memo-6BS3C2QT.js +17 -0
- package/dist/{model-bundle-VGXIVXVT.js → model-bundle-KTKZK7ZX.js} +5 -5
- package/dist/{models-TUSHH7AR.js → models-VGSCY57U.js} +5 -5
- package/dist/{parse-worker-v2-Z3XGSG52.js → parse-worker-v2-LUABK53S.js} +23 -23
- package/dist/{parser-ZMBMSI3G.js → parser-FB6NSUTI.js} +18 -12
- package/dist/parser-FB6NSUTI.js.map +1 -0
- package/dist/{parser-EQTJOS7W.cjs → parser-J3V4ZY33.cjs} +173 -167
- package/dist/parser-J3V4ZY33.cjs.map +1 -0
- package/dist/{parser-OAQ2QNB6.js → parser-JEECXHUZ.js} +21 -15
- package/dist/parser-JEECXHUZ.js.map +1 -0
- package/dist/pdf-ocr-5WUIENJQ.cjs +43 -0
- package/dist/{pdf-ocr-YGAPGMHW.cjs.map → pdf-ocr-5WUIENJQ.cjs.map} +1 -1
- package/dist/{pdf-ocr-WRJDDC57.js → pdf-ocr-HUPMJSXZ.js} +9 -9
- package/dist/{pdf-ocr-3CUUB3YV.js → pdf-ocr-VTC73UOL.js} +6 -6
- package/dist/{profile-io-IOVBPV7R.js → profile-io-7VNJ26XG.js} +3 -3
- package/dist/{rasterize-ZJZKZF5R.js → rasterize-AFPV32K5.js} +3 -3
- package/dist/{redact-doc-NPMUDPQZ.js → redact-doc-O6NOJLUX.js} +22 -22
- package/dist/{render-F43PBJAG.js → render-6FEX4BYT.js} +12 -12
- package/dist/{rewrite-fallback-RITELBHU.js → rewrite-fallback-7QMVNVIF.js} +13 -13
- package/dist/seal-5BLP22A4.js +16 -0
- package/dist/{setup-J7I3KFRD.js → setup-727UTPWF.js} +3 -3
- package/dist/{to-hwpx-6JBBYURE.js → to-hwpx-4V6GIDFI.js} +7 -7
- package/dist/{to-hwpx-M7W7O47H.js → to-hwpx-QOAFYHV3.js} +4 -4
- package/dist/to-hwpx-TT3TRZOU.cjs +16 -0
- package/dist/{to-hwpx-ACL6I6I7.cjs.map → to-hwpx-TT3TRZOU.cjs.map} +1 -1
- package/dist/visual-XYHR33UB.js +40 -0
- package/dist/{watch-YILY6776.js → watch-DWX4RTYR.js} +23 -23
- package/package.json +6 -1
- package/dist/chunk-7RQDJ63R.js.map +0 -1
- package/dist/chunk-DJVCW5YA.js.map +0 -1
- package/dist/chunk-EQO6PYJF.cjs.map +0 -1
- package/dist/chunk-EU7LGFMR.cjs.map +0 -1
- package/dist/chunk-TFKBIIDY.js.map +0 -1
- package/dist/chunk-VEIPW7QU.js.map +0 -1
- package/dist/chunk-ZE4OZOSO.js.map +0 -1
- package/dist/chunks-QN3OZOZA.js +0 -11
- package/dist/generator-BCGW5ITF.cjs +0 -12
- package/dist/generator-GJJMS4RD.js +0 -11
- package/dist/generator-ZWGWYDPM.js +0 -18
- package/dist/memo-7BFDELVU.js +0 -17
- package/dist/parser-EQTJOS7W.cjs.map +0 -1
- package/dist/parser-OAQ2QNB6.js.map +0 -1
- package/dist/parser-ZMBMSI3G.js.map +0 -1
- package/dist/pdf-ocr-YGAPGMHW.cjs +0 -43
- package/dist/seal-BEVAF3RV.js +0 -16
- package/dist/to-hwpx-ACL6I6I7.cjs +0 -16
- package/dist/visual-EG4OBDUG.js +0 -40
- /package/dist/{-3INLR7KZ.js.map → -E4WGZQZR.js.map} +0 -0
- /package/dist/{chunk-PNKLL5TE.js.map → chunk-3FXO2TVH.js.map} +0 -0
- /package/dist/{chunk-5JKGN6YF.js.map → chunk-4GZJWSI4.js.map} +0 -0
- /package/dist/{chunk-36KS4PDO.js.map → chunk-4ZMHVX2V.js.map} +0 -0
- /package/dist/{chunk-HBKSG62C.js.map → chunk-5GQREWXW.js.map} +0 -0
- /package/dist/{chunk-PGTOBYRX.js.map → chunk-5MXMBV4W.js.map} +0 -0
- /package/dist/{chunk-Q62ZOF73.js.map → chunk-ABOFK6HZ.js.map} +0 -0
- /package/dist/{chunk-VZRUNNZ2.js.map → chunk-C33LHSPS.js.map} +0 -0
- /package/dist/{chunk-LVRS6HPA.js.map → chunk-CJJLFK33.js.map} +0 -0
- /package/dist/{chunk-AEQJOD3U.js.map → chunk-DBVH7R77.js.map} +0 -0
- /package/dist/{chunk-FAJO643G.js.map → chunk-DDBVS2ZV.js.map} +0 -0
- /package/dist/{chunk-KM5P2HJ2.js.map → chunk-EM5OCOC6.js.map} +0 -0
- /package/dist/{chunk-ENUL3MLZ.js.map → chunk-HDV2R6EA.js.map} +0 -0
- /package/dist/{chunk-MQYI7KWD.js.map → chunk-HPOA47C4.js.map} +0 -0
- /package/dist/{chunk-BXNK6DQL.js.map → chunk-HPUD7YTY.js.map} +0 -0
- /package/dist/{chunk-7ASPTCTD.js.map → chunk-I56ES2MC.js.map} +0 -0
- /package/dist/{chunk-YRYL75TY.js.map → chunk-IRANRVQC.js.map} +0 -0
- /package/dist/{chunk-F5RCXSUO.js.map → chunk-IYJYGFOR.js.map} +0 -0
- /package/dist/{chunk-YDONOMUK.js.map → chunk-LDLAHPQG.js.map} +0 -0
- /package/dist/{chunk-Z4RKJYK4.js.map → chunk-MAJRVJ2U.js.map} +0 -0
- /package/dist/{chunk-SJF2ZMOH.js.map → chunk-SN3TFJAE.js.map} +0 -0
- /package/dist/{chunk-DSUKSIMD.js.map → chunk-T7CMM4FT.js.map} +0 -0
- /package/dist/{chunk-PSWNPOWW.js.map → chunk-T7REBC3M.js.map} +0 -0
- /package/dist/{chunk-NWAA7CP7.js.map → chunk-UCRDNRX2.js.map} +0 -0
- /package/dist/{chunk-V5JHID6L.js.map → chunk-V5D7ZTXL.js.map} +0 -0
- /package/dist/{chunk-Y2NIFMWC.js.map → chunk-VQFUQFK6.js.map} +0 -0
- /package/dist/{chunk-M5VCRPXU.js.map → chunk-WC5XP6HM.js.map} +0 -0
- /package/dist/{chunk-H6ZJK5KA.js.map → chunk-WETI4A4A.js.map} +0 -0
- /package/dist/{chunk-6RJGAVYA.js.map → chunk-WFG6JYP7.js.map} +0 -0
- /package/dist/{chunk-ZOOI4PGA.js.map → chunk-XLQ6LFEL.js.map} +0 -0
- /package/dist/{chunk-QXAQIVOI.js.map → chunk-XZH7DOXJ.js.map} +0 -0
- /package/dist/{chunk-KK77Q5NA.js.map → chunk-Z4LANE4Z.js.map} +0 -0
- /package/dist/{chunk-7YAXU4XB.js.map → chunk-ZSQYW7N2.js.map} +0 -0
- /package/dist/{chunks-QN3OZOZA.js.map → chunks-MNMVIRMB.js.map} +0 -0
- /package/dist/{formula-OYCTBHT6.js.map → formula-QVNBTQJF.js.map} +0 -0
- /package/dist/{formula-OVW7R4O5.js.map → formula-YQWTOSSV.js.map} +0 -0
- /package/dist/{generator-GJJMS4RD.js.map → generator-SEJ54C76.js.map} +0 -0
- /package/dist/{generator-ZWGWYDPM.js.map → generator-V7ZB27P6.js.map} +0 -0
- /package/dist/{hancom-O4E5BLIX.js.map → hancom-OMBHPCJR.js.map} +0 -0
- /package/dist/{hancom-KYUZYWLO.js.map → hancom-S6GK2PKJ.js.map} +0 -0
- /package/dist/{image-ocr-GY4K5NOY.js.map → image-ocr-3RDTZPUH.js.map} +0 -0
- /package/dist/{image-ocr-OPDOCCLA.js.map → image-ocr-FA2UAUB5.js.map} +0 -0
- /package/dist/{memo-7BFDELVU.js.map → memo-6BS3C2QT.js.map} +0 -0
- /package/dist/{model-bundle-VGXIVXVT.js.map → model-bundle-KTKZK7ZX.js.map} +0 -0
- /package/dist/{models-TUSHH7AR.js.map → models-VGSCY57U.js.map} +0 -0
- /package/dist/{parse-worker-v2-Z3XGSG52.js.map → parse-worker-v2-LUABK53S.js.map} +0 -0
- /package/dist/{pdf-ocr-3CUUB3YV.js.map → pdf-ocr-HUPMJSXZ.js.map} +0 -0
- /package/dist/{pdf-ocr-WRJDDC57.js.map → pdf-ocr-VTC73UOL.js.map} +0 -0
- /package/dist/{profile-io-IOVBPV7R.js.map → profile-io-7VNJ26XG.js.map} +0 -0
- /package/dist/{rasterize-ZJZKZF5R.js.map → rasterize-AFPV32K5.js.map} +0 -0
- /package/dist/{redact-doc-NPMUDPQZ.js.map → redact-doc-O6NOJLUX.js.map} +0 -0
- /package/dist/{render-F43PBJAG.js.map → render-6FEX4BYT.js.map} +0 -0
- /package/dist/{rewrite-fallback-RITELBHU.js.map → rewrite-fallback-7QMVNVIF.js.map} +0 -0
- /package/dist/{seal-BEVAF3RV.js.map → seal-5BLP22A4.js.map} +0 -0
- /package/dist/{setup-J7I3KFRD.js.map → setup-727UTPWF.js.map} +0 -0
- /package/dist/{to-hwpx-6JBBYURE.js.map → to-hwpx-4V6GIDFI.js.map} +0 -0
- /package/dist/{to-hwpx-M7W7O47H.js.map → to-hwpx-QOAFYHV3.js.map} +0 -0
- /package/dist/{visual-EG4OBDUG.js.map → visual-XYHR33UB.js.map} +0 -0
- /package/dist/{watch-YILY6776.js.map → watch-DWX4RTYR.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1730,6 +1730,16 @@ interface ConvertToHwpxResult {
|
|
|
1730
1730
|
*/
|
|
1731
1731
|
declare function convertToHwpx(input: Uint8Array | ArrayBuffer, options?: HwpToHwpxOptions): Promise<ConvertToHwpxResult>;
|
|
1732
1732
|
|
|
1733
|
+
/**
|
|
1734
|
+
* HWPX → HWP 5.0 (바이너리). kordoc 은 HWPX 를 만들고, HWP 로 저장할 때만 rhwp(@rhwp/core WASM)로 옮긴다.
|
|
1735
|
+
* @rhwp/core 는 optional peer dep(풀면 32MB) — 없으면 KordocError(조치 안내).
|
|
1736
|
+
*/
|
|
1737
|
+
interface HwpxToHwpOptions {
|
|
1738
|
+
/** HWP 로 옮기며 빠진 내용(rhwp 손실 보고)을 여기에 더한다 */
|
|
1739
|
+
warnings?: string[];
|
|
1740
|
+
}
|
|
1741
|
+
declare function hwpxToHwp(hwpx: Uint8Array | ArrayBuffer, options?: HwpxToHwpOptions): Promise<Uint8Array>;
|
|
1742
|
+
|
|
1733
1743
|
type RoleKey = "title" | "subtitle" | "contact" | "summary" | "chapter" | "band" | "table" | "body" | "ref" | "L0" | "L1" | "L2" | "L3" | `sym:${string}`;
|
|
1734
1744
|
|
|
1735
1745
|
/**
|
|
@@ -3037,4 +3047,4 @@ interface FillFormOutput {
|
|
|
3037
3047
|
*/
|
|
3038
3048
|
declare function fillForm(input: string | ArrayBuffer | Buffer, values: Record<string, FillInput>, outputFormat?: FillOutputFormat): Promise<FillFormOutput>;
|
|
3039
3049
|
|
|
3040
|
-
export { AGENCY_COMMON_NAME, type AddMemoResult, type AgencyFont, type AgencyPack, type AgencyPressStyle, type AgencyReportStyle, type AgencyStyle, BUILTIN_TEMPLATES, type BlockCapability, type BlockCapabilityInfo, type BlockDiff, type BlockEdit, type BlockFinding, type BlockSourceRef, type BorderDef, type BorderFillDef, type BoundingBox, type BuiltinTemplate, type CellCapability, type CellContext, type CellDiff, type CellProfile, type CharPrDef, type ChunkOptions, type ClassifyContext, type ClickHereField, type ConvertToHwpxResult, DEFAULT_REDACT_RULES, type DiffChangeType, type DiffResult, type DocChunk, type DocumentMetadata, type DocumentQualitySummary, type ErrorCode, type ExtractRegionOptions, type ExtractTableVisualOptions, type ExtractedImage, type ExtractedTable, type ExtractedTableCrop, type FileType, type FillFormOutput, type FillInput, type FillOutputFormat, type FillResult, type FillValue, type FormField, type FormFieldSchema, type FormFieldType, type FormResult, type FormSchemaResult, type FormatProfile, type GongmunFont, type GongmunGateAxis, type GongmunGateFinding, type GongmunGateResult, type GongmunLintFinding, type GongmunNumbering, type GongmunOptions, type GongmunPreset, type GongmunPresetInput, type HwpToHwpxOptions, type HwpxFillResult, HwpxSession, type HwpxTheme, type IRBlock, type IRBlockType, type IRCell, type IRTable, type ImageData, type InlineStyle, type LintBlock, type LintBlocksResult, type LintSuiteOptions, type LintSuiteResult, type MarkdownOptions, type MarkdownToHwpxOptions, type MeasureOptions, type MemoNote, type MemoOp, type MemoPlacement, type MuncheLineKind, type MuncheLintFinding, type OcrLine, type OcrModelFile, type OcrPageLines, type OcrProvider, type OutlineItem, PRESET_ALIAS, type PackKindInfo, type PackManifest, type PackSample, type PageBBox, type PageMargin, type PageMarkdown, type PageOptions, type PageQuality, type ParseFailure, type ParseOptions, type ParseResult, type ParseSuccess, type ParseWarning, type PatchOptions, type PatchResult, type PatchSkip, type PlaceSealResult, type PrintOptions, type PrintPreset, type RedactHit, type RedactOptions, type RedactRule, type RedactTextResult, type RegionAsset, type RenderAsset, type RenderDocumentOptions, type RenderDocumentResult, type RenderFormat, type RenderObjectType, type RenderRegion, type RenderScene, type RenderSourceFormat, type RenderSvgOptions, type RenderSvgResult, SPACE_EM_FIXED, SPACE_EM_FONT, type ScanCell, type ScanParaKind, type ScanParagraph, type ScanTable, type ScenePage, type SceneRenderOptions, type SceneRenderResult, type SealOp, type SealPlacement, type SectionScan, type SpliceEdit, type TRange, type TableProfile, type TableRepresentation, type TableVisualPolicy, type TotalRowPosition, VERSION, type ValidateIssue, type ValidateResult, ValueCursor, type WarningCode, type WatchOptions, type WrapMode, type WrapResult, addMemoHwpx, agencyNames, agencyStyle, applySplices, blocksToChunks, blocksToMarkdown, blocksToPages, blocksToPdf, buildAgencyPack, buildParagraphSplices, buildRangeSplices, charWidthEm1000, chooseTableRepresentation, classifyTable, classifyTableTree, collectTableBlocks, compare, convertToHwpx, detectFormat, detectOle2Format, detectZipFormat, diffBlocks, extractClickHereFields, extractFormFields, extractFormSchema, extractRenderedRegions, extractTables, fillForm, fillFormFields, fillHwpx, fillWithUniqueGuard, fitRatioForFewerLines, flattenLayoutTables, formatFillValue, formatGateFinding, gongmunGate, gongmunLintWarnings, hasStructuredCellContent, hwpToHwpx, hwpxToProfile, incompatibleGongmunWarnings, inferFieldType, isHwpxFile, isKnownFont, isLabelCell, isOldHwpFile, isPdfFile, isZipFile, lintBlocks, lintBudgetText, lintGongmunText, lintLogicText, lintMuncheText, lintSlopText, loadAgencyPack, logicLintWarnings, markdownToHwpx, markdownToPdf, measureTextWidth, muncheLintWarnings, normalizeGongmunPreset, openHwpxDocument, packRoleWarnings, packSummary, packTemplate, parse, parseDocx, parseHwp, parseHwp3, parseHwpml, parseHwpx, parseImage, parsePdf, parsePptx, parseXls, parseXlsx, patchHwp, patchHwpx, patchHwpxBlocks, placeSealHwpx, placeTotalRow, readBuiltinTemplate, readBuiltinTemplateSample, redactMarkdown, redactText, renderDocument, renderDocumentToScene, renderHtml, renderHwp5Pages, renderHwpxToSvg, renderSceneToHtml, resolveBuiltinTemplate, resolvePackKind, runLintSuite, scanSectionXml, simulateWrap, simulateWrapKeepWord, slopLintWarnings, unknownFontWarnings, usesGaejosikMunche, usesLogicStructure, validateHwpx };
|
|
3050
|
+
export { AGENCY_COMMON_NAME, type AddMemoResult, type AgencyFont, type AgencyPack, type AgencyPressStyle, type AgencyReportStyle, type AgencyStyle, BUILTIN_TEMPLATES, type BlockCapability, type BlockCapabilityInfo, type BlockDiff, type BlockEdit, type BlockFinding, type BlockSourceRef, type BorderDef, type BorderFillDef, type BoundingBox, type BuiltinTemplate, type CellCapability, type CellContext, type CellDiff, type CellProfile, type CharPrDef, type ChunkOptions, type ClassifyContext, type ClickHereField, type ConvertToHwpxResult, DEFAULT_REDACT_RULES, type DiffChangeType, type DiffResult, type DocChunk, type DocumentMetadata, type DocumentQualitySummary, type ErrorCode, type ExtractRegionOptions, type ExtractTableVisualOptions, type ExtractedImage, type ExtractedTable, type ExtractedTableCrop, type FileType, type FillFormOutput, type FillInput, type FillOutputFormat, type FillResult, type FillValue, type FormField, type FormFieldSchema, type FormFieldType, type FormResult, type FormSchemaResult, type FormatProfile, type GongmunFont, type GongmunGateAxis, type GongmunGateFinding, type GongmunGateResult, type GongmunLintFinding, type GongmunNumbering, type GongmunOptions, type GongmunPreset, type GongmunPresetInput, type HwpToHwpxOptions, type HwpxFillResult, HwpxSession, type HwpxTheme, type HwpxToHwpOptions, type IRBlock, type IRBlockType, type IRCell, type IRTable, type ImageData, type InlineStyle, type LintBlock, type LintBlocksResult, type LintSuiteOptions, type LintSuiteResult, type MarkdownOptions, type MarkdownToHwpxOptions, type MeasureOptions, type MemoNote, type MemoOp, type MemoPlacement, type MuncheLineKind, type MuncheLintFinding, type OcrLine, type OcrModelFile, type OcrPageLines, type OcrProvider, type OutlineItem, PRESET_ALIAS, type PackKindInfo, type PackManifest, type PackSample, type PageBBox, type PageMargin, type PageMarkdown, type PageOptions, type PageQuality, type ParseFailure, type ParseOptions, type ParseResult, type ParseSuccess, type ParseWarning, type PatchOptions, type PatchResult, type PatchSkip, type PlaceSealResult, type PrintOptions, type PrintPreset, type RedactHit, type RedactOptions, type RedactRule, type RedactTextResult, type RegionAsset, type RenderAsset, type RenderDocumentOptions, type RenderDocumentResult, type RenderFormat, type RenderObjectType, type RenderRegion, type RenderScene, type RenderSourceFormat, type RenderSvgOptions, type RenderSvgResult, SPACE_EM_FIXED, SPACE_EM_FONT, type ScanCell, type ScanParaKind, type ScanParagraph, type ScanTable, type ScenePage, type SceneRenderOptions, type SceneRenderResult, type SealOp, type SealPlacement, type SectionScan, type SpliceEdit, type TRange, type TableProfile, type TableRepresentation, type TableVisualPolicy, type TotalRowPosition, VERSION, type ValidateIssue, type ValidateResult, ValueCursor, type WarningCode, type WatchOptions, type WrapMode, type WrapResult, addMemoHwpx, agencyNames, agencyStyle, applySplices, blocksToChunks, blocksToMarkdown, blocksToPages, blocksToPdf, buildAgencyPack, buildParagraphSplices, buildRangeSplices, charWidthEm1000, chooseTableRepresentation, classifyTable, classifyTableTree, collectTableBlocks, compare, convertToHwpx, detectFormat, detectOle2Format, detectZipFormat, diffBlocks, extractClickHereFields, extractFormFields, extractFormSchema, extractRenderedRegions, extractTables, fillForm, fillFormFields, fillHwpx, fillWithUniqueGuard, fitRatioForFewerLines, flattenLayoutTables, formatFillValue, formatGateFinding, gongmunGate, gongmunLintWarnings, hasStructuredCellContent, hwpToHwpx, hwpxToHwp, hwpxToProfile, incompatibleGongmunWarnings, inferFieldType, isHwpxFile, isKnownFont, isLabelCell, isOldHwpFile, isPdfFile, isZipFile, lintBlocks, lintBudgetText, lintGongmunText, lintLogicText, lintMuncheText, lintSlopText, loadAgencyPack, logicLintWarnings, markdownToHwpx, markdownToPdf, measureTextWidth, muncheLintWarnings, normalizeGongmunPreset, openHwpxDocument, packRoleWarnings, packSummary, packTemplate, parse, parseDocx, parseHwp, parseHwp3, parseHwpml, parseHwpx, parseImage, parsePdf, parsePptx, parseXls, parseXlsx, patchHwp, patchHwpx, patchHwpxBlocks, placeSealHwpx, placeTotalRow, readBuiltinTemplate, readBuiltinTemplateSample, redactMarkdown, redactText, renderDocument, renderDocumentToScene, renderHtml, renderHwp5Pages, renderHwpxToSvg, renderSceneToHtml, resolveBuiltinTemplate, resolvePackKind, runLintSuite, scanSectionXml, simulateWrap, simulateWrapKeepWord, slopLintWarnings, unknownFontWarnings, usesGaejosikMunche, usesLogicStructure, validateHwpx };
|
package/dist/index.d.ts
CHANGED
|
@@ -1730,6 +1730,16 @@ interface ConvertToHwpxResult {
|
|
|
1730
1730
|
*/
|
|
1731
1731
|
declare function convertToHwpx(input: Uint8Array | ArrayBuffer, options?: HwpToHwpxOptions): Promise<ConvertToHwpxResult>;
|
|
1732
1732
|
|
|
1733
|
+
/**
|
|
1734
|
+
* HWPX → HWP 5.0 (바이너리). kordoc 은 HWPX 를 만들고, HWP 로 저장할 때만 rhwp(@rhwp/core WASM)로 옮긴다.
|
|
1735
|
+
* @rhwp/core 는 optional peer dep(풀면 32MB) — 없으면 KordocError(조치 안내).
|
|
1736
|
+
*/
|
|
1737
|
+
interface HwpxToHwpOptions {
|
|
1738
|
+
/** HWP 로 옮기며 빠진 내용(rhwp 손실 보고)을 여기에 더한다 */
|
|
1739
|
+
warnings?: string[];
|
|
1740
|
+
}
|
|
1741
|
+
declare function hwpxToHwp(hwpx: Uint8Array | ArrayBuffer, options?: HwpxToHwpOptions): Promise<Uint8Array>;
|
|
1742
|
+
|
|
1733
1743
|
type RoleKey = "title" | "subtitle" | "contact" | "summary" | "chapter" | "band" | "table" | "body" | "ref" | "L0" | "L1" | "L2" | "L3" | `sym:${string}`;
|
|
1734
1744
|
|
|
1735
1745
|
/**
|
|
@@ -3037,4 +3047,4 @@ interface FillFormOutput {
|
|
|
3037
3047
|
*/
|
|
3038
3048
|
declare function fillForm(input: string | ArrayBuffer | Buffer, values: Record<string, FillInput>, outputFormat?: FillOutputFormat): Promise<FillFormOutput>;
|
|
3039
3049
|
|
|
3040
|
-
export { AGENCY_COMMON_NAME, type AddMemoResult, type AgencyFont, type AgencyPack, type AgencyPressStyle, type AgencyReportStyle, type AgencyStyle, BUILTIN_TEMPLATES, type BlockCapability, type BlockCapabilityInfo, type BlockDiff, type BlockEdit, type BlockFinding, type BlockSourceRef, type BorderDef, type BorderFillDef, type BoundingBox, type BuiltinTemplate, type CellCapability, type CellContext, type CellDiff, type CellProfile, type CharPrDef, type ChunkOptions, type ClassifyContext, type ClickHereField, type ConvertToHwpxResult, DEFAULT_REDACT_RULES, type DiffChangeType, type DiffResult, type DocChunk, type DocumentMetadata, type DocumentQualitySummary, type ErrorCode, type ExtractRegionOptions, type ExtractTableVisualOptions, type ExtractedImage, type ExtractedTable, type ExtractedTableCrop, type FileType, type FillFormOutput, type FillInput, type FillOutputFormat, type FillResult, type FillValue, type FormField, type FormFieldSchema, type FormFieldType, type FormResult, type FormSchemaResult, type FormatProfile, type GongmunFont, type GongmunGateAxis, type GongmunGateFinding, type GongmunGateResult, type GongmunLintFinding, type GongmunNumbering, type GongmunOptions, type GongmunPreset, type GongmunPresetInput, type HwpToHwpxOptions, type HwpxFillResult, HwpxSession, type HwpxTheme, type IRBlock, type IRBlockType, type IRCell, type IRTable, type ImageData, type InlineStyle, type LintBlock, type LintBlocksResult, type LintSuiteOptions, type LintSuiteResult, type MarkdownOptions, type MarkdownToHwpxOptions, type MeasureOptions, type MemoNote, type MemoOp, type MemoPlacement, type MuncheLineKind, type MuncheLintFinding, type OcrLine, type OcrModelFile, type OcrPageLines, type OcrProvider, type OutlineItem, PRESET_ALIAS, type PackKindInfo, type PackManifest, type PackSample, type PageBBox, type PageMargin, type PageMarkdown, type PageOptions, type PageQuality, type ParseFailure, type ParseOptions, type ParseResult, type ParseSuccess, type ParseWarning, type PatchOptions, type PatchResult, type PatchSkip, type PlaceSealResult, type PrintOptions, type PrintPreset, type RedactHit, type RedactOptions, type RedactRule, type RedactTextResult, type RegionAsset, type RenderAsset, type RenderDocumentOptions, type RenderDocumentResult, type RenderFormat, type RenderObjectType, type RenderRegion, type RenderScene, type RenderSourceFormat, type RenderSvgOptions, type RenderSvgResult, SPACE_EM_FIXED, SPACE_EM_FONT, type ScanCell, type ScanParaKind, type ScanParagraph, type ScanTable, type ScenePage, type SceneRenderOptions, type SceneRenderResult, type SealOp, type SealPlacement, type SectionScan, type SpliceEdit, type TRange, type TableProfile, type TableRepresentation, type TableVisualPolicy, type TotalRowPosition, VERSION, type ValidateIssue, type ValidateResult, ValueCursor, type WarningCode, type WatchOptions, type WrapMode, type WrapResult, addMemoHwpx, agencyNames, agencyStyle, applySplices, blocksToChunks, blocksToMarkdown, blocksToPages, blocksToPdf, buildAgencyPack, buildParagraphSplices, buildRangeSplices, charWidthEm1000, chooseTableRepresentation, classifyTable, classifyTableTree, collectTableBlocks, compare, convertToHwpx, detectFormat, detectOle2Format, detectZipFormat, diffBlocks, extractClickHereFields, extractFormFields, extractFormSchema, extractRenderedRegions, extractTables, fillForm, fillFormFields, fillHwpx, fillWithUniqueGuard, fitRatioForFewerLines, flattenLayoutTables, formatFillValue, formatGateFinding, gongmunGate, gongmunLintWarnings, hasStructuredCellContent, hwpToHwpx, hwpxToProfile, incompatibleGongmunWarnings, inferFieldType, isHwpxFile, isKnownFont, isLabelCell, isOldHwpFile, isPdfFile, isZipFile, lintBlocks, lintBudgetText, lintGongmunText, lintLogicText, lintMuncheText, lintSlopText, loadAgencyPack, logicLintWarnings, markdownToHwpx, markdownToPdf, measureTextWidth, muncheLintWarnings, normalizeGongmunPreset, openHwpxDocument, packRoleWarnings, packSummary, packTemplate, parse, parseDocx, parseHwp, parseHwp3, parseHwpml, parseHwpx, parseImage, parsePdf, parsePptx, parseXls, parseXlsx, patchHwp, patchHwpx, patchHwpxBlocks, placeSealHwpx, placeTotalRow, readBuiltinTemplate, readBuiltinTemplateSample, redactMarkdown, redactText, renderDocument, renderDocumentToScene, renderHtml, renderHwp5Pages, renderHwpxToSvg, renderSceneToHtml, resolveBuiltinTemplate, resolvePackKind, runLintSuite, scanSectionXml, simulateWrap, simulateWrapKeepWord, slopLintWarnings, unknownFontWarnings, usesGaejosikMunche, usesLogicStructure, validateHwpx };
|
|
3050
|
+
export { AGENCY_COMMON_NAME, type AddMemoResult, type AgencyFont, type AgencyPack, type AgencyPressStyle, type AgencyReportStyle, type AgencyStyle, BUILTIN_TEMPLATES, type BlockCapability, type BlockCapabilityInfo, type BlockDiff, type BlockEdit, type BlockFinding, type BlockSourceRef, type BorderDef, type BorderFillDef, type BoundingBox, type BuiltinTemplate, type CellCapability, type CellContext, type CellDiff, type CellProfile, type CharPrDef, type ChunkOptions, type ClassifyContext, type ClickHereField, type ConvertToHwpxResult, DEFAULT_REDACT_RULES, type DiffChangeType, type DiffResult, type DocChunk, type DocumentMetadata, type DocumentQualitySummary, type ErrorCode, type ExtractRegionOptions, type ExtractTableVisualOptions, type ExtractedImage, type ExtractedTable, type ExtractedTableCrop, type FileType, type FillFormOutput, type FillInput, type FillOutputFormat, type FillResult, type FillValue, type FormField, type FormFieldSchema, type FormFieldType, type FormResult, type FormSchemaResult, type FormatProfile, type GongmunFont, type GongmunGateAxis, type GongmunGateFinding, type GongmunGateResult, type GongmunLintFinding, type GongmunNumbering, type GongmunOptions, type GongmunPreset, type GongmunPresetInput, type HwpToHwpxOptions, type HwpxFillResult, HwpxSession, type HwpxTheme, type HwpxToHwpOptions, type IRBlock, type IRBlockType, type IRCell, type IRTable, type ImageData, type InlineStyle, type LintBlock, type LintBlocksResult, type LintSuiteOptions, type LintSuiteResult, type MarkdownOptions, type MarkdownToHwpxOptions, type MeasureOptions, type MemoNote, type MemoOp, type MemoPlacement, type MuncheLineKind, type MuncheLintFinding, type OcrLine, type OcrModelFile, type OcrPageLines, type OcrProvider, type OutlineItem, PRESET_ALIAS, type PackKindInfo, type PackManifest, type PackSample, type PageBBox, type PageMargin, type PageMarkdown, type PageOptions, type PageQuality, type ParseFailure, type ParseOptions, type ParseResult, type ParseSuccess, type ParseWarning, type PatchOptions, type PatchResult, type PatchSkip, type PlaceSealResult, type PrintOptions, type PrintPreset, type RedactHit, type RedactOptions, type RedactRule, type RedactTextResult, type RegionAsset, type RenderAsset, type RenderDocumentOptions, type RenderDocumentResult, type RenderFormat, type RenderObjectType, type RenderRegion, type RenderScene, type RenderSourceFormat, type RenderSvgOptions, type RenderSvgResult, SPACE_EM_FIXED, SPACE_EM_FONT, type ScanCell, type ScanParaKind, type ScanParagraph, type ScanTable, type ScenePage, type SceneRenderOptions, type SceneRenderResult, type SealOp, type SealPlacement, type SectionScan, type SpliceEdit, type TRange, type TableProfile, type TableRepresentation, type TableVisualPolicy, type TotalRowPosition, VERSION, type ValidateIssue, type ValidateResult, ValueCursor, type WarningCode, type WatchOptions, type WrapMode, type WrapResult, addMemoHwpx, agencyNames, agencyStyle, applySplices, blocksToChunks, blocksToMarkdown, blocksToPages, blocksToPdf, buildAgencyPack, buildParagraphSplices, buildRangeSplices, charWidthEm1000, chooseTableRepresentation, classifyTable, classifyTableTree, collectTableBlocks, compare, convertToHwpx, detectFormat, detectOle2Format, detectZipFormat, diffBlocks, extractClickHereFields, extractFormFields, extractFormSchema, extractRenderedRegions, extractTables, fillForm, fillFormFields, fillHwpx, fillWithUniqueGuard, fitRatioForFewerLines, flattenLayoutTables, formatFillValue, formatGateFinding, gongmunGate, gongmunLintWarnings, hasStructuredCellContent, hwpToHwpx, hwpxToHwp, hwpxToProfile, incompatibleGongmunWarnings, inferFieldType, isHwpxFile, isKnownFont, isLabelCell, isOldHwpFile, isPdfFile, isZipFile, lintBlocks, lintBudgetText, lintGongmunText, lintLogicText, lintMuncheText, lintSlopText, loadAgencyPack, logicLintWarnings, markdownToHwpx, markdownToPdf, measureTextWidth, muncheLintWarnings, normalizeGongmunPreset, openHwpxDocument, packRoleWarnings, packSummary, packTemplate, parse, parseDocx, parseHwp, parseHwp3, parseHwpml, parseHwpx, parseImage, parsePdf, parsePptx, parseXls, parseXlsx, patchHwp, patchHwpx, patchHwpxBlocks, placeSealHwpx, placeTotalRow, readBuiltinTemplate, readBuiltinTemplateSample, redactMarkdown, redactText, renderDocument, renderDocumentToScene, renderHtml, renderHwp5Pages, renderHwpxToSvg, renderSceneToHtml, resolveBuiltinTemplate, resolvePackKind, runLintSuite, scanSectionXml, simulateWrap, simulateWrapKeepWord, slopLintWarnings, unknownFontWarnings, usesGaejosikMunche, usesLogicStructure, validateHwpx };
|
package/dist/index.js
CHANGED
|
@@ -48,13 +48,13 @@ import {
|
|
|
48
48
|
readRecords,
|
|
49
49
|
resolveImageBlocks,
|
|
50
50
|
unfilledClickHereGuide
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-5MXMBV4W.js";
|
|
52
52
|
import {
|
|
53
53
|
blocksToPages,
|
|
54
54
|
dropBlankImages,
|
|
55
55
|
readImageQrCodes,
|
|
56
56
|
wmfBitmap
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-ABOFK6HZ.js";
|
|
58
58
|
import {
|
|
59
59
|
parsePageRange
|
|
60
60
|
} from "./chunk-V4BH5SRQ.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
hasLibheif,
|
|
64
64
|
heicToRgba,
|
|
65
65
|
pcxToRgba
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-EM5OCOC6.js";
|
|
67
67
|
import {
|
|
68
68
|
WEBP_OPTIONS,
|
|
69
69
|
flushHeifCache,
|
|
@@ -247,7 +247,7 @@ import {
|
|
|
247
247
|
unescapeGfmCell,
|
|
248
248
|
warnInto,
|
|
249
249
|
wordHunks
|
|
250
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-UCRDNRX2.js";
|
|
251
251
|
import {
|
|
252
252
|
hwpEquationToLatex
|
|
253
253
|
} from "./chunk-MXAZLFEA.js";
|
|
@@ -277,7 +277,7 @@ import {
|
|
|
277
277
|
tidyScriptTags,
|
|
278
278
|
unframeLayoutTables,
|
|
279
279
|
wrapScript
|
|
280
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-WETI4A4A.js";
|
|
281
281
|
import {
|
|
282
282
|
BARE_URL,
|
|
283
283
|
KordocError,
|
|
@@ -298,7 +298,7 @@ import {
|
|
|
298
298
|
toArrayBuffer,
|
|
299
299
|
unescapeHtml,
|
|
300
300
|
unzipLimitBytes
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-SN3TFJAE.js";
|
|
302
302
|
|
|
303
303
|
// src/plain-markdown.ts
|
|
304
304
|
function toPlainMarkdown(md2) {
|
|
@@ -402,7 +402,7 @@ function htmlCellLinks(markdown) {
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
// src/index.ts
|
|
405
|
-
import { readFile as
|
|
405
|
+
import { readFile as readFile4 } from "fs/promises";
|
|
406
406
|
|
|
407
407
|
// src/hwpx/parser.ts
|
|
408
408
|
import JSZip2 from "jszip";
|
|
@@ -17924,7 +17924,7 @@ var MIN_SIDE = 24;
|
|
|
17924
17924
|
async function ocrEmbeddedImages(blocks, options, warnings) {
|
|
17925
17925
|
const ocr = options?.ocr;
|
|
17926
17926
|
if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
|
|
17927
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
17927
|
+
const { parseImageDocument } = await import("./image-ocr-3RDTZPUH.js");
|
|
17928
17928
|
let inserted = false, unreadable = 0;
|
|
17929
17929
|
let failed = null;
|
|
17930
17930
|
const walk = async (list, depth) => {
|
|
@@ -19165,6 +19165,51 @@ async function addMemoHwpx(hwpxBuffer, ops, now = /* @__PURE__ */ new Date()) {
|
|
|
19165
19165
|
return { buffer: out.buffer.slice(out.byteOffset, out.byteOffset + out.byteLength), placed };
|
|
19166
19166
|
}
|
|
19167
19167
|
|
|
19168
|
+
// src/hwpx/to-hwp.ts
|
|
19169
|
+
import { readFile } from "fs/promises";
|
|
19170
|
+
import { createRequire } from "module";
|
|
19171
|
+
var LOSS_LABEL = {
|
|
19172
|
+
binaryContentEmptied: "\uCCA8\uBD80 \uB0B4\uC6A9 \uBE44\uC6C0",
|
|
19173
|
+
controlOmitted: "\uAC1C\uCCB4 \uBE60\uC9D0",
|
|
19174
|
+
metadataReduced: "\uC18D\uC131 \uC904\uC5B4\uB4E6"
|
|
19175
|
+
};
|
|
19176
|
+
var loading = null;
|
|
19177
|
+
function loadRhwp() {
|
|
19178
|
+
loading ??= (async () => {
|
|
19179
|
+
let rhwp;
|
|
19180
|
+
try {
|
|
19181
|
+
rhwp = await import("@rhwp/core");
|
|
19182
|
+
} catch {
|
|
19183
|
+
throw new KordocError("HWP \uC800\uC7A5\uC5D0\uB294 @rhwp/core \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 (npm install @rhwp/core). HWPX \uB294 \uC5C6\uC774 \uB429\uB2C8\uB2E4");
|
|
19184
|
+
}
|
|
19185
|
+
await rhwp.default({ module_or_path: await readFile(createRequire(import.meta.url).resolve("@rhwp/core/rhwp_bg.wasm")) });
|
|
19186
|
+
return rhwp;
|
|
19187
|
+
})();
|
|
19188
|
+
loading.catch(() => {
|
|
19189
|
+
loading = null;
|
|
19190
|
+
});
|
|
19191
|
+
return loading;
|
|
19192
|
+
}
|
|
19193
|
+
async function hwpxToHwp(hwpx, options) {
|
|
19194
|
+
const { HwpDocument } = await loadRhwp();
|
|
19195
|
+
const doc = new HwpDocument(hwpx instanceof Uint8Array ? hwpx : new Uint8Array(hwpx));
|
|
19196
|
+
try {
|
|
19197
|
+
const out = doc.exportHwpWithReport();
|
|
19198
|
+
try {
|
|
19199
|
+
const losses = JSON.parse(out.contentLoss()).losses ?? [];
|
|
19200
|
+
if (losses.length && options?.warnings) {
|
|
19201
|
+
const kinds = [...new Set(losses.map((l) => `${LOSS_LABEL[l.code ?? ""] ?? l.code}${l.subject ? `(${l.subject})` : ""}`))];
|
|
19202
|
+
options.warnings.push(`HWP \uB85C \uC62E\uAE30\uBA70 \uBE60\uC9C4 \uB0B4\uC6A9 ${losses.length}\uAC74: ${kinds.join(", ")}`);
|
|
19203
|
+
}
|
|
19204
|
+
return out.takeBytes();
|
|
19205
|
+
} finally {
|
|
19206
|
+
out.free();
|
|
19207
|
+
}
|
|
19208
|
+
} finally {
|
|
19209
|
+
doc.free();
|
|
19210
|
+
}
|
|
19211
|
+
}
|
|
19212
|
+
|
|
19168
19213
|
// src/hwpx/agency-pack.ts
|
|
19169
19214
|
import JSZip10 from "jszip";
|
|
19170
19215
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -22629,7 +22674,7 @@ async function resolveSectionEntryNames(zip) {
|
|
|
22629
22674
|
|
|
22630
22675
|
// src/roundtrip/hwp5-patch.ts
|
|
22631
22676
|
import { deflateRawSync as deflateRawSync2 } from "zlib";
|
|
22632
|
-
import { createRequire } from "module";
|
|
22677
|
+
import { createRequire as createRequire2 } from "module";
|
|
22633
22678
|
|
|
22634
22679
|
// src/roundtrip/line-break-edit.ts
|
|
22635
22680
|
function paraTokens(para, xml, base = 0) {
|
|
@@ -23750,7 +23795,7 @@ function stageLineSegs(scan, para, newHeader, newRaw, startUnits, nChars, keepLi
|
|
|
23750
23795
|
}
|
|
23751
23796
|
|
|
23752
23797
|
// src/roundtrip/hwp5-patch.ts
|
|
23753
|
-
var require2 =
|
|
23798
|
+
var require2 = createRequire2(import.meta.url);
|
|
23754
23799
|
var CFB = require2("cfb");
|
|
23755
23800
|
var TAG_PARA_LINE_SEG2 = 69;
|
|
23756
23801
|
function cid(s) {
|
|
@@ -33760,7 +33805,7 @@ function renderHwp5Pages(input, options, select) {
|
|
|
33760
33805
|
}
|
|
33761
33806
|
|
|
33762
33807
|
// src/render/document.ts
|
|
33763
|
-
import { readFile } from "fs/promises";
|
|
33808
|
+
import { readFile as readFile2 } from "fs/promises";
|
|
33764
33809
|
|
|
33765
33810
|
// src/render/html.ts
|
|
33766
33811
|
function renderSceneToHtml(scene, pageSvgs, options = {}) {
|
|
@@ -33883,7 +33928,7 @@ async function renderHtmlToPdf(html, options = {}) {
|
|
|
33883
33928
|
async function loadBuffer(input) {
|
|
33884
33929
|
if (typeof input === "string") {
|
|
33885
33930
|
try {
|
|
33886
|
-
return toArrayBuffer(await
|
|
33931
|
+
return toArrayBuffer(await readFile2(input));
|
|
33887
33932
|
} catch (err) {
|
|
33888
33933
|
const code = err instanceof Error && "code" in err ? err.code : void 0;
|
|
33889
33934
|
throw new KordocError(code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`);
|
|
@@ -33989,7 +34034,7 @@ async function extractRenderedRegions(input, options = {}) {
|
|
|
33989
34034
|
}
|
|
33990
34035
|
|
|
33991
34036
|
// src/table/visual.ts
|
|
33992
|
-
import { readFile as
|
|
34037
|
+
import { readFile as readFile3 } from "fs/promises";
|
|
33993
34038
|
function wantsCrop(kind, policy) {
|
|
33994
34039
|
if (policy === "none") return false;
|
|
33995
34040
|
if (policy === "all") return true;
|
|
@@ -33998,7 +34043,7 @@ function wantsCrop(kind, policy) {
|
|
|
33998
34043
|
}
|
|
33999
34044
|
async function extractTables(input, options = {}) {
|
|
34000
34045
|
const policy = options.policy ?? "non-tabular-and-uncertain";
|
|
34001
|
-
const buffer = typeof input === "string" ? toArrayBuffer(await
|
|
34046
|
+
const buffer = typeof input === "string" ? toArrayBuffer(await readFile3(input)) : Buffer.isBuffer(input) ? toArrayBuffer(input) : input;
|
|
34002
34047
|
const parsed = await parse(buffer, { classifyTables: true, layoutTables: "keep" });
|
|
34003
34048
|
if (!parsed.success) throw new KordocError(`\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
|
|
34004
34049
|
const blocks = collectTableBlocks(parsed.blocks);
|
|
@@ -34066,7 +34111,7 @@ async function parse(input, options) {
|
|
|
34066
34111
|
if (ocrOptionError) return { success: false, fileType: "unknown", error: ocrOptionError };
|
|
34067
34112
|
if (typeof input === "string") {
|
|
34068
34113
|
try {
|
|
34069
|
-
const buf = await
|
|
34114
|
+
const buf = await readFile4(input);
|
|
34070
34115
|
buffer = toArrayBuffer(buf);
|
|
34071
34116
|
} catch (err) {
|
|
34072
34117
|
const msg2 = err instanceof Error && "code" in err && err.code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`;
|
|
@@ -34186,7 +34231,7 @@ var MAX_MULTIPAGE_PIXELS = 1e9;
|
|
|
34186
34231
|
var MIN_PAGE_PIXELS = 1e6;
|
|
34187
34232
|
async function parseImage(buffer, options) {
|
|
34188
34233
|
try {
|
|
34189
|
-
const { parseImageDocument, imagePageCount, imagePage, imagePagePixels } = await import("./image-ocr-
|
|
34234
|
+
const { parseImageDocument, imagePageCount, imagePage, imagePagePixels } = await import("./image-ocr-3RDTZPUH.js");
|
|
34190
34235
|
const pageCount = await imagePageCount(buffer);
|
|
34191
34236
|
const wanted = pageCount > 1 && options?.pages ? parsePageRange(options.pages, pageCount) : null;
|
|
34192
34237
|
const blocks = [], warnings = [], lines = [], images = [];
|
|
@@ -34283,7 +34328,7 @@ async function parseHwp(buffer, options) {
|
|
|
34283
34328
|
async function parsePdf(buffer, options) {
|
|
34284
34329
|
let parsePdfDocument;
|
|
34285
34330
|
try {
|
|
34286
|
-
const mod = await import("./parser-
|
|
34331
|
+
const mod = await import("./parser-FB6NSUTI.js");
|
|
34287
34332
|
parsePdfDocument = mod.parsePdfDocument;
|
|
34288
34333
|
} catch {
|
|
34289
34334
|
return {
|
|
@@ -34350,7 +34395,7 @@ async function parseHwpml(buffer, options) {
|
|
|
34350
34395
|
async function fillForm(input, values, outputFormat = "markdown") {
|
|
34351
34396
|
let buffer;
|
|
34352
34397
|
if (typeof input === "string") {
|
|
34353
|
-
const buf = await
|
|
34398
|
+
const buf = await readFile4(input);
|
|
34354
34399
|
buffer = toArrayBuffer(buf);
|
|
34355
34400
|
} else if (Buffer.isBuffer(input)) {
|
|
34356
34401
|
buffer = toArrayBuffer(input);
|
|
@@ -34365,7 +34410,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
|
|
|
34365
34410
|
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})`);
|
|
34366
34411
|
}
|
|
34367
34412
|
} else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
|
|
34368
|
-
const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-
|
|
34413
|
+
const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-QOAFYHV3.js");
|
|
34369
34414
|
const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
|
|
34370
34415
|
buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
|
|
34371
34416
|
} else {
|
|
@@ -34439,6 +34484,7 @@ export {
|
|
|
34439
34484
|
gongmunLintWarnings,
|
|
34440
34485
|
hasStructuredCellContent,
|
|
34441
34486
|
hwpToHwpx,
|
|
34487
|
+
hwpxToHwp,
|
|
34442
34488
|
hwpxToProfile,
|
|
34443
34489
|
incompatibleGongmunWarnings,
|
|
34444
34490
|
inferFieldType,
|