@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.
Files changed (145) hide show
  1. package/dist/components/browser/browser.d.ts +9 -0
  2. package/dist/components/browser/gqltracks.d.ts +13 -0
  3. package/dist/components/browser/index.d.ts +2 -0
  4. package/dist/components/browser/menuWrapper.d.ts +16 -0
  5. package/dist/components/browser/selectRegion.d.ts +12 -0
  6. package/dist/components/browser/stacked.d.ts +8 -0
  7. package/dist/components/browser/stackedtracks.d.ts +8 -0
  8. package/dist/components/browser/svgWrapper.d.ts +8 -0
  9. package/dist/components/browser/types.d.ts +55 -0
  10. package/dist/components/browser/utils.d.ts +1 -0
  11. package/dist/components/clipPath/clipPath.d.ts +14 -0
  12. package/dist/components/context/browserContext.d.ts +113 -0
  13. package/dist/components/context/domainContext.d.ts +9 -0
  14. package/dist/components/context/providers.d.ts +21 -0
  15. package/dist/components/controls/custombigwig.d.ts +4 -0
  16. package/dist/components/controls/index.d.ts +6 -0
  17. package/dist/components/controls/inputregion.d.ts +4 -0
  18. package/dist/components/controls/shiftbutton.d.ts +4 -0
  19. package/dist/components/controls/types.d.ts +33 -0
  20. package/dist/components/controls/ucsc.d.ts +4 -0
  21. package/dist/components/controls/zoombutton.d.ts +4 -0
  22. package/dist/components/cytobands/centromere.d.ts +4 -0
  23. package/dist/components/cytobands/cytoband.d.ts +4 -0
  24. package/dist/components/cytobands/cytobands.d.ts +4 -0
  25. package/dist/components/cytobands/highlight.d.ts +4 -0
  26. package/dist/components/cytobands/index.d.ts +3 -0
  27. package/dist/components/cytobands/shorthighlight.d.ts +4 -0
  28. package/dist/components/cytobands/types.d.ts +61 -0
  29. package/dist/components/icons/error.d.ts +9 -0
  30. package/dist/components/icons/index.d.ts +3 -0
  31. package/dist/components/icons/settings.d.ts +3 -0
  32. package/dist/components/icons/spinner.d.ts +9 -0
  33. package/dist/components/icons/top.d.ts +2 -0
  34. package/dist/components/icons/types.d.ts +12 -0
  35. package/dist/components/magnification/index.d.ts +2 -0
  36. package/dist/components/magnification/magnification.d.ts +13 -0
  37. package/dist/components/menu/browserContextMenu.d.ts +10 -0
  38. package/dist/components/menu/contextMenu.d.ts +6 -0
  39. package/dist/components/menu/types.d.ts +22 -0
  40. package/dist/components/modal/forms/form.d.ts +3 -0
  41. package/dist/components/modal/forms/heightForm.d.ts +4 -0
  42. package/dist/components/modal/forms/rangeForm.d.ts +5 -0
  43. package/dist/components/modal/forms/transcriptForm.d.ts +4 -0
  44. package/dist/components/modal/forms/universalForm.d.ts +4 -0
  45. package/dist/components/modal/modal.d.ts +1 -0
  46. package/dist/components/modal/styles.d.ts +25 -0
  47. package/dist/components/tooltip/tooltip.d.ts +4 -0
  48. package/dist/components/tooltip/tooltipcontext.d.ts +4 -0
  49. package/dist/components/tooltip/types.d.ts +20 -0
  50. package/dist/components/tracks/bam/bam.d.ts +23 -0
  51. package/dist/components/tracks/bam/dense.d.ts +4 -0
  52. package/dist/components/tracks/bam/index.d.ts +4 -0
  53. package/dist/components/tracks/bam/squish.d.ts +9 -0
  54. package/dist/components/tracks/bam/types.d.ts +37 -0
  55. package/dist/components/tracks/bam/utils.d.ts +9 -0
  56. package/dist/components/tracks/bigbed/bigbed.d.ts +37 -0
  57. package/dist/components/tracks/bigbed/dense.d.ts +22 -0
  58. package/dist/components/tracks/bigbed/index.d.ts +4 -0
  59. package/dist/components/tracks/bigbed/squish.d.ts +27 -0
  60. package/dist/components/tracks/bigbed/tooltip.d.ts +4 -0
  61. package/dist/components/tracks/bigbed/types.d.ts +14 -0
  62. package/dist/components/tracks/bigbed/utils.d.ts +8 -0
  63. package/dist/components/tracks/bigwig/bigwig.d.ts +37 -0
  64. package/dist/components/tracks/bigwig/dense.d.ts +8 -0
  65. package/dist/components/tracks/bigwig/full.d.ts +8 -0
  66. package/dist/components/tracks/bigwig/index.d.ts +4 -0
  67. package/dist/components/tracks/bigwig/types.d.ts +34 -0
  68. package/dist/components/tracks/bigwig/utils.d.ts +50 -0
  69. package/dist/components/tracks/empty/empty.d.ts +4 -0
  70. package/dist/components/tracks/empty/index.d.ts +2 -0
  71. package/dist/components/tracks/empty/types.d.ts +11 -0
  72. package/dist/components/tracks/index.d.ts +9 -0
  73. package/dist/components/tracks/ld/graphqlldtrack.d.ts +4 -0
  74. package/dist/components/tracks/ld/index.d.ts +4 -0
  75. package/dist/components/tracks/ld/ldtrack.d.ts +4 -0
  76. package/dist/components/tracks/ld/queries.d.ts +3 -0
  77. package/dist/components/tracks/ld/types.d.ts +66 -0
  78. package/dist/components/tracks/ld/utils.d.ts +3 -0
  79. package/dist/components/tracks/link/index.d.ts +4 -0
  80. package/dist/components/tracks/link/linktrack.d.ts +9 -0
  81. package/dist/components/tracks/link/simplelinktrack.d.ts +9 -0
  82. package/dist/components/tracks/link/types.d.ts +38 -0
  83. package/dist/components/tracks/link/utils.d.ts +5 -0
  84. package/dist/components/tracks/manhattan/full.d.ts +25 -0
  85. package/dist/components/tracks/manhattan/index.d.ts +3 -0
  86. package/dist/components/tracks/manhattan/tooltip.d.ts +4 -0
  87. package/dist/components/tracks/manhattan/types.d.ts +14 -0
  88. package/dist/components/tracks/manhattan/utils.d.ts +8 -0
  89. package/dist/components/tracks/motif/dense.d.ts +4 -0
  90. package/dist/components/tracks/motif/index.d.ts +4 -0
  91. package/dist/components/tracks/motif/squish.d.ts +4 -0
  92. package/dist/components/tracks/motif/types.d.ts +32 -0
  93. package/dist/components/tracks/motif/utils.d.ts +9 -0
  94. package/dist/components/tracks/ruler/index.d.ts +5 -0
  95. package/dist/components/tracks/ruler/ruler.d.ts +9 -0
  96. package/dist/components/tracks/ruler/types.d.ts +7 -0
  97. package/dist/components/tracks/ruler/wrapped.d.ts +15 -0
  98. package/dist/components/tracks/trackset/bamtrack.d.ts +4 -0
  99. package/dist/components/tracks/trackset/customtrack.d.ts +1 -0
  100. package/dist/components/tracks/trackset/deducetype.d.ts +6 -0
  101. package/dist/components/tracks/trackset/graphqlset.d.ts +4 -0
  102. package/dist/components/tracks/trackset/index.d.ts +6 -0
  103. package/dist/components/tracks/trackset/motiftrack.d.ts +4 -0
  104. package/dist/components/tracks/trackset/queries.d.ts +2 -0
  105. package/dist/components/tracks/trackset/resttrackset.d.ts +4 -0
  106. package/dist/components/tracks/trackset/types.d.ts +107 -0
  107. package/dist/components/tracks/trackset/utils.d.ts +4 -0
  108. package/dist/components/tracks/transcripts/index.d.ts +4 -0
  109. package/dist/components/tracks/transcripts/pack.d.ts +8 -0
  110. package/dist/components/tracks/transcripts/queries.d.ts +3 -0
  111. package/dist/components/tracks/transcripts/squish.d.ts +9 -0
  112. package/dist/components/tracks/transcripts/transcript.d.ts +35 -0
  113. package/dist/components/tracks/transcripts/types.d.ts +74 -0
  114. package/dist/components/tracks/transcripts/utils.d.ts +38 -0
  115. package/dist/components/tracks/types.d.ts +71 -0
  116. package/dist/components/tracks/wrapped/dragTrack.d.ts +7 -0
  117. package/dist/components/tracks/wrapped/index.d.ts +3 -0
  118. package/dist/components/tracks/wrapped/ld/index.d.ts +3 -0
  119. package/dist/components/tracks/wrapped/ld/ldtrack.d.ts +4 -0
  120. package/dist/components/tracks/wrapped/ld/types.d.ts +3 -0
  121. package/dist/components/tracks/wrapped/margin.d.ts +5 -0
  122. package/dist/components/tracks/wrapped/motif/dense.d.ts +4 -0
  123. package/dist/components/tracks/wrapped/motif/index.d.ts +4 -0
  124. package/dist/components/tracks/wrapped/motif/squish.d.ts +4 -0
  125. package/dist/components/tracks/wrapped/motif/types.d.ts +4 -0
  126. package/dist/components/tracks/wrapped/swapTrack.d.ts +9 -0
  127. package/dist/components/tracks/wrapped/types.d.ts +42 -0
  128. package/dist/components/tracks/wrapped/wrapped.d.ts +10 -0
  129. package/dist/gbc.cjs.js +220 -0
  130. package/dist/gbc.es.js +13058 -0
  131. package/dist/gbc.umd.js +220 -0
  132. package/dist/hooks/useBrowserState.d.ts +2 -0
  133. package/dist/hooks/useInput.d.ts +5 -0
  134. package/dist/hooks/useModal.d.ts +10 -0
  135. package/dist/hooks/useTooltip.d.ts +6 -0
  136. package/dist/lib.d.ts +14 -0
  137. package/dist/pages/main.d.ts +1 -0
  138. package/dist/pages/trackExamples.d.ts +4 -0
  139. package/dist/utils/colors.d.ts +14 -0
  140. package/dist/utils/coordinates.d.ts +39 -0
  141. package/dist/utils/index.d.ts +2 -0
  142. package/dist/utils/react.d.ts +2 -0
  143. package/dist/utils/svg.d.ts +2 -0
  144. package/dist/utils/types.d.ts +19 -0
  145. 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,2 @@
