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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lost-sia",
3
- "version": "2.0.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.5.2",
43
- "@fortawesome/free-solid-svg-icons": "^6.5.2",
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.77.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",
@@ -1,6 +1,5 @@
1
-
2
- export function active(filter) {
1
+ function active(filter) {
3
2
  return filter.clahe.active || filter.rotate.active;
4
3
  }
5
4
 
6
- export default {active}
5
+ export default { active }
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.jsx'
14
- export { default as dummyData } from './siaDummyData.js'
15
- export { default as transform } from './utils/transform.js'
16
- export { default as annoConversion } from './utils/annoConversion.js'
17
- export { uiConfig,SIA_INITIAL_UI_CONFIG } from './utils/uiConfig.js'
18
- export { default as canvasActions } from './types/canvasActions.js'
19
- export { default as toolbarEvents } from './types/toolbarEvents.js'
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.js'
21
+ export { default as notificationType } from './types/notificationType'
@@ -1,16 +1,11 @@
1
- // import { within, userEvent, expect } from '@storybook/test';
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: "Example/SIA",
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
- isJunk: false,
30
- fullscreen: false,
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 Default = {
38
- decorators: [
39
- (Story, { args }) => (
40
- <Provider store={store}>
41
- <Sia
42
- annos={annos}
43
- possibleLabels={possibleLabels}
44
- imageBlob={imgBlob}
45
- imageMeta={imgMeta}
46
- // isJunk={false}
47
- uiConfig={uiConfig}
48
- layoutUpdate={0}
49
- selectedTool={selectedTool}
50
- canvasConfig={canvasConfig}
51
- // fullscreen={false}
52
- preventScrolling={false}
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
- export const INFO = "info";
2
- export const SUCCESS = "success";
3
- export const WARNING = "warning";
4
- export const ERROR = "error";
1
+ const INFO = "info";
2
+ const SUCCESS = "success";
3
+ const WARNING = "warning";
4
+ const ERROR = "error";
5
5
 
6
- export default {INFO,SUCCESS,WARNING,ERROR}
6
+ export default {
7
+ INFO,
8
+ SUCCESS,
9
+ WARNING,
10
+ ERROR
11
+ }