@glodon-aiot/dataset-annotation 3.14.0-alpha.31 → 3.15.0-alpha.1

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 (114) hide show
  1. package/dist/es/DatasetContext/index.mjs +3 -6
  2. package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +91 -94
  3. package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +28 -37
  4. package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +101 -145
  5. package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +195 -256
  6. package/dist/es/components/DetectionAnnotation/index.mjs +424 -456
  7. package/dist/es/components/Iconfont/index.mjs +2 -2
  8. package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +1 -1
  9. package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +1 -1
  10. package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +45 -43
  11. package/dist/es/components/PicZipImportModal/index.mjs +293 -308
  12. package/dist/es/components/PreLabelOCR/index.mjs +1 -1
  13. package/dist/es/constant.mjs +3 -3
  14. package/dist/es/featuresConfig.mjs +9 -13
  15. package/dist/es/index.mjs +7 -11
  16. package/dist/lib/index.js +3 -4
  17. package/dist/src/DatasetContext/index.d.ts +0 -2
  18. package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +0 -1
  19. package/dist/src/constant.d.ts +1 -1
  20. package/dist/src/featuresConfig.d.ts +0 -4
  21. package/dist/src/index.d.ts +0 -3
  22. package/package.json +2 -2
  23. package/dist/es/components/DetectionAnnotation/components/ImageModal/index.mjs +0 -129
  24. package/dist/es/components/DetectionAnnotation/components/ImageModal/style.less.mjs +0 -4
  25. package/dist/es/components/PicZipImportModal/config.mjs +0 -47
  26. package/dist/es/components/PicZipImportModal/pic_vlm_json_zip.svg.mjs +0 -4
  27. package/dist/es/components/PicZipImportModal/pic_vlm_zip.svg.mjs +0 -4
  28. package/dist/es/components/VLMAnnotation/RegionItem.mjs +0 -170
  29. package/dist/es/components/VLMAnnotation/TextAnnotationPanel.mjs +0 -94
  30. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.mjs +0 -116
  31. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.mjs +0 -115
  32. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.mjs +0 -42
  33. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.mjs +0 -55
  34. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.mjs +0 -51
  35. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.mjs +0 -62
  36. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.mjs +0 -377
  37. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRControl.mjs +0 -100
  38. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.mjs +0 -106
  39. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.mjs +0 -101
  40. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionBoundaryCheck.mjs +0 -103
  41. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.mjs +0 -38
  42. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.mjs +0 -173
  43. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.mjs +0 -72
  44. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.mjs +0 -116
  45. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.mjs +0 -98
  46. package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.mjs +0 -156
  47. package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/ai.svg.mjs +0 -4
  48. package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/del.png.mjs +0 -4
  49. package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/error.svg.mjs +0 -4
  50. package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/loading.svg.mjs +0 -4
  51. package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/star.svg.mjs +0 -4
  52. package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +0 -651
  53. package/dist/es/components/VLMAnnotation/VLMLabelMaker/style.less.mjs +0 -4
  54. package/dist/es/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.mjs +0 -33
  55. package/dist/es/components/VLMAnnotation/components/DragButton.mjs +0 -18
  56. package/dist/es/components/VLMAnnotation/components/FitToScreenButton.mjs +0 -16
  57. package/dist/es/components/VLMAnnotation/components/RectangleButton.mjs +0 -30
  58. package/dist/es/components/VLMAnnotation/components/Toolbar.mjs +0 -40
  59. package/dist/es/components/VLMAnnotation/components/ZoomControls.mjs +0 -44
  60. package/dist/es/components/VLMAnnotation/constants.mjs +0 -57
  61. package/dist/es/components/VLMAnnotation/index.mjs +0 -279
  62. package/dist/es/components/VLMAnnotation/style.less.mjs +0 -4
  63. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +0 -343
  64. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/style.less.mjs +0 -4
  65. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +0 -240
  66. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +0 -201
  67. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/style.less.mjs +0 -4
  68. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +0 -455
  69. package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/style.less.mjs +0 -4
  70. package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +0 -149
  71. package/dist/es/components/VLMAnnotationDetail/VlmModal/style.less.mjs +0 -4
  72. package/dist/es/components/VLMAnnotationDetail/index.mjs +0 -449
  73. package/dist/es/components/VLMAnnotationDetail/style.less.mjs +0 -4
  74. package/dist/es/createVlmtasetAnnotation/index.mjs +0 -131
  75. package/dist/src/components/DetectionAnnotation/components/ImageModal/index.d.ts +0 -34
  76. package/dist/src/components/Iconfont/font_4439177_tgvowh6bmlb.d.ts +0 -0
  77. package/dist/src/components/PicZipImportModal/config.d.ts +0 -23
  78. package/dist/src/components/VLMAnnotation/ImageAnnotationDebugger.d.ts +0 -4
  79. package/dist/src/components/VLMAnnotation/RegionItem.d.ts +0 -4
  80. package/dist/src/components/VLMAnnotation/TextAnnotationPanel.d.ts +0 -4
  81. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.d.ts +0 -13
  82. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.d.ts +0 -38
  83. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.d.ts +0 -18
  84. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.d.ts +0 -7
  85. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.d.ts +0 -13
  86. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.d.ts +0 -22
  87. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.d.ts +0 -34
  88. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRControl.d.ts +0 -16
  89. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.d.ts +0 -11
  90. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.d.ts +0 -29
  91. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionBoundaryCheck.d.ts +0 -31
  92. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.d.ts +0 -13
  93. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.d.ts +0 -41
  94. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.d.ts +0 -12
  95. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.d.ts +0 -16
  96. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.d.ts +0 -32
  97. package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.d.ts +0 -25
  98. package/dist/src/components/VLMAnnotation/VLMLabelMaker/index.d.ts +0 -4
  99. package/dist/src/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.d.ts +0 -32
  100. package/dist/src/components/VLMAnnotation/components/DragButton.d.ts +0 -7
  101. package/dist/src/components/VLMAnnotation/components/FitToScreenButton.d.ts +0 -6
  102. package/dist/src/components/VLMAnnotation/components/RectangleButton.d.ts +0 -7
  103. package/dist/src/components/VLMAnnotation/components/Toolbar.d.ts +0 -4
  104. package/dist/src/components/VLMAnnotation/components/ZoomControls.d.ts +0 -4
  105. package/dist/src/components/VLMAnnotation/constants.d.ts +0 -113
  106. package/dist/src/components/VLMAnnotation/index.d.ts +0 -6
  107. package/dist/src/components/VLMAnnotation/types.d.ts +0 -187
  108. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.d.ts +0 -14
  109. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts +0 -12
  110. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.d.ts +0 -12
  111. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/index.d.ts +0 -12
  112. package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +0 -17
  113. package/dist/src/components/VLMAnnotationDetail/index.d.ts +0 -6
  114. package/dist/src/createVlmtasetAnnotation/index.d.ts +0 -16
