@jbrowse/plugin-linear-comparative-view 2.16.1 → 2.18.0

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 (184) hide show
  1. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +1 -1
  2. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -2
  3. package/dist/LGVSyntenyDisplay/components/util.d.ts +3 -3
  4. package/dist/LGVSyntenyDisplay/components/util.js +0 -1
  5. package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
  6. package/dist/LGVSyntenyDisplay/configSchemaF.js +12 -9
  7. package/dist/LGVSyntenyDisplay/index.d.ts +1 -1
  8. package/dist/LGVSyntenyDisplay/index.js +1 -1
  9. package/dist/LGVSyntenyDisplay/model.d.ts +104 -81
  10. package/dist/LGVSyntenyDisplay/model.js +1 -29
  11. package/dist/LaunchLinearSyntenyView.d.ts +1 -1
  12. package/dist/LaunchLinearSyntenyView.js +1 -3
  13. package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
  14. package/dist/LinearComparativeDisplay/configSchemaF.js +0 -6
  15. package/dist/LinearComparativeDisplay/index.d.ts +1 -1
  16. package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
  17. package/dist/LinearComparativeDisplay/stateModelFactory.js +13 -57
  18. package/dist/LinearComparativeView/components/Header.d.ts +1 -1
  19. package/dist/LinearComparativeView/components/Header.js +4 -5
  20. package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -1
  21. package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +3 -4
  22. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
  23. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +8 -15
  24. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
  25. package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -4
  26. package/dist/LinearComparativeView/components/Rubberband.d.ts +1 -1
  27. package/dist/LinearComparativeView/components/Rubberband.js +17 -19
  28. package/dist/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
  29. package/dist/LinearComparativeView/components/VerticalGuide.js +1 -1
  30. package/dist/LinearComparativeView/index.d.ts +1 -1
  31. package/dist/LinearComparativeView/model.d.ts +6 -62
  32. package/dist/LinearComparativeView/model.js +3 -99
  33. package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +1 -1
  34. package/dist/LinearReadVsRef/LinearReadVsRef.js +5 -19
  35. package/dist/LinearReadVsRef/index.d.ts +1 -1
  36. package/dist/LinearReadVsRef/index.js +0 -2
  37. package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  38. package/dist/LinearSyntenyDisplay/afterAttach.js +2 -9
  39. package/dist/LinearSyntenyDisplay/components/Component.d.ts +1 -1
  40. package/dist/LinearSyntenyDisplay/components/Component.js +2 -4
  41. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
  42. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +6 -23
  43. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +2 -2
  44. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
  45. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
  46. package/dist/LinearSyntenyDisplay/components/util.d.ts +3 -3
  47. package/dist/LinearSyntenyDisplay/components/util.js +0 -9
  48. package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
  49. package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -15
  50. package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  51. package/dist/LinearSyntenyDisplay/drawSynteny.js +1 -23
  52. package/dist/LinearSyntenyDisplay/index.d.ts +1 -1
  53. package/dist/LinearSyntenyDisplay/index.js +1 -2
  54. package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
  55. package/dist/LinearSyntenyDisplay/model.js +1 -92
  56. package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
  57. package/dist/LinearSyntenyView/components/ExportSvgDialog.js +2 -4
  58. package/dist/LinearSyntenyView/components/Icons.d.ts +1 -1
  59. package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +2 -2
  60. package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +1 -1
  61. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
  62. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +6 -8
  63. package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +1 -1
  64. package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +3 -5
  65. package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +3 -3
  66. package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
  67. package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
  68. package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -1
  69. package/dist/LinearSyntenyView/index.d.ts +1 -1
  70. package/dist/LinearSyntenyView/model.d.ts +5 -28
  71. package/dist/LinearSyntenyView/model.js +4 -41
  72. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
  73. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
  74. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +1 -1
  75. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
  76. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +5 -10
  77. package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
  78. package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
  79. package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
  80. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
  81. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -13
  82. package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
  83. package/dist/SyntenyFeatureDetail/index.js +1 -7
  84. package/dist/SyntenyTrack/configSchema.d.ts +1 -1
  85. package/dist/SyntenyTrack/configSchema.js +1 -9
  86. package/dist/SyntenyTrack/index.d.ts +1 -1
  87. package/dist/SyntenyTrack/index.js +1 -1
  88. package/dist/index.d.ts +1 -1
  89. package/dist/index.js +4 -4
  90. package/dist/util.d.ts +2 -2
  91. package/dist/util.js +1 -11
  92. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +1 -1
  93. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -2
  94. package/esm/LGVSyntenyDisplay/components/util.d.ts +3 -3
  95. package/esm/LGVSyntenyDisplay/components/util.js +0 -1
  96. package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
  97. package/esm/LGVSyntenyDisplay/configSchemaF.js +12 -9
  98. package/esm/LGVSyntenyDisplay/index.d.ts +1 -1
  99. package/esm/LGVSyntenyDisplay/index.js +1 -1
  100. package/esm/LGVSyntenyDisplay/model.d.ts +104 -81
  101. package/esm/LGVSyntenyDisplay/model.js +2 -30
  102. package/esm/LaunchLinearSyntenyView.d.ts +1 -1
  103. package/esm/LaunchLinearSyntenyView.js +1 -3
  104. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
  105. package/esm/LinearComparativeDisplay/configSchemaF.js +0 -6
  106. package/esm/LinearComparativeDisplay/index.d.ts +1 -1
  107. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
  108. package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -58
  109. package/esm/LinearComparativeView/components/Header.d.ts +1 -1
  110. package/esm/LinearComparativeView/components/Header.js +4 -5
  111. package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -1
  112. package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +3 -4
  113. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
  114. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +8 -15
  115. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
  116. package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -4
  117. package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
  118. package/esm/LinearComparativeView/components/Rubberband.js +18 -20
  119. package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
  120. package/esm/LinearComparativeView/components/VerticalGuide.js +1 -1
  121. package/esm/LinearComparativeView/index.d.ts +1 -1
  122. package/esm/LinearComparativeView/model.d.ts +6 -62
  123. package/esm/LinearComparativeView/model.js +4 -100
  124. package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +1 -1
  125. package/esm/LinearReadVsRef/LinearReadVsRef.js +5 -19
  126. package/esm/LinearReadVsRef/index.d.ts +1 -1
  127. package/esm/LinearReadVsRef/index.js +1 -3
  128. package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  129. package/esm/LinearSyntenyDisplay/afterAttach.js +2 -9
  130. package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
  131. package/esm/LinearSyntenyDisplay/components/Component.js +2 -4
  132. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
  133. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +8 -25
  134. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +2 -2
  135. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
  136. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
  137. package/esm/LinearSyntenyDisplay/components/util.d.ts +3 -3
  138. package/esm/LinearSyntenyDisplay/components/util.js +2 -11
  139. package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
  140. package/esm/LinearSyntenyDisplay/configSchemaF.js +0 -15
  141. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  142. package/esm/LinearSyntenyDisplay/drawSynteny.js +1 -23
  143. package/esm/LinearSyntenyDisplay/index.d.ts +1 -1
  144. package/esm/LinearSyntenyDisplay/index.js +1 -2
  145. package/esm/LinearSyntenyDisplay/model.d.ts +8 -102
  146. package/esm/LinearSyntenyDisplay/model.js +1 -92
  147. package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
  148. package/esm/LinearSyntenyView/components/ExportSvgDialog.js +2 -4
  149. package/esm/LinearSyntenyView/components/Icons.d.ts +1 -1
  150. package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +2 -2
  151. package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +2 -2
  152. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
  153. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +6 -8
  154. package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +1 -1
  155. package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +4 -6
  156. package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +3 -3
  157. package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +1 -1
  158. package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
  159. package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
  160. package/esm/LinearSyntenyView/components/LinearSyntenyView.js +0 -1
  161. package/esm/LinearSyntenyView/index.d.ts +1 -1
  162. package/esm/LinearSyntenyView/model.d.ts +5 -28
  163. package/esm/LinearSyntenyView/model.js +4 -41
  164. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
  165. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
  166. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -2
  167. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
  168. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +6 -11
  169. package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
  170. package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
  171. package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
  172. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
  173. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -13
  174. package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
  175. package/esm/SyntenyFeatureDetail/index.js +1 -7
  176. package/esm/SyntenyTrack/configSchema.d.ts +1 -1
  177. package/esm/SyntenyTrack/configSchema.js +1 -9
  178. package/esm/SyntenyTrack/index.d.ts +1 -1
  179. package/esm/SyntenyTrack/index.js +1 -1
  180. package/esm/index.d.ts +1 -1
  181. package/esm/index.js +4 -4
  182. package/esm/util.d.ts +2 -2
  183. package/esm/util.js +1 -11
  184. package/package.json +2 -4
