@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.10

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 (363) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +202 -71
  2. package/esm/FeatureTrack/configSchema.js +47 -1
  3. package/esm/FeatureTrack/index.js +1 -1
  4. package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
  5. package/esm/LaunchLinearGenomeView/index.js +6 -12
  6. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  7. package/esm/LinearGenomeView/afterAttach.js +265 -120
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +20 -9
  10. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  11. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  12. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  13. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +142 -0
  14. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  15. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  16. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +8 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -67
  18. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  19. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  20. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  21. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  22. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Header.js +42 -16
  24. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  25. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  26. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  27. package/esm/LinearGenomeView/components/HeaderPanControls.js +18 -8
  28. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  29. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  30. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  31. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  34. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  35. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  36. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderZoomControls.js +38 -52
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +21 -25
  40. package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
  41. package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
  42. package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +13 -0
  44. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  45. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  46. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  47. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  48. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  49. package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -6
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +14 -10
  54. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  55. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  56. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  57. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  58. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  59. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  60. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  61. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
  62. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  63. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +25 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
  66. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  67. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  68. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  69. package/esm/LinearGenomeView/components/OverviewScalebar.js +87 -83
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -32
  72. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  74. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  75. package/esm/LinearGenomeView/components/PaddingBlocks.js +56 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
  78. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  79. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  80. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
  81. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
  82. package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
  83. package/esm/LinearGenomeView/components/Rubberband.js +15 -17
  84. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  85. package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
  86. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
  87. package/esm/LinearGenomeView/components/Scalebar.js +20 -22
  88. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  90. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  91. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +157 -126
  92. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  93. package/esm/LinearGenomeView/components/SearchBox.js +61 -68
  94. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  95. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  96. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
  97. package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
  98. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
  99. package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  102. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  103. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  104. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  105. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  106. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +3 -5
  107. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  108. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  109. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  110. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  111. package/esm/LinearGenomeView/components/TrackContainer.js +136 -38
  112. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  113. package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
  114. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  115. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  116. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  117. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  118. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  119. package/esm/LinearGenomeView/components/TrackLabelMenu.js +35 -87
  120. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  121. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  122. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
  123. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
  124. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
  126. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
  127. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
  128. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  129. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  130. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  131. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  132. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  133. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  134. package/esm/LinearGenomeView/components/fetchSequence.d.ts +6 -8
  135. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  136. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  137. package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -0
  138. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  139. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  140. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  141. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  142. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +9 -67
  143. package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
  144. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  145. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  146. package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
  147. package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
  148. package/esm/LinearGenomeView/components/util.d.ts +24 -6
  149. package/esm/LinearGenomeView/components/util.js +28 -5
  150. package/esm/LinearGenomeView/consts.d.ts +9 -2
  151. package/esm/LinearGenomeView/consts.js +20 -2
  152. package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
  153. package/esm/LinearGenomeView/containingLgv.js +23 -0
  154. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  155. package/esm/LinearGenomeView/flyTo.js +135 -0
  156. package/esm/LinearGenomeView/headerFit.d.ts +29 -0
  157. package/esm/LinearGenomeView/headerFit.js +72 -0
  158. package/esm/LinearGenomeView/index.d.ts +28 -3
  159. package/esm/LinearGenomeView/index.js +13 -7
  160. package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
  161. package/esm/LinearGenomeView/keyboardHandler.js +25 -1
  162. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  163. package/esm/LinearGenomeView/launchKeys.js +27 -0
  164. package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
  165. package/esm/LinearGenomeView/lazyDialogs.js +4 -3
  166. package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
  167. package/esm/LinearGenomeView/linkedViewSync.js +36 -0
  168. package/esm/LinearGenomeView/menuItems.d.ts +25 -2
  169. package/esm/LinearGenomeView/menuItems.js +306 -179
  170. package/esm/LinearGenomeView/model.d.ts +3363 -164
  171. package/esm/LinearGenomeView/model.js +2548 -565
  172. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  173. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  174. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  175. package/esm/LinearGenomeView/showRegionsWithUndo.js +50 -0
  176. package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
  177. package/esm/LinearGenomeView/stickyChrome.js +26 -0
  178. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  179. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
  180. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
  181. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  185. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  186. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  187. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +73 -41
  188. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  189. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
  190. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  191. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
  192. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  193. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
  194. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  195. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
  197. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
  198. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  199. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
  200. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
  201. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -21
  202. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  203. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  204. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  205. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  206. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  207. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  208. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  209. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +245 -0
  210. package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
  211. package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
  212. package/esm/LinearGenomeView/types.d.ts +20 -37
  213. package/esm/LinearGenomeView/types.js +1 -0
  214. package/esm/LinearGenomeView/util.d.ts +347 -12
  215. package/esm/LinearGenomeView/util.js +577 -62
  216. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  217. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
  218. package/esm/MultiLevelRubberband/index.d.ts +4 -0
  219. package/esm/MultiLevelRubberband/index.js +3 -0
  220. package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
  221. package/esm/MultiLevelRubberband/menuItems.js +52 -0
  222. package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
  223. package/esm/MultiLevelRubberband/rowLabel.js +27 -0
  224. package/esm/MultiLevelRubberband/types.d.ts +7 -0
  225. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
  226. package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
  227. package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
  228. package/esm/displayKitTests/perRegionTestEnv.js +142 -0
  229. package/esm/index.d.ts +50 -1245
  230. package/esm/index.js +88 -33
  231. package/esm/searchUtils.d.ts +62 -12
  232. package/esm/searchUtils.js +335 -48
  233. package/esm/shared/RubberbandSpan.d.ts +15 -0
  234. package/esm/shared/RubberbandSpan.js +34 -0
  235. package/esm/shared/coordLabels.d.ts +47 -0
  236. package/esm/shared/coordLabels.js +133 -0
  237. package/esm/shared/useWindowDrag.d.ts +18 -0
  238. package/esm/shared/useWindowDrag.js +45 -0
  239. package/package.json +18 -19
  240. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  241. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  242. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  243. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  244. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  245. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  246. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  247. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  248. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  249. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  250. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  251. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  252. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  253. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  254. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  255. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  256. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  257. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  258. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  260. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  261. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  262. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  263. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  264. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  265. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  266. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  267. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  268. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  269. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  270. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  271. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  272. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  273. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  274. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  275. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  276. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  277. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  278. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  279. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  280. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  281. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  282. package/esm/BaseLinearDisplay/components/util.js +0 -107
  283. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  284. package/esm/BaseLinearDisplay/index.js +0 -13
  285. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  286. package/esm/BaseLinearDisplay/model.js +0 -432
  287. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  288. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  289. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  290. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  291. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  292. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  293. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  294. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  295. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  296. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  297. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  298. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  299. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  300. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  301. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  302. package/esm/BaseLinearDisplay/models/util.js +0 -43
  303. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  304. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  305. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  306. package/esm/BaseLinearDisplay/types.js +0 -3
  307. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  308. package/esm/BaseLinearDisplay/util.js +0 -71
  309. package/esm/BasicTrack/configSchema.d.ts +0 -85
  310. package/esm/BasicTrack/configSchema.js +0 -8
  311. package/esm/BasicTrack/index.d.ts +0 -2
  312. package/esm/BasicTrack/index.js +0 -12
  313. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  314. package/esm/LinearBareDisplay/configSchema.js +0 -11
  315. package/esm/LinearBareDisplay/index.d.ts +0 -4
  316. package/esm/LinearBareDisplay/index.js +0 -20
  317. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  318. package/esm/LinearBareDisplay/model.js +0 -32
  319. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  320. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  321. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  322. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  323. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  324. package/esm/LinearBasicDisplay/index.js +0 -20
  325. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  326. package/esm/LinearBasicDisplay/model.js +0 -158
  327. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  328. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  329. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  330. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  331. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  332. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  333. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  334. package/esm/LinearFeatureDisplay/index.js +0 -2
  335. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  336. package/esm/LinearFeatureDisplay/model.js +0 -305
  337. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  338. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  339. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  340. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  345. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  346. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  347. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  348. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  349. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  350. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  351. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  352. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  353. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  354. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  355. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  356. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  357. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  358. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  359. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  360. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  361. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  362. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  363. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
