embroidery-qc-image 1.0.5 → 1.0.7
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/README.md +8 -10
- package/dist/components/EmbroideryQCImage.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +545 -669
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +545 -669
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,13 +25,12 @@ const exampleConfig = {
|
|
|
25
25
|
positions: [
|
|
26
26
|
{
|
|
27
27
|
type: "TEXT" as const,
|
|
28
|
-
text: "Brian
|
|
28
|
+
text: "Brian",
|
|
29
29
|
text_shape: "No Curved",
|
|
30
30
|
color: null,
|
|
31
31
|
font: "Brittany",
|
|
32
32
|
floral_pattern: null,
|
|
33
33
|
character_colors: ["Pink (1148)", "Lavender (1032)"],
|
|
34
|
-
change_character_to_heart: true,
|
|
35
34
|
},
|
|
36
35
|
{
|
|
37
36
|
type: "TEXT" as const,
|
|
@@ -41,11 +40,10 @@ const exampleConfig = {
|
|
|
41
40
|
font: "Arial",
|
|
42
41
|
character_colors: null,
|
|
43
42
|
floral_pattern: "P61",
|
|
44
|
-
change_character_to_heart: null,
|
|
45
43
|
},
|
|
46
44
|
{
|
|
47
45
|
type: "ICON" as const,
|
|
48
|
-
icon:
|
|
46
|
+
icon: 1,
|
|
49
47
|
layer_colors: ["White (9)", "Red (1037)"],
|
|
50
48
|
},
|
|
51
49
|
],
|
|
@@ -60,7 +58,6 @@ const exampleConfig = {
|
|
|
60
58
|
color: "Terra Cotta (1477)",
|
|
61
59
|
font: "Blackmate",
|
|
62
60
|
character_colors: null,
|
|
63
|
-
change_character_to_heart: true,
|
|
64
61
|
},
|
|
65
62
|
{
|
|
66
63
|
type: "TEXT" as const,
|
|
@@ -69,7 +66,6 @@ const exampleConfig = {
|
|
|
69
66
|
color: "Terra Cotta (1477)",
|
|
70
67
|
font: "Millie",
|
|
71
68
|
character_colors: null,
|
|
72
|
-
change_character_to_heart: true,
|
|
73
69
|
},
|
|
74
70
|
],
|
|
75
71
|
},
|
|
@@ -121,13 +117,12 @@ interface TextPosition {
|
|
|
121
117
|
color?: string | null; // Optional: Color for entire text
|
|
122
118
|
font?: string | null; // Optional: Font name
|
|
123
119
|
character_colors?: string[] | null; // Optional: Array of colors for alternating characters
|
|
124
|
-
change_character_to_heart?: boolean | null; // Optional: Replace <3 with ❤
|
|
125
120
|
floral_pattern?: string | null; // Optional: Floral pattern name
|
|
126
121
|
}
|
|
127
122
|
|
|
128
123
|
interface IconPosition {
|
|
129
124
|
type: 'ICON';
|
|
130
|
-
icon:
|
|
125
|
+
icon: number; // Icon number (e.g., 1, 2, 3...). Use 0 for default icon from embroidery file
|
|
131
126
|
layer_colors: string[]; // Array of colors for icon layers
|
|
132
127
|
}
|
|
133
128
|
```
|
|
@@ -140,7 +135,6 @@ interface IconPosition {
|
|
|
140
135
|
- ✅ Font loading from CDN with automatic fallback
|
|
141
136
|
- ✅ Multiple print sides (Chest, Sleeve, etc.)
|
|
142
137
|
- ✅ Floral pattern support with inline display
|
|
143
|
-
- ✅ Heart emoji conversion (<3 → ❤)
|
|
144
138
|
- ✅ Automatic font scaling to fit canvas (only scales down, never up)
|
|
145
139
|
- ✅ Smart layout with uniform property grouping
|
|
146
140
|
- ✅ Color swatches displayed inline with labels
|
|
@@ -177,9 +171,13 @@ Supported format: WOFF2
|
|
|
177
171
|
|
|
178
172
|
Icons are loaded from:
|
|
179
173
|
```
|
|
180
|
-
https://s3.hn-1.cloud.cmctelecom.vn/god-system-images/embroidery/icons/{
|
|
174
|
+
https://s3.hn-1.cloud.cmctelecom.vn/god-system-images/embroidery/icons/Icon {IconNumber}.png
|
|
181
175
|
```
|
|
182
176
|
|
|
177
|
+
Example: `icon: 1` → loads `Icon 1.png`
|
|
178
|
+
|
|
179
|
+
**Special case**: Use `icon: 0` to display "icon mặc định theo file thêu" (default icon from embroidery file) without loading any image.
|
|
180
|
+
|
|
183
181
|
## Floral Patterns
|
|
184
182
|
|
|
185
183
|
Floral patterns are loaded from:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbroideryQCImage.d.ts","sourceRoot":"","sources":["../../src/components/EmbroideryQCImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAY,MAAM,UAAU,CAAC;AAC5D,OAAO,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"EmbroideryQCImage.d.ts","sourceRoot":"","sources":["../../src/components/EmbroideryQCImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAY,MAAM,UAAU,CAAC;AAC5D,OAAO,yBAAyB,CAAC;AAuOjC,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAsKvD,CAAC;AA8YF,eAAe,iBAAiB,CAAC"}
|