react-msaview 4.4.2 → 4.4.4

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 (145) hide show
  1. package/bundle/index.js +10 -10
  2. package/bundle/index.js.LICENSE.txt +5 -5
  3. package/bundle/index.js.map +1 -1
  4. package/dist/DataModel.d.ts +34 -0
  5. package/dist/DataModel.js +46 -0
  6. package/dist/DataModel.js.map +1 -0
  7. package/dist/DialogQueue.d.ts +25 -0
  8. package/dist/DialogQueue.js +44 -0
  9. package/dist/DialogQueue.js.map +1 -0
  10. package/dist/SelectedStructuresMixin.d.ts +46 -0
  11. package/dist/SelectedStructuresMixin.js +52 -0
  12. package/dist/SelectedStructuresMixin.js.map +1 -0
  13. package/dist/StructureModel.d.ts +9 -0
  14. package/dist/StructureModel.js +11 -0
  15. package/dist/StructureModel.js.map +1 -0
  16. package/dist/UniprotTrack.d.ts +27 -0
  17. package/dist/UniprotTrack.js +53 -0
  18. package/dist/UniprotTrack.js.map +1 -0
  19. package/dist/components/BoxTrack.d.ts +7 -0
  20. package/dist/components/BoxTrack.js +15 -0
  21. package/dist/components/BoxTrack.js.map +1 -0
  22. package/dist/components/BoxTrackBlock.d.ts +8 -0
  23. package/dist/components/BoxTrackBlock.js +136 -0
  24. package/dist/components/BoxTrackBlock.js.map +1 -0
  25. package/dist/components/ExportSVGDialog.d.ts +6 -0
  26. package/dist/components/ExportSVGDialog.js +39 -0
  27. package/dist/components/ExportSVGDialog.js.map +1 -0
  28. package/dist/components/Header.d.ts +6 -0
  29. package/dist/components/Header.js +62 -0
  30. package/dist/components/Header.js.map +1 -0
  31. package/dist/components/HeaderInfoArea.d.ts +6 -0
  32. package/dist/components/HeaderInfoArea.js +12 -0
  33. package/dist/components/HeaderInfoArea.js.map +1 -0
  34. package/dist/components/ImportForm/ImportFormExamples.d.ts +6 -0
  35. package/dist/components/ImportForm/ImportFormExamples.js +50 -0
  36. package/dist/components/ImportForm/ImportFormExamples.js.map +1 -0
  37. package/dist/components/ImportForm/data/seq2.d.ts +3 -0
  38. package/dist/components/ImportForm/data/seq2.js +33 -0
  39. package/dist/components/ImportForm/data/seq2.js.map +1 -0
  40. package/dist/components/ImportForm/index.d.ts +6 -0
  41. package/dist/components/ImportForm/index.js +31 -0
  42. package/dist/components/ImportForm/index.js.map +1 -0
  43. package/dist/components/ImportForm/util.d.ts +3 -0
  44. package/dist/components/ImportForm/util.js +16 -0
  45. package/dist/components/ImportForm/util.js.map +1 -0
  46. package/dist/components/MSACanvas.d.ts +6 -0
  47. package/dist/components/MSACanvas.js +141 -0
  48. package/dist/components/MSACanvas.js.map +1 -0
  49. package/dist/components/MSAPanel/Loading.d.ts +2 -0
  50. package/dist/components/MSAPanel/Loading.js +12 -0
  51. package/dist/components/MSAPanel/Loading.js.map +1 -0
  52. package/dist/components/MSAPanel/MSABlock.d.ts +8 -0
  53. package/dist/components/MSAPanel/MSABlock.js +62 -0
  54. package/dist/components/MSAPanel/MSABlock.js.map +1 -0
  55. package/dist/components/MSAPanel/MSACanvas.d.ts +7 -0
  56. package/dist/components/MSAPanel/MSACanvas.js +69 -0
  57. package/dist/components/MSAPanel/MSACanvas.js.map +1 -0
  58. package/dist/components/MSAPanel/MSAMouseoverCanvas.d.ts +6 -0
  59. package/dist/components/MSAPanel/MSAMouseoverCanvas.js +27 -0
  60. package/dist/components/MSAPanel/MSAMouseoverCanvas.js.map +1 -0
  61. package/dist/components/MSAPanel/index.d.ts +5 -0
  62. package/dist/components/MSAPanel/index.js +9 -0
  63. package/dist/components/MSAPanel/index.js.map +1 -0
  64. package/dist/components/MSAPanel/renderMSABlock.d.ts +9 -0
  65. package/dist/components/MSAPanel/renderMSABlock.js +89 -0
  66. package/dist/components/MSAPanel/renderMSABlock.js.map +1 -0
  67. package/dist/components/MSAPanel/renderMSABlock_BACKUP_139826.d.ts +9 -0
  68. package/dist/components/MSAPanel/renderMSABlock_BACKUP_139826.js +89 -0
  69. package/dist/components/MSAPanel/renderMSABlock_BACKUP_139826.js.map +1 -0
  70. package/dist/components/MSAPanel/renderMSABlock_BASE_139826.d.ts +13 -0
  71. package/dist/components/MSAPanel/renderMSABlock_BASE_139826.js +82 -0
  72. package/dist/components/MSAPanel/renderMSABlock_BASE_139826.js.map +1 -0
  73. package/dist/components/MSAPanel/renderMSABlock_LOCAL_139826.d.ts +9 -0
  74. package/dist/components/MSAPanel/renderMSABlock_LOCAL_139826.js +89 -0
  75. package/dist/components/MSAPanel/renderMSABlock_LOCAL_139826.js.map +1 -0
  76. package/dist/components/MSAPanel/renderMSABlock_REMOTE_139826.d.ts +0 -0
  77. package/dist/components/MSAPanel/renderMSABlock_REMOTE_139826.js +2 -0
  78. package/dist/components/MSAPanel/renderMSABlock_REMOTE_139826.js.map +1 -0
  79. package/dist/components/MSAPanel/renderMSAMouseover.d.ts +5 -0
  80. package/dist/components/MSAPanel/renderMSAMouseover.js +30 -0
  81. package/dist/components/MSAPanel/renderMSAMouseover.js.map +1 -0
  82. package/dist/components/Minimap.d.ts +6 -0
  83. package/dist/components/Minimap.js +72 -0
  84. package/dist/components/Minimap.js.map +1 -0
  85. package/dist/components/MinimapSVG.d.ts +6 -0
  86. package/dist/components/MinimapSVG.js +25 -0
  87. package/dist/components/MinimapSVG.js.map +1 -0
  88. package/dist/components/MultiAlignmentSelector.d.ts +6 -0
  89. package/dist/components/MultiAlignmentSelector.js +13 -0
  90. package/dist/components/MultiAlignmentSelector.js.map +1 -0
  91. package/dist/components/TreePanel/TreeBranchMenu.d.ts +14 -0
  92. package/dist/components/TreePanel/TreeBranchMenu.js +26 -0
  93. package/dist/components/TreePanel/TreeBranchMenu.js.map +1 -0
  94. package/dist/components/TreePanel/TreeCanvas.d.ts +6 -0
  95. package/dist/components/TreePanel/TreeCanvas.js +100 -0
  96. package/dist/components/TreePanel/TreeCanvas.js.map +1 -0
  97. package/dist/components/TreePanel/TreeCanvasBlock.d.ts +7 -0
  98. package/dist/components/TreePanel/TreeCanvasBlock.js +118 -0
  99. package/dist/components/TreePanel/TreeCanvasBlock.js.map +1 -0
  100. package/dist/components/TreePanel/TreeNodeMenu.d.ts +13 -0
  101. package/dist/components/TreePanel/TreeNodeMenu.js +74 -0
  102. package/dist/components/TreePanel/TreeNodeMenu.js.map +1 -0
  103. package/dist/components/TreePanel/TreeRuler.d.ts +6 -0
  104. package/dist/components/TreePanel/TreeRuler.js +8 -0
  105. package/dist/components/TreePanel/TreeRuler.js.map +1 -0
  106. package/dist/components/TreePanel/dialogs/TreeNodeInfoDialog.d.ts +9 -0
  107. package/dist/components/TreePanel/dialogs/TreeNodeInfoDialog.js +16 -0
  108. package/dist/components/TreePanel/dialogs/TreeNodeInfoDialog.js.map +1 -0
  109. package/dist/components/TreePanel/index.d.ts +6 -0
  110. package/dist/components/TreePanel/index.js +10 -0
  111. package/dist/components/TreePanel/index.js.map +1 -0
  112. package/dist/components/TreePanel/renderTreeCanvas.d.ts +46 -0
  113. package/dist/components/TreePanel/renderTreeCanvas.js +180 -0
  114. package/dist/components/TreePanel/renderTreeCanvas.js.map +1 -0
  115. package/dist/components/VerticalGuide.d.ts +7 -0
  116. package/dist/components/VerticalGuide.js +30 -0
  117. package/dist/components/VerticalGuide.js.map +1 -0
  118. package/dist/components/ZoomControls.d.ts +6 -0
  119. package/dist/components/ZoomControls.js +59 -0
  120. package/dist/components/ZoomControls.js.map +1 -0
  121. package/dist/components/header/Header.js +1 -1
  122. package/dist/components/header/Header.js.map +1 -1
  123. package/dist/components/header/SettingsMenu.js +1 -1
  124. package/dist/components/header/SettingsMenu.js.map +1 -1
  125. package/dist/components/msa/MSACanvas_BACKUP_139826.d.ts +7 -0
  126. package/dist/components/msa/MSACanvas_BACKUP_139826.js +68 -0
  127. package/dist/components/msa/MSACanvas_BACKUP_139826.js.map +1 -0
  128. package/dist/components/msa/MSACanvas_BASE_139826.d.ts +6 -0
  129. package/dist/components/msa/MSACanvas_BASE_139826.js +107 -0
  130. package/dist/components/msa/MSACanvas_BASE_139826.js.map +1 -0
  131. package/dist/components/msa/MSACanvas_LOCAL_139826.d.ts +7 -0
  132. package/dist/components/msa/MSACanvas_LOCAL_139826.js +69 -0
  133. package/dist/components/msa/MSACanvas_LOCAL_139826.js.map +1 -0
  134. package/dist/components/msa/MSACanvas_REMOTE_139826.d.ts +6 -0
  135. package/dist/components/msa/MSACanvas_REMOTE_139826.js +106 -0
  136. package/dist/components/msa/MSACanvas_REMOTE_139826.js.map +1 -0
  137. package/dist/sansserif.d.ts +3 -0
  138. package/dist/sansserif.js +1583 -0
  139. package/dist/sansserif.js.map +1 -0
  140. package/dist/version.d.ts +1 -1
  141. package/dist/version.js +1 -1
  142. package/package.json +7 -2
  143. package/src/components/header/Header.tsx +1 -1
  144. package/src/components/header/SettingsMenu.tsx +1 -1
  145. package/src/version.ts +1 -1