@@ -0,0 +1,29 @@
1
+ declare const SHEDDABLE: readonly [readonly ['trackSelectorIndent', 16], readonly ['panButtonSpacing', 100], readonly ['scrollZoomLabel', 88], readonly ['zoomSlider', 100], readonly ['regionWidth', 54]];
2
+ export type HeaderFit = Record<(typeof SHEDDABLE)[number][0], boolean>;
3
+ /**
4
+ * Which of the header bar's optional pieces a header `width` px wide still has
5
+ * room for, given what the search box is asking for — `searchBoxWidth`, margins
6
+ * included — and whether the clear-highlights button is currently in the row.
7
+ * An unmeasured width — the first render, before the ResizeObserver has
8
+ * reported — keeps all of them, so the common wide case paints its final form
9
+ * immediately rather than flashing the compact one.
10
+ *
11
+ * `searchBoxPx` is the box's ask and not its floor, because the two differ by
12
+ * the locstring — 189px empty, 194 at `ctgA:1..20,000`, 284 at
13
+ * `chr22:10,510,000..10,610,000`. Shedding against the floor is what left
14
+ * flexbox squeezing the box this whole table exists to protect: against the
15
+ * floor the probe read 184px of an asked 210 at an 800px window and 186 at 600.
16
+ *
17
+ * The fully shed row costs 238px, so under `238 + searchBoxPx` the row overflows
18
+ * whatever it gives up and the box shrinks like any flex item. That is a floor,
19
+ * not a cliff: it shrinks from what it asked for rather than from the 101px the
20
+ * unshed row used to leave it.
21
+ */
22
+ export declare function headerFit({ width, searchBoxPx, clearHighlight, viewMenu, touch, }: {
23
+ width: number | undefined;
24
+ searchBoxPx: number;
25
+ clearHighlight?: boolean;
26
+ viewMenu?: boolean;
27
+ touch?: boolean;
28
+ }): HeaderFit;
29
+ export {};
@@ -0,0 +1,72 @@
1
+ // Widths measured against a built jbrowse-web at the default theme and root
2
+ // font size — `products/jbrowse-web/browser-tests/probe-lgv-header-fit.ts`
3
+ // prints the row piece by piece. It spends 596px on everything that is not the
4
+ // search box (47 track selector, 119 scroll-zoom checkbox, 156 pan buttons, 50 bp
5
+ // readout, 192 zoom controls, 32 of flex gap). What the box itself asks for is
6
+ // the caller's, because it follows the locstring rather than being a constant.
7
+ const ROW_WITHOUT_SEARCH_PX = 596;
8
+ // The one piece of the row that comes and goes on its own. A text search that
9
+ // lands on a feature raises it — the same flow that was just using the search
10
+ // box this whole table exists to protect — so its width is taken off the top
11
+ // rather than left for the search box to absorb.
12
+ const CLEAR_HIGHLIGHT_PX = 35;
13
+ // An embedded view has no title bar, so its menu button leads this row: a
14
+ // 40px icon button and its flex gap.
15
+ const VIEW_MENU_PX = 44;
16
+ // A touch device drops the scroll-zoom toggle, which has no wheel to
17
+ // govern, and the pan buttons, which a swipe replaces: 119 + 156, and the flex
18
+ // gaps of the three items.
19
+ const TOUCH_ABSENT_PX = 287;
20
+ const TOUCH_ABSENT = new Set(['panButtonSpacing', 'scrollZoomLabel']);
21
+ // What the header gives up as its window narrows, cheapest first, with the
22
+ // pixels each one frees. Whitespace goes before words, words before a redundant
23
+ // control, and that before a readout. The search box is not on the list: it is
24
+ // the one control in the row with no equivalent anywhere else in the view, so
25
+ // everything else exists to keep it on screen.
26
+ const SHEDDABLE = [
27
+ ['trackSelectorIndent', 16],
28
+ ['panButtonSpacing', 100],
29
+ ['scrollZoomLabel', 88],
30
+ ['zoomSlider', 100],
31
+ ['regionWidth', 54],
32
+ ];
33
+ /**
34
+ * Which of the header bar's optional pieces a header `width` px wide still has
35
+ * room for, given what the search box is asking for — `searchBoxWidth`, margins
36
+ * included — and whether the clear-highlights button is currently in the row.
37
+ * An unmeasured width — the first render, before the ResizeObserver has
38
+ * reported — keeps all of them, so the common wide case paints its final form
39
+ * immediately rather than flashing the compact one.
40
+ *
41
+ * `searchBoxPx` is the box's ask and not its floor, because the two differ by
42
+ * the locstring — 189px empty, 194 at `ctgA:1..20,000`, 284 at
43
+ * `chr22:10,510,000..10,610,000`. Shedding against the floor is what left
44
+ * flexbox squeezing the box this whole table exists to protect: against the
45
+ * floor the probe read 184px of an asked 210 at an 800px window and 186 at 600.
46
+ *
47
+ * The fully shed row costs 238px, so under `238 + searchBoxPx` the row overflows
48
+ * whatever it gives up and the box shrinks like any flex item. That is a floor,
49
+ * not a cliff: it shrinks from what it asked for rather than from the 101px the
50
+ * unshed row used to leave it.
51
+ */
52
+ export function headerFit({ width, searchBoxPx, clearHighlight = false, viewMenu = false, touch = false, }) {
53
+ const fit = Object.fromEntries(SHEDDABLE.map(([k]) => [k, true]));
54
+ if (width === undefined) {
55
+ return fit;
56
+ }
57
+ const room = width -
58
+ (clearHighlight ? CLEAR_HIGHLIGHT_PX : 0) -
59
+ (viewMenu ? VIEW_MENU_PX : 0);
60
+ let need = ROW_WITHOUT_SEARCH_PX + searchBoxPx - (touch ? TOUCH_ABSENT_PX : 0);
61
+ for (const [key, saves] of SHEDDABLE) {
62
+ if (need <= room) {
63
+ break;
64
+ }
65
+ if (touch && TOUCH_ABSENT.has(key)) {
66
+ continue;
67
+ }
68
+ fit[key] = false;
69
+ need -= saves;
70
+ }
71
+ return fit;
72
+ }
@@ -1,5 +1,30 @@
1
+ import type { LinearGenomeViewModel } from './model.ts';
1
2
  import type PluginManager from '@jbrowse/core/PluginManager';
