react-msaview 1.2.7 → 1.2.11

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.
Files changed (43) hide show
  1. package/dist/components/AboutDlg.d.ts +1 -0
  2. package/dist/components/AboutDlg.js +41 -27
  3. package/dist/components/AddTrackDlg.d.ts +1 -0
  4. package/dist/components/AddTrackDlg.js +17 -26
  5. package/dist/components/AnnotationDlg.d.ts +1 -0
  6. package/dist/components/AnnotationDlg.js +49 -47
  7. package/dist/components/BoxTrack.d.ts +1 -0
  8. package/dist/components/BoxTrack.js +22 -33
  9. package/dist/components/DetailsDlg.d.ts +1 -0
  10. package/dist/components/DetailsDlg.js +5 -14
  11. package/dist/components/Header.d.ts +1 -0
  12. package/dist/components/Header.js +38 -39
  13. package/dist/components/ImportForm.d.ts +1 -0
  14. package/dist/components/ImportForm.js +73 -73
  15. package/dist/components/MSACanvas.d.ts +1 -0
  16. package/dist/components/MSACanvas.js +10 -21
  17. package/dist/components/MSAView.d.ts +1 -0
  18. package/dist/components/MSAView.js +25 -17
  19. package/dist/components/MoreInfoDlg.d.ts +1 -0
  20. package/dist/components/MoreInfoDlg.js +5 -14
  21. package/dist/components/ResizeHandles.d.ts +1 -0
  22. package/dist/components/ResizeHandles.js +7 -6
  23. package/dist/components/Rubberband.js +46 -48
  24. package/dist/components/Ruler.d.ts +1 -0
  25. package/dist/components/Ruler.js +17 -26
  26. package/dist/components/SettingsDlg.d.ts +1 -0
  27. package/dist/components/SettingsDlg.js +24 -33
  28. package/dist/components/TextTrack.d.ts +1 -0
  29. package/dist/components/TextTrack.js +5 -17
  30. package/dist/components/Track.d.ts +1 -0
  31. package/dist/components/Track.js +24 -31
  32. package/dist/components/TrackInfoDlg.d.ts +1 -0
  33. package/dist/components/TrackInfoDlg.js +16 -23
  34. package/dist/components/TracklistDlg.d.ts +1 -0
  35. package/dist/components/TracklistDlg.js +12 -20
  36. package/dist/components/TreeCanvas.d.ts +1 -0
  37. package/dist/components/TreeCanvas.js +96 -84
  38. package/dist/components/TreeRuler.d.ts +1 -0
  39. package/dist/components/TreeRuler.js +2 -2
  40. package/dist/components/package.json +4 -16
  41. package/dist/model.d.ts +11 -2
  42. package/dist/model.js +25 -7
  43. package/package.json +4 -16
package/dist/model.d.ts CHANGED
@@ -141,7 +141,16 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
141
141
  afterCreate(): void;
142
142
  } & {
143
143
  readonly loading: boolean;
144
- readonly features: any;
144
+ readonly features: {
145
+ seq_id: string;
146
+ source: string;
147
+ type: string;
148
+ start: number;
149
+ end: number;
150
+ score: number;
151
+ strand: string;
152
+ phase: string;
153
+ }[] | undefined;
145
154
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
146
155
  turnedOffTracks: import("mobx-state-tree").IMapType<import("mobx-state-tree").ISimpleType<boolean>>;
147
156
  annotatedRegions: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
@@ -159,7 +168,7 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
159
168
  }, {
160
169
  width: number;
161
170
  } & {
162
- readonly menuItems: import("@jbrowse/core/ui").MenuItem[];
171
+ menuItems(): import("@jbrowse/core/ui").MenuItem[];
163
172
  } & {
164
173
  setDisplayName(name: string): void;
165
174
  setWidth(newWidth: number): void;
package/dist/model.js CHANGED
@@ -56,10 +56,14 @@ var __rest = (this && this.__rest) || function (s, e) {
56
56
  }
57
57
  return t;
58
58
  };
59
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
60
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
61
- to[j] = from[i];
62
- return to;
59
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
60
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
61
+ if (ar || !(i in from)) {
62
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
63
+ ar[i] = from[i];
64
+ }
65
+ }
66
+ return to.concat(ar || Array.prototype.slice.call(from));
63
67
  };
64
68
  import { cast, types, addDisposer } from 'mobx-state-tree';
