@teselagen/ove 0.8.26 → 0.8.28
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/RowItem/StackedAnnotations/PointedAnnotation.d.ts +56 -1
- package/helperComponents/withHover.d.ts +62 -2
- package/index.cjs.js +108 -108
- package/index.es.js +108 -108
- package/index.umd.js +108 -108
- package/ove.css +4 -2
- package/package.json +1 -1
- package/src/Editor/darkmode.css +4 -2
- package/src/RowItem/Translations/AASliver.js +3 -3
- package/src/createVectorEditor/makeStore.js +1 -1
- package/src/helperComponents/withHover.js +93 -69
- package/src/redux/index.js +0 -2
- package/redux/hoveredAnnotation.d.ts +0 -4
- package/src/redux/hoveredAnnotation.js +0 -24
package/index.es.js
CHANGED
|
@@ -72546,25 +72546,6 @@ const frameTranslations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
72546
72546
|
frameTranslationToggleOn,
|
|
72547
72547
|
getMinimumOrfSize: getMinimumOrfSize$1
|
|
72548
72548
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
72549
|
-
const hoveredAnnotationUpdate = createMetaAction("HOVEREDANNOTATIONUPDATE");
|
|
72550
|
-
const hoveredAnnotationClear = createMetaAction("HOVEREDANNOTATIONCLEAR");
|
|
72551
|
-
const hoveredAnnotation = createReducer(
|
|
72552
|
-
{
|
|
72553
|
-
[hoveredAnnotationUpdate]: (state2, payload) => {
|
|
72554
|
-
return payload || null;
|
|
72555
|
-
},
|
|
72556
|
-
[hoveredAnnotationClear]: () => {
|
|
72557
|
-
return "";
|
|
72558
|
-
}
|
|
72559
|
-
},
|
|
72560
|
-
""
|
|
72561
|
-
);
|
|
72562
|
-
const hoveredAnnotationActions = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72563
|
-
__proto__: null,
|
|
72564
|
-
default: hoveredAnnotation,
|
|
72565
|
-
hoveredAnnotationClear,
|
|
72566
|
-
hoveredAnnotationUpdate
|
|
72567
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
72568
72549
|
const minimumOrfSizeUpdate = createMetaAction("minimumOrfSizeUpdate");
|
|
72569
72550
|
const minimumOrfSize = createReducer(
|
|
72570
72551
|
{
|
|
@@ -97412,7 +97393,6 @@ const subReducers = {
|
|
|
97412
97393
|
toolBar: toolBar$1,
|
|
97413
97394
|
findTool: findTool$1,
|
|
97414
97395
|
frameTranslations: frameTranslations$1,
|
|
97415
|
-
hoveredAnnotation: hoveredAnnotationActions,
|
|
97416
97396
|
minimumOrfSize: minimumOrfSize$1,
|
|
97417
97397
|
panelsShown: panelsShown$1,
|
|
97418
97398
|
propertiesTool: propertiesTool$1,
|
|
@@ -97536,7 +97516,7 @@ const makeStore = /* @__PURE__ */ __name(() => {
|
|
|
97536
97516
|
// replacer: (key, value) => {
|
|
97537
97517
|
// }
|
|
97538
97518
|
// },
|
|
97539
|
-
actionsDenylist: [
|
|
97519
|
+
actionsDenylist: []
|
|
97540
97520
|
}) || compose$1;
|
|
97541
97521
|
const store2 = createStore$2(
|
|
97542
97522
|
combineReducers({
|
|
@@ -109500,85 +109480,105 @@ const HoveredIdContext = React__default.createContext({
|
|
|
109500
109480
|
hoveredId: ""
|
|
109501
109481
|
// default value
|
|
109502
109482
|
});
|
|
109503
|
-
function withHoveredIdFromContext(Component2) {
|
|
109504
|
-
return /* @__PURE__ */ __name(function HoveredIdComponent(props) {
|
|
109505
|
-
return /* @__PURE__ */ React__default.createElement(HoveredIdContext.Consumer, null, (contexts) => /* @__PURE__ */ React__default.createElement(Component2, __spreadValues(__spreadValues({}, props), contexts)));
|
|
109506
|
-
}, "HoveredIdComponent");
|
|
109507
|
-
}
|
|
109508
|
-
__name(withHoveredIdFromContext, "withHoveredIdFromContext");
|
|
109509
109483
|
const hoveredAnnEasyStore = store$1({
|
|
109510
109484
|
hoveredAnn: void 0,
|
|
109511
|
-
selectedAnn: void 0
|
|
109485
|
+
selectedAnn: void 0,
|
|
109486
|
+
// Per-editor hovered annotation IDs
|
|
109487
|
+
hoveredIds: {}
|
|
109512
109488
|
});
|
|
109513
|
-
|
|
109514
|
-
|
|
109515
|
-
|
|
109516
|
-
|
|
109517
|
-
|
|
109518
|
-
|
|
109519
|
-
|
|
109520
|
-
|
|
109521
|
-
|
|
109522
|
-
|
|
109523
|
-
|
|
109524
|
-
|
|
109525
|
-
|
|
109526
|
-
|
|
109527
|
-
)
|
|
109528
|
-
|
|
109529
|
-
|
|
109530
|
-
|
|
109531
|
-
|
|
109532
|
-
|
|
109533
|
-
|
|
109534
|
-
|
|
109535
|
-
|
|
109536
|
-
|
|
109537
|
-
|
|
109538
|
-
|
|
109539
|
-
|
|
109540
|
-
|
|
109541
|
-
|
|
109489
|
+
function hoveredAnnotationUpdate(id2, { editorName = "StandaloneEditor" } = {}) {
|
|
109490
|
+
hoveredAnnEasyStore.hoveredIds[editorName] = id2;
|
|
109491
|
+
}
|
|
109492
|
+
__name(hoveredAnnotationUpdate, "hoveredAnnotationUpdate");
|
|
109493
|
+
function hoveredAnnotationClear(clear3, { editorName = "StandaloneEditor" } = {}) {
|
|
109494
|
+
hoveredAnnEasyStore.hoveredIds[editorName] = "";
|
|
109495
|
+
}
|
|
109496
|
+
__name(hoveredAnnotationClear, "hoveredAnnotationClear");
|
|
109497
|
+
function withHover(WrappedComponent) {
|
|
109498
|
+
var _a2;
|
|
109499
|
+
const HoverComponent = view(
|
|
109500
|
+
(_a2 = class extends React__default.Component {
|
|
109501
|
+
constructor() {
|
|
109502
|
+
super(...arguments);
|
|
109503
|
+
__publicField(this, "handleMouseOver", /* @__PURE__ */ __name((e) => {
|
|
109504
|
+
const target = e.target;
|
|
109505
|
+
let alreadyHandled = false;
|
|
109506
|
+
let currentElement = target;
|
|
109507
|
+
while (currentElement) {
|
|
109508
|
+
if (currentElement === e.currentTarget) {
|
|
109509
|
+
break;
|
|
109510
|
+
}
|
|
109511
|
+
if (currentElement.classList.contains("hoverHelper")) {
|
|
109512
|
+
alreadyHandled = true;
|
|
109513
|
+
break;
|
|
109514
|
+
}
|
|
109515
|
+
currentElement = currentElement.parentElement;
|
|
109516
|
+
}
|
|
109517
|
+
if (alreadyHandled) return;
|
|
109518
|
+
const {
|
|
109519
|
+
editorName = "StandaloneEditor",
|
|
109520
|
+
id: id2,
|
|
109521
|
+
annotation,
|
|
109522
|
+
label
|
|
109523
|
+
} = this.props;
|
|
109524
|
+
const isIdHashmap = typeof id2 === "object";
|
|
109525
|
+
const idToPass = isIdHashmap ? Object.keys(id2)[0] : id2;
|
|
109526
|
+
const annot = annotation || (label == null ? void 0 : label.annotation);
|
|
109527
|
+
if (modifiableTypes.includes(annot == null ? void 0 : annot.annotationTypePlural)) {
|
|
109528
|
+
hoveredAnnEasyStore.hoveredAnn = annot;
|
|
109529
|
+
}
|
|
109530
|
+
if (window.__veDragging || window.__veScrolling) return;
|
|
109531
|
+
hoveredAnnotationUpdate(idToPass, { editorName });
|
|
109532
|
+
}, "handleMouseOver"));
|
|
109533
|
+
__publicField(this, "handleMouseLeave", /* @__PURE__ */ __name((e) => {
|
|
109534
|
+
hoveredAnnEasyStore.hoveredAnn = void 0;
|
|
109535
|
+
const { editorName = "StandaloneEditor" } = this.props;
|
|
109536
|
+
e.stopPropagation();
|
|
109537
|
+
if (window.__veDragging || window.__veScrolling) return;
|
|
109538
|
+
hoveredAnnotationClear(true, { editorName });
|
|
109539
|
+
}, "handleMouseLeave"));
|
|
109542
109540
|
}
|
|
109543
|
-
|
|
109544
|
-
|
|
109545
|
-
|
|
109546
|
-
|
|
109547
|
-
|
|
109548
|
-
|
|
109549
|
-
|
|
109550
|
-
|
|
109551
|
-
|
|
109552
|
-
|
|
109553
|
-
|
|
109554
|
-
|
|
109555
|
-
|
|
109556
|
-
|
|
109557
|
-
|
|
109558
|
-
|
|
109541
|
+
render() {
|
|
109542
|
+
var _b2;
|
|
109543
|
+
const _a3 = this.props, {
|
|
109544
|
+
id: id2,
|
|
109545
|
+
editorName = "StandaloneEditor",
|
|
109546
|
+
className,
|
|
109547
|
+
passHoveredId,
|
|
109548
|
+
noRedux
|
|
109549
|
+
} = _a3, restProps = __objRest(_a3, [
|
|
109550
|
+
"id",
|
|
109551
|
+
"editorName",
|
|
109552
|
+
"className",
|
|
109553
|
+
"passHoveredId",
|
|
109554
|
+
"noRedux"
|
|
109555
|
+
]);
|
|
109556
|
+
const hoveredIdFromContext = (_b2 = this.context) == null ? void 0 : _b2.hoveredId;
|
|
109557
|
+
const hoveredId = hoveredAnnEasyStore.hoveredIds[editorName] || hoveredIdFromContext || "";
|
|
109558
|
+
const isIdHashmap = typeof id2 === "object";
|
|
109559
|
+
const hovered = !!(isIdHashmap ? id2[hoveredId] : hoveredId === id2);
|
|
109560
|
+
const newClassName = classNames(className, "hoverHelper", {
|
|
109561
|
+
veAnnotationHovered: hovered
|
|
109562
|
+
});
|
|
109563
|
+
const passedProps = __spreadProps(__spreadValues({}, restProps), {
|
|
109564
|
+
id: id2,
|
|
109565
|
+
editorName,
|
|
109566
|
+
hovered,
|
|
109567
|
+
className: newClassName,
|
|
109568
|
+
onMouseOver: this.handleMouseOver,
|
|
109569
|
+
onMouseLeave: this.handleMouseLeave
|
|
109570
|
+
});
|
|
109571
|
+
if (hovered && passHoveredId) {
|
|
109572
|
+
passedProps.hoveredId = hoveredId;
|
|
109559
109573
|
}
|
|
109560
|
-
|
|
109561
|
-
}
|
|
109562
|
-
|
|
109563
|
-
|
|
109564
|
-
|
|
109565
|
-
|
|
109566
|
-
|
|
109567
|
-
|
|
109568
|
-
hoveredAnnEasyStore.hoveredAnn = annot;
|
|
109569
|
-
}
|
|
109570
|
-
if (window.__veDragging || window.__veScrolling) return;
|
|
109571
|
-
hoveredAnnotationUpdate2 && hoveredAnnotationUpdate2(idToPass, { editorName });
|
|
109572
|
-
}, "onMouseOver"),
|
|
109573
|
-
onMouseLeave: /* @__PURE__ */ __name((props) => (e) => {
|
|
109574
|
-
hoveredAnnEasyStore.hoveredAnn = void 0;
|
|
109575
|
-
const { editorName, hoveredAnnotationClear: hoveredAnnotationClear2 } = props;
|
|
109576
|
-
e.stopPropagation();
|
|
109577
|
-
if (window.__veDragging || window.__veScrolling) return;
|
|
109578
|
-
hoveredAnnotationClear2 && hoveredAnnotationClear2(true, { editorName });
|
|
109579
|
-
}, "onMouseLeave")
|
|
109580
|
-
})
|
|
109581
|
-
);
|
|
109574
|
+
return /* @__PURE__ */ React__default.createElement(WrappedComponent, __spreadValues({}, passedProps));
|
|
109575
|
+
}
|
|
109576
|
+
}, __publicField(_a2, "contextType", HoveredIdContext), _a2)
|
|
109577
|
+
);
|
|
109578
|
+
HoverComponent.displayName = `withHover(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
109579
|
+
return HoverComponent;
|
|
109580
|
+
}
|
|
109581
|
+
__name(withHover, "withHover");
|
|
109582
109582
|
const partOverhangs = [
|
|
109583
109583
|
"fivePrimeOverhang",
|
|
109584
109584
|
"fivePrimeUnderhang",
|
|
@@ -111909,9 +111909,9 @@ function AASliver(props) {
|
|
|
111909
111909
|
"text",
|
|
111910
111910
|
{
|
|
111911
111911
|
fontSize: 25,
|
|
111912
|
-
|
|
111912
|
+
className: "aminoAcidNumber",
|
|
111913
111913
|
strokeWidth: 2,
|
|
111914
|
-
transform: `scale(${3 / width * 10}
|
|
111914
|
+
transform: `scale(${3 / width * 10},${37.5 / height}) translate(${(forward ? 45 : 55) * width / 10},${4.4 * height - 4})`,
|
|
111915
111915
|
x: "0",
|
|
111916
111916
|
y: "4",
|
|
111917
111917
|
style: { textAnchor: "middle" }
|
|
@@ -114309,12 +114309,12 @@ function Cutsites(props) {
|
|
|
114309
114309
|
row,
|
|
114310
114310
|
sequenceLength,
|
|
114311
114311
|
topStrand,
|
|
114312
|
-
hoveredAnnotation
|
|
114312
|
+
hoveredAnnotation
|
|
114313
114313
|
} = props;
|
|
114314
114314
|
const snips = [];
|
|
114315
114315
|
const snipConnectors = [];
|
|
114316
114316
|
Object.keys(annotationRanges).sort(
|
|
114317
|
-
(a2) => annotationRanges[a2].annotation.id ===
|
|
114317
|
+
(a2) => annotationRanges[a2].annotation.id === hoveredAnnotation ? 1 : -1
|
|
114318
114318
|
).forEach(function(key) {
|
|
114319
114319
|
const annotationRange = annotationRanges[key];
|
|
114320
114320
|
let { annotation } = annotationRange;
|
|
@@ -114333,7 +114333,7 @@ function Cutsites(props) {
|
|
|
114333
114333
|
bottomSnipPosition = bottomSnipPosition && Number(bottomSnipPosition);
|
|
114334
114334
|
upstreamTopSnip = upstreamTopSnip && Number(upstreamTopSnip);
|
|
114335
114335
|
upstreamBottomSnip = upstreamBottomSnip && Number(upstreamBottomSnip);
|
|
114336
|
-
const isHovered = annotation.id ===
|
|
114336
|
+
const isHovered = annotation.id === hoveredAnnotation;
|
|
114337
114337
|
snipStyle = __spreadProps(__spreadValues({}, snipStyle), {
|
|
114338
114338
|
background: annotation.restrictionEnzyme.color
|
|
114339
114339
|
});
|
|
@@ -114450,8 +114450,8 @@ function Cutsites(props) {
|
|
|
114450
114450
|
}
|
|
114451
114451
|
__name(Cutsites, "Cutsites");
|
|
114452
114452
|
const Cutsites$1 = pure(
|
|
114453
|
-
connectToEditor(({ hoveredAnnotation
|
|
114454
|
-
hoveredAnnotation
|
|
114453
|
+
connectToEditor(({ hoveredAnnotation }) => ({
|
|
114454
|
+
hoveredAnnotation
|
|
114455
114455
|
}))(Cutsites)
|
|
114456
114456
|
);
|
|
114457
114457
|
const useShowChromQualScores = /* @__PURE__ */ __name(() => {
|
|
@@ -114850,11 +114850,11 @@ const defaultCharWidth = 9;
|
|
|
114850
114850
|
const defaultContainerWidth = 400;
|
|
114851
114851
|
const defaultMarginWidth$1 = 50;
|
|
114852
114852
|
const CutsiteSelectionLayers = connectToEditor(
|
|
114853
|
-
({ hoveredAnnotation
|
|
114854
|
-
hoveredAnnotation
|
|
114853
|
+
({ hoveredAnnotation }) => ({
|
|
114854
|
+
hoveredAnnotation
|
|
114855
114855
|
})
|
|
114856
114856
|
)(/* @__PURE__ */ __name(function CutsiteSelectionLayersInner({
|
|
114857
|
-
hoveredAnnotation
|
|
114857
|
+
hoveredAnnotation,
|
|
114858
114858
|
cutsites,
|
|
114859
114859
|
annotationCommonProps,
|
|
114860
114860
|
showReverseSequence,
|
|
@@ -114862,9 +114862,9 @@ const CutsiteSelectionLayers = connectToEditor(
|
|
|
114862
114862
|
alignmentData,
|
|
114863
114863
|
row
|
|
114864
114864
|
}) {
|
|
114865
|
-
return Object.keys(cutsites).sort((a2) => cutsites[a2].id ===
|
|
114865
|
+
return Object.keys(cutsites).sort((a2) => cutsites[a2].id === hoveredAnnotation ? 1 : -1).map(function(id2, index2) {
|
|
114866
114866
|
const cutsite = cutsites[id2];
|
|
114867
|
-
const isHovered =
|
|
114867
|
+
const isHovered = hoveredAnnotation === cutsite.id;
|
|
114868
114868
|
const layer = cutsite.annotation.recognitionSiteRange;
|
|
114869
114869
|
return layer.start > -1 && /* @__PURE__ */ React__default.createElement(
|
|
114870
114870
|
SelectionLayer$3,
|
|
@@ -116968,7 +116968,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
116968
116968
|
input.click();
|
|
116969
116969
|
}
|
|
116970
116970
|
__name(showFileDialog, "showFileDialog");
|
|
116971
|
-
const version = "0.8.
|
|
116971
|
+
const version = "0.8.28";
|
|
116972
116972
|
const packageJson = {
|
|
116973
116973
|
version
|
|
116974
116974
|
};
|
package/index.umd.js
CHANGED
|
@@ -101467,25 +101467,6 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101467
101467
|
frameTranslationToggleOn,
|
|
101468
101468
|
getMinimumOrfSize: getMinimumOrfSize$1
|
|
101469
101469
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
101470
|
-
const hoveredAnnotationUpdate = createMetaAction("HOVEREDANNOTATIONUPDATE");
|
|
101471
|
-
const hoveredAnnotationClear = createMetaAction("HOVEREDANNOTATIONCLEAR");
|
|
101472
|
-
const hoveredAnnotation = createReducer(
|
|
101473
|
-
{
|
|
101474
|
-
[hoveredAnnotationUpdate]: (state2, payload) => {
|
|
101475
|
-
return payload || null;
|
|
101476
|
-
},
|
|
101477
|
-
[hoveredAnnotationClear]: () => {
|
|
101478
|
-
return "";
|
|
101479
|
-
}
|
|
101480
|
-
},
|
|
101481
|
-
""
|
|
101482
|
-
);
|
|
101483
|
-
const hoveredAnnotationActions = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
101484
|
-
__proto__: null,
|
|
101485
|
-
default: hoveredAnnotation,
|
|
101486
|
-
hoveredAnnotationClear,
|
|
101487
|
-
hoveredAnnotationUpdate
|
|
101488
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
101489
101470
|
const minimumOrfSizeUpdate = createMetaAction("minimumOrfSizeUpdate");
|
|
101490
101471
|
const minimumOrfSize = createReducer(
|
|
101491
101472
|
{
|
|
@@ -125578,7 +125559,6 @@ ${seq.sequence}
|
|
|
125578
125559
|
toolBar: toolBar$1,
|
|
125579
125560
|
findTool: findTool$1,
|
|
125580
125561
|
frameTranslations: frameTranslations$1,
|
|
125581
|
-
hoveredAnnotation: hoveredAnnotationActions,
|
|
125582
125562
|
minimumOrfSize: minimumOrfSize$1,
|
|
125583
125563
|
panelsShown: panelsShown$1,
|
|
125584
125564
|
propertiesTool: propertiesTool$1,
|
|
@@ -125702,7 +125682,7 @@ ${seq.sequence}
|
|
|
125702
125682
|
// replacer: (key, value) => {
|
|
125703
125683
|
// }
|
|
125704
125684
|
// },
|
|
125705
|
-
actionsDenylist: [
|
|
125685
|
+
actionsDenylist: []
|
|
125706
125686
|
}) || compose$1;
|
|
125707
125687
|
const store2 = createStore$2(
|
|
125708
125688
|
combineReducers({
|
|
@@ -137666,85 +137646,105 @@ ${seq.sequence}
|
|
|
137666
137646
|
hoveredId: ""
|
|
137667
137647
|
// default value
|
|
137668
137648
|
});
|
|
137669
|
-
function withHoveredIdFromContext(Component) {
|
|
137670
|
-
return /* @__PURE__ */ __name(function HoveredIdComponent(props) {
|
|
137671
|
-
return /* @__PURE__ */ React.createElement(HoveredIdContext.Consumer, null, (contexts) => /* @__PURE__ */ React.createElement(Component, __spreadValues(__spreadValues({}, props), contexts)));
|
|
137672
|
-
}, "HoveredIdComponent");
|
|
137673
|
-
}
|
|
137674
|
-
__name(withHoveredIdFromContext, "withHoveredIdFromContext");
|
|
137675
137649
|
const hoveredAnnEasyStore = store$1({
|
|
137676
137650
|
hoveredAnn: void 0,
|
|
137677
|
-
selectedAnn: void 0
|
|
137651
|
+
selectedAnn: void 0,
|
|
137652
|
+
// Per-editor hovered annotation IDs
|
|
137653
|
+
hoveredIds: {}
|
|
137678
137654
|
});
|
|
137679
|
-
|
|
137680
|
-
|
|
137681
|
-
|
|
137682
|
-
|
|
137683
|
-
|
|
137684
|
-
|
|
137685
|
-
|
|
137686
|
-
|
|
137687
|
-
|
|
137688
|
-
|
|
137689
|
-
|
|
137690
|
-
|
|
137691
|
-
|
|
137692
|
-
|
|
137693
|
-
)
|
|
137694
|
-
|
|
137695
|
-
|
|
137696
|
-
|
|
137697
|
-
|
|
137698
|
-
|
|
137699
|
-
|
|
137700
|
-
|
|
137701
|
-
|
|
137702
|
-
|
|
137703
|
-
|
|
137704
|
-
|
|
137705
|
-
|
|
137706
|
-
|
|
137707
|
-
|
|
137655
|
+
function hoveredAnnotationUpdate(id2, { editorName = "StandaloneEditor" } = {}) {
|
|
137656
|
+
hoveredAnnEasyStore.hoveredIds[editorName] = id2;
|
|
137657
|
+
}
|
|
137658
|
+
__name(hoveredAnnotationUpdate, "hoveredAnnotationUpdate");
|
|
137659
|
+
function hoveredAnnotationClear(clear, { editorName = "StandaloneEditor" } = {}) {
|
|
137660
|
+
hoveredAnnEasyStore.hoveredIds[editorName] = "";
|
|
137661
|
+
}
|
|
137662
|
+
__name(hoveredAnnotationClear, "hoveredAnnotationClear");
|
|
137663
|
+
function withHover(WrappedComponent) {
|
|
137664
|
+
var _a2;
|
|
137665
|
+
const HoverComponent = view(
|
|
137666
|
+
(_a2 = class extends React.Component {
|
|
137667
|
+
constructor() {
|
|
137668
|
+
super(...arguments);
|
|
137669
|
+
__publicField(this, "handleMouseOver", /* @__PURE__ */ __name((e2) => {
|
|
137670
|
+
const target = e2.target;
|
|
137671
|
+
let alreadyHandled = false;
|
|
137672
|
+
let currentElement = target;
|
|
137673
|
+
while (currentElement) {
|
|
137674
|
+
if (currentElement === e2.currentTarget) {
|
|
137675
|
+
break;
|
|
137676
|
+
}
|
|
137677
|
+
if (currentElement.classList.contains("hoverHelper")) {
|
|
137678
|
+
alreadyHandled = true;
|
|
137679
|
+
break;
|
|
137680
|
+
}
|
|
137681
|
+
currentElement = currentElement.parentElement;
|
|
137682
|
+
}
|
|
137683
|
+
if (alreadyHandled) return;
|
|
137684
|
+
const {
|
|
137685
|
+
editorName = "StandaloneEditor",
|
|
137686
|
+
id: id2,
|
|
137687
|
+
annotation,
|
|
137688
|
+
label
|
|
137689
|
+
} = this.props;
|
|
137690
|
+
const isIdHashmap = typeof id2 === "object";
|
|
137691
|
+
const idToPass = isIdHashmap ? Object.keys(id2)[0] : id2;
|
|
137692
|
+
const annot = annotation || (label == null ? void 0 : label.annotation);
|
|
137693
|
+
if (modifiableTypes.includes(annot == null ? void 0 : annot.annotationTypePlural)) {
|
|
137694
|
+
hoveredAnnEasyStore.hoveredAnn = annot;
|
|
137695
|
+
}
|
|
137696
|
+
if (window.__veDragging || window.__veScrolling) return;
|
|
137697
|
+
hoveredAnnotationUpdate(idToPass, { editorName });
|
|
137698
|
+
}, "handleMouseOver"));
|
|
137699
|
+
__publicField(this, "handleMouseLeave", /* @__PURE__ */ __name((e2) => {
|
|
137700
|
+
hoveredAnnEasyStore.hoveredAnn = void 0;
|
|
137701
|
+
const { editorName = "StandaloneEditor" } = this.props;
|
|
137702
|
+
e2.stopPropagation();
|
|
137703
|
+
if (window.__veDragging || window.__veScrolling) return;
|
|
137704
|
+
hoveredAnnotationClear(true, { editorName });
|
|
137705
|
+
}, "handleMouseLeave"));
|
|
137708
137706
|
}
|
|
137709
|
-
|
|
137710
|
-
|
|
137711
|
-
|
|
137712
|
-
|
|
137713
|
-
|
|
137714
|
-
|
|
137715
|
-
|
|
137716
|
-
|
|
137717
|
-
|
|
137718
|
-
|
|
137719
|
-
|
|
137720
|
-
|
|
137721
|
-
|
|
137722
|
-
|
|
137723
|
-
|
|
137724
|
-
|
|
137707
|
+
render() {
|
|
137708
|
+
var _b2;
|
|
137709
|
+
const _a3 = this.props, {
|
|
137710
|
+
id: id2,
|
|
137711
|
+
editorName = "StandaloneEditor",
|
|
137712
|
+
className,
|
|
137713
|
+
passHoveredId,
|
|
137714
|
+
noRedux
|
|
137715
|
+
} = _a3, restProps = __objRest(_a3, [
|
|
137716
|
+
"id",
|
|
137717
|
+
"editorName",
|
|
137718
|
+
"className",
|
|
137719
|
+
"passHoveredId",
|
|
137720
|
+
"noRedux"
|
|
137721
|
+
]);
|
|
137722
|
+
const hoveredIdFromContext = (_b2 = this.context) == null ? void 0 : _b2.hoveredId;
|
|
137723
|
+
const hoveredId = hoveredAnnEasyStore.hoveredIds[editorName] || hoveredIdFromContext || "";
|
|
137724
|
+
const isIdHashmap = typeof id2 === "object";
|
|
137725
|
+
const hovered = !!(isIdHashmap ? id2[hoveredId] : hoveredId === id2);
|
|
137726
|
+
const newClassName = classNames$1(className, "hoverHelper", {
|
|
137727
|
+
veAnnotationHovered: hovered
|
|
137728
|
+
});
|
|
137729
|
+
const passedProps = __spreadProps(__spreadValues({}, restProps), {
|
|
137730
|
+
id: id2,
|
|
137731
|
+
editorName,
|
|
137732
|
+
hovered,
|
|
137733
|
+
className: newClassName,
|
|
137734
|
+
onMouseOver: this.handleMouseOver,
|
|
137735
|
+
onMouseLeave: this.handleMouseLeave
|
|
137736
|
+
});
|
|
137737
|
+
if (hovered && passHoveredId) {
|
|
137738
|
+
passedProps.hoveredId = hoveredId;
|
|
137725
137739
|
}
|
|
137726
|
-
|
|
137727
|
-
}
|
|
137728
|
-
|
|
137729
|
-
|
|
137730
|
-
|
|
137731
|
-
|
|
137732
|
-
|
|
137733
|
-
|
|
137734
|
-
hoveredAnnEasyStore.hoveredAnn = annot;
|
|
137735
|
-
}
|
|
137736
|
-
if (window.__veDragging || window.__veScrolling) return;
|
|
137737
|
-
hoveredAnnotationUpdate2 && hoveredAnnotationUpdate2(idToPass, { editorName });
|
|
137738
|
-
}, "onMouseOver"),
|
|
137739
|
-
onMouseLeave: /* @__PURE__ */ __name((props) => (e2) => {
|
|
137740
|
-
hoveredAnnEasyStore.hoveredAnn = void 0;
|
|
137741
|
-
const { editorName, hoveredAnnotationClear: hoveredAnnotationClear2 } = props;
|
|
137742
|
-
e2.stopPropagation();
|
|
137743
|
-
if (window.__veDragging || window.__veScrolling) return;
|
|
137744
|
-
hoveredAnnotationClear2 && hoveredAnnotationClear2(true, { editorName });
|
|
137745
|
-
}, "onMouseLeave")
|
|
137746
|
-
})
|
|
137747
|
-
);
|
|
137740
|
+
return /* @__PURE__ */ React.createElement(WrappedComponent, __spreadValues({}, passedProps));
|
|
137741
|
+
}
|
|
137742
|
+
}, __publicField(_a2, "contextType", HoveredIdContext), _a2)
|
|
137743
|
+
);
|
|
137744
|
+
HoverComponent.displayName = `withHover(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
137745
|
+
return HoverComponent;
|
|
137746
|
+
}
|
|
137747
|
+
__name(withHover, "withHover");
|
|
137748
137748
|
const partOverhangs = [
|
|
137749
137749
|
"fivePrimeOverhang",
|
|
137750
137750
|
"fivePrimeUnderhang",
|
|
@@ -140075,9 +140075,9 @@ ${seq.sequence}
|
|
|
140075
140075
|
"text",
|
|
140076
140076
|
{
|
|
140077
140077
|
fontSize: 25,
|
|
140078
|
-
|
|
140078
|
+
className: "aminoAcidNumber",
|
|
140079
140079
|
strokeWidth: 2,
|
|
140080
|
-
transform: `scale(${3 / width * 10}
|
|
140080
|
+
transform: `scale(${3 / width * 10},${37.5 / height}) translate(${(forward ? 45 : 55) * width / 10},${4.4 * height - 4})`,
|
|
140081
140081
|
x: "0",
|
|
140082
140082
|
y: "4",
|
|
140083
140083
|
style: { textAnchor: "middle" }
|
|
@@ -142425,12 +142425,12 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
142425
142425
|
row,
|
|
142426
142426
|
sequenceLength,
|
|
142427
142427
|
topStrand,
|
|
142428
|
-
hoveredAnnotation
|
|
142428
|
+
hoveredAnnotation
|
|
142429
142429
|
} = props;
|
|
142430
142430
|
const snips = [];
|
|
142431
142431
|
const snipConnectors = [];
|
|
142432
142432
|
Object.keys(annotationRanges).sort(
|
|
142433
|
-
(a2) => annotationRanges[a2].annotation.id ===
|
|
142433
|
+
(a2) => annotationRanges[a2].annotation.id === hoveredAnnotation ? 1 : -1
|
|
142434
142434
|
).forEach(function(key) {
|
|
142435
142435
|
const annotationRange = annotationRanges[key];
|
|
142436
142436
|
let { annotation } = annotationRange;
|
|
@@ -142449,7 +142449,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
142449
142449
|
bottomSnipPosition = bottomSnipPosition && Number(bottomSnipPosition);
|
|
142450
142450
|
upstreamTopSnip = upstreamTopSnip && Number(upstreamTopSnip);
|
|
142451
142451
|
upstreamBottomSnip = upstreamBottomSnip && Number(upstreamBottomSnip);
|
|
142452
|
-
const isHovered = annotation.id ===
|
|
142452
|
+
const isHovered = annotation.id === hoveredAnnotation;
|
|
142453
142453
|
snipStyle = __spreadProps(__spreadValues({}, snipStyle), {
|
|
142454
142454
|
background: annotation.restrictionEnzyme.color
|
|
142455
142455
|
});
|
|
@@ -142566,8 +142566,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
142566
142566
|
}
|
|
142567
142567
|
__name(Cutsites, "Cutsites");
|
|
142568
142568
|
const Cutsites$1 = pure(
|
|
142569
|
-
connectToEditor(({ hoveredAnnotation
|
|
142570
|
-
hoveredAnnotation
|
|
142569
|
+
connectToEditor(({ hoveredAnnotation }) => ({
|
|
142570
|
+
hoveredAnnotation
|
|
142571
142571
|
}))(Cutsites)
|
|
142572
142572
|
);
|
|
142573
142573
|
const useShowChromQualScores = /* @__PURE__ */ __name(() => {
|
|
@@ -142966,11 +142966,11 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
142966
142966
|
const defaultContainerWidth = 400;
|
|
142967
142967
|
const defaultMarginWidth$1 = 50;
|
|
142968
142968
|
const CutsiteSelectionLayers = connectToEditor(
|
|
142969
|
-
({ hoveredAnnotation
|
|
142970
|
-
hoveredAnnotation
|
|
142969
|
+
({ hoveredAnnotation }) => ({
|
|
142970
|
+
hoveredAnnotation
|
|
142971
142971
|
})
|
|
142972
142972
|
)(/* @__PURE__ */ __name(function CutsiteSelectionLayersInner({
|
|
142973
|
-
hoveredAnnotation
|
|
142973
|
+
hoveredAnnotation,
|
|
142974
142974
|
cutsites,
|
|
142975
142975
|
annotationCommonProps,
|
|
142976
142976
|
showReverseSequence,
|
|
@@ -142978,9 +142978,9 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
142978
142978
|
alignmentData,
|
|
142979
142979
|
row
|
|
142980
142980
|
}) {
|
|
142981
|
-
return Object.keys(cutsites).sort((a2) => cutsites[a2].id ===
|
|
142981
|
+
return Object.keys(cutsites).sort((a2) => cutsites[a2].id === hoveredAnnotation ? 1 : -1).map(function(id2, index2) {
|
|
142982
142982
|
const cutsite = cutsites[id2];
|
|
142983
|
-
const isHovered =
|
|
142983
|
+
const isHovered = hoveredAnnotation === cutsite.id;
|
|
142984
142984
|
const layer = cutsite.annotation.recognitionSiteRange;
|
|
142985
142985
|
return layer.start > -1 && /* @__PURE__ */ React.createElement(
|
|
142986
142986
|
SelectionLayer$3,
|
|
@@ -145084,7 +145084,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
145084
145084
|
input.click();
|
|
145085
145085
|
}
|
|
145086
145086
|
__name(showFileDialog, "showFileDialog");
|
|
145087
|
-
const version = "0.8.
|
|
145087
|
+
const version = "0.8.28";
|
|
145088
145088
|
const packageJson = {
|
|
145089
145089
|
version
|
|
145090
145090
|
};
|
package/ove.css
CHANGED
|
@@ -11879,7 +11879,8 @@ h5 {
|
|
|
11879
11879
|
.bp3-dark .veEditor:not(.tg-simple-dna-view) {
|
|
11880
11880
|
background: #293742 !important;
|
|
11881
11881
|
}
|
|
11882
|
-
.veLabelLine
|
|
11882
|
+
.veLabelLine,
|
|
11883
|
+
.aminoAcidNumber {
|
|
11883
11884
|
stroke: black;
|
|
11884
11885
|
background: black;
|
|
11885
11886
|
}
|
|
@@ -11888,7 +11889,8 @@ h5 {
|
|
|
11888
11889
|
stroke: white;
|
|
11889
11890
|
background: white;
|
|
11890
11891
|
}
|
|
11891
|
-
.bp3-dark .veLabelLine
|
|
11892
|
+
.bp3-dark .veLabelLine,
|
|
11893
|
+
.bp3-dark .aminoAcidNumber {
|
|
11892
11894
|
stroke: #f5f8fa !important;
|
|
11893
11895
|
background: #f5f8fa !important;
|
|
11894
11896
|
}
|
package/package.json
CHANGED
package/src/Editor/darkmode.css
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
background: #293742 !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.veLabelLine
|
|
13
|
+
.veLabelLine,
|
|
14
|
+
.aminoAcidNumber {
|
|
14
15
|
stroke: black;
|
|
15
16
|
background: black;
|
|
16
17
|
}
|
|
@@ -19,7 +20,8 @@
|
|
|
19
20
|
stroke: white;
|
|
20
21
|
background: white;
|
|
21
22
|
}
|
|
22
|
-
.bp3-dark .veLabelLine
|
|
23
|
+
.bp3-dark .veLabelLine,
|
|
24
|
+
.bp3-dark .aminoAcidNumber {
|
|
23
25
|
stroke: #f5f8fa !important;
|
|
24
26
|
background: #f5f8fa !important;
|
|
25
27
|
}
|