@genome-spy/core 0.73.0 → 0.75.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/dist/bundle/AbortablePromiseCache-3gHJdF3E.js +96 -0
- package/dist/bundle/browser-BTgw5ieH.js +126 -0
- package/dist/bundle/chunk-DmhlhrBa.js +11 -0
- package/dist/bundle/esm-BDFRLEuD.js +1248 -0
- package/dist/bundle/esm-BygJiwh0.js +573 -0
- package/dist/bundle/esm-CGX-qz1d.js +155 -0
- package/dist/bundle/esm-CgfVIRJ-.js +121 -0
- package/dist/bundle/esm-CuMSzCHy.js +298 -0
- package/dist/bundle/esm-DMXpJXM4.js +369 -0
- package/dist/bundle/esm-DQiq2Zhd.js +1426 -0
- package/dist/bundle/esm-DtE8VqAv.js +1015 -0
- package/dist/bundle/esm-sIoQYZ21.js +461 -0
- package/dist/bundle/index.es.js +21266 -25938
- package/dist/bundle/index.js +367 -383
- package/dist/bundle/parquetRead-DG_-F5j5.js +1609 -0
- package/dist/schema.json +13421 -7210
- package/dist/src/config/axisConfig.d.ts +16 -0
- package/dist/src/config/axisConfig.d.ts.map +1 -0
- package/dist/src/config/axisConfig.js +84 -0
- package/dist/src/config/defaultConfig.d.ts +3 -0
- package/dist/src/config/defaultConfig.d.ts.map +1 -0
- package/dist/src/config/defaultConfig.js +38 -0
- package/dist/src/config/defaults/axisDefaults.d.ts +5 -0
- package/dist/src/config/defaults/axisDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/axisDefaults.js +72 -0
- package/dist/src/config/defaults/markDefaults.d.ts +15 -0
- package/dist/src/config/defaults/markDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/markDefaults.js +121 -0
- package/dist/src/config/defaults/scaleDefaults.d.ts +5 -0
- package/dist/src/config/defaults/scaleDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/scaleDefaults.js +18 -0
- package/dist/src/config/defaults/titleDefaults.d.ts +5 -0
- package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/titleDefaults.js +47 -0
- package/dist/src/config/defaults/viewDefaults.d.ts +3 -0
- package/dist/src/config/defaults/viewDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/viewDefaults.js +2 -0
- package/dist/src/config/markConfig.d.ts +8 -0
- package/dist/src/config/markConfig.d.ts.map +1 -0
- package/dist/src/config/markConfig.js +27 -0
- package/dist/src/config/mergeConfig.d.ts +8 -0
- package/dist/src/config/mergeConfig.d.ts.map +1 -0
- package/dist/src/config/mergeConfig.js +81 -0
- package/dist/src/config/resolveConfig.d.ts +22 -0
- package/dist/src/config/resolveConfig.d.ts.map +1 -0
- package/dist/src/config/resolveConfig.js +32 -0
- package/dist/src/config/scaleConfig.d.ts +40 -0
- package/dist/src/config/scaleConfig.d.ts.map +1 -0
- package/dist/src/config/scaleConfig.js +220 -0
- package/dist/src/config/styleUtils.d.ts +6 -0
- package/dist/src/config/styleUtils.d.ts.map +1 -0
- package/dist/src/config/styleUtils.js +10 -0
- package/dist/src/config/themes.d.ts +15 -0
- package/dist/src/config/themes.d.ts.map +1 -0
- package/dist/src/config/themes.js +293 -0
- package/dist/src/config/titleConfig.d.ts +12 -0
- package/dist/src/config/titleConfig.d.ts.map +1 -0
- package/dist/src/config/titleConfig.js +42 -0
- package/dist/src/config/viewConfig.d.ts +7 -0
- package/dist/src/config/viewConfig.d.ts.map +1 -0
- package/dist/src/config/viewConfig.js +29 -0
- package/dist/src/data/flowNode.d.ts +22 -1
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +37 -1
- package/dist/src/data/formats/bed.d.ts.map +1 -1
- package/dist/src/data/formats/bed.js +6 -1
- package/dist/src/data/formats/bedpe.d.ts.map +1 -1
- package/dist/src/data/formats/bedpe.js +4 -0
- package/dist/src/data/formats/fasta.d.ts.map +1 -1
- package/dist/src/data/formats/fasta.js +4 -0
- package/dist/src/data/formats/parquet.d.ts.map +1 -1
- package/dist/src/data/formats/parquet.js +4 -0
- package/dist/src/data/sources/dataSourceFactory.d.ts +2 -13
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +5 -141
- package/dist/src/data/sources/dataUtils.d.ts +25 -0
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +23 -0
- package/dist/src/data/sources/inlineSource.js +2 -2
- package/dist/src/data/sources/lazy/axisGenomeSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/axisGenomeSource.js +11 -0
- package/dist/src/data/sources/lazy/axisTickSource.d.ts +1 -1
- package/dist/src/data/sources/lazy/axisTickSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/axisTickSource.js +19 -8
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bamSource.js +11 -0
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +12 -1
- package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +11 -0
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +12 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +11 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts +27 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.js +65 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts +2 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.js +8 -0
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.js +11 -2
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/vcfSource.js +11 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +13 -5
- package/dist/src/data/transforms/aggregate.d.ts +1 -0
- package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregate.js +30 -8
- package/dist/src/data/transforms/aggregateOps.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregateOps.js +12 -1
- package/dist/src/data/transforms/coverage.js +2 -2
- package/dist/src/data/transforms/filter.js +1 -1
- package/dist/src/data/transforms/filterScoredLabels.d.ts +6 -0
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +9 -0
- package/dist/src/data/transforms/measureText.d.ts +1 -0
- package/dist/src/data/transforms/measureText.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +14 -5
- package/dist/src/data/transforms/pileup.d.ts.map +1 -1
- package/dist/src/data/transforms/pileup.js +1 -2
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +0 -1
- package/dist/src/embedFactory.d.ts +13 -0
- package/dist/src/embedFactory.d.ts.map +1 -0
- package/dist/src/embedFactory.js +127 -0
- package/dist/src/encoder/accessor.d.ts +3 -12
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +10 -65
- package/dist/src/encoder/encoder.d.ts +51 -8
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +179 -55
- package/dist/src/fonts/bmFontManager.js +1 -1
- package/dist/src/full.d.ts +2 -0
- package/dist/src/full.d.ts.map +1 -0
- package/dist/src/full.js +2 -0
- package/dist/src/genome/genome.d.ts +8 -0
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +16 -2
- package/dist/src/genome/genomeStore.js +1 -1
- package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -1
- package/dist/src/genome/rootGenomeConfig.js +6 -2
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +31 -7
- package/dist/src/genomeSpy/cursorManager.d.ts +69 -0
- package/dist/src/genomeSpy/cursorManager.d.ts.map +1 -0
- package/dist/src/genomeSpy/cursorManager.js +131 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts +113 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -0
- package/dist/src/genomeSpy/headlessBootstrap.js +246 -0
- package/dist/src/genomeSpy/interactionController.d.ts +5 -0
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +292 -59
- package/dist/src/genomeSpy/interactionDispatcher.d.ts +50 -0
- package/dist/src/genomeSpy/interactionDispatcher.d.ts.map +1 -0
- package/dist/src/genomeSpy/interactionDispatcher.js +203 -0
- package/dist/src/genomeSpy/viewContextFactory.d.ts +4 -2
- package/dist/src/genomeSpy/viewContextFactory.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewContextFactory.js +12 -4
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +7 -3
- package/dist/src/genomeSpy.d.ts +1 -124
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +7 -688
- package/dist/src/genomeSpyBase.d.ts +133 -0
- package/dist/src/genomeSpyBase.d.ts.map +1 -0
- package/dist/src/genomeSpyBase.js +719 -0
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/arrayBuilder.js +0 -3
- package/dist/src/gl/colorUtils.d.ts.map +1 -1
- package/dist/src/gl/colorUtils.js +3 -0
- package/dist/src/gl/dataToVertices.d.ts +12 -14
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +121 -95
- package/dist/src/gl/glslScaleGenerator.d.ts +5 -2
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +15 -15
- package/dist/src/gl/vertexRangeIndex.d.ts +23 -0
- package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -0
- package/dist/src/gl/vertexRangeIndex.js +150 -0
- package/dist/src/index.d.ts +3 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -114
- package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +4462 -0
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +0 -23
- package/dist/src/marks/mark.d.ts +8 -1
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +61 -20
- package/dist/src/marks/markUtils.d.ts +18 -1
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +52 -4
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +6 -26
- package/dist/src/marks/rect.d.ts.map +1 -1
- package/dist/src/marks/rect.js +13 -21
- package/dist/src/marks/rule.d.ts +7 -2
- package/dist/src/marks/rule.d.ts.map +1 -1
- package/dist/src/marks/rule.js +125 -16
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +5 -47
- package/dist/src/minimal.d.ts +8 -0
- package/dist/src/minimal.d.ts.map +1 -0
- package/dist/src/minimal.js +21 -0
- package/dist/src/paramRuntime/expressionCompiler.d.ts +2 -1
- package/dist/src/paramRuntime/expressionCompiler.d.ts.map +1 -1
- package/dist/src/paramRuntime/expressionCompiler.js +3 -2
- package/dist/src/paramRuntime/expressionRef.d.ts +4 -1
- package/dist/src/paramRuntime/expressionRef.d.ts.map +1 -1
- package/dist/src/paramRuntime/expressionRef.js +10 -3
- package/dist/src/paramRuntime/graphRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/graphRuntime.js +15 -6
- package/dist/src/paramRuntime/paramRuntime.d.ts +8 -2
- package/dist/src/paramRuntime/paramRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/paramRuntime.js +10 -5
- package/dist/src/paramRuntime/types.d.ts +1 -0
- package/dist/src/paramRuntime/types.d.ts.map +1 -1
- package/dist/src/paramRuntime/types.js +1 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +24 -4
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +52 -6
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +14 -7
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +9 -5
- package/dist/src/scales/domainPlanner.d.ts +82 -16
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +364 -131
- package/dist/src/scales/indexLikeDomainUtils.d.ts +29 -0
- package/dist/src/scales/indexLikeDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/indexLikeDomainUtils.js +67 -0
- package/dist/src/scales/resolutionMemberOrder.d.ts +15 -0
- package/dist/src/scales/resolutionMemberOrder.d.ts.map +1 -0
- package/dist/src/scales/resolutionMemberOrder.js +22 -0
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +7 -2
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +43 -4
- package/dist/src/scales/scalePropsResolver.d.ts +5 -3
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +108 -8
- package/dist/src/scales/scaleResolution.d.ts +35 -1
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +381 -66
- package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -1
- package/dist/src/scales/scaleResolutionTestUtils.js +6 -2
- package/dist/src/scales/scaleRules.d.ts.map +1 -1
- package/dist/src/scales/scaleRules.js +16 -2
- package/dist/src/scales/selectionDomainUtils.d.ts +30 -0
- package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -1
- package/dist/src/scales/selectionDomainUtils.js +116 -1
- package/dist/src/screenshotExport.d.ts +23 -0
- package/dist/src/screenshotExport.d.ts.map +1 -0
- package/dist/src/screenshotExport.js +44 -0
- package/dist/src/screenshotHarness.d.ts.map +1 -1
- package/dist/src/screenshotHarness.js +26 -25
- package/dist/src/spec/axis.d.ts +43 -32
- package/dist/src/spec/channel.d.ts +19 -13
- package/dist/src/spec/config.d.ts +264 -0
- package/dist/src/spec/data.d.ts +19 -0
- package/dist/src/spec/decoration.d.ts +51 -0
- package/dist/src/spec/exampleFiles.d.ts +12 -0
- package/dist/src/spec/exampleFiles.d.ts.map +1 -0
- package/dist/src/spec/exampleFiles.js +52 -0
- package/dist/src/spec/font.d.ts +1 -1
- package/dist/src/spec/mark.d.ts +97 -13
- package/dist/src/spec/parameter.d.ts +30 -10
- package/dist/src/spec/root.d.ts +14 -0
- package/dist/src/spec/scale.d.ts +31 -14
- package/dist/src/spec/title.d.ts +13 -2
- package/dist/src/spec/tooltip.d.ts +1 -1
- package/dist/src/spec/transform.d.ts +39 -4
- package/dist/src/spec/view.d.ts +67 -19
- package/dist/src/styles/genome-spy.css +55 -55
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +23 -22
- package/dist/src/testSetup.d.ts +2 -0
- package/dist/src/testSetup.d.ts.map +1 -0
- package/dist/src/testSetup.js +5 -0
- package/dist/src/tooltip/dataTooltipHandler.js +8 -2
- package/dist/src/tooltip/tooltipContext.d.ts.map +1 -1
- package/dist/src/tooltip/tooltipContext.js +3 -2
- package/dist/src/types/embedApi.d.ts +7 -0
- package/dist/src/types/encoder.d.ts +17 -15
- package/dist/src/types/scaleResolutionApi.d.ts +20 -0
- package/dist/src/types/viewContext.d.ts +23 -1
- package/dist/src/utils/expression.d.ts +18 -10
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +354 -19
- package/dist/src/utils/field.d.ts.map +1 -1
- package/dist/src/utils/field.js +0 -1
- package/dist/src/utils/inertia.d.ts.map +1 -1
- package/dist/src/utils/inertia.js +0 -1
- package/dist/src/utils/inputBinding.d.ts +1 -1
- package/dist/src/utils/interaction.d.ts +109 -0
- package/dist/src/utils/interaction.d.ts.map +1 -0
- package/dist/src/utils/interaction.js +200 -0
- package/dist/src/utils/interactionEvent.d.ts +21 -42
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +43 -66
- package/dist/src/utils/kWayMerge.js +1 -1
- package/dist/src/utils/mergeObjects.d.ts.map +1 -1
- package/dist/src/utils/mergeObjects.js +0 -2
- package/dist/src/utils/radixSort.d.ts.map +1 -1
- package/dist/src/utils/radixSort.js +0 -2
- package/dist/src/utils/throttle.d.ts.map +1 -1
- package/dist/src/utils/throttle.js +0 -2
- package/dist/src/utils/ui/tooltip.d.ts +1 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +1 -0
- package/dist/src/utils/url.js +1 -1
- package/dist/src/view/axisGridView.d.ts +1 -1
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +2 -47
- package/dist/src/view/axisView.d.ts +2 -3
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +251 -106
- package/dist/src/view/concatView.d.ts +2 -1
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +4 -2
- package/dist/src/view/containerMutationHelper.d.ts +3 -0
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +4 -1
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/facetView.js +3 -3
- package/dist/src/view/flowBuilder.d.ts +1 -1
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +13 -9
- package/dist/src/view/gridView/gridChild.d.ts +6 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +72 -43
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +255 -101
- package/dist/src/view/gridView/keyboardZoomController.d.ts +2 -2
- package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -1
- package/dist/src/view/gridView/keyboardZoomController.js +1 -1
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +4 -2
- package/dist/src/view/gridView/selectionRect.d.ts +4 -0
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +20 -1
- package/dist/src/view/gridView/separatorView.d.ts +1 -0
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
- package/dist/src/view/gridView/separatorView.js +9 -0
- package/dist/src/view/interactionRouting.d.ts +20 -0
- package/dist/src/view/interactionRouting.d.ts.map +1 -0
- package/dist/src/view/interactionRouting.js +53 -0
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +12 -9
- package/dist/src/view/layout/grid.js +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +0 -2
- package/dist/src/view/resolutionPlanner.d.ts +9 -0
- package/dist/src/view/resolutionPlanner.d.ts.map +1 -0
- package/dist/src/view/resolutionPlanner.js +302 -0
- package/dist/src/view/testUtils.d.ts +17 -3
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +62 -69
- package/dist/src/view/title.d.ts +8 -1
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +66 -76
- package/dist/src/view/unitView.d.ts +1 -1
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +72 -169
- package/dist/src/view/view.d.ts +76 -30
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +138 -48
- package/dist/src/view/viewFactory.d.ts +11 -3
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +37 -11
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +41 -5
- package/dist/src/view/zoom.d.ts +2 -2
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +21 -23
- package/package.json +18 -10
- package/dist/bundle/AbortablePromiseCache-Dj0vzLnp.js +0 -149
- package/dist/bundle/browser-0iNU5Wit.js +0 -138
- package/dist/bundle/index-BYsZN7b0.js +0 -1597
- package/dist/bundle/index-C3kClAEN.js +0 -1771
- package/dist/bundle/index-C7wOh6y1.js +0 -657
- package/dist/bundle/index-CRaQAuki.js +0 -326
- package/dist/bundle/index-D9v1PCj9.js +0 -507
- package/dist/bundle/index-GDOuv_D5.js +0 -266
- package/dist/bundle/index-Gt44EOIH.js +0 -628
- package/dist/bundle/inflate-GtwLkvSP.js +0 -1048
- package/dist/bundle/parquetRead-BnAGCa4_.js +0 -1663
- package/dist/bundle/unzip-Bac01w6X.js +0 -1492
- package/dist/src/config/scaleDefaults.d.ts +0 -8
- package/dist/src/config/scaleDefaults.d.ts.map +0 -1
- package/dist/src/config/scaleDefaults.js +0 -45
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
tickFormat,
|
|
9
9
|
tickCount,
|
|
10
10
|
} from "../../../scale/ticks.js";
|
|
11
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
11
12
|
import SingleAxisLazySource from "./singleAxisLazySource.js";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -43,24 +44,24 @@ export default class AxisTickSource extends SingleAxisLazySource {
|
|
|
43
44
|
// Force the ticks to be recalculated. This is needed because the async
|
|
44
45
|
// initialization process and non-deterministic order of events.
|
|
45
46
|
this.ticks = null;
|
|
46
|
-
this.onDomainChanged();
|
|
47
|
+
await this.onDomainChanged();
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
onDomainChanged() {
|
|
50
|
-
// Note, although this function is async, it is not awaited. Data are updated
|
|
51
|
-
// synchronously to ensure that the new ticks are available before the next frame is drawn.
|
|
52
|
-
|
|
50
|
+
async onDomainChanged() {
|
|
53
51
|
const scale = this.scaleResolution.getScale();
|
|
54
52
|
const axisLength = this.scaleResolution.getAxisLength();
|
|
55
53
|
const axisParams = this.params.axis;
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
|
-
* Make ticks
|
|
56
|
+
* Make ticks denser in small plots.
|
|
59
57
|
* TODO: Make configurable
|
|
60
58
|
*
|
|
61
|
-
* @
|
|
59
|
+
* @type {(length: number) => number}
|
|
62
60
|
*/
|
|
63
|
-
const tickSpacing =
|
|
61
|
+
const tickSpacing =
|
|
62
|
+
scale.type != "locus"
|
|
63
|
+
? (length) => 30 + 55 * smoothstep(100, 700, length)
|
|
64
|
+
: () => 85;
|
|
64
65
|
|
|
65
66
|
const requestedCount = isNumber(axisParams.tickCount)
|
|
66
67
|
? axisParams.tickCount
|
|
@@ -82,3 +83,13 @@ export default class AxisTickSource extends SingleAxisLazySource {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
89
|
+
* @returns {params is import("../../../spec/data.js").AxisTicksData}
|
|
90
|
+
*/
|
|
91
|
+
function isAxisTickSource(params) {
|
|
92
|
+
return params?.type == "axisTicks";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
registerBuiltInLazyDataSource(isAxisTickSource, AxisTickSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bamSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bamSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bamSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bamSource.js"],"names":[],"mappings":"AAIA;IAeI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,OAAO,QACvC,OAAO,uBAAuB,EAAE,OAAO,EAmDjD;IAhED;;;;;;;;OAQG;IACH,gBAFU,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAEH;IAkB1B,gDAAgC;IAQhC,iCA4BE;;CAuCT;qCA5GoC,+BAA+B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import addBaseUrl from "../../../utils/addBaseUrl.js";
|
|
2
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
2
3
|
import SingleAxisWindowedSource from "./singleAxisWindowedSource.js";
|
|
3
4
|
|
|
4
5
|
export default class BamSource extends SingleAxisWindowedSource {
|
|
@@ -108,3 +109,13 @@ export default class BamSource extends SingleAxisWindowedSource {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
115
|
+
* @returns {params is import("../../../spec/data.js").BamData}
|
|
116
|
+
*/
|
|
117
|
+
function isBamSource(params) {
|
|
118
|
+
return params?.type == "bam";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
registerBuiltInLazyDataSource(isBamSource, BamSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigBedSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigBedSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bigBedSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigBedSource.js"],"names":[],"mappings":"AAQA;IAUI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,UAAU,QAC1C,OAAO,uBAAuB,EAAE,OAAO,EAoCjD;IA/CD,0CAA0C;IAC1C,QADW,OAAO,WAAW,EAAE,OAAO,CAC/B;IAEP,yCAAyC;IACzC,KADW,OAAO,WAAW,EAAE,MAAM,CACjC;IAEJ,4GAA4G;IAC5G,WADW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC9F;IAmBN,mDAYC;;CAwFR;qCAjIoC,+BAA+B"}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
withoutExprRef,
|
|
4
4
|
} from "../../../paramRuntime/paramUtils.js";
|
|
5
5
|
import addBaseUrl from "../../../utils/addBaseUrl.js";
|
|
6
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
6
7
|
import SingleAxisWindowedSource from "./singleAxisWindowedSource.js";
|
|
7
8
|
|
|
8
9
|
export default class BigBedSource extends SingleAxisWindowedSource {
|
|
@@ -87,7 +88,7 @@ export default class BigBedSource extends SingleAxisWindowedSource {
|
|
|
87
88
|
const fastParser = makeFastParser(this.parser);
|
|
88
89
|
this.parseLine = (chrom, f) =>
|
|
89
90
|
fastParser(chrom, f.start, f.end, f.rest);
|
|
90
|
-
} catch
|
|
91
|
+
} catch {
|
|
91
92
|
this.parseLine = (chrom, f) =>
|
|
92
93
|
this.parser.parseLine(
|
|
93
94
|
`${chrom}\t${f.start}\t${f.end}\t${f.rest}`
|
|
@@ -299,6 +300,16 @@ function makeFastParser(bed) {
|
|
|
299
300
|
return parseLine;
|
|
300
301
|
}
|
|
301
302
|
|
|
303
|
+
/**
|
|
304
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
305
|
+
* @returns {params is import("../../../spec/data.js").BigBedData}
|
|
306
|
+
*/
|
|
307
|
+
function isBigBedSource(params) {
|
|
308
|
+
return params?.type == "bigbed";
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
registerBuiltInLazyDataSource(isBigBedSource, BigBedSource);
|
|
312
|
+
|
|
302
313
|
/**
|
|
303
314
|
* @param {T[]} arr
|
|
304
315
|
* @param {number} size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigWigSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigWigSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bigWigSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/bigWigSource.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;IAOI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,UAAU,QAC1C,OAAO,uBAAuB,EAAE,OAAO,EAoCjD;IArBG,mDAYC;IA+DL;;;;OAIG;IACH,wBAFW,MAAM,EAAE,iBAqBlB;IAED;;;OAGG;IAEH,uBAJW,MAAM,EAAE,kBACR,MAAM,iBA2BhB;;CACJ;qCAhKoC,+BAA+B"}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
withoutExprRef,
|
|
4
4
|
} from "../../../paramRuntime/paramUtils.js";
|
|
5
5
|
import addBaseUrl from "../../../utils/addBaseUrl.js";
|
|
6
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
6
7
|
import SingleAxisWindowedSource from "./singleAxisWindowedSource.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -165,6 +166,16 @@ export default class BigWigSource extends SingleAxisWindowedSource {
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
171
|
+
* @returns {params is import("../../../spec/data.js").BigWigData}
|
|
172
|
+
*/
|
|
173
|
+
function isBigWigSource(params) {
|
|
174
|
+
return params?.type == "bigwig";
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
registerBuiltInLazyDataSource(isBigWigSource, BigWigSource);
|
|
178
|
+
|
|
168
179
|
/**
|
|
169
180
|
* @param {number[]} domain
|
|
170
181
|
* @param {number} widthInPixels view width in pixels
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gff3Source.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/gff3Source.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gff3Source.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/gff3Source.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;;;CAuBC;wBA5BuB,kBAAkB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
1
2
|
import TabixSource from "./tabixSource.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -22,8 +23,18 @@ export default class Gff3Source extends TabixSource {
|
|
|
22
23
|
* @param {string[]} lines
|
|
23
24
|
*/
|
|
24
25
|
_parseFeatures(lines) {
|
|
25
|
-
const features = this.#gff?.
|
|
26
|
+
const features = this.#gff?.parseStringSync(lines.join("\n"));
|
|
26
27
|
|
|
27
28
|
return features;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
34
|
+
* @returns {params is import("../../../spec/data.js").Gff3Data}
|
|
35
|
+
*/
|
|
36
|
+
function isGff3Source(params) {
|
|
37
|
+
return params?.type == "gff3";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
registerBuiltInLazyDataSource(isGff3Source, Gff3Source);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexedFastaSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/indexedFastaSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"indexedFastaSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/indexedFastaSource.js"],"names":[],"mappings":"AAIA;IACI;;;OAGG;IACH,oBAHW,OAAO,uBAAuB,EAAE,gBAAgB,QAChD,OAAO,uBAAuB,EAAE,OAAO,EAwCjD;IA1BG,yDAAgC;IAQhC,iCAiBE;IATM,iDAKE;CAwCjB;qCAhFoC,+BAA+B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import addBaseUrl from "../../../utils/addBaseUrl.js";
|
|
2
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
2
3
|
import SingleAxisWindowedSource from "./singleAxisWindowedSource.js";
|
|
3
4
|
|
|
4
5
|
export default class IndexedFastaSource extends SingleAxisWindowedSource {
|
|
@@ -80,3 +81,13 @@ export default class IndexedFastaSource extends SingleAxisWindowedSource {
|
|
|
80
81
|
this.publishData([features.filter((f) => f !== undefined)]);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
87
|
+
* @returns {params is import("../../../spec/data.js").IndexedFastaData}
|
|
88
|
+
*/
|
|
89
|
+
function isIndexedFastaSource(params) {
|
|
90
|
+
return params?.type == "indexedFasta";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
registerBuiltInLazyDataSource(isIndexedFastaSource, IndexedFastaSource);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers a lazy data source for a custom type.
|
|
3
|
+
*
|
|
4
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
5
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
6
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
7
|
+
* @returns {() => void}
|
|
8
|
+
*/
|
|
9
|
+
export function registerLazyDataSource<P extends import("../../../spec/data.js").LazyDataParams>(guard: LazySourceEntry<P>["guard"], Source: LazySourceEntry<P>["Source"]): () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Registers a built-in lazy data source.
|
|
12
|
+
*
|
|
13
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
14
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
15
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
16
|
+
*/
|
|
17
|
+
export function registerBuiltInLazyDataSource<P extends import("../../../spec/data.js").LazyDataParams>(guard: LazySourceEntry<P>["guard"], Source: LazySourceEntry<P>["Source"]): void;
|
|
18
|
+
/**
|
|
19
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
20
|
+
* @param {import("../../../view/view.js").default} view
|
|
21
|
+
*/
|
|
22
|
+
export function createLazyDataSource(params: import("../../../spec/data.js").LazyDataParams, view: import("../../../view/view.js").default): import("../dataSource.js").default;
|
|
23
|
+
export type LazySourceEntry<P extends import("../../../spec/data.js").LazyDataParams> = {
|
|
24
|
+
guard: (params: import("../../../spec/data.js").LazyDataParams) => params is P;
|
|
25
|
+
Source: new (params: any, view: import("../../../view/view.js").default) => import("../dataSource.js").default;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=lazyDataSourceRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazyDataSourceRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/lazyDataSourceRegistry.js"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AACH,uCAL8D,CAAC,SAAlD,OAAQ,uBAAuB,EAAE,cAAe,SAClD,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAC3B,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAC1B,MAAM,IAAI,CAYtB;AAED;;;;;;GAMG;AACH,8CAJ8D,CAAC,SAAlD,OAAQ,uBAAuB,EAAE,cAAe,SAClD,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAC3B,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAItC;AAED;;;GAGG;AACH,6CAHW,OAAO,uBAAuB,EAAE,cAAc,QAC9C,OAAO,uBAAuB,EAAE,OAAO,sCAiBjD;4BA/D6D,CAAC,SAAlD,OAAQ,uBAAuB,EAAE,cAAe,IAChD;IACR,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,uBAAuB,EAAE,cAAc,KAAK,MAAM,IAAI,CAAC,CAAC;IAC/E,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,uBAAuB,EAAE,OAAO,KAAK,OAAO,kBAAkB,EAAE,OAAO,CAAA;CAC/G"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
3
|
+
* @typedef {{
|
|
4
|
+
* guard: (params: import("../../../spec/data.js").LazyDataParams) => params is P,
|
|
5
|
+
* Source: new (params: any, view: import("../../../view/view.js").default) => import("../dataSource.js").default
|
|
6
|
+
* }} LazySourceEntry
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** @type {LazySourceEntry<any>[]} */
|
|
10
|
+
const customLazySources = [];
|
|
11
|
+
|
|
12
|
+
/** @type {LazySourceEntry<any>[]} */
|
|
13
|
+
const builtinLazySources = [];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Registers a lazy data source for a custom type.
|
|
17
|
+
*
|
|
18
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
19
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
20
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
21
|
+
* @returns {() => void}
|
|
22
|
+
*/
|
|
23
|
+
export function registerLazyDataSource(guard, Source) {
|
|
24
|
+
/** @type {LazySourceEntry<any>} */
|
|
25
|
+
const entry = { guard, Source };
|
|
26
|
+
customLazySources.push(entry);
|
|
27
|
+
return () => {
|
|
28
|
+
const index = customLazySources.indexOf(entry);
|
|
29
|
+
if (index >= 0) {
|
|
30
|
+
customLazySources.splice(index, 1);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Registers a built-in lazy data source.
|
|
37
|
+
*
|
|
38
|
+
* @template {import("../../../spec/data.js").LazyDataParams} P
|
|
39
|
+
* @param {LazySourceEntry<P>["guard"]} guard
|
|
40
|
+
* @param {LazySourceEntry<P>["Source"]} Source
|
|
41
|
+
*/
|
|
42
|
+
export function registerBuiltInLazyDataSource(guard, Source) {
|
|
43
|
+
builtinLazySources.push({ guard, Source });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
48
|
+
* @param {import("../../../view/view.js").default} view
|
|
49
|
+
*/
|
|
50
|
+
export function createLazyDataSource(params, view) {
|
|
51
|
+
for (const entry of customLazySources) {
|
|
52
|
+
if (entry.guard(params)) {
|
|
53
|
+
return new entry.Source(/** @type {any} */ (params), view);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
for (const entry of builtinLazySources) {
|
|
57
|
+
if (entry.guard(params)) {
|
|
58
|
+
return new entry.Source(/** @type {any} */ (params), view);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
throw new Error(
|
|
63
|
+
"Cannot figure out the data source type: " + JSON.stringify(params)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerBuiltInLazySources.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/registerBuiltInLazySources.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleAxisLazySource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/singleAxisLazySource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singleAxisLazySource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/singleAxisLazySource.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;GAEG;AAEH;;;;;GAKG;AACH,wEAFgB,sBAAsB;IAelC;;;OAGG;IACH,kBAHW,OAAO,uBAAuB,EAAE,OAAO,WACvC,OAAO,0BAA0B,EAAE,wBAAwB,EA+CrE;IA7DD;;;OAGG;IACH,4CAAuC;IAEvC;;;OAGG;IACH,6BAHU,MAAM,EAAE,GAAG,SAAS,CAGZ;IAmBd,2EAA2E;IAC3E,SADW,OAAO,0BAA0B,EAAE,wBAAwB,CAChD;IAEtB,sEAA4D;IA+BhE;;;;OAIG;IACH,oEASC;IAED;;;;;;OAMG;IACH,wBAJW,MAAM,EAAE,iBACR,OAAO,yBAAyB,EAAE,gBAAgB,EAAE,QAK9D;IAED;;;;;OAKG;IACH,gCAGC;IAQD;;;;;;;;OAQG;IACH,8BAHW,OAAO,mBAAmB,EAAE,KAAK,EAAE,EAAE,QAe/C;IAED;;;OAGG;IACH,8BAHW,oBAAoB,GAClB,OAAO,CAenB;CACJ;mCAlKY,OAAO,CAAC,MAAM,CAAC,OAAO,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,EAAE,CAAC,CAAC;qCAItF;IAAC,oBAAoB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAA;CAAC;uBAPxD,kBAAkB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import UnitView from "../../../view/unitView.js";
|
|
2
1
|
import DataSource from "../dataSource.js";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -53,7 +52,7 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
53
52
|
const sentences = [
|
|
54
53
|
`The lazy data source cannot find a resolved scale for channel "${channel}".`,
|
|
55
54
|
];
|
|
56
|
-
if (!(this.view
|
|
55
|
+
if (!isUnitViewLike(this.view)) {
|
|
57
56
|
sentences.push(
|
|
58
57
|
`Make sure the view has a "shared" scale resolution as it is not a unit view.`
|
|
59
58
|
);
|
|
@@ -165,3 +164,13 @@ export default class SingleAxisLazySource extends DataSource {
|
|
|
165
164
|
return min >= loadedMin && max <= loadedMax;
|
|
166
165
|
}
|
|
167
166
|
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Unit views expose `getMarkType()`, while container and helper views do not.
|
|
170
|
+
*
|
|
171
|
+
* @param {import("../../../view/view.js").default} view
|
|
172
|
+
* @returns {view is import("../../../view/unitView.js").default}
|
|
173
|
+
*/
|
|
174
|
+
function isUnitViewLike(view) {
|
|
175
|
+
return typeof (/** @type {any} */ (view).getMarkType) == "function";
|
|
176
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcfSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/vcfSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vcfSource.d.ts","sourceRoot":"","sources":["../../../../../src/data/sources/lazy/vcfSource.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;;;CAgCC;wBAtCuB,kBAAkB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import TabixSource from "./tabixSource.js";
|
|
2
|
+
import { registerBuiltInLazyDataSource } from "./lazyDataSourceRegistry.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @extends {TabixSource<import("./vcfTypes.js").ParsedVariant>}
|
|
@@ -36,3 +37,13 @@ export default class VcfSource extends TabixSource {
|
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @param {import("../../../spec/data.js").LazyDataParams} params
|
|
43
|
+
* @returns {params is import("../../../spec/data.js").VcfData}
|
|
44
|
+
*/
|
|
45
|
+
function isVcfSource(params) {
|
|
46
|
+
return params?.type == "vcf";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
registerBuiltInLazyDataSource(isVcfSource, VcfSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"urlSource.d.ts","sourceRoot":"","sources":["../../../../src/data/sources/urlSource.js"],"names":[],"mappings":"AAuJA;;;GAGG;AACH,gCAHW,OAAO,CAAC,OAAO,oBAAoB,EAAE,IAAI,CAAC,GACxC,IAAI,IAAI,OAAO,oBAAoB,EAAE,OAAO,CAIxD;AA5ID;;;GAGG;AACH;IACI;;;OAGG;IACH,oBAHW,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,oBAAoB,EAAE,OAAO,EAc9C;IATG,6CAMC;IAED,gBAAiC;;CAgHxC;uBA9IsB,iBAAiB"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { read } from "vega-loader";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
getFormat,
|
|
4
|
+
hasGzipExtension,
|
|
5
|
+
responseType,
|
|
6
|
+
toVegaLoaderFormat,
|
|
7
|
+
} from "./dataUtils.js";
|
|
3
8
|
import DataSource from "./dataSource.js";
|
|
4
9
|
import {
|
|
5
10
|
activateExprRefProps,
|
|
@@ -63,7 +68,7 @@ export default class UrlSource extends DataSource {
|
|
|
63
68
|
);
|
|
64
69
|
|
|
65
70
|
const files = /** @type {string[] | {url: string}[]} */ (
|
|
66
|
-
read(content, format)
|
|
71
|
+
read(content, toVegaLoaderFormat(format))
|
|
67
72
|
)
|
|
68
73
|
.map((u) => (typeof u === "string" ? u : u.url))
|
|
69
74
|
.map((u) => concatUrl(listUrl, u));
|
|
@@ -101,7 +106,8 @@ export default class UrlSource extends DataSource {
|
|
|
101
106
|
return await readResponseBody(result, url, type);
|
|
102
107
|
} catch (e) {
|
|
103
108
|
throw new Error(
|
|
104
|
-
`Could not load data: ${url}. Reason: ${e.message}
|
|
109
|
+
`Could not load data: ${url}. Reason: ${e.message}`,
|
|
110
|
+
{ cause: e }
|
|
105
111
|
);
|
|
106
112
|
}
|
|
107
113
|
};
|
|
@@ -113,7 +119,7 @@ export default class UrlSource extends DataSource {
|
|
|
113
119
|
const readAndParse = async (content, url) => {
|
|
114
120
|
try {
|
|
115
121
|
/** @type {any[] | Promise<any[]>} */
|
|
116
|
-
const dataOrPromise = read(content, format);
|
|
122
|
+
const dataOrPromise = read(content, toVegaLoaderFormat(format));
|
|
117
123
|
const data =
|
|
118
124
|
dataOrPromise instanceof Promise
|
|
119
125
|
? await dataOrPromise
|
|
@@ -124,7 +130,9 @@ export default class UrlSource extends DataSource {
|
|
|
124
130
|
}
|
|
125
131
|
} catch (e) {
|
|
126
132
|
console.warn(e);
|
|
127
|
-
throw new Error(`Cannot parse: ${url}: ${e.message}
|
|
133
|
+
throw new Error(`Cannot parse: ${url}: ${e.message}`, {
|
|
134
|
+
cause: e,
|
|
135
|
+
});
|
|
128
136
|
}
|
|
129
137
|
};
|
|
130
138
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregate.js"],"names":[],"mappings":"AAOA;IAKI;;;;OAIG;IACH,oBAJW,OAAO,yBAAyB,EAAE,eAAe,EA6C3D;IAvCG,0DAAoB;IAEpB,oBAAoB;IACpB,QADW,GAAG,EAAE,CACA;IAEhB;;OAEG;IACH,KAFU,CAAC,CAAC,GAAG,EAAE,gCAAO,KAAK,MAAM,CAAC,EAAE,CAEzB;IACb;;OAEG;IACH,IAFU,MAAM,EAAE,CAEN;
|
|
1
|
+
{"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregate.js"],"names":[],"mappings":"AAOA;IAKI;;;;OAIG;IACH,oBAJW,OAAO,yBAAyB,EAAE,eAAe,EA6C3D;IAvCG,0DAAoB;IAEpB,oBAAoB;IACpB,QADW,GAAG,EAAE,CACA;IAEhB;;OAEG;IACH,KAFU,CAAC,CAAC,GAAG,EAAE,gCAAO,KAAK,MAAM,CAAC,EAAE,CAEzB;IACb;;OAEG;IACH,IAFU,MAAM,EAAE,CAEN;;CAuGnB;sBAlIqB,gBAAgB"}
|
|
@@ -64,16 +64,10 @@ export default class AggregateTransform extends Transform {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
* @param {import("../flowNode.js").Datum} datum
|
|
67
|
+
* Propagate the current buffer as one aggregated batch.
|
|
69
68
|
*/
|
|
70
|
-
|
|
71
|
-
this.buffer.push(datum);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
complete() {
|
|
69
|
+
#flushBuffer() {
|
|
75
70
|
const params = this.params;
|
|
76
|
-
|
|
77
71
|
const groupby = params?.groupby;
|
|
78
72
|
|
|
79
73
|
if (groupby?.length > 0) {
|
|
@@ -107,6 +101,34 @@ export default class AggregateTransform extends Transform {
|
|
|
107
101
|
|
|
108
102
|
this._propagate(datum);
|
|
109
103
|
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @param {import("../flowNode.js").Datum} datum
|
|
109
|
+
*/
|
|
110
|
+
handle(datum) {
|
|
111
|
+
this.buffer.push(datum);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Flush the current batch before downstream nodes switch to a new facet.
|
|
116
|
+
*
|
|
117
|
+
* @param {import("../../types/flowBatch.js").FlowBatch} flowBatch
|
|
118
|
+
*/
|
|
119
|
+
beginBatch(flowBatch) {
|
|
120
|
+
if (this.buffer.length > 0) {
|
|
121
|
+
this.#flushBuffer();
|
|
122
|
+
this.buffer = [];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
super.beginBatch(flowBatch);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
complete() {
|
|
129
|
+
if (this.buffer.length > 0) {
|
|
130
|
+
this.#flushBuffer();
|
|
131
|
+
}
|
|
110
132
|
|
|
111
133
|
super.complete();
|
|
112
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregateOps.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregateOps.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"aggregateOps.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/aggregateOps.js"],"names":[],"mappings":";AAWA;;GAEG;AACH,6BAFU,MAAM,CAAC,OAAO,yBAAyB,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,KAAK,MAAM,CAAC,CAaxH"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
count,
|
|
3
|
+
max,
|
|
4
|
+
mean,
|
|
5
|
+
median,
|
|
6
|
+
min,
|
|
7
|
+
quantile,
|
|
8
|
+
sum,
|
|
9
|
+
variance,
|
|
10
|
+
} from "d3-array";
|
|
2
11
|
|
|
3
12
|
/**
|
|
4
13
|
* @type {Record<import("../../spec/transform.js").AggregateOp, (arr: any[], accessor?: (datum: any) => number) => number>}
|
|
@@ -10,7 +19,9 @@ const AGGREGATE_OPS = {
|
|
|
10
19
|
min,
|
|
11
20
|
max,
|
|
12
21
|
mean,
|
|
22
|
+
q1: (arr, accessor) => quantile(arr, 0.25, accessor),
|
|
13
23
|
median,
|
|
24
|
+
q3: (arr, accessor) => quantile(arr, 0.75, accessor),
|
|
14
25
|
variance,
|
|
15
26
|
};
|
|
16
27
|
|
|
@@ -147,7 +147,7 @@ export default class CoverageTransform extends Transform {
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
const flushQueue = () => {
|
|
150
|
-
let edge
|
|
150
|
+
let edge;
|
|
151
151
|
while ((edge = ends.peekValue()) !== undefined) {
|
|
152
152
|
pushSegment(prevEdge, edge, coverage);
|
|
153
153
|
prevEdge = edge;
|
|
@@ -166,7 +166,7 @@ export default class CoverageTransform extends Transform {
|
|
|
166
166
|
this.handle = (datum) => {
|
|
167
167
|
const start = startAccessor(datum);
|
|
168
168
|
|
|
169
|
-
let edge
|
|
169
|
+
let edge;
|
|
170
170
|
while ((edge = ends.peekValue()) !== undefined && edge < start) {
|
|
171
171
|
pushSegment(prevEdge, edge, coverage);
|
|
172
172
|
prevEdge = edge;
|
|
@@ -5,6 +5,12 @@ export default class FilterScoredLabelsTransform extends Transform {
|
|
|
5
5
|
* @param {import("../../view/view.js").default} view
|
|
6
6
|
*/
|
|
7
7
|
constructor(params: import("../../spec/transform.js").FilterScoredLabelsParams, view: import("../../view/view.js").default);
|
|
8
|
+
/**
|
|
9
|
+
* The transform emits only labels that fit in the current visible interval,
|
|
10
|
+
* so downstream x/y values derived from its output must not feed back into
|
|
11
|
+
* shared-domain resolution.
|
|
12
|
+
*/
|
|
13
|
+
get domainSensitiveScaleChannels(): ("x" | "y")[];
|
|
8
14
|
params: import("../../spec/transform.js").FilterScoredLabelsParams;
|
|
9
15
|
/** @type {any[]} */
|
|
10
16
|
_data: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterScoredLabels.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/filterScoredLabels.js"],"names":[],"mappings":"AAOA;
|
|
1
|
+
{"version":3,"file":"filterScoredLabels.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/filterScoredLabels.js"],"names":[],"mappings":"AAOA;IAcI;;;;OAIG;IACH,oBAHW,OAAO,yBAAyB,EAAE,wBAAwB,QAC1D,OAAO,oBAAoB,EAAE,OAAO,EAkD9C;IA9DD;;;;OAIG;IACH,kDAEC;IAUG,mEAAoB;IAEpB,oBAAoB;IACpB,OADW,GAAG,EAAE,CACD;IAEf,mBAAoC;IAMpC,sDAA8C;IAC9C,oDAAgE;IAChE,wDAAuD;IACvD,sDAAmD;IACnD,mDAA6C;IAC7C,mDAA6C;IAC7C,gCAAgC;IAChC,cADW,CAAS,IAAG,EAAH,GAAG,KAAE,GAAG,CAGd;IACd,gBAAuC;IAEvC,uCAAuC;IACvC,iBADW,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CACH;IAEhC,8DAAuD;IAIvD,qBAAuE;IA8B3E,4BAsEC;IAKG,sBAAuB;CAU9B;sBAzKqB,gBAAgB;2BAFX,+BAA+B"}
|
|
@@ -10,6 +10,15 @@ export default class FilterScoredLabelsTransform extends Transform {
|
|
|
10
10
|
return BEHAVIOR_COLLECTS;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* The transform emits only labels that fit in the current visible interval,
|
|
15
|
+
* so downstream x/y values derived from its output must not feed back into
|
|
16
|
+
* shared-domain resolution.
|
|
17
|
+
*/
|
|
18
|
+
get domainSensitiveScaleChannels() {
|
|
19
|
+
return [this.channel];
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
/**
|
|
14
23
|
*
|
|
15
24
|
* @param {import("../../spec/transform.js").FilterScoredLabelsParams} params
|
|
@@ -14,6 +14,7 @@ export default class MeasureTextTransform extends Transform {
|
|
|
14
14
|
* @param {any} datum
|
|
15
15
|
*/
|
|
16
16
|
handle: (datum: any) => void;
|
|
17
|
+
font: import("../../fonts/bmFontManager.js").FontEntry;
|
|
17
18
|
}
|
|
18
19
|
import Transform from "./transform.js";
|
|
19
20
|
//# sourceMappingURL=measureText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/measureText.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["../../../../src/data/transforms/measureText.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IAKI;;;;OAIG;IACH,oBAHW,OAAO,yBAAyB,EAAE,iBAAiB,wBACnD,OAAO,gBAAgB,EAAE,oBAAoB,EA4CvD;IAvCG,4DAAoB;IA0BpB;;;OAGG;IACH,gBAFW,GAAG,UAUb;IAOD,uDAMkC;CAEzC;sBAxEqB,gBAAgB"}
|