@jbrowse/plugin-dotplot-view 2.17.0 → 3.0.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 (173) hide show
  1. package/dist/ComparativeRenderer/index.d.ts +3 -8
  2. package/dist/ComparativeRenderer/index.js +3 -8
  3. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
  4. package/dist/DotplotDisplay/components/DotplotDisplay.js +7 -12
  5. package/dist/DotplotDisplay/index.d.ts +1 -7
  6. package/dist/DotplotDisplay/index.js +2 -12
  7. package/dist/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
  8. package/dist/DotplotDisplay/renderDotplotBlock.js +3 -9
  9. package/dist/DotplotDisplay/stateModelFactory.d.ts +8 -45
  10. package/dist/DotplotDisplay/stateModelFactory.js +57 -100
  11. package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
  12. package/dist/DotplotReadVsRef/DotplotReadVsRef.js +13 -14
  13. package/dist/DotplotReadVsRef/index.d.ts +1 -1
  14. package/dist/DotplotReadVsRef/index.js +0 -2
  15. package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
  16. package/dist/DotplotRenderer/ComparativeRenderRpc.js +3 -8
  17. package/dist/DotplotRenderer/DotplotRenderer.d.ts +8 -7
  18. package/dist/DotplotRenderer/DotplotRenderer.js +18 -9
  19. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
  20. package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
  21. package/dist/DotplotRenderer/configSchema.d.ts +0 -21
  22. package/dist/DotplotRenderer/configSchema.js +2 -27
  23. package/dist/DotplotRenderer/drawDotplot.d.ts +3 -3
  24. package/dist/DotplotRenderer/drawDotplot.js +3 -6
  25. package/dist/DotplotRenderer/index.d.ts +1 -1
  26. package/dist/DotplotRenderer/index.js +1 -1
  27. package/dist/DotplotView/1dview.d.ts +2 -77
  28. package/dist/DotplotView/1dview.js +4 -33
  29. package/dist/DotplotView/components/Axes.d.ts +5 -6
  30. package/dist/DotplotView/components/Axes.js +26 -40
  31. package/dist/DotplotView/components/CursorIcon.d.ts +3 -4
  32. package/dist/DotplotView/components/CursorIcon.js +3 -5
  33. package/dist/DotplotView/components/DotplotControls.d.ts +2 -3
  34. package/dist/DotplotView/components/DotplotControls.js +94 -97
  35. package/dist/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
  36. package/dist/DotplotView/components/DotplotTooltipClick.js +3 -7
  37. package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
  38. package/dist/DotplotView/components/DotplotTooltipMouseover.js +4 -8
  39. package/dist/DotplotView/components/DotplotView.d.ts +2 -3
  40. package/dist/DotplotView/components/DotplotView.js +80 -92
  41. package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -3
  42. package/dist/DotplotView/components/DotplotWarnings.js +26 -21
  43. package/dist/DotplotView/components/ExportSvgDialog.d.ts +2 -3
  44. package/dist/DotplotView/components/ExportSvgDialog.js +32 -67
  45. package/dist/DotplotView/components/Grid.d.ts +3 -4
  46. package/dist/DotplotView/components/Grid.js +19 -32
  47. package/dist/DotplotView/components/Header.d.ts +2 -3
  48. package/dist/DotplotView/components/Header.js +4 -23
  49. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
  50. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
  51. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
  52. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -48
  53. package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
  54. package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
  55. package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
  56. package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
  57. package/dist/DotplotView/components/ImportForm/index.d.ts +3 -4
  58. package/dist/DotplotView/components/ImportForm/index.js +47 -97
  59. package/dist/DotplotView/components/ImportForm/util.js +1 -3
  60. package/dist/DotplotView/components/PanButtons.d.ts +2 -3
  61. package/dist/DotplotView/components/PanButtons.js +17 -36
  62. package/dist/DotplotView/components/WarningDialog.d.ts +7 -7
  63. package/dist/DotplotView/components/WarningDialog.js +12 -15
  64. package/dist/DotplotView/components/util.d.ts +2 -7
  65. package/dist/DotplotView/components/util.js +0 -5
  66. package/dist/DotplotView/index.d.ts +1 -1
  67. package/dist/DotplotView/index.js +17 -8
  68. package/dist/DotplotView/model.d.ts +11 -133
  69. package/dist/DotplotView/model.js +46 -222
  70. package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
  71. package/dist/DotplotView/svgcomponents/SVGBackground.js +3 -6
  72. package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
  73. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
  74. package/dist/DotplotView/types.d.ts +12 -0
  75. package/dist/DotplotView/types.js +2 -0
  76. package/dist/LaunchDotplotView.d.ts +1 -1
  77. package/dist/LaunchDotplotView.js +1 -4
  78. package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
  79. package/dist/ServerSideRenderedBlockContent.js +11 -37
  80. package/dist/ServerSideSyntenyRendering.d.ts +1 -6
  81. package/dist/ServerSideSyntenyRendering.js +4 -26
  82. package/dist/index.d.ts +1 -1
  83. package/dist/index.js +3 -6
  84. package/dist/util.d.ts +1 -1
  85. package/esm/ComparativeRenderer/index.d.ts +3 -8
  86. package/esm/ComparativeRenderer/index.js +3 -8
  87. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
  88. package/esm/DotplotDisplay/components/DotplotDisplay.js +7 -9
  89. package/esm/DotplotDisplay/index.d.ts +1 -7
  90. package/esm/DotplotDisplay/index.js +2 -12
  91. package/esm/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
  92. package/esm/DotplotDisplay/renderDotplotBlock.js +3 -6
  93. package/esm/DotplotDisplay/stateModelFactory.d.ts +8 -45
  94. package/esm/DotplotDisplay/stateModelFactory.js +58 -101
  95. package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
  96. package/esm/DotplotReadVsRef/DotplotReadVsRef.js +15 -16
  97. package/esm/DotplotReadVsRef/index.d.ts +1 -1
  98. package/esm/DotplotReadVsRef/index.js +0 -2
  99. package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
  100. package/esm/DotplotRenderer/ComparativeRenderRpc.js +3 -8
  101. package/esm/DotplotRenderer/DotplotRenderer.d.ts +8 -7
  102. package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
  103. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
  104. package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
  105. package/esm/DotplotRenderer/configSchema.d.ts +0 -21
  106. package/esm/DotplotRenderer/configSchema.js +2 -27
  107. package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
  108. package/esm/DotplotRenderer/drawDotplot.js +4 -7
  109. package/esm/DotplotRenderer/index.d.ts +1 -1
  110. package/esm/DotplotRenderer/index.js +1 -1
  111. package/esm/DotplotView/1dview.d.ts +2 -77
  112. package/esm/DotplotView/1dview.js +4 -33
  113. package/esm/DotplotView/components/Axes.d.ts +5 -6
  114. package/esm/DotplotView/components/Axes.js +26 -37
  115. package/esm/DotplotView/components/CursorIcon.d.ts +3 -4
  116. package/esm/DotplotView/components/CursorIcon.js +3 -5
  117. package/esm/DotplotView/components/DotplotControls.d.ts +2 -3
  118. package/esm/DotplotView/components/DotplotControls.js +94 -97
  119. package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
  120. package/esm/DotplotView/components/DotplotTooltipClick.js +3 -7
  121. package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
  122. package/esm/DotplotView/components/DotplotTooltipMouseover.js +4 -8
  123. package/esm/DotplotView/components/DotplotView.d.ts +2 -3
  124. package/esm/DotplotView/components/DotplotView.js +63 -85
  125. package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -3
  126. package/esm/DotplotView/components/DotplotWarnings.js +9 -14
  127. package/esm/DotplotView/components/ExportSvgDialog.d.ts +2 -3
  128. package/esm/DotplotView/components/ExportSvgDialog.js +32 -44
  129. package/esm/DotplotView/components/Grid.d.ts +3 -4
  130. package/esm/DotplotView/components/Grid.js +19 -29
  131. package/esm/DotplotView/components/Header.d.ts +2 -3
  132. package/esm/DotplotView/components/Header.js +4 -23
  133. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
  134. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
  135. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
  136. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -25
  137. package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
  138. package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
  139. package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
  140. package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
  141. package/esm/DotplotView/components/ImportForm/index.d.ts +3 -4
  142. package/esm/DotplotView/components/ImportForm/index.js +48 -75
  143. package/esm/DotplotView/components/ImportForm/util.js +1 -3
  144. package/esm/DotplotView/components/PanButtons.d.ts +2 -3
  145. package/esm/DotplotView/components/PanButtons.js +17 -36
  146. package/esm/DotplotView/components/WarningDialog.d.ts +7 -7
  147. package/esm/DotplotView/components/WarningDialog.js +12 -12
  148. package/esm/DotplotView/components/util.d.ts +2 -7
  149. package/esm/DotplotView/components/util.js +0 -5
  150. package/esm/DotplotView/index.d.ts +1 -1
  151. package/esm/DotplotView/index.js +0 -1
  152. package/esm/DotplotView/model.d.ts +11 -133
  153. package/esm/DotplotView/model.js +30 -216
  154. package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
  155. package/esm/DotplotView/svgcomponents/SVGBackground.js +3 -3
  156. package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
  157. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
  158. package/esm/DotplotView/types.d.ts +12 -0
  159. package/esm/DotplotView/types.js +1 -0
  160. package/esm/LaunchDotplotView.d.ts +1 -1
  161. package/esm/LaunchDotplotView.js +1 -4
  162. package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
  163. package/esm/ServerSideRenderedBlockContent.js +11 -14
  164. package/esm/ServerSideSyntenyRendering.d.ts +1 -6
  165. package/esm/ServerSideSyntenyRendering.js +4 -3
  166. package/esm/index.d.ts +1 -1
  167. package/esm/index.js +3 -6
  168. package/esm/util.d.ts +1 -1
  169. package/package.json +2 -4
  170. package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
  171. package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
  172. package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
  173. package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
