@jbrowse/plugin-linear-genome-view 5.0.0-beta.2 → 5.0.0-beta.20
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/esm/LinearGenomeView/afterAttach.d.ts +22 -5
- package/esm/LinearGenomeView/afterAttach.js +129 -106
- package/esm/LinearGenomeView/axisConfigSchema.d.ts +18 -0
- package/esm/LinearGenomeView/axisConfigSchema.js +22 -0
- package/esm/LinearGenomeView/components/CenterLine.js +10 -5
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +2 -3
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +3 -5
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +9 -4
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +45 -8
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +2 -2
- package/esm/LinearGenomeView/components/Header.js +11 -1
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +2 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -3
- package/esm/LinearGenomeView/components/HeaderPanControls.js +6 -3
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +4 -1
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +6 -35
- package/esm/LinearGenomeView/components/Highlight.js +27 -11
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +11 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +32 -13
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +3 -3
- package/esm/LinearGenomeView/components/HighlightChip.js +13 -8
- package/esm/LinearGenomeView/components/HighlightLabelDialog.d.ts +6 -0
- package/esm/LinearGenomeView/components/HighlightLabelDialog.js +18 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +3 -3
- package/esm/LinearGenomeView/components/ImportForm.js +7 -9
- package/esm/LinearGenomeView/components/LinearGenomeView.js +5 -12
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +13 -14
- package/esm/LinearGenomeView/components/MiniControls.js +11 -5
- package/esm/LinearGenomeView/components/OverviewHighlight.js +3 -3
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +6 -5
- package/esm/LinearGenomeView/components/OverviewRubberband.js +25 -48
- package/esm/LinearGenomeView/components/OverviewScalebar.js +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -3
- package/esm/LinearGenomeView/components/PaddingBlocks.js +3 -8
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +5 -6
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +3 -2
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +4 -4
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +74 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -2
- package/esm/LinearGenomeView/components/Rubberband.js +3 -2
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -1
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +16 -5
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
- package/esm/LinearGenomeView/components/Scalebar.js +8 -5
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +51 -36
- package/esm/LinearGenomeView/components/SearchBox.js +10 -16
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +3 -2
- package/esm/LinearGenomeView/components/SearchPanelForm.js +4 -2
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +4 -8
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +7 -4
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -7
- package/esm/LinearGenomeView/components/SearchResultsTable.js +25 -53
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +2 -3
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -4
- package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +3 -2
- package/esm/LinearGenomeView/components/StrandCheckboxes.js +4 -2
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackContainer.js +63 -10
- package/esm/LinearGenomeView/components/TrackLabel.js +14 -4
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +2 -2
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +4 -5
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +11 -14
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +3 -4
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +23 -10
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +6 -4
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +12 -24
- package/esm/LinearGenomeView/components/TracksContainer.js +11 -23
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
- package/esm/LinearGenomeView/components/VerticalGuide.js +3 -16
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +1 -2
- package/esm/LinearGenomeView/components/fetchSequence.js +15 -7
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +10 -0
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +0 -3
- package/esm/LinearGenomeView/components/useRangeSelect.js +26 -61
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +3 -1
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +4 -2
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -2
- package/esm/LinearGenomeView/components/useSideScroll.js +156 -102
- package/esm/LinearGenomeView/components/util.d.ts +4 -0
- package/esm/LinearGenomeView/components/util.js +4 -2
- package/esm/LinearGenomeView/consts.d.ts +2 -0
- package/esm/LinearGenomeView/consts.js +3 -1
- package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
- package/esm/LinearGenomeView/containingLgv.js +23 -0
- package/esm/LinearGenomeView/headerFit.d.ts +4 -2
- package/esm/LinearGenomeView/headerFit.js +20 -7
- package/esm/LinearGenomeView/index.d.ts +2 -7
- package/esm/LinearGenomeView/index.js +5 -7
- package/esm/LinearGenomeView/keyboardHandler.d.ts +8 -7
- package/esm/LinearGenomeView/keyboardHandler.js +61 -23
- package/esm/LinearGenomeView/launchKeys.d.ts +1 -1
- package/esm/LinearGenomeView/launchKeys.js +11 -6
- package/esm/LinearGenomeView/lazyDialogs.d.ts +16 -3
- package/esm/LinearGenomeView/lazyDialogs.js +1 -0
- package/esm/LinearGenomeView/linkedViewSync.d.ts +3 -11
- package/esm/LinearGenomeView/linkedViewSync.js +27 -49
- package/esm/LinearGenomeView/menuItems.d.ts +16 -18
- package/esm/LinearGenomeView/menuItems.js +264 -164
- package/esm/LinearGenomeView/model.d.ts +1192 -560
- package/esm/LinearGenomeView/model.js +805 -590
- package/esm/LinearGenomeView/rExport/exportLinearView.d.ts +17 -0
- package/esm/LinearGenomeView/rExport/exportLinearView.js +117 -0
- package/esm/LinearGenomeView/rExport/rScript.d.ts +110 -0
- package/esm/LinearGenomeView/rExport/rScript.js +524 -0
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +1 -1
- package/esm/LinearGenomeView/sharedScaleContainer.js +2 -12
- package/esm/LinearGenomeView/showFiles.d.ts +2 -0
- package/esm/LinearGenomeView/showFiles.js +19 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +1 -1
- package/esm/LinearGenomeView/showRegionsWithUndo.js +13 -5
- package/esm/LinearGenomeView/stickyChrome.d.ts +5 -9
- package/esm/LinearGenomeView/stickyChrome.js +5 -9
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +4 -4
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +4 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +8 -21
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +3 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +9 -9
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +3 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +5 -5
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +13 -18
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -5
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +5 -6
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +9 -10
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +21 -13
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +4 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +7 -6
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +2 -3
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +17 -3
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +24 -20
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +42 -29
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +74 -77
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +28 -12
- package/esm/LinearGenomeView/svgcomponents/util.js +41 -29
- package/esm/LinearGenomeView/types.d.ts +13 -10
- package/esm/LinearGenomeView/types.js +0 -1
- package/esm/LinearGenomeView/util.d.ts +103 -46
- package/esm/LinearGenomeView/util.js +222 -170
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +9 -6
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +2 -0
- package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
- package/esm/MultiLevelRubberband/menuItems.js +52 -0
- package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
- package/esm/MultiLevelRubberband/rowLabel.js +27 -0
- package/esm/MultiLevelRubberband/types.d.ts +1 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +2 -1
- package/esm/MultiLevelRubberband/useRangeSelect.js +45 -59
- package/esm/TrackModifiers/index.d.ts +83 -0
- package/esm/TrackModifiers/index.js +231 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +244 -68
- package/esm/displayKitTests/perRegionTestEnv.js +30 -26
- package/esm/index.d.ts +21 -99
- package/esm/index.js +17 -38
- package/esm/searchUtils.d.ts +26 -10
- package/esm/searchUtils.js +137 -137
- package/esm/shared/RubberbandSpan.d.ts +3 -2
- package/esm/shared/RubberbandSpan.js +6 -3
- package/esm/shared/coordLabels.d.ts +11 -4
- package/esm/shared/coordLabels.js +20 -5
- package/esm/shared/useWindowDrag.d.ts +18 -0
- package/esm/shared/useWindowDrag.js +47 -0
- package/package.json +12 -11
- package/esm/FeatureTrack/configSchema.d.ts +0 -124
- package/esm/FeatureTrack/configSchema.js +0 -54
- package/esm/FeatureTrack/index.d.ts +0 -2
- package/esm/FeatureTrack/index.js +0 -13
- package/esm/LinearGenomeView/initKeys.d.ts +0 -12
- package/esm/LinearGenomeView/initKeys.js +0 -68
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +0 -6
- package/esm/MultiLevelRubberband/VerticalGuide.js +0 -21
- package/esm/lazyPluginExports.d.ts +0 -23
- package/esm/lazyPluginExports.js +0 -36
|
@@ -28,44 +28,49 @@ function makeStateModel(control, gate, configSchema) {
|
|
|
28
28
|
.volatile(() => ({
|
|
29
29
|
/** every `fetchNeeded` call, as the region list it was handed */
|
|
30
30
|
fetchLog: [],
|
|
31
|
-
loadedData: new Map(),
|
|
32
31
|
/**
|
|
33
|
-
* What `
|
|
34
|
-
* that is the point: a real display's
|
|
35
|
-
* autorun re-runs when
|
|
36
|
-
* by the computed and never invalidate.
|
|
32
|
+
* What `zoomFetchArgs` answers. A volatile, not a `control` knob, and
|
|
33
|
+
* that is the point: a real display's args read view state, so the
|
|
34
|
+
* autorun re-runs when they move. A plain closure value would be
|
|
35
|
+
* memoized by the computed and never invalidate.
|
|
37
36
|
*/
|
|
38
37
|
fetchKey: '',
|
|
39
38
|
}))
|
|
39
|
+
.views(self => {
|
|
40
|
+
// chained, not replaced: `staleAnswers` forces a false answer for a
|
|
41
|
+
// bounded number of calls, and everything else is the foundation's own
|
|
42
|
+
// store-derived default
|
|
43
|
+
const superRegionHasData = self.regionHasData;
|
|
44
|
+
return {
|
|
45
|
+
regionHasData(displayedRegionIndex) {
|
|
46
|
+
control.cacheValidCalls += 1;
|
|
47
|
+
if (control.staleAnswers > 0) {
|
|
48
|
+
control.staleAnswers -= 1;
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return superRegionHasData.call(self, displayedRegionIndex);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
})
|
|
40
55
|
.views(self => ({
|
|
56
|
+
/** the fetched payloads, off the foundation's store */
|
|
57
|
+
get loadedData() {
|
|
58
|
+
return self.regionPayloads;
|
|
59
|
+
},
|
|
41
60
|
get gateEnabled() {
|
|
42
61
|
return gate.gateEnabled ?? false;
|
|
43
62
|
},
|
|
44
63
|
get densityTooLarge() {
|
|
45
64
|
return control.densityTooLarge;
|
|
46
65
|
},
|
|
47
|
-
|
|
48
|
-
return self.fetchKey;
|
|
49
|
-
},
|
|
50
|
-
regionHasData(_displayedRegionIndex) {
|
|
51
|
-
control.cacheValidCalls += 1;
|
|
52
|
-
if (control.staleAnswers > 0) {
|
|
53
|
-
control.staleAnswers -= 1;
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
return true;
|
|
66
|
+
zoomFetchArgs() {
|
|
67
|
+
return { key: self.fetchKey };
|
|
57
68
|
},
|
|
58
69
|
}))
|
|
59
70
|
.actions(self => ({
|
|
60
71
|
setFetchKey(key) {
|
|
61
72
|
self.fetchKey = key;
|
|
62
73
|
},
|
|
63
|
-
setLoaded(displayedRegionIndex, value) {
|
|
64
|
-
self.loadedData.set(displayedRegionIndex, value);
|
|
65
|
-
},
|
|
66
|
-
clearDisplaySpecificData() {
|
|
67
|
-
self.loadedData.clear();
|
|
68
|
-
},
|
|
69
74
|
}))
|
|
70
75
|
.actions(self => ({
|
|
71
76
|
fetchNeeded(needed) {
|
|
@@ -90,17 +95,15 @@ function makeStateModel(control, gate, configSchema) {
|
|
|
90
95
|
// budget means no measurement at all, which is why `estimateCalls`
|
|
91
96
|
// stays at zero for an ungated display.
|
|
92
97
|
if (byteLimit === undefined) {
|
|
93
|
-
return { value:
|
|
98
|
+
return { value: control.payloadTag };
|
|
94
99
|
}
|
|
95
100
|
control.estimateCalls += 1;
|
|
96
101
|
const bytes = control.estimateBytes;
|
|
97
102
|
return bytes > byteLimit
|
|
98
103
|
? { regionTooLarge: true, bytes }
|
|
99
|
-
: { value:
|
|
100
|
-
},
|
|
101
|
-
onResult: (idx, result) => {
|
|
102
|
-
self.setLoaded(idx, result.value);
|
|
104
|
+
: { value: control.payloadTag, bytes };
|
|
103
105
|
},
|
|
106
|
+
onResult: (_idx, result) => result.value,
|
|
104
107
|
});
|
|
105
108
|
},
|
|
106
109
|
}));
|
|
@@ -118,6 +121,7 @@ export function createPerRegionTestEnvironment({ measuresBytes = false, gate, es
|
|
|
118
121
|
estimateBytes,
|
|
119
122
|
estimateCalls: 0,
|
|
120
123
|
densityTooLarge: false,
|
|
124
|
+
payloadTag: 'data',
|
|
121
125
|
};
|
|
122
126
|
const optIns = gate ?? { gateEnabled: measuresBytes };
|
|
123
127
|
const env = createDisplayTestEnvironment({
|
package/esm/index.d.ts
CHANGED
|
@@ -2,141 +2,63 @@ import Plugin from '@jbrowse/core/Plugin';
|
|
|
2
2
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class LinearGenomeViewPlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
|
-
exports: {
|
|
6
|
-
baseLinearDisplayConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
7
|
-
readonly densityTier: {
|
|
8
|
-
readonly type: 'stringEnum';
|
|
9
|
-
readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"auto" | "density" | "features">;
|
|
10
|
-
readonly defaultValue: 'auto';
|
|
11
|
-
readonly description: 'when to draw the features-per-bin density band in place of features: "auto" swaps to it where the region is too large to fetch, "features" never does and keeps the banner, "density" always does. Needs a density source on the adapter (its densityAdapter slot)';
|
|
12
|
-
readonly advanced: true;
|
|
13
|
-
};
|
|
14
|
-
readonly densityTierBpPerPx: {
|
|
15
|
-
readonly type: 'number';
|
|
16
|
-
readonly defaultValue: 0;
|
|
17
|
-
readonly description: 'in "auto" mode, also draw the density band from this many bp per pixel outward, before the region is too large to fetch; 0 leaves the swap to the fetch-size gate alone';
|
|
18
|
-
readonly advanced: true;
|
|
19
|
-
};
|
|
20
|
-
readonly fetchSizeLimit: {
|
|
21
|
-
readonly type: 'number';
|
|
22
|
-
readonly defaultValue: 1000000;
|
|
23
|
-
readonly description: "maximum data to attempt to download for a given track, used if adapter doesn't specify one";
|
|
24
|
-
readonly advanced: true;
|
|
25
|
-
};
|
|
26
|
-
readonly forceLoad: {
|
|
27
|
-
readonly type: 'boolean';
|
|
28
|
-
readonly defaultValue: false;
|
|
29
|
-
readonly description: 'Declarative equivalent of the "Force load" button on the "too much data" banner: when true the display always renders, however large the region or dense the features. Off by default (the gate guards against huge downloads). Set it on a view no one can interact with — an embedded / notebook view, or a screenshot — where the region is known and you want it drawn without a click.';
|
|
30
|
-
readonly advanced: true;
|
|
31
|
-
};
|
|
32
|
-
readonly maxFeatureScreenDensity: {
|
|
33
|
-
readonly type: "number";
|
|
34
|
-
readonly description: "maximum features per pixel before showing a \"too many features\" message";
|
|
35
|
-
readonly defaultValue: 1;
|
|
36
|
-
readonly advanced: true;
|
|
37
|
-
};
|
|
38
|
-
readonly height: {
|
|
39
|
-
readonly type: "number";
|
|
40
|
-
readonly defaultValue: 100;
|
|
41
|
-
readonly description: "default height for the track";
|
|
42
|
-
};
|
|
43
|
-
readonly mouseover: {
|
|
44
|
-
readonly type: "string";
|
|
45
|
-
readonly description: "text to display when the cursor hovers over a feature";
|
|
46
|
-
readonly defaultValue: "jexl:get(feature,'_mouseOver')||get(feature,'name')||get(feature,'function')||get(feature,'id')";
|
|
47
|
-
readonly contextVariable: ["feature"];
|
|
48
|
-
};
|
|
49
|
-
readonly jexlFilters: {
|
|
50
|
-
readonly type: "stringArray";
|
|
51
|
-
readonly description: "default set of jexl filters to apply to a track. note: these do not use the jexl prefix because they have a deferred evaluation system";
|
|
52
|
-
readonly defaultValue: readonly [];
|
|
53
|
-
};
|
|
54
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
|
|
55
|
-
SearchBox: {
|
|
56
|
-
(props: {
|
|
57
|
-
model: import("./index.ts").LinearGenomeViewModel;
|
|
58
|
-
showHelp?: boolean;
|
|
59
|
-
minWidth?: number;
|
|
60
|
-
maxWidth?: number;
|
|
61
|
-
style?: React.CSSProperties;
|
|
62
|
-
}): import("react").JSX.Element;
|
|
63
|
-
displayName: string;
|
|
64
|
-
};
|
|
65
|
-
ZoomControls: {
|
|
66
|
-
(props: {
|
|
67
|
-
model: import("./index.ts").LinearGenomeViewModel;
|
|
68
|
-
}): import("react").JSX.Element;
|
|
69
|
-
displayName: string;
|
|
70
|
-
};
|
|
71
|
-
LinearGenomeView: {
|
|
72
|
-
(props: {
|
|
73
|
-
model: import("./index.ts").LinearGenomeViewModel;
|
|
74
|
-
}): import("react").JSX.Element;
|
|
75
|
-
displayName: string;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
5
|
/**
|
|
79
6
|
* #config LinearGenomeViewConfigSchema
|
|
80
7
|
* #category root
|
|
8
|
+
* Sets defaults for every linear genome view, on the root config under
|
|
9
|
+
* `configuration.LinearGenomeViewPlugin`.
|
|
81
10
|
*/
|
|
82
11
|
configurationSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
83
|
-
/**
|
|
84
|
-
* #slot configuration.LinearGenomeViewPlugin.trackLabels
|
|
85
|
-
* where a track's name is drawn: `offset` gives it its own line above the
|
|
86
|
-
* data, `overlapping` floats it over the top of the data to save vertical
|
|
87
|
-
* space, `hidden` omits it. The view menu's "Show..." submenu sets the same
|
|
88
|
-
* thing per session, under its "Track labels" heading
|
|
89
|
-
*/
|
|
90
12
|
readonly trackLabels: {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
13
|
+
type: "string";
|
|
14
|
+
} & {
|
|
15
|
+
model: import("@jbrowse/mobx-state-tree").ISimpleType<"hidden" | "offset" | "overlapping">;
|
|
16
|
+
} & {
|
|
17
|
+
defaultValue: string;
|
|
94
18
|
};
|
|
95
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
19
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
96
20
|
install(pluginManager: PluginManager): void;
|
|
97
21
|
configure(pluginManager: PluginManager): void;
|
|
98
22
|
}
|
|
99
23
|
export { DisplayChromeOverlayProvider, DisplayUIProvider, FloatingLegend, TrackControlProvider, plainChromeOverlays, plainTrackControl, useTrackControlMenu, } from '@jbrowse/display-ui';
|
|
100
|
-
export type {
|
|
101
|
-
export {
|
|
24
|
+
export type { BackgroundProgressProps, DisplayChromeOverlays, ErrorBarProps, LegendItem, LegendSection, LoadingProps, RenderErrorProps, TooLargeProps, TrackControlComponent, TrackControlIcon, TrackControlMenu, TrackControlOption, TrackControlProps, } from '@jbrowse/display-ui';
|
|
25
|
+
export { HighlightChip, type LinearGenomeViewModel, type LinearGenomeViewStateModel, installLinkedViewSync, stateModelFactory as linearGenomeViewStateModelFactory, } from './LinearGenomeView/index.ts';
|
|
102
26
|
export { default as SearchBox } from './LinearGenomeView/components/SearchBox.tsx';
|
|
103
|
-
export { default as HeaderSearchBoxes } from './LinearGenomeView/components/HeaderSearchBoxes.tsx';
|
|
104
27
|
export { default as HeaderSearchBoxRow } from './LinearGenomeView/components/HeaderSearchBoxRow.tsx';
|
|
105
28
|
export { searchBoxMenuItems, useSearchBoxPrefs, } from './LinearGenomeView/components/useSearchBoxPrefs.ts';
|
|
106
29
|
export type { SearchBoxPrefs } from './LinearGenomeView/components/useSearchBoxPrefs.ts';
|
|
107
30
|
export { normalizeTrackInit } from '@jbrowse/core/util/tracks';
|
|
108
|
-
export {
|
|
109
|
-
export {
|
|
110
|
-
export {
|
|
31
|
+
export { applyInitHighlights, navToInitLoc, showInitTracks, } from './LinearGenomeView/afterAttach.ts';
|
|
32
|
+
export { launchTrackInit, launchTrackWithModifiers, openedDisplayType, writeFilter, writeMembers, writeReadFilter, } from './TrackModifiers/index.ts';
|
|
33
|
+
export type { ModifierView } from './TrackModifiers/index.ts';
|
|
34
|
+
export { MultiLevelRubberband, multiLevelRowClickMenuItems, multiLevelRowMenuItems, rowLabels, } from './MultiLevelRubberband/index.ts';
|
|
111
35
|
export { fetchResults, SearchResultsNotFoundError } from './searchUtils.ts';
|
|
112
36
|
export type { LaunchLinearGenomeViewArgs } from './LaunchLinearGenomeView/index.ts';
|
|
113
|
-
export type { BpOffset, ExportSvgOptions, HighlightType, InitState, LinearGenomeViewLaunchProps, NavLocation, TrackLabelMode, VolatileGuide, } from './LinearGenomeView/types.ts';
|
|
37
|
+
export type { BpOffset, ExportSvgOptions, HighlightInput, HighlightType, InitState, LinearGenomeViewLaunchProps, LinearGenomeViewPanelInit, NavLocation, TrackLabelMode, ViewTrackLabelMode, VolatileGuide, } from './LinearGenomeView/types.ts';
|
|
114
38
|
export type { ScalebarRefNameLabel } from './LinearGenomeView/util.ts';
|
|
39
|
+
export type { HighlightRegion, SearchHits, SearchPickerRow, SearchPickerState, } from './LinearGenomeView/model.ts';
|
|
115
40
|
export type { RegionsOrientation } from './LinearGenomeView/util.ts';
|
|
41
|
+
export type { RegionEdit } from './LinearGenomeView/util.ts';
|
|
116
42
|
export { makeTicks } from './LinearGenomeView/util.ts';
|
|
117
43
|
export type { Tick } from './LinearGenomeView/util.ts';
|
|
44
|
+
export { containingLgv } from './LinearGenomeView/containingLgv.ts';
|
|
118
45
|
export { showRegionsWithUndo } from './LinearGenomeView/showRegionsWithUndo.ts';
|
|
119
46
|
export type { SharedFit } from './LinearGenomeView/sharedScaleContainer.ts';
|
|
120
47
|
export { fitAllRegionsWindow } from './LinearGenomeView/util.ts';
|
|
121
48
|
export { renderToSvg } from './LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx';
|
|
122
49
|
export { useViewSvgFigure } from './LinearGenomeView/svgcomponents/useViewSvgFigure.tsx';
|
|
123
50
|
export type { ViewSvgFigureOptions, ViewSvgFigureResult, } from './LinearGenomeView/svgcomponents/useViewSvgFigure.tsx';
|
|
124
|
-
export { default as
|
|
125
|
-
export { default as SVGView } from './LinearGenomeView/svgcomponents/SVGView.tsx';
|
|
126
|
-
export { default as SVGRowHeader } from './LinearGenomeView/svgcomponents/SVGRowHeader.tsx';
|
|
127
|
-
export { default as SVGHighlights } from './LinearGenomeView/svgcomponents/SVGHighlights.tsx';
|
|
128
|
-
export { default as SVGHighlightsOverlay } from './LinearGenomeView/svgcomponents/SVGHighlightsOverlay.tsx';
|
|
51
|
+
export { default as SVGStackedRow } from './LinearGenomeView/svgcomponents/SVGStackedRow.tsx';
|
|
129
52
|
export { default as ExportSvgDialog } from './LinearGenomeView/components/ExportSvgDialog.tsx';
|
|
130
53
|
export { GetSequenceDialog } from './LinearGenomeView/lazyDialogs.ts';
|
|
131
54
|
export { default as ConnectedHoverHighlight } from './LinearGenomeView/components/ConnectedHoverHighlight.tsx';
|
|
132
|
-
export { default as HoverPositionHighlight } from './LinearGenomeView/components/HoverPositionHighlight.tsx';
|
|
133
|
-
export { FloatingSvgOverlay, TrackOverlayContext, TrackOverlayPortal, TrackOverlaySlot, } from '@jbrowse/display-ui';
|
|
134
55
|
export type { HoverHighlightPosition } from './LinearGenomeView/components/HoverPositionHighlight.tsx';
|
|
56
|
+
export { FloatingSvgOverlay, TrackOverlayContext, TrackOverlayPortal, TrackOverlaySlot, } from '@jbrowse/display-ui';
|
|
135
57
|
export { SvgChrome, SvgClipRect } from '@jbrowse/core/svg/SvgExport';
|
|
136
58
|
export { svgSafeId } from '@jbrowse/core/svg/svgId';
|
|
137
59
|
export { awaitSvgReady, awaitSvgRenders } from '@jbrowse/core/svg/svgReady';
|
|
138
60
|
export type { SvgExportable } from '@jbrowse/core/svg/svgReady';
|
|
139
|
-
export { defaultTextHeight, getRowHeaderLayout,
|
|
61
|
+
export { defaultTextHeight, getRowHeaderLayout, labelOffset, totalHeight, trackBoxHeight, trackBoxOffsets, trackLabelLeftOffset, } from './LinearGenomeView/svgcomponents/util.ts';
|
|
140
62
|
export { notifySkippedSvgTracks } from '@jbrowse/core/svg/trackNames';
|
|
141
63
|
export { renderViewTracks } from './LinearGenomeView/svgcomponents/renderViewTracks.ts';
|
|
142
64
|
export type { SvgExportTrack, ViewTracksSvg, } from './LinearGenomeView/svgcomponents/renderViewTracks.ts';
|
package/esm/index.js
CHANGED
|
@@ -1,48 +1,37 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
2
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
3
3
|
import { isAbstractMenuManager } from '@jbrowse/core/util';
|
|
4
|
-
import
|
|
4
|
+
import { VIEW_TRACK_LABEL_MODES } from '@jbrowse/display-kit/types';
|
|
5
5
|
import { types } from '@jbrowse/mobx-state-tree';
|
|
6
6
|
import LineStyleIcon from '@mui/icons-material/LineStyle';
|
|
7
|
-
import FeatureTrackF from './FeatureTrack/index.js';
|
|
8
7
|
import LaunchLinearGenomeViewF from './LaunchLinearGenomeView/index.js';
|
|
9
8
|
import SequenceFeatureHoverHighlightExtensionF from './LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js';
|
|
10
9
|
import LinearGenomeViewF from './LinearGenomeView/index.js';
|
|
11
|
-
import { LinearGenomeView, SearchBox, ZoomControls, } from './lazyPluginExports.js';
|
|
12
10
|
export default class LinearGenomeViewPlugin extends Plugin {
|
|
13
11
|
name = 'LinearGenomeViewPlugin';
|
|
14
|
-
// the three components here are lazy, see lazyPluginExports.tsx — naming a
|
|
15
|
-
// component in this object is enough to pin it into every host's first paint
|
|
16
|
-
exports = {
|
|
17
|
-
baseLinearDisplayConfigSchema,
|
|
18
|
-
SearchBox,
|
|
19
|
-
ZoomControls,
|
|
20
|
-
LinearGenomeView,
|
|
21
|
-
};
|
|
22
12
|
/**
|
|
23
13
|
* #config LinearGenomeViewConfigSchema
|
|
24
14
|
* #category root
|
|
15
|
+
* Sets defaults for every linear genome view, on the root config under
|
|
16
|
+
* `configuration.LinearGenomeViewPlugin`.
|
|
25
17
|
*/
|
|
26
18
|
configurationSchema = ConfigurationSchema('LinearGenomeViewConfigSchema', {
|
|
27
19
|
/**
|
|
28
20
|
* #slot configuration.LinearGenomeViewPlugin.trackLabels
|
|
29
|
-
*
|
|
21
|
+
* The placement of a track's name: `offset` puts it on a line above the
|
|
30
22
|
* data, `overlapping` floats it over the top of the data to save vertical
|
|
31
|
-
* space, `hidden` omits it. The view menu's "
|
|
32
|
-
* thing per session
|
|
23
|
+
* space, `hidden` omits it. The view menu's "Track labels" submenu sets the
|
|
24
|
+
* same thing per session
|
|
33
25
|
*/
|
|
34
26
|
trackLabels: {
|
|
35
27
|
type: 'string',
|
|
36
28
|
defaultValue: 'offset',
|
|
37
29
|
model: types.enumeration('trackLabelOptions', [
|
|
38
|
-
|
|
39
|
-
'overlapping',
|
|
40
|
-
'hidden',
|
|
30
|
+
...VIEW_TRACK_LABEL_MODES,
|
|
41
31
|
]),
|
|
42
32
|
},
|
|
43
33
|
});
|
|
44
34
|
install(pluginManager) {
|
|
45
|
-
FeatureTrackF(pluginManager);
|
|
46
35
|
LinearGenomeViewF(pluginManager);
|
|
47
36
|
LaunchLinearGenomeViewF(pluginManager);
|
|
48
37
|
SequenceFeatureHoverHighlightExtensionF(pluginManager);
|
|
@@ -65,15 +54,10 @@ export default class LinearGenomeViewPlugin extends Plugin {
|
|
|
65
54
|
// `@jbrowse/display-kit`, and is imported from there by subpath, never from
|
|
66
55
|
// here.
|
|
67
56
|
export { DisplayChromeOverlayProvider, DisplayUIProvider, FloatingLegend, TrackControlProvider, plainChromeOverlays, plainTrackControl, useTrackControlMenu, } from '@jbrowse/display-ui';
|
|
68
|
-
export {
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
// barrel and gets shaken out of every build that doesn't, which is all the
|
|
73
|
-
// laziness it needs; a runtime plugin resolves `exports` at module scope, where
|
|
74
|
-
// only `lazy()` keeps the component out of the host's first paint. Imported
|
|
75
|
-
// straight from the component rather than through `LinearGenomeView/index.ts`
|
|
76
|
-
// so the view registration module holds no React component at all.
|
|
57
|
+
export { HighlightChip, installLinkedViewSync, stateModelFactory as linearGenomeViewStateModelFactory, } from './LinearGenomeView/index.js';
|
|
58
|
+
// Imported straight from the component rather than through
|
|
59
|
+
// `LinearGenomeView/index.ts` so the view registration module holds no React
|
|
60
|
+
// component at all; a consumer that never renders it shakes it out.
|
|
77
61
|
export { default as SearchBox } from './LinearGenomeView/components/SearchBox.js';
|
|
78
62
|
// The same two consumers, one composition further on: a header stacking several
|
|
79
63
|
// views draws one search box per row beside the span it is showing, and
|
|
@@ -81,13 +65,12 @@ export { default as SearchBox } from './LinearGenomeView/components/SearchBox.js
|
|
|
81
65
|
// visibility/orientation choice and `searchBoxMenuItems` the rows that set it —
|
|
82
66
|
// shared rather than copied, since the copies had already drifted on what to
|
|
83
67
|
// call `sideBySide: false`. Only the storage prefix stays with each container.
|
|
84
|
-
export { default as HeaderSearchBoxes } from './LinearGenomeView/components/HeaderSearchBoxes.js';
|
|
85
68
|
export { default as HeaderSearchBoxRow } from './LinearGenomeView/components/HeaderSearchBoxRow.js';
|
|
86
69
|
export { searchBoxMenuItems, useSearchBoxPrefs, } from './LinearGenomeView/components/useSearchBoxPrefs.js';
|
|
87
70
|
export { normalizeTrackInit } from '@jbrowse/core/util/tracks';
|
|
88
|
-
export {
|
|
89
|
-
export {
|
|
90
|
-
export { MultiLevelRubberband } from './MultiLevelRubberband/index.js';
|
|
71
|
+
export { applyInitHighlights, navToInitLoc, showInitTracks, } from './LinearGenomeView/afterAttach.js';
|
|
72
|
+
export { launchTrackInit, launchTrackWithModifiers, openedDisplayType, writeFilter, writeMembers, writeReadFilter, } from './TrackModifiers/index.js';
|
|
73
|
+
export { MultiLevelRubberband, multiLevelRowClickMenuItems, multiLevelRowMenuItems, rowLabels, } from './MultiLevelRubberband/index.js';
|
|
91
74
|
export { fetchResults, SearchResultsNotFoundError } from './searchUtils.js';
|
|
92
75
|
// The scalebar's grid, published because it is a contract other views draw
|
|
93
76
|
// against rather than an internal of this one: the synteny view's location
|
|
@@ -99,6 +82,7 @@ export { makeTicks } from './LinearGenomeView/util.js';
|
|
|
99
82
|
// The two halves of "show these regions instead": navigate the view you are
|
|
100
83
|
// looking at, or seed a snapshot for a new one. A caller deriving either itself
|
|
101
84
|
// lands on a viewport property the model no longer reads — see each for how.
|
|
85
|
+
export { containingLgv } from './LinearGenomeView/containingLgv.js';
|
|
102
86
|
export { showRegionsWithUndo } from './LinearGenomeView/showRegionsWithUndo.js';
|
|
103
87
|
export { fitAllRegionsWindow } from './LinearGenomeView/util.js';
|
|
104
88
|
export { renderToSvg } from './LinearGenomeView/svgcomponents/SVGLinearGenomeView.js';
|
|
@@ -106,15 +90,10 @@ export { renderToSvg } from './LinearGenomeView/svgcomponents/SVGLinearGenomeVie
|
|
|
106
90
|
// components mounted in a host's own page. See the file for the three pieces
|
|
107
91
|
// between `renderToSvg` and inline JSX that each fail quietly.
|
|
108
92
|
export { useViewSvgFigure } from './LinearGenomeView/svgcomponents/useViewSvgFigure.js';
|
|
109
|
-
export { default as
|
|
110
|
-
export { default as SVGView } from './LinearGenomeView/svgcomponents/SVGView.js';
|
|
111
|
-
export { default as SVGRowHeader } from './LinearGenomeView/svgcomponents/SVGRowHeader.js';
|
|
112
|
-
export { default as SVGHighlights } from './LinearGenomeView/svgcomponents/SVGHighlights.js';
|
|
113
|
-
export { default as SVGHighlightsOverlay } from './LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js';
|
|
93
|
+
export { default as SVGStackedRow } from './LinearGenomeView/svgcomponents/SVGStackedRow.js';
|
|
114
94
|
export { default as ExportSvgDialog } from './LinearGenomeView/components/ExportSvgDialog.js';
|
|
115
95
|
export { GetSequenceDialog } from './LinearGenomeView/lazyDialogs.js';
|
|
116
96
|
export { default as ConnectedHoverHighlight } from './LinearGenomeView/components/ConnectedHoverHighlight.js';
|
|
117
|
-
export { default as HoverPositionHighlight } from './LinearGenomeView/components/HoverPositionHighlight.js';
|
|
118
97
|
// The overlay layer lives in `@jbrowse/display-ui` — a package rather than this
|
|
119
98
|
// plugin, because `packages/tree-sidebar` needed it and had to depend on a
|
|
120
99
|
// *plugin* to get it. Re-exported here, since every display already names it
|
|
@@ -131,7 +110,7 @@ export { SvgChrome, SvgClipRect } from '@jbrowse/core/svg/SvgExport';
|
|
|
131
110
|
// inset or non-rect clip); ids built from a trackId/refName need it
|
|
132
111
|
export { svgSafeId } from '@jbrowse/core/svg/svgId';
|
|
133
112
|
export { awaitSvgReady, awaitSvgRenders } from '@jbrowse/core/svg/svgReady';
|
|
134
|
-
export { defaultTextHeight, getRowHeaderLayout,
|
|
113
|
+
export { defaultTextHeight, getRowHeaderLayout, labelOffset, totalHeight, trackBoxHeight, trackBoxOffsets, trackLabelLeftOffset, } from './LinearGenomeView/svgcomponents/util.js';
|
|
135
114
|
// Re-exported from core, where it moved so the circular view — which depends
|
|
136
115
|
// on neither this plugin nor the LGV geometry around it — can send the same
|
|
137
116
|
// notification. Kept on this plugin's surface because published plugins
|
package/esm/searchUtils.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
|
3
3
|
import type TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
|
|
4
4
|
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
5
5
|
import type { SearchType } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
6
|
-
import type { AssemblyHost, NotificationSink, TrackCatalog } from '@jbrowse/core/util';
|
|
7
|
-
import type { StopToken } from '@jbrowse/core/util/stopToken';
|
|
6
|
+
import type { AbstractSessionModel, AssemblyHost, NotificationSink, TrackCatalog } from '@jbrowse/core/util';
|
|
8
7
|
declare module '@jbrowse/core/PluginManager' {
|
|
9
8
|
interface ExtensionPointRegistry {
|
|
10
9
|
'LinearGenomeView-searchResultSelected': {
|
|
@@ -24,14 +23,14 @@ export declare function navigateToSelectedOption({ option, model, assemblyName,
|
|
|
24
23
|
option: BaseResult;
|
|
25
24
|
model: LinearGenomeViewModel;
|
|
26
25
|
assemblyName: string;
|
|
27
|
-
}): Promise<
|
|
26
|
+
}): Promise<boolean>;
|
|
28
27
|
export declare function isOpenInView(result: BaseResult, model: LinearGenomeViewModel): boolean;
|
|
29
|
-
export declare function
|
|
28
|
+
export declare function distinctDestinations({ results, model, session, assembly, }: {
|
|
30
29
|
results: BaseResult[];
|
|
31
30
|
model: LinearGenomeViewModel;
|
|
32
31
|
session: TrackCatalog;
|
|
33
32
|
assembly?: Assembly;
|
|
34
|
-
}): BaseResult
|
|
33
|
+
}): BaseResult[];
|
|
35
34
|
export declare function showSearchResults({ results, query, model, assemblyName, grow, showHitTrack, }: {
|
|
36
35
|
results: BaseResult[];
|
|
37
36
|
query: string;
|
|
@@ -40,6 +39,7 @@ export declare function showSearchResults({ results, query, model, assemblyName,
|
|
|
40
39
|
grow?: number;
|
|
41
40
|
showHitTrack?: boolean;
|
|
42
41
|
}): Promise<boolean>;
|
|
42
|
+
export declare function hitTrackToShow(result: BaseResult, session: TrackCatalog): string | undefined;
|
|
43
43
|
export declare function navToOption({ option, model, assemblyName, grow, showHitTrack, }: {
|
|
44
44
|
model: LinearGenomeViewModel;
|
|
45
45
|
option: BaseResult;
|
|
@@ -58,13 +58,29 @@ export declare function handleSelectedRegion({ input, model, assemblyName, grow,
|
|
|
58
58
|
grow?: number;
|
|
59
59
|
showHitTrack?: boolean;
|
|
60
60
|
}): Promise<boolean>;
|
|
61
|
-
|
|
62
|
-
export declare function fetchResults({ queryString, searchType, assemblyName, textSearchManager, assembly, stopToken, }: {
|
|
61
|
+
interface SearchArgs {
|
|
63
62
|
queryString: string;
|
|
64
63
|
assemblyName: string;
|
|
65
64
|
searchType?: SearchType;
|
|
66
65
|
textSearchManager?: TextSearchManager;
|
|
67
66
|
assembly?: Assembly;
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
67
|
+
signal?: AbortSignal;
|
|
68
|
+
}
|
|
69
|
+
interface SessionSearchArgs {
|
|
70
|
+
session: Pick<AbstractSessionModel, 'assemblyManager' | 'textSearchManager'>;
|
|
71
|
+
queryString: string;
|
|
72
|
+
assemblyName: string;
|
|
73
|
+
searchType?: SearchType;
|
|
74
|
+
signal?: AbortSignal;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The search box's hits for a query: refNames and text-index results, merged.
|
|
78
|
+
* Pass the session and the function finds the index manager and the assembly
|
|
79
|
+
* itself; passing `textSearchManager` and `assembly` is the older form.
|
|
80
|
+
*/
|
|
81
|
+
export declare function fetchResults(args: SessionSearchArgs | SearchArgs): Promise<BaseResult[]>;
|
|
82
|
+
export declare function nameNotFound(input: string, assemblyName: string, { indexCount, failures }: {
|
|
83
|
+
indexCount: number;
|
|
84
|
+
failures: unknown[];
|
|
85
|
+
}): Error;
|
|
86
|
+
export {};
|