kordoc 3.5.1 → 3.5.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/{-BNJMPTQ2.js → -N2SJBI4R.js} +3 -3
- package/dist/{chunk-IKAXUVSU.js → chunk-3Z2RAKIL.js} +2 -2
- package/dist/{chunk-RWSGBXSA.cjs → chunk-53XNKPN6.cjs} +2 -2
- package/dist/{chunk-RWSGBXSA.cjs.map → chunk-53XNKPN6.cjs.map} +1 -1
- package/dist/{chunk-GMPDZD7Q.js → chunk-GUDFEDFK.js} +29 -24
- package/dist/{chunk-GMPDZD7Q.js.map → chunk-GUDFEDFK.js.map} +1 -1
- package/dist/{chunk-OXOPDVNV.js → chunk-JOLDAN3Q.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.cjs +138 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -23
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +3 -3
- package/dist/{parser-ZLFOUVR4.cjs → parser-CK5C6FF4.cjs} +14 -14
- package/dist/{parser-ZLFOUVR4.cjs.map → parser-CK5C6FF4.cjs.map} +1 -1
- package/dist/{parser-GHZMDUGG.js → parser-CPFIB47T.js} +2 -2
- package/dist/{parser-XXQAMYGV.js → parser-IAROZTY3.js} +2 -2
- package/dist/{watch-IN3YN72W.js → watch-ZYNP3QFT.js} +3 -3
- package/package.json +1 -1
- /package/dist/{-BNJMPTQ2.js.map → -N2SJBI4R.js.map} +0 -0
- /package/dist/{chunk-IKAXUVSU.js.map → chunk-3Z2RAKIL.js.map} +0 -0
- /package/dist/{chunk-OXOPDVNV.js.map → chunk-JOLDAN3Q.js.map} +0 -0
- /package/dist/{parser-GHZMDUGG.js.map → parser-CPFIB47T.js.map} +0 -0
- /package/dist/{parser-XXQAMYGV.js.map → parser-IAROZTY3.js.map} +0 -0
- /package/dist/{watch-IN3YN72W.js.map → watch-ZYNP3QFT.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
sanitizeHref,
|
|
20
20
|
stripDtd,
|
|
21
21
|
toArrayBuffer
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JOLDAN3Q.js";
|
|
23
23
|
import {
|
|
24
24
|
parsePageRange
|
|
25
25
|
} from "./chunk-GE43BE46.js";
|
|
@@ -20369,24 +20369,26 @@ function generateManifest() {
|
|
|
20369
20369
|
</opf:spine>
|
|
20370
20370
|
</opf:package>`;
|
|
20371
20371
|
}
|
|
20372
|
-
function charPr(id, height, bold, italic, fontId = 0, textColor = DEFAULT_TEXT_COLOR) {
|
|
20372
|
+
function charPr(id, height, bold, italic, fontId = 0, textColor = DEFAULT_TEXT_COLOR, ratioPct = 100) {
|
|
20373
20373
|
const boldAttr = bold ? ` bold="1"` : "";
|
|
20374
20374
|
const italicAttr = italic ? ` italic="1"` : "";
|
|
20375
20375
|
const effFont = bold ? 2 : fontId;
|
|
20376
20376
|
return ` <hh:charPr id="${id}" height="${height}" textColor="${textColor}" shadeColor="none" useFontSpace="0" useKerning="0" symMark="NONE" borderFillIDRef="0"${boldAttr}${italicAttr}>
|
|
20377
20377
|
<hh:fontRef hangul="${effFont}" latin="${effFont}" hanja="${effFont}" japanese="${effFont}" other="${effFont}" symbol="${effFont}" user="${effFont}"/>
|
|
20378
|
-
<hh:ratio hangul="
|
|
20378
|
+
<hh:ratio hangul="${ratioPct}" latin="${ratioPct}" hanja="${ratioPct}" japanese="100" other="100" symbol="100" user="100"/>
|
|
20379
20379
|
<hh:spacing hangul="0" latin="0" hanja="0" japanese="0" other="0" symbol="0" user="0"/>
|
|
20380
20380
|
<hh:relSz hangul="100" latin="100" hanja="100" japanese="100" other="100" symbol="100" user="100"/>
|
|
20381
20381
|
<hh:offset hangul="0" latin="0" hanja="0" japanese="0" other="0" symbol="0" user="0"/>
|
|
20382
20382
|
</hh:charPr>`;
|
|
20383
20383
|
}
|
|
20384
20384
|
function paraPr(id, opts = {}) {
|
|
20385
|
-
const { align = "JUSTIFY", spaceBefore = 0, spaceAfter = 0, lineSpacing = 160, indent = 0, left = 0 } = opts;
|
|
20386
|
-
|
|
20385
|
+
const { align = "JUSTIFY", spaceBefore = 0, spaceAfter = 0, lineSpacing = 160, indent = 0, left = 0, keepWord = false } = opts;
|
|
20386
|
+
const breakNonLatin = keepWord ? "KEEP_WORD" : "BREAK_WORD";
|
|
20387
|
+
const snapGrid = keepWord ? "0" : "1";
|
|
20388
|
+
return ` <hh:paraPr id="${id}" tabPrIDRef="0" condense="0" fontLineHeight="0" snapToGrid="${snapGrid}" suppressLineNumbers="0" checked="0" textDir="AUTO">
|
|
20387
20389
|
<hh:align horizontal="${align}" vertical="BASELINE"/>
|
|
20388
20390
|
<hh:heading type="NONE" idRef="0" level="0"/>
|
|
20389
|
-
<hh:breakSetting breakLatinWord="KEEP_WORD" breakNonLatinWord="
|
|
20391
|
+
<hh:breakSetting breakLatinWord="KEEP_WORD" breakNonLatinWord="${breakNonLatin}" widowOrphan="0" keepWithNext="0" keepLines="0" pageBreakBefore="0" lineWrap="BREAK"/>
|
|
20390
20392
|
<hh:autoSpacing eAsianEng="0" eAsianNum="0"/>
|
|
20391
20393
|
<hh:margin><hc:intent value="${indent}" unit="HWPUNIT"/><hc:left value="${left}" unit="HWPUNIT"/><hc:right value="0" unit="HWPUNIT"/><hc:prev value="${spaceBefore}" unit="HWPUNIT"/><hc:next value="${spaceAfter}" unit="HWPUNIT"/></hh:margin>
|
|
20392
20394
|
<hh:lineSpacing type="PERCENT" value="${lineSpacing}"/>
|
|
@@ -20406,11 +20408,12 @@ function buildCharProperties(theme, gongmun) {
|
|
|
20406
20408
|
h3 = body;
|
|
20407
20409
|
h4 = Math.max(body - 100, 1300);
|
|
20408
20410
|
}
|
|
20411
|
+
const bodyRatio = gongmun ? 95 : 100;
|
|
20409
20412
|
const rows = [
|
|
20410
|
-
charPr(0, body, false, false, 0, theme.body),
|
|
20411
|
-
charPr(1, body, true, false, 0, theme.body),
|
|
20412
|
-
charPr(2, body, false, true, 0, theme.body),
|
|
20413
|
-
charPr(3, body, true, true, 0, theme.body),
|
|
20413
|
+
charPr(0, body, false, false, 0, theme.body, bodyRatio),
|
|
20414
|
+
charPr(1, body, true, false, 0, theme.body, bodyRatio),
|
|
20415
|
+
charPr(2, body, false, true, 0, theme.body, bodyRatio),
|
|
20416
|
+
charPr(3, body, true, true, 0, theme.body, bodyRatio),
|
|
20414
20417
|
charPr(4, code, false, false, 1),
|
|
20415
20418
|
charPr(5, h1, true, false, 1, theme.h1),
|
|
20416
20419
|
charPr(6, h2, true, false, 1, theme.h2),
|
|
@@ -20442,20 +20445,21 @@ ${base2.join("\n")}
|
|
|
20442
20445
|
const ls = gongmun.lineSpacing;
|
|
20443
20446
|
const titleAlign = gongmun.centerTitle ? "CENTER" : "LEFT";
|
|
20444
20447
|
const base = [
|
|
20445
|
-
paraPr(0, { lineSpacing: ls }),
|
|
20446
|
-
paraPr(1, { align: titleAlign, spaceBefore: 400, spaceAfter: 400, lineSpacing: ls }),
|
|
20447
|
-
paraPr(2, { align: "LEFT", spaceBefore: 600, spaceAfter: 150, lineSpacing: ls }),
|
|
20448
|
-
paraPr(3, { align: "LEFT", spaceBefore: 400, spaceAfter: 100, lineSpacing: ls }),
|
|
20449
|
-
paraPr(4, { align: "LEFT", spaceBefore: 300, spaceAfter: 100, lineSpacing: ls }),
|
|
20450
|
-
paraPr(5, { align: "LEFT", lineSpacing: 130, indent: 400 }),
|
|
20451
|
-
paraPr(6, { align: "LEFT", lineSpacing: ls, indent: 600 }),
|
|
20452
|
-
paraPr(7, { align: "LEFT", lineSpacing: ls, indent: 600 })
|
|
20448
|
+
paraPr(0, { lineSpacing: ls, keepWord: true }),
|
|
20449
|
+
paraPr(1, { align: titleAlign, spaceBefore: 400, spaceAfter: 400, lineSpacing: ls, keepWord: true }),
|
|
20450
|
+
paraPr(2, { align: "LEFT", spaceBefore: 600, spaceAfter: 150, lineSpacing: ls, keepWord: true }),
|
|
20451
|
+
paraPr(3, { align: "LEFT", spaceBefore: 400, spaceAfter: 100, lineSpacing: ls, keepWord: true }),
|
|
20452
|
+
paraPr(4, { align: "LEFT", spaceBefore: 300, spaceAfter: 100, lineSpacing: ls, keepWord: true }),
|
|
20453
|
+
paraPr(5, { align: "LEFT", lineSpacing: 130, indent: 400, keepWord: true }),
|
|
20454
|
+
paraPr(6, { align: "LEFT", lineSpacing: ls, indent: 600, keepWord: true }),
|
|
20455
|
+
paraPr(7, { align: "LEFT", lineSpacing: ls, indent: 600, keepWord: true })
|
|
20453
20456
|
];
|
|
20454
20457
|
for (let d = 0; d < GONGMUN_LIST_LEVELS; d++) {
|
|
20455
20458
|
const { left, indent } = levelIndent(d, gongmun.bodyHeight, gongmun.numbering);
|
|
20456
|
-
|
|
20459
|
+
const sectionGap = gongmun.numbering === "report" && d === 0 ? Math.round(gongmun.bodyHeight * 0.5) : 0;
|
|
20460
|
+
base.push(paraPr(GONGMUN_LIST_BASE + d, { align: "JUSTIFY", lineSpacing: ls, left, indent, spaceBefore: sectionGap, keepWord: true }));
|
|
20457
20461
|
}
|
|
20458
|
-
base.push(paraPr(GONGMUN_CENTER, { align: "CENTER", lineSpacing: ls }));
|
|
20462
|
+
base.push(paraPr(GONGMUN_CENTER, { align: "CENTER", lineSpacing: ls, keepWord: true }));
|
|
20459
20463
|
return `<hh:paraProperties itemCnt="${base.length}">
|
|
20460
20464
|
${base.join("\n")}
|
|
20461
20465
|
</hh:paraProperties>`;
|
|
@@ -20548,7 +20552,7 @@ function generateHeaderXml(theme, gongmun) {
|
|
|
20548
20552
|
<hh:style id="0" type="PARA" name="\uBC14\uD0D5\uAE00" engName="Normal" paraPrIDRef="0" charPrIDRef="0" nextStyleIDRef="0" langIDRef="1042" lockForm="0"/>
|
|
20549
20553
|
</hh:styles>
|
|
20550
20554
|
</hh:refList>
|
|
20551
|
-
<hh:compatibleDocument targetProgram="HWP2018"
|
|
20555
|
+
<hh:compatibleDocument targetProgram="HWP2018"><hh:layoutCompatibility/></hh:compatibleDocument>
|
|
20552
20556
|
</hh:head>`;
|
|
20553
20557
|
}
|
|
20554
20558
|
function generateSecPr(gongmun) {
|
|
@@ -20664,7 +20668,8 @@ function blocksToSectionXml(blocks, theme, gongmun) {
|
|
|
20664
20668
|
const marker2 = info?.marker ?? "";
|
|
20665
20669
|
const content = block.text || "";
|
|
20666
20670
|
const text = marker2 ? `${marker2} ${content}` : content;
|
|
20667
|
-
|
|
20671
|
+
const listCharPr = gongmun.numbering === "report" && depth === 0 ? CHAR_BOLD : CHAR_NORMAL;
|
|
20672
|
+
xml = generateParagraph(text, GONGMUN_LIST_BASE + depth, listCharPr);
|
|
20668
20673
|
break;
|
|
20669
20674
|
}
|
|
20670
20675
|
const indent = block.indent || 0;
|
|
@@ -23513,7 +23518,7 @@ async function parseHwp(buffer, options) {
|
|
|
23513
23518
|
async function parsePdf(buffer, options) {
|
|
23514
23519
|
let parsePdfDocument;
|
|
23515
23520
|
try {
|
|
23516
|
-
const mod = await import("./parser-
|
|
23521
|
+
const mod = await import("./parser-CPFIB47T.js");
|
|
23517
23522
|
parsePdfDocument = mod.parsePdfDocument;
|
|
23518
23523
|
} catch {
|
|
23519
23524
|
return {
|