tycho-components 0.1.0-SNAPSHOT-8 → 0.2.0-SNAPSHOT
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/dist/Comments/CommentAdd.d.ts +1 -1
- package/dist/Comments/types/CommentService.d.ts +1 -1
- package/dist/Header/types/CorpusService.d.ts +1 -1
- package/dist/TreeView/TreeView.d.ts +11 -0
- package/dist/TreeView/TreeView.js +104 -0
- package/dist/TreeView/cytoscape/Configuration.d.ts +18 -0
- package/dist/TreeView/cytoscape/Configuration.js +22 -0
- package/dist/TreeView/cytoscape/CytoscapePositionCalculator.d.ts +10 -0
- package/dist/TreeView/cytoscape/CytoscapePositionCalculator.js +63 -0
- package/dist/TreeView/cytoscape/CytoscapeStylesheet.d.ts +2 -0
- package/dist/TreeView/cytoscape/CytoscapeStylesheet.js +104 -0
- package/dist/TreeView/cytoscape/CytoscapeTreeConverter.d.ts +29 -0
- package/dist/TreeView/cytoscape/CytoscapeTreeConverter.js +331 -0
- package/dist/TreeView/cytoscape/NodeBounds.d.ts +7 -0
- package/dist/TreeView/cytoscape/NodeBounds.js +1 -0
- package/dist/TreeView/cytoscape/NodeCalculation.d.ts +14 -0
- package/dist/TreeView/cytoscape/NodeCalculation.js +1 -0
- package/dist/TreeView/cytoscape/NormalizedPosition.d.ts +8 -0
- package/dist/TreeView/cytoscape/NormalizedPosition.js +13 -0
- package/dist/TreeView/cytoscape/SyntreesCytoscape.d.ts +6 -0
- package/dist/TreeView/cytoscape/SyntreesCytoscape.js +49 -0
- package/dist/TreeView/cytoscape/TreeLayout.d.ts +64 -0
- package/dist/TreeView/cytoscape/TreeLayout.js +353 -0
- package/dist/TreeView/index.d.ts +2 -0
- package/dist/TreeView/index.js +2 -0
- package/dist/TreeView/style.scss +36 -0
- package/dist/TreeView/types/TreeViewExample.d.ts +2 -0
- package/dist/TreeView/types/TreeViewExample.js +261 -0
- package/dist/configs/Localization.d.ts +195 -86
- package/dist/configs/Localization.js +12 -4
- package/dist/configs/localization/CommentsTexts.d.ts +31 -0
- package/dist/configs/localization/CommentsTexts.js +31 -0
- package/dist/configs/localization/ParticipantsTexts.d.ts +26 -0
- package/dist/configs/localization/ParticipantsTexts.js +26 -0
- package/dist/configs/localization/TreeTexts.d.ts +21 -0
- package/dist/configs/localization/TreeTexts.js +21 -0
- package/dist/configs/store/actions.d.ts +2 -2
- package/dist/configs/store/types.d.ts +2 -2
- package/dist/configs/types/Struct.d.ts +44 -0
- package/dist/configs/types/Struct.js +1 -0
- package/dist/configs/types/Tree.d.ts +12 -0
- package/dist/configs/types/Tree.js +1 -0
- package/dist/configs/useCorpusUtils.d.ts +1 -1
- package/dist/configs/useCorpusUtils.js +1 -1
- package/dist/configs/useLoggedUtils.d.ts +1 -1
- package/dist/configs/useLoggedUtils.js +1 -1
- package/dist/functions/SecurityUtils.d.ts +1 -1
- package/dist/functions/SecurityUtils.js +1 -1
- package/dist/functions/SentenceUtils.d.ts +6 -0
- package/dist/functions/SentenceUtils.js +32 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +4 -2
- package/package.json +5 -1
- /package/dist/configs/{Corpus.d.ts → types/Corpus.d.ts} +0 -0
- /package/dist/configs/{Corpus.js → types/Corpus.js} +0 -0
- /package/dist/configs/{CorpusImage.d.ts → types/CorpusImage.d.ts} +0 -0
- /package/dist/configs/{CorpusImage.js → types/CorpusImage.js} +0 -0
- /package/dist/configs/{User.d.ts → types/User.d.ts} +0 -0
- /package/dist/configs/{User.js → types/User.js} +0 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { AlignmentInLevel, Configuration, Location } from './Configuration';
|
|
2
|
+
import NormalizedPosition from './NormalizedPosition';
|
|
3
|
+
class TreeLayout {
|
|
4
|
+
constructor(root) {
|
|
5
|
+
this.boundsLeft = Number.MAX_VALUE;
|
|
6
|
+
this.boundsTop = Number.MAX_VALUE;
|
|
7
|
+
this.boundsRight = Number.MIN_VALUE;
|
|
8
|
+
this.boundsBottom = Number.MIN_VALUE;
|
|
9
|
+
this.sizeOfLevel = [];
|
|
10
|
+
this.nodeBounds = new Map();
|
|
11
|
+
this.mod = new Map();
|
|
12
|
+
this.thread = new Map();
|
|
13
|
+
this.prelim = new Map();
|
|
14
|
+
this.change = new Map();
|
|
15
|
+
this.shift = new Map();
|
|
16
|
+
this.ancestor = new Map();
|
|
17
|
+
this.number = new Map();
|
|
18
|
+
this.positions = new Map();
|
|
19
|
+
this.configuration = new Configuration();
|
|
20
|
+
const r = root;
|
|
21
|
+
this.firstWalk(r, null);
|
|
22
|
+
this.calcSizeOfLevels(r, 0);
|
|
23
|
+
this.secondWalk(r, -this.getPrelim(r), 0, 0);
|
|
24
|
+
}
|
|
25
|
+
getNodeBounds() {
|
|
26
|
+
this.nodeBounds = new Map();
|
|
27
|
+
for (const [node, pos] of this.positions.entries()) {
|
|
28
|
+
const w = this.getNodeWidth();
|
|
29
|
+
const h = this.getNodeHeight();
|
|
30
|
+
const x = pos.getX(this.boundsLeft) - w / 2;
|
|
31
|
+
const y = pos.getY(this.boundsTop) - h / 2;
|
|
32
|
+
this.nodeBounds.set(node, { x, y, w, h });
|
|
33
|
+
}
|
|
34
|
+
return this.nodeBounds;
|
|
35
|
+
}
|
|
36
|
+
getSizeOfLevel(level) {
|
|
37
|
+
if (level < 0 || level >= this.getLevelCount()) {
|
|
38
|
+
throw new Error('level must be >= 0 and < levelCount');
|
|
39
|
+
}
|
|
40
|
+
return this.sizeOfLevel[level];
|
|
41
|
+
}
|
|
42
|
+
getMod(node) {
|
|
43
|
+
if (!node)
|
|
44
|
+
return 0;
|
|
45
|
+
return this.mod.get(node.id) || 0;
|
|
46
|
+
}
|
|
47
|
+
setMod(node, d) {
|
|
48
|
+
if (!node)
|
|
49
|
+
return;
|
|
50
|
+
this.mod.set(node.id, d);
|
|
51
|
+
}
|
|
52
|
+
getThread(node) {
|
|
53
|
+
const n = this.thread.get(node.id);
|
|
54
|
+
return n !== undefined ? n : null;
|
|
55
|
+
}
|
|
56
|
+
setThread(node, thread) {
|
|
57
|
+
if (!node)
|
|
58
|
+
return;
|
|
59
|
+
this.thread.set(node.id, thread);
|
|
60
|
+
}
|
|
61
|
+
getAncestor(node) {
|
|
62
|
+
return this.ancestor.get(node.id) || node;
|
|
63
|
+
}
|
|
64
|
+
setAncestor(node, ancestor) {
|
|
65
|
+
if (!node)
|
|
66
|
+
return;
|
|
67
|
+
this.ancestor.set(node.id, ancestor);
|
|
68
|
+
}
|
|
69
|
+
getPrelim(node) {
|
|
70
|
+
if (!node)
|
|
71
|
+
return 0;
|
|
72
|
+
return this.prelim.get(node.id) || 0;
|
|
73
|
+
}
|
|
74
|
+
setPrelim(node, d) {
|
|
75
|
+
this.prelim.set(node.id, d);
|
|
76
|
+
}
|
|
77
|
+
getChange(node) {
|
|
78
|
+
return this.change.get(node.id) || 0;
|
|
79
|
+
}
|
|
80
|
+
setChange(node, d) {
|
|
81
|
+
this.change.set(node.id, d);
|
|
82
|
+
}
|
|
83
|
+
getShift(node) {
|
|
84
|
+
return this.shift.get(node.id) || 0;
|
|
85
|
+
}
|
|
86
|
+
setShift(node, d) {
|
|
87
|
+
this.shift.set(node.id, d);
|
|
88
|
+
}
|
|
89
|
+
getDistance(v, w) {
|
|
90
|
+
const sizeOfNodes = this.getNodeSize(v) + this.getNodeSize(w);
|
|
91
|
+
const distance = sizeOfNodes / 2 + this.configuration.gapBetweenNodes;
|
|
92
|
+
return distance;
|
|
93
|
+
}
|
|
94
|
+
nextLeft(v) {
|
|
95
|
+
if (!v)
|
|
96
|
+
return null;
|
|
97
|
+
return this.isLeaf(v) ? this.getThread(v) : this.getFirstChild(v);
|
|
98
|
+
}
|
|
99
|
+
nextRight(v) {
|
|
100
|
+
if (!v)
|
|
101
|
+
return null;
|
|
102
|
+
return this.isLeaf(v) ? this.getThread(v) : this.getLastChild(v);
|
|
103
|
+
}
|
|
104
|
+
getNumber(node, parentNode) {
|
|
105
|
+
const n = this.number.get(node.id);
|
|
106
|
+
if (!n) {
|
|
107
|
+
let i = 1;
|
|
108
|
+
for (const child of this.getChildren(parentNode)) {
|
|
109
|
+
this.number.set(child.id, i);
|
|
110
|
+
i += 1;
|
|
111
|
+
}
|
|
112
|
+
return this.number.get(node.id) || 0;
|
|
113
|
+
}
|
|
114
|
+
return n;
|
|
115
|
+
}
|
|
116
|
+
getChildren(node) {
|
|
117
|
+
return node.children || [];
|
|
118
|
+
}
|
|
119
|
+
detectAncestor(vIMinus, parentOfV, defaultAncestor) {
|
|
120
|
+
const ancestor = this.getAncestor(vIMinus);
|
|
121
|
+
return this.isChildOfParent(ancestor, parentOfV)
|
|
122
|
+
? ancestor
|
|
123
|
+
: defaultAncestor;
|
|
124
|
+
}
|
|
125
|
+
moveSubtree(wMinus, wPlus, parent, shift) {
|
|
126
|
+
const subtrees = this.getNumber(wPlus, parent) - this.getNumber(wMinus, parent);
|
|
127
|
+
this.setChange(wPlus, this.getChange(wPlus) - shift / subtrees);
|
|
128
|
+
this.setShift(wPlus, this.getShift(wPlus) + shift);
|
|
129
|
+
this.setChange(wMinus, this.getChange(wMinus) + shift / subtrees);
|
|
130
|
+
this.setPrelim(wPlus, this.getPrelim(wPlus) + shift);
|
|
131
|
+
this.setMod(wPlus, this.getMod(wPlus) + shift);
|
|
132
|
+
}
|
|
133
|
+
apportion(v, defaultAncestor, leftSibling, parentOfV) {
|
|
134
|
+
const w = leftSibling;
|
|
135
|
+
if (w === null) {
|
|
136
|
+
return defaultAncestor;
|
|
137
|
+
}
|
|
138
|
+
let vOPlus = v;
|
|
139
|
+
let vIPlus = v;
|
|
140
|
+
let vIMinus = w;
|
|
141
|
+
let vOMinus = this.getFirstChild(parentOfV);
|
|
142
|
+
let sIPlus = this.getMod(vIPlus);
|
|
143
|
+
let sOPlus = this.getMod(vOPlus);
|
|
144
|
+
let sIMinus = this.getMod(vIMinus);
|
|
145
|
+
let sOMinus = this.getMod(vOMinus);
|
|
146
|
+
let nextRightVIMinus = this.nextRight(vIMinus);
|
|
147
|
+
let nextLeftVIPlus = this.nextLeft(vIPlus);
|
|
148
|
+
while (nextRightVIMinus !== null && nextLeftVIPlus !== null) {
|
|
149
|
+
vIMinus = nextRightVIMinus;
|
|
150
|
+
vIPlus = nextLeftVIPlus;
|
|
151
|
+
vOMinus = this.nextLeft(vOMinus);
|
|
152
|
+
vOPlus = this.nextRight(vOPlus);
|
|
153
|
+
this.setAncestor(vOPlus, v);
|
|
154
|
+
const shift = this.getPrelim(vIMinus) +
|
|
155
|
+
sIMinus -
|
|
156
|
+
(this.getPrelim(vIPlus) + sIPlus) +
|
|
157
|
+
this.getDistance(vIMinus, vIPlus);
|
|
158
|
+
if (shift > 0) {
|
|
159
|
+
this.moveSubtree(this.detectAncestor(vIMinus, parentOfV, defaultAncestor), v, parentOfV, shift);
|
|
160
|
+
sIPlus += shift;
|
|
161
|
+
sOPlus += shift;
|
|
162
|
+
}
|
|
163
|
+
sIMinus += this.getMod(vIMinus);
|
|
164
|
+
sIPlus += this.getMod(vIPlus);
|
|
165
|
+
sOMinus += this.getMod(vOMinus);
|
|
166
|
+
sOPlus += this.getMod(vOPlus);
|
|
167
|
+
nextRightVIMinus = this.nextRight(vIMinus);
|
|
168
|
+
nextLeftVIPlus = this.nextLeft(vIPlus);
|
|
169
|
+
}
|
|
170
|
+
if (nextRightVIMinus !== null && this.nextRight(vOPlus) === null) {
|
|
171
|
+
this.setThread(vOPlus, nextRightVIMinus);
|
|
172
|
+
this.setMod(vOPlus, this.getMod(vOPlus) + sIMinus - sOPlus);
|
|
173
|
+
}
|
|
174
|
+
if (nextLeftVIPlus !== null && this.nextLeft(vOMinus) === null) {
|
|
175
|
+
this.setThread(vOMinus, nextLeftVIPlus);
|
|
176
|
+
this.setMod(vOMinus, this.getMod(vOMinus) + sIPlus - sOMinus);
|
|
177
|
+
defaultAncestor = v;
|
|
178
|
+
}
|
|
179
|
+
return defaultAncestor;
|
|
180
|
+
}
|
|
181
|
+
executeShifts(v) {
|
|
182
|
+
let shift = 0;
|
|
183
|
+
let change = 0;
|
|
184
|
+
for (const w of this.getChildrenReverse(v)) {
|
|
185
|
+
change += this.getChange(w);
|
|
186
|
+
this.setPrelim(w, this.getPrelim(w) + shift);
|
|
187
|
+
this.setMod(w, this.getMod(w) + shift);
|
|
188
|
+
shift += this.getShift(w) + change;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
cloneMap(originalMap) {
|
|
192
|
+
const clonedMap = new Map();
|
|
193
|
+
// Add all entries from the original map to the cloned map
|
|
194
|
+
for (const [key, value] of originalMap.entries()) {
|
|
195
|
+
clonedMap.set(key, value);
|
|
196
|
+
}
|
|
197
|
+
return clonedMap;
|
|
198
|
+
}
|
|
199
|
+
firstWalk(v, leftSibling) {
|
|
200
|
+
if (this.isLeaf(v)) {
|
|
201
|
+
const w = leftSibling;
|
|
202
|
+
if (w !== null) {
|
|
203
|
+
this.setPrelim(v, this.getPrelim(w) + this.getDistance(v, w));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
let defaultAncestor = this.getFirstChild(v);
|
|
208
|
+
let previousChild = null;
|
|
209
|
+
if (!defaultAncestor)
|
|
210
|
+
throw new Error('chunk.children.empty');
|
|
211
|
+
for (const w of this.getChildren(v)) {
|
|
212
|
+
this.firstWalk(w, previousChild);
|
|
213
|
+
defaultAncestor = this.apportion(w, defaultAncestor, previousChild, v);
|
|
214
|
+
previousChild = w;
|
|
215
|
+
}
|
|
216
|
+
this.executeShifts(v);
|
|
217
|
+
const midpoint = (this.getPrelim(this.getFirstChild(v)) +
|
|
218
|
+
this.getPrelim(this.getLastChild(v))) /
|
|
219
|
+
2.0;
|
|
220
|
+
const w = leftSibling;
|
|
221
|
+
if (w !== null) {
|
|
222
|
+
this.setPrelim(v, this.getPrelim(w) + this.getDistance(v, w));
|
|
223
|
+
this.setMod(v, this.getPrelim(v) - midpoint);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
this.setPrelim(v, midpoint);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
secondWalk(v, m, level, levelStart) {
|
|
231
|
+
const levelChangeSign = this.getLevelChangeSign();
|
|
232
|
+
const levelChangeOnYAxis = this.isLevelChangeInYAxis();
|
|
233
|
+
const levelSize = this.getSizeOfLevel(level);
|
|
234
|
+
let x = this.getPrelim(v) + m;
|
|
235
|
+
let y;
|
|
236
|
+
const alignment = this.configuration.alignmentInLevel;
|
|
237
|
+
if (alignment === AlignmentInLevel.Center) {
|
|
238
|
+
y = levelStart + levelChangeSign * (levelSize / 2);
|
|
239
|
+
}
|
|
240
|
+
else if (alignment === AlignmentInLevel.TowardsRoot) {
|
|
241
|
+
y = levelStart + levelChangeSign * (this.getNodeThickness(v) / 2);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
y =
|
|
245
|
+
levelStart +
|
|
246
|
+
levelSize -
|
|
247
|
+
levelChangeSign * (this.getNodeThickness(v) / 2);
|
|
248
|
+
}
|
|
249
|
+
if (!levelChangeOnYAxis) {
|
|
250
|
+
const t = x;
|
|
251
|
+
x = y;
|
|
252
|
+
y = t;
|
|
253
|
+
}
|
|
254
|
+
this.positions.set(v.id, new NormalizedPosition(x, y));
|
|
255
|
+
this.updateBounds(x, y);
|
|
256
|
+
if (!this.isLeaf(v)) {
|
|
257
|
+
const nextLevelStart = levelStart +
|
|
258
|
+
(levelSize + this.configuration.gapBetweenLevels) * levelChangeSign;
|
|
259
|
+
for (const w of this.getChildren(v)) {
|
|
260
|
+
this.secondWalk(w, m + this.getMod(v), level + 1, nextLevelStart);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
getNodeHeight() {
|
|
265
|
+
return TreeLayout.MIN_NODE_HEIGHT;
|
|
266
|
+
}
|
|
267
|
+
getNodeWidth() {
|
|
268
|
+
return TreeLayout.MIN_NODE_WIDTH;
|
|
269
|
+
}
|
|
270
|
+
getWidthOrHeightOfNode(returnWidth) {
|
|
271
|
+
return returnWidth ? this.getNodeWidth() : this.getNodeHeight();
|
|
272
|
+
}
|
|
273
|
+
getNodeThickness(treeNode) {
|
|
274
|
+
return this.getWidthOrHeightOfNode(!this.isLevelChangeInYAxis());
|
|
275
|
+
}
|
|
276
|
+
getNodeSize(treeNode) {
|
|
277
|
+
return this.getWidthOrHeightOfNode(this.isLevelChangeInYAxis());
|
|
278
|
+
}
|
|
279
|
+
isLevelChangeInYAxis() {
|
|
280
|
+
const rootLocation = this.configuration.location;
|
|
281
|
+
return rootLocation === Location.Top || rootLocation === Location.Bottom;
|
|
282
|
+
}
|
|
283
|
+
getLevelChangeSign() {
|
|
284
|
+
const rootLocation = this.configuration.location;
|
|
285
|
+
return rootLocation === Location.Bottom || rootLocation === Location.Right
|
|
286
|
+
? -1
|
|
287
|
+
: 1;
|
|
288
|
+
}
|
|
289
|
+
updateBounds(centerX, centerY) {
|
|
290
|
+
const width = this.getNodeWidth();
|
|
291
|
+
const height = this.getNodeHeight();
|
|
292
|
+
const left = centerX - width / 2;
|
|
293
|
+
const right = centerX + width / 2;
|
|
294
|
+
const top = centerY - height / 2;
|
|
295
|
+
const bottom = centerY + height / 2;
|
|
296
|
+
if (this.boundsLeft > left) {
|
|
297
|
+
this.boundsLeft = left;
|
|
298
|
+
}
|
|
299
|
+
if (this.boundsRight < right) {
|
|
300
|
+
this.boundsRight = right;
|
|
301
|
+
}
|
|
302
|
+
if (this.boundsTop > top) {
|
|
303
|
+
this.boundsTop = top;
|
|
304
|
+
}
|
|
305
|
+
if (this.boundsBottom < bottom) {
|
|
306
|
+
this.boundsBottom = bottom;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
calcSizeOfLevels(node, level) {
|
|
310
|
+
let oldSize;
|
|
311
|
+
if (this.sizeOfLevel.length <= level) {
|
|
312
|
+
this.sizeOfLevel.push(0);
|
|
313
|
+
oldSize = 0;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
oldSize = this.sizeOfLevel[level];
|
|
317
|
+
}
|
|
318
|
+
const size = this.getNodeThickness(node);
|
|
319
|
+
if (oldSize < size) {
|
|
320
|
+
this.sizeOfLevel[level] = size;
|
|
321
|
+
}
|
|
322
|
+
if (!this.isLeaf(node)) {
|
|
323
|
+
for (const child of this.getChildren(node)) {
|
|
324
|
+
this.calcSizeOfLevels(child, level + 1);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
getLevelCount() {
|
|
329
|
+
return this.sizeOfLevel.length;
|
|
330
|
+
}
|
|
331
|
+
isLeaf(node) {
|
|
332
|
+
return this.getChildren(node).length === 0;
|
|
333
|
+
}
|
|
334
|
+
isChildOfParent(node, parentNode) {
|
|
335
|
+
return node.parent === parentNode;
|
|
336
|
+
}
|
|
337
|
+
getChildrenReverse(node) {
|
|
338
|
+
const list = [...this.getChildren(node)];
|
|
339
|
+
list.reverse();
|
|
340
|
+
return list;
|
|
341
|
+
}
|
|
342
|
+
getFirstChild(parentNode) {
|
|
343
|
+
const list = this.getChildren(parentNode);
|
|
344
|
+
return list.length > 0 ? list[0] : null;
|
|
345
|
+
}
|
|
346
|
+
getLastChild(parentNode) {
|
|
347
|
+
const list = this.getChildren(parentNode);
|
|
348
|
+
return list.length > 0 ? list[list.length - 1] : null;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
TreeLayout.MIN_NODE_WIDTH = 70;
|
|
352
|
+
TreeLayout.MIN_NODE_HEIGHT = 50;
|
|
353
|
+
export default TreeLayout;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.tree-view-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
padding-top: 8px;
|
|
4
|
+
|
|
5
|
+
.canvas-tree {
|
|
6
|
+
height: 80vh;
|
|
7
|
+
padding: 16px;
|
|
8
|
+
background-color: var(--color-surface);
|
|
9
|
+
border: var(--border-default);
|
|
10
|
+
border-radius: var(--border-radius-button);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.floating-button {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 16px;
|
|
16
|
+
z-index: 1100;
|
|
17
|
+
background-color: transparent;
|
|
18
|
+
border: none;
|
|
19
|
+
|
|
20
|
+
svg {
|
|
21
|
+
width: 24px;
|
|
22
|
+
height: 24px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.info {
|
|
27
|
+
position: absolute;
|
|
28
|
+
bottom: 16px;
|
|
29
|
+
left: 16px;
|
|
30
|
+
z-index: 1100;
|
|
31
|
+
|
|
32
|
+
.translation b {
|
|
33
|
+
margin-right: 4px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
export const structExample = {
|
|
2
|
+
uid: '13e0ee30-8f07-11e6-b457-90b11c409ded',
|
|
3
|
+
tokens: [
|
|
4
|
+
{
|
|
5
|
+
attributes: {
|
|
6
|
+
'gloss-br': 'agora',
|
|
7
|
+
gloss: 'now',
|
|
8
|
+
},
|
|
9
|
+
p: 1,
|
|
10
|
+
v: 'natigide',
|
|
11
|
+
t: 'ADV',
|
|
12
|
+
l: 1,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
splits: [
|
|
16
|
+
{
|
|
17
|
+
attributes: {
|
|
18
|
+
'gloss-br': 'Ant',
|
|
19
|
+
gloss: 'Ant',
|
|
20
|
+
},
|
|
21
|
+
v: 'n',
|
|
22
|
+
t: 'Ant',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
attributes: {
|
|
26
|
+
'gloss-br': 'história',
|
|
27
|
+
gloss: 'history',
|
|
28
|
+
},
|
|
29
|
+
v: 'atema',
|
|
30
|
+
t: 'n',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
attributes: {
|
|
34
|
+
'gloss-br': 'de',
|
|
35
|
+
gloss: 'of',
|
|
36
|
+
},
|
|
37
|
+
v: 'tigi',
|
|
38
|
+
t: 'Apl',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
attributes: {
|
|
42
|
+
'gloss-br': 'história',
|
|
43
|
+
},
|
|
44
|
+
p: 2,
|
|
45
|
+
v: 'natematigi',
|
|
46
|
+
t: 'N$',
|
|
47
|
+
l: 2,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
splits: [
|
|
51
|
+
{
|
|
52
|
+
attributes: {
|
|
53
|
+
'gloss-br': 'fem',
|
|
54
|
+
gloss: 'fem',
|
|
55
|
+
},
|
|
56
|
+
v: 'a',
|
|
57
|
+
t: 'Gnr',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
attributes: {
|
|
61
|
+
'gloss-br': 'ausente',
|
|
62
|
+
gloss: 'absent',
|
|
63
|
+
},
|
|
64
|
+
v: 'ca',
|
|
65
|
+
t: 'Ncl',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
attributes: {
|
|
69
|
+
'gloss-br': 'Hon',
|
|
70
|
+
gloss: 'Hon',
|
|
71
|
+
},
|
|
72
|
+
v: 'wa',
|
|
73
|
+
t: 'Hon',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
attributes: {
|
|
77
|
+
'gloss-br': 'uma',
|
|
78
|
+
},
|
|
79
|
+
p: 3,
|
|
80
|
+
v: 'acoa',
|
|
81
|
+
t: 'D',
|
|
82
|
+
l: 1,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
splits: [
|
|
86
|
+
{
|
|
87
|
+
attributes: {
|
|
88
|
+
'gloss-br': 'mulher',
|
|
89
|
+
gloss: 'woman',
|
|
90
|
+
},
|
|
91
|
+
v: 'iwalo',
|
|
92
|
+
t: 'n',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
attributes: {
|
|
96
|
+
'gloss-br': 'mulher',
|
|
97
|
+
},
|
|
98
|
+
p: 4,
|
|
99
|
+
v: 'iwaalo',
|
|
100
|
+
t: 'N',
|
|
101
|
+
l: 1,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
attributes: {
|
|
105
|
+
'gloss-br': 'que ',
|
|
106
|
+
},
|
|
107
|
+
p: 5,
|
|
108
|
+
v: 'ane',
|
|
109
|
+
t: 'WPRO',
|
|
110
|
+
l: 3,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
p: 6,
|
|
114
|
+
v: '*T*',
|
|
115
|
+
l: 4,
|
|
116
|
+
ec: true,
|
|
117
|
+
coidx: [1],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
splits: [
|
|
121
|
+
{
|
|
122
|
+
v: 'di',
|
|
123
|
+
t: 'Inv',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
v: 'n',
|
|
127
|
+
t: 'Ref',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
attributes: {
|
|
131
|
+
'gloss-br': 'virar',
|
|
132
|
+
gloss: 'turn',
|
|
133
|
+
},
|
|
134
|
+
v: 'ana',
|
|
135
|
+
t: 'v',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
attributes: {
|
|
139
|
+
'gloss-br': 'para',
|
|
140
|
+
gloss: 'into',
|
|
141
|
+
},
|
|
142
|
+
v: 'tigi',
|
|
143
|
+
t: 'Apl',
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
attributes: {
|
|
147
|
+
'gloss-br': 'virava',
|
|
148
|
+
},
|
|
149
|
+
p: 7,
|
|
150
|
+
v: 'dinanatigi',
|
|
151
|
+
t: 'VBAPL',
|
|
152
|
+
l: 3,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
attributes: {
|
|
156
|
+
'gloss-br': 'que',
|
|
157
|
+
},
|
|
158
|
+
p: 8,
|
|
159
|
+
v: 'me',
|
|
160
|
+
t: 'C',
|
|
161
|
+
l: 4,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
splits: [
|
|
165
|
+
{
|
|
166
|
+
attributes: {
|
|
167
|
+
'gloss-br': 'onça',
|
|
168
|
+
gloss: 'jaguar',
|
|
169
|
+
},
|
|
170
|
+
v: 'nigediogo',
|
|
171
|
+
t: 'n',
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
attributes: {
|
|
175
|
+
'gloss-br': 'onça',
|
|
176
|
+
},
|
|
177
|
+
p: 9,
|
|
178
|
+
v: 'nigediogo',
|
|
179
|
+
t: 'N',
|
|
180
|
+
l: 6,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
p: 10,
|
|
184
|
+
v: '.',
|
|
185
|
+
t: '.',
|
|
186
|
+
l: 0,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
chunks: [
|
|
190
|
+
{
|
|
191
|
+
i: 1,
|
|
192
|
+
f: 10,
|
|
193
|
+
t: 'IP-MAT',
|
|
194
|
+
l: 0,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
i: 1,
|
|
198
|
+
f: 1,
|
|
199
|
+
t: 'ADVP',
|
|
200
|
+
l: 1,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
i: 2,
|
|
204
|
+
f: 9,
|
|
205
|
+
t: 'NP',
|
|
206
|
+
l: 1,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
i: 2,
|
|
210
|
+
f: 2,
|
|
211
|
+
t: 'NP',
|
|
212
|
+
l: 2,
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
i: 5,
|
|
216
|
+
f: 9,
|
|
217
|
+
t: 'CP-REL',
|
|
218
|
+
l: 2,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
i: 5,
|
|
222
|
+
f: 5,
|
|
223
|
+
t: 'WNP',
|
|
224
|
+
l: 3,
|
|
225
|
+
coidx: [1],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
i: 6,
|
|
229
|
+
f: 9,
|
|
230
|
+
t: 'IP-SUB',
|
|
231
|
+
l: 3,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
i: 8,
|
|
235
|
+
f: 9,
|
|
236
|
+
t: 'CP-me',
|
|
237
|
+
l: 4,
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
i: 9,
|
|
241
|
+
f: 9,
|
|
242
|
+
t: 'IP-SUB',
|
|
243
|
+
l: 5,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
i: 9,
|
|
247
|
+
f: 9,
|
|
248
|
+
t: 'NP',
|
|
249
|
+
l: 6,
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
i: 6,
|
|
253
|
+
f: 6,
|
|
254
|
+
t: 'NP-TRACE',
|
|
255
|
+
l: 4,
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
corpus: 'C12',
|
|
259
|
+
document: 'D388',
|
|
260
|
+
page: 'P7029',
|
|
261
|
+
};
|