@searpent/react-image-annotate 2.0.61 → 2.0.63

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.
@@ -4,10 +4,10 @@ import { createTheme, ThemeProvider } from "@mui/material/styles";
4
4
  import Box from "@mui/material/Box";
5
5
  import * as muiColors from "@mui/material/colors";
6
6
  import SidebarBoxContainer from "../SidebarBoxContainer";
7
- import colors from "../colors";
8
7
  import BallotIcon from "@mui/icons-material/Ballot";
9
8
  import capitalize from "lodash/capitalize";
10
9
  import classnames from "classnames";
10
+ import useColors from "../hooks/use-colors";
11
11
  var theme = createTheme();
12
12
  var LabelContainer = styled("div")(function (_ref) {
13
13
  var theme = _ref.theme;
@@ -70,6 +70,10 @@ export var ClassSelectionMenu = function ClassSelectionMenu(_ref6) {
70
70
  var selectedCls = _ref6.selectedCls,
71
71
  regionClsList = _ref6.regionClsList,
72
72
  onSelectCls = _ref6.onSelectCls;
73
+
74
+ var _useColors = useColors(),
75
+ clsColor = _useColors.clsColor;
76
+
73
77
  useEffect(function () {
74
78
  var keyMapping = {};
75
79
 
@@ -118,7 +122,7 @@ export var ClassSelectionMenu = function ClassSelectionMenu(_ref6) {
118
122
  }
119
123
  }, React.createElement(Circle, {
120
124
  style: {
121
- backgroundColor: colors[index % colors.length]
125
+ backgroundColor: clsColor(label)
122
126
  }
123
127
  }), React.createElement(Label, {
124
128
  className: classnames({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searpent/react-image-annotate",
3
- "version": "2.0.61",
3
+ "version": "2.0.63",
4
4
  "dependencies": {
5
5
  "@editorjs/editorjs": "^2.25.0",
6
6
  "@editorjs/paragraph": "^2.8.0",
@@ -29,7 +29,7 @@ function blocksToArticle(blocks) {
29
29
  acc[labelName] = "";
30
30
  }
31
31
 
32
- var connectingSymbol = ""; // if last symbol is dot, next sentence should start with space
32
+ var connectingSymbol = labelName === 'text' ? "" : "<br>"; // if last symbol is dot, next sentence should start with space
33
33
 
34
34
  if (acc[labelName].charAt(acc[labelName].length - 1) === ".") {
35
35
  connectingSymbol = " ";