@@ -5,13 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CursorMove = CursorMove;
7
7
  exports.CursorMouse = CursorMouse;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
9
  const SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon"));
9
- const react_1 = __importDefault(require("react"));
10
10
  function CursorMove(props) {
11
- return (react_1.default.createElement(SvgIcon_1.default, { ...props },
12
- react_1.default.createElement("path", { fill: "currentColor", d: "M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z" })));
11
+ return ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, { ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z" }) }));
13
12
  }
14
13
  function CursorMouse(props) {
15
- return (react_1.default.createElement(SvgIcon_1.default, { ...props },
16
- react_1.default.createElement("path", { fill: "currentColor", d: "M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z" })));
14
+ return ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, { ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z" }) }));
17
15
  }
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- import { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model';
3
2
  declare const DotplotControls: ({ model, }: {
4
3
  model: DotplotViewModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export default DotplotControls;
@@ -3,116 +3,113 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const material_1 = require("@mui/material");
8
- const mobx_react_1 = require("mobx-react");
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
7
  const CascadingMenuButton_1 = __importDefault(require("@jbrowse/core/ui/CascadingMenuButton"));
10
- // icons
11
- const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
12
- const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
8
+ const Icons_1 = require("@jbrowse/core/ui/Icons");
9
+ const CropDin_1 = __importDefault(require("@mui/icons-material/CropDin"));
10
+ const CropLandscape_1 = __importDefault(require("@mui/icons-material/CropLandscape"));
13
11
  const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
12
+ const SettingsOverscan_1 = __importDefault(require("@mui/icons-material/SettingsOverscan"));
13
+ const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
14
+ const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
15
+ const material_1 = require("@mui/material");
16
+ const mobx_react_1 = require("mobx-react");
14
17
  const CursorIcon_1 = require("./CursorIcon");
15
- const Icons_1 = require("@jbrowse/core/ui/Icons");
16
18
  const DotplotControls = (0, mobx_react_1.observer)(function ({ model, }) {
17
- return (react_1.default.createElement("div", null,
18
- react_1.default.createElement(material_1.IconButton, { onClick: () => {
19
- model.zoomOut();
20
- } },
21
- react_1.default.createElement(ZoomOut_1.default, null)),
22
- react_1.default.createElement(material_1.IconButton, { onClick: () => {
23
- model.zoomIn();
24
- } },
25
- react_1.default.createElement(ZoomIn_1.default, null)),
26
- react_1.default.createElement(material_1.IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector" },
27
- react_1.default.createElement(Icons_1.TrackSelector, null)),
28
- react_1.default.createElement(CascadingMenuButton_1.default, { menuItems: [
29
- {
30
- onClick: () => {
31
- model.squareView();
19
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
20
+ model.zoomOut();
21
+ }, children: (0, jsx_runtime_1.jsx)(ZoomOut_1.default, {}) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
22
+ model.zoomIn();
23
+ }, children: (0, jsx_runtime_1.jsx)(ZoomIn_1.default, {}) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector", children: (0, jsx_runtime_1.jsx)(Icons_1.TrackSelector, {}) }), (0, jsx_runtime_1.jsx)(CascadingMenuButton_1.default, { menuItems: [
24
+ {
25
+ label: 'Square view - same bp per pixel',
26
+ icon: CropDin_1.default,
27
+ onClick: () => {
28
+ model.squareView();
29
+ },
32
30
  },
33
- label: 'Square view - same base pairs per pixel',
34
- },
35
- {
36
- onClick: () => {
37
- model.squareViewProportional();
31
+ {
32
+ label: 'Rectangular view - same total bp',
33
+ icon: CropLandscape_1.default,
34
+ onClick: () => {
35
+ model.squareViewProportional();
36
+ },
38
37
  },
39
- label: 'Rectanglularize view - same total bp',
40
- },
41
- {
42
- onClick: () => {
43
- model.showAllRegions();
38
+ {
39
+ label: 'Show all regions',
40
+ icon: SettingsOverscan_1.default,
41
+ onClick: () => {
42
+ model.showAllRegions();
43
+ },
44
44
  },
45
- label: 'Show all regions',
46
- },
47
- {
48
- onClick: () => {
49
- model.setDrawCigar(!model.drawCigar);
45
+ {
46
+ type: 'checkbox',
47
+ label: 'Draw CIGAR',
48
+ checked: model.drawCigar,
49
+ onClick: () => {
50
+ model.setDrawCigar(!model.drawCigar);
51
+ },
50
52
  },
51
- type: 'checkbox',
52
- label: 'Draw CIGAR',
53
- checked: model.drawCigar,
54
- },
55
- {
56
- onClick: () => {
57
- model.setShowPanButtons(!model.showPanButtons);
53
+ {
54
+ label: 'Show pan buttons',
55
+ type: 'checkbox',
56
+ checked: model.showPanButtons,
57
+ onClick: () => {
58
+ model.setShowPanButtons(!model.showPanButtons);
59
+ },
58
60
  },
59
- label: 'Show pan buttons',
60
- type: 'checkbox',
61
- checked: model.showPanButtons,
62
- },
63
- {
64
- label: 'Click and drag mode',
65
- subMenu: [
66
- {
67
- onClick: () => {
68
- model.setCursorMode('move');
61
+ {
62
+ label: 'Click and drag mode',
63
+ subMenu: [
64
+ {
65
+ label: 'Pan by default, select region when ctrl/cmd key is held',
66
+ icon: CursorIcon_1.CursorMove,
67
+ type: 'radio',
68
+ checked: model.cursorMode === 'move',
69
+ onClick: () => {
70
+ model.setCursorMode('move');
71
+ },
69
72
  },
70
- label: 'Pan by default, select region when ctrl/cmd key is held',
71
- icon: CursorIcon_1.CursorMove,
72
- type: 'radio',
73
- checked: model.cursorMode === 'move',
74
- },
75
- {
76
- onClick: () => {
77
- model.setCursorMode('crosshair');
73
+ {
74
+ label: 'Select region by default, pan when ctrl/cmd key is held',
75
+ icon: CursorIcon_1.CursorMouse,
76
+ type: 'radio',
77
+ checked: model.cursorMode === 'crosshair',
78
+ onClick: () => {
79
+ model.setCursorMode('crosshair');
80
+ },
78
81
  },
79
- label: 'Select region by default, pan when ctrl/cmd key is held',
80
- icon: CursorIcon_1.CursorMouse,
81
- type: 'radio',
82
- checked: model.cursorMode === 'crosshair',
83
- },
84
- ],
85
- },
86
- {
87
- label: 'Wheel scroll mode',
88
- subMenu: [
89
- {
90
- onClick: () => {
91
- model.setWheelMode('pan');
82
+ ],
83
+ },
84
+ {
85
+ label: 'Wheel scroll mode',
86
+ subMenu: [
87
+ {
88
+ label: 'Pans view',
89
+ type: 'radio',
90
+ checked: model.wheelMode === 'pan',
91
+ onClick: () => {
92
+ model.setWheelMode('pan');
93
+ },
92
94
  },
93
- label: 'Pans view',
94
- type: 'radio',
95
- checked: model.wheelMode === 'pan',
96
- },
97
- {
98
- onClick: () => {
99
- model.setWheelMode('zoom');
95
+ {
96
+ label: 'Zooms view',
97
+ type: 'radio',
98
+ checked: model.wheelMode === 'zoom',
99
+ onClick: () => {
100
+ model.setWheelMode('zoom');
101
+ },
100
102
  },
101
- label: 'Zooms view',
102
- type: 'radio',
103
- checked: model.wheelMode === 'zoom',
104
- },
105
- {
106
- onClick: () => {
107
- model.setWheelMode('none');
103
+ {
104
+ label: 'Disable',
105
+ type: 'radio',
106
+ checked: model.wheelMode === 'none',
107
+ onClick: () => {
108
+ model.setWheelMode('none');
109
+ },
108
110
  },
109
- label: 'Disable',
110
- type: 'radio',
111
- checked: model.wheelMode === 'none',
112
- },
113
- ],
114
- },
115
- ] },
116
- react_1.default.createElement(MoreVert_1.default, null))));
111
+ ],
112
+ },
113
+ ], children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, {}) })] }));
117
114
  });
118
115
  exports.default = DotplotControls;
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model';
3
2
  type Coord = [number, number] | undefined;
4
3
  export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
5
4
  model: DotplotViewModel;
@@ -7,5 +6,5 @@ export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient,
7
6
  mousedownClient: Coord;
8
7
  xdistance: number;
9
8
  ydistance: number;
10
- }) => React.JSX.Element | null;
9
+ }) => import("react/jsx-runtime").JSX.Element | null;
11
10
  export default DotplotTooltipClick;
@@ -4,18 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DotplotTooltipClick = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const mobx_react_1 = require("mobx-react");
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
8
  const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
9
+ const mobx_react_1 = require("mobx-react");
10
10
  const util_1 = require("./util");
11
11
  exports.DotplotTooltipClick = (0, mobx_react_1.observer)(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
12
12
  const { hview, vview, viewHeight } = model;
13
13
  const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
14
14
  const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
15
- return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (react_1.default.createElement(BaseTooltip_1.default, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y } },
16
- `x - ${(0, util_1.locstr)(mousedown[0], hview)}`,
17
- react_1.default.createElement("br", null),
18
- `y - ${(0, util_1.locstr)(viewHeight - mousedown[1], vview)}`,
19
- react_1.default.createElement("br", null))) : null;
15
+ return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? ((0, jsx_runtime_1.jsxs)(BaseTooltip_1.default, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y }, children: [`x - ${(0, util_1.locstr)(mousedown[0], hview)}`, (0, jsx_runtime_1.jsx)("br", {}), `y - ${(0, util_1.locstr)(viewHeight - mousedown[1], vview)}`, (0, jsx_runtime_1.jsx)("br", {})] })) : null;
20
16
  });
