hwp2md 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +7 -0
- package/README.md +174 -0
- package/dist/browser.d.mts +179 -0
- package/dist/browser.d.mts.map +1 -0
- package/dist/browser.mjs +27 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +687 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/converter-C0C25ssg.mjs +3 -0
- package/dist/converter-D6LrZNSL.mjs +4804 -0
- package/dist/converter-D6LrZNSL.mjs.map +1 -0
- package/dist/index.cjs +1200 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +454 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +454 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1126 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +92 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* HWP File Header Information
|
|
4
|
+
*/
|
|
5
|
+
interface FileHeader {
|
|
6
|
+
signature: string;
|
|
7
|
+
version: string;
|
|
8
|
+
isCompressed: boolean;
|
|
9
|
+
isEncrypted: boolean;
|
|
10
|
+
rawProperties: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Binary Record Structure
|
|
14
|
+
*/
|
|
15
|
+
interface Record$1 {
|
|
16
|
+
tagId: number;
|
|
17
|
+
level: number;
|
|
18
|
+
data: Uint8Array;
|
|
19
|
+
size: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Paragraph Header Information
|
|
23
|
+
*/
|
|
24
|
+
interface ParagraphHeader {
|
|
25
|
+
textCount: number;
|
|
26
|
+
controlMask: number;
|
|
27
|
+
paraShapeId: number;
|
|
28
|
+
styleId: number;
|
|
29
|
+
columnType: number;
|
|
30
|
+
charShapeCount: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parsed Paragraph
|
|
34
|
+
*/
|
|
35
|
+
interface Paragraph {
|
|
36
|
+
text: string;
|
|
37
|
+
header: ParagraphHeader;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Table Cell
|
|
41
|
+
*/
|
|
42
|
+
interface Cell {
|
|
43
|
+
row: number;
|
|
44
|
+
col: number;
|
|
45
|
+
rowspan: number;
|
|
46
|
+
colspan: number;
|
|
47
|
+
text: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Parsed Table
|
|
51
|
+
*/
|
|
52
|
+
interface Table {
|
|
53
|
+
rows: number;
|
|
54
|
+
cols: number;
|
|
55
|
+
cells: Cell[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Conversion Options
|
|
59
|
+
*/
|
|
60
|
+
interface ConvertOptions {
|
|
61
|
+
tableLineBreakStyle?: "space" | "br";
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Merge Strategy for Table Cells
|
|
65
|
+
*/
|
|
66
|
+
type MergeStrategy = "repeat" | "blank";
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/parser.d.ts
|
|
69
|
+
/**
|
|
70
|
+
* HWP File Parser
|
|
71
|
+
* Reads and parses HWP 5.0 files using OLE Compound File format
|
|
72
|
+
*/
|
|
73
|
+
declare class HWPFile {
|
|
74
|
+
private data;
|
|
75
|
+
private cfb;
|
|
76
|
+
private _fileHeader;
|
|
77
|
+
private _isCompressed;
|
|
78
|
+
/**
|
|
79
|
+
* Create HWPFile from raw data
|
|
80
|
+
* @param data - Raw HWP file data
|
|
81
|
+
*/
|
|
82
|
+
constructor(data: Uint8Array | ArrayBuffer);
|
|
83
|
+
/**
|
|
84
|
+
* Create HWPFile from file path (Node.js only)
|
|
85
|
+
* @param path - Path to HWP file
|
|
86
|
+
*/
|
|
87
|
+
static fromFile(path: string): Promise<HWPFile>;
|
|
88
|
+
/**
|
|
89
|
+
* Create HWPFile from ArrayBuffer
|
|
90
|
+
* @param data - ArrayBuffer data
|
|
91
|
+
*/
|
|
92
|
+
static fromArrayBuffer(data: ArrayBuffer): HWPFile;
|
|
93
|
+
/**
|
|
94
|
+
* Create HWPFile from Uint8Array
|
|
95
|
+
* @param data - Uint8Array data
|
|
96
|
+
*/
|
|
97
|
+
static fromUint8Array(data: Uint8Array): HWPFile;
|
|
98
|
+
/**
|
|
99
|
+
* Open and parse HWP file
|
|
100
|
+
*/
|
|
101
|
+
open(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Close HWP file and release resources
|
|
104
|
+
*/
|
|
105
|
+
close(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Get file header information
|
|
108
|
+
*/
|
|
109
|
+
get fileHeader(): FileHeader | null;
|
|
110
|
+
/**
|
|
111
|
+
* Check if file is compressed
|
|
112
|
+
*/
|
|
113
|
+
get isCompressed(): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Parse FileHeader stream (256 bytes fixed)
|
|
116
|
+
*/
|
|
117
|
+
private parseFileHeader;
|
|
118
|
+
/**
|
|
119
|
+
* Read and decompress stream
|
|
120
|
+
* @param streamPath - Stream path (e.g., 'DocInfo', 'BodyText/Section0')
|
|
121
|
+
* @returns Decompressed data or null if stream doesn't exist
|
|
122
|
+
*/
|
|
123
|
+
readStream(streamPath: string): Uint8Array | null;
|
|
124
|
+
/**
|
|
125
|
+
* List all streams in HWP file
|
|
126
|
+
* @returns Array of stream paths
|
|
127
|
+
*/
|
|
128
|
+
listStreams(): string[][];
|
|
129
|
+
/**
|
|
130
|
+
* Get file information
|
|
131
|
+
*/
|
|
132
|
+
getFileInfo(): Record<string, unknown>;
|
|
133
|
+
/**
|
|
134
|
+
* Get number of sections in BodyText
|
|
135
|
+
*/
|
|
136
|
+
getSectionCount(): number;
|
|
137
|
+
/**
|
|
138
|
+
* Read section data
|
|
139
|
+
* @param sectionIndex - Section index (0-based)
|
|
140
|
+
* @returns Decompressed section data
|
|
141
|
+
*/
|
|
142
|
+
readSection(sectionIndex: number): Uint8Array | null;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/record.d.ts
|
|
146
|
+
declare const HWPTAG_BEGIN = 16;
|
|
147
|
+
declare const HWPTAG_DOCUMENT_PROPERTIES = 16;
|
|
148
|
+
declare const HWPTAG_ID_MAPPINGS = 17;
|
|
149
|
+
declare const HWPTAG_BIN_DATA = 18;
|
|
150
|
+
declare const HWPTAG_FACE_NAME = 19;
|
|
151
|
+
declare const HWPTAG_BORDER_FILL = 20;
|
|
152
|
+
declare const HWPTAG_CHAR_SHAPE = 21;
|
|
153
|
+
declare const HWPTAG_TAB_DEF = 22;
|
|
154
|
+
declare const HWPTAG_NUMBERING = 23;
|
|
155
|
+
declare const HWPTAG_BULLET = 24;
|
|
156
|
+
declare const HWPTAG_PARA_SHAPE = 25;
|
|
157
|
+
declare const HWPTAG_STYLE = 26;
|
|
158
|
+
declare const HWPTAG_PARA_HEADER: number;
|
|
159
|
+
declare const HWPTAG_PARA_TEXT: number;
|
|
160
|
+
declare const HWPTAG_PARA_CHAR_SHAPE: number;
|
|
161
|
+
declare const HWPTAG_PARA_LINE_SEG: number;
|
|
162
|
+
declare const HWPTAG_PARA_RANGE_TAG: number;
|
|
163
|
+
declare const HWPTAG_CTRL_HEADER: number;
|
|
164
|
+
declare const HWPTAG_LIST_HEADER: number;
|
|
165
|
+
declare const HWPTAG_PAGE_DEF: number;
|
|
166
|
+
declare const HWPTAG_FOOTNOTE_SHAPE: number;
|
|
167
|
+
declare const HWPTAG_PAGE_BORDER_FILL: number;
|
|
168
|
+
declare const HWPTAG_SHAPE_COMPONENT: number;
|
|
169
|
+
declare const HWPTAG_TABLE: number;
|
|
170
|
+
declare const HWPTAG_SHAPE_COMPONENT_LINE: number;
|
|
171
|
+
declare const HWPTAG_CTRL_DATA: number;
|
|
172
|
+
/**
|
|
173
|
+
* HWP Record Reader
|
|
174
|
+
* Reads binary records from HWP stream data
|
|
175
|
+
*/
|
|
176
|
+
declare class RecordReader {
|
|
177
|
+
private data;
|
|
178
|
+
private offset;
|
|
179
|
+
constructor(data: Uint8Array);
|
|
180
|
+
/**
|
|
181
|
+
* Check if there are more records to read
|
|
182
|
+
*/
|
|
183
|
+
hasMore(): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Read next record
|
|
186
|
+
* @returns Next record, or null if no more records
|
|
187
|
+
*/
|
|
188
|
+
readRecord(): Record$1 | null;
|
|
189
|
+
/**
|
|
190
|
+
* Peek at next record header without consuming it
|
|
191
|
+
* @returns Header info with tagId, level, size
|
|
192
|
+
*/
|
|
193
|
+
peekRecordHeader(): {
|
|
194
|
+
tagId: number;
|
|
195
|
+
level: number;
|
|
196
|
+
size: number;
|
|
197
|
+
} | null;
|
|
198
|
+
/**
|
|
199
|
+
* Read all records (considering hierarchy)
|
|
200
|
+
* @param parentLevel - Stop when reaching this level or below
|
|
201
|
+
* @returns All records at current level
|
|
202
|
+
*/
|
|
203
|
+
readAllRecords(parentLevel?: number): Record$1[];
|
|
204
|
+
/**
|
|
205
|
+
* Get current position
|
|
206
|
+
*/
|
|
207
|
+
get position(): number;
|
|
208
|
+
/**
|
|
209
|
+
* Get remaining bytes
|
|
210
|
+
*/
|
|
211
|
+
get remaining(): number;
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/paragraph.d.ts
|
|
215
|
+
/**
|
|
216
|
+
* Parse paragraph header
|
|
217
|
+
* @param data - PARA_HEADER record data
|
|
218
|
+
* @returns Paragraph header information
|
|
219
|
+
*/
|
|
220
|
+
declare function parseParaHeader(data: Uint8Array): ParagraphHeader;
|
|
221
|
+
/**
|
|
222
|
+
* Parse paragraph text with control info table
|
|
223
|
+
*
|
|
224
|
+
* PARA_TEXT structure:
|
|
225
|
+
* [Control info table: 16 bytes per control] + [Actual text]
|
|
226
|
+
*
|
|
227
|
+
* Each control info block (16 bytes):
|
|
228
|
+
* - 2 bytes: control code
|
|
229
|
+
* - 4 bytes: control ID
|
|
230
|
+
* - 8 bytes: control data
|
|
231
|
+
* - 2 bytes: control code (repeated)
|
|
232
|
+
*
|
|
233
|
+
* @param data - PARA_TEXT record data
|
|
234
|
+
* @param nchars - Number of WCHAR characters (control table + text)
|
|
235
|
+
* @returns Decoded text
|
|
236
|
+
*/
|
|
237
|
+
declare function parseParaText(data: Uint8Array, _nchars: number): string;
|
|
238
|
+
/**
|
|
239
|
+
* Process control characters in text
|
|
240
|
+
* @param text - Raw text with control characters
|
|
241
|
+
* @returns Processed text and has_table flag
|
|
242
|
+
*/
|
|
243
|
+
declare function processControlChars(text: string): {
|
|
244
|
+
text: string;
|
|
245
|
+
hasTable: boolean;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Paragraph Parser
|
|
249
|
+
* Parses paragraphs from HWP record stream
|
|
250
|
+
*/
|
|
251
|
+
declare class ParagraphParser {
|
|
252
|
+
private reader;
|
|
253
|
+
private options;
|
|
254
|
+
constructor(reader: RecordReader, options?: ConvertOptions);
|
|
255
|
+
/**
|
|
256
|
+
* Parse next paragraph
|
|
257
|
+
* @returns Parsed paragraph, or null if no more paragraphs
|
|
258
|
+
*/
|
|
259
|
+
parseParagraph(): Paragraph | null;
|
|
260
|
+
/**
|
|
261
|
+
* Parse all paragraphs in section
|
|
262
|
+
* @returns All paragraphs
|
|
263
|
+
*/
|
|
264
|
+
parseAllParagraphs(): Paragraph[];
|
|
265
|
+
}
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/table.d.ts
|
|
268
|
+
/**
|
|
269
|
+
* Parse table properties from TABLE record data
|
|
270
|
+
* @param data - TABLE record data
|
|
271
|
+
* @returns Table properties with rows, cols
|
|
272
|
+
*/
|
|
273
|
+
declare function parseTableProperties(data: Uint8Array): {
|
|
274
|
+
properties: number;
|
|
275
|
+
rows: number;
|
|
276
|
+
cols: number;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Parse cell properties
|
|
280
|
+
* @param data - Cell property data
|
|
281
|
+
* @returns Cell properties
|
|
282
|
+
*/
|
|
283
|
+
declare function parseCellProperties(data: Uint8Array): {
|
|
284
|
+
col: number;
|
|
285
|
+
row: number;
|
|
286
|
+
colspan: number;
|
|
287
|
+
rowspan: number;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Parse table from TABLE record and subsequent records
|
|
291
|
+
* @param tableRecordData - TABLE record data
|
|
292
|
+
* @param reader - Record reader for reading cell data
|
|
293
|
+
* @param lineBreakStyle - How to handle line breaks in cells
|
|
294
|
+
* @returns Parsed table
|
|
295
|
+
*/
|
|
296
|
+
declare function parseTable(tableRecordData: Uint8Array, reader: RecordReader, lineBreakStyle?: "space" | "br"): Table;
|
|
297
|
+
/**
|
|
298
|
+
* Convert table to Markdown
|
|
299
|
+
* @param table - Table object
|
|
300
|
+
* @param mergeStrategy - 'repeat' (default) or 'blank'
|
|
301
|
+
* @returns Markdown table
|
|
302
|
+
*/
|
|
303
|
+
declare function tableToMarkdown(table: Table, mergeStrategy?: MergeStrategy): string;
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/hwpx_parser.d.ts
|
|
306
|
+
/**
|
|
307
|
+
* HWPX file parser
|
|
308
|
+
*/
|
|
309
|
+
declare class HWPXFile {
|
|
310
|
+
private data;
|
|
311
|
+
private entries;
|
|
312
|
+
private sectionPaths;
|
|
313
|
+
private version;
|
|
314
|
+
private xmlParser;
|
|
315
|
+
constructor(data: Uint8Array);
|
|
316
|
+
static fromFile(path: string): Promise<HWPXFile>;
|
|
317
|
+
static fromArrayBuffer(data: ArrayBuffer): HWPXFile;
|
|
318
|
+
static fromUint8Array(data: Uint8Array): HWPXFile;
|
|
319
|
+
open(): void;
|
|
320
|
+
close(): void;
|
|
321
|
+
private parseVersion;
|
|
322
|
+
private discoverSections;
|
|
323
|
+
get fileInfo(): Record<string, unknown>;
|
|
324
|
+
getSectionCount(): number;
|
|
325
|
+
getSectionXml(index: number): unknown;
|
|
326
|
+
listContents(): string[];
|
|
327
|
+
private ensureOpen;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Parse a table XML object (hp:tbl) into a Table
|
|
331
|
+
*/
|
|
332
|
+
declare function parseHwpxTable(tblObj: Record<string, unknown>, lineBreakStyle?: string): Table;
|
|
333
|
+
/**
|
|
334
|
+
* Parse a section XML object into paragraphs
|
|
335
|
+
*/
|
|
336
|
+
declare function parseHwpxSection(sectionObj: Record<string, unknown>, options?: ConvertOptions): Paragraph[];
|
|
337
|
+
/**
|
|
338
|
+
* Check if binary data is a HWPX file (ZIP magic bytes)
|
|
339
|
+
*/
|
|
340
|
+
declare function isHwpxData(data: Uint8Array | ArrayBuffer): boolean;
|
|
341
|
+
/**
|
|
342
|
+
* Check if a file path has HWPX extension
|
|
343
|
+
*/
|
|
344
|
+
declare function isHwpxPath(path: string): boolean;
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region src/converter.d.ts
|
|
347
|
+
/**
|
|
348
|
+
* Convert paragraphs to Markdown
|
|
349
|
+
* @param paragraphs - List of paragraphs
|
|
350
|
+
* @returns Markdown text
|
|
351
|
+
*/
|
|
352
|
+
declare function paragraphsToMarkdown(paragraphs: Paragraph[]): string;
|
|
353
|
+
/**
|
|
354
|
+
* Convert HWP file to Markdown
|
|
355
|
+
* @param hwp - Opened HWP file
|
|
356
|
+
* @param options - Conversion options
|
|
357
|
+
* @returns Markdown content
|
|
358
|
+
*/
|
|
359
|
+
declare function convertHwpToMarkdown(hwp: HWPFile, options?: ConvertOptions): string;
|
|
360
|
+
/**
|
|
361
|
+
* Convert HWPX file to Markdown
|
|
362
|
+
* @param hwpx - Opened HWPX file
|
|
363
|
+
* @param options - Conversion options
|
|
364
|
+
* @returns Markdown content
|
|
365
|
+
*/
|
|
366
|
+
declare function convertHwpxToMarkdown(hwpx: HWPXFile, options?: ConvertOptions): string;
|
|
367
|
+
/**
|
|
368
|
+
* High-level API: Convert HWP/HWPX file to Markdown
|
|
369
|
+
* Auto-detects format based on file extension or magic bytes.
|
|
370
|
+
* @param input - File path (Node.js), ArrayBuffer, or Uint8Array
|
|
371
|
+
* @param options - Conversion options
|
|
372
|
+
* @returns Markdown content
|
|
373
|
+
*/
|
|
374
|
+
declare function convert(input: string | ArrayBuffer | Uint8Array, options?: ConvertOptions): Promise<string>;
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/utils/binary.d.ts
|
|
377
|
+
/**
|
|
378
|
+
* Binary Reader Utility
|
|
379
|
+
* Replaces Python's struct.unpack functionality
|
|
380
|
+
* All multi-byte values are little-endian
|
|
381
|
+
*/
|
|
382
|
+
declare class BinaryReader {
|
|
383
|
+
private view;
|
|
384
|
+
private offset;
|
|
385
|
+
constructor(data: Uint8Array | ArrayBuffer);
|
|
386
|
+
/**
|
|
387
|
+
* Read unsigned 8-bit integer (BYTE)
|
|
388
|
+
*/
|
|
389
|
+
readUint8(): number;
|
|
390
|
+
/**
|
|
391
|
+
* Read unsigned 16-bit integer (WORD) - little-endian
|
|
392
|
+
*/
|
|
393
|
+
readUint16LE(): number;
|
|
394
|
+
/**
|
|
395
|
+
* Read unsigned 32-bit integer (DWORD) - little-endian
|
|
396
|
+
*/
|
|
397
|
+
readUint32LE(): number;
|
|
398
|
+
/**
|
|
399
|
+
* Read signed 32-bit integer - little-endian
|
|
400
|
+
*/
|
|
401
|
+
readInt32LE(): number;
|
|
402
|
+
/**
|
|
403
|
+
* Read bytes without advancing offset (peek)
|
|
404
|
+
*/
|
|
405
|
+
peekBytes(length: number): Uint8Array;
|
|
406
|
+
/**
|
|
407
|
+
* Read bytes and advance offset
|
|
408
|
+
*/
|
|
409
|
+
readBytes(length: number): Uint8Array;
|
|
410
|
+
/**
|
|
411
|
+
* Skip bytes
|
|
412
|
+
*/
|
|
413
|
+
skip(length: number): void;
|
|
414
|
+
/**
|
|
415
|
+
* Set absolute position
|
|
416
|
+
*/
|
|
417
|
+
seek(offset: number): void;
|
|
418
|
+
/**
|
|
419
|
+
* Get current position
|
|
420
|
+
*/
|
|
421
|
+
get position(): number;
|
|
422
|
+
/**
|
|
423
|
+
* Get remaining bytes
|
|
424
|
+
*/
|
|
425
|
+
get remaining(): number;
|
|
426
|
+
/**
|
|
427
|
+
* Check if more data is available
|
|
428
|
+
*/
|
|
429
|
+
hasMore(minBytes?: number): boolean;
|
|
430
|
+
/**
|
|
431
|
+
* Get total length
|
|
432
|
+
*/
|
|
433
|
+
get length(): number;
|
|
434
|
+
/**
|
|
435
|
+
* Create a new BinaryReader for a subset of data
|
|
436
|
+
*/
|
|
437
|
+
slice(start: number, end?: number): BinaryReader;
|
|
438
|
+
}
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/utils/compression.d.ts
|
|
441
|
+
/**
|
|
442
|
+
* Decompress raw deflate data (no zlib header)
|
|
443
|
+
* Equivalent to Python: zlib.decompress(data, -15)
|
|
444
|
+
*
|
|
445
|
+
* HWP files use raw deflate compression without zlib wrapper headers.
|
|
446
|
+
* The windowBits=-15 in Python indicates raw deflate mode.
|
|
447
|
+
*
|
|
448
|
+
* @param data - Compressed data
|
|
449
|
+
* @returns Decompressed data
|
|
450
|
+
*/
|
|
451
|
+
declare function decompressRaw(data: Uint8Array): Uint8Array;
|
|
452
|
+
//#endregion
|
|
453
|
+
export { BinaryReader, Cell, ConvertOptions, FileHeader, HWPFile, HWPTAG_BEGIN, HWPTAG_BIN_DATA, HWPTAG_BORDER_FILL, HWPTAG_BULLET, HWPTAG_CHAR_SHAPE, HWPTAG_CTRL_DATA, HWPTAG_CTRL_HEADER, HWPTAG_DOCUMENT_PROPERTIES, HWPTAG_FACE_NAME, HWPTAG_FOOTNOTE_SHAPE, HWPTAG_ID_MAPPINGS, HWPTAG_LIST_HEADER, HWPTAG_NUMBERING, HWPTAG_PAGE_BORDER_FILL, HWPTAG_PAGE_DEF, HWPTAG_PARA_CHAR_SHAPE, HWPTAG_PARA_HEADER, HWPTAG_PARA_LINE_SEG, HWPTAG_PARA_RANGE_TAG, HWPTAG_PARA_SHAPE, HWPTAG_PARA_TEXT, HWPTAG_SHAPE_COMPONENT, HWPTAG_SHAPE_COMPONENT_LINE, HWPTAG_STYLE, HWPTAG_TABLE, HWPTAG_TAB_DEF, HWPXFile, MergeStrategy, Paragraph, ParagraphHeader, ParagraphParser, Record$1 as Record, RecordReader, Table, convert, convertHwpToMarkdown, convertHwpxToMarkdown, decompressRaw, isHwpxData, isHwpxPath, paragraphsToMarkdown, parseCellProperties, parseHwpxSection, parseHwpxTable, parseParaHeader, parseParaText, parseTable, parseTableProperties, processControlChars, tableToMarkdown };
|
|
454
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/parser.ts","../src/record.ts","../src/paragraph.ts","../src/table.ts","../src/hwpx_parser.ts","../src/converter.ts","../src/utils/binary.ts","../src/utils/compression.ts"],"sourcesContent":[],"mappings":";;AAGA;AAWA;AAUiB,UArBA,UAAA,CAqBe;EAYf,SAAA,EAAA,MAAS;EAQT,OAAI,EAAA,MAAA;EAWJ,YAAK,EAAA,OAGb;EAMQ,WAAA,EAAA,OAAc;EAOnB,aAAA,EAAA,MAAa;;;;AC1DzB;AAS4B,UDRX,QAAA,CCQW;EAAa,KAAA,EAAA,MAAA;EAMM,KAAA,EAAA,MAAA;EAAR,IAAA,EDX/B,UCW+B;EAUR,IAAA,EAAA,MAAA;;;;;AAmIG,UDjJjB,eAAA,CCiJiB;EAmDjB,SAAA,EAAA,MAAA;EAuCoB,WAAA,EAAA,MAAA;EAAU,WAAA,EAAA,MAAA;;;;AC3P/C;AACA;AACA;AACA;AACa,UFwBI,SAAA,CExBY;EAChB,IAAA,EAAA,MAAA;EACA,MAAA,EFwBH,eExBoB;AAC9B;AACA;AACA;AACA;AACa,UFyBI,IAAA,CEzBQ;EAGZ,GAAA,EAAA,MAAA;EACA,GAAA,EAAA,MAAA;EACA,OAAA,E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