@jbrowse/plugin-dotplot-view 2.18.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 (111) hide show
  1. package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +1 -2
  2. package/dist/DotplotDisplay/components/DotplotDisplay.js +6 -11
  3. package/dist/DotplotDisplay/stateModelFactory.d.ts +1 -2
  4. package/dist/DotplotDisplay/stateModelFactory.js +2 -3
  5. package/dist/DotplotRenderer/DotplotRenderer.d.ts +3 -3
  6. package/dist/DotplotRenderer/DotplotRenderer.js +17 -7
  7. package/dist/DotplotRenderer/components/DotplotRendering.d.ts +1 -2
  8. package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
  9. package/dist/DotplotView/components/Axes.d.ts +4 -5
  10. package/dist/DotplotView/components/Axes.js +23 -36
  11. package/dist/DotplotView/components/CursorIcon.d.ts +2 -3
  12. package/dist/DotplotView/components/CursorIcon.js +3 -5
  13. package/dist/DotplotView/components/DotplotControls.d.ts +1 -2
  14. package/dist/DotplotView/components/DotplotControls.js +89 -91
  15. package/dist/DotplotView/components/DotplotTooltipClick.d.ts +1 -2
  16. package/dist/DotplotView/components/DotplotTooltipClick.js +2 -6
  17. package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -2
  18. package/dist/DotplotView/components/DotplotTooltipMouseover.js +3 -7
  19. package/dist/DotplotView/components/DotplotView.d.ts +1 -2
  20. package/dist/DotplotView/components/DotplotView.js +75 -80
  21. package/dist/DotplotView/components/DotplotWarnings.d.ts +1 -2
  22. package/dist/DotplotView/components/DotplotWarnings.js +26 -20
  23. package/dist/DotplotView/components/ExportSvgDialog.d.ts +1 -2
  24. package/dist/DotplotView/components/ExportSvgDialog.js +31 -64
  25. package/dist/DotplotView/components/Grid.d.ts +2 -3
  26. package/dist/DotplotView/components/Grid.js +17 -28
  27. package/dist/DotplotView/components/Header.d.ts +1 -2
  28. package/dist/DotplotView/components/Header.js +2 -21
  29. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
  30. package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
  31. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +3 -5
  32. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +12 -38
  33. package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
  34. package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
  35. package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
  36. package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
  37. package/dist/DotplotView/components/ImportForm/index.d.ts +2 -3
  38. package/dist/DotplotView/components/ImportForm/index.js +43 -92
  39. package/dist/DotplotView/components/PanButtons.d.ts +1 -2
  40. package/dist/DotplotView/components/PanButtons.js +14 -32
  41. package/dist/DotplotView/components/WarningDialog.d.ts +1 -2
  42. package/dist/DotplotView/components/WarningDialog.js +2 -9
  43. package/dist/DotplotView/index.js +17 -7
  44. package/dist/DotplotView/model.d.ts +6 -4
  45. package/dist/DotplotView/model.js +40 -30
  46. package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
  47. package/dist/DotplotView/svgcomponents/SVGBackground.js +2 -5
  48. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +2 -16
  49. package/dist/DotplotView/types.d.ts +12 -0
  50. package/dist/DotplotView/types.js +2 -0
  51. package/dist/ServerSideRenderedBlockContent.d.ts +1 -2
  52. package/dist/ServerSideRenderedBlockContent.js +9 -34
  53. package/dist/ServerSideSyntenyRendering.d.ts +1 -2
  54. package/dist/ServerSideSyntenyRendering.js +3 -25
  55. package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -2
  56. package/esm/DotplotDisplay/components/DotplotDisplay.js +6 -8
  57. package/esm/DotplotDisplay/stateModelFactory.d.ts +1 -2
  58. package/esm/DotplotDisplay/stateModelFactory.js +2 -3
  59. package/esm/DotplotRenderer/DotplotRenderer.d.ts +3 -3
  60. package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -2
  61. package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
  62. package/esm/DotplotView/components/Axes.d.ts +4 -5
  63. package/esm/DotplotView/components/Axes.js +23 -33
  64. package/esm/DotplotView/components/CursorIcon.d.ts +2 -3
  65. package/esm/DotplotView/components/CursorIcon.js +3 -5
  66. package/esm/DotplotView/components/DotplotControls.d.ts +1 -2
  67. package/esm/DotplotView/components/DotplotControls.js +89 -91
  68. package/esm/DotplotView/components/DotplotTooltipClick.d.ts +1 -2
  69. package/esm/DotplotView/components/DotplotTooltipClick.js +2 -6
  70. package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -2
  71. package/esm/DotplotView/components/DotplotTooltipMouseover.js +3 -7
  72. package/esm/DotplotView/components/DotplotView.d.ts +1 -2
  73. package/esm/DotplotView/components/DotplotView.js +58 -73
  74. package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -2
  75. package/esm/DotplotView/components/DotplotWarnings.js +9 -13
  76. package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -2
  77. package/esm/DotplotView/components/ExportSvgDialog.js +31 -41
  78. package/esm/DotplotView/components/Grid.d.ts +2 -3
  79. package/esm/DotplotView/components/Grid.js +17 -25
  80. package/esm/DotplotView/components/Header.d.ts +1 -2
  81. package/esm/DotplotView/components/Header.js +2 -21
  82. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
  83. package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
  84. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +3 -5
  85. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +12 -15
  86. package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
  87. package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
  88. package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
  89. package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
  90. package/esm/DotplotView/components/ImportForm/index.d.ts +2 -3
  91. package/esm/DotplotView/components/ImportForm/index.js +45 -71
  92. package/esm/DotplotView/components/PanButtons.d.ts +1 -2
  93. package/esm/DotplotView/components/PanButtons.js +14 -32
  94. package/esm/DotplotView/components/WarningDialog.d.ts +1 -2
  95. package/esm/DotplotView/components/WarningDialog.js +2 -6
  96. package/esm/DotplotView/model.d.ts +6 -4
  97. package/esm/DotplotView/model.js +25 -25
  98. package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
  99. package/esm/DotplotView/svgcomponents/SVGBackground.js +2 -2
  100. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +2 -16
  101. package/esm/DotplotView/types.d.ts +12 -0
  102. package/esm/DotplotView/types.js +1 -0
  103. package/esm/ServerSideRenderedBlockContent.d.ts +1 -2
  104. package/esm/ServerSideRenderedBlockContent.js +9 -11
  105. package/esm/ServerSideSyntenyRendering.d.ts +1 -2
  106. package/esm/ServerSideSyntenyRendering.js +3 -2
  107. package/package.json +2 -2
  108. package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
  109. package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
  110. package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
  111. package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getFillProps, getStrokeProps, getTickDisplayStr, } from '@jbrowse/core/util';