3
+ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
4
+ declare module '@jbrowse/core/PluginManager' {
5
+ interface ExtensionPointRegistry {
6
+ /** #extensionPoint LinearGenomeView-TracksContainerComponent | sync | Add a component into the LGV tracks container */
7
+ 'LinearGenomeView-TracksContainerComponent': ElementList<{
8
+ model: LinearGenomeViewModel;
9
+ }>;
10
+ /** #extensionPoint LinearGenomeView-ScalebarHighlightComponent | sync | Add a highlight component to the scalebar */
11
+ 'LinearGenomeView-ScalebarHighlightComponent': ElementList<{
12
+ model: LinearGenomeViewModel;
13
+ }>;
14
+ /** #extensionPoint LinearGenomeView-HighlightSVGComponent | sync | Add an SVG highlight overlay in the LGV SVG export */
15
+ 'LinearGenomeView-HighlightSVGComponent': ElementList<{
16
+ model: LinearGenomeViewModel;
17
+ height: number;
18
+ }>;
19
+ /** #extensionPoint LinearGenomeView-OverviewScalebarComponent | sync | Add a component to the overview scalebar */
20
+ 'LinearGenomeView-OverviewScalebarComponent': ElementList<{
21
+ model: LinearGenomeViewModel;
22
+ overview: ViewLayout;
23
+ }>;
24
+ }
25
+ }
2
26
  export default function LinearGenomeViewF(pluginManager: PluginManager): void;