21
17
  exports.default = exports.DotplotTooltipClick;
@@ -1,10 +1,9 @@
1
- import React from 'react';
2
- import { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model';
3
2
  type Coord = [number, number] | undefined;
4
3
  declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
5
4
  model: DotplotViewModel;
6
5
  mouserect: Coord;
7
6
  mouserectClient: Coord;
8
7
  xdistance: number;
9
- }) => React.JSX.Element | null;
8
+ }) => import("react/jsx-runtime").JSX.Element | null;
10
9
  export default DotplotTooltipMouseover;
@@ -3,18 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const mobx_react_1 = require("mobx-react");
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
7
  const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
8
+ const mobx_react_1 = require("mobx-react");
9
9
  const util_1 = require("./util");
10
10
  const DotplotTooltipMouseover = (0, mobx_react_1.observer)(function ({ model, mouserect, mouserectClient, xdistance, }) {
11
11
  const { hview, vview, viewHeight } = model;
12
- return mouserect ? (react_1.default.createElement(BaseTooltip_1.default, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
12
+ return mouserect ? ((0, jsx_runtime_1.jsxs)(BaseTooltip_1.default, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
13
13
  ? { x: mouserectClient[0], y: mouserectClient[1] }
14
- : undefined },
15
- `x - ${(0, util_1.locstr)(mouserect[0], hview)}`,
16
- react_1.default.createElement("br", null),
17
- `y - ${(0, util_1.locstr)(viewHeight - mouserect[1], vview)}`,
18
- react_1.default.createElement("br", null))) : null;
14
+ : undefined, children: [`x - ${(0, util_1.locstr)(mouserect[0], hview)}`, (0, jsx_runtime_1.jsx)("br", {}), `y - ${(0, util_1.locstr)(viewHeight - mouserect[1], vview)}`, (0, jsx_runtime_1.jsx)("br", {})] })) : null;
19
15
  });
