@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.
- package/esm/FeatureTrack/configSchema.d.ts +104 -65
- package/esm/FeatureTrack/configSchema.js +47 -1
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
- package/esm/LaunchLinearGenomeView/index.js +6 -12
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +250 -121
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +16 -7
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +144 -0
- package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
- package/esm/LinearGenomeView/components/Cytobands.js +76 -53
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +7 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -67
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js +29 -58
- package/esm/LinearGenomeView/components/Header.d.ts +1 -1
- package/esm/LinearGenomeView/components/Header.js +32 -16
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.js +16 -7
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +67 -51
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +19 -23
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +15 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
- package/esm/LinearGenomeView/components/ImportForm.js +95 -61
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +6 -5
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +13 -10
- package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
- package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +84 -79
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -32
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
- package/esm/LinearGenomeView/components/PaddingBlocks.js +61 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +13 -16
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/Scalebar.js +16 -21
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +58 -66
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
- package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
- package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
- package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
- package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
- package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
- package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
- package/esm/LinearGenomeView/components/searchModes.js +22 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
- package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
- package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
- package/esm/LinearGenomeView/components/util.d.ts +20 -6
- package/esm/LinearGenomeView/components/util.js +27 -6
- package/esm/LinearGenomeView/consts.d.ts +7 -2
- package/esm/LinearGenomeView/consts.js +18 -2
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +27 -0
- package/esm/LinearGenomeView/headerFit.js +59 -0
- package/esm/LinearGenomeView/index.d.ts +32 -2
- package/esm/LinearGenomeView/index.js +16 -6
- package/esm/LinearGenomeView/initKeys.d.ts +12 -0
- package/esm/LinearGenomeView/initKeys.js +68 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +23 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +58 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +3238 -136
- package/esm/LinearGenomeView/model.js +2425 -528
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
- package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.js +44 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
- package/esm/LinearGenomeView/stickyChrome.js +30 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +77 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -21
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +263 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
- package/esm/LinearGenomeView/types.d.ts +17 -31
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +332 -12
- package/esm/LinearGenomeView/util.js +606 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
- package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +1 -0
- package/esm/MultiLevelRubberband/types.d.ts +6 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
- package/esm/displayKitTests/perRegionTestEnv.js +138 -0
- package/esm/index.d.ts +122 -1235
- package/esm/index.js +101 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +55 -11
- package/esm/searchUtils.js +342 -45
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +33 -0
- package/esm/shared/coordLabels.d.ts +40 -0
- package/esm/shared/coordLabels.js +119 -0
- package/package.json +18 -19
- package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
- package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
- package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/esm/BaseLinearDisplay/components/Block.js +0 -45
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
- package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
- package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/util.js +0 -107
- package/esm/BaseLinearDisplay/index.d.ts +0 -17
- package/esm/BaseLinearDisplay/index.js +0 -13
- package/esm/BaseLinearDisplay/model.d.ts +0 -1197
- package/esm/BaseLinearDisplay/model.js +0 -432
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
- package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
- package/esm/BaseLinearDisplay/models/util.js +0 -43
- package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
- package/esm/BaseLinearDisplay/renderSvg.js +0 -63
- package/esm/BaseLinearDisplay/types.d.ts +0 -43
- package/esm/BaseLinearDisplay/types.js +0 -3
- package/esm/BaseLinearDisplay/util.d.ts +0 -16
- package/esm/BaseLinearDisplay/util.js +0 -71
- package/esm/BasicTrack/configSchema.d.ts +0 -85
- package/esm/BasicTrack/configSchema.js +0 -8
- package/esm/BasicTrack/index.d.ts +0 -2
- package/esm/BasicTrack/index.js +0 -12
- package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBareDisplay/configSchema.js +0 -11
- package/esm/LinearBareDisplay/index.d.ts +0 -4
- package/esm/LinearBareDisplay/index.js +0 -20
- package/esm/LinearBareDisplay/model.d.ts +0 -1196
- package/esm/LinearBareDisplay/model.js +0 -32
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
- package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBasicDisplay/configSchema.js +0 -11
- package/esm/LinearBasicDisplay/index.d.ts +0 -4
- package/esm/LinearBasicDisplay/index.js +0 -20
- package/esm/LinearBasicDisplay/model.d.ts +0 -1391
- package/esm/LinearBasicDisplay/model.js +0 -158
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
- package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
- package/esm/LinearFeatureDisplay/configSchema.js +0 -11
- package/esm/LinearFeatureDisplay/index.d.ts +0 -3
- package/esm/LinearFeatureDisplay/index.js +0 -2
- package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
- package/esm/LinearFeatureDisplay/model.js +0 -305
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
- package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
- package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
- package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
- package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
- package/esm/LinearGenomeView/svgExportUtil.js +0 -6
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
- /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
1
|
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
|
-
declare
|
|
4
|
-
trackId: string;
|
|
2
|
+
declare const TrackLabelDragHandle: ({ track, }: {
|
|
5
3
|
track: BaseTrackModel;
|
|
6
|
-
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
8
5
|
export default TrackLabelDragHandle;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
2
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import DragIcon from '@mui/icons-material/DragIndicator';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
4
6
|
const useStyles = makeStyles()({
|
|
5
7
|
dragHandle: {
|
|
6
8
|
cursor: 'grab',
|
|
@@ -11,8 +13,10 @@ const useStyles = makeStyles()({
|
|
|
11
13
|
pointerEvents: 'none',
|
|
12
14
|
},
|
|
13
15
|
});
|
|
14
|
-
function TrackLabelDragHandle({
|
|
16
|
+
const TrackLabelDragHandle = observer(function TrackLabelDragHandle({ track, }) {
|
|
15
17
|
const { classes } = useStyles();
|
|
18
|
+
const view = getContainingView(track);
|
|
19
|
+
const trackId = track.trackId;
|
|
16
20
|
return (_jsx("span", { draggable: true, className: classes.dragHandle, onDragStart: event => {
|
|
17
21
|
const target = event.currentTarget;
|
|
18
22
|
if (target.parentNode) {
|
|
@@ -23,5 +27,5 @@ function TrackLabelDragHandle({ trackId, view, track, }) {
|
|
|
23
27
|
}, onDragEnd: () => {
|
|
24
28
|
view.setDraggingTrackId(undefined);
|
|
25
29
|
}, "data-testid": `dragHandle-${view.id}-${trackId}`, children: _jsx(DragIcon, { className: classes.dragHandleIcon, fontSize: "small" }) }));
|
|
26
|
-
}
|
|
30
|
+
});
|
|
27
31
|
export default TrackLabelDragHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
2
|
declare const TrackLabelMenu: ({ track, }: {
|
|
3
3
|
track: BaseTrackModel;
|
|
4
|
-
}) => import("react
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
5
5
|
export default TrackLabelMenu;
|
|
@@ -1,100 +1,47 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
2
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
4
3
|
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
5
|
-
import
|
|
6
|
-
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
7
|
-
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
8
|
-
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
9
|
-
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
10
5
|
import LowPriorityIcon from '@mui/icons-material/LowPriority';
|
|
11
|
-
import MinimizeIcon from '@mui/icons-material/Minimize';
|
|
12
6
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
13
|
-
import PushPinIcon from '@mui/icons-material/PushPin';
|
|
14
7
|
import { observer } from 'mobx-react';
|
|
8
|
+
import { getTrackOrderSubMenu } from './trackLabelMenuItems.js';
|
|
9
|
+
// IconButton's default 5px padding made this the tallest thing in the label
|
|
10
|
+
// (27px), so it, not the text or the other controls, set the label height and
|
|
11
|
+
// hence the offset the track body gets. 3px trims the label to 23px while
|
|
12
|
+
// keeping a hit area past the 17px icon; 2px reads as too compact.
|
|
13
|
+
const useStyles = makeStyles()({
|
|
14
|
+
menuButton: {
|
|
15
|
+
padding: 3,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
15
18
|
const TrackLabelMenu = observer(function TrackLabelMenu({ track, }) {
|
|
19
|
+
const { classes } = useStyles();
|
|
16
20
|
const view = getContainingView(track);
|
|
17
21
|
const session = getSession(track);
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const saveTrackData = trackMenuItems.find(item => 'label' in item && item.label === 'Save track data');
|
|
25
|
-
const remainingTrackMenuItems = trackMenuItems.filter(item => !('label' in item) || item.label !== 'Save track data');
|
|
26
|
-
const sessionItems = session.getTrackActionMenuItems?.(trackConf, saveTrackData ? [saveTrackData] : []) || [];
|
|
22
|
+
function getMenuItems() {
|
|
23
|
+
const orderSubMenu = getTrackOrderSubMenu({ view, track });
|
|
24
|
+
const sessionItems = session.getTrackActionMenuItems?.({
|
|
25
|
+
config: track.configuration,
|
|
26
|
+
view,
|
|
27
|
+
}) ?? [];
|
|
27
28
|
return [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
icon: LowPriorityIcon,
|
|
31
|
-
type: 'subMenu',
|
|
32
|
-
priority: 1000,
|
|
33
|
-
subMenu: [
|
|
34
|
-
...(!isTopLevelView
|
|
35
|
-
? []
|
|
36
|
-
: [
|
|
37
|
-
{
|
|
38
|
-
label: pinned ? 'Unpin track' : 'Pin track',
|
|
39
|
-
icon: PushPinIcon,
|
|
40
|
-
onClick: () => {
|
|
41
|
-
track.setPinned(!pinned);
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
]),
|
|
29
|
+
...(orderSubMenu.length
|
|
30
|
+
? [
|
|
45
31
|
{
|
|
46
|
-
label:
|
|
47
|
-
icon:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
32
|
+
label: 'Track order',
|
|
33
|
+
icon: LowPriorityIcon,
|
|
34
|
+
type: 'subMenu',
|
|
35
|
+
priority: 1000,
|
|
36
|
+
subMenu: orderSubMenu,
|
|
51
37
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
label: 'Move track to top',
|
|
56
|
-
icon: KeyboardDoubleArrowUpIcon,
|
|
57
|
-
onClick: () => {
|
|
58
|
-
view.moveTrackToTop(track.id);
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
]
|
|
62
|
-
: []),
|
|
63
|
-
...(view.tracks.length > 1
|
|
64
|
-
? [
|
|
65
|
-
{
|
|
66
|
-
label: 'Move track up',
|
|
67
|
-
icon: KeyboardArrowUpIcon,
|
|
68
|
-
onClick: () => {
|
|
69
|
-
view.moveTrackUp(track.id);
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: 'Move track down',
|
|
74
|
-
icon: KeyboardArrowDownIcon,
|
|
75
|
-
onClick: () => {
|
|
76
|
-
view.moveTrackDown(track.id);
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
]
|
|
80
|
-
: []),
|
|
81
|
-
...(view.tracks.length > 2
|
|
82
|
-
? [
|
|
83
|
-
{
|
|
84
|
-
label: 'Move track to bottom',
|
|
85
|
-
icon: KeyboardDoubleArrowDownIcon,
|
|
86
|
-
onClick: () => {
|
|
87
|
-
view.moveTrackToBottom(track.id);
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
]
|
|
91
|
-
: []),
|
|
92
|
-
],
|
|
93
|
-
},
|
|
38
|
+
]
|
|
39
|
+
: []),
|
|
94
40
|
...sessionItems,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
41
|
+
track.saveTrackDataMenuItem,
|
|
42
|
+
...track.trackMenuItems(),
|
|
43
|
+
].sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
44
|
+
}
|
|
45
|
+
return (_jsx(CascadingMenuButton, { menuItems: getMenuItems, className: classes.menuButton, "data-testid": "track_menu_icon", "data-trackid": track.trackId, tooltip: "Track settings", children: _jsx(MoreVertIcon, { fontSize: "small" }) }));
|
|
99
46
|
});
|
|
100
47
|
export default TrackLabelMenu;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
+
/**
|
|
3
|
+
* The track label's warning for a file whose reference names have nothing in
|
|
4
|
+
* common with the assembly's — the commonest data-configuration mistake in
|
|
5
|
+
* JBrowse, and until now a silent one: the track draws nothing and reads
|
|
6
|
+
* exactly like a track with no features in view.
|
|
7
|
+
*
|
|
8
|
+
* The label rather than the display chrome, deliberately. The chrome's states
|
|
9
|
+
* are `displayPhase`'s, which are mutually exclusive and two of which replace
|
|
10
|
+
* the display's subtree; a mismatch is neither an error to retry nor a phase to
|
|
11
|
+
* be in, and routing it through `model.error` would put a red banner and a dead
|
|
12
|
+
* Retry over a track that, if the check is ever wrong, is drawing fine. This
|
|
13
|
+
* sits next to the track's own close/minimize buttons, costs the display
|
|
14
|
+
* nothing, and reaches every track type at once.
|
|
15
|
+
*
|
|
16
|
+
* The tooltip is the summary and the dialog is the disclosure — a hover nobody
|
|
17
|
+
* performs is not a way of telling someone their data is misconfigured.
|
|
18
|
+
*/
|
|
19
|
+
declare const TrackLabelRefNameWarning: ({ track, }: {
|
|
20
|
+
track: BaseTrackModel;
|
|
21
|
+
}) => import("react").JSX.Element | null;
|
|
22
|
+
export default TrackLabelRefNameWarning;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { refNameMismatchMessage } from '@jbrowse/core/assemblyManager/assembly';
|
|
4
|
+
import { InfoDialog } from '@jbrowse/core/ui';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
+
import WarningIcon from '@mui/icons-material/Warning';
|
|
7
|
+
import { IconButton, Typography } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
const useStyles = makeStyles()(theme => ({
|
|
10
|
+
iconButton: {
|
|
11
|
+
padding: 0,
|
|
12
|
+
color: theme.palette.warning.main,
|
|
13
|
+
},
|
|
14
|
+
}));
|
|
15
|
+
/**
|
|
16
|
+
* The track label's warning for a file whose reference names have nothing in
|
|
17
|
+
* common with the assembly's — the commonest data-configuration mistake in
|
|
18
|
+
* JBrowse, and until now a silent one: the track draws nothing and reads
|
|
19
|
+
* exactly like a track with no features in view.
|
|
20
|
+
*
|
|
21
|
+
* The label rather than the display chrome, deliberately. The chrome's states
|
|
22
|
+
* are `displayPhase`'s, which are mutually exclusive and two of which replace
|
|
23
|
+
* the display's subtree; a mismatch is neither an error to retry nor a phase to
|
|
24
|
+
* be in, and routing it through `model.error` would put a red banner and a dead
|
|
25
|
+
* Retry over a track that, if the check is ever wrong, is drawing fine. This
|
|
26
|
+
* sits next to the track's own close/minimize buttons, costs the display
|
|
27
|
+
* nothing, and reaches every track type at once.
|
|
28
|
+
*
|
|
29
|
+
* The tooltip is the summary and the dialog is the disclosure — a hover nobody
|
|
30
|
+
* performs is not a way of telling someone their data is misconfigured.
|
|
31
|
+
*/
|
|
32
|
+
const TrackLabelRefNameWarning = observer(function TrackLabelRefNameWarning({ track, }) {
|
|
33
|
+
const { classes } = useStyles();
|
|
34
|
+
const [open, setOpen] = useState(false);
|
|
35
|
+
const { refNameMismatch } = track;
|
|
36
|
+
if (!refNameMismatch) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const message = refNameMismatchMessage(refNameMismatch);
|
|
40
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => {
|
|
41
|
+
setOpen(true);
|
|
42
|
+
}, className: classes.iconButton, title: message, "data-testid": `track-refname-warning-${track.trackId}`, children: _jsx(WarningIcon, { fontSize: "small" }) }), open ? (_jsxs(InfoDialog, { open: true, title: "Reference names do not match the assembly", onClose: () => {
|
|
43
|
+
setOpen(false);
|
|
44
|
+
}, children: [_jsx(Typography, { children: message }), _jsx(Typography, { variant: "body2", style: { marginTop: 8 }, children: "The track menu's \"About track\" shows every reference name the file uses." })] })) : null] }));
|
|
45
|
+
});
|
|
46
|
+
export default TrackLabelRefNameWarning;
|
|
@@ -1,45 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Suspense,
|
|
3
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, useCallback } from 'react';
|
|
3
|
+
import { LoadingOverlay } from '@jbrowse/core/ui';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
4
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
7
|
import { observer } from 'mobx-react';
|
|
8
|
+
import { MINIMIZED_TRACK_HEIGHT } from '../consts.js';
|
|
6
9
|
const useStyles = makeStyles()({
|
|
10
|
+
// aligns with block boundaries. check for example the breakpoint split view
|
|
11
|
+
// demo to see if features align if wanting to change things. the -1 left
|
|
12
|
+
// offset (cancels the Paper's 1px border) is applied inline since it's
|
|
13
|
+
// conditional on showTrackOutlines, the same condition the border is gated on
|
|
7
14
|
renderingComponentContainer: {
|
|
8
15
|
position: 'absolute',
|
|
9
|
-
left: -1,
|
|
10
16
|
height: '100%',
|
|
11
17
|
width: '100%',
|
|
12
18
|
},
|
|
19
|
+
// Tracks never scroll natively on this outer container — every display owns
|
|
20
|
+
// its own vertical scroll: canvas displays scroll an inner sticky-canvas
|
|
21
|
+
// container (FeatureComponent), while alignments and variants draw a custom
|
|
22
|
+
// VerticalScrollbar overlay and redraw the canvas at `scrollTop`. A native
|
|
23
|
+
// scroll port here only produced a *second*, spurious scrollbar whenever a
|
|
24
|
+
// display's absolutely-positioned overlays extended a pixel past `height`
|
|
25
|
+
// (the reported double/flickering/full-height scrollbars). So there is
|
|
26
|
+
// deliberately no `overflow` here: `contain: strict` includes paint
|
|
27
|
+
// containment, which clips to the padding box on its own, and adding an
|
|
28
|
+
// `overflow` would reintroduce the scroll container — one the browser can
|
|
29
|
+
// still scroll silently (focus, scrollIntoView, scroll anchoring) even with
|
|
30
|
+
// no scrollbar shown, desyncing track content from the scalebar.
|
|
31
|
+
//
|
|
32
|
+
// `contain: strict` is also what makes every piece of display chrome reach the
|
|
33
|
+
// track's overlay layer through `TrackOverlayPortal` — containment creates a
|
|
34
|
+
// stacking context, so nothing in here can paint above `PaddingBlocks`, which
|
|
35
|
+
// is a later sibling. That looks like a tax worth removing (swap for a bare
|
|
36
|
+
// `overflow: clip`, which clips without a scroll container AND without a
|
|
37
|
+
// stacking context, and the portals become plain z-indexes). It was measured:
|
|
38
|
+
// `browser-tests/probe-containment.ts`. Under DOM load that swap costs 2.6x
|
|
39
|
+
// paint time on a track height change and 4.0x on a pan, at identical paint
|
|
40
|
+
// counts. The stacking context IS the paint isolation — the two can't be
|
|
41
|
+
// separated, so the portal is the price of the isolation, not a workaround
|
|
42
|
+
// for it. Layout containment measured free; the paint half is the load-bearing
|
|
43
|
+
// one. ADR-058.
|
|
13
44
|
trackRenderingContainer: {
|
|
14
|
-
overflowY: 'auto',
|
|
15
|
-
overflowX: 'hidden',
|
|
16
45
|
whiteSpace: 'nowrap',
|
|
17
46
|
position: 'relative',
|
|
18
47
|
background: 'none',
|
|
19
48
|
contain: 'strict',
|
|
20
49
|
},
|
|
21
50
|
});
|
|
51
|
+
// The box every LGV display is mounted in, and the ONLY place in the tree where
|
|
52
|
+
// a track's pixels get a name and a role — one component rather than an
|
|
53
|
+
// `aria-label` per display type, the same way `TrackOverlaySlot` is one paint
|
|
54
|
+
// order rather than one per display.
|
|
55
|
+
//
|
|
56
|
+
// Its own observer for a measured reason. The "what is on screen" half of the
|
|
57
|
+
// name is the settled locstring, which changes whenever navigation settles; read
|
|
58
|
+
// from `TrackRenderingContainer` below, that would re-render every track's
|
|
59
|
+
// container (and re-run its `useStyles`) on every settle. Here the re-render is
|
|
60
|
+
// this one `<div>`: `children` is the same React element object the parent
|
|
61
|
+
// already handed it, so React bails out of the display's whole subtree.
|
|
62
|
+
//
|
|
63
|
+
// **`role="figure"`, not `role="img"`.** `img` is the textbook role for a canvas
|
|
64
|
+
// and would be right if the box held only pixels — but it makes every descendant
|
|
65
|
+
// presentational, and a display's chrome does not all portal out of the sandbox:
|
|
66
|
+
// alignments draws its group collapse/expand `<button>`s inline
|
|
67
|
+
// (`GroupLabelsOverlay`), which under `img` would be focusable and announced as
|
|
68
|
+
// nothing. `figure` names the box and keeps what is inside it reachable. Revisit
|
|
69
|
+
// if inline interactive chrome ever goes away.
|
|
70
|
+
const TrackDisplayRegion = observer(function TrackDisplayRegion({ model, track, children, ...divProps }) {
|
|
71
|
+
const trackName = getTrackName(track.configuration, getSession(track));
|
|
72
|
+
const loc = model.coarseVisibleLocStrings;
|
|
73
|
+
return (_jsx("div", { ...divProps, role: "figure", "aria-label": loc ? `${trackName} track, showing ${loc}` : `${trackName} track`, children: children }));
|
|
74
|
+
});
|
|
22
75
|
const TrackRenderingContainer = observer(function TrackRenderingContainer({ model, track, }) {
|
|
23
76
|
const { classes } = useStyles();
|
|
24
|
-
|
|
77
|
+
// an LGV track always holds at least one linear display (activeDisplay =
|
|
78
|
+
// displays[0]); narrow to the linear shape for height/RenderingComponent
|
|
79
|
+
const display = track.activeDisplay;
|
|
25
80
|
const { height, RenderingComponent, DisplayBlurb } = display;
|
|
26
|
-
const { trackRefs,
|
|
81
|
+
const { trackRefs, showTrackOutlines } = model;
|
|
27
82
|
const trackId = track.trackId;
|
|
28
|
-
const ref = useRef(null);
|
|
29
83
|
const minimized = track.minimized;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
84
|
+
// callback ref keeps trackRefs in sync as the rendering div mounts/unmounts
|
|
85
|
+
// (e.g. on minimize/restore), unlike a useEffect that misses the toggle
|
|
86
|
+
const setRef = useCallback((el) => {
|
|
87
|
+
if (el) {
|
|
88
|
+
trackRefs[trackId] = el;
|
|
33
89
|
}
|
|
34
|
-
|
|
90
|
+
else {
|
|
35
91
|
delete trackRefs[trackId];
|
|
36
|
-
}
|
|
92
|
+
}
|
|
37
93
|
}, [trackRefs, trackId]);
|
|
38
94
|
return (_jsx("div", { className: classes.trackRenderingContainer, style: {
|
|
39
|
-
height: minimized ?
|
|
40
|
-
},
|
|
41
|
-
transform: scaleFactor !== 1 ? `scaleX(${scaleFactor})` : undefined,
|
|
42
|
-
}, children: _jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
|
|
95
|
+
height: minimized ? MINIMIZED_TRACK_HEIGHT : height,
|
|
96
|
+
}, "data-testid": `trackRenderingContainer-${model.id}-${trackId}`, children: !minimized ? (_jsxs(_Fragment, { children: [_jsx(TrackDisplayRegion, { model: model, track: track, ref: setRef, className: classes.renderingComponentContainer, style: { left: showTrackOutlines ? -1 : 0 }, children: _jsx(Suspense, { fallback: _jsx(LoadingOverlay, { isVisible: true, immediate: true }), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
|
|
43
97
|
position: 'absolute',
|
|
44
98
|
left: 0,
|
|
45
99
|
top: display.height - 20,
|
|
@@ -1,49 +1,82 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy, useRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { PluggableElements } from '@jbrowse/core/ui';
|
|
4
|
+
import { OverlayPointerProvider } from '@jbrowse/core/ui/highlightChipReveal';
|
|
5
|
+
import { useMouseTracking } from '@jbrowse/core/ui/useMouseTracking';
|
|
6
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
5
7
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
8
|
+
import { useTheme } from '@mui/material';
|
|
6
9
|
import { observer } from 'mobx-react';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
import { SCALE_BAR_HEIGHT } from '../consts.js';
|
|
11
|
+
import Gridlines from './Gridlines.js';
|
|
12
|
+
import OverviewHighlightBand from './OverviewHighlightBand.js';
|
|
13
|
+
import PaddingBlocks from './PaddingBlocks.js';
|
|
14
|
+
import RangeSelectOverlay from './RangeSelectOverlay.js';
|
|
15
|
+
import Rubberband from './Rubberband.js';
|
|
16
|
+
import Scalebar from './Scalebar.js';
|
|
17
|
+
import VerticalGuide from './VerticalGuide.js';
|
|
18
|
+
import { useRangeSelect } from './useRangeSelect.js';
|
|
19
|
+
import { useSideScroll } from './useSideScroll.js';
|
|
20
|
+
import { getHighlightColor, highlightKey } from './util.js';
|
|
21
|
+
const CenterLine = lazy(() => import('./CenterLine.js'));
|
|
22
|
+
const Highlight = lazy(() => import('./Highlight.js'));
|
|
18
23
|
const useStyles = makeStyles()({
|
|
19
24
|
tracksContainer: {
|
|
20
25
|
position: 'relative',
|
|
21
26
|
contain: 'layout style',
|
|
22
27
|
},
|
|
28
|
+
scalebarHighlights: {
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: 0,
|
|
31
|
+
height: SCALE_BAR_HEIGHT,
|
|
32
|
+
width: '100%',
|
|
33
|
+
// above Rubberband div (825) so bands show over the scalebar,
|
|
34
|
+
// below RubberbandSpan (830) so the selection rect stays on top
|
|
35
|
+
zIndex: 826,
|
|
36
|
+
pointerEvents: 'none',
|
|
37
|
+
},
|
|
23
38
|
});
|
|
24
39
|
const TracksContainer = observer(function TracksContainer({ children, model, }) {
|
|
25
40
|
const { classes } = useStyles();
|
|
26
41
|
const { pluginManager } = getEnv(model);
|
|
27
|
-
const { mouseDown:
|
|
28
|
-
const {
|
|
42
|
+
const { mouseDown: sideScrollMouseDown, mouseUp } = useSideScroll(model);
|
|
43
|
+
const { showGridlines, showCenterLine } = model;
|
|
29
44
|
const ref = useRef(null);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
// shift-drag range select over the whole tracks area. This is intentionally
|
|
46
|
+
// a separate range-select instance from the one inside <Rubberband> (the
|
|
47
|
+
// scalebar control); don't dedupe them — they cover different regions.
|
|
48
|
+
const range = useRangeSelect(ref, model, true);
|
|
49
|
+
// published rather than held (see `useMouseTracking`): the highlight bands
|
|
50
|
+
// read it, and a position in state here would re-render the whole tracks area
|
|
51
|
+
// every frame the pointer moves over it
|
|
52
|
+
const { mouseTracker, handleMouseMove, handleMouseLeave } = useMouseTracking();
|
|
53
|
+
return (_jsx("div", { ref: ref, "data-testid": "tracksContainer", className: classes.tracksContainer, onMouseDown: event => {
|
|
54
|
+
sideScrollMouseDown(event);
|
|
55
|
+
range.mouseDown(event);
|
|
56
|
+
}, onMouseMove: event => {
|
|
57
|
+
handleMouseMove(event);
|
|
58
|
+
range.mouseMove(event);
|
|
59
|
+
}, onMouseLeave: () => {
|
|
60
|
+
handleMouseLeave();
|
|
61
|
+
range.mouseOut();
|
|
62
|
+
}, onMouseUp: mouseUp, children: _jsxs(OverlayPointerProvider, { value: mouseTracker, children: [showGridlines ? (_jsxs(_Fragment, { children: [_jsx(Gridlines, { model: model }), _jsx(PaddingBlocks, { model: model })] })) : null, _jsx(Suspense, { fallback: null, children: showCenterLine ? _jsx(CenterLine, { model: model }) : null }), _jsx(RangeSelectOverlay, { model: model, range: range }), model.volatileGuides.map((guide, idx) => (_jsx(VerticalGuide, { model: model, coordX: guide.xPos }, idx))), _jsx(Rubberband, { model: model, ControlComponent: _jsx(Scalebar, { model: model, style: {
|
|
63
|
+
height: SCALE_BAR_HEIGHT,
|
|
64
|
+
boxSizing: 'border-box',
|
|
65
|
+
} }) }), _jsx(ScalebarHighlightGroup, { model: model }), _jsx(HighlightGroup, { model: model }), _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-TracksContainerComponent", props: { model } }), children] }) }));
|
|
45
66
|
});
|
|
46
67
|
const HighlightGroup = observer(function HighlightGroup({ model, }) {
|
|
47
|
-
return model.highlightsVisible && model.highlight.length ? (_jsx(Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight },
|
|
68
|
+
return getSession(model).highlightsVisible && model.highlight.length ? (_jsx(Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight }, highlightKey(highlight, idx)))) })) : null;
|
|
69
|
+
});
|
|
70
|
+
const ScalebarHighlightGroup = observer(function ScalebarHighlightGroup({ model, }) {
|
|
71
|
+
const theme = useTheme();
|
|
72
|
+
const { pluginManager } = getEnv(model);
|
|
73
|
+
const { classes } = useStyles();
|
|
74
|
+
const viewBands = getSession(model).highlightsVisible
|
|
75
|
+
? model.highlight.map((h, idx) => {
|
|
76
|
+
const coords = model.getHighlightCoords(h);
|
|
77
|
+
return coords ? (_jsx(OverviewHighlightBand, { coords: coords, background: getHighlightColor(h, theme).toRgbString() }, highlightKey(h, idx))) : null;
|
|
78
|
+
})
|
|
79
|
+
: [];
|
|
80
|
+
return (_jsxs("div", { className: classes.scalebarHighlights, children: [viewBands, _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-ScalebarHighlightComponent", props: { model } })] }));
|
|
48
81
|
});
|
|
49
82
|
export default TracksContainer;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { stringify } from '@jbrowse/core/util';
|
|
3
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
-
import { Tooltip } from '@mui/material';
|
|
5
4
|
import { observer } from 'mobx-react';
|
|
5
|
+
import { GuideLabel } from '../../shared/coordLabels.js';
|
|
6
|
+
import { stickyChromeTops } from '../stickyChrome.js';
|
|
6
7
|
const useStyles = makeStyles()({
|
|
7
8
|
guide: {
|
|
8
9
|
pointerEvents: 'none',
|
|
@@ -13,19 +14,11 @@ const useStyles = makeStyles()({
|
|
|
13
14
|
background: 'red',
|
|
14
15
|
zIndex: 1001,
|
|
15
16
|
},
|
|
16
|
-
tooltipTarget: {
|
|
17
|
-
position: 'sticky',
|
|
18
|
-
left: 0,
|
|
19
|
-
width: 1,
|
|
20
|
-
},
|
|
21
17
|
});
|
|
22
18
|
const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
|
|
23
19
|
const { classes } = useStyles();
|
|
24
|
-
const { stickyViewHeaders,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
top: rubberbandTop,
|
|
28
|
-
position: stickyViewHeaders ? 'sticky' : undefined,
|
|
29
|
-
} }) }), _jsx("div", { className: classes.guide, style: { transform: `translateX(${coordX}px)` } })] }));
|
|
20
|
+
const { width, stickyViewHeaders, headerHeight } = model;
|
|
21
|
+
const { scalebar } = stickyChromeTops({ stickyViewHeaders, headerHeight });
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsx(GuideLabel, { coordX: coordX, viewWidth: width, stickyTop: scalebar, children: stringify(model.pxToBp(coordX)) }), _jsx("div", { className: classes.guide, style: { transform: `translateX(${coordX}px)` } })] }));
|
|
30
23
|
});
|
|
31
24
|
export default VerticalGuide;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
3
|
+
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
4
|
+
import { IconButton, Tooltip } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
// epsilon guards against the button flickering to disabled from float rounding
|
|
7
|
+
// exactly at the zoom limit
|
|
8
|
+
const EPSILON = 0.0001;
|
|
9
|
+
const ZoomButton = observer(function ZoomButton({ model, direction, small, }) {
|
|
10
|
+
// disabled tracks the debounced coarseBpPerPx (not live bpPerPx) so it doesn't
|
|
11
|
+
// flicker disabled during a zoom animation
|
|
12
|
+
const { maxBpPerPx, minBpPerPx, coarseBpPerPx } = model;
|
|
13
|
+
const out = direction === 'out';
|
|
14
|
+
const disabled = out
|
|
15
|
+
? coarseBpPerPx >= maxBpPerPx - EPSILON
|
|
16
|
+
: coarseBpPerPx <= minBpPerPx + EPSILON;
|
|
17
|
+
const fontSize = small ? 'small' : undefined;
|
|
18
|
+
return (_jsx(Tooltip, { title: out ? 'Zoom out 2x' : 'Zoom in 2x', children: _jsx("span", { children: _jsx(IconButton
|
|
19
|
+
// on the button, not left to the Tooltip: its title lands on the
|
|
20
|
+
// <span> the disabled case needs, so the button itself reached the
|
|
21
|
+
// accessibility tree unnamed and nothing driving by name could aim at
|
|
22
|
+
// it
|
|
23
|
+
, { "aria-label": out ? 'Zoom out' : 'Zoom in', "data-testid": out ? 'zoom_out' : 'zoom_in', size: small ? 'small' : undefined, disabled: disabled, onClick: () => {
|
|
24
|
+
model.zoom(out ? model.bpPerPx * 2 : model.bpPerPx / 2);
|
|
25
|
+
}, children: out ? (_jsx(ZoomOut, { fontSize: fontSize })) : (_jsx(ZoomIn, { fontSize: fontSize })) }) }) }));
|
|
26
|
+
});
|
|
27
|
+
export default ZoomButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type LGV = LinearGenomeViewModel;
|
|
4
|
+
declare const ZoomTransform: ({ model, offset, children, }: {
|
|
5
|
+
model: LGV;
|
|
6
|
+
offset?: number;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export default ZoomTransform;
|