65
69
  import { hierarchy, cluster } from 'd3-hierarchy';
@@ -74,7 +78,6 @@ import StockholmMSA from './parsers/StockholmMSA';
74
78
  import FastaMSA from './parsers/FastaMSA';
75
79
  import parseNewick from './parseNewick';
76
80
  import colorSchemes from './colorSchemes';
77
- import gff from '@gmod/gff';
78
81
  import { generateNodeIds } from './util';
79
82
  import TextTrack from './components/TextTrack';
80
83
  import BoxTrack from './components/BoxTrack';
@@ -183,7 +186,22 @@ var UniprotTrack = types
183
186
  return !self.data;
184
187
  },
185
188
  get features() {
186
- return gff.parseStringSync(self.data).map(function (f) { return f[0]; });
189
+ var _a;
190
+ return (_a = self.data) === null || _a === void 0 ? void 0 : _a.split('\n').map(function (f) { return f.trim(); }).filter(function (f) { return !!f; }).filter(function (f) { return !f.startsWith('#'); }).map(function (f) {
191
+ var _a = f.split('\t'), seq_id = _a[0], source = _a[1], type = _a[2], start = _a[3], end = _a[4], score = _a[5], strand = _a[6], phase = _a[7], col9 = _a[8];
192
+ return __assign({ seq_id: seq_id, source: source, type: type, start: +start, end: +end, score: +score, strand: strand, phase: phase }, Object.fromEntries(col9
193
+ .split(';')
194
+ .map(function (f) { return f.trim(); })
195
+ .filter(function (f) { return !!f; })
196
+ .map(function (f) { return f.split('='); })
197
+ .map(function (_a) {
198
+ var key = _a[0], val = _a[1];
199
+ return [
200
+ key.trim(),
201
+ decodeURIComponent(val).trim().split(',').join(' '),
202
+ ];
203
+ })));
204
+ });
187
205
  },
188
206
  }); });
189
207
  var MSAModel = types
@@ -776,7 +794,7 @@ var MSAModel = types
776
794
  },
777
795
  ]
778
796
  : [];
779
- return __spreadArray(__spreadArray(__spreadArray([], adapterTracks), boxTracks), annotationTracks);
797
+ return __spreadArray(__spreadArray(__spreadArray([], adapterTracks, true), boxTracks, true), annotationTracks, true);
780
798
  },
781
799
  get turnedOnTracks() {
782
800
  return this.tracks.filter(function (f) { return !self.turnedOffTracks.has(f.model.id); });
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.7",
2
+ "version": "1.2.11",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -18,6 +18,7 @@
18
18
  "build": "yarn tsc",
19
19
  "size": "size-limit",
20
20
  "analyze": "size-limit --why",
21
+ "preversion": "npm run build",
21
22
  "postversion": "git push --follow-tags"
22
23
  },
23
24
  "peerDependencies": {
@@ -28,33 +29,20 @@
28
29
  },
29
30
  "name": "react-msaview",
30
31
  "author": "Colin",
31
- "module": "dist/react-msaview.esm.js",
32
- "size-limit": [
33
- {
34
- "path": "dist/react-msaview.cjs.production.min.js",
35
- "limit": "10 KB"
36
- },
37
- {
38
- "path": "dist/react-msaview.esm.js",
39
- "limit": "10 KB"
40
- }
41
- ],
42
32
  "devDependencies": {
43
- "@size-limit/preset-small-lib": "^4.10.1",
44
33
  "@types/color": "^3.0.1",
45
34
  "@types/d3": "^6.7.0",
35
+ "@types/lodash": "^4.14.170",
46
36
  "@types/react": "^17.0.3",
47
37
  "@types/react-dom": "^17.0.2",
38
+ "concurrently": "^6.2.0",
48
39
  "eslint-config-react-app": "^6.0.0",
49
- "husky": "^5.1.3",
50
40
  "react": "^17.0.1",
51
41
  "react-dom": "^17.0.1",
52
- "size-limit": "^4.10.1",
53
42
  "tslib": "^2.1.0",
54
43
  "typescript": "^4.2.3"
55
44
  },
56
45
  "dependencies": {
57
- "@gmod/gff": "^1.1.2",
58
46
  "clustal-js": "^1.0.3",
59
47
  "color": "^3.1.3",
60
48
  "copy-to-clipboard": "^3.3.1",