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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +104 -65
  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 +250 -121
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +16 -7
  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 +144 -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 +7 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -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 +32 -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 +16 -7
  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 +67 -51
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +19 -23
  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 +9 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +15 -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 +6 -5
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +13 -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 +26 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
  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 +84 -79
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -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 +61 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -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/Rubberband.d.ts +1 -1
  81. package/esm/LinearGenomeView/components/Rubberband.js +13 -16
  82. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  83. package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
  84. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
  85. package/esm/LinearGenomeView/components/Scalebar.js +16 -21
  86. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  87. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  88. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
  90. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  91. package/esm/LinearGenomeView/components/SearchBox.js +58 -66
  92. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  93. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  94. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
  95. package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
  96. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
  97. package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
  98. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  99. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  102. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  103. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  104. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
  105. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  106. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  107. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  108. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  109. package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
  110. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  111. package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
  112. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  113. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  114. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  115. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  116. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  117. package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
  118. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  119. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  120. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
  121. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
  122. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  123. package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
  124. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
  126. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  127. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  128. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  129. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  130. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  131. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  132. package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
  133. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  134. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  135. package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
  136. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  137. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  138. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  139. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  140. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
  141. package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
  142. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  143. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  144. package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
  145. package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
  146. package/esm/LinearGenomeView/components/util.d.ts +20 -6
  147. package/esm/LinearGenomeView/components/util.js +27 -6
  148. package/esm/LinearGenomeView/consts.d.ts +7 -2
  149. package/esm/LinearGenomeView/consts.js +18 -2
  150. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  151. package/esm/LinearGenomeView/flyTo.js +135 -0
  152. package/esm/LinearGenomeView/headerFit.d.ts +27 -0
  153. package/esm/LinearGenomeView/headerFit.js +59 -0
  154. package/esm/LinearGenomeView/index.d.ts +32 -2
  155. package/esm/LinearGenomeView/index.js +16 -6
  156. package/esm/LinearGenomeView/initKeys.d.ts +12 -0
  157. package/esm/LinearGenomeView/initKeys.js +68 -0
  158. package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
  159. package/esm/LinearGenomeView/keyboardHandler.js +10 -0
  160. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  161. package/esm/LinearGenomeView/launchKeys.js +23 -0
  162. package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
  163. package/esm/LinearGenomeView/lazyDialogs.js +3 -3
  164. package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
  165. package/esm/LinearGenomeView/linkedViewSync.js +58 -0
  166. package/esm/LinearGenomeView/menuItems.d.ts +27 -2
  167. package/esm/LinearGenomeView/menuItems.js +137 -101
  168. package/esm/LinearGenomeView/model.d.ts +3238 -136
  169. package/esm/LinearGenomeView/model.js +2425 -528
  170. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  171. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  172. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  173. package/esm/LinearGenomeView/showRegionsWithUndo.js +44 -0
  174. package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
  175. package/esm/LinearGenomeView/stickyChrome.js +30 -0
  176. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  177. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
  178. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
  179. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
  180. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  181. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  185. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +77 -41
  186. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  187. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
  188. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  189. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
  190. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  191. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
  192. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  193. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
  194. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  195. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
  197. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -21
  198. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  199. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  200. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  201. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  202. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  203. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  204. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  205. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +263 -0
  206. package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
  207. package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
  208. package/esm/LinearGenomeView/types.d.ts +17 -31
  209. package/esm/LinearGenomeView/types.js +1 -0
  210. package/esm/LinearGenomeView/util.d.ts +332 -12
  211. package/esm/LinearGenomeView/util.js +606 -62
  212. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  213. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
  214. package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
  215. package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
  216. package/esm/MultiLevelRubberband/index.d.ts +2 -0
  217. package/esm/MultiLevelRubberband/index.js +1 -0
  218. package/esm/MultiLevelRubberband/types.d.ts +6 -0
  219. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
  220. package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
  221. package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
  222. package/esm/displayKitTests/perRegionTestEnv.js +138 -0
  223. package/esm/index.d.ts +122 -1235
  224. package/esm/index.js +101 -24
  225. package/esm/lazyPluginExports.d.ts +23 -0
  226. package/esm/lazyPluginExports.js +36 -0
  227. package/esm/searchUtils.d.ts +55 -11
  228. package/esm/searchUtils.js +342 -45
  229. package/esm/shared/RubberbandSpan.d.ts +15 -0
  230. package/esm/shared/RubberbandSpan.js +33 -0
  231. package/esm/shared/coordLabels.d.ts +40 -0
  232. package/esm/shared/coordLabels.js +119 -0
  233. package/package.json +18 -19
  234. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  235. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  236. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  237. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  238. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  239. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  240. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  241. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  242. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  243. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  244. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  245. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  246. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  247. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  248. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  249. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  250. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  251. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  252. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  253. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  254. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  255. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  256. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  257. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  258. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  260. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  261. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  262. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  263. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  264. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  265. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  266. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  267. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  268. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  269. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  270. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  271. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  272. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  273. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  274. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  275. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  276. package/esm/BaseLinearDisplay/components/util.js +0 -107
  277. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  278. package/esm/BaseLinearDisplay/index.js +0 -13
  279. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  280. package/esm/BaseLinearDisplay/model.js +0 -432
  281. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  282. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  283. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  284. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  285. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  286. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  287. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  288. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  289. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  290. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  291. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  292. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  293. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  294. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  295. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  296. package/esm/BaseLinearDisplay/models/util.js +0 -43
  297. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  298. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  299. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  300. package/esm/BaseLinearDisplay/types.js +0 -3
  301. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  302. package/esm/BaseLinearDisplay/util.js +0 -71
  303. package/esm/BasicTrack/configSchema.d.ts +0 -85
  304. package/esm/BasicTrack/configSchema.js +0 -8
  305. package/esm/BasicTrack/index.d.ts +0 -2
  306. package/esm/BasicTrack/index.js +0 -12
  307. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  308. package/esm/LinearBareDisplay/configSchema.js +0 -11
  309. package/esm/LinearBareDisplay/index.d.ts +0 -4
  310. package/esm/LinearBareDisplay/index.js +0 -20
  311. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  312. package/esm/LinearBareDisplay/model.js +0 -32
  313. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  314. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  315. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  316. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  317. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  318. package/esm/LinearBasicDisplay/index.js +0 -20
  319. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  320. package/esm/LinearBasicDisplay/model.js +0 -158
  321. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  322. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  323. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  324. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  325. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  326. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  327. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  328. package/esm/LinearFeatureDisplay/index.js +0 -2
  329. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  330. package/esm/LinearFeatureDisplay/model.js +0 -305
  331. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  332. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  333. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  334. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  335. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  336. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  337. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  338. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  339. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  340. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  345. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  346. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  347. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  348. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  349. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  350. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  351. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  352. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  353. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  354. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  355. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  356. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  357. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
