@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
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SVGBackground;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const util_1 = require("@jbrowse/core/util");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
function SVGBackground({ width, height, shift, }) {
|
|
8
|
-
const theme = (0, material_1.useTheme)();
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("rect", { width: width + shift * 2, height: height, fill: (0, util_1.stripAlpha)(theme.palette.background.default) }));
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '..';
|
|
2
|
-
export default function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight, }: {
|
|
3
|
-
model: LinearGenomeViewModel;
|
|
4
|
-
rulerHeight: number;
|
|
5
|
-
fontSize: number;
|
|
6
|
-
cytobandHeight: number;
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SVGHeader;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
const Base1DViewModel_1 = __importDefault(require("@jbrowse/core/util/Base1DViewModel"));
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const SVGRuler_1 = __importDefault(require("./SVGRuler"));
|
|
12
|
-
const SVGScalebar_1 = __importDefault(require("./SVGScalebar"));
|
|
13
|
-
const Cytobands_1 = __importDefault(require("../components/Cytobands"));
|
|
14
|
-
const OverviewScalebarPolygon_1 = __importDefault(require("../components/OverviewScalebarPolygon"));
|
|
15
|
-
const consts_1 = require("../consts");
|
|
16
|
-
function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight, }) {
|
|
17
|
-
const { width, assemblyNames, showCytobands, displayedRegions } = model;
|
|
18
|
-
const { assemblyManager } = (0, util_1.getSession)(model);
|
|
19
|
-
const assemblyName = assemblyNames.length > 1 ? '' : assemblyNames[0];
|
|
20
|
-
const assembly = assemblyManager.get(assemblyName);
|
|
21
|
-
const theme = (0, material_1.useTheme)();
|
|
22
|
-
const c = (0, util_1.stripAlpha)(theme.palette.text.primary);
|
|
23
|
-
const overview = Base1DViewModel_1.default.create({
|
|
24
|
-
displayedRegions: JSON.parse(JSON.stringify(displayedRegions)),
|
|
25
|
-
interRegionPaddingWidth: 0,
|
|
26
|
-
minimumBlockWidth: model.minimumBlockWidth,
|
|
27
|
-
});
|
|
28
|
-
const visibleRegions = model.dynamicBlocks.contentBlocks;
|
|
29
|
-
if (!visibleRegions.length) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
overview.setVolatileWidth(width);
|
|
33
|
-
overview.showAllRegions();
|
|
34
|
-
const block = overview.dynamicBlocks.contentBlocks[0];
|
|
35
|
-
const first = visibleRegions.at(0);
|
|
36
|
-
const last = visibleRegions.at(-1);
|
|
37
|
-
const firstOverviewPx = overview.bpToPx({
|
|
38
|
-
...first,
|
|
39
|
-
coord: first.reversed ? first.end : first.start,
|
|
40
|
-
}) || 0;
|
|
41
|
-
const lastOverviewPx = overview.bpToPx({
|
|
42
|
-
...last,
|
|
43
|
-
coord: last.reversed ? last.start : last.end,
|
|
44
|
-
}) || 0;
|
|
45
|
-
const y = +showCytobands * cytobandHeight;
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)("g", { id: "header", children: [(0, jsx_runtime_1.jsx)("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: assemblyName }), showCytobands ? ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(0 ${rulerHeight})`, children: [(0, jsx_runtime_1.jsx)(Cytobands_1.default, { overview: overview, assembly: assembly, block: block }), (0, jsx_runtime_1.jsx)("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: consts_1.HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0,${consts_1.HEADER_OVERVIEW_HEIGHT})`, children: (0, jsx_runtime_1.jsx)(OverviewScalebarPolygon_1.default, { overview: overview, model: model, useOffset: false }) })] })) : null, (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${fontSize + y})`, children: (0, jsx_runtime_1.jsx)(SVGScalebar_1.default, { model: model, fontSize: fontSize }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${rulerHeight + y})`, children: (0, jsx_runtime_1.jsx)(SVGRuler_1.default, { model: model, fontSize: fontSize }) })] }));
|
|
47
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '..';
|
|
2
|
-
import type { ExportSvgOptions } from '../types';
|
|
3
|
-
type LGV = LinearGenomeViewModel;
|
|
4
|
-
export declare function renderToSvg(model: LGV, opts: ExportSvgOptions): Promise<string>;
|
|
5
|
-
export { default as SVGRuler } from './SVGRuler';
|
|
6
|
-
export { default as SVGTracks } from './SVGTracks';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SVGTracks = exports.SVGRuler = void 0;
|
|
7
|
-
exports.renderToSvg = renderToSvg;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
10
|
-
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
12
|
-
const material_1 = require("@mui/material");
|
|
13
|
-
const mobx_1 = require("mobx");
|
|
14
|
-
const SVGBackground_1 = __importDefault(require("./SVGBackground"));
|
|
15
|
-
const SVGHeader_1 = __importDefault(require("./SVGHeader"));
|
|
16
|
-
const SVGTracks_1 = __importDefault(require("./SVGTracks"));
|
|
17
|
-
const util_2 = require("./util");
|
|
18
|
-
async function renderToSvg(model, opts) {
|
|
19
|
-
await (0, mobx_1.when)(() => model.initialized);
|
|
20
|
-
const { textHeight = 18, headerHeight = 40, rulerHeight = 50, fontSize = 13, cytobandHeight = 100, trackLabels = 'offset', themeName = 'default', Wrapper = ({ children }) => children, } = opts;
|
|
21
|
-
const session = (0, util_1.getSession)(model);
|
|
22
|
-
const { allThemes } = session;
|
|
23
|
-
const theme = allThemes === null || allThemes === void 0 ? void 0 : allThemes()[themeName];
|
|
24
|
-
const { width, pinnedTracks, unpinnedTracks, tracks, showCytobands } = model;
|
|
25
|
-
const shift = 50;
|
|
26
|
-
const c = +showCytobands * cytobandHeight;
|
|
27
|
-
const offset = headerHeight + rulerHeight + c + 10;
|
|
28
|
-
const height = (0, util_2.totalHeight)(tracks, textHeight, trackLabels) + offset + 100;
|
|
29
|
-
const displayResults = await Promise.all([...pinnedTracks, ...unpinnedTracks].map(async (track) => {
|
|
30
|
-
const display = track.displays[0];
|
|
31
|
-
await (0, mobx_1.when)(() => !display.renderProps().notReady);
|
|
32
|
-
return { track, result: await display.renderSvg({ ...opts, theme }) };
|
|
33
|
-
}));
|
|
34
|
-
const trackLabelMaxLen = (0, util_1.max)(tracks.map(t => (0, util_1.measureText)((0, tracks_1.getTrackName)(t.configuration, session), fontSize)), 0) + 40;
|
|
35
|
-
const trackLabelOffset = trackLabels === 'left' ? trackLabelMaxLen : 0;
|
|
36
|
-
const w = width + trackLabelOffset;
|
|
37
|
-
return (0, util_1.renderToStaticMarkup)((0, jsx_runtime_1.jsx)(material_1.ThemeProvider, { theme: (0, ui_1.createJBrowseTheme)(theme), children: (0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsxs)("svg", { width: w, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, height].toString(), children: [(0, jsx_runtime_1.jsx)(SVGBackground_1.default, { width: w, height: height, shift: shift }), (0, jsx_runtime_1.jsxs)("g", { transform: `translate(${shift} 0)`, children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${trackLabelOffset})`, children: (0, jsx_runtime_1.jsx)(SVGHeader_1.default, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${offset})`, children: (0, jsx_runtime_1.jsx)(SVGTracks_1.default, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset }) })] })] }) }) }));
|
|
38
|
-
}
|
|
39
|
-
var SVGRuler_1 = require("./SVGRuler");
|
|
40
|
-
Object.defineProperty(exports, "SVGRuler", { enumerable: true, get: function () { return __importDefault(SVGRuler_1).default; } });
|
|
41
|
-
var SVGTracks_2 = require("./SVGTracks");
|
|
42
|
-
Object.defineProperty(exports, "SVGTracks", { enumerable: true, get: function () { return __importDefault(SVGTracks_2).default; } });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SVGRegionSeparators;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
function SVGRegionSeparators({ model, height, }) {
|
|
6
|
-
const { dynamicBlocks, offsetPx, interRegionPaddingWidth } = model;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: dynamicBlocks.contentBlocks.slice(1).map(block => ((0, jsx_runtime_1.jsx)("rect", { x: block.offsetPx - offsetPx - interRegionPaddingWidth, width: interRegionPaddingWidth, y: 0, height: height, fill: "grey" }, block.key))) }));
|
|
8
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SVGRuler;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
const material_1 = require("@mui/material");
|
|
10
|
-
const util_2 = require("../util");
|
|
11
|
-
const SVGRegionSeparators_1 = __importDefault(require("./SVGRegionSeparators"));
|
|
12
|
-
function Ruler({ start, end, bpPerPx, reversed = false, major = true, minor = true, hideText = false, }) {
|
|
13
|
-
const ticks = (0, util_2.makeTicks)(start, end, bpPerPx, major, minor);
|
|
14
|
-
const theme = (0, material_1.useTheme)();
|
|
15
|
-
const c = (0, util_1.stripAlpha)(theme.palette.text.secondary);
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [ticks.map(tick => {
|
|
17
|
-
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }, `tick-${tick.base}`));
|
|
19
|
-
}), !hideText
|
|
20
|
-
? ticks
|
|
21
|
-
.filter(tick => tick.type === 'major')
|
|
22
|
-
.map(tick => {
|
|
23
|
-
const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)("text", { x: x - 3, y: 7 + 11, fontSize: 11, fill: c, children: (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx) }, `label-${tick.base}`));
|
|
25
|
-
})
|
|
26
|
-
: null] }));
|
|
27
|
-
}
|
|
28
|
-
function SVGRuler({ model, fontSize, }) {
|
|
29
|
-
const { dynamicBlocks: { contentBlocks }, offsetPx: viewOffsetPx, bpPerPx, } = model;
|
|
30
|
-
const renderRuler = contentBlocks.length < 5;
|
|
31
|
-
const theme = (0, material_1.useTheme)();
|
|
32
|
-
const c = (0, util_1.stripAlpha)(theme.palette.text.primary);
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SVGRegionSeparators_1.default, { model: model, height: 30 }), contentBlocks.map(block => {
|
|
34
|
-
const { start, end, key, reversed, offsetPx, refName, widthPx } = block;
|
|
35
|
-
const offset = offsetPx - viewOffsetPx;
|
|
36
|
-
const clipid = `clip-${key}`;
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: clipid, children: (0, jsx_runtime_1.jsx)("rect", { x: 0, y: 0, width: widthPx, height: 100 }) }) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(${offset} 0)`, children: (0, jsx_runtime_1.jsxs)("g", { clipPath: `url(#${clipid})`, children: [(0, jsx_runtime_1.jsx)("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c, children: refName }), (0, jsx_runtime_1.jsx)("g", { transform: "translate(0 20)", children: (0, jsx_runtime_1.jsx)(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }) })] }) })] }, key));
|
|
38
|
-
})] }));
|
|
39
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SVGScalebar;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const util_1 = require("@jbrowse/core/util");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
function SVGScalebar({ model, fontSize, }) {
|
|
8
|
-
const { offsetPx, dynamicBlocks: { totalWidthPxWithoutBorders: totalWidthPx, totalBp }, } = model;
|
|
9
|
-
const theme = (0, material_1.useTheme)();
|
|
10
|
-
const displayBp = (0, util_1.getBpDisplayStr)(totalBp);
|
|
11
|
-
const x0 = Math.max(-offsetPx, 0);
|
|
12
|
-
const x1 = x0 + totalWidthPx;
|
|
13
|
-
const c = (0, util_1.stripAlpha)(theme.palette.text.secondary);
|
|
14
|
-
const x = x0 + (x1 - x0) / 2;
|
|
15
|
-
const y = fontSize;
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }), (0, jsx_runtime_1.jsx)("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }), (0, jsx_runtime_1.jsx)("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }), (0, jsx_runtime_1.jsx)("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: displayBp })] }));
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SVGTrackLabel;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const util_1 = require("@jbrowse/core/util");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }) {
|
|
8
|
-
const theme = (0, material_1.useTheme)();
|
|
9
|
-
const fill = (0, util_1.stripAlpha)(theme.palette.text.primary);
|
|
10
|
-
const xoff = trackLabels === 'overlay' ? 5 : 0;
|
|
11
|
-
const yoff = trackLabels === 'offset' ? 5 : 0;
|
|
12
|
-
const name = (0, util_1.coarseStripHTML)(trackName);
|
|
13
|
-
return trackLabels !== 'none' ? ((0, jsx_runtime_1.jsx)("g", { children: trackLabels === 'left' ? ((0, jsx_runtime_1.jsx)("text", { x: trackLabelOffset - 40, y: 20, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", textAnchor: "end", children: name })) : ((0, jsx_runtime_1.jsx)("text", { x: x + xoff, y: yoff, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", children: name })) })) : null;
|
|
14
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '..';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
type LGV = LinearGenomeViewModel;
|
|
4
|
-
interface DisplayResult {
|
|
5
|
-
track: {
|
|
6
|
-
configuration: AnyConfigurationModel;
|
|
7
|
-
displays: {
|
|
8
|
-
height: number;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
result: string;
|
|
12
|
-
}
|
|
13
|
-
export default function SVGTracks({ displayResults, model, textHeight, fontSize, trackLabels, trackLabelOffset, }: {
|
|
14
|
-
displayResults: DisplayResult[];
|
|
15
|
-
model: LGV;
|
|
16
|
-
textHeight: number;
|
|
17
|
-
fontSize: number;
|
|
18
|
-
trackLabels?: string;
|
|
19
|
-
trackLabelOffset?: number;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SVGTracks;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
10
|
-
const SVGRegionSeparators_1 = __importDefault(require("./SVGRegionSeparators"));
|
|
11
|
-
const SVGTrackLabel_1 = __importDefault(require("./SVGTrackLabel"));
|
|
12
|
-
function SVGTracks({ displayResults, model, textHeight, fontSize, trackLabels = 'offset', trackLabelOffset = 0, }) {
|
|
13
|
-
const session = (0, util_1.getSession)(model);
|
|
14
|
-
const textOffset = trackLabels === 'offset' ? textHeight : 0;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: displayResults.reduce(({ prevOffset, reactElements }, { track, result }) => {
|
|
16
|
-
const conf = track.configuration;
|
|
17
|
-
const trackName = (0, tracks_1.getTrackName)(conf, session);
|
|
18
|
-
const display = track.displays[0];
|
|
19
|
-
const x = Math.max(-model.offsetPx, 0);
|
|
20
|
-
const currOffset = prevOffset + display.height + textOffset;
|
|
21
|
-
return {
|
|
22
|
-
prevOffset: currOffset,
|
|
23
|
-
reactElements: [
|
|
24
|
-
...reactElements,
|
|
25
|
-
(0, jsx_runtime_1.jsxs)("g", { transform: `translate(0 ${prevOffset})`, children: [(0, jsx_runtime_1.jsxs)("g", { transform: `translate(${trackLabelOffset} ${textOffset})`, children: [(0, jsx_runtime_1.jsx)(SVGRegionSeparators_1.default, { model: model, height: display.height }), result] }), (0, jsx_runtime_1.jsx)(SVGTrackLabel_1.default, { trackName: trackName, fontSize: fontSize, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset, x: x })] }, conf.trackId),
|
|
26
|
-
],
|
|
27
|
-
};
|
|
28
|
-
}, {
|
|
29
|
-
prevOffset: 0,
|
|
30
|
-
reactElements: [],
|
|
31
|
-
}).reactElements }));
|
|
32
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.totalHeight = totalHeight;
|
|
4
|
-
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
function totalHeight(tracks, textHeight, trackLabels) {
|
|
6
|
-
return (0, util_1.sum)(tracks.map(t => t.displays[0].height +
|
|
7
|
-
(['none', 'left'].includes(trackLabels) ? 0 : textHeight)));
|
|
8
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export interface BpOffset {
|
|
2
|
-
refName?: string;
|
|
3
|
-
index: number;
|
|
4
|
-
offset: number;
|
|
5
|
-
start?: number;
|
|
6
|
-
end?: number;
|
|
7
|
-
coord?: number;
|
|
8
|
-
reversed?: boolean;
|
|
9
|
-
assemblyName?: string;
|
|
10
|
-
oob?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface ExportSvgOptions {
|
|
13
|
-
rasterizeLayers?: boolean;
|
|
14
|
-
filename?: string;
|
|
15
|
-
Wrapper?: React.FC<{
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
}>;
|
|
18
|
-
fontSize?: number;
|
|
19
|
-
rulerHeight?: number;
|
|
20
|
-
textHeight?: number;
|
|
21
|
-
paddingHeight?: number;
|
|
22
|
-
headerHeight?: number;
|
|
23
|
-
cytobandHeight?: number;
|
|
24
|
-
trackLabels?: string;
|
|
25
|
-
themeName?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface HighlightType {
|
|
28
|
-
start: number;
|
|
29
|
-
end: number;
|
|
30
|
-
assemblyName: string;
|
|
31
|
-
refName: string;
|
|
32
|
-
}
|
|
33
|
-
export interface NavLocation {
|
|
34
|
-
refName: string;
|
|
35
|
-
start?: number;
|
|
36
|
-
end?: number;
|
|
37
|
-
assemblyName?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface InitState {
|
|
40
|
-
loc: string;
|
|
41
|
-
assembly: string;
|
|
42
|
-
tracks?: string[];
|
|
43
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { AssemblyManager, ParsedLocString } from '@jbrowse/core/util';
|
|
2
|
-
import type { BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
3
|
-
export declare function chooseGridPitch(scale: number, minMajorPitchPx: number, minMinorPitchPx: number): {
|
|
4
|
-
majorPitch: number;
|
|
5
|
-
minorPitch: number;
|
|
6
|
-
};
|
|
7
|
-
export declare function makeTicks(start: number, end: number, bpPerPx: number, emitMajor?: boolean, emitMinor?: boolean): {
|
|
8
|
-
type: string;
|
|
9
|
-
base: number;
|
|
10
|
-
index: number;
|
|
11
|
-
}[];
|
|
12
|
-
export declare function generateLocations({ regions, assemblyManager, assemblyName, grow, }: {
|
|
13
|
-
regions: ParsedLocString[];
|
|
14
|
-
assemblyManager: AssemblyManager;
|
|
15
|
-
assemblyName?: string;
|
|
16
|
-
grow?: number;
|
|
17
|
-
}): Promise<{
|
|
18
|
-
assemblyName: string;
|
|
19
|
-
parentRegion: import("@jbrowse/core/assemblyManager/assembly").BasicRegion;
|
|
20
|
-
end?: number | undefined;
|
|
21
|
-
start?: number | undefined;
|
|
22
|
-
refName: string;
|
|
23
|
-
reversed?: boolean | undefined;
|
|
24
|
-
}[]>;
|
|
25
|
-
export declare function parseLocStrings(input: string, assemblyName: string, isValidRefName: (str: string, assemblyName: string) => boolean): ParsedLocString[];
|
|
26
|
-
export declare function calculateVisibleLocStrings(contentBlocks: BaseBlock[]): string;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.chooseGridPitch = chooseGridPitch;
|
|
4
|
-
exports.makeTicks = makeTicks;
|
|
5
|
-
exports.generateLocations = generateLocations;
|
|
6
|
-
exports.parseLocStrings = parseLocStrings;
|
|
7
|
-
exports.calculateVisibleLocStrings = calculateVisibleLocStrings;
|
|
8
|
-
const util_1 = require("@jbrowse/core/util");
|
|
9
|
-
function chooseGridPitch(scale, minMajorPitchPx, minMinorPitchPx) {
|
|
10
|
-
scale = Math.abs(scale);
|
|
11
|
-
const minMajorPitchBp = minMajorPitchPx * scale;
|
|
12
|
-
const majorMagnitude = Number.parseInt(Number(minMajorPitchBp).toExponential().split(/e/i)[1], 10);
|
|
13
|
-
let majorPitch = 10 ** majorMagnitude;
|
|
14
|
-
while (majorPitch < minMajorPitchBp) {
|
|
15
|
-
majorPitch *= 2;
|
|
16
|
-
if (majorPitch >= minMajorPitchBp) {
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
majorPitch *= 2.5;
|
|
20
|
-
}
|
|
21
|
-
majorPitch = Math.max(majorPitch, 5);
|
|
22
|
-
const majorPitchPx = majorPitch / scale;
|
|
23
|
-
let minorPitch = 0;
|
|
24
|
-
if (!(majorPitch % 10) && majorPitchPx / 10 >= minMinorPitchPx) {
|
|
25
|
-
minorPitch = majorPitch / 10;
|
|
26
|
-
}
|
|
27
|
-
else if (!(majorPitch % 5) && majorPitchPx / 5 >= minMinorPitchPx) {
|
|
28
|
-
minorPitch = majorPitch / 5;
|
|
29
|
-
}
|
|
30
|
-
else if (!(majorPitch % 2) && majorPitchPx / 2 >= minMinorPitchPx) {
|
|
31
|
-
minorPitch = majorPitch / 2;
|
|
32
|
-
}
|
|
33
|
-
return { majorPitch, minorPitch };
|
|
34
|
-
}
|
|
35
|
-
function makeTicks(start, end, bpPerPx, emitMajor = true, emitMinor = true) {
|
|
36
|
-
const gridPitch = chooseGridPitch(bpPerPx, 60, 15);
|
|
37
|
-
let minBase = start;
|
|
38
|
-
let maxBase = end;
|
|
39
|
-
if (bpPerPx < 0) {
|
|
40
|
-
;
|
|
41
|
-
[minBase, maxBase] = [maxBase, minBase];
|
|
42
|
-
}
|
|
43
|
-
minBase -= Math.abs(20 * bpPerPx) - 1;
|
|
44
|
-
maxBase += Math.abs(20 * bpPerPx) + 1;
|
|
45
|
-
const iterPitch = gridPitch.minorPitch || gridPitch.majorPitch;
|
|
46
|
-
let index = 0;
|
|
47
|
-
const ticks = [];
|
|
48
|
-
for (let base = Math.floor(minBase / iterPitch) * iterPitch; base < Math.ceil(maxBase / iterPitch) * iterPitch + 1; base += iterPitch) {
|
|
49
|
-
if (emitMinor && base % (gridPitch.majorPitch * 2)) {
|
|
50
|
-
ticks.push({ type: 'minor', base: base - 1, index });
|
|
51
|
-
index += 1;
|
|
52
|
-
}
|
|
53
|
-
else if (emitMajor && !(base % (gridPitch.majorPitch * 2))) {
|
|
54
|
-
ticks.push({ type: 'major', base: base - 1, index });
|
|
55
|
-
index += 1;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return ticks;
|
|
59
|
-
}
|
|
60
|
-
async function generateLocations({ regions, assemblyManager, assemblyName, grow, }) {
|
|
61
|
-
return Promise.all(regions.map(async (region) => {
|
|
62
|
-
const asmName = region.assemblyName || assemblyName;
|
|
63
|
-
if (!asmName) {
|
|
64
|
-
throw new Error('no assembly provided');
|
|
65
|
-
}
|
|
66
|
-
const asm = await assemblyManager.waitForAssembly(asmName);
|
|
67
|
-
const { refName } = region;
|
|
68
|
-
if (!asm) {
|
|
69
|
-
throw new Error(`assembly ${asmName} not found`);
|
|
70
|
-
}
|
|
71
|
-
const { regions } = asm;
|
|
72
|
-
if (!regions) {
|
|
73
|
-
throw new Error(`regions not loaded yet for ${asmName}`);
|
|
74
|
-
}
|
|
75
|
-
const canonicalRefName = asm.getCanonicalRefName(region.refName);
|
|
76
|
-
if (!canonicalRefName) {
|
|
77
|
-
throw new Error(`Could not find refName ${refName} in ${asm.name}`);
|
|
78
|
-
}
|
|
79
|
-
const parentRegion = regions.find(r => r.refName === canonicalRefName);
|
|
80
|
-
if (!parentRegion) {
|
|
81
|
-
throw new Error(`Could not find refName ${refName} in ${asmName}`);
|
|
82
|
-
}
|
|
83
|
-
const { start, end } = region;
|
|
84
|
-
if (grow && start && end) {
|
|
85
|
-
const len = end - start;
|
|
86
|
-
const margin = len * grow;
|
|
87
|
-
return {
|
|
88
|
-
...region,
|
|
89
|
-
start: Math.max(0, start - margin),
|
|
90
|
-
end: end + margin,
|
|
91
|
-
assemblyName: asmName,
|
|
92
|
-
parentRegion,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return {
|
|
97
|
-
...region,
|
|
98
|
-
assemblyName: asmName,
|
|
99
|
-
parentRegion,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
104
|
-
function parseLocStrings(input, assemblyName, isValidRefName) {
|
|
105
|
-
const inputs = input
|
|
106
|
-
.split(/(\s+)/)
|
|
107
|
-
.map(f => f.trim())
|
|
108
|
-
.filter(f => !!f);
|
|
109
|
-
try {
|
|
110
|
-
return inputs.map(loc => (0, util_1.parseLocString)(loc, ref => isValidRefName(ref, assemblyName)));
|
|
111
|
-
}
|
|
112
|
-
catch (e) {
|
|
113
|
-
const [refName, start, end] = inputs;
|
|
114
|
-
if (/Unknown reference sequence/.exec(`${e}`) &&
|
|
115
|
-
Number.isInteger(+start) &&
|
|
116
|
-
Number.isInteger(+end)) {
|
|
117
|
-
return [
|
|
118
|
-
(0, util_1.parseLocString)(`${refName}:${start}..${end}`, ref => isValidRefName(ref, assemblyName)),
|
|
119
|
-
];
|
|
120
|
-
}
|
|
121
|
-
throw e;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function calculateVisibleLocStrings(contentBlocks) {
|
|
125
|
-
if (!contentBlocks.length) {
|
|
126
|
-
return '';
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
const isSingleAssemblyName = contentBlocks.every(b => b.assemblyName === contentBlocks[0].assemblyName);
|
|
130
|
-
const locs = contentBlocks.map(block => (0, util_1.assembleLocString)({
|
|
131
|
-
...block,
|
|
132
|
-
start: Math.round(block.start),
|
|
133
|
-
end: Math.round(block.end),
|
|
134
|
-
assemblyName: isSingleAssemblyName ? undefined : block.assemblyName,
|
|
135
|
-
}));
|
|
136
|
-
return locs.join(' ');
|
|
137
|
-
}
|
|
138
|
-
}
|