@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/FeatureTrack/configSchema.d.ts +104 -65
- package/esm/FeatureTrack/configSchema.js +47 -1
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
- package/esm/LaunchLinearGenomeView/index.js +6 -12
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +250 -121
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +16 -7
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +144 -0
- package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
- package/esm/LinearGenomeView/components/Cytobands.js +76 -53
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +7 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -67
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js +29 -58
- package/esm/LinearGenomeView/components/Header.d.ts +1 -1
- package/esm/LinearGenomeView/components/Header.js +32 -16
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.js +16 -7
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +67 -51
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +19 -23
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +15 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
- package/esm/LinearGenomeView/components/ImportForm.js +95 -61
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +6 -5
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +13 -10
- package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
- package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +84 -79
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -32
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
- package/esm/LinearGenomeView/components/PaddingBlocks.js +61 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +13 -16
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/Scalebar.js +16 -21
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +58 -66
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
- package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
- package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
- package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
- package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
- package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
- package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
- package/esm/LinearGenomeView/components/searchModes.js +22 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
- package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
- package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
- package/esm/LinearGenomeView/components/util.d.ts +20 -6
- package/esm/LinearGenomeView/components/util.js +27 -6
- package/esm/LinearGenomeView/consts.d.ts +7 -2
- package/esm/LinearGenomeView/consts.js +18 -2
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +27 -0
- package/esm/LinearGenomeView/headerFit.js +59 -0
- package/esm/LinearGenomeView/index.d.ts +32 -2
- package/esm/LinearGenomeView/index.js +16 -6
- package/esm/LinearGenomeView/initKeys.d.ts +12 -0
- package/esm/LinearGenomeView/initKeys.js +68 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +23 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +58 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +3238 -136
- package/esm/LinearGenomeView/model.js +2425 -528
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
- package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.js +44 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
- package/esm/LinearGenomeView/stickyChrome.js +30 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +77 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -21
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +263 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
- package/esm/LinearGenomeView/types.d.ts +17 -31
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +332 -12
- package/esm/LinearGenomeView/util.js +606 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
- package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +1 -0
- package/esm/MultiLevelRubberband/types.d.ts +6 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
- package/esm/displayKitTests/perRegionTestEnv.js +138 -0
- package/esm/index.d.ts +122 -1235
- package/esm/index.js +101 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +55 -11
- package/esm/searchUtils.js +342 -45
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +33 -0
- package/esm/shared/coordLabels.d.ts +40 -0
- package/esm/shared/coordLabels.js +119 -0
- package/package.json +18 -19
- package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
- package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
- package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/esm/BaseLinearDisplay/components/Block.js +0 -45
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
- package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
- package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/util.js +0 -107
- package/esm/BaseLinearDisplay/index.d.ts +0 -17
- package/esm/BaseLinearDisplay/index.js +0 -13
- package/esm/BaseLinearDisplay/model.d.ts +0 -1197
- package/esm/BaseLinearDisplay/model.js +0 -432
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
- package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
- package/esm/BaseLinearDisplay/models/util.js +0 -43
- package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
- package/esm/BaseLinearDisplay/renderSvg.js +0 -63
- package/esm/BaseLinearDisplay/types.d.ts +0 -43
- package/esm/BaseLinearDisplay/types.js +0 -3
- package/esm/BaseLinearDisplay/util.d.ts +0 -16
- package/esm/BaseLinearDisplay/util.js +0 -71
- package/esm/BasicTrack/configSchema.d.ts +0 -85
- package/esm/BasicTrack/configSchema.js +0 -8
- package/esm/BasicTrack/index.d.ts +0 -2
- package/esm/BasicTrack/index.js +0 -12
- package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBareDisplay/configSchema.js +0 -11
- package/esm/LinearBareDisplay/index.d.ts +0 -4
- package/esm/LinearBareDisplay/index.js +0 -20
- package/esm/LinearBareDisplay/model.d.ts +0 -1196
- package/esm/LinearBareDisplay/model.js +0 -32
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
- package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBasicDisplay/configSchema.js +0 -11
- package/esm/LinearBasicDisplay/index.d.ts +0 -4
- package/esm/LinearBasicDisplay/index.js +0 -20
- package/esm/LinearBasicDisplay/model.d.ts +0 -1391
- package/esm/LinearBasicDisplay/model.js +0 -158
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
- package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
- package/esm/LinearFeatureDisplay/configSchema.js +0 -11
- package/esm/LinearFeatureDisplay/index.d.ts +0 -3
- package/esm/LinearFeatureDisplay/index.js +0 -2
- package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
- package/esm/LinearFeatureDisplay/model.js +0 -305
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
- package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
- package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
- package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
- package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
- package/esm/LinearGenomeView/svgExportUtil.js +0 -6
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
- /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
|
-
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
3
|
-
import { BaseDisplay } from '@jbrowse/core/pluggableElementTypes/models';
|
|
4
|
-
import { getContainingTrack, getContainingView, getSession, isFeature, isSelectionContainer, isSessionModelWithWidgets, } from '@jbrowse/core/util';
|
|
5
|
-
import CompositeMap from '@jbrowse/core/util/compositeMap';
|
|
6
|
-
import { getParentRenderProps, getRpcSessionId, } from '@jbrowse/core/util/tracks';
|
|
7
|
-
import { addDisposer, flow, isAlive, types } from '@jbrowse/mobx-state-tree';
|
|
8
|
-
import CenterFocusStrongIcon from '@mui/icons-material/CenterFocusStrong';
|
|
9
|
-
import CloseFullscreenIcon from '@mui/icons-material/CloseFullscreen';
|
|
10
|
-
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
11
|
-
import MenuOpenIcon from '@mui/icons-material/MenuOpen';
|
|
12
|
-
import { autorun } from 'mobx';
|
|
13
|
-
import { calculateSvgLegendWidth } from "./calculateSvgLegendWidth.js";
|
|
14
|
-
import { deduplicateFeatureLabels } from "./components/util.js";
|
|
15
|
-
import FeatureDensityMixin from "./models/FeatureDensityMixin.js";
|
|
16
|
-
import TrackHeightMixin from "./models/TrackHeightMixin.js";
|
|
17
|
-
import configSchema from "./models/configSchema.js";
|
|
18
|
-
import BlockState from "./models/serverSideRenderedBlock.js";
|
|
19
|
-
import { fetchFeatureByIdRpc, findSubfeatureById, getTranscripts, hasIntrons, } from "./util.js";
|
|
20
|
-
const Tooltip = lazy(() => import("./components/Tooltip.js"));
|
|
21
|
-
const CollapseIntronsDialog = lazy(() => import("./components/CollapseIntronsDialog/CollapseIntronsDialog.js"));
|
|
22
|
-
function stateModelFactory() {
|
|
23
|
-
return types
|
|
24
|
-
.compose('BaseLinearDisplay', BaseDisplay, TrackHeightMixin(), FeatureDensityMixin(), types.model({
|
|
25
|
-
blockState: types.map(BlockState),
|
|
26
|
-
configuration: ConfigurationReference(configSchema),
|
|
27
|
-
showLegend: types.maybe(types.boolean),
|
|
28
|
-
showTooltips: types.maybe(types.boolean),
|
|
29
|
-
}))
|
|
30
|
-
.volatile(() => ({
|
|
31
|
-
mouseoverExtraInformation: undefined,
|
|
32
|
-
featureIdUnderMouse: undefined,
|
|
33
|
-
subfeatureIdUnderMouse: undefined,
|
|
34
|
-
contextMenuFeature: undefined,
|
|
35
|
-
}))
|
|
36
|
-
.views(self => ({
|
|
37
|
-
get DisplayMessageComponent() {
|
|
38
|
-
return undefined;
|
|
39
|
-
},
|
|
40
|
-
get blockType() {
|
|
41
|
-
return 'staticBlocks';
|
|
42
|
-
},
|
|
43
|
-
get blockDefinitions() {
|
|
44
|
-
const view = getContainingView(self);
|
|
45
|
-
if (!view.initialized) {
|
|
46
|
-
throw new Error('view not initialized yet');
|
|
47
|
-
}
|
|
48
|
-
return view[this.blockType];
|
|
49
|
-
},
|
|
50
|
-
}))
|
|
51
|
-
.views(self => ({
|
|
52
|
-
get renderDelay() {
|
|
53
|
-
return 50;
|
|
54
|
-
},
|
|
55
|
-
get TooltipComponent() {
|
|
56
|
-
return Tooltip;
|
|
57
|
-
},
|
|
58
|
-
legendItems(_theme) {
|
|
59
|
-
return [];
|
|
60
|
-
},
|
|
61
|
-
svgLegendWidth(theme) {
|
|
62
|
-
return self.showLegend
|
|
63
|
-
? calculateSvgLegendWidth(this.legendItems(theme))
|
|
64
|
-
: 0;
|
|
65
|
-
},
|
|
66
|
-
get selectedFeatureId() {
|
|
67
|
-
if (isAlive(self)) {
|
|
68
|
-
const { selection } = getSession(self);
|
|
69
|
-
if (isFeature(selection)) {
|
|
70
|
-
return selection.id();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return undefined;
|
|
74
|
-
},
|
|
75
|
-
get featureWidgetType() {
|
|
76
|
-
return {
|
|
77
|
-
type: 'BaseFeatureWidget',
|
|
78
|
-
id: 'baseFeature',
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
}))
|
|
82
|
-
.views(self => ({
|
|
83
|
-
get showTooltipsEnabled() {
|
|
84
|
-
return self.showTooltips ?? true;
|
|
85
|
-
},
|
|
86
|
-
get features() {
|
|
87
|
-
const featureMaps = [];
|
|
88
|
-
for (const block of self.blockState.values()) {
|
|
89
|
-
if (block.features) {
|
|
90
|
-
featureMaps.push(block.features);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return new CompositeMap(featureMaps);
|
|
94
|
-
},
|
|
95
|
-
get featureUnderMouse() {
|
|
96
|
-
const feat = self.featureIdUnderMouse;
|
|
97
|
-
return feat ? this.features.get(feat) : undefined;
|
|
98
|
-
},
|
|
99
|
-
getFeatureById(featureId, parentFeatureId) {
|
|
100
|
-
const feature = this.features.get(featureId);
|
|
101
|
-
if (feature) {
|
|
102
|
-
return feature;
|
|
103
|
-
}
|
|
104
|
-
if (parentFeatureId) {
|
|
105
|
-
const parent = this.features.get(parentFeatureId);
|
|
106
|
-
if (parent) {
|
|
107
|
-
return findSubfeatureById(parent, featureId);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return undefined;
|
|
111
|
-
},
|
|
112
|
-
get layoutFeatures() {
|
|
113
|
-
const featureMaps = [];
|
|
114
|
-
for (const block of self.blockState.values()) {
|
|
115
|
-
if (block.layout?.getRectangles) {
|
|
116
|
-
featureMaps.push(block.layout.getRectangles());
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return new CompositeMap(featureMaps);
|
|
120
|
-
},
|
|
121
|
-
getFeatureOverlapping(blockKey, x, y) {
|
|
122
|
-
return self.blockState.get(blockKey)?.layout?.getByCoord(x, y);
|
|
123
|
-
},
|
|
124
|
-
getFeatureByID(blockKey, id) {
|
|
125
|
-
return self.blockState.get(blockKey)?.layout?.getByID(id);
|
|
126
|
-
},
|
|
127
|
-
searchFeatureByID(id) {
|
|
128
|
-
for (const block of self.blockState.values()) {
|
|
129
|
-
const val = block.layout?.getByID(id);
|
|
130
|
-
if (val) {
|
|
131
|
-
return val;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return undefined;
|
|
135
|
-
},
|
|
136
|
-
get floatingLabelData() {
|
|
137
|
-
const view = getContainingView(self);
|
|
138
|
-
const { assemblyManager } = getSession(self);
|
|
139
|
-
const assemblyName = view.assemblyNames[0];
|
|
140
|
-
const assembly = assemblyName
|
|
141
|
-
? assemblyManager.get(assemblyName)
|
|
142
|
-
: undefined;
|
|
143
|
-
return deduplicateFeatureLabels(this.layoutFeatures, view, assembly, view.bpPerPx);
|
|
144
|
-
},
|
|
145
|
-
}))
|
|
146
|
-
.actions(self => ({
|
|
147
|
-
addBlock(key, block) {
|
|
148
|
-
const blockInstance = BlockState.create({
|
|
149
|
-
key,
|
|
150
|
-
region: block.toRegion(),
|
|
151
|
-
});
|
|
152
|
-
blockInstance.setCachedDisplay(self);
|
|
153
|
-
self.blockState.set(key, blockInstance);
|
|
154
|
-
},
|
|
155
|
-
deleteBlock(key) {
|
|
156
|
-
self.blockState.delete(key);
|
|
157
|
-
},
|
|
158
|
-
selectFeature(feature) {
|
|
159
|
-
const session = getSession(self);
|
|
160
|
-
if (isSelectionContainer(session)) {
|
|
161
|
-
session.setSelection(feature);
|
|
162
|
-
}
|
|
163
|
-
if (isSessionModelWithWidgets(session)) {
|
|
164
|
-
const { rpcManager } = session;
|
|
165
|
-
const sessionId = getRpcSessionId(self);
|
|
166
|
-
const track = getContainingTrack(self);
|
|
167
|
-
const view = getContainingView(self);
|
|
168
|
-
const adapterConfig = getConf(track, 'adapter');
|
|
169
|
-
const { type, id } = self.featureWidgetType;
|
|
170
|
-
rpcManager
|
|
171
|
-
.call(sessionId, 'CoreGetMetadata', { adapterConfig })
|
|
172
|
-
.then(descriptions => {
|
|
173
|
-
if (isAlive(self)) {
|
|
174
|
-
session.showWidget(session.addWidget(type, id, {
|
|
175
|
-
featureData: feature.toJSON(),
|
|
176
|
-
view,
|
|
177
|
-
track,
|
|
178
|
-
descriptions,
|
|
179
|
-
}));
|
|
180
|
-
}
|
|
181
|
-
})
|
|
182
|
-
.catch((e) => {
|
|
183
|
-
console.error(e);
|
|
184
|
-
getSession(self).notifyError(`${e}`, e);
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
navToFeature(feature) {
|
|
189
|
-
const view = getContainingView(self);
|
|
190
|
-
view.navTo({
|
|
191
|
-
refName: feature.get('refName'),
|
|
192
|
-
start: feature.get('start'),
|
|
193
|
-
end: feature.get('end'),
|
|
194
|
-
});
|
|
195
|
-
},
|
|
196
|
-
clearFeatureSelection() {
|
|
197
|
-
getSession(self).clearSelection();
|
|
198
|
-
},
|
|
199
|
-
setFeatureIdUnderMouse(feature) {
|
|
200
|
-
self.featureIdUnderMouse = feature;
|
|
201
|
-
},
|
|
202
|
-
setSubfeatureIdUnderMouse(subfeatureId) {
|
|
203
|
-
self.subfeatureIdUnderMouse = subfeatureId;
|
|
204
|
-
},
|
|
205
|
-
setContextMenuFeature(feature) {
|
|
206
|
-
self.contextMenuFeature = feature;
|
|
207
|
-
},
|
|
208
|
-
setMouseoverExtraInformation(extra) {
|
|
209
|
-
self.mouseoverExtraInformation = extra;
|
|
210
|
-
},
|
|
211
|
-
setShowLegend(s) {
|
|
212
|
-
self.showLegend = s;
|
|
213
|
-
},
|
|
214
|
-
setShowTooltips(arg) {
|
|
215
|
-
self.showTooltips = arg;
|
|
216
|
-
},
|
|
217
|
-
}))
|
|
218
|
-
.actions(self => {
|
|
219
|
-
const { reload: superReload } = self;
|
|
220
|
-
return {
|
|
221
|
-
async reload() {
|
|
222
|
-
self.setError();
|
|
223
|
-
self.setCurrStatsBpPerPx(0);
|
|
224
|
-
self.clearFeatureDensityStats();
|
|
225
|
-
for (const val of self.blockState.values()) {
|
|
226
|
-
val.doReload();
|
|
227
|
-
}
|
|
228
|
-
superReload();
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
})
|
|
232
|
-
.actions(self => ({
|
|
233
|
-
selectFeatureById: flow(function* (featureId, parentFeatureId, topLevelFeatureId) {
|
|
234
|
-
const feature = self.getFeatureById(featureId, parentFeatureId);
|
|
235
|
-
if (feature) {
|
|
236
|
-
self.selectFeature(feature);
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
const rpcParentId = topLevelFeatureId && topLevelFeatureId !== featureId
|
|
240
|
-
? topLevelFeatureId
|
|
241
|
-
: parentFeatureId;
|
|
242
|
-
try {
|
|
243
|
-
const session = getSession(self);
|
|
244
|
-
const f = yield fetchFeatureByIdRpc({
|
|
245
|
-
rpcManager: session.rpcManager,
|
|
246
|
-
sessionId: getRpcSessionId(self),
|
|
247
|
-
trackId: getContainingTrack(self).id,
|
|
248
|
-
rendererType: self.rendererTypeName,
|
|
249
|
-
featureId,
|
|
250
|
-
parentFeatureId: rpcParentId,
|
|
251
|
-
});
|
|
252
|
-
if (f && isAlive(self)) {
|
|
253
|
-
self.selectFeature(f);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
catch (e) {
|
|
257
|
-
console.error(e);
|
|
258
|
-
getSession(self).notifyError(`${e}`, e);
|
|
259
|
-
}
|
|
260
|
-
}),
|
|
261
|
-
setContextMenuFeatureById: flow(function* (featureId, parentFeatureId, topLevelFeatureId) {
|
|
262
|
-
const feature = self.getFeatureById(featureId, parentFeatureId);
|
|
263
|
-
if (feature) {
|
|
264
|
-
self.setContextMenuFeature(feature);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
const rpcParentId = topLevelFeatureId && topLevelFeatureId !== featureId
|
|
268
|
-
? topLevelFeatureId
|
|
269
|
-
: parentFeatureId;
|
|
270
|
-
try {
|
|
271
|
-
const session = getSession(self);
|
|
272
|
-
const f = yield fetchFeatureByIdRpc({
|
|
273
|
-
rpcManager: session.rpcManager,
|
|
274
|
-
sessionId: getRpcSessionId(self),
|
|
275
|
-
trackId: getContainingTrack(self).id,
|
|
276
|
-
rendererType: self.rendererTypeName,
|
|
277
|
-
featureId,
|
|
278
|
-
parentFeatureId: rpcParentId,
|
|
279
|
-
});
|
|
280
|
-
if (f && isAlive(self)) {
|
|
281
|
-
self.setContextMenuFeature(f);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
catch (e) {
|
|
285
|
-
console.error(e);
|
|
286
|
-
getSession(self).notifyError(`${e}`, e);
|
|
287
|
-
}
|
|
288
|
-
}),
|
|
289
|
-
}))
|
|
290
|
-
.views(self => ({
|
|
291
|
-
trackMenuItems() {
|
|
292
|
-
return [];
|
|
293
|
-
},
|
|
294
|
-
contextMenuItems() {
|
|
295
|
-
const feat = self.contextMenuFeature;
|
|
296
|
-
const transcripts = getTranscripts(feat);
|
|
297
|
-
return feat
|
|
298
|
-
? [
|
|
299
|
-
{
|
|
300
|
-
label: 'Open feature details',
|
|
301
|
-
icon: MenuOpenIcon,
|
|
302
|
-
onClick: () => {
|
|
303
|
-
self.selectFeature(feat);
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
label: 'Zoom to feature',
|
|
308
|
-
icon: CenterFocusStrongIcon,
|
|
309
|
-
onClick: () => {
|
|
310
|
-
self.navToFeature(feat);
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
label: 'Copy info to clipboard',
|
|
315
|
-
icon: ContentCopyIcon,
|
|
316
|
-
onClick: async () => {
|
|
317
|
-
const { uniqueId, ...rest } = feat.toJSON();
|
|
318
|
-
const session = getSession(self);
|
|
319
|
-
const { default: copy } = await import('copy-to-clipboard');
|
|
320
|
-
copy(JSON.stringify(rest, null, 4));
|
|
321
|
-
session.notify('Copied to clipboard', 'success');
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
...(hasIntrons(transcripts)
|
|
325
|
-
? [
|
|
326
|
-
{
|
|
327
|
-
label: 'Collapse introns',
|
|
328
|
-
icon: CloseFullscreenIcon,
|
|
329
|
-
onClick: () => {
|
|
330
|
-
const view = getContainingView(self);
|
|
331
|
-
const { assemblyManager } = getSession(self);
|
|
332
|
-
const assembly = assemblyManager.get(view.assemblyNames[0]);
|
|
333
|
-
if (assembly) {
|
|
334
|
-
getSession(self).queueDialog(handleClose => [
|
|
335
|
-
CollapseIntronsDialog,
|
|
336
|
-
{
|
|
337
|
-
view,
|
|
338
|
-
transcripts,
|
|
339
|
-
handleClose,
|
|
340
|
-
assembly,
|
|
341
|
-
},
|
|
342
|
-
]);
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
]
|
|
347
|
-
: []),
|
|
348
|
-
]
|
|
349
|
-
: [];
|
|
350
|
-
},
|
|
351
|
-
renderingProps() {
|
|
352
|
-
return {
|
|
353
|
-
displayModel: self,
|
|
354
|
-
onMouseMove(_, featureId) {
|
|
355
|
-
self.setFeatureIdUnderMouse(featureId);
|
|
356
|
-
},
|
|
357
|
-
onMouseLeave(_) {
|
|
358
|
-
self.setFeatureIdUnderMouse(undefined);
|
|
359
|
-
},
|
|
360
|
-
onContextMenu(_) {
|
|
361
|
-
self.setContextMenuFeature(undefined);
|
|
362
|
-
self.clearFeatureSelection();
|
|
363
|
-
},
|
|
364
|
-
onFeatureClick(_, featureId) {
|
|
365
|
-
if (featureId) {
|
|
366
|
-
self.selectFeatureById(featureId).catch((e) => {
|
|
367
|
-
console.error(e);
|
|
368
|
-
getSession(self).notifyError(`${e}`, e);
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
};
|
|
373
|
-
},
|
|
374
|
-
renderProps() {
|
|
375
|
-
return {
|
|
376
|
-
...getParentRenderProps(self),
|
|
377
|
-
notReady: !self.featureDensityStatsReady,
|
|
378
|
-
rpcDriverName: self.effectiveRpcDriverName,
|
|
379
|
-
};
|
|
380
|
-
},
|
|
381
|
-
}))
|
|
382
|
-
.actions(self => ({
|
|
383
|
-
async renderSvg(opts) {
|
|
384
|
-
const { renderBaseLinearDisplaySvg } = await import("./renderSvg.js");
|
|
385
|
-
return renderBaseLinearDisplaySvg(self, opts);
|
|
386
|
-
},
|
|
387
|
-
afterAttach() {
|
|
388
|
-
addDisposer(self, autorun(function blockDefinitionsAutorun() {
|
|
389
|
-
try {
|
|
390
|
-
if (!isAlive(self) || self.isMinimized) {
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
const view = getContainingView(self);
|
|
394
|
-
if (!view.initialized) {
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
const contentBlocks = self.blockDefinitions.contentBlocks;
|
|
398
|
-
const newKeys = new Set(contentBlocks.map(b => b.key));
|
|
399
|
-
for (const block of contentBlocks) {
|
|
400
|
-
if (!self.blockState.has(block.key)) {
|
|
401
|
-
self.addBlock(block.key, block);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
for (const key of self.blockState.keys()) {
|
|
405
|
-
if (!newKeys.has(key)) {
|
|
406
|
-
self.deleteBlock(key);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
catch (e) {
|
|
411
|
-
}
|
|
412
|
-
}, {
|
|
413
|
-
name: 'BaseLinearDisplayBlockDefinitions',
|
|
414
|
-
delay: 60,
|
|
415
|
-
}));
|
|
416
|
-
},
|
|
417
|
-
}))
|
|
418
|
-
.preProcessSnapshot(snap => {
|
|
419
|
-
if (!snap) {
|
|
420
|
-
return snap;
|
|
421
|
-
}
|
|
422
|
-
const { height, ...rest } = snap;
|
|
423
|
-
return { heightPreConfig: height, ...rest };
|
|
424
|
-
})
|
|
425
|
-
.postProcessSnapshot(snap => {
|
|
426
|
-
const r = snap;
|
|
427
|
-
const { blockState, ...rest } = r;
|
|
428
|
-
return rest;
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
export const BaseLinearDisplay = stateModelFactory();
|
|
432
|
-
export {} from "./components/FloatingLegend.js";
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import type { Region } from '@jbrowse/core/util/types';
|
|
3
|
-
export default function FeatureDensityMixin(): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
4
|
-
userBpPerPxLimit: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
5
|
-
userByteSizeLimit: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
6
|
-
}, {
|
|
7
|
-
featureDensityStatsP: undefined | Promise<FeatureDensityStats>;
|
|
8
|
-
featureDensityStats: undefined | FeatureDensityStats;
|
|
9
|
-
currStatsBpPerPx: number;
|
|
10
|
-
} & {
|
|
11
|
-
readonly currentBytesRequested: number;
|
|
12
|
-
readonly currentFeatureScreenDensity: number;
|
|
13
|
-
readonly maxFeatureScreenDensity: any;
|
|
14
|
-
readonly featureDensityStatsReady: boolean;
|
|
15
|
-
readonly maxAllowableBytes: number;
|
|
16
|
-
} & {
|
|
17
|
-
afterAttach(): void;
|
|
18
|
-
} & {
|
|
19
|
-
setCurrStatsBpPerPx(n: number): void;
|
|
20
|
-
setFeatureDensityStatsLimit(stats?: FeatureDensityStats): void;
|
|
21
|
-
getFeatureDensityStats(): Promise<FeatureDensityStats>;
|
|
22
|
-
setFeatureDensityStatsP(arg: any): void;
|
|
23
|
-
setFeatureDensityStats(featureDensityStats?: FeatureDensityStats): void;
|
|
24
|
-
clearFeatureDensityStats(): void;
|
|
25
|
-
} & {
|
|
26
|
-
readonly regionTooLarge: boolean;
|
|
27
|
-
readonly regionTooLargeReason: string;
|
|
28
|
-
} & {
|
|
29
|
-
readonly featureDensityStatsReadyAndRegionNotTooLarge: boolean;
|
|
30
|
-
regionCannotBeRenderedText(_region: Region): "" | "Force load to see features";
|
|
31
|
-
regionCannotBeRendered(_region: Region): import("react/jsx-runtime").JSX.Element | null;
|
|
32
|
-
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getConf } from '@jbrowse/core/configuration';
|
|
3
|
-
import { getContainingView } from '@jbrowse/core/util';
|
|
4
|
-
import { addDisposer, isAlive, types } from '@jbrowse/mobx-state-tree';
|
|
5
|
-
import { autorun } from 'mobx';
|
|
6
|
-
import autorunFeatureDensityStats from "./autorunFeatureDensityStats.js";
|
|
7
|
-
import { getDisplayStr, getFeatureDensityStatsPre } from "./util.js";
|
|
8
|
-
import TooLargeMessage from "../components/TooLargeMessage.js";
|
|
9
|
-
export default function FeatureDensityMixin() {
|
|
10
|
-
return types
|
|
11
|
-
.model({
|
|
12
|
-
userBpPerPxLimit: types.maybe(types.number),
|
|
13
|
-
userByteSizeLimit: types.maybe(types.number),
|
|
14
|
-
})
|
|
15
|
-
.volatile(() => ({
|
|
16
|
-
featureDensityStatsP: undefined,
|
|
17
|
-
featureDensityStats: undefined,
|
|
18
|
-
currStatsBpPerPx: 0,
|
|
19
|
-
}))
|
|
20
|
-
.views(self => ({
|
|
21
|
-
get currentBytesRequested() {
|
|
22
|
-
return self.featureDensityStats?.bytes || 0;
|
|
23
|
-
},
|
|
24
|
-
get currentFeatureScreenDensity() {
|
|
25
|
-
const view = getContainingView(self);
|
|
26
|
-
return (self.featureDensityStats?.featureDensity || 0) * view.bpPerPx;
|
|
27
|
-
},
|
|
28
|
-
get maxFeatureScreenDensity() {
|
|
29
|
-
return getConf(self, 'maxFeatureScreenDensity');
|
|
30
|
-
},
|
|
31
|
-
get featureDensityStatsReady() {
|
|
32
|
-
const view = getContainingView(self);
|
|
33
|
-
return (self.currStatsBpPerPx === view.bpPerPx &&
|
|
34
|
-
(!!self.featureDensityStats || !!self.userBpPerPxLimit));
|
|
35
|
-
},
|
|
36
|
-
get maxAllowableBytes() {
|
|
37
|
-
return (self.userByteSizeLimit ||
|
|
38
|
-
self.featureDensityStats?.fetchSizeLimit ||
|
|
39
|
-
getConf(self, 'fetchSizeLimit'));
|
|
40
|
-
},
|
|
41
|
-
}))
|
|
42
|
-
.actions(self => ({
|
|
43
|
-
afterAttach() {
|
|
44
|
-
addDisposer(self, autorun(() => autorunFeatureDensityStats(self)));
|
|
45
|
-
},
|
|
46
|
-
}))
|
|
47
|
-
.actions(self => ({
|
|
48
|
-
setCurrStatsBpPerPx(n) {
|
|
49
|
-
self.currStatsBpPerPx = n;
|
|
50
|
-
},
|
|
51
|
-
setFeatureDensityStatsLimit(stats) {
|
|
52
|
-
const view = getContainingView(self);
|
|
53
|
-
if (stats?.bytes) {
|
|
54
|
-
self.userByteSizeLimit = stats.bytes;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
self.userBpPerPxLimit = view.bpPerPx;
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
getFeatureDensityStats() {
|
|
61
|
-
if (!self.featureDensityStatsP) {
|
|
62
|
-
self.featureDensityStatsP = getFeatureDensityStatsPre(self).catch((e) => {
|
|
63
|
-
if (isAlive(self)) {
|
|
64
|
-
this.setFeatureDensityStatsP(undefined);
|
|
65
|
-
}
|
|
66
|
-
throw e;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return self.featureDensityStatsP;
|
|
70
|
-
},
|
|
71
|
-
setFeatureDensityStatsP(arg) {
|
|
72
|
-
self.featureDensityStatsP = arg;
|
|
73
|
-
},
|
|
74
|
-
setFeatureDensityStats(featureDensityStats) {
|
|
75
|
-
self.featureDensityStats = featureDensityStats;
|
|
76
|
-
},
|
|
77
|
-
clearFeatureDensityStats() {
|
|
78
|
-
self.featureDensityStatsP = undefined;
|
|
79
|
-
self.featureDensityStats = undefined;
|
|
80
|
-
},
|
|
81
|
-
}))
|
|
82
|
-
.views(self => ({
|
|
83
|
-
get regionTooLarge() {
|
|
84
|
-
const view = getContainingView(self);
|
|
85
|
-
if (!self.featureDensityStatsReady ||
|
|
86
|
-
view.dynamicBlocks.totalBp < 20_000) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
return (self.currentBytesRequested > self.maxAllowableBytes ||
|
|
90
|
-
(self.userBpPerPxLimit
|
|
91
|
-
? view.bpPerPx > self.userBpPerPxLimit
|
|
92
|
-
: self.currentFeatureScreenDensity > self.maxFeatureScreenDensity));
|
|
93
|
-
},
|
|
94
|
-
get regionTooLargeReason() {
|
|
95
|
-
const req = self.currentBytesRequested;
|
|
96
|
-
const max = self.maxAllowableBytes;
|
|
97
|
-
return req && req > max
|
|
98
|
-
? `Requested too much data (${getDisplayStr(req)})`
|
|
99
|
-
: '';
|
|
100
|
-
},
|
|
101
|
-
}))
|
|
102
|
-
.views(self => ({
|
|
103
|
-
get featureDensityStatsReadyAndRegionNotTooLarge() {
|
|
104
|
-
return self.featureDensityStatsReady && !self.regionTooLarge;
|
|
105
|
-
},
|
|
106
|
-
regionCannotBeRenderedText(_region) {
|
|
107
|
-
return self.regionTooLarge ? 'Force load to see features' : '';
|
|
108
|
-
},
|
|
109
|
-
regionCannotBeRendered(_region) {
|
|
110
|
-
return self.regionTooLarge ? _jsx(TooLargeMessage, { model: self }) : null;
|
|
111
|
-
},
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { StopToken } from '@jbrowse/core/util/stopToken';
|
|
2
|
-
export default function NonBlockCanvasDisplayMixin(): import("@jbrowse/mobx-state-tree").IModelType<{}, {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
lastDrawnOffsetPx: number | undefined;
|
|
5
|
-
lastDrawnBpPerPx: number | undefined;
|
|
6
|
-
ref: HTMLCanvasElement | null;
|
|
7
|
-
renderingImageData: ImageBitmap | undefined;
|
|
8
|
-
renderingStopToken: StopToken | undefined;
|
|
9
|
-
statusMessage: string | undefined;
|
|
10
|
-
canvasDrawn: boolean;
|
|
11
|
-
} & {
|
|
12
|
-
readonly drawn: boolean;
|
|
13
|
-
readonly fullyDrawn: boolean;
|
|
14
|
-
} & {
|
|
15
|
-
setLastDrawnOffsetPx(n: number): void;
|
|
16
|
-
setLastDrawnBpPerPx(n: number): void;
|
|
17
|
-
setLoading(f: boolean): void;
|
|
18
|
-
setRef(ref: HTMLCanvasElement | null): void;
|
|
19
|
-
setRenderingImageData(imageData: ImageBitmap | undefined): void;
|
|
20
|
-
setRenderingStopToken(token?: StopToken): void;
|
|
21
|
-
setStatusMessage(msg?: string): void;
|
|
22
|
-
setCanvasDrawn(drawn: boolean): void;
|
|
23
|
-
} & {
|
|
24
|
-
beforeDestroy(): void;
|
|
25
|
-
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
26
|
-
export type NonBlockCanvasDisplayMixinType = ReturnType<typeof NonBlockCanvasDisplayMixin>;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { stopStopToken } from '@jbrowse/core/util/stopToken';
|
|
2
|
-
import { types } from '@jbrowse/mobx-state-tree';
|
|
3
|
-
export default function NonBlockCanvasDisplayMixin() {
|
|
4
|
-
return types
|
|
5
|
-
.model('NonBlockCanvasDisplayMixin', {})
|
|
6
|
-
.volatile(() => ({
|
|
7
|
-
loading: false,
|
|
8
|
-
lastDrawnOffsetPx: undefined,
|
|
9
|
-
lastDrawnBpPerPx: undefined,
|
|
10
|
-
ref: null,
|
|
11
|
-
renderingImageData: undefined,
|
|
12
|
-
renderingStopToken: undefined,
|
|
13
|
-
statusMessage: undefined,
|
|
14
|
-
canvasDrawn: false,
|
|
15
|
-
}))
|
|
16
|
-
.views(self => ({
|
|
17
|
-
get drawn() {
|
|
18
|
-
return self.lastDrawnOffsetPx !== undefined;
|
|
19
|
-
},
|
|
20
|
-
get fullyDrawn() {
|
|
21
|
-
return this.drawn && !self.loading && self.canvasDrawn;
|
|
22
|
-
},
|
|
23
|
-
}))
|
|
24
|
-
.actions(self => ({
|
|
25
|
-
setLastDrawnOffsetPx(n) {
|
|
26
|
-
self.lastDrawnOffsetPx = n;
|
|
27
|
-
},
|
|
28
|
-
setLastDrawnBpPerPx(n) {
|
|
29
|
-
self.lastDrawnBpPerPx = n;
|
|
30
|
-
},
|
|
31
|
-
setLoading(f) {
|
|
32
|
-
self.loading = f;
|
|
33
|
-
},
|
|
34
|
-
setRef(ref) {
|
|
35
|
-
self.ref = ref;
|
|
36
|
-
},
|
|
37
|
-
setRenderingImageData(imageData) {
|
|
38
|
-
self.renderingImageData = imageData;
|
|
39
|
-
},
|
|
40
|
-
setRenderingStopToken(token) {
|
|
41
|
-
self.renderingStopToken = token;
|
|
42
|
-
},
|
|
43
|
-
setStatusMessage(msg) {
|
|
44
|
-
self.statusMessage = msg;
|
|
45
|
-
},
|
|
46
|
-
setCanvasDrawn(drawn) {
|
|
47
|
-
self.canvasDrawn = drawn;
|
|
48
|
-
},
|
|
49
|
-
}))
|
|
50
|
-
.actions(self => ({
|
|
51
|
-
beforeDestroy() {
|
|
52
|
-
if (self.renderingStopToken) {
|
|
53
|
-
stopStopToken(self.renderingStopToken);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type FeatureLabelData } from '../components/util.ts';
|
|
2
|
-
interface Props {
|
|
3
|
-
featureLabels: Map<string, FeatureLabelData>;
|
|
4
|
-
offsetPx: number;
|
|
5
|
-
viewWidth: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function SvgFloatingLabels({ featureLabels, offsetPx, viewWidth, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { calculateFloatingLabelPosition, } from "../components/util.js";
|
|
3
|
-
export function SvgFloatingLabels({ featureLabels, offsetPx, viewWidth, }) {
|
|
4
|
-
const elements = [];
|
|
5
|
-
for (const [key, { leftPx, topPx, totalFeatureHeight, floatingLabels, featureWidth },] of featureLabels.entries()) {
|
|
6
|
-
const featureVisualBottom = topPx + totalFeatureHeight;
|
|
7
|
-
const featureRightPx = leftPx + featureWidth;
|
|
8
|
-
for (const [i, { text, relativeY, color, textWidth, isOverlay },] of floatingLabels.entries()) {
|
|
9
|
-
const y = featureVisualBottom + relativeY;
|
|
10
|
-
const x = calculateFloatingLabelPosition(leftPx, featureRightPx, textWidth, offsetPx);
|
|
11
|
-
if (x < 0 || x > viewWidth) {
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
const fontSize = 11;
|
|
15
|
-
elements.push(_jsxs("g", { transform: `translate(${x}, ${y})`, children: [isOverlay ? (_jsx("rect", { x: -1, y: 0, width: textWidth + 2, height: fontSize + 1, fill: "rgba(255, 255, 255, 0.8)" })) : null, _jsx("text", { x: 0, y: fontSize, fontSize: fontSize, fill: color, style: { pointerEvents: 'none' }, children: text })] }, `${key}-${i}`));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return _jsx(_Fragment, { children: elements });
|
|
19
|
-
}
|