@jbrowse/plugin-linear-genome-view 3.6.5 → 4.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/esm/BaseLinearDisplay/SVGLegend.d.ts +6 -0
  2. package/esm/BaseLinearDisplay/SVGLegend.js +17 -0
  3. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +2 -0
  4. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +11 -0
  5. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +3 -3
  6. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +13 -24
  7. package/esm/BaseLinearDisplay/components/Block.js +2 -2
  8. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +2 -2
  9. package/esm/BaseLinearDisplay/components/BlockMsg.js +11 -2
  10. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +9 -0
  11. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +42 -0
  12. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +11 -0
  13. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +40 -0
  14. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +19 -0
  15. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +45 -0
  16. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +5 -0
  17. package/esm/BaseLinearDisplay/components/FloatingLabels.js +89 -0
  18. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +8 -0
  19. package/esm/BaseLinearDisplay/components/FloatingLegend.js +43 -0
  20. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +1 -5
  21. package/esm/BaseLinearDisplay/components/LinearBlocks.js +5 -42
  22. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +4 -0
  23. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +49 -0
  24. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +4 -0
  25. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +26 -0
  26. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +8 -0
  27. package/esm/BaseLinearDisplay/components/MenuPage.js +24 -0
  28. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +19 -0
  29. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +48 -0
  30. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +12 -0
  31. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +22 -0
  32. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -4
  33. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +5 -8
  34. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +3 -3
  35. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -0
  36. package/esm/BaseLinearDisplay/components/Tooltip.js +10 -7
  37. package/esm/BaseLinearDisplay/components/types.d.ts +1 -0
  38. package/esm/BaseLinearDisplay/components/types.js +1 -0
  39. package/esm/BaseLinearDisplay/components/util.d.ts +21 -0
  40. package/esm/BaseLinearDisplay/components/util.js +116 -0
  41. package/esm/BaseLinearDisplay/index.d.ts +17 -8
  42. package/esm/BaseLinearDisplay/index.js +13 -6
  43. package/esm/BaseLinearDisplay/model.d.ts +1177 -0
  44. package/esm/BaseLinearDisplay/model.js +424 -0
  45. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +5 -5
  46. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +11 -14
  47. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +21 -0
  48. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +46 -0
  49. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +3 -3
  50. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +2 -3
  51. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +1 -1
  52. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +2 -3
  53. package/esm/BaseLinearDisplay/models/calculateLabelPositions.d.ts +24 -0
  54. package/esm/BaseLinearDisplay/models/calculateLabelPositions.js +60 -0
  55. package/esm/BaseLinearDisplay/models/configSchema.d.ts +2 -2
  56. package/esm/BaseLinearDisplay/models/configSchema.js +3 -3
  57. package/esm/BaseLinearDisplay/models/renderSvg.d.ts +3 -7
  58. package/esm/BaseLinearDisplay/models/renderSvg.js +22 -11
  59. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +37 -19
  60. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +151 -135
  61. package/esm/BaseLinearDisplay/models/util.d.ts +4 -4
  62. package/esm/BaseLinearDisplay/models/util.js +16 -13
  63. package/esm/BaseLinearDisplay/renderSvg.d.ts +3 -0
  64. package/esm/BaseLinearDisplay/renderSvg.js +59 -0
  65. package/esm/BaseLinearDisplay/types.d.ts +47 -0
  66. package/esm/BaseLinearDisplay/types.js +3 -0
  67. package/esm/BaseLinearDisplay/util.d.ts +15 -0
  68. package/esm/BaseLinearDisplay/util.js +61 -0
  69. package/esm/BasicTrack/configSchema.d.ts +16 -11
  70. package/esm/BasicTrack/index.js +1 -1
  71. package/esm/FeatureTrack/configSchema.d.ts +16 -11
  72. package/esm/FeatureTrack/index.js +1 -1
  73. package/esm/LaunchLinearGenomeView/index.js +12 -62
  74. package/esm/LinearBareDisplay/configSchema.d.ts +4 -4
  75. package/esm/LinearBareDisplay/configSchema.js +1 -1
  76. package/esm/LinearBareDisplay/index.d.ts +2 -2
  77. package/esm/LinearBareDisplay/index.js +5 -5
  78. package/esm/LinearBareDisplay/model.d.ts +959 -92
  79. package/esm/LinearBareDisplay/model.js +3 -6
  80. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +5 -0
  81. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +9 -0
  82. package/esm/LinearBasicDisplay/configSchema.d.ts +4 -4
  83. package/esm/LinearBasicDisplay/configSchema.js +1 -1
  84. package/esm/LinearBasicDisplay/index.d.ts +2 -2
  85. package/esm/LinearBasicDisplay/index.js +6 -6
  86. package/esm/LinearBasicDisplay/model.d.ts +1134 -122
  87. package/esm/LinearBasicDisplay/model.js +116 -116
  88. package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/AddFiltersDialog.js +2 -2
  89. package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/SetMaxHeightDialog.js +3 -3
  90. package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/configSchema.d.ts +4 -4
  91. package/esm/LinearFeatureDisplay/configSchema.js +11 -0
  92. package/esm/LinearFeatureDisplay/index.d.ts +3 -0
  93. package/esm/LinearFeatureDisplay/index.js +2 -0
  94. package/esm/LinearFeatureDisplay/model.d.ts +1415 -0
  95. package/esm/LinearFeatureDisplay/model.js +265 -0
  96. package/esm/LinearGenomeView/SVGErrorBox.d.ts +5 -0
  97. package/esm/LinearGenomeView/SVGErrorBox.js +4 -0
  98. package/esm/LinearGenomeView/afterAttach.d.ts +5 -0
  99. package/esm/LinearGenomeView/afterAttach.js +95 -0
  100. package/esm/LinearGenomeView/components/CenterLine.js +6 -4
  101. package/esm/LinearGenomeView/components/Cytobands.js +4 -4
  102. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
  103. package/esm/LinearGenomeView/components/ExportSvgDialog.js +5 -1
  104. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +8 -2
  105. package/esm/LinearGenomeView/components/GetSequenceDialog.js +13 -16
  106. package/esm/LinearGenomeView/components/Gridlines.js +18 -15
  107. package/esm/LinearGenomeView/components/Header.js +9 -9
  108. package/esm/LinearGenomeView/components/HeaderPanControls.js +2 -2
  109. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +4 -5
  110. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +2 -2
  111. package/esm/LinearGenomeView/components/HeaderZoomControls.js +3 -3
  112. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  113. package/esm/LinearGenomeView/components/Highlight.js +6 -6
  114. package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -1
  115. package/esm/LinearGenomeView/components/ImportForm.js +14 -12
  116. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +3 -3
  117. package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -7
  118. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +7 -8
  119. package/esm/LinearGenomeView/components/MiniControls.js +6 -6
  120. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +2 -2
  121. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +1 -1
  122. package/esm/LinearGenomeView/components/OverviewHighlight.js +5 -5
  123. package/esm/LinearGenomeView/components/OverviewRubberband.js +4 -4
  124. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +9 -5
  125. package/esm/LinearGenomeView/components/OverviewScalebar.js +36 -28
  126. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -5
  127. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +7 -7
  128. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +1 -1
  129. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -1
  130. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +10 -10
  131. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +1 -1
  132. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +6 -4
  133. package/esm/LinearGenomeView/components/Rubberband.js +9 -7
  134. package/esm/LinearGenomeView/components/RubberbandSpan.js +4 -5
  135. package/esm/LinearGenomeView/components/Scalebar.js +8 -10
  136. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  137. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +50 -17
  138. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  139. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +13 -11
  140. package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -1
  141. package/esm/LinearGenomeView/components/SearchBox.js +8 -9
  142. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -1
  143. package/esm/LinearGenomeView/components/SearchResultsDialog.js +2 -2
  144. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +1 -1
  145. package/esm/LinearGenomeView/components/SearchResultsTable.js +4 -6
  146. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +6 -6
  147. package/esm/LinearGenomeView/components/TrackContainer.js +32 -20
  148. package/esm/LinearGenomeView/components/TrackLabel.js +10 -11
  149. package/esm/LinearGenomeView/components/TrackLabelContainer.js +7 -8
  150. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +1 -1
  151. package/esm/LinearGenomeView/components/TrackLabelMenu.js +80 -68
  152. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
  153. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +5 -5
  154. package/esm/LinearGenomeView/components/TracksContainer.js +18 -15
  155. package/esm/LinearGenomeView/components/VerticalGuide.js +5 -3
  156. package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -2
  157. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +27 -2
  158. package/esm/LinearGenomeView/components/useRangeSelect.js +26 -20
  159. package/esm/LinearGenomeView/components/useWheelScroll.js +22 -12
  160. package/esm/LinearGenomeView/components/util.d.ts +2 -13
  161. package/esm/LinearGenomeView/components/util.js +12 -31
  162. package/esm/LinearGenomeView/index.d.ts +1 -1
  163. package/esm/LinearGenomeView/index.js +3 -3
  164. package/esm/LinearGenomeView/keyboardHandler.d.ts +2 -0
  165. package/esm/LinearGenomeView/keyboardHandler.js +29 -0
  166. package/esm/LinearGenomeView/menuItems.d.ts +7 -0
  167. package/esm/LinearGenomeView/menuItems.js +299 -0
  168. package/esm/LinearGenomeView/model.d.ts +92 -89
  169. package/esm/LinearGenomeView/model.js +166 -414
  170. package/esm/LinearGenomeView/svgExportUtil.d.ts +9 -0
  171. package/esm/LinearGenomeView/svgExportUtil.js +6 -0
  172. package/{dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts → esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts} +2 -2
  173. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +20 -0
  174. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +5 -5
  175. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +4 -3
  176. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +24 -12
  177. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +13 -5
  178. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +2 -2
  179. package/esm/LinearGenomeView/types.d.ts +5 -1
  180. package/esm/LinearGenomeView/util.d.ts +2 -2
  181. package/esm/LinearGenomeView/util.js +8 -6
  182. package/esm/index.d.ts +975 -94
  183. package/esm/index.js +37 -38
  184. package/esm/searchUtils.d.ts +1 -1
  185. package/esm/searchUtils.js +6 -4
  186. package/package.json +28 -33
  187. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  188. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -72
  189. package/dist/BaseLinearDisplay/components/Block.d.ts +0 -14
  190. package/dist/BaseLinearDisplay/components/Block.js +0 -50
  191. package/dist/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  192. package/dist/BaseLinearDisplay/components/BlockErrorMessage.js +0 -27
  193. package/dist/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
  194. package/dist/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -26
  195. package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  196. package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -20
  197. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -9
  198. package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -61
  199. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -11
  200. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -59
  201. package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  202. package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -25
  203. package/dist/BaseLinearDisplay/components/Tooltip.d.ts +0 -11
  204. package/dist/BaseLinearDisplay/components/Tooltip.js +0 -24
  205. package/dist/BaseLinearDisplay/index.d.ts +0 -8
  206. package/dist/BaseLinearDisplay/index.js +0 -20
  207. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +0 -311
  208. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -325
  209. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  210. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -122
  211. package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  212. package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +0 -35
  213. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  214. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -33
  215. package/dist/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  216. package/dist/BaseLinearDisplay/models/configSchema.js +0 -35
  217. package/dist/BaseLinearDisplay/models/renderSvg.d.ts +0 -7
  218. package/dist/BaseLinearDisplay/models/renderSvg.js +0 -80
  219. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -78
  220. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -229
  221. package/dist/BaseLinearDisplay/models/util.d.ts +0 -22
  222. package/dist/BaseLinearDisplay/models/util.js +0 -45
  223. package/dist/BasicTrack/configSchema.d.ts +0 -80
  224. package/dist/BasicTrack/configSchema.js +0 -10
  225. package/dist/BasicTrack/index.d.ts +0 -2
  226. package/dist/BasicTrack/index.js +0 -18
  227. package/dist/FeatureTrack/configSchema.d.ts +0 -80
  228. package/dist/FeatureTrack/configSchema.js +0 -10
  229. package/dist/FeatureTrack/index.d.ts +0 -2
  230. package/dist/FeatureTrack/index.js +0 -19
  231. package/dist/LaunchLinearGenomeView/index.d.ts +0 -2
  232. package/dist/LaunchLinearGenomeView/index.js +0 -70
  233. package/dist/LinearBareDisplay/configSchema.d.ts +0 -32
  234. package/dist/LinearBareDisplay/configSchema.js +0 -13
  235. package/dist/LinearBareDisplay/index.d.ts +0 -4
  236. package/dist/LinearBareDisplay/index.js +0 -26
  237. package/dist/LinearBareDisplay/model.d.ts +0 -309
  238. package/dist/LinearBareDisplay/model.js +0 -38
  239. package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +0 -61
  240. package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.js +0 -28
  241. package/dist/LinearBasicDisplay/configSchema.js +0 -13
  242. package/dist/LinearBasicDisplay/index.d.ts +0 -4
  243. package/dist/LinearBasicDisplay/index.js +0 -29
  244. package/dist/LinearBasicDisplay/model.d.ts +0 -346
  245. package/dist/LinearBasicDisplay/model.js +0 -192
  246. package/dist/LinearGenomeView/components/CenterLine.d.ts +0 -6
  247. package/dist/LinearGenomeView/components/CenterLine.js +0 -38
  248. package/dist/LinearGenomeView/components/Cytobands.d.ts +0 -9
  249. package/dist/LinearGenomeView/components/Cytobands.js +0 -89
  250. package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +0 -7
  251. package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -57
  252. package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +0 -6
  253. package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -109
  254. package/dist/LinearGenomeView/components/Gridlines.d.ts +0 -7
  255. package/dist/LinearGenomeView/components/Gridlines.js +0 -70
  256. package/dist/LinearGenomeView/components/Header.d.ts +0 -5
  257. package/dist/LinearGenomeView/components/Header.js +0 -38
  258. package/dist/LinearGenomeView/components/HeaderPanControls.d.ts +0 -6
  259. package/dist/LinearGenomeView/components/HeaderPanControls.js +0 -27
  260. package/dist/LinearGenomeView/components/HeaderRegionWidth.d.ts +0 -5
  261. package/dist/LinearGenomeView/components/HeaderRegionWidth.js +0 -21
  262. package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +0 -5
  263. package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.js +0 -19
  264. package/dist/LinearGenomeView/components/HeaderZoomControls.d.ts +0 -5
  265. package/dist/LinearGenomeView/components/HeaderZoomControls.js +0 -109
  266. package/dist/LinearGenomeView/components/Highlight.d.ts +0 -12
  267. package/dist/LinearGenomeView/components/Highlight.js +0 -95
  268. package/dist/LinearGenomeView/components/ImportForm.d.ts +0 -6
  269. package/dist/LinearGenomeView/components/ImportForm.js +0 -80
  270. package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  271. package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -32
  272. package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +0 -5
  273. package/dist/LinearGenomeView/components/LinearGenomeView.js +0 -57
  274. package/dist/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +0 -5
  275. package/dist/LinearGenomeView/components/LinearGenomeViewContainer.js +0 -98
  276. package/dist/LinearGenomeView/components/MiniControls.d.ts +0 -5
  277. package/dist/LinearGenomeView/components/MiniControls.js +0 -36
  278. package/dist/LinearGenomeView/components/NoTracksActiveButton.d.ts +0 -5
  279. package/dist/LinearGenomeView/components/NoTracksActiveButton.js +0 -23
  280. package/dist/LinearGenomeView/components/OverviewHighlight.d.ts +0 -8
  281. package/dist/LinearGenomeView/components/OverviewHighlight.js +0 -50
  282. package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +0 -9
  283. package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -113
  284. package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +0 -10
  285. package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +0 -28
  286. package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +0 -7
  287. package/dist/LinearGenomeView/components/OverviewScalebar.js +0 -146
  288. package/dist/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +0 -8
  289. package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +0 -41
  290. package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +0 -10
  291. package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.js +0 -37
  292. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -8
  293. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -18
  294. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  295. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -56
  296. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  297. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -11
  298. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  299. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -127
  300. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  301. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -53
  302. package/dist/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +0 -6
  303. package/dist/LinearGenomeView/components/RegionWidthEditorDialog.js +0 -30
  304. package/dist/LinearGenomeView/components/Rubberband.d.ts +0 -7
  305. package/dist/LinearGenomeView/components/Rubberband.js +0 -35
  306. package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  307. package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -39
  308. package/dist/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  309. package/dist/LinearGenomeView/components/RubberbandTooltip.js +0 -20
  310. package/dist/LinearGenomeView/components/Scalebar.d.ts +0 -10
  311. package/dist/LinearGenomeView/components/Scalebar.js +0 -40
  312. package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +0 -6
  313. package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.js +0 -29
  314. package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
  315. package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -38
  316. package/dist/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +0 -6
  317. package/dist/LinearGenomeView/components/ScalebarRefNameLabels.js +0 -46
  318. package/dist/LinearGenomeView/components/SearchBox.d.ts +0 -6
  319. package/dist/LinearGenomeView/components/SearchBox.js +0 -88
  320. package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -9
  321. package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -15
  322. package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +0 -8
  323. package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -74
  324. package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +0 -8
  325. package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -67
  326. package/dist/LinearGenomeView/components/TrackContainer.d.ts +0 -8
  327. package/dist/LinearGenomeView/components/TrackContainer.js +0 -51
  328. package/dist/LinearGenomeView/components/TrackLabel.d.ts +0 -7
  329. package/dist/LinearGenomeView/components/TrackLabel.js +0 -49
  330. package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  331. package/dist/LinearGenomeView/components/TrackLabelContainer.js +0 -31
  332. package/dist/LinearGenomeView/components/TrackLabelDragHandle.d.ts +0 -8
  333. package/dist/LinearGenomeView/components/TrackLabelDragHandle.js +0 -32
  334. package/dist/LinearGenomeView/components/TrackLabelMenu.d.ts +0 -5
  335. package/dist/LinearGenomeView/components/TrackLabelMenu.js +0 -93
  336. package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +0 -9
  337. package/dist/LinearGenomeView/components/TrackRenderingContainer.js +0 -50
  338. package/dist/LinearGenomeView/components/TracksContainer.d.ts +0 -7
  339. package/dist/LinearGenomeView/components/TracksContainer.js +0 -84
  340. package/dist/LinearGenomeView/components/VerticalGuide.d.ts +0 -7
  341. package/dist/LinearGenomeView/components/VerticalGuide.js +0 -31
  342. package/dist/LinearGenomeView/components/fetchSequence.d.ts +0 -4
  343. package/dist/LinearGenomeView/components/fetchSequence.js +0 -29
  344. package/dist/LinearGenomeView/components/useRangeSelect.d.ts +0 -59
  345. package/dist/LinearGenomeView/components/useRangeSelect.js +0 -131
  346. package/dist/LinearGenomeView/components/useSideScroll.d.ts +0 -6
  347. package/dist/LinearGenomeView/components/useSideScroll.js +0 -60
  348. package/dist/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  349. package/dist/LinearGenomeView/components/useWheelScroll.js +0 -62
  350. package/dist/LinearGenomeView/components/util.d.ts +0 -25
  351. package/dist/LinearGenomeView/components/util.js +0 -49
  352. package/dist/LinearGenomeView/consts.d.ts +0 -7
  353. package/dist/LinearGenomeView/consts.js +0 -10
  354. package/dist/LinearGenomeView/index.d.ts +0 -3
  355. package/dist/LinearGenomeView/index.js +0 -53
  356. package/dist/LinearGenomeView/model.d.ts +0 -268
  357. package/dist/LinearGenomeView/model.js +0 -1109
  358. package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  359. package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +0 -10
  360. package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +0 -7
  361. package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +0 -47
  362. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +0 -6
  363. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -42
  364. package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -8
  365. package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +0 -7
  366. package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +0 -39
  367. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +0 -7
  368. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +0 -17
  369. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +0 -7
  370. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -14
  371. package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +0 -21
  372. package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -32
  373. package/dist/LinearGenomeView/svgcomponents/util.d.ts +0 -8
  374. package/dist/LinearGenomeView/svgcomponents/util.js +0 -8
  375. package/dist/LinearGenomeView/types.d.ts +0 -43
  376. package/dist/LinearGenomeView/types.js +0 -2
  377. package/dist/LinearGenomeView/util.d.ts +0 -26
  378. package/dist/LinearGenomeView/util.js +0 -138
  379. package/dist/index.d.ts +0 -353
  380. package/dist/index.js +0 -120
  381. package/dist/searchUtils.d.ts +0 -26
  382. package/dist/searchUtils.js +0 -80
  383. package/esm/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
  384. package/esm/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -24
  385. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +0 -311
  386. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -286
  387. package/esm/LinearBasicDisplay/components/AddFiltersDialog.d.ts +0 -9
  388. package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  389. package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
  390. package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -36
  391. /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/AddFiltersDialog.d.ts +0 -0
  392. /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/SetMaxHeightDialog.d.ts +0 -0
