frame.identify 0.5.2 → 0.5.4
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/EnterValues.d.ts.map +1 -1
- package/dist/MachineState.d.ts.map +1 -1
- package/dist/ModalImageCropped.d.ts.map +1 -1
- package/dist/ModalImageCropped.test.d.ts +2 -0
- package/dist/ModalImageCropped.test.d.ts.map +1 -0
- package/dist/ModalImageLoaded.d.ts.map +1 -1
- package/dist/frame.identify.js +664 -503
- package/dist/frame.identify.js.map +1 -1
- package/dist/rotate.d.ts +4 -0
- package/dist/rotate.d.ts.map +1 -0
- package/dist/state/machine.d.ts +102 -3
- package/dist/state/machine.d.ts.map +1 -1
- package/package.json +14 -13
package/dist/rotate.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../src/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,KAAsB,GAC7B,KAAK,CAcP;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,KAAK,EAAE,EACf,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,KAAsB,GAC7B,KAAK,EAAE,CAMT"}
|
package/dist/state/machine.d.ts
CHANGED
|
@@ -19,18 +19,108 @@ export declare const ACTION_START_X_AXIS = "START_X_AXIS";
|
|
|
19
19
|
export declare const ACTION_FINISH_X_AXIS = "FINISH_X_AXIS";
|
|
20
20
|
export declare const ACTION_UNDO_X_AXIS = "UNDO_X_AXIS";
|
|
21
21
|
export declare const ACTION_ADD_POINT = "ADD_POINT";
|
|
22
|
+
export declare const ACTION_UNDO_POINT = "UNDO_POINT";
|
|
22
23
|
export declare const ACTION_DEFINE_TRADEMARK = "DEFINE_TRADEMARK";
|
|
23
24
|
export declare const ACTION_FINISH_POINTS = "FINISH_POINTS";
|
|
24
25
|
export declare const ACTION_UNDO_SHAPE = "UNDO_SHAPE";
|
|
25
26
|
export declare const ACTION_UNDO_TRADEMARK = "UNDO_TRADEMARK";
|
|
26
27
|
export declare const ACTION_UNDO_FINISH = "UNDO_FINISH";
|
|
27
28
|
export declare const ACTION_DEFINE_VALUES = "define values";
|
|
29
|
+
export type MachineEvent = {
|
|
30
|
+
type: typeof ACTION_RESET;
|
|
31
|
+
} | {
|
|
32
|
+
type: typeof ACTION_ENTER_VALUES;
|
|
33
|
+
SL: number;
|
|
34
|
+
SH: number;
|
|
35
|
+
AZG: number;
|
|
36
|
+
} | {
|
|
37
|
+
type: typeof ACTION_LOAD_IMAGE;
|
|
38
|
+
} | {
|
|
39
|
+
type: typeof ACTION_CROP;
|
|
40
|
+
} | {
|
|
41
|
+
type: typeof ACTION_SKIP_CROP;
|
|
42
|
+
} | {
|
|
43
|
+
type: typeof ACTION_UNDO_CROP;
|
|
44
|
+
} | {
|
|
45
|
+
type: typeof ACTION_START_X_AXIS;
|
|
46
|
+
} | {
|
|
47
|
+
type: typeof ACTION_FINISH_POINTS;
|
|
48
|
+
} | {
|
|
49
|
+
type: typeof ACTION_FINISH;
|
|
50
|
+
} | {
|
|
51
|
+
type: typeof ACTION_FINISH_X_AXIS;
|
|
52
|
+
rotationAngle: number;
|
|
53
|
+
} | {
|
|
54
|
+
type: typeof ACTION_UNDO_X_AXIS;
|
|
55
|
+
} | {
|
|
56
|
+
type: typeof ACTION_ADD_POINT;
|
|
57
|
+
} | {
|
|
58
|
+
type: typeof ACTION_UNDO_POINT;
|
|
59
|
+
} | {
|
|
60
|
+
type: typeof ACTION_DEFINE_TRADEMARK;
|
|
61
|
+
trademark?: {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
type: typeof ACTION_UNDO_SHAPE;
|
|
67
|
+
} | {
|
|
68
|
+
type: typeof ACTION_UNDO_TRADEMARK;
|
|
69
|
+
} | {
|
|
70
|
+
type: typeof ACTION_UNDO_FINISH;
|
|
71
|
+
};
|
|
28
72
|
export declare const identifyMachine: import('xstate').StateMachine<{
|
|
29
73
|
rotationAngle: number;
|
|
30
74
|
SL?: number;
|
|
31
75
|
SH?: number;
|
|
32
76
|
AZG?: number;
|
|
33
|
-
|
|
77
|
+
trademark?: {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
};
|
|
81
|
+
}, {
|
|
82
|
+
type: typeof ACTION_RESET;
|
|
83
|
+
} | {
|
|
84
|
+
type: typeof ACTION_ENTER_VALUES;
|
|
85
|
+
SL: number;
|
|
86
|
+
SH: number;
|
|
87
|
+
AZG: number;
|
|
88
|
+
} | {
|
|
89
|
+
type: typeof ACTION_LOAD_IMAGE;
|
|
90
|
+
} | {
|
|
91
|
+
type: typeof ACTION_CROP;
|
|
92
|
+
} | {
|
|
93
|
+
type: typeof ACTION_SKIP_CROP;
|
|
94
|
+
} | {
|
|
95
|
+
type: typeof ACTION_UNDO_CROP;
|
|
96
|
+
} | {
|
|
97
|
+
type: typeof ACTION_START_X_AXIS;
|
|
98
|
+
} | {
|
|
99
|
+
type: typeof ACTION_FINISH_POINTS;
|
|
100
|
+
} | {
|
|
101
|
+
type: typeof ACTION_FINISH;
|
|
102
|
+
} | {
|
|
103
|
+
type: typeof ACTION_FINISH_X_AXIS;
|
|
104
|
+
rotationAngle: number;
|
|
105
|
+
} | {
|
|
106
|
+
type: typeof ACTION_UNDO_X_AXIS;
|
|
107
|
+
} | {
|
|
108
|
+
type: typeof ACTION_ADD_POINT;
|
|
109
|
+
} | {
|
|
110
|
+
type: typeof ACTION_UNDO_POINT;
|
|
111
|
+
} | {
|
|
112
|
+
type: typeof ACTION_DEFINE_TRADEMARK;
|
|
113
|
+
trademark?: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
};
|
|
117
|
+
} | {
|
|
118
|
+
type: typeof ACTION_UNDO_SHAPE;
|
|
119
|
+
} | {
|
|
120
|
+
type: typeof ACTION_UNDO_TRADEMARK;
|
|
121
|
+
} | {
|
|
122
|
+
type: typeof ACTION_UNDO_FINISH;
|
|
123
|
+
}, {}, never, {
|
|
34
124
|
type: "define values";
|
|
35
125
|
params: import('xstate').NonReducibleUnknown;
|
|
36
126
|
} | {
|
|
@@ -39,7 +129,16 @@ export declare const identifyMachine: import('xstate').StateMachine<{
|
|
|
39
129
|
} | {
|
|
40
130
|
type: "define rotation angle";
|
|
41
131
|
params: import('xstate').NonReducibleUnknown;
|
|
42
|
-
}
|
|
132
|
+
} | {
|
|
133
|
+
type: "define trademark";
|
|
134
|
+
params: import('xstate').NonReducibleUnknown;
|
|
135
|
+
} | {
|
|
136
|
+
type: "clear trademark";
|
|
137
|
+
params: import('xstate').NonReducibleUnknown;
|
|
138
|
+
}, {
|
|
139
|
+
type: "hasTrademark";
|
|
140
|
+
params: unknown;
|
|
141
|
+
}, never, "idle" | "Image loaded" | "Values defined" | "Image cropped" | "X-axis started" | "X-axis finished" | "Points defined" | "Shape defined" | "Trademark defined" | "Finished", string, import('xstate').NonReducibleUnknown, import('xstate').NonReducibleUnknown, import('xstate').EventObject, import('xstate').MetaObject, {
|
|
43
142
|
id: "identify";
|
|
44
143
|
states: {
|
|
45
144
|
readonly idle: {};
|
|
@@ -53,5 +152,5 @@ export declare const identifyMachine: import('xstate').StateMachine<{
|
|
|
53
152
|
readonly "Trademark defined": {};
|
|
54
153
|
readonly Finished: {};
|
|
55
154
|
};
|
|
56
|
-
}>;
|
|
155
|
+
}, import('xstate').MetaObject>;
|
|
57
156
|
//# sourceMappingURL=machine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../src/state/machine.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM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AkB;;UACzB,OAAO,gBAAgB;;UACvB,OAAO,iBAAiB;;UAExB,OAAO,uBAAuB;gBACxB;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;;UAE9B,OAAO,iBAAiB;;UACxB,OAAO,qBAAqB;;UAC5B,OAAO,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAwInC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frame.identify",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Typescript React package to handle frame detection",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/frame.identify.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"@mui/material": "^9.3.1",
|
|
30
30
|
"@xstate/react": "^6.1.0",
|
|
31
31
|
"ai.akima": "^1.0.2",
|
|
32
|
-
"i18next": "^26.4.2",
|
|
33
32
|
"frame.theme": "^0.1.2",
|
|
34
|
-
"
|
|
35
|
-
"react
|
|
36
|
-
"react-
|
|
33
|
+
"i18next": "^26.4.2",
|
|
34
|
+
"react": "^19.3.0",
|
|
35
|
+
"react-dom": "^19.3.0",
|
|
36
|
+
"react-i18next": "^17.0.14",
|
|
37
37
|
"xstate": "^5.32.5"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@emotion/styled": "^11.14.1",
|
|
42
42
|
"@eslint/js": "^10.0.1",
|
|
43
43
|
"@mui/material": "^9.4.0",
|
|
44
|
-
"@types/node": "^26.5.
|
|
45
|
-
"@types/react": "^19.
|
|
46
|
-
"@types/react-dom": "^19.
|
|
44
|
+
"@types/node": "^26.5.1",
|
|
45
|
+
"@types/react": "^19.3.0",
|
|
46
|
+
"@types/react-dom": "^19.3.0",
|
|
47
47
|
"@vitejs/plugin-react": "^6.1.1",
|
|
48
48
|
"@xstate/react": "^6.1.0",
|
|
49
49
|
"eslint": "^10.10.0",
|
|
@@ -51,14 +51,15 @@
|
|
|
51
51
|
"eslint-plugin-react-refresh": "^0.5.6",
|
|
52
52
|
"globals": "^17.12.0",
|
|
53
53
|
"i18next": "^26.4.2",
|
|
54
|
-
"react": "^19.
|
|
55
|
-
"react-dom": "^19.
|
|
56
|
-
"react-i18next": "^17.0.
|
|
54
|
+
"react": "^19.3.0",
|
|
55
|
+
"react-dom": "^19.3.0",
|
|
56
|
+
"react-i18next": "^17.0.14",
|
|
57
57
|
"typescript": "~6.0.2",
|
|
58
58
|
"typescript-eslint": "^8.70.0",
|
|
59
|
-
"vite": "^8.
|
|
59
|
+
"vite": "^8.3.0",
|
|
60
60
|
"vite-plugin-dts": "^5.1.0",
|
|
61
|
-
"
|
|
61
|
+
"vitest": "^5.0.0",
|
|
62
|
+
"xstate": "^5.33.0"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
65
|
"ai.akima": "^1.0.2",
|