soccer-jersey-fork 1.0.122 → 1.0.123

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.
@@ -18,6 +18,6 @@ export declare const drawWaves: (page: Svg, primaryColor: string, secondaryColor
18
18
  export declare const drawConcentricCircles: (page: Svg, primaryColor: string, secondaryColor: string, direction: StyleDirection) => import("@svgdotjs/svg.js").Pattern;
19
19
  export declare const drawDashes: (page: Svg, primaryColor: string, secondaryColor: string, dashDirection: StyleDirection) => import("@svgdotjs/svg.js").Pattern;
20
20
  export declare const addShortSideColor: (page: Svg, color: string) => void;
21
- export declare function addShoulderSideColor(page: Svg, color: string): void;
21
+ export declare function addShoulderSideColor(page: Svg, color: string, isLongSleeve: boolean): void;
22
22
  export declare function addShirtSideColor(page: Svg, color: string): void;
23
23
  export declare const drawCrossLines: (page: Svg, primaryColor: string, secondaryColor: string, direction: StyleDirection) => import("@svgdotjs/svg.js").Pattern;
@@ -353,15 +353,18 @@ export const addShortSideColor = (page, color) => {
353
353
  .fill("none")
354
354
  .stroke({ width: 2, color, linecap: "butt" });
355
355
  };
356
- export function addShoulderSideColor(page, color) {
356
+ export function addShoulderSideColor(page, color, isLongSleeve) {
357
357
  // left
358
- page
359
- .path(`m 0 35 l 16.5 -26 20 -8.5`)
360
- .fill("none")
361
- .stroke({ width: 2, color, linecap: "butt" });
358
+ const leftPath = isLongSleeve
359
+ ? "m 17 10 1.36 -1 L 36 0.5"
360
+ : `m 0 35 l 16.5 -26 20 -8.5`;
361
+ page.path(leftPath).fill("none").stroke({ width: 2, color, linecap: "butt" });
362
+ const rightPath = isLongSleeve
363
+ ? "M 63.5 0.5 L 82.1 8.52 82.25 9.04" // Starts at collar center (63.5) -> moves right to wrist (82.25)
364
+ : `m 101 35 l -16.5 -26 -21 -8.5`;
362
365
  // right
363
366
  page
364
- .path(`m 101 35 l -16.5 -26 -21 -8.5`)
367
+ .path(rightPath)
365
368
  .fill("none")
366
369
  .stroke({ width: 2, color, linecap: "butt" });
367
370
  }
@@ -42,7 +42,7 @@ export default function drawSoccerJersey({ shirtColor = "plain", shirtStyle, shi
42
42
  .from(1, 1)
43
43
  .to(1, 0));
44
44
  if (shoulderSideColor) {
45
- addShoulderSideColor(page, shoulderSideColor);
45
+ addShoulderSideColor(page, shoulderSideColor, isLongSleeve);
46
46
  }
47
47
  if (sleeveCuffColor) {
48
48
  const pathLeftSleeveCuff = isLongSleeve
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soccer-jersey-fork",
3
- "version": "1.0.122",
3
+ "version": "1.0.123",
4
4
  "description": "Generate soccer jerseys in SVG format",
5
5
  "main": "lib/index.js",
6
6
  "author": "nadchif (https://github.com/nadchif)",