@weng-lab/genomebrowser 0.0.1 → 0.0.2
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/components/browser/browser.d.ts +9 -0
- package/dist/components/browser/gqltracks.d.ts +13 -0
- package/dist/components/browser/index.d.ts +2 -0
- package/dist/components/browser/menuWrapper.d.ts +16 -0
- package/dist/components/browser/selectRegion.d.ts +12 -0
- package/dist/components/browser/stacked.d.ts +8 -0
- package/dist/components/browser/stackedtracks.d.ts +8 -0
- package/dist/components/browser/svgWrapper.d.ts +8 -0
- package/dist/components/browser/types.d.ts +55 -0
- package/dist/components/browser/utils.d.ts +1 -0
- package/dist/components/clipPath/clipPath.d.ts +14 -0
- package/dist/components/context/browserContext.d.ts +113 -0
- package/dist/components/context/domainContext.d.ts +9 -0
- package/dist/components/context/providers.d.ts +21 -0
- package/dist/components/controls/custombigwig.d.ts +4 -0
- package/dist/components/controls/index.d.ts +6 -0
- package/dist/components/controls/inputregion.d.ts +4 -0
- package/dist/components/controls/shiftbutton.d.ts +4 -0
- package/dist/components/controls/types.d.ts +33 -0
- package/dist/components/controls/ucsc.d.ts +4 -0
- package/dist/components/controls/zoombutton.d.ts +4 -0
- package/dist/components/cytobands/centromere.d.ts +4 -0
- package/dist/components/cytobands/cytoband.d.ts +4 -0
- package/dist/components/cytobands/cytobands.d.ts +4 -0
- package/dist/components/cytobands/highlight.d.ts +4 -0
- package/dist/components/cytobands/index.d.ts +3 -0
- package/dist/components/cytobands/shorthighlight.d.ts +4 -0
- package/dist/components/cytobands/types.d.ts +61 -0
- package/dist/components/icons/error.d.ts +9 -0
- package/dist/components/icons/index.d.ts +3 -0
- package/dist/components/icons/settings.d.ts +3 -0
- package/dist/components/icons/spinner.d.ts +9 -0
- package/dist/components/icons/top.d.ts +2 -0
- package/dist/components/icons/types.d.ts +12 -0
- package/dist/components/magnification/index.d.ts +2 -0
- package/dist/components/magnification/magnification.d.ts +13 -0
- package/dist/components/menu/browserContextMenu.d.ts +10 -0
- package/dist/components/menu/contextMenu.d.ts +6 -0
- package/dist/components/menu/types.d.ts +22 -0
- package/dist/components/modal/forms/form.d.ts +3 -0
- package/dist/components/modal/forms/heightForm.d.ts +4 -0
- package/dist/components/modal/forms/rangeForm.d.ts +5 -0
- package/dist/components/modal/forms/transcriptForm.d.ts +4 -0
- package/dist/components/modal/forms/universalForm.d.ts +4 -0
- package/dist/components/modal/modal.d.ts +1 -0
- package/dist/components/modal/styles.d.ts +25 -0
- package/dist/components/tooltip/tooltip.d.ts +4 -0
- package/dist/components/tooltip/tooltipcontext.d.ts +4 -0
- package/dist/components/tooltip/types.d.ts +20 -0
- package/dist/components/tracks/bam/bam.d.ts +23 -0
- package/dist/components/tracks/bam/dense.d.ts +4 -0
- package/dist/components/tracks/bam/index.d.ts +4 -0
- package/dist/components/tracks/bam/squish.d.ts +9 -0
- package/dist/components/tracks/bam/types.d.ts +37 -0
- package/dist/components/tracks/bam/utils.d.ts +9 -0
- package/dist/components/tracks/bigbed/bigbed.d.ts +37 -0
- package/dist/components/tracks/bigbed/dense.d.ts +22 -0
- package/dist/components/tracks/bigbed/index.d.ts +4 -0
- package/dist/components/tracks/bigbed/squish.d.ts +27 -0
- package/dist/components/tracks/bigbed/tooltip.d.ts +4 -0
- package/dist/components/tracks/bigbed/types.d.ts +14 -0
- package/dist/components/tracks/bigbed/utils.d.ts +8 -0
- package/dist/components/tracks/bigwig/bigwig.d.ts +37 -0
- package/dist/components/tracks/bigwig/dense.d.ts +8 -0
- package/dist/components/tracks/bigwig/full.d.ts +8 -0
- package/dist/components/tracks/bigwig/index.d.ts +4 -0
- package/dist/components/tracks/bigwig/types.d.ts +34 -0
- package/dist/components/tracks/bigwig/utils.d.ts +50 -0
- package/dist/components/tracks/empty/empty.d.ts +4 -0
- package/dist/components/tracks/empty/index.d.ts +2 -0
- package/dist/components/tracks/empty/types.d.ts +11 -0
- package/dist/components/tracks/index.d.ts +9 -0
- package/dist/components/tracks/ld/graphqlldtrack.d.ts +4 -0
- package/dist/components/tracks/ld/index.d.ts +4 -0
- package/dist/components/tracks/ld/ldtrack.d.ts +4 -0
- package/dist/components/tracks/ld/queries.d.ts +3 -0
- package/dist/components/tracks/ld/types.d.ts +66 -0
- package/dist/components/tracks/ld/utils.d.ts +3 -0
- package/dist/components/tracks/link/index.d.ts +4 -0
- package/dist/components/tracks/link/linktrack.d.ts +9 -0
- package/dist/components/tracks/link/simplelinktrack.d.ts +9 -0
- package/dist/components/tracks/link/types.d.ts +38 -0
- package/dist/components/tracks/link/utils.d.ts +5 -0
- package/dist/components/tracks/manhattan/full.d.ts +25 -0
- package/dist/components/tracks/manhattan/index.d.ts +3 -0
- package/dist/components/tracks/manhattan/tooltip.d.ts +4 -0
- package/dist/components/tracks/manhattan/types.d.ts +14 -0
- package/dist/components/tracks/manhattan/utils.d.ts +8 -0
- package/dist/components/tracks/motif/dense.d.ts +4 -0
- package/dist/components/tracks/motif/index.d.ts +4 -0
- package/dist/components/tracks/motif/squish.d.ts +4 -0
- package/dist/components/tracks/motif/types.d.ts +32 -0
- package/dist/components/tracks/motif/utils.d.ts +9 -0
- package/dist/components/tracks/ruler/index.d.ts +5 -0
- package/dist/components/tracks/ruler/ruler.d.ts +9 -0
- package/dist/components/tracks/ruler/types.d.ts +7 -0
- package/dist/components/tracks/ruler/wrapped.d.ts +15 -0
- package/dist/components/tracks/trackset/bamtrack.d.ts +4 -0
- package/dist/components/tracks/trackset/customtrack.d.ts +1 -0
- package/dist/components/tracks/trackset/deducetype.d.ts +6 -0
- package/dist/components/tracks/trackset/graphqlset.d.ts +4 -0
- package/dist/components/tracks/trackset/index.d.ts +6 -0
- package/dist/components/tracks/trackset/motiftrack.d.ts +4 -0
- package/dist/components/tracks/trackset/queries.d.ts +2 -0
- package/dist/components/tracks/trackset/resttrackset.d.ts +4 -0
- package/dist/components/tracks/trackset/types.d.ts +107 -0
- package/dist/components/tracks/trackset/utils.d.ts +4 -0
- package/dist/components/tracks/transcripts/index.d.ts +4 -0
- package/dist/components/tracks/transcripts/pack.d.ts +8 -0
- package/dist/components/tracks/transcripts/queries.d.ts +3 -0
- package/dist/components/tracks/transcripts/squish.d.ts +9 -0
- package/dist/components/tracks/transcripts/transcript.d.ts +35 -0
- package/dist/components/tracks/transcripts/types.d.ts +74 -0
- package/dist/components/tracks/transcripts/utils.d.ts +38 -0
- package/dist/components/tracks/types.d.ts +71 -0
- package/dist/components/tracks/wrapped/dragTrack.d.ts +7 -0
- package/dist/components/tracks/wrapped/index.d.ts +3 -0
- package/dist/components/tracks/wrapped/ld/index.d.ts +3 -0
- package/dist/components/tracks/wrapped/ld/ldtrack.d.ts +4 -0
- package/dist/components/tracks/wrapped/ld/types.d.ts +3 -0
- package/dist/components/tracks/wrapped/margin.d.ts +5 -0
- package/dist/components/tracks/wrapped/motif/dense.d.ts +4 -0
- package/dist/components/tracks/wrapped/motif/index.d.ts +4 -0
- package/dist/components/tracks/wrapped/motif/squish.d.ts +4 -0
- package/dist/components/tracks/wrapped/motif/types.d.ts +4 -0
- package/dist/components/tracks/wrapped/swapTrack.d.ts +9 -0
- package/dist/components/tracks/wrapped/types.d.ts +42 -0
- package/dist/components/tracks/wrapped/wrapped.d.ts +10 -0
- package/dist/gbc.cjs.js +220 -0
- package/dist/gbc.es.js +13058 -0
- package/dist/gbc.umd.js +220 -0
- package/dist/hooks/useBrowserState.d.ts +2 -0
- package/dist/hooks/useInput.d.ts +5 -0
- package/dist/hooks/useModal.d.ts +10 -0
- package/dist/hooks/useTooltip.d.ts +6 -0
- package/dist/lib.d.ts +14 -0
- package/dist/pages/main.d.ts +1 -0
- package/dist/pages/trackExamples.d.ts +4 -0
- package/dist/utils/colors.d.ts +14 -0
- package/dist/utils/coordinates.d.ts +39 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/react.d.ts +2 -0
- package/dist/utils/svg.d.ts +2 -0
- package/dist/utils/types.d.ts +19 -0
- package/package.json +10 -6
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BrowserAction, BrowserState } from '../context/browserContext';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare function GenomeBrowser({ children, browserState, browserDispatch, externalFetch }: {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
browserState: BrowserState;
|
|
6
|
+
browserDispatch: React.Dispatch<BrowserAction>;
|
|
7
|
+
externalFetch?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default GenomeBrowser;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BrowserAction, BrowserState } from '../context/browserContext';
|
|
2
|
+
export type TranscriptRequest = {
|
|
3
|
+
chromosome: string;
|
|
4
|
+
assembly: string;
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
version: number;
|
|
8
|
+
};
|
|
9
|
+
declare function GQLTracks({ browserState, browserDispatch }: {
|
|
10
|
+
browserState: BrowserState;
|
|
11
|
+
browserDispatch: React.Dispatch<BrowserAction>;
|
|
12
|
+
}): null;
|
|
13
|
+
export default GQLTracks;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ToolTipData, ContextMenuData } from './types';
|
|
3
|
+
import { DisplayMode } from '../tracks/types';
|
|
4
|
+
export type MenuWrapperProps = {
|
|
5
|
+
onModeChange?: (id: string, displayMode: DisplayMode) => void;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type MenuState = {
|
|
9
|
+
tooltip: ToolTipData;
|
|
10
|
+
contextmenu: ContextMenuData;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Provides a genome browser container which wraps children in an SVG
|
|
14
|
+
* element and provides a mechanism for dragging to select regions.
|
|
15
|
+
*/
|
|
16
|
+
export default function MenuWrapper({ children, onModeChange }: MenuWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Domain } from '../../utils/types';
|
|
3
|
+
export type SelectRegionProps = {
|
|
4
|
+
domain: Domain;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
dragRegionHeight: number;
|
|
8
|
+
leftMargin: number;
|
|
9
|
+
onSelectionEnd: (domain: Domain) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const SelectRegion: React.FC<SelectRegionProps>;
|
|
12
|
+
export default SelectRegion;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BrowserState } from '../context/browserContext';
|
|
3
|
+
declare function Stacked({ children, browserState, rulerHeight }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
browserState: BrowserState;
|
|
6
|
+
rulerHeight: number;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Stacked;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
import { StackedTrackProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Automatically stacks a number of child tracks on top of each other, updating y-coordinates
|
|
5
|
+
* appropriately as the tracks render themselves and update their heights.
|
|
6
|
+
*/
|
|
7
|
+
declare const StackedTracks: React.FC<PropsWithChildren<StackedTrackProps>>;
|
|
8
|
+
export default StackedTracks;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface SvgWrapperProps {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
svgRef?: React.RefObject<SVGSVGElement>;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export default function SvgWrapper({ width, height, svgRef, children }: SvgWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Domain } from '../../utils/types';
|
|
2
|
+
export type GenomeBrowserDomainChangedAction = {
|
|
3
|
+
type: "domainChanged";
|
|
4
|
+
newDomain: Domain;
|
|
5
|
+
};
|
|
6
|
+
export type GenomeBrowserHeightChangedAction = {
|
|
7
|
+
type: "heightChanged";
|
|
8
|
+
newHeight: number;
|
|
9
|
+
};
|
|
10
|
+
export type GenomeBrowserTooltipChangedAction = {
|
|
11
|
+
type: "tooltipChanged";
|
|
12
|
+
tooltip: ToolTipData;
|
|
13
|
+
};
|
|
14
|
+
export type GenomeBrowserContextMenuChangedAction = {
|
|
15
|
+
type: "contextMenuChanged";
|
|
16
|
+
contextmenu: ContextMenuData;
|
|
17
|
+
};
|
|
18
|
+
export type ToolTipData = {
|
|
19
|
+
show: boolean;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
content?: React.ReactElement;
|
|
25
|
+
};
|
|
26
|
+
export type ContextMenuData = {
|
|
27
|
+
show: boolean;
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
id: string;
|
|
31
|
+
displayMode?: string;
|
|
32
|
+
displayModeOptions?: string[];
|
|
33
|
+
downloadSVG?: () => void;
|
|
34
|
+
};
|
|
35
|
+
export type GenomeBrowserAction = GenomeBrowserDomainChangedAction | GenomeBrowserHeightChangedAction | GenomeBrowserTooltipChangedAction | GenomeBrowserContextMenuChangedAction;
|
|
36
|
+
export type StackedTrackProps = {
|
|
37
|
+
id: string;
|
|
38
|
+
transform?: string;
|
|
39
|
+
height?: number;
|
|
40
|
+
onHeightChanged?: (height: number) => void;
|
|
41
|
+
svgRef?: React.RefObject<SVGSVGElement>;
|
|
42
|
+
};
|
|
43
|
+
export type StackedTrackState = {
|
|
44
|
+
heights: number[];
|
|
45
|
+
};
|
|
46
|
+
export type StackedTrackChildHeightChangedAction = {
|
|
47
|
+
type: "childHeightChanged";
|
|
48
|
+
index: number;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
export type StackedTrackChildrenAddedAction = {
|
|
52
|
+
type: "childrenAdded";
|
|
53
|
+
heights: number[];
|
|
54
|
+
};
|
|
55
|
+
export type StackedTrackAction = StackedTrackChildHeightChangedAction | StackedTrackChildrenAddedAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useEvent: (event: any, handler: (e: KeyboardEvent) => void, passive?: boolean) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ClipPathProps = {
|
|
3
|
+
height: number;
|
|
4
|
+
width: number;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Creates an SVG clipPath element with a unique ID.
|
|
9
|
+
* @param width the width of the element relative to the SVG.
|
|
10
|
+
* @param height the height of the element relative to the SVG.
|
|
11
|
+
* @param id the unqiue ID of the element, used to refer to it in properties of clipped elements.
|
|
12
|
+
*/
|
|
13
|
+
declare const ClipPath: React.FC<ClipPathProps>;
|
|
14
|
+
export default ClipPath;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Domain, YRange } from '../../utils/types';
|
|
2
|
+
import { TrackProps } from '../tracks/types';
|
|
3
|
+
import { TranscriptOptions } from '../tracks/transcripts/transcript';
|
|
4
|
+
import { BigWigOptions } from '../tracks/bigwig/bigwig';
|
|
5
|
+
import { BigBedOptions } from '../tracks/bigbed/bigbed';
|
|
6
|
+
export declare const BrowserStateContext: import('react').Context<BrowserState>;
|
|
7
|
+
export declare const BrowserDispatchContext: import('react').Context<import('react').Dispatch<BrowserAction>>;
|
|
8
|
+
export type BrowserState = {
|
|
9
|
+
domain: Domain;
|
|
10
|
+
preRenderedWidth: number;
|
|
11
|
+
width: number;
|
|
12
|
+
zoomLevel: number;
|
|
13
|
+
delta: number;
|
|
14
|
+
tracks: TrackProps[];
|
|
15
|
+
};
|
|
16
|
+
export declare enum BrowserActionType {
|
|
17
|
+
SET_DOMAIN = "setDomain",
|
|
18
|
+
SHIFT_DOMAIN = "shiftDomain",
|
|
19
|
+
ADD_TRACK = "addTrack",
|
|
20
|
+
UPDATE_TRACK = "updateTrack",
|
|
21
|
+
SET_TRACK_HEIGHT = "setTrackHeight",
|
|
22
|
+
SET_TRACK_DATA = "setTrackData",
|
|
23
|
+
SET_LOADING = "setLoading",
|
|
24
|
+
SWAP_TRACKS = "swapTracks",
|
|
25
|
+
RELOAD_TRACKS = "reloadTracks",
|
|
26
|
+
SHIFT_TRACK = "shiftTrack",
|
|
27
|
+
REMOVE_TRANSLATION = "removeTranslation",
|
|
28
|
+
INSERT_TRACK = "insertTrack",
|
|
29
|
+
DELETE_TRACK = "deleteTrack",
|
|
30
|
+
TRANSLATE_TRACK = "translateTrack",
|
|
31
|
+
SET_RANGE = "setRange",
|
|
32
|
+
UPDATE_PROPS = "updateProps",
|
|
33
|
+
BRING_TO_TOP = "bringToTop",
|
|
34
|
+
SET_DELTA = "setDelta"
|
|
35
|
+
}
|
|
36
|
+
export type BrowserAction = SetDomain | AddTrack | UpdateTrack | SetTrackHeight | SetTrackData | SwapTracks | ShiftDomain | SetLoading | ShiftTrack | RemoveTranslation | InsertTrack | DeleteTrack | TranslateTrack | SetRange | UpdateProps | BringToTop | SetDelta;
|
|
37
|
+
export type SetDelta = {
|
|
38
|
+
type: BrowserActionType.SET_DELTA;
|
|
39
|
+
delta: number;
|
|
40
|
+
};
|
|
41
|
+
export type SetDomain = {
|
|
42
|
+
type: BrowserActionType.SET_DOMAIN;
|
|
43
|
+
domain: Domain;
|
|
44
|
+
};
|
|
45
|
+
export type AddTrack = {
|
|
46
|
+
type: BrowserActionType.ADD_TRACK;
|
|
47
|
+
track: TrackProps;
|
|
48
|
+
};
|
|
49
|
+
export type UpdateTrack = {
|
|
50
|
+
type: BrowserActionType.UPDATE_TRACK;
|
|
51
|
+
id: string;
|
|
52
|
+
track: Partial<TrackProps>;
|
|
53
|
+
};
|
|
54
|
+
export type SetTrackHeight = {
|
|
55
|
+
type: BrowserActionType.SET_TRACK_HEIGHT;
|
|
56
|
+
id: string;
|
|
57
|
+
height: number;
|
|
58
|
+
};
|
|
59
|
+
export type SetTrackData = {
|
|
60
|
+
type: BrowserActionType.SET_TRACK_DATA;
|
|
61
|
+
id: string;
|
|
62
|
+
data: any;
|
|
63
|
+
};
|
|
64
|
+
export type SwapTracks = {
|
|
65
|
+
type: BrowserActionType.SWAP_TRACKS;
|
|
66
|
+
id1: string;
|
|
67
|
+
id2: string;
|
|
68
|
+
};
|
|
69
|
+
export type ShiftDomain = {
|
|
70
|
+
type: BrowserActionType.SHIFT_DOMAIN;
|
|
71
|
+
delta: number;
|
|
72
|
+
};
|
|
73
|
+
export type SetLoading = {
|
|
74
|
+
type: BrowserActionType.SET_LOADING;
|
|
75
|
+
};
|
|
76
|
+
export type ShiftTrack = {
|
|
77
|
+
type: BrowserActionType.SHIFT_TRACK;
|
|
78
|
+
id1: string;
|
|
79
|
+
id2: string;
|
|
80
|
+
};
|
|
81
|
+
export type RemoveTranslation = {
|
|
82
|
+
type: BrowserActionType.REMOVE_TRANSLATION;
|
|
83
|
+
id: string;
|
|
84
|
+
};
|
|
85
|
+
export type InsertTrack = {
|
|
86
|
+
type: BrowserActionType.INSERT_TRACK;
|
|
87
|
+
index: number;
|
|
88
|
+
track: TrackProps;
|
|
89
|
+
};
|
|
90
|
+
export type DeleteTrack = {
|
|
91
|
+
type: BrowserActionType.DELETE_TRACK;
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
export type TranslateTrack = {
|
|
95
|
+
type: BrowserActionType.TRANSLATE_TRACK;
|
|
96
|
+
id: string;
|
|
97
|
+
dist: number;
|
|
98
|
+
};
|
|
99
|
+
export type SetRange = {
|
|
100
|
+
type: BrowserActionType.SET_RANGE;
|
|
101
|
+
id: string;
|
|
102
|
+
range: YRange;
|
|
103
|
+
};
|
|
104
|
+
export type UpdateProps = {
|
|
105
|
+
type: BrowserActionType.UPDATE_PROPS;
|
|
106
|
+
id: string;
|
|
107
|
+
props: TranscriptOptions | BigWigOptions | BigBedOptions;
|
|
108
|
+
};
|
|
109
|
+
export type BringToTop = {
|
|
110
|
+
type: BrowserActionType.BRING_TO_TOP;
|
|
111
|
+
id: string;
|
|
112
|
+
};
|
|
113
|
+
export declare function BrowserReducer(state: BrowserState, action: BrowserAction): BrowserState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Domain } from '../../utils/types';
|
|
2
|
+
type stateContext<T> = [
|
|
3
|
+
T,
|
|
4
|
+
React.Dispatch<React.SetStateAction<T>>
|
|
5
|
+
];
|
|
6
|
+
export declare const DomainContext: import('react').Context<Domain>;
|
|
7
|
+
export declare const DomainDispatchContext: import('react').Context<any>;
|
|
8
|
+
export declare const DeltaContext: import('react').Context<stateContext<number>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BrowserState, BrowserAction } from './browserContext';
|
|
3
|
+
import { TrackModalInfo } from '../../hooks/useModal';
|
|
4
|
+
export declare const ModalContext: import('react').Context<{
|
|
5
|
+
openModal: TrackModalInfo | null;
|
|
6
|
+
showModal: (trackId: string, mouseX: number, mouseY: number) => void;
|
|
7
|
+
closeModal: () => void;
|
|
8
|
+
}>;
|
|
9
|
+
interface ContextObjects {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
browserState: BrowserState;
|
|
12
|
+
browserDispatch: React.Dispatch<BrowserAction>;
|
|
13
|
+
deltaContext: [number, React.Dispatch<React.SetStateAction<number>>];
|
|
14
|
+
modalState: {
|
|
15
|
+
openModal: TrackModalInfo | null;
|
|
16
|
+
showModal: (trackId: string, mouseX: number, mouseY: number) => void;
|
|
17
|
+
closeModal: () => void;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export default function ContextProvider({ children, browserState, browserDispatch, modalState, deltaContext }: ContextObjects): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as ShiftButton } from './shiftbutton';
|
|
2
|
+
import { default as ZoomButton } from './zoombutton';
|
|
3
|
+
import { default as InputRegion } from './inputregion';
|
|
4
|
+
import { default as UCSCControls } from './ucsc';
|
|
5
|
+
import { default as CustomBigWig } from './custombigwig';
|
|
6
|
+
export { ShiftButton, ZoomButton, InputRegion, CustomBigWig, UCSCControls };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Domain } from '../../utils/types';
|
|
2
|
+
export type CustomBigWigProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
onSubmit: (value: CustomBigWig) => void;
|
|
5
|
+
};
|
|
6
|
+
export type CustomBigWig = {
|
|
7
|
+
url: string;
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
export type InputRegionProps = {
|
|
11
|
+
text?: string;
|
|
12
|
+
domain: Domain;
|
|
13
|
+
chromosome?: string;
|
|
14
|
+
size: number;
|
|
15
|
+
onSubmit: (domain: Domain) => void;
|
|
16
|
+
};
|
|
17
|
+
export type ShiftButtonProps = {
|
|
18
|
+
text: string;
|
|
19
|
+
shift: number;
|
|
20
|
+
domain: Domain;
|
|
21
|
+
onClick: (domain: Domain) => void;
|
|
22
|
+
};
|
|
23
|
+
export type ZoomButtonProps = {
|
|
24
|
+
text: string;
|
|
25
|
+
factor: number;
|
|
26
|
+
domain: Domain;
|
|
27
|
+
onClick: (domain: Domain) => void;
|
|
28
|
+
};
|
|
29
|
+
export type UCSCControlProps = {
|
|
30
|
+
domain: Domain;
|
|
31
|
+
onDomainChanged: (domain: Domain) => void;
|
|
32
|
+
withInput: boolean;
|
|
33
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Domain } from '../../utils/types';
|
|
3
|
+
export type Highlight = {
|
|
4
|
+
color: string;
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
};
|
|
8
|
+
export type ShortHighlightProps = {
|
|
9
|
+
highlight: Highlight;
|
|
10
|
+
x: (value: number) => number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
export type Cytoband = {
|
|
14
|
+
stain: string;
|
|
15
|
+
coordinates: Domain;
|
|
16
|
+
};
|
|
17
|
+
export type CytobandColors = {
|
|
18
|
+
default: string;
|
|
19
|
+
centromere: string;
|
|
20
|
+
stalk: string;
|
|
21
|
+
};
|
|
22
|
+
export type CytobandsProps = {
|
|
23
|
+
data: Cytoband[];
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
id: string;
|
|
27
|
+
colors?: CytobandColors;
|
|
28
|
+
transform?: string;
|
|
29
|
+
highlight?: Highlight;
|
|
30
|
+
highlights?: Highlight[];
|
|
31
|
+
onHighlightMouseOver?: (highlight: Highlight, x: number, i: number) => void;
|
|
32
|
+
onHighlightMouseOut?: () => void;
|
|
33
|
+
onHighlightClick?: (highlight: Highlight, x: number, i: number) => void;
|
|
34
|
+
domain: Domain;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
opacity?: number;
|
|
37
|
+
};
|
|
38
|
+
export type CytobandProps = {
|
|
39
|
+
colors: CytobandColors;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
type: string;
|
|
43
|
+
x: number;
|
|
44
|
+
opacity?: number;
|
|
45
|
+
};
|
|
46
|
+
export type CentromereProps = {
|
|
47
|
+
color: string;
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
x: number;
|
|
51
|
+
opening: boolean;
|
|
52
|
+
};
|
|
53
|
+
export type CytobandHighlightProps = {
|
|
54
|
+
x: (value: number) => number;
|
|
55
|
+
height: number;
|
|
56
|
+
width: number;
|
|
57
|
+
highlight: Highlight;
|
|
58
|
+
onMouseOver?: () => void;
|
|
59
|
+
onMouseOut?: () => void;
|
|
60
|
+
onClick?: () => void;
|
|
61
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ErrorIconProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* An error icon, consisting of a red exclamation point inside a triangle.
|
|
5
|
+
* @param width the width of the icon relative to the containing SVG.
|
|
6
|
+
* @param height the height of the icon relative to the containing SVG.
|
|
7
|
+
*/
|
|
8
|
+
declare const ErrorIcon: React.FC<ErrorIconProps>;
|
|
9
|
+
export default ErrorIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LoadingSpinnerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A loading spinner.
|
|
5
|
+
* @param width the width of the element relative to the containing SVG.
|
|
6
|
+
* @param height the height of the element relative to the containing SVG.
|
|
7
|
+
*/
|
|
8
|
+
declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
|
|
9
|
+
export default LoadingSpinner;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
import { Domain } from '../../utils/types';
|
|
3
|
+
export type MagnificationProps = {
|
|
4
|
+
width: number;
|
|
5
|
+
id?: string;
|
|
6
|
+
domain: Domain;
|
|
7
|
+
transform?: string;
|
|
8
|
+
svgRef?: React.RefObject<SVGSVGElement>;
|
|
9
|
+
onHeightChanged?: (height: number) => void;
|
|
10
|
+
zoomFactor?: number;
|
|
11
|
+
};
|
|
12
|
+
declare const Magnification: React.FC<PropsWithChildren<MagnificationProps>>;
|
|
13
|
+
export default Magnification;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DisplayMode } from '../tracks/types';
|
|
2
|
+
import { ContextMenuData } from '../browser/types';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
type BrowserContextMenuProps = {
|
|
5
|
+
data: ContextMenuData;
|
|
6
|
+
onModeChange?: (id: string, mode: DisplayMode) => void;
|
|
7
|
+
setContextMenu: (contextmenu: ContextMenuData) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const BrowserContextMenu: React.FC<BrowserContextMenuProps>;
|
|
10
|
+
export default BrowserContextMenu;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
import { ContextMenuProps, ContextMenuData } from './types';
|
|
3
|
+
declare const ContextMenuContext: React.Context<ContextMenuData>;
|
|
4
|
+
declare const ContextMenu: React.FC<PropsWithChildren<ContextMenuProps>>;
|
|
5
|
+
export default ContextMenu;
|
|
6
|
+
export { ContextMenuContext };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ContextMenuProps = {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
};
|
|
5
|
+
export type ContextMenuData = {
|
|
6
|
+
show: boolean;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
id: string;
|
|
10
|
+
setContextMenu: (contextMenu: {
|
|
11
|
+
show: boolean;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
id: string;
|
|
15
|
+
displayMode?: string;
|
|
16
|
+
displayModeOptions?: string[];
|
|
17
|
+
downloadSVG?: () => void;
|
|
18
|
+
}) => void;
|
|
19
|
+
displayMode?: string;
|
|
20
|
+
displayModeOptions?: string[];
|
|
21
|
+
downloadSVG?: () => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TrackModal(): import('react').ReactPortal | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const contentStyle: {
|
|
2
|
+
position: "fixed";
|
|
3
|
+
top: string;
|
|
4
|
+
left: string;
|
|
5
|
+
boxShadow: string;
|
|
6
|
+
width: string;
|
|
7
|
+
transform: string;
|
|
8
|
+
background: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const inputStyle: {
|
|
11
|
+
width: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const labelStyle: {
|
|
14
|
+
display: string;
|
|
15
|
+
flexDirection: "column";
|
|
16
|
+
paddingInline: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const inputNumberWebkitStyle: {
|
|
19
|
+
WebkitAppearance: "none";
|
|
20
|
+
margin: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const inputNumberFirefoxStyle: {
|
|
23
|
+
MozAppearance: "textfield";
|
|
24
|
+
appearance: "textfield";
|
|
25
|
+
};
|