ooxml.js 4.0.8 → 4.0.9
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.
|
@@ -154,8 +154,10 @@ function buildParagraphProperties(paragraph, pageBreakBefore) {
|
|
|
154
154
|
if (Object.keys(spacing).length > 0) children.push(require_xml_fragment.el("w:spacing", spacing));
|
|
155
155
|
const indent = {};
|
|
156
156
|
if (paragraph.indentLeftPt !== void 0) indent["w:left"] = String(require_typed_shared_units.ptToTwips(paragraph.indentLeftPt));
|
|
157
|
-
if (paragraph.indentFirstLinePt !== void 0)
|
|
158
|
-
|
|
157
|
+
if (paragraph.indentFirstLinePt !== void 0) {
|
|
158
|
+
if (paragraph.indentFirstLinePt < 0) indent["w:hanging"] = String(require_typed_shared_units.ptToTwips(-paragraph.indentFirstLinePt));
|
|
159
|
+
else indent["w:firstLine"] = String(require_typed_shared_units.ptToTwips(paragraph.indentFirstLinePt));
|
|
160
|
+
}
|
|
159
161
|
if (Object.keys(indent).length > 0) children.push(require_xml_fragment.el("w:ind", indent));
|
|
160
162
|
if (paragraph.alignment !== void 0) children.push(require_xml_fragment.el("w:jc", { "w:val": JUSTIFICATION_BY_ALIGNMENT[paragraph.alignment] }));
|
|
161
163
|
if (paragraph.headingLevel !== void 0) children.push(require_xml_fragment.el("w:outlineLvl", { "w:val": String(paragraph.headingLevel - 1) }));
|
package/dist/typed/docx/write.js
CHANGED
|
@@ -153,8 +153,10 @@ function buildParagraphProperties(paragraph, pageBreakBefore) {
|
|
|
153
153
|
if (Object.keys(spacing).length > 0) children.push(el("w:spacing", spacing));
|
|
154
154
|
const indent = {};
|
|
155
155
|
if (paragraph.indentLeftPt !== void 0) indent["w:left"] = String(ptToTwips(paragraph.indentLeftPt));
|
|
156
|
-
if (paragraph.indentFirstLinePt !== void 0)
|
|
157
|
-
|
|
156
|
+
if (paragraph.indentFirstLinePt !== void 0) {
|
|
157
|
+
if (paragraph.indentFirstLinePt < 0) indent["w:hanging"] = String(ptToTwips(-paragraph.indentFirstLinePt));
|
|
158
|
+
else indent["w:firstLine"] = String(ptToTwips(paragraph.indentFirstLinePt));
|
|
159
|
+
}
|
|
158
160
|
if (Object.keys(indent).length > 0) children.push(el("w:ind", indent));
|
|
159
161
|
if (paragraph.alignment !== void 0) children.push(el("w:jc", { "w:val": JUSTIFICATION_BY_ALIGNMENT[paragraph.alignment] }));
|
|
160
162
|
if (paragraph.headingLevel !== void 0) children.push(el("w:outlineLvl", { "w:val": String(paragraph.headingLevel - 1) }));
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ooxml.js",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9",
|
|
4
4
|
"description": "Type-safe, lossless round-trip conversion between OOXML packages (docx, pptx, xlsx) and JSON, built on Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/ExaDev/
|
|
8
|
+
"url": "git+https://github.com/ExaDev/documents.js.git",
|
|
9
|
+
"directory": "packages/ooxml.js"
|
|
9
10
|
},
|
|
10
11
|
"homepage": "https://github.com/ExaDev/ooxml.js#readme",
|
|
11
12
|
"bugs": {
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"test:coverage": "turbo run _test:coverage",
|
|
60
61
|
"_test:coverage": "vitest run --project unit --coverage",
|
|
61
62
|
"test:smoke": "turbo run _test:smoke",
|
|
62
|
-
"_test:smoke": "
|
|
63
|
+
"_test:smoke": "vitest run --project smoke",
|
|
63
64
|
"test:workers": "turbo run _test:workers",
|
|
64
65
|
"_test:workers": "vitest run --config vitest.workers.config.ts",
|
|
65
66
|
"prepare": "husky",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"license": "MIT",
|
|
79
80
|
"packageManager": "pnpm@11.6.0",
|
|
80
81
|
"dependencies": {
|
|
81
|
-
"document-schema.js": "^4.3.
|
|
82
|
+
"document-schema.js": "^4.3.4",
|
|
82
83
|
"fast-xml-parser": "^5.10.1",
|
|
83
84
|
"fflate": "^0.8.3",
|
|
84
85
|
"zod": "^4.4.3"
|