@clazic/kordoc 2.3.1 → 2.3.3
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/dist/{batch-provider-PCT4I4LK.js → batch-provider-PNDCSGQW.js} +3 -4
- package/dist/batch-provider-PNDCSGQW.js.map +1 -0
- package/dist/chunk-4PP34NVQ.js +121 -0
- package/dist/chunk-4PP34NVQ.js.map +1 -0
- package/dist/{tesseract-provider-WCVJWBUT.js → chunk-7FMKAV4P.js} +4 -4
- package/dist/{tesseract-provider-WCVJWBUT.js.map → chunk-7FMKAV4P.js.map} +1 -1
- package/dist/chunk-JOGAFNIL.js +153 -0
- package/dist/chunk-JOGAFNIL.js.map +1 -0
- package/dist/{chunk-W5KUC23B.js → chunk-NU3KFVVZ.js} +2 -2
- package/dist/{chunk-ZOEUKD77.js → chunk-UDFKY7CH.js} +204 -49
- package/dist/chunk-UDFKY7CH.js.map +1 -0
- package/dist/cli.js +8 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +230 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +230 -72
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +5 -2
- package/dist/mcp.js.map +1 -1
- package/dist/{provider-WYHC4NHI.js → provider-HE727F7Z.js} +19 -131
- package/dist/provider-HE727F7Z.js.map +1 -0
- package/dist/resolve-UOAOPQ4H.js +111 -0
- package/dist/resolve-UOAOPQ4H.js.map +1 -0
- package/dist/tesseract-provider-MNMZPSGF.js +11 -0
- package/dist/{utils-HSF5HI5T.js → utils-STJT6CFC.js} +2 -2
- package/dist/utils-STJT6CFC.js.map +1 -0
- package/dist/{watch-R2JHXDGF.js → watch-PRQGLOW3.js} +6 -3
- package/dist/{watch-R2JHXDGF.js.map → watch-PRQGLOW3.js.map} +1 -1
- package/package.json +8 -8
- package/dist/batch-provider-PCT4I4LK.js.map +0 -1
- package/dist/chunk-ZOEUKD77.js.map +0 -1
- package/dist/provider-WYHC4NHI.js.map +0 -1
- package/dist/resolve-4FSAQF2S.js +0 -247
- package/dist/resolve-4FSAQF2S.js.map +0 -1
- /package/dist/{chunk-W5KUC23B.js.map → chunk-NU3KFVVZ.js.map} +0 -0
- /package/dist/{utils-HSF5HI5T.js.map → tesseract-provider-MNMZPSGF.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import JSZip from 'jszip';
|
|
2
|
+
|
|
1
3
|
/** kordoc 공통 타입 정의 */
|
|
2
4
|
interface CellContext {
|
|
3
5
|
text: string;
|
|
@@ -141,8 +143,8 @@ interface OutlineItem {
|
|
|
141
143
|
pageNumber?: number;
|
|
142
144
|
}
|
|
143
145
|
/** 구조화된 에러 코드 — 프로그래밍적 에러 핸들링용 */
|
|
144
|
-
type ErrorCode = "EMPTY_INPUT" | "UNSUPPORTED_FORMAT" | "ENCRYPTED" | "DRM_PROTECTED" | "CORRUPTED" | "DECOMPRESSION_BOMB" | "ZIP_BOMB" | "IMAGE_BASED_PDF" | "NO_SECTIONS" | "PARSE_ERROR";
|
|
145
|
-
type FileType = "hwpx" | "hwp" | "pdf" | "xlsx" | "docx" | "unknown";
|
|
146
|
+
type ErrorCode = "EMPTY_INPUT" | "UNSUPPORTED_FORMAT" | "ENCRYPTED" | "DRM_PROTECTED" | "CORRUPTED" | "DECOMPRESSION_BOMB" | "ZIP_BOMB" | "IMAGE_BASED_PDF" | "NO_SECTIONS" | "PARSE_ERROR" | "FILE_TOO_LARGE";
|
|
147
|
+
type FileType = "hwpx" | "hwp" | "pdf" | "xlsx" | "docx" | "image" | "unknown";
|
|
146
148
|
interface ParseResultBase {
|
|
147
149
|
fileType: FileType;
|
|
148
150
|
/** 페이지/섹션 수 — PDF: 실제 페이지 수, HWP/HWPX: 섹션 수, XLSX: 시트 수 */
|
|
@@ -309,7 +311,10 @@ declare function detectFormat(buffer: ArrayBuffer): FileType;
|
|
|
309
311
|
* ZIP 내부 구조 기반 포맷 세분화.
|
|
310
312
|
* HWPX, XLSX, DOCX 모두 ZIP이므로 내부 파일로 구분.
|
|
311
313
|
*/
|
|
312
|
-
declare function detectZipFormat(buffer: ArrayBuffer): Promise<
|
|
314
|
+
declare function detectZipFormat(buffer: ArrayBuffer): Promise<{
|
|
315
|
+
format: "hwpx" | "xlsx" | "docx" | "unknown";
|
|
316
|
+
zip: JSZip | null;
|
|
317
|
+
}>;
|
|
313
318
|
|
|
314
319
|
/** 2-pass colSpan/rowSpan 테이블 빌더 및 Markdown 변환 */
|
|
315
320
|
|
|
@@ -338,14 +343,14 @@ declare const VERSION: string;
|
|
|
338
343
|
*/
|
|
339
344
|
declare function parse(input: string | ArrayBuffer | Buffer, options?: ParseOptions): Promise<ParseResult>;
|
|
340
345
|
/** HWPX 파일을 Markdown으로 변환 */
|
|
341
|
-
declare function parseHwpx(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
346
|
+
declare function parseHwpx(buffer: ArrayBuffer, options?: ParseOptions, zip?: JSZip): Promise<ParseResult>;
|
|
342
347
|
/** HWP 5.x 바이너리 파일을 Markdown으로 변환 */
|
|
343
348
|
declare function parseHwp(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
344
349
|
/** PDF 파일에서 텍스트를 추출하여 Markdown으로 변환 */
|
|
345
350
|
declare function parsePdf(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
346
351
|
/** XLSX 파일을 Markdown으로 변환 */
|
|
347
|
-
declare function parseXlsx(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
352
|
+
declare function parseXlsx(buffer: ArrayBuffer, options?: ParseOptions, zip?: JSZip): Promise<ParseResult>;
|
|
348
353
|
/** DOCX 파일을 Markdown으로 변환 */
|
|
349
|
-
declare function parseDocx(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
354
|
+
declare function parseDocx(buffer: ArrayBuffer, options?: ParseOptions, zip?: JSZip): Promise<ParseResult>;
|
|
350
355
|
|
|
351
356
|
export { type BlockDiff, type BoundingBox, type CellContext, type CellDiff, type DiffChangeType, type DiffResult, type DocumentMetadata, type ErrorCode, type ExtractedImage, type FileType, type FormField, type FormResult, type IRBlock, type IRBlockType, type IRCell, type IRTable, type ImageData, type InlineStyle, type MarkdownToXlsxOptions, type OcrMode, type OcrProvider, type OutlineItem, type ParseFailure, type ParseOptions, type ParseResult, type ParseSuccess, type ParseWarning, type StructuredOcrResult, VERSION, type WarningCode, type WatchOptions, blocksToMarkdown, compare, detectFormat, detectZipFormat, diffBlocks, extractFormFields, isHwpxFile, isOldHwpFile, isPdfFile, isZipFile, markdownToHwpx, markdownToXlsx, parse, parseDocx, parseHwp, parseHwpx, parsePdf, parseXlsx };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import JSZip from 'jszip';
|
|
2
|
+
|
|
1
3
|
/** kordoc 공통 타입 정의 */
|
|
2
4
|
interface CellContext {
|
|
3
5
|
text: string;
|
|
@@ -141,8 +143,8 @@ interface OutlineItem {
|
|
|
141
143
|
pageNumber?: number;
|
|
142
144
|
}
|
|
143
145
|
/** 구조화된 에러 코드 — 프로그래밍적 에러 핸들링용 */
|
|
144
|
-
type ErrorCode = "EMPTY_INPUT" | "UNSUPPORTED_FORMAT" | "ENCRYPTED" | "DRM_PROTECTED" | "CORRUPTED" | "DECOMPRESSION_BOMB" | "ZIP_BOMB" | "IMAGE_BASED_PDF" | "NO_SECTIONS" | "PARSE_ERROR";
|
|
145
|
-
type FileType = "hwpx" | "hwp" | "pdf" | "xlsx" | "docx" | "unknown";
|
|
146
|
+
type ErrorCode = "EMPTY_INPUT" | "UNSUPPORTED_FORMAT" | "ENCRYPTED" | "DRM_PROTECTED" | "CORRUPTED" | "DECOMPRESSION_BOMB" | "ZIP_BOMB" | "IMAGE_BASED_PDF" | "NO_SECTIONS" | "PARSE_ERROR" | "FILE_TOO_LARGE";
|
|
147
|
+
type FileType = "hwpx" | "hwp" | "pdf" | "xlsx" | "docx" | "image" | "unknown";
|
|
146
148
|
interface ParseResultBase {
|
|
147
149
|
fileType: FileType;
|
|
148
150
|
/** 페이지/섹션 수 — PDF: 실제 페이지 수, HWP/HWPX: 섹션 수, XLSX: 시트 수 */
|
|
@@ -309,7 +311,10 @@ declare function detectFormat(buffer: ArrayBuffer): FileType;
|
|
|
309
311
|
* ZIP 내부 구조 기반 포맷 세분화.
|
|
310
312
|
* HWPX, XLSX, DOCX 모두 ZIP이므로 내부 파일로 구분.
|
|
311
313
|
*/
|
|
312
|
-
declare function detectZipFormat(buffer: ArrayBuffer): Promise<
|
|
314
|
+
declare function detectZipFormat(buffer: ArrayBuffer): Promise<{
|
|
315
|
+
format: "hwpx" | "xlsx" | "docx" | "unknown";
|
|
316
|
+
zip: JSZip | null;
|
|
317
|
+
}>;
|
|
313
318
|
|
|
314
319
|
/** 2-pass colSpan/rowSpan 테이블 빌더 및 Markdown 변환 */
|
|
315
320
|
|
|
@@ -338,14 +343,14 @@ declare const VERSION: string;
|
|
|
338
343
|
*/
|
|
339
344
|
declare function parse(input: string | ArrayBuffer | Buffer, options?: ParseOptions): Promise<ParseResult>;
|
|
340
345
|
/** HWPX 파일을 Markdown으로 변환 */
|
|
341
|
-
declare function parseHwpx(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
346
|
+
declare function parseHwpx(buffer: ArrayBuffer, options?: ParseOptions, zip?: JSZip): Promise<ParseResult>;
|
|
342
347
|
/** HWP 5.x 바이너리 파일을 Markdown으로 변환 */
|
|
343
348
|
declare function parseHwp(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
344
349
|
/** PDF 파일에서 텍스트를 추출하여 Markdown으로 변환 */
|
|
345
350
|
declare function parsePdf(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
346
351
|
/** XLSX 파일을 Markdown으로 변환 */
|
|
347
|
-
declare function parseXlsx(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
352
|
+
declare function parseXlsx(buffer: ArrayBuffer, options?: ParseOptions, zip?: JSZip): Promise<ParseResult>;
|
|
348
353
|
/** DOCX 파일을 Markdown으로 변환 */
|
|
349
|
-
declare function parseDocx(buffer: ArrayBuffer, options?: ParseOptions): Promise<ParseResult>;
|
|
354
|
+
declare function parseDocx(buffer: ArrayBuffer, options?: ParseOptions, zip?: JSZip): Promise<ParseResult>;
|
|
350
355
|
|
|
351
356
|
export { type BlockDiff, type BoundingBox, type CellContext, type CellDiff, type DiffChangeType, type DiffResult, type DocumentMetadata, type ErrorCode, type ExtractedImage, type FileType, type FormField, type FormResult, type IRBlock, type IRBlockType, type IRCell, type IRTable, type ImageData, type InlineStyle, type MarkdownToXlsxOptions, type OcrMode, type OcrProvider, type OutlineItem, type ParseFailure, type ParseOptions, type ParseResult, type ParseSuccess, type ParseWarning, type StructuredOcrResult, VERSION, type WarningCode, type WatchOptions, blocksToMarkdown, compare, detectFormat, detectZipFormat, diffBlocks, extractFormFields, isHwpxFile, isOldHwpFile, isPdfFile, isZipFile, markdownToHwpx, markdownToXlsx, parse, parseDocx, parseHwp, parseHwpx, parsePdf, parseXlsx };
|