@jbrowse/plugin-linear-genome-view 3.7.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/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 +12 -8
- package/esm/BaseLinearDisplay/components/Block.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockMsg.js +9 -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 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +4 -6
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +49 -0
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +3 -2
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +5 -3
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +2 -2
- package/esm/BaseLinearDisplay/components/MenuPage.js +1 -1
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +48 -0
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +4 -1
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +4 -4
- 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 +1 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +6 -6
- 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 +954 -101
- package/esm/BaseLinearDisplay/model.js +211 -88
- 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 +2 -2
- 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 +957 -105
- 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 +1132 -135
- 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 +5 -5
- package/esm/LinearGenomeView/components/TrackContainer.js +25 -17
- 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 +19 -9
- 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 +7 -5
- package/esm/index.d.ts +973 -107
- 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 -57
- 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 -22
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -28
- package/dist/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -3
- package/dist/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -27
- package/dist/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/dist/BaseLinearDisplay/components/MenuPage.js +0 -26
- package/dist/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -9
- package/dist/BaseLinearDisplay/components/RenderedBlocks.js +0 -27
- 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 -12
- package/dist/BaseLinearDisplay/components/Tooltip.js +0 -27
- package/dist/BaseLinearDisplay/components/types.d.ts +0 -1
- package/dist/BaseLinearDisplay/components/types.js +0 -2
- package/dist/BaseLinearDisplay/index.d.ts +0 -8
- package/dist/BaseLinearDisplay/index.js +0 -20
- package/dist/BaseLinearDisplay/model.d.ts +0 -324
- package/dist/BaseLinearDisplay/model.js +0 -340
- 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 -324
- 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 -361
- 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 -55
- 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 -127
- 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 -368
- 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/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,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LegendItem } from '../model.ts';
|
|
3
|
+
export interface NonBlockCanvasDisplayModel {
|
|
4
|
+
error?: unknown;
|
|
5
|
+
regionTooLarge?: boolean;
|
|
6
|
+
reload: () => void;
|
|
7
|
+
regionCannotBeRendered: () => React.ReactElement | null;
|
|
8
|
+
drawn: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
lastDrawnOffsetPx?: number;
|
|
11
|
+
statusMessage?: string;
|
|
12
|
+
showLegend?: boolean;
|
|
13
|
+
legendItems?: () => LegendItem[];
|
|
14
|
+
}
|
|
15
|
+
declare const NonBlockCanvasDisplayComponent: ({ model, children, }: {
|
|
16
|
+
model: NonBlockCanvasDisplayModel;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export default NonBlockCanvasDisplayComponent;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { LoadingEllipses } from '@jbrowse/core/ui';
|
|
4
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
7
|
+
import BlockErrorMessage from "./BlockErrorMessage.js";
|
|
8
|
+
import FloatingLegend from "./FloatingLegend.js";
|
|
9
|
+
const useStyles = makeStyles()({
|
|
10
|
+
loading: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: 0,
|
|
13
|
+
left: 0,
|
|
14
|
+
right: 0,
|
|
15
|
+
bottom: 0,
|
|
16
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
17
|
+
backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0, 0, 0, 0.05) 8px, rgba(0, 0, 0, 0.05) 16px)`,
|
|
18
|
+
pointerEvents: 'none',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
zIndex: 1,
|
|
23
|
+
},
|
|
24
|
+
loadingMessage: {
|
|
25
|
+
zIndex: 2,
|
|
26
|
+
pointerEvents: 'none',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const NonBlockCanvasDisplayComponent = observer(function NonBlockCanvasDisplayComponent({ model, children, }) {
|
|
30
|
+
const { error, regionTooLarge } = model;
|
|
31
|
+
return error ? (_jsx(BlockErrorMessage, { model: model })) : regionTooLarge ? (model.regionCannotBeRendered()) : (_jsx(DataDisplay, { model: model, children: children }));
|
|
32
|
+
});
|
|
33
|
+
const DataDisplay = observer(function DataDisplay({ model, children, }) {
|
|
34
|
+
const { drawn, loading, showLegend, legendItems } = model;
|
|
35
|
+
const view = getContainingView(model);
|
|
36
|
+
const items = legendItems?.() ?? [];
|
|
37
|
+
const calculatedLeft = (model.lastDrawnOffsetPx ?? 0) - view.offsetPx;
|
|
38
|
+
return (_jsxs("div", { "data-testid": `drawn-${drawn}`, children: [_jsx("div", { style: {
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
left: calculatedLeft,
|
|
41
|
+
}, children: children }), showLegend && items.length > 0 ? _jsx(FloatingLegend, { items: items }) : null, calculatedLeft !== 0 || loading ? _jsx(LoadingBar, { model: model }) : null] }));
|
|
42
|
+
});
|
|
43
|
+
const LoadingBar = observer(function LoadingBar({ model, }) {
|
|
44
|
+
const { classes } = useStyles();
|
|
45
|
+
const { statusMessage } = model;
|
|
46
|
+
return (_jsx("div", { className: classes.loading, children: _jsx("div", { className: classes.loadingMessage, children: _jsx(LoadingEllipses, { message: statusMessage }) }) }));
|
|
47
|
+
});
|
|
48
|
+
export default NonBlockCanvasDisplayComponent;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { BlockModel } from '../models/serverSideRenderedBlock.ts';
|
|
1
2
|
import type { BlockSet } from '@jbrowse/core/util/blockTypes';
|
|
2
3
|
declare const RenderedBlocks: ({ model, }: {
|
|
3
4
|
model: {
|
|
4
5
|
id: string;
|
|
5
6
|
blockDefinitions: BlockSet;
|
|
6
|
-
blockState:
|
|
7
|
+
blockState: {
|
|
8
|
+
get: (key: string) => BlockModel | undefined;
|
|
9
|
+
};
|
|
7
10
|
};
|
|
8
11
|
}) => import("react/jsx-runtime").JSX.Element[];
|
|
9
12
|
export default RenderedBlocks;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
import { ContentBlock as ContentBlockComponent, ElidedBlock as ElidedBlockComponent, InterRegionPaddingBlock as InterRegionPaddingBlockComponent, } from
|
|
4
|
-
import MaxHeightReached from
|
|
5
|
-
const RenderedBlocks = observer(function ({ model, }) {
|
|
3
|
+
import { ContentBlock as ContentBlockComponent, ElidedBlock as ElidedBlockComponent, InterRegionPaddingBlock as InterRegionPaddingBlockComponent, } from "./Block.js";
|
|
4
|
+
import MaxHeightReached from "./MaxHeightReachedIndicator.js";
|
|
5
|
+
const RenderedBlocks = observer(function RenderedBlocks({ model, }) {
|
|
6
6
|
const { blockDefinitions, blockState } = model;
|
|
7
7
|
return blockDefinitions.map(block => {
|
|
8
8
|
const key = `${model.id}-${block.key}`;
|
|
9
9
|
if (block.type === 'ContentBlock') {
|
|
10
10
|
const state = blockState.get(block.key);
|
|
11
|
-
return (_jsxs(ContentBlockComponent, { block: block, children: [
|
|
11
|
+
return (_jsxs(ContentBlockComponent, { block: block, children: [state?.ReactComponent ? (_jsx(state.ReactComponent, { model: state })) : null, state?.maxHeightReached ? (_jsx(MaxHeightReached, { top: state.layout.getTotalHeight() - 16 })) : null] }, key));
|
|
12
12
|
}
|
|
13
13
|
else if (block.type === 'ElidedBlock') {
|
|
14
14
|
return _jsx(ElidedBlockComponent, { width: block.widthPx }, key);
|
|
@@ -2,10 +2,10 @@ declare const ServerSideRenderedBlockContent: ({ model, }: {
|
|
|
2
2
|
model: {
|
|
3
3
|
error?: unknown;
|
|
4
4
|
reload: () => void;
|
|
5
|
-
message
|
|
6
|
-
|
|
7
|
-
status?: string;
|
|
5
|
+
message?: React.ReactNode;
|
|
6
|
+
statusMessage?: string;
|
|
8
7
|
reactElement?: React.ReactElement;
|
|
8
|
+
isRenderingPending?: boolean;
|
|
9
9
|
};
|
|
10
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default ServerSideRenderedBlockContent;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, isValidElement, lazy } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const BlockErrorMessage = lazy(() => import(
|
|
7
|
-
const ServerSideRenderedBlockContent = observer(function ({ model, }) {
|
|
4
|
+
import BlockMsg from "./BlockMsg.js";
|
|
5
|
+
import LoadingOverlay from "./LoadingOverlay.js";
|
|
6
|
+
const BlockErrorMessage = lazy(() => import("./BlockErrorMessage.js"));
|
|
7
|
+
const ServerSideRenderedBlockContent = observer(function ServerSideRenderedBlockContent({ model, }) {
|
|
8
8
|
if (model.error) {
|
|
9
9
|
return (_jsx(Suspense, { fallback: null, children: _jsx(BlockErrorMessage, { model: model }) }));
|
|
10
10
|
}
|
|
11
11
|
else if (model.message) {
|
|
12
12
|
return isValidElement(model.message) ? (model.message) : (_jsx(BlockMsg, { message: `${model.message}`, severity: "info" }));
|
|
13
13
|
}
|
|
14
|
-
else if (!model.filled) {
|
|
15
|
-
return _jsx(BlockLoadingMessage, { model: model });
|
|
16
|
-
}
|
|
17
14
|
else {
|
|
18
|
-
return model.reactElement;
|
|
15
|
+
return (_jsx(LoadingOverlay, { statusMessage: model.statusMessage, children: model.reactElement }));
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
export default ServerSideRenderedBlockContent;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
2
3
|
import { Button } from '@mui/material';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const TooLargeMessage = observer(function ({ model, }) {
|
|
5
|
+
import BlockMsg from "../components/BlockMsg.js";
|
|
6
|
+
const TooLargeMessage = observer(function TooLargeMessage({ model, }) {
|
|
7
7
|
const { regionTooLargeReason } = model;
|
|
8
8
|
return (_jsx(BlockMsg, { severity: "warning", action: _jsx(Button, { onClick: () => {
|
|
9
9
|
if (isAlive(model)) {
|
|
@@ -4,6 +4,7 @@ type Coord = [number, number];
|
|
|
4
4
|
declare const Tooltip: ({ model, clientMouseCoord, }: {
|
|
5
5
|
model: {
|
|
6
6
|
featureUnderMouse: Feature | undefined;
|
|
7
|
+
featureIdUnderMouse: string | undefined;
|
|
7
8
|
mouseoverExtraInformation: string | undefined;
|
|
8
9
|
configuration: AnyConfigurationModel;
|
|
9
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, isValidElement } from 'react';
|
|
2
|
+
import { forwardRef, isValidElement, useMemo } from 'react';
|
|
3
3
|
import { getConf } from '@jbrowse/core/configuration';
|
|
4
4
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
5
5
|
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
@@ -7,16 +7,16 @@ import { observer } from 'mobx-react';
|
|
|
7
7
|
const TooltipContents = forwardRef(function TooltipContents2({ message }, ref) {
|
|
8
8
|
return (_jsx("div", { ref: ref, children: isValidElement(message) ? (message) : message ? (_jsx(SanitizedHTML, { html: String(message) })) : null }));
|
|
9
9
|
});
|
|
10
|
-
const Tooltip = observer(function ({ model, clientMouseCoord, }) {
|
|
11
|
-
const { featureUnderMouse, mouseoverExtraInformation } = model;
|
|
10
|
+
const Tooltip = observer(function Tooltip({ model, clientMouseCoord, }) {
|
|
11
|
+
const { featureUnderMouse, featureIdUnderMouse, mouseoverExtraInformation } = model;
|
|
12
12
|
const x = clientMouseCoord[0] + 15;
|
|
13
13
|
const y = clientMouseCoord[1];
|
|
14
|
-
const contents = featureUnderMouse
|
|
14
|
+
const contents = useMemo(() => featureUnderMouse || mouseoverExtraInformation
|
|
15
15
|
? getConf(model, 'mouseover', {
|
|
16
16
|
feature: featureUnderMouse,
|
|
17
17
|
mouseoverExtraInformation,
|
|
18
18
|
})
|
|
19
|
-
: undefined;
|
|
20
|
-
return
|
|
19
|
+
: undefined, [featureUnderMouse, model, mouseoverExtraInformation]);
|
|
20
|
+
return featureIdUnderMouse && contents ? (_jsx(BaseTooltip, { clientPoint: { x, y }, children: _jsx(TooltipContents, { message: contents }) })) : null;
|
|
21
21
|
});
|
|
22
22
|
export default Tooltip;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../../LinearGenomeView/index.ts';
|
|
2
|
+
import type { FloatingLabelData, LayoutRecord } from '../types.ts';
|
|
3
|
+
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
4
|
+
export interface FeatureLabelData {
|
|
5
|
+
leftPx: number;
|
|
6
|
+
rightPx: number;
|
|
7
|
+
topPx: number;
|
|
8
|
+
totalFeatureHeight: number;
|
|
9
|
+
floatingLabels: FloatingLabelData[];
|
|
10
|
+
featureWidth: number;
|
|
11
|
+
totalLayoutWidth: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function deduplicateFeatureLabels(layoutFeatures: {
|
|
14
|
+
entries(): IterableIterator<readonly [string, LayoutRecord | undefined]>;
|
|
15
|
+
}, view: LinearGenomeViewModel, assembly: Assembly | undefined, bpPerPx: number): Map<string, FeatureLabelData>;
|
|
16
|
+
export declare function getViewportLeftEdge(offsetPx: number): number;
|
|
17
|
+
export declare function clampToViewport(featureLeftPx: number, featureRightPx: number, offsetPx: number): {
|
|
18
|
+
leftPx: number;
|
|
19
|
+
rightPx: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function calculateFloatingLabelPosition(featureLeftPx: number, featureRightPx: number, labelWidth: number, offsetPx: number, viewportLeft: number): number;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { clamp } from '@jbrowse/core/util';
|
|
2
|
+
function calculateFeaturePixelPositions(view, assembly, refName, left, right, bpPerPx) {
|
|
3
|
+
const canonicalRefName = assembly?.getCanonicalRefName(refName) || refName;
|
|
4
|
+
const leftBpPx = view.bpToPx({
|
|
5
|
+
refName: canonicalRefName,
|
|
6
|
+
coord: left,
|
|
7
|
+
})?.offsetPx;
|
|
8
|
+
const rightBpPx = view.bpToPx({
|
|
9
|
+
refName: canonicalRefName,
|
|
10
|
+
coord: right,
|
|
11
|
+
})?.offsetPx;
|
|
12
|
+
if (leftBpPx !== undefined) {
|
|
13
|
+
const rightEstimate = rightBpPx !== undefined ? rightBpPx : leftBpPx + (right - left) / bpPerPx;
|
|
14
|
+
return {
|
|
15
|
+
leftPx: Math.min(leftBpPx, rightEstimate),
|
|
16
|
+
rightPx: Math.max(leftBpPx, rightEstimate),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
else if (rightBpPx !== undefined) {
|
|
20
|
+
const leftEstimate = rightBpPx - (right - left) / bpPerPx;
|
|
21
|
+
return {
|
|
22
|
+
leftPx: Math.min(leftEstimate, rightBpPx),
|
|
23
|
+
rightPx: Math.max(leftEstimate, rightBpPx),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
function calculateMultiRegionPositions(view, assembly, refName, left, right) {
|
|
29
|
+
const canonicalRefName = assembly?.getCanonicalRefName(refName) || refName;
|
|
30
|
+
const visibleRegions = view.displayedRegions.filter(r => r.refName === canonicalRefName && r.start < right && r.end > left);
|
|
31
|
+
if (visibleRegions.length === 0) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
let minLeftPx = Infinity;
|
|
35
|
+
let maxRightPx = -Infinity;
|
|
36
|
+
for (const region of visibleRegions) {
|
|
37
|
+
const regionStart = Math.max(left, region.start);
|
|
38
|
+
const regionEnd = Math.min(right, region.end);
|
|
39
|
+
const startPx = view.bpToPx({
|
|
40
|
+
refName: canonicalRefName,
|
|
41
|
+
coord: regionStart,
|
|
42
|
+
})?.offsetPx;
|
|
43
|
+
const endPx = view.bpToPx({
|
|
44
|
+
refName: canonicalRefName,
|
|
45
|
+
coord: regionEnd,
|
|
46
|
+
})?.offsetPx;
|
|
47
|
+
if (startPx !== undefined && endPx !== undefined) {
|
|
48
|
+
minLeftPx = Math.min(minLeftPx, startPx, endPx);
|
|
49
|
+
maxRightPx = Math.max(maxRightPx, startPx, endPx);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (minLeftPx === Infinity || maxRightPx === -Infinity) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
return { leftPx: minLeftPx, rightPx: maxRightPx };
|
|
56
|
+
}
|
|
57
|
+
function getFeaturePositions(view, assembly, refName, left, right, bpPerPx) {
|
|
58
|
+
return (calculateFeaturePixelPositions(view, assembly, refName, left, right, bpPerPx) || calculateMultiRegionPositions(view, assembly, refName, left, right));
|
|
59
|
+
}
|
|
60
|
+
export function deduplicateFeatureLabels(layoutFeatures, view, assembly, bpPerPx) {
|
|
61
|
+
const featureLabels = new Map();
|
|
62
|
+
for (const [key, val] of layoutFeatures.entries()) {
|
|
63
|
+
if (!val?.[4]) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const [, topPx, , , feature] = val;
|
|
67
|
+
const { refName, floatingLabels, totalFeatureHeight, actualTopPx, featureWidth, totalLayoutWidth, featureStartBp, featureEndBp, } = feature;
|
|
68
|
+
const effectiveTopPx = actualTopPx ?? topPx;
|
|
69
|
+
if (!floatingLabels ||
|
|
70
|
+
floatingLabels.length === 0 ||
|
|
71
|
+
!totalFeatureHeight ||
|
|
72
|
+
featureWidth === undefined ||
|
|
73
|
+
totalLayoutWidth === undefined ||
|
|
74
|
+
featureStartBp === undefined ||
|
|
75
|
+
featureEndBp === undefined) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const positions = getFeaturePositions(view, assembly, refName, featureStartBp, featureEndBp, bpPerPx);
|
|
79
|
+
if (!positions) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const existing = featureLabels.get(key);
|
|
83
|
+
if (!existing || positions.leftPx < existing.leftPx) {
|
|
84
|
+
featureLabels.set(key, {
|
|
85
|
+
leftPx: positions.leftPx,
|
|
86
|
+
rightPx: positions.rightPx,
|
|
87
|
+
topPx: effectiveTopPx,
|
|
88
|
+
totalFeatureHeight,
|
|
89
|
+
floatingLabels,
|
|
90
|
+
featureWidth,
|
|
91
|
+
totalLayoutWidth,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return featureLabels;
|
|
96
|
+
}
|
|
97
|
+
export function getViewportLeftEdge(offsetPx) {
|
|
98
|
+
return Math.max(0, offsetPx);
|
|
99
|
+
}
|
|
100
|
+
export function clampToViewport(featureLeftPx, featureRightPx, offsetPx) {
|
|
101
|
+
const viewportLeft = getViewportLeftEdge(offsetPx);
|
|
102
|
+
return {
|
|
103
|
+
leftPx: Math.max(featureLeftPx, viewportLeft),
|
|
104
|
+
rightPx: Math.max(featureRightPx, viewportLeft),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export function calculateFloatingLabelPosition(featureLeftPx, featureRightPx, labelWidth, offsetPx, viewportLeft) {
|
|
108
|
+
const featureWidth = featureRightPx - featureLeftPx;
|
|
109
|
+
if (labelWidth > featureWidth) {
|
|
110
|
+
return featureLeftPx - offsetPx;
|
|
111
|
+
}
|
|
112
|
+
const leftPx = Math.max(featureLeftPx, viewportLeft);
|
|
113
|
+
const naturalX = leftPx - offsetPx;
|
|
114
|
+
const maxX = featureRightPx - offsetPx - labelWidth;
|
|
115
|
+
return clamp(naturalX, 0, maxX);
|
|
116
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
export { default as baseLinearDisplayConfigSchema } from './models/configSchema';
|
|
2
|
-
export type { BlockModel } from './models/serverSideRenderedBlock';
|
|
3
|
-
export { BaseLinearDisplay } from './model';
|
|
4
|
-
export type { BaseLinearDisplayModel, BaseLinearDisplayStateModel,
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
1
|
+
export { default as baseLinearDisplayConfigSchema } from './models/configSchema.ts';
|
|
2
|
+
export type { BlockModel } from './models/serverSideRenderedBlock.ts';
|
|
3
|
+
export { BaseLinearDisplay } from './model.ts';
|
|
4
|
+
export type { BaseLinearDisplayModel, BaseLinearDisplayStateModel, LegendItem, } from './model.ts';
|
|
5
|
+
export type { ExportSvgDisplayOptions, FloatingLabelData, LayoutFeatureMetadata, } from './types.ts';
|
|
6
|
+
export { createSubfeatureLabelMetadata } from './types.ts';
|
|
7
|
+
export { BlockMsg, Tooltip, default as BaseLinearDisplayComponent, } from './components/BaseLinearDisplay.tsx';
|
|
8
|
+
export { default as TrackHeightMixin } from './models/TrackHeightMixin.tsx';
|
|
9
|
+
export { default as FeatureDensityMixin } from './models/FeatureDensityMixin.tsx';
|
|
10
|
+
export { type NonBlockCanvasDisplayMixinType, default as NonBlockCanvasDisplayMixin, } from './models/NonBlockCanvasDisplayMixin.tsx';
|
|
11
|
+
export { drawCanvasImageData } from './util.ts';
|
|
12
|
+
export { default as TooLargeMessage } from './components/TooLargeMessage.tsx';
|
|
13
|
+
export { default as FloatingLegend } from './components/FloatingLegend.tsx';
|
|
14
|
+
export { default as NonBlockCanvasDisplayComponent } from './components/NonBlockCanvasDisplayComponent.tsx';
|
|
15
|
+
export type { NonBlockCanvasDisplayModel } from './components/NonBlockCanvasDisplayComponent.tsx';
|
|
16
|
+
export { default as SVGLegend } from './SVGLegend.tsx';
|
|
17
|
+
export { calculateSvgLegendWidth } from './calculateSvgLegendWidth.ts';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
export { default as baseLinearDisplayConfigSchema } from
|
|
2
|
-
export { BaseLinearDisplay } from
|
|
3
|
-
export {
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
1
|
+
export { default as baseLinearDisplayConfigSchema } from "./models/configSchema.js";
|
|
2
|
+
export { BaseLinearDisplay } from "./model.js";
|
|
3
|
+
export { createSubfeatureLabelMetadata } from "./types.js";
|
|
4
|
+
export { BlockMsg, Tooltip, default as BaseLinearDisplayComponent, } from "./components/BaseLinearDisplay.js";
|
|
5
|
+
export { default as TrackHeightMixin } from "./models/TrackHeightMixin.js";
|
|
6
|
+
export { default as FeatureDensityMixin } from "./models/FeatureDensityMixin.js";
|
|
7
|
+
export { default as NonBlockCanvasDisplayMixin, } from "./models/NonBlockCanvasDisplayMixin.js";
|
|
8
|
+
export { drawCanvasImageData } from "./util.js";
|
|
9
|
+
export { default as TooLargeMessage } from "./components/TooLargeMessage.js";
|
|
10
|
+
export { default as FloatingLegend } from "./components/FloatingLegend.js";
|
|
11
|
+
export { default as NonBlockCanvasDisplayComponent } from "./components/NonBlockCanvasDisplayComponent.js";
|
|
12
|
+
export { default as SVGLegend } from "./SVGLegend.js";
|
|
13
|
+
export { calculateSvgLegendWidth } from "./calculateSvgLegendWidth.js";
|