docgen-utils 1.0.11 → 1.0.13
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/bundle.js +42918 -6708
- package/dist/bundle.min.js +289 -109
- package/dist/cli.js +26450 -1266
- package/dist/packages/cli/commands/export-docs.d.ts.map +1 -1
- package/dist/packages/cli/commands/export-docs.js +131 -2
- package/dist/packages/cli/commands/export-docs.js.map +1 -1
- package/dist/packages/cli/commands/export-slides.d.ts.map +1 -1
- package/dist/packages/cli/commands/export-slides.js +25 -1
- package/dist/packages/cli/commands/export-slides.js.map +1 -1
- package/dist/packages/docs/common.d.ts +10 -0
- package/dist/packages/docs/common.d.ts.map +1 -1
- package/dist/packages/docs/common.js.map +1 -1
- package/dist/packages/docs/convert.d.ts.map +1 -1
- package/dist/packages/docs/convert.js +246 -218
- package/dist/packages/docs/convert.js.map +1 -1
- package/dist/packages/docs/create-document.d.ts.map +1 -1
- package/dist/packages/docs/create-document.js +43 -3
- package/dist/packages/docs/create-document.js.map +1 -1
- package/dist/packages/docs/export.d.ts +9 -8
- package/dist/packages/docs/export.d.ts.map +1 -1
- package/dist/packages/docs/export.js +23 -36
- package/dist/packages/docs/export.js.map +1 -1
- package/dist/packages/docs/import-docx.d.ts.map +1 -1
- package/dist/packages/docs/import-docx.js +397 -7
- package/dist/packages/docs/import-docx.js.map +1 -1
- package/dist/packages/docs/parse-colors.d.ts +37 -0
- package/dist/packages/docs/parse-colors.d.ts.map +1 -0
- package/dist/packages/docs/parse-colors.js +507 -0
- package/dist/packages/docs/parse-colors.js.map +1 -0
- package/dist/packages/docs/parse-css.d.ts +98 -0
- package/dist/packages/docs/parse-css.d.ts.map +1 -0
- package/dist/packages/docs/parse-css.js +1592 -0
- package/dist/packages/docs/parse-css.js.map +1 -0
- package/dist/packages/docs/parse-helpers.d.ts +45 -0
- package/dist/packages/docs/parse-helpers.d.ts.map +1 -0
- package/dist/packages/docs/parse-helpers.js +214 -0
- package/dist/packages/docs/parse-helpers.js.map +1 -0
- package/dist/packages/docs/parse-inline.d.ts +41 -0
- package/dist/packages/docs/parse-inline.d.ts.map +1 -0
- package/dist/packages/docs/parse-inline.js +473 -0
- package/dist/packages/docs/parse-inline.js.map +1 -0
- package/dist/packages/docs/parse-layout.d.ts +57 -0
- package/dist/packages/docs/parse-layout.d.ts.map +1 -0
- package/dist/packages/docs/parse-layout.js +295 -0
- package/dist/packages/docs/parse-layout.js.map +1 -0
- package/dist/packages/docs/parse-special.d.ts +51 -0
- package/dist/packages/docs/parse-special.d.ts.map +1 -0
- package/dist/packages/docs/parse-special.js +251 -0
- package/dist/packages/docs/parse-special.js.map +1 -0
- package/dist/packages/docs/parse-units.d.ts +68 -0
- package/dist/packages/docs/parse-units.d.ts.map +1 -0
- package/dist/packages/docs/parse-units.js +275 -0
- package/dist/packages/docs/parse-units.js.map +1 -0
- package/dist/packages/docs/parse.d.ts.map +1 -1
- package/dist/packages/docs/parse.js +957 -2800
- package/dist/packages/docs/parse.js.map +1 -1
- package/dist/packages/slides/common.d.ts +7 -0
- package/dist/packages/slides/common.d.ts.map +1 -1
- package/dist/packages/slides/convert.d.ts.map +1 -1
- package/dist/packages/slides/convert.js +92 -7
- package/dist/packages/slides/convert.js.map +1 -1
- package/dist/packages/slides/fonts.d.ts +41 -0
- package/dist/packages/slides/fonts.d.ts.map +1 -0
- package/dist/packages/slides/fonts.js +209 -0
- package/dist/packages/slides/fonts.js.map +1 -0
- package/dist/packages/slides/import-pptx.d.ts.map +1 -1
- package/dist/packages/slides/import-pptx.js +583 -120
- package/dist/packages/slides/import-pptx.js.map +1 -1
- package/dist/packages/slides/parse.d.ts.map +1 -1
- package/dist/packages/slides/parse.js +724 -91
- package/dist/packages/slides/parse.js.map +1 -1
- package/dist/packages/slides/transform.d.ts +6 -6
- package/dist/packages/slides/transform.d.ts.map +1 -1
- package/dist/packages/slides/transform.js +25 -51
- package/dist/packages/slides/transform.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { getElementStyles } from "./parse-css";
|
|
2
|
+
import { extractHexColor, extractPrimaryFont } from "./parse-colors";
|
|
3
|
+
import { parseFontSizeToHalfPoints, parseLetterSpacingToTwips } from "./parse-units";
|
|
4
|
+
import { getTextContent } from "./parse-helpers";
|
|
5
|
+
/**
|
|
6
|
+
* Inline element tags that should NOT break a container into multiple paragraphs.
|
|
7
|
+
* These elements can be combined into a single paragraph with multiple runs.
|
|
8
|
+
*/
|
|
9
|
+
export const INLINE_TAGS = [
|
|
10
|
+
"span", "a", "b", "strong", "i", "em", "u", "s", "strike", "del", "ins",
|
|
11
|
+
"sub", "sup", "small", "mark", "abbr", "cite", "code", "kbd", "samp", "var",
|
|
12
|
+
"time", "data", "q", "dfn", "ruby", "rt", "rp", "bdi", "bdo", "wbr", "br",
|
|
13
|
+
"label", "font", "input"
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Check if a tag name indicates bold formatting.
|
|
17
|
+
*/
|
|
18
|
+
export function isBoldTag(tagName) {
|
|
19
|
+
return tagName === "strong" || tagName === "b";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Check if a tag name indicates italic formatting.
|
|
23
|
+
*/
|
|
24
|
+
export function isItalicTag(tagName) {
|
|
25
|
+
return tagName === "em" || tagName === "i";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a container element has ONLY inline content (text nodes, spans, inline formatting).
|
|
29
|
+
* Returns true if the container should be treated as a single paragraph.
|
|
30
|
+
* Returns false if the container has block-level children that need separate paragraphs.
|
|
31
|
+
*/
|
|
32
|
+
export function isInlineOnlyContainer(element) {
|
|
33
|
+
// Check all child nodes
|
|
34
|
+
for (const child of element.childNodes) {
|
|
35
|
+
// Text nodes are inline - continue checking
|
|
36
|
+
if (child.nodeType === Node.TEXT_NODE) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
// Skip comments and other non-element nodes
|
|
40
|
+
if (child.nodeType !== Node.ELEMENT_NODE || !(child instanceof Element)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const tagName = child.tagName.toLowerCase();
|
|
44
|
+
// If child is an inline tag, recursively check its children
|
|
45
|
+
if (INLINE_TAGS.includes(tagName)) {
|
|
46
|
+
// Recursively check if this inline element also has only inline content
|
|
47
|
+
if (!isInlineOnlyContainer(child)) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
// Any other element tag is considered block-level (div, p, ul, table, h1-h6, etc.)
|
|
53
|
+
// The container has block-level children, so it should NOT be treated as inline-only
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
// All children are inline - this container can be a single paragraph
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Extract inline runs with formatting from an element.
|
|
61
|
+
* Walks the DOM tree and collects text with bold/italic state.
|
|
62
|
+
* Also extracts CSS ::before and ::after pseudo-element content.
|
|
63
|
+
*/
|
|
64
|
+
export function extractInlineRuns(element, cssContext, inheritedColor, inheritedFontFamily) {
|
|
65
|
+
const runs = [];
|
|
66
|
+
// GENERALIZED: Extract ::before pseudo-element content
|
|
67
|
+
// This handles CSS rules like "dd.dish-pairings::before { content: 'Suggested Pairing: '; }"
|
|
68
|
+
if (typeof window !== "undefined" && window.getComputedStyle) {
|
|
69
|
+
try {
|
|
70
|
+
const beforeStyles = window.getComputedStyle(element, "::before");
|
|
71
|
+
const beforeContent = beforeStyles.content;
|
|
72
|
+
// content property returns "none" or a quoted string like '"Suggested Pairing: "'
|
|
73
|
+
if (beforeContent && beforeContent !== "none" && beforeContent !== "normal") {
|
|
74
|
+
// Remove quotes from the content string
|
|
75
|
+
const cleanContent = beforeContent.replace(/^["']|["']$/g, "");
|
|
76
|
+
if (cleanContent) {
|
|
77
|
+
// Get styling from the pseudo-element
|
|
78
|
+
const fontWeight = beforeStyles.fontWeight;
|
|
79
|
+
const fontStyle = beforeStyles.fontStyle;
|
|
80
|
+
const color = beforeStyles.color ? extractHexColor(beforeStyles.color) : undefined;
|
|
81
|
+
runs.push({
|
|
82
|
+
text: cleanContent,
|
|
83
|
+
bold: fontWeight === "700" || fontWeight === "bold" || fontWeight === "600" || undefined,
|
|
84
|
+
italic: fontStyle === "italic" || undefined,
|
|
85
|
+
color,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
// getComputedStyle may fail in some environments
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function walkNode(node, bold, italic, color, backgroundColor, superscript, subscript, strike, underline, fontFamily, size, letterSpacing) {
|
|
95
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
96
|
+
const text = node.textContent || "";
|
|
97
|
+
if (text) {
|
|
98
|
+
// Normalize whitespace but preserve spaces between words
|
|
99
|
+
const normalizedText = text.replace(/\s+/g, " ");
|
|
100
|
+
if (normalizedText.trim() || normalizedText === " ") {
|
|
101
|
+
runs.push({ text: normalizedText, bold, italic, color, backgroundColor, superscript, subscript, strike, underline, fontFamily, size, letterSpacing });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (node.nodeType !== Node.ELEMENT_NODE || !(node instanceof Element)) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const tagName = node.tagName.toLowerCase();
|
|
110
|
+
// Handle <br> tags - insert a newline
|
|
111
|
+
if (tagName === "br") {
|
|
112
|
+
runs.push({ text: "\n", bold, italic, color, backgroundColor, fontFamily, size });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
// Handle <input type="checkbox"> - convert to text symbols
|
|
116
|
+
if (tagName === "input" && node.getAttribute("type") === "checkbox") {
|
|
117
|
+
const isChecked = node.hasAttribute("checked");
|
|
118
|
+
runs.push({ text: isChecked ? "☑ " : "☐ ", bold, italic, color, backgroundColor, fontFamily, size });
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
// Handle inline <code> tags - apply monospace font and light gray background
|
|
122
|
+
if (tagName === "code") {
|
|
123
|
+
const codeText = node.textContent || "";
|
|
124
|
+
if (codeText.trim()) {
|
|
125
|
+
// Use Courier New as a universally available monospace font
|
|
126
|
+
let codeBgColor = "F3F4F6"; // Light gray default
|
|
127
|
+
let codeColor = color;
|
|
128
|
+
if (cssContext) {
|
|
129
|
+
const codeStyles = getElementStyles(node, cssContext);
|
|
130
|
+
if (codeStyles.backgroundColor) {
|
|
131
|
+
const hexBg = extractHexColor(codeStyles.backgroundColor);
|
|
132
|
+
if (hexBg)
|
|
133
|
+
codeBgColor = hexBg;
|
|
134
|
+
}
|
|
135
|
+
if (codeStyles.color) {
|
|
136
|
+
const hexColor = extractHexColor(codeStyles.color);
|
|
137
|
+
if (hexColor)
|
|
138
|
+
codeColor = hexColor;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
runs.push({
|
|
142
|
+
text: codeText,
|
|
143
|
+
bold,
|
|
144
|
+
italic,
|
|
145
|
+
color: codeColor,
|
|
146
|
+
backgroundColor: codeBgColor,
|
|
147
|
+
fontFamily: "Courier New",
|
|
148
|
+
size: size ? Math.round(size * 0.9) : 22, // Slightly smaller (11pt default)
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let newBold = bold || isBoldTag(tagName);
|
|
154
|
+
let newItalic = italic || isItalicTag(tagName);
|
|
155
|
+
let newSuperscript = superscript || tagName === "sup";
|
|
156
|
+
let newSubscript = subscript || tagName === "sub";
|
|
157
|
+
let newStrike = strike || tagName === "s" || tagName === "del" || tagName === "strike";
|
|
158
|
+
let newUnderline = underline;
|
|
159
|
+
let newFontFamily = fontFamily;
|
|
160
|
+
let newSize = size;
|
|
161
|
+
let newLetterSpacing = letterSpacing;
|
|
162
|
+
// Handle underline from <u> tag or <abbr> tag
|
|
163
|
+
if (tagName === "u") {
|
|
164
|
+
newUnderline = { type: "single" };
|
|
165
|
+
}
|
|
166
|
+
else if (tagName === "abbr") {
|
|
167
|
+
// abbr elements typically have dotted underlines (border-bottom: dotted)
|
|
168
|
+
// Check CSS for border-bottom color
|
|
169
|
+
let underlineColor;
|
|
170
|
+
if (cssContext) {
|
|
171
|
+
const styles = getElementStyles(node, cssContext);
|
|
172
|
+
if (styles.borderBottom) {
|
|
173
|
+
// Extract color from border-bottom (e.g., "1px dotted #b8860b")
|
|
174
|
+
const colorMatch = styles.borderBottom.match(/#([0-9a-fA-F]{3,6})/i);
|
|
175
|
+
if (colorMatch) {
|
|
176
|
+
underlineColor = colorMatch[1].toUpperCase();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
newUnderline = { type: "dotted", color: underlineColor };
|
|
181
|
+
}
|
|
182
|
+
// Extract colors from this element
|
|
183
|
+
let newColor = color;
|
|
184
|
+
let newBackgroundColor = backgroundColor;
|
|
185
|
+
if (cssContext) {
|
|
186
|
+
const styles = getElementStyles(node, cssContext);
|
|
187
|
+
if (styles.color) {
|
|
188
|
+
const hexColor = extractHexColor(styles.color);
|
|
189
|
+
if (hexColor)
|
|
190
|
+
newColor = hexColor;
|
|
191
|
+
}
|
|
192
|
+
if (styles.backgroundColor) {
|
|
193
|
+
const hexBg = extractHexColor(styles.backgroundColor);
|
|
194
|
+
if (hexBg)
|
|
195
|
+
newBackgroundColor = hexBg;
|
|
196
|
+
}
|
|
197
|
+
// Check for gradient text from CSS classes
|
|
198
|
+
if (styles.gradient) {
|
|
199
|
+
// This span has gradient text - collect text content and create gradient run
|
|
200
|
+
const gradientText = getTextContent(node).trim();
|
|
201
|
+
if (gradientText) {
|
|
202
|
+
const fallbackColor = styles.gradient.stops[0]?.color;
|
|
203
|
+
runs.push({ text: gradientText, bold: newBold, italic: newItalic, gradient: styles.gradient, color: fallbackColor || newColor, fontFamily: newFontFamily, size: newSize });
|
|
204
|
+
return; // Don't recurse - we've captured all text
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
// Check for font-weight: bold/700/600 from CSS classes
|
|
208
|
+
if (styles.fontWeight === "700" || styles.fontWeight === "bold" || styles.fontWeight === "600") {
|
|
209
|
+
newBold = true;
|
|
210
|
+
}
|
|
211
|
+
else if (styles.fontWeight === "normal" || styles.fontWeight === "400" || styles.fontWeight === "300" || styles.fontWeight === "100") {
|
|
212
|
+
newBold = false;
|
|
213
|
+
}
|
|
214
|
+
// Check for font-style: italic/normal from CSS classes
|
|
215
|
+
if (styles.fontStyle === "italic") {
|
|
216
|
+
newItalic = true;
|
|
217
|
+
}
|
|
218
|
+
else if (styles.fontStyle === "normal") {
|
|
219
|
+
newItalic = false;
|
|
220
|
+
}
|
|
221
|
+
// Check for font-family from CSS classes
|
|
222
|
+
if (styles.fontFamily) {
|
|
223
|
+
newFontFamily = styles.fontFamily;
|
|
224
|
+
}
|
|
225
|
+
// GENERALIZED: Check for font-size from CSS classes
|
|
226
|
+
if (styles.fontSize) {
|
|
227
|
+
const halfPoints = parseFontSizeToHalfPoints(styles.fontSize);
|
|
228
|
+
if (halfPoints)
|
|
229
|
+
newSize = halfPoints;
|
|
230
|
+
}
|
|
231
|
+
// Check for letter-spacing from CSS classes
|
|
232
|
+
if (styles.letterSpacing) {
|
|
233
|
+
const lsTwips = parseLetterSpacingToTwips(styles.letterSpacing);
|
|
234
|
+
if (lsTwips !== undefined)
|
|
235
|
+
newLetterSpacing = lsTwips;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
// Also check inline styles
|
|
239
|
+
const inlineStyle = node.getAttribute("style") || "";
|
|
240
|
+
if (inlineStyle) {
|
|
241
|
+
const colorMatch = inlineStyle.match(/(?:^|;)\s*color\s*:\s*([^;]+)/i);
|
|
242
|
+
if (colorMatch) {
|
|
243
|
+
const hexColor = extractHexColor(colorMatch[1]);
|
|
244
|
+
if (hexColor)
|
|
245
|
+
newColor = hexColor;
|
|
246
|
+
}
|
|
247
|
+
const bgMatch = inlineStyle.match(/background(?:-color)?\s*:\s*([^;]+)/i);
|
|
248
|
+
if (bgMatch) {
|
|
249
|
+
const hexBg = extractHexColor(bgMatch[1]);
|
|
250
|
+
if (hexBg)
|
|
251
|
+
newBackgroundColor = hexBg;
|
|
252
|
+
}
|
|
253
|
+
// Check inline font-weight
|
|
254
|
+
const weightMatch = inlineStyle.match(/font-weight\s*:\s*([^;]+)/i);
|
|
255
|
+
if (weightMatch) {
|
|
256
|
+
const weight = weightMatch[1].trim();
|
|
257
|
+
if (weight === "700" || weight === "bold" || weight === "600") {
|
|
258
|
+
newBold = true;
|
|
259
|
+
}
|
|
260
|
+
else if (weight === "normal" || weight === "400" || weight === "300" || weight === "100") {
|
|
261
|
+
newBold = false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// Check inline font-style
|
|
265
|
+
const styleMatch = inlineStyle.match(/font-style\s*:\s*([^;]+)/i);
|
|
266
|
+
if (styleMatch) {
|
|
267
|
+
const style = styleMatch[1].trim();
|
|
268
|
+
if (style === "italic") {
|
|
269
|
+
newItalic = true;
|
|
270
|
+
}
|
|
271
|
+
else if (style === "normal") {
|
|
272
|
+
newItalic = false;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// Check inline text-decoration for strikethrough
|
|
276
|
+
const textDecoMatch = inlineStyle.match(/text-decoration(?:-line)?\s*:\s*([^;]+)/i);
|
|
277
|
+
if (textDecoMatch) {
|
|
278
|
+
const decoValue = textDecoMatch[1].trim().toLowerCase();
|
|
279
|
+
if (decoValue.includes("line-through")) {
|
|
280
|
+
newStrike = true;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
// Check inline font-family
|
|
284
|
+
const fontFamilyMatch = inlineStyle.match(/font-family\s*:\s*([^;]+)/i);
|
|
285
|
+
if (fontFamilyMatch) {
|
|
286
|
+
const primaryFont = extractPrimaryFont(fontFamilyMatch[1].trim());
|
|
287
|
+
if (primaryFont) {
|
|
288
|
+
newFontFamily = primaryFont;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// GENERALIZED: Check inline font-size
|
|
292
|
+
const fontSizeMatch = inlineStyle.match(/font-size\s*:\s*([^;]+)/i);
|
|
293
|
+
if (fontSizeMatch) {
|
|
294
|
+
const halfPoints = parseFontSizeToHalfPoints(fontSizeMatch[1].trim());
|
|
295
|
+
if (halfPoints)
|
|
296
|
+
newSize = halfPoints;
|
|
297
|
+
}
|
|
298
|
+
// Check inline letter-spacing
|
|
299
|
+
const letterSpacingMatch = inlineStyle.match(/letter-spacing\s*:\s*([^;]+)/i);
|
|
300
|
+
if (letterSpacingMatch) {
|
|
301
|
+
const lsTwips = parseLetterSpacingToTwips(letterSpacingMatch[1].trim());
|
|
302
|
+
if (lsTwips !== undefined)
|
|
303
|
+
newLetterSpacing = lsTwips;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
for (const child of node.childNodes) {
|
|
307
|
+
walkNode(child, newBold, newItalic, newColor, newBackgroundColor, newSuperscript, newSubscript, newStrike, newUnderline, newFontFamily, newSize, newLetterSpacing);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
// GENERALIZED: Extract styles from the element itself (e.g., <td class="positive">)
|
|
311
|
+
// These styles should be inherited by all text children
|
|
312
|
+
let elementBold = false;
|
|
313
|
+
let elementItalic = false;
|
|
314
|
+
let elementColor = inheritedColor;
|
|
315
|
+
let elementBackgroundColor;
|
|
316
|
+
let elementFontFamily = inheritedFontFamily;
|
|
317
|
+
let elementSize;
|
|
318
|
+
let elementLetterSpacing;
|
|
319
|
+
if (cssContext) {
|
|
320
|
+
const styles = getElementStyles(element, cssContext);
|
|
321
|
+
if (styles.color) {
|
|
322
|
+
const hexColor = extractHexColor(styles.color);
|
|
323
|
+
if (hexColor)
|
|
324
|
+
elementColor = hexColor;
|
|
325
|
+
}
|
|
326
|
+
if (styles.backgroundColor) {
|
|
327
|
+
const hexBg = extractHexColor(styles.backgroundColor);
|
|
328
|
+
if (hexBg)
|
|
329
|
+
elementBackgroundColor = hexBg;
|
|
330
|
+
}
|
|
331
|
+
if (styles.fontWeight === "700" || styles.fontWeight === "bold" || styles.fontWeight === "600") {
|
|
332
|
+
elementBold = true;
|
|
333
|
+
}
|
|
334
|
+
if (styles.fontStyle === "italic") {
|
|
335
|
+
elementItalic = true;
|
|
336
|
+
}
|
|
337
|
+
if (styles.fontFamily) {
|
|
338
|
+
elementFontFamily = styles.fontFamily;
|
|
339
|
+
}
|
|
340
|
+
// GENERALIZED: Extract font-size from element's CSS classes
|
|
341
|
+
if (styles.fontSize) {
|
|
342
|
+
const halfPoints = parseFontSizeToHalfPoints(styles.fontSize);
|
|
343
|
+
if (halfPoints)
|
|
344
|
+
elementSize = halfPoints;
|
|
345
|
+
}
|
|
346
|
+
// Extract letter-spacing from element's CSS classes
|
|
347
|
+
if (styles.letterSpacing) {
|
|
348
|
+
const lsTwips = parseLetterSpacingToTwips(styles.letterSpacing);
|
|
349
|
+
if (lsTwips !== undefined)
|
|
350
|
+
elementLetterSpacing = lsTwips;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
for (const child of element.childNodes) {
|
|
354
|
+
walkNode(child, elementBold, elementItalic, elementColor, elementBackgroundColor, false, false, false, undefined, elementFontFamily, elementSize, elementLetterSpacing);
|
|
355
|
+
}
|
|
356
|
+
// Merge adjacent runs with same formatting and normalize
|
|
357
|
+
return mergeAndNormalizeRuns(runs);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Merge adjacent runs with same formatting and normalize whitespace.
|
|
361
|
+
*/
|
|
362
|
+
export function mergeAndNormalizeRuns(runs) {
|
|
363
|
+
if (runs.length === 0)
|
|
364
|
+
return [];
|
|
365
|
+
const merged = [];
|
|
366
|
+
// Helper to compare underline properties
|
|
367
|
+
const underlineEqual = (a, b) => {
|
|
368
|
+
if (!a && !b)
|
|
369
|
+
return true;
|
|
370
|
+
if (!a || !b)
|
|
371
|
+
return false;
|
|
372
|
+
return a.type === b.type && a.color === b.color;
|
|
373
|
+
};
|
|
374
|
+
for (const run of runs) {
|
|
375
|
+
const last = merged[merged.length - 1];
|
|
376
|
+
// Only merge if all formatting properties match
|
|
377
|
+
if (last &&
|
|
378
|
+
last.bold === run.bold &&
|
|
379
|
+
last.italic === run.italic &&
|
|
380
|
+
last.color === run.color &&
|
|
381
|
+
last.backgroundColor === run.backgroundColor &&
|
|
382
|
+
last.superscript === run.superscript &&
|
|
383
|
+
last.subscript === run.subscript &&
|
|
384
|
+
last.strike === run.strike &&
|
|
385
|
+
last.letterSpacing === run.letterSpacing &&
|
|
386
|
+
last.fontFamily === run.fontFamily &&
|
|
387
|
+
last.size === run.size &&
|
|
388
|
+
underlineEqual(last.underline, run.underline)) {
|
|
389
|
+
last.text += run.text;
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
merged.push({ ...run });
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
// Normalize: trim leading whitespace from first run, trailing from last
|
|
396
|
+
if (merged.length > 0) {
|
|
397
|
+
merged[0].text = merged[0].text.trimStart();
|
|
398
|
+
merged[merged.length - 1].text = merged[merged.length - 1].text.trimEnd();
|
|
399
|
+
}
|
|
400
|
+
// Filter out empty runs
|
|
401
|
+
return merged.filter((r) => r.text.length > 0);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Check if any inline run has formatting (bold, italic, color, backgroundColor, fontFamily, size, etc.).
|
|
405
|
+
*/
|
|
406
|
+
export function hasInlineFormatting(runs) {
|
|
407
|
+
return runs.some((r) => r.bold || r.italic || r.color || r.backgroundColor || r.fontFamily || r.size || r.superscript || r.subscript || r.underline || r.letterSpacing);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Extract inline runs from a collection of nodes (excluding nested lists).
|
|
411
|
+
* This is similar to extractInlineRuns but works on a subset of nodes.
|
|
412
|
+
*/
|
|
413
|
+
export function extractInlineRunsFromNodes(nodes, cssContext) {
|
|
414
|
+
const runs = [];
|
|
415
|
+
function walkNode(node, bold, italic, color, backgroundColor, superscript, subscript) {
|
|
416
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
417
|
+
const text = node.textContent || "";
|
|
418
|
+
if (text) {
|
|
419
|
+
runs.push({
|
|
420
|
+
text,
|
|
421
|
+
bold: bold || undefined,
|
|
422
|
+
italic: italic || undefined,
|
|
423
|
+
color,
|
|
424
|
+
backgroundColor,
|
|
425
|
+
superscript: superscript || undefined,
|
|
426
|
+
subscript: subscript || undefined,
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
if (node.nodeType !== Node.ELEMENT_NODE)
|
|
432
|
+
return;
|
|
433
|
+
const element = node;
|
|
434
|
+
const tagName = element.tagName.toLowerCase();
|
|
435
|
+
// Skip nested lists entirely - they're handled separately
|
|
436
|
+
if (tagName === "ul" || tagName === "ol")
|
|
437
|
+
return;
|
|
438
|
+
// Determine formatting from tag
|
|
439
|
+
let newBold = bold || tagName === "strong" || tagName === "b";
|
|
440
|
+
let newItalic = italic || tagName === "em" || tagName === "i";
|
|
441
|
+
let newSuperscript = superscript || tagName === "sup";
|
|
442
|
+
let newSubscript = subscript || tagName === "sub";
|
|
443
|
+
let newColor = color;
|
|
444
|
+
let newBackgroundColor = backgroundColor;
|
|
445
|
+
// Get styles from CSS context
|
|
446
|
+
const styles = getElementStyles(element, cssContext);
|
|
447
|
+
if (styles.fontWeight === "700" || styles.fontWeight === "bold" || styles.fontWeight === "600") {
|
|
448
|
+
newBold = true;
|
|
449
|
+
}
|
|
450
|
+
if (styles.fontStyle === "italic") {
|
|
451
|
+
newItalic = true;
|
|
452
|
+
}
|
|
453
|
+
if (styles.color) {
|
|
454
|
+
const extracted = extractHexColor(styles.color);
|
|
455
|
+
if (extracted)
|
|
456
|
+
newColor = extracted;
|
|
457
|
+
}
|
|
458
|
+
if (styles.backgroundColor) {
|
|
459
|
+
const extracted = extractHexColor(styles.backgroundColor);
|
|
460
|
+
if (extracted)
|
|
461
|
+
newBackgroundColor = extracted;
|
|
462
|
+
}
|
|
463
|
+
// Recurse into children
|
|
464
|
+
for (const child of node.childNodes) {
|
|
465
|
+
walkNode(child, newBold, newItalic, newColor, newBackgroundColor, newSuperscript, newSubscript);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
for (const node of nodes) {
|
|
469
|
+
walkNode(node, false, false);
|
|
470
|
+
}
|
|
471
|
+
return mergeAndNormalizeRuns(runs);
|
|
472
|
+
}
|
|
473
|
+
//# sourceMappingURL=parse-inline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-inline.js","sourceRoot":"","sources":["../../../packages/docs/parse-inline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK;IACvE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI;IACzE,OAAO,EAAE,MAAM,EAAE,OAAO;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe;IAC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AS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { CssContext } from "./parse-css";
|
|
2
|
+
export declare function isGridOrFlexContainer(element: Element, cssContext: CssContext): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* GENERALIZED: Check if an element is a horizontal flex container.
|
|
5
|
+
* A horizontal flex container has display: flex with flex-direction: row (or unset, since row is default).
|
|
6
|
+
* This is used to detect containers where flex items should be visually separated
|
|
7
|
+
* with a separator character (like " • ") to represent the CSS gap.
|
|
8
|
+
*
|
|
9
|
+
* @param element - The element to check
|
|
10
|
+
* @param cssContext - CSS context for style resolution
|
|
11
|
+
* @returns true if this is a horizontal flex container, false otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare function isHorizontalFlexContainer(element: Element, cssContext: CssContext): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Check if an SVG element is purely decorative (background pattern, decoration, etc).
|
|
16
|
+
* Decorative SVGs should NOT be converted to chart placeholders.
|
|
17
|
+
*
|
|
18
|
+
* Detection criteria (style-based, not class-name-based per skill rules):
|
|
19
|
+
* 1. Fixed/absolute positioning (background elements)
|
|
20
|
+
* 2. Very low opacity (< 0.5)
|
|
21
|
+
* 3. Contains only pattern definitions (<defs>, <pattern>, <linearGradient>)
|
|
22
|
+
* 4. Is a background overlay (pointer-events: none)
|
|
23
|
+
* 5. Very small viewBox (icons < 50x50)
|
|
24
|
+
*/
|
|
25
|
+
export declare function isDecorativeSvg(svgElement: Element, parentElement: Element, cssContext: CssContext): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if an element is a two-column CSS grid layout.
|
|
28
|
+
* Detects patterns like: display: grid; grid-template-columns: Xpx 1fr
|
|
29
|
+
* Returns the sidebar width percentage if it's a two-column layout, undefined otherwise.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isTwoColumnGridLayout(element: Element, cssContext: CssContext): number | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Find the sidebar and main content elements in a two-column grid container.
|
|
34
|
+
* Returns the first two direct children as [sidebar, main] or undefined.
|
|
35
|
+
*/
|
|
36
|
+
export declare function findTwoColumnChildren(container: Element): [Element, Element] | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* GENERALIZED: Detect if an element is a flex container with equal-width columns.
|
|
39
|
+
* This handles layouts like:
|
|
40
|
+
* display: flex; with children having flex: 1 (equal width)
|
|
41
|
+
*
|
|
42
|
+
* Returns the column children if detected, undefined otherwise.
|
|
43
|
+
* Each child will become a column in a DOCX table.
|
|
44
|
+
*/
|
|
45
|
+
export declare function detectFlexEqualColumns(element: Element, cssContext: CssContext): Element[] | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Detect if an element uses CSS Grid with equal-width columns.
|
|
48
|
+
* Patterns:
|
|
49
|
+
* display: grid; grid-template-columns: 1fr 1fr
|
|
50
|
+
* display: grid; grid-template-columns: repeat(2, 1fr)
|
|
51
|
+
* display: grid; grid-template-columns: repeat(3, 1fr)
|
|
52
|
+
*
|
|
53
|
+
* Returns the column children if detected, undefined otherwise.
|
|
54
|
+
* Only matches equal-width patterns (all 1fr), not sidebar patterns (280px 1fr).
|
|
55
|
+
*/
|
|
56
|
+
export declare function detectGridEqualColumns(element: Element, cssContext: CssContext): Element[] | undefined;
|
|
57
|
+
//# sourceMappingURL=parse-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-layout.d.ts","sourceRoot":"","sources":["../../../packages/docs/parse-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAGvF;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CA0B3F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAkH5G;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAmDlG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,CAWxF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,EAAE,GAAG,SAAS,CAyCtG;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,EAAE,GAAG,SAAS,CA+CtG"}
|