@macrostrat/feedback-components 1.1.10 → 2.0.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.
- package/CHANGELOG.md +10 -0
- package/dist/extractions/index.cjs +201 -0
- package/dist/extractions/index.cjs.map +1 -0
- package/dist/extractions/index.d.ts +30 -0
- package/dist/extractions/index.js +198 -0
- package/dist/extractions/index.js.map +1 -0
- package/dist/extractions/main.module.sass.cjs +12 -0
- package/dist/extractions/main.module.sass.cjs.map +1 -0
- package/dist/extractions/main.module.sass.js +12 -0
- package/dist/extractions/main.module.sass.js.map +1 -0
- package/dist/extractions/types.d.ts +32 -0
- package/dist/feedback/edit-state.cjs +384 -0
- package/dist/feedback/edit-state.cjs.map +1 -0
- package/dist/feedback/edit-state.d.ts +127 -0
- package/dist/feedback/edit-state.js +382 -0
- package/dist/feedback/edit-state.js.map +1 -0
- package/dist/feedback/feedback.module.sass.cjs +47 -0
- package/dist/feedback/feedback.module.sass.cjs.map +1 -0
- package/dist/feedback/feedback.module.sass.js +47 -0
- package/dist/feedback/feedback.module.sass.js.map +1 -0
- package/dist/feedback/graph.cjs +126 -0
- package/dist/feedback/graph.cjs.map +1 -0
- package/dist/feedback/graph.d.ts +9 -0
- package/dist/feedback/graph.js +124 -0
- package/dist/feedback/graph.js.map +1 -0
- package/dist/feedback/index.cjs +350 -0
- package/dist/feedback/index.cjs.map +1 -0
- package/dist/feedback/index.d.ts +15 -0
- package/dist/feedback/index.js +348 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/feedback/matches.cjs +246 -0
- package/dist/feedback/matches.cjs.map +1 -0
- package/dist/feedback/matches.d.ts +17 -0
- package/dist/feedback/matches.js +244 -0
- package/dist/feedback/matches.js.map +1 -0
- package/dist/feedback/node.cjs +64 -0
- package/dist/feedback/node.cjs.map +1 -0
- package/dist/feedback/node.d.ts +5 -0
- package/dist/feedback/node.js +63 -0
- package/dist/feedback/node.js.map +1 -0
- package/dist/feedback/text-visualizer.cjs +290 -0
- package/dist/feedback/text-visualizer.cjs.map +1 -0
- package/dist/feedback/text-visualizer.d.ts +36 -0
- package/dist/feedback/text-visualizer.js +288 -0
- package/dist/feedback/text-visualizer.js.map +1 -0
- package/dist/feedback/type-selector/index.cjs +50 -0
- package/dist/feedback/type-selector/index.cjs.map +1 -0
- package/dist/feedback/type-selector/index.d.ts +20 -0
- package/dist/feedback/type-selector/index.js +47 -0
- package/dist/feedback/type-selector/index.js.map +1 -0
- package/dist/feedback/type-selector/main.module.sass.cjs +13 -0
- package/dist/feedback/type-selector/main.module.sass.cjs.map +1 -0
- package/dist/feedback/type-selector/main.module.sass.js +13 -0
- package/dist/feedback/type-selector/main.module.sass.js.map +1 -0
- package/dist/feedback/typelist.cjs +295 -0
- package/dist/feedback/typelist.cjs.map +1 -0
- package/dist/feedback/typelist.d.ts +8 -0
- package/dist/feedback/typelist.js +293 -0
- package/dist/feedback/typelist.js.map +1 -0
- package/dist/feedback/types.d.ts +64 -0
- package/dist/feedback-components.css +343 -0
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -41
- package/src/extractions/index.ts +2 -2
- package/src/feedback/text-visualizer.ts +0 -1
- package/src/feedback/types.ts +2 -2
- package/dist/esm/feedback-components.2364179b.js +0 -287
- package/dist/esm/feedback-components.2364179b.js.map +0 -1
- package/dist/esm/feedback-components.6d32ee91.js +0 -16
- package/dist/esm/feedback-components.6d32ee91.js.map +0 -1
- package/dist/esm/feedback-components.7dd42a9f.js +0 -248
- package/dist/esm/feedback-components.7dd42a9f.js.map +0 -1
- package/dist/esm/feedback-components.7f72e5e9.js +0 -64
- package/dist/esm/feedback-components.7f72e5e9.js.map +0 -1
- package/dist/esm/feedback-components.ad9f284e.js +0 -63
- package/dist/esm/feedback-components.ad9f284e.js.map +0 -1
- package/dist/esm/feedback-components.ba79c0ef.js +0 -204
- package/dist/esm/feedback-components.ba79c0ef.js.map +0 -1
- package/dist/esm/feedback-components.bf93773c.css +0 -17
- package/dist/esm/feedback-components.bf93773c.css.map +0 -1
- package/dist/esm/feedback-components.c6e2c296.js +0 -148
- package/dist/esm/feedback-components.c6e2c296.js.map +0 -1
- package/dist/esm/feedback-components.ca78c2d4.js +0 -287
- package/dist/esm/feedback-components.ca78c2d4.js.map +0 -1
- package/dist/esm/feedback-components.d769ffa5.css +0 -205
- package/dist/esm/feedback-components.d769ffa5.css.map +0 -1
- package/dist/esm/feedback-components.e273ed5b.css +0 -14
- package/dist/esm/feedback-components.e273ed5b.css.map +0 -1
- package/dist/esm/feedback-components.e702eece.js +0 -97
- package/dist/esm/feedback-components.e702eece.js.map +0 -1
- package/dist/esm/feedback-components.edc606bb.js +0 -360
- package/dist/esm/feedback-components.edc606bb.js.map +0 -1
- package/dist/esm/feedback-components.f9850d85.js +0 -19
- package/dist/esm/feedback-components.f9850d85.js.map +0 -1
- package/dist/esm/feedback-components.fa847634.js +0 -453
- package/dist/esm/feedback-components.fa847634.js.map +0 -1
- package/dist/esm/index.d.ts +0 -96
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -9
- package/dist/esm/index.js.map +0 -1
- package/dist/node/feedback-components.1bd49bf0.js +0 -2
- package/dist/node/feedback-components.1bd49bf0.js.map +0 -1
- package/dist/node/feedback-components.2f391fa4.js +0 -2
- package/dist/node/feedback-components.2f391fa4.js.map +0 -1
- package/dist/node/feedback-components.6a4a1290.js +0 -2
- package/dist/node/feedback-components.6a4a1290.js.map +0 -1
- package/dist/node/feedback-components.70780da4.js +0 -2
- package/dist/node/feedback-components.70780da4.js.map +0 -1
- package/dist/node/feedback-components.794f429b.js +0 -2
- package/dist/node/feedback-components.794f429b.js.map +0 -1
- package/dist/node/feedback-components.83c21466.css +0 -2
- package/dist/node/feedback-components.83c21466.css.map +0 -1
- package/dist/node/feedback-components.97518e90.css +0 -2
- package/dist/node/feedback-components.97518e90.css.map +0 -1
- package/dist/node/feedback-components.9eb1d41a.css +0 -2
- package/dist/node/feedback-components.9eb1d41a.css.map +0 -1
- package/dist/node/feedback-components.acac789b.js +0 -2
- package/dist/node/feedback-components.acac789b.js.map +0 -1
- package/dist/node/feedback-components.c84ff10e.js +0 -2
- package/dist/node/feedback-components.c84ff10e.js.map +0 -1
- package/dist/node/feedback-components.db72d0e1.js +0 -2
- package/dist/node/feedback-components.db72d0e1.js.map +0 -1
- package/dist/node/feedback-components.dc76072c.js +0 -2
- package/dist/node/feedback-components.dc76072c.js.map +0 -1
- package/dist/node/feedback-components.ddd11fe8.js +0 -2
- package/dist/node/feedback-components.ddd11fe8.js.map +0 -1
- package/dist/node/feedback-components.e59a061f.js +0 -2
- package/dist/node/feedback-components.e59a061f.js.map +0 -1
- package/dist/node/feedback-components.feab0bd0.js +0 -2
- package/dist/node/feedback-components.feab0bd0.js.map +0 -1
- package/dist/node/index.js +0 -2
- package/dist/node/index.js.map +0 -1
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
import "./feedback-components.d769ffa5.css";
|
|
2
|
-
import $aogpP$feedbackcomponentse702eecejs from "./feedback-components.e702eece.js";
|
|
3
|
-
import {buildHighlights as $03d8811e9c9b360d$export$c4b91360064ad200, getTagStyle as $03d8811e9c9b360d$export$35baa338324d8550} from "./feedback-components.ba79c0ef.js";
|
|
4
|
-
import {MatchTag as $a878a21b0c10bfdc$export$5eeb3456842e9e5f} from "./feedback-components.7dd42a9f.js";
|
|
5
|
-
import $aogpP$macrostrathyper from "@macrostrat/hyper";
|
|
6
|
-
import {useRef as $aogpP$useRef, useEffect as $aogpP$useEffect} from "react";
|
|
7
|
-
import {Popover as $aogpP$Popover} from "@blueprintjs/core";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function $parcel$interopDefault(a) {
|
|
11
|
-
return a && a.__esModule ? a.default : a;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const $156a3efbc315814c$var$h = (0, $aogpP$macrostrathyper).styled((0, ($parcel$interopDefault($aogpP$feedbackcomponentse702eecejs))));
|
|
20
|
-
function $156a3efbc315814c$var$buildTags(highlights, selectedNodes) {
|
|
21
|
-
let tags = [];
|
|
22
|
-
// If entity ID has already been seen, don't add it again
|
|
23
|
-
const entities = new Set();
|
|
24
|
-
for (const highlight of highlights){
|
|
25
|
-
// Don't add multiply-linked entities multiple times
|
|
26
|
-
if (entities.has(highlight.id)) continue;
|
|
27
|
-
const highlighted = $156a3efbc315814c$var$isHighlighted(highlight, selectedNodes);
|
|
28
|
-
const active = $156a3efbc315814c$var$isActive(highlight, selectedNodes);
|
|
29
|
-
const tagStyle = (0, $03d8811e9c9b360d$export$35baa338324d8550)(highlight.backgroundColor, {
|
|
30
|
-
highlighted: highlighted,
|
|
31
|
-
active: active
|
|
32
|
-
});
|
|
33
|
-
const tag = {
|
|
34
|
-
color: tagStyle.color,
|
|
35
|
-
tagStyle: {
|
|
36
|
-
display: "none"
|
|
37
|
-
},
|
|
38
|
-
markStyle: {
|
|
39
|
-
backgroundColor: tagStyle.backgroundColor
|
|
40
|
-
},
|
|
41
|
-
...highlight,
|
|
42
|
-
backgroundColor: tagStyle.backgroundColor
|
|
43
|
-
};
|
|
44
|
-
tags.push(tag);
|
|
45
|
-
entities.add(highlight.id);
|
|
46
|
-
}
|
|
47
|
-
return tags;
|
|
48
|
-
}
|
|
49
|
-
function $156a3efbc315814c$var$isActive(tag, selectedNodes) {
|
|
50
|
-
return selectedNodes.includes(tag.id);
|
|
51
|
-
}
|
|
52
|
-
function $156a3efbc315814c$var$isHighlighted(tag, selectedNodes) {
|
|
53
|
-
if (selectedNodes.length === 0) return true;
|
|
54
|
-
return (selectedNodes.includes(tag.id) || tag.parents?.some((d)=>selectedNodes.includes(d))) ?? false;
|
|
55
|
-
}
|
|
56
|
-
function $156a3efbc315814c$export$6e107db9091b8219(props) {
|
|
57
|
-
// Convert input to tags
|
|
58
|
-
const { text: text, selectedNodes: selectedNodes, nodes: nodes, dispatch: dispatch, allowOverlap: allowOverlap, matchLinks: matchLinks, viewOnly: viewOnly } = props;
|
|
59
|
-
const allTags = $156a3efbc315814c$var$buildTags((0, $03d8811e9c9b360d$export$c4b91360064ad200)(nodes, null), selectedNodes);
|
|
60
|
-
return $156a3efbc315814c$var$h("div.feedback-text-wrapper", {
|
|
61
|
-
tabIndex: 0,
|
|
62
|
-
onKeyDown: (e)=>{
|
|
63
|
-
if (e.key === "Backspace") dispatch({
|
|
64
|
-
type: "delete-node",
|
|
65
|
-
payload: {
|
|
66
|
-
ids: selectedNodes
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}, $156a3efbc315814c$var$h($156a3efbc315814c$export$190465bec6b893be, {
|
|
71
|
-
text: text,
|
|
72
|
-
allTags: allTags,
|
|
73
|
-
allowOverlap: allowOverlap,
|
|
74
|
-
dispatch: dispatch,
|
|
75
|
-
selectedNodes: selectedNodes,
|
|
76
|
-
viewOnly: viewOnly,
|
|
77
|
-
matchLinks: matchLinks
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
function $156a3efbc315814c$var$createTagFromSelection({ container: container }) {
|
|
81
|
-
const selection = window.getSelection();
|
|
82
|
-
if (!selection || selection.isCollapsed || selection.rangeCount === 0 || !container) return null;
|
|
83
|
-
const range = selection.getRangeAt(0);
|
|
84
|
-
if (!container.contains(range.startContainer) || !container.contains(range.endContainer)) return null;
|
|
85
|
-
const preRange = document.createRange();
|
|
86
|
-
preRange.setStart(container, 0);
|
|
87
|
-
preRange.setEnd(range.startContainer, range.startOffset);
|
|
88
|
-
const start = preRange.toString().length;
|
|
89
|
-
const selectedText = range.toString();
|
|
90
|
-
const end = start + selectedText.length;
|
|
91
|
-
return {
|
|
92
|
-
start: start,
|
|
93
|
-
end: end,
|
|
94
|
-
text: selectedText
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
function $156a3efbc315814c$var$addTag({ tag: tag, dispatch: dispatch, text: text, allTags: allTags, allowOverlap: allowOverlap }) {
|
|
98
|
-
let { start: start, end: end } = tag;
|
|
99
|
-
// snap to text
|
|
100
|
-
if (text[end - 1] != " ") {
|
|
101
|
-
// double clicking word overselects by one, shouldn't increase to next word
|
|
102
|
-
while(start > 0 && /\w/.test(text[start - 1]))start--;
|
|
103
|
-
while(end < text.length && /\w/.test(text[end]))end++;
|
|
104
|
-
}
|
|
105
|
-
let payload = {
|
|
106
|
-
start: start,
|
|
107
|
-
end: end,
|
|
108
|
-
text: text.slice(start, end)
|
|
109
|
-
};
|
|
110
|
-
if (payload.text.trim() === "") {
|
|
111
|
-
console.log("Blank tag found, ignoring");
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const duplicate = allTags.find((t)=>t.start === payload.start && (t.end === payload.end || t.end === payload.end - 1));
|
|
115
|
-
if (duplicate) {
|
|
116
|
-
console.log("Duplicate tag found, ignoring");
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
if (payload.text.endsWith(" ")) {
|
|
120
|
-
payload.text = payload.text.slice(0, -1);
|
|
121
|
-
payload.end -= 1;
|
|
122
|
-
}
|
|
123
|
-
const inside = allTags.some((t)=>t.start <= payload.start && t.end >= payload.end);
|
|
124
|
-
const overlap = allTags.some((t)=>t.start < payload.end && t.end > payload.start);
|
|
125
|
-
if ((inside || overlap) && !allowOverlap) {
|
|
126
|
-
console.log("Tag is inside another tag, ignoring");
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
dispatch({
|
|
130
|
-
type: "create-node",
|
|
131
|
-
payload: payload
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function $156a3efbc315814c$var$nestHighlights(text, tags) {
|
|
135
|
-
const events = [];
|
|
136
|
-
for (const tag of tags){
|
|
137
|
-
events.push({
|
|
138
|
-
pos: tag.start,
|
|
139
|
-
type: "start",
|
|
140
|
-
tag: tag
|
|
141
|
-
});
|
|
142
|
-
events.push({
|
|
143
|
-
pos: tag.end,
|
|
144
|
-
type: "end",
|
|
145
|
-
tag: tag
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
events.sort((a, b)=>{
|
|
149
|
-
if (a.pos !== b.pos) return a.pos - b.pos;
|
|
150
|
-
if (a.type === "end" && b.type === "start") return -1;
|
|
151
|
-
if (a.type === "start" && b.type === "end") return 1;
|
|
152
|
-
return 0;
|
|
153
|
-
});
|
|
154
|
-
const root = {
|
|
155
|
-
children: [],
|
|
156
|
-
textStart: 0
|
|
157
|
-
};
|
|
158
|
-
const stack = [
|
|
159
|
-
root
|
|
160
|
-
];
|
|
161
|
-
let lastPos = 0;
|
|
162
|
-
for (const { pos: pos, type: type, tag: tag } of events){
|
|
163
|
-
const parent = stack[stack.length - 1];
|
|
164
|
-
if (pos > lastPos) {
|
|
165
|
-
const slice = text.slice(lastPos, pos);
|
|
166
|
-
parent.children.push(slice);
|
|
167
|
-
}
|
|
168
|
-
if (type === "start") {
|
|
169
|
-
const newNode = {
|
|
170
|
-
tag: tag,
|
|
171
|
-
children: [],
|
|
172
|
-
textStart: pos
|
|
173
|
-
};
|
|
174
|
-
parent.children.push(newNode);
|
|
175
|
-
stack.push(newNode);
|
|
176
|
-
} else stack.pop();
|
|
177
|
-
lastPos = pos;
|
|
178
|
-
}
|
|
179
|
-
if (lastPos < text.length) stack[stack.length - 1].children.push(text.slice(lastPos));
|
|
180
|
-
return root;
|
|
181
|
-
}
|
|
182
|
-
function $156a3efbc315814c$var$renderNode(node, dispatch, selectedNodes, parentSelected, matchLinks, viewOnly) {
|
|
183
|
-
if (typeof node === "string") return node;
|
|
184
|
-
const { tag: tag, children: children } = node;
|
|
185
|
-
const isSelected = selectedNodes?.includes(tag.id);
|
|
186
|
-
const showBorder = selectedNodes.length === 0 || isSelected;
|
|
187
|
-
const match = tag.match;
|
|
188
|
-
const style = {
|
|
189
|
-
...tag,
|
|
190
|
-
zIndex: parentSelected ? -1 : 1,
|
|
191
|
-
border: "1px solid " + (match != undefined && matchLinks ? "orange" : showBorder ? tag.color : "transparent"),
|
|
192
|
-
margin: "-1px"
|
|
193
|
-
};
|
|
194
|
-
let moveText = [];
|
|
195
|
-
if (isSelected) {
|
|
196
|
-
for(const key in children)if (Object.prototype.hasOwnProperty.call(children, key)) {
|
|
197
|
-
const child = children[key];
|
|
198
|
-
if (child?.tag) moveText.push(child.children[0]);
|
|
199
|
-
else moveText.push(child);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const tagComponent = $156a3efbc315814c$var$h("span", {
|
|
203
|
-
onMouseEnter: (e)=>{
|
|
204
|
-
e.stopPropagation();
|
|
205
|
-
},
|
|
206
|
-
className: "highlight" + (!viewOnly || match ? " clickable" : ""),
|
|
207
|
-
style: style,
|
|
208
|
-
onClick: (e)=>{
|
|
209
|
-
e.stopPropagation();
|
|
210
|
-
if (e.ctrlKey || e.metaKey || selectedNodes[0] === tag.id && selectedNodes.length === 1) {
|
|
211
|
-
// Toggle selection on ctrl/cmd click or when node is only selected node
|
|
212
|
-
e.stopPropagation();
|
|
213
|
-
dispatch({
|
|
214
|
-
type: "toggle-node-selected",
|
|
215
|
-
payload: {
|
|
216
|
-
ids: [
|
|
217
|
-
tag.id
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
} else if (e.shiftKey && selectedNodes.length > 0) {
|
|
222
|
-
// Select range from last selected node to this one
|
|
223
|
-
const lastSelected = selectedNodes[selectedNodes.length - 1];
|
|
224
|
-
dispatch({
|
|
225
|
-
type: "select-range",
|
|
226
|
-
payload: {
|
|
227
|
-
ids: [
|
|
228
|
-
lastSelected,
|
|
229
|
-
tag.id
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
} else dispatch({
|
|
234
|
-
type: "select-node",
|
|
235
|
-
payload: {
|
|
236
|
-
ids: [
|
|
237
|
-
tag.id
|
|
238
|
-
]
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
}, isSelected ? moveText.flat() : children.map((child, i)=>$156a3efbc315814c$var$renderNode(child, dispatch, selectedNodes, isSelected, matchLinks, viewOnly)));
|
|
243
|
-
if (viewOnly && match) return $156a3efbc315814c$var$h((0, $aogpP$Popover), {
|
|
244
|
-
content: $156a3efbc315814c$var$h("div.match-link", $156a3efbc315814c$var$h((0, $a878a21b0c10bfdc$export$5eeb3456842e9e5f), {
|
|
245
|
-
data: match,
|
|
246
|
-
matchLinks: matchLinks
|
|
247
|
-
})),
|
|
248
|
-
interactionKind: "hover"
|
|
249
|
-
}, tagComponent);
|
|
250
|
-
return tagComponent;
|
|
251
|
-
}
|
|
252
|
-
function $156a3efbc315814c$export$190465bec6b893be(props) {
|
|
253
|
-
const { text: text, allTags: allTags = [], dispatch: dispatch, selectedNodes: selectedNodes, allowOverlap: allowOverlap, matchLinks: matchLinks, viewOnly: viewOnly } = props;
|
|
254
|
-
const tree = $156a3efbc315814c$var$nestHighlights(text, allTags);
|
|
255
|
-
const spanRef = (0, $aogpP$useRef)(null);
|
|
256
|
-
(0, $aogpP$useEffect)(()=>{
|
|
257
|
-
const handleMouseUp = ()=>{
|
|
258
|
-
const tag = $156a3efbc315814c$var$createTagFromSelection({
|
|
259
|
-
container: spanRef.current
|
|
260
|
-
});
|
|
261
|
-
if (!tag) return;
|
|
262
|
-
$156a3efbc315814c$var$addTag({
|
|
263
|
-
tag: tag,
|
|
264
|
-
dispatch: dispatch,
|
|
265
|
-
text: text,
|
|
266
|
-
allTags: allTags,
|
|
267
|
-
allowOverlap: allowOverlap
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
271
|
-
return ()=>{
|
|
272
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
273
|
-
};
|
|
274
|
-
}, [
|
|
275
|
-
text,
|
|
276
|
-
allTags,
|
|
277
|
-
dispatch,
|
|
278
|
-
allowOverlap
|
|
279
|
-
]);
|
|
280
|
-
return $156a3efbc315814c$var$h("span", {
|
|
281
|
-
ref: spanRef
|
|
282
|
-
}, tree.children.map((child, i)=>$156a3efbc315814c$var$renderNode(child, dispatch, selectedNodes, false, matchLinks, viewOnly)));
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
export {$156a3efbc315814c$export$6e107db9091b8219 as FeedbackText, $156a3efbc315814c$export$190465bec6b893be as HighlightedText};
|
|
287
|
-
//# sourceMappingURL=feedback-components.ca78c2d4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;AAYA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,8EAAK;AAkB5B,SAAS,gCACP,UAAuB,EACvB,aAAuB;IAEvB,IAAI,OAA2B,EAAE;IACjC,yDAAyD;IACzD,MAAM,WAAW,IAAI;IAErB,KAAK,MAAM,aAAa,WAAY;QAClC,oDAAoD;QACpD,IAAI,SAAS,GAAG,CAAC,UAAU,EAAE,GAAG;QAEhC,MAAM,cAAc,oCAAc,WAAW;QAC7C,MAAM,SAAS,+BAAS,WAAW;QACnC,MAAM,WAAW,CAAA,GAAA,yCAAU,EAAE,UAAU,eAAe,EAAE;yBACtD;oBACA;QACF;QAEA,MAAM,MAAM;YACV,OAAO,SAAS,KAAK;YACrB,UAAU;gBACR,SAAS;YACX;YACA,WAAW;gBACT,iBAAiB,SAAS,eAAe;YAC3C;YACA,GAAG,SAAS;YACZ,iBAAiB,SAAS,eAAe;QAC3C;QAEA,KAAK,IAAI,CAAC;QAEV,SAAS,GAAG,CAAC,UAAU,EAAE;IAC3B;IAEA,OAAO;AACT;AAEA,SAAS,+BAAS,GAAc,EAAE,aAAuB;IACvD,OAAO,cAAc,QAAQ,CAAC,IAAI,EAAE;AACtC;AAEA,SAAS,oCAAc,GAAc,EAAE,aAAuB;IAC5D,IAAI,cAAc,MAAM,KAAK,GAAG,OAAO;IACvC,OACE,A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AAE;yBAAC;oBAAC;gBACzC;YACF,OACE,SAAS;gBACP,MAAM;gBACN,SAAS;oBAAE,KAAK;wBAAC,IAAI,EAAE;qBAAC;gBAAC;YAC3B;QAEJ;IACF,GACA,aACI,SAAS,IAAI,KACb,SAAS,GAAG,CAAC,CAAC,OAAY,IACxB,iCACE,OACA,UACA,eACA,YACA,YACA;IAKV,IAAI,YAAY,OACd,OAAO,wBACL,CAAA,GAAA,cAAM,GACN;QACE,SAAS,wBAAE,kBAAkB,wBAAE,CAAA,GAAA,yCAAO,GAAG;YAAE,MAAM;wBAAO;QAAW;QACnE,iBAAiB;IACnB,GACA;IAIJ,OAAO;AACT;AAEO,SAAS,0CAAgB,KAa/B;IACC,MAAM,QACJ,IAAI,WACJ,UAAU,EAAE,YACZ,QAAQ,iBACR,aAAa,gBACb,YAAY,cACZ,UAAU,YACV,QAAQ,EACT,GAAG;IAEJ,MAAM,OAAO,qCAAe,MAAM;IAElC,MAAM,UAAU,CAAA,GAAA,aAAK,EAAmB;IAExC,CAAA,GAAA,gBAAQ,EAAE;QACR,MAAM,gBAAgB;YACpB,MAAM,MAAM,6CAAuB;gBAAE,WAAW,QAAQ,OAAO;YAAC;YAChE,IAAI,CAAC,KAAK;YACV,6BAAO;qBAAE;0BAAK;sBAAU;yBAAM;8BAAS;YAAa;QACtD;QAEA,SAAS,gBAAgB,CAAC,WAAW;QACrC,OAAO;YACL,SAAS,mBAAmB,CAAC,WAAW;QAC1C;IACF,GAAG;QAAC;QAAM;QAAS;QAAU;KAAa;IAE1C,OAAO,wBACL,QACA;QAAE,KAAK;IAAQ,GACf,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAY,IAC7B,iCAAW,OAAO,UAAU,eAAe,OAAO,YAAY;AAGpE","sources":["packages/feedback-components/src/feedback/text-visualizer.ts"],"sourcesContent":["import { AnnotateBlendTag } from \"react-text-annotate-blend\";\nimport { InternalEntity } from \"./types\";\nimport { TreeDispatch } from \"./edit-state\";\nimport styles from \"./feedback.module.sass\";\nimport hyper from \"@macrostrat/hyper\";\nimport { buildHighlights, getTagStyle } from \"../extractions\";\nimport { Highlight } from \"../extractions/types\";\nimport { useEffect, useRef } from \"react\";\nimport { Popover } from \"@blueprintjs/core\";\nimport { MatchTag } from \"./matches\";\nimport { data } from \"packages/feedback-components/stories/test-data\";\n\nconst h = hyper.styled(styles);\n\nexport interface FeedbackTextProps {\n text: string;\n selectedNodes: number[];\n nodes: InternalEntity[];\n updateNodes: (nodes: string[]) => void;\n dispatch: TreeDispatch;\n lineHeight: string;\n allowOverlap?: boolean;\n matchLinks?: {\n lithology: string;\n strat_name: string;\n lith_att: string;\n };\n viewOnly?: boolean;\n}\n\nfunction buildTags(\n highlights: Highlight[],\n selectedNodes: number[],\n): AnnotateBlendTag[] {\n let tags: AnnotateBlendTag[] = [];\n // If entity ID has already been seen, don't add it again\n const entities = new Set<number>();\n\n for (const highlight of highlights) {\n // Don't add multiply-linked entities multiple times\n if (entities.has(highlight.id)) continue;\n\n const highlighted = isHighlighted(highlight, selectedNodes);\n const active = isActive(highlight, selectedNodes);\n const tagStyle = getTagStyle(highlight.backgroundColor, {\n highlighted,\n active,\n });\n\n const tag = {\n color: tagStyle.color,\n tagStyle: {\n display: \"none\",\n },\n markStyle: {\n backgroundColor: tagStyle.backgroundColor,\n },\n ...highlight,\n backgroundColor: tagStyle.backgroundColor,\n };\n\n tags.push(tag);\n\n entities.add(highlight.id);\n }\n\n return tags;\n}\n\nfunction isActive(tag: Highlight, selectedNodes: number[]) {\n return selectedNodes.includes(tag.id);\n}\n\nfunction isHighlighted(tag: Highlight, selectedNodes: number[]) {\n if (selectedNodes.length === 0) return true;\n return (\n (selectedNodes.includes(tag.id) ||\n tag.parents?.some((d) => selectedNodes.includes(d))) ??\n false\n );\n}\n\nexport function FeedbackText(props: FeedbackTextProps) {\n // Convert input to tags\n const {\n text,\n selectedNodes,\n nodes,\n dispatch,\n allowOverlap,\n matchLinks,\n viewOnly,\n } = props;\n const allTags: AnnotateBlendTag[] = buildTags(\n buildHighlights(nodes, null),\n selectedNodes,\n );\n\n return h(\n \"div.feedback-text-wrapper\",\n {\n tabIndex: 0,\n onKeyDown: (e) => {\n if (e.key === \"Backspace\") {\n dispatch({\n type: \"delete-node\",\n payload: { ids: selectedNodes },\n });\n }\n },\n },\n h(HighlightedText, {\n text,\n allTags,\n allowOverlap,\n dispatch,\n selectedNodes,\n viewOnly,\n matchLinks,\n }),\n );\n}\n\nfunction createTagFromSelection({\n container,\n}: {\n container: HTMLElement | null;\n}) {\n const selection = window.getSelection();\n if (\n !selection ||\n selection.isCollapsed ||\n selection.rangeCount === 0 ||\n !container\n )\n return null;\n\n const range = selection.getRangeAt(0);\n\n if (\n !container.contains(range.startContainer) ||\n !container.contains(range.endContainer)\n ) {\n return null;\n }\n\n const preRange = document.createRange();\n preRange.setStart(container, 0);\n preRange.setEnd(range.startContainer, range.startOffset);\n const start = preRange.toString().length;\n\n const selectedText = range.toString();\n const end = start + selectedText.length;\n\n return {\n start,\n end,\n text: selectedText,\n };\n}\n\nfunction addTag({ tag, dispatch, text, allTags, allowOverlap }) {\n let { start, end } = tag;\n // snap to text\n if (text[end - 1] != \" \") {\n // double clicking word overselects by one, shouldn't increase to next word\n while (start > 0 && /\\w/.test(text[start - 1])) {\n start--;\n }\n while (end < text.length && /\\w/.test(text[end])) {\n end++;\n }\n }\n\n let payload = { start, end, text: text.slice(start, end) };\n\n if (payload.text.trim() === \"\") {\n console.log(\"Blank tag found, ignoring\");\n return;\n }\n\n const duplicate = allTags.find(\n (t) =>\n t.start === payload.start &&\n (t.end === payload.end || t.end === payload.end - 1),\n );\n\n if (duplicate) {\n console.log(\"Duplicate tag found, ignoring\");\n return;\n }\n\n if (payload.text.endsWith(\" \")) {\n payload.text = payload.text.slice(0, -1);\n payload.end -= 1;\n }\n\n const inside = allTags.some(\n (t) => t.start <= payload.start && t.end >= payload.end,\n );\n\n const overlap = allTags.some(\n (t) => t.start < payload.end && t.end > payload.start,\n );\n\n if ((inside || overlap) && !allowOverlap) {\n console.log(\"Tag is inside another tag, ignoring\");\n return;\n }\n\n dispatch({ type: \"create-node\", payload });\n}\n\nfunction nestHighlights(text: string, tags: AnnotateBlendTag[]) {\n const events: Array<{\n pos: number;\n type: \"start\" | \"end\";\n tag: AnnotateBlendTag;\n }> = [];\n\n for (const tag of tags) {\n events.push({ pos: tag.start, type: \"start\", tag });\n events.push({ pos: tag.end, type: \"end\", tag });\n }\n\n events.sort((a, b) => {\n if (a.pos !== b.pos) return a.pos - b.pos;\n if (a.type === \"end\" && b.type === \"start\") return -1;\n if (a.type === \"start\" && b.type === \"end\") return 1;\n return 0;\n });\n\n const root = { children: [], textStart: 0 };\n const stack = [root];\n let lastPos = 0;\n\n for (const { pos, type, tag } of events) {\n const parent = stack[stack.length - 1];\n\n if (pos > lastPos) {\n const slice = text.slice(lastPos, pos);\n parent.children.push(slice);\n }\n\n if (type === \"start\") {\n const newNode = { tag, children: [], textStart: pos };\n parent.children.push(newNode);\n stack.push(newNode);\n } else {\n stack.pop();\n }\n\n lastPos = pos;\n }\n\n if (lastPos < text.length) {\n stack[stack.length - 1].children.push(text.slice(lastPos));\n }\n\n return root;\n}\n\nfunction renderNode(\n node: any,\n dispatch: TreeDispatch,\n selectedNodes: number[],\n parentSelected: boolean,\n matchLinks?: {\n lithology: string;\n strat_name: string;\n lith_att: string;\n },\n viewOnly?: boolean,\n): any {\n if (typeof node === \"string\") return node;\n\n const { tag, children } = node;\n const isSelected = selectedNodes?.includes(tag.id);\n const showBorder = selectedNodes.length === 0 || isSelected;\n const match = tag.match;\n\n const style = {\n ...tag,\n zIndex: parentSelected ? -1 : 1,\n border:\n \"1px solid \" +\n (match != undefined && matchLinks\n ? \"orange\"\n : showBorder\n ? tag.color\n : \"transparent\"),\n margin: \"-1px\",\n };\n\n let moveText = [];\n if (isSelected) {\n for (const key in children) {\n if (Object.prototype.hasOwnProperty.call(children, key)) {\n const child = children[key];\n if (child?.tag) {\n moveText.push(child.children[0]);\n } else {\n moveText.push(child);\n }\n }\n }\n }\n\n const tagComponent = h(\n \"span\",\n {\n onMouseEnter: (e: MouseEvent) => {\n e.stopPropagation();\n },\n className: \"highlight\" + (!viewOnly || match ? \" clickable\" : \"\"),\n style,\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n if (\n e.ctrlKey ||\n e.metaKey ||\n (selectedNodes[0] === tag.id && selectedNodes.length === 1)\n ) {\n // Toggle selection on ctrl/cmd click or when node is only selected node\n e.stopPropagation();\n dispatch({\n type: \"toggle-node-selected\",\n payload: { ids: [tag.id] },\n });\n } else if (e.shiftKey && selectedNodes.length > 0) {\n // Select range from last selected node to this one\n const lastSelected = selectedNodes[selectedNodes.length - 1];\n\n dispatch({\n type: \"select-range\",\n payload: { ids: [lastSelected, tag.id] },\n });\n } else {\n dispatch({\n type: \"select-node\",\n payload: { ids: [tag.id] },\n });\n }\n },\n },\n isSelected\n ? moveText.flat()\n : children.map((child: any, i: number) =>\n renderNode(\n child,\n dispatch,\n selectedNodes,\n isSelected,\n matchLinks,\n viewOnly,\n ),\n ),\n );\n\n if (viewOnly && match) {\n return h(\n Popover,\n {\n content: h(\"div.match-link\", h(MatchTag, { data: match, matchLinks })),\n interactionKind: \"hover\",\n },\n tagComponent,\n );\n }\n\n return tagComponent;\n}\n\nexport function HighlightedText(props: {\n text: string;\n allTags: AnnotateBlendTag[];\n lineHeight: string;\n allowOverlap?: boolean;\n dispatch: TreeDispatch;\n selectedNodes: number[];\n matchLinks?: {\n lithology: string;\n strat_name: string;\n lith_att: string;\n };\n viewOnly?: boolean;\n}) {\n const {\n text,\n allTags = [],\n dispatch,\n selectedNodes,\n allowOverlap,\n matchLinks,\n viewOnly,\n } = props;\n\n const tree = nestHighlights(text, allTags);\n\n const spanRef = useRef<HTMLSpanElement>(null);\n\n useEffect(() => {\n const handleMouseUp = () => {\n const tag = createTagFromSelection({ container: spanRef.current });\n if (!tag) return;\n addTag({ tag, dispatch, text, allTags, allowOverlap });\n };\n\n document.addEventListener(\"mouseup\", handleMouseUp);\n return () => {\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [text, allTags, dispatch, allowOverlap]);\n\n return h(\n \"span\",\n { ref: spanRef },\n tree.children.map((child: any, i: number) =>\n renderNode(child, dispatch, selectedNodes, false, matchLinks, viewOnly),\n ),\n );\n}\n"],"names":[],"version":3,"file":"feedback-components.ca78c2d4.js.map"}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--text-line-height: 3em;
|
|
3
|
-
--main-extra-width: 200px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.QoX8-W_page-wrapper {
|
|
7
|
-
flex-direction: row;
|
|
8
|
-
align-items: flex-start;
|
|
9
|
-
gap: 2em;
|
|
10
|
-
display: flex;
|
|
11
|
-
position: relative;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.QoX8-W_feedback-container {
|
|
15
|
-
flex: 4;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.QoX8-W_control-panel {
|
|
19
|
-
flex: 1;
|
|
20
|
-
height: auto;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.QoX8-W_control-content {
|
|
24
|
-
position: sticky;
|
|
25
|
-
top: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.QoX8-W_feedback-component {
|
|
29
|
-
width: 800px;
|
|
30
|
-
position: relative;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.QoX8-W_feedback-component > svg {
|
|
34
|
-
width: 800px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
circle {
|
|
38
|
-
border: 1px solid #000;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.QoX8-W_selected {
|
|
42
|
-
border: 1px solid #fff;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.QoX8-W_feedback-text {
|
|
46
|
-
margin-bottom: 2em;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.QoX8-W_entity-panel {
|
|
50
|
-
background: var(--panel-secondary-background-color);
|
|
51
|
-
width: calc(100% - 2em);
|
|
52
|
-
min-height: 100px;
|
|
53
|
-
max-height: 600px;
|
|
54
|
-
box-shadow: 0 0 0 1px var(--panel-border-color) inset;
|
|
55
|
-
border-radius: 4px;
|
|
56
|
-
flex: 1;
|
|
57
|
-
padding: 1em;
|
|
58
|
-
position: relative;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.QoX8-W_selection-tree {
|
|
62
|
-
margin: -1em 0;
|
|
63
|
-
padding: 1em 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.QoX8-W_type-list {
|
|
67
|
-
grid-template-rows: repeat(10, auto);
|
|
68
|
-
grid-auto-flow: column;
|
|
69
|
-
gap: .2em;
|
|
70
|
-
display: grid;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.QoX8-W_type-list .QoX8-W_type-tag {
|
|
74
|
-
border-radius: .2em;
|
|
75
|
-
padding: .2em .5em;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.QoX8-W_description {
|
|
79
|
-
max-width: 300px;
|
|
80
|
-
padding: .5em;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
mark {
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
border-radius: .2em;
|
|
86
|
-
color: #000 !important;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
[role="treeitem"] {
|
|
90
|
-
width: auto !important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.QoX8-W_highlight {
|
|
94
|
-
zIndex: 10;
|
|
95
|
-
border-radius: .2em;
|
|
96
|
-
padding: .2em 0;
|
|
97
|
-
position: relative;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.QoX8-W_clickable {
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.QoX8-W_feedback-text-wrapper {
|
|
105
|
-
z-index: 0;
|
|
106
|
-
line-height: var(--text-line-height);
|
|
107
|
-
position: relative;
|
|
108
|
-
overflow: visible;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.QoX8-W_type-container {
|
|
112
|
-
justify-content: space-between;
|
|
113
|
-
align-items: center;
|
|
114
|
-
column-gap: 1em;
|
|
115
|
-
display: flex;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.QoX8-W_add-type {
|
|
119
|
-
cursor: pointer;
|
|
120
|
-
justify-content: space-between;
|
|
121
|
-
align-items: center;
|
|
122
|
-
padding: 0 .5em;
|
|
123
|
-
display: flex;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.QoX8-W_add-type p {
|
|
127
|
-
margin: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.QoX8-W_overlay-container {
|
|
131
|
-
justify-content: center;
|
|
132
|
-
align-items: center;
|
|
133
|
-
width: 100vw;
|
|
134
|
-
height: 80vh;
|
|
135
|
-
display: flex;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.QoX8-W_overlay-container .QoX8-W_add-type-overlay {
|
|
139
|
-
background-color: var(--tertiary-background);
|
|
140
|
-
border-radius: .2em;
|
|
141
|
-
flex-direction: column;
|
|
142
|
-
gap: 1em;
|
|
143
|
-
padding: .5em 1em;
|
|
144
|
-
display: flex;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.QoX8-W_overlay-container .QoX8-W_add-type-overlay .QoX8-W_title {
|
|
148
|
-
justify-content: space-between;
|
|
149
|
-
align-items: center;
|
|
150
|
-
display: flex;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.QoX8-W_overlay-container .QoX8-W_add-type-overlay h2 {
|
|
154
|
-
margin: 0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.QoX8-W_overlay-container .QoX8-W_add-type-overlay .QoX8-W_form-group {
|
|
158
|
-
gap: 3em;
|
|
159
|
-
display: flex;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.QoX8-W_overlay-container .QoX8-W_add-type-overlay .QoX8-W_form-group .QoX8-W_text-inputs {
|
|
163
|
-
flex-direction: column;
|
|
164
|
-
gap: 1em;
|
|
165
|
-
display: flex;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.QoX8-W_icons {
|
|
169
|
-
gap: .25em;
|
|
170
|
-
display: flex;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.QoX8-W_node-label {
|
|
174
|
-
fill: var(--text-emphasized-color);
|
|
175
|
-
fontSize: 10px;
|
|
176
|
-
pointerEvents: none;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.QoX8-W_match-item {
|
|
180
|
-
color: var(--text-emphasized-color);
|
|
181
|
-
cursor: pointer;
|
|
182
|
-
border-radius: .2em;
|
|
183
|
-
margin-bottom: 4px;
|
|
184
|
-
padding: .1em .2em;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.QoX8-W_match-item .QoX8-W_match-label {
|
|
188
|
-
color: var(--text-color);
|
|
189
|
-
margin: 0;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.QoX8-W_match-container {
|
|
193
|
-
justify-content: space-between;
|
|
194
|
-
align-items: center;
|
|
195
|
-
display: flex;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.QoX8-W_match-container .QoX8-W_close-btn {
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.QoX8-W_match-link {
|
|
203
|
-
padding: .5em;
|
|
204
|
-
}
|
|
205
|
-
/*# sourceMappingURL=feedback-components.d769ffa5.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA;;;;;AAIA;;;;;;;;AAOA;;;;AAGA;;;;;AAIA;;;;;AAIA;;;;;AAIE;;;;AAGF;;;;AAGA;;;;AAGA;;;;AAGA;;;;;;;;;;;;AAYA;;;;;AAIA;;;;;;;AAME;;;;;AAIF;;;;;AAIA;;;;;;AAKA;;;;AAGA;;;;;;;AAMA;;;;AAGA;;;;;;;AAMA;;;;;;;AAMA;;;;;;;;AAOE;;;;AAGF;;;;;;;;AAOE;;;;;;;;;AAQE;;;;;;AAKA;;;;AAGA;;;;;AAIE;;;;;;AAKN;;;;;AAIA;;;;;;AAKA;;;;;;;;AAOE;;;;;AAIF;;;;;;AAKE;;;;AAGF","sources":["packages/feedback-components/src/feedback/feedback.module.sass"],"sourcesContent":[":root\n --text-line-height: 3em\n --main-extra-width: 200px\n\n.page-wrapper\n display: flex\n flex-direction: row\n position: relative\n gap: 2em\n align-items: flex-start // makes control-content lose stick\n\n.feedback-container\n flex: 4\n\n.control-panel\n flex: 1\n height: auto\n\n.control-content\n position: sticky\n top: 0\n\n.feedback-component\n position: relative\n width: 800px\n\n & > svg\n width: 800px\n\ncircle\n border: 1px solid black\n\n.selected\n border: 1px solid white\n \n.feedback-text\n margin-bottom: 2em\n\n.entity-panel\n position: relative\n max-height: 600px\n width: calc(100% - 2em)\n flex: 1\n min-height: 100px\n padding: 1em\n background: var(--panel-secondary-background-color)\n border-radius: 4px\n // Inset box shadow\n box-shadow: 0 0 0 1px var(--panel-border-color) inset\n\n.selection-tree\n margin: -1em 0\n padding: 1em 0\n \n.type-list\n display: grid\n grid-auto-flow: column\n grid-template-rows: repeat(10, auto)\n gap: 0.2em\n\n .type-tag\n padding: .2em .5em\n border-radius: .2em\n\n.description\n max-width: 300px\n padding: .5em\n\nmark\n border-radius: .2em\n cursor: pointer\n color: black !important\n\n[role=\"treeitem\"]\n width: auto !important\n\n.highlight\n padding: .2em 0\n border-radius: .2em\n position: relative\n zIndex: 10\n\n.clickable\n cursor: pointer\n\n.feedback-text-wrapper \n position: relative\n z-index: 0\n overflow: visible\n line-height: var(--text-line-height)\n\n.type-container\n display: flex\n justify-content: space-between\n align-items: center\n column-gap: 1em\n\n.add-type\n cursor: pointer\n display: flex\n justify-content: space-between\n padding: 0 .5em\n align-items: center\n\n p\n margin: 0\n\n.overlay-container\n height: 80vh\n width: 100vw\n display: flex\n justify-content: center\n align-items: center\n\n .add-type-overlay\n background-color: var(--tertiary-background)\n padding: .5em 1em\n display: flex\n flex-direction: column\n gap: 1em\n border-radius: .2em\n\n .title\n display: flex\n justify-content: space-between\n align-items: center\n\n h2\n margin: 0\n\n .form-group\n display: flex\n gap: 3em\n\n .text-inputs\n display: flex\n flex-direction: column\n gap: 1em\n\n.icons\n display: flex\n gap: .25em\n\n.node-label\n fill: var(--text-emphasized-color)\n fontSize: 10px\n pointerEvents: none\n\n.match-item\n color: var(--text-emphasized-color)\n padding: .1em .2em\n border-radius: .2em\n margin-bottom: 4px\n cursor: pointer\n \n .match-label\n margin: 0\n color: var(--text-color)\n\n.match-container\n display: flex\n justify-content: space-between\n align-items: center\n\n .close-btn\n cursor: pointer\n\n.match-link\n padding: .5em"],"names":[],"version":3,"file":"feedback-components.d769ffa5.css.map"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.UZr1Jq_entities {
|
|
2
|
-
padding-left: 0;
|
|
3
|
-
list-style: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.UZr1Jq_entities .UZr1Jq_entities ul {
|
|
7
|
-
list-style: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.UZr1Jq_entity {
|
|
11
|
-
margin: .2em 0 .5em;
|
|
12
|
-
padding-right: 3px;
|
|
13
|
-
}
|
|
14
|
-
/*# sourceMappingURL=feedback-components.e273ed5b.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA;;;;;AAIE;;;;AAGF","sources":["packages/feedback-components/src/extractions/main.module.sass"],"sourcesContent":[".entities\n list-style: none\n padding-left: 0\n\n .entities ul\n list-style: none\n\n.entity\n margin: 0.2em 0 0.5em\n padding-right: 3px\n"],"names":[],"version":3,"file":"feedback-components.e273ed5b.css.map"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
function $parcel$export(e, n, v, s) {
|
|
3
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
-
}
|
|
5
|
-
var $49c87ee97f392268$exports = {};
|
|
6
|
-
|
|
7
|
-
$parcel$export($49c87ee97f392268$exports, "add-type", () => $49c87ee97f392268$export$cb889aaddfa2926c, (v) => $49c87ee97f392268$export$cb889aaddfa2926c = v);
|
|
8
|
-
$parcel$export($49c87ee97f392268$exports, "add-type-overlay", () => $49c87ee97f392268$export$5f8f750fd71deeed, (v) => $49c87ee97f392268$export$5f8f750fd71deeed = v);
|
|
9
|
-
$parcel$export($49c87ee97f392268$exports, "clickable", () => $49c87ee97f392268$export$60d5655c6babb2a0, (v) => $49c87ee97f392268$export$60d5655c6babb2a0 = v);
|
|
10
|
-
$parcel$export($49c87ee97f392268$exports, "close-btn", () => $49c87ee97f392268$export$f5032a039312e50b, (v) => $49c87ee97f392268$export$f5032a039312e50b = v);
|
|
11
|
-
$parcel$export($49c87ee97f392268$exports, "control-content", () => $49c87ee97f392268$export$42e8b5293e69631e, (v) => $49c87ee97f392268$export$42e8b5293e69631e = v);
|
|
12
|
-
$parcel$export($49c87ee97f392268$exports, "control-panel", () => $49c87ee97f392268$export$a0a23f31d5562853, (v) => $49c87ee97f392268$export$a0a23f31d5562853 = v);
|
|
13
|
-
$parcel$export($49c87ee97f392268$exports, "description", () => $49c87ee97f392268$export$6d59db4903f20f7d, (v) => $49c87ee97f392268$export$6d59db4903f20f7d = v);
|
|
14
|
-
$parcel$export($49c87ee97f392268$exports, "entity-panel", () => $49c87ee97f392268$export$38f2cd12e45697e, (v) => $49c87ee97f392268$export$38f2cd12e45697e = v);
|
|
15
|
-
$parcel$export($49c87ee97f392268$exports, "feedback-component", () => $49c87ee97f392268$export$579bd45c78bf5510, (v) => $49c87ee97f392268$export$579bd45c78bf5510 = v);
|
|
16
|
-
$parcel$export($49c87ee97f392268$exports, "feedback-container", () => $49c87ee97f392268$export$23889d205b405f6e, (v) => $49c87ee97f392268$export$23889d205b405f6e = v);
|
|
17
|
-
$parcel$export($49c87ee97f392268$exports, "feedback-text", () => $49c87ee97f392268$export$890489be1870bed5, (v) => $49c87ee97f392268$export$890489be1870bed5 = v);
|
|
18
|
-
$parcel$export($49c87ee97f392268$exports, "feedback-text-wrapper", () => $49c87ee97f392268$export$6bd0fd0a746c88f, (v) => $49c87ee97f392268$export$6bd0fd0a746c88f = v);
|
|
19
|
-
$parcel$export($49c87ee97f392268$exports, "form-group", () => $49c87ee97f392268$export$55a1f87a143fb302, (v) => $49c87ee97f392268$export$55a1f87a143fb302 = v);
|
|
20
|
-
$parcel$export($49c87ee97f392268$exports, "highlight", () => $49c87ee97f392268$export$e4043f67d36cbb26, (v) => $49c87ee97f392268$export$e4043f67d36cbb26 = v);
|
|
21
|
-
$parcel$export($49c87ee97f392268$exports, "icons", () => $49c87ee97f392268$export$df03f54e09e486fa, (v) => $49c87ee97f392268$export$df03f54e09e486fa = v);
|
|
22
|
-
$parcel$export($49c87ee97f392268$exports, "match-container", () => $49c87ee97f392268$export$864d1dadc1dd3f57, (v) => $49c87ee97f392268$export$864d1dadc1dd3f57 = v);
|
|
23
|
-
$parcel$export($49c87ee97f392268$exports, "match-item", () => $49c87ee97f392268$export$a7bcc8ced81f8d07, (v) => $49c87ee97f392268$export$a7bcc8ced81f8d07 = v);
|
|
24
|
-
$parcel$export($49c87ee97f392268$exports, "match-label", () => $49c87ee97f392268$export$be49c8f7a120829f, (v) => $49c87ee97f392268$export$be49c8f7a120829f = v);
|
|
25
|
-
$parcel$export($49c87ee97f392268$exports, "match-link", () => $49c87ee97f392268$export$f308f5f3e77e2c87, (v) => $49c87ee97f392268$export$f308f5f3e77e2c87 = v);
|
|
26
|
-
$parcel$export($49c87ee97f392268$exports, "node-label", () => $49c87ee97f392268$export$75d14899fb692bb6, (v) => $49c87ee97f392268$export$75d14899fb692bb6 = v);
|
|
27
|
-
$parcel$export($49c87ee97f392268$exports, "overlay-container", () => $49c87ee97f392268$export$6a1093e41947f68e, (v) => $49c87ee97f392268$export$6a1093e41947f68e = v);
|
|
28
|
-
$parcel$export($49c87ee97f392268$exports, "page-wrapper", () => $49c87ee97f392268$export$7c414e944018fb15, (v) => $49c87ee97f392268$export$7c414e944018fb15 = v);
|
|
29
|
-
$parcel$export($49c87ee97f392268$exports, "selected", () => $49c87ee97f392268$export$d90250155de6d7e7, (v) => $49c87ee97f392268$export$d90250155de6d7e7 = v);
|
|
30
|
-
$parcel$export($49c87ee97f392268$exports, "selection-tree", () => $49c87ee97f392268$export$3ae1b51693c80a9c, (v) => $49c87ee97f392268$export$3ae1b51693c80a9c = v);
|
|
31
|
-
$parcel$export($49c87ee97f392268$exports, "text-inputs", () => $49c87ee97f392268$export$bc7581b048bdc9d, (v) => $49c87ee97f392268$export$bc7581b048bdc9d = v);
|
|
32
|
-
$parcel$export($49c87ee97f392268$exports, "title", () => $49c87ee97f392268$export$fb184b623420d9be, (v) => $49c87ee97f392268$export$fb184b623420d9be = v);
|
|
33
|
-
$parcel$export($49c87ee97f392268$exports, "type-container", () => $49c87ee97f392268$export$b2d17fca990bb66c, (v) => $49c87ee97f392268$export$b2d17fca990bb66c = v);
|
|
34
|
-
$parcel$export($49c87ee97f392268$exports, "type-list", () => $49c87ee97f392268$export$915fe2ca68846e4c, (v) => $49c87ee97f392268$export$915fe2ca68846e4c = v);
|
|
35
|
-
$parcel$export($49c87ee97f392268$exports, "type-tag", () => $49c87ee97f392268$export$5e5acbc770fb0e4, (v) => $49c87ee97f392268$export$5e5acbc770fb0e4 = v);
|
|
36
|
-
var $49c87ee97f392268$export$cb889aaddfa2926c;
|
|
37
|
-
var $49c87ee97f392268$export$5f8f750fd71deeed;
|
|
38
|
-
var $49c87ee97f392268$export$60d5655c6babb2a0;
|
|
39
|
-
var $49c87ee97f392268$export$f5032a039312e50b;
|
|
40
|
-
var $49c87ee97f392268$export$42e8b5293e69631e;
|
|
41
|
-
var $49c87ee97f392268$export$a0a23f31d5562853;
|
|
42
|
-
var $49c87ee97f392268$export$6d59db4903f20f7d;
|
|
43
|
-
var $49c87ee97f392268$export$38f2cd12e45697e;
|
|
44
|
-
var $49c87ee97f392268$export$579bd45c78bf5510;
|
|
45
|
-
var $49c87ee97f392268$export$23889d205b405f6e;
|
|
46
|
-
var $49c87ee97f392268$export$890489be1870bed5;
|
|
47
|
-
var $49c87ee97f392268$export$6bd0fd0a746c88f;
|
|
48
|
-
var $49c87ee97f392268$export$55a1f87a143fb302;
|
|
49
|
-
var $49c87ee97f392268$export$e4043f67d36cbb26;
|
|
50
|
-
var $49c87ee97f392268$export$df03f54e09e486fa;
|
|
51
|
-
var $49c87ee97f392268$export$864d1dadc1dd3f57;
|
|
52
|
-
var $49c87ee97f392268$export$a7bcc8ced81f8d07;
|
|
53
|
-
var $49c87ee97f392268$export$be49c8f7a120829f;
|
|
54
|
-
var $49c87ee97f392268$export$f308f5f3e77e2c87;
|
|
55
|
-
var $49c87ee97f392268$export$75d14899fb692bb6;
|
|
56
|
-
var $49c87ee97f392268$export$6a1093e41947f68e;
|
|
57
|
-
var $49c87ee97f392268$export$7c414e944018fb15;
|
|
58
|
-
var $49c87ee97f392268$export$d90250155de6d7e7;
|
|
59
|
-
var $49c87ee97f392268$export$3ae1b51693c80a9c;
|
|
60
|
-
var $49c87ee97f392268$export$bc7581b048bdc9d;
|
|
61
|
-
var $49c87ee97f392268$export$fb184b623420d9be;
|
|
62
|
-
var $49c87ee97f392268$export$b2d17fca990bb66c;
|
|
63
|
-
var $49c87ee97f392268$export$915fe2ca68846e4c;
|
|
64
|
-
var $49c87ee97f392268$export$5e5acbc770fb0e4;
|
|
65
|
-
$49c87ee97f392268$export$cb889aaddfa2926c = `QoX8-W_add-type`;
|
|
66
|
-
$49c87ee97f392268$export$5f8f750fd71deeed = `QoX8-W_add-type-overlay`;
|
|
67
|
-
$49c87ee97f392268$export$60d5655c6babb2a0 = `QoX8-W_clickable`;
|
|
68
|
-
$49c87ee97f392268$export$f5032a039312e50b = `QoX8-W_close-btn`;
|
|
69
|
-
$49c87ee97f392268$export$42e8b5293e69631e = `QoX8-W_control-content`;
|
|
70
|
-
$49c87ee97f392268$export$a0a23f31d5562853 = `QoX8-W_control-panel`;
|
|
71
|
-
$49c87ee97f392268$export$6d59db4903f20f7d = `QoX8-W_description`;
|
|
72
|
-
$49c87ee97f392268$export$38f2cd12e45697e = `QoX8-W_entity-panel`;
|
|
73
|
-
$49c87ee97f392268$export$579bd45c78bf5510 = `QoX8-W_feedback-component`;
|
|
74
|
-
$49c87ee97f392268$export$23889d205b405f6e = `QoX8-W_feedback-container`;
|
|
75
|
-
$49c87ee97f392268$export$890489be1870bed5 = `QoX8-W_feedback-text`;
|
|
76
|
-
$49c87ee97f392268$export$6bd0fd0a746c88f = `QoX8-W_feedback-text-wrapper`;
|
|
77
|
-
$49c87ee97f392268$export$55a1f87a143fb302 = `QoX8-W_form-group`;
|
|
78
|
-
$49c87ee97f392268$export$e4043f67d36cbb26 = `QoX8-W_highlight`;
|
|
79
|
-
$49c87ee97f392268$export$df03f54e09e486fa = `QoX8-W_icons`;
|
|
80
|
-
$49c87ee97f392268$export$864d1dadc1dd3f57 = `QoX8-W_match-container`;
|
|
81
|
-
$49c87ee97f392268$export$a7bcc8ced81f8d07 = `QoX8-W_match-item`;
|
|
82
|
-
$49c87ee97f392268$export$be49c8f7a120829f = `QoX8-W_match-label`;
|
|
83
|
-
$49c87ee97f392268$export$f308f5f3e77e2c87 = `QoX8-W_match-link`;
|
|
84
|
-
$49c87ee97f392268$export$75d14899fb692bb6 = `QoX8-W_node-label`;
|
|
85
|
-
$49c87ee97f392268$export$6a1093e41947f68e = `QoX8-W_overlay-container`;
|
|
86
|
-
$49c87ee97f392268$export$7c414e944018fb15 = `QoX8-W_page-wrapper`;
|
|
87
|
-
$49c87ee97f392268$export$d90250155de6d7e7 = `QoX8-W_selected`;
|
|
88
|
-
$49c87ee97f392268$export$3ae1b51693c80a9c = `QoX8-W_selection-tree`;
|
|
89
|
-
$49c87ee97f392268$export$bc7581b048bdc9d = `QoX8-W_text-inputs`;
|
|
90
|
-
$49c87ee97f392268$export$fb184b623420d9be = `QoX8-W_title`;
|
|
91
|
-
$49c87ee97f392268$export$b2d17fca990bb66c = `QoX8-W_type-container`;
|
|
92
|
-
$49c87ee97f392268$export$915fe2ca68846e4c = `QoX8-W_type-list`;
|
|
93
|
-
$49c87ee97f392268$export$5e5acbc770fb0e4 = `QoX8-W_type-tag`;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
export {$49c87ee97f392268$exports as default};
|
|
97
|
-
//# sourceMappingURL=feedback-components.e702eece.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA5BA,4CAA6B,CAAC,eAAe,CAAC;AAC9C,4CAAqC,CAAC,uBAAuB,CAAC;AAC9D,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAAoC,CAAC,sBAAsB,CAAC;AAC5D,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,2CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAAuC,CAAC,yBAAyB,CAAC;AAClE,4CAAuC,CAAC,yBAAyB,CAAC;AAClE,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,2CAA0C,CAAC,4BAA4B,CAAC;AACxE,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAoC,CAAC,sBAAsB,CAAC;AAC5D,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAsC,CAAC,wBAAwB,CAAC;AAChE,4CAAiC,CAAC,mBAAmB,CAAC;AACtD,4CAA6B,CAAC,eAAe,CAAC;AAC9C,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,2CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA8B,CAAC,gBAAgB,CAAC;AAChD,2CAA6B,CAAC,eAAe,CAAC","sources":["packages/feedback-components/src/feedback/feedback.module.sass"],"sourcesContent":[":root\n --text-line-height: 3em\n --main-extra-width: 200px\n\n.page-wrapper\n display: flex\n flex-direction: row\n position: relative\n gap: 2em\n align-items: flex-start // makes control-content lose stick\n\n.feedback-container\n flex: 4\n\n.control-panel\n flex: 1\n height: auto\n\n.control-content\n position: sticky\n top: 0\n\n.feedback-component\n position: relative\n width: 800px\n\n & > svg\n width: 800px\n\ncircle\n border: 1px solid black\n\n.selected\n border: 1px solid white\n \n.feedback-text\n margin-bottom: 2em\n\n.entity-panel\n position: relative\n max-height: 600px\n width: calc(100% - 2em)\n flex: 1\n min-height: 100px\n padding: 1em\n background: var(--panel-secondary-background-color)\n border-radius: 4px\n // Inset box shadow\n box-shadow: 0 0 0 1px var(--panel-border-color) inset\n\n.selection-tree\n margin: -1em 0\n padding: 1em 0\n \n.type-list\n display: grid\n grid-auto-flow: column\n grid-template-rows: repeat(10, auto)\n gap: 0.2em\n\n .type-tag\n padding: .2em .5em\n border-radius: .2em\n\n.description\n max-width: 300px\n padding: .5em\n\nmark\n border-radius: .2em\n cursor: pointer\n color: black !important\n\n[role=\"treeitem\"]\n width: auto !important\n\n.highlight\n padding: .2em 0\n border-radius: .2em\n position: relative\n zIndex: 10\n\n.clickable\n cursor: pointer\n\n.feedback-text-wrapper \n position: relative\n z-index: 0\n overflow: visible\n line-height: var(--text-line-height)\n\n.type-container\n display: flex\n justify-content: space-between\n align-items: center\n column-gap: 1em\n\n.add-type\n cursor: pointer\n display: flex\n justify-content: space-between\n padding: 0 .5em\n align-items: center\n\n p\n margin: 0\n\n.overlay-container\n height: 80vh\n width: 100vw\n display: flex\n justify-content: center\n align-items: center\n\n .add-type-overlay\n background-color: var(--tertiary-background)\n padding: .5em 1em\n display: flex\n flex-direction: column\n gap: 1em\n border-radius: .2em\n\n .title\n display: flex\n justify-content: space-between\n align-items: center\n\n h2\n margin: 0\n\n .form-group\n display: flex\n gap: 3em\n\n .text-inputs\n display: flex\n flex-direction: column\n gap: 1em\n\n.icons\n display: flex\n gap: .25em\n\n.node-label\n fill: var(--text-emphasized-color)\n fontSize: 10px\n pointerEvents: none\n\n.match-item\n color: var(--text-emphasized-color)\n padding: .1em .2em\n border-radius: .2em\n margin-bottom: 4px\n cursor: pointer\n \n .match-label\n margin: 0\n color: var(--text-color)\n\n.match-container\n display: flex\n justify-content: space-between\n align-items: center\n\n .close-btn\n cursor: pointer\n\n.match-link\n padding: .5em"],"names":[],"version":3,"file":"feedback-components.e702eece.js.map"}
|