@teselagen/ove 0.5.27 → 0.5.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/index.cjs.js +19 -13
- package/index.es.js +19 -13
- package/index.umd.js +19 -13
- package/package.json +1 -1
- package/src/CircularView/index.js +0 -2
- package/src/RowItem/Sequence.js +17 -7
- package/src/style.css +0 -3
- package/src/withEditorInteractions/clickAndDragUtils.js +0 -2
- package/style.css +0 -3
package/index.cjs.js
CHANGED
|
@@ -117907,10 +117907,10 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117907
117907
|
}, containerStyle);
|
|
117908
117908
|
const width = rowSeqLen * charWidth2;
|
|
117909
117909
|
let inner2;
|
|
117910
|
-
const shared =
|
|
117910
|
+
const shared = {
|
|
117911
117911
|
y: height2 - height2 / 4,
|
|
117912
117912
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
117913
|
-
}
|
|
117913
|
+
};
|
|
117914
117914
|
if (scrollData) {
|
|
117915
117915
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
117916
117916
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -117924,12 +117924,13 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117924
117924
|
const x = i * chunkWidth;
|
|
117925
117925
|
if (x > visibleEnd || x + textLength < visibleStart)
|
|
117926
117926
|
return null;
|
|
117927
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
117927
117928
|
return /* @__PURE__ */ React$2.createElement(
|
|
117928
117929
|
"text",
|
|
117929
117930
|
__spreadValues({
|
|
117930
117931
|
key: i
|
|
117931
117932
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
117932
|
-
textLength:
|
|
117933
|
+
textLength: tlToUse,
|
|
117933
117934
|
x: x + fudge / 2,
|
|
117934
117935
|
lengthAdjust: "spacing"
|
|
117935
117936
|
})),
|
|
@@ -117937,16 +117938,22 @@ const _Sequence = class _Sequence extends React$2.Component {
|
|
|
117937
117938
|
);
|
|
117938
117939
|
});
|
|
117939
117940
|
} else {
|
|
117941
|
+
const tlToUse = Math.max(
|
|
117942
|
+
0,
|
|
117943
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117944
|
+
);
|
|
117940
117945
|
inner2 = /* @__PURE__ */ React$2.createElement(
|
|
117941
117946
|
"text",
|
|
117942
117947
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
117943
117948
|
x: 0 + fudge / 2,
|
|
117944
|
-
textLength:
|
|
117945
|
-
0,
|
|
117946
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117947
|
-
)
|
|
117949
|
+
textLength: tlToUse
|
|
117948
117950
|
})),
|
|
117949
|
-
getBoldRegion({
|
|
117951
|
+
getBoldRegion({
|
|
117952
|
+
sequence: sequence2,
|
|
117953
|
+
overlapToBold,
|
|
117954
|
+
rowStart,
|
|
117955
|
+
sequenceLength
|
|
117956
|
+
})
|
|
117950
117957
|
);
|
|
117951
117958
|
}
|
|
117952
117959
|
return /* @__PURE__ */ React$2.createElement(
|
|
@@ -118058,6 +118065,9 @@ const _ColoredSequence = class _ColoredSequence extends React$2.Component {
|
|
|
118058
118065
|
__name(_ColoredSequence, "ColoredSequence");
|
|
118059
118066
|
let ColoredSequence = _ColoredSequence;
|
|
118060
118067
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
118068
|
+
if (isSafari) {
|
|
118069
|
+
return sequence2;
|
|
118070
|
+
}
|
|
118061
118071
|
const toRet = [];
|
|
118062
118072
|
const [a2, b3] = overlapToBold || [];
|
|
118063
118073
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -122401,7 +122411,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
122401
122411
|
}
|
|
122402
122412
|
__name(showFileDialog, "showFileDialog");
|
|
122403
122413
|
const name = "@teselagen/ove";
|
|
122404
|
-
const version = "0.5.
|
|
122414
|
+
const version = "0.5.27";
|
|
122405
122415
|
const main = "./src/index.js";
|
|
122406
122416
|
const type = "module";
|
|
122407
122417
|
const exports$1 = {
|
|
@@ -126443,14 +126453,12 @@ const editorClicked = /* @__PURE__ */ __name(function({
|
|
|
126443
126453
|
shiftHeld,
|
|
126444
126454
|
updateSelectionOrCaret: updateSelectionOrCaret2
|
|
126445
126455
|
}) {
|
|
126446
|
-
console.log(`asdfasfwaofijaweofj`);
|
|
126447
126456
|
const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
|
|
126448
126457
|
if (!dragInProgress || 200 > timeDif) {
|
|
126449
126458
|
updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
|
|
126450
126459
|
}
|
|
126451
126460
|
}, "editorClicked");
|
|
126452
126461
|
const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
|
|
126453
|
-
console.log(`wewfwf`);
|
|
126454
126462
|
document == null ? void 0 : document.body.classList.add("sequenceDragging");
|
|
126455
126463
|
window.__veDragging = true;
|
|
126456
126464
|
caretPositionOnDragStart = opts2.nearestCaretPos;
|
|
@@ -134131,9 +134139,7 @@ function CircularView(props) {
|
|
|
134131
134139
|
"svg",
|
|
134132
134140
|
{
|
|
134133
134141
|
key: "circViewSvg",
|
|
134134
|
-
onTouch: true,
|
|
134135
134142
|
onClick: (event) => {
|
|
134136
|
-
console.log(`23232323`);
|
|
134137
134143
|
instantiated && getNearestCursorPositionToMouseEvent(
|
|
134138
134144
|
event,
|
|
134139
134145
|
toPass,
|
package/index.es.js
CHANGED
|
@@ -117889,10 +117889,10 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117889
117889
|
}, containerStyle);
|
|
117890
117890
|
const width = rowSeqLen * charWidth2;
|
|
117891
117891
|
let inner2;
|
|
117892
|
-
const shared =
|
|
117892
|
+
const shared = {
|
|
117893
117893
|
y: height2 - height2 / 4,
|
|
117894
117894
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
117895
|
-
}
|
|
117895
|
+
};
|
|
117896
117896
|
if (scrollData) {
|
|
117897
117897
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
117898
117898
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -117906,12 +117906,13 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117906
117906
|
const x = i * chunkWidth;
|
|
117907
117907
|
if (x > visibleEnd || x + textLength < visibleStart)
|
|
117908
117908
|
return null;
|
|
117909
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
117909
117910
|
return /* @__PURE__ */ React__default$1.createElement(
|
|
117910
117911
|
"text",
|
|
117911
117912
|
__spreadValues({
|
|
117912
117913
|
key: i
|
|
117913
117914
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
117914
|
-
textLength:
|
|
117915
|
+
textLength: tlToUse,
|
|
117915
117916
|
x: x + fudge / 2,
|
|
117916
117917
|
lengthAdjust: "spacing"
|
|
117917
117918
|
})),
|
|
@@ -117919,16 +117920,22 @@ const _Sequence = class _Sequence extends React__default$1.Component {
|
|
|
117919
117920
|
);
|
|
117920
117921
|
});
|
|
117921
117922
|
} else {
|
|
117923
|
+
const tlToUse = Math.max(
|
|
117924
|
+
0,
|
|
117925
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117926
|
+
);
|
|
117922
117927
|
inner2 = /* @__PURE__ */ React__default$1.createElement(
|
|
117923
117928
|
"text",
|
|
117924
117929
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
117925
117930
|
x: 0 + fudge / 2,
|
|
117926
|
-
textLength:
|
|
117927
|
-
0,
|
|
117928
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
117929
|
-
)
|
|
117931
|
+
textLength: tlToUse
|
|
117930
117932
|
})),
|
|
117931
|
-
getBoldRegion({
|
|
117933
|
+
getBoldRegion({
|
|
117934
|
+
sequence: sequence2,
|
|
117935
|
+
overlapToBold,
|
|
117936
|
+
rowStart,
|
|
117937
|
+
sequenceLength
|
|
117938
|
+
})
|
|
117932
117939
|
);
|
|
117933
117940
|
}
|
|
117934
117941
|
return /* @__PURE__ */ React__default$1.createElement(
|
|
@@ -118040,6 +118047,9 @@ const _ColoredSequence = class _ColoredSequence extends React__default$1.Compone
|
|
|
118040
118047
|
__name(_ColoredSequence, "ColoredSequence");
|
|
118041
118048
|
let ColoredSequence = _ColoredSequence;
|
|
118042
118049
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
118050
|
+
if (isSafari) {
|
|
118051
|
+
return sequence2;
|
|
118052
|
+
}
|
|
118043
118053
|
const toRet = [];
|
|
118044
118054
|
const [a2, b3] = overlapToBold || [];
|
|
118045
118055
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -122383,7 +122393,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
122383
122393
|
}
|
|
122384
122394
|
__name(showFileDialog, "showFileDialog");
|
|
122385
122395
|
const name = "@teselagen/ove";
|
|
122386
|
-
const version = "0.5.
|
|
122396
|
+
const version = "0.5.27";
|
|
122387
122397
|
const main = "./src/index.js";
|
|
122388
122398
|
const type = "module";
|
|
122389
122399
|
const exports$1 = {
|
|
@@ -126425,14 +126435,12 @@ const editorClicked = /* @__PURE__ */ __name(function({
|
|
|
126425
126435
|
shiftHeld,
|
|
126426
126436
|
updateSelectionOrCaret: updateSelectionOrCaret2
|
|
126427
126437
|
}) {
|
|
126428
|
-
console.log(`asdfasfwaofijaweofj`);
|
|
126429
126438
|
const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
|
|
126430
126439
|
if (!dragInProgress || 200 > timeDif) {
|
|
126431
126440
|
updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
|
|
126432
126441
|
}
|
|
126433
126442
|
}, "editorClicked");
|
|
126434
126443
|
const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
|
|
126435
|
-
console.log(`wewfwf`);
|
|
126436
126444
|
document == null ? void 0 : document.body.classList.add("sequenceDragging");
|
|
126437
126445
|
window.__veDragging = true;
|
|
126438
126446
|
caretPositionOnDragStart = opts2.nearestCaretPos;
|
|
@@ -134113,9 +134121,7 @@ function CircularView(props) {
|
|
|
134113
134121
|
"svg",
|
|
134114
134122
|
{
|
|
134115
134123
|
key: "circViewSvg",
|
|
134116
|
-
onTouch: true,
|
|
134117
134124
|
onClick: (event) => {
|
|
134118
|
-
console.log(`23232323`);
|
|
134119
134125
|
instantiated && getNearestCursorPositionToMouseEvent(
|
|
134120
134126
|
event,
|
|
134121
134127
|
toPass,
|
package/index.umd.js
CHANGED
|
@@ -146363,10 +146363,10 @@ ${seq.sequence}
|
|
|
146363
146363
|
}, containerStyle);
|
|
146364
146364
|
const width = rowSeqLen * charWidth2;
|
|
146365
146365
|
let inner2;
|
|
146366
|
-
const shared =
|
|
146366
|
+
const shared = {
|
|
146367
146367
|
y: height2 - height2 / 4,
|
|
146368
146368
|
className: "ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
146369
|
-
}
|
|
146369
|
+
};
|
|
146370
146370
|
if (scrollData) {
|
|
146371
146371
|
const numChunks = Math.ceil(rowSeqLen / chunkSize);
|
|
146372
146372
|
const chunkWidth = chunkSize * charWidth2;
|
|
@@ -146380,12 +146380,13 @@ ${seq.sequence}
|
|
|
146380
146380
|
const x2 = i2 * chunkWidth;
|
|
146381
146381
|
if (x2 > visibleEnd || x2 + textLength < visibleStart)
|
|
146382
146382
|
return null;
|
|
146383
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
146383
146384
|
return /* @__PURE__ */ React$2.createElement(
|
|
146384
146385
|
"text",
|
|
146385
146386
|
__spreadValues({
|
|
146386
146387
|
key: i2
|
|
146387
146388
|
}, __spreadProps(__spreadValues({}, shared), {
|
|
146388
|
-
textLength:
|
|
146389
|
+
textLength: tlToUse,
|
|
146389
146390
|
x: x2 + fudge / 2,
|
|
146390
146391
|
lengthAdjust: "spacing"
|
|
146391
146392
|
})),
|
|
@@ -146393,16 +146394,22 @@ ${seq.sequence}
|
|
|
146393
146394
|
);
|
|
146394
146395
|
});
|
|
146395
146396
|
} else {
|
|
146397
|
+
const tlToUse = Math.max(
|
|
146398
|
+
0,
|
|
146399
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
146400
|
+
);
|
|
146396
146401
|
inner2 = /* @__PURE__ */ React$2.createElement(
|
|
146397
146402
|
"text",
|
|
146398
146403
|
__spreadValues({}, __spreadProps(__spreadValues({}, shared), {
|
|
146399
146404
|
x: 0 + fudge / 2,
|
|
146400
|
-
textLength:
|
|
146401
|
-
0,
|
|
146402
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
146403
|
-
)
|
|
146405
|
+
textLength: tlToUse
|
|
146404
146406
|
})),
|
|
146405
|
-
getBoldRegion({
|
|
146407
|
+
getBoldRegion({
|
|
146408
|
+
sequence: sequence2,
|
|
146409
|
+
overlapToBold,
|
|
146410
|
+
rowStart,
|
|
146411
|
+
sequenceLength
|
|
146412
|
+
})
|
|
146406
146413
|
);
|
|
146407
146414
|
}
|
|
146408
146415
|
return /* @__PURE__ */ React$2.createElement(
|
|
@@ -146514,6 +146521,9 @@ ${seq.sequence}
|
|
|
146514
146521
|
__name(_ColoredSequence, "ColoredSequence");
|
|
146515
146522
|
let ColoredSequence = _ColoredSequence;
|
|
146516
146523
|
function getBoldRegion({ sequence: sequence2, overlapToBold, rowStart, sequenceLength }) {
|
|
146524
|
+
if (isSafari) {
|
|
146525
|
+
return sequence2;
|
|
146526
|
+
}
|
|
146517
146527
|
const toRet = [];
|
|
146518
146528
|
const [a2, b3] = overlapToBold || [];
|
|
146519
146529
|
for (let index2 = rowStart; index2 < sequence2.length + rowStart; index2++) {
|
|
@@ -150823,7 +150833,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
150823
150833
|
}
|
|
150824
150834
|
__name(showFileDialog, "showFileDialog");
|
|
150825
150835
|
const name = "@teselagen/ove";
|
|
150826
|
-
const version = "0.5.
|
|
150836
|
+
const version = "0.5.27";
|
|
150827
150837
|
const main = "./src/index.js";
|
|
150828
150838
|
const type = "module";
|
|
150829
150839
|
const exports$1 = {
|
|
@@ -153260,14 +153270,12 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
153260
153270
|
shiftHeld,
|
|
153261
153271
|
updateSelectionOrCaret: updateSelectionOrCaret2
|
|
153262
153272
|
}) {
|
|
153263
|
-
console.log(`asdfasfwaofijaweofj`);
|
|
153264
153273
|
const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
|
|
153265
153274
|
if (!dragInProgress || 200 > timeDif) {
|
|
153266
153275
|
updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
|
|
153267
153276
|
}
|
|
153268
153277
|
}, "editorClicked");
|
|
153269
153278
|
const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
|
|
153270
|
-
console.log(`wewfwf`);
|
|
153271
153279
|
document == null ? void 0 : document.body.classList.add("sequenceDragging");
|
|
153272
153280
|
window.__veDragging = true;
|
|
153273
153281
|
caretPositionOnDragStart = opts2.nearestCaretPos;
|
|
@@ -160948,9 +160956,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
160948
160956
|
"svg",
|
|
160949
160957
|
{
|
|
160950
160958
|
key: "circViewSvg",
|
|
160951
|
-
onTouch: true,
|
|
160952
160959
|
onClick: (event) => {
|
|
160953
|
-
console.log(`23232323`);
|
|
160954
160960
|
instantiated && getNearestCursorPositionToMouseEvent(
|
|
160955
160961
|
event,
|
|
160956
160962
|
toPass,
|
package/package.json
CHANGED
package/src/RowItem/Sequence.js
CHANGED
|
@@ -90,7 +90,6 @@ class Sequence extends React.Component {
|
|
|
90
90
|
|
|
91
91
|
let inner;
|
|
92
92
|
const shared = {
|
|
93
|
-
...(isSafari ? { letterSpacing: "3px" } : {}),
|
|
94
93
|
y: height - height / 4,
|
|
95
94
|
className:
|
|
96
95
|
"ve-monospace-font " + (isReverse ? " ve-sequence-reverse" : "")
|
|
@@ -108,12 +107,13 @@ class Sequence extends React.Component {
|
|
|
108
107
|
const textLength = charWidth * seqChunk.length;
|
|
109
108
|
const x = i * chunkWidth;
|
|
110
109
|
if (x > visibleEnd || x + textLength < visibleStart) return null;
|
|
110
|
+
const tlToUse = Math.max(0, textLength - fudge - fudge2);
|
|
111
111
|
return (
|
|
112
112
|
<text
|
|
113
113
|
key={i}
|
|
114
114
|
{...{
|
|
115
115
|
...shared,
|
|
116
|
-
textLength:
|
|
116
|
+
textLength: tlToUse,
|
|
117
117
|
x: x + fudge / 2,
|
|
118
118
|
lengthAdjust: "spacing"
|
|
119
119
|
}}
|
|
@@ -123,18 +123,24 @@ class Sequence extends React.Component {
|
|
|
123
123
|
);
|
|
124
124
|
});
|
|
125
125
|
} else {
|
|
126
|
+
const tlToUse = Math.max(
|
|
127
|
+
0,
|
|
128
|
+
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
129
|
+
);
|
|
126
130
|
inner = (
|
|
127
131
|
<text
|
|
128
132
|
{...{
|
|
129
133
|
...shared,
|
|
130
134
|
x: 0 + fudge / 2,
|
|
131
|
-
textLength:
|
|
132
|
-
0,
|
|
133
|
-
(alignmentData ? seqReadWidth : width) - fudge - fudge2
|
|
134
|
-
)
|
|
135
|
+
textLength: tlToUse
|
|
135
136
|
}}
|
|
136
137
|
>
|
|
137
|
-
{getBoldRegion({
|
|
138
|
+
{getBoldRegion({
|
|
139
|
+
sequence,
|
|
140
|
+
overlapToBold,
|
|
141
|
+
rowStart,
|
|
142
|
+
sequenceLength
|
|
143
|
+
})}
|
|
138
144
|
</text>
|
|
139
145
|
);
|
|
140
146
|
}
|
|
@@ -257,6 +263,10 @@ class ColoredSequence extends React.Component {
|
|
|
257
263
|
}
|
|
258
264
|
|
|
259
265
|
function getBoldRegion({ sequence, overlapToBold, rowStart, sequenceLength }) {
|
|
266
|
+
if (isSafari) {
|
|
267
|
+
// safari doesn't support text length with tspans so we can't bold the sequence - https://github.com/TeselaGen/tg-oss/issues/80
|
|
268
|
+
return sequence
|
|
269
|
+
}
|
|
260
270
|
const toRet = [];
|
|
261
271
|
const [a, b] = overlapToBold || [];
|
|
262
272
|
for (let index = rowStart; index < sequence.length + rowStart; index++) {
|
package/src/style.css
CHANGED
|
@@ -73,7 +73,6 @@ export const editorClicked = function ({
|
|
|
73
73
|
shiftHeld,
|
|
74
74
|
updateSelectionOrCaret
|
|
75
75
|
}) {
|
|
76
|
-
console.log(`asdfasfwaofijaweofj`)
|
|
77
76
|
const timeDif = new Date().getTime() - dragInProgress;
|
|
78
77
|
if (!dragInProgress || 200 > timeDif) {
|
|
79
78
|
//if the drag is less than 200 ms it probably isn't a real drag!
|
|
@@ -83,7 +82,6 @@ export const editorClicked = function ({
|
|
|
83
82
|
};
|
|
84
83
|
|
|
85
84
|
export const editorDragStarted = function (opts) {
|
|
86
|
-
console.log(`wewfwf`)
|
|
87
85
|
document?.body.classList.add("sequenceDragging"); //needed to prevent the input bubble from losing focus post user drag
|
|
88
86
|
window.__veDragging = true;
|
|
89
87
|
|
package/style.css
CHANGED
|
@@ -11991,9 +11991,6 @@ tspan.vePart {
|
|
|
11991
11991
|
font-style: normal;
|
|
11992
11992
|
font-display: block;
|
|
11993
11993
|
}
|
|
11994
|
-
.veEditor {
|
|
11995
|
-
cursor:'pointer'
|
|
11996
|
-
}
|
|
11997
11994
|
.ve-monospace-font {
|
|
11998
11995
|
font-family: Menlo, Monaco, monospace;
|
|
11999
11996
|
font-size: 10px;
|