docx-plus 0.0.4 → 0.0.6
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/LICENSE +1 -1
- package/README.md +20 -22
- package/dist/index.cjs +439 -30
- package/dist/index.d.cts +247 -71
- package/dist/index.d.mts +247 -71
- package/dist/index.iife.js +439 -30
- package/dist/index.mjs +436 -30
- package/dist/index.umd.js +439 -30
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="./logo/logo-animate.svg" width="100%" height="300" alt="docx-plus">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.
|
|
7
|
-
</p>
|
|
8
|
-
|
|
9
|
-
---
|
|
1
|
+
# docx-plus
|
|
10
2
|
|
|
11
3
|
[![NPM version][npm-image]][npm-url]
|
|
12
4
|
[![Downloads per month][downloads-image]][downloads-url]
|
|
13
5
|
[![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url]
|
|
14
|
-
[![Known Vulnerabilities][snky-image]][snky-url]
|
|
15
6
|
[![PRs Welcome][pr-image]][pr-url]
|
|
16
|
-
[codecov][codecov-image][codecov-url]
|
|
17
7
|
|
|
18
|
-
|
|
8
|
+
Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.
|
|
19
9
|
|
|
20
10
|
**docx-plus** is an enhanced fork of [docx](https://github.com/dolanmiu/docx) — a TypeScript/JavaScript library for generating and modifying Word documents (.docx) programmatically with a declarative API.
|
|
21
11
|
|
|
22
12
|
## What's Different from docx?
|
|
23
13
|
|
|
24
|
-
| | docx
|
|
25
|
-
| ------------------- |
|
|
26
|
-
| ZIP handling | jszip
|
|
27
|
-
| Data conversion | Manual env detection (`Buffer.from` etc.)
|
|
28
|
-
| `Packer.toStream()` | Removed (pseudo-streaming)
|
|
29
|
-
| Test environment | jsdom
|
|
14
|
+
| | docx | docx-plus |
|
|
15
|
+
| ------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| ZIP handling | jszip | **fflate** (faster, smaller) |
|
|
17
|
+
| Data conversion | Manual env detection (`Buffer.from` etc.) | **undio** (universal `toUint8Array`) |
|
|
18
|
+
| `Packer.toStream()` | Removed (pseudo-streaming) | **Restored** with real streaming ZIP |
|
|
19
|
+
| Test environment | jsdom | happy-dom |
|
|
20
|
+
| OOXML compliance | ECMA-376 (legacy) | **ISO/IEC 29500-4** (latest) |
|
|
21
|
+
| Theme support | Partial (missing `ThemeColor`/`ThemeFont`) | **Full** (`ThemeColor`, `ThemeFont` enums, theme attributes on `Color`, `Underline`, `Border`, `Shading`) |
|
|
22
|
+
| CT_Ind | Twips-only indent | **Character-based** (`startChars`, `endChars`, `hangingChars`, `firstLineChars`) |
|
|
23
|
+
| CT_Spacing | Missing `beforeLines`/`afterLines` | **Complete** (both twips & line-unit spacing) |
|
|
24
|
+
| CT_Border | Missing `shadow`/`frame`/theme attrs | **Complete** (`shadow`, `frame`, `themeColor`, `themeTint`, `themeShade`) |
|
|
25
|
+
| CT_Shd | Missing theme fill/color attrs | **Complete** (`themeColor`, `themeFill`, `themeTint`/`themeShade`) |
|
|
26
|
+
| EG_RPrBase | Missing `outline`/`shadow`/`webHidden`/`fitText`/`cs` | **Complete** (all spec-defined elements) |
|
|
27
|
+
| ST_Em | `dot` only | **Complete** (`none`, `comma`, `circle`, `dot`, `underDot`) |
|
|
28
|
+
| ST_TabTlc | Missing `heavy` | **Complete** (`none`, `dot`, `hyphen`, `middleDot`, `underscore`, `heavy`) |
|
|
29
|
+
| CT_PPrBase | Missing 9 paragraph props | **Complete** (`suppressAutoHyphens`, `adjustRightInd`, `snapToGrid`, `mirrorIndents`, East Asian typography, `textAlignment`, `textboxTightWrap`) |
|
|
30
|
+
| CT_SectPr | Missing `noEndnote`/`bidi`/`rtlGutter`/`paperSrc`/`footnotePr`/`endnotePr` | **Complete** (all spec-defined elements) |
|
|
31
|
+
| EG_RPrBase | Missing `eastAsianLayout` | **Complete** (`eastAsianLayout` with `combine`, `combineBrackets`, `vert`, `vertCompress`) |
|
|
30
32
|
|
|
31
33
|
## Installation
|
|
32
34
|
|
|
@@ -88,9 +90,5 @@ Contributions are welcome! Please feel free to submit pull requests.
|
|
|
88
90
|
[downloads-url]: https://npmjs.org/package/docx-plus
|
|
89
91
|
[github-actions-workflow-image]: https://github.com/DemoMacro/docx-plus/workflows/Default/badge.svg?branch=main
|
|
90
92
|
[github-actions-workflow-url]: https://github.com/DemoMacro/docx-plus/actions
|
|
91
|
-
[snky-image]: https://snyk.io/test/github/DemoMacro/docx-plus/badge.svg
|
|
92
|
-
[snky-url]: https://snyk.io/test/github/DemoMacro/docx-plus
|
|
93
93
|
[pr-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
|
|
94
94
|
[pr-url]: http://makeapullrequest.com
|
|
95
|
-
[codecov-image]: https://codecov.io/gh/DemoMacro/docx-plus/branch/main/graph/badge.svg
|
|
96
|
-
[codecov-url]: https://codecov.io/gh/DemoMacro/docx-plus
|