lost-sia 2.0.0 → 2.0.1-alpha0
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/package.json +9 -4
- package/src/filterTools.js +2 -3
- package/src/index.js +8 -9
- package/src/stories/Sia.stories.jsx +26 -33
- package/src/types/notificationType.js +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lost-sia",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1-alpha0",
|
|
4
4
|
"description": "Single Image Annotation Tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "l3p-cv/lost-sia",
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
".": {
|
|
23
23
|
"import": "./src/index.js",
|
|
24
24
|
"require": "./src/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./utils": {
|
|
27
|
+
"import": "./src/utils/index.js",
|
|
28
|
+
"require": "./src/utils/index.js"
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
"files": [
|
|
@@ -39,14 +43,14 @@
|
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
45
|
"@coreui/react": "^5.0.0",
|
|
42
|
-
"@fortawesome/free-regular-svg-icons": "^6.
|
|
43
|
-
"@fortawesome/free-solid-svg-icons": "^6.
|
|
46
|
+
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
47
|
+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
44
48
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
45
49
|
"lodash-es": "^4.17.21",
|
|
46
50
|
"react": "^18.0.0",
|
|
47
51
|
"react-dom": "^18.0.0",
|
|
48
52
|
"react-draggable": "^4.4.6",
|
|
49
|
-
"sass": "^1.
|
|
53
|
+
"sass": "^1.89.2",
|
|
50
54
|
"semantic-ui-css": "2.5.0",
|
|
51
55
|
"semantic-ui-react": "^2.0.3"
|
|
52
56
|
},
|
|
@@ -58,6 +62,7 @@
|
|
|
58
62
|
},
|
|
59
63
|
"devDependencies": {
|
|
60
64
|
"@chromatic-com/storybook": "^1.5.0",
|
|
65
|
+
"@storybook/addon-docs": "^8.6.14",
|
|
61
66
|
"@storybook/addon-essentials": "^8.1.5",
|
|
62
67
|
"@storybook/addon-interactions": "^8.1.5",
|
|
63
68
|
"@storybook/addon-links": "^8.1.5",
|
package/src/filterTools.js
CHANGED
package/src/index.js
CHANGED
|
@@ -10,13 +10,12 @@ export { default as Canvas } from "./Canvas.jsx";
|
|
|
10
10
|
// export { Toolbar }
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
export { default as Sia } from './Sia
|
|
14
|
-
export { default
|
|
15
|
-
export { default as transform } from './utils/transform
|
|
16
|
-
export { default as annoConversion } from './utils/annoConversion
|
|
17
|
-
export {
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as tools } from './types/tools.js'
|
|
13
|
+
export { default as Sia } from './Sia'
|
|
14
|
+
export { default as dummyData } from './siaDummyData'
|
|
15
|
+
export { default as transform } from './utils/transform'
|
|
16
|
+
export { default as annoConversion } from './utils/annoConversion'
|
|
17
|
+
export { default as canvasActions } from './types/canvasActions'
|
|
18
|
+
export { default as toolbarEvents } from './types/toolbarEvents'
|
|
19
|
+
export { default as tools } from './types/tools'
|
|
21
20
|
export { default as filterTools } from './filterTools.js'
|
|
22
|
-
export { default as notificationType } from './types/notificationType
|
|
21
|
+
export { default as notificationType } from './types/notificationType'
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import { Provider } from "react-redux";
|
|
3
|
-
import { store } from "./store";
|
|
1
|
+
import { fn } from "@storybook/test";
|
|
4
2
|
import {
|
|
5
3
|
canvasConfig,
|
|
6
4
|
filter,
|
|
7
|
-
uiConfig,
|
|
8
5
|
selectedTool,
|
|
9
6
|
imgMeta,
|
|
10
7
|
toolbarEnabled,
|
|
11
|
-
noAnnos,
|
|
12
8
|
annos,
|
|
13
|
-
defaultLabel,
|
|
14
9
|
possibleLabels,
|
|
15
10
|
imgBlob,
|
|
16
11
|
} from "./siaDummyData";
|
|
@@ -18,7 +13,7 @@ import {
|
|
|
18
13
|
import Sia from "../Sia";
|
|
19
14
|
|
|
20
15
|
export default {
|
|
21
|
-
title: "
|
|
16
|
+
title: "Components/SIA",
|
|
22
17
|
component: Sia,
|
|
23
18
|
parameters: {
|
|
24
19
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
@@ -26,36 +21,34 @@ export default {
|
|
|
26
21
|
},
|
|
27
22
|
tags: ["autodocs"],
|
|
28
23
|
args: {
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
onAnnoSaveEvent: fn(),
|
|
25
|
+
onNotification: fn(),
|
|
26
|
+
onCanvasKeyDown: fn(),
|
|
27
|
+
onAnnoEvent: fn(),
|
|
28
|
+
onGetAnnoExample: fn(),
|
|
29
|
+
onCanvasEvent: fn(),
|
|
30
|
+
onToolBarEvent: fn(),
|
|
31
|
+
onGetFunction: fn(),
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* SIA with dummy data
|
|
36
37
|
*/
|
|
37
|
-
export const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
lockedAnnos={[]}
|
|
54
|
-
filter={filter}
|
|
55
|
-
toolbarEnabled={toolbarEnabled}
|
|
56
|
-
{...args}
|
|
57
|
-
/>
|
|
58
|
-
</Provider>
|
|
59
|
-
),
|
|
60
|
-
],
|
|
38
|
+
export const Primary = {
|
|
39
|
+
args: {
|
|
40
|
+
annos,
|
|
41
|
+
canvasConfig,
|
|
42
|
+
fullscreen: false,
|
|
43
|
+
filter,
|
|
44
|
+
imageBlob: imgBlob,
|
|
45
|
+
imageMeta: imgMeta,
|
|
46
|
+
isJunk: false,
|
|
47
|
+
layoutUpdate: 0,
|
|
48
|
+
lockedAnnos: [],
|
|
49
|
+
possibleLabels,
|
|
50
|
+
preventScrolling: false,
|
|
51
|
+
selectedTool,
|
|
52
|
+
toolbarEnabled,
|
|
53
|
+
},
|
|
61
54
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const INFO = "info";
|
|
2
|
+
const SUCCESS = "success";
|
|
3
|
+
const WARNING = "warning";
|
|
4
|
+
const ERROR = "error";
|
|
5
5
|
|
|
6
|
-
export default {
|
|
6
|
+
export default {
|
|
7
|
+
INFO,
|
|
8
|
+
SUCCESS,
|
|
9
|
+
WARNING,
|
|
10
|
+
ERROR
|
|
11
|
+
}
|