@@ -1,5 +0,0 @@
1
- export default function LoadingOverlay({ statusMessage, children, height, }: {
2
- statusMessage?: string;
3
- children?: React.ReactNode;
4
- height?: number;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,49 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx, keyframes, makeStyles } from '@jbrowse/core/util/tss-react';
3
- const useStyles = makeStyles()({
4
- container: {
5
- position: 'relative',
6
- width: '100%',
7
- height: '100%',
8
- minHeight: 20,
9
- },
10
- overlay: {
11
- position: 'absolute',
12
- top: 0,
13
- left: 0,
14
- right: 0,
15
- bottom: 0,
16
- backgroundColor: 'rgba(255, 255, 255, 0.15)',
17
- backgroundImage: 'repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0, 0, 0, 0.05) 8px, rgba(0, 0, 0, 0.05) 16px)',
18
- pointerEvents: 'none',
19
- zIndex: 1,
20
- display: 'flex',
21
- justifyContent: 'center',
22
- alignItems: 'center',
23
- opacity: 0,
24
- },
25
- visible: {
26
- opacity: 1,
27
- },
28
- dots: {
29
- fontSize: '0.8rem',
30
- fontWeight: 300,
31
- '&::after': {
32
- display: 'inline-block',
33
- content: '""',
34
- width: '1em',
35
- textAlign: 'left',
36
- animation: `${keyframes `
37
- 0% { content: ''; }
38
- 25% { content: '.'; }
39
- 50% { content: '..'; }
40
- 75% { content: '...'; }
41
- `} 1.2s infinite ease-in-out`,
42
- },
43
- },
44
- });
45
- export default function LoadingOverlay({ statusMessage, children, height, }) {
46
- const { classes } = useStyles();
47
- const isLoading = !!statusMessage;
48
- return (_jsxs("div", { className: classes.container, style: height ? { minHeight: height } : undefined, children: [children, _jsx("span", { className: cx(classes.overlay, isLoading && classes.visible), "data-testid": isLoading ? 'loading-overlay' : undefined, children: _jsx("span", { className: classes.dots, children: statusMessage || 'Loading' }) })] }));
49
- }
@@ -1,4 +0,0 @@
1
- declare const MaxHeightReached: import("react").MemoExoticComponent<({ top, }: {
2
- top: number;
3
- }) => import("react/jsx-runtime").JSX.Element>;
4
- export default MaxHeightReached;
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- const useStyles = makeStyles()({
5
- heightOverflowed: {
6
- position: 'absolute',
7
- color: 'rgb(77,77,77)',
8
- borderBottom: '2px solid rgb(77,77,77)',
9
- textShadow: 'white 0px 0px 1px',
10
- whiteSpace: 'nowrap',
11
- width: '100%',
12
- fontWeight: 'bold',
13
- textAlign: 'center',
14
- zIndex: 999,
15
- boxSizing: 'border-box',
16
- },
17
- });
18
- const MaxHeightReached = memo(function MaxHeightReached({ top, }) {
19
- const { classes } = useStyles();
20
- return (_jsx("div", { className: classes.heightOverflowed, style: {
21
- top,
22
- pointerEvents: 'none',
23
- height: 16,
24
- }, children: "Max height reached" }));
25
- });
26
- export default MaxHeightReached;
@@ -1,8 +0,0 @@
1
- import type { Coord } from './types.ts';
2
- import type { BaseLinearDisplayModel } from '../model.ts';
3
- declare const MenuPage: ({ onClose, contextCoord, model, }: {
4
- model: BaseLinearDisplayModel;
5
- contextCoord: Coord;
6
- onClose: () => void;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export default MenuPage;
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Menu } from '@jbrowse/core/ui';
3
- import { observer } from 'mobx-react';
4
- const MenuPage = observer(function MenuPage({ onClose, contextCoord, model, }) {
5
- const items = model.contextMenuItems();
6
- return (_jsx(Menu, { open: items.length > 0, onMenuItemClick: (_, callback) => {
7
- callback();
8
- onClose();
9
- }, onClose: () => {
10
- onClose();
11
- model.setContextMenuFeature(undefined);
12
- }, slotProps: {
13
- transition: {
14
- onExit: () => {
15
- onClose();
16
- model.setContextMenuFeature(undefined);
17
- },
18
- },
19
- }, anchorReference: "anchorPosition", anchorPosition: {
20
- top: contextCoord[1],
21
- left: contextCoord[0],
22
- }, menuItems: items }));
23
- });
24
- export default MenuPage;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import type { LegendItem } from '../model.ts';
3
- export interface NonBlockCanvasDisplayModel {
4
- error?: unknown;
5
- regionTooLarge?: boolean;
6
- reload: () => void;
7
- regionCannotBeRendered: () => React.ReactElement | null;
8
- drawn: boolean;
9
- loading: boolean;
10
- lastDrawnOffsetPx?: number;
11
- lastDrawnBpPerPx?: number;
12
- statusMessage?: string;
13
- showLegend?: boolean;
14
- legendItems?: () => LegendItem[];
15
- height: number;
16
- }
17
- declare const NonBlockCanvasDisplayComponent: ({ model, children, }: {
18
- model: NonBlockCanvasDisplayModel;
19
- children?: React.ReactNode;
20
- }) => import("react/jsx-runtime").JSX.Element | null;
21
- export default NonBlockCanvasDisplayComponent;
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { LoadingEllipses } from '@jbrowse/core/ui';
4
- import { getContainingView } from '@jbrowse/core/util';
5
- import { makeStyles } from '@jbrowse/core/util/tss-react';
6
- import { observer } from 'mobx-react';
7
- import BlockErrorMessage from "./BlockErrorMessage.js";
8
- import FloatingLegend from "./FloatingLegend.js";
9
- const useStyles = makeStyles()({
10
- loading: {
11
- position: 'absolute',
12
- top: 0,
13
- left: 0,
14
- right: 0,
15
- bottom: 0,
16
- backgroundColor: 'rgba(255, 255, 255, 0.15)',
17
- backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0, 0, 0, 0.05) 8px, rgba(0, 0, 0, 0.05) 16px)`,
18
- pointerEvents: 'none',
19
- display: 'flex',
20
- justifyContent: 'center',
21
- alignItems: 'center',
22
- zIndex: 1,
23
- },
24
- loadingMessage: {
25
- zIndex: 2,
26
- pointerEvents: 'none',
27
- },
28
- });
29
- const NonBlockCanvasDisplayComponent = observer(function NonBlockCanvasDisplayComponent({ model, children, }) {
30
- const { error, regionTooLarge } = model;
31
- return error ? (_jsx(BlockErrorMessage, { model: model })) : regionTooLarge ? (model.regionCannotBeRendered()) : (_jsx(DataDisplay, { model: model, children: children }));
32
- });
33
- const DataDisplay = observer(function DataDisplay({ model, children, }) {
34
- const { drawn, loading, showLegend, legendItems, lastDrawnBpPerPx, height } = model;
35
- const view = getContainingView(model);
36
- const items = legendItems?.() ?? [];
37
- const hasZoomed = lastDrawnBpPerPx !== undefined && lastDrawnBpPerPx !== view.bpPerPx;
38
- const calculatedLeft = hasZoomed
39
- ? 0
40
- : (model.lastDrawnOffsetPx ?? 0) - view.offsetPx;
41
- return (_jsxs("div", { "data-testid": `drawn-${drawn}`, style: { position: 'relative', height }, children: [_jsx("div", { style: {
42
- position: 'absolute',
43
- left: calculatedLeft,
44
- visibility: hasZoomed ? 'hidden' : undefined,
45
- }, children: children }), showLegend && items.length > 0 ? _jsx(FloatingLegend, { items: items }) : null, hasZoomed || calculatedLeft !== 0 || loading ? (_jsx(LoadingBar, { model: model })) : null] }));
46
- });
47
- const LoadingBar = observer(function LoadingBar({ model, }) {
48
- const { classes } = useStyles();
49
- const { statusMessage } = model;
50
- return (_jsx("div", { className: classes.loading, children: _jsx("div", { className: classes.loadingMessage, children: _jsx(LoadingEllipses, { message: statusMessage }) }) }));
51
- });
52
- export default NonBlockCanvasDisplayComponent;
@@ -1,12 +0,0 @@
1
- import type { BlockModel } from '../models/serverSideRenderedBlock.ts';
2
- import type { BlockSet } from '@jbrowse/core/util/blockTypes';
3
- declare const RenderedBlocks: ({ model, }: {
4
- model: {
5
- id: string;
6
- blockDefinitions: BlockSet;
7
- blockState: {
8
- get: (key: string) => BlockModel | undefined;
9
- };
10
- };
11
- }) => import("react/jsx-runtime").JSX.Element[];
12
- export default RenderedBlocks;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { observer } from 'mobx-react';
3
- import { ContentBlock as ContentBlockComponent, ElidedBlock as ElidedBlockComponent, InterRegionPaddingBlock as InterRegionPaddingBlockComponent, } from "./Block.js";
4
- import MaxHeightReached from "./MaxHeightReachedIndicator.js";
5
- const RenderedBlocks = observer(function RenderedBlocks({ model, }) {
6
- const { blockDefinitions, blockState } = model;
7
- return blockDefinitions.map(block => {
8
- const key = `${model.id}-${block.key}`;
9
- if (block.type === 'ContentBlock') {
10
- const state = blockState.get(block.key);
11
- return (_jsxs(ContentBlockComponent, { block: block, children: [state?.ReactComponent ? (_jsx(state.ReactComponent, { model: state })) : null, state?.maxHeightReached ? (_jsx(MaxHeightReached, { top: state.layout.getTotalHeight() - 16 })) : null] }, key));
12
- }
13
- else if (block.type === 'ElidedBlock') {
14
- return _jsx(ElidedBlockComponent, { width: block.widthPx }, key);
15
- }
16
- else if (block.type === 'InterRegionPaddingBlock') {
17
- return (_jsx(InterRegionPaddingBlockComponent, { width: block.widthPx, style: { background: 'none' }, boundary: block.variant === 'boundary' }, key));
18
- }
19
- throw new Error(`invalid block type ${JSON.stringify(block)}`);
20
- });
21
- });
22
- export default RenderedBlocks;
@@ -1,12 +0,0 @@
1
- declare const ServerSideRenderedBlockContent: ({ model, }: {
2
- model: {
3
- error?: unknown;
4
- reload: () => void;
5
- message?: React.ReactNode;
6
- statusMessage?: string;
7
- reactElement?: React.ReactElement;
8
- isRenderingPending?: boolean;
9
- displayHeight?: number;
10
- };
11
- }) => import("react/jsx-runtime").JSX.Element;
12
- export default ServerSideRenderedBlockContent;
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Suspense, isValidElement, lazy } from 'react';
3
- import { observer } from 'mobx-react';
4
- import BlockMsg from "./BlockMsg.js";
5
- import LoadingOverlay from "./LoadingOverlay.js";
6
- const BlockErrorMessage = lazy(() => import("./BlockErrorMessage.js"));
7
- const ServerSideRenderedBlockContent = observer(function ServerSideRenderedBlockContent({ model, }) {
8
- if (model.error) {
9
- return (_jsx(Suspense, { fallback: null, children: _jsx(BlockErrorMessage, { model: model }) }));
10
- }
11
- else if (model.message) {
12
- return isValidElement(model.message) ? (model.message) : (_jsx(BlockMsg, { message: `${model.message}`, severity: "info" }));
13
- }
14
- else {
15
- return (_jsx(LoadingOverlay, { statusMessage: model.statusMessage, height: model.displayHeight, children: model.reactElement }));
16
- }
17
- });
18
- export default ServerSideRenderedBlockContent;
@@ -1,10 +0,0 @@
1
- import type { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- declare const TooLargeMessage: ({ model, }: {
3
- model: {
4
- regionTooLargeReason: string;
5
- featureDensityStats?: FeatureDensityStats;
6
- setFeatureDensityStatsLimit: (s?: FeatureDensityStats) => void;
7
- reload: () => void;
8
- };
9
- }) => import("react/jsx-runtime").JSX.Element;
10
- export default TooLargeMessage;
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { isAlive } from '@jbrowse/mobx-state-tree';
3
- import { Button } from '@mui/material';
4
- import { observer } from 'mobx-react';
5
- import BlockMsg from "../components/BlockMsg.js";
6
- const TooLargeMessage = observer(function TooLargeMessage({ model, }) {
7
- const { regionTooLargeReason } = model;
8
- return (_jsx(BlockMsg, { severity: "warning", action: _jsx(Button, { onClick: () => {
9
- if (isAlive(model)) {
10
- model.setFeatureDensityStatsLimit(model.featureDensityStats);
11
- model.reload();
12
- }
13
- }, children: "Force load" }), message: [
14
- regionTooLargeReason,
15
- 'Zoom in to see features or force load (may be slow)',
16
- ]
17
- .filter(f => !!f)
18
- .join('. ') }));
19
- });
20
- export default TooLargeMessage;
@@ -1,13 +0,0 @@
1
- import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
- import type { Feature } from '@jbrowse/core/util';
3
- type Coord = [number, number];
4
- declare const Tooltip: ({ model, clientMouseCoord, }: {
5
- model: {
6
- featureUnderMouse: Feature | undefined;
7
- featureIdUnderMouse: string | undefined;
8
- mouseoverExtraInformation: string | undefined;
9
- configuration: AnyConfigurationModel;
10
- };
11
- clientMouseCoord: Coord;
12
- }) => import("react/jsx-runtime").JSX.Element | null;
13
- export default Tooltip;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, isValidElement, useMemo } from 'react';
3
- import { getConf } from '@jbrowse/core/configuration';
4
- import { SanitizedHTML } from '@jbrowse/core/ui';
5
- import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
6
- import { observer } from 'mobx-react';
7
- const TooltipContents = forwardRef(function TooltipContents2({ message }, ref) {
8
- return (_jsx("div", { ref: ref, children: isValidElement(message) ? (message) : message ? (_jsx(SanitizedHTML, { html: String(message) })) : null }));
9
- });
10
- const Tooltip = observer(function Tooltip({ model, clientMouseCoord, }) {
11
- const { featureUnderMouse, featureIdUnderMouse, mouseoverExtraInformation } = model;
12
- const x = clientMouseCoord[0] + 15;
13
- const y = clientMouseCoord[1];
14
- const contents = useMemo(() => featureUnderMouse && mouseoverExtraInformation
15
- ? getConf(model, 'mouseover', {
16
- feature: featureUnderMouse,
17
- mouseoverExtraInformation,
18
- })
19
- : undefined, [featureUnderMouse, model, mouseoverExtraInformation]);
20
- return featureIdUnderMouse && contents ? (_jsx(BaseTooltip, { clientPoint: { x, y }, children: _jsx(TooltipContents, { message: contents }) })) : null;
21
- });
22
- export default Tooltip;
@@ -1 +0,0 @@
1
- export type Coord = [number, number];
@@ -1,21 +0,0 @@
1
- import type { LinearGenomeViewModel } from '../../LinearGenomeView/index.ts';
2
- import type { FloatingLabelData, LayoutRecord } from '../types.ts';
3
- import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
4
- export interface FeatureLabelData {
5
- leftPx: number;
6
- topPx: number;
7
- totalFeatureHeight: number;
8
- floatingLabels: FloatingLabelData[];
9
- featureWidth: number;
10
- }
11
- interface RenderingWithLayout {
12
- layout?: {
13
- getRectangles?: () => Map<string, LayoutRecord>;
14
- };
15
- }
16
- export declare function collectLayoutsFromRenderings(renderings: readonly (readonly [unknown, RenderingWithLayout])[]): Map<string, LayoutRecord>[];
17
- export declare function deduplicateFeatureLabels(layoutFeatures: {
18
- entries(): IterableIterator<readonly [string, LayoutRecord | undefined]>;
19
- }, view: LinearGenomeViewModel, assembly: Assembly | undefined, bpPerPx: number): Map<string, FeatureLabelData>;
20
- export declare function calculateFloatingLabelPosition(featureLeftPx: number, featureRightPx: number, labelWidth: number, offsetPx: number): number;
21
- export {};
@@ -1,107 +0,0 @@
1
- import { clamp } from '@jbrowse/core/util';
2
- export function collectLayoutsFromRenderings(renderings) {
3
- const layoutMaps = [];
4
- for (const [, rendering] of renderings) {
5
- if (rendering.layout?.getRectangles) {
6
- layoutMaps.push(rendering.layout.getRectangles());
7
- }
8
- }
9
- return layoutMaps;
10
- }
11
- function calculateFeatureLeftPx(view, assembly, refName, left, right, bpPerPx) {
12
- const canonicalRefName = assembly?.getCanonicalRefName(refName) || refName;
13
- const leftBpPx = view.bpToPx({
14
- refName: canonicalRefName,
15
- coord: left,
16
- })?.offsetPx;
17
- const rightBpPx = view.bpToPx({
18
- refName: canonicalRefName,
19
- coord: right,
20
- })?.offsetPx;
21
- if (leftBpPx !== undefined) {
22
- const rightEstimate = rightBpPx !== undefined ? rightBpPx : leftBpPx + (right - left) / bpPerPx;
23
- return Math.min(leftBpPx, rightEstimate);
24
- }
25
- else if (rightBpPx !== undefined) {
26
- const leftEstimate = rightBpPx - (right - left) / bpPerPx;
27
- return Math.min(leftEstimate, rightBpPx);
28
- }
29
- return undefined;
30
- }
31
- function calculateMultiRegionLeftPx(view, assembly, refName, left, right) {
32
- const canonicalRefName = assembly?.getCanonicalRefName(refName) || refName;
33
- const visibleRegions = view.displayedRegions.filter(r => r.refName === canonicalRefName && r.start < right && r.end > left);
34
- if (visibleRegions.length === 0) {
35
- return undefined;
36
- }
37
- let minLeftPx = Infinity;
38
- for (const region of visibleRegions) {
39
- const regionStart = Math.max(left, region.start);
40
- const regionEnd = Math.min(right, region.end);
41
- const startPx = view.bpToPx({
42
- refName: canonicalRefName,
43
- coord: regionStart,
44
- })?.offsetPx;
45
- const endPx = view.bpToPx({
46
- refName: canonicalRefName,
47
- coord: regionEnd,
48
- })?.offsetPx;
49
- if (startPx !== undefined && endPx !== undefined) {
50
- minLeftPx = Math.min(minLeftPx, startPx, endPx);
51
- }
52
- }
53
- if (minLeftPx === Infinity) {
54
- return undefined;
55
- }
56
- return minLeftPx;
57
- }
58
- function getFeatureLeftPx(view, assembly, refName, left, right, bpPerPx) {
59
- return (calculateFeatureLeftPx(view, assembly, refName, left, right, bpPerPx) ??
60
- calculateMultiRegionLeftPx(view, assembly, refName, left, right));
61
- }
62
- export function deduplicateFeatureLabels(layoutFeatures, view, assembly, bpPerPx) {
63
- const featureLabels = new Map();
64
- for (const [key, val] of layoutFeatures.entries()) {
65
- if (!val?.[4]) {
66
- continue;
67
- }
68
- const [, topPx, , , feature] = val;
69
- const { refName, floatingLabels, totalFeatureHeight, actualTopPx, featureWidth, featureStartBp, featureEndBp, } = feature;
70
- const effectiveTopPx = actualTopPx ?? topPx;
71
- if (!floatingLabels ||
72
- floatingLabels.length === 0 ||
73
- !totalFeatureHeight ||
74
- featureWidth === undefined ||
75
- featureStartBp === undefined ||
76
- featureEndBp === undefined) {
77
- continue;
78
- }
79
- const leftPx = getFeatureLeftPx(view, assembly, refName, featureStartBp, featureEndBp, bpPerPx);
80
- if (leftPx === undefined) {
81
- continue;
82
- }
83
- const floorLeftPx = Math.floor(leftPx);
84
- const existing = featureLabels.get(key);
85
- if (!existing || floorLeftPx < existing.leftPx) {
86
- featureLabels.set(key, {
87
- leftPx: floorLeftPx,
88
- topPx: effectiveTopPx,
89
- totalFeatureHeight,
90
- floatingLabels,
91
- featureWidth,
92
- });
93
- }
94
- }
95
- return featureLabels;
96
- }
97
- export function calculateFloatingLabelPosition(featureLeftPx, featureRightPx, labelWidth, offsetPx) {
98
- const featureWidth = featureRightPx - featureLeftPx;
99
- if (labelWidth > featureWidth) {
100
- return Math.round(featureLeftPx - offsetPx);
101
- }
102
- const viewportLeft = Math.max(0, offsetPx);
103
- const leftPx = Math.max(featureLeftPx, viewportLeft);
104
- const naturalX = leftPx - offsetPx;
105
- const maxX = featureRightPx - offsetPx - labelWidth;
106
- return Math.round(clamp(naturalX, 0, maxX));
107
- }
@@ -1,17 +0,0 @@
1
- export { default as baseLinearDisplayConfigSchema } from './models/configSchema.ts';
2
- export type { BlockModel } from './models/serverSideRenderedBlock.ts';
3
- export { BaseLinearDisplay } from './model.ts';
4
- export type { BaseLinearDisplayModel, BaseLinearDisplayStateModel, LegendItem, } from './model.ts';
5
- export type { ExportSvgDisplayOptions, FloatingLabelData, LayoutFeatureMetadata, } from './types.ts';
6
- export { createSubfeatureLabelMetadata } from './types.ts';
7
- export { BlockMsg, Tooltip, default as BaseLinearDisplayComponent, } from './components/BaseLinearDisplay.tsx';
8
- export { default as TrackHeightMixin } from './models/TrackHeightMixin.tsx';
9
- export { default as FeatureDensityMixin } from './models/FeatureDensityMixin.tsx';
10
- export { type NonBlockCanvasDisplayMixinType, default as NonBlockCanvasDisplayMixin, } from './models/NonBlockCanvasDisplayMixin.tsx';
11
- export { drawCanvasImageData } from './util.ts';
12
- export { default as TooLargeMessage } from './components/TooLargeMessage.tsx';
13
- export { default as FloatingLegend } from './components/FloatingLegend.tsx';
14
- export { default as NonBlockCanvasDisplayComponent } from './components/NonBlockCanvasDisplayComponent.tsx';
15
- export type { NonBlockCanvasDisplayModel } from './components/NonBlockCanvasDisplayComponent.tsx';
16
- export { default as SVGLegend } from './SVGLegend.tsx';
17
- export { calculateSvgLegendWidth } from './calculateSvgLegendWidth.ts';
@@ -1,13 +0,0 @@
1
- export { default as baseLinearDisplayConfigSchema } from "./models/configSchema.js";
2
- export { BaseLinearDisplay } from "./model.js";
3
- export { createSubfeatureLabelMetadata } from "./types.js";
4
- export { BlockMsg, Tooltip, default as BaseLinearDisplayComponent, } from "./components/BaseLinearDisplay.js";
5
- export { default as TrackHeightMixin } from "./models/TrackHeightMixin.js";
6
- export { default as FeatureDensityMixin } from "./models/FeatureDensityMixin.js";
7
- export { default as NonBlockCanvasDisplayMixin, } from "./models/NonBlockCanvasDisplayMixin.js";
8
- export { drawCanvasImageData } from "./util.js";
9
- export { default as TooLargeMessage } from "./components/TooLargeMessage.js";
10
- export { default as FloatingLegend } from "./components/FloatingLegend.js";
11
- export { default as NonBlockCanvasDisplayComponent } from "./components/NonBlockCanvasDisplayComponent.js";
12
- export { default as SVGLegend } from "./SVGLegend.js";
13
- export { calculateSvgLegendWidth } from "./calculateSvgLegendWidth.js";