3
- export * from './model.ts';
4
- export * from './types.ts';
5
- export { default as HighlightBand } from './components/HighlightBand.tsx';
27
+ export { stateModelFactory } from './model.ts';
28
+ export type { LinearGenomeViewModel, LinearGenomeViewStateModel, } from './model.ts';
29
+ export { installLinkedViewSync } from './linkedViewSync.ts';
30
+ export { default as HighlightChip } from './components/HighlightChip.tsx';
@@ -1,16 +1,22 @@
1
- import { lazy } from 'react';
2
1
  import { ViewType } from '@jbrowse/core/pluggableElementTypes';
3
- import { stateModelFactory } from "./model.js";
2
+ import { lazyWithPreload } from '@jbrowse/core/util/lazyWithPreload';
3
+ import { lgvLaunchKeys } from './launchKeys.js';
4
+ import { stateModelFactory } from './model.js';
4
5
  export default function LinearGenomeViewF(pluginManager) {
5
6
  pluginManager.addViewType(() => {
7
+ // annotated against the registry rather than inferred, which is what
8
+ // makes a hand-written augmentation earn what `getViewType` promises
9
+ // its callers — see `ViewTypeRegistry`
10
+ const stateModel = stateModelFactory(pluginManager);
6
11
  return new ViewType({
7
12
  name: 'LinearGenomeView',
8
13
  displayName: 'Linear genome view',
9
- stateModel: stateModelFactory(pluginManager),
10
- ReactComponent: lazy(() => import("./components/LinearGenomeView.js")),
14
+ stateModel,
15
+ launchKeys: lgvLaunchKeys,
16
+ ReactComponent: lazyWithPreload(() => import('./components/LinearGenomeView.js')),
11
17
  });
12
18
  });
13
19
  }
