soccer-jersey-fork 1.0.26 → 1.0.27
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.
|
@@ -15,7 +15,7 @@ export const Default = {
|
|
|
15
15
|
textColor: "#fff",
|
|
16
16
|
collarColor: "red",
|
|
17
17
|
sleeveCuffColor: "yellow",
|
|
18
|
-
|
|
18
|
+
shortsColor: "black",
|
|
19
19
|
customImageConfig: {
|
|
20
20
|
src: "https://resources.simcups.com/flags/w80/264.png",
|
|
21
21
|
},
|
|
@@ -29,7 +29,7 @@ export const ARS = {
|
|
|
29
29
|
shirtStyle: "checkered",
|
|
30
30
|
shirtStyleColor: "#dc0001",
|
|
31
31
|
textColor: "#fff",
|
|
32
|
-
|
|
32
|
+
shortsColor: "black",
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
export const AVL = {
|
|
@@ -39,7 +39,7 @@ export const AVL = {
|
|
|
39
39
|
sleeveColor: "#94bee5",
|
|
40
40
|
shirtStyle: "plain",
|
|
41
41
|
textColor: "#fff",
|
|
42
|
-
|
|
42
|
+
shortsColor: "black",
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
export const BHA = {
|
|
@@ -50,7 +50,7 @@ export const BHA = {
|
|
|
50
50
|
shirtStyle: "striped-thin",
|
|
51
51
|
shirtStyleColor: "#fff",
|
|
52
52
|
textColor: "#fff",
|
|
53
|
-
|
|
53
|
+
shortsColor: "black",
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
56
|
export const BUR = {
|
|
@@ -59,7 +59,7 @@ export const BUR = {
|
|
|
59
59
|
shirtColor: "#81204c",
|
|
60
60
|
sleeveColor: "#8bd3f5",
|
|
61
61
|
textColor: "#fff",
|
|
62
|
-
|
|
62
|
+
shortsColor: "black",
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
export const CHE = {
|
|
@@ -69,7 +69,7 @@ export const CHE = {
|
|
|
69
69
|
sleeveColor: "#001489",
|
|
70
70
|
shirtStyle: "plain",
|
|
71
71
|
textColor: "#fff",
|
|
72
|
-
|
|
72
|
+
shortsColor: "black",
|
|
73
73
|
},
|
|
74
74
|
};
|
|
75
75
|
export const CRY = {
|
|
@@ -80,7 +80,7 @@ export const CRY = {
|
|
|
80
80
|
shirtStyle: "striped",
|
|
81
81
|
shirtStyleColor: "#ff362b",
|
|
82
82
|
textColor: "#fff",
|
|
83
|
-
|
|
83
|
+
shortsColor: "black",
|
|
84
84
|
},
|
|
85
85
|
};
|
|
86
86
|
export const FUL = {
|
|
@@ -90,7 +90,7 @@ export const FUL = {
|
|
|
90
90
|
sleeveColor: "#333",
|
|
91
91
|
shirtStyle: "plain",
|
|
92
92
|
textColor: "#222",
|
|
93
|
-
|
|
93
|
+
shortsColor: "black",
|
|
94
94
|
},
|
|
95
95
|
};
|
|
96
96
|
export const LEE = {
|
|
@@ -100,7 +100,7 @@ export const LEE = {
|
|
|
100
100
|
sleeveColor: "#ffffff",
|
|
101
101
|
shirtStyle: "plain",
|
|
102
102
|
textColor: "#1d4189",
|
|
103
|
-
|
|
103
|
+
shortsColor: "black",
|
|
104
104
|
},
|
|
105
105
|
};
|
|
106
106
|
export const LEI = {
|
|
@@ -110,7 +110,7 @@ export const LEI = {
|
|
|
110
110
|
sleeveColor: "#003090",
|
|
111
111
|
shirtStyle: "plain",
|
|
112
112
|
textColor: "#fefefe",
|
|
113
|
-
|
|
113
|
+
shortsColor: "black",
|
|
114
114
|
},
|
|
115
115
|
};
|
|
116
116
|
export const LIV = {
|
|
@@ -120,7 +120,7 @@ export const LIV = {
|
|
|
120
120
|
sleeveColor: "#e31b23",
|
|
121
121
|
shirtStyle: "plain",
|
|
122
122
|
textColor: "#fff",
|
|
123
|
-
|
|
123
|
+
shortsColor: "black",
|
|
124
124
|
},
|
|
125
125
|
};
|
|
126
126
|
export const MCI = {
|
|
@@ -139,7 +139,7 @@ export const MUN = {
|
|
|
139
139
|
sleeveColor: "#c70101",
|
|
140
140
|
shirtStyle: "plain",
|
|
141
141
|
textColor: "#fed500",
|
|
142
|
-
|
|
142
|
+
shortsColor: "black",
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
145
|
export const NEW = {
|
|
@@ -150,7 +150,7 @@ export const NEW = {
|
|
|
150
150
|
shirtStyle: "striped",
|
|
151
151
|
shirtStyleColor: "#111",
|
|
152
152
|
textColor: "#00bcf6",
|
|
153
|
-
|
|
153
|
+
shortsColor: "black",
|
|
154
154
|
},
|
|
155
155
|
};
|
|
156
156
|
export const SHE = {
|
|
@@ -172,7 +172,7 @@ export const SOU = {
|
|
|
172
172
|
shirtStyleColor: "#fff",
|
|
173
173
|
textColor: "#111",
|
|
174
174
|
shirtStyleDirection: "diagonal-left",
|
|
175
|
-
|
|
175
|
+
shortsColor: "black",
|
|
176
176
|
},
|
|
177
177
|
};
|
|
178
178
|
export const TOT = {
|
|
@@ -182,7 +182,7 @@ export const TOT = {
|
|
|
182
182
|
sleeveColor: "#0a225c",
|
|
183
183
|
shirtStyle: "plain",
|
|
184
184
|
textColor: "#d31145",
|
|
185
|
-
|
|
185
|
+
shortsColor: "black",
|
|
186
186
|
},
|
|
187
187
|
};
|
|
188
188
|
export const WIG = {
|
|
@@ -194,7 +194,7 @@ export const WIG = {
|
|
|
194
194
|
shirtStyleColor: "#002f68",
|
|
195
195
|
textColor: "#fff",
|
|
196
196
|
textBackgroundColor: "#002f68",
|
|
197
|
-
|
|
197
|
+
shortsColor: "black",
|
|
198
198
|
},
|
|
199
199
|
};
|
|
200
200
|
export const WHU = {
|
|
@@ -204,7 +204,7 @@ export const WHU = {
|
|
|
204
204
|
sleeveColor: "#59b3e4",
|
|
205
205
|
shirtStyle: "plain",
|
|
206
206
|
textColor: "#fff",
|
|
207
|
-
|
|
207
|
+
shortsColor: "black",
|
|
208
208
|
},
|
|
209
209
|
};
|
|
210
210
|
export const WOL = {
|
|
@@ -214,7 +214,7 @@ export const WOL = {
|
|
|
214
214
|
sleeveColor: "#333",
|
|
215
215
|
shirtStyle: "plain",
|
|
216
216
|
textColor: "#222",
|
|
217
|
-
|
|
217
|
+
shortsColor: "black",
|
|
218
218
|
},
|
|
219
219
|
};
|
|
220
220
|
export const PSG = {
|
|
@@ -226,7 +226,7 @@ export const PSG = {
|
|
|
226
226
|
shirtStyleColor: "#cc1339",
|
|
227
227
|
textColor: "#fff",
|
|
228
228
|
shirtStyleDirection: "vertical",
|
|
229
|
-
|
|
229
|
+
shortsColor: "black",
|
|
230
230
|
},
|
|
231
231
|
};
|
|
232
232
|
export const ACM = {
|
|
@@ -237,7 +237,7 @@ export const ACM = {
|
|
|
237
237
|
shirtStyle: "striped",
|
|
238
238
|
shirtStyleColor: "#222",
|
|
239
239
|
textColor: "#fff",
|
|
240
|
-
|
|
240
|
+
shortsColor: "black",
|
|
241
241
|
},
|
|
242
242
|
};
|
|
243
243
|
export const BAR = {
|
|
@@ -248,7 +248,7 @@ export const BAR = {
|
|
|
248
248
|
shirtStyle: "striped-thick",
|
|
249
249
|
shirtStyleColor: "#84112b",
|
|
250
250
|
textColor: "#fff",
|
|
251
|
-
|
|
251
|
+
shortsColor: "black",
|
|
252
252
|
},
|
|
253
253
|
};
|
|
254
254
|
export const FCB = {
|
|
@@ -258,7 +258,7 @@ export const FCB = {
|
|
|
258
258
|
sleeveColor: "#d1122e",
|
|
259
259
|
shirtStyle: "plain",
|
|
260
260
|
textColor: "#fff",
|
|
261
|
-
|
|
261
|
+
shortsColor: "black",
|
|
262
262
|
},
|
|
263
263
|
};
|
|
264
264
|
export const JUV = {
|
|
@@ -269,7 +269,7 @@ export const JUV = {
|
|
|
269
269
|
shirtStyle: "striped",
|
|
270
270
|
shirtStyleColor: "#222",
|
|
271
271
|
textColor: "#e1ceaf",
|
|
272
|
-
|
|
272
|
+
shortsColor: "black",
|
|
273
273
|
},
|
|
274
274
|
};
|
|
275
275
|
export const BVB = {
|
|
@@ -282,7 +282,7 @@ export const BVB = {
|
|
|
282
282
|
shirtStyleDirection: "diagonal-right",
|
|
283
283
|
textColor: "#fff",
|
|
284
284
|
textBackgroundColor: "#333",
|
|
285
|
-
|
|
285
|
+
shortsColor: "black",
|
|
286
286
|
},
|
|
287
287
|
};
|
|
288
288
|
export const CAG = {
|
|
@@ -293,7 +293,7 @@ export const CAG = {
|
|
|
293
293
|
shirtStyle: "two-color",
|
|
294
294
|
shirtStyleColor: "#1d2c47",
|
|
295
295
|
textColor: "#fff",
|
|
296
|
-
|
|
296
|
+
shortsColor: "black",
|
|
297
297
|
},
|
|
298
298
|
};
|
|
299
299
|
export const MON = {
|
|
@@ -305,7 +305,7 @@ export const MON = {
|
|
|
305
305
|
shirtStyleColor: "#e53236",
|
|
306
306
|
shirtStyleDirection: "diagonal-left",
|
|
307
307
|
textColor: "#fff",
|
|
308
|
-
|
|
308
|
+
shortsColor: "black",
|
|
309
309
|
},
|
|
310
310
|
};
|
|
311
311
|
export const INT = {
|
|
@@ -316,6 +316,6 @@ export const INT = {
|
|
|
316
316
|
shirtStyle: "waves",
|
|
317
317
|
shirtStyleColor: "#222",
|
|
318
318
|
textColor: "#fff",
|
|
319
|
-
|
|
319
|
+
shortsColor: "black",
|
|
320
320
|
},
|
|
321
321
|
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -27,4 +27,4 @@ import { DrawSoccerJerseyProps } from "../types";
|
|
|
27
27
|
* @return {string} A data URL ready for direct use as src attribute
|
|
28
28
|
* on <img />
|
|
29
29
|
*/
|
|
30
|
-
export default function drawSoccerJersey({ shirtText, textColor, textOutlineColor, textBackgroundColor, shirtColor, sleeveColor, shirtStyle, shirtStyleColor, shirtStyleDirection, isBack, shirtWidth, collarColor, sleeveCuffColor, customImageConfig,
|
|
30
|
+
export default function drawSoccerJersey({ shirtText, textColor, textOutlineColor, textBackgroundColor, shirtColor, sleeveColor, shirtStyle, shirtStyleColor, shirtStyleDirection, isBack, shirtWidth, collarColor, sleeveCuffColor, customImageConfig, shortsColor, withDefaultBadge, withShorts, }: DrawSoccerJerseyProps): string;
|
|
@@ -30,7 +30,7 @@ import { drawHoops, drawSingleBand, drawStriped, drawCheckered, drawTwoColor, dr
|
|
|
30
30
|
* @return {string} A data URL ready for direct use as src attribute
|
|
31
31
|
* on <img />
|
|
32
32
|
*/
|
|
33
|
-
export default function drawSoccerJersey({ shirtText, textColor, textOutlineColor, textBackgroundColor, shirtColor = "plain", sleeveColor, shirtStyle, shirtStyleColor, shirtStyleDirection, isBack = false, shirtWidth = 200, collarColor, sleeveCuffColor, customImageConfig,
|
|
33
|
+
export default function drawSoccerJersey({ shirtText, textColor, textOutlineColor, textBackgroundColor, shirtColor = "plain", sleeveColor, shirtStyle, shirtStyleColor, shirtStyleDirection, isBack = false, shirtWidth = 200, collarColor, sleeveCuffColor, customImageConfig, shortsColor, withDefaultBadge = true, withShorts = true, }) {
|
|
34
34
|
// Colors and Color Optimizations
|
|
35
35
|
const optimizedSleeveColor = lightenDarkenColor(sleeveColor, -10);
|
|
36
36
|
const optimizedShirtColor = lightenDarkenColor(shirtColor, -10);
|
|
@@ -174,7 +174,7 @@ export default function drawSoccerJersey({ shirtText, textColor, textOutlineColo
|
|
|
174
174
|
if (withShorts) {
|
|
175
175
|
page.width(shirtWidth);
|
|
176
176
|
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
|
-
page.path(pathShorts).fill(
|
|
177
|
+
page.path(pathShorts).fill(shortsColor);
|
|
178
178
|
}
|
|
179
179
|
// +10 is some extra room with the shorts height, so the total should be 150
|
|
180
180
|
page.viewbox(`0 0 102 ${100 + shortsHeight + 10}`);
|