@teselagen/ove 0.8.21 → 0.8.22

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 CHANGED
@@ -97290,7 +97290,7 @@ const temporaryAnnotations = createMergedDefaultStateReducer(
97290
97290
  features: {},
97291
97291
  primers: {},
97292
97292
  parts: {},
97293
- selectionLayer: {}
97293
+ searchLayers: []
97294
97294
  }
97295
97295
  );
97296
97296
  const temporaryAnnotations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -98093,9 +98093,10 @@ function translationsRawSelector(sequenceData2) {
98093
98093
  }
98094
98094
  __name(translationsRawSelector, "translationsRawSelector");
98095
98095
  const translationsRawSelector$1 = createSelector(sequenceDataSelector, translationsRawSelector);
98096
- function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed) {
98096
+ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed, tempSearchLayers = []) {
98097
+ const toReturn = [...tempSearchLayers];
98097
98098
  if (!searchString || !isOpen) {
98098
- return [];
98099
+ return toReturn;
98099
98100
  }
98100
98101
  if (isProtein2) {
98101
98102
  const searchingDna = dnaOrAA === "DNA";
@@ -98112,7 +98113,7 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98112
98113
  ).sort(({ start: start2 }, { start: start22 }) => {
98113
98114
  return start2 - start22;
98114
98115
  });
98115
- return searchingDna ? matches2 : matches2.map((_a2) => {
98116
+ const r2 = searchingDna ? matches2 : matches2.map((_a2) => {
98116
98117
  var _b2 = _a2, { start: start2, end: end2 } = _b2, rest = __objRest(_b2, ["start", "end"]);
98117
98118
  return __spreadProps(__spreadValues({}, rest), {
98118
98119
  isSearchLayer: true,
@@ -98120,6 +98121,10 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98120
98121
  end: end2 * 3 + 2
98121
98122
  });
98122
98123
  });
98124
+ return [
98125
+ ...toReturn,
98126
+ ...r2
98127
+ ];
98123
98128
  }
98124
98129
  if (dnaOrAA === "DNA" && ambiguousOrLiteral === "LITERAL" && mismatchesAllowed > 0) {
98125
98130
  const approxMatches = findApproxMatches(
@@ -98137,9 +98142,9 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98137
98142
  isSearchLayer: true,
98138
98143
  forward: true
98139
98144
  })).sort((a2, b3) => a2.start - b3.start);
98140
- return matches2.map((match) => __spreadProps(__spreadValues({}, match), {
98145
+ return [...toReturn, ...matches2.map((match) => __spreadProps(__spreadValues({}, match), {
98141
98146
  className: "veSearchLayer"
98142
- }));
98147
+ }))];
98143
98148
  }
98144
98149
  const matches = findSequenceMatches(sequence2, searchString, {
98145
98150
  isCircular,
@@ -98149,11 +98154,11 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98149
98154
  }).sort(({ start: start2 }, { start: start22 }) => {
98150
98155
  return start2 - start22;
98151
98156
  });
98152
- return matches.map((match) => __spreadProps(__spreadValues({}, match), {
98157
+ return [...toReturn, ...matches.map((match) => __spreadProps(__spreadValues({}, match), {
98153
98158
  forward: !match.bottomStrand,
98154
98159
  className: "veSearchLayer " + (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
98155
98160
  isSearchLayer: true
98156
- }));
98161
+ }))];
98157
98162
  }
98158
98163
  __name(searchLayersSelector, "searchLayersSelector");
