@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
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
* Utils for Jest tests
|
|
3
3
|
* TODO: Find a better place and convention
|
|
4
4
|
*
|
|
5
|
-
* @typedef {import("../spec/
|
|
5
|
+
* @typedef {import("../spec/root.js").RootSpec} RootSpec
|
|
6
6
|
* @typedef {import("../types/viewContext.js").default} ViewContext
|
|
7
|
+
* @typedef {ViewContext & {
|
|
8
|
+
* emitBroadcast: (
|
|
9
|
+
* root: import("./view.js").default,
|
|
10
|
+
* type: import("../genomeSpy.js").BroadcastEventType,
|
|
11
|
+
* payload?: any
|
|
12
|
+
* ) => void
|
|
13
|
+
* }} BroadcastingViewContext
|
|
7
14
|
*/
|
|
8
15
|
|
|
9
16
|
import { checkForDuplicateScaleNames } from "./viewUtils.js";
|
|
@@ -11,90 +18,74 @@ import {
|
|
|
11
18
|
initializeViewSubtree,
|
|
12
19
|
loadViewSubtreeData,
|
|
13
20
|
} from "../data/flowInit.js";
|
|
14
|
-
import
|
|
15
|
-
import { VIEW_ROOT_NAME, ViewFactory } from "./viewFactory.js";
|
|
16
|
-
import GenomeStore from "../genome/genomeStore.js";
|
|
17
|
-
import BmFontManager from "../fonts/bmFontManager.js";
|
|
21
|
+
import { VIEW_ROOT_NAME } from "./viewFactory.js";
|
|
18
22
|
import UnitView from "./unitView.js";
|
|
19
23
|
import ContainerView from "./containerView.js";
|
|
24
|
+
import {
|
|
25
|
+
createHeadlessEngine,
|
|
26
|
+
createHeadlessViewContext,
|
|
27
|
+
} from "../genomeSpy/headlessBootstrap.js";
|
|
20
28
|
|
|
21
29
|
/**
|
|
22
30
|
* @param {import("./viewFactory.js").ViewFactoryOptions} [viewFactoryOptions]
|
|
23
31
|
* @returns
|
|
24
32
|
*/
|
|
25
33
|
export function createTestViewContext(viewFactoryOptions = {}) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
wrapRoot: false,
|
|
29
|
-
...viewFactoryOptions,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const genomeStore = new GenomeStore(".");
|
|
33
|
-
genomeStore.initialize({
|
|
34
|
-
name: "test",
|
|
35
|
-
contigs: [
|
|
36
|
-
{ name: "chr1", size: 20 },
|
|
37
|
-
{ name: "chr2", size: 30 },
|
|
38
|
-
],
|
|
34
|
+
return createHeadlessViewContext({
|
|
35
|
+
viewFactoryOptions,
|
|
39
36
|
});
|
|
37
|
+
}
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
})
|
|
77
|
-
),
|
|
78
|
-
|
|
79
|
-
requestLayoutReflow: () => undefined,
|
|
80
|
-
|
|
81
|
-
isViewConfiguredVisible: () => true,
|
|
82
|
-
|
|
83
|
-
addBroadcastListener: () => undefined,
|
|
84
|
-
removeBroadcastListener: () => undefined,
|
|
85
|
-
|
|
86
|
-
//...partialContext,
|
|
87
|
-
});
|
|
39
|
+
/**
|
|
40
|
+
* @param {import("./viewFactory.js").ViewFactoryOptions} [viewFactoryOptions]
|
|
41
|
+
* @returns {BroadcastingViewContext}
|
|
42
|
+
*/
|
|
43
|
+
export function createBroadcastingTestViewContext(viewFactoryOptions = {}) {
|
|
44
|
+
const context = /** @type {BroadcastingViewContext} */ (
|
|
45
|
+
createTestViewContext({
|
|
46
|
+
wrapRoot: true,
|
|
47
|
+
...viewFactoryOptions,
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/** @type {Map<string, Set<(message: any) => void>>} */
|
|
52
|
+
const listeners = new Map();
|
|
53
|
+
|
|
54
|
+
context.addBroadcastListener = (type, listener) => {
|
|
55
|
+
const typedListeners = listeners.get(type) ?? new Set();
|
|
56
|
+
typedListeners.add(listener);
|
|
57
|
+
listeners.set(type, typedListeners);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
context.removeBroadcastListener = (type, listener) => {
|
|
61
|
+
listeners.get(type)?.delete(listener);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
context.emitBroadcast = (root, type, payload) => {
|
|
65
|
+
const message = /** @type {import("./view.js").BroadcastMessage} */ ({
|
|
66
|
+
type,
|
|
67
|
+
payload,
|
|
68
|
+
});
|
|
69
|
+
root.visit((view) => view.handleBroadcast(message));
|
|
70
|
+
for (const listener of listeners.get(type) ?? []) {
|
|
71
|
+
listener(message);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
88
74
|
|
|
89
|
-
return
|
|
75
|
+
return context;
|
|
90
76
|
}
|
|
91
77
|
|
|
92
78
|
/**
|
|
93
|
-
* @type {<V extends import("./view.js").default>(spec:
|
|
79
|
+
* @type {<V extends import("./view.js").default>(spec: RootSpec, viewClass: { new(...args: any[]): V }, ViewFactoryOptions?: import("./viewFactory.js").ViewFactoryOptions) => Promise<V>}
|
|
94
80
|
*/
|
|
95
81
|
export async function create(spec, viewClass, viewFactoryOptions = {}) {
|
|
96
82
|
const c = createTestViewContext(viewFactoryOptions);
|
|
97
|
-
const view = await c.createOrImportView(
|
|
83
|
+
const view = await c.createOrImportView(
|
|
84
|
+
/** @type {import("../spec/view.js").ViewSpec} */ (spec),
|
|
85
|
+
null,
|
|
86
|
+
null,
|
|
87
|
+
VIEW_ROOT_NAME
|
|
88
|
+
);
|
|
98
89
|
|
|
99
90
|
if (!(view instanceof viewClass)) {
|
|
100
91
|
throw new Error("ViewClass and the spec do not match!");
|
|
@@ -106,7 +97,7 @@ export async function create(spec, viewClass, viewFactoryOptions = {}) {
|
|
|
106
97
|
/**
|
|
107
98
|
* Creates a view and initializes its data. Does not wrap it in an implicit root view.
|
|
108
99
|
*
|
|
109
|
-
* @type {<V extends import("./view.js").default>(spec:
|
|
100
|
+
* @type {<V extends import("./view.js").default>(spec: RootSpec, viewClass: { new(...args: any[]): V }, context?: ViewContext, options?: {noData: boolean, implicitRoot: boolean}) => Promise<V>}
|
|
110
101
|
*/
|
|
111
102
|
export async function createAndInitialize(spec, viewClass) {
|
|
112
103
|
const view = await create(spec, viewClass);
|
|
@@ -126,3 +117,5 @@ export async function createAndInitialize(spec, viewClass) {
|
|
|
126
117
|
await loadViewSubtreeData(view, dataSources);
|
|
127
118
|
return view;
|
|
128
119
|
}
|
|
120
|
+
|
|
121
|
+
export { createHeadlessEngine };
|
package/dist/src/view/title.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {string | import("../spec/title.js").Title} title
|
|
3
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} [configScopes]
|
|
4
|
+
* @returns {import("../spec/title.js").Title}
|
|
5
|
+
*/
|
|
6
|
+
export function resolveTitleSpec(title: string | import("../spec/title.js").Title, configScopes?: import("../spec/config.js").GenomeSpyConfig[]): import("../spec/title.js").Title;
|
|
7
|
+
/**
|
|
8
|
+
* @param {string | import("../spec/title.js").Title} title
|
|
9
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} [configScopes]
|
|
3
10
|
* @returns {import("../spec/view.js").UnitSpec}
|
|
4
11
|
*/
|
|
5
|
-
export default function createTitle(title: string | import("../spec/title.js").Title): import("../spec/view.js").UnitSpec;
|
|
12
|
+
export default function createTitle(title: string | import("../spec/title.js").Title, configScopes?: import("../spec/config.js").GenomeSpyConfig[]): import("../spec/view.js").UnitSpec;
|
|
6
13
|
//# sourceMappingURL=title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/view/title.js"],"names":[],"mappings":"AAuDA
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/view/title.js"],"names":[],"mappings":"AAuDA;;;;GAIG;AACH,wCAJW,MAAM,GAAG,OAAO,kBAAkB,EAAE,KAAK,iBACzC,OAAO,mBAAmB,EAAE,eAAe,EAAE,GAC3C,OAAO,kBAAkB,EAAE,KAAK,CAuC5C;AAED;;;;GAIG;AACH,2CAJW,MAAM,GAAG,OAAO,kBAAkB,EAAE,KAAK,iBACzC,OAAO,mBAAmB,EAAE,eAAe,EAAE,GAC3C,OAAO,iBAAiB,EAAE,QAAQ,CAmD9C"}
|
package/dist/src/view/title.js
CHANGED
|
@@ -1,43 +1,8 @@
|
|
|
1
1
|
import { isString } from "vega-util";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
frame: "group",
|
|
7
|
-
offset: 10,
|
|
8
|
-
orient: "top",
|
|
9
|
-
align: undefined,
|
|
10
|
-
angle: 0,
|
|
11
|
-
baseline: "alphabetic",
|
|
12
|
-
dx: 0,
|
|
13
|
-
dy: 0,
|
|
14
|
-
color: undefined,
|
|
15
|
-
font: undefined,
|
|
16
|
-
fontSize: 12,
|
|
17
|
-
fontStyle: "normal",
|
|
18
|
-
fontWeight: "normal",
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @type {Partial<import("../spec/title.js").Title>} */
|
|
22
|
-
const TRACK_TITLE_STYLE = {
|
|
23
|
-
orient: "left",
|
|
24
|
-
anchor: "middle",
|
|
25
|
-
align: "right",
|
|
26
|
-
baseline: "middle",
|
|
27
|
-
angle: 0,
|
|
28
|
-
fontSize: 12,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @type {Partial<import("../spec/title.js").Title>} */
|
|
32
|
-
const OVERLAY_TITLE_STYLE = {
|
|
33
|
-
orient: "top",
|
|
34
|
-
anchor: "start",
|
|
35
|
-
align: "left",
|
|
36
|
-
baseline: "top",
|
|
37
|
-
offset: -10,
|
|
38
|
-
dx: 10,
|
|
39
|
-
fontSize: 12,
|
|
40
|
-
};
|
|
2
|
+
import {
|
|
3
|
+
getConfiguredStyleConfig,
|
|
4
|
+
getConfiguredTitleConfig,
|
|
5
|
+
} from "../config/titleConfig.js";
|
|
41
6
|
|
|
42
7
|
/** @type {Record<import("../spec/title.js").TitleAnchor, number>} */
|
|
43
8
|
const ANCHORS = {
|
|
@@ -53,46 +18,19 @@ const ANCHOR_TO_ALIGN = {
|
|
|
53
18
|
end: "right",
|
|
54
19
|
};
|
|
55
20
|
|
|
21
|
+
const DEFAULT_TITLE_STYLE = "group-title";
|
|
22
|
+
|
|
56
23
|
/**
|
|
57
|
-
* @param {
|
|
58
|
-
* @returns {import("../spec/view.js").UnitSpec}
|
|
24
|
+
* @param {import("../spec/title.js").Title} spec
|
|
59
25
|
*/
|
|
60
|
-
|
|
61
|
-
if (!title) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** @type {import("../spec/title.js").Title} */
|
|
66
|
-
const titleSpec = isString(title) ? { text: title } : title;
|
|
67
|
-
|
|
68
|
-
if (!titleSpec.text || titleSpec.orient == "none") {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// TODO: Make these configurable
|
|
73
|
-
/** @type {Partial<import("../spec/title.js").Title>} */
|
|
74
|
-
const config =
|
|
75
|
-
{
|
|
76
|
-
"track-title": TRACK_TITLE_STYLE,
|
|
77
|
-
overlay: OVERLAY_TITLE_STYLE,
|
|
78
|
-
}[titleSpec.style] ?? {};
|
|
79
|
-
|
|
80
|
-
// TODO: frame prop
|
|
81
|
-
|
|
82
|
-
/** @type {import("../spec/title.js").Title} */
|
|
83
|
-
const preliminarySpec = {
|
|
84
|
-
...BASE_TITLE_STYLE,
|
|
85
|
-
...config,
|
|
86
|
-
...titleSpec,
|
|
87
|
-
};
|
|
88
|
-
|
|
26
|
+
function getTitleOrientMetadata(spec) {
|
|
89
27
|
/** @type {Partial<import("../spec/title.js").Title>} */
|
|
90
28
|
let orientConfig = {};
|
|
91
29
|
let xy = { x: 0, y: 0 };
|
|
92
30
|
|
|
93
|
-
const anchorPos = ANCHORS[
|
|
31
|
+
const anchorPos = ANCHORS[spec.anchor ?? "middle"];
|
|
94
32
|
|
|
95
|
-
switch (
|
|
33
|
+
switch (spec.orient) {
|
|
96
34
|
case "top":
|
|
97
35
|
xy = { x: anchorPos, y: 1 };
|
|
98
36
|
orientConfig = { baseline: "alphabetic", angle: 0 };
|
|
@@ -112,16 +50,68 @@ export default function createTitle(title) {
|
|
|
112
50
|
default:
|
|
113
51
|
}
|
|
114
52
|
|
|
53
|
+
return { orientConfig, xy };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {string | import("../spec/title.js").Title} title
|
|
58
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} [configScopes]
|
|
59
|
+
* @returns {import("../spec/title.js").Title}
|
|
60
|
+
*/
|
|
61
|
+
export function resolveTitleSpec(title, configScopes = []) {
|
|
62
|
+
if (!title) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** @type {import("../spec/title.js").Title} */
|
|
67
|
+
const titleSpec = isString(title) ? { text: title } : title;
|
|
68
|
+
|
|
69
|
+
if (!titleSpec.text || titleSpec.orient == "none") {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const titleConfig = getConfiguredTitleConfig(configScopes);
|
|
74
|
+
const styleConfig = /** @type {import("../spec/config.js").TitleConfig} */ (
|
|
75
|
+
getConfiguredStyleConfig(
|
|
76
|
+
configScopes,
|
|
77
|
+
titleSpec.style ?? DEFAULT_TITLE_STYLE
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
// TODO: frame prop
|
|
82
|
+
|
|
115
83
|
/** @type {import("../spec/title.js").Title} */
|
|
116
|
-
const
|
|
117
|
-
...
|
|
84
|
+
const preliminarySpec = {
|
|
85
|
+
...titleConfig,
|
|
86
|
+
...styleConfig,
|
|
87
|
+
...titleSpec,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const { orientConfig } = getTitleOrientMetadata(preliminarySpec);
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
...titleConfig,
|
|
118
94
|
...orientConfig,
|
|
119
|
-
...
|
|
95
|
+
...styleConfig,
|
|
120
96
|
...titleSpec,
|
|
121
97
|
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @param {string | import("../spec/title.js").Title} title
|
|
102
|
+
* @param {import("../spec/config.js").GenomeSpyConfig[]} [configScopes]
|
|
103
|
+
* @returns {import("../spec/view.js").UnitSpec}
|
|
104
|
+
*/
|
|
105
|
+
export default function createTitle(title, configScopes = []) {
|
|
106
|
+
const spec = resolveTitleSpec(title, configScopes);
|
|
107
|
+
if (!spec) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const { xy } = getTitleOrientMetadata(spec);
|
|
122
112
|
|
|
123
113
|
const offsets = { xOffset: 0, yOffset: 0 };
|
|
124
|
-
switch (
|
|
114
|
+
switch (spec.orient) {
|
|
125
115
|
case "top":
|
|
126
116
|
offsets.yOffset = -spec.offset;
|
|
127
117
|
break;
|
|
@@ -21,7 +21,7 @@ export default class UnitView<TSpec extends import("../spec/view.js").UnitSpec =
|
|
|
21
21
|
constructor(spec: TSpec, context: import("../types/viewContext.js").default, layoutParent: import("./containerView.js").default, dataParent: import("./view.js").default, name: string, options?: import("./view.js").ViewOptions);
|
|
22
22
|
/** @type {import("../marks/mark.js").default} */
|
|
23
23
|
mark: import("../marks/mark.js").default;
|
|
24
|
-
getMarkType(): "
|
|
24
|
+
getMarkType(): "text" | "point" | "link" | "rect" | "rule" | "tick";
|
|
25
25
|
/**
|
|
26
26
|
* Pulls scales and axes up in the view hierarcy according to the resolution rules, using dataParents.
|
|
27
27
|
* TODO: legends
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unitView.d.ts","sourceRoot":"","sources":["../../../src/view/unitView.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unitView.d.ts","sourceRoot":"","sources":["../../../src/view/unitView.js"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,wBAHU,MAAM,CAAC,OAAO,iBAAiB,EAAE,QAAQ,EAAE,cAAc,kBAAkB,EAAE,OAAO,CAAC,CAgB7F;AAEF;;;GAGG;AACH,8BAHmD,KAAK,SAA3C,OAAQ,iBAAiB,EAAE,QAAS;IA2B7C;;;;;;;;OAQG;IACH,kBAPW,KAAK,WACL,OAAO,yBAAyB,EAAE,OAAO,gBACzC,OAAO,oBAAoB,EAAE,OAAO,cACpC,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,YACN,OAAO,WAAW,EAAE,WAAW,EAmDzC;IA1CO,iDAAiD;IACjD,MADW,OAAO,kBAAkB,EAAE,OAAO,CACnB;IAiLlC,oEAIC;IAoBD;;;;;OAKG;IACH,iEAOC;IAUD;;;;;OAKG;IACH,4IAQC;IAED;;;;OAIG;IACH,sBAFa,OAAO,WAAW,EAAE,UAAU,EAAE,CAS5C;IAkBD;;OAEG;IACH,uDAEC;IAED;;OAEG;IACH,oCAsFC;IAED,uBAQC;IAgBD;;;;OAIG;IACH,8BAJW,MAAM,+DAEJ,OAAO,iBAAiB,EAAE,kBAAkB,CAKxD;;CACJ;iBAjegB,WAAW"}
|