js.documents 14.4.8 → 14.4.10
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/svg/path.cjs +5 -5
- package/dist/svg/path.js +5 -5
- package/package.json +2 -2
package/dist/svg/path.cjs
CHANGED
|
@@ -164,7 +164,7 @@ const COMMAND_ARITY = {
|
|
|
164
164
|
a: 7
|
|
165
165
|
};
|
|
166
166
|
function parseSvgPathData(d) {
|
|
167
|
-
const scanner = new PathScanner(d
|
|
167
|
+
const scanner = new PathScanner(d);
|
|
168
168
|
const cursor = {
|
|
169
169
|
x: 0,
|
|
170
170
|
y: 0,
|
|
@@ -219,7 +219,7 @@ function parseSvgPathData(d) {
|
|
|
219
219
|
}
|
|
220
220
|
const arity = COMMAND_ARITY[active];
|
|
221
221
|
if (arity === void 0) return;
|
|
222
|
-
let
|
|
222
|
+
let firstGroup = true;
|
|
223
223
|
for (;;) {
|
|
224
224
|
if (active === "A" || active === "a") {
|
|
225
225
|
const rx = scanner.nextNumber();
|
|
@@ -246,7 +246,7 @@ function parseSvgPathData(d) {
|
|
|
246
246
|
if (value === void 0) return;
|
|
247
247
|
args.push(value);
|
|
248
248
|
}
|
|
249
|
-
const relative = active === active.toLowerCase()
|
|
249
|
+
const relative = active === active.toLowerCase();
|
|
250
250
|
const point = (x, y) => relative ? {
|
|
251
251
|
x: cursor.x + x,
|
|
252
252
|
y: cursor.y + y
|
|
@@ -256,7 +256,7 @@ function parseSvgPathData(d) {
|
|
|
256
256
|
};
|
|
257
257
|
const upper = active.toUpperCase();
|
|
258
258
|
if (upper === "M") {
|
|
259
|
-
if (
|
|
259
|
+
if (firstGroup) startSubpath(point(args[0], args[1]));
|
|
260
260
|
else {
|
|
261
261
|
if (acc.current === void 0) return;
|
|
262
262
|
addLine(cursor, acc, point(args[0], args[1]));
|
|
@@ -317,7 +317,7 @@ function parseSvgPathData(d) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
|
|
320
|
+
firstGroup = false;
|
|
321
321
|
if (!hasNextNumberToken(scanner)) break;
|
|
322
322
|
}
|
|
323
323
|
}
|
package/dist/svg/path.js
CHANGED
|
@@ -163,7 +163,7 @@ const COMMAND_ARITY = {
|
|
|
163
163
|
a: 7
|
|
164
164
|
};
|
|
165
165
|
function parseSvgPathData(d) {
|
|
166
|
-
const scanner = new PathScanner(d
|
|
166
|
+
const scanner = new PathScanner(d);
|
|
167
167
|
const cursor = {
|
|
168
168
|
x: 0,
|
|
169
169
|
y: 0,
|
|
@@ -218,7 +218,7 @@ function parseSvgPathData(d) {
|
|
|
218
218
|
}
|
|
219
219
|
const arity = COMMAND_ARITY[active];
|
|
220
220
|
if (arity === void 0) return;
|
|
221
|
-
let
|
|
221
|
+
let firstGroup = true;
|
|
222
222
|
for (;;) {
|
|
223
223
|
if (active === "A" || active === "a") {
|
|
224
224
|
const rx = scanner.nextNumber();
|
|
@@ -245,7 +245,7 @@ function parseSvgPathData(d) {
|
|
|
245
245
|
if (value === void 0) return;
|
|
246
246
|
args.push(value);
|
|
247
247
|
}
|
|
248
|
-
const relative = active === active.toLowerCase()
|
|
248
|
+
const relative = active === active.toLowerCase();
|
|
249
249
|
const point = (x, y) => relative ? {
|
|
250
250
|
x: cursor.x + x,
|
|
251
251
|
y: cursor.y + y
|
|
@@ -255,7 +255,7 @@ function parseSvgPathData(d) {
|
|
|
255
255
|
};
|
|
256
256
|
const upper = active.toUpperCase();
|
|
257
257
|
if (upper === "M") {
|
|
258
|
-
if (
|
|
258
|
+
if (firstGroup) startSubpath(point(args[0], args[1]));
|
|
259
259
|
else {
|
|
260
260
|
if (acc.current === void 0) return;
|
|
261
261
|
addLine(cursor, acc, point(args[0], args[1]));
|
|
@@ -316,7 +316,7 @@ function parseSvgPathData(d) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
|
|
319
|
+
firstGroup = false;
|
|
320
320
|
if (!hasNextNumberToken(scanner)) break;
|
|
321
321
|
}
|
|
322
322
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.10",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"markdown-codec": "11.1.3",
|
|
87
87
|
"odf.js": "11.1.3",
|
|
88
88
|
"ooxml.js": "12.2.8",
|
|
89
|
-
"pdf-codec": "5.2.
|
|
89
|
+
"pdf-codec": "5.2.17",
|
|
90
90
|
"ppt-codec": "2.2.3",
|
|
91
91
|
"rtf-codec": "8.1.3",
|
|
92
92
|
"temml": "0.13.4",
|