3
3
  import { bpToPx } from '@jbrowse/core/util/Base1DUtils';
4
4
  import { useTheme } from '@mui/material';
@@ -23,8 +23,7 @@ const useStyles = makeStyles()(() => ({
23
23
  export const HorizontalAxis = observer(function ({ model, }) {
24
24
  const { viewWidth, borderY } = model;
25
25
  const { classes } = useStyles();
26
- return (React.createElement("svg", { width: viewWidth, height: borderY, className: classes.htext },
27
- React.createElement(HorizontalAxisRaw, { model: model })));
26
+ return (_jsx("svg", { width: viewWidth, height: borderY, className: classes.htext, children: _jsx(HorizontalAxisRaw, { model: model }) }));
28
27
  });
29
28
  export const HorizontalAxisRaw = observer(function ({ model, }) {
30
29
  const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model;
@@ -51,26 +50,21 @@ export const HorizontalAxisRaw = observer(function ({ model, }) {
51
50
  })
52
51
  .filter(f => f[1] !== undefined)
53
52
  .map(f => [f[0], f[1] - offsetPx]);
54
- return (React.createElement(React.Fragment, null,
55
- dblocks
56
- .filter(region => !hide.has(region.key))
57
- .map(region => {
58
- const x = region.offsetPx;
59
- const y = 0;
60
- const xoff = Math.floor(x - hview.offsetPx);
61
- 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));
62
- }),
63
- 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),
64
- ticks
65
- .filter(t => t[0].type === 'major')
66
- .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),
67
- 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(',') })] }));
68
63
  });
