@searpent/react-image-annotate 2.1.2 → 2.3.0-cand-2
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.
- package/Annotator/examplePhotos.js +29 -29
- package/Annotator/examplePhotos_repr.js +28 -28
- package/Annotator/index.js +21 -15
- package/Annotator/index.story_bugdemo_15_1.js +51 -46
- package/Annotator/index.story_repr.js +64 -51
- package/Annotator/reducers/combine-reducers.js +3 -18
- package/Annotator/reducers/convert-expanding-line-to-polygon.js +16 -15
- package/Annotator/reducers/get-implied-video-regions.js +30 -18
- package/ClassSelectionMenu/index.js +8 -8
- package/Crosshairs/index.js +2 -2
- package/DebugSidebarBox/index.js +4 -4
- package/DemoSite/Editor.js +15 -15
- package/DemoSite/ErrorBoundaryDialog.js +5 -3
- package/DemoSite/index.js +3 -3
- package/Editor/annotation-plugin/annotation.js +3 -1
- package/Editor/editor.css +0 -2
- package/Editor/index.js +23 -14
- package/Editor/index_bugdemo_15_1.js +17 -13
- package/Editor/readOnly.js +36 -28
- package/Errorer/index.js +2 -2
- package/FullImageSegmentationAnnotator/index.js +1 -1
- package/GroupSelectorSidebarBox/index.js +7 -7
- package/GroupsEditorSidebarBox/index.js +11 -11
- package/HelpSidebarBox/index.js +4 -4
- package/HighlightBox/index.js +3 -3
- package/HistorySidebarBox/index.js +8 -8
- package/ImageCanvas/index.js +16 -16
- package/ImageMask/index.js +1 -1
- package/ImageSelectorSidebarBox/index.js +7 -7
- package/KeyframeTimeline/index.js +14 -30
- package/KeyframesSelectorSidebarBox/index.js +8 -8
- package/LandingPage/index.js +12 -12
- package/Locker/index.js +2 -2
- package/MainLayout/RightSidebarItemsWrapper.js +1 -1
- package/MainLayout/icon-dictionary.js +11 -11
- package/MainLayout/index.js +25 -29
- package/MainLayout/index_bugdemo_15_1.js +23 -25
- package/MetadataEditorSidebarBox/index.js +18 -18
- package/MetadataEditorSidebarBox/index_14_01_25.js +18 -18
- package/MetadataEditorSidebarBox/index_repr.js +21 -21
- package/PageSelector/index.js +21 -21
- package/PointDistances/index.js +4 -4
- package/PreventScrollToParents/index.js +3 -3
- package/RegionLabel/index.js +24 -24
- package/RegionSelectAndTransformBoxes/index.js +8 -8
- package/RegionSelectorSidebarBox/index.js +33 -33
- package/RegionShapes/index.js +22 -22
- package/RegionTags/index.js +6 -6
- package/SettingsDialog/index.js +4 -4
- package/SettingsProvider/index.js +1 -1
- package/Shortcuts/ShortcutField.js +3 -3
- package/Shortcuts/index.js +2 -2
- package/ShortcutsManager/index.js +9 -9
- package/Sidebar/index.js +7 -7
- package/SidebarBoxContainer/index.js +3 -3
- package/SmallToolButton/index.js +2 -2
- package/TagsSidebarBox/index.js +6 -6
- package/TaskDescriptionSidebarBox/index.js +4 -4
- package/Theme/index.js +2 -2
- package/VideoOrImageCanvasBackground/index.js +5 -5
- package/package.json +11 -2
- package/utils/blocks-to-article.js +3 -3
- package/utils/get-landmarks-with-transform.js +15 -13
- package/utils/spellcheck-nspell.js +110 -66
package/DemoSite/Editor.js
CHANGED
|
@@ -105,19 +105,19 @@ var Editor = function Editor(_ref) {
|
|
|
105
105
|
currentJSONValue = _useState8[0],
|
|
106
106
|
changeCurrentJSONValue = _useState8[1];
|
|
107
107
|
|
|
108
|
-
return
|
|
108
|
+
return React.createElement(ThemeProvider, {
|
|
109
109
|
theme: theme
|
|
110
|
-
},
|
|
110
|
+
}, React.createElement("div", null, React.createElement("div", {
|
|
111
111
|
className: c.editBar
|
|
112
|
-
},
|
|
112
|
+
}, React.createElement("h3", null, "React Image Annotate"), React.createElement("div", {
|
|
113
113
|
style: {
|
|
114
114
|
flexGrow: 1
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), React.createElement("div", null, React.createElement("div", {
|
|
117
117
|
style: {
|
|
118
118
|
display: "inline-flex"
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, React.createElement(Select, {
|
|
121
121
|
className: c.select,
|
|
122
122
|
value: {
|
|
123
123
|
label: selectedExample,
|
|
@@ -133,27 +133,27 @@ var Editor = function Editor(_ref) {
|
|
|
133
133
|
changeSelectedExample(selectedOption.value);
|
|
134
134
|
changeCurrentJSONValue(JSON.stringify(selectedOption.value === "Custom" ? loadSavedInput() : examples[selectedOption.value](), null, " "));
|
|
135
135
|
}
|
|
136
|
-
})),
|
|
136
|
+
})), React.createElement(Button, {
|
|
137
137
|
className: "button",
|
|
138
138
|
disabled: !lastOutput,
|
|
139
139
|
onClick: function onClick() {
|
|
140
140
|
return changeOutputOpen(true);
|
|
141
141
|
}
|
|
142
|
-
}, "View Output"),
|
|
142
|
+
}, "View Output"), React.createElement(Button, {
|
|
143
143
|
className: "button",
|
|
144
144
|
variant: "outlined",
|
|
145
145
|
disabled: Boolean(currentError),
|
|
146
146
|
onClick: function onClick() {
|
|
147
147
|
onOpenAnnotator(selectedExample === "Custom" ? loadSavedInput() : examples[selectedExample]);
|
|
148
148
|
}
|
|
149
|
-
}, "Open Annotator"))),
|
|
149
|
+
}, "Open Annotator"))), React.createElement("div", {
|
|
150
150
|
className: c.contentArea,
|
|
151
151
|
style: currentError ? {
|
|
152
152
|
border: "2px solid #f00"
|
|
153
153
|
} : {
|
|
154
154
|
border: "2px solid #fff"
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, React.createElement("div", null, React.createElement(MonacoEditor, {
|
|
157
157
|
value: currentJSONValue,
|
|
158
158
|
language: "javascript",
|
|
159
159
|
onChange: function onChange(code) {
|
|
@@ -168,23 +168,23 @@ var Editor = function Editor(_ref) {
|
|
|
168
168
|
},
|
|
169
169
|
width: "100%",
|
|
170
170
|
height: "550px"
|
|
171
|
-
}))),
|
|
171
|
+
}))), React.createElement("div", {
|
|
172
172
|
className: c.specificationArea
|
|
173
|
-
},
|
|
173
|
+
}, React.createElement("h2", null, "React Image Annotate Format"), React.createElement(Code, {
|
|
174
174
|
language: "javascript"
|
|
175
|
-
}, "\n{\n taskDescription?: string, // markdown\n regionTagList?: Array<string>,\n regionClsList?: Array<string>,\n imageTagList?: Array<string>,\n imageClsList?: Array<string>,\n // all tools are enabled by default\n enabledTools?: Array< \"select\" | \"create-point\" | \"create-box\" | \"create-polygon\" | \"create-line\">,\n selectedImage?: string, // initial selected image\n images: Array<{\n src: string,\n thumbnailSrc?: string, // use this if you are using high-res images\n name: string,\n regions?: Array<{\n id: string | number,\n cls?: string,\n color?: string,\n tags?: Array<string>,\n\n // Point\n type: \"point\",\n x: number, // [0-1] % of image width\n y: number, // [0-1] % of image height\n\n // Bounding Box\n type: \"box\",\n x: number, // [0-1] % of image width\n y: number, // [0-1] % of image height\n w: number, // [0-1] % of image width\n h: number, // [0-1] % of image height\n\n // Polygon\n type: \"polygon\",\n open?: boolean, // should last and first points be connected, default: true\n points: Array<[number, number]> // [0-1] % of image width/height\n }>\n }>,\n}\n")),
|
|
175
|
+
}, "\n{\n taskDescription?: string, // markdown\n regionTagList?: Array<string>,\n regionClsList?: Array<string>,\n imageTagList?: Array<string>,\n imageClsList?: Array<string>,\n // all tools are enabled by default\n enabledTools?: Array< \"select\" | \"create-point\" | \"create-box\" | \"create-polygon\" | \"create-line\">,\n selectedImage?: string, // initial selected image\n images: Array<{\n src: string,\n thumbnailSrc?: string, // use this if you are using high-res images\n name: string,\n regions?: Array<{\n id: string | number,\n cls?: string,\n color?: string,\n tags?: Array<string>,\n\n // Point\n type: \"point\",\n x: number, // [0-1] % of image width\n y: number, // [0-1] % of image height\n\n // Bounding Box\n type: \"box\",\n x: number, // [0-1] % of image width\n y: number, // [0-1] % of image height\n w: number, // [0-1] % of image width\n h: number, // [0-1] % of image height\n\n // Polygon\n type: \"polygon\",\n open?: boolean, // should last and first points be connected, default: true\n points: Array<[number, number]> // [0-1] % of image width/height\n }>\n }>,\n}\n")), React.createElement(Dialog, {
|
|
176
176
|
fullScreen: true,
|
|
177
177
|
open: outputDialogOpen
|
|
178
|
-
},
|
|
178
|
+
}, React.createElement(DialogTitle, null, "React Image Annotate Output"), React.createElement(DialogContent, {
|
|
179
179
|
style: {
|
|
180
180
|
minWidth: 400
|
|
181
181
|
}
|
|
182
|
-
},
|
|
182
|
+
}, React.createElement(MonacoEditor, {
|
|
183
183
|
value: JSON.stringify(lastOutput, null, " "),
|
|
184
184
|
language: "javascript",
|
|
185
185
|
width: "100%",
|
|
186
186
|
height: "550px"
|
|
187
|
-
})),
|
|
187
|
+
})), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
188
188
|
onClick: function onClick() {
|
|
189
189
|
return changeOutputOpen(false);
|
|
190
190
|
}
|
|
@@ -10,7 +10,9 @@ import DialogTitle from "@mui/material/DialogTitle";
|
|
|
10
10
|
import DialogContent from "@mui/material/DialogContent";
|
|
11
11
|
import DialogActions from "@mui/material/DialogActions";
|
|
12
12
|
|
|
13
|
-
var ErrorBoundaryDialog =
|
|
13
|
+
var ErrorBoundaryDialog =
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
function (_Component) {
|
|
14
16
|
_inherits(ErrorBoundaryDialog, _Component);
|
|
15
17
|
|
|
16
18
|
function ErrorBoundaryDialog() {
|
|
@@ -44,10 +46,10 @@ var ErrorBoundaryDialog = /*#__PURE__*/function (_Component) {
|
|
|
44
46
|
key: "render",
|
|
45
47
|
value: function render() {
|
|
46
48
|
if (this.state.hasError) {
|
|
47
|
-
return
|
|
49
|
+
return React.createElement(Dialog, {
|
|
48
50
|
open: this.state.hasError,
|
|
49
51
|
onClose: this.props.onClose
|
|
50
|
-
},
|
|
52
|
+
}, React.createElement(DialogTitle, null, "Error Loading Annotator"), React.createElement(DialogContent, null, React.createElement("pre", null, this.state.err)), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
51
53
|
onClick: this.props.onClose
|
|
52
54
|
}, "Close")));
|
|
53
55
|
}
|
package/DemoSite/index.js
CHANGED
|
@@ -20,17 +20,17 @@ export default (function () {
|
|
|
20
20
|
lastOutput = _useState6[0],
|
|
21
21
|
changeLastOutput = _useState6[1];
|
|
22
22
|
|
|
23
|
-
return
|
|
23
|
+
return React.createElement("div", null, annotatorOpen ? React.createElement(ErrorBoundaryDialog, {
|
|
24
24
|
onClose: function onClose() {
|
|
25
25
|
changeAnnotatorOpen(false);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
27
|
+
}, React.createElement(Annotator, Object.assign({}, annotatorProps, {
|
|
28
28
|
onExit: function onExit(output) {
|
|
29
29
|
delete output["lastAction"];
|
|
30
30
|
changeLastOutput(output);
|
|
31
31
|
changeAnnotatorOpen(false);
|
|
32
32
|
}
|
|
33
|
-
}))) :
|
|
33
|
+
}))) : React.createElement(Editor, {
|
|
34
34
|
lastOutput: lastOutput,
|
|
35
35
|
onOpenAnnotator: function onOpenAnnotator(props) {
|
|
36
36
|
changeAnnotatorProps(props);
|
package/Editor/editor.css
CHANGED
package/Editor/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import blocksToArticle from '../utils/blocks-to-article';
|
|
|
7
7
|
import { EDITOR_JS_TOOLS } from './tools';
|
|
8
8
|
import ReadOnly from './readOnly';
|
|
9
9
|
import { isSpellcheckEnabled, setSpellcheckEnabled } from '../utils/spellcheck-nspell';
|
|
10
|
+
import '../PageSelector/page-selector.css';
|
|
10
11
|
import './editor.css';
|
|
11
12
|
var ReactEditorJS = createReactEditorJS();
|
|
12
13
|
|
|
@@ -27,8 +28,12 @@ function Editor(_ref) {
|
|
|
27
28
|
autoSpellcheck = _useState4[0],
|
|
28
29
|
setAutoSpellcheck = _useState4[1];
|
|
29
30
|
|
|
30
|
-
var handleChange =
|
|
31
|
-
|
|
31
|
+
var handleChange =
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
function () {
|
|
34
|
+
var _ref2 = _asyncToGenerator(
|
|
35
|
+
/*#__PURE__*/
|
|
36
|
+
_regeneratorRuntime.mark(function _callee(instance) {
|
|
32
37
|
var data;
|
|
33
38
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34
39
|
while (1) {
|
|
@@ -71,33 +76,37 @@ function Editor(_ref) {
|
|
|
71
76
|
});
|
|
72
77
|
};
|
|
73
78
|
|
|
74
|
-
|
|
79
|
+
if (blocks.length < 1) {
|
|
80
|
+
return React.createElement("div", {
|
|
81
|
+
className: "instructions"
|
|
82
|
+
}, React.createElement("h1", null, "Click article to display text."));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return React.createElement("div", null, React.createElement("div", {
|
|
75
86
|
className: "show-metadata-wrapper editor-toggle-wrapper"
|
|
76
|
-
},
|
|
87
|
+
}, React.createElement("div", null, React.createElement("label", {
|
|
77
88
|
className: "switch mr-2 editor-switch"
|
|
78
|
-
},
|
|
89
|
+
}, React.createElement("input", {
|
|
79
90
|
id: "automatic-spellcheck",
|
|
80
91
|
type: "checkbox",
|
|
81
92
|
checked: autoSpellcheck,
|
|
82
93
|
onChange: toggleAutoSpellcheck
|
|
83
|
-
}),
|
|
94
|
+
}), React.createElement("span", {
|
|
84
95
|
className: "slider round"
|
|
85
|
-
})),
|
|
96
|
+
})), React.createElement("label", {
|
|
86
97
|
className: "mr-4"
|
|
87
|
-
}, "Spellcheck")),
|
|
98
|
+
}, "Spellcheck")), React.createElement("div", null, React.createElement("label", {
|
|
88
99
|
className: "switch mr-2 editor-switch"
|
|
89
|
-
},
|
|
100
|
+
}, React.createElement("input", {
|
|
90
101
|
id: "show-metadata",
|
|
91
102
|
type: "checkbox",
|
|
92
103
|
checked: editMode,
|
|
93
104
|
onChange: toggleEditMode
|
|
94
|
-
}),
|
|
105
|
+
}), React.createElement("span", {
|
|
95
106
|
className: "slider round"
|
|
96
|
-
})),
|
|
97
|
-
className: "instructions"
|
|
98
|
-
}, /*#__PURE__*/React.createElement("h1", null, "Click article to display text.")) : !editMode ? /*#__PURE__*/React.createElement(ReadOnly, {
|
|
107
|
+
})), React.createElement("label", null, "Edit mode"))), !editMode ? React.createElement(ReadOnly, {
|
|
99
108
|
article: blocksToArticle(blocks)
|
|
100
|
-
}) :
|
|
109
|
+
}) : React.createElement(ReactEditorJS, {
|
|
101
110
|
defaultValue: {
|
|
102
111
|
blocks: blocks
|
|
103
112
|
},
|
|
@@ -31,8 +31,12 @@ function Editor(_ref) {
|
|
|
31
31
|
autoSpellcheck = _useState4[0],
|
|
32
32
|
setAutoSpellcheck = _useState4[1];
|
|
33
33
|
|
|
34
|
-
var handleChange =
|
|
35
|
-
|
|
34
|
+
var handleChange =
|
|
35
|
+
/*#__PURE__*/
|
|
36
|
+
function () {
|
|
37
|
+
var _ref2 = _asyncToGenerator(
|
|
38
|
+
/*#__PURE__*/
|
|
39
|
+
_regeneratorRuntime.mark(function _callee(instance) {
|
|
36
40
|
var data;
|
|
37
41
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
38
42
|
while (1) {
|
|
@@ -106,33 +110,33 @@ function Editor(_ref) {
|
|
|
106
110
|
return (i === null || i === void 0 ? void 0 : (_i$data3 = i.data) === null || _i$data3 === void 0 ? void 0 : _i$data3.groupId) === groupIdForEdit;
|
|
107
111
|
}); // Normal: filter by selected article
|
|
108
112
|
|
|
109
|
-
return
|
|
113
|
+
return React.createElement("div", null, React.createElement("div", {
|
|
110
114
|
className: "show-metadata-wrapper editor-toggle-wrapper"
|
|
111
|
-
},
|
|
115
|
+
}, React.createElement("div", null, React.createElement("label", {
|
|
112
116
|
className: "switch mr-2 editor-switch"
|
|
113
|
-
},
|
|
117
|
+
}, React.createElement("input", {
|
|
114
118
|
id: "automatic-spellcheck",
|
|
115
119
|
type: "checkbox",
|
|
116
120
|
checked: autoSpellcheck,
|
|
117
121
|
onChange: toggleAutoSpellcheck
|
|
118
|
-
}),
|
|
122
|
+
}), React.createElement("span", {
|
|
119
123
|
className: "slider round"
|
|
120
|
-
})),
|
|
124
|
+
})), React.createElement("label", {
|
|
121
125
|
className: "mr-4"
|
|
122
|
-
}, "Spellcheck")),
|
|
126
|
+
}, "Spellcheck")), React.createElement("div", null, React.createElement("label", {
|
|
123
127
|
className: "switch mr-2 editor-switch"
|
|
124
|
-
},
|
|
128
|
+
}, React.createElement("input", {
|
|
125
129
|
id: "show-metadata",
|
|
126
130
|
type: "checkbox",
|
|
127
131
|
checked: editMode,
|
|
128
132
|
onChange: toggleEditMode
|
|
129
|
-
}),
|
|
133
|
+
}), React.createElement("span", {
|
|
130
134
|
className: "slider round"
|
|
131
|
-
})),
|
|
135
|
+
})), React.createElement("label", null, "Edit mode"))), blocksForReadOnly.length < 1 ? React.createElement("div", {
|
|
132
136
|
className: "instructions"
|
|
133
|
-
},
|
|
137
|
+
}, React.createElement("h1", null, "Click article to display text.")) : !editMode ? React.createElement(ReadOnly, {
|
|
134
138
|
article: blocksToArticle(blocksForReadOnly)
|
|
135
|
-
}) :
|
|
139
|
+
}) : React.createElement(ReactEditorJS, {
|
|
136
140
|
defaultValue: {
|
|
137
141
|
blocks: blocksForEdit
|
|
138
142
|
},
|
package/Editor/readOnly.js
CHANGED
|
@@ -9,8 +9,12 @@ function ReadOnly(_ref) {
|
|
|
9
9
|
var containerRef = useRef(null); // Warm up dictionary on component mount
|
|
10
10
|
|
|
11
11
|
useEffect(function () {
|
|
12
|
-
var run =
|
|
13
|
-
|
|
12
|
+
var run =
|
|
13
|
+
/*#__PURE__*/
|
|
14
|
+
function () {
|
|
15
|
+
var _ref2 = _asyncToGenerator(
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
_regeneratorRuntime.mark(function _callee() {
|
|
14
18
|
var combinedHtml;
|
|
15
19
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
16
20
|
while (1) {
|
|
@@ -155,8 +159,12 @@ function ReadOnly(_ref) {
|
|
|
155
159
|
useEffect(function () {
|
|
156
160
|
var cancelled = false;
|
|
157
161
|
|
|
158
|
-
var apply =
|
|
159
|
-
|
|
162
|
+
var apply =
|
|
163
|
+
/*#__PURE__*/
|
|
164
|
+
function () {
|
|
165
|
+
var _ref3 = _asyncToGenerator(
|
|
166
|
+
/*#__PURE__*/
|
|
167
|
+
_regeneratorRuntime.mark(function _callee2() {
|
|
160
168
|
var h1, h2, t, a, ab, ap, pa, pc, adv, og, unk, tbl, sec, contRef, coverClip, pageId, contMark, followUp, articleTerm, pageStripe, columnStripe, prevPageRef, sectionSubcat;
|
|
161
169
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
162
170
|
while (1) {
|
|
@@ -339,7 +347,7 @@ function ReadOnly(_ref) {
|
|
|
339
347
|
cancelled = true;
|
|
340
348
|
};
|
|
341
349
|
}, [article]);
|
|
342
|
-
return
|
|
350
|
+
return React.createElement("div", {
|
|
343
351
|
ref: containerRef,
|
|
344
352
|
contentEditable: false,
|
|
345
353
|
suppressContentEditableWarning: true,
|
|
@@ -350,117 +358,117 @@ function ReadOnly(_ref) {
|
|
|
350
358
|
userSelect: 'text',
|
|
351
359
|
minHeight: '100px'
|
|
352
360
|
}
|
|
353
|
-
},
|
|
361
|
+
}, React.createElement("style", null, ".spell-error { text-decoration: wavy underline red; text-decoration-skip-ink: auto; }"), React.createElement("h1", {
|
|
354
362
|
className: "ro-title",
|
|
355
363
|
dangerouslySetInnerHTML: {
|
|
356
364
|
__html: titleHTML
|
|
357
365
|
}
|
|
358
|
-
}),
|
|
366
|
+
}), React.createElement("h2", {
|
|
359
367
|
className: "ro-subtitle",
|
|
360
368
|
dangerouslySetInnerHTML: {
|
|
361
369
|
__html: subtitleHTML
|
|
362
370
|
}
|
|
363
|
-
}),
|
|
371
|
+
}), React.createElement("p", {
|
|
364
372
|
className: "ro-text",
|
|
365
373
|
dangerouslySetInnerHTML: {
|
|
366
374
|
__html: textHTML
|
|
367
375
|
}
|
|
368
|
-
}),
|
|
376
|
+
}), React.createElement("p", {
|
|
369
377
|
className: "ro-author",
|
|
370
378
|
dangerouslySetInnerHTML: {
|
|
371
379
|
__html: authorHTML
|
|
372
380
|
}
|
|
373
|
-
}),
|
|
381
|
+
}), React.createElement("p", {
|
|
374
382
|
className: "ro-about-author",
|
|
375
383
|
dangerouslySetInnerHTML: {
|
|
376
384
|
__html: aboutHTML
|
|
377
385
|
}
|
|
378
|
-
}),
|
|
386
|
+
}), React.createElement("p", {
|
|
379
387
|
className: "ro-appendix",
|
|
380
388
|
dangerouslySetInnerHTML: {
|
|
381
389
|
__html: appendixHTML
|
|
382
390
|
}
|
|
383
|
-
}),
|
|
391
|
+
}), React.createElement("p", {
|
|
384
392
|
className: "ro-photo-author",
|
|
385
393
|
dangerouslySetInnerHTML: {
|
|
386
394
|
__html: photoAuthorHTML
|
|
387
395
|
}
|
|
388
|
-
}),
|
|
396
|
+
}), React.createElement("p", {
|
|
389
397
|
className: "ro-photo-caption",
|
|
390
398
|
dangerouslySetInnerHTML: {
|
|
391
399
|
__html: photoCaptionHTML
|
|
392
400
|
}
|
|
393
|
-
}),
|
|
401
|
+
}), React.createElement("p", {
|
|
394
402
|
className: "ro-advertisment",
|
|
395
403
|
dangerouslySetInnerHTML: {
|
|
396
404
|
__html: adHTML
|
|
397
405
|
}
|
|
398
|
-
}),
|
|
406
|
+
}), React.createElement("p", {
|
|
399
407
|
className: "ro-other-graphics",
|
|
400
408
|
dangerouslySetInnerHTML: {
|
|
401
409
|
__html: otherGraphicsHTML
|
|
402
410
|
}
|
|
403
|
-
}),
|
|
411
|
+
}), React.createElement("p", {
|
|
404
412
|
className: "ro-unknown",
|
|
405
413
|
dangerouslySetInnerHTML: {
|
|
406
414
|
__html: unknownHTML
|
|
407
415
|
}
|
|
408
|
-
}),
|
|
416
|
+
}), React.createElement("p", {
|
|
409
417
|
className: "ro-table",
|
|
410
418
|
dangerouslySetInnerHTML: {
|
|
411
419
|
__html: tableHTML
|
|
412
420
|
}
|
|
413
|
-
}),
|
|
421
|
+
}), React.createElement("p", {
|
|
414
422
|
className: "ro-section",
|
|
415
423
|
dangerouslySetInnerHTML: {
|
|
416
424
|
__html: sectionHTML
|
|
417
425
|
}
|
|
418
|
-
}),
|
|
426
|
+
}), React.createElement("p", {
|
|
419
427
|
className: "ro-continuation_ref",
|
|
420
428
|
dangerouslySetInnerHTML: {
|
|
421
429
|
__html: continuationRefHTML
|
|
422
430
|
}
|
|
423
|
-
}),
|
|
431
|
+
}), React.createElement("p", {
|
|
424
432
|
className: "ro-cover_clip",
|
|
425
433
|
dangerouslySetInnerHTML: {
|
|
426
434
|
__html: coverClipHTML
|
|
427
435
|
}
|
|
428
|
-
}),
|
|
436
|
+
}), React.createElement("p", {
|
|
429
437
|
className: "ro-page_id",
|
|
430
438
|
dangerouslySetInnerHTML: {
|
|
431
439
|
__html: pageIdHTML
|
|
432
440
|
}
|
|
433
|
-
}),
|
|
441
|
+
}), React.createElement("p", {
|
|
434
442
|
className: "ro-continuation_mark",
|
|
435
443
|
dangerouslySetInnerHTML: {
|
|
436
444
|
__html: continuationMarkHTML
|
|
437
445
|
}
|
|
438
|
-
}),
|
|
446
|
+
}), React.createElement("p", {
|
|
439
447
|
className: "ro-follow_up_mark",
|
|
440
448
|
dangerouslySetInnerHTML: {
|
|
441
449
|
__html: followUpMarkHTML
|
|
442
450
|
}
|
|
443
|
-
}),
|
|
451
|
+
}), React.createElement("p", {
|
|
444
452
|
className: "ro-article_termination_mark",
|
|
445
453
|
dangerouslySetInnerHTML: {
|
|
446
454
|
__html: articleTerminationMarkHTML
|
|
447
455
|
}
|
|
448
|
-
}),
|
|
456
|
+
}), React.createElement("p", {
|
|
449
457
|
className: "ro-page_splitting_stripe",
|
|
450
458
|
dangerouslySetInnerHTML: {
|
|
451
459
|
__html: pageSplittingStripeHTML
|
|
452
460
|
}
|
|
453
|
-
}),
|
|
461
|
+
}), React.createElement("p", {
|
|
454
462
|
className: "ro-column_id_stripe",
|
|
455
463
|
dangerouslySetInnerHTML: {
|
|
456
464
|
__html: columnIdStripeHTML
|
|
457
465
|
}
|
|
458
|
-
}),
|
|
466
|
+
}), React.createElement("p", {
|
|
459
467
|
className: "ro-prev_page_reference",
|
|
460
468
|
dangerouslySetInnerHTML: {
|
|
461
469
|
__html: prevPageReferenceHTML
|
|
462
470
|
}
|
|
463
|
-
}),
|
|
471
|
+
}), React.createElement("p", {
|
|
464
472
|
className: "ro-section_subcategory",
|
|
465
473
|
dangerouslySetInnerHTML: {
|
|
466
474
|
__html: sectionSubcategoryHTML
|
package/Errorer/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import ErrorIcon from '@mui/icons-material/Error';
|
|
|
3
3
|
import './errorer.css';
|
|
4
4
|
|
|
5
5
|
function Errorer() {
|
|
6
|
-
return
|
|
6
|
+
return React.createElement("div", {
|
|
7
7
|
className: "errorer"
|
|
8
|
-
},
|
|
8
|
+
}, React.createElement(ErrorIcon, null));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export default Errorer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Annotator from "../Annotator";
|
|
3
3
|
export default (function (props) {
|
|
4
|
-
return
|
|
4
|
+
return React.createElement(Annotator, Object.assign({}, props, {
|
|
5
5
|
fullImageSegmentationMode: true
|
|
6
6
|
}));
|
|
7
7
|
});
|
|
@@ -25,22 +25,22 @@ export var GroupSelectorSidebarBox = function GroupSelectorSidebarBox(_ref) {
|
|
|
25
25
|
onSelect = _ref.onSelect,
|
|
26
26
|
selectedGroupId = _ref.selectedGroupId;
|
|
27
27
|
var classes = useStyles();
|
|
28
|
-
return
|
|
28
|
+
return React.createElement(ThemeProvider, {
|
|
29
29
|
theme: theme
|
|
30
|
-
},
|
|
30
|
+
}, React.createElement(SidebarBoxContainer, {
|
|
31
31
|
title: title || '',
|
|
32
32
|
subTitle: subtitle || '',
|
|
33
|
-
icon:
|
|
33
|
+
icon: React.createElement(CollectionsIcon, {
|
|
34
34
|
style: {
|
|
35
35
|
color: grey[700]
|
|
36
36
|
}
|
|
37
37
|
})
|
|
38
|
-
},
|
|
38
|
+
}, React.createElement(List, null, groups.map(function (_ref2, i) {
|
|
39
39
|
var id = _ref2.id,
|
|
40
40
|
groupTitle = _ref2.title,
|
|
41
41
|
groupSubtitle = _ref2.subtitle,
|
|
42
42
|
color = _ref2.color;
|
|
43
|
-
return
|
|
43
|
+
return React.createElement(ListItem, {
|
|
44
44
|
button: true,
|
|
45
45
|
onClick: function onClick() {
|
|
46
46
|
return onSelect(id);
|
|
@@ -50,8 +50,8 @@ export var GroupSelectorSidebarBox = function GroupSelectorSidebarBox(_ref) {
|
|
|
50
50
|
style: {
|
|
51
51
|
backgroundColor: id === selectedGroupId ? '#bbdefb' : null
|
|
52
52
|
}
|
|
53
|
-
},
|
|
54
|
-
primary:
|
|
53
|
+
}, React.createElement(ListItemText, {
|
|
54
|
+
primary: React.createElement("strong", {
|
|
55
55
|
style: {
|
|
56
56
|
color: color
|
|
57
57
|
}
|
|
@@ -23,13 +23,13 @@ var GroupItemDiv = styled("div")(function (_ref) {
|
|
|
23
23
|
|
|
24
24
|
var GroupItem = function GroupItem(_ref2) {
|
|
25
25
|
var group = _ref2.group;
|
|
26
|
-
return
|
|
26
|
+
return React.createElement(GroupItemDiv, null, uuidToHash(group.id));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
var GroupList = function GroupList(_ref3) {
|
|
30
30
|
var groups = _ref3.groups;
|
|
31
|
-
return
|
|
32
|
-
return
|
|
31
|
+
return React.createElement("div", null, React.createElement("h2", null, "Groups"), groups.map(function (g, idx) {
|
|
32
|
+
return React.createElement(GroupItem, {
|
|
33
33
|
key: "".concat(g, "-").concat(idx),
|
|
34
34
|
group: g
|
|
35
35
|
});
|
|
@@ -62,13 +62,13 @@ var AddGroupFrom = function AddGroupFrom(_ref5) {
|
|
|
62
62
|
setValue('');
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
return
|
|
65
|
+
return React.createElement(AddGroupFormDiv, null, React.createElement("form", {
|
|
66
66
|
onSubmit: handleSubmit,
|
|
67
67
|
style: {
|
|
68
68
|
display: "flex",
|
|
69
69
|
paddingRight: "6px"
|
|
70
70
|
}
|
|
71
|
-
},
|
|
71
|
+
}, React.createElement("input", {
|
|
72
72
|
type: "text",
|
|
73
73
|
value: value,
|
|
74
74
|
name: "new-group",
|
|
@@ -77,7 +77,7 @@ var AddGroupFrom = function AddGroupFrom(_ref5) {
|
|
|
77
77
|
style: {
|
|
78
78
|
marginRight: "1rem"
|
|
79
79
|
}
|
|
80
|
-
}),
|
|
80
|
+
}), React.createElement("input", {
|
|
81
81
|
type: "submit",
|
|
82
82
|
value: "Create group"
|
|
83
83
|
})));
|
|
@@ -119,19 +119,19 @@ var DivContainer = styled("div")(function (_ref6) {
|
|
|
119
119
|
export var GroupsEditorSidebarBox = function GroupsEditorSidebarBox(_ref7) {
|
|
120
120
|
var groups = _ref7.groups,
|
|
121
121
|
onAddGroup = _ref7.onAddGroup;
|
|
122
|
-
return
|
|
122
|
+
return React.createElement(ThemeProvider, {
|
|
123
123
|
theme: theme
|
|
124
|
-
},
|
|
124
|
+
}, React.createElement(SidebarBoxContainer, {
|
|
125
125
|
title: "Groups",
|
|
126
|
-
icon:
|
|
126
|
+
icon: React.createElement(FilterNoneIcon, {
|
|
127
127
|
style: {
|
|
128
128
|
color: grey[700]
|
|
129
129
|
}
|
|
130
130
|
}),
|
|
131
131
|
expandedByDefault: true
|
|
132
|
-
},
|
|
132
|
+
}, React.createElement(DivContainer, null, React.createElement("h2", null, "Add new group"), React.createElement(AddGroupFrom, {
|
|
133
133
|
onAddGroup: onAddGroup
|
|
134
|
-
}),
|
|
134
|
+
}), React.createElement(GroupList, {
|
|
135
135
|
groups: groups
|
|
136
136
|
}))));
|
|
137
137
|
};
|
package/HelpSidebarBox/index.js
CHANGED
|
@@ -41,17 +41,17 @@ var MarkdownContainer = styled("div")(function (_ref) {
|
|
|
41
41
|
});
|
|
42
42
|
export var HelpSidebarBox = function HelpSidebarBox(_ref2) {
|
|
43
43
|
var help = _ref2.help;
|
|
44
|
-
return
|
|
44
|
+
return React.createElement(ThemeProvider, {
|
|
45
45
|
theme: theme
|
|
46
|
-
},
|
|
46
|
+
}, React.createElement(SidebarBoxContainer, {
|
|
47
47
|
title: "Help",
|
|
48
|
-
icon:
|
|
48
|
+
icon: React.createElement(HelpIcon, {
|
|
49
49
|
style: {
|
|
50
50
|
color: grey[700]
|
|
51
51
|
}
|
|
52
52
|
}),
|
|
53
53
|
expandedByDefault: help && help !== "" ? false : true
|
|
54
|
-
},
|
|
54
|
+
}, React.createElement(MarkdownContainer, null, React.createElement(Markdown, {
|
|
55
55
|
source: help
|
|
56
56
|
}))));
|
|
57
57
|
};
|
package/HighlightBox/index.js
CHANGED
|
@@ -67,9 +67,9 @@ export var HighlightBox = function HighlightBox(_ref) {
|
|
|
67
67
|
height: pbox.h + 10
|
|
68
68
|
};
|
|
69
69
|
var pathD = r.type === "point" ? "M5,5 L".concat(styleCoords.width - 5, " 5L").concat(styleCoords.width - 5, " ").concat(styleCoords.height - 5, "L5 ").concat(styleCoords.height - 5, "Z") : "M5,5 L".concat(pbox.w + 5, ",5 L").concat(pbox.w + 5, ",").concat(pbox.h + 5, " L5,").concat(pbox.h + 5, " Z");
|
|
70
|
-
return
|
|
70
|
+
return React.createElement(ThemeProvider, {
|
|
71
71
|
theme: theme
|
|
72
|
-
},
|
|
72
|
+
}, React.createElement("svg", Object.assign({
|
|
73
73
|
key: r.id,
|
|
74
74
|
className: classnames(classes.highlightBox, {
|
|
75
75
|
highlighted: r.highlighted
|
|
@@ -95,7 +95,7 @@ export var HighlightBox = function HighlightBox(_ref) {
|
|
|
95
95
|
}, {
|
|
96
96
|
position: "absolute"
|
|
97
97
|
}, styleCoords)
|
|
98
|
-
}),
|
|
98
|
+
}), React.createElement("path", {
|
|
99
99
|
d: pathD
|
|
100
100
|
})));
|
|
101
101
|
};
|