@@ -1,84 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- const jsx_runtime_1 = require("react/jsx-runtime");
40
- const react_1 = require("react");
41
- const ui_1 = require("@jbrowse/core/ui");
42
- const util_1 = require("@jbrowse/core/util");
43
- const mobx_react_1 = require("mobx-react");
44
- const mui_1 = require("tss-react/mui");
45
- const Gridlines_1 = __importDefault(require("./Gridlines"));
46
- const Rubberband_1 = __importDefault(require("./Rubberband"));
47
- const Scalebar_1 = __importDefault(require("./Scalebar"));
48
- const VerticalGuide_1 = __importDefault(require("./VerticalGuide"));
49
- const consts_1 = require("../consts");
50
- const useRangeSelect_1 = require("./useRangeSelect");
51
- const useSideScroll_1 = require("./useSideScroll");
52
- const useWheelScroll_1 = require("./useWheelScroll");
53
- const CenterLine = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./CenterLine'))));
54
- const Highlight = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./Highlight'))));
55
- const RubberbandSpan = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./RubberbandSpan'))));
56
- const useStyles = (0, mui_1.makeStyles)()({
57
- tracksContainer: {
58
- position: 'relative',
59
- },
60
- });
61
- const TracksContainer = (0, mobx_react_1.observer)(function TracksContainer({ children, model, }) {
62
- const { classes } = useStyles();
63
- const { pluginManager } = (0, util_1.getEnv)(model);
64
- const { mouseDown: mouseDown1, mouseUp } = (0, useSideScroll_1.useSideScroll)(model);
65
- const { stickyViewHeaders, rubberbandTop, showGridlines, showCenterLine } = model;
66
- const ref = (0, react_1.useRef)(null);
67
- const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, handleMenuItemClick, handleClose, mouseMove, mouseDown: mouseDown2, } = (0, useRangeSelect_1.useRangeSelect)(ref, model, true);
68
- (0, useWheelScroll_1.useWheelScroll)(ref, model);
69
- const additional = pluginManager.evaluateExtensionPoint('LinearGenomeView-TracksContainerComponent', undefined, { model });
70
- return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-testid": "tracksContainer", className: classes.tracksContainer, onMouseDown: event => {
71
- mouseDown1(event);
72
- mouseDown2(event);
73
- }, onMouseMove: mouseMove, onMouseUp: mouseUp, children: [showGridlines ? (0, jsx_runtime_1.jsx)(Gridlines_1.default, { model: model }) : null, (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: showCenterLine ? (0, jsx_runtime_1.jsx)(CenterLine, { model: model }) : null }), guideX !== undefined ? ((0, jsx_runtime_1.jsx)(VerticalGuide_1.default, { model: model, coordX: guideX })) : rubberbandOn ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left, top: rubberbandTop, sticky: stickyViewHeaders }) })) : null, anchorPosition ? ((0, jsx_runtime_1.jsx)(ui_1.Menu, { anchorReference: "anchorPosition", anchorPosition: {
74
- left: anchorPosition.clientX,
75
- top: anchorPosition.clientY,
76
- }, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: model.rubberBandMenuItems() })) : null, (0, jsx_runtime_1.jsx)(Rubberband_1.default, { model: model, ControlComponent: (0, jsx_runtime_1.jsx)(Scalebar_1.default, { model: model, style: {
77
- height: consts_1.SCALE_BAR_HEIGHT,
78
- boxSizing: 'border-box',
79
- } }) }), (0, jsx_runtime_1.jsx)(HighlightGroup, { model: model }), additional, children] }));
80
- });
81
- const HighlightGroup = (0, mobx_react_1.observer)(function HighlightGroup({ model, }) {
82
- return model.highlight.length ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => ((0, jsx_runtime_1.jsx)(Highlight, { model: model, highlight: highlight }, `${JSON.stringify(highlight)}-${idx}`))) })) : null;
83
- });
84
- exports.default = TracksContainer;
@@ -1,7 +0,0 @@
1
- import type { LinearGenomeViewModel } from '..';
2
- type LGV = LinearGenomeViewModel;
3
- declare const VerticalGuide: ({ model, coordX, }: {
4
- model: LGV;
5
- coordX: number;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default VerticalGuide;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const util_1 = require("@jbrowse/core/util");
5
- const material_1 = require("@mui/material");
6
- const mobx_react_1 = require("mobx-react");
7
- const mui_1 = require("tss-react/mui");
8
- const useStyles = (0, mui_1.makeStyles)()({
9
- guide: {
10
- pointerEvents: 'none',
11
- height: '100%',
12
- width: 1,
13
- position: 'absolute',
14
- background: 'red',
15
- zIndex: 1001,
16
- },
17
- tooltipTarget: {
18
- position: 'sticky',
19
- width: 1,
20
- },
21
- });
22
- const VerticalGuide = (0, mobx_react_1.observer)(function VerticalGuide({ model, coordX, }) {
23
- const { classes } = useStyles();
24
- const { stickyViewHeaders, rubberbandTop } = model;
25
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { open: true, placement: "top", title: (0, util_1.stringify)(model.pxToBp(coordX)), arrow: true, children: (0, jsx_runtime_1.jsx)("div", { className: classes.tooltipTarget, style: {
26
- left: coordX + 6,
27
- top: rubberbandTop,
28
- position: stickyViewHeaders ? 'sticky' : undefined,
29
- } }) }), (0, jsx_runtime_1.jsx)("div", { className: classes.guide, style: { left: coordX } })] }));
30
- });
31
- exports.default = VerticalGuide;
@@ -1,4 +0,0 @@
1
- import type { LinearGenomeViewModel } from '../model';
2
- import type { Feature } from '@jbrowse/core/util';
3
- import type { Region } from '@jbrowse/core/util/types';
4
- export declare function fetchSequence(model: LinearGenomeViewModel, regions: Region[]): Promise<Feature[]>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchSequence = fetchSequence;
4
- const configuration_1 = require("@jbrowse/core/configuration");
5
- const util_1 = require("@jbrowse/core/util");
6
- async function fetchSequence(model, regions) {
7
- const session = (0, util_1.getSession)(model);
8
- const { leftOffset, rightOffset } = model;
9
- if (!leftOffset || !rightOffset) {
10
- throw new Error('no offsets on model to use for range');
11
- }
12
- const assemblyNames = new Set(regions.map(r => r.assemblyName));
13
- if (assemblyNames.size > 1) {
14
- throw new Error('not able to fetch sequences from multiple assemblies currently');
15
- }
16
- const { rpcManager, assemblyManager } = session;
17
- const assemblyName = leftOffset.assemblyName || rightOffset.assemblyName || '';
18
- const assembly = assemblyManager.get(assemblyName);
19
- if (!assembly) {
20
- throw new Error(`assembly ${assemblyName} not found`);
21
- }
22
- const adapterConfig = (0, configuration_1.getConf)(assembly, ['sequence', 'adapter']);
23
- const sessionId = 'getSequence';
24
- return rpcManager.call(sessionId, 'CoreGetFeatures', {
25
- adapterConfig,
26
- regions,
27
- sessionId,
28
- });
29
- }
@@ -1,59 +0,0 @@
1
- import type React from 'react';
2
- import type { LinearGenomeViewModel } from '..';
3
- interface AnchorPosition {
4
- offsetX: number;
5
- clientX: number;
6
- clientY: number;
7
- }
8
- export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement | null>, model: LinearGenomeViewModel, shiftOnly?: boolean): {
9
- open: boolean;
10
- guideX: number | undefined;
11
- mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
12
- mouseMove: (event: React.MouseEvent<HTMLDivElement>) => void;
13
- mouseOut: () => void;
14
- handleMenuItemClick: (_: unknown, callback: () => void) => void;
15
- rubberbandOn?: undefined;
16
- handleClose?: undefined;
17
- leftBpOffset?: undefined;
18
- rightBpOffset?: undefined;
19
- anchorPosition?: undefined;
20
- numOfBpSelected?: undefined;
21
- width?: undefined;
22
- left?: undefined;
23
- } | {
24
- open: boolean;
25
- rubberbandOn: boolean;
26
- mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
27
- mouseMove: (event: React.MouseEvent<HTMLDivElement>) => void;
28
- mouseOut: () => void;
29
- handleClose: () => void;
30
- handleMenuItemClick: (_: unknown, callback: () => void) => void;
31
- leftBpOffset: {
32
- coord: number;
33
- index: number;
34
- refName: string;
35
- oob: boolean;
36
- assemblyName: string;
37
- offset: number;
38
- start: number;
39
- end: number;
40
- reversed?: boolean;
41
- };
42
- rightBpOffset: {
43
- coord: number;
44
- index: number;
45
- refName: string;
46
- oob: boolean;
47
- assemblyName: string;
48
- offset: number;
49
- start: number;
50
- end: number;
51
- reversed?: boolean;
52
- };
53
- anchorPosition: AnchorPosition | undefined;
54
- numOfBpSelected: number;
55
- width: number;
56
- left: number;
57
- guideX?: undefined;
58
- };
59
- export {};
@@ -1,131 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useRangeSelect = useRangeSelect;
4
- const react_1 = require("react");
5
- const util_1 = require("./util");
6
- function useRangeSelect(ref, model, shiftOnly) {
7
- const [startX, setStartX] = (0, react_1.useState)();
8
- const [currentX, setCurrentX] = (0, react_1.useState)();
9
- const [anchorPosition, setAnchorPosition] = (0, react_1.useState)();
10
- const [guideX, setGuideX] = (0, react_1.useState)();
11
- const mouseDragging = startX !== undefined && anchorPosition === undefined;
12
- (0, react_1.useEffect)(() => {
13
- function computeOffsets(offsetX) {
14
- if (startX === undefined) {
15
- return;
16
- }
17
- const leftPx = Math.min(startX, offsetX);
18
- const rightPx = Math.max(startX, offsetX);
19
- return {
20
- leftOffset: model.pxToBp(leftPx),
21
- rightOffset: model.pxToBp(rightPx),
22
- };
23
- }
24
- function globalMouseMove(event) {
25
- if (ref.current && mouseDragging) {
26
- const relativeX = (0, util_1.getRelativeX)(event, ref.current);
27
- setCurrentX(relativeX);
28
- }
29
- }
30
- function globalMouseUp(event) {
31
- if (startX !== undefined && ref.current) {
32
- const { clientX, clientY } = event;
33
- const offsetX = (0, util_1.getRelativeX)(event, ref.current);
34
- setAnchorPosition({
35
- offsetX,
36
- clientX,
37
- clientY,
38
- });
39
- const args = computeOffsets(offsetX);
40
- if (args) {
41
- model.setOffsets(args.leftOffset, args.rightOffset);
42
- }
43
- setGuideX(undefined);
44
- }
45
- }
46
- if (mouseDragging) {
47
- window.addEventListener('mousemove', globalMouseMove);
48
- window.addEventListener('mouseup', globalMouseUp);
49
- return () => {
50
- window.removeEventListener('mousemove', globalMouseMove);
51
- window.removeEventListener('mouseup', globalMouseUp);
52
- };
53
- }
54
- return () => { };
55
- }, [startX, mouseDragging, model, ref]);
56
- (0, react_1.useEffect)(() => {
57
- if (!mouseDragging &&
58
- currentX !== undefined &&
59
- startX !== undefined &&
60
- Math.abs(currentX - startX) <= 3) {
61
- handleClose();
62
- }
63
- }, [mouseDragging, currentX, startX]);
64
- function mouseDown(event) {
65
- if (shiftOnly && !event.shiftKey) {
66
- return;
67
- }
68
- event.preventDefault();
69
- event.stopPropagation();
70
- const relativeX = (0, util_1.getRelativeX)(event, ref.current);
71
- setStartX(relativeX);
72
- setCurrentX(relativeX);
73
- }
74
- function mouseMove(event) {
75
- if (shiftOnly) {
76
- if (event.shiftKey) {
77
- setGuideX((0, util_1.getRelativeX)(event, ref.current));
78
- }
79
- else {
80
- setGuideX(undefined);
81
- }
82
- }
83
- else {
84
- setGuideX((0, util_1.getRelativeX)(event, ref.current));
85
- }
86
- }
87
- function mouseOut() {
88
- setGuideX(undefined);
89
- }
90
- function handleClose() {
91
- setAnchorPosition(undefined);
92
- setStartX(undefined);
93
- setCurrentX(undefined);
94
- }
95
- function handleMenuItemClick(_, callback) {
96
- callback();
97
- handleClose();
98
- }
99
- const open = Boolean(anchorPosition);
100
- if (startX === undefined) {
101
- return {
102
- open,
103
- guideX,
104
- mouseDown,
105
- mouseMove,
106
- mouseOut,
107
- handleMenuItemClick,
108
- };
109
- }
110
- const right = anchorPosition ? anchorPosition.offsetX : currentX || 0;
111
- const left = Math.min(right, startX);
112
- const width = Math.abs(right - startX);
113
- const leftBpOffset = model.pxToBp(left);
114
- const rightBpOffset = model.pxToBp(left + width);
115
- const numOfBpSelected = Math.ceil(width * model.bpPerPx);
116
- return {
117
- open,
118
- rubberbandOn: true,
119
- mouseDown,
120
- mouseMove,
121
- mouseOut,
122
- handleClose,
123
- handleMenuItemClick,
124
- leftBpOffset,
125
- rightBpOffset,
126
- anchorPosition,
127
- numOfBpSelected,
128
- width,
129
- left,
130
- };
131
- }
@@ -1,6 +0,0 @@
1
- import type React from 'react';
2
- import type { LinearGenomeViewModel } from '..';
3
- export declare function useSideScroll(model: LinearGenomeViewModel): {
4
- mouseDown: (event: React.MouseEvent) => void;
5
- mouseUp: (event: React.MouseEvent) => void;
6
- };
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useSideScroll = useSideScroll;
4
- const react_1 = require("react");
5
- function useSideScroll(model) {
6
- const [mouseDragging, setMouseDragging] = (0, react_1.useState)(false);
7
- const scheduled = (0, react_1.useRef)(false);
8
- const prevX = (0, react_1.useRef)(0);
9
- (0, react_1.useEffect)(() => {
10
- let cleanup = () => { };
11
- function globalMouseMove(event) {
12
- event.preventDefault();
13
- const currX = event.clientX;
14
- const distance = currX - prevX.current;
15
- if (distance) {
16
- if (!scheduled.current) {
17
- scheduled.current = true;
18
- window.requestAnimationFrame(() => {
19
- model.horizontalScroll(-distance);
20
- scheduled.current = false;
21
- prevX.current = event.clientX;
22
- });
23
- }
24
- }
25
- }
26
- function globalMouseUp() {
27
- prevX.current = 0;
28
- if (mouseDragging) {
29
- setMouseDragging(false);
30
- }
31
- }
32
- if (mouseDragging) {
33
- window.addEventListener('mousemove', globalMouseMove, true);
34
- window.addEventListener('mouseup', globalMouseUp, true);
35
- cleanup = () => {
36
- window.removeEventListener('mousemove', globalMouseMove, true);
37
- window.removeEventListener('mouseup', globalMouseUp, true);
38
- };
39
- }
40
- return cleanup;
41
- }, [model, mouseDragging]);
42
- function mouseDown(event) {
43
- if (event.shiftKey) {
44
- return;
45
- }
46
- const target = event.target;
47
- if (target.draggable || target.dataset.resizer) {
48
- return;
49
- }
50
- if (event.button === 0) {
51
- prevX.current = event.clientX;
52
- setMouseDragging(true);
53
- }
54
- }
55
- function mouseUp(event) {
56
- event.preventDefault();
57
- setMouseDragging(false);
58
- }
59
- return { mouseDown, mouseUp };
60
- }
@@ -1,7 +0,0 @@
1
- import type React from 'react';
2
- export declare function useWheelScroll(ref: React.RefObject<HTMLDivElement | null>, model: {
3
- bpPerPx: number;
4
- zoomTo: (arg: number, arg2?: number) => void;
5
- setScaleFactor: (arg: number) => void;
6
- horizontalScroll: (arg: number) => void;
7
- }): void;
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useWheelScroll = useWheelScroll;
4
- const react_1 = require("react");
5
- const util_1 = require("@jbrowse/core/util");
6
- function useWheelScroll(ref, model) {
7
- const delta = (0, react_1.useRef)(0);
8
- const timeout = (0, react_1.useRef)(null);
9
- const scheduled = (0, react_1.useRef)(false);
10
- (0, react_1.useEffect)(() => {
11
- let samples = [];
12
- const curr = ref.current;
13
- function onWheel(event) {
14
- if (event.ctrlKey) {
15
- event.preventDefault();
16
- samples.push(event.deltaY);
17
- const averageDeltaY = Math.abs((0, util_1.sum)(samples)) / samples.length;
18
- const normalizer = averageDeltaY < 6
19
- ? 25
20
- : averageDeltaY > 30
21
- ? averageDeltaY > 150
22
- ? 500
23
- : 150
24
- : 75;
25
- delta.current += event.deltaY / normalizer;
26
- model.setScaleFactor(delta.current < 0 ? 1 - delta.current : 1 / (1 + delta.current));
27
- if (timeout.current) {
28
- clearTimeout(timeout.current);
29
- }
30
- timeout.current = setTimeout(() => {
31
- model.setScaleFactor(1);
32
- model.zoomTo(delta.current > 0
33
- ? model.bpPerPx * (1 + delta.current)
34
- : model.bpPerPx / (1 - delta.current), event.clientX - ((curr === null || curr === void 0 ? void 0 : curr.getBoundingClientRect().left) || 0));
35
- delta.current = 0;
36
- samples = [];
37
- }, 300);
38
- }
39
- else {
40
- if (Math.abs(event.deltaX) > Math.abs(2 * event.deltaY)) {
41
- event.preventDefault();
42
- }
43
- delta.current += event.deltaX;
44
- if (!scheduled.current) {
45
- scheduled.current = true;
46
- window.requestAnimationFrame(() => {
47
- model.horizontalScroll(delta.current);
48
- delta.current = 0;
49
- scheduled.current = false;
50
- });
51
- }
52
- }
53
- }
54
- if (curr) {
55
- curr.addEventListener('wheel', onWheel);
56
- return () => {
57
- curr.removeEventListener('wheel', onWheel);
58
- };
59
- }
60
- return () => { };
61
- }, [model, ref]);
62
- }
@@ -1,25 +0,0 @@
1
- import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
2
- import type { SearchScope } from '@jbrowse/core/TextSearch/TextSearchManager';
3
- import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
4
- import type { SearchType } from '@jbrowse/core/data_adapters/BaseAdapter';
5
- import type { TextSearchManager } from '@jbrowse/core/util';
6
- export declare function fetchResults({ queryString, searchType, searchScope, rankSearchResults, textSearchManager, assembly, }: {
7
- queryString: string;
8
- searchScope: SearchScope;
9
- rankSearchResults: (results: BaseResult[]) => BaseResult[];
10
- searchType?: SearchType;
11
- textSearchManager?: TextSearchManager;
12
- assembly?: Assembly;
13
- }): Promise<BaseResult[]>;
14
- export declare function splitLast(str: string, split: string): [string, string];
15
- export declare function getRelativeX(event: {
16
- clientX: number;
17
- target: EventTarget | null;
18
- }, element: HTMLElement | null): number;
19
- export declare function getCytobands(assembly: Assembly | undefined, refName: string): {
20
- refName: string;
21
- start: number;
22
- end: number;
23
- type: string;
24
- name: any;
25
- }[];
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.fetchResults = fetchResults;
7
- exports.splitLast = splitLast;
8
- exports.getRelativeX = getRelativeX;
9
- exports.getCytobands = getCytobands;
10
- const BaseResults_1 = __importDefault(require("@jbrowse/core/TextSearch/BaseResults"));
11
- const util_1 = require("@jbrowse/core/util");
12
- async function fetchResults({ queryString, searchType, searchScope, rankSearchResults, textSearchManager, assembly, }) {
13
- var _a;
14
- if (!textSearchManager) {
15
- console.warn('No text search manager');
16
- }
17
- const textSearchResults = (await (textSearchManager === null || textSearchManager === void 0 ? void 0 : textSearchManager.search({
18
- queryString,
19
- searchType,
20
- }, searchScope, rankSearchResults))) || [];
21
- const refNameResults = ((_a = assembly === null || assembly === void 0 ? void 0 : assembly.allRefNames) === null || _a === void 0 ? void 0 : _a.filter(ref => ref.toLowerCase().startsWith(queryString.toLowerCase())).slice(0, 10).map(r => new BaseResults_1.default({
22
- label: r,
23
- }))) || [];
24
- return (0, util_1.dedupe)([...refNameResults, ...textSearchResults], elt => elt.getId());
25
- }
26
- function splitLast(str, split) {
27
- const lastIndex = str.lastIndexOf(split);
28
- if (lastIndex === -1) {
29
- return [str, ''];
30
- }
31
- else {
32
- const before = str.slice(0, lastIndex);
33
- const after = str.slice(lastIndex + 1);
34
- return [before, after];
35
- }
36
- }
37
- function getRelativeX(event, element) {
38
- return event.clientX - ((element === null || element === void 0 ? void 0 : element.getBoundingClientRect().left) || 0);
39
- }
40
- function getCytobands(assembly, refName) {
41
- var _a;
42
- return (((_a = assembly === null || assembly === void 0 ? void 0 : assembly.cytobands) === null || _a === void 0 ? void 0 : _a.map(f => ({
43
- refName: assembly.getCanonicalRefName(f.get('refName')) || f.get('refName'),
44
- start: f.get('start'),
45
- end: f.get('end'),
46
- type: f.get('gieStain'),
47
- name: f.get('name'),
48
- })).filter(f => f.refName === refName)) || []);
49
- }
@@ -1,7 +0,0 @@
1
- export declare const HEADER_BAR_HEIGHT = 48;
2
- export declare const HEADER_OVERVIEW_HEIGHT = 20;
3
- export declare const SCALE_BAR_HEIGHT = 17;
4
- export declare const RESIZE_HANDLE_HEIGHT = 3;
5
- export declare const INTER_REGION_PADDING_WIDTH = 2;
6
- export declare const SPACING = 7;
7
- export declare const WIDGET_HEIGHT = 32;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WIDGET_HEIGHT = exports.SPACING = exports.INTER_REGION_PADDING_WIDTH = exports.RESIZE_HANDLE_HEIGHT = exports.SCALE_BAR_HEIGHT = exports.HEADER_OVERVIEW_HEIGHT = exports.HEADER_BAR_HEIGHT = void 0;
4
- exports.HEADER_BAR_HEIGHT = 48;
5
- exports.HEADER_OVERVIEW_HEIGHT = 20;
6
- exports.SCALE_BAR_HEIGHT = 17;
7
- exports.RESIZE_HANDLE_HEIGHT = 3;
8
- exports.INTER_REGION_PADDING_WIDTH = 2;
9
- exports.SPACING = 7;
10
- exports.WIDGET_HEIGHT = 32;
@@ -1,3 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- export default function LinearGenomeViewF(pluginManager: PluginManager): void;
3
- export * from './model';
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.default = LinearGenomeViewF;
40
- const react_1 = require("react");
41
- const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
42
- const model_1 = require("./model");
43
- function LinearGenomeViewF(pluginManager) {
44
- pluginManager.addViewType(() => {
45
- return new pluggableElementTypes_1.ViewType({
46
- name: 'LinearGenomeView',
47
- displayName: 'Linear genome view',
48
- stateModel: (0, model_1.stateModelFactory)(pluginManager),
49
- ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/LinearGenomeView')))),
50
- });
51
- });
52
- }
53
- __exportStar(require("./model"), exports);