69
64
  export const VerticalAxis = observer(function ({ model, }) {
70
65
  const { borderX, viewHeight } = model;
71
66
  const { classes } = useStyles();
72
- return (React.createElement("svg", { className: classes.vtext, width: borderX, height: viewHeight },
73
- React.createElement(VerticalAxisRaw, { model: model })));
67
+ return (_jsx("svg", { className: classes.vtext, width: borderX, height: viewHeight, children: _jsx(VerticalAxisRaw, { model: model }) }));
74
68
  });
75
69
  export const VerticalAxisRaw = observer(function ({ model, }) {
76
70
  const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model;
@@ -97,18 +91,14 @@ export const VerticalAxisRaw = observer(function ({ model, }) {
97
91
  })
98
92
  .filter(f => f[1] !== undefined)
99
93
  .map(f => [f[0], f[1] - offsetPx]);
100
- return (React.createElement(React.Fragment, null,
101
- dblocks
102
- .filter(region => !hide.has(region.key))
103
- .map(region => {
104
- const y = region.offsetPx;
105
- const x = borderX;
106
- const yoff = Math.floor(viewHeight - y + offsetPx);
107
- 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));
108
- }),
109
- 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),
110
- ticks
111
- .filter(t => t[0].type === 'major')
112
- .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),
113
- 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(',') })] }));
114
104
  });
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { SvgIconProps } from '@mui/material/SvgIcon';
3
- export declare function CursorMove(props: SvgIconProps): React.JSX.Element;
4
- export declare function CursorMouse(props: SvgIconProps): React.JSX.Element;
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 React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import SvgIcon from '@mui/material/SvgIcon';
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
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,112 +1,110 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
3
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';
4
6
  import MoreVert from '@mui/icons-material/MoreVert';
7
+ import SettingsOverscanIcon from '@mui/icons-material/SettingsOverscan';
5
8
  import ZoomIn from '@mui/icons-material/ZoomIn';
6
9
  import ZoomOut from '@mui/icons-material/ZoomOut';
7
10
  import { IconButton } from '@mui/material';
8
11
  import { observer } from 'mobx-react';
9
12
  import { CursorMouse, CursorMove } from './CursorIcon';
