frame.identify 0.2.6 → 0.3.0
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/Bolle - rotated.png +0 -0
- package/dist/Bolle-Bolt20 - rotated left.png +0 -0
- package/dist/Bolle-Bolt20 - rotated.png +0 -0
- package/dist/Bolle-Bolt20.png +0 -0
- package/dist/Bolle.png +0 -0
- package/dist/Ellipse.png +0 -0
- package/dist/EnterValues.d.ts +6 -0
- package/dist/EnterValues.d.ts.map +1 -0
- package/dist/Fielmann.cropped.png +0 -0
- package/dist/Fielmann.png +0 -0
- package/dist/Fielmann2.cropped.png +0 -0
- package/dist/Fielmann2.png +0 -0
- package/dist/Kronemann.cropped.png +0 -0
- package/dist/Kronemann.png +0 -0
- package/dist/Kunde.cropped.png +0 -0
- package/dist/Kunde.png +0 -0
- package/dist/MachineState.d.ts +6 -0
- package/dist/MachineState.d.ts.map +1 -0
- package/dist/ModalEnterValues.d.ts +8 -0
- package/dist/ModalEnterValues.d.ts.map +1 -0
- package/dist/ModalImageCropped.d.ts +24 -1
- package/dist/ModalImageCropped.d.ts.map +1 -1
- package/dist/ModalImageLoaded.d.ts +2 -1
- package/dist/ModalImageLoaded.d.ts.map +1 -1
- package/dist/OptikerCarl.cropped.png +0 -0
- package/dist/OptikerCarl.png +0 -0
- package/dist/OptikerCarl2.cropped.png +0 -0
- package/dist/OptikerCarl2.png +0 -0
- package/dist/Sample.png +0 -0
- package/dist/Sample2.png +0 -0
- package/dist/Sample3.png +0 -0
- package/dist/Sample4.png +0 -0
- package/dist/frame.identify.js +1895 -1552
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/state/machine.d.ts +34 -1
- package/dist/state/machine.d.ts.map +1 -1
- package/package.json +7 -5
- package/dist/favicon.svg +0 -1
- package/dist/icons.svg +0 -24
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/Bolle.png
ADDED
|
Binary file
|
package/dist/Ellipse.png
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnterValues.d.ts","sourceRoot":"","sources":["../src/EnterValues.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAI3C,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;CAC7C,+BAwEA"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/Kunde.png
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MachineState.d.ts","sourceRoot":"","sources":["../src/MachineState.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAOhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;CAC7C,+BA2CA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { identifyMachine } from './state/machine';
|
|
2
|
+
import { ActorRefFrom } from 'xstate';
|
|
3
|
+
export declare function ModalEnterValues(props: {
|
|
4
|
+
actor: ActorRefFrom<typeof identifyMachine>;
|
|
5
|
+
modalIsOpen: boolean;
|
|
6
|
+
closeModal: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ModalEnterValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalEnterValues.d.ts","sourceRoot":"","sources":["../src/ModalEnterValues.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,+BAmDA"}
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
import { identifyMachine } from './state/machine';
|
|
2
2
|
import { ActorRefFrom } from 'xstate';
|
|
3
|
+
import { Point } from '.';
|
|
4
|
+
/**
|
|
5
|
+
* __Why this works__
|
|
6
|
+
* React state (useState) is for values that need to trigger re-renders and
|
|
7
|
+
* can change independently of props.
|
|
8
|
+
* Here, currentDataUrl never diverges from props.dataUrl — it's set once on mount and then re-synced every time the prop changes. That's a pure "copy prop into state" pattern, which the linter (and React docs) flag because it's redundant: you already re-render when props.dataUrl changes, so just read the prop directly.
|
|
9
|
+
* Removing the state eliminates the extra render triggered by setCurrentDataUrl
|
|
10
|
+
* inside the effect — that's the "cascading render" the warning is about: prop changes → render → effect runs → setState → another render, for no beneficial reason.
|
|
11
|
+
* The image-loading effect now depends on props.dataUrl directly instead of the redundant currentDataUrl.
|
|
12
|
+
* Gotcha: This pattern ("derive local editable state from a prop, but allow the user to reset it when the prop changes") is legitimate in some cases — e.g. an editable text field that resets when a new initial value comes in. In that case, React's recommended fix is the "key trick" (give the component a key={props.dataUrl} from the parent so it fully remounts) rather than an effect+setState. But since you never actually mutate currentDataUrl independently here, you don't need state at all.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @param {{
|
|
19
|
+
* actor: ActorRefFrom<typeof identifyMachine>;
|
|
20
|
+
* dataUrl: string;
|
|
21
|
+
* modalIsOpen: boolean;
|
|
22
|
+
* closeModal: (reset: boolean) => () => void;
|
|
23
|
+
* }} props
|
|
24
|
+
* @return {*}
|
|
25
|
+
*/
|
|
3
26
|
export declare function ModalImageCropped(props: {
|
|
4
27
|
actor: ActorRefFrom<typeof identifyMachine>;
|
|
5
28
|
dataUrl: string;
|
|
6
29
|
modalIsOpen: boolean;
|
|
7
|
-
closeModal: (reset: boolean) => () => void;
|
|
30
|
+
closeModal: (points: Point[], reset: boolean) => () => void;
|
|
8
31
|
}): import("react").JSX.Element;
|
|
9
32
|
//# sourceMappingURL=ModalImageCropped.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalImageCropped.d.ts","sourceRoot":"","sources":["../src/ModalImageCropped.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalImageCropped.d.ts","sourceRoot":"","sources":["../src/ModalImageCropped.tsx"],"names":[],"mappings":"AAGA,OAAO,EAYL,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC;CAC7D,+BA+bA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { identifyMachine } from './state/machine';
|
|
2
2
|
import { ActorRefFrom } from 'xstate';
|
|
3
|
+
import { Point } from '.';
|
|
3
4
|
export type ModalImageLoadedHandle = {
|
|
4
5
|
openFileDialog: () => void;
|
|
5
6
|
};
|
|
6
7
|
export declare const ModalImageLoaded: import('react').ForwardRefExoticComponent<{
|
|
7
8
|
actor: ActorRefFrom<typeof identifyMachine>;
|
|
8
9
|
modalIsOpen: boolean;
|
|
9
|
-
closeModal: () => void;
|
|
10
|
+
closeModal: (points?: Point[], reset?: boolean) => () => void;
|
|
10
11
|
} & import('react').RefAttributes<ModalImageLoadedHandle>>;
|
|
11
12
|
//# sourceMappingURL=ModalImageLoaded.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalImageLoaded.d.ts","sourceRoot":"","sources":["../src/ModalImageLoaded.tsx"],"names":[],"mappings":"AAIA,OAAO,EAKL,eAAe,
|
|
1
|
+
{"version":3,"file":"ModalImageLoaded.d.ts","sourceRoot":"","sources":["../src/ModalImageLoaded.tsx"],"names":[],"mappings":"AAIA,OAAO,EAKL,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAU3C,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAIF,eAAO,MAAM,gBAAgB;WAGlB,YAAY,CAAC,OAAO,eAAe,CAAC;iBAC9B,OAAO;gBACR,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,MAAM,IAAI;0DAoQ/D,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/Sample.png
ADDED
|
Binary file
|
package/dist/Sample2.png
ADDED
|
Binary file
|
package/dist/Sample3.png
ADDED
|
Binary file
|
package/dist/Sample4.png
ADDED
|
Binary file
|