@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.
- package/dist/ComparativeRenderer/index.d.ts +3 -8
- package/dist/ComparativeRenderer/index.js +3 -8
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/dist/DotplotDisplay/components/DotplotDisplay.js +7 -12
- package/dist/DotplotDisplay/index.d.ts +1 -7
- package/dist/DotplotDisplay/index.js +2 -12
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/dist/DotplotDisplay/renderDotplotBlock.js +3 -9
- package/dist/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/dist/DotplotDisplay/stateModelFactory.js +57 -100
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +13 -14
- package/dist/DotplotReadVsRef/index.d.ts +1 -1
- package/dist/DotplotReadVsRef/index.js +0 -2
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/dist/DotplotRenderer/DotplotRenderer.js +18 -9
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
- package/dist/DotplotRenderer/configSchema.d.ts +0 -21
- package/dist/DotplotRenderer/configSchema.js +2 -27
- package/dist/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/dist/DotplotRenderer/drawDotplot.js +3 -6
- package/dist/DotplotRenderer/index.d.ts +1 -1
- package/dist/DotplotRenderer/index.js +1 -1
- package/dist/DotplotView/1dview.d.ts +2 -77
- package/dist/DotplotView/1dview.js +4 -33
- package/dist/DotplotView/components/Axes.d.ts +5 -6
- package/dist/DotplotView/components/Axes.js +26 -40
- package/dist/DotplotView/components/CursorIcon.d.ts +3 -4
- package/dist/DotplotView/components/CursorIcon.js +3 -5
- package/dist/DotplotView/components/DotplotControls.d.ts +2 -3
- package/dist/DotplotView/components/DotplotControls.js +94 -97
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/dist/DotplotView/components/DotplotView.d.ts +2 -3
- package/dist/DotplotView/components/DotplotView.js +80 -92
- package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/dist/DotplotView/components/DotplotWarnings.js +26 -21
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/DotplotView/components/ExportSvgDialog.js +32 -67
- package/dist/DotplotView/components/Grid.d.ts +3 -4
- package/dist/DotplotView/components/Grid.js +19 -32
- package/dist/DotplotView/components/Header.d.ts +2 -3
- package/dist/DotplotView/components/Header.js +4 -23
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -48
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
- package/dist/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/dist/DotplotView/components/ImportForm/index.js +47 -97
- package/dist/DotplotView/components/ImportForm/util.js +1 -3
- package/dist/DotplotView/components/PanButtons.d.ts +2 -3
- package/dist/DotplotView/components/PanButtons.js +17 -36
- package/dist/DotplotView/components/WarningDialog.d.ts +7 -7
- package/dist/DotplotView/components/WarningDialog.js +12 -15
- package/dist/DotplotView/components/util.d.ts +2 -7
- package/dist/DotplotView/components/util.js +0 -5
- package/dist/DotplotView/index.d.ts +1 -1
- package/dist/DotplotView/index.js +17 -8
- package/dist/DotplotView/model.d.ts +11 -133
- package/dist/DotplotView/model.js +46 -222
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/DotplotView/svgcomponents/SVGBackground.js +3 -6
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/dist/DotplotView/types.d.ts +12 -0
- package/dist/DotplotView/types.js +2 -0
- package/dist/LaunchDotplotView.d.ts +1 -1
- package/dist/LaunchDotplotView.js +1 -4
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
- package/dist/ServerSideRenderedBlockContent.js +11 -37
- package/dist/ServerSideSyntenyRendering.d.ts +1 -6
- package/dist/ServerSideSyntenyRendering.js +4 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -6
- package/dist/util.d.ts +1 -1
- package/esm/ComparativeRenderer/index.d.ts +3 -8
- package/esm/ComparativeRenderer/index.js +3 -8
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/esm/DotplotDisplay/components/DotplotDisplay.js +7 -9
- package/esm/DotplotDisplay/index.d.ts +1 -7
- package/esm/DotplotDisplay/index.js +2 -12
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/esm/DotplotDisplay/renderDotplotBlock.js +3 -6
- package/esm/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/esm/DotplotDisplay/stateModelFactory.js +58 -101
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +15 -16
- package/esm/DotplotReadVsRef/index.d.ts +1 -1
- package/esm/DotplotReadVsRef/index.js +0 -2
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
- package/esm/DotplotRenderer/configSchema.d.ts +0 -21
- package/esm/DotplotRenderer/configSchema.js +2 -27
- package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/esm/DotplotRenderer/drawDotplot.js +4 -7
- package/esm/DotplotRenderer/index.d.ts +1 -1
- package/esm/DotplotRenderer/index.js +1 -1
- package/esm/DotplotView/1dview.d.ts +2 -77
- package/esm/DotplotView/1dview.js +4 -33
- package/esm/DotplotView/components/Axes.d.ts +5 -6
- package/esm/DotplotView/components/Axes.js +26 -37
- package/esm/DotplotView/components/CursorIcon.d.ts +3 -4
- package/esm/DotplotView/components/CursorIcon.js +3 -5
- package/esm/DotplotView/components/DotplotControls.d.ts +2 -3
- package/esm/DotplotView/components/DotplotControls.js +94 -97
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/esm/DotplotView/components/DotplotView.d.ts +2 -3
- package/esm/DotplotView/components/DotplotView.js +63 -85
- package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/esm/DotplotView/components/DotplotWarnings.js +9 -14
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/DotplotView/components/ExportSvgDialog.js +32 -44
- package/esm/DotplotView/components/Grid.d.ts +3 -4
- package/esm/DotplotView/components/Grid.js +19 -29
- package/esm/DotplotView/components/Header.d.ts +2 -3
- package/esm/DotplotView/components/Header.js +4 -23
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -25
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
- package/esm/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/esm/DotplotView/components/ImportForm/index.js +48 -75
- package/esm/DotplotView/components/ImportForm/util.js +1 -3
- package/esm/DotplotView/components/PanButtons.d.ts +2 -3
- package/esm/DotplotView/components/PanButtons.js +17 -36
- package/esm/DotplotView/components/WarningDialog.d.ts +7 -7
- package/esm/DotplotView/components/WarningDialog.js +12 -12
- package/esm/DotplotView/components/util.d.ts +2 -7
- package/esm/DotplotView/components/util.js +0 -5
- package/esm/DotplotView/index.d.ts +1 -1
- package/esm/DotplotView/index.js +0 -1
- package/esm/DotplotView/model.d.ts +11 -133
- package/esm/DotplotView/model.js +30 -216
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/DotplotView/svgcomponents/SVGBackground.js +3 -3
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/esm/DotplotView/types.d.ts +12 -0
- package/esm/DotplotView/types.js +1 -0
- package/esm/LaunchDotplotView.d.ts +1 -1
- package/esm/LaunchDotplotView.js +1 -4
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
- package/esm/ServerSideRenderedBlockContent.js +11 -14
- package/esm/ServerSideSyntenyRendering.d.ts +1 -6
- package/esm/ServerSideSyntenyRendering.js +4 -3
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -6
- package/esm/util.d.ts +1 -1
- package/package.json +2 -4
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = LaunchDotplotView;
|
|
4
4
|
const mobx_1 = require("mobx");
|
|
5
5
|
function LaunchDotplotView(pluginManager) {
|
|
6
|
-
pluginManager.addToExtensionPoint('LaunchView-DotplotView',
|
|
7
|
-
// @ts-expect-error
|
|
8
|
-
async ({ session, views, tracks = [], }) => {
|
|
6
|
+
pluginManager.addToExtensionPoint('LaunchView-DotplotView', async ({ session, views, tracks = [], }) => {
|
|
9
7
|
try {
|
|
10
8
|
const model = session.addView('DotplotView', {});
|
|
11
9
|
const assemblyNames = views.map(view => view.assembly);
|
|
@@ -16,7 +14,6 @@ function LaunchDotplotView(pluginManager) {
|
|
|
16
14
|
]);
|
|
17
15
|
model.setAssemblyNames(assemblyNames[0], assemblyNames[1]);
|
|
18
16
|
});
|
|
19
|
-
// http://localhost:3000/?config=test_data%2Fvolvox%2Fconfig.json&session=spec-{"views":[{"type":"DotplotView","views":[{"assembly":"volvox"},{"assembly":"volvox"}],"tracks":["volvox_fake_synteny"]}]}
|
|
20
17
|
const idsNotFound = [];
|
|
21
18
|
tracks.forEach(track => {
|
|
22
19
|
tryTrack(model, track, idsNotFound);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
2
|
declare const ServerSideRenderedDotplotContent: ({ model, style, }: {
|
|
3
3
|
model: {
|
|
4
4
|
error?: unknown;
|
|
@@ -8,5 +8,5 @@ declare const ServerSideRenderedDotplotContent: ({ model, style, }: {
|
|
|
8
8
|
reactElement?: React.ReactElement;
|
|
9
9
|
};
|
|
10
10
|
style: CSSProperties;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
export default ServerSideRenderedDotplotContent;
|
|
@@ -1,33 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const material_1 = require("@mui/material");
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
29
5
|
const ui_1 = require("@jbrowse/core/ui");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
30
7
|
const mobx_react_1 = require("mobx-react");
|
|
8
|
+
const mui_1 = require("tss-react/mui");
|
|
31
9
|
const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
32
10
|
const bg = theme.palette.action.disabledBackground;
|
|
33
11
|
return {
|
|
@@ -49,7 +27,6 @@ const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
|
49
27
|
};
|
|
50
28
|
});
|
|
51
29
|
function LoadingMessage() {
|
|
52
|
-
// only show the loading message after 300ms to prevent excessive flickering
|
|
53
30
|
const [shown, setShown] = (0, react_1.useState)(false);
|
|
54
31
|
const { classes } = useStyles();
|
|
55
32
|
(0, react_1.useEffect)(() => {
|
|
@@ -60,31 +37,28 @@ function LoadingMessage() {
|
|
|
60
37
|
clearTimeout(timeout);
|
|
61
38
|
};
|
|
62
39
|
}, []);
|
|
63
|
-
return shown ? (
|
|
64
|
-
react_1.default.createElement(ui_1.LoadingEllipses, null))) : null;
|
|
40
|
+
return shown ? ((0, jsx_runtime_1.jsx)("div", { className: classes.loading, children: (0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, {}) })) : null;
|
|
65
41
|
}
|
|
66
42
|
function BlockMessage({ messageText }) {
|
|
67
43
|
const { classes } = useStyles();
|
|
68
|
-
return (
|
|
69
|
-
react_1.default.createElement(material_1.Typography, null, messageText)));
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes.blockMessage, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: messageText }) }));
|
|
70
45
|
}
|
|
71
46
|
function BlockError({ error }) {
|
|
72
47
|
const { classes } = useStyles();
|
|
73
|
-
return (
|
|
74
|
-
react_1.default.createElement(material_1.Typography, null, `${error}`)));
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes.blockError, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: `${error}` }) }));
|
|
75
49
|
}
|
|
76
50
|
const ServerSideRenderedDotplotContent = (0, mobx_react_1.observer)(function ({ model, style, }) {
|
|
77
51
|
if (model.error) {
|
|
78
|
-
return
|
|
52
|
+
return (0, jsx_runtime_1.jsx)(BlockError, { error: model.error, "data-testid": "reload_button" });
|
|
79
53
|
}
|
|
80
54
|
else if (model.message) {
|
|
81
|
-
return
|
|
55
|
+
return (0, jsx_runtime_1.jsx)(BlockMessage, { messageText: model.message });
|
|
82
56
|
}
|
|
83
57
|
else if (!model.filled) {
|
|
84
|
-
return
|
|
58
|
+
return (0, jsx_runtime_1.jsx)(LoadingMessage, {});
|
|
85
59
|
}
|
|
86
60
|
else if (model.shouldDisplay) {
|
|
87
|
-
return
|
|
61
|
+
return (0, jsx_runtime_1.jsx)("div", { style: style, children: model.reactElement });
|
|
88
62
|
}
|
|
89
63
|
return null;
|
|
90
64
|
});
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* A block whose content is rendered outside of the main thread and hydrated by
|
|
4
|
-
* this component.
|
|
5
|
-
*/
|
|
6
1
|
interface ModelType {
|
|
7
2
|
imageData: string;
|
|
8
3
|
style: Record<string, string>;
|
|
@@ -14,5 +9,5 @@ interface ModelType {
|
|
|
14
9
|
}
|
|
15
10
|
declare const ServerSideSyntenyRendering: ({ model, }: {
|
|
16
11
|
model: ModelType;
|
|
17
|
-
}) =>
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
13
|
export default ServerSideSyntenyRendering;
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
27
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
28
5
|
const offscreenCanvasPonyfill_1 = require("@jbrowse/core/util/offscreenCanvasPonyfill");
|
|
6
|
+
const mobx_react_1 = require("mobx-react");
|
|
29
7
|
const ServerSideSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
30
8
|
const { imageData, style, renderProps } = model;
|
|
31
9
|
const { width, height, highResolutionScaling = 1 } = renderProps;
|
|
@@ -40,6 +18,6 @@ const ServerSideSyntenyRendering = (0, mobx_react_1.observer)(function ({ model,
|
|
|
40
18
|
(0, offscreenCanvasPonyfill_1.drawImageOntoCanvasContext)(imageData, context);
|
|
41
19
|
setDone(true);
|
|
42
20
|
}, [imageData]);
|
|
43
|
-
return (
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("canvas", { "data-testid": `prerendered_canvas${done ? '_done' : ''}`, ref: featureCanvas, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
|
|
44
22
|
});
|
|
45
23
|
exports.default = ServerSideSyntenyRendering;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class DotplotPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
7
7
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
// icons
|
|
9
8
|
const Timeline_1 = __importDefault(require("@mui/icons-material/Timeline"));
|
|
10
|
-
|
|
11
|
-
const DotplotView_1 = __importDefault(require("./DotplotView"));
|
|
9
|
+
const ComparativeRenderer_1 = __importDefault(require("./ComparativeRenderer"));
|
|
12
10
|
const DotplotDisplay_1 = __importDefault(require("./DotplotDisplay"));
|
|
11
|
+
const DotplotReadVsRef_1 = __importDefault(require("./DotplotReadVsRef"));
|
|
13
12
|
const DotplotRenderer_1 = __importDefault(require("./DotplotRenderer"));
|
|
13
|
+
const DotplotView_1 = __importDefault(require("./DotplotView"));
|
|
14
14
|
const LaunchDotplotView_1 = __importDefault(require("./LaunchDotplotView"));
|
|
15
|
-
const ComparativeRenderer_1 = __importDefault(require("./ComparativeRenderer"));
|
|
16
|
-
const DotplotReadVsRef_1 = __importDefault(require("./DotplotReadVsRef"));
|
|
17
15
|
class DotplotPlugin extends Plugin_1.default {
|
|
18
16
|
constructor() {
|
|
19
17
|
super(...arguments);
|
|
@@ -25,7 +23,6 @@ class DotplotPlugin extends Plugin_1.default {
|
|
|
25
23
|
(0, DotplotRenderer_1.default)(pluginManager);
|
|
26
24
|
(0, LaunchDotplotView_1.default)(pluginManager);
|
|
27
25
|
(0, DotplotReadVsRef_1.default)(pluginManager);
|
|
28
|
-
// install our comparative rendering rpc callback
|
|
29
26
|
pluginManager.addRpcMethod(() => new ComparativeRenderer_1.default(pluginManager));
|
|
30
27
|
}
|
|
31
28
|
configure(pluginManager) {
|
package/dist/util.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type { RenderArgs as ComparativeRenderArgs, RenderArgsSerialized as ComparativeRenderArgsSerialized, RenderResults, ResultsSerialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
3
|
+
import type ComparativeRenderer from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
4
4
|
interface RenderArgs extends ComparativeRenderArgs {
|
|
5
5
|
adapterConfig: Record<string, unknown>;
|
|
6
6
|
rendererType: string;
|
|
@@ -9,18 +9,13 @@ interface RenderArgsSerialized extends ComparativeRenderArgsSerialized {
|
|
|
9
9
|
adapterConfig: Record<string, unknown>;
|
|
10
10
|
rendererType: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* call a synteny renderer with the given args
|
|
14
|
-
* param views: a set of views that each contain a set of regions
|
|
15
|
-
* used instead of passing regions directly as in render()
|
|
16
|
-
*/
|
|
17
12
|
export default class ComparativeRender extends RpcMethodType {
|
|
18
13
|
name: string;
|
|
19
14
|
renameRegionsIfNeeded(args: RenderArgs, rend: ComparativeRenderer): Promise<ComparativeRenderArgs>;
|
|
20
15
|
getRenderer(rendererType: string): ComparativeRenderer;
|
|
21
16
|
serializeArguments(args: RenderArgs, rpcDriver: string): Promise<ComparativeRenderArgs | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized>;
|
|
22
17
|
execute(args: RenderArgsSerialized & {
|
|
23
|
-
|
|
18
|
+
stopToken?: string;
|
|
24
19
|
}, rpcDriver: string): Promise<RenderResults | import("@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType").ResultsSerialized>;
|
|
25
20
|
deserializeReturn(val: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
|
|
26
21
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { checkAbortSignal } from '@jbrowse/core/util';
|
|
2
1
|
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
3
|
-
|
|
4
|
-
* call a synteny renderer with the given args
|
|
5
|
-
* param views: a set of views that each contain a set of regions
|
|
6
|
-
* used instead of passing regions directly as in render()
|
|
7
|
-
*/
|
|
2
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
3
|
export default class ComparativeRender extends RpcMethodType {
|
|
9
4
|
constructor() {
|
|
10
5
|
super(...arguments);
|
|
@@ -31,11 +26,11 @@ export default class ComparativeRender extends RpcMethodType {
|
|
|
31
26
|
if (rpcDriver !== 'MainThreadRpcDriver') {
|
|
32
27
|
deserializedArgs = await this.deserializeArguments(args, rpcDriver);
|
|
33
28
|
}
|
|
34
|
-
const { sessionId, rendererType,
|
|
29
|
+
const { sessionId, rendererType, stopToken } = deserializedArgs;
|
|
35
30
|
if (!sessionId) {
|
|
36
31
|
throw new Error('must pass a unique session id');
|
|
37
32
|
}
|
|
38
|
-
|
|
33
|
+
checkStopToken(stopToken);
|
|
39
34
|
const renderer = this.getRenderer(rendererType);
|
|
40
35
|
return rpcDriver === 'MainThreadRpcDriver'
|
|
41
36
|
? renderer.render(deserializedArgs)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotDisplayModel } from '../stateModelFactory';
|
|
1
|
+
import type { DotplotDisplayModel } from '../stateModelFactory';
|
|
3
2
|
declare const DotplotDisplay: (props: {
|
|
4
3
|
model: DotplotDisplayModel;
|
|
5
4
|
children?: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default DotplotDisplay;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
const DotplotDisplay = observer(function DotplotDisplay(props) {
|
|
5
5
|
const { model, children } = props;
|
|
6
6
|
const { offsetX = 0, offsetY = 0 } = model.data || {};
|
|
7
7
|
const view = getContainingView(model);
|
|
8
8
|
const top = view.vview.offsetPx - offsetY;
|
|
9
9
|
const left = -(view.hview.offsetPx - offsetX);
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} }),
|
|
16
|
-
children));
|
|
10
|
+
return (_jsxs("div", { style: { position: 'relative' }, children: [_jsx(model.ReactComponent2, { ...props, style: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top,
|
|
13
|
+
left,
|
|
14
|
+
} }), children] }));
|
|
17
15
|
});
|
|
18
16
|
export default DotplotDisplay;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function DotplotDisplayF(pm: PluginManager): void;
|
|
3
|
-
/**
|
|
4
|
-
* #config DotplotDisplay
|
|
5
|
-
*/
|
|
6
3
|
export declare function configSchemaFactory(pm: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
renderer: import("mobx-state-tree").IOptionalIType<any, [undefined]>;
|
|
11
5
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
3
2
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
4
|
-
|
|
5
|
-
import { stateModelFactory } from './stateModelFactory';
|
|
3
|
+
import { types } from 'mobx-state-tree';
|
|
6
4
|
import ReactComponent from './components/DotplotDisplay';
|
|
5
|
+
import { stateModelFactory } from './stateModelFactory';
|
|
7
6
|
export default function DotplotDisplayF(pm) {
|
|
8
7
|
pm.addDisplayType(() => {
|
|
9
8
|
const configSchema = configSchemaFactory(pm);
|
|
@@ -18,21 +17,12 @@ export default function DotplotDisplayF(pm) {
|
|
|
18
17
|
});
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
/**
|
|
22
|
-
* #config DotplotDisplay
|
|
23
|
-
*/
|
|
24
20
|
export function configSchemaFactory(pm) {
|
|
25
21
|
return ConfigurationSchema('DotplotDisplay', {
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
22
|
renderer: types.optional(pm.pluggableConfigSchemaType('renderer'), {
|
|
30
23
|
type: 'DotplotRenderer',
|
|
31
24
|
}),
|
|
32
25
|
}, {
|
|
33
|
-
/**
|
|
34
|
-
* #identifier
|
|
35
|
-
*/
|
|
36
26
|
explicitIdentifier: 'displayId',
|
|
37
27
|
explicitlyTyped: true,
|
|
38
28
|
});
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import clone from 'clone';
|
|
2
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
+
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
4
4
|
import { getSnapshot } from 'mobx-state-tree';
|
|
5
|
-
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
6
5
|
export function renderBlockData(self) {
|
|
7
6
|
const { rpcManager } = getSession(self);
|
|
8
7
|
const { rendererType } = self;
|
|
9
8
|
const { adapterConfig } = self;
|
|
10
9
|
const parent = getContainingView(self);
|
|
11
|
-
// Alternative to readConfObject(config) is below used because renderProps is
|
|
12
|
-
// something under our control. Compare to serverSideRenderedBlock
|
|
13
10
|
readConfObject(self.configuration);
|
|
14
11
|
getSnapshot(parent);
|
|
15
12
|
if (parent.initialized) {
|
|
@@ -19,7 +16,7 @@ export function renderBlockData(self) {
|
|
|
19
16
|
rpcManager,
|
|
20
17
|
renderProps: {
|
|
21
18
|
...self.renderProps(),
|
|
22
|
-
view:
|
|
19
|
+
view: structuredClone(getSnapshot(parent)),
|
|
23
20
|
width: viewWidth,
|
|
24
21
|
height: viewHeight,
|
|
25
22
|
borderSize,
|
|
@@ -28,7 +25,7 @@ export function renderBlockData(self) {
|
|
|
28
25
|
adapterConfig,
|
|
29
26
|
rendererType: rendererType.name,
|
|
30
27
|
sessionId: getRpcSessionId(self),
|
|
31
|
-
timeout: 1000000,
|
|
28
|
+
timeout: 1000000,
|
|
32
29
|
},
|
|
33
30
|
};
|
|
34
31
|
}
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ExportSvgOptions } from '../DotplotView/model';
|
|
6
|
-
/**
|
|
7
|
-
* #stateModel DotplotDisplay
|
|
8
|
-
* #category display
|
|
9
|
-
*/
|
|
1
|
+
import type { ExportSvgOptions } from '../DotplotView/model';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { ThemeOptions } from '@mui/material';
|
|
4
|
+
import type { Instance } from 'mobx-state-tree';
|
|
10
5
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
11
6
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
12
7
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
13
8
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
14
9
|
} & {
|
|
15
|
-
/**
|
|
16
|
-
* #property
|
|
17
|
-
*/
|
|
18
10
|
type: import("mobx-state-tree").ISimpleType<"DotplotDisplay">;
|
|
19
|
-
/**
|
|
20
|
-
* #property
|
|
21
|
-
*/
|
|
22
11
|
configuration: AnyConfigurationSchemaType;
|
|
23
12
|
}, {
|
|
24
13
|
rendererTypeName: string;
|
|
25
14
|
error: unknown;
|
|
26
15
|
message: string | undefined;
|
|
27
16
|
} & {
|
|
28
|
-
readonly RenderingComponent: React.
|
|
29
|
-
/**
|
|
30
|
-
* #stateModel DotplotDisplay
|
|
31
|
-
* #category display
|
|
32
|
-
*/
|
|
33
|
-
FC<{
|
|
17
|
+
readonly RenderingComponent: React.FC<{
|
|
34
18
|
model: {
|
|
35
19
|
id: string;
|
|
36
20
|
type: string;
|
|
@@ -84,11 +68,11 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
84
68
|
setRpcDriverName(rpcDriverName: string): void;
|
|
85
69
|
reload(): void;
|
|
86
70
|
} & {
|
|
71
|
+
stopToken: string | undefined;
|
|
87
72
|
warnings: {
|
|
88
73
|
message: string;
|
|
89
74
|
effect: string;
|
|
90
75
|
}[];
|
|
91
|
-
renderInProgress: AbortController | undefined;
|
|
92
76
|
filled: boolean;
|
|
93
77
|
data: any;
|
|
94
78
|
reactElement: React.ReactElement | undefined;
|
|
@@ -97,42 +81,21 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
97
81
|
ReactComponent2: React.FC<any>;
|
|
98
82
|
} & {
|
|
99
83
|
readonly shouldDisplay: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* #getter
|
|
102
|
-
*/
|
|
103
84
|
readonly rendererTypeName: any;
|
|
104
|
-
/**
|
|
105
|
-
* #method
|
|
106
|
-
*/
|
|
107
85
|
renderProps(): any;
|
|
108
86
|
} & {
|
|
109
|
-
/**
|
|
110
|
-
* #method
|
|
111
|
-
*/
|
|
112
87
|
renderSvg(opts: ExportSvgOptions & {
|
|
113
88
|
theme?: ThemeOptions;
|
|
114
|
-
}): Promise<
|
|
89
|
+
}): Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
115
90
|
} & {
|
|
116
91
|
afterAttach(): void;
|
|
117
|
-
|
|
118
|
-
* #action
|
|
119
|
-
*/
|
|
120
|
-
setLoading(abortController: AbortController): void;
|
|
121
|
-
/**
|
|
122
|
-
* #action
|
|
123
|
-
*/
|
|
92
|
+
setLoading(stopToken?: string): void;
|
|
124
93
|
setMessage(messageText: string): void;
|
|
125
|
-
/**
|
|
126
|
-
* #action
|
|
127
|
-
*/
|
|
128
94
|
setRendered(args?: {
|
|
129
95
|
data: any;
|
|
130
96
|
reactElement: React.ReactElement;
|
|
131
97
|
renderingComponent: React.Component;
|
|
132
98
|
}): void;
|
|
133
|
-
/**
|
|
134
|
-
* #action
|
|
135
|
-
*/
|
|
136
99
|
setError(error: unknown): void;
|
|
137
100
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
138
101
|
export type DotplotDisplayStateModel = ReturnType<typeof stateModelFactory>;
|