10
13
  const DotplotControls = observer(function ({ model, }) {
11
- return (React.createElement("div", null,
12
- React.createElement(IconButton, { onClick: () => {
13
- model.zoomOut();
14
- } },
15
- React.createElement(ZoomOut, null)),
16
- React.createElement(IconButton, { onClick: () => {
17
- model.zoomIn();
18
- } },
19
- React.createElement(ZoomIn, null)),
20
- React.createElement(IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector" },
21
- React.createElement(TrackSelectorIcon, null)),
22
- React.createElement(CascadingMenuButton, { menuItems: [
23
- {
24
- onClick: () => {
25
- 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
+ },
26
25
  },
27
- label: 'Square view - same base pairs per pixel',
28
- },
29
- {
30
- onClick: () => {
31
- model.squareViewProportional();
26
+ {
27
+ label: 'Rectangular view - same total bp',
28
+ icon: CropLandscapeIcon,
29
+ onClick: () => {
30
+ model.squareViewProportional();
31
+ },
32
32
  },
33
- label: 'Rectanglularize view - same total bp',
34
- },
35
- {
36
- onClick: () => {
37
- model.showAllRegions();
33
+ {
34
+ label: 'Show all regions',
35
+ icon: SettingsOverscanIcon,
36
+ onClick: () => {
37
+ model.showAllRegions();
38
+ },
38
39
  },
39
- label: 'Show all regions',
40
- },
41
- {
42
- onClick: () => {
43
- model.setDrawCigar(!model.drawCigar);
40
+ {
41
+ type: 'checkbox',
42
+ label: 'Draw CIGAR',
43
+ checked: model.drawCigar,
44
+ onClick: () => {
45
+ model.setDrawCigar(!model.drawCigar);
46
+ },
44
47
  },
45
- type: 'checkbox',
46
- label: 'Draw CIGAR',
47
- checked: model.drawCigar,
48
- },
49
- {
50
- onClick: () => {
51
- 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
+ },
52
55
  },
53
- label: 'Show pan buttons',
54
- type: 'checkbox',
55
- checked: model.showPanButtons,
56
- },
57
- {
58
- label: 'Click and drag mode',
59
- subMenu: [
60
- {
61
- onClick: () => {
62
- 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
+ },
63
67
  },
64
- label: 'Pan by default, select region when ctrl/cmd key is held',
65
- icon: CursorMove,
66
- type: 'radio',
67
- checked: model.cursorMode === 'move',
68
- },
69
- {
70
- onClick: () => {
71
- 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
+ },
72
76
  },
73
- label: 'Select region by default, pan when ctrl/cmd key is held',
74
- icon: CursorMouse,
75
- type: 'radio',
76
- checked: model.cursorMode === 'crosshair',
77
- },
78
- ],
79
- },
80
- {
81
- label: 'Wheel scroll mode',
82
- subMenu: [
83
- {
84
- onClick: () => {
85
- 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
+ },
86
89
  },
87
- label: 'Pans view',
88
- type: 'radio',
89
- checked: model.wheelMode === 'pan',
90
- },
91
- {
92
- onClick: () => {
93
- model.setWheelMode('zoom');
90
+ {
91
+ label: 'Zooms view',
92
+ type: 'radio',
93
+ checked: model.wheelMode === 'zoom',
94
+ onClick: () => {
95
+ model.setWheelMode('zoom');
96
+ },
94
97
  },
95
- label: 'Zooms view',
96
- type: 'radio',
97
- checked: model.wheelMode === 'zoom',
98
- },
99
- {
100
- onClick: () => {
101
- model.setWheelMode('none');
98
+ {
99
+ label: 'Disable',
100
+ type: 'radio',
101
+ checked: model.wheelMode === 'none',
102
+ onClick: () => {
103
+ model.setWheelMode('none');
104
+ },
102
105
  },
103
- label: 'Disable',
104
- type: 'radio',
105
- checked: model.wheelMode === 'none',
106
- },
107
- ],
108
- },
109
- ] },
110
- React.createElement(MoreVert, null))));
106
+ ],
107
+ },
108
+ ], children: _jsx(MoreVert, {}) })] }));
111
109
  });
112
110
  export default DotplotControls;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { DotplotViewModel } from '../model';
3
2
  type Coord = [number, number] | undefined;
4
3
  export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
@@ -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,4 +1,4 @@
1
- import React from 'react';
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
4
  import { locstr } from './util';