14
- export * from "./model.js";
15
- export * from "./types.js";
16
- export { default as HighlightBand } from "./components/HighlightBand.js";
20
+ export { stateModelFactory } from './model.js';
21
+ export { installLinkedViewSync } from './linkedViewSync.js';
22
+ export { default as HighlightChip } from './components/HighlightChip.js';
@@ -1,2 +1,11 @@
1
1
  import type { LinearGenomeViewModel } from './model.ts';
2
+ /**
3
+ * Sets up keyboard shortcuts for the LinearGenomeView
4
+ * - Ctrl/Cmd + ArrowLeft: slide left
5
+ * - Ctrl/Cmd + ArrowRight: slide right
6
+ * - Ctrl/Cmd + ArrowUp: zoom in
7
+ * - Ctrl/Cmd + ArrowDown: zoom out
8
+ * - Ctrl/Cmd + Shift + D: highlight the region in view
9
+ * - Ctrl/Cmd + Shift + M: go to the newest highlight
10
+ */
2
11
  export declare function setupKeyboardHandler(self: LinearGenomeViewModel): void;
@@ -1,9 +1,24 @@
1
1
  import { getSession } from '@jbrowse/core/util';
2
+ import { isTextEntryFocused } from '@jbrowse/core/util/isTextEntryFocused';
2
3
  import { addDisposer } from '@jbrowse/mobx-state-tree';
