@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/FeatureTrack/configSchema.d.ts +202 -71
- 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 +265 -120
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +20 -9
- 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 +142 -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 +8 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -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 +42 -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 +18 -8
- 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 +38 -52
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +21 -25
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +13 -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 +7 -6
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +14 -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 +25 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
- 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 +87 -83
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -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 +56 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
- package/esm/LinearGenomeView/components/Rubberband.js +15 -17
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
- package/esm/LinearGenomeView/components/Scalebar.js +20 -22
- 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 +157 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +61 -68
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
- 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 +3 -5
- 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 +136 -38
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
- 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 +35 -87
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
- 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 +6 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -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 +9 -67
- package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
- package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
- package/esm/LinearGenomeView/components/util.d.ts +24 -6
- package/esm/LinearGenomeView/components/util.js +28 -5
- package/esm/LinearGenomeView/consts.d.ts +9 -2
- package/esm/LinearGenomeView/consts.js +20 -2
- package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
- package/esm/LinearGenomeView/containingLgv.js +23 -0
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +29 -0
- package/esm/LinearGenomeView/headerFit.js +72 -0
- package/esm/LinearGenomeView/index.d.ts +28 -3
- package/esm/LinearGenomeView/index.js +13 -7
- package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
- package/esm/LinearGenomeView/keyboardHandler.js +25 -1
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +27 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
- package/esm/LinearGenomeView/lazyDialogs.js +4 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
- package/esm/LinearGenomeView/linkedViewSync.js +36 -0
- package/esm/LinearGenomeView/menuItems.d.ts +25 -2
- package/esm/LinearGenomeView/menuItems.js +306 -179
- package/esm/LinearGenomeView/model.d.ts +3363 -164
- package/esm/LinearGenomeView/model.js +2548 -565
- 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 +50 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
- package/esm/LinearGenomeView/stickyChrome.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
- 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 +73 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -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 +245 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
- package/esm/LinearGenomeView/types.d.ts +20 -37
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +347 -12
- package/esm/LinearGenomeView/util.js +577 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
- package/esm/MultiLevelRubberband/index.d.ts +4 -0
- package/esm/MultiLevelRubberband/index.js +3 -0
- package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
- package/esm/MultiLevelRubberband/menuItems.js +52 -0
- package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
- package/esm/MultiLevelRubberband/rowLabel.js +27 -0
- package/esm/MultiLevelRubberband/types.d.ts +7 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
- package/esm/displayKitTests/perRegionTestEnv.js +142 -0
- package/esm/index.d.ts +50 -1245
- package/esm/index.js +88 -33
- package/esm/searchUtils.d.ts +62 -12
- package/esm/searchUtils.js +335 -48
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +34 -0
- package/esm/shared/coordLabels.d.ts +47 -0
- package/esm/shared/coordLabels.js +133 -0
- package/esm/shared/useWindowDrag.d.ts +18 -0
- package/esm/shared/useWindowDrag.js +45 -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,101 +1,97 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { Dialog,
|
|
4
|
-
import { complement, reverse, toLocale } from '@jbrowse/core/util';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { CopyToClipboardButton, Dialog, ErrorBanner, LabeledCheckbox, LoadingEllipses, MonospaceTextField, } from '@jbrowse/core/ui';
|
|
4
|
+
import { complement, reverse, statusProgressLabel, toLocale, } from '@jbrowse/core/util';
|
|
5
5
|
import { formatSeqFasta } from '@jbrowse/core/util/formatFastaStrings';
|
|
6
|
-
import {
|
|
6
|
+
import { useFetch } from '@jbrowse/core/util/useFetch';
|
|
7
7
|
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
8
8
|
import GetAppIcon from '@mui/icons-material/GetApp';
|
|
9
|
-
import { Button,
|
|
9
|
+
import { Button, DialogActions, DialogContent, FormGroup, Typography, } from '@mui/material';
|
|
10
10
|
import { observer } from 'mobx-react';
|
|
11
|
-
import { fetchSequence } from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const [
|
|
23
|
-
const [
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
11
|
+
import { fetchSequence } from './fetchSequence.js';
|
|
12
|
+
// Guard on the requested span, before fetching, so a whole-chromosome request
|
|
13
|
+
// (easy to trigger now that features/regions can open this) never round-trips
|
|
14
|
+
// megabases just to be display-blocked. Above the display limit the sequence is
|
|
15
|
+
// still downloadable; above the fetch limit it is refused outright.
|
|
16
|
+
//
|
|
17
|
+
// The display limit is in FASTA characters, not bp — it caps what goes into the
|
|
18
|
+
// textarea, which is the formatted output including headers and line breaks.
|
|
19
|
+
const MAX_DISPLAY_CHARS = 1_000_000;
|
|
20
|
+
const MAX_FETCH_BP = 10_000_000;
|
|
21
|
+
const GetSequenceDialog = observer(function GetSequenceDialog({ model, regions, handleClose, }) {
|
|
22
|
+
const [rev, setRev] = useState(false);
|
|
23
|
+
const [comp, setComp] = useState(false);
|
|
24
|
+
const totalBp = regions.reduce((a, r) => a + (r.end - r.start), 0);
|
|
25
|
+
const tooLargeToFetch = totalBp > MAX_FETCH_BP;
|
|
26
|
+
const { data: sequenceChunks, error, isLoading: loading, status, } = useFetch(tooLargeToFetch
|
|
27
|
+
? false
|
|
28
|
+
: [
|
|
29
|
+
'fetchSequence',
|
|
30
|
+
regions.map(r => `${r.refName}:${r.start}-${r.end}`),
|
|
31
|
+
],
|
|
32
|
+
// a selection this dialog will happily take is a whole chromosome of
|
|
33
|
+
// sequence, so both handles are forwarded: closing the dialog stops the
|
|
34
|
+
// read rather than leaving the worker on it, and the wait is named
|
|
35
|
+
async (_name, _locs, signal, statusCallback) => {
|
|
36
|
+
if (regions.length === 0) {
|
|
37
|
+
throw new Error('Selected region is out of bounds');
|
|
38
|
+
}
|
|
39
|
+
const chunks = await fetchSequence(model, regions, {
|
|
40
|
+
signal,
|
|
41
|
+
statusCallback,
|
|
42
|
+
});
|
|
43
|
+
// validate here (in the async path) so a length mismatch surfaces via the
|
|
44
|
+
// dialog's own ErrorBanner rather than throwing during render
|
|
45
|
+
return chunks.map(chunk => {
|
|
46
|
+
const seq = chunk.get('seq');
|
|
47
|
+
const start = chunk.get('start') + 1;
|
|
48
|
+
const end = chunk.get('end');
|
|
49
|
+
const loc = `${chunk.get('refName')}:${start}-${end}`;
|
|
50
|
+
if (seq.length !== end - start + 1) {
|
|
51
|
+
throw new Error(`${loc} returned ${toLocale(seq.length)} bases, but should have returned ${toLocale(end - start + 1)}`);
|
|
42
52
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
return { loc, seq };
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
const entries = sequenceChunks?.map(({ loc, seq }) => {
|
|
57
|
+
const revSeq = rev ? reverse(seq) : seq;
|
|
58
|
+
return {
|
|
59
|
+
header: loc + (rev ? '-rev' : '') + (comp ? '-comp' : ''),
|
|
60
|
+
seq: comp ? complement(revSeq) : revSeq,
|
|
46
61
|
};
|
|
47
|
-
}
|
|
48
|
-
const sequence =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
chunkSeq = reverse(chunkSeq);
|
|
60
|
-
}
|
|
61
|
-
if (comp) {
|
|
62
|
-
chunkSeq = complement(chunkSeq);
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
header: loc + (rev ? '-rev' : '') + (comp ? '-comp' : ''),
|
|
66
|
-
seq: chunkSeq,
|
|
67
|
-
};
|
|
68
|
-
}))
|
|
69
|
-
: '';
|
|
70
|
-
const sequenceTooLarge = sequence ? sequence.length > 1_000_000 : false;
|
|
62
|
+
}) ?? [];
|
|
63
|
+
const sequence = formatSeqFasta(entries);
|
|
64
|
+
const plainSequence = entries.map(e => e.seq).join('\n');
|
|
65
|
+
const sequenceTooLarge = sequence.length > MAX_DISPLAY_CHARS;
|
|
66
|
+
// What the textarea says instead of a sequence. `tooLargeToFetch` disables the
|
|
67
|
+
// fetch, so without this branch it left an empty box with no loading state, no
|
|
68
|
+
// error and no explanation — and a Download FASTA button that wrote 0 bytes.
|
|
69
|
+
const notice = tooLargeToFetch
|
|
70
|
+
? `Selected region is ${toLocale(totalBp)}bp, over the ${toLocale(MAX_FETCH_BP)}bp limit for fetching a reference sequence. Zoom in or select a smaller region.`
|
|
71
|
+
: sequenceTooLarge
|
|
72
|
+
? 'Reference sequence too large to display, use the download FASTA button'
|
|
73
|
+
: undefined;
|
|
71
74
|
return (_jsxs(Dialog, { maxWidth: "xl", open: true, title: "Reference sequence", onClose: () => {
|
|
72
75
|
handleClose();
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} }), label: "Reverse sequence" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { value: comp, onChange: event => {
|
|
86
|
-
setComplement(event.target.checked);
|
|
87
|
-
} }), label: "Complement sequence" })] }), _jsx(Typography, { style: { margin: 10 }, children: "Note: Check both boxes for the \"reverse complement\"" })] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: async () => {
|
|
88
|
-
const { default: copy } = await import('copy-to-clipboard');
|
|
89
|
-
copy(sequence);
|
|
90
|
-
setCopied(true);
|
|
91
|
-
setTimeout(() => {
|
|
92
|
-
setCopied(false);
|
|
93
|
-
}, 500);
|
|
94
|
-
}, disabled: loading || !!error || sequenceTooLarge, color: "primary", startIcon: _jsx(ContentCopyIcon, {}), children: copied ? 'Copied' : 'Copy to clipboard' }), _jsx(Button, { onClick: async () => {
|
|
95
|
-
const { saveAs } = await import('file-saver-es');
|
|
96
|
-
saveAs(new Blob([sequence || ''], {
|
|
76
|
+
}, children: [_jsxs(DialogContent, { style: { width: '80em' }, children: [error ? (_jsx(ErrorBanner, { error: error })) : loading ? (_jsx(LoadingEllipses, { message: statusProgressLabel(status) || 'Retrieving sequences' })) : null, _jsxs("div", { style: {
|
|
77
|
+
display: 'flex',
|
|
78
|
+
justifyContent: 'flex-end',
|
|
79
|
+
gap: 8,
|
|
80
|
+
marginBottom: 4,
|
|
81
|
+
}, children: [_jsx(CopyToClipboardButton, { value: plainSequence, copiedLabel: "Copied", disabled: !plainSequence || sequenceTooLarge, variant: "contained", color: "primary", size: "small", startIcon: _jsx(ContentCopyIcon, {}), children: "Copy plain text" }), _jsx(CopyToClipboardButton, { value: sequence, copiedLabel: "Copied", disabled: !sequence || sequenceTooLarge, variant: "contained", color: "primary", size: "small", startIcon: _jsx(ContentCopyIcon, {}), children: "Copy FASTA" })] }), _jsx(MonospaceTextField, { fullWidth: true, readOnly: true, minRows: 5, maxRows: 10, disabled: notice !== undefined, value: notice ?? sequence }), _jsxs(FormGroup, { children: [_jsx(LabeledCheckbox, { checked: rev, onChange: val => {
|
|
82
|
+
setRev(val);
|
|
83
|
+
}, label: "Reverse sequence" }), _jsx(LabeledCheckbox, { checked: comp, onChange: val => {
|
|
84
|
+
setComp(val);
|
|
85
|
+
}, label: "Complement sequence" })] }), _jsx(Typography, { style: { margin: 10 }, children: "Note: Check both boxes for the \"reverse complement\"" })] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", onClick: async () => {
|
|
86
|
+
const { saveAs } = await import('@jbrowse/core/util/FileSaver');
|
|
87
|
+
saveAs(new Blob([sequence], {
|
|
97
88
|
type: 'text/x-fasta;charset=utf-8',
|
|
98
89
|
}), 'jbrowse_ref_seq.fa');
|
|
99
|
-
},
|
|
90
|
+
},
|
|
91
|
+
// `!sequence` covers every path with nothing to write: still loading,
|
|
92
|
+
// errored, and the over-fetch-limit refusal
|
|
93
|
+
disabled: !sequence, color: "primary", startIcon: _jsx(GetAppIcon, {}), children: "Download FASTA" }), _jsx(Button, { onClick: () => {
|
|
94
|
+
handleClose();
|
|
95
|
+
}, variant: "contained", children: "Close" })] })] }));
|
|
100
96
|
});
|
|
101
97
|
export default GetSequenceDialog;
|
|
@@ -1,72 +1,43 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import
|
|
5
|
-
import { makeTicks } from "../util.js";
|
|
4
|
+
import ZoomTransform from './ZoomTransform.js';
|
|
6
5
|
const useStyles = makeStyles()(theme => ({
|
|
7
|
-
|
|
6
|
+
// top/left stay unset: as an inline-level box the svg takes its static
|
|
7
|
+
// position on a line box, and pinning it to 0 shifts the ticks off the
|
|
8
|
+
// canvas's own grid
|
|
9
|
+
absoluteFill: {
|
|
8
10
|
position: 'absolute',
|
|
9
|
-
top: 0,
|
|
10
|
-
height: '100%',
|
|
11
11
|
width: '100%',
|
|
12
|
-
pointerEvents: 'none',
|
|
13
|
-
},
|
|
14
|
-
verticalGuidesContainer: {
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
height: '100%',
|
|
17
|
-
pointerEvents: 'none',
|
|
18
|
-
display: 'flex',
|
|
19
|
-
},
|
|
20
|
-
tick: {
|
|
21
|
-
position: 'absolute',
|
|
22
12
|
height: '100%',
|
|
23
|
-
width: 1,
|
|
24
13
|
},
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
minorLine: {
|
|
15
|
+
stroke: theme.palette.gridlineMinor,
|
|
27
16
|
},
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
majorLine: {
|
|
18
|
+
stroke: theme.palette.gridlineMajor,
|
|
30
19
|
},
|
|
31
20
|
}));
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return (_jsx(ContentBlockComponent, { block: block, children: ticks.map(({ type, base }) => {
|
|
39
|
-
const x = (reversed ? end - base : base - start) / bpPerPx;
|
|
40
|
-
return (_jsx("div", { className: type === 'major' || type === 'labeledMajor'
|
|
41
|
-
? majorTickClass
|
|
42
|
-
: minorTickClass, style: { left: x } }, base));
|
|
43
|
-
}) }));
|
|
44
|
-
}
|
|
45
|
-
const RenderedVerticalGuides = observer(function RenderedVerticalGuides({ model, }) {
|
|
46
|
-
const { staticBlocks, bpPerPx } = model;
|
|
47
|
-
return (_jsx(_Fragment, { children: staticBlocks.map((block, index) => {
|
|
48
|
-
const k = `${block.key}-${index}`;
|
|
49
|
-
if (block.type === 'ContentBlock') {
|
|
50
|
-
return _jsx(RenderedBlockLines, { block: block, bpPerPx: bpPerPx }, k);
|
|
51
|
-
}
|
|
52
|
-
else if (block.type === 'ElidedBlock') {
|
|
53
|
-
return _jsx(ElidedBlockComponent, { width: block.widthPx }, k);
|
|
54
|
-
}
|
|
55
|
-
else if (block.type === 'InterRegionPaddingBlock') {
|
|
56
|
-
return (_jsx(InterRegionPaddingBlockComponent, { width: block.widthPx, boundary: block.variant === 'boundary' }, k));
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
59
|
-
}) }));
|
|
60
|
-
});
|
|
21
|
+
// Background gridline ticks; render UNDER track content. Tick marks collapse
|
|
22
|
+
// into two <path>s (minor + major) rather than one div each: zoom rebuilds two
|
|
23
|
+
// `d` strings and patches two attributes instead of reconciling ~150 nodes per
|
|
24
|
+
// frame. Vector stays crisp at any DPR with no canvas pixel-buffer size cap;
|
|
25
|
+
// +0.5 centers the 1px stroke on a pixel column to match the old divs; lines
|
|
26
|
+
// run to y=100000 and are clipped by the svg box, so we never measure height.
|
|
61
27
|
const Gridlines = observer(function Gridlines({ model, offset = 0, }) {
|
|
62
28
|
const { classes } = useStyles();
|
|
63
|
-
const {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
29
|
+
const { gridlineTicks } = model;
|
|
30
|
+
let minorD = '';
|
|
31
|
+
let majorD = '';
|
|
32
|
+
for (const { x, major } of gridlineTicks) {
|
|
33
|
+
const seg = `M${x + 0.5} 0V100000`;
|
|
34
|
+
if (major) {
|
|
35
|
+
majorD += seg;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
minorD += seg;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return (_jsx(ZoomTransform, { model: model, offset: offset, children: _jsxs("svg", { className: classes.absoluteFill, children: [_jsx("path", { d: minorD, className: classes.minorLine, strokeWidth: 1 }), _jsx("path", { d: majorD, className: classes.majorLine, strokeWidth: 1 })] }) }));
|
|
71
42
|
});
|
|
72
43
|
export default Gridlines;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
declare const LinearGenomeViewHeader: ({ model, }: {
|
|
3
3
|
model: LinearGenomeViewModel;
|
|
4
|
-
}) => import("react
|
|
4
|
+
}) => import("react").JSX.Element | null;
|
|
5
5
|
export default LinearGenomeViewHeader;
|
|
@@ -1,31 +1,57 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
+
import ScrollZoomToggle from '@jbrowse/core/ui/ScrollZoomToggle';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
2
5
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
import
|
|
6
|
+
import useMeasure from '@jbrowse/core/util/useMeasure';
|
|
7
|
+
import MenuIcon from '@mui/icons-material/Menu';
|
|
8
|
+
import { useMediaQuery } from '@mui/material';
|
|
4
9
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import { HEADER_BAR_HEIGHT } from '../consts.js';
|
|
11
|
+
import { headerFit } from '../headerFit.js';
|
|
12
|
+
import HeaderClearHighlightButton, { highlightedDisplays, } from './HeaderClearHighlightButton.js';
|
|
13
|
+
import HeaderPanControls from './HeaderPanControls.js';
|
|
14
|
+
import HeaderRegionWidth from './HeaderRegionWidth.js';
|
|
15
|
+
import HeaderTrackSelectorButton from './HeaderTrackSelectorButton.js';
|
|
16
|
+
import HeaderZoomControls from './HeaderZoomControls.js';
|
|
17
|
+
import OverviewScalebar from './OverviewScalebar.js';
|
|
18
|
+
import SearchBox, { searchBoxWidth } from './SearchBox.js';
|
|
12
19
|
const useStyles = makeStyles()({
|
|
13
20
|
headerBar: {
|
|
14
21
|
display: 'flex',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
gap: 4,
|
|
24
|
+
// a floor, not a height. The constant was written onto this row by #4237 so
|
|
25
|
+
// the sticky offsets summing it would be true, and the row's own content
|
|
26
|
+
// reaches it at a 28px root font — the search box measures 48.13 there —
|
|
27
|
+
// after which a fixed height holds the row smaller than what is in it
|
|
28
|
+
minHeight: HEADER_BAR_HEIGHT,
|
|
20
29
|
},
|
|
21
30
|
spacer: {
|
|
22
31
|
flexGrow: 1,
|
|
23
32
|
},
|
|
24
33
|
});
|
|
25
|
-
const Controls = function ({ model }) {
|
|
34
|
+
const Controls = observer(function Controls({ model, }) {
|
|
26
35
|
const { classes } = useStyles();
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
// the row itself, not `model.width`: what the pieces below have to fit into
|
|
37
|
+
// is this box, and the offset between it and the view's measured width
|
|
38
|
+
// differs between the app's view container, an embedded host and a synteny
|
|
39
|
+
// row
|
|
40
|
+
const [ref, { width }] = useMeasure('width');
|
|
41
|
+
const highlighted = highlightedDisplays(model);
|
|
42
|
+
const viewMenu = getSession(model).viewTitleBars === false;
|
|
43
|
+
const touch = useMediaQuery('(pointer: coarse)', {
|
|
44
|
+
noSsr: true,
|
|
45
|
+
});
|
|
46
|
+
const fit = headerFit({
|
|
47
|
+
width,
|
|
48
|
+
searchBoxPx: searchBoxWidth(model.coarseVisibleLocStrings),
|
|
49
|
+
clearHighlight: highlighted.length > 0,
|
|
50
|
+
viewMenu,
|
|
51
|
+
touch,
|
|
52
|
+
});
|
|
53
|
+
return (_jsxs("div", { className: classes.headerBar, ref: ref, children: [viewMenu ? (_jsx(CascadingMenuButton, { menuItems: () => model.menuItems(), "data-testid": "view_menu_icon", children: _jsx(MenuIcon, {}) })) : null, _jsx(HeaderTrackSelectorButton, { model: model, indent: fit.trackSelectorIndent }), touch ? null : (_jsx(ScrollZoomToggle, { model: model, iconOnly: !fit.scrollZoomLabel })), _jsx("div", { className: classes.spacer }), touch ? null : (_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 })] }));
|
|
54
|
+
});
|
|
29
55
|
const LinearGenomeViewHeader = observer(function LinearGenomeViewHeader({ model, }) {
|
|
30
56
|
const { hideHeader, hideHeaderOverview } = model;
|
|
31
57
|
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 feature highlight in the view. 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 feature 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,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { alpha } from '@jbrowse/core/ui/palette';
|
|
2
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
4
5
|
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
|
5
|
-
import { Button
|
|
6
|
-
import { SPACING } from
|
|
6
|
+
import { Button } from '@mui/material';
|
|
7
|
+
import { SPACING, WIDGET_HEIGHT } from '../consts.js';
|
|
7
8
|
const useStyles = makeStyles()(theme => ({
|
|
8
9
|
panButton: {
|
|
9
10
|
background: alpha(theme.palette.background.paper, 0.8),
|
|
10
|
-
|
|
11
|
+
height: WIDGET_HEIGHT,
|
|
11
12
|
margin: SPACING,
|
|
12
13
|
},
|
|
14
|
+
// the arrows are the whole button, so MUI's 64px text-button minimum and the
|
|
15
|
+
// gap either side of it are pure air — the pair gives up 80px of it when the
|
|
16
|
+
// header can't hold everything
|
|
17
|
+
compact: {
|
|
18
|
+
margin: 1,
|
|
19
|
+
minWidth: 0,
|
|
20
|
+
padding: theme.spacing(0, 0.5),
|
|
21
|
+
},
|
|
13
22
|
}));
|
|
14
|
-
export default function HeaderPanControls({ model }) {
|
|
15
|
-
const { classes } = useStyles();
|
|
16
|
-
|
|
23
|
+
export default function HeaderPanControls({ model, compact, }) {
|
|
24
|
+
const { classes, cx } = useStyles();
|
|
25
|
+
const className = cx(classes.panButton, compact && classes.compact);
|
|
26
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outlined", "aria-label": "Pan left", className: className, onClick: () => {
|
|
17
27
|
model.slide(-0.9);
|
|
18
|
-
}, children: _jsx(ArrowBackIcon, {}) }), _jsx(Button, { variant: "outlined", className:
|
|
28
|
+
}, children: _jsx(ArrowBackIcon, {}) }), _jsx(Button, { variant: "outlined", "aria-label": "Pan right", className: className, onClick: () => {
|
|
19
29
|
model.slide(0.9);
|
|
20
30
|
}, children: _jsx(ArrowForwardIcon, {}) })] }));
|
|
21
31
|
}
|
|
@@ -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;
|