@@ -0,0 +1,34 @@
1
+ /**
2
+ * #stateModel DataModel
3
+ * the data stored for the model. this is sometimes temporary in the case that
4
+ * e.g. msaFilehandle is available on the parent model, because then the msa
5
+ * data will not be persisted in saved session snapshots, it will be fetched
6
+ * from msaFilehandle at startup
7
+ */
8
+ export declare function DataModelF(): import("mobx-state-tree").IModelType<{
9
+ /**
10
+ * #property
11
+ */
12
+ tree: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
13
+ /**
14
+ * #property
15
+ */
16
+ msa: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
17
+ /**
18
+ * #property
19
+ */
20
+ treeMetadata: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
21
+ }, {
22
+ /**
23
+ * #action
24
+ */
25
+ setTree(tree?: string): void;
26
+ /**
27
+ * #action
28
+ */
29
+ setMSA(msa?: string): void;
30
+ /**
31
+ * #action
32
+ */
33
+ setTreeMetadata(treeMetadata?: string): void;
34
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,46 @@
1
+ import { types } from 'mobx-state-tree';
2
+ /**
3
+ * #stateModel DataModel
4
+ * the data stored for the model. this is sometimes temporary in the case that
5
+ * e.g. msaFilehandle is available on the parent model, because then the msa
6
+ * data will not be persisted in saved session snapshots, it will be fetched
7
+ * from msaFilehandle at startup
8
+ */
9
+ export function DataModelF() {
10
+ return types
11
+ .model({
12
+ /**
13
+ * #property
14
+ */
15
+ tree: types.maybe(types.string),
16
+ /**
17
+ * #property
18
+ */
19
+ msa: types.maybe(types.string),
20
+ /**
21
+ * #property
22
+ */
23
+ treeMetadata: types.maybe(types.string),
24
+ })
25
+ .actions(self => ({
26
+ /**
27
+ * #action
28
+ */
29
+ setTree(tree) {
30
+ self.tree = tree;
31
+ },
32
+ /**
33
+ * #action
34
+ */
35
+ setMSA(msa) {
36
+ self.msa = msa;
37
+ },
38
+ /**
39
+ * #action
40
+ */
41
+ setTreeMetadata(treeMetadata) {
42
+ self.treeMetadata = treeMetadata;
43
+ },
44
+ }));
45
+ }
46
+ //# sourceMappingURL=DataModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataModel.js","sourceRoot":"","sources":["../src/DataModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,KAAK;SACT,KAAK,CAAC;QACL;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QAC/B;;WAEG;QACH,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9B;;WAEG;QACH,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;KACxC,CAAC;SACD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;WAEG;QACH,OAAO,CAAC,IAAa;YACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QACD;;WAEG;QACH,MAAM,CAAC,GAAY;YACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QAChB,CAAC;QACD;;WAEG;QACH,eAAe,CAAC,YAAqB;YACnC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAClC,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { DialogComponentType } from '@jbrowse/core/util';
2
+ /**
3
+ * #stateModel DialogQueueSessionMixin
4
+ */
5
+ export declare function DialogQueueSessionMixin(): import("mobx-state-tree").IModelType<{}, {
6
+ queueOfDialogs: [DialogComponentType, any][];
7
+ } & {
8
+ /**
9
+ * #getter
10
+ */
11
+ readonly DialogComponent: DialogComponentType;
12
+ /**
13
+ * #getter
14
+ */
15
+ readonly DialogProps: any;
16
+ } & {
17
+ /**
18
+ * #action
19
+ */
20
+ removeActiveDialog(): void;
21
+ /**
22
+ * #action
23
+ */
24
+ queueDialog(cb: (doneCallback: () => void) => [DialogComponentType, unknown]): void;
25
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,44 @@
1
+ import { types } from 'mobx-state-tree';
2
+ /**
3
+ * #stateModel DialogQueueSessionMixin
4
+ */
5
+ export function DialogQueueSessionMixin() {
6
+ return types
7
+ .model('DialogQueueSessionMixin', {})
8
+ .volatile(() => ({
9
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
+ queueOfDialogs: [],
11
+ }))
12
+ .views(self => ({
13
+ /**
14
+ * #getter
15
+ */
16
+ get DialogComponent() {
17
+ return self.queueOfDialogs[0]?.[0];
18
+ },
19
+ /**
20
+ * #getter
21
+ */
22
+ get DialogProps() {
23
+ return self.queueOfDialogs[0]?.[1];
24
+ },
25
+ }))
26
+ .actions(self => ({
27
+ /**
28
+ * #action
29
+ */
30
+ removeActiveDialog() {
31
+ self.queueOfDialogs = self.queueOfDialogs.slice(1);
32
+ },
33
+ /**
34
+ * #action
35
+ */
36
+ queueDialog(cb) {
37
+ const [component, props] = cb(() => {
38
+ this.removeActiveDialog();
39
+ });
40
+ self.queueOfDialogs = [...self.queueOfDialogs, [component, props]];
41
+ },
42
+ }));
43
+ }
44
+ //# sourceMappingURL=DialogQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogQueue.js","sourceRoot":"","sources":["../src/DialogQueue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,KAAK;SACT,KAAK,CAAC,yBAAyB,EAAE,EAAE,CAAC;SACpC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QACf,8DAA8D;QAC9D,cAAc,EAAE,EAAkC;KACnD,CAAC,CAAC;SACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACd;;WAEG;QACH,IAAI,eAAe;YACjB,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACpC,CAAC;QACD;;WAEG;QACH,IAAI,WAAW;YACb,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACpC,CAAC;KACF,CAAC,CAAC;SACF,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;WAEG;QACH,kBAAkB;YAChB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACpD,CAAC;QACD;;WAEG;QACH,WAAW,CACT,EAAgE;YAEhE,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE;gBACjC,IAAI,CAAC,kBAAkB,EAAE,CAAA;YAC3B,CAAC,CAAC,CAAA;YACF,IAAI,CAAC,cAAc,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;QACpE,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { SnapshotIn } from 'mobx-state-tree';
2
+ import { StructureModel } from './StructureModel';
3
+ export type StructureSnap = SnapshotIn<typeof StructureModel>;
4
+ export declare function SelectedStructuresMixin(): import("mobx-state-tree").IModelType<{
5
+ /**
6
+ * #property
7
+ * currently "selected" structures, generally PDB 3-D protein structures
8
+ */
9
+ selectedStructures: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
10
+ id: import("mobx-state-tree").ISimpleType<string>;
11
+ structure: import("mobx-state-tree").IModelType<{
12
+ pdb: import("mobx-state-tree").ISimpleType<string>;
13
+ startPos: import("mobx-state-tree").ISimpleType<number>;
14
+ endPos: import("mobx-state-tree").ISimpleType<number>;
15
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
16
+ range: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
17
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
18
+ }, {
19
+ /**
20
+ * #action
21
+ * add to the selected structures
22
+ */
23
+ addStructureToSelection(elt: StructureSnap): void;
24
+ /**
25
+ * #action
26
+ * remove from the selected structures
27
+ */
28
+ removeStructureFromSelection(elt: StructureSnap): void;
29
+ /**
30
+ * #action
31
+ * toggle a structure from the selected structures list
32
+ */
33
+ toggleStructureSelection(elt: {
34
+ id: string;
35
+ structure: {
36
+ startPos: number;
37
+ endPos: number;
38
+ pdb: string;
39
+ };
40
+ }): void;
41
+ /**
42
+ * #action
43
+ * clear all selected structures
44
+ */
45
+ clearSelectedStructures(): void;
46
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,52 @@
1
+ import { cast, types } from 'mobx-state-tree';
2
+ import { StructureModel } from './StructureModel';
3
+ export function SelectedStructuresMixin() {
4
+ return types
5
+ .model({
6
+ /**
7
+ * #property
8
+ * currently "selected" structures, generally PDB 3-D protein structures
9
+ */
10
+ selectedStructures: types.array(StructureModel),
11
+ })
12
+ .actions(self => ({
13
+ /**
14
+ * #action
15
+ * add to the selected structures
16
+ */
17
+ addStructureToSelection(elt) {
18
+ self.selectedStructures.push(elt);
19
+ },
20
+ /**
21
+ * #action
22
+ * remove from the selected structures
23
+ */
24
+ removeStructureFromSelection(elt) {
25
+ const r = self.selectedStructures.find(node => node.id === elt.id);
26
+ if (r) {
27
+ self.selectedStructures.remove(r);
28
+ }
29
+ },
30
+ /**
31
+ * #action
32
+ * toggle a structure from the selected structures list
33
+ */
34
+ toggleStructureSelection(elt) {
35
+ const r = self.selectedStructures.find(node => node.id === elt.id);
36
+ if (r) {
37
+ self.selectedStructures.remove(r);
38
+ }
39
+ else {
40
+ self.selectedStructures.push(elt);
41
+ }
42
+ },
43
+ /**
44
+ * #action
45
+ * clear all selected structures
46
+ */
47
+ clearSelectedStructures() {
48
+ self.selectedStructures = cast([]);
49
+ },
50
+ }));
51
+ }
52
+ //# sourceMappingURL=SelectedStructuresMixin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectedStructuresMixin.js","sourceRoot":"","sources":["../src/SelectedStructuresMixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,MAAM,UAAU,uBAAuB;IACrC,OAAO,KAAK;SACT,KAAK,CAAC;QACL;;;WAGG;QACH,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC;KAChD,CAAC;SACD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;;WAGG;QACH,uBAAuB,CAAC,GAAkB;YACxC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACnC,CAAC;QAED;;;WAGG;QACH,4BAA4B,CAAC,GAAkB;YAC7C,MAAM,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAA;YAClE,IAAI,CAAC,EAAE,CAAC;gBACN,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YACnC,CAAC;QACH,CAAC;QAED;;;WAGG;QACH,wBAAwB,CAAC,GAGxB;YACC,MAAM,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAA;YAClE,IAAI,CAAC,EAAE,CAAC;gBACN,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YACnC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACnC,CAAC;QACH,CAAC;QAED;;;WAGG;QACH,uBAAuB;YACrB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;QACpC,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const StructureModel: import("mobx-state-tree").IModelType<{
2
+ id: import("mobx-state-tree").ISimpleType<string>;
3
+ structure: import("mobx-state-tree").IModelType<{
4
+ pdb: import("mobx-state-tree").ISimpleType<string>;
5
+ startPos: import("mobx-state-tree").ISimpleType<number>;
6
+ endPos: import("mobx-state-tree").ISimpleType<number>;
7
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
8
+ range: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
9
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,11 @@
1
+ import { types } from 'mobx-state-tree';
2
+ export const StructureModel = types.model({
3
+ id: types.identifier,
4
+ structure: types.model({
5
+ pdb: types.string,
6
+ startPos: types.number,
7
+ endPos: types.number,
8
+ }),
9
+ range: types.maybe(types.string),
10
+ });
11
+ //# sourceMappingURL=StructureModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StructureModel.js","sourceRoot":"","sources":["../src/StructureModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC;IACxC,EAAE,EAAE,KAAK,CAAC,UAAU;IACpB,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC;QACrB,GAAG,EAAE,KAAK,CAAC,MAAM;QACjB,QAAQ,EAAE,KAAK,CAAC,MAAM;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;IACF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;CACjC,CAAC,CAAA"}
@@ -0,0 +1,27 @@
1
+ export declare const UniprotTrack: import("mobx-state-tree").IModelType<{
2
+ id: import("mobx-state-tree").ISimpleType<string>;
3
+ accession: import("mobx-state-tree").ISimpleType<string>;
4
+ name: import("mobx-state-tree").ISimpleType<string>;
5
+ associatedRowName: import("mobx-state-tree").ISimpleType<string>;
6
+ height: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
7
+ }, {
8
+ error: unknown;
9
+ data: string | undefined;
10
+ } & {
11
+ setError(error: unknown): void;
12
+ setData(data: string): void;
13
+ } & {
14
+ afterCreate(): void;
15
+ } & {
16
+ readonly loading: boolean;
17
+ readonly features: {
18
+ seq_id: string;
19
+ source: string;
20
+ type: string;
21
+ start: number;
22
+ end: number;
23
+ score: number;
24
+ strand: string;
25
+ phase: string;
26
+ }[] | undefined;
27
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,53 @@
1
+ import { types, addDisposer } from 'mobx-state-tree';
2
+ import { autorun } from 'mobx';
3
+ // locals
4
+ import { parseGFF } from './util';
5
+ export const UniprotTrack = types
6
+ .model({
7
+ id: types.string,
8
+ accession: types.string,
9
+ name: types.string,
10
+ associatedRowName: types.string,
11
+ height: types.optional(types.number, 100),
12
+ })
13
+ .volatile(() => ({
14
+ error: undefined,
15
+ data: undefined,
16
+ }))
17
+ .actions(self => ({
18
+ setError(error) {
19
+ self.error = error;
20
+ },
21
+ setData(data) {
22
+ self.data = data;
23
+ },
24
+ }))
25
+ .actions(self => ({
26
+ afterCreate() {
27
+ addDisposer(self, autorun(async () => {
28
+ try {
29
+ const { accession } = self;
30
+ const accessionSansVersion = accession?.replace(/\.[^/.]+$/, '');
31
+ const url = `https://rest.uniprot.org/uniprotkb/${accessionSansVersion}.gff`;
32
+ const res = await fetch(url);
33
+ if (!res.ok) {
34
+ throw new Error(`HTTP ${res.status} fetching ${url}: ${await res.text()}`);
35
+ }
36
+ self.setData(await res.text());
37
+ }
38
+ catch (e) {
39
+ console.error(e);
40
+ self.setError(e);
41
+ }
42
+ }));
43
+ },
44
+ }))
45
+ .views(self => ({
46
+ get loading() {
47
+ return !self.data;
48
+ },
49
+ get features() {
50
+ return parseGFF(self.data);
51
+ },
52
+ }));
53
+ //# sourceMappingURL=UniprotTrack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UniprotTrack.js","sourceRoot":"","sources":["../src/UniprotTrack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,SAAS;AACT,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK;KAC9B,KAAK,CAAC;IACL,EAAE,EAAE,KAAK,CAAC,MAAM;IAChB,SAAS,EAAE,KAAK,CAAC,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AA;gBAChB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAClB,CAAC;QACH,CAAC,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAC,CAAC;KACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA;IACnB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC;CACF,CAAC,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IBoxTrack, MsaViewModel } from '../model';
3
+ declare const BoxTrack: ({ model, track, }: {
4
+ model: MsaViewModel;
5
+ track: IBoxTrack;
6
+ }) => React.JSX.Element;
7
+ export default BoxTrack;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { observer } from 'mobx-react';
3
+ import BoxTrackBlock from './BoxTrackBlock';
4
+ const BoxTrack = observer(function ({ model, track, }) {
5
+ const { blocksX, msaAreaWidth } = model;
6
+ const { height } = track.model;
7
+ return (React.createElement("div", { style: {
8
+ position: 'relative',
9
+ height,
10
+ width: msaAreaWidth,
11
+ overflow: 'hidden',
12
+ } }, blocksX.map(bx => (React.createElement(BoxTrackBlock, { track: track, key: bx, model: model, offsetX: bx })))));
13
+ });
14
+ export default BoxTrack;
15
+ //# sourceMappingURL=BoxTrack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxTrack.js","sourceRoot":"","sources":["../../src/components/BoxTrack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAE3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAU,EAClC,KAAK,EACL,KAAK,GAIN;IACC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IACvC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAA;IAC9B,OAAO,CACL,6BACE,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,MAAM;YACN,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,QAAQ;SACnB,IAEA,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACjB,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAI,CACpE,CAAC,CACE,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IBoxTrack, MsaViewModel } from '../model';
3
+ declare const BoxTrackBlock: ({ track, model, offsetX, }: {
4
+ track: IBoxTrack;
5
+ model: MsaViewModel;
6
+ offsetX: number;
7
+ }) => React.JSX.Element | null;
8
+ export default BoxTrackBlock;
@@ -0,0 +1,136 @@
1
+ import React, { useRef, useMemo, useEffect } from 'react';
2
+ import { observer } from 'mobx-react';
3
+ import { getSnapshot, isStateTreeNode } from 'mobx-state-tree';
4
+ import Layout from '../layout';
5
+ const BoxTrackBlock = observer(function ({ track, model, offsetX, }) {
6
+ const { blockSize, colWidth, blanks, rowHeight, highResScaleFactor, fontSize, scrollX, } = model;
7
+ const { height, features, associatedRowName } = track.model;
8
+ const feats = isStateTreeNode(features)
9
+ ? // @ts-expect-error
10
+ getSnapshot(features)
11
+ : features;
12
+ const layout = useMemo(() => {
13
+ const temp = new Layout();
14
+ feats?.forEach((feature, index) => {
15
+ const { start, end } = feature;
16
+ if (associatedRowName) {
17
+ const s = model.rowSpecificBpToPx(associatedRowName, start - 1);
18
+ const e = model.rowSpecificBpToPx(associatedRowName, end);
19
+ temp.addRect(`${index}`, s, e, rowHeight, feature);
20
+ }
21
+ else {
22
+ const s = model.globalBpToPx(start - 1);
23
+ const e = model.globalBpToPx(end);
24
+ temp.addRect(`${index}`, s, e, rowHeight, feature);
25
+ }
26
+ });
27
+ return temp;
28
+ // might convert to autorun based drawing
29
+ // eslint-disable-next-line react-hooks/exhaustive-deps
30
+ }, [rowHeight, feats, associatedRowName, model, blanks]);
31
+ const ref = useRef(null);
32
+ const labelRef = useRef(null);
33
+ const mouseoverRef = useRef(null);
34
+ useEffect(() => {
35
+ if (!ref.current) {
36
+ return;
37
+ }
38
+ const ctx = ref.current.getContext('2d');
39
+ if (!ctx) {
40
+ return;
41
+ }
42
+ ctx.resetTransform();
43
+ ctx.scale(highResScaleFactor, highResScaleFactor);
44
+ ctx.clearRect(0, 0, blockSize, height);
45
+ ctx.translate(-offsetX, 0);
46
+ ctx.textAlign = 'center';
47
+ ctx.font = ctx.font.replace(/\d+px/, `${fontSize}px`);
48
+ const xStart = Math.max(0, Math.floor(offsetX / colWidth));
49
+ ctx.fillStyle = 'goldenrod';
50
+ layout.rectangles.forEach(value => {
51
+ const { minX, maxX, minY, maxY } = value;
52
+ const x1 = (minX - xStart) * colWidth + offsetX - (offsetX % colWidth);
53
+ const x2 = (maxX - xStart) * colWidth + offsetX - (offsetX % colWidth);
54
+ if (x2 - x1 > 0) {
55
+ ctx.fillRect(x1, minY, x2 - x1, (maxY - minY) / 2);
56
+ }
57
+ });
58
+ }, [
59
+ associatedRowName,
60
+ fontSize,
61
+ blockSize,
62
+ colWidth,
63
+ layout.rectangles,
64
+ model,
65
+ rowHeight,
66
+ height,
67
+ offsetX,
68
+ highResScaleFactor,
69
+ features,
70
+ blanks,
71
+ ]);
72
+ useEffect(() => {
73
+ if (!labelRef.current) {
74
+ return;
75
+ }
76
+ const ctx = labelRef.current.getContext('2d');
77
+ if (!ctx) {
78
+ return;
79
+ }
80
+ // this logic is very similar to MSACanvas
81
+ ctx.resetTransform();
82
+ ctx.scale(highResScaleFactor, highResScaleFactor);
83
+ ctx.clearRect(0, 0, blockSize, height);
84
+ ctx.translate(-offsetX, 0);
85
+ ctx.textAlign = 'center';
86
+ ctx.font = ctx.font.replace(/\d+px/, `${Math.max(8, rowHeight - 8)}px`);
87
+ ctx.fillStyle = 'black';
88
+ ctx.textAlign = 'left';
89
+ for (const value of layout.rectangles.values()) {
90
+ const { minX, maxX, maxY, minY, data } = value;
91
+ const x1 = minX * colWidth;
92
+ const x2 = maxX * colWidth;
93
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
94
+ const feature = data;
95
+ if (x2 - x1 > 0) {
96
+ const note = feature.attributes?.Note?.[0];
97
+ const name = feature.attributes?.Name?.[0];
98
+ const type = feature.type;
99
+ ctx.fillText([type, name, note].filter(f => !!f).join(' - '), Math.max(Math.min(-scrollX, x2), x1), minY + (maxY - minY));
100
+ }
101
+ }
102
+ }, [
103
+ blockSize,
104
+ colWidth,
105
+ scrollX,
106
+ highResScaleFactor,
107
+ height,
108
+ layout.rectangles,
109
+ offsetX,
110
+ features,
111
+ model,
112
+ rowHeight,
113
+ blanks,
114
+ ]);
115
+ return !features ? null : (React.createElement(React.Fragment, null,
116
+ React.createElement("canvas", { ref: ref, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
117
+ position: 'absolute',
118
+ left: scrollX + offsetX,
119
+ width: blockSize,
120
+ height,
121
+ } }),
122
+ React.createElement("canvas", { ref: labelRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
123
+ position: 'absolute',
124
+ left: scrollX + offsetX,
125
+ width: blockSize,
126
+ height,
127
+ } }),
128
+ React.createElement("canvas", { ref: mouseoverRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
129
+ position: 'absolute',
130
+ left: scrollX + offsetX,
131
+ width: blockSize,
132
+ height,
133
+ } })));
134
+ });
135
+ export default BoxTrackBlock;
136
+ //# sourceMappingURL=BoxTrackBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxTrackBlock.js","sourceRoot":"","sources":["../../src/components/BoxTrackBlock.t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BAChB,MAAM;aACP,GACD,CACD,CACJ,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,aAAa,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { MsaViewModel } from '../model';
3
+ export default function ExportSVGDialog({ model, onClose, }: {
4
+ model: MsaViewModel;
5
+ onClose: () => void;
6
+ }): React.JSX.Element;
@@ -0,0 +1,39 @@
1
+ import React, { useState } from 'react';
2
+ import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
3
+ import { Button, Checkbox, DialogContent, DialogActions, FormControlLabel, FormControl, FormLabel, RadioGroup, Radio, Typography, useTheme, } from '@mui/material';
4
+ export default function ExportSVGDialog({ model, onClose, }) {
5
+ const [includeMinimap, setIncludeMinimap] = useState(true);
6
+ const [exportType, setExportType] = useState('viewport');
7
+ const [error, setError] = useState();
8
+ const theme = useTheme();
9
+ return (React.createElement(Dialog, { onClose: () => onClose(), open: true, title: "Export SVG" },
10
+ React.createElement(DialogContent, null,
11
+ error ? React.createElement(ErrorMessage, { error: error }) : null,
12
+ React.createElement(Typography, null, "Settings:"),
13
+ React.createElement("div", null,
14
+ React.createElement(FormControl, null,
15
+ React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: includeMinimap, onChange: event => setIncludeMinimap(event.target.checked) }), disabled: exportType === 'entire', label: "Include minimap?" }))),
16
+ React.createElement("div", null,
17
+ React.createElement(FormControl, null,
18
+ React.createElement(FormLabel, null, "Export type"),
19
+ React.createElement(RadioGroup, { value: exportType, onChange: event => setExportType(event.target.value) },
20
+ React.createElement(FormControlLabel, { value: "entire", control: React.createElement(Radio, null), label: "Entire MSA" }),
21
+ React.createElement(FormControlLabel, { value: "viewport", control: React.createElement(Radio, null), label: "Current viewport only" }))))),
22
+ React.createElement(DialogActions, null,
23
+ React.createElement(Button, { variant: "contained", color: "primary", onClick: async () => {
24
+ try {
25
+ await model.exportSVG({
26
+ theme,
27
+ includeMinimap: exportType === 'entire' ? false : includeMinimap,
28
+ exportType,
29
+ });
30
+ }
31
+ catch (e) {
32
+ console.error(e);
33
+ setError(e);
34
+ }
35
+ onClose();
36
+ } }, "Submit"),
37
+ React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => onClose() }, "Cancel"))));
38
+ }
39
+ //# sourceMappingURL=ExportSVGDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportSVGDialog.js","sourceRoot":"","sources":["../../src/components/ExportSVGDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EACL,MAAM,EACN,QAAQ,EACR,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,UAAU,EACV,QAAQ,GACT,MAAM,eAAe,CAAA;AAGtB,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,KAAK,EACL,OAAO,GAIR;IACC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC1D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;IACxD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAW,CAAA;IAC7C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,QAAC,KAAK,EAAC,YAAY;QACvD,oBAAC,aAAa;YACX,KAAK,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI;YAC9C,oBAAC,UAAU,oBAAuB;YAClC;gBACE,oBAAC,WAAW;oBACV,oBAAC,gBAAgB,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AC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,aAE7D,CACK,CACT,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { MsaViewModel } from '../model';
3
+ declare const Header: ({ model }: {
4
+ model: MsaViewModel;
5
+ }) => React.JSX.Element;
6
+ export default Header;