4
+ /**
5
+ * Sets up keyboard shortcuts for the LinearGenomeView
6
+ * - Ctrl/Cmd + ArrowLeft: slide left
7
+ * - Ctrl/Cmd + ArrowRight: slide right
8
+ * - Ctrl/Cmd + ArrowUp: zoom in
9
+ * - Ctrl/Cmd + ArrowDown: zoom out
10
+ * - Ctrl/Cmd + Shift + D: highlight the region in view
11
+ * - Ctrl/Cmd + Shift + M: go to the newest highlight
12
+ */
3
13
  export function setupKeyboardHandler(self) {
14
+ if (typeof document === 'undefined') {
15
+ return;
16
+ }
4
17
  function handler(e) {
5
18
  const session = getSession(self);
6
- if (session.focusedViewId === self.id && (e.ctrlKey || e.metaKey)) {
19
+ if (session.focusedViewId === self.id &&
20
+ (e.ctrlKey || e.metaKey) &&
21
+ !isTextEntryFocused()) {
7
22
  if (e.code === 'ArrowLeft') {
8
23
  e.preventDefault();
9
24
  self.slide(-0.9);
@@ -20,6 +35,15 @@ export function setupKeyboardHandler(self) {
20
35
  e.preventDefault();
21
36
  self.zoom(self.bpPerPx * 2);
22
37
  }
38
+ else if (e.shiftKey && e.code === 'KeyD') {
39
+ e.preventDefault();
40
+ self.highlightCurrentRegion();
41
+ session.notify('Region highlighted.', 'success');
42
+ }
43
+ else if (e.shiftKey && e.code === 'KeyM') {
44
+ e.preventDefault();
45
+ void self.navigateNewestHighlight();
46
+ }
23
47
  }
24
48
  }
25
49
  document.addEventListener('keydown', handler);
@@ -0,0 +1,2 @@
1
+ import type { InitState } from './types.ts';
2
+ export declare const lgvLaunchKeys: import("@jbrowse/core/util/withLaunchInput").LaunchKeyRegistration<InitState, "bpPerPx" | "offsetPx" | "showCytobandsSetting">;
@@ -0,0 +1,27 @@
1
+ import { defineLaunchKeys } from '@jbrowse/core/util/withLaunchInput';
2
+ // The argument is `Record<keyof InitState, LaunchKeySpec>`, so a command this
3
+ // view interprets and nobody registered here is a compile error rather than a
4
+ // key that partitions as a typo.
5
+ //
6
+ // `bpPerPx`/`offsetPx` are v4's viewport spelling from before it was stored as
7
+ // a window, and `showCytobandsSetting` its cytoband toggle. None is a declared
8
+ // property, so the partition would read them as typos; the model's own
9
+ // preProcessSnapshot still converts them, so a URL or saved spec naming them
10
+ // goes on working. Share links carry all three, so they stay.
11
+ //
12
+ // #launchKeys LinearGenomeView — the URL parameters page renders this list
13
+ // rather than restating it; each of these keys has its own `&param=` section
14
+ // there, which is why no description is attached here.
15
+ export const lgvLaunchKeys = defineLaunchKeys()({
16
+ loc: { kind: 'launch' },
17
+ grow: { kind: 'launch' },
18
+ showHitTrack: { kind: 'launch' },
19
+ assembly: { kind: 'launch' },
20
+ displayedRegionNames: { kind: 'launch' },
21
+ tracklist: { kind: 'launch' },
22
+ nav: { kind: 'launch' },
23
+ tracks: { kind: 'trackEntries' },
24
+ highlight: { kind: 'launch' },
25
+ }, {
26
+ passThrough: ['bpPerPx', 'offsetPx', 'showCytobandsSetting'],
27
+ });
@@ -3,21 +3,15 @@ export declare const ReturnToImportFormDialog: import("react").LazyExoticCompone
3
3
  clearView: () => void;
4
4
  };
5
5
  handleClose: () => void;
6
- }) => import("react/jsx-runtime").JSX.Element>;
6
+ }) => import("react").JSX.Element>;
7
7
  export declare const SequenceSearchDialog: import("react").LazyExoticComponent<({ model, handleClose, }: {
8
- model: {
9
- assemblyNames: string[];
10
- showTrack: (trackId: string) => void;
11
- };
8
+ model: import("./components/searchModes.ts").SequenceSearchModel;
12
9
  handleClose: () => void;
13
- }) => import("react/jsx-runtime").JSX.Element>;
10
+ }) => import("react").JSX.Element>;
14
11
  export declare const ExportSvgDialog: import("react").LazyExoticComponent<typeof import("./components/ExportSvgDialog.tsx").default>;
15
- export declare const GetSequenceDialog: import("react").LazyExoticComponent<({ model, handleClose, }: {
16
- model: {
17
- leftOffset?: import("./types.ts").BpOffset;
18
- rightOffset?: import("./types.ts").BpOffset;
19
- getSelectedRegions: (left?: import("./types.ts").BpOffset, right?: import("./types.ts").BpOffset) => import("@jbrowse/core/util").Region[];
20
- setOffsets: (left?: import("./types.ts").BpOffset, right?: import("./types.ts").BpOffset) => void;
21
- };
12
+ export declare const GetSequenceDialog: import("react").LazyExoticComponent<({ model, regions, handleClose, }: {
13
+ model: import("@jbrowse/mobx-state-tree").IAnyStateTreeNode;
14
+ regions: import("@jbrowse/core/util").Region[];
22
15
  handleClose: () => void;
23
- }) => import("react/jsx-runtime").JSX.Element>;
16
+ }) => import("react").JSX.Element>;
17
+ export declare const RegionWidthEditorDialog: import("react").LazyExoticComponent<typeof import("./components/RegionWidthEditorDialog.tsx").default>;
@@ -1,5 +1,6 @@
1
1
  import { lazy } from 'react';
2
2
  export const ReturnToImportFormDialog = lazy(() => import('@jbrowse/core/ui/ReturnToImportFormDialog'));