@@ -1,6 +1,6 @@
1
1
  import { doesIntersect2, getContainingView } from '@jbrowse/core/util';
2
2
  import { draw, drawMatchSimple } from './components/util';
3
- export const MAX_COLOR_RANGE = 255 * 255 * 255; // max color range
3
+ export const MAX_COLOR_RANGE = 255 * 255 * 255;
4
4
  function makeColor(idx) {
5
5
  const r = Math.floor(idx / (255 * 255)) % 255;
6
6
  const g = Math.floor(idx / 255) % 255;
@@ -34,8 +34,6 @@ export function drawRef(model, ctx1, ctx3) {
34
34
  ctx1.beginPath();
35
35
  const offsets = view.views.map(v => v.offsetPx);
36
36
  const unitMultiplier = Math.floor(MAX_COLOR_RANGE / featPositions.length);
37
- // this loop is optimized to draw many thin lines with a single ctx.stroke
38
- // call, a separate loop below draws larger boxes
39
37
  ctx1.fillStyle = colorMap.M;
40
38
  ctx1.strokeStyle = colorMap.M;
41
39
  for (const { p11, p12, p21, p22 } of featPositions) {
@@ -48,8 +46,6 @@ export function drawRef(model, ctx1, ctx3) {
48
46
  const y1 = 0;
49
47
  const y2 = height;
50
48
  const mid = (y2 - y1) / 2;
51
- // drawing a line if the results are thin results in much less pixellation
52
- // than filling in a thin polygon
53
49
  if (l1 <= lineLimit &&
54
50
  l2 <= lineLimit &&
55
51
  x21 < width + oobLimit &&
@@ -64,8 +60,6 @@ export function drawRef(model, ctx1, ctx3) {
64
60
  }
65
61
  }
66
62
  ctx1.stroke();
67
- // this loop only draws small lines as a polyline, the polyline calls
68
- // ctx.stroke once is much more efficient than calling stroke() many times
69
63
  ctx1.fillStyle = colorMap.M;
70
64
  ctx1.strokeStyle = colorMap.M;
71
65
  for (const { p11, p12, p21, p22, f, cigar } of featPositions) {
@@ -85,17 +79,12 @@ export function drawRef(model, ctx1, ctx3) {
85
79
  const s1 = f.get('strand');
86
80
  const k1 = s1 === -1 ? x12 : x11;
87
81
  const k2 = s1 === -1 ? x11 : x12;
88
- // rev1/rev2 flip the direction of the CIGAR drawing in horizontally flipped
89
- // modes. somewhat heuristically determined, but tested for
90
82
  const rev1 = k1 < k2 ? 1 : -1;
91
83
  const rev2 = (x21 < x22 ? 1 : -1) * s1;
92
- // cx1/cx2 are the current x positions on top and bottom rows
93
84
  let cx1 = k1;
94
85
  let cx2 = s1 === -1 ? x22 : x21;
95
86
  if (cigar.length && drawCIGAR) {
96
- // continuingFlag skips drawing commands on very small CIGAR features
97
87
  let continuingFlag = false;
98
- // px1/px2 are the previous x positions on the top and bottom rows
99
88
  let px1 = 0;
100
89
  let px2 = 0;
101
90
  const unitMultiplier2 = Math.floor(MAX_COLOR_RANGE / cigar.length);
@@ -116,17 +105,11 @@ export function drawRef(model, ctx1, ctx3) {
116
105
  else if (op === 'D' || op === 'N') {
117
106
  cx1 += d1 * rev1;
118
107
  }
119
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
120
108
  else if (op === 'I') {
121
109
  cx2 += d2 * rev2;
122
110
  }
123
- // check that we are even drawing in view here, e.g. that all
124
- // points are not all less than 0 or greater than width
125
111
  if (!(Math.max(px1, px2, cx1, cx2) < 0 ||
126
112
  Math.min(px1, px2, cx1, cx2) > width)) {
127
- // if it is a small feature and not the last element of the
128
- // CIGAR (which could skip rendering it entire if we did turn
129
- // it on), then turn on continuing flag
130
113
  const isNotLast = j < cigar.length - 2;
131
114
  if (Math.abs(cx1 - px1) <= 1 &&
132
115
  Math.abs(cx2 - px2) <= 1 &&
@@ -134,9 +117,6 @@ export function drawRef(model, ctx1, ctx3) {
134
117
  continuingFlag = true;
135
118
  }
136
119
  else {
137
- // allow rendering the dominant color when using continuing
138
- // flag if the last element of continuing was a large
139
- // feature, else just use match
140
120
  ctx1.fillStyle =
141
121
  colorMap[(continuingFlag && d1 > 1) || d2 > 1 ? op : 'M'];
142
122
  continuingFlag = false;
@@ -157,7 +137,6 @@ export function drawRef(model, ctx1, ctx3) {
157
137
  }
158
138
  }
159
139
  }
160
- // draw click map
161
140
  const ctx2 = (_a = model.clickMapCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
162
141
  if (!ctx2) {
163
142
  return;
@@ -168,7 +147,6 @@ export function drawRef(model, ctx1, ctx3) {
168
147
  const feature = featPositions[i];
169
148
  const idx = i * unitMultiplier + 1;
170
149
  ctx2.fillStyle = makeColor(idx);
171
- // too many click map false positives with colored stroked lines
172
150
  drawMatchSimple({
173
151
  cb: ctx => {
174
152
  ctx.fill();
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function LinearSyntenyDisplayF(pluginManager: PluginManager): void;
@@ -1,8 +1,7 @@
1
+ import { lazy } from 'react';
1
2
  import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
2
- // locals
3
3
  import configSchemaF from './configSchemaF';
4
4
  import stateModelFactory from './model';
5
- import { lazy } from 'react';
6
5
  export default function LinearSyntenyDisplayF(pluginManager) {
7
6
  pluginManager.addDisplayType(() => {
8
7
  const configSchema = configSchemaF(pluginManager);
@@ -1,6 +1,6 @@
1
- import { Instance } from 'mobx-state-tree';
2
- import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
3
- import { Feature } from '@jbrowse/core/util';
1
+ import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
2
+ import type { Feature } from '@jbrowse/core/util';
3
+ import type { Instance } from 'mobx-state-tree';
4
4
  interface Pos {
5
5
  offsetPx: number;
6
6
  }
@@ -12,11 +12,6 @@ export interface FeatPos {
12
12
  f: Feature;
13
13
  cigar: string[];
14
14
  }
15
- /**
16
- * #stateModel LinearSyntenyDisplay
17
- * extends
18
- * - [LinearComparativeDisplay](../linearcomparativedisplay)
19
- */
20
15
  declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
21
16
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
22
17
  type: import("mobx-state-tree").ISimpleType<string>;
@@ -25,13 +20,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
25
20
  type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
26
21
  configuration: AnyConfigurationSchemaType;
27
22
  } & {
28
- /**
29
- * #property
30
- */
31
23
  type: import("mobx-state-tree").ISimpleType<"LinearSyntenyDisplay">;
32
- /**
33
- * #property
34
- */
35
24
  configuration: AnyConfigurationSchemaType;
36
25
  }, {
37
26
  rendererTypeName: string;
@@ -92,7 +81,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
92
81
  setRpcDriverName(rpcDriverName: string): void;
93
82
  reload(): void;
94
83
  } & {
95
- renderInProgress: AbortController | undefined;
84
+ renderInProgress: string | undefined;
96
85
  features: Feature[] | undefined;
97
86
  message: string | undefined;
98
87
  } & {
@@ -113,12 +102,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
113
102
  setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
114
103
  [x: string]: any;
115
104
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
116
- } & import("mobx-state-tree" /**
117
- * #volatile
118
- * canvas for drawing mouseover shading this is separate from the other
119
- * code for speed: don't have to redraw entire canvas to do a feature's
120
- * mouseover shading
121
- */).IStateTreeNode<AnyConfigurationSchemaType>);
105
+ } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
122
106
  } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
123
107
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
124
108
  rendererTypeName: string;
@@ -179,7 +163,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
179
163
  setRpcDriverName(rpcDriverName: string): void;
180
164
  reload(): void;
181
165
  } & {
182
- renderInProgress: AbortController | undefined;
166
+ renderInProgress: string | undefined;
183
167
  features: Feature[] | undefined;
184
168
  message: string | undefined;
185
169
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
@@ -248,14 +232,14 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
248
232
  setRpcDriverName(rpcDriverName: string): void;
249
233
  reload(): void;
250
234
  } & {
251
- renderInProgress: AbortController | undefined;
235
+ renderInProgress: string | undefined;
252
236
  features: Feature[] | undefined;
253
237
  message: string | undefined;
254
238
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
255
239
  highResolutionScaling: number;
256
240
  };
257
241
  } & {
258
- setLoading(abortController: AbortController): void;
242
+ setLoading(newStopToken: string): void;
259
243
  setMessage(messageText: string): void;
260
244
  setRendered(args?: {
261
245
  features: Feature[];
@@ -264,106 +248,28 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
264
248
  } & {
265
249
  afterAttach(): void;
266
250
  } & {
267
- /**
268
- * #volatile
269
- * canvas used for drawing visible screen
270
- */
271
251
  mainCanvas: HTMLCanvasElement | null;
272
- /**
273
- * #volatile
274
- * canvas used for drawing click map with feature ids this renders a
275
- * unique color per alignment, so that it can be re-traced after a
276
- * feature click with getImageData at that pixel
277
- */
278
252
  clickMapCanvas: HTMLCanvasElement | null;
279
- /**
280
- * #volatile
281
- * canvas used for drawing click map with cigar data this can show if you
282
- * are mousing over a insertion/deletion. it is similar in purpose to the
283
- * clickMapRef but was not feasible to pack this into the clickMapRef
284
- */
285
253
  cigarClickMapCanvas: HTMLCanvasElement | null;
286
- /**
287
- * #volatile
288
- * canvas for drawing mouseover shading this is separate from the other
289
- * code for speed: don't have to redraw entire canvas to do a feature's
290
- * mouseover shading
291
- */
292
254
  mouseoverCanvas: HTMLCanvasElement | null;
293
- /**
294
- * #volatile
295
- * assigned by reaction
296
- */
297
255
  featPositions: FeatPos[];
298
- /**
299
- * #volatile
300
- * currently mouse'd over feature
301
- */
302
256
  mouseoverId: string | undefined;
303
- /**
304
- * #volatile
305
- * currently click'd over feature
306
- */
307
257
  clickId: string | undefined;
308
- /**
309
- * #volatile
310
- * currently mouseover'd CIGAR subfeature
311
- */
312
258
  cigarMouseoverId: number;
313
259
  } & {
314
- /**
315
- * #action
316
- */
317
260
  setFeatPositions(arg: FeatPos[]): void;
318
- /**
319
- * #action
320
- */
321
261
  setMainCanvasRef(ref: HTMLCanvasElement | null): void;
322
- /**
323
- * #action
324
- */
325
262
  setClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
326
- /**
327
- * #action
328
- */
329
263
  setCigarClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
330
- /**
331
- * #action
332
- */
333
264
  setMouseoverCanvasRef(ref: HTMLCanvasElement | null): void;
334
- /**
335
- * #action
336
- */
337
265
  setMouseoverId(arg?: string): void;
338
- /**
339
- * #action
340
- */
341
266
  setCigarMouseoverId(arg: number): void;
342
- /**
343
- * #action
344
- */
345
267
  setClickId(arg?: string): void;
346
268
  } & {
347
- /**
348
- * #getter
349
- */
350
269
  readonly adapterConfig: any;
351
- /**
352
- * #getter
353
- */
354
270
  readonly trackIds: string[];
355
- /**
356
- * #getter
357
- */
358
271
  readonly numFeats: number;
359
- /**
360
- * #getter
361
- * used for synteny svg rendering
362
- */
363
272
  readonly ready: boolean;
364
- /**
365
- * #getter
366
- */
367
273
  readonly featMap: {
368
274
  [k: string]: FeatPos;
369
275
  };
@@ -1,126 +1,49 @@
1
+ import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
1
2
  import { types } from 'mobx-state-tree';
2
- import { getConf, ConfigurationReference, } from '@jbrowse/core/configuration';
3
- // locals
4
3
  import baseModelFactory from '../LinearComparativeDisplay/stateModelFactory';
5
- /**
6
- * #stateModel LinearSyntenyDisplay
7
- * extends
8
- * - [LinearComparativeDisplay](../linearcomparativedisplay)
9
- */
10
4
  function stateModelFactory(configSchema) {
11
5
  return types
12
6
  .compose('LinearSyntenyDisplay', baseModelFactory(configSchema), types.model({
13
- /**
14
- * #property
15
- */
16
7
  type: types.literal('LinearSyntenyDisplay'),
17
- /**
18
- * #property
19
- */
20
8
  configuration: ConfigurationReference(configSchema),
21
9
  }))
22
10
  .volatile(() => ({
23
- /**
24
- * #volatile
25
- * canvas used for drawing visible screen
26
- */
27
11
  mainCanvas: null,
28
- /**
29
- * #volatile
30
- * canvas used for drawing click map with feature ids this renders a
31
- * unique color per alignment, so that it can be re-traced after a
32
- * feature click with getImageData at that pixel
33
- */
34
12
  clickMapCanvas: null,
35
- /**
36
- * #volatile
37
- * canvas used for drawing click map with cigar data this can show if you
38
- * are mousing over a insertion/deletion. it is similar in purpose to the
39
- * clickMapRef but was not feasible to pack this into the clickMapRef
40
- */
41
13
  cigarClickMapCanvas: null,
42
- /**
43
- * #volatile
44
- * canvas for drawing mouseover shading this is separate from the other
45
- * code for speed: don't have to redraw entire canvas to do a feature's
46
- * mouseover shading
47
- */
48
14
  mouseoverCanvas: null,
49
- /**
50
- * #volatile
51
- * assigned by reaction
52
- */
53
15
  featPositions: [],
54
- /**
55
- * #volatile
56
- * currently mouse'd over feature
57
- */
58
16
  mouseoverId: undefined,
59
- /**
60
- * #volatile
61
- * currently click'd over feature
62
- */
63
17
  clickId: undefined,
64
- /**
65
- * #volatile
66
- * currently mouseover'd CIGAR subfeature
67
- */
68
18
  cigarMouseoverId: -1,
69
19
  }))
70
20
  .actions(self => ({
71
- /**
72
- * #action
73
- */
74
21
  setFeatPositions(arg) {
75
22
  self.featPositions = arg;
76
23
  },
77
- /**
78
- * #action
79
- */
80
24
  setMainCanvasRef(ref) {
81
25
  self.mainCanvas = ref;
82
26
  },
83
- /**
84
- * #action
85
- */
86
27
  setClickMapCanvasRef(ref) {
87
28
  self.clickMapCanvas = ref;
88
29
  },
89
- /**
90
- * #action
91
- */
92
30
  setCigarClickMapCanvasRef(ref) {
93
31
  self.cigarClickMapCanvas = ref;
94
32
  },
95
- /**
96
- * #action
97
- */
98
33
  setMouseoverCanvasRef(ref) {
99
34
  self.mouseoverCanvas = ref;
100
35
  },
101
- /**
102
- * #action
103
- */
104
36
  setMouseoverId(arg) {
105
37
  self.mouseoverId = arg;
106
38
  },
107
- /**
108
- * #action
109
- */
110
39
  setCigarMouseoverId(arg) {
111
40
  self.cigarMouseoverId = arg;
112
41
  },
113
- /**
114
- * #action
115
- */
116
42
  setClickId(arg) {
117
43
  self.clickId = arg;
118
44
  },
119
45
  }))
120
46
  .views(self => ({
121
- /**
122
- * #getter
123
- */
124
47
  get adapterConfig() {
125
48
  return {
126
49
  name: self.parentTrack.configuration.adapter.type,
@@ -128,35 +51,21 @@ function stateModelFactory(configSchema) {
128
51
  ...getConf(self.parentTrack, 'adapter'),
129
52
  };
130
53
  },
131
- /**
132
- * #getter
133
- */
134
54
  get trackIds() {
135
55
  return getConf(self, 'trackIds');
136
56
  },
137
- /**
138
- * #getter
139
- */
140
57
  get numFeats() {
141
58
  return self.featPositions.length;
142
59
  },
143
- /**
144
- * #getter
145
- * used for synteny svg rendering
146
- */
147
60
  get ready() {
148
61
  return this.numFeats > 0;
149
62
  },
150
- /**
151
- * #getter
152
- */
153
63
  get featMap() {
154
64
  return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
155
65
  },
156
66
  }))
157
67
  .actions(self => ({
158
68
  afterAttach() {
159
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
160
69
  ;
161
70
  (async () => {
162
71
  try {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ExportSvgOptions } from '../model';
2
+ import type { ExportSvgOptions } from '../model';
3
3
  export default function ExportSvgDialog({ model, handleClose, }: {
4
4
  model: {
5
5
  exportSvg(opts: ExportSvgOptions): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
- import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
3
2
  import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
4
3
  import { getSession, useLocalStorage } from '@jbrowse/core/util';
4
+ import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
5
5
  function LoadingMessage() {
6
6
  return (React.createElement("div", null,
7
7
  React.createElement(CircularProgress, { size: 20, style: { marginRight: 20 } }),
@@ -39,9 +39,7 @@ export default function ExportSvgDialog({ model, handleClose, }) {
39
39
  React.createElement("br", null),
40
40
  session.allThemes ? (React.createElement(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
41
41
  setThemeName(event.target.value);
42
- } }, Object.entries(session.allThemes()).map(([key, val]) => (React.createElement(MenuItem, { key: key, value: key },
43
- // @ts-expect-error
44
- val.name || '(Unknown name)'))))) : null,
42
+ } }, Object.entries(session.allThemes()).map(([key, val]) => (React.createElement(MenuItem, { key: key, value: key }, val.name || '(Unknown name)'))))) : null,
45
43
  offscreenCanvas ? (React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: rasterizeLayers, onChange: () => {
46
44
  setRasterizeLayers(val => !val);
47
45
  } }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (React.createElement(Typography, null, "Note: rasterizing layers not yet supported in this browser, so SVG size may be large"))),
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { SvgIconProps } from '@mui/material';
2
+ import type { SvgIconProps } from '@mui/material';
3
3
  export declare function Curves(props: SvgIconProps): React.JSX.Element;
4
4
  export declare function StraightLines(props: SvgIconProps): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { SnapshotIn } from 'mobx-state-tree';
3
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { SnapshotIn } from 'mobx-state-tree';
4
4
  type Conf = SnapshotIn<AnyConfigurationModel>;
5
5
  declare const ImportCustomTrack: ({ assembly1, assembly2, setUserOpenedSyntenyTrack, }: {
6
6
  assembly1: string;
@@ -1,6 +1,6 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
1
+ import React, { useEffect, useState } from 'react';
3
2
  import { ErrorMessage, FileSelector } from '@jbrowse/core/ui';
3
+ import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
4
4
  import { observer } from 'mobx-react';
5
5
  import { basename, extName, getName, stripGz } from './util';
6
6
  function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LinearSyntenyViewModel } from '../../model';
2
+ import type { LinearSyntenyViewModel } from '../../model';
3
3
  declare const LinearSyntenyViewImportForm: ({ model, }: {
4
4
  model: LinearSyntenyViewModel;
5
5
  }) => React.JSX.Element;
@@ -1,14 +1,13 @@
1
1
  import React, { useState } from 'react';
2
- import { Button, Container, IconButton } from '@mui/material';
3
- import { makeStyles } from 'tss-react/mui';
4
- import { observer } from 'mobx-react';
2
+ import { AssemblySelector, ErrorMessage } from '@jbrowse/core/ui';
5
3
  import { getSession, isSessionWithAddTracks, notEmpty, } from '@jbrowse/core/util';
6
- import { ErrorMessage, AssemblySelector } from '@jbrowse/core/ui';
7
- // icons
8
- import CloseIcon from '@mui/icons-material/Close';
9
4
  import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
10
- import TrackSelector from './TrackSelectorUtil';
5
+ import CloseIcon from '@mui/icons-material/Close';
6
+ import { Button, Container, IconButton } from '@mui/material';
7
+ import { observer } from 'mobx-react';
8
+ import { makeStyles } from 'tss-react/mui';
11
9
  import Spacer from './Spacer';
10
+ import TrackSelector from './TrackSelectorUtil';
12
11
  const useStyles = makeStyles()(theme => ({
13
12
  importFormContainer: {
14
13
  padding: theme.spacing(4),
@@ -90,7 +89,6 @@ const LinearSyntenyViewImportForm = observer(function ({ model, }) {
90
89
  ]);
91
90
  } }, "Add row"),
92
91
  React.createElement(Button, { className: classes.button, onClick: () => {
93
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
94
92
  ;
95
93
  (async () => {
96
94
  try {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LinearSyntenyViewModel } from '../../model';
2
+ import type { LinearSyntenyViewModel } from '../../model';
3
3
  declare const ImportSyntenyTrackSelector: ({ model, assembly1, assembly2, preConfiguredSyntenyTrack, setPreConfiguredSyntenyTrack, }: {
4
4
  model: LinearSyntenyViewModel;
5
5
  assembly1: string;
@@ -1,9 +1,9 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { Select, MenuItem, Paper, Typography } from '@mui/material';
1
+ import React, { useEffect, useState } from 'react';
2
+ import { readConfObject } from '@jbrowse/core/configuration';
3
+ import { ErrorMessage } from '@jbrowse/core/ui';
3
4
  import { getSession } from '@jbrowse/core/util';
4
5
  import { getTrackName } from '@jbrowse/core/util/tracks';
5
- import { ErrorMessage } from '@jbrowse/core/ui';
6
- import { readConfObject, } from '@jbrowse/core/configuration';
6
+ import { MenuItem, Paper, Select, Typography } from '@mui/material';
7
7
  import { observer } from 'mobx-react';
8
8
  const ImportSyntenyTrackSelector = observer(function ({ model, assembly1, assembly2, preConfiguredSyntenyTrack, setPreConfiguredSyntenyTrack, }) {
9
9
  var _a;
@@ -19,8 +19,6 @@ const ImportSyntenyTrackSelector = observer(function ({ model, assembly1, assemb
19
19
  const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
20
20
  const [value, setValue] = useState(resetTrack);
21
21
  useEffect(() => {
22
- // sets track data in a useEffect because the initial load is needed as
23
- // well as onChange's to the select box
24
22
  if (value !== preConfiguredSyntenyTrack) {
25
23
  setPreConfiguredSyntenyTrack(value);
26
24
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { SnapshotIn } from 'mobx-state-tree';
3
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
- import { LinearSyntenyViewModel } from '../../model';
2
+ import type { LinearSyntenyViewModel } from '../../model';
3
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
+ import type { SnapshotIn } from 'mobx-state-tree';
5
5
  type Conf = SnapshotIn<AnyConfigurationModel>;
6
6
  export default function TrackSelector({ model, assembly1, assembly2, preConfiguredSyntenyTrack, setPreConfiguredSyntenyTrack, setUserOpenedSyntenyTrack, }: {
7
7
  model: LinearSyntenyViewModel;
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { FormControl, FormControlLabel, Radio, RadioGroup } from '@mui/material';
3
3
  import ImportCustomTrack from './AddCustomTrack';
4
4
  import ImportSyntenyTrackSelector from './TrackSelector';
@@ -1,10 +1,8 @@
1
1
  export function getName(sessionTrackData) {
2
2
  return sessionTrackData
3
- ? // @ts-expect-error
3
+ ?
4
4
  sessionTrackData.uri ||
5
- // @ts-expect-error
6
5
  sessionTrackData.localPath ||
7
- // @ts-expect-error
8
6
  sessionTrackData.name
9
7
  : undefined;
10
8
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LinearSyntenyViewModel } from '../model';
2
+ import type { LinearSyntenyViewModel } from '../model';
3
3
  type LSV = LinearSyntenyViewModel;
4
4
  declare const LinearSyntenyView: ({ model }: {
5
5
  model: LSV;
@@ -1,6 +1,5 @@
1
1
  import React, { lazy } from 'react';
2
2
  import { observer } from 'mobx-react';
3
- // locals
4
3
  import LinearComparativeViewComponent from '../../LinearComparativeView/components/LinearComparativeView';
5
4
  const LinearSyntenyImportForm = lazy(() => import('./ImportForm/LinearSyntenyImportForm'));
6
5
  const LinearSyntenyView = observer(function ({ model }) {
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function LinearSyntenyViewF(pluginManager: PluginManager): void;