docxmlater 9.7.3 → 9.7.4

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/README.md CHANGED
@@ -11,6 +11,9 @@ A comprehensive, production-ready TypeScript/JavaScript framework for creating,
11
11
  - Buffer-based operations (load/save from memory)
12
12
  - Document properties (core, extended, custom)
13
13
  - Memory management with dispose pattern
14
+ - Bookmark pair validation and auto-repair (`validateBookmarkPairs()`)
15
+ - App.xml metadata preservation (HeadingPairs, TotalTime, etc.)
16
+ - Document background color/theme support
14
17
 
15
18
  ### Text & Paragraph Formatting
16
19
 
@@ -20,6 +23,9 @@ A comprehensive, production-ready TypeScript/JavaScript framework for creating,
20
23
  - Paragraph alignment, indentation, spacing, borders, shading
21
24
  - Text search and replace with regex support
22
25
  - Custom styles (paragraph, character, table)
26
+ - CJK/East Asian paragraph properties (kinsoku, wordWrap, overflowPunct, topLinePunct)
27
+ - Underline color and theme color attributes
28
+ - Theme font references (asciiTheme, hAnsiTheme, eastAsiaTheme, csTheme)
23
29
 
24
30
  ### Lists & Tables
25
31
 
@@ -29,6 +35,9 @@ A comprehensive, production-ready TypeScript/JavaScript framework for creating,
29
35
  - Tables with formatting, borders, shading
30
36
  - Cell spanning (merge cells horizontally and vertically)
31
37
  - Advanced table properties (margins, widths, alignment)
38
+ - Table navigation helpers (`getFirstParagraph()`, `getLastParagraph()`)
39
+ - Legacy horizontal merge (`hMerge`) support
40
+ - Table layout parsing (`fixed`/`auto`)
32
41
  - Table style shading updates (modify styles.xml colors)
33
42
  - Cell content management (trailing blank removal with structure preservation)
34
43
 
@@ -39,17 +48,25 @@ A comprehensive, production-ready TypeScript/JavaScript framework for creating,
39
48
  - Hyperlinks (external URLs, internal bookmarks)
40
49
  - Hyperlink defragmentation utility (fixes fragmented links from Google Docs)
41
50
  - Bookmarks and cross-references
51
+ - Body-level bookmark support (bookmarks between block elements)
42
52
  - Shapes and text boxes
43
53
 
44
54
  ### Advanced Features
45
55
 
46
56
  - Track changes (revisions for insertions, deletions, formatting)
57
+ - Granular character-level tracked changes (text diff-based)
47
58
  - Comments and annotations
48
59
  - Compatibility mode detection and upgrade (Word 2003/2007/2010/2013+ modes)
49
- - Table of contents generation with customizable heading levels
60
+ - Table of contents generation with customizable heading levels and relative indentation
50
61
  - Fields: merge fields, date/time, page numbers, TOC fields
51
62
  - Footnotes and endnotes
52
63
  - Content controls (Structured Document Tags)
64
+ - Form field data preservation (text input, checkbox, dropdown per ECMA-376 §17.16)
65
+ - w14 run effects passthrough (Word 2010+ ligatures, numForm, textOutline, etc.)
66
+ - Expanded document settings (evenAndOddHeaders, mirrorMargins, autoHyphenation, decimalSymbol)
67
+ - People.xml auto-registration for tracked changes authors
68
+ - Style default attribute preservation (`w:default="1"`)
69
+ - Namespace order preservation in generated XML
53
70
  - Multiple sections with different page layouts
54
71
  - Page orientation, size, and margins
55
72
  - Preserved element round-trip (math equations, alternate content, custom XML)
@@ -59,6 +76,8 @@ A comprehensive, production-ready TypeScript/JavaScript framework for creating,
59
76
  - Complete XML generation and parsing (ReDoS-safe, position-based parser)
60
77
  - 40+ unit conversion functions (twips, EMUs, points, pixels, inches, cm)
61
78
  - Validation utilities and corruption detection
79
+ - Text diff utility for character-level comparisons
80
+ - webSettings.xml auto-generation
62
81
  - Safe OOXML parsing helpers (zero-value handling, boolean parsing)
63
82
  - Full TypeScript support with comprehensive type definitions
64
83
  - Error handling utilities
@@ -551,7 +570,7 @@ const properties: DocumentProperties = {
551
570
 
552
571
  ## Version History
553
572
 
554
- **Current Version: 9.6.2**
573
+ **Current Version: 9.7.3**
555
574
 
556
575
  See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
557
576
 
@@ -559,7 +578,7 @@ See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
559
578
 
560
579
  The framework includes comprehensive test coverage:
561
580
 
562
- - **2260+ test cases** across 99 test suites
581
+ - **2506+ test cases** across 113 test suites
563
582
  - Tests cover all phases of implementation
564
583
  - Integration tests for complex scenarios
565
584
  - Performance benchmarks
@@ -1380,12 +1380,12 @@ class DocumentParser {
1380
1380
  const border = {};
1381
1381
  if (borderObj["@_w:val"])
1382
1382
  border.style = borderObj["@_w:val"];
1383
- if (borderObj["@_w:sz"])
1384
- border.size = parseInt(borderObj["@_w:sz"], 10);
1383
+ if (borderObj["@_w:sz"] !== undefined)
1384
+ border.size = (0, parsingHelpers_1.safeParseInt)(borderObj["@_w:sz"]);
1385
1385
  if (borderObj["@_w:color"])
1386
1386
  border.color = borderObj["@_w:color"];
1387
- if (borderObj["@_w:space"])
1388
- border.space = parseInt(borderObj["@_w:space"], 10);
1387
+ if (borderObj["@_w:space"] !== undefined)
1388
+ border.space = (0, parsingHelpers_1.safeParseInt)(borderObj["@_w:space"]);
1389
1389
  return Object.keys(border).length > 0 ? border : undefined;
1390
1390
  };
1391
1391
  if (pBdr["w:top"])
@@ -4090,10 +4090,10 @@ class DocumentParser {
4090
4090
  const border = {
4091
4091
  style: (borderObj["@_w:val"] || "single"),
4092
4092
  };
4093
- if (borderObj["@_w:sz"])
4094
- border.size = parseInt(borderObj["@_w:sz"], 10);
4095
- if (borderObj["@_w:space"])
4096
- border.space = parseInt(borderObj["@_w:space"], 10);
4093
+ if (borderObj["@_w:sz"] !== undefined)
4094
+ border.size = (0, parsingHelpers_1.safeParseInt)(borderObj["@_w:sz"]);
4095
+ if (borderObj["@_w:space"] !== undefined)
4096
+ border.space = (0, parsingHelpers_1.safeParseInt)(borderObj["@_w:space"]);
4097
4097
  if (borderObj["@_w:color"])
4098
4098
  border.color = borderObj["@_w:color"];
4099
4099
  return border;