20
16
  exports.default = DotplotTooltipMouseover;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- import { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model';
3
2
  declare const DotplotView: ({ model }: {
4
3
  model: DotplotViewModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export default DotplotView;
@@ -15,26 +15,37 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
39
+ const jsx_runtime_1 = require("react/jsx-runtime");
40
+ const react_1 = require("react");
30
41
  const ui_1 = require("@jbrowse/core/ui");
31
- const mobx_react_1 = require("mobx-react");
32
42
  const mobx_1 = require("mobx");
43
+ const mobx_react_1 = require("mobx-react");
33
44
  const mui_1 = require("tss-react/mui");
34
- const ImportForm_1 = __importDefault(require("./ImportForm"));
35
- const Header_1 = __importDefault(require("./Header"));
36
- const Grid_1 = __importDefault(require("./Grid"));
37
45
  const Axes_1 = require("./Axes");
46
+ const Grid_1 = __importDefault(require("./Grid"));
47
+ const Header_1 = __importDefault(require("./Header"));
48
+ const ImportForm_1 = __importDefault(require("./ImportForm"));
38
49
  const TooltipWhereClicked = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./DotplotTooltipClick'))));
39
50
  const TooltipWhereMouseovered = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./DotplotTooltipMouseover'))));
40
51
  const blank = { left: 0, top: 0, width: 0, height: 0 };
@@ -60,7 +71,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
60
71
  width: '100%',
61
72
  gridRow: '1/2',
62
73
  gridColumn: '2/2',
63
- zIndex: 100, // needs to be below controls
74
+ zIndex: 100,
64
75
  '& path': {
65
76
  cursor: 'crosshair',
66
77
  fill: 'none',
@@ -78,18 +89,16 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
78
89
  borderTop: '1px solid #fafafa',
79
90
  },
80
91
  }));
