higlass 1.13.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/README.md +48 -54
  2. package/app/globals.d.ts +1 -1
  3. package/app/missing-types.d.ts +4 -1
  4. package/app/scripts/AddTrackDialog.jsx +11 -4
  5. package/app/scripts/AddTrackPositionMenu.jsx +28 -7
  6. package/app/scripts/Annotations1dTrack.js +90 -251
  7. package/app/scripts/Annotations2dTrack.js +12 -7
  8. package/app/scripts/Autocomplete.jsx +13 -28
  9. package/app/scripts/AxisPixi.js +6 -10
  10. package/app/scripts/BarTrack.js +3 -3
  11. package/app/scripts/BedLikeTrack.js +556 -449
  12. package/app/scripts/Button.jsx +1 -1
  13. package/app/scripts/CNVIntervalTrack.js +1 -1
  14. package/app/scripts/CenterTrack.jsx +8 -7
  15. package/app/scripts/Chromosome2DAnnotations.js +1 -1
  16. package/app/scripts/Chromosome2DLabels.js +1 -1
  17. package/app/scripts/ChromosomeGrid.js +49 -38
  18. package/app/scripts/ChromosomeInfo.js +1 -1
  19. package/app/scripts/CombinedTrack.js +3 -1
  20. package/app/scripts/ConfigTrackMenu.jsx +1 -1
  21. package/app/scripts/ConfigViewMenu.jsx +2 -2
  22. package/app/scripts/ContextMenuContainer.jsx +4 -2
  23. package/app/scripts/ContextMenuItem.jsx +14 -2
  24. package/app/scripts/CrossRule.js +1 -1
  25. package/app/scripts/CustomTrackDialog.jsx +2 -2
  26. package/app/scripts/Dialog.jsx +2 -2
  27. package/app/scripts/DragListeningDiv.jsx +1 -1
  28. package/app/scripts/DraggableDiv.jsx +2 -3
  29. package/app/scripts/ExportLinkDialog.jsx +1 -1
  30. package/app/scripts/FilledLine.js +349 -0
  31. package/app/scripts/GalleryTracks.jsx +77 -78
  32. package/app/scripts/GenomePositionSearchBox.jsx +184 -482
  33. package/app/scripts/HeatmapOptions.jsx +4 -2
  34. package/app/scripts/HeatmapTiledPixiTrack.js +23 -32
  35. package/app/scripts/HiGlassComponent.jsx +515 -444
  36. package/app/scripts/HiGlassComponentContext.js +5 -0
  37. package/app/scripts/Horizontal1dHeatmapTrack.js +1 -1
  38. package/app/scripts/Horizontal2DDomainsTrack.js +1 -1
  39. package/app/scripts/HorizontalChromosomeLabels.js +28 -22
  40. package/app/scripts/HorizontalGeneAnnotationsTrack.js +1 -1
  41. package/app/scripts/HorizontalHeatmapTrack.js +2 -2
  42. package/app/scripts/HorizontalMultivecTrack.js +6 -7
  43. package/app/scripts/HorizontalRule.js +1 -2
  44. package/app/scripts/HorizontalTiled1DPixiTrack.js +4 -4
  45. package/app/scripts/HorizontalTiledPlot.jsx +9 -9
  46. package/app/scripts/LeftTrackModifier.js +4 -0
  47. package/app/scripts/ListWrapper.jsx +1 -2
  48. package/app/scripts/MapboxTilesTrack.js +1 -2
  49. package/app/scripts/Modal.jsx +2 -2
  50. package/app/scripts/MoveableTrack.jsx +10 -12
  51. package/app/scripts/NestedContextMenu.jsx +2 -1
  52. package/app/scripts/OSMTileIdsTrack.js +1 -1
  53. package/app/scripts/OverlayTrack.js +4 -4
  54. package/app/scripts/PixiTrack.js +27 -13
  55. package/app/scripts/PlotTypeChooser.jsx +3 -4
  56. package/app/scripts/SearchField.js +5 -5
  57. package/app/scripts/SeriesListItems.jsx +3 -4
  58. package/app/scripts/SeriesListMenu.jsx +95 -53
  59. package/app/scripts/SeriesListSubmenuMixin.jsx +2 -1
  60. package/app/scripts/SketchInlinePicker.jsx +2 -2
  61. package/app/scripts/SortableList.jsx +1 -1
  62. package/app/scripts/Tiled1DPixiTrack.js +4 -1
  63. package/app/scripts/TiledPixiTrack.js +244 -102
  64. package/app/scripts/TiledPlot.jsx +565 -118
  65. package/app/scripts/TilesetFinder.jsx +12 -4
  66. package/app/scripts/Track.js +1 -1
  67. package/app/scripts/TrackArea.jsx +4 -0
  68. package/app/scripts/TrackControl.jsx +2 -2
  69. package/app/scripts/TrackRenderer.jsx +32 -33
  70. package/app/scripts/ValueIntervalTrack.js +1 -1
  71. package/app/scripts/VerticalRule.js +2 -2
  72. package/app/scripts/VerticalTiledPlot.jsx +7 -7
  73. package/app/scripts/ViewConfigEditor.jsx +1 -1
  74. package/app/scripts/ViewContextMenu.jsx +53 -5
  75. package/app/scripts/ViewHeader.jsx +9 -9
  76. package/app/scripts/ViewportTracker2D.js +1 -1
  77. package/app/scripts/api.js +92 -12
  78. package/app/scripts/configs/available-track-types.js +1 -1
  79. package/app/scripts/configs/index.js +6 -1
  80. package/app/scripts/configs/positions-by-datatype.js +2 -2
  81. package/app/scripts/configs/primitives.js +2 -0
  82. package/app/scripts/configs/themes.js +0 -1
  83. package/app/scripts/configs/tracks-info-by-type.js +11 -8
  84. package/app/scripts/configs/tracks-info.js +3 -2
  85. package/app/scripts/d3-context-menu.js +3 -4
  86. package/app/scripts/data-fetchers/DataFetcher.js +35 -36
  87. package/app/scripts/data-fetchers/genbank-fetcher.js +13 -22
  88. package/app/scripts/data-fetchers/local-tile-fetcher.js +10 -8
  89. package/app/scripts/hglib.jsx +62 -71
  90. package/app/scripts/hocs/with-modal.jsx +32 -10
  91. package/app/scripts/hocs/with-pub-sub.js +12 -3
  92. package/app/scripts/hocs/with-theme.jsx +21 -14
  93. package/app/scripts/icons.jsx +3 -2
  94. package/app/scripts/mixwith.js +2 -2
  95. package/app/scripts/options-info.js +49 -11
  96. package/app/scripts/plugins/get-data-fetcher.js +2 -3
  97. package/app/scripts/services/chrom-info.js +32 -4
  98. package/app/scripts/services/element-resize-listener.js +2 -2
  99. package/app/scripts/services/index.js +0 -1
  100. package/app/scripts/services/tile-proxy.js +368 -285
  101. package/app/scripts/services/worker.js +31 -28
  102. package/app/scripts/test-helpers/index.js +2 -1
  103. package/app/scripts/test-helpers/test-helpers.jsx +157 -69
  104. package/app/scripts/types.ts +118 -47
  105. package/app/scripts/utils/LruCache.js +3 -2
  106. package/app/scripts/utils/assert.js +19 -0
  107. package/app/scripts/utils/background-task-scheduler.js +2 -0
  108. package/app/scripts/utils/color-domain-to-rgba-array.js +13 -3
  109. package/app/scripts/utils/copy-text-to-clipboard.js +36 -0
  110. package/app/scripts/utils/decompress.js +33 -0
  111. package/app/scripts/utils/default-tracks.js +46 -0
  112. package/app/scripts/utils/dict-items.js +1 -0
  113. package/app/scripts/utils/dict-keys.js +1 -0
  114. package/app/scripts/utils/dict-values.js +1 -0
  115. package/app/scripts/utils/expand-combined-tracks.js +11 -7
  116. package/app/scripts/utils/fill-in-min-widths.js +47 -21
  117. package/app/scripts/utils/flatten.js +0 -1
  118. package/app/scripts/utils/get-aggregation-function.js +1 -1
  119. package/app/scripts/utils/get-default-track-for-datatype.js +37 -10
  120. package/app/scripts/utils/get-default-tracks-for-datatype.ts +46 -0
  121. package/app/scripts/utils/get-higlass-components.js +27 -3
  122. package/app/scripts/utils/get-track-position-by-uid.js +8 -1
  123. package/app/scripts/utils/get-xylofon.js +12 -9
  124. package/app/scripts/utils/has-parent.js +5 -5
  125. package/app/scripts/utils/hex-string-to-int.js +1 -1
  126. package/app/scripts/utils/index.js +1 -0
  127. package/app/scripts/utils/interval-tree.js +222 -177
  128. package/app/scripts/utils/load-chrom-infos.js +4 -1
  129. package/app/scripts/utils/pixi-text-to-svg.js +5 -9
  130. package/app/scripts/utils/positioned-tracks-to-all-tracks.js +55 -0
  131. package/app/scripts/utils/range-query-2d.js +3 -3
  132. package/app/scripts/utils/reduce.js +12 -5
  133. package/app/scripts/utils/segments-to-rows.js +14 -11
  134. package/app/scripts/utils/svg-line.js +7 -8
  135. package/app/scripts/utils/type-guards.js +16 -7
  136. package/app/scripts/utils/visit-positioned-tracks.js +9 -4
  137. package/app/styles/AddTrackPositionMenu.module.scss +37 -0
  138. package/app/styles/HiGlass.module.scss +3 -1
  139. package/app/styles/d3-context-menu.css +0 -1
  140. package/app/styles/prism.css +1 -0
  141. package/dist/app/schema.json +525 -0
  142. package/dist/app/scripts/AddTrackDialog.d.ts +64 -0
  143. package/dist/app/scripts/AddTrackPositionMenu.d.ts +5 -0
  144. package/dist/app/scripts/Annotations1dTrack.d.ts +15 -0
  145. package/dist/app/scripts/Annotations2dTrack.d.ts +95 -0
  146. package/dist/app/scripts/ArrowheadDomainsTrack.d.ts +36 -0
  147. package/dist/app/scripts/Autocomplete.d.ts +102 -0
  148. package/dist/app/scripts/AxisPixi.d.ts +25 -0
  149. package/dist/app/scripts/BarTrack.d.ts +28 -0
  150. package/dist/app/scripts/BedLikeTrack.d.ts +84 -0
  151. package/dist/app/scripts/Button.d.ts +3 -0
  152. package/dist/app/scripts/CNVIntervalTrack.d.ts +12 -0
  153. package/dist/app/scripts/CenterTiledPlot.d.ts +3 -0
  154. package/dist/app/scripts/CenterTrack.d.ts +92 -0
  155. package/dist/app/scripts/Chromosome2DAnnotations.d.ts +10 -0
  156. package/dist/app/scripts/Chromosome2DLabels.d.ts +13 -0
  157. package/dist/app/scripts/ChromosomeGrid.d.ts +24 -0
  158. package/dist/app/scripts/ChromosomeInfo.d.ts +14 -0
  159. package/dist/app/scripts/CloseTrackMenu.d.ts +10 -0
  160. package/dist/app/scripts/CombinedTrack.d.ts +32 -0
  161. package/dist/app/scripts/ConfigTrackMenu.d.ts +10 -0
  162. package/dist/app/scripts/ConfigViewMenu.d.ts +34 -0
  163. package/dist/app/scripts/ConfigureSeriesMenu.d.ts +3 -0
  164. package/dist/app/scripts/ContextMenuContainer.d.ts +36 -0
  165. package/dist/app/scripts/ContextMenuItem.d.ts +34 -0
  166. package/dist/app/scripts/Cross.d.ts +3 -0
  167. package/dist/app/scripts/CrossRule.d.ts +24 -0
  168. package/dist/app/scripts/CustomTrackDialog.d.ts +17 -0
  169. package/dist/app/scripts/Dialog.d.ts +5 -0
  170. package/dist/app/scripts/DivergentBarTrack.d.ts +4 -0
  171. package/dist/app/scripts/DragListeningDiv.d.ts +32 -0
  172. package/dist/app/scripts/DraggableDiv.d.ts +63 -0
  173. package/dist/app/scripts/ExportLinkDialog.d.ts +21 -0
  174. package/dist/app/scripts/FilledLine.d.ts +5 -0
  175. package/dist/app/scripts/FixedTrack.d.ts +5 -0
  176. package/dist/app/scripts/GalleryTracks.d.ts +20 -0
  177. package/dist/app/scripts/GenomePositionSearchBox.d.ts +95 -0
  178. package/dist/app/scripts/HeatmapOptions.d.ts +30 -0
  179. package/dist/app/scripts/HeatmapTiledPixiTrack.d.ts +184 -0
  180. package/dist/app/scripts/HiGlassComponent.d.ts +762 -0
  181. package/dist/app/scripts/HiGlassComponentContext.d.ts +3 -0
  182. package/dist/app/scripts/HiGlassTrackComponent.d.ts +37 -0
  183. package/dist/app/scripts/Horizontal1dHeatmapTrack.d.ts +9 -0
  184. package/dist/app/scripts/Horizontal2DDomainsTrack.d.ts +21 -0
  185. package/dist/app/scripts/HorizontalChromosomeLabels.d.ts +47 -0
  186. package/dist/app/scripts/HorizontalGeneAnnotationsTrack.d.ts +25 -0
  187. package/dist/app/scripts/HorizontalHeatmapTrack.d.ts +12 -0
  188. package/dist/app/scripts/HorizontalItem.d.ts +3 -0
  189. package/dist/app/scripts/HorizontalLine1DPixiTrack.d.ts +23 -0
  190. package/dist/app/scripts/HorizontalMultivecTrack.d.ts +50 -0
  191. package/dist/app/scripts/HorizontalPoint1DPixiTrack.d.ts +5 -0
  192. package/dist/app/scripts/HorizontalRule.d.ts +22 -0
  193. package/dist/app/scripts/HorizontalTiled1DPixiTrack.d.ts +26 -0
  194. package/dist/app/scripts/HorizontalTiledPlot.d.ts +49 -0
  195. package/dist/app/scripts/HorizontalTrack.d.ts +6 -0
  196. package/dist/app/scripts/Id2DTiledPixiTrack.d.ts +10 -0
  197. package/dist/app/scripts/IdHorizontal1DTiledPixiTrack.d.ts +6 -0
  198. package/dist/app/scripts/IdVertical1DTiledPixiTrack.d.ts +7 -0
  199. package/dist/app/scripts/LeftAxisTrack.d.ts +9 -0
  200. package/dist/app/scripts/LeftTrackModifier.d.ts +29 -0
  201. package/dist/app/scripts/ListWrapper.d.ts +64 -0
  202. package/dist/app/scripts/MapboxTilesTrack.d.ts +9 -0
  203. package/dist/app/scripts/Modal.d.ts +5 -0
  204. package/dist/app/scripts/MoveableTrack.d.ts +18 -0
  205. package/dist/app/scripts/NestedContextMenu.d.ts +7 -0
  206. package/dist/app/scripts/OSMTileIdsTrack.d.ts +5 -0
  207. package/dist/app/scripts/OSMTilesTrack.d.ts +129 -0
  208. package/dist/app/scripts/OverlayTrack.d.ts +13 -0
  209. package/dist/app/scripts/PixiTrack.d.ts +174 -0
  210. package/dist/app/scripts/PlotTypeChooser.d.ts +25 -0
  211. package/dist/app/scripts/PopupMenu.d.ts +28 -0
  212. package/dist/app/scripts/RasterTilesTrack.d.ts +9 -0
  213. package/dist/app/scripts/RuleMixin.d.ts +2 -0
  214. package/dist/app/scripts/SVGTrack.d.ts +15 -0
  215. package/dist/app/scripts/SearchField.d.ts +13 -0
  216. package/dist/app/scripts/SeriesListItems.d.ts +2 -0
  217. package/dist/app/scripts/SeriesListMenu.d.ts +51 -0
  218. package/dist/app/scripts/SeriesListSubmenuMixin.d.ts +2 -0
  219. package/dist/app/scripts/SketchInlinePicker.d.ts +25 -0
  220. package/dist/app/scripts/SortableList.d.ts +22 -0
  221. package/dist/app/scripts/SquareMarkersTrack.d.ts +22 -0
  222. package/dist/app/scripts/Tiled1DPixiTrack.d.ts +60 -0
  223. package/dist/app/scripts/TiledPixiTrack.d.ts +369 -0
  224. package/dist/app/scripts/TiledPlot.d.ts +313 -0
  225. package/dist/app/scripts/TilesetFinder.d.ts +65 -0
  226. package/dist/app/scripts/TopAxisTrack.d.ts +9 -0
  227. package/dist/app/scripts/Track.d.ts +196 -0
  228. package/dist/app/scripts/TrackArea.d.ts +26 -0
  229. package/dist/app/scripts/TrackControl.d.ts +5 -0
  230. package/dist/app/scripts/TrackRenderer.d.ts +724 -0
  231. package/dist/app/scripts/UnknownPixiTrack.d.ts +7 -0
  232. package/dist/app/scripts/ValueIntervalTrack.d.ts +6 -0
  233. package/dist/app/scripts/VerticalItem.d.ts +3 -0
  234. package/dist/app/scripts/VerticalRule.d.ts +21 -0
  235. package/dist/app/scripts/VerticalTiled1DPixiTrack.d.ts +6 -0
  236. package/dist/app/scripts/VerticalTiledPlot.d.ts +50 -0
  237. package/dist/app/scripts/VerticalTrack.d.ts +6 -0
  238. package/dist/app/scripts/ViewConfigEditor.d.ts +53 -0
  239. package/dist/app/scripts/ViewContextMenu.d.ts +17 -0
  240. package/dist/app/scripts/ViewHeader.d.ts +75 -0
  241. package/dist/app/scripts/ViewportTracker2D.d.ts +17 -0
  242. package/dist/app/scripts/ViewportTracker2DPixi.d.ts +11 -0
  243. package/dist/app/scripts/ViewportTrackerHorizontal.d.ts +17 -0
  244. package/dist/app/scripts/ViewportTrackerVertical.d.ts +17 -0
  245. package/dist/app/scripts/api.d.ts +640 -0
  246. package/dist/app/scripts/configs/available-track-types.d.ts +2 -0
  247. package/dist/app/scripts/configs/colormaps.d.ts +2 -0
  248. package/dist/app/scripts/configs/datatype-to-track-type.d.ts +4 -0
  249. package/dist/app/scripts/configs/default-tracks-for-datatype.d.ts +38 -0
  250. package/dist/app/scripts/configs/dense-data-extrema-config.d.ts +2 -0
  251. package/dist/app/scripts/configs/globals.d.ts +5 -0
  252. package/dist/app/scripts/configs/index.d.ts +16 -0
  253. package/dist/app/scripts/configs/positions-by-datatype.d.ts +2 -0
  254. package/dist/app/scripts/configs/primitives.d.ts +20 -0
  255. package/dist/app/scripts/configs/themes.d.ts +3 -0
  256. package/dist/app/scripts/configs/tracks-info-by-type.d.ts +4 -0
  257. package/dist/app/scripts/configs/tracks-info.d.ts +24 -0
  258. package/dist/app/scripts/d3-context-menu.d.ts +2 -0
  259. package/dist/app/scripts/data-fetchers/DataFetcher.d.ts +151 -0
  260. package/dist/app/scripts/data-fetchers/genbank-fetcher.d.ts +86 -0
  261. package/dist/app/scripts/data-fetchers/index.d.ts +3 -0
  262. package/dist/app/scripts/data-fetchers/local-tile-fetcher.d.ts +47 -0
  263. package/dist/app/scripts/gosling-exports.d.ts +17 -0
  264. package/dist/app/scripts/hglib.d.ts +24 -0
  265. package/dist/app/scripts/hocs/with-modal.d.ts +19 -0
  266. package/dist/app/scripts/hocs/with-pub-sub.d.ts +22 -0
  267. package/dist/app/scripts/hocs/with-theme.d.ts +13 -0
  268. package/dist/app/scripts/icons.d.ts +161 -0
  269. package/dist/app/scripts/mixwith.d.ts +27 -0
  270. package/dist/app/scripts/options-info.d.ts +1355 -0
  271. package/dist/app/scripts/plugins/available-for-plugins.d.ts +2338 -0
  272. package/dist/app/scripts/plugins/get-data-fetcher.d.ts +2 -0
  273. package/dist/app/scripts/plugins/index.d.ts +2 -0
  274. package/dist/app/scripts/services/chrom-info.d.ts +10 -0
  275. package/dist/app/scripts/services/dom-event.d.ts +7 -0
  276. package/dist/app/scripts/services/element-resize-listener.d.ts +5 -0
  277. package/dist/app/scripts/services/index.d.ts +5 -0
  278. package/dist/app/scripts/services/tile-proxy.d.ts +180 -0
  279. package/dist/app/scripts/services/worker.d.ts +157 -0
  280. package/dist/app/scripts/symbol.d.ts +13 -0
  281. package/dist/app/scripts/test-helpers/index.d.ts +1 -0
  282. package/dist/app/scripts/test-helpers/test-helpers.d.ts +33 -0
  283. package/dist/app/scripts/track-utils.d.ts +73 -0
  284. package/dist/app/scripts/types.d.ts +199 -0
  285. package/dist/app/scripts/utils/DenseDataExtrema1D.d.ts +88 -0
  286. package/dist/app/scripts/utils/DenseDataExtrema2D.d.ts +97 -0
  287. package/dist/app/scripts/utils/LruCache.d.ts +44 -0
  288. package/dist/app/scripts/utils/abs-to-chr.d.ts +14 -0
  289. package/dist/app/scripts/utils/accessor-transposition.d.ts +14 -0
  290. package/dist/app/scripts/utils/add-arrays.d.ts +18 -0
  291. package/dist/app/scripts/utils/add-class.d.ts +8 -0
  292. package/dist/app/scripts/utils/add-event-listener-once.d.ts +11 -0
  293. package/dist/app/scripts/utils/assert.d.ts +17 -0
  294. package/dist/app/scripts/utils/background-task-scheduler.d.ts +47 -0
  295. package/dist/app/scripts/utils/base64-to-canvas.d.ts +9 -0
  296. package/dist/app/scripts/utils/chr-to-abs.d.ts +10 -0
  297. package/dist/app/scripts/utils/chrom-info-bisector.d.ts +4 -0
  298. package/dist/app/scripts/utils/clone-event.d.ts +12 -0
  299. package/dist/app/scripts/utils/color-domain-to-rgba-array.d.ts +13 -0
  300. package/dist/app/scripts/utils/color-to-hex.d.ts +9 -0
  301. package/dist/app/scripts/utils/color-to-rgba.d.ts +9 -0
  302. package/dist/app/scripts/utils/copy-text-to-clipboard.d.ts +2 -0
  303. package/dist/app/scripts/utils/data-to-genomic-loci.d.ts +11 -0
  304. package/dist/app/scripts/utils/debounce.d.ts +5 -0
  305. package/dist/app/scripts/utils/dec-to-hex-str.d.ts +8 -0
  306. package/dist/app/scripts/utils/decompress.d.ts +27 -0
  307. package/dist/app/scripts/utils/default-tracks.d.ts +3 -0
  308. package/dist/app/scripts/utils/dict-from-tuples.d.ts +11 -0
  309. package/dist/app/scripts/utils/dict-items.d.ts +18 -0
  310. package/dist/app/scripts/utils/dict-keys.d.ts +10 -0
  311. package/dist/app/scripts/utils/dict-values.d.ts +8 -0
  312. package/dist/app/scripts/utils/download.d.ts +7 -0
  313. package/dist/app/scripts/utils/expand-combined-tracks.d.ts +11 -0
  314. package/dist/app/scripts/utils/fake-pub-sub.d.ts +11 -0
  315. package/dist/app/scripts/utils/fill-in-min-widths.d.ts +44 -0
  316. package/dist/app/scripts/utils/flatten.d.ts +9 -0
  317. package/dist/app/scripts/utils/for-each.d.ts +9 -0
  318. package/dist/app/scripts/utils/forward-event.d.ts +7 -0
  319. package/dist/app/scripts/utils/genome-loci-to-pixels.d.ts +9 -0
  320. package/dist/app/scripts/utils/genomic-range-to-chromosome-chunks.d.ts +21 -0
  321. package/dist/app/scripts/utils/get-aggregation-function.d.ts +10 -0
  322. package/dist/app/scripts/utils/get-default-track-for-datatype.d.ts +21 -0
  323. package/dist/app/scripts/utils/get-default-tracks-for-datatype.d.ts +3 -0
  324. package/dist/app/scripts/utils/get-element-dim.d.ts +7 -0
  325. package/dist/app/scripts/utils/get-higlass-components.d.ts +7 -0
  326. package/dist/app/scripts/utils/get-track-by-uid.d.ts +7 -0
  327. package/dist/app/scripts/utils/get-track-conf-from-hgc.d.ts +10 -0
  328. package/dist/app/scripts/utils/get-track-obj-by-id.d.ts +2 -0
  329. package/dist/app/scripts/utils/get-track-position-by-uid.d.ts +13 -0
  330. package/dist/app/scripts/utils/get-xylofon.d.ts +2 -0
  331. package/dist/app/scripts/utils/gradient.d.ts +14 -0
  332. package/dist/app/scripts/utils/has-class.d.ts +8 -0
  333. package/dist/app/scripts/utils/has-parent.d.ts +9 -0
  334. package/dist/app/scripts/utils/hex-string-to-int.d.ts +14 -0
  335. package/dist/app/scripts/utils/index.d.ts +89 -0
  336. package/dist/app/scripts/utils/interval-tree.d.ts +109 -0
  337. package/dist/app/scripts/utils/into-the-void.d.ts +6 -0
  338. package/dist/app/scripts/utils/is-track-or-child-track.d.ts +7 -0
  339. package/dist/app/scripts/utils/is-track-range-selectable.d.ts +2 -0
  340. package/dist/app/scripts/utils/is-within.d.ts +12 -0
  341. package/dist/app/scripts/utils/lat-to-y.d.ts +9 -0
  342. package/dist/app/scripts/utils/lng-to-x.d.ts +8 -0
  343. package/dist/app/scripts/utils/load-chrom-infos.d.ts +8 -0
  344. package/dist/app/scripts/utils/map.d.ts +13 -0
  345. package/dist/app/scripts/utils/max-non-zero.d.ts +6 -0
  346. package/dist/app/scripts/utils/max.d.ts +10 -0
  347. package/dist/app/scripts/utils/min-non-zero.d.ts +6 -0
  348. package/dist/app/scripts/utils/min.d.ts +10 -0
  349. package/dist/app/scripts/utils/mod.d.ts +9 -0
  350. package/dist/app/scripts/utils/ndarray-assign.d.ts +2 -0
  351. package/dist/app/scripts/utils/ndarray-flatten.d.ts +2 -0
  352. package/dist/app/scripts/utils/ndarray-to-list.d.ts +2 -0
  353. package/dist/app/scripts/utils/numericify-version.d.ts +6 -0
  354. package/dist/app/scripts/utils/obj-vals.d.ts +8 -0
  355. package/dist/app/scripts/utils/or.d.ts +8 -0
  356. package/dist/app/scripts/utils/parse-chromsizes-rows.d.ts +34 -0
  357. package/dist/app/scripts/utils/pixi-text-to-svg.d.ts +2 -0
  358. package/dist/app/scripts/utils/positioned-tracks-to-all-tracks.d.ts +26 -0
  359. package/dist/app/scripts/utils/q.d.ts +18 -0
  360. package/dist/app/scripts/utils/rad-to-deg.d.ts +7 -0
  361. package/dist/app/scripts/utils/range-query-2d.d.ts +17 -0
  362. package/dist/app/scripts/utils/reduce.d.ts +14 -0
  363. package/dist/app/scripts/utils/rel-to-abs-chrom-pos.d.ts +10 -0
  364. package/dist/app/scripts/utils/remove-class.d.ts +7 -0
  365. package/dist/app/scripts/utils/reset-d3-brush-style.d.ts +10 -0
  366. package/dist/app/scripts/utils/rgb-to-hex.d.ts +8 -0
  367. package/dist/app/scripts/utils/scales-center-and-k.d.ts +12 -0
  368. package/dist/app/scripts/utils/scales-to-genome-loci.d.ts +3 -0
  369. package/dist/app/scripts/utils/segments-to-rows.d.ts +15 -0
  370. package/dist/app/scripts/utils/selected-items-to-cum-weights.d.ts +12 -0
  371. package/dist/app/scripts/utils/selected-items-to-size.d.ts +13 -0
  372. package/dist/app/scripts/utils/show-mouse-position.d.ts +54 -0
  373. package/dist/app/scripts/utils/some.d.ts +10 -0
  374. package/dist/app/scripts/utils/sum.d.ts +8 -0
  375. package/dist/app/scripts/utils/svg-line.d.ts +2 -0
  376. package/dist/app/scripts/utils/throttle-and-debounce.d.ts +33 -0
  377. package/dist/app/scripts/utils/tile-to-canvas.d.ts +9 -0
  378. package/dist/app/scripts/utils/timeout.d.ts +3 -0
  379. package/dist/app/scripts/utils/to-void.d.ts +3 -0
  380. package/dist/app/scripts/utils/total-track-pixel-height.d.ts +27 -0
  381. package/dist/app/scripts/utils/trim-trailing-slash.d.ts +7 -0
  382. package/dist/app/scripts/utils/type-guards.d.ts +36 -0
  383. package/dist/app/scripts/utils/value-to-color.d.ts +12 -0
  384. package/dist/app/scripts/utils/visit-positioned-tracks.d.ts +18 -0
  385. package/dist/app/scripts/utils/visit-tracks.d.ts +9 -0
  386. package/dist/esm.html +1 -3
  387. package/dist/hglib.js +86315 -100592
  388. package/dist/hglib.min.js +123 -131
  389. package/dist/higlass.mjs +88861 -103138
  390. package/dist/index.html +1 -3
  391. package/dist/package.json +134 -0
  392. package/package.json +25 -27
