@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
@@ -14,7 +14,7 @@ import { jsx as E } from "react/jsx-runtime";
14
14
  import { useState as I, useContext as ge, useEffect as B } from "react";
15
15
  import ce from "./LableEditor.mjs";
16
16
  import { fabric as X } from "fabric";
17
- import { useKeyPress as oe } from "ahooks";
17
+ import oe from "ahooks/lib/useKeyPress";
18
18
  import { Spin as le } from "antd";
19
19
  import he from "react-dom";
20
20
  import { getUuid as K } from "../../../../utils/index.mjs";
@@ -22,7 +22,7 @@ var ge = (r, m) => {
22
22
  import { jsx as S, jsxs as Xe } from "react/jsx-runtime";
23
23
  import { useState as U, useEffect as F } from "react";
24
24
  import { fabric as z } from "fabric";
25
- import { useKeyPress as le } from "ahooks";
25
+ import le from "ahooks/lib/useKeyPress";
26
26
  import { Spin as $e, Space as Ie, Radio as me, Tooltip as se, Button as he } from "antd";
27
27
  import Me from "react-dom";
28
28
  import "./style.less.mjs";
@@ -1,17 +1,17 @@
1
- import { jsxs as a, jsx as s, Fragment as H } from "react/jsx-runtime";
2
- import { useRef as N, useState as n, useContext as Q, useEffect as k } from "react";
3
- import { Modal as u, Button as d, Tabs as V, Tooltip as X, Space as Y, message as R } from "antd";
1
+ import { jsxs as a, jsx as s, Fragment as G } from "react/jsx-runtime";
2
+ import { useRef as N, useState as n, useContext as H, useEffect as k } from "react";
3
+ import { Modal as u, Button as d, Tabs as I, Tooltip as Q, Space as X, message as v } from "antd";
4
4
  import "./style.less.mjs";
5
- import v from "react-json-view";
6
- import { useKeyPress as T } from "ahooks";
5
+ import Y from "react-json-view";
6
+ import { useKeyPress as R } from "ahooks";
7
7
  import Z from "../../MarkDescriptions/index.mjs";
8
- import x from "../../Iconfont/index.mjs";
8
+ import T from "../../Iconfont/index.mjs";
9
9
  import _ from "../../../DatasetContext/index.mjs";
10
10
  import $ from "../../OCRImageViewer/index.mjs";
11
11
  import S from "../../ScanTable/index.mjs";
12
- const ee = v.default || v, {
13
- TabPane: I
14
- } = V, fe = (j) => {
12
+ const {
13
+ TabPane: x
14
+ } = I, me = (V) => {
15
15
  var O, M;
16
16
  const {
17
17
  isOcrModalVisible: c,
@@ -22,10 +22,10 @@ const ee = v.default || v, {
22
22
  datasetId: i,
23
23
  versionId: r,
24
24
  ocrMarkTmpl: l,
25
- handleMarkClick: w,
26
- updateSampleList: z,
25
+ handleMarkClick: j,
26
+ updateSampleList: w,
27
27
  isPreLabel: m
28
- } = j, D = N(null), J = N({}), [f, K] = n("annotation"), [e, P] = n(), [L, E] = n(), [q, A] = n([]), [B, g] = n(!1), {
28
+ } = V, z = N(null), D = N({}), [f, K] = n("annotation"), [e, P] = n(), [J, L] = n(), [E, q] = n([]), [A, g] = n(!1), {
29
29
  services: {
30
30
  cvforceDatahub: t
31
31
  },
@@ -34,32 +34,32 @@ const ee = v.default || v, {
34
34
  } = {
35
35
  datasetManager: !1
36
36
  }
37
- } = Q(_);
38
- T("rightarrow", () => {
37
+ } = H(_);
38
+ R("rightarrow", () => {
39
39
  p();
40
- }), T("leftarrow", () => {
40
+ }), R("leftarrow", () => {
41
41
  b();
42
42
  }), k(() => {
43
- i && (t == null || t.listCategory(i).then((o) => A(o || [])));
43
+ i && (t == null || t.listCategory(i).then((o) => q(o || [])));
44
44
  }, [i]), k(() => {
45
45
  c && i && r && (t == null || t.getDatasetsIdVersionsVidSsamplesSid(i, r, h.id).then((o) => {
46
46
  P(o);
47
47
  }));
48
48
  }, [c, h]);
49
- const F = () => {
49
+ const B = () => {
50
50
  C(!1);
51
- }, U = (o) => {
51
+ }, F = (o) => {
52
52
  K(o);
53
- }, W = (o) => {
54
- E(o);
55
- }, G = () => {
53
+ }, U = (o) => {
54
+ L(o);
55
+ }, W = () => {
56
56
  u.confirm({
57
57
  title: "确认要删除此数据吗?",
58
58
  content: "删除后不可恢复,请慎重操作",
59
59
  onOk: () => {
60
60
  !i || !r || !(e != null && e.id) || t == null || t.delDatasetsIdVersionsVidSamplesId(i, r, e.id).then(() => {
61
- R.success("删除成功"), C(!1), z();
62
- }).catch(() => R.error("删除失败"));
61
+ v.success("删除成功"), C(!1), w();
62
+ }).catch(() => v.error("删除失败"));
63
63
  }
64
64
  });
65
65
  };
@@ -75,7 +75,7 @@ const ee = v.default || v, {
75
75
  className: "ocr-modal",
76
76
  open: c,
77
77
  destroyOnClose: !0,
78
- onCancel: () => F(),
78
+ onCancel: () => B(),
79
79
  maskClosable: !1,
80
80
  centered: !0,
81
81
  footer: null,
@@ -85,25 +85,25 @@ const ee = v.default || v, {
85
85
  className: "detail-content",
86
86
  children: [/* @__PURE__ */ s(d, {
87
87
  className: "select-prev",
88
- icon: /* @__PURE__ */ s(x, {
88
+ icon: /* @__PURE__ */ s(T, {
89
89
  type: "icon-zuojiantou"
90
90
  }),
91
91
  type: "text",
92
92
  onClick: () => b()
93
93
  }), /* @__PURE__ */ s("div", {
94
94
  className: "select-main",
95
- ref: J,
95
+ ref: D,
96
96
  children: /* @__PURE__ */ s($, {
97
97
  zoomMin: 0.1,
98
98
  zoomMax: 10,
99
99
  zoomStep: 0.1,
100
100
  url: (e == null ? void 0 : e.fileUrl) || "",
101
- ref: D,
101
+ ref: z,
102
102
  labels: e == null ? void 0 : e.labels
103
103
  })
104
104
  }), /* @__PURE__ */ s(d, {
105
105
  className: "select-next",
106
- icon: /* @__PURE__ */ s(x, {
106
+ icon: /* @__PURE__ */ s(T, {
107
107
  type: "icon-youjiantou"
108
108
  }),
109
109
  type: "text",
@@ -113,28 +113,30 @@ const ee = v.default || v, {
113
113
  className: "detail-slide",
114
114
  children: [/* @__PURE__ */ s("div", {
115
115
  className: "slide-header",
116
- children: /* @__PURE__ */ a(V, {
116
+ children: /* @__PURE__ */ a(I, {
117
117
  className: "header-tab",
118
- onChange: U,
118
+ onChange: F,
119
119
  activeKey: f,
120
- children: [/* @__PURE__ */ s(I, {
120
+ children: [/* @__PURE__ */ s(x, {
121
121
  tab: "标注信息"
122
- }, "annotation"), /* @__PURE__ */ s(I, {
122
+ }, "annotation"), /* @__PURE__ */ s(x, {
123
123
  tab: "JSON"
124
124
  }, "json")]
125
125
  })
126
126
  }), /* @__PURE__ */ a("div", {
127
127
  className: "slide-main",
128
- children: [f === "annotation" && /* @__PURE__ */ s(H, {
128
+ children: [f === "annotation" && /* @__PURE__ */ s(G, {
129
129
  children: l === "TableOCR" ? /* @__PURE__ */ s(S, {
130
130
  currentInfer: e == null ? void 0 : e.labels,
131
- onCellSelect: (o) => W(o),
132
- currentCell: L
131
+ onCellSelect: (o) => U(o),
132
+ currentCell: J
133
133
  }) : (M = e == null ? void 0 : e.labels) != null && M.length ? /* @__PURE__ */ s(Z, {
134
134
  labels: e == null ? void 0 : e.labels,
135
- catagories: q
135
+ catagories: E
136
136
  }) : "暂无标注信息"
137
- }), f === "json" && /* @__PURE__ */ s(ee, {
137
+ }), f === "json" && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
138
+ // @ts-ignore
139
+ /* @__PURE__ */ s(Y, {
138
140
  name: !1,
139
141
  iconStyle: "square",
140
142
  indentWidth: 2,
@@ -150,21 +152,21 @@ const ee = v.default || v, {
150
152
  style: l === "DetectionOCR" ? {
151
153
  width: "100%"
152
154
  } : void 0,
153
- children: /* @__PURE__ */ s(X, {
155
+ children: /* @__PURE__ */ s(Q, {
154
156
  title: "预标注进行中,请任务完成后再试",
155
- open: B,
156
- children: /* @__PURE__ */ a(Y, {
157
+ open: A,
158
+ children: /* @__PURE__ */ a(X, {
157
159
  onMouseEnter: () => m && g(!0),
158
160
  onMouseLeave: () => g(!1),
159
161
  children: [/* @__PURE__ */ s(d, {
160
162
  type: "primary",
161
163
  disabled: l !== "StructKVCOCR" && l !== "DetectionOCR" || m,
162
- onClick: () => w(e == null ? void 0 : e.id),
164
+ onClick: () => j(e == null ? void 0 : e.id),
163
165
  children: "标注"
164
166
  }), y && y.delete && /* @__PURE__ */ s(d, {
165
167
  danger: !0,
166
168
  type: "ghost",
167
- onClick: G,
169
+ onClick: W,
168
170
  disabled: m,
169
171
  children: "删除数据"
170
172
  })]
@@ -174,5 +176,5 @@ const ee = v.default || v, {
174
176
  });
175
177
  };
176
178
  export {
177
- fe as default
179
+ me as default
178
180
  };