@teselagen/ove 0.7.31 → 0.7.33

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/constants.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export const formName: "autoAnnotate";
2
+ export const tabHeight: 34;
package/index.cjs.js CHANGED
@@ -83324,6 +83324,9 @@ function positionInCdsToPositionInMainSequence(index2, forward, translationRange
83324
83324
  }
83325
83325
  __name(positionInCdsToPositionInMainSequence, "positionInCdsToPositionInMainSequence");
83326
83326
  function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
83327
+ if (!originalSequenceString) {
83328
+ return [];
83329
+ }
83327
83330
  const {
83328
83331
  sequenceString,
83329
83332
  translationRange,
@@ -124877,7 +124880,7 @@ function showFileDialog({ multiple = false, onSelect }) {
124877
124880
  input.click();
124878
124881
  }
124879
124882
  __name(showFileDialog, "showFileDialog");
124880
- const version = "0.7.30";
124883
+ const version = "0.7.32";
124881
124884
  const packageJson = {
124882
124885
  version
124883
124886
  };
@@ -145937,6 +145940,7 @@ function coerceInitialValue({ initialValue, minCharWidth }) {
145937
145940
  return zoomLvl;
145938
145941
  }
145939
145942
  __name(coerceInitialValue, "coerceInitialValue");
145943
+ const tabHeight = 34;
145940
145944
  let charWidthInLinearViewDefault = 12;
145941
145945
  try {
145942
145946
  const newVal2 = JSON.parse(
@@ -145962,7 +145966,6 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145962
145966
  scrollPercentageToJumpTo,
145963
145967
  selectionLayer: selectionLayer2,
145964
145968
  sequenceData: sequenceData2,
145965
- sequenceLength,
145966
145969
  shouldAutosave,
145967
145970
  store: store2,
145968
145971
  height: _height,
@@ -145983,7 +145986,7 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145983
145986
  } = props;
145984
145987
  let height = _height;
145985
145988
  if (dimensions && dimensions.height) {
145986
- height = dimensions.height;
145989
+ height = dimensions.height - tabHeight;
145987
145990
  }
145988
145991
  const _a2 = props, {
145989
145992
  alignmentId,
@@ -146176,11 +146179,11 @@ ${seqDataToCopy}\r
146176
146179
  const forceReduxSelectionLayerUpdate = /* @__PURE__ */ __name((newSelection) => {
146177
146180
  selectionLayerUpdate2(newSelection, { forceReduxUpdate: true });
146178
146181
  }, "forceReduxSelectionLayerUpdate");
146179
- const sequenceLength2 = getSequenceLength();
146182
+ const sequenceLength = getSequenceLength();
146180
146183
  updateSelectionOrCaret({
146181
146184
  doNotWrapOrigin: true,
146182
146185
  shiftHeld,
146183
- sequenceLength: sequenceLength2,
146186
+ sequenceLength,
146184
146187
  newRangeOrCaret,
146185
146188
  caretPosition: easyStore2.current.caretPosition,
146186
146189
  selectionLayer: easyStore2.current.selectionLayer,
@@ -146210,11 +146213,12 @@ ${seqDataToCopy}\r
146210
146213
  if (sequenceData2 == null ? void 0 : sequenceData2.isProtein) {
146211
146214
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
146212
146215
  }
146216
+ const sequenceLength = getSequenceLength();
146213
146217
  if (sequenceLength === 0) nearestCaretPos = 0;
146214
146218
  const callbackVals = {
146215
146219
  updateSelectionOrCaret: updateSelectionOrCaret$1,
146216
146220
  nearestCaretPos,
146217
- sequenceLength: getSequenceLength(),
146221
+ sequenceLength,
146218
146222
  caretPosition: easyStore2.current.caretPosition,
146219
146223
  selectionLayer: easyStore2.current.selectionLayer,
146220
146224
  easyStore: easyStore2.current,
@@ -146241,7 +146245,6 @@ ${seqDataToCopy}\r
146241
146245
  nameDivWidth,
146242
146246
  selectionLayerUpdate2,
146243
146247
  sequenceData2 == null ? void 0 : sequenceData2.isProtein,
146244
- sequenceLength,
146245
146248
  updateSelectionOrCaret$1
146246
146249
  ]
146247
146250
  );
@@ -150535,7 +150538,7 @@ function ToolBar(props) {
150535
150538
  },
150536
150539
  items
150537
150540
  ) : items
150538
- ), /* @__PURE__ */ React.createElement("div", { style: { height: 34, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150541
+ ), /* @__PURE__ */ React.createElement("div", { style: { height: tabHeight, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150539
150542
  }
150540
150543
  __name(ToolBar, "ToolBar");
150541
150544
  const CloseFullscreenButton = /* @__PURE__ */ __name((props) => {
@@ -152732,7 +152735,6 @@ const reorder = /* @__PURE__ */ __name((list2, startIndex, endIndex) => {
152732
152735
  result.splice(endIndex, 0, removed);
152733
152736
  return result;
152734
152737
  }, "reorder");
152735
- const tabHeight = 34;
152736
152738
  const getSplitScreenListStyle = /* @__PURE__ */ __name((isDraggingOver, isDragging2) => {
152737
152739
  return __spreadProps(__spreadValues(__spreadValues({
152738
152740
  position: "absolute",
package/index.es.js CHANGED
@@ -83306,6 +83306,9 @@ function positionInCdsToPositionInMainSequence(index2, forward, translationRange
83306
83306
  }
83307
83307
  __name(positionInCdsToPositionInMainSequence, "positionInCdsToPositionInMainSequence");
83308
83308
  function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
83309
+ if (!originalSequenceString) {
83310
+ return [];
83311
+ }
83309
83312
  const {
83310
83313
  sequenceString,
83311
83314
  translationRange,
@@ -124859,7 +124862,7 @@ function showFileDialog({ multiple = false, onSelect }) {
124859
124862
  input.click();
124860
124863
  }
124861
124864
  __name(showFileDialog, "showFileDialog");
124862
- const version = "0.7.30";
124865
+ const version = "0.7.32";
124863
124866
  const packageJson = {
124864
124867
  version
124865
124868
  };
@@ -145919,6 +145922,7 @@ function coerceInitialValue({ initialValue, minCharWidth }) {
145919
145922
  return zoomLvl;
145920
145923
  }
145921
145924
  __name(coerceInitialValue, "coerceInitialValue");
145925
+ const tabHeight = 34;
145922
145926
  let charWidthInLinearViewDefault = 12;
145923
145927
  try {
145924
145928
  const newVal2 = JSON.parse(
@@ -145944,7 +145948,6 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145944
145948
  scrollPercentageToJumpTo,
145945
145949
  selectionLayer: selectionLayer2,
145946
145950
  sequenceData: sequenceData2,
145947
- sequenceLength,
145948
145951
  shouldAutosave,
145949
145952
  store: store2,
145950
145953
  height: _height,
@@ -145965,7 +145968,7 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145965
145968
  } = props;
145966
145969
  let height = _height;
145967
145970
  if (dimensions && dimensions.height) {
145968
- height = dimensions.height;
145971
+ height = dimensions.height - tabHeight;
145969
145972
  }
145970
145973
  const _a2 = props, {
145971
145974
  alignmentId,
@@ -146158,11 +146161,11 @@ ${seqDataToCopy}\r
146158
146161
  const forceReduxSelectionLayerUpdate = /* @__PURE__ */ __name((newSelection) => {
146159
146162
  selectionLayerUpdate2(newSelection, { forceReduxUpdate: true });
146160
146163
  }, "forceReduxSelectionLayerUpdate");
146161
- const sequenceLength2 = getSequenceLength();
146164
+ const sequenceLength = getSequenceLength();
146162
146165
  updateSelectionOrCaret({
146163
146166
  doNotWrapOrigin: true,
146164
146167
  shiftHeld,
146165
- sequenceLength: sequenceLength2,
146168
+ sequenceLength,
146166
146169
  newRangeOrCaret,
146167
146170
  caretPosition: easyStore2.current.caretPosition,
146168
146171
  selectionLayer: easyStore2.current.selectionLayer,
@@ -146192,11 +146195,12 @@ ${seqDataToCopy}\r
146192
146195
  if (sequenceData2 == null ? void 0 : sequenceData2.isProtein) {
146193
146196
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
146194
146197
  }
146198
+ const sequenceLength = getSequenceLength();
146195
146199
  if (sequenceLength === 0) nearestCaretPos = 0;
146196
146200
  const callbackVals = {
146197
146201
  updateSelectionOrCaret: updateSelectionOrCaret$1,
146198
146202
  nearestCaretPos,
146199
- sequenceLength: getSequenceLength(),
146203
+ sequenceLength,
146200
146204
  caretPosition: easyStore2.current.caretPosition,
146201
146205
  selectionLayer: easyStore2.current.selectionLayer,
146202
146206
  easyStore: easyStore2.current,
@@ -146223,7 +146227,6 @@ ${seqDataToCopy}\r
146223
146227
  nameDivWidth,
146224
146228
  selectionLayerUpdate2,
146225
146229
  sequenceData2 == null ? void 0 : sequenceData2.isProtein,
146226
- sequenceLength,
146227
146230
  updateSelectionOrCaret$1
146228
146231
  ]
146229
146232
  );
@@ -150517,7 +150520,7 @@ function ToolBar(props) {
150517
150520
  },
150518
150521
  items
150519
150522
  ) : items
150520
- ), /* @__PURE__ */ React__default.createElement("div", { style: { height: 34, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React__default.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150523
+ ), /* @__PURE__ */ React__default.createElement("div", { style: { height: tabHeight, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React__default.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150521
150524
  }
150522
150525
  __name(ToolBar, "ToolBar");
150523
150526
  const CloseFullscreenButton = /* @__PURE__ */ __name((props) => {
@@ -152714,7 +152717,6 @@ const reorder = /* @__PURE__ */ __name((list2, startIndex, endIndex) => {
152714
152717
  result.splice(endIndex, 0, removed);
152715
152718
  return result;
152716
152719
  }, "reorder");
152717
- const tabHeight = 34;
152718
152720
  const getSplitScreenListStyle = /* @__PURE__ */ __name((isDraggingOver, isDragging2) => {
152719
152721
  return __spreadProps(__spreadValues(__spreadValues({
152720
152722
  position: "absolute",
package/index.umd.js CHANGED
@@ -112227,6 +112227,9 @@ ${latestSubscriptionCallbackError.current.stack}
112227
112227
  }
112228
112228
  __name(positionInCdsToPositionInMainSequence, "positionInCdsToPositionInMainSequence");
112229
112229
  function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
112230
+ if (!originalSequenceString) {
112231
+ return [];
112232
+ }
112230
112233
  const {
112231
112234
  sequenceString,
112232
112235
  translationRange,
@@ -152975,7 +152978,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
152975
152978
  input.click();
152976
152979
  }
152977
152980
  __name(showFileDialog, "showFileDialog");
152978
- const version = "0.7.30";
152981
+ const version = "0.7.32";
152979
152982
  const packageJson = {
152980
152983
  version
152981
152984
  };
@@ -172433,6 +172436,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172433
172436
  return zoomLvl;
172434
172437
  }
172435
172438
  __name(coerceInitialValue, "coerceInitialValue");
172439
+ const tabHeight = 34;
172436
172440
  let charWidthInLinearViewDefault = 12;
172437
172441
  try {
172438
172442
  const newVal2 = JSON.parse(
@@ -172458,7 +172462,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172458
172462
  scrollPercentageToJumpTo,
172459
172463
  selectionLayer: selectionLayer2,
172460
172464
  sequenceData: sequenceData2,
172461
- sequenceLength,
172462
172465
  shouldAutosave,
172463
172466
  store: store2,
172464
172467
  height: _height,
@@ -172479,7 +172482,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172479
172482
  } = props;
172480
172483
  let height = _height;
172481
172484
  if (dimensions && dimensions.height) {
172482
- height = dimensions.height;
172485
+ height = dimensions.height - tabHeight;
172483
172486
  }
172484
172487
  const _a2 = props, {
172485
172488
  alignmentId,
@@ -172672,11 +172675,11 @@ ${seqDataToCopy}\r
172672
172675
  const forceReduxSelectionLayerUpdate = /* @__PURE__ */ __name((newSelection) => {
172673
172676
  selectionLayerUpdate2(newSelection, { forceReduxUpdate: true });
172674
172677
  }, "forceReduxSelectionLayerUpdate");
172675
- const sequenceLength2 = getSequenceLength();
172678
+ const sequenceLength = getSequenceLength();
172676
172679
  updateSelectionOrCaret({
172677
172680
  doNotWrapOrigin: true,
172678
172681
  shiftHeld,
172679
- sequenceLength: sequenceLength2,
172682
+ sequenceLength,
172680
172683
  newRangeOrCaret,
172681
172684
  caretPosition: easyStore2.current.caretPosition,
172682
172685
  selectionLayer: easyStore2.current.selectionLayer,
@@ -172706,11 +172709,12 @@ ${seqDataToCopy}\r
172706
172709
  if (sequenceData2 == null ? void 0 : sequenceData2.isProtein) {
172707
172710
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
172708
172711
  }
172712
+ const sequenceLength = getSequenceLength();
172709
172713
  if (sequenceLength === 0) nearestCaretPos = 0;
172710
172714
  const callbackVals = {
172711
172715
  updateSelectionOrCaret: updateSelectionOrCaret$1,
172712
172716
  nearestCaretPos,
172713
- sequenceLength: getSequenceLength(),
172717
+ sequenceLength,
172714
172718
  caretPosition: easyStore2.current.caretPosition,
172715
172719
  selectionLayer: easyStore2.current.selectionLayer,
172716
172720
  easyStore: easyStore2.current,
@@ -172737,7 +172741,6 @@ ${seqDataToCopy}\r
172737
172741
  nameDivWidth,
172738
172742
  selectionLayerUpdate2,
172739
172743
  sequenceData2 == null ? void 0 : sequenceData2.isProtein,
172740
- sequenceLength,
172741
172744
  updateSelectionOrCaret$1
172742
172745
  ]
172743
172746
  );
@@ -177031,7 +177034,7 @@ ${seqDataToCopy}\r
177031
177034
  },
177032
177035
  items
177033
177036
  ) : items
177034
- ), /* @__PURE__ */ React.createElement("div", { style: { height: 34, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
177037
+ ), /* @__PURE__ */ React.createElement("div", { style: { height: tabHeight, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
177035
177038
  }
177036
177039
  __name(ToolBar, "ToolBar");
177037
177040
  const CloseFullscreenButton = /* @__PURE__ */ __name((props) => {
@@ -179228,7 +179231,6 @@ ${seqDataToCopy}\r
179228
179231
  result.splice(endIndex, 0, removed);
179229
179232
  return result;
179230
179233
  }, "reorder");
179231
- const tabHeight = 34;
179232
179234
  const getSplitScreenListStyle = /* @__PURE__ */ __name((isDraggingOver, isDragging2) => {
179233
179235
  return __spreadProps(__spreadValues(__spreadValues({
179234
179236
  position: "absolute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.7.31",
3
+ "version": "0.7.33",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -71,6 +71,7 @@ import { updateTrackHelper } from "./updateTrackHelper";
71
71
  import { isTargetWithinEl } from "./isTargetWithinEl";
72
72
  import { EditTrackNameDialog } from "./EditTrackNameDialog";
73
73
  import { coerceInitialValue } from "./coerceInitialValue";
74
+ import { tabHeight } from "../constants";
74
75
 
75
76
  let charWidthInLinearViewDefault = 12;
76
77
  try {
@@ -98,7 +99,6 @@ export const AlignmentView = props => {
98
99
  scrollPercentageToJumpTo,
99
100
  selectionLayer,
100
101
  sequenceData,
101
- sequenceLength,
102
102
  shouldAutosave,
103
103
  store,
104
104
  height: _height,
@@ -119,7 +119,7 @@ export const AlignmentView = props => {
119
119
  } = props;
120
120
  let height = _height;
121
121
  if (dimensions && dimensions.height) {
122
- height = dimensions.height;
122
+ height = dimensions.height - tabHeight; //subtract the height of the tab header
123
123
  }
124
124
 
125
125
  const {
@@ -370,11 +370,12 @@ export const AlignmentView = props => {
370
370
  if (sequenceData?.isProtein) {
371
371
  nearestCaretPos = Math.round(nearestCaretPos / 3) * 3;
372
372
  }
373
+ const sequenceLength = getSequenceLength();
373
374
  if (sequenceLength === 0) nearestCaretPos = 0;
374
375
  const callbackVals = {
375
376
  updateSelectionOrCaret,
376
377
  nearestCaretPos,
377
- sequenceLength: getSequenceLength(),
378
+ sequenceLength,
378
379
  caretPosition: easyStore.current.caretPosition,
379
380
  selectionLayer: easyStore.current.selectionLayer,
380
381
  easyStore: easyStore.current,
@@ -401,7 +402,6 @@ export const AlignmentView = props => {
401
402
  nameDivWidth,
402
403
  selectionLayerUpdate,
403
404
  sequenceData?.isProtein,
404
- sequenceLength,
405
405
  updateSelectionOrCaret
406
406
  ]
407
407
  );
@@ -54,6 +54,7 @@ import isMobile from "is-mobile";
54
54
  import { getClientX, getClientY } from "../utils/editorUtils";
55
55
  import PCRTool from "../PCRTool/PCRTool";
56
56
  import classNames from "classnames";
57
+ import { tabHeight } from "../constants";
57
58
 
58
59
  // if (process.env.NODE_ENV !== 'production') {
59
60
  // const {whyDidYouUpdate} = require('why-did-you-update');
@@ -90,7 +91,6 @@ const reorder = (list, startIndex, endIndex) => {
90
91
 
91
92
  return result;
92
93
  };
93
- const tabHeight = 34;
94
94
 
95
95
  const getSplitScreenListStyle = (isDraggingOver, isDragging) => {
96
96
  return {
@@ -23,6 +23,7 @@ import undoTool from "./undoTool";
23
23
  import redoTool from "./redoTool";
24
24
  import isMobile from "is-mobile";
25
25
  import { useMemo } from "react";
26
+ import { tabHeight } from "../constants";
26
27
 
27
28
  const allTools = {
28
29
  downloadTool,
@@ -189,7 +190,7 @@ export function ToolBar(props) {
189
190
  items
190
191
  )}
191
192
  </div>
192
- <div style={{ height: 34, display: "flex" }}>
193
+ <div style={{ height: tabHeight, display: "flex" }}>
193
194
  {additionalTopRightToolbarButtons}
194
195
  {closeFullscreen && (
195
196
  <CloseFullscreenButton onClick={handleFullscreenClose} />
package/src/constants.js CHANGED
@@ -1 +1,2 @@
1
1
  export const formName = "autoAnnotate";
2
+ export const tabHeight = 34;