@jbrowse/plugin-arc 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/ArcRenderer/ArcRendering.d.ts +3 -4
- package/dist/ArcRenderer/ArcRendering.js +37 -37
- package/dist/ArcRenderer/configSchema.d.ts +0 -18
- package/dist/ArcRenderer/configSchema.js +1 -22
- package/dist/ArcRenderer/index.d.ts +1 -1
- package/dist/ArcRenderer/index.js +1 -1
- package/dist/ArcTooltip.d.ts +1 -2
- package/dist/ArcTooltip.js +6 -30
- package/dist/LinearArcDisplay/configSchema.d.ts +1 -7
- package/dist/LinearArcDisplay/configSchema.js +1 -10
- package/dist/LinearArcDisplay/index.d.ts +1 -1
- package/dist/LinearArcDisplay/model.d.ts +18 -87
- package/dist/LinearArcDisplay/model.js +2 -40
- package/dist/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/afterAttach.js +1 -1
- package/dist/LinearPairedArcDisplay/components/Arcs.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/Arcs.js +46 -40
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/BaseDisplayComponent.js +33 -32
- package/dist/LinearPairedArcDisplay/components/ReactComponent.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/components/ReactComponent.js +3 -4
- package/dist/LinearPairedArcDisplay/components/util.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/components/util.js +1 -7
- package/dist/LinearPairedArcDisplay/configSchema.d.ts +0 -6
- package/dist/LinearPairedArcDisplay/configSchema.js +0 -9
- package/dist/LinearPairedArcDisplay/fetchChains.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/fetchChains.js +1 -2
- package/dist/LinearPairedArcDisplay/index.d.ts +1 -1
- package/dist/LinearPairedArcDisplay/index.js +18 -8
- package/dist/LinearPairedArcDisplay/model.d.ts +9 -53
- package/dist/LinearPairedArcDisplay/model.js +19 -48
- package/dist/LinearPairedArcDisplay/renderSvg.d.ts +2 -3
- package/dist/LinearPairedArcDisplay/renderSvg.js +2 -7
- package/dist/LinearPairedArcDisplay/util.d.ts +4 -4
- package/dist/LinearPairedArcDisplay/util.js +3 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/esm/ArcRenderer/ArcRendering.d.ts +3 -4
- package/esm/ArcRenderer/ArcRendering.js +21 -31
- package/esm/ArcRenderer/configSchema.d.ts +0 -18
- package/esm/ArcRenderer/configSchema.js +1 -22
- package/esm/ArcRenderer/index.d.ts +1 -1
- package/esm/ArcRenderer/index.js +1 -1
- package/esm/ArcTooltip.d.ts +1 -2
- package/esm/ArcTooltip.js +6 -7
- package/esm/LinearArcDisplay/configSchema.d.ts +1 -7
- package/esm/LinearArcDisplay/configSchema.js +1 -10
- package/esm/LinearArcDisplay/index.d.ts +1 -1
- package/esm/LinearArcDisplay/model.d.ts +18 -87
- package/esm/LinearArcDisplay/model.js +3 -41
- package/esm/LinearPairedArcDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/afterAttach.js +1 -1
- package/esm/LinearPairedArcDisplay/components/Arcs.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/Arcs.js +29 -33
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/BaseDisplayComponent.js +16 -25
- package/esm/LinearPairedArcDisplay/components/ReactComponent.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/components/ReactComponent.js +3 -4
- package/esm/LinearPairedArcDisplay/components/util.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/components/util.js +1 -7
- package/esm/LinearPairedArcDisplay/configSchema.d.ts +0 -6
- package/esm/LinearPairedArcDisplay/configSchema.js +0 -9
- package/esm/LinearPairedArcDisplay/fetchChains.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/fetchChains.js +1 -2
- package/esm/LinearPairedArcDisplay/index.d.ts +1 -1
- package/esm/LinearPairedArcDisplay/index.js +1 -1
- package/esm/LinearPairedArcDisplay/model.d.ts +9 -53
- package/esm/LinearPairedArcDisplay/model.js +3 -42
- package/esm/LinearPairedArcDisplay/renderSvg.d.ts +2 -3
- package/esm/LinearPairedArcDisplay/renderSvg.js +2 -7
- package/esm/LinearPairedArcDisplay/util.d.ts +4 -4
- package/esm/LinearPairedArcDisplay/util.js +3 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Feature, Region } from '@jbrowse/core/util';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
4
3
|
declare const ArcRendering: ({ features, config, regions, bpPerPx, height, exportSVG, displayModel, onFeatureClick, }: {
|
|
5
4
|
features: Map<string, Feature>;
|
|
6
5
|
config: AnyConfigurationModel;
|
|
@@ -12,5 +11,5 @@ declare const ArcRendering: ({ features, config, regions, bpPerPx, height, expor
|
|
|
12
11
|
};
|
|
13
12
|
onFeatureClick: (event: React.MouseEvent, featureId: string) => void;
|
|
14
13
|
exportSVG: boolean;
|
|
15
|
-
}) =>
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export default ArcRendering;
|
|
@@ -15,19 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
36
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
|
+
const react_1 = require("react");
|
|
27
38
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
28
39
|
const util_1 = require("@jbrowse/core/util");
|
|
29
40
|
const mobx_react_1 = require("mobx-react");
|
|
30
|
-
// locals
|
|
31
41
|
const ArcTooltip = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../ArcTooltip'))));
|
|
32
42
|
function Arc({ selectedFeatureId, region, bpPerPx, config, height: displayHeight, feature, onFeatureClick, }) {
|
|
33
43
|
const [isMouseOvered, setIsMouseOvered] = (0, react_1.useState)(false);
|
|
@@ -40,23 +50,17 @@ function Arc({ selectedFeatureId, region, bpPerPx, config, height: displayHeight
|
|
|
40
50
|
const caption = (0, configuration_1.readConfObject)(config, 'caption', { feature });
|
|
41
51
|
const strokeWidth = (0, configuration_1.readConfObject)(config, 'thickness', { feature }) || 2;
|
|
42
52
|
const height = Math.min((0, configuration_1.readConfObject)(config, 'height', { feature }) || 100, displayHeight);
|
|
43
|
-
const ref = react_1.
|
|
44
|
-
// formula: https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B%C3%A9zier_curves
|
|
53
|
+
const ref = (0, react_1.useRef)(null);
|
|
45
54
|
const t = 0.5;
|
|
46
55
|
const t1 = 1 - t;
|
|
47
56
|
const textYCoord = 3 * (t1 * t1) * (t * height) + 3 * t1 * (t * t) * height;
|
|
48
|
-
return (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, pointerEvents: "stroke" }),
|
|
56
|
-
isMouseOvered ? (react_1.default.createElement(react_1.Suspense, { fallback: null },
|
|
57
|
-
react_1.default.createElement(ArcTooltip, { contents: caption }))) : null,
|
|
58
|
-
react_1.default.createElement("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: "white", strokeWidth: "0.6em" }, label),
|
|
59
|
-
react_1.default.createElement("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: textStroke }, label)));
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { ref: ref, ...(0, util_1.getStrokeProps)(stroke), d: `M ${left} 0 C ${left} ${height}, ${right} ${height}, ${right} 0`, strokeWidth: strokeWidth, fill: "transparent", onClick: e => {
|
|
58
|
+
onFeatureClick(e, featureId);
|
|
59
|
+
}, onMouseOver: () => {
|
|
60
|
+
setIsMouseOvered(true);
|
|
61
|
+
}, onMouseLeave: () => {
|
|
62
|
+
setIsMouseOvered(false);
|
|
63
|
+
}, pointerEvents: "stroke" }), isMouseOvered ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(ArcTooltip, { contents: caption }) })) : null, (0, jsx_runtime_1.jsx)("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: "white", strokeWidth: "0.6em", children: label }), (0, jsx_runtime_1.jsx)("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: textStroke, children: label })] }));
|
|
60
64
|
}
|
|
61
65
|
function polarToCartesian(centerX, centerY, radius, angleInDegrees) {
|
|
62
66
|
const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180;
|
|
@@ -93,28 +97,24 @@ function SemiCircles({ selectedFeatureId, region, bpPerPx, config, onFeatureClic
|
|
|
93
97
|
const label = (0, configuration_1.readConfObject)(config, 'label', { feature });
|
|
94
98
|
const caption = (0, configuration_1.readConfObject)(config, 'caption', { feature });
|
|
95
99
|
const strokeWidth = (0, configuration_1.readConfObject)(config, 'thickness', { feature }) || 2;
|
|
96
|
-
const ref = react_1.
|
|
100
|
+
const ref = (0, react_1.useRef)(null);
|
|
97
101
|
const textYCoord = (right - left) / 2;
|
|
98
|
-
return (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, ref: ref, pointerEvents: "stroke" }),
|
|
106
|
-
isMouseOvered ? react_1.default.createElement(ArcTooltip, { contents: caption }) : null,
|
|
107
|
-
react_1.default.createElement("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: "white", strokeWidth: "0.6em" }, label),
|
|
108
|
-
react_1.default.createElement("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: textStroke }, label)));
|
|
102
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { d: describeArc(left + (right - left) / 2, 0, (right - left) / 2, 90, 270), ...(0, util_1.getStrokeProps)(stroke), strokeWidth: strokeWidth, fill: "transparent", onClick: e => {
|
|
103
|
+
onFeatureClick(e, featureId);
|
|
104
|
+
}, onMouseOver: () => {
|
|
105
|
+
setIsMouseOvered(true);
|
|
106
|
+
}, onMouseLeave: () => {
|
|
107
|
+
setIsMouseOvered(false);
|
|
108
|
+
}, ref: ref, pointerEvents: "stroke" }), isMouseOvered ? (0, jsx_runtime_1.jsx)(ArcTooltip, { contents: caption }) : null, (0, jsx_runtime_1.jsx)("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: "white", strokeWidth: "0.6em", children: label }), (0, jsx_runtime_1.jsx)("text", { x: left + (right - left) / 2, y: textYCoord + 3, stroke: textStroke, children: label })] }));
|
|
109
109
|
}
|
|
110
110
|
const ArcRendering = (0, mobx_react_1.observer)(function ({ features, config, regions, bpPerPx, height, exportSVG, displayModel, onFeatureClick, }) {
|
|
111
111
|
const region = regions[0];
|
|
112
112
|
const width = (region.end - region.start) / bpPerPx;
|
|
113
113
|
const semicircles = (0, configuration_1.readConfObject)(config, 'displayMode') === 'semicircles';
|
|
114
114
|
const { selectedFeatureId } = displayModel || {};
|
|
115
|
-
return (
|
|
115
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper, { exportSVG: exportSVG, width: width, height: height, children: [...features.values()].map(f => semicircles ? ((0, jsx_runtime_1.jsx)(SemiCircles, { config: config, region: region, bpPerPx: bpPerPx, selectedFeatureId: selectedFeatureId, onFeatureClick: onFeatureClick, feature: f }, f.id())) : ((0, jsx_runtime_1.jsx)(Arc, { height: height, config: config, region: region, bpPerPx: bpPerPx, selectedFeatureId: selectedFeatureId, onFeatureClick: onFeatureClick, feature: f }, f.id()))) }));
|
|
116
116
|
});
|
|
117
117
|
function Wrapper({ exportSVG, width, height, children, }) {
|
|
118
|
-
return exportSVG ? (children) : (
|
|
118
|
+
return exportSVG ? (children) : ((0, jsx_runtime_1.jsx)("svg", { width: width, height: height, children: children }));
|
|
119
119
|
}
|
|
120
120
|
exports.default = ArcRendering;
|
|
@@ -1,52 +1,34 @@
|
|
|
1
1
|
declare const ArcRenderer: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
color: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: string;
|
|
9
6
|
contextVariable: string[];
|
|
10
7
|
};
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
8
|
thickness: {
|
|
15
9
|
type: string;
|
|
16
10
|
description: string;
|
|
17
11
|
defaultValue: string;
|
|
18
12
|
contextVariable: string[];
|
|
19
13
|
};
|
|
20
|
-
/**
|
|
21
|
-
* #slot
|
|
22
|
-
*/
|
|
23
14
|
label: {
|
|
24
15
|
type: string;
|
|
25
16
|
description: string;
|
|
26
17
|
defaultValue: string;
|
|
27
18
|
contextVariable: string[];
|
|
28
19
|
};
|
|
29
|
-
/**
|
|
30
|
-
* #slot
|
|
31
|
-
*/
|
|
32
20
|
height: {
|
|
33
21
|
type: string;
|
|
34
22
|
description: string;
|
|
35
23
|
defaultValue: string;
|
|
36
24
|
contextVariable: string[];
|
|
37
25
|
};
|
|
38
|
-
/**
|
|
39
|
-
* #slot
|
|
40
|
-
*/
|
|
41
26
|
caption: {
|
|
42
27
|
type: string;
|
|
43
28
|
description: string;
|
|
44
29
|
defaultValue: string;
|
|
45
30
|
contextVariable: string[];
|
|
46
31
|
};
|
|
47
|
-
/**
|
|
48
|
-
* #slot
|
|
49
|
-
*/
|
|
50
32
|
displayMode: {
|
|
51
33
|
type: string;
|
|
52
34
|
defaultValue: string;
|
|
@@ -2,59 +2,38 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
|
|
6
|
-
* #config ArcRenderer
|
|
7
|
-
*/
|
|
8
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
function x() { }
|
|
9
6
|
const ArcRenderer = (0, configuration_1.ConfigurationSchema)('ArcRenderer', {
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
color: {
|
|
14
8
|
type: 'color',
|
|
15
9
|
description: 'the color of the arcs',
|
|
16
10
|
defaultValue: 'darkblue',
|
|
17
11
|
contextVariable: ['feature'],
|
|
18
12
|
},
|
|
19
|
-
/**
|
|
20
|
-
* #slot
|
|
21
|
-
*/
|
|
22
13
|
thickness: {
|
|
23
14
|
type: 'number',
|
|
24
15
|
description: 'the thickness of the arcs',
|
|
25
16
|
defaultValue: `jexl:logThickness(feature,'score')`,
|
|
26
17
|
contextVariable: ['feature'],
|
|
27
18
|
},
|
|
28
|
-
/**
|
|
29
|
-
* #slot
|
|
30
|
-
*/
|
|
31
19
|
label: {
|
|
32
20
|
type: 'string',
|
|
33
21
|
description: 'the label to appear at the apex of the arcs',
|
|
34
22
|
defaultValue: `jexl:get(feature,'score')`,
|
|
35
23
|
contextVariable: ['feature'],
|
|
36
24
|
},
|
|
37
|
-
/**
|
|
38
|
-
* #slot
|
|
39
|
-
*/
|
|
40
25
|
height: {
|
|
41
26
|
type: 'number',
|
|
42
27
|
description: 'the height of the arcs',
|
|
43
28
|
defaultValue: `jexl:log10(get(feature,'end')-get(feature,'start'))*50`,
|
|
44
29
|
contextVariable: ['feature'],
|
|
45
30
|
},
|
|
46
|
-
/**
|
|
47
|
-
* #slot
|
|
48
|
-
*/
|
|
49
31
|
caption: {
|
|
50
32
|
type: 'string',
|
|
51
33
|
description: 'the caption to appear when hovering over any point on the arcs',
|
|
52
34
|
defaultValue: `jexl:get(feature,'name')`,
|
|
53
35
|
contextVariable: ['feature'],
|
|
54
36
|
},
|
|
55
|
-
/**
|
|
56
|
-
* #slot
|
|
57
|
-
*/
|
|
58
37
|
displayMode: {
|
|
59
38
|
type: 'enum',
|
|
60
39
|
defaultValue: 'arcs',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function ArcRendererF(pluginManager: PluginManager): void;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = ArcRendererF;
|
|
7
|
+
const ArcRenderer_1 = __importDefault(require("./ArcRenderer"));
|
|
7
8
|
const ArcRendering_1 = __importDefault(require("./ArcRendering"));
|
|
8
9
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
9
|
-
const ArcRenderer_1 = __importDefault(require("./ArcRenderer"));
|
|
10
10
|
function ArcRendererF(pluginManager) {
|
|
11
11
|
pluginManager.addRendererType(() => new ArcRenderer_1.default({
|
|
12
12
|
name: 'ArcRenderer',
|
package/dist/ArcTooltip.d.ts
CHANGED
package/dist/ArcTooltip.js
CHANGED
|
@@ -1,41 +1,17 @@
|
|
|
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
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
30
8
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
|
-
const mobx_react_1 = require("mobx-react");
|
|
32
9
|
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
33
|
-
const
|
|
34
|
-
|
|
10
|
+
const mobx_react_1 = require("mobx-react");
|
|
11
|
+
const TooltipContents = (0, react_1.forwardRef)(function TooltipContents2({ message }, ref) {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, children: (0, react_1.isValidElement)(message) ? (message) : message ? ((0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: String(message) })) : null }));
|
|
35
13
|
});
|
|
36
14
|
const ArcTooltip = (0, mobx_react_1.observer)(function ({ contents }) {
|
|
37
|
-
return contents ? (
|
|
38
|
-
react_1.default.createElement(BaseTooltip_1.default, null,
|
|
39
|
-
react_1.default.createElement(TooltipContents, { message: contents })))) : null;
|
|
15
|
+
return contents ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(BaseTooltip_1.default, { children: (0, jsx_runtime_1.jsx)(TooltipContents, { message: contents }) }) })) : null;
|
|
40
16
|
});
|
|
41
17
|
exports.default = ArcTooltip;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearArcDisplay
|
|
4
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
5
2
|
export declare function configSchemaFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
/**
|
|
7
|
-
* #slot
|
|
8
|
-
*/
|
|
9
3
|
renderer: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IAnyModelType, [undefined]>;
|
|
10
4
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
11
5
|
maxFeatureScreenDensity: {
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.configSchemaFactory = configSchemaFactory;
|
|
4
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
5
|
const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
|
|
7
|
-
|
|
8
|
-
* #config LinearArcDisplay
|
|
9
|
-
*/
|
|
6
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
10
7
|
function configSchemaFactory(pluginManager) {
|
|
11
8
|
return (0, configuration_1.ConfigurationSchema)('LinearArcDisplay', {
|
|
12
|
-
/**
|
|
13
|
-
* #slot
|
|
14
|
-
*/
|
|
15
9
|
renderer: mobx_state_tree_1.types.optional(pluginManager.pluggableConfigSchemaType('renderer'), { type: 'ArcRenderer' }),
|
|
16
10
|
}, {
|
|
17
|
-
/**
|
|
18
|
-
* #baseConfiguration
|
|
19
|
-
*/
|
|
20
11
|
baseConfiguration: plugin_linear_genome_view_1.baseLinearDisplayConfigSchema,
|
|
21
12
|
explicitlyTyped: true,
|
|
22
13
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearArcDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* #stateModel LinearArcDisplay
|
|
4
|
-
* extends
|
|
5
|
-
* - [BaseLinearDisplay](../baselineardisplay)
|
|
6
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
7
2
|
export declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
8
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
4
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -16,21 +11,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
16
11
|
} & {
|
|
17
12
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
18
13
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
19
|
-
region: import("mobx-state-tree").
|
|
20
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
21
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
22
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
23
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
24
|
-
} & {
|
|
25
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
26
|
-
}, {
|
|
27
|
-
setRefName(newRefName: string): void;
|
|
28
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
14
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
29
15
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
30
16
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
31
17
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
32
18
|
}, {
|
|
33
|
-
|
|
19
|
+
stopToken: string | undefined;
|
|
34
20
|
filled: boolean;
|
|
35
21
|
reactElement: React.ReactElement | undefined;
|
|
36
22
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -48,21 +34,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
48
34
|
status?: string;
|
|
49
35
|
reactElement?: React.ReactElement;
|
|
50
36
|
};
|
|
51
|
-
}) => import("react").JSX.Element | undefined;
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
52
38
|
renderProps: any;
|
|
53
39
|
} & {
|
|
54
40
|
doReload(): void;
|
|
55
41
|
afterAttach(): void;
|
|
56
42
|
setStatus(message: string): void;
|
|
57
|
-
setLoading(
|
|
43
|
+
setLoading(newStopToken: string): void;
|
|
58
44
|
setMessage(messageText: string): void;
|
|
59
|
-
setRendered(props:
|
|
60
|
-
reactElement: React.ReactElement;
|
|
61
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
62
|
-
layout: any;
|
|
63
|
-
maxHeightReached: boolean;
|
|
64
|
-
renderProps: any;
|
|
65
|
-
} | undefined): void;
|
|
45
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
66
46
|
setError(error: unknown): void;
|
|
67
47
|
reload(): void;
|
|
68
48
|
beforeDestroy(): void;
|
|
@@ -96,17 +76,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
96
76
|
};
|
|
97
77
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
98
78
|
} & {
|
|
99
|
-
/**
|
|
100
|
-
* #property
|
|
101
|
-
*/
|
|
102
79
|
type: import("mobx-state-tree").ISimpleType<"LinearArcDisplay">;
|
|
103
|
-
/**
|
|
104
|
-
* #property
|
|
105
|
-
*/
|
|
106
80
|
configuration: AnyConfigurationSchemaType;
|
|
107
|
-
/**
|
|
108
|
-
* #property
|
|
109
|
-
*/
|
|
110
81
|
displayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
111
82
|
}, {
|
|
112
83
|
rendererTypeName: string;
|
|
@@ -118,9 +89,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
118
89
|
id: string;
|
|
119
90
|
type: string;
|
|
120
91
|
rpcDriverName: string | undefined;
|
|
121
|
-
} & import("mobx-state-tree/dist/internal"
|
|
122
|
-
* #getter
|
|
123
|
-
*/).NonEmptyObject & {
|
|
92
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
124
93
|
rendererTypeName: string;
|
|
125
94
|
error: unknown;
|
|
126
95
|
message: string | undefined;
|
|
@@ -199,14 +168,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
199
168
|
readonly regionTooLarge: boolean;
|
|
200
169
|
readonly regionTooLargeReason: string;
|
|
201
170
|
} & {
|
|
171
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
202
172
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
203
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
173
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
204
174
|
} & {
|
|
205
175
|
featureIdUnderMouse: undefined | string;
|
|
206
176
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
207
177
|
} & {
|
|
208
|
-
readonly DisplayMessageComponent:
|
|
209
|
-
readonly blockType: "
|
|
178
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
179
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
210
180
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
211
181
|
} & {
|
|
212
182
|
readonly renderDelay: number;
|
|
@@ -233,30 +203,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
233
203
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
234
204
|
renderProps(): any;
|
|
235
205
|
} & {
|
|
236
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
206
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
237
207
|
afterAttach(): void;
|
|
238
208
|
} & {
|
|
239
|
-
/**
|
|
240
|
-
* #getter
|
|
241
|
-
*/
|
|
242
209
|
readonly blockType: string;
|
|
243
|
-
/**
|
|
244
|
-
* #getter
|
|
245
|
-
*/
|
|
246
210
|
readonly renderDelay: number;
|
|
247
|
-
/**
|
|
248
|
-
* #getter
|
|
249
|
-
*/
|
|
250
211
|
readonly rendererTypeName: any;
|
|
251
212
|
} & {
|
|
252
|
-
/**
|
|
253
|
-
* #getter
|
|
254
|
-
*/
|
|
255
213
|
readonly displayModeSetting: any;
|
|
256
214
|
} & {
|
|
257
|
-
/**
|
|
258
|
-
* #getter
|
|
259
|
-
*/
|
|
260
215
|
readonly rendererConfig: {
|
|
261
216
|
[x: string]: any;
|
|
262
217
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -269,19 +224,10 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
269
224
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
270
225
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
271
226
|
} & {
|
|
272
|
-
/**
|
|
273
|
-
* #method
|
|
274
|
-
*/
|
|
275
227
|
renderProps(): any;
|
|
276
228
|
} & {
|
|
277
|
-
/**
|
|
278
|
-
* #action
|
|
279
|
-
*/
|
|
280
229
|
setDisplayMode(flag: string): void;
|
|
281
230
|
} & {
|
|
282
|
-
/**
|
|
283
|
-
* #method
|
|
284
|
-
*/
|
|
285
231
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
286
232
|
label: string;
|
|
287
233
|
subMenu: {
|
|
@@ -305,21 +251,12 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
305
251
|
} & {
|
|
306
252
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
307
253
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
308
|
-
region: import("mobx-state-tree").
|
|
309
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
310
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
311
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
312
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
313
|
-
} & {
|
|
314
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
315
|
-
}, {
|
|
316
|
-
setRefName(newRefName: string): void;
|
|
317
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
254
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
318
255
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
319
256
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
320
257
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
321
258
|
}, {
|
|
322
|
-
|
|
259
|
+
stopToken: string | undefined;
|
|
323
260
|
filled: boolean;
|
|
324
261
|
reactElement: React.ReactElement | undefined;
|
|
325
262
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -337,21 +274,15 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
337
274
|
status?: string;
|
|
338
275
|
reactElement?: React.ReactElement;
|
|
339
276
|
};
|
|
340
|
-
}) => import("react").JSX.Element | undefined;
|
|
277
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
341
278
|
renderProps: any;
|
|
342
279
|
} & {
|
|
343
280
|
doReload(): void;
|
|
344
281
|
afterAttach(): void;
|
|
345
282
|
setStatus(message: string): void;
|
|
346
|
-
setLoading(
|
|
283
|
+
setLoading(newStopToken: string): void;
|
|
347
284
|
setMessage(messageText: string): void;
|
|
348
|
-
setRendered(props:
|
|
349
|
-
reactElement: React.ReactElement;
|
|
350
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
351
|
-
layout: any;
|
|
352
|
-
maxHeightReached: boolean;
|
|
353
|
-
renderProps: any;
|
|
354
|
-
} | undefined): void;
|
|
285
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
355
286
|
setError(error: unknown): void;
|
|
356
287
|
reload(): void;
|
|
357
288
|
beforeDestroy(): void;
|
|
@@ -388,8 +319,8 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
388
319
|
type: string;
|
|
389
320
|
id: string;
|
|
390
321
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
391
|
-
heightPreConfig: number | undefined;
|
|
392
322
|
rpcDriverName: string | undefined;
|
|
323
|
+
heightPreConfig: number | undefined;
|
|
393
324
|
userBpPerPxLimit: number | undefined;
|
|
394
325
|
userByteSizeLimit: number | undefined;
|
|
395
326
|
} & import("mobx-state-tree")._NotCustomized>;
|