81
- // produces offsetX/offsetY coordinates from a clientX and an element's
82
- // getBoundingClientRect
83
92
  function getOffset(coord, rect) {
84
93
  return coord && [coord[0] - rect.left, coord[1] - rect.top];
85
94
  }
86
95
  const RenderedComponent = (0, mobx_react_1.observer)(({ model }) => {
87
96
  const { classes } = useStyles();
88
- return (react_1.default.createElement("div", { className: classes.overlay }, model.tracks.map(track => {
89
- const [display] = track.displays;
90
- const { RenderingComponent } = display;
91
- return RenderingComponent ? (react_1.default.createElement(RenderingComponent, { key: track.configuration.trackId, model: display })) : null;
92
- })));
97
+ return ((0, jsx_runtime_1.jsx)("div", { className: classes.overlay, children: model.tracks.map(track => {
98
+ const [display] = track.displays;
99
+ const { RenderingComponent } = display;
100
+ return RenderingComponent ? ((0, jsx_runtime_1.jsx)(RenderingComponent, { model: display }, track.configuration.trackId)) : null;
101
+ }) }));
93
102
  });
94
103
  const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
95
104
  var _a, _b;
@@ -119,7 +128,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
119
128
  (cursorMode === 'crosshair' && ctrlKeyWasUsed);
