@jbrowse/plugin-linear-comparative-view 2.17.0 → 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 +102 -63
  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 -22
  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 +102 -63
  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 -24
  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
@@ -6,7 +6,7 @@ exports.drawRef = drawRef;
6
6
  exports.drawMouseoverSynteny = drawMouseoverSynteny;
7
7
  const util_1 = require("@jbrowse/core/util");
8
8
  const util_2 = require("./components/util");
9
- exports.MAX_COLOR_RANGE = 255 * 255 * 255; // max color range
9
+ exports.MAX_COLOR_RANGE = 255 * 255 * 255;
10
10
  function makeColor(idx) {
11
11
  const r = Math.floor(idx / (255 * 255)) % 255;
12
12
  const g = Math.floor(idx / 255) % 255;
@@ -40,8 +40,6 @@ function drawRef(model, ctx1, ctx3) {
40
40
  ctx1.beginPath();
41
41
  const offsets = view.views.map(v => v.offsetPx);
42
42
  const unitMultiplier = Math.floor(exports.MAX_COLOR_RANGE / featPositions.length);
43
- // this loop is optimized to draw many thin lines with a single ctx.stroke
44
- // call, a separate loop below draws larger boxes
45
43
  ctx1.fillStyle = colorMap.M;
46
44
  ctx1.strokeStyle = colorMap.M;
47
45
  for (const { p11, p12, p21, p22 } of featPositions) {
@@ -54,8 +52,6 @@ function drawRef(model, ctx1, ctx3) {
54
52
  const y1 = 0;
55
53
  const y2 = height;
56
54
  const mid = (y2 - y1) / 2;
57
- // drawing a line if the results are thin results in much less pixellation
58
- // than filling in a thin polygon
59
55
  if (l1 <= lineLimit &&
60
56
  l2 <= lineLimit &&
61
57
  x21 < width + oobLimit &&
@@ -70,8 +66,6 @@ function drawRef(model, ctx1, ctx3) {
70
66
  }
71
67
  }
72
68
  ctx1.stroke();
73
- // this loop only draws small lines as a polyline, the polyline calls
74
- // ctx.stroke once is much more efficient than calling stroke() many times
75
69
  ctx1.fillStyle = colorMap.M;
76
70
  ctx1.strokeStyle = colorMap.M;
77
71
  for (const { p11, p12, p21, p22, f, cigar } of featPositions) {
@@ -91,17 +85,12 @@ function drawRef(model, ctx1, ctx3) {
91
85
  const s1 = f.get('strand');
92
86
  const k1 = s1 === -1 ? x12 : x11;
93
87
  const k2 = s1 === -1 ? x11 : x12;
94
- // rev1/rev2 flip the direction of the CIGAR drawing in horizontally flipped
95
- // modes. somewhat heuristically determined, but tested for
96
88
  const rev1 = k1 < k2 ? 1 : -1;
97
89
  const rev2 = (x21 < x22 ? 1 : -1) * s1;
98
- // cx1/cx2 are the current x positions on top and bottom rows
99
90
  let cx1 = k1;
100
91
  let cx2 = s1 === -1 ? x22 : x21;
101
92
  if (cigar.length && drawCIGAR) {
102
- // continuingFlag skips drawing commands on very small CIGAR features
103
93
  let continuingFlag = false;
104
- // px1/px2 are the previous x positions on the top and bottom rows
105
94
  let px1 = 0;
106
95
  let px2 = 0;
107
96
  const unitMultiplier2 = Math.floor(exports.MAX_COLOR_RANGE / cigar.length);
@@ -122,17 +111,11 @@ function drawRef(model, ctx1, ctx3) {
122
111
  else if (op === 'D' || op === 'N') {
123
112
  cx1 += d1 * rev1;
124
113
  }
125
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
126
114
  else if (op === 'I') {
127
115
  cx2 += d2 * rev2;
128
116
  }
129
- // check that we are even drawing in view here, e.g. that all
130
- // points are not all less than 0 or greater than width
131
117
  if (!(Math.max(px1, px2, cx1, cx2) < 0 ||
132
118
  Math.min(px1, px2, cx1, cx2) > width)) {
133
- // if it is a small feature and not the last element of the
134
- // CIGAR (which could skip rendering it entire if we did turn
135
- // it on), then turn on continuing flag
136
119
  const isNotLast = j < cigar.length - 2;
137
120
  if (Math.abs(cx1 - px1) <= 1 &&
138
121
  Math.abs(cx2 - px2) <= 1 &&
@@ -140,9 +123,6 @@ function drawRef(model, ctx1, ctx3) {
140
123
  continuingFlag = true;
141
124
  }
142
125
  else {
143
- // allow rendering the dominant color when using continuing
144
- // flag if the last element of continuing was a large
145
- // feature, else just use match
146
126
  ctx1.fillStyle =
147
127
  colorMap[(continuingFlag && d1 > 1) || d2 > 1 ? op : 'M'];
148
128
  continuingFlag = false;
@@ -163,7 +143,6 @@ function drawRef(model, ctx1, ctx3) {
163
143
  }
164
144
  }
165
145
  }
166
- // draw click map
167
146
  const ctx2 = (_a = model.clickMapCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
168
147
  if (!ctx2) {
169
148
  return;
@@ -174,7 +153,6 @@ function drawRef(model, ctx1, ctx3) {
174
153
  const feature = featPositions[i];
175
154
  const idx = i * unitMultiplier + 1;
176
155
  ctx2.fillStyle = makeColor(idx);
177
- // too many click map false positives with colored stroked lines
178
156
  (0, util_2.drawMatchSimple)({
179
157
  cb: ctx => {
180
158
  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;
@@ -27,11 +27,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.default = LinearSyntenyDisplayF;
30
+ const react_1 = require("react");
30
31
  const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
31
- // locals
32
32
  const configSchemaF_1 = __importDefault(require("./configSchemaF"));
33
33
  const model_1 = __importDefault(require("./model"));
34
- const react_1 = require("react");
35
34
  function LinearSyntenyDisplayF(pluginManager) {
36
35
  pluginManager.addDisplayType(() => {
37
36
  const configSchema = (0, configSchemaF_1.default)(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
  };
@@ -26,129 +26,52 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const mobx_state_tree_1 = require("mobx-state-tree");
30
29
  const configuration_1 = require("@jbrowse/core/configuration");
31
- // locals
30
+ const mobx_state_tree_1 = require("mobx-state-tree");
32
31
  const stateModelFactory_1 = __importDefault(require("../LinearComparativeDisplay/stateModelFactory"));
33
- /**
34
- * #stateModel LinearSyntenyDisplay
35
- * extends
36
- * - [LinearComparativeDisplay](../linearcomparativedisplay)
37
- */
38
32
  function stateModelFactory(configSchema) {
39
33
  return mobx_state_tree_1.types
40
34
  .compose('LinearSyntenyDisplay', (0, stateModelFactory_1.default)(configSchema), mobx_state_tree_1.types.model({
41
- /**
42
- * #property
43
- */
44
35
  type: mobx_state_tree_1.types.literal('LinearSyntenyDisplay'),
45
- /**
46
- * #property
47
- */
48
36
  configuration: (0, configuration_1.ConfigurationReference)(configSchema),
49
37
  }))
50
38
  .volatile(() => ({
51
- /**
52
- * #volatile
53
- * canvas used for drawing visible screen
54
- */
55
39
  mainCanvas: null,
56
- /**
57
- * #volatile
58
- * canvas used for drawing click map with feature ids this renders a
59
- * unique color per alignment, so that it can be re-traced after a
60
- * feature click with getImageData at that pixel
61
- */
62
40
  clickMapCanvas: null,
63
- /**
64
- * #volatile
65
- * canvas used for drawing click map with cigar data this can show if you
66
- * are mousing over a insertion/deletion. it is similar in purpose to the
67
- * clickMapRef but was not feasible to pack this into the clickMapRef
68
- */
69
41
  cigarClickMapCanvas: null,
70
- /**
71
- * #volatile
72
- * canvas for drawing mouseover shading this is separate from the other
73
- * code for speed: don't have to redraw entire canvas to do a feature's
74
- * mouseover shading
75
- */
76
42
  mouseoverCanvas: null,
77
- /**
78
- * #volatile
79
- * assigned by reaction
80
- */
81
43
  featPositions: [],
82
- /**
83
- * #volatile
84
- * currently mouse'd over feature
85
- */
86
44
  mouseoverId: undefined,
87
- /**
88
- * #volatile
89
- * currently click'd over feature
90
- */
91
45
  clickId: undefined,
92
- /**
93
- * #volatile
94
- * currently mouseover'd CIGAR subfeature
95
- */
96
46
  cigarMouseoverId: -1,
97
47
  }))
98
48
  .actions(self => ({
99
- /**
100
- * #action
101
- */
102
49
  setFeatPositions(arg) {
103
50
  self.featPositions = arg;
104
51
  },
105
- /**
106
- * #action
107
- */
108
52
  setMainCanvasRef(ref) {
109
53
  self.mainCanvas = ref;
110
54
  },
111
- /**
112
- * #action
113
- */
114
55
  setClickMapCanvasRef(ref) {
115
56
  self.clickMapCanvas = ref;
116
57
  },
117
- /**
118
- * #action
119
- */
120
58
  setCigarClickMapCanvasRef(ref) {
121
59
  self.cigarClickMapCanvas = ref;
122
60
  },
123
- /**
124
- * #action
125
- */
126
61
  setMouseoverCanvasRef(ref) {
127
62
  self.mouseoverCanvas = ref;
128
63
  },
129
- /**
130
- * #action
131
- */
132
64
  setMouseoverId(arg) {
133
65
  self.mouseoverId = arg;
134
66
  },
135
- /**
136
- * #action
137
- */
138
67
  setCigarMouseoverId(arg) {
139
68
  self.cigarMouseoverId = arg;
140
69
  },
141
- /**
142
- * #action
143
- */
144
70
  setClickId(arg) {
145
71
  self.clickId = arg;
146
72
  },
147
73
  }))
148
74
  .views(self => ({
149
- /**
150
- * #getter
151
- */
152
75
  get adapterConfig() {
153
76
  return {
154
77
  name: self.parentTrack.configuration.adapter.type,
@@ -156,35 +79,21 @@ function stateModelFactory(configSchema) {
156
79
  ...(0, configuration_1.getConf)(self.parentTrack, 'adapter'),
157
80
  };
158
81
  },
159
- /**
160
- * #getter
161
- */
162
82
  get trackIds() {
163
83
  return (0, configuration_1.getConf)(self, 'trackIds');
164
84
  },
165
- /**
166
- * #getter
167
- */
168
85
  get numFeats() {
169
86
  return self.featPositions.length;
170
87
  },
171
- /**
172
- * #getter
173
- * used for synteny svg rendering
174
- */
175
88
  get ready() {
176
89
  return this.numFeats > 0;
177
90
  },
178
- /**
179
- * #getter
180
- */
181
91
  get featMap() {
182
92
  return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
183
93
  },
184
94
  }))
185
95
  .actions(self => ({
186
96
  afterAttach() {
187
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
188
97
  ;
189
98
  (async () => {
190
99
  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>;
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.default = ExportSvgDialog;
27
27
  const react_1 = __importStar(require("react"));
28
- const material_1 = require("@mui/material");
29
28
  const ui_1 = require("@jbrowse/core/ui");
30
29
  const util_1 = require("@jbrowse/core/util");
30
+ const material_1 = require("@mui/material");
31
31
  function LoadingMessage() {
32
32
  return (react_1.default.createElement("div", null,
33
33
  react_1.default.createElement(material_1.CircularProgress, { size: 20, style: { marginRight: 20 } }),
@@ -65,9 +65,7 @@ function ExportSvgDialog({ model, handleClose, }) {
65
65
  react_1.default.createElement("br", null),
66
66
  session.allThemes ? (react_1.default.createElement(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
67
67
  setThemeName(event.target.value);
68
- } }, Object.entries(session.allThemes()).map(([key, val]) => (react_1.default.createElement(material_1.MenuItem, { key: key, value: key },
69
- // @ts-expect-error
70
- val.name || '(Unknown name)'))))) : null,
68
+ } }, Object.entries(session.allThemes()).map(([key, val]) => (react_1.default.createElement(material_1.MenuItem, { key: key, value: key }, val.name || '(Unknown name)'))))) : null,
71
69
  offscreenCanvas ? (react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: rasterizeLayers, onChange: () => {
72
70
  setRasterizeLayers(val => !val);
73
71
  } }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (react_1.default.createElement(material_1.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;
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const react_1 = __importStar(require("react"));
27
- const material_1 = require("@mui/material");
28
27
  const ui_1 = require("@jbrowse/core/ui");
28
+ const material_1 = require("@mui/material");
29
29
  const mobx_react_1 = require("mobx-react");
30
30
  const util_1 = require("./util");
31
31
  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;
@@ -27,16 +27,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const material_1 = require("@mui/material");
31
- const mui_1 = require("tss-react/mui");
32
- const mobx_react_1 = require("mobx-react");
33
- const util_1 = require("@jbrowse/core/util");
34
30
  const ui_1 = require("@jbrowse/core/ui");
35
- // icons
36
- const Close_1 = __importDefault(require("@mui/icons-material/Close"));
31
+ const util_1 = require("@jbrowse/core/util");
37
32
  const ArrowForwardIos_1 = __importDefault(require("@mui/icons-material/ArrowForwardIos"));
38
- const TrackSelectorUtil_1 = __importDefault(require("./TrackSelectorUtil"));
33
+ const Close_1 = __importDefault(require("@mui/icons-material/Close"));
34
+ const material_1 = require("@mui/material");
35
+ const mobx_react_1 = require("mobx-react");
36
+ const mui_1 = require("tss-react/mui");
39
37
  const Spacer_1 = __importDefault(require("./Spacer"));
38
+ const TrackSelectorUtil_1 = __importDefault(require("./TrackSelectorUtil"));
40
39
  const useStyles = (0, mui_1.makeStyles)()(theme => ({
41
40
  importFormContainer: {
42
41
  padding: theme.spacing(4),
@@ -118,7 +117,6 @@ const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model
118
117
  ]);
119
118
  } }, "Add row"),
120
119
  react_1.default.createElement(material_1.Button, { className: classes.button, onClick: () => {
121
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
122
120
  ;
123
121
  (async () => {
124
122
  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;
@@ -24,11 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const react_1 = __importStar(require("react"));
27
- const material_1 = require("@mui/material");
27
+ const configuration_1 = require("@jbrowse/core/configuration");
28
+ const ui_1 = require("@jbrowse/core/ui");
28
29
  const util_1 = require("@jbrowse/core/util");
29
30
  const tracks_1 = require("@jbrowse/core/util/tracks");
30
- const ui_1 = require("@jbrowse/core/ui");
31
- const configuration_1 = require("@jbrowse/core/configuration");
31
+ const material_1 = require("@mui/material");
32
32
  const mobx_react_1 = require("mobx-react");
33
33
  const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, preConfiguredSyntenyTrack, setPreConfiguredSyntenyTrack, }) {
34
34
  var _a;
@@ -44,8 +44,6 @@ const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model,
44
44
  const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
45
45
  const [value, setValue] = (0, react_1.useState)(resetTrack);
46
46
  (0, react_1.useEffect)(() => {
47
- // sets track data in a useEffect because the initial load is needed as
48
- // well as onChange's to the select box
49
47
  if (value !== preConfiguredSyntenyTrack) {
50
48
  setPreConfiguredSyntenyTrack(value);
51
49
  }
@@ -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;
@@ -6,11 +6,9 @@ exports.basename = basename;
6
6
  exports.extName = extName;
7
7
  function getName(sessionTrackData) {
8
8
  return sessionTrackData
9
- ? // @ts-expect-error
9
+ ?
10
10
  sessionTrackData.uri ||
11
- // @ts-expect-error
12
11
  sessionTrackData.localPath ||
13
- // @ts-expect-error
14
12
  sessionTrackData.name
15
13
  : undefined;
16
14
  }
@@ -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;
@@ -28,7 +28,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
30
  const mobx_react_1 = require("mobx-react");
31
- // locals
32
31
  const LinearComparativeView_1 = __importDefault(require("../../LinearComparativeView/components/LinearComparativeView"));
33
32
  const LinearSyntenyImportForm = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./ImportForm/LinearSyntenyImportForm'))));
34
33
  const LinearSyntenyView = (0, mobx_react_1.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;