3
- export const SequenceSearchDialog = lazy(() => import("./components/SequenceSearchDialog.js"));
4
- export const ExportSvgDialog = lazy(() => import("./components/ExportSvgDialog.js"));
5
- export const GetSequenceDialog = lazy(() => import("./components/GetSequenceDialog.js"));
3
+ export const SequenceSearchDialog = lazy(() => import('./components/SequenceSearchDialog.js'));
4
+ export const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog.js'));
5
+ export const GetSequenceDialog = lazy(() => import('./components/GetSequenceDialog.js'));
6
+ export const RegionWidthEditorDialog = lazy(() => import('./components/RegionWidthEditorDialog.js'));
@@ -0,0 +1,12 @@
1
+ import type { LinearGenomeViewModel } from './model.ts';
2
+ import type { IStateTreeNode } from '@jbrowse/mobx-state-tree';
3
+ interface LinkableViews {
4
+ linkViews: boolean;
5
+ views: LinearGenomeViewModel[];
6
+ }
7
+ /**
8
+ * While `linkViews` is on, replay each pan, zoom and track toggle made on one
9
+ * sub-view onto every other, with the same arguments.
10
+ */
11
+ export declare function installLinkedViewSync(self: IStateTreeNode & LinkableViews): void;
12
+ export {};
@@ -0,0 +1,36 @@
1
+ import { addDisposer, addMiddleware } from '@jbrowse/mobx-state-tree';
2
+ const LINKED_ACTIONS = [
3
+ 'horizontalScroll',
4
+ 'zoomTo',
5
+ 'showTrack',
6
+ 'toggleTrack',
7
+ 'launchTrack',
8
+ 'launchToggleTrack',
9
+ 'hideTrack',
10
+ 'setTrackLabels',
11
+ 'setShowCenterLine',
12
+ ];
13
+ function isLinkedAction(name) {
14
+ return LINKED_ACTIONS.includes(name);
15
+ }
16
+ /**
17
+ * While `linkViews` is on, replay each pan, zoom and track toggle made on one
18
+ * sub-view onto every other, with the same arguments.
19
+ */
20
+ export function installLinkedViewSync(self) {
21
+ addDisposer(self, addMiddleware(self, (call, next) => {
22
+ next(call);
23
+ const { name, args, context } = call;
24
+ if (call.type === 'action' &&
25
+ call.id === call.rootId &&
26
+ self.linkViews &&
27
+ isLinkedAction(name)) {
28
+ for (const view of self.views) {
29
+ if (view !== context) {
30
+ const action = view[name];
31
+ void action(...args);
32
+ }
33
+ }
34
+ }
35
+ }));
36
+ }
@@ -1,7 +1,30 @@
1
1
  import type { LinearGenomeViewModel } from './model.ts';
2
2
  import type { BpOffset } from './types.ts';
3
3
  import type { MenuItem } from '@jbrowse/core/ui';
4
- export declare function rewriteOnClicks(self: LinearGenomeViewModel, trackType: string, viewMenuActions: MenuItem[]): void;
4
+ export declare function zoomMenuItems(self: LinearGenomeViewModel): MenuItem[];
5
+ export declare function buildHighlightsSubMenuItems(self: LinearGenomeViewModel): MenuItem[];
6
+ /**
7
+ * Build the main view menu items. A row stacked in another view has no import
8
+ * form of its own, so only a top-level view offers the way back to one.
9
+ */
5
10
  export declare function buildMenuItems(self: LinearGenomeViewModel): MenuItem[];
6
- export declare function buildRubberBandMenuItems(self: LinearGenomeViewModel): MenuItem[];
11
+ /**
12
+ * Open a copy of the view, tracks and their settings included, framed on the
13
+ * span between two offsets. The same copy as the view menu's "Copy view", and
14
+ * nothing links it back to the original.
15
+ */
16
+ export declare function openSpanInNewView(view: LinearGenomeViewModel, start?: BpOffset, end?: BpOffset): import("@jbrowse/core/util").AbstractViewModel | undefined;
17
+ /**
18
+ * Build rubberband selection menu items. What a selection can open collects
19
+ * under one "Launch" submenu, which sorts last, below any row a plugin appends
20
+ * to the menu itself: a new linear genome view of the span first, then
21
+ * `launchItems`, the plugin-supplied ones (`rubberBandLaunchMenuItems()`).
22
+ *
23
+ * The new view is a copy of this one, so only a top-level view offers it: a row
24
+ * of a comparative view carries that view's framing, such as a hidden header.
25
+ */
26
+ export declare function buildRubberBandMenuItems(self: LinearGenomeViewModel, launchItems: MenuItem[]): MenuItem[];
27
+ /**
28
+ * Build rubberband click menu items (single click on rubberband area)
29
+ */
7
30
  export declare function buildRubberbandClickMenuItems(self: LinearGenomeViewModel, clickOffset: BpOffset): MenuItem[];