@@ -6,10 +6,6 @@ export const DotplotTooltipClick = observer(function ({ model, mousedown, moused
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,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { DotplotViewModel } from '../model';
3
2
  type Coord = [number, number] | undefined;
4
3
  declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
@@ -6,5 +5,5 @@ declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdi
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';
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
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;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
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;
@@ -1,4 +1,5 @@
1
- import React, { Suspense, lazy, useEffect, useRef, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Suspense, lazy, useEffect, useRef, useState } from 'react';
2
3
  import { LoadingEllipses, Menu, ResizeHandle } from '@jbrowse/core/ui';
3
4
  import { transaction } from 'mobx';
4
5
  import { observer } from 'mobx-react';
@@ -55,11 +56,11 @@ function getOffset(coord, rect) {
55
56
  }
56
57
  const RenderedComponent = observer(({ model }) => {
57
58
  const { classes } = useStyles();
58
- return (React.createElement("div", { className: classes.overlay }, model.tracks.map(track => {
59
- const [display] = track.displays;
60
- const { RenderingComponent } = display;
61
- return RenderingComponent ? (React.createElement(RenderingComponent, { key: track.configuration.trackId, model: display })) : null;
62
- })));
59
+ return (_jsx("div", { className: classes.overlay, children: model.tracks.map(track => {
60
+ const [display] = track.displays;
61
+ const { RenderingComponent } = display;
62
+ return RenderingComponent ? (_jsx(RenderingComponent, { model: display }, track.configuration.trackId)) : null;
63
+ }) }));
63
64
  });
64
65
  const DotplotViewInternal = observer(function ({ model, }) {
65
66
  var _a, _b;
@@ -174,79 +175,63 @@ const DotplotViewInternal = observer(function ({ model, }) {
174
175
  }
175
176
  return () => { };
176
177
  }, [validSelect, mousedown, mouseup, xdistance, ydistance]);
177
- return (React.createElement("div", null,
178
- React.createElement(Header, { model: model, selection: !validSelect || !(mousedown && mouserect)
179
- ? undefined
180
- : {
181
- width: Math.abs(xdistance),
182
- height: Math.abs(ydistance),
183
- } }),
184
- React.createElement("div", { ref: root, className: classes.root, onMouseLeave: () => {
185
- setMouseOvered(false);
186
- }, onMouseEnter: () => {
187
- setMouseOvered(true);
188
- } },
189
- React.createElement("div", { className: classes.container },
190
- React.createElement(VerticalAxis, { model: model }),
191
- React.createElement(HorizontalAxis, { model: model }),
192
- React.createElement("div", { ref: ref, className: classes.content },
193
- mouseOvered && validSelect ? (React.createElement(Suspense, { fallback: null },
194
- React.createElement(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance }))) : null,
195
- validSelect ? (React.createElement(Suspense, { fallback: null },
196
- React.createElement(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance }))) : null,
197
- React.createElement("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
198
- if (event.button === 0) {
199
- const { clientX, clientY } = event;
200
- setMouseDownClient([clientX, clientY]);
201
- setMouseCurrClient([clientX, clientY]);
202
- setCtrlKeyWasUsed(ctrlKeyDown);
203
- }
204
- } },
205
- React.createElement(Grid, { model: model }, validSelect && mousedown && mouserect ? (React.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)),
206
- React.createElement("div", { className: classes.spacer })),
207
- React.createElement(RenderedComponent, { model: model }),
208
- React.createElement(Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
209
- callback();
210
- setMouseUpClient(undefined);
211
- setMouseDownClient(undefined);
212
- }, onClose: () => {
213
- setMouseUpClient(undefined);
214
- setMouseDownClient(undefined);
215
- }, anchorReference: "anchorPosition", anchorPosition: mouseupClient
216
- ? {
217
- top: mouseupClient[1] + 50,
218
- left: mouseupClient[0] + 50,
219
- }
220
- : undefined, style: { zIndex: 10000 }, menuItems: [
221
- {
222
- label: 'Zoom in',
223
- onClick: () => {
224
- if (mousedown && mouseup) {
225
- model.zoomInToMouseCoords(mousedown, mouseup);
226
- }
227
- setMouseOvered(false);
228
- },
229
- },
230
- {
231
- label: 'Open linear synteny view',
232
- onClick: () => {
233
- if (mousedown && mouseup) {
234
- model.onDotplotView(mousedown, mouseup);
235
- }
236
- setMouseOvered(false);
237
- },
238
- },
239
- ] })),
240
- React.createElement(ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle }))));
178
+ return (_jsxs("div", { children: [_jsx(Header, { model: model, selection: !validSelect || !(mousedown && mouserect)
179
+ ? undefined
180
+ : {
181
+ width: Math.abs(xdistance),
182
+ height: Math.abs(ydistance),
183
+ } }), _jsxs("div", { ref: root, className: classes.root, onMouseLeave: () => {
184
+ setMouseOvered(false);
185
+ }, onMouseEnter: () => {
186
+ setMouseOvered(true);
187
+ }, children: [_jsxs("div", { className: classes.container, children: [_jsx(VerticalAxis, { model: model }), _jsx(HorizontalAxis, { model: model }), _jsxs("div", { ref: ref, className: classes.content, 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, _jsx("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
188
+ if (event.button === 0) {
189
+ const { clientX, clientY } = event;
190
+ setMouseDownClient([clientX, clientY]);
191
+ setMouseCurrClient([clientX, clientY]);
192
+ setCtrlKeyWasUsed(ctrlKeyDown);
193
+ }
194
+ }, children: _jsx(Grid, { model: model, children: validSelect && mousedown && mouserect ? (_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 }) }), _jsx("div", { className: classes.spacer })] }), _jsx(RenderedComponent, { model: model }), _jsx(Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
195
+ callback();
196
+ setMouseUpClient(undefined);
197
+ setMouseDownClient(undefined);
198
+ }, onClose: () => {
199
+ setMouseUpClient(undefined);
200
+ setMouseDownClient(undefined);
201
+ }, anchorReference: "anchorPosition", anchorPosition: mouseupClient
202
+ ? {
203
+ top: mouseupClient[1] + 50,
204
+ left: mouseupClient[0] + 50,
205
+ }
206
+ : undefined, style: { zIndex: 10000 }, menuItems: [
207
+ {
208
+ label: 'Zoom in',
209
+ onClick: () => {
210
+ if (mousedown && mouseup) {
211
+ model.zoomInToMouseCoords(mousedown, mouseup);
212
+ }
213
+ setMouseOvered(false);
214
+ },
215
+ },
216
+ {
217
+ label: 'Open linear synteny view',
218
+ onClick: () => {
219
+ if (mousedown && mouseup) {
220
+ model.onDotplotView(mousedown, mouseup);
221
+ }
222
+ setMouseOvered(false);
223
+ },
224
+ },
225
+ ] })] }), _jsx(ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle })] })] }));
241
226
  });