@@ -1,6 +0,0 @@
1
- import { default as React } from 'react';
2
- interface FitToScreenButtonProps {
3
- onClick: () => void;
4
- }
5
- declare const FitToScreenButton: React.FC<FitToScreenButtonProps>;
6
- export default FitToScreenButton;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- interface RectangleButtonProps {
3
- active: boolean;
4
- onClick: () => void;
5
- }
6
- declare const RectangleButton: React.FC<RectangleButtonProps>;
7
- export default RectangleButton;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ToolbarProps } from '../types';
3
- declare const Toolbar: React.FC<ToolbarProps>;
4
- export default Toolbar;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ZoomControlsProps } from '../types';
3
- declare const ZoomControls: React.FC<ZoomControlsProps>;
4
- export default ZoomControls;
@@ -1,113 +0,0 @@
1
- /**
2
- * VLMAnnotation 组件相关的常量配置
3
- */
4
- /** 最大缩放级别 */
5
- export declare const MAX_ZOOM = 8;
6
- /** 最小缩放级别 */
7
- export declare const MIN_ZOOM = 0.1;
8
- /** 缩放因子(滚轮缩放时使用) */
9
- export declare const ZOOM_FACTOR = 0.999;
10
- /** 缩放精度误差阈值(用于判断缩放值是否一致) */
11
- export declare const ZOOM_PRECISION_ERROR = 0.01;
12
- /** 缩放步长(按钮点击时的缩放增量,滚轮向上滚一下是 -100,向下滚一下是 100) */
13
- export declare const ZOOM_STEP = 100;
14
- /** 基础边框宽度(像素) */
15
- export declare const BASE_STROKE_WIDTH = 2;
16
- /** 矩形边框颜色 */
17
- export declare const RECT_STROKE_COLOR = "#EAD4FF";
18
- /** Active状态下的矩形边框颜色(高亮) */
19
- export declare const ACTIVE_RECT_STROKE_COLOR = "#9C24F2";
20
- /** 选中矩形的填充色 */
21
- export declare const SELECTED_RECT_FILL_COLOR = "rgba(156, 36, 242, 0.1)";
22
- /** 悬停矩形的填充色(比选中时更淡) */
23
- export declare const HOVER_RECT_FILL_COLOR = "rgba(156, 36, 242, 0.05)";
24
- /** 透明填充色 */
25
- export declare const TRANSPARENT_FILL = "transparent";
26
- /** 临时矩形的填充色 */
27
- export declare const TEMP_RECT_FILL_COLOR = "rgba(0, 0, 0, 0)";
28
- /** 临时矩形的虚线样式 */
29
- export declare const TEMP_RECT_STROKE_DASH_ARRAY: [number, number];
30
- /** Canvas 容器类名 */
31
- export declare const CANVAS_CONTAINER_CLASS = "vlm-label-maker-canvas";
32
- /** 默认左侧最小宽度(像素) */
33
- export declare const DEFAULT_MIN_LEFT_WIDTH = 300;
34
- /** 默认左侧比例 */
35
- export declare const DEFAULT_LEFT_RATIO = 0.7;
36
- /** 默认最小比例 */
37
- export declare const DEFAULT_MIN_RATIO = 0.05;
38
- /** 默认最大比例 */
39
- export declare const DEFAULT_MAX_RATIO = 0.95;
40
- /** 默认形状类型 */
41
- export declare const DEFAULT_SHAPE_TYPE: "rect";
42
- /** 区域名称前缀 */
43
- export declare const REGION_NAME_PREFIX = "\u533A\u57DF";
44
- /** 默认区域名称 */
45
- export declare const DEFAULT_REGION_NAME = "\u533A\u57DF1";
46
- /** 区域名称字体族 */
47
- export declare const REGION_NAME_FONT_FAMILY = "Arial, sans-serif";
48
- /** 区域名称基础字体大小(像素) */
49
- export declare const REGION_NAME_FONT_SIZE = 12;
50
- /** 区域名称基础内边距(像素) */
51
- export declare const REGION_NAME_PADDING = 4;
52
- /** OCR 扫描线条基础高度(像素) */
53
- export declare const OCR_SCAN_LINE_BASE_HEIGHT = 3;
54
- /** OCR 扫描线条光晕层倍数 */
55
- export declare const OCR_SCAN_LINE_GLOW_MULTIPLIER = 3;
56
- /** OCR 扫描线条核心位置倍数 */
57
- export declare const OCR_SCAN_LINE_CORE_POSITION_MULTIPLIER = 1.5;
58
- /** OCR 扫描线条核心高度倍数 */
59
- export declare const OCR_SCAN_LINE_CORE_HEIGHT_MULTIPLIER = 0.5;
60
- /** OCR 扫描动画速度(每次移动的距离相对于标注框高度) */
61
- export declare const OCR_SCAN_ANIMATION_SPEED = 0.003;
62
- /** OCR 扫描线条光晕颜色 */
63
- export declare const OCR_SCAN_LINE_GLOW_COLOR = "rgba(156, 36, 242, 0.2)";
64
- /** OCR 扫描线条较亮层颜色 */
65
- export declare const OCR_SCAN_LINE_BRIGHT_COLOR = "rgba(156, 36, 242, 0.5)";
66
- /** OCR 扫描线条核心颜色 */
67
- export declare const OCR_SCAN_LINE_CORE_COLOR = "#9C24F2";
68
- /** 文本布局矩形框填充色 */
69
- export declare const TEXT_LAYOUT_RECT_FILL_COLOR = "rgba(156, 36, 242, 0.2)";
70
- /** 文本布局矩形框边框色 */
71
- export declare const TEXT_LAYOUT_RECT_STROKE_COLOR = "rgba(156, 36, 242, 0.2)";
72
- /** 文本布局矩形框 hover 边框色 */
73
- export declare const TEXT_LAYOUT_RECT_HOVER_STROKE_COLOR = "rgba(156, 36, 242, 0.5)";
74
- /** 文本布局矩形框点击反馈颜色 */
75
- export declare const TEXT_LAYOUT_RECT_CLICK_FEEDBACK_COLOR = "rgba(0, 255, 0, 0.2)";
76
- /** 文本布局矩形框视觉反馈延迟(毫秒) */
77
- export declare const TEXT_LAYOUT_RECT_FEEDBACK_DELAY = 300;
78
- /** 控制点颜色 */
79
- export declare const CONTROL_POINT_COLOR = "#9C24F2";
80
- /** 控制点大小(像素) */
81
- export declare const CONTROL_POINT_SIZE = 6;
82
- /** 删除图标大小(像素) */
83
- export declare const DELETE_ICON_SIZE = 24;
84
- /** 删除控件 X 轴偏移(像素) */
85
- export declare const DELETE_CONTROL_OFFSET_X = 20;
86
- /** 删除控件 Y 轴偏移(像素) */
87
- export declare const DELETE_CONTROL_OFFSET_Y = 24;
88
- /** AI图标大小(像素) */
89
- export declare const AI_ICON_SIZE = 24;
90
- /** AI控件 X 轴偏移(像素) */
91
- export declare const AI_CONTROL_OFFSET_X = 20;
92
- /** AI控件 Y 轴偏移(像素) */
93
- export declare const AI_CONTROL_OFFSET_Y = 24;
94
- /** AI控件与删除控件之间的间距(像素) */
95
- export declare const AI_DELETE_CONTROL_SPACING = 40;
96
- /** 区域名称文本颜色 */
97
- export declare const REGION_NAME_TEXT_COLOR = "#9C24F2";
98
- /** 图片导出格式 */
99
- export declare const IMAGE_EXPORT_FORMAT = "image/png";
100
- /** 删除确认弹框标题 */
101
- export declare const DELETE_MODAL_TITLE = "\u786E\u8BA4\u5220\u9664";
102
- /** 删除确认弹框内容 */
103
- export declare const DELETE_MODAL_CONTENT = "\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6807\u6CE8\u533A\u57DF\u5417\uFF1F";
104
- /** 删除确认弹框确定按钮文本 */
105
- export declare const DELETE_MODAL_OK_TEXT = "\u786E\u5B9A";
106
- /** 删除确认弹框取消按钮文本 */
107
- export declare const DELETE_MODAL_CANCEL_TEXT = "\u53D6\u6D88";
108
- /** 画框模式十字线颜色 */
109
- export declare const CROSSHAIR_LINE_COLOR = "rgba(156, 36, 242, 0.5)";
110
- /** 画框模式十字线宽度(像素) */
111
- export declare const CROSSHAIR_LINE_WIDTH = 1;
112
- /** 画框模式十字线虚线样式 */
113
- export declare const CROSSHAIR_LINE_DASH_ARRAY: [number, number];
@@ -1,6 +0,0 @@
1
- import { default as React } from 'react';
2
- import { VLMAnnotationProps, VLMSample } from './types';
3
- export declare const convertTopLeftToCenter: (sample: VLMSample) => VLMSample;
4
- export type { ShapeType, Shape, Region, VLMSample, VLMLabelType, VLMLabel, VLMAnnotationProps, VLMLabelMakerRef, } from './types';
5
- declare const VLMAnnotation: React.FC<VLMAnnotationProps>;
6
- export default VLMAnnotation;
@@ -1,187 +0,0 @@
1
- import { fabric } from 'fabric';
2
- export interface IBbox {
3
- bbox: [number, number][];
4
- content: string;
5
- no: number;
6
- score: number;
7
- type: string;
8
- }
9
- export type ShapeType = 'rect';
10
- export interface Shape {
11
- name: ShapeType;
12
- x: number;
13
- y: number;
14
- width: number;
15
- height: number;
16
- }
17
- export interface Region {
18
- id: string;
19
- name?: string;
20
- shape: Shape;
21
- content: Record<string, string>;
22
- image?: string;
23
- textLayouts?: IBbox[];
24
- }
25
- export interface VLMSample {
26
- id: string;
27
- fileUrl: string;
28
- labels?: Region[];
29
- sampleFileName?: {
30
- originalName?: string;
31
- name?: string;
32
- };
33
- versionId?: string;
34
- fileKey?: string;
35
- fileSize?: number;
36
- countSubsection?: number;
37
- statusSubsection?: number;
38
- recordId?: string;
39
- textContent?: {
40
- instruction: string;
41
- input: string;
42
- output: string;
43
- };
44
- subsectionId?: string;
45
- createdAt?: string;
46
- updatedAt?: string;
47
- deletedAt?: string;
48
- creator?: string;
49
- metadata?: {
50
- height: string;
51
- width: string;
52
- charactersCount?: number;
53
- };
54
- operator?: {
55
- creatorName?: string;
56
- creatorUserName?: string;
57
- updaterName?: string;
58
- updaterUserName?: string;
59
- };
60
- updater?: string;
61
- confirmStatus?: number;
62
- }
63
- export type VLMLabelType = 'text';
64
- export interface VLMLabel {
65
- id: string;
66
- name: string;
67
- type: VLMLabelType;
68
- }
69
- export interface VLMAnnotationProps {
70
- sample: VLMSample;
71
- labelDefinitions: VLMLabel[];
72
- onChange?: (sample: VLMSample) => void;
73
- leftRatio?: number;
74
- resizable?: boolean;
75
- minLeftRatio?: number;
76
- maxLeftRatio?: number;
77
- minLeftWidth?: number;
78
- onRatioChange?: (ratio: number) => void;
79
- aiAssistantEnabled?: boolean;
80
- ocrRecognize: (image: string) => Promise<IBbox[]>;
81
- coordinateType?: 'top-left' | 'center';
82
- hideRightSide?: boolean;
83
- readOnly?: boolean;
84
- }
85
- export interface VLMLabelMakerRef {
86
- performOCRById: (regionId: string) => void;
87
- ocrRecognizingRef: React.MutableRefObject<Set<string>>;
88
- ocrErrorRef: React.MutableRefObject<Set<string>>;
89
- }
90
- export interface VLMLabelMakerProps {
91
- sample?: VLMSample;
92
- labelDefinitions?: VLMLabel[];
93
- /**
94
- * Optional external labels state to keep canvas regions in sync
95
- * (e.g. text edits from TextAnnotationPanel).
96
- */
97
- labels?: Region[];
98
- onImageLoad?: VoidFunction;
99
- onChange?: (labels: Region[]) => void;
100
- onRegionSelect?: (region: Region | null) => void;
101
- onRegionChange?: (region: Region | null, action: 'create' | 'update' | 'delete') => void;
102
- ocrRecognize?: (image: string) => Promise<IBbox[]>;
103
- activeLabelValue?: {
104
- label: VLMLabel;
105
- region: Region;
106
- } | null;
107
- onClearActive?: () => void;
108
- selectedRegion?: Region | null;
109
- onAppendTextToActive?: (text: string) => void;
110
- readOnly?: boolean;
111
- }
112
- export interface ToolbarProps {
113
- drawingMode: boolean;
114
- draggable: boolean;
115
- scale: number;
116
- onToggleDrawingMode: () => void;
117
- onToggleDrag: () => void;
118
- onZoom: (delta: number) => void;
119
- onFitToScreen: () => void;
120
- readOnly?: boolean;
121
- }
122
- export interface ZoomControlsProps {
123
- scale: number;
124
- onZoomIn: () => void;
125
- onZoomOut: () => void;
126
- }
127
- export interface TextAnnotationPanelProps {
128
- labelDefinitions?: VLMLabel[];
129
- labels?: Region[];
130
- selectedRegion?: Region | null;
131
- activeLabelValue?: {
132
- label: VLMLabel;
133
- region: Region;
134
- } | null;
135
- activeRegionNumber?: number | null;
136
- onChange?: (activeLabelValue: {
137
- label: VLMLabel;
138
- region: Region;
139
- } | null, index?: number) => void;
140
- onInputActive?: (activeLabelValue: {
141
- label: VLMLabel;
142
- region: Region;
143
- }, index?: number) => void;
144
- onBlur?: (activeLabelValue: {
145
- label: VLMLabel;
146
- region: Region;
147
- }, index?: number) => void;
148
- onDelete?: (regionId: string) => void;
149
- onRegionClick?: (region: Region) => void;
150
- onOCR?: (regionId: string) => void;
151
- ocrRecognizing?: Set<string>;
152
- ocrErrors?: Set<string>;
153
- readOnly?: boolean;
154
- }
155
- export interface RegionItemProps {
156
- name: string;
157
- labelDefinitions: VLMLabel[];
158
- region: Region;
159
- isSelected?: boolean;
160
- isActive?: boolean;
161
- activeLabelId?: string;
162
- onChange?: (labelId: string, value: string) => void;
163
- onFocus?: (labelId: string, value: string) => void;
164
- onBlur?: (labelId: string, value: string) => void;
165
- onDelete?: (regionId: string) => void;
166
- onRegionClick?: (region: Region) => void;
167
- onOCR?: (regionId: string) => void;
168
- isOCRRecognizing?: boolean;
169
- hasOCRError?: boolean;
170
- readOnly?: boolean;
171
- }
172
- export interface ImageAnnotationDebuggerProps {
173
- sample?: VLMSample;
174
- activeRegionNumber: number | null;
175
- activeLabelValue?: {
176
- label: VLMLabel;
177
- region: Region;
178
- } | null;
179
- selectedRegion?: Region | null;
180
- }
181
- export interface ExtendedCanvas extends fabric.Canvas {
182
- uniScaleKey?: string;
183
- uniformScaling?: boolean;
184
- }
185
- export interface ExtendedRect extends fabric.Rect {
186
- uniformScaling?: boolean;
187
- }
@@ -1,14 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IVConfigsParams } from '@glodon-aiot/apis';
3
- interface AttributeDetailProps {
4
- datasetId?: string;
5
- versionId?: string;
6
- onAttributesChange?: (attributes: IVConfigsParams[]) => void;
7
- onLoadingChange?: (loading: boolean) => void;
8
- }
9
- export interface AttributeDetailRef {
10
- hasUnsavedChanges: () => boolean;
11
- checkDirtyAndConfirm: () => Promise<boolean>;
12
- }
13
- declare const AttributeDetail: React.ForwardRefExoticComponent<AttributeDetailProps & React.RefAttributes<AttributeDetailRef>>;
14
- export default AttributeDetail;
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- interface QAGenerationConfigProps {
3
- visionId?: string;
4
- datasetId?: string;
5
- afterChangeTemplates?: () => void;
6
- }
7
- export interface QAGenerationConfigRef {
8
- hasUnsavedChanges: () => boolean;
9
- checkDirtyAndConfirm: () => Promise<boolean>;
10
- }
11
- declare const QAGenerationConfig: React.ForwardRefExoticComponent<QAGenerationConfigProps & React.RefAttributes<QAGenerationConfigRef>>;
12
- export default QAGenerationConfig;
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- interface QADetailProps {
3
- sample?: any;
4
- datasetId?: string;
5
- visionId?: string;
6
- labels?: any[];
7
- }
8
- export interface QADetailRef {
9
- checkDirtyAndConfirm: () => Promise<boolean>;
10
- }
11
- declare const QADetail: React.ForwardRefExoticComponent<QADetailProps & React.RefAttributes<QADetailRef>>;
12
- export default QADetail;
@@ -1,12 +0,0 @@
1
- import { FC } from 'react';
2
- import { ISample } from '@glodon-aiot/apis';
3
- interface MarkVLMBoxModalProps {
4
- visible: boolean;
5
- selectSampleId?: string;
6
- datasetId?: string;
7
- versionId?: string;
8
- onClose: VoidFunction;
9
- onSave: (record: ISample) => Promise<boolean>;
10
- }
11
- declare const MarkVLMBoxModal: FC<MarkVLMBoxModalProps>;
12
- export default MarkVLMBoxModal;
@@ -1,17 +0,0 @@
1
- import { default as React, Dispatch, SetStateAction } from 'react';
2
- import { ISample } from '@glodon-aiot/apis';
3
- interface ImageDetailModalProps {
4
- isVlmModalVisible: boolean;
5
- setIsVlmModalVisible: Dispatch<SetStateAction<boolean>>;
6
- record: ISample;
7
- onNextClick: VoidFunction;
8
- onPrevClick: VoidFunction;
9
- listLoading?: boolean;
10
- datasetId?: string;
11
- versionId?: string;
12
- ocrMarkTmpl?: string;
13
- handleMarkClick: (sampleId?: string) => void;
14
- updateSampleList: () => void;
15
- }
16
- declare const VlmModal: React.FC<ImageDetailModalProps>;
17
- export default VlmModal;
@@ -1,6 +0,0 @@
1
- import { default as React } from 'react';
2
- import { AnnotationProps } from '../../featuresConfig';
3
- interface VLMAnnotationDetailProps extends AnnotationProps {
4
- }
5
- declare const VLMAnnotationDetail: React.FC<VLMAnnotationDetailProps>;
6
- export default VLMAnnotationDetail;
@@ -1,16 +0,0 @@
1
- import { FeaturesConfig } from '../featuresConfig';
2
- export type DatasetAnnotation = 'manage' | 'label' | 'view';
3
- export interface DatasetAnnotationConfig extends FeaturesConfig {
4
- getContainer: () => HTMLElement;
5
- token: string;
6
- datasetId: string;
7
- versionId?: string;
8
- apiUrl?: string;
9
- mode?: DatasetAnnotation;
10
- exampleSrcRoot?: string;
11
- errorHandlers: {
12
- aiotToken?: (error: Error) => void;
13
- };
14
- }
15
- declare const _default: (config: DatasetAnnotationConfig) => void;
16
- export default _default;