odf.js 5.0.3 → 5.0.5
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/styles/properties.cjs +30 -26
- package/dist/styles/properties.js +30 -26
- package/package.json +7 -6
|
@@ -202,36 +202,40 @@ function textPropertiesToAttributes(properties) {
|
|
|
202
202
|
name: ATTR.fontStyle,
|
|
203
203
|
value: properties.italic ? "italic" : "normal"
|
|
204
204
|
});
|
|
205
|
-
if (properties.underline !== void 0)
|
|
206
|
-
|
|
205
|
+
if (properties.underline !== void 0) {
|
|
206
|
+
if (properties.underline) {
|
|
207
|
+
attributes.push({
|
|
208
|
+
name: ATTR.underlineStyle,
|
|
209
|
+
value: "solid"
|
|
210
|
+
});
|
|
211
|
+
attributes.push({
|
|
212
|
+
name: ATTR.underlineWidth,
|
|
213
|
+
value: "auto"
|
|
214
|
+
});
|
|
215
|
+
attributes.push({
|
|
216
|
+
name: ATTR.underlineColor,
|
|
217
|
+
value: "font-color"
|
|
218
|
+
});
|
|
219
|
+
} else attributes.push({
|
|
207
220
|
name: ATTR.underlineStyle,
|
|
208
|
-
value: "
|
|
221
|
+
value: "none"
|
|
209
222
|
});
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (properties.strike !== void 0) if (properties.strike) {
|
|
223
|
-
attributes.push({
|
|
223
|
+
}
|
|
224
|
+
if (properties.strike !== void 0) {
|
|
225
|
+
if (properties.strike) {
|
|
226
|
+
attributes.push({
|
|
227
|
+
name: ATTR.lineThroughStyle,
|
|
228
|
+
value: "solid"
|
|
229
|
+
});
|
|
230
|
+
attributes.push({
|
|
231
|
+
name: ATTR.lineThroughType,
|
|
232
|
+
value: "single"
|
|
233
|
+
});
|
|
234
|
+
} else attributes.push({
|
|
224
235
|
name: ATTR.lineThroughStyle,
|
|
225
|
-
value: "
|
|
236
|
+
value: "none"
|
|
226
237
|
});
|
|
227
|
-
|
|
228
|
-
name: ATTR.lineThroughType,
|
|
229
|
-
value: "single"
|
|
230
|
-
});
|
|
231
|
-
} else attributes.push({
|
|
232
|
-
name: ATTR.lineThroughStyle,
|
|
233
|
-
value: "none"
|
|
234
|
-
});
|
|
238
|
+
}
|
|
235
239
|
if (properties.fontFamily !== void 0) attributes.push({
|
|
236
240
|
name: ATTR.fontFamily,
|
|
237
241
|
value: require_xml_entities.encodeXmlText(properties.fontFamily)
|
|
@@ -201,36 +201,40 @@ function textPropertiesToAttributes(properties) {
|
|
|
201
201
|
name: ATTR.fontStyle,
|
|
202
202
|
value: properties.italic ? "italic" : "normal"
|
|
203
203
|
});
|
|
204
|
-
if (properties.underline !== void 0)
|
|
205
|
-
|
|
204
|
+
if (properties.underline !== void 0) {
|
|
205
|
+
if (properties.underline) {
|
|
206
|
+
attributes.push({
|
|
207
|
+
name: ATTR.underlineStyle,
|
|
208
|
+
value: "solid"
|
|
209
|
+
});
|
|
210
|
+
attributes.push({
|
|
211
|
+
name: ATTR.underlineWidth,
|
|
212
|
+
value: "auto"
|
|
213
|
+
});
|
|
214
|
+
attributes.push({
|
|
215
|
+
name: ATTR.underlineColor,
|
|
216
|
+
value: "font-color"
|
|
217
|
+
});
|
|
218
|
+
} else attributes.push({
|
|
206
219
|
name: ATTR.underlineStyle,
|
|
207
|
-
value: "
|
|
220
|
+
value: "none"
|
|
208
221
|
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (properties.strike !== void 0) if (properties.strike) {
|
|
222
|
-
attributes.push({
|
|
222
|
+
}
|
|
223
|
+
if (properties.strike !== void 0) {
|
|
224
|
+
if (properties.strike) {
|
|
225
|
+
attributes.push({
|
|
226
|
+
name: ATTR.lineThroughStyle,
|
|
227
|
+
value: "solid"
|
|
228
|
+
});
|
|
229
|
+
attributes.push({
|
|
230
|
+
name: ATTR.lineThroughType,
|
|
231
|
+
value: "single"
|
|
232
|
+
});
|
|
233
|
+
} else attributes.push({
|
|
223
234
|
name: ATTR.lineThroughStyle,
|
|
224
|
-
value: "
|
|
235
|
+
value: "none"
|
|
225
236
|
});
|
|
226
|
-
|
|
227
|
-
name: ATTR.lineThroughType,
|
|
228
|
-
value: "single"
|
|
229
|
-
});
|
|
230
|
-
} else attributes.push({
|
|
231
|
-
name: ATTR.lineThroughStyle,
|
|
232
|
-
value: "none"
|
|
233
|
-
});
|
|
237
|
+
}
|
|
234
238
|
if (properties.fontFamily !== void 0) attributes.push({
|
|
235
239
|
name: ATTR.fontFamily,
|
|
236
240
|
value: encodeXmlText(properties.fontFamily)
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odf.js",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "Type-safe, lossless round-trip conversion between OpenDocument Format packages (odt, ods, odp) and JSON, hand-written and dependency-minimal, 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/odf.js"
|
|
9
10
|
},
|
|
10
|
-
"homepage": "https://github.com/ExaDev/odf.js
|
|
11
|
+
"homepage": "https://github.com/ExaDev/documents.js/tree/main/packages/odf.js",
|
|
11
12
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/ExaDev/
|
|
13
|
+
"url": "https://github.com/ExaDev/documents.js/issues"
|
|
13
14
|
},
|
|
14
15
|
"exports": {
|
|
15
16
|
".": {
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"test:coverage": "turbo run _test:coverage",
|
|
61
62
|
"_test:coverage": "vitest run --project unit --coverage",
|
|
62
63
|
"test:smoke": "turbo run _test:smoke",
|
|
63
|
-
"_test:smoke": "
|
|
64
|
+
"_test:smoke": "vitest run --project smoke",
|
|
64
65
|
"prepare": "husky",
|
|
65
66
|
"release": "semantic-release"
|
|
66
67
|
},
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"license": "MIT",
|
|
78
79
|
"packageManager": "pnpm@11.6.0",
|
|
79
80
|
"dependencies": {
|
|
80
|
-
"document-schema.js": "^4.3.
|
|
81
|
+
"document-schema.js": "^4.3.5",
|
|
81
82
|
"fast-xml-parser": "^5.10.1",
|
|
82
83
|
"fflate": "^0.8.3",
|
|
83
84
|
"zod": "^4.4.3"
|