@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,59 +1,117 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy, useEffect, useRef } from 'react';
|
|
3
3
|
import { VIEW_HEADER_HEIGHT } from '@jbrowse/core/ui';
|
|
4
4
|
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { LGV_HEADER_HEIGHT_VAR, SCROLL_PORT_HEIGHT_VAR, VIEW_HEADER_HEIGHT_VAR, useChromeHeightVar, useFocusOnInteraction, } from '@jbrowse/core/util/hooks';
|
|
5
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
7
|
+
import { useWheelZoom } from '@jbrowse/core/util/usePanZoom';
|
|
6
8
|
import Paper from '@mui/material/Paper';
|
|
7
9
|
import { observer } from 'mobx-react';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
10
|
+
import { stickyChromeTops } from '../stickyChrome.js';
|
|
11
|
+
import Header from './Header.js';
|
|
12
|
+
import MiniControls from './MiniControls.js';
|
|
13
|
+
import NavigationAnnouncer from './NavigationAnnouncer.js';
|
|
14
|
+
import ResizeAllTracksHandle from './ResizeAllTracksHandle.js';
|
|
15
|
+
import Rubberband from './Rubberband.js';
|
|
16
|
+
import TrackContainer from './TrackContainer.js';
|
|
17
|
+
import TracksContainer from './TracksContainer.js';
|
|
18
|
+
// lazies
|
|
19
|
+
const NoTracksActiveButton = lazy(() => import('./NoTracksActiveButton.js'));
|
|
11
20
|
const useStyles = makeStyles()(theme => ({
|
|
12
21
|
header: {
|
|
13
22
|
background: theme.palette.background.paper,
|
|
14
|
-
|
|
23
|
+
// measured, with the constant as the fallback: the view header above is a
|
|
24
|
+
// minimum-height box that grows with its content, so summing constants
|
|
25
|
+
// here put this over the bottom of it at a larger root font size
|
|
26
|
+
top: `var(${VIEW_HEADER_HEIGHT_VAR}, ${VIEW_HEADER_HEIGHT}px)`,
|
|
15
27
|
zIndex: 850,
|
|
16
28
|
},
|
|
17
29
|
pinnedTracks: {
|
|
18
30
|
position: 'sticky',
|
|
19
31
|
zIndex: 3,
|
|
32
|
+
// cap the sticky block at the space below its top offset so pinning
|
|
33
|
+
// many/tall tracks scrolls within the block instead of burying the
|
|
34
|
+
// unpinned tracks underneath it — see the maxHeight below for which space
|
|
35
|
+
overflowY: 'auto',
|
|
20
36
|
},
|
|
21
37
|
rel: {
|
|
22
38
|
position: 'relative',
|
|
23
39
|
},
|
|
24
40
|
}));
|
|
25
41
|
const LinearGenomeViewContainer = observer(function LinearGenomeViewContainer({ model, }) {
|
|
26
|
-
const { pinnedTracks, stickyViewHeaders,
|
|
42
|
+
const { pinnedTracks, stickyViewHeaders, headerHeight, tracks, unpinnedTracks, hideHeader, } = model;
|
|
43
|
+
const stickyTops = stickyChromeTops({ stickyViewHeaders, headerHeight });
|
|
44
|
+
const headerRef = useRef(null);
|
|
45
|
+
useChromeHeightVar(headerRef, LGV_HEADER_HEIGHT_VAR);
|
|
27
46
|
const { classes } = useStyles();
|
|
28
47
|
const session = getSession(model);
|
|
29
48
|
const ref = useRef(null);
|
|
30
|
-
|
|
31
|
-
|
|
49
|
+
// cached left edge of the view, refreshed on resize, so the mousemove hover
|
|
50
|
+
// handler doesn't call getBoundingClientRect() (a layout reflow) every move
|
|
51
|
+
const rectLeftRef = useRef(0);
|
|
52
|
+
// The tracks area, and not the whole view — the same rule the click-drag half
|
|
53
|
+
// already follows (see TracksContainer's useSideScroll), for a bigger payoff.
|
|
54
|
+
// The chrome above the tracks is the only surface left where a wheel still
|
|
55
|
+
// means "move down the page": the view header is `position: sticky`, so
|
|
56
|
+
// binding the gesture below it leaves ~100px of always-visible gutter that
|
|
57
|
+
// scrolls, instead of the ~26px of view title bar that is all a full-view
|
|
58
|
+
// binding leaves. That gutter is the whole answer for scroll-to-zoom users,
|
|
59
|
+
// because there is no modifier to fall back on — the browser turns shift into
|
|
60
|
+
// horizontal scroll, ctrl/meta is pinch-zoom, and Firefox binds alt to
|
|
61
|
+
// history navigation.
|
|
62
|
+
//
|
|
63
|
+
// Nothing is lost by it: a wheel over the toolbar used to zoom the view from
|
|
64
|
+
// a point that shows none of it. `wheelBinding.test.tsx` is the pin — which
|
|
65
|
+
// element the listener is on is a DOM fact, so jsdom sees it exactly;
|
|
66
|
+
// `browser-tests/probe-scroll-gutter.ts` measures how many pixels wide the
|
|
67
|
+
// resulting band is, which is the part that needs a real layout and runs by
|
|
68
|
+
// hand.
|
|
69
|
+
const tracksRef = useRef(null);
|
|
70
|
+
useWheelZoom(tracksRef, model);
|
|
32
71
|
useEffect(() => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
72
|
+
const curr = ref.current;
|
|
73
|
+
if (!curr) {
|
|
74
|
+
return;
|
|
37
75
|
}
|
|
38
|
-
|
|
39
|
-
|
|
76
|
+
rectLeftRef.current = curr.getBoundingClientRect().left;
|
|
77
|
+
const observer = 'ResizeObserver' in window
|
|
78
|
+
? new ResizeObserver(() => {
|
|
79
|
+
rectLeftRef.current = curr.getBoundingClientRect().left;
|
|
80
|
+
})
|
|
81
|
+
: undefined;
|
|
82
|
+
observer?.observe(curr);
|
|
40
83
|
return () => {
|
|
41
|
-
|
|
42
|
-
document.removeEventListener('keydown', handleSelectView);
|
|
84
|
+
observer?.disconnect();
|
|
43
85
|
};
|
|
44
|
-
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
86
|
+
}, []);
|
|
87
|
+
// sets the focused view id based on a click within the LGV; necessary for
|
|
88
|
+
// subviews to be focused properly
|
|
89
|
+
useFocusOnInteraction(ref, () => {
|
|
90
|
+
session.setFocusedViewId?.(model.id);
|
|
91
|
+
});
|
|
92
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { "data-testid": `linear-genome-view-${model.id}`, className: classes.rel, ref: ref, onMouseLeave: () => {
|
|
93
|
+
session.setHovered(undefined);
|
|
94
|
+
}, onMouseMove: event => {
|
|
95
|
+
const leftPx = event.clientX - rectLeftRef.current;
|
|
96
|
+
const hoverPosition = model.pxToBp(leftPx);
|
|
97
|
+
// `hoveredFeature` is BaseDisplay's hook, so every display type
|
|
98
|
+
// answers it — this used to read `featureUnderMouse`, a name only the
|
|
99
|
+
// wiggle, alignments and Manhattan families used, off `displays[0]`
|
|
100
|
+
// alone. At most one display can be under the pointer, so the first
|
|
101
|
+
// non-empty answer is the answer.
|
|
102
|
+
const hoverFeature = tracks
|
|
103
|
+
.flatMap(t => t.displays)
|
|
104
|
+
.map(d => d.hoveredFeature)
|
|
105
|
+
.find(Boolean);
|
|
106
|
+
session.setHovered({ hoverPosition, hoverFeature });
|
|
107
|
+
}, children: [_jsx(NavigationAnnouncer, { model: model }), _jsxs("div", { ref: headerRef, "data-testid": `lgv-header-${model.id}`, className: classes.header, style: { position: stickyViewHeaders ? 'sticky' : undefined }, children: [_jsx(Header, { model: model }), hideHeader ? _jsx(MiniControls, { model: model }) : null] }), _jsx("div", { ref: tracksRef, children: model.scalebarOnly ? (_jsx(Rubberband, { model: model })) : (_jsx(TracksContainer, { model: model, children: !tracks.length ? (_jsx(Suspense, { fallback: null, children: _jsx(NoTracksActiveButton, { model: model }) })) : (_jsxs(_Fragment, { children: [pinnedTracks.length ? (_jsx(Paper, { elevation: 2, "data-testid": "pinned-tracks", className: classes.pinnedTracks, style: {
|
|
108
|
+
top: stickyTops.pinnedTracks,
|
|
109
|
+
// the scroll port this sticks in, not the window: it is
|
|
110
|
+
// under the app bar in the classic stack, a dockview
|
|
111
|
+
// cell in a workspace, and the host's box when embedded.
|
|
112
|
+
// The fallback is what an unbounded embed gets, where
|
|
113
|
+
// the page itself is the scroller
|
|
114
|
+
maxHeight: `calc(var(${SCROLL_PORT_HEIGHT_VAR}, 100vh) - ${stickyTops.pinnedTracks})`,
|
|
115
|
+
}, children: pinnedTracks.map(track => (_jsx(TrackContainer, { model: model, track: track }, track.id))) })) : null, unpinnedTracks.map(track => (_jsx(TrackContainer, { model: model, track: track }, track.id))), _jsx(ResizeAllTracksHandle, { model: model })] })) })) })] }) }));
|
|
58
116
|
});
|
|
59
117
|
export default LinearGenomeViewContainer;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
+
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
4
|
+
import { alpha } from '@jbrowse/core/ui/palette';
|
|
3
5
|
import { getSession } from '@jbrowse/core/util';
|
|
4
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { IconButton, Paper,
|
|
7
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
8
|
+
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
9
|
+
import RemoveIcon from '@mui/icons-material/Remove';
|
|
10
|
+
import { IconButton, Paper, Tooltip } from '@mui/material';
|
|
9
11
|
import { observer } from 'mobx-react';
|
|
12
|
+
import ZoomButton from './ZoomButton.js';
|
|
10
13
|
const useStyles = makeStyles()(theme => ({
|
|
11
14
|
background: {
|
|
12
15
|
position: 'absolute',
|
|
13
16
|
right: 0,
|
|
14
17
|
background: theme.palette.background.paper,
|
|
18
|
+
// needed when sticky header is off in lgv, e.g. in breakpoint split view
|
|
15
19
|
zIndex: 2,
|
|
16
20
|
},
|
|
17
21
|
focusedBackground: {
|
|
@@ -20,12 +24,12 @@ const useStyles = makeStyles()(theme => ({
|
|
|
20
24
|
}));
|
|
21
25
|
const MiniControls = observer(function MiniControls({ model, }) {
|
|
22
26
|
const { classes } = useStyles();
|
|
23
|
-
const { id,
|
|
27
|
+
const { id, scalebarOnly } = model;
|
|
24
28
|
const { focusedViewId } = getSession(model);
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
return (_jsx(Paper, { className: classes.background, children: _jsxs(Paper, { className: focusedViewId === id ? classes.focusedBackground : undefined, children: [_jsx(Tooltip, { title: "Open track selector", children: _jsx(IconButton, { size: "small", onClick: () => {
|
|
30
|
+
model.activateTrackSelector();
|
|
31
|
+
}, children: _jsx(TrackSelectorIcon, { fontSize: "small" }) }) }), _jsx(CascadingMenuButton, { menuItems: () => model.menuItems(), children: _jsx(MoreVertIcon, { fontSize: "small" }) }), _jsx(Tooltip, { title: scalebarOnly ? 'Show tracks' : 'Show ruler only', children: _jsx(IconButton, { size: "small", onClick: () => {
|
|
32
|
+
model.setScalebarOnly(!scalebarOnly);
|
|
33
|
+
}, children: scalebarOnly ? (_jsx(AddIcon, { fontSize: "small" })) : (_jsx(RemoveIcon, { fontSize: "small" })) }) }), _jsx(ZoomButton, { model: model, direction: "out", small: true }), _jsx(ZoomButton, { model: model, direction: "in", small: true })] }) }));
|
|
30
34
|
});
|
|
31
35
|
export default MiniControls;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { isPalindromic, parseMotifList, pluralize } from '@jbrowse/core/util';
|
|
4
|
+
import { Button, TextField, Typography } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import SearchPanelForm from './SearchPanelForm.js';
|
|
7
|
+
import StrandCheckboxes from './StrandCheckboxes.js';
|
|
8
|
+
import { DEFAULT_MOTIFS } from './defaultMotifs.js';
|
|
9
|
+
import { addReferenceScanTrack } from './searchModes.js';
|
|
10
|
+
const MotifListPanel = observer(function MotifListPanel({ model, handleClose, }) {
|
|
11
|
+
const [text, setText] = useState(DEFAULT_MOTIFS);
|
|
12
|
+
const [searchForward, setSearchForward] = useState(true);
|
|
13
|
+
const [searchReverse, setSearchReverse] = useState(true);
|
|
14
|
+
const { motifs, errors } = parseMotifList(text);
|
|
15
|
+
// strand choice only means something for motifs that read differently on the
|
|
16
|
+
// two strands; most restriction sites are palindromes, which always match both
|
|
17
|
+
const hasStrandedMotif = motifs.some(m => !isPalindromic(m.site));
|
|
18
|
+
const strandValid = !hasStrandedMotif || searchForward || searchReverse;
|
|
19
|
+
const canSubmit = motifs.length > 0 && errors.length === 0 && strandValid;
|
|
20
|
+
function handleSubmitCombined() {
|
|
21
|
+
addReferenceScanTrack(model, {
|
|
22
|
+
trackId: `motif_search_${Date.now()}`,
|
|
23
|
+
name: motifs.length === 1
|
|
24
|
+
? `Motif ${motifs[0].name}`
|
|
25
|
+
: `Motif search (${motifs.length} motifs)`,
|
|
26
|
+
adapter: {
|
|
27
|
+
type: 'MotifListAdapter',
|
|
28
|
+
motifs: text,
|
|
29
|
+
searchForward,
|
|
30
|
+
searchReverse,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
handleClose();
|
|
34
|
+
}
|
|
35
|
+
function handleSubmitSeparate() {
|
|
36
|
+
const now = Date.now();
|
|
37
|
+
for (const [idx, motif] of motifs.entries()) {
|
|
38
|
+
addReferenceScanTrack(model, {
|
|
39
|
+
trackId: `motif_search_${now}_${idx}`,
|
|
40
|
+
name: `Motif ${motif.name}`,
|
|
41
|
+
adapter: {
|
|
42
|
+
type: 'MotifListAdapter',
|
|
43
|
+
motifs: motif.line,
|
|
44
|
+
searchForward,
|
|
45
|
+
searchReverse,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
handleClose();
|
|
50
|
+
}
|
|
51
|
+
return (_jsxs(SearchPanelForm, { onSubmit: handleSubmitCombined, handleClose: handleClose, submitDisabled: !canSubmit, submitText: "Launch as one track", actions: motifs.length > 1 ? (_jsx(Button, { type: "button", onClick: () => {
|
|
52
|
+
handleSubmitSeparate();
|
|
53
|
+
}, disabled: !canSubmit, variant: "contained", color: "primary", children: "Launch one track per motif" })) : null, children: [_jsx(TextField, { multiline: true, fullWidth: true, rows: 12, variant: "outlined", label: "Motifs", value: text, onChange: event => {
|
|
54
|
+
setText(event.target.value);
|
|
55
|
+
}, slotProps: { htmlInput: { style: { fontFamily: 'monospace' } } } }), errors.length > 0 ? (_jsx(Typography, { color: "error", variant: "body2", children: errors.map(e => `Line ${e.line}: ${e.message}`).join('\n') })) : (_jsx(Typography, { variant: "body2", color: "textSecondary", children: motifs.length === 0
|
|
56
|
+
? 'Add at least one motif'
|
|
57
|
+
: `${motifs.length} ${pluralize(motifs.length, 'motif')}` })), hasStrandedMotif ? (_jsx(StrandCheckboxes, { searchForward: searchForward, searchReverse: searchReverse, setSearchForward: setSearchForward, setSearchReverse: setSearchReverse })) : motifs.length > 0 ? (_jsx(Typography, { variant: "body2", color: "textSecondary", children: "All motifs are palindromic, so each match covers both strands." })) : null] }));
|
|
58
|
+
});
|
|
59
|
+
export default MotifListPanel;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The one thing that tells a screen-reader user a pan, a zoom or a search
|
|
4
|
+
* actually moved the view: a polite live region restating where the view now is.
|
|
5
|
+
*
|
|
6
|
+
* **It reads `coarseVisibleLocStrings`, never `visibleLocStrings`**, and that is
|
|
7
|
+
* the whole design. The fine one changes on every `offsetPx` write — every frame
|
|
8
|
+
* of a drag, a wheel zoom or a keyboard slide — and a live region driven by it
|
|
9
|
+
* queues an utterance per frame, which does not merely say too much: it makes
|
|
10
|
+
* the screen reader unusable for as long as the drag lasts, because polite
|
|
11
|
+
* announcements are a queue rather than a latest-value. The coarse blocks are
|
|
12
|
+
* already the view's settled signal, published by a `delay: 500` autorun
|
|
13
|
+
* (`setupCoarseDynamicBlocksAutorun`) and flushed synchronously by `moveTo` so a
|
|
14
|
+
* discrete jump — a search, a bookmark, `navToLocString` — announces at once
|
|
15
|
+
* instead of 500ms later. Both properties are what this needs, so this adds no
|
|
16
|
+
* timer of its own; if the debounce ever moves, this moves with it.
|
|
17
|
+
*
|
|
18
|
+
* Its own observer so the view container does not re-render when the locus
|
|
19
|
+
* settles: this component is a text node with no children, and the container
|
|
20
|
+
* mounts every track.
|
|
21
|
+
*
|
|
22
|
+
* The region is rendered with its text from the first render rather than being
|
|
23
|
+
* filled after mount. A live region whose content is present when the node is
|
|
24
|
+
* inserted is generally not announced (the region has to exist before the
|
|
25
|
+
* change), so in practice a freshly-mounted view says nothing; where a reader
|
|
26
|
+
* does announce it, "chr1:1..1,000" as the view appears is a fair thing to hear,
|
|
27
|
+
* and it is one utterance per view rather than one per frame.
|
|
28
|
+
*/
|
|
29
|
+
declare const NavigationAnnouncer: ({ model, }: {
|
|
30
|
+
model: LinearGenomeViewModel;
|
|
31
|
+
}) => import("react").JSX.Element;
|
|
32
|
+
export default NavigationAnnouncer;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
// Off-screen but not `display:none` / `visibility:hidden` / `aria-hidden` — any
|
|
4
|
+
// of those takes the node out of the accessibility tree, which is exactly what a
|
|
5
|
+
// live region must not be. The 1px-clipped box is the long-standing spelling of
|
|
6
|
+
// "readable by assistive tech, occupying no layout".
|
|
7
|
+
const visuallyHidden = {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
width: 1,
|
|
10
|
+
height: 1,
|
|
11
|
+
margin: -1,
|
|
12
|
+
padding: 0,
|
|
13
|
+
border: 0,
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
clipPath: 'inset(50%)',
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The one thing that tells a screen-reader user a pan, a zoom or a search
|
|
20
|
+
* actually moved the view: a polite live region restating where the view now is.
|
|
21
|
+
*
|
|
22
|
+
* **It reads `coarseVisibleLocStrings`, never `visibleLocStrings`**, and that is
|
|
23
|
+
* the whole design. The fine one changes on every `offsetPx` write — every frame
|
|
24
|
+
* of a drag, a wheel zoom or a keyboard slide — and a live region driven by it
|
|
25
|
+
* queues an utterance per frame, which does not merely say too much: it makes
|
|
26
|
+
* the screen reader unusable for as long as the drag lasts, because polite
|
|
27
|
+
* announcements are a queue rather than a latest-value. The coarse blocks are
|
|
28
|
+
* already the view's settled signal, published by a `delay: 500` autorun
|
|
29
|
+
* (`setupCoarseDynamicBlocksAutorun`) and flushed synchronously by `moveTo` so a
|
|
30
|
+
* discrete jump — a search, a bookmark, `navToLocString` — announces at once
|
|
31
|
+
* instead of 500ms later. Both properties are what this needs, so this adds no
|
|
32
|
+
* timer of its own; if the debounce ever moves, this moves with it.
|
|
33
|
+
*
|
|
34
|
+
* Its own observer so the view container does not re-render when the locus
|
|
35
|
+
* settles: this component is a text node with no children, and the container
|
|
36
|
+
* mounts every track.
|
|
37
|
+
*
|
|
38
|
+
* The region is rendered with its text from the first render rather than being
|
|
39
|
+
* filled after mount. A live region whose content is present when the node is
|
|
40
|
+
* inserted is generally not announced (the region has to exist before the
|
|
41
|
+
* change), so in practice a freshly-mounted view says nothing; where a reader
|
|
42
|
+
* does announce it, "chr1:1..1,000" as the view appears is a fair thing to hear,
|
|
43
|
+
* and it is one utterance per view rather than one per frame.
|
|
44
|
+
*/
|
|
45
|
+
const NavigationAnnouncer = observer(function NavigationAnnouncer({ model, }) {
|
|
46
|
+
const { coarseVisibleLocStrings, coarseTotalBpDisplayStr } = model;
|
|
47
|
+
return (_jsx("div", { role: "status", "aria-live": "polite", "aria-atomic": "true", style: visuallyHidden, children: coarseVisibleLocStrings
|
|
48
|
+
? `${coarseVisibleLocStrings} (${coarseTotalBpDisplayStr})`
|
|
49
|
+
: '' }));
|
|
50
|
+
});
|
|
51
|
+
export default NavigationAnnouncer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
|
|
3
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
4
|
import { Button, Paper, Typography } from '@mui/material';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../model.ts';
|
|
2
|
-
import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
3
2
|
type LGV = LinearGenomeViewModel;
|
|
4
|
-
declare const OverviewHighlight: ({ model,
|
|
3
|
+
declare const OverviewHighlight: ({ model, }: {
|
|
5
4
|
model: LGV;
|
|
6
|
-
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element[];
|
|
5
|
+
}) => import("react").JSX.Element[] | null;
|
|
8
6
|
export default OverviewHighlight;
|
|
@@ -1,50 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useStyleTheme } from '@jbrowse/core/ui/PaletteContext';
|
|
2
3
|
import { getSession, notEmpty } from '@jbrowse/core/util';
|
|
3
4
|
import { colord } from '@jbrowse/core/util/colord';
|
|
4
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
...r,
|
|
29
|
-
refName,
|
|
30
|
-
coord: r.start,
|
|
31
|
-
});
|
|
32
|
-
const e = overview.bpToPx({
|
|
33
|
-
...r,
|
|
34
|
-
refName,
|
|
35
|
-
coord: r.end,
|
|
36
|
-
});
|
|
37
|
-
return s !== undefined && e !== undefined
|
|
38
|
-
? {
|
|
39
|
-
width: Math.abs(e - s),
|
|
40
|
-
left: s + cytobandOffset,
|
|
41
|
-
}
|
|
42
|
-
: undefined;
|
|
43
|
-
})
|
|
44
|
-
.filter(notEmpty)
|
|
45
|
-
.map(({ left, width }, idx) => (_jsx("div", { className: classes.highlight, style: {
|
|
46
|
-
width,
|
|
47
|
-
transform: `translateX(${left}px)`,
|
|
48
|
-
} }, `${left}_${width}_${idx}`)));
|
|
6
|
+
import OverviewHighlightBand from './OverviewHighlightBand.js';
|
|
7
|
+
import { getHighlightColor, highlightKey } from './util.js';
|
|
8
|
+
const OverviewHighlight = observer(function OverviewHighlight({ model, }) {
|
|
9
|
+
const theme = useStyleTheme();
|
|
10
|
+
const themed = colord(theme.palette.highlight.main);
|
|
11
|
+
// gate on highlightsVisible to match the main-view band, scalebar band, and
|
|
12
|
+
// SVG export — otherwise "Turn off highlights" leaves the overview bands up
|
|
13
|
+
return getSession(model).highlightsVisible
|
|
14
|
+
? model.highlights
|
|
15
|
+
.map(highlight => {
|
|
16
|
+
const coords = model.getOverviewHighlightCoords(highlight);
|
|
17
|
+
return coords ? { coords, highlight } : undefined;
|
|
18
|
+
})
|
|
19
|
+
.filter(notEmpty)
|
|
20
|
+
.map(({ coords, highlight }, idx) => {
|
|
21
|
+
const bandColor = getHighlightColor(highlight, theme);
|
|
22
|
+
return (_jsx(OverviewHighlightBand
|
|
23
|
+
// region fields keep the key stable across pan/zoom (unlike pixel
|
|
24
|
+
// coords); idx disambiguates duplicate highlights on the region
|
|
25
|
+
, { coords: coords, background: bandColor.toRgbString(), borderColor: (highlight.color ? bandColor : themed).toRgbString(), tooltip: highlight.label }, highlightKey(highlight, idx)));
|
|
26
|
+
})
|
|
27
|
+
: null;
|
|
49
28
|
});
|
|
50
29
|
export default OverviewHighlight;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { Tooltip } from '@mui/material';
|
|
4
|
+
// A single absolute-positioned band over the overview scalebar. The 1px border
|
|
5
|
+
// keeps very narrow bands visible.
|
|
6
|
+
const useStyles = makeStyles()({
|
|
7
|
+
highlight: {
|
|
8
|
+
height: '100%',
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
left: 0,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
export default function OverviewHighlightBand({ coords, background, borderColor, tooltip, }) {
|
|
14
|
+
const { classes } = useStyles();
|
|
15
|
+
const band = (_jsx("div", { className: classes.highlight, style: {
|
|
16
|
+
transform: `translateX(${coords.left}px)`,
|
|
17
|
+
width: coords.width,
|
|
18
|
+
background,
|
|
19
|
+
...(borderColor && {
|
|
20
|
+
borderLeft: `1px solid ${borderColor}`,
|
|
21
|
+
borderRight: `1px solid ${borderColor}`,
|
|
22
|
+
}),
|
|
23
|
+
} }));
|
|
24
|
+
return tooltip ? (_jsx(Tooltip, { title: tooltip, arrow: true, children: band })) : (band);
|
|
25
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
|
|
3
3
|
type LGV = LinearGenomeViewModel;
|
|
4
4
|
declare const OverviewRubberband: ({ model, overview, ControlComponent, }: {
|
|
5
5
|
model: LGV;
|
|
6
|
-
overview:
|
|
6
|
+
overview: ViewLayout;
|
|
7
7
|
ControlComponent?: React.ReactElement;
|
|
8
|
-
}) => import("react
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
9
|
export default OverviewRubberband;
|