@glodon-aiot/dataset-annotation 3.10.0-alpha.18 → 3.10.0-snapshot.16

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.
Files changed (30) hide show
  1. package/dist/dataset-annotation.js +123598 -0
  2. package/dist/dataset-annotation.umd.cjs +1017 -0
  3. package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +28 -37
  4. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +1 -1
  5. package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +1 -1
  6. package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +45 -43
  7. package/dist/es/components/PicZipImportModal/index.mjs +220 -219
  8. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +21 -19
  9. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +43 -43
  10. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +230 -247
  11. package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +64 -68
  12. package/dist/es/components/VLMAnnotationDetail/index.mjs +174 -177
  13. package/dist/es/index.mjs +1 -1
  14. package/dist/example/DatasetAnnotationDemo.d.ts +3 -0
  15. package/dist/example/DemoTabs.d.ts +3 -0
  16. package/dist/example/DetectionDatasetDemo.d.ts +5 -0
  17. package/dist/example/DetectionImageDemo.d.ts +5 -0
  18. package/dist/example/OcrDatasetDemo.d.ts +5 -0
  19. package/dist/example/OcrImageDemo.d.ts +5 -0
  20. package/dist/example/OcrkvcDatasetDemo.d.ts +5 -0
  21. package/dist/example/constant.local.d.ts +6 -0
  22. package/dist/example/index.d.ts +1 -0
  23. package/dist/lib/index.js +3 -3
  24. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +16 -0
  25. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +12 -0
  26. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +21 -0
  27. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +16 -0
  28. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +19 -0
  29. package/dist/src/utils/reactCompatibility.d.ts +5 -0
  30. package/package.json +8 -5
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { Category, ILabel, ISample } from '@glodon-aiot/apis';
3
+ import { LabelItem } from '../../../DetectionImageAnnotation';
4
+ interface ImageDetailProps {
5
+ currentSample?: ISample;
6
+ onNextClick?: VoidFunction;
7
+ onPrevClick?: VoidFunction;
8
+ labels?: ILabel[];
9
+ onRefresh?: VoidFunction;
10
+ onChange?: (sample: ISample) => void;
11
+ readonly?: boolean;
12
+ categories: Category[];
13
+ renderLabelItem?: (label: LabelItem) => string;
14
+ }
15
+ declare const ImageDetail: React.FC<ImageDetailProps>;
16
+ export default ImageDetail;
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { OCRLabel } from './LabelEditorItem';
3
+ interface LabelEditorInputProps {
4
+ value?: Partial<OCRLabel>;
5
+ selected?: boolean;
6
+ holdingLabel?: OCRLabel;
7
+ clearHoldingLabel?: VoidFunction;
8
+ onChange?: (value: OCRLabel) => void;
9
+ onSelect?: (value?: Partial<OCRLabel>) => void;
10
+ }
11
+ declare const LabelEditorInput: FC<LabelEditorInputProps>;
12
+ export default LabelEditorInput;
@@ -0,0 +1,21 @@
1
+ import { FC } from 'react';
2
+ export interface OCRLabel {
3
+ uuid: string;
4
+ box: [number, number][];
5
+ words: string;
6
+ type?: string;
7
+ catagoryId?: string;
8
+ }
9
+ interface LabelEditorItemProps {
10
+ name: string;
11
+ catagoryId: string;
12
+ values: OCRLabel[];
13
+ selectedLabel?: OCRLabel;
14
+ holdingLabel?: OCRLabel;
15
+ clearHoldingLabel?: VoidFunction;
16
+ onChange: (values: OCRLabel[]) => void;
17
+ onRemove: (label: OCRLabel) => void;
18
+ onSelect?: (value?: Partial<OCRLabel>) => void;
19
+ }
20
+ declare const LabelEditorItem: FC<LabelEditorItemProps>;
21
+ export default LabelEditorItem;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { OCRLabel } from './LabelEditorItem';
3
+ import { Category } from '@glodon-aiot/apis';
4
+ interface LabelEditorProps {
5
+ category: Category;
6
+ selectedLabel?: OCRLabel;
7
+ holdingLabel?: OCRLabel;
8
+ type?: OCRLabel[];
9
+ value?: OCRLabel[];
10
+ clearHoldingLabel?: VoidFunction;
11
+ onChange: (type: OCRLabel[], value: OCRLabel[]) => void;
12
+ onRemove: (label: OCRLabel) => void;
13
+ onSelect?: (value?: Partial<OCRLabel>) => void;
14
+ }
15
+ declare const LabelEditor: FC<LabelEditorProps>;
16
+ export default LabelEditor;
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import { OCRLabel } from './LabelEditorItem';
3
+ import { LabelItem } from '../../../DetectionImageAnnotation';
4
+ interface Category {
5
+ id: string;
6
+ name: string;
7
+ }
8
+ interface OCRBoxMakerProps {
9
+ disabled?: boolean;
10
+ id: string;
11
+ imageUrl: string;
12
+ canvasElement: HTMLCanvasElement | null;
13
+ categories: Category[];
14
+ labels: OCRLabel[];
15
+ onChange: (labels: OCRLabel[]) => void;
16
+ renderLabelItem?: (label: LabelItem) => string;
17
+ }
18
+ declare const OCRBoxMaker: FC<OCRBoxMakerProps>;
19
+ export default OCRBoxMaker;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * 兼容React 17和React 18的渲染函数
4
+ */
5
+ export declare function compatibleRender(element: React.ReactElement, container: Element, callback?: () => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glodon-aiot/dataset-annotation",
3
- "version": "3.10.0-alpha.18",
3
+ "version": "3.10.0-snapshot.16",
4
4
  "module": "./dist/es/index.mjs",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -32,17 +32,19 @@
32
32
  "commit": "cz"
33
33
  },
