@glodon-aiot/dataset-annotation 3.10.0-alpha.17 → 3.10.0-snapshot.15

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 (29) 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 +105 -106
  8. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +21 -19
  9. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +219 -227
  10. package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +64 -68
  11. package/dist/es/components/VLMAnnotationDetail/index.mjs +174 -177
  12. package/dist/es/index.mjs +1 -1
  13. package/dist/example/DatasetAnnotationDemo.d.ts +3 -0
  14. package/dist/example/DemoTabs.d.ts +3 -0
  15. package/dist/example/DetectionDatasetDemo.d.ts +5 -0
  16. package/dist/example/DetectionImageDemo.d.ts +5 -0
  17. package/dist/example/OcrDatasetDemo.d.ts +5 -0
  18. package/dist/example/OcrImageDemo.d.ts +5 -0
  19. package/dist/example/OcrkvcDatasetDemo.d.ts +5 -0
  20. package/dist/example/constant.local.d.ts +6 -0
  21. package/dist/example/index.d.ts +1 -0
  22. package/dist/lib/index.js +3 -3
  23. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +16 -0
  24. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +12 -0
  25. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +21 -0
  26. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +16 -0
  27. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +19 -0
  28. package/dist/src/utils/reactCompatibility.d.ts +5 -0
  29. package/package.json +8 -4
@@ -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.17",
3
+ "version": "3.10.0-snapshot.15",
4
4
  "module": "./dist/es/index.mjs",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -32,12 +32,15 @@
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.17",
43
+ "@glodon-aiot/apis": "^3.10.0-snapshot.15",
41
44
  "@glodon-aiot/minio": "^0.1.6",
42
45
  "@reduxjs/toolkit": "^1.9.5",
43
46
  "@types/fabric": "^5.3.2",
@@ -50,8 +53,6 @@
50
53
  "js-base64": "^3.7.7",
51
54
  "lodash": "^4.17.21",
52
55
  "rc-virtual-list": "^3.18.6",
53
- "react": "^17.0.2",
54
- "react-dom": "^17.0.2",
55
56
  "react-json-view": "^1.21.3",
56
57
  "react-redux": "^9.2.0"
57
58
  },
@@ -76,6 +77,7 @@
76
77
  "@typescript-eslint/eslint-plugin": "^5.35.1",
77
78
  "@typescript-eslint/parser": "^5.35.1",
78
79
  "@vitejs/plugin-react": "^3.1.0",
80
+ "antd": "4.x",
79
81
  "babel-loader": "^8.3.0",
80
82
  "commitizen": "^4.3.0",
81
83
  "css-loader": "^6.7.3",
@@ -96,6 +98,8 @@
96
98
  "lint-staged": ">=10",
97
99
  "postcss-loader": "^7.2.4",
98
100
  "prettier": "2.7.1",
101
+ "react": "^17.0.2",
102
+ "react-dom": "^17.0.2",
99
103
  "require-from-string": "^2.0.2",
100
104
  "rollup-plugin-visualizer": "^6.0.1",
101
105
  "storybook-less-loader": "^0.1.0",