@genome-spy/core 0.72.0 → 0.74.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/LICENSE +1 -1
- 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 +21078 -24556
- package/dist/bundle/index.js +379 -383
- package/dist/bundle/parquetRead-DG_-F5j5.js +1609 -0
- package/dist/schema.json +13349 -7082
- 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 +8 -0
- package/dist/src/data/formats/bed.d.ts.map +1 -0
- package/dist/src/data/formats/bed.js +58 -0
- package/dist/src/data/formats/bedpe.d.ts +8 -0
- package/dist/src/data/formats/bedpe.d.ts.map +1 -0
- package/dist/src/data/formats/bedpe.js +164 -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 +16 -0
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +53 -3
- 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 +4 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +138 -16
- 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/assemblyPreflight.d.ts +31 -0
- package/dist/src/genome/assemblyPreflight.d.ts.map +1 -0
- package/dist/src/genome/assemblyPreflight.js +99 -0
- package/dist/src/genome/genome.d.ts +10 -2
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +20 -2
- package/dist/src/genome/genomeStore.d.ts +34 -3
- package/dist/src/genome/genomeStore.d.ts.map +1 -1
- package/dist/src/genome/genomeStore.js +409 -18
- package/dist/src/genome/rootGenomeConfig.d.ts +26 -0
- package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -0
- package/dist/src/genome/rootGenomeConfig.js +98 -0
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +26 -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 +10 -1
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +448 -40
- 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/renderCoordinator.js +1 -1
- 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 -114
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +7 -614
- 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/canvasSizeHelper.d.ts +74 -0
- package/dist/src/gl/canvasSizeHelper.d.ts.map +1 -0
- package/dist/src/gl/canvasSizeHelper.js +203 -0
- 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.map +1 -1
- package/dist/src/gl/dataToVertices.js +13 -8
- package/dist/src/gl/glslScaleGenerator.d.ts +2 -2
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +5 -7
- package/dist/src/gl/webGLHelper.d.ts +25 -11
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +59 -33
- package/dist/src/index.d.ts +3 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -111
- 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 +5 -26
- 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 +67 -21
- 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/viewParamRuntime.d.ts +19 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +35 -0
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +13 -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 +58 -7
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +395 -40
- 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 +2 -1
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +10 -11
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +59 -18
- package/dist/src/scales/scalePropsResolver.d.ts +3 -1
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +83 -6
- package/dist/src/scales/scaleResolution.d.ts +39 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +504 -82
- package/dist/src/scales/scaleResolutionTestUtils.d.ts +21 -0
- package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -0
- package/dist/src/scales/scaleResolutionTestUtils.js +37 -0
- 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 +52 -0
- package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/selectionDomainUtils.js +194 -0
- package/dist/src/scales/zoomDomainUtils.d.ts +18 -0
- package/dist/src/scales/zoomDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/zoomDomainUtils.js +69 -0
- package/dist/src/screenshotHarness.d.ts +16 -0
- package/dist/src/screenshotHarness.d.ts.map +1 -0
- package/dist/src/screenshotHarness.js +241 -0
- package/dist/src/singlePageApp.js +1 -1
- package/dist/src/spec/axis.d.ts +41 -30
- package/dist/src/spec/channel.d.ts +15 -9
- package/dist/src/spec/config.d.ts +264 -0
- package/dist/src/spec/data.d.ts +30 -3
- 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/genome.d.ts +22 -2
- package/dist/src/spec/mark.d.ts +97 -13
- package/dist/src/spec/parameter.d.ts +62 -5
- package/dist/src/spec/root.d.ts +34 -1
- package/dist/src/spec/scale.d.ts +46 -5
- 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 +63 -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 +31 -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 +66 -11
- 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 +26 -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 +2 -2
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +63 -8
- 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/inferSpecBaseUrl.d.ts +14 -0
- package/dist/src/utils/inferSpecBaseUrl.d.ts.map +1 -0
- package/dist/src/utils/inferSpecBaseUrl.js +73 -0
- 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 +62 -33
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +86 -48
- 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 +12 -1
- package/dist/src/view/dataReadiness.d.ts +2 -2
- package/dist/src/view/dataReadiness.d.ts.map +1 -1
- package/dist/src/view/dataReadiness.js +63 -58
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/facetView.js +4 -4
- package/dist/src/view/flowBuilder.js +2 -2
- package/dist/src/view/gridView/gridChild.d.ts +13 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +247 -49
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +296 -99
- 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/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 +67 -17
- 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 +136 -47
- 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 +15 -3
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +375 -80
- package/package.json +20 -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
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
buildHashTableSet,
|
|
32
32
|
computeHashTextureDimensions,
|
|
33
33
|
} from "./hashTable.js";
|
|
34
|
+
import CanvasSizeHelper from "./canvasSizeHelper.js";
|
|
34
35
|
|
|
35
36
|
export default class WebGLHelper {
|
|
36
37
|
/**
|
|
@@ -42,14 +43,23 @@ export default class WebGLHelper {
|
|
|
42
43
|
* @param {WebGLContextAttributes} [webglContextAttributes]
|
|
43
44
|
*/
|
|
44
45
|
constructor(container, sizeSource, webglContextAttributes = {}) {
|
|
45
|
-
|
|
46
|
-
this._sizeSource =
|
|
46
|
+
const resolvedSizeSource =
|
|
47
47
|
sizeSource ??
|
|
48
48
|
(() => ({
|
|
49
49
|
width: undefined,
|
|
50
50
|
height: undefined,
|
|
51
51
|
}));
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* @type {CanvasSizeHelper}
|
|
55
|
+
*/
|
|
56
|
+
this._canvasSizeHelper = undefined;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @type {{ logicalWidth: number, logicalHeight: number, physicalWidth: number, physicalHeight: number } | undefined}
|
|
60
|
+
*/
|
|
61
|
+
this._appliedCanvasSize = undefined;
|
|
62
|
+
|
|
53
63
|
/** @type {Map<string, WebGLShader>} */
|
|
54
64
|
this._shaderCache = new Map();
|
|
55
65
|
|
|
@@ -124,11 +134,18 @@ export default class WebGLHelper {
|
|
|
124
134
|
);
|
|
125
135
|
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
126
136
|
|
|
137
|
+
this._canvasSizeHelper = new CanvasSizeHelper(
|
|
138
|
+
container,
|
|
139
|
+
canvas,
|
|
140
|
+
resolvedSizeSource,
|
|
141
|
+
() => this.adjustGl()
|
|
142
|
+
);
|
|
143
|
+
|
|
127
144
|
this.adjustGl();
|
|
128
145
|
}
|
|
129
146
|
|
|
130
147
|
invalidateSize() {
|
|
131
|
-
this.
|
|
148
|
+
this._canvasSizeHelper.invalidate();
|
|
132
149
|
this.adjustGl();
|
|
133
150
|
}
|
|
134
151
|
|
|
@@ -167,10 +184,21 @@ export default class WebGLHelper {
|
|
|
167
184
|
|
|
168
185
|
adjustGl() {
|
|
169
186
|
const logicalSize = this.getLogicalCanvasSize();
|
|
187
|
+
const physicalSize = this.getPhysicalCanvasSize(logicalSize);
|
|
188
|
+
|
|
189
|
+
if (
|
|
190
|
+
this._appliedCanvasSize &&
|
|
191
|
+
this._appliedCanvasSize.logicalWidth == logicalSize.width &&
|
|
192
|
+
this._appliedCanvasSize.logicalHeight == logicalSize.height &&
|
|
193
|
+
this._appliedCanvasSize.physicalWidth == physicalSize.width &&
|
|
194
|
+
this._appliedCanvasSize.physicalHeight == physicalSize.height
|
|
195
|
+
) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
170
199
|
this.canvas.style.width = `${logicalSize.width}px`;
|
|
171
200
|
this.canvas.style.height = `${logicalSize.height}px`;
|
|
172
201
|
|
|
173
|
-
const physicalSize = this.getPhysicalCanvasSize(logicalSize);
|
|
174
202
|
this.canvas.width = physicalSize.width;
|
|
175
203
|
this.canvas.height = physicalSize.height;
|
|
176
204
|
|
|
@@ -179,9 +207,17 @@ export default class WebGLHelper {
|
|
|
179
207
|
this._pickingBufferInfo,
|
|
180
208
|
this._pickingAttachmentOptions
|
|
181
209
|
);
|
|
210
|
+
|
|
211
|
+
this._appliedCanvasSize = {
|
|
212
|
+
logicalWidth: logicalSize.width,
|
|
213
|
+
logicalHeight: logicalSize.height,
|
|
214
|
+
physicalWidth: physicalSize.width,
|
|
215
|
+
physicalHeight: physicalSize.height,
|
|
216
|
+
};
|
|
182
217
|
}
|
|
183
218
|
|
|
184
219
|
finalize() {
|
|
220
|
+
this._canvasSizeHelper.finalize();
|
|
185
221
|
this.canvas.remove();
|
|
186
222
|
}
|
|
187
223
|
|
|
@@ -191,12 +227,16 @@ export default class WebGLHelper {
|
|
|
191
227
|
* @param {{ width: number, height: number }} [logicalSize]
|
|
192
228
|
*/
|
|
193
229
|
getPhysicalCanvasSize(logicalSize) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
230
|
+
return this._canvasSizeHelper.getPhysicalCanvasSize(logicalSize);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Returns the ratio between true display pixels and logical pixels.
|
|
235
|
+
*
|
|
236
|
+
* @param {{ width: number, height: number }} [logicalSize]
|
|
237
|
+
*/
|
|
238
|
+
getDevicePixelRatio(logicalSize) {
|
|
239
|
+
return this._canvasSizeHelper.getDevicePixelRatio(logicalSize);
|
|
200
240
|
}
|
|
201
241
|
|
|
202
242
|
/**
|
|
@@ -204,28 +244,7 @@ export default class WebGLHelper {
|
|
|
204
244
|
* without devicePixelRatio correction.
|
|
205
245
|
*/
|
|
206
246
|
getLogicalCanvasSize() {
|
|
207
|
-
|
|
208
|
-
return this._logicalCanvasSize;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// TODO: The size should never be smaller than the minimum content size!
|
|
212
|
-
const contentSize = this._sizeSource();
|
|
213
|
-
|
|
214
|
-
const cs = window.getComputedStyle(this._container, null);
|
|
215
|
-
const width =
|
|
216
|
-
contentSize.width ??
|
|
217
|
-
this._container.clientWidth -
|
|
218
|
-
parseFloat(cs.paddingLeft) -
|
|
219
|
-
parseFloat(cs.paddingRight);
|
|
220
|
-
|
|
221
|
-
const height =
|
|
222
|
-
contentSize.height ??
|
|
223
|
-
this._container.clientHeight -
|
|
224
|
-
parseFloat(cs.paddingTop) -
|
|
225
|
-
parseFloat(cs.paddingBottom);
|
|
226
|
-
|
|
227
|
-
this._logicalCanvasSize = { width, height };
|
|
228
|
-
return this._logicalCanvasSize;
|
|
247
|
+
return this._canvasSizeHelper.getLogicalCanvasSize();
|
|
229
248
|
}
|
|
230
249
|
|
|
231
250
|
/**
|
|
@@ -367,8 +386,11 @@ export default class WebGLHelper {
|
|
|
367
386
|
const texture = createOrUpdateTexture(
|
|
368
387
|
this.gl,
|
|
369
388
|
{
|
|
389
|
+
// Hash textures are point-lookups and must remain single-level.
|
|
390
|
+
auto: false,
|
|
370
391
|
level: 0,
|
|
371
|
-
|
|
392
|
+
min: gl.NEAREST,
|
|
393
|
+
mag: gl.NEAREST,
|
|
372
394
|
format: gl.RED_INTEGER,
|
|
373
395
|
internalFormat: gl.R32UI,
|
|
374
396
|
width,
|
|
@@ -377,6 +399,10 @@ export default class WebGLHelper {
|
|
|
377
399
|
table,
|
|
378
400
|
update ? existingTexture : false
|
|
379
401
|
);
|
|
402
|
+
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
403
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_BASE_LEVEL, 0);
|
|
404
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAX_LEVEL, 0);
|
|
405
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
380
406
|
|
|
381
407
|
this.selectionTextures.set(selection, texture);
|
|
382
408
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
* Loads the spec from the given url and sets the baseUrl if it is not
|
|
4
|
-
* defined in the spec.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} url
|
|
7
|
-
*/
|
|
8
|
-
export function loadSpec(url: string): Promise<any>;
|
|
1
|
+
export const embed: (el: HTMLElement | string, spec: import("./spec/root.js").RootSpec | string, options?: import("./types/embedApi.js").EmbedOptions) => Promise<import("./types/embedApi.js").EmbedResult>;
|
|
9
2
|
import GenomeSpy from "./genomeSpy.js";
|
|
10
3
|
import { html } from "lit";
|
|
11
4
|
import icon from "./img/bowtie.svg";
|
|
12
5
|
import favIcon from "./img/genomespy-favicon.svg";
|
|
13
|
-
|
|
6
|
+
import { loadSpec } from "./embedFactory.js";
|
|
7
|
+
export { GenomeSpy, html, icon, favIcon, loadSpec };
|
|
14
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAWA,6MAA4C;sBAPtB,gBAAgB;qBAJjB,KAAK;iBAKT,kBAAkB;oBACf,6BAA6B;yBACX,mBAAmB"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,120 +1,14 @@
|
|
|
1
|
-
import { isObject, isString } from "vega-util";
|
|
2
1
|
import { html } from "lit";
|
|
3
2
|
|
|
3
|
+
// Default core entry point: imports the fat GenomeSpy runtime with built-in
|
|
4
|
+
// eager and lazy format registrations.
|
|
4
5
|
import GenomeSpy from "./genomeSpy.js";
|
|
5
6
|
import icon from "./img/bowtie.svg";
|
|
6
7
|
import favIcon from "./img/genomespy-favicon.svg";
|
|
7
|
-
import {
|
|
8
|
+
import { createEmbed, loadSpec } from "./embedFactory.js";
|
|
8
9
|
|
|
9
10
|
export { GenomeSpy, html, icon, favIcon };
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
* Embeds GenomeSpy into the DOM
|
|
13
|
-
*
|
|
14
|
-
* @type {import("./types/embedApi.js").EmbedFunction}
|
|
15
|
-
* @returns {Promise<import("./types/embedApi.js").EmbedResult>}
|
|
16
|
-
*/
|
|
17
|
-
export async function embed(el, spec, options = {}) {
|
|
18
|
-
/** @type {HTMLElement} */
|
|
19
|
-
let element;
|
|
12
|
+
export const embed = createEmbed(GenomeSpy);
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
element = document.querySelector(el);
|
|
23
|
-
if (!element) {
|
|
24
|
-
throw new Error(`No such element: ${el}`);
|
|
25
|
-
}
|
|
26
|
-
} else if (el instanceof HTMLElement) {
|
|
27
|
-
element = el;
|
|
28
|
-
} else {
|
|
29
|
-
throw new Error(`Invalid element: ${el}`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** @type {GenomeSpy} */
|
|
33
|
-
let genomeSpy;
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
const specObject = isObject(spec) ? spec : await loadSpec(spec);
|
|
37
|
-
|
|
38
|
-
specObject.baseUrl ??= "";
|
|
39
|
-
specObject.width ??= "container";
|
|
40
|
-
specObject.padding ??= 10;
|
|
41
|
-
|
|
42
|
-
if (element == document.body) {
|
|
43
|
-
// Need to add a wrapper to make sizing behavior more stable
|
|
44
|
-
const wrapper = document.createElement("div");
|
|
45
|
-
wrapper.style.position = "fixed";
|
|
46
|
-
wrapper.style.inset = "0";
|
|
47
|
-
wrapper.style.overflow = "hidden";
|
|
48
|
-
element.appendChild(wrapper);
|
|
49
|
-
element = wrapper;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
genomeSpy = new GenomeSpy(element, specObject, options);
|
|
53
|
-
applyOptions(genomeSpy, options);
|
|
54
|
-
await genomeSpy.launch();
|
|
55
|
-
} catch (e) {
|
|
56
|
-
// eslint-disable-next-line require-atomic-updates
|
|
57
|
-
element.innerText = e.toString();
|
|
58
|
-
console.error(e);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
finalize() {
|
|
63
|
-
genomeSpy.destroy();
|
|
64
|
-
while (element.firstChild) {
|
|
65
|
-
element.firstChild.remove();
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
addEventListener(type, listener) {
|
|
70
|
-
genomeSpy.addEventListener(type, listener);
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
removeEventListener(type, listener) {
|
|
74
|
-
genomeSpy.removeEventListener(type, listener);
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
getScaleResolutionByName(name) {
|
|
78
|
-
return genomeSpy.getNamedScaleResolutions().get(name);
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
updateNamedData: genomeSpy.updateNamedData.bind(genomeSpy),
|
|
82
|
-
exportCanvas: genomeSpy.exportCanvas.bind(genomeSpy),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* @param {import("./genomeSpy.js").default} genomeSpy
|
|
89
|
-
* @param {import("./types/embedApi.js").EmbedOptions} options options
|
|
90
|
-
*/
|
|
91
|
-
function applyOptions(genomeSpy, options) {
|
|
92
|
-
if (options.namedDataProvider) {
|
|
93
|
-
genomeSpy.registerNamedDataProvider(options.namedDataProvider);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Loads the spec from the given url and sets the baseUrl if it is not
|
|
99
|
-
* defined in the spec.
|
|
100
|
-
*
|
|
101
|
-
* @param {string} url
|
|
102
|
-
*/
|
|
103
|
-
export async function loadSpec(url) {
|
|
104
|
-
let spec;
|
|
105
|
-
|
|
106
|
-
try {
|
|
107
|
-
spec = /** @type {any} */ (await fetchJson(url));
|
|
108
|
-
} catch (e) {
|
|
109
|
-
throw new Error(
|
|
110
|
-
`Could not load or parse configuration: ${url}, reason: ${e.message}`
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (!spec.baseUrl) {
|
|
115
|
-
const m = url.match(/^[^?#]*\//);
|
|
116
|
-
spec.baseUrl = (m && m[0]) || "./";
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return spec;
|
|
120
|
-
}
|
|
14
|
+
export { loadSpec };
|