98159
98164
  const searchLayersSelector$1 = createSelector(
@@ -98166,6 +98171,7 @@ const searchLayersSelector$1 = createSelector(
98166
98171
  (state2) => state2.sequenceData.isProtein,
98167
98172
  (state2) => state2.sequenceData.proteinSequence,
98168
98173
  (state2) => state2.findTool && state2.findTool.mismatchesAllowed,
98174
+ (state2) => state2.temporaryAnnotations.searchLayers,
98169
98175
  searchLayersSelector
98170
98176
  );
98171
98177
  const translationSearchMatchesSelector = createSelector(
@@ -116931,7 +116937,7 @@ function showFileDialog({ multiple = false, onSelect }) {
116931
116937
  input.click();
116932
116938
  }
116933
116939
  __name(showFileDialog, "showFileDialog");
116934
- const version = "0.8.20";
116940
+ const version = "0.8.21";
116935
116941
  const packageJson = {
116936
116942
  version
116937
116943
  };
package/index.es.js CHANGED
@@ -97272,7 +97272,7 @@ const temporaryAnnotations = createMergedDefaultStateReducer(
97272
97272
  features: {},
97273
97273
  primers: {},
97274
97274
  parts: {},
97275
- selectionLayer: {}
97275
+ searchLayers: []
97276
97276
  }
97277
97277
  );
97278
97278
  const temporaryAnnotations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -98075,9 +98075,10 @@ function translationsRawSelector(sequenceData2) {
98075
98075
  }
98076
98076
  __name(translationsRawSelector, "translationsRawSelector");
98077
98077
  const translationsRawSelector$1 = createSelector(sequenceDataSelector, translationsRawSelector);
98078
- function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed) {
98078
+ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed, tempSearchLayers = []) {
98079
+ const toReturn = [...tempSearchLayers];
98079
98080
  if (!searchString || !isOpen) {
98080
- return [];
98081
+ return toReturn;
98081
98082
  }
98082
98083
  if (isProtein2) {
98083
98084
  const searchingDna = dnaOrAA === "DNA";
@@ -98094,7 +98095,7 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98094
98095
  ).sort(({ start: start2 }, { start: start22 }) => {
98095
98096
  return start2 - start22;
98096
98097
  });
98097
- return searchingDna ? matches2 : matches2.map((_a2) => {
98098
+ const r2 = searchingDna ? matches2 : matches2.map((_a2) => {
98098
98099
  var _b2 = _a2, { start: start2, end: end2 } = _b2, rest = __objRest(_b2, ["start", "end"]);
98099
98100
  return __spreadProps(__spreadValues({}, rest), {
98100
98101
  isSearchLayer: true,
@@ -98102,6 +98103,10 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98102
98103
  end: end2 * 3 + 2
98103
98104
  });
98104
98105
  });
98106
+ return [
98107
+ ...toReturn,
98108
+ ...r2
98109
+ ];
98105
98110
  }
98106
98111
  if (dnaOrAA === "DNA" && ambiguousOrLiteral === "LITERAL" && mismatchesAllowed > 0) {
98107
98112
  const approxMatches = findApproxMatches(
@@ -98119,9 +98124,9 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98119
98124
  isSearchLayer: true,
98120
98125
  forward: true
98121
98126
  })).sort((a2, b3) => a2.start - b3.start);
98122
- return matches2.map((match) => __spreadProps(__spreadValues({}, match), {
98127
+ return [...toReturn, ...matches2.map((match) => __spreadProps(__spreadValues({}, match), {
98123
98128
  className: "veSearchLayer"
98124
- }));
98129
+ }))];
98125
98130
  }
98126
98131
  const matches = findSequenceMatches(sequence2, searchString, {
98127
98132
  isCircular,
@@ -98131,11 +98136,11 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
98131
98136
  }).sort(({ start: start2 }, { start: start22 }) => {
98132
98137
  return start2 - start22;
98133
98138
  });
98134
- return matches.map((match) => __spreadProps(__spreadValues({}, match), {
98139
+ return [...toReturn, ...matches.map((match) => __spreadProps(__spreadValues({}, match), {
98135
98140
  forward: !match.bottomStrand,
98136
98141
  className: "veSearchLayer " + (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
98137
98142
  isSearchLayer: true
98138
- }));
98143
+ }))];
98139
98144
  }
98140
98145
  __name(searchLayersSelector, "searchLayersSelector");
