@jbrowse/plugin-linear-genome-view 3.6.5 → 4.0.0
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/BaseLinearDisplay/SVGLegend.d.ts +6 -0
- package/esm/BaseLinearDisplay/SVGLegend.js +17 -0
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +2 -0
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +11 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +13 -24
- package/esm/BaseLinearDisplay/components/Block.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockMsg.js +11 -2
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +9 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +42 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +11 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +40 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +45 -0
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +5 -0
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +89 -0
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +43 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +1 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +5 -42
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +49 -0
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +26 -0
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/MenuPage.js +24 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +48 -0
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +12 -0
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +22 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -4
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +5 -8
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +3 -3
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +10 -7
- package/esm/BaseLinearDisplay/components/types.d.ts +1 -0
- package/esm/BaseLinearDisplay/components/types.js +1 -0
- package/esm/BaseLinearDisplay/components/util.d.ts +21 -0
- package/esm/BaseLinearDisplay/components/util.js +116 -0
- package/esm/BaseLinearDisplay/index.d.ts +17 -8
- package/esm/BaseLinearDisplay/index.js +13 -6
- package/esm/BaseLinearDisplay/model.d.ts +1177 -0
- package/esm/BaseLinearDisplay/model.js +424 -0
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +5 -5
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +11 -14
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +21 -0
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +46 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +3 -3
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +2 -3
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +1 -1
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +2 -3
- package/esm/BaseLinearDisplay/models/calculateLabelPositions.d.ts +24 -0
- package/esm/BaseLinearDisplay/models/calculateLabelPositions.js +60 -0
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +2 -2
- package/esm/BaseLinearDisplay/models/configSchema.js +3 -3
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +3 -7
- package/esm/BaseLinearDisplay/models/renderSvg.js +22 -11
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +37 -19
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +151 -135
- package/esm/BaseLinearDisplay/models/util.d.ts +4 -4
- package/esm/BaseLinearDisplay/models/util.js +16 -13
- package/esm/BaseLinearDisplay/renderSvg.d.ts +3 -0
- package/esm/BaseLinearDisplay/renderSvg.js +59 -0
- package/esm/BaseLinearDisplay/types.d.ts +47 -0
- package/esm/BaseLinearDisplay/types.js +3 -0
- package/esm/BaseLinearDisplay/util.d.ts +15 -0
- package/esm/BaseLinearDisplay/util.js +61 -0
- package/esm/BasicTrack/configSchema.d.ts +16 -11
- package/esm/BasicTrack/index.js +1 -1
- package/esm/FeatureTrack/configSchema.d.ts +16 -11
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.js +12 -62
- package/esm/LinearBareDisplay/configSchema.d.ts +4 -4
- package/esm/LinearBareDisplay/configSchema.js +1 -1
- package/esm/LinearBareDisplay/index.d.ts +2 -2
- package/esm/LinearBareDisplay/index.js +5 -5
- package/esm/LinearBareDisplay/model.d.ts +959 -92
- package/esm/LinearBareDisplay/model.js +3 -6
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +5 -0
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +9 -0
- package/esm/LinearBasicDisplay/configSchema.d.ts +4 -4
- package/esm/LinearBasicDisplay/configSchema.js +1 -1
- package/esm/LinearBasicDisplay/index.d.ts +2 -2
- package/esm/LinearBasicDisplay/index.js +6 -6
- package/esm/LinearBasicDisplay/model.d.ts +1134 -122
- package/esm/LinearBasicDisplay/model.js +116 -116
- package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/AddFiltersDialog.js +2 -2
- package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/SetMaxHeightDialog.js +3 -3
- package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/configSchema.d.ts +4 -4
- package/esm/LinearFeatureDisplay/configSchema.js +11 -0
- package/esm/LinearFeatureDisplay/index.d.ts +3 -0
- package/esm/LinearFeatureDisplay/index.js +2 -0
- package/esm/LinearFeatureDisplay/model.d.ts +1415 -0
- package/esm/LinearFeatureDisplay/model.js +265 -0
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +5 -0
- package/esm/LinearGenomeView/SVGErrorBox.js +4 -0
- package/esm/LinearGenomeView/afterAttach.d.ts +5 -0
- package/esm/LinearGenomeView/afterAttach.js +95 -0
- package/esm/LinearGenomeView/components/CenterLine.js +6 -4
- package/esm/LinearGenomeView/components/Cytobands.js +4 -4
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +5 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +8 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +13 -16
- package/esm/LinearGenomeView/components/Gridlines.js +18 -15
- package/esm/LinearGenomeView/components/Header.js +9 -9
- package/esm/LinearGenomeView/components/HeaderPanControls.js +2 -2
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +4 -5
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +2 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +3 -3
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +6 -6
- package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -1
- package/esm/LinearGenomeView/components/ImportForm.js +14 -12
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +3 -3
- package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -7
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +7 -8
- package/esm/LinearGenomeView/components/MiniControls.js +6 -6
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +2 -2
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.js +5 -5
- package/esm/LinearGenomeView/components/OverviewRubberband.js +4 -4
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +9 -5
- package/esm/LinearGenomeView/components/OverviewScalebar.js +36 -28
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +7 -7
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +10 -10
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +6 -4
- package/esm/LinearGenomeView/components/Rubberband.js +9 -7
- package/esm/LinearGenomeView/components/RubberbandSpan.js +4 -5
- package/esm/LinearGenomeView/components/Scalebar.js +8 -10
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +50 -17
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +13 -11
- package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchBox.js +8 -9
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +2 -2
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js +4 -6
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +6 -6
- package/esm/LinearGenomeView/components/TrackContainer.js +32 -20
- package/esm/LinearGenomeView/components/TrackLabel.js +10 -11
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +7 -8
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +80 -68
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +5 -5
- package/esm/LinearGenomeView/components/TracksContainer.js +18 -15
- package/esm/LinearGenomeView/components/VerticalGuide.js +5 -3
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -2
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +27 -2
- package/esm/LinearGenomeView/components/useRangeSelect.js +26 -20
- package/esm/LinearGenomeView/components/useWheelScroll.js +22 -12
- package/esm/LinearGenomeView/components/util.d.ts +2 -13
- package/esm/LinearGenomeView/components/util.js +12 -31
- package/esm/LinearGenomeView/index.d.ts +1 -1
- package/esm/LinearGenomeView/index.js +3 -3
- package/esm/LinearGenomeView/keyboardHandler.d.ts +2 -0
- package/esm/LinearGenomeView/keyboardHandler.js +29 -0
- package/esm/LinearGenomeView/menuItems.d.ts +7 -0
- package/esm/LinearGenomeView/menuItems.js +299 -0
- package/esm/LinearGenomeView/model.d.ts +92 -89
- package/esm/LinearGenomeView/model.js +166 -414
- package/esm/LinearGenomeView/svgExportUtil.d.ts +9 -0
- package/esm/LinearGenomeView/svgExportUtil.js +6 -0
- package/{dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts → esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts} +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +20 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +5 -5
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +4 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +24 -12
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +13 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +2 -2
- package/esm/LinearGenomeView/types.d.ts +5 -1
- package/esm/LinearGenomeView/util.d.ts +2 -2
- package/esm/LinearGenomeView/util.js +8 -6
- package/esm/index.d.ts +975 -94
- package/esm/index.js +37 -38
- package/esm/searchUtils.d.ts +1 -1
- package/esm/searchUtils.js +6 -4
- package/package.json +28 -33
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -72
- package/dist/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/dist/BaseLinearDisplay/components/Block.js +0 -50
- package/dist/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/dist/BaseLinearDisplay/components/BlockErrorMessage.js +0 -27
- package/dist/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
- package/dist/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -26
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -20
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -9
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -61
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -11
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -59
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -25
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +0 -11
- package/dist/BaseLinearDisplay/components/Tooltip.js +0 -24
- package/dist/BaseLinearDisplay/index.d.ts +0 -8
- package/dist/BaseLinearDisplay/index.js +0 -20
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +0 -311
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -325
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -122
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +0 -35
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -33
- package/dist/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/dist/BaseLinearDisplay/models/configSchema.js +0 -35
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +0 -7
- package/dist/BaseLinearDisplay/models/renderSvg.js +0 -80
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -78
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -229
- package/dist/BaseLinearDisplay/models/util.d.ts +0 -22
- package/dist/BaseLinearDisplay/models/util.js +0 -45
- package/dist/BasicTrack/configSchema.d.ts +0 -80
- package/dist/BasicTrack/configSchema.js +0 -10
- package/dist/BasicTrack/index.d.ts +0 -2
- package/dist/BasicTrack/index.js +0 -18
- package/dist/FeatureTrack/configSchema.d.ts +0 -80
- package/dist/FeatureTrack/configSchema.js +0 -10
- package/dist/FeatureTrack/index.d.ts +0 -2
- package/dist/FeatureTrack/index.js +0 -19
- package/dist/LaunchLinearGenomeView/index.d.ts +0 -2
- package/dist/LaunchLinearGenomeView/index.js +0 -70
- package/dist/LinearBareDisplay/configSchema.d.ts +0 -32
- package/dist/LinearBareDisplay/configSchema.js +0 -13
- package/dist/LinearBareDisplay/index.d.ts +0 -4
- package/dist/LinearBareDisplay/index.js +0 -26
- package/dist/LinearBareDisplay/model.d.ts +0 -309
- package/dist/LinearBareDisplay/model.js +0 -38
- package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +0 -61
- package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.js +0 -28
- package/dist/LinearBasicDisplay/configSchema.js +0 -13
- package/dist/LinearBasicDisplay/index.d.ts +0 -4
- package/dist/LinearBasicDisplay/index.js +0 -29
- package/dist/LinearBasicDisplay/model.d.ts +0 -346
- package/dist/LinearBasicDisplay/model.js +0 -192
- package/dist/LinearGenomeView/components/CenterLine.d.ts +0 -6
- package/dist/LinearGenomeView/components/CenterLine.js +0 -38
- package/dist/LinearGenomeView/components/Cytobands.d.ts +0 -9
- package/dist/LinearGenomeView/components/Cytobands.js +0 -89
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -57
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +0 -6
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -109
- package/dist/LinearGenomeView/components/Gridlines.d.ts +0 -7
- package/dist/LinearGenomeView/components/Gridlines.js +0 -70
- package/dist/LinearGenomeView/components/Header.d.ts +0 -5
- package/dist/LinearGenomeView/components/Header.js +0 -38
- package/dist/LinearGenomeView/components/HeaderPanControls.d.ts +0 -6
- package/dist/LinearGenomeView/components/HeaderPanControls.js +0 -27
- package/dist/LinearGenomeView/components/HeaderRegionWidth.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderRegionWidth.js +0 -21
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.js +0 -19
- package/dist/LinearGenomeView/components/HeaderZoomControls.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderZoomControls.js +0 -109
- package/dist/LinearGenomeView/components/Highlight.d.ts +0 -12
- package/dist/LinearGenomeView/components/Highlight.js +0 -95
- package/dist/LinearGenomeView/components/ImportForm.d.ts +0 -6
- package/dist/LinearGenomeView/components/ImportForm.js +0 -80
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -32
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +0 -5
- package/dist/LinearGenomeView/components/LinearGenomeView.js +0 -57
- package/dist/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +0 -5
- package/dist/LinearGenomeView/components/LinearGenomeViewContainer.js +0 -98
- package/dist/LinearGenomeView/components/MiniControls.d.ts +0 -5
- package/dist/LinearGenomeView/components/MiniControls.js +0 -36
- package/dist/LinearGenomeView/components/NoTracksActiveButton.d.ts +0 -5
- package/dist/LinearGenomeView/components/NoTracksActiveButton.js +0 -23
- package/dist/LinearGenomeView/components/OverviewHighlight.d.ts +0 -8
- package/dist/LinearGenomeView/components/OverviewHighlight.js +0 -50
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +0 -9
- package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -113
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +0 -10
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +0 -28
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +0 -7
- package/dist/LinearGenomeView/components/OverviewScalebar.js +0 -146
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +0 -8
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +0 -41
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +0 -10
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.js +0 -37
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -8
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -18
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -56
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -11
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -127
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -53
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +0 -6
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.js +0 -30
- package/dist/LinearGenomeView/components/Rubberband.d.ts +0 -7
- package/dist/LinearGenomeView/components/Rubberband.js +0 -35
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -39
- package/dist/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/dist/LinearGenomeView/components/RubberbandTooltip.js +0 -20
- package/dist/LinearGenomeView/components/Scalebar.d.ts +0 -10
- package/dist/LinearGenomeView/components/Scalebar.js +0 -40
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.js +0 -29
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -38
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.js +0 -46
- package/dist/LinearGenomeView/components/SearchBox.d.ts +0 -6
- package/dist/LinearGenomeView/components/SearchBox.js +0 -88
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -9
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -15
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +0 -8
- package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -74
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +0 -8
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -67
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackContainer.js +0 -51
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +0 -7
- package/dist/LinearGenomeView/components/TrackLabel.js +0 -49
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +0 -31
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.js +0 -32
- package/dist/LinearGenomeView/components/TrackLabelMenu.d.ts +0 -5
- package/dist/LinearGenomeView/components/TrackLabelMenu.js +0 -93
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +0 -9
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +0 -50
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +0 -7
- package/dist/LinearGenomeView/components/TracksContainer.js +0 -84
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +0 -7
- package/dist/LinearGenomeView/components/VerticalGuide.js +0 -31
- package/dist/LinearGenomeView/components/fetchSequence.d.ts +0 -4
- package/dist/LinearGenomeView/components/fetchSequence.js +0 -29
- package/dist/LinearGenomeView/components/useRangeSelect.d.ts +0 -59
- package/dist/LinearGenomeView/components/useRangeSelect.js +0 -131
- package/dist/LinearGenomeView/components/useSideScroll.d.ts +0 -6
- package/dist/LinearGenomeView/components/useSideScroll.js +0 -60
- package/dist/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/dist/LinearGenomeView/components/useWheelScroll.js +0 -62
- package/dist/LinearGenomeView/components/util.d.ts +0 -25
- package/dist/LinearGenomeView/components/util.js +0 -49
- package/dist/LinearGenomeView/consts.d.ts +0 -7
- package/dist/LinearGenomeView/consts.js +0 -10
- package/dist/LinearGenomeView/index.d.ts +0 -3
- package/dist/LinearGenomeView/index.js +0 -53
- package/dist/LinearGenomeView/model.d.ts +0 -268
- package/dist/LinearGenomeView/model.js +0 -1109
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +0 -10
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +0 -47
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +0 -6
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -42
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -8
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +0 -39
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +0 -17
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -14
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +0 -21
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -32
- package/dist/LinearGenomeView/svgcomponents/util.d.ts +0 -8
- package/dist/LinearGenomeView/svgcomponents/util.js +0 -8
- package/dist/LinearGenomeView/types.d.ts +0 -43
- package/dist/LinearGenomeView/types.js +0 -2
- package/dist/LinearGenomeView/util.d.ts +0 -26
- package/dist/LinearGenomeView/util.js +0 -138
- package/dist/index.d.ts +0 -353
- package/dist/index.js +0 -120
- package/dist/searchUtils.d.ts +0 -26
- package/dist/searchUtils.js +0 -80
- package/esm/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -24
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +0 -311
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -286
- package/esm/LinearBasicDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -36
- /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/AddFiltersDialog.d.ts +0 -0
- /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/SetMaxHeightDialog.d.ts +0 -0
|
@@ -0,0 +1,424 @@
|
|
|
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 { deduplicateFeatureLabels } from "./components/util.js";
|
|
14
|
+
import { calculateSvgLegendWidth } from "./index.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, hasExonsOrCDS, } 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
|
+
...(hasExonsOrCDS(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
|
+
};
|
|
365
|
+
},
|
|
366
|
+
renderProps() {
|
|
367
|
+
return {
|
|
368
|
+
...getParentRenderProps(self),
|
|
369
|
+
notReady: !self.featureDensityStatsReady,
|
|
370
|
+
rpcDriverName: self.effectiveRpcDriverName,
|
|
371
|
+
};
|
|
372
|
+
},
|
|
373
|
+
}))
|
|
374
|
+
.actions(self => ({
|
|
375
|
+
async renderSvg(opts) {
|
|
376
|
+
const { renderBaseLinearDisplaySvg } = await import("./renderSvg.js");
|
|
377
|
+
return renderBaseLinearDisplaySvg(self, opts);
|
|
378
|
+
},
|
|
379
|
+
afterAttach() {
|
|
380
|
+
addDisposer(self, autorun(function blockDefinitionsAutorun() {
|
|
381
|
+
try {
|
|
382
|
+
if (!isAlive(self)) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const view = getContainingView(self);
|
|
386
|
+
if (!view.initialized) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
const contentBlocks = self.blockDefinitions.contentBlocks;
|
|
390
|
+
const newKeys = new Set(contentBlocks.map(b => b.key));
|
|
391
|
+
for (const block of contentBlocks) {
|
|
392
|
+
if (!self.blockState.has(block.key)) {
|
|
393
|
+
self.addBlock(block.key, block);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
for (const key of self.blockState.keys()) {
|
|
397
|
+
if (!newKeys.has(key)) {
|
|
398
|
+
self.deleteBlock(key);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
catch (e) {
|
|
403
|
+
}
|
|
404
|
+
}, {
|
|
405
|
+
name: 'BaseLinearDisplayBlockDefinitions',
|
|
406
|
+
delay: 60,
|
|
407
|
+
}));
|
|
408
|
+
},
|
|
409
|
+
}))
|
|
410
|
+
.preProcessSnapshot(snap => {
|
|
411
|
+
if (!snap) {
|
|
412
|
+
return snap;
|
|
413
|
+
}
|
|
414
|
+
const { height, ...rest } = snap;
|
|
415
|
+
return { heightPreConfig: height, ...rest };
|
|
416
|
+
})
|
|
417
|
+
.postProcessSnapshot(snap => {
|
|
418
|
+
const r = snap;
|
|
419
|
+
const { blockState, ...rest } = r;
|
|
420
|
+
return rest;
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
export const BaseLinearDisplay = stateModelFactory();
|
|
424
|
+
export {} from "./components/FloatingLegend.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
2
|
import type { Region } from '@jbrowse/core/util/types';
|
|
3
|
-
export default function FeatureDensityMixin(): import("mobx-state-tree").IModelType<{
|
|
4
|
-
userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
5
|
-
userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
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
6
|
}, {
|
|
7
7
|
featureDensityStatsP: undefined | Promise<FeatureDensityStats>;
|
|
8
8
|
featureDensityStats: undefined | FeatureDensityStats;
|
|
@@ -26,7 +26,7 @@ export default function FeatureDensityMixin(): import("mobx-state-tree").IModelT
|
|
|
26
26
|
readonly regionTooLarge: boolean;
|
|
27
27
|
readonly regionTooLargeReason: string;
|
|
28
28
|
} & {
|
|
29
|
-
readonly
|
|
29
|
+
readonly featureDensityStatsReadyAndRegionNotTooLarge: boolean;
|
|
30
30
|
regionCannotBeRenderedText(_region: Region): "" | "Force load to see features";
|
|
31
31
|
regionCannotBeRendered(_region: Region): import("react/jsx-runtime").JSX.Element | null;
|
|
32
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
32
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
3
|
import { getContainingView } from '@jbrowse/core/util';
|
|
4
|
+
import { addDisposer, isAlive, types } from '@jbrowse/mobx-state-tree';
|
|
4
5
|
import { autorun } from 'mobx';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import TooLargeMessage from '../components/TooLargeMessage';
|
|
6
|
+
import autorunFeatureDensityStats from "./autorunFeatureDensityStats.js";
|
|
7
|
+
import { getDisplayStr, getFeatureDensityStatsPre } from "./util.js";
|
|
8
|
+
import TooLargeMessage from "../components/TooLargeMessage.js";
|
|
9
9
|
export default function FeatureDensityMixin() {
|
|
10
10
|
return types
|
|
11
11
|
.model({
|
|
@@ -19,13 +19,11 @@ export default function FeatureDensityMixin() {
|
|
|
19
19
|
}))
|
|
20
20
|
.views(self => ({
|
|
21
21
|
get currentBytesRequested() {
|
|
22
|
-
|
|
23
|
-
return ((_a = self.featureDensityStats) === null || _a === void 0 ? void 0 : _a.bytes) || 0;
|
|
22
|
+
return self.featureDensityStats?.bytes || 0;
|
|
24
23
|
},
|
|
25
24
|
get currentFeatureScreenDensity() {
|
|
26
|
-
var _a;
|
|
27
25
|
const view = getContainingView(self);
|
|
28
|
-
return (
|
|
26
|
+
return (self.featureDensityStats?.featureDensity || 0) * view.bpPerPx;
|
|
29
27
|
},
|
|
30
28
|
get maxFeatureScreenDensity() {
|
|
31
29
|
return getConf(self, 'maxFeatureScreenDensity');
|
|
@@ -36,9 +34,8 @@ export default function FeatureDensityMixin() {
|
|
|
36
34
|
(!!self.featureDensityStats || !!self.userBpPerPxLimit));
|
|
37
35
|
},
|
|
38
36
|
get maxAllowableBytes() {
|
|
39
|
-
var _a;
|
|
40
37
|
return (self.userByteSizeLimit ||
|
|
41
|
-
|
|
38
|
+
self.featureDensityStats?.fetchSizeLimit ||
|
|
42
39
|
getConf(self, 'fetchSizeLimit'));
|
|
43
40
|
},
|
|
44
41
|
}))
|
|
@@ -53,7 +50,7 @@ export default function FeatureDensityMixin() {
|
|
|
53
50
|
},
|
|
54
51
|
setFeatureDensityStatsLimit(stats) {
|
|
55
52
|
const view = getContainingView(self);
|
|
56
|
-
if (stats
|
|
53
|
+
if (stats?.bytes) {
|
|
57
54
|
self.userByteSizeLimit = stats.bytes;
|
|
58
55
|
}
|
|
59
56
|
else {
|
|
@@ -86,7 +83,7 @@ export default function FeatureDensityMixin() {
|
|
|
86
83
|
get regionTooLarge() {
|
|
87
84
|
const view = getContainingView(self);
|
|
88
85
|
if (!self.featureDensityStatsReady ||
|
|
89
|
-
view.dynamicBlocks.totalBp <
|
|
86
|
+
view.dynamicBlocks.totalBp < 20_000) {
|
|
90
87
|
return false;
|
|
91
88
|
}
|
|
92
89
|
return (self.currentBytesRequested > self.maxAllowableBytes ||
|
|
@@ -103,14 +100,14 @@ export default function FeatureDensityMixin() {
|
|
|
103
100
|
},
|
|
104
101
|
}))
|
|
105
102
|
.views(self => ({
|
|
106
|
-
get
|
|
103
|
+
get featureDensityStatsReadyAndRegionNotTooLarge() {
|
|
107
104
|
return self.featureDensityStatsReady && !self.regionTooLarge;
|
|
108
105
|
},
|
|
109
106
|
regionCannotBeRenderedText(_region) {
|
|
110
107
|
return self.regionTooLarge ? 'Force load to see features' : '';
|
|
111
108
|
},
|
|
112
109
|
regionCannotBeRendered(_region) {
|
|
113
|
-
return self.regionTooLarge ?
|
|
110
|
+
return self.regionTooLarge ? _jsx(TooLargeMessage, { model: self }) : null;
|
|
114
111
|
},
|
|
115
112
|
}));
|
|
116
113
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
ref: HTMLCanvasElement | null;
|
|
6
|
+
renderingImageData: ImageBitmap | undefined;
|
|
7
|
+
renderingStopToken: StopToken | undefined;
|
|
8
|
+
statusMessage: string | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
readonly drawn: boolean;
|
|
11
|
+
} & {
|
|
12
|
+
setLastDrawnOffsetPx(n: number): void;
|
|
13
|
+
setLoading(f: boolean): void;
|
|
14
|
+
setRef(ref: HTMLCanvasElement | null): void;
|
|
15
|
+
setRenderingImageData(imageData: ImageBitmap | undefined): void;
|
|
16
|
+
setRenderingStopToken(token?: StopToken): void;
|
|
17
|
+
setStatusMessage(msg?: string): void;
|
|
18
|
+
} & {
|
|
19
|
+
beforeDestroy(): void;
|
|
20
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
21
|
+
export type NonBlockCanvasDisplayMixinType = ReturnType<typeof NonBlockCanvasDisplayMixin>;
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
ref: null,
|
|
10
|
+
renderingImageData: undefined,
|
|
11
|
+
renderingStopToken: undefined,
|
|
12
|
+
statusMessage: undefined,
|
|
13
|
+
}))
|
|
14
|
+
.views(self => ({
|
|
15
|
+
get drawn() {
|
|
16
|
+
return self.lastDrawnOffsetPx !== undefined;
|
|
17
|
+
},
|
|
18
|
+
}))
|
|
19
|
+
.actions(self => ({
|
|
20
|
+
setLastDrawnOffsetPx(n) {
|
|
21
|
+
self.lastDrawnOffsetPx = n;
|
|
22
|
+
},
|
|
23
|
+
setLoading(f) {
|
|
24
|
+
self.loading = f;
|
|
25
|
+
},
|
|
26
|
+
setRef(ref) {
|
|
27
|
+
self.ref = ref;
|
|
28
|
+
},
|
|
29
|
+
setRenderingImageData(imageData) {
|
|
30
|
+
self.renderingImageData = imageData;
|
|
31
|
+
},
|
|
32
|
+
setRenderingStopToken(token) {
|
|
33
|
+
self.renderingStopToken = token;
|
|
34
|
+
},
|
|
35
|
+
setStatusMessage(msg) {
|
|
36
|
+
self.statusMessage = msg;
|
|
37
|
+
},
|
|
38
|
+
}))
|
|
39
|
+
.actions(self => ({
|
|
40
|
+
beforeDestroy() {
|
|
41
|
+
if (self.renderingStopToken) {
|
|
42
|
+
stopStopToken(self.renderingStopToken);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default function TrackHeightMixin(): import("mobx-state-tree").IModelType<{
|
|
2
|
-
heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
1
|
+
export default function TrackHeightMixin(): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
2
|
+
heightPreConfig: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
3
3
|
}, {
|
|
4
4
|
scrollTop: number;
|
|
5
5
|
} & {
|
|
@@ -8,4 +8,4 @@ export default function TrackHeightMixin(): import("mobx-state-tree").IModelType
|
|
|
8
8
|
setScrollTop(scrollTop: number): void;
|
|
9
9
|
setHeight(displayHeight: number): number;
|
|
10
10
|
resizeHeight(distance: number): number;
|
|
11
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
11
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getConf } from '@jbrowse/core/configuration';
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
2
|
+
import { types } from '@jbrowse/mobx-state-tree';
|
|
3
3
|
const minDisplayHeight = 20;
|
|
4
4
|
export default function TrackHeightMixin() {
|
|
5
5
|
return types
|
|
@@ -11,8 +11,7 @@ export default function TrackHeightMixin() {
|
|
|
11
11
|
}))
|
|
12
12
|
.views(self => ({
|
|
13
13
|
get height() {
|
|
14
|
-
|
|
15
|
-
return (_a = self.heightPreConfig) !== null && _a !== void 0 ? _a : getConf(self, 'height');
|
|
14
|
+
return self.heightPreConfig ?? getConf(self, 'height');
|
|
16
15
|
},
|
|
17
16
|
}))
|
|
18
17
|
.actions(self => ({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BaseLinearDisplayModel } from '
|
|
1
|
+
import type { BaseLinearDisplayModel } from '../model.ts';
|
|
2
2
|
export default function autorunFeatureDensityStats(self: BaseLinearDisplayModel): Promise<void>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getContainingView, isAbortException } from '@jbrowse/core/util';
|
|
2
|
-
import { isAlive } from 'mobx-state-tree';
|
|
2
|
+
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
3
3
|
export default async function autorunFeatureDensityStats(self) {
|
|
4
|
-
var _a;
|
|
5
4
|
try {
|
|
6
5
|
const view = getContainingView(self);
|
|
7
6
|
if (!view.initialized ||
|
|
@@ -10,7 +9,7 @@ export default async function autorunFeatureDensityStats(self) {
|
|
|
10
9
|
self.error) {
|
|
11
10
|
return;
|
|
12
11
|
}
|
|
13
|
-
if (
|
|
12
|
+
if (self.featureDensityStats?.featureDensity !== undefined) {
|
|
14
13
|
self.setCurrStatsBpPerPx(view.bpPerPx);
|
|
15
14
|
return;
|
|
16
15
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../../LinearGenomeView/index.ts';
|
|
2
|
+
import type { BaseLinearDisplayModel } from '../model.ts';
|
|
3
|
+
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
4
|
+
export interface RenderProps {
|
|
5
|
+
rendererType: any;
|
|
6
|
+
renderArgs: Record<string, any>;
|
|
7
|
+
renderProps: Record<string, any>;
|
|
8
|
+
displayError: unknown;
|
|
9
|
+
rpcManager: {
|
|
10
|
+
call: (...args: unknown[]) => void;
|
|
11
|
+
};
|
|
12
|
+
cannotBeRenderedReason: string;
|
|
13
|
+
}
|
|
14
|
+
export interface LabelData {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
description: string;
|
|
18
|
+
leftPos: number;
|
|
19
|
+
topPos: number;
|
|
20
|
+
}
|
|
21
|
+
export interface ErrorProps {
|
|
22
|
+
displayError: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function calculateLabelPositions(model: BaseLinearDisplayModel, view: LinearGenomeViewModel, assembly: Assembly | undefined, offsetPx: number): LabelData[];
|