120
129
  const validSelect = (cursorMode === 'move' && ctrlKeyWasUsed) ||
121
130
  (cursorMode === 'crosshair' && !ctrlKeyWasUsed);
122
- // use non-React wheel handler to properly prevent body scrolling
123
131
  (0, react_1.useEffect)(() => {
124
132
  function onWheel(event) {
125
133
  event.preventDefault();
@@ -188,8 +196,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
188
196
  window.addEventListener('keyup', globalCtrlKeyUp);
189
197
  };
190
198
  }, []);
191
- // detect a mouseup after a mousedown was submitted, autoremoves mouseup once
192
- // that single mouseup is set
193
199
  (0, react_1.useEffect)(() => {
194
200
  function globalMouseUp(event) {
195
201
  if (Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 && validSelect) {
@@ -207,81 +213,63 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
207
213
  }
208
214
  return () => { };
209
215
  }, [validSelect, mousedown, mouseup, xdistance, ydistance]);
210
- return (react_1.default.createElement("div", null,
211
- react_1.default.createElement(Header_1.default, { model: model, selection: !validSelect || !(mousedown && mouserect)
212
- ? undefined
213
- : {
214
- width: Math.abs(xdistance),
215
- height: Math.abs(ydistance),
216
- } }),
217
- react_1.default.createElement("div", { ref: root, className: classes.root, onMouseLeave: () => {
218
- setMouseOvered(false);
219
- }, onMouseEnter: () => {
220
- setMouseOvered(true);
221
- } },
222
- react_1.default.createElement("div", { className: classes.container },
223
- react_1.default.createElement(Axes_1.VerticalAxis, { model: model }),
224
- react_1.default.createElement(Axes_1.HorizontalAxis, { model: model }),
225
- react_1.default.createElement("div", { ref: ref, className: classes.content },
226
- mouseOvered && validSelect ? (react_1.default.createElement(react_1.Suspense, { fallback: null },
227
- react_1.default.createElement(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance }))) : null,
228
- validSelect ? (react_1.default.createElement(react_1.Suspense, { fallback: null },
229
- react_1.default.createElement(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance }))) : null,
230
- react_1.default.createElement("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
231
- if (event.button === 0) {
232
- const { clientX, clientY } = event;
233
- setMouseDownClient([clientX, clientY]);
234
- setMouseCurrClient([clientX, clientY]);
235
- setCtrlKeyWasUsed(ctrlKeyDown);
236
- }
237
- } },
238
- react_1.default.createElement(Grid_1.default, { model: model }, validSelect && mousedown && mouserect ? (react_1.default.createElement("rect", { fill: "rgba(255,0,0,0.3)", x: Math.min(mouserect[0], mousedown[0]), y: Math.min(mouserect[1], mousedown[1]), width: Math.abs(xdistance), height: Math.abs(ydistance) })) : null)),
239
- react_1.default.createElement("div", { className: classes.spacer })),
240
- react_1.default.createElement(RenderedComponent, { model: model }),
241
- react_1.default.createElement(ui_1.Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
242
- callback();
243
- setMouseUpClient(undefined);
244
- setMouseDownClient(undefined);
245
- }, onClose: () => {
246
- setMouseUpClient(undefined);
247
- setMouseDownClient(undefined);
248
- }, anchorReference: "anchorPosition", anchorPosition: mouseupClient
249
- ? {
250
- top: mouseupClient[1] + 50,
251
- left: mouseupClient[0] + 50,
252
- }
253
- : undefined, style: { zIndex: 10000 }, menuItems: [
254
- {
255
- label: 'Zoom in',
256
- onClick: () => {
257
- if (mousedown && mouseup) {
258
- model.zoomInToMouseCoords(mousedown, mouseup);
259
- }
260
- // below line is needed to prevent tooltip from sticking
261
- setMouseOvered(false);
262
- },
263
- },
264
- {
265
- label: 'Open linear synteny view',
266
- onClick: () => {
267
- if (mousedown && mouseup) {
268
- model.onDotplotView(mousedown, mouseup);
269
- }
270
- // below line is needed to prevent tooltip from sticking
271
- setMouseOvered(false);
272
- },
273
- },
274
- ] })),
275
- react_1.default.createElement(ui_1.ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle }))));
216
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Header_1.default, { model: model, selection: !validSelect || !(mousedown && mouserect)
217
+ ? undefined
218
+ : {
219
+ width: Math.abs(xdistance),
220
+ height: Math.abs(ydistance),
221
+ } }), (0, jsx_runtime_1.jsxs)("div", { ref: root, className: classes.root, onMouseLeave: () => {
222
+ setMouseOvered(false);
223
+ }, onMouseEnter: () => {
224
+ setMouseOvered(true);
225
+ }, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(Axes_1.VerticalAxis, { model: model }), (0, jsx_runtime_1.jsx)(Axes_1.HorizontalAxis, { model: model }), (0, jsx_runtime_1.jsxs)("div", { ref: ref, className: classes.content, children: [mouseOvered && validSelect ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance }) })) : null, validSelect ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance }) })) : null, (0, jsx_runtime_1.jsx)("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
226
+ if (event.button === 0) {
227
+ const { clientX, clientY } = event;
228
+ setMouseDownClient([clientX, clientY]);
229
+ setMouseCurrClient([clientX, clientY]);
230
+ setCtrlKeyWasUsed(ctrlKeyDown);
231
+ }
232
+ }, children: (0, jsx_runtime_1.jsx)(Grid_1.default, { model: model, children: validSelect && mousedown && mouserect ? ((0, jsx_runtime_1.jsx)("rect", { fill: "rgba(255,0,0,0.3)", x: Math.min(mouserect[0], mousedown[0]), y: Math.min(mouserect[1], mousedown[1]), width: Math.abs(xdistance), height: Math.abs(ydistance) })) : null }) }), (0, jsx_runtime_1.jsx)("div", { className: classes.spacer })] }), (0, jsx_runtime_1.jsx)(RenderedComponent, { model: model }), (0, jsx_runtime_1.jsx)(ui_1.Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
233
+ callback();
234
+ setMouseUpClient(undefined);
235
+ setMouseDownClient(undefined);
236
+ }, onClose: () => {
237
+ setMouseUpClient(undefined);
238
+ setMouseDownClient(undefined);
239
+ }, anchorReference: "anchorPosition", anchorPosition: mouseupClient
240
+ ? {
241
+ top: mouseupClient[1] + 50,
242
+ left: mouseupClient[0] + 50,
243
+ }
244
+ : undefined, style: { zIndex: 10000 }, menuItems: [
245
+ {
246
+ label: 'Zoom in',
247
+ onClick: () => {
248
+ if (mousedown && mouseup) {
249
+ model.zoomInToMouseCoords(mousedown, mouseup);
250
+ }
251
+ setMouseOvered(false);
252
+ },
253
+ },
254
+ {
255
+ label: 'Open linear synteny view',
256
+ onClick: () => {
257
+ if (mousedown && mouseup) {
258
+ model.onDotplotView(mousedown, mouseup);
259
+ }
260
+ setMouseOvered(false);
261
+ },
262
+ },
263
+ ] })] }), (0, jsx_runtime_1.jsx)(ui_1.ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle })] })] }));
276
264
  });
277
265
  const DotplotView = (0, mobx_react_1.observer)(function ({ model }) {
278
266
  const { initialized, loading, error } = model;
279
267
  if ((!initialized && !loading) || error) {
280
- return react_1.default.createElement(ImportForm_1.default, { model: model });
268
+ return (0, jsx_runtime_1.jsx)(ImportForm_1.default, { model: model });
281
269
  }
282
270
  if (loading) {
283
- return react_1.default.createElement(ui_1.LoadingEllipses, { variant: "h6" });
271
+ return (0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { variant: "h6" });
284
272
  }
285
- return react_1.default.createElement(DotplotViewInternal, { model: model });
273
+ return (0, jsx_runtime_1.jsx)(DotplotViewInternal, { model: model });
286
274
  });
287
275
  exports.default = DotplotView;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- import { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model';
3
2
  declare const DotplotWarnings: ({ model, }: {
4
3
  model: DotplotViewModel;
5
- }) => React.JSX.Element | null;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
6
5
  export default DotplotWarnings;