98141
98146
  const searchLayersSelector$1 = createSelector(
@@ -98148,6 +98153,7 @@ const searchLayersSelector$1 = createSelector(
98148
98153
  (state2) => state2.sequenceData.isProtein,
98149
98154
  (state2) => state2.sequenceData.proteinSequence,
98150
98155
  (state2) => state2.findTool && state2.findTool.mismatchesAllowed,
98156
+ (state2) => state2.temporaryAnnotations.searchLayers,
98151
98157
  searchLayersSelector
98152
98158
  );
98153
98159
  const translationSearchMatchesSelector = createSelector(
@@ -116913,7 +116919,7 @@ function showFileDialog({ multiple = false, onSelect }) {
116913
116919
  input.click();
116914
116920
  }
116915
116921
  __name(showFileDialog, "showFileDialog");
116916
- const version = "0.8.20";
116922
+ const version = "0.8.21";
116917
116923
  const packageJson = {
116918
116924
  version
116919
116925
  };
package/index.umd.js CHANGED
@@ -125438,7 +125438,7 @@ ${seq.sequence}
125438
125438
  features: {},
125439
125439
  primers: {},
125440
125440
  parts: {},
125441
- selectionLayer: {}
125441
+ searchLayers: []
125442
125442
  }
125443
125443
  );
125444
125444
  const temporaryAnnotations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -126241,9 +126241,10 @@ ${seq.sequence}
126241
126241
  }
126242
126242
  __name(translationsRawSelector, "translationsRawSelector");
126243
126243
  const translationsRawSelector$1 = createSelector(sequenceDataSelector, translationsRawSelector);
