odf-kit 0.9.9 → 0.10.1
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/CHANGELOG.md +42 -0
- package/README.md +97 -4
- package/dist/docx/body-reader.d.ts +54 -0
- package/dist/docx/body-reader.d.ts.map +1 -0
- package/dist/docx/body-reader.js +1124 -0
- package/dist/docx/body-reader.js.map +1 -0
- package/dist/docx/converter.d.ts +51 -0
- package/dist/docx/converter.d.ts.map +1 -0
- package/dist/docx/converter.js +799 -0
- package/dist/docx/converter.js.map +1 -0
- package/dist/docx/index.d.ts +81 -0
- package/dist/docx/index.d.ts.map +1 -0
- package/dist/docx/index.js +69 -0
- package/dist/docx/index.js.map +1 -0
- package/dist/docx/numbering.d.ts +42 -0
- package/dist/docx/numbering.d.ts.map +1 -0
- package/dist/docx/numbering.js +236 -0
- package/dist/docx/numbering.js.map +1 -0
- package/dist/docx/reader.d.ts +38 -0
- package/dist/docx/reader.d.ts.map +1 -0
- package/dist/docx/reader.js +512 -0
- package/dist/docx/reader.js.map +1 -0
- package/dist/docx/relationships.d.ts +27 -0
- package/dist/docx/relationships.d.ts.map +1 -0
- package/dist/docx/relationships.js +89 -0
- package/dist/docx/relationships.js.map +1 -0
- package/dist/docx/styles.d.ts +46 -0
- package/dist/docx/styles.d.ts.map +1 -0
- package/dist/docx/styles.js +383 -0
- package/dist/docx/styles.js.map +1 -0
- package/dist/docx/types.d.ts +266 -0
- package/dist/docx/types.d.ts.map +1 -0
- package/dist/docx/types.js +38 -0
- package/dist/docx/types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +36 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* odf-kit — DOCX styles parser
|
|
3
|
+
*
|
|
4
|
+
* Parses word/styles.xml into a StyleMap keyed by styleId.
|
|
5
|
+
*
|
|
6
|
+
* Heading detection priority (per plan):
|
|
7
|
+
* 1. Style name matches "heading N" (case-insensitive) — canonical
|
|
8
|
+
* 2. w:outlineLvl in the style's w:pPr — fallback for custom heading styles
|
|
9
|
+
* 3. Caller-supplied styleMap option — overrides at conversion time
|
|
10
|
+
*
|
|
11
|
+
* Style inheritance (w:basedOn) is recorded but not resolved here — the
|
|
12
|
+
* converter walks the chain at conversion time so it can merge with
|
|
13
|
+
* document-level overrides cleanly.
|
|
14
|
+
*/
|
|
15
|
+
import type { XmlElementNode } from "../reader/xml-parser.js";
|
|
16
|
+
import type { StyleMap, RunProps, ParaProps } from "./types.js";
|
|
17
|
+
import { DEFAULT_RUN_PROPS, DEFAULT_PARA_PROPS } from "./types.js";
|
|
18
|
+
/**
|
|
19
|
+
* Parse word/styles.xml into a StyleMap.
|
|
20
|
+
*
|
|
21
|
+
* @param xml - Raw XML content of word/styles.xml.
|
|
22
|
+
* @returns Map from styleId → StyleEntry.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseStyles(xml: string): StyleMap;
|
|
25
|
+
/**
|
|
26
|
+
* Parse a w:rPr element into a partial RunProps.
|
|
27
|
+
* Only properties explicitly present in the XML are set — unset properties
|
|
28
|
+
* are left undefined so that style inheritance can be applied by the caller.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseRPr(el: XmlElementNode): Partial<RunProps>;
|
|
31
|
+
interface PPrResult {
|
|
32
|
+
props: Partial<ParaProps>;
|
|
33
|
+
outlineLvl: number | null;
|
|
34
|
+
/** True if this pPr contains a w:sectPr (mid-document section break). */
|
|
35
|
+
hasSectPr: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parse a w:pPr element into a partial ParaProps plus any outline level.
|
|
39
|
+
* Only properties explicitly present in the XML are set.
|
|
40
|
+
*
|
|
41
|
+
* Spec ref: ECMA-376 §17.3.1.26 (CT_PPr), §17.3.1.25 (CT_PPrBase).
|
|
42
|
+
*/
|
|
43
|
+
export declare function parsePPr(el: XmlElementNode): PPrResult;
|
|
44
|
+
export { DEFAULT_RUN_PROPS, DEFAULT_PARA_PROPS };
|
|
45
|
+
export type { PPrResult };
|
|
46
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/docx/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAc,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMnE;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAajD;AAsDD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2D9D;AAMD,UAAU,SAAS;IACjB,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,yEAAyE;IACzE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,cAAc,GAAG,SAAS,CA4EtD;AAwKD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC;AACjD,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* odf-kit — DOCX styles parser
|
|
3
|
+
*
|
|
4
|
+
* Parses word/styles.xml into a StyleMap keyed by styleId.
|
|
5
|
+
*
|
|
6
|
+
* Heading detection priority (per plan):
|
|
7
|
+
* 1. Style name matches "heading N" (case-insensitive) — canonical
|
|
8
|
+
* 2. w:outlineLvl in the style's w:pPr — fallback for custom heading styles
|
|
9
|
+
* 3. Caller-supplied styleMap option — overrides at conversion time
|
|
10
|
+
*
|
|
11
|
+
* Style inheritance (w:basedOn) is recorded but not resolved here — the
|
|
12
|
+
* converter walks the chain at conversion time so it can merge with
|
|
13
|
+
* document-level overrides cleanly.
|
|
14
|
+
*/
|
|
15
|
+
import { parseXml } from "../reader/xml-parser.js";
|
|
16
|
+
import { DEFAULT_RUN_PROPS, DEFAULT_PARA_PROPS } from "./types.js";
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Public API
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/**
|
|
21
|
+
* Parse word/styles.xml into a StyleMap.
|
|
22
|
+
*
|
|
23
|
+
* @param xml - Raw XML content of word/styles.xml.
|
|
24
|
+
* @returns Map from styleId → StyleEntry.
|
|
25
|
+
*/
|
|
26
|
+
export function parseStyles(xml) {
|
|
27
|
+
const map = new Map();
|
|
28
|
+
const root = parseXml(xml);
|
|
29
|
+
for (const child of root.children) {
|
|
30
|
+
if (child.type !== "element")
|
|
31
|
+
continue;
|
|
32
|
+
if (localName(child.tag) !== "style")
|
|
33
|
+
continue;
|
|
34
|
+
const entry = parseStyleEntry(child);
|
|
35
|
+
if (entry)
|
|
36
|
+
map.set(entry.styleId, entry);
|
|
37
|
+
}
|
|
38
|
+
return map;
|
|
39
|
+
}
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Style entry
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
function parseStyleEntry(el) {
|
|
44
|
+
const styleId = el.attrs["w:styleId"];
|
|
45
|
+
if (!styleId)
|
|
46
|
+
return null;
|
|
47
|
+
const rawType = el.attrs["w:type"] ?? "paragraph";
|
|
48
|
+
const type = normalizeStyleType(rawType);
|
|
49
|
+
let name = "";
|
|
50
|
+
let basedOn = null;
|
|
51
|
+
let rPr = null;
|
|
52
|
+
let pPr = null;
|
|
53
|
+
let outlineLvl = null;
|
|
54
|
+
for (const child of el.children) {
|
|
55
|
+
if (child.type !== "element")
|
|
56
|
+
continue;
|
|
57
|
+
const tag = localName(child.tag);
|
|
58
|
+
switch (tag) {
|
|
59
|
+
case "name":
|
|
60
|
+
name = child.attrs["w:val"] ?? "";
|
|
61
|
+
break;
|
|
62
|
+
case "basedOn":
|
|
63
|
+
basedOn = child.attrs["w:val"] ?? null;
|
|
64
|
+
break;
|
|
65
|
+
case "rPr":
|
|
66
|
+
rPr = parseRPr(child);
|
|
67
|
+
break;
|
|
68
|
+
case "pPr": {
|
|
69
|
+
const result = parsePPr(child);
|
|
70
|
+
pPr = result.props;
|
|
71
|
+
if (result.outlineLvl !== null)
|
|
72
|
+
outlineLvl = result.outlineLvl;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Heading level resolution:
|
|
78
|
+
// 1. Style name "heading N" (canonical — set by Word for built-in heading styles)
|
|
79
|
+
// 2. w:outlineLvl in pPr (fallback for custom styles that declare an outline level)
|
|
80
|
+
const headingLevel = resolveHeadingLevel(name, outlineLvl);
|
|
81
|
+
return { styleId, name, type, headingLevel, basedOn, rPr, pPr };
|
|
82
|
+
}
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// Run properties (w:rPr)
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
/**
|
|
87
|
+
* Parse a w:rPr element into a partial RunProps.
|
|
88
|
+
* Only properties explicitly present in the XML are set — unset properties
|
|
89
|
+
* are left undefined so that style inheritance can be applied by the caller.
|
|
90
|
+
*/
|
|
91
|
+
export function parseRPr(el) {
|
|
92
|
+
const props = {};
|
|
93
|
+
for (const child of el.children) {
|
|
94
|
+
if (child.type !== "element")
|
|
95
|
+
continue;
|
|
96
|
+
const tag = localName(child.tag);
|
|
97
|
+
switch (tag) {
|
|
98
|
+
case "b":
|
|
99
|
+
props.bold = !isFalse(child.attrs["w:val"]);
|
|
100
|
+
break;
|
|
101
|
+
case "i":
|
|
102
|
+
props.italic = !isFalse(child.attrs["w:val"]);
|
|
103
|
+
break;
|
|
104
|
+
case "u":
|
|
105
|
+
// w:val="none" means no underline; any other value (single, double, etc.) = underline
|
|
106
|
+
props.underline = (child.attrs["w:val"] ?? "single") !== "none";
|
|
107
|
+
break;
|
|
108
|
+
case "strike":
|
|
109
|
+
props.strikethrough = !isFalse(child.attrs["w:val"]);
|
|
110
|
+
break;
|
|
111
|
+
case "dstrike":
|
|
112
|
+
props.doubleStrikethrough = !isFalse(child.attrs["w:val"]);
|
|
113
|
+
break;
|
|
114
|
+
case "vertAlign":
|
|
115
|
+
if (child.attrs["w:val"] === "superscript")
|
|
116
|
+
props.superscript = true;
|
|
117
|
+
if (child.attrs["w:val"] === "subscript")
|
|
118
|
+
props.subscript = true;
|
|
119
|
+
break;
|
|
120
|
+
case "smallCaps":
|
|
121
|
+
props.smallCaps = !isFalse(child.attrs["w:val"]);
|
|
122
|
+
break;
|
|
123
|
+
case "caps":
|
|
124
|
+
props.allCaps = !isFalse(child.attrs["w:val"]);
|
|
125
|
+
break;
|
|
126
|
+
case "color":
|
|
127
|
+
// "auto" means default/inherited — treat as null
|
|
128
|
+
props.color = normalizeColor(child.attrs["w:val"]);
|
|
129
|
+
break;
|
|
130
|
+
case "sz":
|
|
131
|
+
// w:sz is in half-points; divide by 2 for points
|
|
132
|
+
props.fontSize = halfPointsToPoints(child.attrs["w:val"]);
|
|
133
|
+
break;
|
|
134
|
+
case "highlight":
|
|
135
|
+
props.highlight = child.attrs["w:val"] ?? null;
|
|
136
|
+
break;
|
|
137
|
+
case "rFonts":
|
|
138
|
+
// w:ascii is the Latin font; fall back to w:hAnsi
|
|
139
|
+
props.fontFamily = child.attrs["w:ascii"] ?? child.attrs["w:hAnsi"] ?? null;
|
|
140
|
+
break;
|
|
141
|
+
case "lang":
|
|
142
|
+
props.lang = child.attrs["w:val"] ?? null;
|
|
143
|
+
break;
|
|
144
|
+
case "rStyle":
|
|
145
|
+
props.rStyleId = child.attrs["w:val"] ?? null;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return props;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Parse a w:pPr element into a partial ParaProps plus any outline level.
|
|
153
|
+
* Only properties explicitly present in the XML are set.
|
|
154
|
+
*
|
|
155
|
+
* Spec ref: ECMA-376 §17.3.1.26 (CT_PPr), §17.3.1.25 (CT_PPrBase).
|
|
156
|
+
*/
|
|
157
|
+
export function parsePPr(el) {
|
|
158
|
+
const props = {};
|
|
159
|
+
let outlineLvl = null;
|
|
160
|
+
let hasSectPr = false;
|
|
161
|
+
for (const child of el.children) {
|
|
162
|
+
if (child.type !== "element")
|
|
163
|
+
continue;
|
|
164
|
+
const tag = localName(child.tag);
|
|
165
|
+
switch (tag) {
|
|
166
|
+
case "jc":
|
|
167
|
+
props.alignment = normalizeAlignment(child.attrs["w:val"]);
|
|
168
|
+
break;
|
|
169
|
+
case "spacing": {
|
|
170
|
+
// w:before / w:after are in twips (1/20 pt); w:line is in twips too
|
|
171
|
+
const before = child.attrs["w:before"];
|
|
172
|
+
const after = child.attrs["w:after"];
|
|
173
|
+
const line = child.attrs["w:line"];
|
|
174
|
+
const lineRule = child.attrs["w:lineRule"];
|
|
175
|
+
if (before !== undefined)
|
|
176
|
+
props.spaceBefore = twipsToCm(Number(before));
|
|
177
|
+
if (after !== undefined)
|
|
178
|
+
props.spaceAfter = twipsToCm(Number(after));
|
|
179
|
+
if (line !== undefined) {
|
|
180
|
+
// lineRule "auto" = multiple of 240 twips (single=240, double=480)
|
|
181
|
+
// lineRule "exact" or "atLeast" = fixed pt value — treat as multiplier vs 12pt baseline
|
|
182
|
+
if (!lineRule || lineRule === "auto") {
|
|
183
|
+
props.lineHeight = Number(line) / 240;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
// Fixed line height in twips — store as multiplier relative to 12pt (240 twips)
|
|
187
|
+
props.lineHeight = Number(line) / 240;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
case "ind": {
|
|
193
|
+
const left = child.attrs["w:left"];
|
|
194
|
+
const right = child.attrs["w:right"];
|
|
195
|
+
const firstLine = child.attrs["w:firstLine"];
|
|
196
|
+
const hanging = child.attrs["w:hanging"];
|
|
197
|
+
if (left !== undefined)
|
|
198
|
+
props.indentLeft = twipsToCm(Number(left));
|
|
199
|
+
if (right !== undefined)
|
|
200
|
+
props.indentRight = twipsToCm(Number(right));
|
|
201
|
+
// w:firstLine and w:hanging are mutually exclusive; hanging is negative indent
|
|
202
|
+
if (firstLine !== undefined)
|
|
203
|
+
props.indentFirstLine = twipsToCm(Number(firstLine));
|
|
204
|
+
else if (hanging !== undefined)
|
|
205
|
+
props.indentFirstLine = -twipsToCm(Number(hanging));
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
case "pageBreakBefore":
|
|
209
|
+
// CT_OnOff — absence means false; presence (even with no val) means true
|
|
210
|
+
props.pageBreakBefore = !isFalse(child.attrs["w:val"]);
|
|
211
|
+
break;
|
|
212
|
+
case "numPr":
|
|
213
|
+
props.list = parseNumPr(child);
|
|
214
|
+
break;
|
|
215
|
+
case "pBdr":
|
|
216
|
+
props.borderBottom = parsePBdrBottom(child);
|
|
217
|
+
break;
|
|
218
|
+
case "outlineLvl":
|
|
219
|
+
// w:val is 0-based; heading level is 1-based
|
|
220
|
+
outlineLvl = Number(child.attrs["w:val"] ?? "0") + 1;
|
|
221
|
+
break;
|
|
222
|
+
case "sectPr":
|
|
223
|
+
// Mid-document section break — page layout change between sections.
|
|
224
|
+
// Full multi-section support is out of scope; caller will warn.
|
|
225
|
+
// Spec ref: ECMA-376 §17.6.17 (CT_SectPr inside CT_PPr).
|
|
226
|
+
hasSectPr = true;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return { props, outlineLvl, hasSectPr };
|
|
231
|
+
}
|
|
232
|
+
// ---------------------------------------------------------------------------
|
|
233
|
+
// List membership (w:numPr)
|
|
234
|
+
// ---------------------------------------------------------------------------
|
|
235
|
+
function parseNumPr(el) {
|
|
236
|
+
let numId = null;
|
|
237
|
+
let level = 0;
|
|
238
|
+
for (const child of el.children) {
|
|
239
|
+
if (child.type !== "element")
|
|
240
|
+
continue;
|
|
241
|
+
const tag = localName(child.tag);
|
|
242
|
+
if (tag === "ilvl")
|
|
243
|
+
level = Number(child.attrs["w:val"] ?? "0");
|
|
244
|
+
if (tag === "numId")
|
|
245
|
+
numId = child.attrs["w:val"] ?? null;
|
|
246
|
+
}
|
|
247
|
+
if (!numId || numId === "0")
|
|
248
|
+
return null; // numId "0" means no list
|
|
249
|
+
return { numId, level };
|
|
250
|
+
}
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
// Paragraph border — bottom only (used for horizontal rule simulation)
|
|
253
|
+
// ---------------------------------------------------------------------------
|
|
254
|
+
function parsePBdrBottom(el) {
|
|
255
|
+
for (const child of el.children) {
|
|
256
|
+
if (child.type !== "element")
|
|
257
|
+
continue;
|
|
258
|
+
if (localName(child.tag) !== "bottom")
|
|
259
|
+
continue;
|
|
260
|
+
const val = child.attrs["w:val"] ?? "none";
|
|
261
|
+
if (val === "none" || val === "nil")
|
|
262
|
+
return null;
|
|
263
|
+
const sz = Number(child.attrs["w:sz"] ?? "4");
|
|
264
|
+
const color = normalizeColor(child.attrs["w:color"]) ?? "000000";
|
|
265
|
+
return {
|
|
266
|
+
style: normalizeBorderStyle(val),
|
|
267
|
+
widthPt: sz / 8, // eighths of a point → points
|
|
268
|
+
color,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
// ---------------------------------------------------------------------------
|
|
274
|
+
// Heading level resolution
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
/**
|
|
277
|
+
* Resolve heading level from style name and/or outline level.
|
|
278
|
+
*
|
|
279
|
+
* Word's built-in heading styles are named "heading 1" through "heading 9"
|
|
280
|
+
* (lowercase, space-separated) in styles.xml regardless of display language.
|
|
281
|
+
* "Title" maps to level 1, "Subtitle" to level 2 — these are conventional
|
|
282
|
+
* defaults that the caller can override via styleMap option.
|
|
283
|
+
*/
|
|
284
|
+
function resolveHeadingLevel(name, outlineLvl) {
|
|
285
|
+
const lower = name.toLowerCase().trim();
|
|
286
|
+
// "heading N" — canonical Word built-in heading style names
|
|
287
|
+
const headingMatch = /^heading\s+(\d)$/.exec(lower);
|
|
288
|
+
if (headingMatch) {
|
|
289
|
+
const lvl = Number(headingMatch[1]);
|
|
290
|
+
return lvl >= 1 && lvl <= 6 ? lvl : null;
|
|
291
|
+
}
|
|
292
|
+
// "title" → H1, "subtitle" → H2 (conventional defaults)
|
|
293
|
+
if (lower === "title")
|
|
294
|
+
return 1;
|
|
295
|
+
if (lower === "subtitle")
|
|
296
|
+
return 2;
|
|
297
|
+
// Fallback: outline level declared in pPr
|
|
298
|
+
if (outlineLvl !== null && outlineLvl >= 1 && outlineLvl <= 6)
|
|
299
|
+
return outlineLvl;
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
// ---------------------------------------------------------------------------
|
|
303
|
+
// Unit conversions
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
305
|
+
/** Convert twips (1/20 of a point) to centimetres. */
|
|
306
|
+
function twipsToCm(twips) {
|
|
307
|
+
// 1 inch = 1440 twips = 2.54 cm
|
|
308
|
+
return Number(((twips / 1440) * 2.54).toFixed(4));
|
|
309
|
+
}
|
|
310
|
+
/** Convert half-points to points. */
|
|
311
|
+
function halfPointsToPoints(val) {
|
|
312
|
+
if (val === undefined)
|
|
313
|
+
return null;
|
|
314
|
+
const n = Number(val);
|
|
315
|
+
return isNaN(n) ? null : n / 2;
|
|
316
|
+
}
|
|
317
|
+
// ---------------------------------------------------------------------------
|
|
318
|
+
// Normalisation helpers
|
|
319
|
+
// ---------------------------------------------------------------------------
|
|
320
|
+
function normalizeStyleType(raw) {
|
|
321
|
+
switch (raw) {
|
|
322
|
+
case "character":
|
|
323
|
+
return "character";
|
|
324
|
+
case "table":
|
|
325
|
+
return "table";
|
|
326
|
+
case "numbering":
|
|
327
|
+
return "numbering";
|
|
328
|
+
default:
|
|
329
|
+
return "paragraph";
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function normalizeAlignment(val) {
|
|
333
|
+
switch (val) {
|
|
334
|
+
case "left":
|
|
335
|
+
return "left";
|
|
336
|
+
case "center":
|
|
337
|
+
return "center";
|
|
338
|
+
case "right":
|
|
339
|
+
return "right";
|
|
340
|
+
case "both": // DOCX uses "both" for justify
|
|
341
|
+
return "justify";
|
|
342
|
+
default:
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function normalizeColor(val) {
|
|
347
|
+
if (!val || val === "auto")
|
|
348
|
+
return null;
|
|
349
|
+
return val.toUpperCase();
|
|
350
|
+
}
|
|
351
|
+
function normalizeBorderStyle(val) {
|
|
352
|
+
// Map common DOCX border styles to CSS/ODT equivalents
|
|
353
|
+
switch (val) {
|
|
354
|
+
case "dashed":
|
|
355
|
+
case "dashSmallGap":
|
|
356
|
+
return "dashed";
|
|
357
|
+
case "dotted":
|
|
358
|
+
case "dot":
|
|
359
|
+
return "dotted";
|
|
360
|
+
case "double":
|
|
361
|
+
return "double";
|
|
362
|
+
default:
|
|
363
|
+
return "solid";
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* DOCX uses w:val="0" to explicitly turn off a toggle property
|
|
368
|
+
* (bold, italic, etc.) when overriding an inherited style.
|
|
369
|
+
* Any other value (or absence) means the property is on.
|
|
370
|
+
*/
|
|
371
|
+
function isFalse(val) {
|
|
372
|
+
return val === "0" || val === "false";
|
|
373
|
+
}
|
|
374
|
+
// ---------------------------------------------------------------------------
|
|
375
|
+
// Utility
|
|
376
|
+
// ---------------------------------------------------------------------------
|
|
377
|
+
function localName(tag) {
|
|
378
|
+
const colon = tag.indexOf(":");
|
|
379
|
+
return colon === -1 ? tag : tag.slice(colon + 1);
|
|
380
|
+
}
|
|
381
|
+
// Re-export for use by body-reader
|
|
382
|
+
export { DEFAULT_RUN_PROPS, DEFAULT_PARA_PROPS };
|
|
383
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/docx/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,GAAG,GAAa,IAAI,GAAG,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAE3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,SAAS;QACvC,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO;YAAE,SAAS;QAE/C,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,KAAK;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E,SAAS,eAAe,CAAC,EAAkB;IACzC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,MAAM,OAAO,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