@glodon-aiot/dataset-annotation 3.14.0-alpha.32 → 3.14.0-alpha.33

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.
@@ -0,0 +1,16 @@
1
+ import { fabric } from 'fabric';
2
+ interface UseAIButtonHoverParams {
3
+ canvas: fabric.Canvas | undefined;
4
+ ocrErrorRef: React.MutableRefObject<Set<string>>;
5
+ rectMapRef: React.MutableRefObject<Map<fabric.Rect, any>>;
6
+ onAIButtonHover?: (regionId: string | null, position: {
7
+ x: number;
8
+ y: number;
9
+ } | null) => void;
10
+ }
11
+ /**
12
+ * Hook for detecting hover on AI button
13
+ * @param params - AI button hover configuration parameters
14
+ */
15
+ export declare const useAIButtonHover: ({ canvas, ocrErrorRef, rectMapRef, onAIButtonHover, }: UseAIButtonHoverParams) => void;
16
+ export {};
@@ -21,6 +21,7 @@ interface UseDrawingModeParams {
21
21
  onRegionSelect?: (region: Region | null) => void;
22
22
  rectMapRef: React.MutableRefObject<Map<fabric.Rect, Region>>;
23
23
  textLayersMapRef: React.MutableRefObject<Map<fabric.Rect, fabric.Rect[]>>;
24
+ regionNameTextMapRef: React.MutableRefObject<Map<fabric.Rect, fabric.Text>>;
24
25
  setupBoundaryCheck: (rect: fabric.Rect) => (() => void) | undefined;
25
26
  }
26
27
  /**
@@ -28,7 +29,7 @@ interface UseDrawingModeParams {
28
29
  * @param params - Drawing mode configuration parameters
29
30
  * @returns stopDraw function to stop drawing
30
31
  */
31
- export declare const useDrawingMode: ({ canvas, drawingMode, draggable, setDrawingMode, canvasToImageCoords, labelDefinitions, onChange, cropRegionImage, updateRegionShapeAndImage, performOCRIfNeeded, createDeleteControl, createOCRControl, updateRegionNameText, onRegionChange, onRegionSelect, rectMapRef, textLayersMapRef, setupBoundaryCheck, }: UseDrawingModeParams) => {
32
+ export declare const useDrawingMode: ({ canvas, drawingMode, draggable, setDrawingMode, canvasToImageCoords, labelDefinitions, onChange, cropRegionImage, updateRegionShapeAndImage, performOCRIfNeeded, createDeleteControl, createOCRControl, updateRegionNameText, onRegionChange, onRegionSelect, rectMapRef, textLayersMapRef, regionNameTextMapRef, setupBoundaryCheck, }: UseDrawingModeParams) => {
32
33
  stopDraw: () => void;
33
34
  };
34
35
  export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface AIErrorTooltipProps {
3
+ visible: boolean;
4
+ x: number;
5
+ y: number;
6
+ }
7
+ declare const AIErrorTooltip: React.FC<AIErrorTooltipProps>;
8
+ export default AIErrorTooltip;
@@ -84,13 +84,13 @@ export declare const DELETE_ICON_SIZE = 24;
84
84
  /** 删除控件 X 轴偏移(像素) */
85
85
  export declare const DELETE_CONTROL_OFFSET_X = 20;
86
86
  /** 删除控件 Y 轴偏移(像素) */
87
- export declare const DELETE_CONTROL_OFFSET_Y = 24;
87
+ export declare const DELETE_CONTROL_OFFSET_Y = 8;
88
88
  /** AI图标大小(像素) */
89
89
  export declare const AI_ICON_SIZE = 24;
90
90
  /** AI控件 X 轴偏移(像素) */
91
91
  export declare const AI_CONTROL_OFFSET_X = 20;
92
92
  /** AI控件 Y 轴偏移(像素) */
93
- export declare const AI_CONTROL_OFFSET_Y = 24;
93
+ export declare const AI_CONTROL_OFFSET_Y = 8;
94
94
  /** AI控件与删除控件之间的间距(像素) */
95
95
  export declare const AI_DELETE_CONTROL_SPACING = 40;
96
96
  /** 区域名称文本颜色 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glodon-aiot/dataset-annotation",
3
- "version": "3.14.0-alpha.32",
3
+ "version": "3.14.0-alpha.33",
4
4
  "module": "./dist/es/index.mjs",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@ant-design/icons": "^5.3.4",
39
39
  "@aws-crypto/sha256-js": "^3.0.0",
40
- "@glodon-aiot/apis": "^3.14.0-alpha.32",
40
+ "@glodon-aiot/apis": "^3.14.0-alpha.33",
41
41
  "@glodon-aiot/minio": "^0.1.6",
42
42
  "@reduxjs/toolkit": "^1.9.5",
43
43
  "@types/fabric": "^5.3.2",