@@ -0,0 +1,8 @@
1
+ export default decToHexStr;
2
+ /**
3
+ * Converts a decimal number to a hex string.
4
+ *
5
+ * @param {number} dec - Decimal number
6
+ * @return {string} Hex string
7
+ */
8
+ declare function decToHexStr(dec: number): string;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Decompress a compressed data source.
3
+ *
4
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream DecompressionStream API}
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * const compressed = new Uint8Array([
9
+ * 0x1f, 0x8b, 0x08, 0x00, 0x1e, 0xc0, 0x7e, 0x67, 0x00, 0x03, 0xf3, 0x48,
10
+ * 0xcd, 0xc9, 0xc9, 0xd7, 0x51, 0x28, 0xcf, 0x2f, 0xca, 0x49, 0x51, 0x04,
11
+ * 0x00, 0xe6, 0xc6, 0xe6, 0xeb, 0x0d, 0x00, 0x00, 0x00
12
+ * ]);
13
+ * console.log(await decompress(compressed, { format: "gzip" }).text()); // "Hello, world!"
14
+ * ```
15
+ *
16
+ * @param {BodyInit | Response} data - The compressed data.
17
+ * @param {Object} options
18
+ * @param {CompressionFormat} options.format
19
+ * @param {AbortSignal=} options.signal
20
+ * @returns {Response} A new response for decompressed data.
21
+ *
22
+ * @see {@link https://github.com/manzt/manzt/blob/1380bb/utils/decompress.js source}
23
+ */
24
+ export default function decompress(data: BodyInit | Response, options: {
25
+ format: CompressionFormat;
26
+ signal?: AbortSignal | undefined;
27
+ }): Response;
@@ -0,0 +1,3 @@
1
+ /** Get the default tracks for a datatype. Uses the known track definitions as
2
+ * well as any extra definitions that may be passed in. */
3
+ export default function getDefaultTracksForDatatype(datatype: any, otherDefaultTracks: any): any;
@@ -0,0 +1,11 @@
1
+ export default dictFromTuples;
2
+ /**
3
+ * Create a dictionary from a list of [key, value] pairs.
4
+ *
5
+ * TODO(Trevor): Replace with Object.fromEntries?
6
+ *
7
+ * @template {ReadonlyArray<readonly [PropertyKey, unknown]>} T
8
+ * @param {T} tuples: A list of [key, value] pairs
9
+ * @return {{ [Item in T[number] as Item[0]]: Item[1] }} A dictionary
10
+ */
11
+ declare function dictFromTuples<T extends ReadonlyArray<readonly [PropertyKey, unknown]>>(tuples: T): { [Item in T[number] as Item[0]]: Item[1]; };
@@ -0,0 +1,18 @@
1
+ export default dictItems;
2
+ export type DictItems<T> = Array<{ [Key in keyof T]: [Key, T[Key]]; }[keyof T]>;
3
+ /**
4
+ * @template T
5
+ * @typedef {Array<{ [Key in keyof T]: [Key, T[Key]] }[keyof T]>} DictItems
6
+ */
7
+ /**
8
+ * Return an array of (key,value) pairs that are present in this
9
+ * dictionary
10
+ *
11
+ * TODO(Trevor): Replace with `Object.entries`?
12
+ *
13
+ * @template {object} T
14
+ * @param {T} dictionary
15
+ *
16
+ * @returns {DictItems<T>}
17
+ */
18
+ declare function dictItems<T extends object>(dictionary: T): DictItems<T>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Return an array of keys that are present in this dictionary
3
+ *
4
+ * TODO(Trevor): Replace with `Object.keys`?
5
+ *
6
+ * @template T
7
+ * @param {T} dictionary
8
+ * @returns {Array<keyof T>}
9
+ */
10
+ export default function dictKeys<T>(dictionary: T): Array<keyof T>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Return an array of values that are present in this dictionary
3
+ *
4
+ * @template {object} T
5
+ * @param {T} dictionary
6
+ * @returns {Array<T[keyof T]>}
7
+ */
8
+ export default function dictValues<T extends object>(dictionary: T): Array<T[keyof T]>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Download a file to the user's computer.
3
+ * @param {string} filename - Name of the file to download
4
+ * @param {string | Blob} stringOrBlob - Contents of the file to download
5
+ */
6
+ export function download(filename: string, stringOrBlob: string | Blob): void;
7
+ export default download;
@@ -0,0 +1,11 @@
1
+ export default expandCombinedTracks;
2
+ /** @import * as t from '../types' */
3
+ /**
4
+ * Go through a list of tracks and expand combined
5
+ * tracks.
6
+ *
7
+ * @param {Array<t.TrackConfig>} trackList - A list of tracks some of which might be combined
8
+ * @returns {Array<t.UnknownTrackConfig>} A list of tracks without combined
9
+ */
10
+ declare function expandCombinedTracks(trackList: Array<t.TrackConfig>): Array<t.UnknownTrackConfig>;
11
+ import type * as t from '../types';
@@ -0,0 +1,11 @@
1
+ export default fakePubSub;
2
+ declare namespace fakePubSub {
3
+ let __fake__: boolean;
4
+ function publish(): void;
5
+ function subscribe(): {
6
+ event: string;
7
+ handler: () => void;
8
+ };
9
+ function unsubscribe(): void;
10
+ function clear(): void;
11
+ }
@@ -0,0 +1,44 @@
1
+ export default fillInMinWidths;
2
+ export type CompleteTracks = {
3
+ center: Array<t.TrackConfig>;
4
+ left: Array<t.TrackConfig>;
5
+ right: Array<t.TrackConfig>;
6
+ top: Array<t.TrackConfig>;
7
+ bottom: Array<t.TrackConfig>;
8
+ whole: Array<t.TrackConfig>;
9
+ gallery: Array<t.TrackConfig>;
10
+ };
11
+ export type WithMinWidth<K extends t.TrackPosition, T extends Array<t.TrackConfig>> = Array<T[number] & {
12
+ width: number;
13
+ }>;
14
+ /** @import * as t from '../types' */
15
+ /**
16
+ * @typedef CompleteTracks
17
+ * @property {Array<t.TrackConfig>} center
18
+ * @property {Array<t.TrackConfig>} left
19
+ * @property {Array<t.TrackConfig>} right
20
+ * @property {Array<t.TrackConfig>} top
21
+ * @property {Array<t.TrackConfig>} bottom
22
+ * @property {Array<t.TrackConfig>} whole
23
+ * @property {Array<t.TrackConfig>} gallery
24
+ */
25
+ /**
26
+ * @template {t.TrackPosition} K
27
+ * @template {Array<t.TrackConfig>} T
28
+ * @typedef {Array<T[number] & { width: number }>} WithMinWidth
29
+ */
30
+ /**
31
+ * If tracks don't have specified dimensions, add in the known minimums
32
+ *
33
+ * WARNING: Mutates `tracks` argument
34
+ *
35
+ * @template {Partial<CompleteTracks>} T
36
+ * @param {T} tracks
37
+ * @returns {{
38
+ * [K in t.TrackPosition]: K extends keyof T ? T[K] extends undefined ? Array<t.TrackConfig> : T[K] : Array<t.TrackConfig>
39
+ * }}
40
+ *
41
+ * Operates on the tracks stored for this TiledPlot.
42
+ */
43
+ declare function fillInMinWidths<T extends Partial<CompleteTracks>>(tracks: T): { [K in t.TrackPosition]: K extends keyof T ? T[K] extends undefined ? Array<t.TrackConfig> : T[K] : Array<t.TrackConfig>; };
44
+ import type * as t from '../types';
@@ -0,0 +1,9 @@
1
+ export default flatten;
2
+ /**
3
+ * Function for flattening a nested array. It returns a curried reducer.
4
+ *
5
+ * @template T
6
+ * @param {Array<Array<T>>} Nested array
7
+ * @return {Array<T>} Flat array
8
+ */
9
+ declare const flatten: (x: any[]) => never[];
@@ -0,0 +1,9 @@
1
+ export default forEach;
2
+ /**
3
+ * Functional version of `Array.forEach`. More flexible and applicable to other array-like data types.
4
+ *
5
+ * @template T
6
+ * @param {<T>(item: T) => void} f - Modifier function applied on every item of the array.
7
+ * @return {(arr: ArrayLike<T>) => void} Modified array-like variable.
8
+ */
9
+ declare function forEach<T>(f: <T_1>(item: T_1) => void): (arr: ArrayLike<T>) => void;
@@ -0,0 +1,7 @@
1
+ export default forwardEvent;
2
+ /**
3
+ * Forward an event by cloning and dispatching it.
4
+ * @param {Event} event - Event to be forwarded.
5
+ * @param {HTMLElement} target - Target HTML element for the event.
6
+ */
7
+ declare function forwardEvent(event: Event, target: HTMLElement): void;
@@ -0,0 +1,9 @@
1
+ export default genomeLociToPixels;
2
+ /**
3
+ * Convert a genome locus to an absolute genome position.
4
+ * @template {string} Name
5
+ * @param {[Name, number, Name, number]} genomeLoci - Genome locus
6
+ * @param {import('../types').ChromInfo<Name>} chromInfo - Chromosome info object
7
+ * @return {[start: number, end: number]} The absolute genome position.
8
+ */
9
+ declare function genomeLociToPixels<Name extends string>(genomeLoci: [Name, number, Name, number], chromInfo: import("../types").ChromInfo<Name>): [start: number, end: number];
@@ -0,0 +1,21 @@
1
+ export default genomicRangeToChromosomeChunks;
2
+ /**
3
+ * Using the [genomicStart, genomicEnd] range, get an array of "chromosome chunks",
4
+ * where each chunk range starts and ends with the same chromosome.
5
+ * Start a new chromosome chunk at each chromosome boundary.
6
+ *
7
+ * @template {string} Name
8
+ * @param {Array<[charName: Name, chrLen: number]>} chromSizes - Array of [chrName, chrLen] tuples.
9
+ * @param {{ chr: Name, pos: number }} genomicStart - A genomic position object returned from abs2genomic { chr, pos }.
10
+ * @param {{ chr: Name, pos: number }} genomicEnd - A genomic position object returned from abs2genomic { chr, pos }.
11
+ * @param {number} binSize - The resolution / bin size.
12
+ * @param {number} tileSize - The tile size (probably 256).
13
+ * @returns {Array<[chrName: Name, zStart: number, zEnd: number]>} Returns array of [chrName, zStart, zEnd] tuples.
14
+ */
15
+ declare function genomicRangeToChromosomeChunks<Name extends string>(chromSizes: Array<[charName: Name, chrLen: number]>, genomicStart: {
16
+ chr: Name;
17
+ pos: number;
18
+ }, genomicEnd: {
19
+ chr: Name;
20
+ pos: number;
21
+ }, binSize: number, tileSize: number): Array<[chrName: Name, zStart: number, zEnd: number]>;
@@ -0,0 +1,10 @@
1
+ export default getAggregationFunction;
2
+ export type Aggregation = (values: number[]) => number | undefined;
3
+ /** @typedef {(values: number[]) => number | undefined} Aggregation */
4
+ /**
5
+ * Get an aggregation function from a function name.
6
+ * @param {'mean' | 'sum' | 'variance' | 'deviation'} name - The type of aggregation.
7
+ * If an unknown string is passed, the mean function will be used (and a warning will be logged).
8
+ * @returns {Aggregation} The function of interest as determined by the string,
9
+ */
10
+ declare function getAggregationFunction(name: "mean" | "sum" | "variance" | "deviation"): Aggregation;
@@ -0,0 +1,21 @@
1
+ export default getDefaultTrackForDatatype;
2
+ export type DataTypeMapping = typeof DEFAULT_TRACKS_FOR_DATATYPE;
3
+ export type DataType = keyof DataTypeMapping;
4
+ export type TrackPosition = "top" | "bottom" | "left" | "right" | "center";
5
+ export type ExtractDataType<D extends string, P extends string> = D extends DataType ? P extends keyof DataTypeMapping[D] ? DataTypeMapping[D][P] : undefined : undefined;
6
+ /**
7
+ * Gets the default track as defined in utils/default-tracks-for-datatype.js
8
+ *
9
+ * @template {DataType | string & {}} D
10
+ * @template {TrackPosition} P
11
+ * @template {ReadonlyArray<{ type: string }>} ATracks
12
+ *
13
+ * @param {D} datatype - The datatype to get the default track for
14
+ * @param {P} position - top, bottom, left, right, center
15
+ * @param {ATracks} availableTracks - List of tracks to choose from, typically obtained from AVAILABLE_TRACK_TYPES(...)
16
+ * @return {ATracks[number] | undefined} An element of availableTracks or undefined
17
+ */
18
+ declare function getDefaultTrackForDatatype<D extends DataType | (string & {}), P extends TrackPosition, ATracks extends ReadonlyArray<{
19
+ type: string;
20
+ }>>(datatype: D, position: P, availableTracks: ATracks): ATracks[number] | undefined;
21
+ import { DEFAULT_TRACKS_FOR_DATATYPE } from '../configs';
@@ -0,0 +1,3 @@
1
+ /** Get the default tracks for a datatype. Uses the known track definitions as
2
+ * well as any extra definitions that may be passed in. */
3
+ export default function getDefaultTracksForDatatype(datatype: any, otherDefaultTracks: any): any;
@@ -0,0 +1,7 @@
1
+ export default getElementDim;
2
+ /**
3
+ * Get the dimensions of an element
4
+ * @param {HTMLElement} element - DOM element to get dimensions of.
5
+ * @return {[width: number, height: number]} The width and height of the element.
6
+ */
7
+ declare function getElementDim(element: HTMLElement): [width: number, height: number];
@@ -0,0 +1,7 @@
1
+ export function getTrackObjectFromHGC(hgc: HiGlassComponent, viewUid: string, trackUid: string | undefined): t.TrackObject | undefined;
2
+ export function getTrackRenderer(hgc: HiGlassComponent, viewUid: string): TrackRenderer | null;
3
+ export function getTiledPlot(hgc: HiGlassComponent, viewUid: string): TiledPlot;
4
+ import type HiGlassComponent from '../HiGlassComponent';
5
+ import type * as t from '../types';
6
+ import type { TrackRenderer } from '../TrackRenderer';
7
+ import type { TiledPlot } from '../TiledPlot';
@@ -0,0 +1,7 @@
1
+ export default getTrackByUid;
2
+ /**
3
+ * Return the track object for the track corresponding to this uid
4
+ *
5
+ * Null or undefined if none.
6
+ */
7
+ declare function getTrackByUid(tracks: any, uid: any): null;
@@ -0,0 +1,10 @@
1
+ export default getTrackConfFromHGC;
2
+ /**
3
+ * Get a track's config (not the track object) from a higlass component.
4
+ *
5
+ * @param {HiGlassComponent} hgc HiGlassComponent object
6
+ * @param {string} viewUid The uid of the view
7
+ * @param {string} trackUid The uid of the track
8
+ * @return {object} Track conf if found else null
9
+ */
10
+ declare function getTrackConfFromHGC(hgc: HiGlassComponent, viewUid: string, trackUid: string): object;
@@ -0,0 +1,2 @@
1
+ export default getTrackObjById;
2
+ declare function getTrackObjById(tiledPlots: any, viewId: any, trackId: any): any;
@@ -0,0 +1,13 @@
1
+ export default getTrackPositionByUid;
2
+ /** @import { TrackPosition } from '../types' */
3
+ /** @import { PositionedTracks } from './visit-positioned-tracks' */
4
+ /**
5
+ * Get a track's orientation by its UID.
6
+ *
7
+ * @param {PositionedTracks} positionedTracks
8
+ * @param {string} uid
9
+ * @returns {TrackPosition | null}
10
+ */
11
+ declare function getTrackPositionByUid(positionedTracks: PositionedTracks, uid: string): TrackPosition | null;
12
+ import type { PositionedTracks } from './visit-positioned-tracks';
13
+ import type { TrackPosition } from '../types';
@@ -0,0 +1,2 @@
1
+ export default getXylofon;
2
+ declare function getXylofon(): readonly [Window & typeof globalThis, string];
@@ -0,0 +1,14 @@
1
+ export default gradient;
2
+ /**
3
+ * @param {{ from: number, color: string }[]} steps
4
+ * @param {number} width
5
+ * @param {number} height
6
+ * @param {number} fromX
7
+ * @param {number} fromY
8
+ * @param {number} toX
9
+ * @param {number} toY
10
+ */
11
+ declare function gradient(steps: {
12
+ from: number;
13
+ color: string;
14
+ }[], width?: number, height?: number, fromX?: number, fromY?: number, toX?: number, toY?: number): HTMLCanvasElement;
@@ -0,0 +1,8 @@
1
+ export default hasClass;
2
+ /**
3
+ * Check if an HTML or SVG element has a certain class
4
+ * @param {Element} el - HTML or SVG element to be checked.
5
+ * @param {string} className - Class name to be checked for.
6
+ * @return {boolean} If `true` `el` has the class name.
7
+ */
8
+ declare function hasClass(el: Element, className: string): boolean;
@@ -0,0 +1,9 @@
1
+ export default hasParent;
2
+ /**
3
+ * Test whether a DOM element is the parent of another DOM element.
4
+ *
5
+ * @param {HTMLElement} el - Potential child element.
6
+ * @param {HTMLElement} target - Target parent element which is tested to have `el` as a child.
7
+ * @return {boolean} If `true` `el` has `target` as a parent.
8
+ */
9
+ declare function hasParent(el: HTMLElement, target: HTMLElement): boolean;
@@ -0,0 +1,14 @@
1
+ export default hexStrToInt;
2
+ /**
3
+ * Convert a HEX string into a HEX integer.
4
+ *
5
+ * @example
6
+ * ```js
7
+ * // returns 16711680
8
+ * hexStrToInt("#FF0000");
9
+ * ```
10
+ *
11
+ * @param {string} str - HEX string
12
+ * @return {number} An (integer) HEX number
13
+ */
14
+ declare function hexStrToInt(str: string): number;
@@ -0,0 +1,89 @@
1
+ export { default as absToChr } from "./abs-to-chr";
2
+ export { default as accessorTransposition } from "./accessor-transposition";
3
+ export { default as addArrays } from "./add-arrays";
4
+ export { default as addClass } from "./add-class";
5
+ export { default as base64ToCanvas } from "./base64-to-canvas";
6
+ export { default as chromInfoBisector } from "./chrom-info-bisector";
7
+ export { default as chrToAbs } from "./chr-to-abs";
8
+ export { default as cloneEvent } from "./clone-event";
9
+ export { default as colorDomainToRgbaArray } from "./color-domain-to-rgba-array";
10
+ export { default as colorToHex } from "./color-to-hex";
11
+ export { default as colorToRgba } from "./color-to-rgba";
12
+ export { default as dataToGenomicLoci } from "./data-to-genomic-loci";
13
+ export { default as debounce } from "./debounce";
14
+ export { default as decToHexStr } from "./dec-to-hex-str";
15
+ export { default as dictFromTuples } from "./dict-from-tuples";
16
+ export { default as dictItems } from "./dict-items";
17
+ export { default as dictKeys } from "./dict-keys";
18
+ export { default as dictValues } from "./dict-values";
19
+ export { default as download } from "./download";
20
+ export { default as fillInMinWidths } from "./fill-in-min-widths";
21
+ export { default as flatten } from "./flatten";
22
+ export { default as forEach } from "./for-each";
23
+ export { default as forwardEvent } from "./forward-event";
24
+ export { default as genomeLociToPixels } from "./genome-loci-to-pixels";
25
+ export { default as genomicRangeToChromosomeChunks } from "./genomic-range-to-chromosome-chunks";
26
+ export { default as getDefaultTrackForDatatype } from "./get-default-track-for-datatype";
27
+ export { default as getElementDim } from "./get-element-dim";
28
+ export { default as getTrackByUid } from "./get-track-by-uid";
29
+ export { default as getTrackConfFromHGC } from "./get-track-conf-from-hgc";
30
+ export { default as getTrackObjById } from "./get-track-obj-by-id";
31
+ export { default as getTrackPositionByUid } from "./get-track-position-by-uid";
32
+ export { default as getXylofon } from "./get-xylofon";
33
+ export { default as gradient } from "./gradient";
34
+ export { default as hasClass } from "./has-class";
35
+ export { default as hasParent } from "./has-parent";
36
+ export { default as hexStrToInt } from "./hex-string-to-int";
37
+ export { default as intoTheVoid } from "./into-the-void";
38
+ export { default as isTrackOrChildTrack } from "./is-track-or-child-track";
39
+ export { default as isWithin } from "./is-within";
40
+ export { default as latToY } from "./lat-to-y";
41
+ export { default as loadChromInfos } from "./load-chrom-infos";
42
+ export { default as lngToX } from "./lng-to-x";
43
+ export { default as map } from "./map";
44
+ export { default as max } from "./max";
45
+ export { default as maxNonZero } from "./max-non-zero";
46
+ export { default as min } from "./min";
47
+ export { default as minNonZero } from "./min-non-zero";
48
+ export { default as mod } from "./mod";
49
+ export { default as ndarrayAssign } from "./ndarray-assign";
50
+ export { default as ndarrayFlatten } from "./ndarray-flatten";
51
+ export { default as ndarrayToList } from "./ndarray-to-list";
52
+ export { default as numericifyVersion } from "./numericify-version";
53
+ export { default as objVals } from "./obj-vals";
54
+ export { default as or } from "./or";
55
+ export { default as parseChromsizesRows } from "./parse-chromsizes-rows";
56
+ export { default as pixiTextToSvg } from "./pixi-text-to-svg";
57
+ export { default as q } from "./q";
58
+ export { default as reduce } from "./reduce";
59
+ export { default as rangeQuery2d } from "./range-query-2d";
60
+ export { default as relToAbsChromPos } from "./rel-to-abs-chrom-pos";
61
+ export { default as removeClass } from "./remove-class";
62
+ export { default as resetD3BrushStyle } from "./reset-d3-brush-style";
63
+ export { default as rgbToHex } from "./rgb-to-hex";
64
+ export { default as scalesCenterAndK } from "./scales-center-and-k";
65
+ export { default as scalesToGenomeLoci } from "./scales-to-genome-loci";
66
+ export { default as showMousePosition } from "./show-mouse-position";
67
+ export { default as some } from "./some";
68
+ export { default as sum } from "./sum";
69
+ export { default as svgLine } from "./svg-line";
70
+ export { default as throttleAndDebounce } from "./throttle-and-debounce";
71
+ export { default as tileToCanvas } from "./tile-to-canvas";
72
+ export { default as timeout } from "./timeout";
73
+ export { default as totalTrackPixelHeight } from "./total-track-pixel-height";
74
+ export { default as toVoid } from "./to-void";
75
+ export { default as trimTrailingSlash } from "./trim-trailing-slash";
76
+ export { default as valueToColor } from "./value-to-color";
77
+ export { default as expandCombinedTracks } from "./expand-combined-tracks";
78
+ export { default as segmentsToRows } from "./segments-to-rows";
79
+ export { default as visitPositionedTracks } from "./visit-positioned-tracks";
80
+ export { default as visitTracks } from "./visit-tracks";
81
+ export { default as DenseDataExtrema1D } from "./DenseDataExtrema1D";
82
+ export { default as DenseDataExtrema2D } from "./DenseDataExtrema2D";
83
+ export { default as getAggregationFunction } from "./get-aggregation-function";
84
+ export { default as selectedItemsToSize } from "./selected-items-to-size";
85
+ export { default as IS_TRACK_RANGE_SELECTABLE } from "./is-track-range-selectable";
86
+ export { default as getDefaultTracksForDatatype } from "./default-tracks";
87
+ export { default as trackUtils } from "../track-utils";
88
+ export { getTrackObjectFromHGC, getTrackRenderer, getTiledPlot } from "./get-higlass-components";
89
+ export { changeOptions, waitForJsonComplete, waitForTilesLoaded, waitForTransitionsFinished, mountHGComponent, mountHGComponentAsync, removeHGComponent } from "../test-helpers";
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Interval tree.
3
+ *
4
+ * @public
5
+ * @constructor
6
+ */
7
+ export class IntervalTree {
8
+ /**
9
+ * Root node of the tree.
10
+ * @type {IntervalTreeNode | null}
11
+ */
12
+ root: IntervalTreeNode | null;
13
+ /**
14
+ * Add new interval to the tree.
15
+ *
16
+ * @public
17
+ * @param {Interval} interval - Array with start and end points of the interval.
18
+ */
19
+ public add(interval: Interval): void;
20
+ /**
21
+ * Checks or point belongs to at least one intarval from the tree.<br><br>
22
+ * Complexity: O(log N).
23
+ *
24
+ * @public
25
+ * @method
26
+ * @param {Number} point Point which should be checked.
27
+ * @return {Boolean} True if point belongs to one of the intervals.
28
+ */
29
+ public contains(point: number): boolean;
30
+ /**
31
+ * Checks or interval belongs to at least one intarval from the tree.<br><br>
32
+ * Complexity: O(log N).
33
+ *
34
+ * @public
35
+ * @method
36
+ * @param {Interval} interval Interval which should be checked.
37
+ * @return {boolean} True if interval intersects with one of the intervals.
38
+ */
39
+ public intersects(interval: Interval): boolean;
40
+ /**
41
+ * Returns height of the tree.
42
+ *
43
+ * @public
44
+ * @method
45
+ * @return {Number} Height of the tree.
46
+ */
47
+ public height(): number;
48
+ /**
49
+ * Returns node with the max endpoint in subtree.
50
+ *
51
+ * @public
52
+ * @method
53
+ * @param {IntervalTreeNode} node Root node of subtree.
54
+ * @return {IntervalTreeNode | null} IntervalTreeNode with the largest endpoint.
55
+ */
56
+ public findMax(node: IntervalTreeNode): IntervalTreeNode | null;
57
+ /**
58
+ * Adjust the max value.
59
+ *
60
+ * @param {Interval} interval
61
+ * @param {IntervalTreeNode | null} node
62
+ */
63
+ _removeHelper(interval: Interval, node: IntervalTreeNode | null): void;
64
+ /**
65
+ * Remove interval from the tree.
66
+ *
67
+ * @public
68
+ * @method
69
+ * @param {Interval} interval - Array with start and end of the interval.
70
+ */
71
+ public remove(interval: Interval): void;
72
+ }
73
+ export type Interval = [start: number, end: number];
74
+ /** @typedef {[start: number, end: number]} Interval */
75
+ declare class IntervalTreeNode {
76
+ /**
77
+ * @param {number} start
78
+ * @param {number} end
79
+ * @param {IntervalTreeNode} [left]
80
+ * @param {IntervalTreeNode} [right]
81
+ */
82
+ constructor(start: number, end: number, left?: IntervalTreeNode, right?: IntervalTreeNode);
83
+ /**
84
+ * Node interval.
85
+ * @type {Interval}
86
+ */
87
+ interval: Interval;
88
+ /**
89
+ * Max endpoint in subtree which starts from this node.
90
+ * @type {number}
91
+ */
92
+ max: number;
93
+ /**
94
+ * Parent node.
95
+ * @type {IntervalTreeNode | null}
96
+ */
97
+ parentNode: IntervalTreeNode | null;
98
+ /**
99
+ * Left child node.
100
+ * @type {IntervalTreeNode | null}
101
+ */
102
+ left: IntervalTreeNode | null;
103
+ /**
104
+ * Right child node.
105
+ * @type {IntervalTreeNode | null}
106
+ */
107
+ right: IntervalTreeNode | null;
108
+ }
109
+ export {};
@@ -0,0 +1,6 @@
1
+ export default intoTheVoid;
2
+ /**
3
+ * An adventure into the abyss of void!
4
+ * @type {(...args: any[]) => void} The explorers find nothing but void.
5
+ */
6
+ declare const intoTheVoid: (...args: any[]) => void;
@@ -0,0 +1,7 @@
1
+ export default isTrackOrChildTrack;
2
+ /**
3
+ * @param {import('../types').TrackObject} testTrack
4
+ * @param {import('../types').TrackObject} track
5
+ * @returns {boolean}
6
+ */
7
+ declare function isTrackOrChildTrack(testTrack: import("../types").TrackObject, track: import("../types").TrackObject): boolean;
@@ -0,0 +1,2 @@
1
+ export function IS_TRACK_RANGE_SELECTABLE(track: import("../types").TrackConfig): boolean;
2
+ export default IS_TRACK_RANGE_SELECTABLE;
@@ -0,0 +1,12 @@
1
+ export default isWithin;
2
+ /**
3
+ * Check if a 2D or 1D point is within a rectangle or range
4
+ * @param {number} x - The point's X coordinate.
5
+ * @param {number} y - The point's Y coordinate.
6
+ * @param {number} minX - The rectangle's start X coordinate.
7
+ * @param {number} maxX - The rectangle's start X coordinate.
8
+ * @param {number} minY - The rectangle's start X coordinate.
9
+ * @param {number} maxY - The rectangle's start X coordinate.
10
+ * @return {boolean} If `true` the [x,y] point is in the rectangle.
11
+ */
12
+ declare function isWithin(x: number, y: number, minX: number, maxX: number, minY: number, maxY: number, is1d?: boolean): boolean;
@@ -0,0 +1,9 @@
1
+ export function invGudermannian(y: number): number;
2
+ export default latToY;
3
+ /**
4
+ * Translate latitude to Y in the Mercator projection
5
+ * @param {number} lat - Latitude.
6
+ * @param {number} zoom - Zoom level
7
+ * @return {number} Y coordinate in the Mercator projection.
8
+ */
9
+ declare function latToY(lat: number, zoom: number): number;
@@ -0,0 +1,8 @@
1
+ export default lngToX;
2
+ /**
3
+ * Convert longitude to the X coordinate in the Mercator projection.
4
+ * @param {number} lng - Longitude
5
+ * @param {number} zoom - Zoom level
6
+ * @return {number} X coordinate in the Mercator projection.
7
+ */
8
+ declare function lngToX(lng: number, zoom: number): number;