soccer-jersey-fork 1.0.30 → 1.0.32

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.
@@ -1,3 +1,8 @@
1
+ /*!
2
+ * This file has been modified from the original.
3
+ * Original source: https://github.com/nadchif/soccer-jersey/tree/master
4
+ * Modifications Copyright 2025 Lau Kai Chung
5
+ */
1
6
  export interface DrawSoccerJerseyProps {
2
7
  shirtText: string;
3
8
  textColor: string;
@@ -1,6 +1,5 @@
1
1
  import { DrawSoccerJerseyProps } from "../types";
2
2
  /**
3
- *
4
3
  * @param {object} specs Specifications of the soccer jersey.
5
4
  * @param {string} specs.shirtText The text to be displayed on the shirt.
6
5
  * Recommended 3 letter team initials
@@ -1,9 +1,14 @@
1
+ /*!
2
+ * This file has been modified from the original.
3
+ * Original source: https://github.com/nadchif/soccer-jersey/tree/master
4
+ * Modifications Copyright 2025 Lau Kai Chung
5
+ *
6
+ */
1
7
  /* eslint-disable max-len */
2
8
  import { SVG } from "@svgdotjs/svg.js";
3
9
  import lightenDarkenColor from "./lighten-darken-color";
4
10
  import { drawHoops, drawSingleBand, drawStriped, drawCheckered, drawTwoColor, drawWaves, drawDashes, } from "../patterns/patterns";
5
11
  /**
6
- *
7
12
  * @param {object} specs Specifications of the soccer jersey.
8
13
  * @param {string} specs.shirtText The text to be displayed on the shirt.
9
14
  * Recommended 3 letter team initials
@@ -175,6 +180,14 @@ export default function drawSoccerJersey({ shirtText, textColor, textOutlineColo
175
180
  page.width(shirtWidth);
176
181
  const pathShorts = `m 23 98 c 5 6, 50 6, 56 0 l 2 ${shortsHeight} c 0 5, -27 5, -27.5 0 l -2 -10, -2 10, c 0 5, -27 5, -27.5 0 l 1 -${shortsHeight}`;
177
182
  page.path(pathShorts).fill(shortsColor);
183
+ page.path(pathShorts).fill(page
184
+ .gradient("linear", function (add) {
185
+ add.stop(0, "#000", 0.2);
186
+ add.stop(0.44, "#ddd", 0.1);
187
+ add.stop(1, "#fff", 0.1);
188
+ })
189
+ .from(1, 1)
190
+ .to(1, 0));
178
191
  }
179
192
  // +10 is some extra room with the shorts height, so the total should be 150
180
193
  page.viewbox(`0 0 102 ${100 + shortsHeight + 10}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soccer-jersey-fork",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Generate soccer jerseys in SVG format",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {