@jbrowse/plugin-dotplot-view 3.7.0 → 4.0.1

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 (224) hide show
  1. package/esm/ComparativeRenderer/index.d.ts +10 -10
  2. package/esm/ComparativeRenderer/index.js +4 -17
  3. package/esm/DiagonalizeDotplotRpc.js +9 -12
  4. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -1
  5. package/esm/DotplotDisplay/index.d.ts +3 -3
  6. package/esm/DotplotDisplay/index.js +4 -4
  7. package/esm/DotplotDisplay/renderDotplotBlock.d.ts +2 -1
  8. package/esm/DotplotDisplay/renderDotplotBlock.js +6 -4
  9. package/esm/DotplotDisplay/stateModelFactory.d.ts +143 -30
  10. package/esm/DotplotDisplay/stateModelFactory.js +5 -14
  11. package/esm/DotplotReadVsRef/DotplotReadVsRef.js +5 -6
  12. package/esm/DotplotReadVsRef/index.js +1 -1
  13. package/esm/DotplotRenderer/DotplotRenderer.d.ts +30 -39
  14. package/esm/DotplotRenderer/DotplotRenderer.js +55 -22
  15. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
  16. package/esm/DotplotRenderer/components/DotplotRendering.js +1 -1
  17. package/esm/DotplotRenderer/configSchema.d.ts +3 -3
  18. package/esm/DotplotRenderer/configSchema.js +1 -1
  19. package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
  20. package/esm/DotplotRenderer/drawDotplot.js +5 -6
  21. package/esm/DotplotRenderer/index.js +4 -4
  22. package/esm/DotplotView/1dview.d.ts +25 -25
  23. package/esm/DotplotView/1dview.js +13 -3
  24. package/esm/DotplotView/components/Axes.d.ts +1 -1
  25. package/esm/DotplotView/components/Axes.js +31 -41
  26. package/esm/DotplotView/components/ColorBySelector.d.ts +1 -1
  27. package/esm/DotplotView/components/ColorBySelector.js +3 -4
  28. package/esm/DotplotView/components/DiagonalizationProgressDialog.d.ts +1 -1
  29. package/esm/DotplotView/components/DiagonalizationProgressDialog.js +1 -1
  30. package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
  31. package/esm/DotplotView/components/DotplotControls.js +7 -8
  32. package/esm/DotplotView/components/DotplotGrid.d.ts +6 -0
  33. package/esm/DotplotView/components/{Grid.js → DotplotGrid.js} +19 -20
  34. package/esm/DotplotView/components/DotplotGridWrapper.d.ts +6 -0
  35. package/esm/DotplotView/components/DotplotGridWrapper.js +8 -0
  36. package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -2
  37. package/esm/DotplotView/components/DotplotTooltipClick.js +4 -4
  38. package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
  39. package/esm/DotplotView/components/DotplotTooltipMouseover.js +2 -2
  40. package/esm/DotplotView/components/DotplotTooltips.d.ts +1 -1
  41. package/esm/DotplotView/components/DotplotTooltips.js +2 -2
  42. package/esm/DotplotView/components/DotplotView.d.ts +2 -2
  43. package/esm/DotplotView/components/DotplotView.js +23 -21
  44. package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
  45. package/esm/DotplotView/components/DotplotWarnings.js +3 -3
  46. package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
  47. package/esm/DotplotView/components/Header.d.ts +1 -1
  48. package/esm/DotplotView/components/Header.js +5 -5
  49. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
  50. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +6 -5
  51. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
  52. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +2 -3
  53. package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +10 -1
  54. package/esm/DotplotView/components/ImportForm/TrackSelector.js +8 -4
  55. package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
  56. package/esm/DotplotView/components/ImportForm/index.js +4 -9
  57. package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +1 -1
  58. package/esm/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +2 -2
  59. package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
  60. package/esm/DotplotView/components/ImportForm/selectors/PifGzSelector.js +2 -2
  61. package/esm/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
  62. package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +1 -1
  63. package/esm/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +3 -3
  64. package/esm/DotplotView/components/ImportForm/selectors/index.d.ts +3 -3
  65. package/esm/DotplotView/components/ImportForm/selectors/index.js +3 -3
  66. package/esm/DotplotView/components/MinLengthSlider.d.ts +1 -1
  67. package/esm/DotplotView/components/MinLengthSlider.js +7 -7
  68. package/esm/DotplotView/components/MouseInteractionLayer.d.ts +3 -3
  69. package/esm/DotplotView/components/MouseInteractionLayer.js +6 -4
  70. package/esm/DotplotView/components/OpacitySlider.d.ts +1 -1
  71. package/esm/DotplotView/components/OpacitySlider.js +5 -6
  72. package/esm/DotplotView/components/PanButtons.d.ts +1 -1
  73. package/esm/DotplotView/components/PanButtons.js +1 -1
  74. package/esm/DotplotView/components/SelectionContextMenu.d.ts +1 -1
  75. package/esm/DotplotView/components/WarningDialog.js +1 -1
  76. package/esm/DotplotView/components/util.d.ts +1 -1
  77. package/esm/DotplotView/components/util.js +17 -5
  78. package/esm/DotplotView/index.js +2 -2
  79. package/esm/DotplotView/model.d.ts +208 -90
  80. package/esm/DotplotView/model.js +118 -79
  81. package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
  82. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -6
  83. package/esm/DotplotView/types.d.ts +7 -1
  84. package/esm/LaunchDotplotView.js +6 -36
  85. package/esm/ServerSideRenderedBlockContent.js +2 -6
  86. package/esm/ServerSideSyntenyRendering.d.ts +1 -1
  87. package/esm/ServerSideSyntenyRendering.js +1 -1
  88. package/esm/index.d.ts +1 -0
  89. package/esm/index.js +8 -11
  90. package/esm/util.d.ts +1 -1
  91. package/package.json +28 -35
  92. package/dist/ComparativeRenderer/index.d.ts +0 -22
  93. package/dist/ComparativeRenderer/index.js +0 -53
  94. package/dist/DiagonalizeDotplotRpc.d.ts +0 -30
  95. package/dist/DiagonalizeDotplotRpc.js +0 -156
  96. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +0 -6
  97. package/dist/DotplotDisplay/components/DotplotDisplay.js +0 -18
  98. package/dist/DotplotDisplay/index.d.ts +0 -5
  99. package/dist/DotplotDisplay/index.js +0 -36
  100. package/dist/DotplotDisplay/renderDotplotBlock.d.ts +0 -11
  101. package/dist/DotplotDisplay/renderDotplotBlock.js +0 -52
  102. package/dist/DotplotDisplay/stateModelFactory.d.ts +0 -108
  103. package/dist/DotplotDisplay/stateModelFactory.js +0 -134
  104. package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +0 -3
  105. package/dist/DotplotReadVsRef/DotplotReadVsRef.js +0 -100
  106. package/dist/DotplotReadVsRef/index.d.ts +0 -2
  107. package/dist/DotplotReadVsRef/index.js +0 -41
  108. package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
  109. package/dist/DotplotRenderer/ComparativeRenderRpc.js +0 -53
  110. package/dist/DotplotRenderer/DotplotRenderer.d.ts +0 -65
  111. package/dist/DotplotRenderer/DotplotRenderer.js +0 -102
  112. package/dist/DotplotRenderer/clamp.d.ts +0 -7
  113. package/dist/DotplotRenderer/clamp.js +0 -62
  114. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +0 -3
  115. package/dist/DotplotRenderer/components/DotplotRendering.js +0 -9
  116. package/dist/DotplotRenderer/configSchema.d.ts +0 -40
  117. package/dist/DotplotRenderer/configSchema.js +0 -57
  118. package/dist/DotplotRenderer/drawDotplot.d.ts +0 -22
  119. package/dist/DotplotRenderer/drawDotplot.js +0 -209
  120. package/dist/DotplotRenderer/index.d.ts +0 -2
  121. package/dist/DotplotRenderer/index.js +0 -17
  122. package/dist/DotplotView/1dview.d.ts +0 -199
  123. package/dist/DotplotView/1dview.js +0 -65
  124. package/dist/DotplotView/components/Axes.d.ts +0 -13
  125. package/dist/DotplotView/components/Axes.js +0 -107
  126. package/dist/DotplotView/components/ColorBySelector.d.ts +0 -5
  127. package/dist/DotplotView/components/ColorBySelector.js +0 -79
  128. package/dist/DotplotView/components/CursorIcon.d.ts +0 -3
  129. package/dist/DotplotView/components/CursorIcon.js +0 -15
  130. package/dist/DotplotView/components/DiagonalizationProgressDialog.d.ts +0 -6
  131. package/dist/DotplotView/components/DiagonalizationProgressDialog.js +0 -125
  132. package/dist/DotplotView/components/DotplotControls.d.ts +0 -5
  133. package/dist/DotplotView/components/DotplotControls.js +0 -187
  134. package/dist/DotplotView/components/DotplotTooltipClick.d.ts +0 -10
  135. package/dist/DotplotView/components/DotplotTooltipClick.js +0 -17
  136. package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +0 -9
  137. package/dist/DotplotView/components/DotplotTooltipMouseover.js +0 -16
  138. package/dist/DotplotView/components/DotplotTooltips.d.ts +0 -15
  139. package/dist/DotplotView/components/DotplotTooltips.js +0 -43
  140. package/dist/DotplotView/components/DotplotView.d.ts +0 -5
  141. package/dist/DotplotView/components/DotplotView.js +0 -100
  142. package/dist/DotplotView/components/DotplotWarnings.d.ts +0 -5
  143. package/dist/DotplotView/components/DotplotWarnings.js +0 -53
  144. package/dist/DotplotView/components/ExportSvgDialog.d.ts +0 -7
  145. package/dist/DotplotView/components/ExportSvgDialog.js +0 -53
  146. package/dist/DotplotView/components/Grid.d.ts +0 -9
  147. package/dist/DotplotView/components/Grid.js +0 -47
  148. package/dist/DotplotView/components/Header.d.ts +0 -9
  149. package/dist/DotplotView/components/Header.js +0 -33
  150. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -7
  151. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -78
  152. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +0 -7
  153. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +0 -42
  154. package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +0 -7
  155. package/dist/DotplotView/components/ImportForm/TrackSelector.js +0 -23
  156. package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +0 -117
  157. package/dist/DotplotView/components/ImportForm/getAdapter.js +0 -68
  158. package/dist/DotplotView/components/ImportForm/index.d.ts +0 -5
  159. package/dist/DotplotView/components/ImportForm/index.js +0 -75
  160. package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.d.ts +0 -3
  161. package/dist/DotplotView/components/ImportForm/selectors/AnchorsFileSelector.js +0 -23
  162. package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
  163. package/dist/DotplotView/components/ImportForm/selectors/PifGzSelector.js +0 -13
  164. package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -23
  165. package/dist/DotplotView/components/ImportForm/selectors/SelectorTypes.js +0 -10
  166. package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
  167. package/dist/DotplotView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
  168. package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.d.ts +0 -3
  169. package/dist/DotplotView/components/ImportForm/selectors/SyntenyFileSelector.js +0 -24
  170. package/dist/DotplotView/components/ImportForm/selectors/index.d.ts +0 -3
  171. package/dist/DotplotView/components/ImportForm/selectors/index.js +0 -12
  172. package/dist/DotplotView/components/ImportForm/util.d.ts +0 -10
  173. package/dist/DotplotView/components/ImportForm/util.js +0 -24
  174. package/dist/DotplotView/components/MinLengthSlider.d.ts +0 -5
  175. package/dist/DotplotView/components/MinLengthSlider.js +0 -44
  176. package/dist/DotplotView/components/MouseInteractionLayer.d.ts +0 -17
  177. package/dist/DotplotView/components/MouseInteractionLayer.js +0 -18
  178. package/dist/DotplotView/components/OpacitySlider.d.ts +0 -5
  179. package/dist/DotplotView/components/OpacitySlider.js +0 -43
  180. package/dist/DotplotView/components/PanButtons.d.ts +0 -5
  181. package/dist/DotplotView/components/PanButtons.js +0 -47
  182. package/dist/DotplotView/components/SelectionContextMenu.d.ts +0 -13
  183. package/dist/DotplotView/components/SelectionContextMenu.js +0 -42
  184. package/dist/DotplotView/components/SliderTooltip.d.ts +0 -2
  185. package/dist/DotplotView/components/SliderTooltip.js +0 -9
  186. package/dist/DotplotView/components/WarningDialog.d.ts +0 -16
  187. package/dist/DotplotView/components/WarningDialog.js +0 -39
  188. package/dist/DotplotView/components/hooks/useCtrlKeyTracking.d.ts +0 -1
  189. package/dist/DotplotView/components/hooks/useCtrlKeyTracking.js +0 -24
  190. package/dist/DotplotView/components/hooks/useCursorMode.d.ts +0 -7
  191. package/dist/DotplotView/components/hooks/useCursorMode.js +0 -19
  192. package/dist/DotplotView/components/hooks/useMouseCoordinates.d.ts +0 -29
  193. package/dist/DotplotView/components/hooks/useMouseCoordinates.js +0 -52
  194. package/dist/DotplotView/components/hooks/useMouseMoveHandler.d.ts +0 -6
  195. package/dist/DotplotView/components/hooks/useMouseMoveHandler.js +0 -27
  196. package/dist/DotplotView/components/hooks/useMouseUpHandler.d.ts +0 -3
  197. package/dist/DotplotView/components/hooks/useMouseUpHandler.js +0 -31
  198. package/dist/DotplotView/components/hooks/useWheelHandler.d.ts +0 -8
  199. package/dist/DotplotView/components/hooks/useWheelHandler.js +0 -47
  200. package/dist/DotplotView/components/util.d.ts +0 -14
  201. package/dist/DotplotView/components/util.js +0 -80
  202. package/dist/DotplotView/index.d.ts +0 -2
  203. package/dist/DotplotView/index.js +0 -52
  204. package/dist/DotplotView/model.d.ts +0 -440
  205. package/dist/DotplotView/model.js +0 -502
  206. package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +0 -4
  207. package/dist/DotplotView/svgcomponents/SVGBackground.js +0 -10
  208. package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +0 -2
  209. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +0 -30
  210. package/dist/DotplotView/types.d.ts +0 -12
  211. package/dist/DotplotView/types.js +0 -2
  212. package/dist/LaunchDotplotView.d.ts +0 -2
  213. package/dist/LaunchDotplotView.js +0 -43
  214. package/dist/ServerSideRenderedBlockContent.d.ts +0 -12
  215. package/dist/ServerSideRenderedBlockContent.js +0 -48
  216. package/dist/ServerSideSyntenyRendering.d.ts +0 -13
  217. package/dist/ServerSideSyntenyRendering.js +0 -23
  218. package/dist/index.d.ts +0 -7
  219. package/dist/index.js +0 -42
  220. package/dist/util.d.ts +0 -9
  221. package/dist/util.js +0 -7
  222. package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +0 -22
  223. package/esm/DotplotRenderer/ComparativeRenderRpc.js +0 -47
  224. package/esm/DotplotView/components/Grid.d.ts +0 -9
