* fix: separate vertical alignment enums for table and section properties
- Introduced `VerticalAlignTable` for table-cell vertical alignment with valid values: `top`, `center`, and `bottom`.
- Added `VerticalAlignSection` for section properties, extending `VerticalAlignTable` with an additional value `both`.
- Marked the original `VerticalAlign` as deprecated for backward compatibility, directing users to the new enums.
- Updated type definitions for better clarity on valid vertical alignments.
* refactor: update vertical alignment imports and types for section and table properties
- Renamed `VerticalAlign` to `VerticalAlignSection` in section properties and `VerticalAlignTable` in table-cell properties for clarity.
- Updated type definitions to reflect the new enum names, ensuring better organization and understanding of vertical alignment options.
- Adjusted related test cases to utilize the new imports and types.
* refactor: update demos to use new enums for table and section properties for vertical alignment
* fix: patchDocument, looks for namspaces more carefully over whole document
added support of different placeholder brackets, default `{{`: `}}`
extended inputDataType to accept JSZip
* fix: Attribute value string not converted to HTML esc char by js2xml
original: https://github.com/nashwaan/xml-js/issues/142
* fix: skip processing utf-16 encoded files
* fix: patching goes on the second circle over patched document
added parameter `recursive`(= true by default) to be able to disable
this behavior
* Fix linting
* Simplify code
* write tests to skip UTF-16 types
---------
Co-authored-by: Vladimir Bulyga <vladimir.bulyga@legatics.com>
Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
* feat(comments): Support comment pictures
* fix(demo): Fix the image path to load the image correctly
* fix(test): Update the number of files asserted in the compiler test case
* feat(comments): Support comment pictures
* fix(demo): Fix the image path to load the image correctly
* fix(test): Update the number of files asserted in the compiler test case
* style(src): Format the code and remove extra blank lines
---------
Co-authored-by: Dolan <dolan_miu@hotmail.com>
* export IPropertiesOptions for use by other libraries or code using docx library
* fixes#2978: export OutputTypes
* Export file in main index file
* Move type export to inside
---------
Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
* Add test to demonstrate empty strings not creating runs
* Fix Run not creating Text child for empty strings
* Simplify TextRun constructor
Since `Run` already has a option for instantiating a `Text` element, we don't need to push children here.
* Add replacer test for empty runs
* Add replacer test for empty runs
* replacer: handle patches with empty runs
* Fix incorrect test name
* Adjust test to demo duplicated br tags
* Fix patchDocument duplicating br tags
* Only include w:Pr
* Fix tag condition
---------
Co-authored-by: Dolan <dolan_miu@hotmail.com>
* feat: Add ability to detect patches which are present in a file
* chore: export patchDetector function
* fix: Make sure we don't attempt to call toJson on binary content
---------
Co-authored-by: Christopher Fox <cfox@homebound.com>
* Limit the list of supported highlight colors
* Fix tests: use fixed highlight color values
---------
Co-authored-by: ilyasogonov <sogonov.ilya@customscard.ru>
* Turn patch document into options object
Add outputType to options
* Set keep styles to true by default
* Simplify method
* Rename variable
* #2267 Multiple patches of same key
* Remove path which won't be visited
* #239 Embedded fonts
* Add boilerplate for font table
* Fix linting
* Fix linting
* Fix odttf naming
* Correct writing of fonts to relationships and font table
new uuid function
* Add font to run
* Add demo
Fix tests
* Add character set support
* Add tests
* Write tests