126244
- function searchLayersSelector(sequence2, isCircular, isOpen2, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed) {
126244
+ function searchLayersSelector(sequence2, isCircular, isOpen2, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed, tempSearchLayers = []) {
126245
+ const toReturn = [...tempSearchLayers];
126245
126246
  if (!searchString || !isOpen2) {
126246
- return [];
126247
+ return toReturn;
126247
126248
  }
126248
126249
  if (isProtein2) {
126249
126250
  const searchingDna = dnaOrAA === "DNA";
@@ -126260,7 +126261,7 @@ ${seq.sequence}
126260
126261
  ).sort(({ start: start2 }, { start: start22 }) => {
126261
126262
  return start2 - start22;
126262
126263
  });
126263
- return searchingDna ? matches2 : matches2.map((_a2) => {
126264
+ const r2 = searchingDna ? matches2 : matches2.map((_a2) => {
126264
126265
  var _b2 = _a2, { start: start2, end: end2 } = _b2, rest = __objRest(_b2, ["start", "end"]);
126265
126266
  return __spreadProps(__spreadValues({}, rest), {
126266
126267
  isSearchLayer: true,
@@ -126268,6 +126269,10 @@ ${seq.sequence}
126268
126269
  end: end2 * 3 + 2
126269
126270
  });
126270
126271
  });
126272
+ return [
126273
+ ...toReturn,
126274
+ ...r2
126275
+ ];
126271
126276
  }
126272
126277
  if (dnaOrAA === "DNA" && ambiguousOrLiteral === "LITERAL" && mismatchesAllowed > 0) {
126273
126278
  const approxMatches = findApproxMatches(
@@ -126285,9 +126290,9 @@ ${seq.sequence}
126285
126290
  isSearchLayer: true,
126286
126291
  forward: true
126287
126292
  })).sort((a2, b3) => a2.start - b3.start);
126288
- return matches2.map((match) => __spreadProps(__spreadValues({}, match), {
126293
+ return [...toReturn, ...matches2.map((match) => __spreadProps(__spreadValues({}, match), {
126289
126294
  className: "veSearchLayer"
126290
- }));
126295
+ }))];
126291
126296
  }
126292
126297
  const matches = findSequenceMatches(sequence2, searchString, {
126293
126298
  isCircular,
@@ -126297,11 +126302,11 @@ ${seq.sequence}
126297
126302
  }).sort(({ start: start2 }, { start: start22 }) => {
126298
126303
  return start2 - start22;
126299
126304
  });
126300
- return matches.map((match) => __spreadProps(__spreadValues({}, match), {
126305
+ return [...toReturn, ...matches.map((match) => __spreadProps(__spreadValues({}, match), {
126301
126306
  forward: !match.bottomStrand,
126302
126307
  className: "veSearchLayer " + (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
126303
126308
  isSearchLayer: true
126304
- }));
126309
+ }))];
126305
126310
  }
126306
126311
  __name(searchLayersSelector, "searchLayersSelector");
126307
126312
  const searchLayersSelector$1 = createSelector(
@@ -126314,6 +126319,7 @@ ${seq.sequence}
126314
126319
  (state2) => state2.sequenceData.isProtein,
126315
126320
  (state2) => state2.sequenceData.proteinSequence,
126316
126321
  (state2) => state2.findTool && state2.findTool.mismatchesAllowed,
126322
+ (state2) => state2.temporaryAnnotations.searchLayers,
126317
126323
  searchLayersSelector
126318
126324
  );
126319
126325
  const translationSearchMatchesSelector = createSelector(
@@ -145029,7 +145035,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
145029
145035
  input.click();
145030
145036
  }
145031
145037
  __name(showFileDialog, "showFileDialog");
145032
- const version = "0.8.20";
145038
+ const version = "0.8.21";
145033
145039
  const packageJson = {
145034
145040
  version
145035
145041
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.8.21",
3
+ "version": "0.8.22",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,4 +1,4 @@
1
- declare const _default: ((state: any) => any[]) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any, args_2: any, args_3: any, args_4: any, args_5: any, args_6: any, args_7: any, args_8: any) => any[], {
1
+ declare const _default: ((state: any, ...params: any[]) => any[]) & import('reselect').OutputSelectorFields<(...args: readonly unknown[]) => any[], {
2
2
  clearCache: () => void;
3
3
  }> & {
4
4
  clearCache: () => void;
@@ -18,6 +18,6 @@ export default createMergedDefaultStateReducer(
18
18
  features: {},
19
19
  primers: {},
20
20
  parts: {},
21
- selectionLayer: {}
21
+ searchLayers: []
22
22
  }
23
23
  );
@@ -15,10 +15,12 @@ function searchLayersSelector(
15
15
  dnaOrAA,
16
16
  isProtein,
17
17
  proteinSequence,
18
- mismatchesAllowed
18
+ mismatchesAllowed,
19
+ tempSearchLayers = []
19
20
  ) {
21
+ const toReturn = [...tempSearchLayers]
20
22
  if (!searchString || !isOpen) {
21
- return [];
23
+ return toReturn;
22
24
  }
23
25
  if (isProtein) {
24
26
  const searchingDna = dnaOrAA === "DNA";
@@ -35,7 +37,7 @@ function searchLayersSelector(
35
37
  ).sort(({ start }, { start: start2 }) => {
36
38
  return start - start2;
37
39
  });
38
- return searchingDna
40
+ const r = searchingDna
39
41
  ? matches
40
42
  : matches.map(({ start, end, ...rest }) => ({
41
43
  ...rest,
@@ -43,6 +45,10 @@ function searchLayersSelector(
43
45
  start: start * 3,
44
46
  end: end * 3 + 2
45
47
  }));
48
+ return [
49
+ ...toReturn,
50
+ ...r
51
+ ];
46
52
  }
47
53
 
48
54
  // Use findApproxMatches when literal matching DNA with mismatches allowed
@@ -69,11 +75,10 @@ function searchLayersSelector(
69
75
  forward: true
70
76
  }))
71
77
  .sort((a, b) => a.start - b.start);
72
-
73
- return matches.map(match => ({
78
+ return [...toReturn, ...matches.map(match => ({
74
79
  ...match,
75
80
  className: "veSearchLayer"
76
- }));
81
+ }))];
77
82
  }
78
83
 
79
84
  // Use regular findSequenceMatches for all other cases
@@ -85,14 +90,14 @@ function searchLayersSelector(
85
90
  }).sort(({ start }, { start: start2 }) => {
86
91
  return start - start2;
87
92
  });
88
- return matches.map(match => ({
93
+ return [...toReturn, ...matches.map(match => ({
89
94
  ...match,
90
95
  forward: !match.bottomStrand,
91
96
  className:
92
97
  "veSearchLayer " +
93
98
  (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
94
99
  isSearchLayer: true
95
- }));
100
+ }))];
96
101
  }
97
102
 
98
103
  export default createSelector(
@@ -105,5 +110,6 @@ export default createSelector(
105
110
  state => state.sequenceData.isProtein,
106
111
  state => state.sequenceData.proteinSequence,
107
112
  state => state.findTool && state.findTool.mismatchesAllowed,
113
+ state => state.temporaryAnnotations.searchLayers,
108
114
  searchLayersSelector
109
115
  );