242
227
  const DotplotView = observer(function ({ model }) {
243
228
  const { initialized, loading, error } = model;
244
229
  if ((!initialized && !loading) || error) {
245
- return React.createElement(ImportForm, { model: model });
230
+ return _jsx(ImportForm, { model: model });
246
231
  }
247
232
  if (loading) {
248
- return React.createElement(LoadingEllipses, { variant: "h6" });
233
+ return _jsx(LoadingEllipses, { variant: "h6" });
249
234
  }
250
- return React.createElement(DotplotViewInternal, { model: model });
235
+ return _jsx(DotplotViewInternal, { model: model });
251
236
  });
252
237
  export default DotplotView;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
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;
@@ -1,4 +1,5 @@
1
- import React, { lazy, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { lazy, useState } from 'react';
2
3
  import { Alert, Button } from '@mui/material';
3
4
  import { observer } from 'mobx-react';
4
5
  const WarningDialog = lazy(() => import('./WarningDialog'));
@@ -6,17 +7,12 @@ const DotplotWarnings = observer(function ({ model, }) {
6
7
  const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
7
8
  const [shown, setShown] = useState(false);
8
9
  const [hide, setHide] = useState(false);
9
- return trackWarnings.length && !hide ? (React.createElement(Alert, { severity: "warning" },
10
- "Warnings during render",
11
- ' ',
12
- React.createElement(Button, { onClick: () => {
13
- setShown(true);
14
- } }, "More info"),
15
- shown ? (React.createElement(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => {
16
- setShown(false);
17
- } })) : null,
18
- React.createElement(Button, { variant: "contained", onClick: () => {
19
- setHide(true);
20
- } }, "Dismiss"))) : null;
10
+ return trackWarnings.length && !hide ? (_jsxs(Alert, { severity: "warning", children: ["Warnings during render", ' ', _jsx(Button, { onClick: () => {
11
+ setShown(true);
12
+ }, children: "More info" }), shown ? (_jsx(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => {
13
+ setShown(false);
14
+ } })) : null, _jsx(Button, { variant: "contained", onClick: () => {
15
+ setHide(true);
16
+ }, children: "Dismiss" })] })) : null;
21
17
  });
22
18
  export default DotplotWarnings;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { ExportSvgOptions } from '../model';
3
2
  export default function ExportSvgDialog({ model, handleClose, }: {
4
3
  model: {
5
4
  exportSvg(opts: ExportSvgOptions): Promise<void>;
6
5
  };
7
6
  handleClose: () => void;
8
- }): React.JSX.Element;
7
+ }): import("react/jsx-runtime").JSX.Element;