@teselagen/ove 0.7.30 → 0.7.32

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
@@ -84408,7 +84408,7 @@ function insertSequenceDataAtPositionOrRange(_sequenceDataToInsert, _existingSeq
84408
84408
  topLevelSeqData: existingSequenceData
84409
84409
  }, options));
84410
84410
  const newSequenceData = cloneDeep(existingSequenceData);
84411
- const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
84411
+ const insertLength = sequenceDataToInsert.isProtein && sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
84412
84412
  let caretPosition2 = caretPositionOrRange;
84413
84413
  const isInsertSameLengthAsSelection = sequenceDataToInsert.sequence.length === getRangeLength(caretPositionOrRange, existingSequenceData.sequence.length);
84414
84414
  if (caretPositionOrRange.start > -1 && getRangeLength(
@@ -124877,7 +124877,7 @@ function showFileDialog({ multiple = false, onSelect }) {
124877
124877
  input.click();
124878
124878
  }
124879
124879
  __name(showFileDialog, "showFileDialog");
124880
- const version = "0.7.29";
124880
+ const version = "0.7.31";
124881
124881
  const packageJson = {
124882
124882
  version
124883
124883
  };
@@ -145937,6 +145937,7 @@ function coerceInitialValue({ initialValue, minCharWidth }) {
145937
145937
  return zoomLvl;
145938
145938
  }
145939
145939
  __name(coerceInitialValue, "coerceInitialValue");
145940
+ const tabHeight = 34;
145940
145941
  let charWidthInLinearViewDefault = 12;
145941
145942
  try {
145942
145943
  const newVal2 = JSON.parse(
@@ -145951,6 +145952,7 @@ try {
145951
145952
  }
145952
145953
  const AlignmentView = /* @__PURE__ */ __name((props) => {
145953
145954
  const {
145955
+ dimensions,
145954
145956
  alignmentType,
145955
145957
  alignmentRunUpdate: alignmentRunUpdate2,
145956
145958
  alignmentName: _alignmentName,
@@ -145964,7 +145966,7 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145964
145966
  sequenceLength,
145965
145967
  shouldAutosave,
145966
145968
  store: store2,
145967
- height,
145969
+ height: _height,
145968
145970
  minimapLaneHeight,
145969
145971
  minimapLaneSpacing,
145970
145972
  isInPairwiseOverviewView,
@@ -145980,6 +145982,10 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145980
145982
  style: style2,
145981
145983
  unmappedSeqs
145982
145984
  } = props;
145985
+ let height = _height;
145986
+ if (dimensions && dimensions.height) {
145987
+ height = dimensions.height - tabHeight;
145988
+ }
145983
145989
  const _a2 = props, {
145984
145990
  alignmentId,
145985
145991
  alignmentTrackIndex,
@@ -150530,7 +150536,7 @@ function ToolBar(props) {
150530
150536
  },
150531
150537
  items
150532
150538
  ) : items
150533
- ), /* @__PURE__ */ React.createElement("div", { style: { height: 34, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150539
+ ), /* @__PURE__ */ React.createElement("div", { style: { height: tabHeight, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150534
150540
  }
150535
150541
  __name(ToolBar, "ToolBar");
150536
150542
  const CloseFullscreenButton = /* @__PURE__ */ __name((props) => {
@@ -152727,7 +152733,6 @@ const reorder = /* @__PURE__ */ __name((list2, startIndex, endIndex) => {
152727
152733
  result.splice(endIndex, 0, removed);
152728
152734
  return result;
152729
152735
  }, "reorder");
152730
- const tabHeight = 34;
152731
152736
  const getSplitScreenListStyle = /* @__PURE__ */ __name((isDraggingOver, isDragging2) => {
152732
152737
  return __spreadProps(__spreadValues(__spreadValues({
152733
152738
  position: "absolute",
package/index.es.js CHANGED
@@ -84390,7 +84390,7 @@ function insertSequenceDataAtPositionOrRange(_sequenceDataToInsert, _existingSeq
84390
84390
  topLevelSeqData: existingSequenceData
84391
84391
  }, options));
84392
84392
  const newSequenceData = cloneDeep(existingSequenceData);
84393
- const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
84393
+ const insertLength = sequenceDataToInsert.isProtein && sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
84394
84394
  let caretPosition2 = caretPositionOrRange;
84395
84395
  const isInsertSameLengthAsSelection = sequenceDataToInsert.sequence.length === getRangeLength(caretPositionOrRange, existingSequenceData.sequence.length);
84396
84396
  if (caretPositionOrRange.start > -1 && getRangeLength(
@@ -124859,7 +124859,7 @@ function showFileDialog({ multiple = false, onSelect }) {
124859
124859
  input.click();
124860
124860
  }
124861
124861
  __name(showFileDialog, "showFileDialog");
124862
- const version = "0.7.29";
124862
+ const version = "0.7.31";
124863
124863
  const packageJson = {
124864
124864
  version
124865
124865
  };
@@ -145919,6 +145919,7 @@ function coerceInitialValue({ initialValue, minCharWidth }) {
145919
145919
  return zoomLvl;
145920
145920
  }
145921
145921
  __name(coerceInitialValue, "coerceInitialValue");
145922
+ const tabHeight = 34;
145922
145923
  let charWidthInLinearViewDefault = 12;
145923
145924
  try {
145924
145925
  const newVal2 = JSON.parse(
@@ -145933,6 +145934,7 @@ try {
145933
145934
  }
145934
145935
  const AlignmentView = /* @__PURE__ */ __name((props) => {
145935
145936
  const {
145937
+ dimensions,
145936
145938
  alignmentType,
145937
145939
  alignmentRunUpdate: alignmentRunUpdate2,
145938
145940
  alignmentName: _alignmentName,
@@ -145946,7 +145948,7 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145946
145948
  sequenceLength,
145947
145949
  shouldAutosave,
145948
145950
  store: store2,
145949
- height,
145951
+ height: _height,
145950
145952
  minimapLaneHeight,
145951
145953
  minimapLaneSpacing,
145952
145954
  isInPairwiseOverviewView,
@@ -145962,6 +145964,10 @@ const AlignmentView = /* @__PURE__ */ __name((props) => {
145962
145964
  style: style2,
145963
145965
  unmappedSeqs
145964
145966
  } = props;
145967
+ let height = _height;
145968
+ if (dimensions && dimensions.height) {
145969
+ height = dimensions.height - tabHeight;
145970
+ }
145965
145971
  const _a2 = props, {
145966
145972
  alignmentId,
145967
145973
  alignmentTrackIndex,
@@ -150512,7 +150518,7 @@ function ToolBar(props) {
150512
150518
  },
150513
150519
  items
150514
150520
  ) : items
150515
- ), /* @__PURE__ */ React__default.createElement("div", { style: { height: 34, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React__default.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150521
+ ), /* @__PURE__ */ React__default.createElement("div", { style: { height: tabHeight, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React__default.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
150516
150522
  }
150517
150523
  __name(ToolBar, "ToolBar");
150518
150524
  const CloseFullscreenButton = /* @__PURE__ */ __name((props) => {
@@ -152709,7 +152715,6 @@ const reorder = /* @__PURE__ */ __name((list2, startIndex, endIndex) => {
152709
152715
  result.splice(endIndex, 0, removed);
152710
152716
  return result;
152711
152717
  }, "reorder");
152712
- const tabHeight = 34;
152713
152718
  const getSplitScreenListStyle = /* @__PURE__ */ __name((isDraggingOver, isDragging2) => {
152714
152719
  return __spreadProps(__spreadValues(__spreadValues({
152715
152720
  position: "absolute",
package/index.umd.js CHANGED
@@ -113311,7 +113311,7 @@ ${latestSubscriptionCallbackError.current.stack}
113311
113311
  topLevelSeqData: existingSequenceData
113312
113312
  }, options));
113313
113313
  const newSequenceData = cloneDeep(existingSequenceData);
113314
- const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
113314
+ const insertLength = sequenceDataToInsert.isProtein && sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
113315
113315
  let caretPosition2 = caretPositionOrRange;
113316
113316
  const isInsertSameLengthAsSelection = sequenceDataToInsert.sequence.length === getRangeLength(caretPositionOrRange, existingSequenceData.sequence.length);
113317
113317
  if (caretPositionOrRange.start > -1 && getRangeLength(
@@ -152975,7 +152975,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
152975
152975
  input.click();
152976
152976
  }
152977
152977
  __name(showFileDialog, "showFileDialog");
152978
- const version = "0.7.29";
152978
+ const version = "0.7.31";
152979
152979
  const packageJson = {
152980
152980
  version
152981
152981
  };
@@ -172433,6 +172433,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172433
172433
  return zoomLvl;
172434
172434
  }
172435
172435
  __name(coerceInitialValue, "coerceInitialValue");
172436
+ const tabHeight = 34;
172436
172437
  let charWidthInLinearViewDefault = 12;
172437
172438
  try {
172438
172439
  const newVal2 = JSON.parse(
@@ -172447,6 +172448,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172447
172448
  }
172448
172449
  const AlignmentView = /* @__PURE__ */ __name((props) => {
172449
172450
  const {
172451
+ dimensions,
172450
172452
  alignmentType,
172451
172453
  alignmentRunUpdate: alignmentRunUpdate2,
172452
172454
  alignmentName: _alignmentName,
@@ -172460,7 +172462,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172460
172462
  sequenceLength,
172461
172463
  shouldAutosave,
172462
172464
  store: store2,
172463
- height,
172465
+ height: _height,
172464
172466
  minimapLaneHeight,
172465
172467
  minimapLaneSpacing,
172466
172468
  isInPairwiseOverviewView,
@@ -172476,6 +172478,10 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
172476
172478
  style: style2,
172477
172479
  unmappedSeqs
172478
172480
  } = props;
172481
+ let height = _height;
172482
+ if (dimensions && dimensions.height) {
172483
+ height = dimensions.height - tabHeight;
172484
+ }
172479
172485
  const _a2 = props, {
172480
172486
  alignmentId,
172481
172487
  alignmentTrackIndex,
@@ -177026,7 +177032,7 @@ ${seqDataToCopy}\r
177026
177032
  },
177027
177033
  items
177028
177034
  ) : items
177029
- ), /* @__PURE__ */ React.createElement("div", { style: { height: 34, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
177035
+ ), /* @__PURE__ */ React.createElement("div", { style: { height: tabHeight, display: "flex" } }, additionalTopRightToolbarButtons, closeFullscreen && /* @__PURE__ */ React.createElement(CloseFullscreenButton, { onClick: handleFullscreenClose })));
177030
177036
  }
177031
177037
  __name(ToolBar, "ToolBar");
177032
177038
  const CloseFullscreenButton = /* @__PURE__ */ __name((props) => {
@@ -179223,7 +179229,6 @@ ${seqDataToCopy}\r
179223
179229
  result.splice(endIndex, 0, removed);
179224
179230
  return result;
179225
179231
  }, "reorder");
179226
- const tabHeight = 34;
179227
179232
  const getSplitScreenListStyle = /* @__PURE__ */ __name((isDraggingOver, isDragging2) => {
179228
179233
  return __spreadProps(__spreadValues(__spreadValues({
179229
179234
  position: "absolute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.7.30",
3
+ "version": "0.7.32",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,7 +18,7 @@
18
18
  "@teselagen/file-utils": "0.3.20",
19
19
  "@teselagen/range-utils": "0.3.13",
20
20
  "@teselagen/react-list": "0.8.18",
21
- "@teselagen/sequence-utils": "0.3.31",
21
+ "@teselagen/sequence-utils": "0.3.32",
22
22
  "@teselagen/ui": "0.9.4",
23
23
  "@use-gesture/react": "10.3.0",
24
24
  "biomsa": "^0.2.4",
@@ -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 {
@@ -87,6 +88,7 @@ try {
87
88
 
88
89
  export const AlignmentView = props => {
89
90
  const {
91
+ dimensions,
90
92
  alignmentType,
91
93
  alignmentRunUpdate,
92
94
  alignmentName: _alignmentName,
@@ -100,7 +102,7 @@ export const AlignmentView = props => {
100
102
  sequenceLength,
101
103
  shouldAutosave,
102
104
  store,
103
- height,
105
+ height: _height,
104
106
  minimapLaneHeight,
105
107
  minimapLaneSpacing,
106
108
  isInPairwiseOverviewView,
@@ -116,6 +118,10 @@ export const AlignmentView = props => {
116
118
  style,
117
119
  unmappedSeqs
118
120
  } = props;
121
+ let height = _height;
122
+ if (dimensions && dimensions.height) {
123
+ height = dimensions.height - tabHeight; //subtract the height of the tab header
124
+ }
119
125
 
120
126
  const {
121
127
  alignmentId,
@@ -1404,7 +1410,6 @@ export const AlignmentView = props => {
1404
1410
  updateLabelsForInViewFeatures();
1405
1411
  }
1406
1412
  };
1407
-
1408
1413
  return (
1409
1414
  <PinchHelper {...pinchHandler}>
1410
1415
  <ResizeSensor onResize={handleResize}>
@@ -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;