1
+ import { default as GenomeBrowser } from './browser';
2
+ export { GenomeBrowser };
@@ -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,4 @@
1
+ import { default as React } from 'react';
2
+ import { CustomBigWigProps } from './types';
3
+ declare const CustomBigWig: React.FC<CustomBigWigProps>;
4
+ export default CustomBigWig;
@@ -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,4 @@
1
+ import { default as React } from 'react';
2
+ import { InputRegionProps } from './types';
3
+ declare const InputRegion: React.FC<InputRegionProps>;
4
+ export default InputRegion;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ShiftButtonProps } from './types';
3
+ declare const ShiftButton: React.FC<ShiftButtonProps>;
4
+ export default ShiftButton;
@@ -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,4 @@
1
+ import { default as React } from 'react';
2
+ import { UCSCControlProps } from './types';
3
+ declare const UCSCControls: React.FC<UCSCControlProps>;
4
+ export default UCSCControls;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ZoomButtonProps } from './types';
3
+ declare const ZoomButton: React.FC<ZoomButtonProps>;
4
+ export default ZoomButton;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CentromereProps } from './types';
3
+ declare const Centromere: React.FC<CentromereProps>;
4
+ export default Centromere;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CytobandProps } from './types';
3
+ declare const Cytoband: React.FC<CytobandProps>;
4
+ export default Cytoband;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CytobandsProps } from './types';
3
+ declare const Cytobands: React.FC<CytobandsProps>;
4
+ export default Cytobands;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CytobandHighlightProps } from './types';
3
+ declare const CytobandHighlight: React.FC<CytobandHighlightProps>;
4
+ export default CytobandHighlight;
@@ -0,0 +1,3 @@
1
+ import { default as Cytobands } from './cytobands';
2
+ export { type CytobandsProps, type Cytoband, type CytobandColors } from './types';
3
+ export { Cytobands };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ShortHighlightProps } from './types';
3
+ declare const ShortHighlight: React.FC<ShortHighlightProps>;
4
+ export default ShortHighlight;
@@ -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,3 @@
1
+ import { default as LoadingSpinner } from './spinner';
2
+ import { default as ErrorIcon } from './error';
3
+ export { LoadingSpinner, ErrorIcon };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare function SettingsIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
+ export default SettingsIcon;
@@ -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,2 @@
1
+ declare function TopIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
2
+ export default TopIcon;
@@ -0,0 +1,12 @@
1
+ export type ErrorIconProps = {
2
+ width: number;
3
+ height: number;
4
+ };
5
+ export type LoadingSpinnerProps = {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ export type SettingsIconProps = {
10
+ width: number;
11
+ height: number;
12
+ };
@@ -0,0 +1,2 @@
1
+ import { default as Magnification } from './magnification';
2
+ export { Magnification };
@@ -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,3 @@
1
+ export default function Form({ children }: {
2
+ children: React.ReactNode;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { TrackProps } from '../../tracks/types';
2
+ export default function HeightForm({ track }: {
3
+ track: TrackProps;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { BigWigTrackProps } from '../../tracks/types';
2
+ declare function RangeForm({ track }: {
3
+ track: BigWigTrackProps;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default RangeForm;
@@ -0,0 +1,4 @@
1
+ import { TranscriptTrackProps } from '../../tracks/types';
2
+ export default function TranscriptForm({ track }: {
3
+ track: TranscriptTrackProps;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { TrackProps } from '../../tracks/types';
2
+ export default function UniversalForm({ track }: {
3
+ track: TrackProps;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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
+ };