34
34
  "peerDependencies": {
35
+ "antd": ">=4.0.0",
36
+ "react": ">=16.9.0",
37
+ "react-dom": ">=16.9.0",
35
38
  "webpack": "*"
36
39
  },
37
40
  "dependencies": {
38
41
  "@ant-design/icons": "^5.3.4",
39
42
  "@aws-crypto/sha256-js": "^3.0.0",
40
- "@glodon-aiot/apis": "^3.10.0-alpha.18",
43
+ "@glodon-aiot/apis": "^3.10.0-snapshot.16",
41
44
  "@glodon-aiot/minio": "^0.1.6",
42
45
  "@reduxjs/toolkit": "^1.9.5",
43
46
  "@types/fabric": "^5.3.2",
44
47
  "ahooks": "^3.8.5",
45
- "antd": "4.x",
46
48
  "axios": "0.24.0",
47
49
  "browser-md5-file": "^1.1.1",
48
50
  "classnames": "^2.5.1",
@@ -50,8 +52,6 @@
50
52
  "js-base64": "^3.7.7",
51
53
  "lodash": "^4.17.21",
52
54
  "rc-virtual-list": "^3.18.6",
53
- "react": "^17.0.2",
54
- "react-dom": "^17.0.2",
55
55
  "react-json-view": "^1.21.3",
56
56
  "react-redux": "^9.2.0"
57
57
  },
@@ -76,6 +76,7 @@
76
76
  "@typescript-eslint/eslint-plugin": "^5.35.1",
77
77
  "@typescript-eslint/parser": "^5.35.1",
78
78
  "@vitejs/plugin-react": "^3.1.0",
79
+ "antd": "4.x",
79
80
  "babel-loader": "^8.3.0",
80
81
  "commitizen": "^4.3.0",
81
82
  "css-loader": "^6.7.3",
@@ -96,6 +97,8 @@
96
97
  "lint-staged": ">=10",
97
98
  "postcss-loader": "^7.2.4",
98
99
  "prettier": "2.7.1",
100
+ "react": "^17.0.2",
101
+ "react-dom": "^17.0.2",
99
102
  "require-from-string": "^2.0.2",
100
103
  "rollup-plugin-visualizer": "^6.0.1",
101
104
  "storybook-less-loader": "^0.1.0",