@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,31 +1,47 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import ScrollZoomToggle from '@jbrowse/core/ui/ScrollZoomToggle';
|
|
2
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
import
|
|
4
|
+
import useMeasure from '@jbrowse/core/util/useMeasure';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
6
|
+
import { HEADER_BAR_HEIGHT } from '../consts.js';
|
|
7
|
+
import { headerFit } from '../headerFit.js';
|
|
8
|
+
import HeaderClearHighlightButton, { highlightedDisplays, } from './HeaderClearHighlightButton.js';
|
|
9
|
+
import HeaderPanControls from './HeaderPanControls.js';
|
|
10
|
+
import HeaderRegionWidth from './HeaderRegionWidth.js';
|
|
11
|
+
import HeaderTrackSelectorButton from './HeaderTrackSelectorButton.js';
|
|
12
|
+
import HeaderZoomControls from './HeaderZoomControls.js';
|
|
13
|
+
import OverviewScalebar from './OverviewScalebar.js';
|
|
14
|
+
import SearchBox, { searchBoxWidth } from './SearchBox.js';
|
|
12
15
|
const useStyles = makeStyles()({
|
|
13
16
|
headerBar: {
|
|
14
17
|
display: 'flex',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
gap: 4,
|
|
20
|
+
// a floor, not a height. The constant was written onto this row by #4237 so
|
|
21
|
+
// the sticky offsets summing it would be true, and the row's own content
|
|
22
|
+
// reaches it at a 28px root font — the search box measures 48.13 there —
|
|
23
|
+
// after which a fixed height holds the row smaller than what is in it
|
|
24
|
+
minHeight: HEADER_BAR_HEIGHT,
|
|
20
25
|
},
|
|
21
26
|
spacer: {
|
|
22
27
|
flexGrow: 1,
|
|
23
28
|
},
|
|
24
29
|
});
|
|
25
|
-
const Controls = function ({ model }) {
|
|
30
|
+
const Controls = observer(function Controls({ model, }) {
|
|
26
31
|
const { classes } = useStyles();
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
// the row itself, not `model.width`: what the pieces below have to fit into
|
|
33
|
+
// is this box, and the offset between it and the view's measured width
|
|
34
|
+
// differs between the app's view container, an embedded host and a synteny
|
|
35
|
+
// row
|
|
36
|
+
const [ref, { width }] = useMeasure('width');
|
|
37
|
+
const highlighted = highlightedDisplays(model);
|
|
38
|
+
const fit = headerFit({
|
|
39
|
+
width,
|
|
40
|
+
searchBoxPx: searchBoxWidth(model.coarseVisibleLocStrings),
|
|
41
|
+
clearHighlight: highlighted.length > 0,
|
|
42
|
+
});
|
|
43
|
+
return (_jsxs("div", { className: classes.headerBar, ref: ref, children: [_jsx(HeaderTrackSelectorButton, { model: model, indent: fit.trackSelectorIndent }), _jsx(ScrollZoomToggle, { model: model, iconOnly: !fit.scrollZoomLabel }), _jsx("div", { className: classes.spacer }), _jsx(HeaderPanControls, { model: model, compact: !fit.panButtonSpacing }), _jsx(SearchBox, { model: model }), _jsx(HeaderClearHighlightButton, { highlighted: highlighted }), fit.regionWidth ? _jsx(HeaderRegionWidth, { model: model }) : null, _jsx(HeaderZoomControls, { model: model, showSlider: fit.zoomSlider }), _jsx("div", { className: classes.spacer })] }));
|
|
44
|
+
});
|
|
29
45
|
const LinearGenomeViewHeader = observer(function LinearGenomeViewHeader({ model, }) {
|
|
30
46
|
const { hideHeader, hideHeaderOverview } = model;
|
|
31
47
|
return !hideHeader ? (hideHeaderOverview ? (_jsx(Controls, { model: model })) : (_jsx(OverviewScalebar, { model: model, children: _jsx(Controls, { model: model }) }))) : null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
interface FeatureHighlightCapableDisplay {
|
|
3
|
+
featureHighlights: {
|
|
4
|
+
length: number;
|
|
5
|
+
};
|
|
6
|
+
clearFeatureHighlights: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Every display in the view with an active feature highlight — from a text
|
|
10
|
+
* search or the right-click "Highlight feature" menu, which land in the same
|
|
11
|
+
* set.
|
|
12
|
+
*
|
|
13
|
+
* The header reads this rather than leaving it to the button below, because
|
|
14
|
+
* whether the button is in the row changes how much of the row is left for
|
|
15
|
+
* everything else (see `headerFit`).
|
|
16
|
+
*/
|
|
17
|
+
export declare function highlightedDisplays(model: LinearGenomeViewModel): FeatureHighlightCapableDisplay[];
|
|
18
|
+
declare const HeaderClearHighlightButton: ({ highlighted, }: {
|
|
19
|
+
highlighted: FeatureHighlightCapableDisplay[];
|
|
20
|
+
}) => import("react").JSX.Element | null;
|
|
21
|
+
export default HeaderClearHighlightButton;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
|
3
|
+
import { IconButton } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
function isFeatureHighlightCapable(d) {
|
|
6
|
+
return (typeof d === 'object' &&
|
|
7
|
+
d !== null &&
|
|
8
|
+
'featureHighlights' in d &&
|
|
9
|
+
'clearFeatureHighlights' in d &&
|
|
10
|
+
typeof d.clearFeatureHighlights === 'function');
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Every display in the view with an active feature highlight — from a text
|
|
14
|
+
* search or the right-click "Highlight feature" menu, which land in the same
|
|
15
|
+
* set.
|
|
16
|
+
*
|
|
17
|
+
* The header reads this rather than leaving it to the button below, because
|
|
18
|
+
* whether the button is in the row changes how much of the row is left for
|
|
19
|
+
* everything else (see `headerFit`).
|
|
20
|
+
*/
|
|
21
|
+
export function highlightedDisplays(model) {
|
|
22
|
+
return model.tracks
|
|
23
|
+
.flatMap(t => t.displays)
|
|
24
|
+
.filter(isFeatureHighlightCapable)
|
|
25
|
+
.filter(d => d.featureHighlights.length > 0);
|
|
26
|
+
}
|
|
27
|
+
// Clears every highlight in the view at once. Shown only while there is one.
|
|
28
|
+
const HeaderClearHighlightButton = observer(function HeaderClearHighlightButton({ highlighted, }) {
|
|
29
|
+
return highlighted.length > 0 ? (_jsx(IconButton, { "data-testid": "clear_search_highlight", title: "Clear highlights", onClick: () => {
|
|
30
|
+
for (const d of highlighted) {
|
|
31
|
+
d.clearFeatureHighlights();
|
|
32
|
+
}
|
|
33
|
+
}, children: _jsx(HighlightOffIcon, {}) })) : null;
|
|
34
|
+
});
|
|
35
|
+
export default HeaderClearHighlightButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
type LGV = LinearGenomeViewModel;
|
|
3
|
-
export default function HeaderPanControls({ model }: {
|
|
3
|
+
export default function HeaderPanControls({ model, compact, }: {
|
|
4
4
|
model: LGV;
|
|
5
|
-
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
3
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
4
4
|
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
|
5
5
|
import { Button, alpha } from '@mui/material';
|
|
6
|
-
import { SPACING } from
|
|
6
|
+
import { SPACING, WIDGET_HEIGHT } from '../consts.js';
|
|
7
7
|
const useStyles = makeStyles()(theme => ({
|
|
8
8
|
panButton: {
|
|
9
9
|
background: alpha(theme.palette.background.paper, 0.8),
|
|
10
|
-
|
|
10
|
+
height: WIDGET_HEIGHT,
|
|
11
11
|
margin: SPACING,
|
|
12
12
|
},
|
|
13
|
+
// the arrows are the whole button, so MUI's 64px text-button minimum and the
|
|
14
|
+
// gap either side of it are pure air — the pair gives up 80px of it when the
|
|
15
|
+
// header can't hold everything
|
|
16
|
+
compact: {
|
|
17
|
+
margin: 1,
|
|
18
|
+
minWidth: 0,
|
|
19
|
+
padding: theme.spacing(0, 0.5),
|
|
20
|
+
},
|
|
13
21
|
}));
|
|
14
|
-
export default function HeaderPanControls({ model }) {
|
|
15
|
-
const { classes } = useStyles();
|
|
16
|
-
|
|
22
|
+
export default function HeaderPanControls({ model, compact, }) {
|
|
23
|
+
const { classes, cx } = useStyles();
|
|
24
|
+
const className = cx(classes.panButton, compact && classes.compact);
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outlined", "aria-label": "Pan left", className: className, onClick: () => {
|
|
17
26
|
model.slide(-0.9);
|
|
18
|
-
}, children: _jsx(ArrowBackIcon, {}) }), _jsx(Button, { variant: "outlined", className:
|
|
27
|
+
}, children: _jsx(ArrowBackIcon, {}) }), _jsx(Button, { variant: "outlined", "aria-label": "Pan right", className: className, onClick: () => {
|
|
19
28
|
model.slide(0.9);
|
|
20
29
|
}, children: _jsx(ArrowForwardIcon, {}) })] }));
|
|
21
30
|
}
|
|
@@ -2,17 +2,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
3
|
import { Typography } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
const useStyles = makeStyles()({
|
|
5
|
+
const useStyles = makeStyles()(theme => ({
|
|
6
6
|
bp: {
|
|
7
7
|
display: 'flex',
|
|
8
8
|
alignItems: 'center',
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// reserve a fixed width so the varying-length bp string (e.g. 19.5Mbp vs
|
|
10
|
+
// 950Kbp) does not shift the adjacent zoom controls as the user zooms/pans
|
|
11
|
+
minWidth: 50,
|
|
12
|
+
// equal-width digits so the number does not reflow as it changes
|
|
13
|
+
fontVariantNumeric: 'tabular-nums',
|
|
14
|
+
color: theme.palette.text.secondary,
|
|
11
15
|
},
|
|
12
|
-
});
|
|
16
|
+
}));
|
|
13
17
|
const HeaderRegionWidth = observer(function HeaderRegionWidth({ model, }) {
|
|
14
18
|
const { classes } = useStyles();
|
|
15
|
-
|
|
16
|
-
return (_jsx(Typography, { variant: "body2", color: "textSecondary", className: classes.bp, children: effectiveTotalBpDisplayStr }));
|
|
19
|
+
return (_jsx(Typography, { variant: "body2", className: classes.bp, "data-testid": "header_region_width", children: model.effectiveTotalBpDisplayStr }));
|
|
17
20
|
});
|
|
18
21
|
export default HeaderRegionWidth;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import HeaderSearchBoxes from './HeaderSearchBoxes.js';
|
|
5
|
+
const useStyles = makeStyles()({
|
|
6
|
+
searchBoxContainer: {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
// scroll rather than clip when many rows' search boxes exceed the bar width
|
|
9
|
+
overflowX: 'auto',
|
|
10
|
+
minWidth: 0,
|
|
11
|
+
gap: 12,
|
|
12
|
+
},
|
|
13
|
+
// the only thing the orientation changes: side-by-side is the container as
|
|
14
|
+
// declared above, since this span is a flex item of the header bar either way
|
|
15
|
+
vertical: {
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
// The whole search-box strip of a header that stacks several linear genome
|
|
20
|
+
// views: one box per row, laid out side by side or in a column. `sideBySide` is
|
|
21
|
+
// the caller's, because where the choice is remembered differs — each container
|
|
22
|
+
// keys its own `useSearchBoxPrefs` under its own storage prefix.
|
|
23
|
+
const HeaderSearchBoxRow = observer(function HeaderSearchBoxRow({ views, sideBySide, }) {
|
|
24
|
+
const { classes } = useStyles();
|
|
25
|
+
return (_jsx("span", { className: cx(classes.searchBoxContainer, !sideBySide && classes.vertical), children: views.map(view => (_jsx(HeaderSearchBoxes, { view: view }, view.id))) }));
|
|
26
|
+
});
|
|
27
|
+
export default HeaderSearchBoxRow;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
import { Typography } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import SearchBox from './SearchBox.js';
|
|
7
|
+
const useStyles = makeStyles()(theme => ({
|
|
8
|
+
bp: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
},
|
|
12
|
+
searchBox: {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
gap: theme.spacing(0.5),
|
|
16
|
+
},
|
|
17
|
+
}));
|
|
18
|
+
// One row's locate control in a header that stacks several linear genome views:
|
|
19
|
+
// the compact search box, then the assembly name and the span on screen. The
|
|
20
|
+
// comparative view and the breakpoint split view each draw one per row, and each
|
|
21
|
+
// carried a character-identical copy of it — the same plugin-to-plugin import
|
|
22
|
+
// (`SearchBox`) both were already making, one file further down.
|
|
23
|
+
const HeaderSearchBoxes = observer(function HeaderSearchBoxes({ view, }) {
|
|
24
|
+
const { classes } = useStyles();
|
|
25
|
+
const { assemblyDisplayNames, coarseTotalBp } = view;
|
|
26
|
+
return (_jsxs("span", { className: classes.searchBox, children: [_jsx(SearchBox, { model: view, showHelp: false, maxWidth: 250, minWidth: 100, style: { margin: 0 } }), _jsxs(Typography, { variant: "body2", color: "text.secondary", className: classes.bp, children: [assemblyDisplayNames.join(','), " ", getBpDisplayStr(coarseTotalBp)] })] }));
|
|
27
|
+
});
|
|
28
|
+
export default HeaderSearchBoxes;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
declare const HeaderTrackSelectorButton: ({ model, }: {
|
|
2
|
+
declare const HeaderTrackSelectorButton: ({ model, indent, }: {
|
|
3
3
|
model: LinearGenomeViewModel;
|
|
4
|
-
|
|
4
|
+
indent?: boolean;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
5
6
|
export default HeaderTrackSelectorButton;
|
|
@@ -5,13 +5,20 @@ import { IconButton } from '@mui/material';
|
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
6
|
const useStyles = makeStyles()(theme => ({
|
|
7
7
|
toggleButton: {
|
|
8
|
-
height: 44,
|
|
9
8
|
border: 'none',
|
|
9
|
+
},
|
|
10
|
+
indent: {
|
|
10
11
|
marginLeft: theme.spacing(4),
|
|
11
12
|
},
|
|
13
|
+
selected: {
|
|
14
|
+
backgroundColor: theme.palette.action.selected,
|
|
15
|
+
},
|
|
12
16
|
}));
|
|
13
|
-
const HeaderTrackSelectorButton = observer(function HeaderTrackSelectorButton({ model, }) {
|
|
14
|
-
const { classes } = useStyles();
|
|
15
|
-
|
|
17
|
+
const HeaderTrackSelectorButton = observer(function HeaderTrackSelectorButton({ model, indent, }) {
|
|
18
|
+
const { classes, cx } = useStyles();
|
|
19
|
+
const { isTrackSelectorOpen } = model;
|
|
20
|
+
return (_jsx(IconButton, { color: isTrackSelectorOpen ? 'primary' : 'default', onClick: () => {
|
|
21
|
+
model.toggleTrackSelector();
|
|
22
|
+
}, className: cx(classes.toggleButton, indent && classes.indent, isTrackSelectorOpen ? classes.selected : undefined), title: isTrackSelectorOpen ? 'Close track selector' : 'Open track selector', value: "track_select", children: _jsx(TrackSelectorIcon, {}) }));
|
|
16
23
|
});
|
|
17
24
|
export default HeaderTrackSelectorButton;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
declare const HeaderZoomControls: ({ model, }: {
|
|
2
|
+
declare const HeaderZoomControls: ({ model, showSlider, }: {
|
|
3
3
|
model: LinearGenomeViewModel;
|
|
4
|
-
|
|
4
|
+
showSlider?: boolean;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
5
6
|
export default HeaderZoomControls;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { lazy,
|
|
2
|
+
import { lazy, useState } from 'react';
|
|
3
|
+
import { SingleSlider } from '@jbrowse/core/ui';
|
|
3
4
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
4
|
-
import { getBpDisplayStr,
|
|
5
|
+
import { getBpDisplayStr, getDialogHost } from '@jbrowse/core/util';
|
|
5
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
7
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
7
|
-
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
8
|
-
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
9
|
-
import { IconButton, Slider, Tooltip } from '@mui/material';
|
|
10
8
|
import { observer } from 'mobx-react';
|
|
11
|
-
|
|
9
|
+
import { showAllRegionsMenuItem } from '../menuItems.js';
|
|
10
|
+
import ZoomButton from './ZoomButton.js';
|
|
11
|
+
const RegionWidthEditorDialog = lazy(() => import('./RegionWidthEditorDialog.js'));
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
13
|
container: {
|
|
14
14
|
display: 'flex',
|
|
@@ -18,54 +18,70 @@ const useStyles = makeStyles()(theme => ({
|
|
|
18
18
|
slider: {
|
|
19
19
|
width: 100,
|
|
20
20
|
color: theme.palette.text.secondary,
|
|
21
|
+
// The value here is live `bpPerPx`, so MUI's default 150ms ease on the thumb
|
|
22
|
+
// and the track restarts on every animation frame of a wheel zoom: the
|
|
23
|
+
// transition never completes, the thumb trails the zoom it is reporting, and
|
|
24
|
+
// the compositor gives up on the track's animated width every frame. A
|
|
25
|
+
// slider that reports a value rather than being dragged to one wants no
|
|
26
|
+
// transition at all.
|
|
27
|
+
'& .MuiSlider-thumb, & .MuiSlider-track': {
|
|
28
|
+
transition: 'none',
|
|
29
|
+
},
|
|
21
30
|
},
|
|
22
31
|
}));
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
model.zoom(model.bpPerPx / 2);
|
|
44
|
-
}, children: _jsx(ZoomIn, {}) }) }) }), _jsx(CascadingMenuButton, { menuItems: [
|
|
45
|
-
...[100, 50, 10].map(r => ({
|
|
46
|
-
label: `Zoom in ${r}x`,
|
|
47
|
-
onClick: () => {
|
|
48
|
-
model.zoom(model.bpPerPx / r);
|
|
49
|
-
},
|
|
50
|
-
})),
|
|
51
|
-
...[10, 50, 100].map(r => ({
|
|
52
|
-
label: `Zoom out ${r}x`,
|
|
53
|
-
onClick: () => {
|
|
54
|
-
model.zoom(model.bpPerPx * r);
|
|
55
|
-
},
|
|
56
|
-
})),
|
|
32
|
+
function getZoomMenuItems(model) {
|
|
33
|
+
return [
|
|
34
|
+
...[10, 50, 100].map(r => ({
|
|
35
|
+
label: `Zoom in ${r}x`,
|
|
36
|
+
onClick: () => {
|
|
37
|
+
model.zoom(model.bpPerPx / r);
|
|
38
|
+
},
|
|
39
|
+
})),
|
|
40
|
+
...[10, 50, 100].map(r => ({
|
|
41
|
+
label: `Zoom out ${r}x`,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
model.zoom(model.bpPerPx * r);
|
|
44
|
+
},
|
|
45
|
+
})),
|
|
46
|
+
showAllRegionsMenuItem(model),
|
|
47
|
+
{
|
|
48
|
+
label: 'Custom zoom',
|
|
49
|
+
onClick: () => {
|
|
50
|
+
getDialogHost(model).queueDialog(handleClose => [
|
|
51
|
+
RegionWidthEditorDialog,
|
|
57
52
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
getSession(model).queueDialog(handleClose => [
|
|
61
|
-
RegionWidthEditorDialog,
|
|
62
|
-
{
|
|
63
|
-
model,
|
|
64
|
-
handleClose,
|
|
65
|
-
},
|
|
66
|
-
]);
|
|
67
|
-
},
|
|
53
|
+
model,
|
|
54
|
+
handleClose,
|
|
68
55
|
},
|
|
69
|
-
]
|
|
56
|
+
]);
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
// The slider tracks live `bpPerPx`, which changes on every animation frame of a
|
|
62
|
+
// zoom. Isolated into its own observer so the surrounding zoom buttons/menu —
|
|
63
|
+
// whose MUI Tooltip/IconButton machinery is comparatively expensive and only
|
|
64
|
+
// depends on the debounced `coarseBpPerPx` — don't re-render every frame.
|
|
65
|
+
const ZoomSlider = observer(function ZoomSlider({ model, }) {
|
|
66
|
+
const { classes } = useStyles();
|
|
67
|
+
const { width, maxBpPerPx, minBpPerPx, bpPerPx } = model;
|
|
68
|
+
const [dragValue, setDragValue] = useState(null);
|
|
69
|
+
const value = dragValue ?? -Math.log2(bpPerPx) * 100;
|
|
70
|
+
return (_jsx(SingleSlider, { size: "small", className: classes.slider, value: value, min: -Math.log2(maxBpPerPx) * 100, max: -Math.log2(minBpPerPx) * 100, onChangeCommitted: val => {
|
|
71
|
+
setDragValue(null);
|
|
72
|
+
model.cancelZoomAnimation();
|
|
73
|
+
model.zoomTo(2 ** (-val / 100));
|
|
74
|
+
}, valueLabelDisplay: "auto", valueLabelFormat: newValue => `Window size: ${getBpDisplayStr(2 ** (-newValue / 100) * width)}`, onChange: val => {
|
|
75
|
+
// Take over from any in-flight animated zoom as soon as the user grabs
|
|
76
|
+
// the thumb, so the view stops lurching underneath the drag.
|
|
77
|
+
if (dragValue === null) {
|
|
78
|
+
model.cancelZoomAnimation();
|
|
79
|
+
}
|
|
80
|
+
setDragValue(val);
|
|
81
|
+
} }));
|
|
82
|
+
});
|
|
83
|
+
const HeaderZoomControls = observer(function HeaderZoomControls({ model, showSlider = true, }) {
|
|
84
|
+
const { classes } = useStyles();
|
|
85
|
+
return (_jsxs("div", { className: classes.container, children: [_jsx(ZoomButton, { model: model, direction: "out" }), showSlider ? _jsx(ZoomSlider, { model: model }) : null, _jsx(ZoomButton, { model: model, direction: "in" }), _jsx(CascadingMenuButton, { menuItems: () => getZoomMenuItems(model), children: _jsx(MoreVert, {}) })] }));
|
|
70
86
|
});
|
|
71
87
|
export default HeaderZoomControls;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useHighlightChip } from '@jbrowse/core/ui/highlightChipReveal';
|
|
3
3
|
import { getSession } from '@jbrowse/core/util';
|
|
4
|
-
import { colord } from '@jbrowse/core/util/colord';
|
|
5
|
-
import BookmarkIcon from '@mui/icons-material/Bookmark';
|
|
6
4
|
import CloseIcon from '@mui/icons-material/Close';
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
5
|
+
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
|
6
|
+
import { useTheme } from '@mui/material';
|
|
9
7
|
import { observer } from 'mobx-react';
|
|
10
|
-
import HighlightBand from
|
|
8
|
+
import HighlightBand from './HighlightBand.js';
|
|
9
|
+
import HighlightChip from './HighlightChip.js';
|
|
10
|
+
import { getHighlightColor } from './util.js';
|
|
11
|
+
// A band narrower than the link-icon chip clips it into a smudge, so below this
|
|
12
|
+
// width the chip is dropped (the band itself still draws).
|
|
13
|
+
const CHIP_MIN_WIDTH = 24;
|
|
11
14
|
const Highlight = observer(function Highlight({ model, highlight, }) {
|
|
12
15
|
const theme = useTheme();
|
|
13
|
-
const session = getSession(model);
|
|
14
16
|
const coords = model.getHighlightCoords(highlight);
|
|
15
|
-
const bandColor = highlight
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return coords ? (_jsx(HighlightBand, { coords: coords, background: bandColor.toRgbString(), children: _jsx(
|
|
17
|
+
const bandColor = getHighlightColor(highlight, theme);
|
|
18
|
+
const label = model.labelsVisible ? highlight.label : undefined;
|
|
19
|
+
const { chipVisible, setMenuOpen } = useHighlightChip(coords, model.showHighlightChips);
|
|
20
|
+
return coords ? (_jsx(HighlightBand, { coords: coords, background: bandColor.toRgbString(), label: label, children: chipVisible && coords.width >= CHIP_MIN_WIDTH ? (_jsx(HighlightChip, { color: bandColor, label: label, tooltip: highlight.label ?? 'Highlighted region', setOpen: setMenuOpen, menuItems: [
|
|
19
21
|
{
|
|
20
22
|
label: 'Dismiss highlight',
|
|
21
23
|
icon: CloseIcon,
|
|
@@ -24,19 +26,13 @@ const Highlight = observer(function Highlight({ model, highlight, }) {
|
|
|
24
26
|
},
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
|
-
label: '
|
|
28
|
-
icon:
|
|
29
|
+
label: 'Turn off highlights',
|
|
30
|
+
icon: VisibilityOffIcon,
|
|
29
31
|
onClick: () => {
|
|
30
|
-
|
|
31
|
-
session.addWidget('GridBookmarkWidget', 'GridBookmark'));
|
|
32
|
-
bookmarkWidget.addBookmark({
|
|
33
|
-
...highlight,
|
|
34
|
-
assemblyName: highlight.assemblyName ?? model.assemblyNames[0],
|
|
35
|
-
});
|
|
36
|
-
session.showWidget(bookmarkWidget);
|
|
37
|
-
model.removeHighlight(highlight);
|
|
32
|
+
getSession(model).setHighlightsVisible(false);
|
|
38
33
|
},
|
|
39
34
|
},
|
|
40
|
-
|
|
35
|
+
...model.highlightMenuItems(highlight),
|
|
36
|
+
] })) : null })) : null;
|
|
41
37
|
});
|
|
42
38
|
export default Highlight;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export default function HighlightBand({ coords, background, children, }: {
|
|
1
|
+
export default function HighlightBand({ coords, background, label, children, }: {
|
|
2
2
|
coords: {
|
|
3
3
|
left: number;
|
|
4
4
|
width: number;
|
|
5
5
|
};
|
|
6
6
|
background: string;
|
|
7
|
+
label?: string;
|
|
7
8
|
children?: React.ReactNode;
|
|
8
|
-
}): import("react
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
const useStyles = makeStyles()(theme => ({
|
|
4
5
|
highlight: {
|
|
5
6
|
height: '100%',
|
|
6
7
|
position: 'absolute',
|
|
7
8
|
left: 0,
|
|
8
|
-
|
|
9
|
+
// clip rather than hidden so this never becomes a scroll container (see
|
|
10
|
+
// Scalebar)
|
|
11
|
+
overflow: 'clip',
|
|
12
|
+
// paint above sibling TrackContainers (which would otherwise win in tree
|
|
13
|
+
// order). pointer-events:none lets clicks fall through to the tracks; an
|
|
14
|
+
// interactive chip re-enables pointer-events on itself
|
|
9
15
|
zIndex: 1,
|
|
10
16
|
pointerEvents: 'none',
|
|
11
17
|
},
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
overlay: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 3,
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
color: theme.palette.text.primary,
|
|
14
25
|
},
|
|
15
|
-
});
|
|
16
|
-
|
|
26
|
+
}));
|
|
27
|
+
// Shared band renderer for LGV and grid-bookmark highlights; OverviewHighlight
|
|
28
|
+
// stays separate (different bpToPx API). A non-interactive colored band with an
|
|
29
|
+
// optional top label; when `children` (the highlight chip) is passed it renders
|
|
30
|
+
// that instead of the plain label. Visibility is toggled from the view menu
|
|
31
|
+
export default function HighlightBand({ coords, background, label, children, }) {
|
|
17
32
|
const { classes } = useStyles();
|
|
18
|
-
|
|
33
|
+
const content = children ??
|
|
34
|
+
(label ? (_jsx(Typography, { variant: "caption", className: classes.label, noWrap: true, children: label })) : null);
|
|
35
|
+
return (_jsx("div", { "data-testid": "highlight-band", className: classes.highlight, style: {
|
|
19
36
|
transform: `translateX(${coords.left}px)`,
|
|
20
37
|
width: coords.width,
|
|
21
38
|
background,
|
|
22
|
-
}, children: coords.width > 3 &&
|
|
39
|
+
}, children: coords.width > 3 && content ? (_jsx("div", { className: classes.overlay, children: content })) : null }));
|
|
23
40
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MenuItem } from '@jbrowse/core/ui';
|
|
2
|
+
import type { Colord } from '@jbrowse/core/util/colord';
|
|
3
|
+
export default function HighlightChip({ color, label, tooltip, menuItems, setOpen, }: {
|
|
4
|
+
color: Colord;
|
|
5
|
+
label?: string;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
menuItems: MenuItem[];
|
|
8
|
+
setOpen?: (arg: boolean) => void;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
+
import LinkIcon from '@mui/icons-material/Link';
|
|
4
|
+
import { Box, Tooltip, Typography } from '@mui/material';
|
|
5
|
+
// Interactive chip drawn inside a highlight band while the band is revealing it
|
|
6
|
+
// (see `useHighlightChip`): a link icon tinted to the band color plus an
|
|
7
|
+
// optional inline label, wrapped in a context menu. Sets its own pointer-events
|
|
8
|
+
// since the band is click-through. `setOpen` is how the band learns to keep the
|
|
9
|
+
// chip drawn while the menu is up.
|
|
10
|
+
export default function HighlightChip({ color, label, tooltip, menuItems, setOpen, }) {
|
|
11
|
+
// hide the icon color when the band is fully transparent ("label-only"
|
|
12
|
+
// highlight); otherwise bump to 0.8 alpha so the chip stays legible
|
|
13
|
+
const chipAlpha = color.alpha() === 0 ? 0 : 0.8;
|
|
14
|
+
return (_jsx(Box, { sx: { pointerEvents: 'auto' }, children: _jsx(CascadingMenuButton, { "data-testid": "highlight-chip", menuItems: menuItems, setOpen: setOpen, children: _jsx(Tooltip, { title: tooltip, arrow: true, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.5 }, children: [_jsx(LinkIcon, { fontSize: "small", sx: { color: color.alpha(chipAlpha).toRgbString() } }), label ? (_jsx(Typography, { variant: "caption", noWrap: true, children: label })) : null] }) }) }) }));
|
|
15
|
+
}
|