@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,49 +1,82 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy, useRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { PluggableElements } from '@jbrowse/core/ui';
|
|
4
|
+
import { OverlayPointerProvider } from '@jbrowse/core/ui/highlightChipReveal';
|
|
5
|
+
import { useMouseTracking } from '@jbrowse/core/ui/useMouseTracking';
|
|
6
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
5
7
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
8
|
+
import { useTheme } from '@mui/material';
|
|
6
9
|
import { observer } from 'mobx-react';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
import { SCALE_BAR_HEIGHT } from '../consts.js';
|
|
11
|
+
import Gridlines from './Gridlines.js';
|
|
12
|
+
import OverviewHighlightBand from './OverviewHighlightBand.js';
|
|
13
|
+
import PaddingBlocks from './PaddingBlocks.js';
|
|
14
|
+
import RangeSelectOverlay from './RangeSelectOverlay.js';
|
|
15
|
+
import Rubberband from './Rubberband.js';
|
|
16
|
+
import Scalebar from './Scalebar.js';
|
|
17
|
+
import VerticalGuide from './VerticalGuide.js';
|
|
18
|
+
import { useRangeSelect } from './useRangeSelect.js';
|
|
19
|
+
import { useSideScroll } from './useSideScroll.js';
|
|
20
|
+
import { getHighlightColor, highlightKey } from './util.js';
|
|
21
|
+
const CenterLine = lazy(() => import('./CenterLine.js'));
|
|
22
|
+
const Highlight = lazy(() => import('./Highlight.js'));
|
|
18
23
|
const useStyles = makeStyles()({
|
|
19
24
|
tracksContainer: {
|
|
20
25
|
position: 'relative',
|
|
21
26
|
contain: 'layout style',
|
|
22
27
|
},
|
|
28
|
+
scalebarHighlights: {
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: 0,
|
|
31
|
+
height: SCALE_BAR_HEIGHT,
|
|
32
|
+
width: '100%',
|
|
33
|
+
// above Rubberband div (825) so bands show over the scalebar,
|
|
34
|
+
// below RubberbandSpan (830) so the selection rect stays on top
|
|
35
|
+
zIndex: 826,
|
|
36
|
+
pointerEvents: 'none',
|
|
37
|
+
},
|
|
23
38
|
});
|
|
24
39
|
const TracksContainer = observer(function TracksContainer({ children, model, }) {
|
|
25
40
|
const { classes } = useStyles();
|
|
26
41
|
const { pluginManager } = getEnv(model);
|
|
27
|
-
const { mouseDown:
|
|
28
|
-
const {
|
|
42
|
+
const { mouseDown: sideScrollMouseDown, mouseUp } = useSideScroll(model);
|
|
43
|
+
const { showGridlines, showCenterLine } = model;
|
|
29
44
|
const ref = useRef(null);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
// shift-drag range select over the whole tracks area. This is intentionally
|
|
46
|
+
// a separate range-select instance from the one inside <Rubberband> (the
|
|
47
|
+
// scalebar control); don't dedupe them — they cover different regions.
|
|
48
|
+
const range = useRangeSelect(ref, model, true);
|
|
49
|
+
// published rather than held (see `useMouseTracking`): the highlight bands
|
|
50
|
+
// read it, and a position in state here would re-render the whole tracks area
|
|
51
|
+
// every frame the pointer moves over it
|
|
52
|
+
const { mouseTracker, handleMouseMove, handleMouseLeave } = useMouseTracking();
|
|
53
|
+
return (_jsx("div", { ref: ref, "data-testid": "tracksContainer", className: classes.tracksContainer, onMouseDown: event => {
|
|
54
|
+
sideScrollMouseDown(event);
|
|
55
|
+
range.mouseDown(event);
|
|
56
|
+
}, onMouseMove: event => {
|
|
57
|
+
handleMouseMove(event);
|
|
58
|
+
range.mouseMove(event);
|
|
59
|
+
}, onMouseLeave: () => {
|
|
60
|
+
handleMouseLeave();
|
|
61
|
+
range.mouseOut();
|
|
62
|
+
}, onMouseUp: mouseUp, children: _jsxs(OverlayPointerProvider, { value: mouseTracker, children: [showGridlines ? (_jsxs(_Fragment, { children: [_jsx(Gridlines, { model: model }), _jsx(PaddingBlocks, { model: model })] })) : null, _jsx(Suspense, { fallback: null, children: showCenterLine ? _jsx(CenterLine, { model: model }) : null }), _jsx(RangeSelectOverlay, { model: model, range: range }), model.volatileGuides.map((guide, idx) => (_jsx(VerticalGuide, { model: model, coordX: guide.xPos }, idx))), _jsx(Rubberband, { model: model, ControlComponent: _jsx(Scalebar, { model: model, style: {
|
|
63
|
+
height: SCALE_BAR_HEIGHT,
|
|
64
|
+
boxSizing: 'border-box',
|
|
65
|
+
} }) }), _jsx(ScalebarHighlightGroup, { model: model }), _jsx(HighlightGroup, { model: model }), _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-TracksContainerComponent", props: { model } }), children] }) }));
|
|
45
66
|
});
|
|
46
67
|
const HighlightGroup = observer(function HighlightGroup({ model, }) {
|
|
47
|
-
return model.highlight.length ? (_jsx(Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight },
|
|
68
|
+
return getSession(model).highlightsVisible && model.highlight.length ? (_jsx(Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight }, highlightKey(highlight, idx)))) })) : null;
|
|
69
|
+
});
|
|
70
|
+
const ScalebarHighlightGroup = observer(function ScalebarHighlightGroup({ model, }) {
|
|
71
|
+
const theme = useTheme();
|
|
72
|
+
const { pluginManager } = getEnv(model);
|
|
73
|
+
const { classes } = useStyles();
|
|
74
|
+
const viewBands = getSession(model).highlightsVisible
|
|
75
|
+
? model.highlight.map((h, idx) => {
|
|
76
|
+
const coords = model.getHighlightCoords(h);
|
|
77
|
+
return coords ? (_jsx(OverviewHighlightBand, { coords: coords, background: getHighlightColor(h, theme).toRgbString() }, highlightKey(h, idx))) : null;
|
|
78
|
+
})
|
|
79
|
+
: [];
|
|
80
|
+
return (_jsxs("div", { className: classes.scalebarHighlights, children: [viewBands, _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-ScalebarHighlightComponent", props: { model } })] }));
|
|
48
81
|
});
|
|
49
82
|
export default TracksContainer;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { stringify } from '@jbrowse/core/util';
|
|
3
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
-
import { Tooltip } from '@mui/material';
|
|
5
4
|
import { observer } from 'mobx-react';
|
|
5
|
+
import { GuideLabel } from '../../shared/coordLabels.js';
|
|
6
|
+
import { stickyChromeTops } from '../stickyChrome.js';
|
|
6
7
|
const useStyles = makeStyles()({
|
|
7
8
|
guide: {
|
|
8
9
|
pointerEvents: 'none',
|
|
@@ -13,19 +14,11 @@ const useStyles = makeStyles()({
|
|
|
13
14
|
background: 'red',
|
|
14
15
|
zIndex: 1001,
|
|
15
16
|
},
|
|
16
|
-
tooltipTarget: {
|
|
17
|
-
position: 'sticky',
|
|
18
|
-
left: 0,
|
|
19
|
-
width: 1,
|
|
20
|
-
},
|
|
21
17
|
});
|
|
22
18
|
const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
|
|
23
19
|
const { classes } = useStyles();
|
|
24
|
-
const { stickyViewHeaders,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
top: rubberbandTop,
|
|
28
|
-
position: stickyViewHeaders ? 'sticky' : undefined,
|
|
29
|
-
} }) }), _jsx("div", { className: classes.guide, style: { transform: `translateX(${coordX}px)` } })] }));
|
|
20
|
+
const { width, stickyViewHeaders, headerHeight } = model;
|
|
21
|
+
const { scalebar } = stickyChromeTops({ stickyViewHeaders, headerHeight });
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsx(GuideLabel, { coordX: coordX, viewWidth: width, stickyTop: scalebar, children: stringify(model.pxToBp(coordX)) }), _jsx("div", { className: classes.guide, style: { transform: `translateX(${coordX}px)` } })] }));
|
|
30
23
|
});
|
|
31
24
|
export default VerticalGuide;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
3
|
+
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
4
|
+
import { IconButton, Tooltip } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
// epsilon guards against the button flickering to disabled from float rounding
|
|
7
|
+
// exactly at the zoom limit
|
|
8
|
+
const EPSILON = 0.0001;
|
|
9
|
+
const ZoomButton = observer(function ZoomButton({ model, direction, small, }) {
|
|
10
|
+
// disabled tracks the debounced coarseBpPerPx (not live bpPerPx) so it doesn't
|
|
11
|
+
// flicker disabled during a zoom animation
|
|
12
|
+
const { maxBpPerPx, minBpPerPx, coarseBpPerPx } = model;
|
|
13
|
+
const out = direction === 'out';
|
|
14
|
+
const disabled = out
|
|
15
|
+
? coarseBpPerPx >= maxBpPerPx - EPSILON
|
|
16
|
+
: coarseBpPerPx <= minBpPerPx + EPSILON;
|
|
17
|
+
const fontSize = small ? 'small' : undefined;
|
|
18
|
+
return (_jsx(Tooltip, { title: out ? 'Zoom out 2x' : 'Zoom in 2x', children: _jsx("span", { children: _jsx(IconButton, { "data-testid": out ? 'zoom_out' : 'zoom_in', size: small ? 'small' : undefined, disabled: disabled, onClick: () => {
|
|
19
|
+
model.zoom(out ? model.bpPerPx * 2 : model.bpPerPx / 2);
|
|
20
|
+
}, children: out ? (_jsx(ZoomOut, { fontSize: fontSize })) : (_jsx(ZoomIn, { fontSize: fontSize })) }) }) }));
|
|
21
|
+
});
|
|
22
|
+
export default ZoomButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type LGV = LinearGenomeViewModel;
|
|
4
|
+
declare const ZoomTransform: ({ model, offset, children, }: {
|
|
5
|
+
model: LGV;
|
|
6
|
+
offset?: number;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export default ZoomTransform;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const useStyles = makeStyles()({
|
|
5
|
+
zoomContainer: {
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
top: 0,
|
|
8
|
+
height: '100%',
|
|
9
|
+
width: '100%',
|
|
10
|
+
pointerEvents: 'none',
|
|
11
|
+
},
|
|
12
|
+
innerContainer: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
height: '100%',
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
// Shared zoom/scroll-transform wrapper for the gridline ticks and padding-block
|
|
19
|
+
// overlays. Lays the overlay out in the staticBlocks frame and shifts it into
|
|
20
|
+
// the viewport by `staticBlocksTranslateX`, so it tracks scroll — but a
|
|
21
|
+
// re-render only patches this div's transform plus the child's path `d`
|
|
22
|
+
// strings, so it stays cheap per frame.
|
|
23
|
+
const ZoomTransform = observer(function ZoomTransform({ model, offset = 0, children, }) {
|
|
24
|
+
const { classes } = useStyles();
|
|
25
|
+
const { staticBlocks, staticBlocksTranslateX } = model;
|
|
26
|
+
return (_jsx("div", { className: classes.zoomContainer, children: _jsx("div", { className: classes.innerContainer, style: {
|
|
27
|
+
// unrounded, unlike ScalebarCoordinateLabels: the children here are
|
|
28
|
+
// paths and boxes rather than text, so there is no glyph to blur
|
|
29
|
+
transform: `translateX(${staticBlocksTranslateX - offset}px)`,
|
|
30
|
+
width: staticBlocks.totalWidthPx,
|
|
31
|
+
}, children: children }) }));
|
|
32
|
+
});
|
|
33
|
+
export default ZoomTransform;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_MOTIFS = "# name<space>site \u2014 '^' or, cutting downstream, '(n/m)'. Edit freely.\nEcoRI G^AATTC\nBamHI G^GATCC\nHindIII A^AGCTT\nNotI GC^GGCCGC\nXhoI C^TCGAG\nSalI G^TCGAC\nPstI CTGCA^G\nSmaI CCC^GGG\nKpnI GGTAC^C\nSacI GAGCT^C\nXbaI T^CTAGA\nSpeI A^CTAGT\nNcoI C^CATGG\nNdeI CA^TATG\nEcoRV GAT^ATC\nBglII A^GATCT";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// A starting point, not a database: this is only the initial value of the motif
|
|
2
|
+
// textarea, so a user can wipe it and paste their own enzyme set (or any motif
|
|
3
|
+
// set at all) from REBASE or elsewhere. Sites use REBASE notation: '^' for a cut
|
|
4
|
+
// inside the site, '(n/m)' for the type IIS enzymes that cut downstream of it —
|
|
5
|
+
// the prefill sticks to the classic '^' cutters, but both parse.
|
|
6
|
+
export const DEFAULT_MOTIFS = `# name<space>site — '^' or, cutting downstream, '(n/m)'. Edit freely.
|
|
7
|
+
EcoRI G^AATTC
|
|
8
|
+
BamHI G^GATCC
|
|
9
|
+
HindIII A^AGCTT
|
|
10
|
+
NotI GC^GGCCGC
|
|
11
|
+
XhoI C^TCGAG
|
|
12
|
+
SalI G^TCGAC
|
|
13
|
+
PstI CTGCA^G
|
|
14
|
+
SmaI CCC^GGG
|
|
15
|
+
KpnI GGTAC^C
|
|
16
|
+
SacI GAGCT^C
|
|
17
|
+
XbaI T^CTAGA
|
|
18
|
+
SpeI A^CTAGT
|
|
19
|
+
NcoI C^CATGG
|
|
20
|
+
NdeI CA^TATG
|
|
21
|
+
EcoRV GAT^ATC
|
|
22
|
+
BglII A^GATCT`;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { StatusCallback } from '@jbrowse/core/util';
|
|
2
|
+
import type { StopToken } from '@jbrowse/core/util/stopToken';
|
|
3
3
|
import type { Region } from '@jbrowse/core/util/types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, regions: Region[]): Promise<Feature[]>;
|
|
4
|
+
import type { IAnyStateTreeNode } from '@jbrowse/mobx-state-tree';
|
|
5
|
+
export declare function fetchSequence(model: IAnyStateTreeNode, regions: Region[], opts?: {
|
|
6
|
+
stopToken?: StopToken;
|
|
7
|
+
statusCallback?: StatusCallback;
|
|
8
|
+
}): Promise<import("@jbrowse/core/util").Feature[]>;
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSequenceAdapterConfig } from '@jbrowse/core/assemblyManager/assembly';
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
|
-
export async function fetchSequence(model, regions) {
|
|
3
|
+
export async function fetchSequence(model, regions, opts = {}) {
|
|
4
4
|
const session = getSession(model);
|
|
5
|
-
const { leftOffset, rightOffset } = model;
|
|
6
|
-
if (!leftOffset || !rightOffset) {
|
|
7
|
-
throw new Error('no offsets on model to use for range');
|
|
8
|
-
}
|
|
9
5
|
const assemblyNames = new Set(regions.map(r => r.assemblyName));
|
|
10
6
|
if (assemblyNames.size > 1) {
|
|
11
7
|
throw new Error('not able to fetch sequences from multiple assemblies currently');
|
|
12
8
|
}
|
|
13
9
|
const { rpcManager, assemblyManager } = session;
|
|
14
|
-
const assemblyName =
|
|
10
|
+
const assemblyName = regions[0]?.assemblyName;
|
|
11
|
+
if (!assemblyName) {
|
|
12
|
+
throw new Error('no assemblyName found on the selected region');
|
|
13
|
+
}
|
|
15
14
|
const assembly = assemblyManager.get(assemblyName);
|
|
16
15
|
if (!assembly) {
|
|
17
16
|
throw new Error(`assembly ${assemblyName} not found`);
|
|
18
17
|
}
|
|
19
|
-
|
|
18
|
+
// Undefined here means the assembly's `configuration` safeReference is
|
|
19
|
+
// unresolved — the assembly outlived the config entry it points at. NOT an
|
|
20
|
+
// assembly whose sequence carries no residues: a ChromSizesAdapter one still
|
|
21
|
+
// has a `sequence.adapter`, and fails later, inside the adapter. Say which
|
|
22
|
+
// this is; passing the undefined on fails in getAdapterPre as "could not
|
|
23
|
+
// determine adapter type", naming neither the assembly nor what was wanted.
|
|
24
|
+
const adapterConfig = getSequenceAdapterConfig(assembly);
|
|
25
|
+
if (!adapterConfig) {
|
|
26
|
+
throw new Error(`assembly ${assemblyName} has no resolved configuration, so its sequence adapter cannot be read`);
|
|
27
|
+
}
|
|
20
28
|
const sessionId = 'getSequence';
|
|
21
29
|
return rpcManager.call(sessionId, 'CoreGetFeatures', {
|
|
22
30
|
adapterConfig,
|
|
23
31
|
regions,
|
|
24
|
-
|
|
32
|
+
...opts,
|
|
25
33
|
});
|
|
26
34
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
+
import type { MenuItem, RecentLocation } from '@jbrowse/core/ui';
|
|
3
|
+
/**
|
|
4
|
+
* What a navigated result is worth remembering as. The display string is what
|
|
5
|
+
* the row shows; the location is what reopening it opens, and is absent for a
|
|
6
|
+
* freehand query, whose label is the searchable thing. Paired with the
|
|
7
|
+
* `BaseResult` the menu rebuilds below so the round trip stays visible in one
|
|
8
|
+
* place: a row replayed through it records the same pair it came from.
|
|
9
|
+
*/
|
|
10
|
+
export declare function recentLocationOf(option: BaseResult): RecentLocation;
|
|
11
|
+
export declare function recentLocationsMenu({ recentLocations, onNavigate, onClear, }: {
|
|
12
|
+
recentLocations: RecentLocation[];
|
|
13
|
+
onNavigate: (option: BaseResult) => void;
|
|
14
|
+
onClear: () => void;
|
|
15
|
+
}): MenuItem[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
+
/**
|
|
3
|
+
* What a navigated result is worth remembering as. The display string is what
|
|
4
|
+
* the row shows; the location is what reopening it opens, and is absent for a
|
|
5
|
+
* freehand query, whose label is the searchable thing. Paired with the
|
|
6
|
+
* `BaseResult` the menu rebuilds below so the round trip stays visible in one
|
|
7
|
+
* place: a row replayed through it records the same pair it came from.
|
|
8
|
+
*/
|
|
9
|
+
export function recentLocationOf(option) {
|
|
10
|
+
return { label: option.getDisplayString(), loc: option.getLocation() };
|
|
11
|
+
}
|
|
12
|
+
// Builds the "Recent ▸" submenu shared by the header search box and the import
|
|
13
|
+
// form overflow menus, so both surfaces stay identical. Empty when there is no
|
|
14
|
+
// history yet, so the ⋮ button only appears once there is something to show.
|
|
15
|
+
export function recentLocationsMenu({ recentLocations, onNavigate, onClear, }) {
|
|
16
|
+
return recentLocations.length
|
|
17
|
+
? [
|
|
18
|
+
{
|
|
19
|
+
label: 'Recent',
|
|
20
|
+
subMenu: [
|
|
21
|
+
...recentLocations.map(({ label, loc }) => ({
|
|
22
|
+
label,
|
|
23
|
+
onClick: () => {
|
|
24
|
+
// a row that recorded a location navigates straight to it; one
|
|
25
|
+
// with only a label goes back through the search path, which is
|
|
26
|
+
// where a freehand query resolved the first time
|
|
27
|
+
onNavigate(new BaseResult({ label, locString: loc }));
|
|
28
|
+
},
|
|
29
|
+
})),
|
|
30
|
+
{ type: 'divider' },
|
|
31
|
+
{ label: 'Clear recent locations', onClick: onClear },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
: [];
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface SequenceSearchModel {
|
|
2
|
+
assemblyNames: string[];
|
|
3
|
+
showTrack: (trackId: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface SequenceSearchModeProps {
|
|
6
|
+
model: SequenceSearchModel;
|
|
7
|
+
handleClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function addReferenceScanTrack(model: SequenceSearchModel, args: {
|
|
10
|
+
trackId: string;
|
|
11
|
+
name: string;
|
|
12
|
+
adapter: Record<string, unknown>;
|
|
13
|
+
}): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getSession, isSessionWithAddSessionTrack } from '@jbrowse/core/util';
|
|
2
|
+
// Creates a FeatureTrack that scans the assembly's reference sequence and shows
|
|
3
|
+
// it. `adapter` carries the type + params only: the scan adapters resolve the
|
|
4
|
+
// sequence from the track's assembly at fetch time (getSequenceSubAdapter), so
|
|
5
|
+
// no sequence adapter is baked into the track config here.
|
|
6
|
+
export function addReferenceScanTrack(model, args) {
|
|
7
|
+
const session = getSession(model);
|
|
8
|
+
const assemblyName = model.assemblyNames[0];
|
|
9
|
+
if (isSessionWithAddSessionTrack(session)) {
|
|
10
|
+
session.addSessionTrackConf({
|
|
11
|
+
trackId: args.trackId,
|
|
12
|
+
name: args.name,
|
|
13
|
+
assemblyNames: [assemblyName],
|
|
14
|
+
type: 'FeatureTrack',
|
|
15
|
+
adapter: args.adapter,
|
|
16
|
+
});
|
|
17
|
+
model.showTrack(args.trackId);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
session.notify('This session does not support adding tracks', 'warning');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../model.ts';
|
|
2
|
+
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
|
+
import type { MenuItem } from '@jbrowse/core/ui';
|
|
4
|
+
export declare function getTrackOrderSubMenu({ view, track, }: {
|
|
5
|
+
view: LinearGenomeViewModel;
|
|
6
|
+
track: BaseTrackModel;
|
|
7
|
+
}): MenuItem[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
2
|
+
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
3
|
+
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
4
|
+
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
5
|
+
import PushPinIcon from '@mui/icons-material/PushPin';
|
|
6
|
+
// Pin/unpin and reorder items for a single track. Pinning is only meaningful in
|
|
7
|
+
// a top-level view; the to-top/to-bottom jumps are redundant with up/down when
|
|
8
|
+
// there are only two tracks, so they need a third track to appear.
|
|
9
|
+
export function getTrackOrderSubMenu({ view, track, }) {
|
|
10
|
+
const { isTopLevelView, tracks } = view;
|
|
11
|
+
const { pinned } = track;
|
|
12
|
+
const canMove = tracks.length > 1;
|
|
13
|
+
const canJump = tracks.length > 2;
|
|
14
|
+
return [
|
|
15
|
+
...(isTopLevelView
|
|
16
|
+
? [
|
|
17
|
+
{
|
|
18
|
+
label: pinned ? 'Unpin track' : 'Pin track',
|
|
19
|
+
icon: PushPinIcon,
|
|
20
|
+
onClick: () => {
|
|
21
|
+
track.setPinned(!pinned);
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
]
|
|
25
|
+
: []),
|
|
26
|
+
...(canJump
|
|
27
|
+
? [
|
|
28
|
+
{
|
|
29
|
+
label: 'Move track to top',
|
|
30
|
+
icon: KeyboardDoubleArrowUpIcon,
|
|
31
|
+
onClick: () => {
|
|
32
|
+
view.moveTrackToTop(track.id);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
: []),
|
|
37
|
+
...(canMove
|
|
38
|
+
? [
|
|
39
|
+
{
|
|
40
|
+
label: 'Move track up',
|
|
41
|
+
icon: KeyboardArrowUpIcon,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
view.moveTrackUp(track.id);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Move track down',
|
|
48
|
+
icon: KeyboardArrowDownIcon,
|
|
49
|
+
onClick: () => {
|
|
50
|
+
view.moveTrackDown(track.id);
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
: []),
|
|
55
|
+
...(canJump
|
|
56
|
+
? [
|
|
57
|
+
{
|
|
58
|
+
label: 'Move track to bottom',
|
|
59
|
+
icon: KeyboardDoubleArrowDownIcon,
|
|
60
|
+
onClick: () => {
|
|
61
|
+
view.moveTrackToBottom(track.id);
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
]
|
|
65
|
+
: []),
|
|
66
|
+
];
|
|
67
|
+
}
|
|
@@ -1,84 +1,29 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
+
import type React from 'react';
|
|
3
3
|
interface AnchorPosition {
|
|
4
4
|
offsetX: number;
|
|
5
5
|
clientX: number;
|
|
6
6
|
clientY: number;
|
|
7
|
-
isClick
|
|
7
|
+
isClick: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement | null>, model: LinearGenomeViewModel, shiftOnly?: boolean): {
|
|
10
10
|
open: boolean;
|
|
11
11
|
isClick: boolean | undefined;
|
|
12
|
-
clickBpOffset:
|
|
13
|
-
coord: number;
|
|
14
|
-
index: number;
|
|
15
|
-
refName: string;
|
|
16
|
-
oob: boolean;
|
|
17
|
-
assemblyName: string;
|
|
18
|
-
offset: number;
|
|
19
|
-
start: number;
|
|
20
|
-
end: number;
|
|
21
|
-
reversed?: boolean;
|
|
22
|
-
} | undefined;
|
|
23
|
-
guideX: number | undefined;
|
|
24
|
-
mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
25
|
-
mouseMove: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
26
|
-
mouseOut: () => void;
|
|
27
|
-
handleClose: () => void;
|
|
28
|
-
handleMenuItemClick: (_: unknown, callback: () => void) => void;
|
|
29
|
-
anchorPosition: AnchorPosition | undefined;
|
|
30
|
-
rubberbandOn?: undefined;
|
|
31
|
-
leftBpOffset?: undefined;
|
|
32
|
-
rightBpOffset?: undefined;
|
|
33
|
-
numOfBpSelected?: undefined;
|
|
34
|
-
width?: undefined;
|
|
35
|
-
left?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
open: boolean;
|
|
38
|
-
isClick: boolean | undefined;
|
|
39
|
-
clickBpOffset: {
|
|
40
|
-
coord: number;
|
|
41
|
-
index: number;
|
|
42
|
-
refName: string;
|
|
43
|
-
oob: boolean;
|
|
44
|
-
assemblyName: string;
|
|
45
|
-
offset: number;
|
|
46
|
-
start: number;
|
|
47
|
-
end: number;
|
|
48
|
-
reversed?: boolean;
|
|
49
|
-
} | undefined;
|
|
12
|
+
clickBpOffset: import("@jbrowse/core/util/Base1DUtils").PxToBpResult | undefined;
|
|
50
13
|
guideX: number | undefined;
|
|
51
14
|
rubberbandOn: boolean;
|
|
52
15
|
mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
53
16
|
mouseMove: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
54
17
|
mouseOut: () => void;
|
|
55
18
|
handleClose: () => void;
|
|
56
|
-
handleMenuItemClick: (
|
|
57
|
-
leftBpOffset: {
|
|
58
|
-
coord: number;
|
|
59
|
-
index: number;
|
|
60
|
-
refName: string;
|
|
61
|
-
oob: boolean;
|
|
62
|
-
assemblyName: string;
|
|
63
|
-
offset: number;
|
|
64
|
-
start: number;
|
|
65
|
-
end: number;
|
|
66
|
-
reversed?: boolean;
|
|
67
|
-
};
|
|
68
|
-
rightBpOffset: {
|
|
69
|
-
coord: number;
|
|
70
|
-
index: number;
|
|
71
|
-
refName: string;
|
|
72
|
-
oob: boolean;
|
|
73
|
-
assemblyName: string;
|
|
74
|
-
offset: number;
|
|
75
|
-
start: number;
|
|
76
|
-
end: number;
|
|
77
|
-
reversed?: boolean;
|
|
78
|
-
};
|
|
19
|
+
handleMenuItemClick: (callback: () => void) => void;
|
|
79
20
|
anchorPosition: AnchorPosition | undefined;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
21
|
+
rubberband: {
|
|
22
|
+
leftBpOffset: ReturnType<LinearGenomeViewModel['pxToBp']>;
|
|
23
|
+
rightBpOffset: ReturnType<LinearGenomeViewModel['pxToBp']>;
|
|
24
|
+
numOfBpSelected: number;
|
|
25
|
+
width: number;
|
|
26
|
+
left: number;
|
|
27
|
+
} | undefined;
|
|
83
28
|
};
|
|
84
29
|
export {};
|