@@ -0,0 +1,6 @@
1
+ import type { DotplotViewModel } from '../model.ts';
2
+ declare const DotplotGrid: ({ model, children, }: {
3
+ model: DotplotViewModel;
4
+ children?: React.ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element | null;
6
+ export default DotplotGrid;
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { getFillProps, getStrokeProps } from '@jbrowse/core/util';
3
3
  import { useTheme } from '@mui/material';
4
4
  import { observer } from 'mobx-react';
5
- export const GridRaw = observer(function ({ model, children, }) {
5
+ const DotplotGrid = observer(function DotplotGrid({ model, children, }) {
6
6
  const { viewWidth, viewHeight, hview, vview } = model;
7
7
  const hblocks = hview.dynamicBlocks.contentBlocks;
8
8
  const vblocks = vview.dynamicBlocks.contentBlocks;
9
+ const theme = useTheme();
9
10
  if (!hblocks.length || !vblocks.length) {
10
11
  return null;
11
12
  }
@@ -13,31 +14,29 @@ export const GridRaw = observer(function ({ model, children, }) {
13
14
  const vtop = vview.displayedRegionsTotalPx - vview.offsetPx;
14
15
  const hbottom = hblocks[0].offsetPx - hview.offsetPx;
15
16
  const vbottom = vblocks[0].offsetPx - vview.offsetPx;
16
- const theme = useTheme();
17
17
  const stroke = theme.palette.divider;
18
18
  const rx = Math.max(hbottom, 0);
19
19
  const ry = Math.max(viewHeight - vtop, 0);
20
20
  const w = Math.min(htop - hbottom, viewWidth);
21
21
  const h = Math.min(viewHeight - vbottom - ry, viewHeight);
22
- let lastx = Number.POSITIVE_INFINITY;
23
- let lasty = Number.POSITIVE_INFINITY;
24
- return (_jsxs(_Fragment, { children: [_jsx("rect", { x: rx, y: ry, width: w, height: h, ...getFillProps(theme.palette.background.default) }), _jsxs("g", { children: [hblocks.map(region => {
22
+ const hlines = hblocks.filter((region, idx) => {
23
+ const x = Math.floor(region.offsetPx - hview.offsetPx);
24
+ const prevX = idx > 0 ? Math.floor(hblocks[idx - 1].offsetPx - hview.offsetPx) : null;
25
+ return x !== prevX;
26
+ });
27
+ const vlines = vblocks.filter((region, idx) => {
28
+ const y = Math.floor(viewHeight - (region.offsetPx - vview.offsetPx));
29
+ const prevY = idx > 0
30
+ ? Math.floor(viewHeight - (vblocks[idx - 1].offsetPx - vview.offsetPx))
31
+ : null;
32
+ return y !== prevY;
33
+ });
34
+ return (_jsxs(_Fragment, { children: [_jsx("rect", { x: rx, y: ry, width: w, height: h, ...getFillProps(theme.palette.background.default) }), _jsxs("g", { children: [hlines.map(region => {
25
35
  const x = region.offsetPx - hview.offsetPx;
26
- const render = Math.floor(x) !== Math.floor(lastx);
27
- if (render) {
28
- lastx = x;
29
- }
30
- return render ? (_jsx("line", { x1: x, y1: 0, x2: x, y2: viewHeight, ...getStrokeProps(stroke) }, JSON.stringify(region))) : null;
31
- }), vblocks.map(region => {
36
+ return (_jsx("line", { x1: x, y1: 0, x2: x, y2: viewHeight, ...getStrokeProps(stroke) }, region.key));
37
+ }), vlines.map(region => {
32
38
  const y = viewHeight - (region.offsetPx - vview.offsetPx);
33
- const render = Math.floor(y) !== Math.floor(lasty);
34
- if (render) {
35
- lasty = y;
36
- }
37
- return render ? (_jsx("line", { x1: 0, y1: y, x2: viewWidth, y2: y, ...getStrokeProps(stroke) }, JSON.stringify(region))) : null;
39
+ return (_jsx("line", { x1: 0, y1: y, x2: viewWidth, y2: y, ...getStrokeProps(stroke) }, region.key));
38
40
  }), _jsx("line", { x1: htop, y1: 0, x2: htop, y2: viewHeight, ...getStrokeProps(stroke) }), _jsx("line", { x1: 0, y1: viewHeight - vtop, x2: viewWidth, y2: viewHeight - vtop, ...getStrokeProps(stroke) })] }), children] }));
39
41
  });
40
- export default function Grid({ model, children, }) {
41
- const { viewWidth, viewHeight } = model;
42
- return (_jsx("svg", { width: viewWidth, height: viewHeight, style: { background: 'rgba(0,0,0,0.12)' }, children: _jsx(GridRaw, { model: model, children: children }) }));
43
- }
42
+ export default DotplotGrid;
@@ -0,0 +1,6 @@
1
+ import type { DotplotViewModel } from '../model.ts';
2
+ declare const DotplotGridWrapper: ({ model, children, }: {
3
+ model: DotplotViewModel;
4
+ children?: React.ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default DotplotGridWrapper;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { observer } from 'mobx-react';
3
+ import DotplotGrid from "./DotplotGrid.js";
4
+ const DotplotGridWrapper = observer(function DotplotGridWrapper({ model, children, }) {
5
+ const { viewWidth, viewHeight } = model;
6
+ return (_jsx("svg", { width: viewWidth, height: viewHeight, style: { background: 'rgba(0,0,0,0.12)' }, children: _jsx(DotplotGrid, { model: model, children: children }) }));
7
+ });
8
+ export default DotplotGridWrapper;
@@ -1,6 +1,6 @@
1
- import type { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model.ts';
2
2
  type Coord = [number, number] | undefined;
3
- export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
3
+ declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
4
4
  model: DotplotViewModel;
5
5
  mousedown: Coord;
6
6
  mousedownClient: Coord;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
3
3
  import { observer } from 'mobx-react';
4
- import { locstr } from './util';
5
- export const DotplotTooltipClick = observer(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
4
+ import { locstr } from "./util.js";
5
+ const DotplotTooltipClick = observer(function DotplotTooltipClick({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
6
6
  const { hview, vview, viewHeight } = model;
7
- const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
8
- const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
7
+ const x = (mousedownClient?.[0] || 0) - (xdistance < 0 ? 0 : 0);
8
+ const y = (mousedownClient?.[1] || 0) - (ydistance < 0 ? 0 : 0);
9
9
  return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y }, children: [`x - ${locstr(mousedown[0], hview)}`, _jsx("br", {}), `y - ${locstr(viewHeight - mousedown[1], vview)}`, _jsx("br", {})] })) : null;
10
10
  });
11
11
  export default DotplotTooltipClick;
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model.ts';
2
2
  type Coord = [number, number] | undefined;
3
3
  declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
4
4
  model: DotplotViewModel;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
3
3
  import { observer } from 'mobx-react';
4
- import { locstr } from './util';
5
- const DotplotTooltipMouseover = observer(function ({ model, mouserect, mouserectClient, xdistance, }) {
4
+ import { locstr } from "./util.js";
5
+ const DotplotTooltipMouseover = observer(function DotplotTooltipMouseover({ model, mouserect, mouserectClient, xdistance, }) {
6
6
  const { hview, vview, viewHeight } = model;
7
7
  return mouserect ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
8
8
  ? { x: mouserectClient[0], y: mouserectClient[1] }
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model.ts';
2
2
  type Coord = [number, number] | undefined;
3
3
  interface DotplotTooltipsProps {
4
4
  model: DotplotViewModel;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense, lazy } from 'react';
3
- const TooltipWhereClicked = lazy(() => import('./DotplotTooltipClick'));
4
- const TooltipWhereMouseovered = lazy(() => import('./DotplotTooltipMouseover'));
3
+ const TooltipWhereClicked = lazy(() => import("./DotplotTooltipClick.js"));
4
+ const TooltipWhereMouseovered = lazy(() => import("./DotplotTooltipMouseover.js"));
5
5
  export default function DotplotTooltips({ model, mouseOvered, validSelect, mouserect, mouserectClient, xdistance, mousedown, mousedownClient, ydistance, }) {
6
6
  return (_jsxs(_Fragment, { children: [mouseOvered && validSelect ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance }) })) : null, validSelect ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance }) })) : null] }));
7
7
  }
@@ -1,5 +1,5 @@
1
- import type { DotplotViewModel } from '../model';
2
- declare const DotplotView: ({ model }: {
1
+ import type { DotplotViewModel } from '../model.ts';
2
+ declare const DotplotView: ({ model, }: {
3
3
  model: DotplotViewModel;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
5
5
  export default DotplotView;
@@ -1,19 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { LoadingEllipses, ResizeHandle } from '@jbrowse/core/ui';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
4
  import { observer } from 'mobx-react';
4
- import { makeStyles } from 'tss-react/mui';
5
- import { HorizontalAxis, VerticalAxis } from './Axes';
6
- import DotplotTooltips from './DotplotTooltips';
7
- import Header from './Header';
8
- import ImportForm from './ImportForm';
9
- import MouseInteractionLayer from './MouseInteractionLayer';
10
- import SelectionContextMenu from './SelectionContextMenu';
11
- import { useCtrlKeyTracking } from './hooks/useCtrlKeyTracking';
12
- import { useCursorMode } from './hooks/useCursorMode';
13
- import { useMouseCoordinates } from './hooks/useMouseCoordinates';
14
- import { useMouseMoveHandler } from './hooks/useMouseMoveHandler';
15
- import { useMouseUpHandler } from './hooks/useMouseUpHandler';
16
- import { useWheelHandler } from './hooks/useWheelHandler';
5
+ import { HorizontalAxis, VerticalAxis } from "./Axes.js";
6
+ import DotplotTooltips from "./DotplotTooltips.js";
7
+ import Header from "./Header.js";
8
+ import ImportForm from "./ImportForm/index.js";
9
+ import MouseInteractionLayer from "./MouseInteractionLayer.js";
10
+ import SelectionContextMenu from "./SelectionContextMenu.js";
11
+ import { useCtrlKeyTracking } from "./hooks/useCtrlKeyTracking.js";
12
+ import { useCursorMode } from "./hooks/useCursorMode.js";
13
+ import { useMouseCoordinates } from "./hooks/useMouseCoordinates.js";
14
+ import { useMouseMoveHandler } from "./hooks/useMouseMoveHandler.js";
15
+ import { useMouseUpHandler } from "./hooks/useMouseUpHandler.js";
16
+ import { useWheelHandler } from "./hooks/useWheelHandler.js";
17
17
  const useStyles = makeStyles()(theme => ({
18
18
  spacer: {
19
19
  gridColumn: '1/2',
@@ -54,7 +54,7 @@ const useStyles = makeStyles()(theme => ({
54
54
  borderTop: '1px solid #fafafa',
55
55
  },
56
56
  }));
57
- const RenderedComponent = observer(({ model }) => {
57
+ const RenderedComponent = observer(function RenderedComponent({ model, }) {
58
58
  const { classes } = useStyles();
59
59
  return (_jsx("div", { className: classes.overlay, children: model.tracks.map(track => {
60
60
  const [display] = track.displays;
@@ -62,7 +62,7 @@ const RenderedComponent = observer(({ model }) => {
62
62
  return RenderingComponent ? (_jsx(RenderingComponent, { model: display }, track.configuration.trackId)) : null;
63
63
  }) }));
64
64
  });
65
- const DotplotViewInternal = observer(function ({ model, }) {
65
+ const DotplotViewInternal = observer(function DotplotViewInternal({ model, }) {
66
66
  const { classes } = useStyles();
67
67
  const { hview, vview, wheelMode, cursorMode } = model;
68
68
  const { mousecurrClient, mousedownClient, mouseupClient, mouseOvered, setMouseCurrClient, setMouseDownClient, setMouseUpClient, setMouseOvered, ref, root, rootRect, mousedown, mousecurr, mouseup, mouserect, mouserectClient, xdistance, ydistance, } = useMouseCoordinates();
@@ -82,14 +82,16 @@ const DotplotViewInternal = observer(function ({ model, }) {
82
82
  setMouseOvered(true);
83
83
  }, children: [_jsxs("div", { className: classes.container, children: [_jsx(VerticalAxis, { model: model }), _jsx(HorizontalAxis, { model: model }), _jsxs("div", { ref: ref, className: classes.content, children: [_jsx(DotplotTooltips, { model: model, mouseOvered: mouseOvered, validSelect: validSelect, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance, mousedown: mousedown, mousedownClient: mousedownClient, ydistance: ydistance }), _jsx(MouseInteractionLayer, { model: model, ctrlKeyDown: ctrlKeyDown, cursorMode: cursorMode, validSelect: validSelect, mousedown: mousedown, mouserect: mouserect, xdistance: xdistance, ydistance: ydistance, setMouseDownClient: setMouseDownClient, setMouseCurrClient: setMouseCurrClient, setCtrlKeyWasUsed: setCtrlKeyWasUsed }), _jsx("div", { className: classes.spacer })] }), _jsx(RenderedComponent, { model: model }), _jsx(SelectionContextMenu, { model: model, mouseup: mouseup, mouseupClient: mouseupClient, mousedown: mousedown, setMouseUpClient: setMouseUpClient, setMouseDownClient: setMouseDownClient, setMouseOvered: setMouseOvered })] }), _jsx(ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle })] })] }));
84
84
  });
85
- const DotplotView = observer(function ({ model }) {
86
- const { initialized, loading, error } = model;
87
- if ((!initialized && !loading) || error) {
85
+ const DotplotView = observer(function DotplotView({ model, }) {
86
+ const { initialized, showLoading, error, loadingMessage } = model;
87
+ if (showLoading) {
88
+ return _jsx(LoadingEllipses, { variant: "h6", message: loadingMessage });
89
+ }
90
+ else if (!initialized || error) {
88
91
  return _jsx(ImportForm, { model: model });
89
92
  }
90
- if (loading) {
91
- return _jsx(LoadingEllipses, { variant: "h6" });
93
+ else {
94
+ return _jsx(DotplotViewInternal, { model: model });
92
95
  }
93
- return _jsx(DotplotViewInternal, { model: model });
94
96
  });
95
97
  export default DotplotView;
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model.ts';
2
2
  declare const DotplotWarnings: ({ model, }: {
3
3
  model: DotplotViewModel;
4
4
  }) => import("react/jsx-runtime").JSX.Element | null;
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense, lazy, useState } from 'react';
3
3
  import { Alert, Button } from '@mui/material';
4
4
  import { observer } from 'mobx-react';
5
- const WarningDialog = lazy(() => import('./WarningDialog'));
6
- const DotplotWarnings = observer(function ({ model, }) {
7
- const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
5
+ const WarningDialog = lazy(() => import("./WarningDialog.js"));
6
+ const DotplotWarnings = observer(function DotplotWarnings({ model, }) {
7
+ const trackWarnings = model.tracks.filter(t => t.displays[0].warnings?.length);
8
8
  const [shown, setShown] = useState(false);
9
9
  const [hide, setHide] = useState(false);
10
10
  return trackWarnings.length && !hide ? (_jsxs(Alert, { severity: "warning", children: ["Warnings during render", ' ', _jsx(Button, { onClick: () => {
@@ -1,4 +1,4 @@
1
- import type { ExportSvgOptions } from '../model';
1
+ import type { ExportSvgOptions } from '../model.ts';
2
2
  export default function ExportSvgDialog({ model, handleClose, }: {
3
3
  model: {
4
4
  exportSvg(opts: ExportSvgOptions): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model.ts';
2
2
  declare const DotplotHeader: ({ model, selection, }: {
3
3
  model: DotplotViewModel;
4
4
  selection?: {
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getBpDisplayStr } from '@jbrowse/core/util';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
4
  import { Typography } from '@mui/material';
4
5
  import { observer } from 'mobx-react';
5
- import { makeStyles } from 'tss-react/mui';
6
- import DotplotControls from './DotplotControls';
7
- import DotplotWarnings from './DotplotWarnings';
8
- import PanButtons from './PanButtons';
6
+ import DotplotControls from "./DotplotControls.js";
7
+ import DotplotWarnings from "./DotplotWarnings.js";
8
+ import PanButtons from "./PanButtons.js";
9
9
  const useStyles = makeStyles()({
10
10
  bp: {
11
11
  display: 'flex',
@@ -20,7 +20,7 @@ const useStyles = makeStyles()({
20
20
  position: 'relative',
21
21
  },
22
22
  });
23
- const DotplotHeader = observer(function ({ model, selection, }) {
23
+ const DotplotHeader = observer(function DotplotHeader({ model, selection, }) {
24
24
  const { classes } = useStyles();
25
25
  const { hview, vview, showPanButtons } = model;
26
26
  return (_jsxs("div", { className: classes.headerBar, children: [_jsx(DotplotControls, { model: model }), _jsxs(Typography, { className: classes.bp, variant: "body2", color: "textSecondary", children: ["x: ", hview.assemblyNames.join(','), " ", getBpDisplayStr(hview.currBp), _jsx("br", {}), "y: ", vview.assemblyNames.join(','), " ", getBpDisplayStr(vview.currBp)] }), selection ? (_jsxs(Typography, { className: classes.bp, variant: "body2", color: "textSecondary", children: [`width:${getBpDisplayStr(hview.bpPerPx * selection.width)}`, " ", _jsx("br", {}), `height:${getBpDisplayStr(vview.bpPerPx * selection.height)}`] })) : null, _jsx("div", { className: classes.spacer }), _jsx(DotplotWarnings, { model: model }), showPanButtons ? _jsx(PanButtons, { model: model }) : null] }));
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../../model';
1
+ import type { DotplotViewModel } from '../../model.ts';
2
2
  declare const ImportSyntenyOpenCustomTrack: ({ model, assembly1, assembly2, }: {
3
3
  model: DotplotViewModel;
4
4
  assembly1: string;
@@ -3,10 +3,10 @@ import { useEffect, useState } from 'react';
3
3
  import { ErrorMessage } from '@jbrowse/core/ui';
4
4
  import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
5
5
  import { observer } from 'mobx-react';
6
- import { getAdapter } from './getAdapter';
7
- import { AnchorsFileSelector, PifGzSelector, SyntenyFileSelector, } from './selectors';
8
- import { basename, extName, getName, stripGz } from './util';
9
- const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, assembly2, }) {
6
+ import { getAdapter } from "./getAdapter.js";
7
+ import { AnchorsFileSelector, PifGzSelector, SyntenyFileSelector, } from "./selectors/index.js";
8
+ import { basename, extName, getName, stripGz } from "./util.js";
9
+ const ImportSyntenyOpenCustomTrack = observer(function ImportSyntenyOpenCustomTrack({ model, assembly1, assembly2, }) {
10
10
  const [swap, setSwap] = useState(false);
11
11
  const [bed2Location, setBed2Location] = useState();
12
12
  const [bed1Location, setBed1Location] = useState();
@@ -71,6 +71,7 @@ const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, asse
71
71
  ].map(extension => (_jsx(FormControlLabel, { value: extension, control: _jsx(Radio, {}), label: extension }, extension))) }) }), _jsx(Grid, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
72
72
  radioOption === '.out' ||
73
73
  radioOption === '.delta' ||
74
- radioOption === '.chain' ? (_jsx(SyntenyFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap })) : radioOption === '.anchors' || radioOption === '.anchors.simple' ? (_jsx(AnchorsFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, bed1Location: bed1Location, setBed1Location: setBed1Location, bed2Location: bed2Location, setBed2Location: setBed2Location })) : radioOption === '.pif.gz' ? (_jsx(PifGzSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, indexFileLocation: indexFileLocation, setIndexFileLocation: setIndexFileLocation })) : null })] }));
74
+ radioOption === '.chain' ? (_jsx(SyntenyFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap })) : radioOption === '.anchors' ||
75
+ radioOption === '.anchors.simple' ? (_jsx(AnchorsFileSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, bed1Location: bed1Location, setBed1Location: setBed1Location, bed2Location: bed2Location, setBed2Location: setBed2Location })) : radioOption === '.pif.gz' ? (_jsx(PifGzSelector, { radioOption: radioOption, fileLocation: fileLocation, setFileLocation: setFileLocation, assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, indexFileLocation: indexFileLocation, setIndexFileLocation: setIndexFileLocation })) : null })] }));
75
76
  });
76
77
  export default ImportSyntenyOpenCustomTrack;
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../../model';
1
+ import type { DotplotViewModel } from '../../model.ts';
2
2
  declare const ImportSyntenyTrackSelector: ({ model, assembly1, assembly2, }: {
3
3
  model: DotplotViewModel;
4
4
  assembly1: string;
@@ -13,8 +13,7 @@ function isRelevantTrack(track, assembly1, assembly2) {
13
13
  assemblyNames.includes(assembly2) &&
14
14
  track.type.includes('Synteny'));
15
15
  }
16
- const ImportSyntenyTrackSelector = observer(function ({ model, assembly1, assembly2, }) {
17
- var _a;
16
+ const ImportSyntenyTrackSelector = observer(function ImportSyntenyTrackSelector({ model, assembly1, assembly2, }) {
18
17
  const session = getSession(model);
19
18
  const { tracks, sessionTracks } = session;
20
19
  const allTracks = [
@@ -22,7 +21,7 @@ const ImportSyntenyTrackSelector = observer(function ({ model, assembly1, assemb
22
21
  ...(sessionTracks || []),
23
22
  ];
24
23
  const filteredTracks = allTracks.filter(t => isRelevantTrack(t, assembly2, assembly1));
25
- const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
24
+ const resetTrack = filteredTracks[0]?.trackId || '';
26
25
  const [value, setValue] = useState(resetTrack);
27
26
  useEffect(() => {
28
27
  setValue(resetTrack);
@@ -1,4 +1,13 @@
1
- import type { DotplotViewModel } from '../../model';
1
+ import type { DotplotViewModel } from '../../model.ts';
2
+ export interface DotplotImportFormSyntenyOption {
3
+ value: string;
4
+ label: string;
5
+ ReactComponent: React.FC<{
6
+ model: DotplotViewModel;
7
+ assembly1: string;
8
+ assembly2: string;
9
+ }>;
10
+ }
2
11
  declare const TrackSelector: ({ assembly1, assembly2, model, }: {
3
12
  model: DotplotViewModel;
4
13
  assembly1: string;
@@ -1,11 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
+ import { getEnv } from '@jbrowse/core/util';
3
4
  import { FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, } from '@mui/material';
4
5
  import { observer } from 'mobx-react';
5
- import ImportSyntenyOpenCustomTrack from './ImportSyntenyOpenCustomTrack';
6
- import ImportSyntenyTrackSelector from './ImportSyntenyTrackSelector';
7
- const TrackSelector = observer(function ({ assembly1, assembly2, model, }) {
6
+ import ImportSyntenyOpenCustomTrack from "./ImportSyntenyOpenCustomTrack.js";
7
+ import ImportSyntenyTrackSelector from "./ImportSyntenyTrackSelector.js";
8
+ const TrackSelector = observer(function TrackSelector({ assembly1, assembly2, model, }) {
9
+ const { pluginManager } = getEnv(model);
8
10
  const [choice, setChoice] = useState('tracklist');
11
+ const customOptions = pluginManager.evaluateExtensionPoint('DotplotView-ImportFormSyntenyOptions', [], { model, assembly1, assembly2 });
12
+ const selectedCustomOption = customOptions.find(opt => opt.value === choice);
9
13
  useEffect(() => {
10
14
  if (choice === 'none') {
11
15
  model.setImportFormSyntenyTrack(0, { type: 'none' });
@@ -13,6 +17,6 @@ const TrackSelector = observer(function ({ assembly1, assembly2, model, }) {
13
17
  }, [model, choice]);
14
18
  return (_jsxs(_Fragment, { children: [_jsxs(FormControl, { children: [_jsx(FormLabel, { id: "group-label", children: "(Optional) Select or add a synteny track" }), _jsxs(RadioGroup, { row: true, value: choice, onChange: event => {
15
19
  setChoice(event.target.value);
16
- }, "aria-labelledby": "group-label", children: [_jsx(FormControlLabel, { value: "none", control: _jsx(Radio, {}), label: "None" }), _jsx(FormControlLabel, { value: "tracklist", control: _jsx(Radio, {}), label: "Existing track" }), _jsx(FormControlLabel, { value: "custom", control: _jsx(Radio, {}), label: "New track" })] })] }), choice === 'custom' ? (_jsx(ImportSyntenyOpenCustomTrack, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? (_jsx(ImportSyntenyTrackSelector, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
20
+ }, "aria-labelledby": "group-label", children: [_jsx(FormControlLabel, { value: "none", control: _jsx(Radio, {}), label: "None" }), _jsx(FormControlLabel, { value: "tracklist", control: _jsx(Radio, {}), label: "Existing track" }), _jsx(FormControlLabel, { value: "custom", control: _jsx(Radio, {}), label: "New track" }), customOptions.map(opt => (_jsx(FormControlLabel, { value: opt.value, control: _jsx(Radio, {}), label: opt.label }, opt.value)))] })] }), choice === 'custom' ? (_jsx(ImportSyntenyOpenCustomTrack, { model: model, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? (_jsx(ImportSyntenyTrackSelector, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null, selectedCustomOption ? (_jsx(selectedCustomOption.ReactComponent, { model: model, assembly1: assembly1, assembly2: assembly2 })) : null] }));
17
21
  });
18
22
  export default TrackSelector;
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../../model';
1
+ import type { DotplotViewModel } from '../../model.ts';
2
2
  declare const DotplotImportForm: ({ model, }: {
3
3
  model: DotplotViewModel;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -2,20 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { AssemblySelector, ErrorMessage } from '@jbrowse/core/ui';
4
4
  import { getSession, isSessionWithAddTracks } from '@jbrowse/core/util';
5
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
5
6
  import { Button, Container, FormControl, Grid, Paper, Typography, } from '@mui/material';
6
7
  import { toJS, transaction } from 'mobx';
7
8
  import { observer } from 'mobx-react';
8
- import { makeStyles } from 'tss-react/mui';
9
- import TrackSelector from './TrackSelector';
9
+ import TrackSelector from "./TrackSelector.js";
10
10
  const useStyles = makeStyles()(theme => ({
11
11
  importFormContainer: {
12
12
  padding: theme.spacing(4),
13
13
  margin: '0 auto',
14
14
  },
15
- assemblySelector: {
16
- width: '75%',
17
- margin: '0 auto',
18
- },
19
15
  }));
20
16
  function doSubmit({ model, assembly1, assembly2, }) {
21
17
  const session = getSession(model);
@@ -24,10 +20,9 @@ function doSubmit({ model, assembly1, assembly2, }) {
24
20
  transaction(() => {
25
21
  if (isSessionWithAddTracks(session)) {
26
22
  toJS(importFormSyntenyTrackSelections).map((f, idx) => {
27
- var _a;
28
23
  if (f.type === 'userOpened') {
29
24
  session.addTrackConf(f.value);
30
- model.toggleTrack((_a = f.value) === null || _a === void 0 ? void 0 : _a.trackId);
25
+ model.toggleTrack(f.value?.trackId);
31
26
  }
32
27
  else if (f.type === 'preConfigured') {
33
28
  model.showTrack(f.value, idx);
@@ -37,7 +32,7 @@ function doSubmit({ model, assembly1, assembly2, }) {
37
32
  model.setAssemblyNames(assembly2, assembly1);
38
33
  });
39
34
  }
40
- const DotplotImportForm = observer(function ({ model, }) {
35
+ const DotplotImportForm = observer(function DotplotImportForm({ model, }) {
41
36
  const { classes } = useStyles();
42
37
  const session = getSession(model);
43
38
  const { assemblyNames } = session;
@@ -1,3 +1,3 @@
1
- import type { SelectorProps } from './SelectorTypes';
1
+ import type { SelectorProps } from './SelectorTypes.ts';
2
2
  declare const AnchorsFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default AnchorsFileSelector;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FileSelector } from '@jbrowse/core/ui';
3
3
  import { observer } from 'mobx-react';
4
- import SwapAssemblies from './SwapAssemblies';
5
- const AnchorsFileSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }) {
4
+ import SwapAssemblies from "./SwapAssemblies.js";
5
+ const AnchorsFileSelector = observer(function AnchorsFileSelector({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }) {
6
6
  return (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', _jsx("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), _jsxs("div", { children: [_jsx(FileSelector, { inline: true, name: radioOption, location: fileLocation, setLocation: loc => {
7
7
  setFileLocation(loc);
8
8
  } }), _jsx(FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
@@ -1,3 +1,3 @@
1
- import type { SelectorProps } from './SelectorTypes';
1
+ import type { SelectorProps } from './SelectorTypes.ts';
2
2
  declare const PifGzSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default PifGzSelector;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { FileSelector } from '@jbrowse/core/ui';
3
3
  import { observer } from 'mobx-react';
4
- import SwapAssemblies from './SwapAssemblies';
5
- const PifGzSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation = undefined, setIndexFileLocation = () => { }, radioOption, }) {
4
+ import SwapAssemblies from "./SwapAssemblies.js";
5
+ const PifGzSelector = observer(function PifGzSelector({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation = () => { }, radioOption, }) {
6
6
  return (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .pif.gz and index file (.pif.gz.tbi or .pif.gz.csi) files for created by `jbrowse make-pif`"] }), _jsxs("div", { style: { maxWidth: 400, margin: '0 auto' }, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: setFileLocation }), _jsx(FileSelector, { name: `${radioOption} index location (.tbi or .csi)`, inline: true, description: "", location: indexFileLocation, setLocation: setIndexFileLocation }), _jsx(SwapAssemblies, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "query assembly", text2: "target assembly" })] })] }));
7
7
  });
8
8
  export default PifGzSelector;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
2
3
  import HelpIcon from '@mui/icons-material/Help';
3
4
  import { Button, Tooltip } from '@mui/material';
4
5
  import { observer } from 'mobx-react';
5
- import { makeStyles } from 'tss-react/mui';
6
- import { helpStrings } from './SelectorTypes';
6
+ import { helpStrings } from "./SelectorTypes.js";
7
7
  const useStyles = makeStyles()({
8
8
  row: {
9
9
  display: 'flex',
@@ -16,7 +16,7 @@ const useStyles = makeStyles()({
16
16
  alignItems: 'center',
17
17
  },
18
18
  });
19
- const SwapAssemblies = observer(function ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
19
+ const SwapAssemblies = observer(function SwapAssemblies({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
20
20
  const { classes } = useStyles();
21
21
  return (_jsxs("div", { children: [_jsxs("div", { children: ["Verify or click swap", _jsx(Tooltip, { title: helpContent || (_jsx("code", { children: helpStrings[radioOption] })), children: _jsx(HelpIcon, {}) })] }), _jsxs("div", { className: classes.row, children: [_jsxs("div", { className: classes.swap, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: text1 }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: text2 })] }), _jsx(Button, { variant: "contained", onClick: () => {
22
22
  if (setSwap) {
@@ -1,3 +1,3 @@
1
- import type { SelectorProps } from './SelectorTypes';
1
+ import type { SelectorProps } from './SelectorTypes.ts';
2
2
  declare const SyntenyFileSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default SyntenyFileSelector;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FileSelector } from '@jbrowse/core/ui';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
4
  import { observer } from 'mobx-react';
4
- import { makeStyles } from 'tss-react/mui';
5
- import SwapAssemblies from './SwapAssemblies';
5
+ import SwapAssemblies from "./SwapAssemblies.js";
6
6
  const useStyles = makeStyles()({
7
7
  container: {
8
8
  display: 'flex',
@@ -10,7 +10,7 @@ const useStyles = makeStyles()({
10
10
  gap: 10,
11
11
  },
12
12
  });
13
- const SyntenyFileSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
13
+ const SyntenyFileSelector = observer(function SyntenyFileSelector({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
14
14
  const { classes } = useStyles();
15
15
  return (_jsxs("div", { className: classes.container, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
16
16
  setFileLocation(loc);
@@ -1,3 +1,3 @@
1
- export { default as AnchorsFileSelector } from './AnchorsFileSelector';
2
- export { default as PifGzSelector } from './PifGzSelector';
3
- export { default as SyntenyFileSelector } from './SyntenyFileSelector';
1
+ export { default as AnchorsFileSelector } from './AnchorsFileSelector.tsx';
2
+ export { default as PifGzSelector } from './PifGzSelector.tsx';
3
+ export { default as SyntenyFileSelector } from './SyntenyFileSelector.tsx';
@@ -1,3 +1,3 @@
1
- export { default as AnchorsFileSelector } from './AnchorsFileSelector';
2
- export { default as PifGzSelector } from './PifGzSelector';
3
- export { default as SyntenyFileSelector } from './SyntenyFileSelector';
1
+ export { default as AnchorsFileSelector } from "./AnchorsFileSelector.js";
2
+ export { default as PifGzSelector } from "./PifGzSelector.js";
3
+ export { default as SyntenyFileSelector } from "./SyntenyFileSelector.js";
@@ -1,4 +1,4 @@
1
- import type { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model.ts';
2
2
  declare const MinLengthSlider: ({ model, }: {
3
3
  model: DotplotViewModel;
4
4
  }) => import("react/jsx-runtime").JSX.Element;