@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
@@ -1,4 +1,4 @@
1
- import { Instance } from 'mobx-state-tree';
1
+ import type { Instance } from 'mobx-state-tree';
2
2
  declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
3
3
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
4
4
  displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[]>, [undefined]>;
@@ -53,39 +53,14 @@ declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
53
53
  } & {
54
54
  moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
55
55
  } & {
56
- /**
57
- * #action
58
- */
59
56
  setScaleFactor(n: number): void;
60
- /**
61
- * #action
62
- */
63
57
  center(): void;
64
58
  } & {
65
- /**
66
- * #getter
67
- * this uses padding=false and elision=false
68
- */
69
59
  readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
70
- /**
71
- * #getter
72
- */
73
60
  readonly scaleFactor: number;
74
- /**
75
- * #getter
76
- */
77
61
  readonly maxBpPerPx: number;
78
- /**
79
- * #getter
80
- */
81
62
  readonly minBpPerPx: number;
82
- /**
83
- * #getter
84
- */
85
63
  readonly maxOffset: number;
86
- /**
87
- * #getter
88
- */
89
64
  readonly minOffset: number;
90
65
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
91
66
  declare const DotplotHView: import("mobx-state-tree").IModelType<{
@@ -142,39 +117,14 @@ declare const DotplotHView: import("mobx-state-tree").IModelType<{
142
117
  } & {
143
118
  moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
144
119
  } & {
145
- /**
146
- * #action
147
- */
148
120
  setScaleFactor(n: number): void;
149
- /**
150
- * #action
151
- */
152
121
  center(): void;
153
122
  } & {
154
- /**
155
- * #getter
156
- * this uses padding=false and elision=false
157
- */
158
123
  readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
159
- /**
160
- * #getter
161
- */
162
124
  readonly scaleFactor: number;
163
- /**
164
- * #getter
165
- */
166
125
  readonly maxBpPerPx: number;
167
- /**
168
- * #getter
169
- */
170
126
  readonly minBpPerPx: number;
171
- /**
172
- * #getter
173
- */
174
127
  readonly maxOffset: number;
175
- /**
176
- * #getter
177
- */
178
128
  readonly minOffset: number;
179
129
  } & {
180
130
  readonly width: any;
@@ -233,42 +183,17 @@ declare const DotplotVView: import("mobx-state-tree").IModelType<{
233
183
  } & {
234
184
  moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
235
185
  } & {
236
- /**
237
- * #action
238
- */
239
186
  setScaleFactor(n: number): void;
240
- /**
241
- * #action
242
- */
243
187
  center(): void;
244
188
  } & {
245
- /**
246
- * #getter
247
- * this uses padding=false and elision=false
248
- */
249
189
  readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
250
- /**
251
- * #getter
252
- */
253
190
  readonly scaleFactor: number;
254
- /**
255
- * #getter
256
- */
257
191
  readonly maxBpPerPx: number;
258
- /**
259
- * #getter
260
- */
261
192
  readonly minBpPerPx: number;
262
- /**
263
- * #getter
264
- */
265
193
  readonly maxOffset: number;
266
- /**
267
- * #getter
268
- */
269
194
  readonly minOffset: number;
270
195
  } & {
271
196
  readonly width: any;
272
197
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
273
- export { DotplotVView, DotplotHView, Dotplot1DView };
198
+ export { Dotplot1DView, DotplotHView, DotplotVView };
274
199
  export type Dotplot1DViewModel = Instance<typeof Dotplot1DView>;
@@ -1,64 +1,35 @@
1
- import { getParent } from 'mobx-state-tree';
2
- import { observable } from 'mobx';
3
1
  import Base1DView from '@jbrowse/core/util/Base1DViewModel';
4
2
  import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
5
- /**
6
- * #stateModel Dotplot1DView
7
- * ref https://mobx-state-tree.js.org/concepts/volatiles on volatile state used here
8
- */
9
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ import { observable } from 'mobx';
4
+ import { getParent } from 'mobx-state-tree';
5
+ function x() { }
10
6
  const Dotplot1DView = Base1DView.extend(self => {
11
7
  const scaleFactor = observable.box(1);
12
8
  return {
13
9
  views: {
14
- /**
15
- * #getter
16
- * this uses padding=false and elision=false
17
- */
18
10
  get dynamicBlocks() {
19
11
  return calculateDynamicBlocks(self, false, false);
20
12
  },
21
- /**
22
- * #getter
23
- */
24
13
  get scaleFactor() {
25
14
  return scaleFactor.get();
26
15
  },
27
- /**
28
- * #getter
29
- */
30
16
  get maxBpPerPx() {
31
17
  return self.totalBp / (self.width - 50);
32
18
  },
33
- /**
34
- * #getter
35
- */
36
19
  get minBpPerPx() {
37
20
  return 1 / 50;
38
21
  },
39
- /**
40
- * #getter
41
- */
42
22
  get maxOffset() {
43
23
  return self.displayedRegionsTotalPx - self.width * 0.2;
44
24
  },
45
- /**
46
- * #getter
47
- */
48
25
  get minOffset() {
49
26
  return -self.width * 0.8;
50
27
  },
51
28
  },
52
29
  actions: {
53
- /**
54
- * #action
55
- */
56
30
  setScaleFactor(n) {
57
31
  scaleFactor.set(n);
58
32
  },
59
- /**
60
- * #action
61
- */
62
33
  center() {
63
34
  const centerBp = self.totalBp / 2;
64
35
  const centerPx = centerBp / self.bpPerPx;
@@ -81,4 +52,4 @@ const DotplotVView = Dotplot1DView.extend(self => ({
81
52
  },
82
53
  },
83
54
  }));
84
- export { DotplotVView, DotplotHView, Dotplot1DView };
55
+ export { Dotplot1DView, DotplotHView, DotplotVView };
@@ -1,14 +1,13 @@
1
- import React from 'react';
2
- import { DotplotViewModel } from '../model';
1
+ import type { DotplotViewModel } from '../model';
3
2
  export declare const HorizontalAxis: ({ model, }: {
4
3
  model: DotplotViewModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export declare const HorizontalAxisRaw: ({ model, }: {
7
6
  model: DotplotViewModel;
8
- }) => React.JSX.Element;
7
+ }) => import("react/jsx-runtime").JSX.Element;
9
8
  export declare const VerticalAxis: ({ model, }: {
10
9
  model: DotplotViewModel;
11
- }) => React.JSX.Element;
10
+ }) => import("react/jsx-runtime").JSX.Element;
12
11
  export declare const VerticalAxisRaw: ({ model, }: {
13
12
  model: DotplotViewModel;
14
- }) => React.JSX.Element;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,10 @@
1
- import React from 'react';
2
- import { makeStyles } from 'tss-react/mui';
3
- import { observer } from 'mobx-react';
4
- import { getSnapshot } from 'mobx-state-tree';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
5
2
  import { getFillProps, getStrokeProps, getTickDisplayStr, } from '@jbrowse/core/util';
6
3
  import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
7
4
  import { useTheme } from '@mui/material';
8
- // locals
5
+ import { observer } from 'mobx-react';
6
+ import { getSnapshot } from 'mobx-state-tree';
7
+ import { makeStyles } from 'tss-react/mui';
9
8
  import { getBlockLabelKeysToHide } from './util';
10
9
  const useStyles = makeStyles()(() => ({
11
10
  vtext: {
@@ -24,8 +23,7 @@ const useStyles = makeStyles()(() => ({
24
23
  export const HorizontalAxis = observer(function ({ model, }) {
25
24
  const { viewWidth, borderY } = model;
26
25
  const { classes } = useStyles();
27
- return (React.createElement("svg", { width: viewWidth, height: borderY, className: classes.htext },
28
- React.createElement(HorizontalAxisRaw, { model: model })));
26
+ return (_jsx("svg", { width: viewWidth, height: borderY, className: classes.htext, children: _jsx(HorizontalAxisRaw, { model: model }) }));
29
27
  });
30
28
  export const HorizontalAxisRaw = observer(function ({ model, }) {
31
29
  const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model;
@@ -52,26 +50,21 @@ export const HorizontalAxisRaw = observer(function ({ model, }) {
52
50
  })
53
51
  .filter(f => f[1] !== undefined)
54
52
  .map(f => [f[0], f[1] - offsetPx]);
55
- return (React.createElement(React.Fragment, null,
56
- dblocks
57
- .filter(region => !hide.has(region.key))
58
- .map(region => {
59
- const x = region.offsetPx;
60
- const y = 0;
61
- const xoff = Math.floor(x - hview.offsetPx);
62
- return (React.createElement("text", { transform: `rotate(${htextRotation},${xoff},${y})`, key: JSON.stringify(region), x: xoff, y: y + 1, fontSize: 11, dominantBaseline: "hanging", textAnchor: "end", ...getFillProps(theme.palette.text.primary) }, region.refName));
63
- }),
64
- ticks.map(([tick, x]) => x > 0 && x < width ? (React.createElement("line", { key: `line-${JSON.stringify(tick)}`, x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, ...getFillProps(theme.palette.text.primary) })) : null),
65
- ticks
66
- .filter(t => t[0].type === 'major')
67
- .map(([tick, x]) => x > 10 && x < width ? (React.createElement("text", { x: x - 7, y: 0, transform: `rotate(${htextRotation},${x},0)`, key: `text-${JSON.stringify(tick)}`, fontSize: 11, dominantBaseline: "middle", textAnchor: "end", ...getFillProps(theme.palette.text.primary) }, getTickDisplayStr(tick.base + 1, bpPerPx))) : null),
68
- React.createElement("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging", ...getFillProps(theme.palette.text.primary) }, hview.assemblyNames.join(','))));
53
+ return (_jsxs(_Fragment, { children: [dblocks
54
+ .filter(region => !hide.has(region.key))
55
+ .map(region => {
56
+ const x = region.offsetPx;
57
+ const y = 0;
58
+ const xoff = Math.floor(x - hview.offsetPx);
59
+ return (_jsx("text", { transform: `rotate(${htextRotation},${xoff},${y})`, x: xoff, y: y + 1, fontSize: 11, dominantBaseline: "hanging", textAnchor: "end", ...getFillProps(theme.palette.text.primary), children: region.refName }, JSON.stringify(region)));
60
+ }), ticks.map(([tick, x]) => x > 0 && x < width ? (_jsx("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, ...getFillProps(theme.palette.text.primary) }, `line-${JSON.stringify(tick)}`)) : null), ticks
61
+ .filter(t => t[0].type === 'major')
62
+ .map(([tick, x]) => x > 10 && x < width ? (_jsx("text", { x: x - 7, y: 0, transform: `rotate(${htextRotation},${x},0)`, fontSize: 11, dominantBaseline: "middle", textAnchor: "end", ...getFillProps(theme.palette.text.primary), children: getTickDisplayStr(tick.base + 1, bpPerPx) }, `text-${JSON.stringify(tick)}`)) : null), _jsx("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging", ...getFillProps(theme.palette.text.primary), children: hview.assemblyNames.join(',') })] }));
69
63
  });
70
64
  export const VerticalAxis = observer(function ({ model, }) {
71
65
  const { borderX, viewHeight } = model;
72
66
  const { classes } = useStyles();
73
- return (React.createElement("svg", { className: classes.vtext, width: borderX, height: viewHeight },
74
- React.createElement(VerticalAxisRaw, { model: model })));
67
+ return (_jsx("svg", { className: classes.vtext, width: borderX, height: viewHeight, children: _jsx(VerticalAxisRaw, { model: model }) }));
75
68
  });
76
69
  export const VerticalAxisRaw = observer(function ({ model, }) {
77
70
  const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model;
@@ -98,18 +91,14 @@ export const VerticalAxisRaw = observer(function ({ model, }) {
98
91
  })
99
92
  .filter(f => f[1] !== undefined)
100
93
  .map(f => [f[0], f[1] - offsetPx]);
101
- return (React.createElement(React.Fragment, null,
102
- dblocks
103
- .filter(region => !hide.has(region.key))
104
- .map(region => {
105
- const y = region.offsetPx;
106
- const x = borderX;
107
- const yoff = Math.floor(viewHeight - y + offsetPx);
108
- return (React.createElement("text", { transform: `rotate(${vtextRotation},${x},${y})`, key: JSON.stringify(region), x: x, y: yoff, fontSize: 11, textAnchor: "end", ...getFillProps(theme.palette.text.primary) }, region.refName));
109
- }),
110
- ticks.map(([tick, y]) => y > 0 ? (React.createElement("line", { key: `line-${JSON.stringify(tick)}`, y1: viewHeight - y, y2: viewHeight - y, x1: borderX, x2: borderX - (tick.type === 'major' ? 6 : 4), strokeWidth: 1, ...getStrokeProps(theme.palette.grey[400]) })) : null),
111
- ticks
112
- .filter(t => t[0].type === 'major')
113
- .map(([tick, y]) => y > 10 && y < viewHeight ? (React.createElement("text", { y: viewHeight - y - 3, x: borderX - 7, key: `text-${JSON.stringify(tick)}`, textAnchor: "end", dominantBaseline: "hanging", fontSize: 11, ...getFillProps(theme.palette.text.primary) }, getTickDisplayStr(tick.base + 1, bpPerPx))) : null),
114
- React.createElement("text", { y: (viewHeight - borderY) / 2, x: 12, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11, ...getFillProps(theme.palette.text.primary) }, vview.assemblyNames.join(','))));
94
+ return (_jsxs(_Fragment, { children: [dblocks
95
+ .filter(region => !hide.has(region.key))
96
+ .map(region => {
97
+ const y = region.offsetPx;
98
+ const x = borderX;
99
+ const yoff = Math.floor(viewHeight - y + offsetPx);
100
+ return (_jsx("text", { transform: `rotate(${vtextRotation},${x},${y})`, x: x, y: yoff, fontSize: 11, textAnchor: "end", ...getFillProps(theme.palette.text.primary), children: region.refName }, JSON.stringify(region)));
101
+ }), ticks.map(([tick, y]) => y > 0 ? (_jsx("line", { y1: viewHeight - y, y2: viewHeight - y, x1: borderX, x2: borderX - (tick.type === 'major' ? 6 : 4), strokeWidth: 1, ...getStrokeProps(theme.palette.grey[400]) }, `line-${JSON.stringify(tick)}`)) : null), ticks
102
+ .filter(t => t[0].type === 'major')
103
+ .map(([tick, y]) => y > 10 && y < viewHeight ? (_jsx("text", { y: viewHeight - y - 3, x: borderX - 7, textAnchor: "end", dominantBaseline: "hanging", fontSize: 11, ...getFillProps(theme.palette.text.primary), children: getTickDisplayStr(tick.base + 1, bpPerPx) }, `text-${JSON.stringify(tick)}`)) : null), _jsx("text", { y: (viewHeight - borderY) / 2, x: 12, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11, ...getFillProps(theme.palette.text.primary), children: vview.assemblyNames.join(',') })] }));
115
104
  });
@@ -1,4 +1,3 @@
1
- import { SvgIconProps } from '@mui/material/SvgIcon';
2
- import React from 'react';
3
- export declare function CursorMove(props: SvgIconProps): React.JSX.Element;
4
- export declare function CursorMouse(props: SvgIconProps): React.JSX.Element;
1
+ import type { SvgIconProps } from '@mui/material/SvgIcon';
2
+ export declare function CursorMove(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function CursorMouse(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import SvgIcon from '@mui/material/SvgIcon';
2
- import React from 'react';
3
3
  export function CursorMove(props) {
4
- return (React.createElement(SvgIcon, { ...props },
5
- React.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" })));
4
+ return (_jsx(SvgIcon, { ...props, children: _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" }) }));
6
5
  }
7
6
  export function CursorMouse(props) {
8
- return (React.createElement(SvgIcon, { ...props },
9
- React.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" })));
7
+ return (_jsx(SvgIcon, { ...props, children: _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" }) }));
10
8
  }
@@ -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;
@@ -1,113 +1,110 @@
1
- import React from 'react';
2
- import { IconButton } from '@mui/material';
3
- import { observer } from 'mobx-react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
2
  import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
5
- // icons
6
- import ZoomOut from '@mui/icons-material/ZoomOut';
7
- import ZoomIn from '@mui/icons-material/ZoomIn';
3
+ import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
4
+ import CropDinIcon from '@mui/icons-material/CropDin';
5
+ import CropLandscapeIcon from '@mui/icons-material/CropLandscape';
8
6
  import MoreVert from '@mui/icons-material/MoreVert';
7
+ import SettingsOverscanIcon from '@mui/icons-material/SettingsOverscan';
8
+ import ZoomIn from '@mui/icons-material/ZoomIn';
9
+ import ZoomOut from '@mui/icons-material/ZoomOut';
10
+ import { IconButton } from '@mui/material';
11
+ import { observer } from 'mobx-react';
9
12
  import { CursorMouse, CursorMove } from './CursorIcon';
10
- import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
11
13
  const DotplotControls = observer(function ({ model, }) {
12
- return (React.createElement("div", null,
13
- React.createElement(IconButton, { onClick: () => {
14
- model.zoomOut();
15
- } },
16
- React.createElement(ZoomOut, null)),
17
- React.createElement(IconButton, { onClick: () => {
18
- model.zoomIn();
19
- } },
20
- React.createElement(ZoomIn, null)),
21
- React.createElement(IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector" },
22
- React.createElement(TrackSelectorIcon, null)),
23
- React.createElement(CascadingMenuButton, { menuItems: [
24
- {
25
- onClick: () => {
26
- model.squareView();
14
+ return (_jsxs("div", { children: [_jsx(IconButton, { onClick: () => {
15
+ model.zoomOut();
16
+ }, children: _jsx(ZoomOut, {}) }), _jsx(IconButton, { onClick: () => {
17
+ model.zoomIn();
18
+ }, children: _jsx(ZoomIn, {}) }), _jsx(IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector", children: _jsx(TrackSelectorIcon, {}) }), _jsx(CascadingMenuButton, { menuItems: [
19
+ {
20
+ label: 'Square view - same bp per pixel',
21
+ icon: CropDinIcon,
22
+ onClick: () => {
23
+ model.squareView();
24
+ },
27
25
  },
28
- label: 'Square view - same base pairs per pixel',
29
- },
30
- {
31
- onClick: () => {
32
- model.squareViewProportional();
26
+ {
27
+ label: 'Rectangular view - same total bp',
28
+ icon: CropLandscapeIcon,
29
+ onClick: () => {
30
+ model.squareViewProportional();
31
+ },
33
32
  },
34
- label: 'Rectanglularize view - same total bp',
35
- },
36
- {
37
- onClick: () => {
38
- model.showAllRegions();
33
+ {
34
+ label: 'Show all regions',
35
+ icon: SettingsOverscanIcon,
36
+ onClick: () => {
37
+ model.showAllRegions();
38
+ },
39
39
  },
40
- label: 'Show all regions',
41
- },
42
- {
43
- onClick: () => {
44
- model.setDrawCigar(!model.drawCigar);
40
+ {
41
+ type: 'checkbox',
42
+ label: 'Draw CIGAR',
43
+ checked: model.drawCigar,
44
+ onClick: () => {
45
+ model.setDrawCigar(!model.drawCigar);
46
+ },
45
47
  },
46
- type: 'checkbox',
47
- label: 'Draw CIGAR',
48
- checked: model.drawCigar,
49
- },
50
- {
51
- onClick: () => {
52
- model.setShowPanButtons(!model.showPanButtons);
48
+ {
49
+ label: 'Show pan buttons',
50
+ type: 'checkbox',
51
+ checked: model.showPanButtons,
52
+ onClick: () => {
53
+ model.setShowPanButtons(!model.showPanButtons);
54
+ },
53
55
  },
54
- label: 'Show pan buttons',
55
- type: 'checkbox',
56
- checked: model.showPanButtons,
57
- },
58
- {
59
- label: 'Click and drag mode',
60
- subMenu: [
61
- {
62
- onClick: () => {
63
- model.setCursorMode('move');
56
+ {
57
+ label: 'Click and drag mode',
58
+ subMenu: [
59
+ {
60
+ label: 'Pan by default, select region when ctrl/cmd key is held',
61
+ icon: CursorMove,
62
+ type: 'radio',
63
+ checked: model.cursorMode === 'move',
64
+ onClick: () => {
65
+ model.setCursorMode('move');
66
+ },
64
67
  },
65
- label: 'Pan by default, select region when ctrl/cmd key is held',
66
- icon: CursorMove,
67
- type: 'radio',
68
- checked: model.cursorMode === 'move',
69
- },
70
- {
71
- onClick: () => {
72
- model.setCursorMode('crosshair');
68
+ {
69
+ label: 'Select region by default, pan when ctrl/cmd key is held',
70
+ icon: CursorMouse,
71
+ type: 'radio',
72
+ checked: model.cursorMode === 'crosshair',
73
+ onClick: () => {
74
+ model.setCursorMode('crosshair');
75
+ },
73
76
  },
74
- label: 'Select region by default, pan when ctrl/cmd key is held',
75
- icon: CursorMouse,
76
- type: 'radio',
77
- checked: model.cursorMode === 'crosshair',
78
- },
79
- ],
80
- },
81
- {
82
- label: 'Wheel scroll mode',
83
- subMenu: [
84
- {
85
- onClick: () => {
86
- model.setWheelMode('pan');
77
+ ],
78
+ },
79
+ {
80
+ label: 'Wheel scroll mode',
81
+ subMenu: [
82
+ {
83
+ label: 'Pans view',
84
+ type: 'radio',
85
+ checked: model.wheelMode === 'pan',
86
+ onClick: () => {
87
+ model.setWheelMode('pan');
88
+ },
87
89
  },
88
- label: 'Pans view',
89
- type: 'radio',
90
- checked: model.wheelMode === 'pan',
91
- },
92
- {
93
- onClick: () => {
94
- model.setWheelMode('zoom');
90
+ {
91
+ label: 'Zooms view',
92
+ type: 'radio',
93
+ checked: model.wheelMode === 'zoom',
94
+ onClick: () => {
95
+ model.setWheelMode('zoom');
96
+ },
95
97
  },
96
- label: 'Zooms view',
97
- type: 'radio',
98
- checked: model.wheelMode === 'zoom',
99
- },
100
- {
101
- onClick: () => {
102
- model.setWheelMode('none');
98
+ {
99
+ label: 'Disable',
100
+ type: 'radio',
101
+ checked: model.wheelMode === 'none',
102
+ onClick: () => {
103
+ model.setWheelMode('none');
104
+ },
103
105
  },
104
- label: 'Disable',
105
- type: 'radio',
106
- checked: model.wheelMode === 'none',
107
- },
108
- ],
109
- },
110
- ] },
111
- React.createElement(MoreVert, null))));
106
+ ],
107
+ },
108
+ ], children: _jsx(MoreVert, {}) })] }));
112
109
  });
113
110
  export 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;
@@ -1,15 +1,11 @@
1
- import React from 'react';
2
- import { observer } from 'mobx-react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
3
+ import { observer } from 'mobx-react';
4
4
  import { locstr } from './util';
5
5
  export const DotplotTooltipClick = observer(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
6
6
  const { hview, vview, viewHeight } = model;
7
7
  const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
8
8
  const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
9
- return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (React.createElement(BaseTooltip, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y } },
10
- `x - ${locstr(mousedown[0], hview)}`,
11
- React.createElement("br", null),
12
- `y - ${locstr(viewHeight - mousedown[1], vview)}`,
13
- React.createElement("br", null))) : null;
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;
14
10
  });
15
11
  export default 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;
@@ -1,15 +1,11 @@
1
- import React from 'react';
2
- import { observer } from 'mobx-react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
3
+ import { observer } from 'mobx-react';
4
4
  import { locstr } from './util';
5
5
  const DotplotTooltipMouseover = observer(function ({ model, mouserect, mouserectClient, xdistance, }) {
6
6
  const { hview, vview, viewHeight } = model;
7
- return mouserect ? (React.createElement(BaseTooltip, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
7
+ return mouserect ? (_jsxs(BaseTooltip, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
8
8
  ? { x: mouserectClient[0], y: mouserectClient[1] }
9
- : undefined },
10
- `x - ${locstr(mouserect[0], hview)}`,
11
- React.createElement("br", null),
12
- `y - ${locstr(viewHeight - mouserect[1], vview)}`,
13
- React.createElement("br", null))) : null;
9
+ : undefined, children: [`x - ${locstr(mouserect[0], hview)}`, _jsx("br", {}), `y - ${locstr(viewHeight - mouserect[1], vview)}`, _jsx("br", {})] })) : null;
14
10
  });
15
11
  export default DotplotTooltipMouseover;