@jbrowse/plugin-linear-genome-view 4.2.1 → 5.0.0-beta.1
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 +17 -12
- package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/FloatingSvgOverlay.js +25 -0
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +257 -88
- 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 +3 -7
- package/esm/LinearGenomeView/components/Highlight.js +30 -82
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightBand.js +40 -0
- 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 -42
- 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 +51 -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 +1 -1
- 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 +22 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +33 -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 +8 -4
- package/esm/LinearGenomeView/initKeys.d.ts +13 -0
- package/esm/LinearGenomeView/initKeys.js +104 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +6 -10
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +52 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +1544 -136
- package/esm/LinearGenomeView/model.js +2352 -488
- 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 -29
- 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 +1263 -0
- package/esm/displayKitTests/perRegionTestEnv.js +141 -0
- package/esm/index.d.ts +112 -1237
- package/esm/index.js +102 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +52 -11
- package/esm/searchUtils.js +318 -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 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -17
- 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 -89
- 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,58 +1,102 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ErrorMessage, ResizeHandle } from '@jbrowse/core/ui';
|
|
2
|
+
import { ErrorBanner, ResizeHandle } from '@jbrowse/core/ui';
|
|
4
3
|
import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
|
|
5
4
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
-
import {
|
|
5
|
+
import { TrackOverlaySlot } from '@jbrowse/display-ui';
|
|
7
6
|
import { Paper } from '@mui/material';
|
|
8
7
|
import { observer } from 'mobx-react';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
8
|
+
import { RESIZE_HANDLE_HEIGHT, TRACK_OUTLINE_BORDER, TRACK_TOP_GAP, } from '../consts.js';
|
|
9
|
+
import Gridlines from './Gridlines.js';
|
|
10
|
+
import PaddingBlocks from './PaddingBlocks.js';
|
|
11
|
+
import TrackLabel from './TrackLabel.js';
|
|
12
|
+
import TrackRenderingContainer from './TrackRenderingContainer.js';
|
|
13
|
+
const useStyles = makeStyles()({
|
|
14
|
+
// No `overflow`: paint containment already clips to the padding box, and an
|
|
15
|
+
// overflow would only add a scroll container — the spurious second scrollbar
|
|
16
|
+
// described in TrackRenderingContainer. flow-root keeps the block formatting
|
|
17
|
+
// context that `overflow: hidden` used to establish as a side effect (neither
|
|
18
|
+
// `clip` nor no overflow does), so child margins still can't collapse through
|
|
19
|
+
// and shift the track — which the breakpoint split view would pick up, since
|
|
20
|
+
// its connector overlay measures trackRefs' getBoundingClientRect().top.
|
|
14
21
|
root: {
|
|
15
|
-
marginTop:
|
|
16
|
-
overflow: 'hidden',
|
|
22
|
+
marginTop: TRACK_TOP_GAP,
|
|
17
23
|
position: 'relative',
|
|
24
|
+
display: 'flow-root',
|
|
18
25
|
contain: 'layout style paint',
|
|
19
26
|
},
|
|
20
27
|
unpinnedTrack: {
|
|
21
28
|
background: 'none',
|
|
22
29
|
},
|
|
30
|
+
// in flow at the bottom of the Paper, and outside `trackContent` — so a
|
|
31
|
+
// `bottom:0` portaled overlay (the status chips) lands on the track content's
|
|
32
|
+
// bottom edge rather than having to subtract this height back out. The height
|
|
33
|
+
// arrives inline from RESIZE_HANDLE_HEIGHT, which the model's offset
|
|
34
|
+
// arithmetic reads too.
|
|
35
|
+
//
|
|
36
|
+
// No `bar`: a divider drawn at rest under every track read as a band of its
|
|
37
|
+
// own down the whole view. It keeps its RESIZE_HANDLE_HEIGHT of space in flow
|
|
38
|
+
// and reveals itself under the pointer at `action.disabled`, the weight a
|
|
39
|
+
// `bar` rests at.
|
|
23
40
|
resizeHandle: {
|
|
24
|
-
height: 4,
|
|
25
|
-
boxSizing: 'border-box',
|
|
26
41
|
position: 'relative',
|
|
27
|
-
background: 'transparent',
|
|
28
|
-
'&:hover': {
|
|
29
|
-
background: theme.palette.divider,
|
|
30
|
-
},
|
|
31
42
|
},
|
|
32
|
-
|
|
43
|
+
// in-flow, so the label pushes the track body down by its own height. The
|
|
44
|
+
// margin is that push plus a gap: without it the body starts on the label's
|
|
45
|
+
// border-box edge, and the Paper's drop shadow (which reaches ~4px past it)
|
|
46
|
+
// lands on the first rows of features. Vertical margins count on an atomic
|
|
47
|
+
// inline-level box, so this grows the line box rather than collapsing away.
|
|
48
|
+
//
|
|
49
|
+
// 8, not 4. At 4 the whole margin went to clearing the shadow and nothing
|
|
50
|
+
// was left over as a gap: measured on desktop-ispcr-results, where the PCR
|
|
51
|
+
// product is a feature on the display's FIRST row, the chip's bottom border
|
|
52
|
+
// and the feature's top border came out ~2px apart and read as one line
|
|
53
|
+
// (reviewer: "the tracklabels:offset is just a little bit overlapping the
|
|
54
|
+
// tracklabel still"). Most tracks hide this because their display adds its
|
|
55
|
+
// own top padding before the first row. 8 keeps the ~4 the shadow needs and
|
|
56
|
+
// spends the other 4 on clearance.
|
|
57
|
+
trackLabelOffset: {
|
|
58
|
+
position: 'relative',
|
|
59
|
+
display: 'inline-block',
|
|
60
|
+
marginBottom: 8,
|
|
61
|
+
},
|
|
62
|
+
trackLabelOverlap: {
|
|
63
|
+
position: 'absolute',
|
|
64
|
+
},
|
|
65
|
+
});
|
|
33
66
|
const TrackContainer = observer(function TrackContainer({ model, track, }) {
|
|
34
67
|
const { classes } = useStyles();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
// an LGV track always holds at least one linear display (activeDisplay =
|
|
69
|
+
// displays[0]); narrow to the linear shape for prefersOffset/resizeHeight
|
|
70
|
+
const display = track.activeDisplay;
|
|
71
|
+
const { showTrackOutlines } = model;
|
|
72
|
+
// The Paper's 1px border, present iff outlines are on. Everything laid out in
|
|
73
|
+
// the *display's* coordinates has to cancel it — the rendering container
|
|
74
|
+
// shifts left by it (see renderingComponentContainer), so the overlay node and
|
|
75
|
+
// the masks over it have to move by the same amount or they land a pixel off
|
|
76
|
+
// the data. One binding rather than three copies of the ternary, because the
|
|
77
|
+
// three agreeing is the whole point.
|
|
78
|
+
const outlineOffset = showTrackOutlines ? TRACK_OUTLINE_BORDER : 0;
|
|
79
|
+
const trackLabelStyle = model.effectiveTrackLabels !== 'overlapping' || display.prefersOffset
|
|
80
|
+
? classes.trackLabelOffset
|
|
81
|
+
: classes.trackLabelOverlap;
|
|
82
|
+
return (_jsxs(Paper, { className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onDragOver: event => {
|
|
83
|
+
model.onTrackDragOver(track.id, event.clientY);
|
|
84
|
+
}, children: [track.pinned ? _jsx(Gridlines, { model: model, offset: outlineOffset }) : null, model.effectiveTrackLabels !== 'hidden' ? (_jsx(TrackLabel, { track: track, className: trackLabelStyle })) : null, _jsx(TrackOverlaySlot, { zIndex: 100, overlayStyle: { left: -outlineOffset }, children: _jsx(ErrorBoundary, { resetKeys: [display.id], FallbackComponent: e => (_jsx(ErrorBanner, { error: e.error, onReset: e.resetErrorBoundary })), children: _jsx(TrackRenderingContainer, { model: model, track: track }) }) }), _jsx(PaddingBlocks, { model: model, offset: outlineOffset }), _jsx(ResizeHandle, { style: { height: RESIZE_HANDLE_HEIGHT }, onDrag: distance => display.resizeHeight(distance),
|
|
85
|
+
// the drag's shortcut: grow the track by whatever it is scrolled over,
|
|
86
|
+
// so a pileup showing three rows of forty opens to all forty
|
|
87
|
+
// Optional: only a display that scrolls its own content has anything
|
|
88
|
+
// hidden to expand to.
|
|
89
|
+
onDoubleClick: () => {
|
|
90
|
+
display.expandToContentHeight?.();
|
|
91
|
+
},
|
|
92
|
+
// Bracket the drag so a display can sit an expensive per-frame layer
|
|
93
|
+
// out of it (see `resizing` on TrackHeightMixin). Causal rather than a
|
|
94
|
+
// per-display debounce: the handle owns both ends of the gesture. On
|
|
95
|
+
// the track, so this holds whatever the active display is.
|
|
96
|
+
onDragStart: () => {
|
|
97
|
+
track.setResizing(true);
|
|
98
|
+
}, onDragEnd: () => {
|
|
99
|
+
track.setResizing(false);
|
|
100
|
+
}, className: classes.resizeHandle })] }));
|
|
57
101
|
});
|
|
58
102
|
export default TrackContainer;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
-
|
|
2
|
+
declare const TrackLabel: ({ track, className, }: {
|
|
3
3
|
track: BaseTrackModel;
|
|
4
4
|
className?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const TrackLabel: ({ track, className }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
7
6
|
export default TrackLabel;
|
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
3
|
-
import {
|
|
3
|
+
import { getSession } from '@jbrowse/core/util';
|
|
4
4
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
5
5
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
-
import
|
|
7
|
-
import { IconButton, Paper, Typography, alpha } from '@mui/material';
|
|
6
|
+
import { Paper, Typography } from '@mui/material';
|
|
8
7
|
import { observer } from 'mobx-react';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { TrackLabelCloseButton, TrackLabelMinimizeButton, } from './TrackLabelButtons.js';
|
|
9
|
+
import TrackLabelDragHandle from './TrackLabelDragHandle.js';
|
|
10
|
+
import TrackLabelMenu from './TrackLabelMenu.js';
|
|
11
|
+
import TrackLabelRefNameWarning from './TrackLabelRefNameWarning.js';
|
|
11
12
|
const useStyles = makeStyles()(theme => ({
|
|
12
13
|
root: {
|
|
14
|
+
// above breakpoint split view
|
|
13
15
|
zIndex: 200,
|
|
14
|
-
background:
|
|
15
|
-
'&:hover': {
|
|
16
|
-
background: theme.palette.background.paper,
|
|
17
|
-
},
|
|
16
|
+
background: theme.palette.background.paper,
|
|
18
17
|
},
|
|
19
18
|
trackName: {
|
|
20
19
|
margin: '0 auto',
|
|
21
20
|
width: '90%',
|
|
22
|
-
fontSize: '0.8rem',
|
|
23
21
|
pointerEvents: 'none',
|
|
24
22
|
},
|
|
25
|
-
iconButton: {
|
|
26
|
-
padding: theme.spacing(1),
|
|
27
|
-
},
|
|
28
23
|
}));
|
|
29
|
-
const TrackLabel = observer(function TrackLabel({ track, className }) {
|
|
24
|
+
const TrackLabel = observer(function TrackLabel({ track, className, }) {
|
|
30
25
|
const { classes } = useStyles();
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const { minimized } = track;
|
|
34
|
-
const trackId = track.trackId;
|
|
35
|
-
const trackName = getTrackName(track.configuration, session);
|
|
36
|
-
return (_jsxs(Paper, { className: cx(className, classes.root), onClick: event => {
|
|
37
|
-
event.stopPropagation();
|
|
38
|
-
}, children: [_jsx(TrackLabelDragHandle, { track: track, trackId: trackId, view: view }), _jsx(IconButton, { onClick: () => view.hideTrack(trackId), className: classes.iconButton, title: "close this track", children: _jsx(CloseIcon, { fontSize: "small" }) }), _jsx(Typography, { variant: "body1", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: [trackName, minimized ? '(minimized)' : '']
|
|
39
|
-
.filter(f => !!f)
|
|
40
|
-
.join(' ') }) }), _jsx(TrackLabelMenu, { track: track })] }));
|
|
26
|
+
const trackName = getTrackName(track.configuration, getSession(track));
|
|
27
|
+
return (_jsxs(Paper, { className: cx(className, classes.root), children: [_jsx(TrackLabelDragHandle, { track: track }), _jsx(TrackLabelCloseButton, { track: track }), _jsx(TrackLabelMinimizeButton, { track: track }), _jsx(Typography, { variant: "body2", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: trackName }) }), _jsx(TrackLabelRefNameWarning, { track: track }), _jsx(TrackLabelMenu, { track: track })] }));
|
|
41
28
|
});
|
|
42
29
|
export default TrackLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
+
export declare const TrackLabelCloseButton: ({ track, }: {
|
|
3
|
+
track: BaseTrackModel;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
5
|
+
export declare const TrackLabelMinimizeButton: ({ track }: {
|
|
6
|
+
track: BaseTrackModel;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
5
|
+
import ArrowRightIcon from '@mui/icons-material/ArrowRight';
|
|
6
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
7
|
+
import { IconButton } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
const useStyles = makeStyles()({
|
|
10
|
+
iconButton: {
|
|
11
|
+
padding: 0,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
// Keyed by trackId, not by the track's display name or by the model id: the
|
|
15
|
+
// name is config the user can change and the model id is minted per session, so
|
|
16
|
+
// neither survives being written into a test or a screenshot spec. The only
|
|
17
|
+
// other handle these buttons offered was `title`, which is shared by every
|
|
18
|
+
// track's copy of the button — so reaching ONE of them meant walking up to the
|
|
19
|
+
// Paper the label and the rendering container share and matching that
|
|
20
|
+
// container's testid through `:has()`. That worked and nobody should have to
|
|
21
|
+
// write it.
|
|
22
|
+
export const TrackLabelCloseButton = observer(function TrackLabelCloseButton({ track, }) {
|
|
23
|
+
const { classes } = useStyles();
|
|
24
|
+
const view = getContainingView(track);
|
|
25
|
+
return (_jsx(IconButton, { onClick: () => view.hideTrack(track.trackId), className: classes.iconButton, title: "close this track", "data-testid": `track-close-${track.trackId}`, children: _jsx(CloseIcon, { fontSize: "small" }) }));
|
|
26
|
+
});
|
|
27
|
+
export const TrackLabelMinimizeButton = observer(function TrackLabelMinimizeButton({ track }) {
|
|
28
|
+
const { classes } = useStyles();
|
|
29
|
+
const { minimized } = track;
|
|
30
|
+
return (_jsx(IconButton, { onClick: () => {
|
|
31
|
+
track.setMinimized(!minimized);
|
|
32
|
+
}, className: classes.iconButton, title: minimized ? 'restore track' : 'minimize track', "data-testid": `track-minimize-${track.trackId}`, children: minimized ? _jsx(ArrowRightIcon, {}) : _jsx(ArrowDropDownIcon, {}) }));
|
|
33
|
+
});
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
1
|
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
|
-
declare
|
|
4
|
-
trackId: string;
|
|
2
|
+
declare const TrackLabelDragHandle: ({ track, }: {
|
|
5
3
|
track: BaseTrackModel;
|
|
6
|
-
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
8
5
|
export default TrackLabelDragHandle;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
2
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import DragIcon from '@mui/icons-material/DragIndicator';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
4
6
|
const useStyles = makeStyles()({
|
|
5
7
|
dragHandle: {
|
|
6
8
|
cursor: 'grab',
|
|
@@ -11,8 +13,10 @@ const useStyles = makeStyles()({
|
|
|
11
13
|
pointerEvents: 'none',
|
|
12
14
|
},
|
|
13
15
|
});
|
|
14
|
-
function TrackLabelDragHandle({
|
|
16
|
+
const TrackLabelDragHandle = observer(function TrackLabelDragHandle({ track, }) {
|
|
15
17
|
const { classes } = useStyles();
|
|
18
|
+
const view = getContainingView(track);
|
|
19
|
+
const trackId = track.trackId;
|
|
16
20
|
return (_jsx("span", { draggable: true, className: classes.dragHandle, onDragStart: event => {
|
|
17
21
|
const target = event.currentTarget;
|
|
18
22
|
if (target.parentNode) {
|
|
@@ -23,5 +27,5 @@ function TrackLabelDragHandle({ trackId, view, track, }) {
|
|
|
23
27
|
}, onDragEnd: () => {
|
|
24
28
|
view.setDraggingTrackId(undefined);
|
|
25
29
|
}, "data-testid": `dragHandle-${view.id}-${trackId}`, children: _jsx(DragIcon, { className: classes.dragHandleIcon, fontSize: "small" }) }));
|
|
26
|
-
}
|
|
30
|
+
});
|
|
27
31
|
export default TrackLabelDragHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
2
|
declare const TrackLabelMenu: ({ track, }: {
|
|
3
3
|
track: BaseTrackModel;
|
|
4
|
-
}) => import("react
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
5
5
|
export default TrackLabelMenu;
|
|
@@ -1,100 +1,47 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
2
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
4
3
|
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
5
|
-
import
|
|
6
|
-
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
7
|
-
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
8
|
-
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
9
|
-
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
10
5
|
import LowPriorityIcon from '@mui/icons-material/LowPriority';
|
|
11
|
-
import MinimizeIcon from '@mui/icons-material/Minimize';
|
|
12
6
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
13
|
-
import PushPinIcon from '@mui/icons-material/PushPin';
|
|
14
7
|
import { observer } from 'mobx-react';
|
|
8
|
+
import { getTrackOrderSubMenu } from './trackLabelMenuItems.js';
|
|
9
|
+
// IconButton's default 5px padding made this the tallest thing in the label
|
|
10
|
+
// (27px), so it, not the text or the other controls, set the label height and
|
|
11
|
+
// hence the offset the track body gets. 3px trims the label to 23px while
|
|
12
|
+
// keeping a hit area past the 17px icon; 2px reads as too compact.
|
|
13
|
+
const useStyles = makeStyles()({
|
|
14
|
+
menuButton: {
|
|
15
|
+
padding: 3,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
15
18
|
const TrackLabelMenu = observer(function TrackLabelMenu({ track, }) {
|
|
19
|
+
const { classes } = useStyles();
|
|
16
20
|
const view = getContainingView(track);
|
|
17
21
|
const session = getSession(track);
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const saveTrackData = trackMenuItems.find(item => 'label' in item && item.label === 'Save track data');
|
|
25
|
-
const remainingTrackMenuItems = trackMenuItems.filter(item => !('label' in item) || item.label !== 'Save track data');
|
|
26
|
-
const sessionItems = session.getTrackActionMenuItems?.(trackConf, saveTrackData ? [saveTrackData] : []) || [];
|
|
22
|
+
function getMenuItems() {
|
|
23
|
+
const orderSubMenu = getTrackOrderSubMenu({ view, track });
|
|
24
|
+
const sessionItems = session.getTrackActionMenuItems?.({
|
|
25
|
+
config: track.configuration,
|
|
26
|
+
view,
|
|
27
|
+
}) ?? [];
|
|
27
28
|
return [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
icon: LowPriorityIcon,
|
|
31
|
-
type: 'subMenu',
|
|
32
|
-
priority: 1000,
|
|
33
|
-
subMenu: [
|
|
34
|
-
...(!isTopLevelView
|
|
35
|
-
? []
|
|
36
|
-
: [
|
|
37
|
-
{
|
|
38
|
-
label: pinned ? 'Unpin track' : 'Pin track',
|
|
39
|
-
icon: PushPinIcon,
|
|
40
|
-
onClick: () => {
|
|
41
|
-
track.setPinned(!pinned);
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
]),
|
|
29
|
+
...(orderSubMenu.length
|
|
30
|
+
? [
|
|
45
31
|
{
|
|
46
|
-
label:
|
|
47
|
-
icon:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
32
|
+
label: 'Track order',
|
|
33
|
+
icon: LowPriorityIcon,
|
|
34
|
+
type: 'subMenu',
|
|
35
|
+
priority: 1000,
|
|
36
|
+
subMenu: orderSubMenu,
|
|
51
37
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
label: 'Move track to top',
|
|
56
|
-
icon: KeyboardDoubleArrowUpIcon,
|
|
57
|
-
onClick: () => {
|
|
58
|
-
view.moveTrackToTop(track.id);
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
]
|
|
62
|
-
: []),
|
|
63
|
-
...(view.tracks.length > 1
|
|
64
|
-
? [
|
|
65
|
-
{
|
|
66
|
-
label: 'Move track up',
|
|
67
|
-
icon: KeyboardArrowUpIcon,
|
|
68
|
-
onClick: () => {
|
|
69
|
-
view.moveTrackUp(track.id);
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: 'Move track down',
|
|
74
|
-
icon: KeyboardArrowDownIcon,
|
|
75
|
-
onClick: () => {
|
|
76
|
-
view.moveTrackDown(track.id);
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
]
|
|
80
|
-
: []),
|
|
81
|
-
...(view.tracks.length > 2
|
|
82
|
-
? [
|
|
83
|
-
{
|
|
84
|
-
label: 'Move track to bottom',
|
|
85
|
-
icon: KeyboardDoubleArrowDownIcon,
|
|
86
|
-
onClick: () => {
|
|
87
|
-
view.moveTrackToBottom(track.id);
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
]
|
|
91
|
-
: []),
|
|
92
|
-
],
|
|
93
|
-
},
|
|
38
|
+
]
|
|
39
|
+
: []),
|
|
94
40
|
...sessionItems,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
41
|
+
track.saveTrackDataMenuItem,
|
|
42
|
+
...track.trackMenuItems(),
|
|
43
|
+
].sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
44
|
+
}
|
|
45
|
+
return (_jsx(CascadingMenuButton, { menuItems: getMenuItems, className: classes.menuButton, "data-testid": "track_menu_icon", "data-trackid": track.trackId, tooltip: "Track settings", children: _jsx(MoreVertIcon, { fontSize: "small" }) }));
|
|
99
46
|
});
|
|
100
47
|
export default TrackLabelMenu;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
+
/**
|
|
3
|
+
* The track label's warning for a file whose reference names have nothing in
|
|
4
|
+
* common with the assembly's — the commonest data-configuration mistake in
|
|
5
|
+
* JBrowse, and until now a silent one: the track draws nothing and reads
|
|
6
|
+
* exactly like a track with no features in view.
|
|
7
|
+
*
|
|
8
|
+
* The label rather than the display chrome, deliberately. The chrome's states
|
|
9
|
+
* are `displayPhase`'s, which are mutually exclusive and two of which replace
|
|
10
|
+
* the display's subtree; a mismatch is neither an error to retry nor a phase to
|
|
11
|
+
* be in, and routing it through `model.error` would put a red banner and a dead
|
|
12
|
+
* Retry over a track that, if the check is ever wrong, is drawing fine. This
|
|
13
|
+
* sits next to the track's own close/minimize buttons, costs the display
|
|
14
|
+
* nothing, and reaches every track type at once.
|
|
15
|
+
*
|
|
16
|
+
* The tooltip is the summary and the dialog is the disclosure — a hover nobody
|
|
17
|
+
* performs is not a way of telling someone their data is misconfigured.
|
|
18
|
+
*/
|
|
19
|
+
declare const TrackLabelRefNameWarning: ({ track, }: {
|
|
20
|
+
track: BaseTrackModel;
|
|
21
|
+
}) => import("react").JSX.Element | null;
|
|
22
|
+
export default TrackLabelRefNameWarning;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { refNameMismatchMessage } from '@jbrowse/core/assemblyManager/assembly';
|
|
4
|
+
import { InfoDialog } from '@jbrowse/core/ui';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
+
import WarningIcon from '@mui/icons-material/Warning';
|
|
7
|
+
import { IconButton, Typography } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
const useStyles = makeStyles()(theme => ({
|
|
10
|
+
iconButton: {
|
|
11
|
+
padding: 0,
|
|
12
|
+
color: theme.palette.warning.main,
|
|
13
|
+
},
|
|
14
|
+
}));
|
|
15
|
+
/**
|
|
16
|
+
* The track label's warning for a file whose reference names have nothing in
|
|
17
|
+
* common with the assembly's — the commonest data-configuration mistake in
|
|
18
|
+
* JBrowse, and until now a silent one: the track draws nothing and reads
|
|
19
|
+
* exactly like a track with no features in view.
|
|
20
|
+
*
|
|
21
|
+
* The label rather than the display chrome, deliberately. The chrome's states
|
|
22
|
+
* are `displayPhase`'s, which are mutually exclusive and two of which replace
|
|
23
|
+
* the display's subtree; a mismatch is neither an error to retry nor a phase to
|
|
24
|
+
* be in, and routing it through `model.error` would put a red banner and a dead
|
|
25
|
+
* Retry over a track that, if the check is ever wrong, is drawing fine. This
|
|
26
|
+
* sits next to the track's own close/minimize buttons, costs the display
|
|
27
|
+
* nothing, and reaches every track type at once.
|
|
28
|
+
*
|
|
29
|
+
* The tooltip is the summary and the dialog is the disclosure — a hover nobody
|
|
30
|
+
* performs is not a way of telling someone their data is misconfigured.
|
|
31
|
+
*/
|
|
32
|
+
const TrackLabelRefNameWarning = observer(function TrackLabelRefNameWarning({ track, }) {
|
|
33
|
+
const { classes } = useStyles();
|
|
34
|
+
const [open, setOpen] = useState(false);
|
|
35
|
+
const { refNameMismatch } = track;
|
|
36
|
+
if (!refNameMismatch) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const message = refNameMismatchMessage(refNameMismatch);
|
|
40
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => {
|
|
41
|
+
setOpen(true);
|
|
42
|
+
}, className: classes.iconButton, title: message, "data-testid": `track-refname-warning-${track.trackId}`, children: _jsx(WarningIcon, { fontSize: "small" }) }), open ? (_jsxs(InfoDialog, { open: true, title: "Reference names do not match the assembly", onClose: () => {
|
|
43
|
+
setOpen(false);
|
|
44
|
+
}, children: [_jsx(Typography, { children: message }), _jsx(Typography, { variant: "body2", style: { marginTop: 8 }, children: "The track menu's \"About track\" shows every reference name the file uses." })] })) : null] }));
|
|
45
|
+
});
|
|
46
|
+
export default TrackLabelRefNameWarning;
|
|
@@ -1,45 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Suspense,
|
|
3
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, useCallback } from 'react';
|
|
3
|
+
import { LoadingOverlay } from '@jbrowse/core/ui';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
4
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
7
|
import { observer } from 'mobx-react';
|
|
8
|
+
import { MINIMIZED_TRACK_HEIGHT } from '../consts.js';
|
|
6
9
|
const useStyles = makeStyles()({
|
|
10
|
+
// aligns with block boundaries. check for example the breakpoint split view
|
|
11
|
+
// demo to see if features align if wanting to change things. the -1 left
|
|
12
|
+
// offset (cancels the Paper's 1px border) is applied inline since it's
|
|
13
|
+
// conditional on showTrackOutlines, the same condition the border is gated on
|
|
7
14
|
renderingComponentContainer: {
|
|
8
15
|
position: 'absolute',
|
|
9
|
-
left: -1,
|
|
10
16
|
height: '100%',
|
|
11
17
|
width: '100%',
|
|
12
18
|
},
|
|
19
|
+
// Tracks never scroll natively on this outer container — every display owns
|
|
20
|
+
// its own vertical scroll: canvas displays scroll an inner sticky-canvas
|
|
21
|
+
// container (FeatureComponent), while alignments and variants draw a custom
|
|
22
|
+
// VerticalScrollbar overlay and redraw the canvas at `scrollTop`. A native
|
|
23
|
+
// scroll port here only produced a *second*, spurious scrollbar whenever a
|
|
24
|
+
// display's absolutely-positioned overlays extended a pixel past `height`
|
|
25
|
+
// (the reported double/flickering/full-height scrollbars). So there is
|
|
26
|
+
// deliberately no `overflow` here: `contain: strict` includes paint
|
|
27
|
+
// containment, which clips to the padding box on its own, and adding an
|
|
28
|
+
// `overflow` would reintroduce the scroll container — one the browser can
|
|
29
|
+
// still scroll silently (focus, scrollIntoView, scroll anchoring) even with
|
|
30
|
+
// no scrollbar shown, desyncing track content from the scalebar.
|
|
31
|
+
//
|
|
32
|
+
// `contain: strict` is also what makes every piece of display chrome reach the
|
|
33
|
+
// track's overlay layer through `TrackOverlayPortal` — containment creates a
|
|
34
|
+
// stacking context, so nothing in here can paint above `PaddingBlocks`, which
|
|
35
|
+
// is a later sibling. That looks like a tax worth removing (swap for a bare
|
|
36
|
+
// `overflow: clip`, which clips without a scroll container AND without a
|
|
37
|
+
// stacking context, and the portals become plain z-indexes). It was measured:
|
|
38
|
+
// `browser-tests/probe-containment.ts`. Under DOM load that swap costs 2.6x
|
|
39
|
+
// paint time on a track height change and 4.0x on a pan, at identical paint
|
|
40
|
+
// counts. The stacking context IS the paint isolation — the two can't be
|
|
41
|
+
// separated, so the portal is the price of the isolation, not a workaround
|
|
42
|
+
// for it. Layout containment measured free; the paint half is the load-bearing
|
|
43
|
+
// one. ADR-058.
|
|
13
44
|
trackRenderingContainer: {
|
|
14
|
-
overflowY: 'auto',
|
|
15
|
-
overflowX: 'hidden',
|
|
16
45
|
whiteSpace: 'nowrap',
|
|
17
46
|
position: 'relative',
|
|
18
47
|
background: 'none',
|
|
19
48
|
contain: 'strict',
|
|
20
49
|
},
|
|
21
50
|
});
|
|
51
|
+
// The box every LGV display is mounted in, and the ONLY place in the tree where
|
|
52
|
+
// a track's pixels get a name and a role — one component rather than an
|
|
53
|
+
// `aria-label` per display type, the same way `TrackOverlaySlot` is one paint
|
|
54
|
+
// order rather than one per display.
|
|
55
|
+
//
|
|
56
|
+
// Its own observer for a measured reason. The "what is on screen" half of the
|
|
57
|
+
// name is the settled locstring, which changes whenever navigation settles; read
|
|
58
|
+
// from `TrackRenderingContainer` below, that would re-render every track's
|
|
59
|
+
// container (and re-run its `useStyles`) on every settle. Here the re-render is
|
|
60
|
+
// this one `<div>`: `children` is the same React element object the parent
|
|
61
|
+
// already handed it, so React bails out of the display's whole subtree.
|
|
62
|
+
//
|
|
63
|
+
// **`role="figure"`, not `role="img"`.** `img` is the textbook role for a canvas
|
|
64
|
+
// and would be right if the box held only pixels — but it makes every descendant
|
|
65
|
+
// presentational, and a display's chrome does not all portal out of the sandbox:
|
|
66
|
+
// alignments draws its group collapse/expand `<button>`s inline
|
|
67
|
+
// (`GroupLabelsOverlay`), which under `img` would be focusable and announced as
|
|
68
|
+
// nothing. `figure` names the box and keeps what is inside it reachable. Revisit
|
|
69
|
+
// if inline interactive chrome ever goes away.
|
|
70
|
+
const TrackDisplayRegion = observer(function TrackDisplayRegion({ model, track, children, ...divProps }) {
|
|
71
|
+
const trackName = getTrackName(track.configuration, getSession(track));
|
|
72
|
+
const loc = model.coarseVisibleLocStrings;
|
|
73
|
+
return (_jsx("div", { ...divProps, role: "figure", "aria-label": loc ? `${trackName} track, showing ${loc}` : `${trackName} track`, children: children }));
|
|
74
|
+
});
|
|
22
75
|
const TrackRenderingContainer = observer(function TrackRenderingContainer({ model, track, }) {
|
|
23
76
|
const { classes } = useStyles();
|
|
24
|
-
|
|
77
|
+
// an LGV track always holds at least one linear display (activeDisplay =
|
|
78
|
+
// displays[0]); narrow to the linear shape for height/RenderingComponent
|
|
79
|
+
const display = track.activeDisplay;
|
|
25
80
|
const { height, RenderingComponent, DisplayBlurb } = display;
|
|
26
|
-
const { trackRefs,
|
|
81
|
+
const { trackRefs, showTrackOutlines } = model;
|
|
27
82
|
const trackId = track.trackId;
|
|
28
|
-
const ref = useRef(null);
|
|
29
83
|
const minimized = track.minimized;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
84
|
+
// callback ref keeps trackRefs in sync as the rendering div mounts/unmounts
|
|
85
|
+
// (e.g. on minimize/restore), unlike a useEffect that misses the toggle
|
|
86
|
+
const setRef = useCallback((el) => {
|
|
87
|
+
if (el) {
|
|
88
|
+
trackRefs[trackId] = el;
|
|
33
89
|
}
|
|
34
|
-
|
|
90
|
+
else {
|
|
35
91
|
delete trackRefs[trackId];
|
|
36
|
-
}
|
|
92
|
+
}
|
|
37
93
|
}, [trackRefs, trackId]);
|
|
38
94
|
return (_jsx("div", { className: classes.trackRenderingContainer, style: {
|
|
39
|
-
height: minimized ?
|
|
40
|
-
},
|
|
41
|
-
transform: scaleFactor !== 1 ? `scaleX(${scaleFactor})` : undefined,
|
|
42
|
-
}, children: _jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
|
|
95
|
+
height: minimized ? MINIMIZED_TRACK_HEIGHT : height,
|
|
96
|
+
}, "data-testid": `trackRenderingContainer-${model.id}-${trackId}`, children: !minimized ? (_jsxs(_Fragment, { children: [_jsx(TrackDisplayRegion, { model: model, track: track, ref: setRef, className: classes.renderingComponentContainer, style: { left: showTrackOutlines ? -1 : 0 }, children: _jsx(Suspense, { fallback: _jsx(LoadingOverlay, { isVisible: true, immediate: true }), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
|
|
43
97
|
position: 'absolute',
|
|
44
98
|
left: 0,
|
|
45
99
|
top: display.height - 20,
|