@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
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(): "point" | "link" | "text" | "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":"AAkCA;;;;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,iEAoJC;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;iBA7mBgB,WAAW"}
|
|
@@ -6,6 +6,8 @@ import TextMark from "../marks/text.js";
|
|
|
6
6
|
|
|
7
7
|
import ScaleResolution from "../scales/scaleResolution.js";
|
|
8
8
|
import {
|
|
9
|
+
getEncoderAccessors,
|
|
10
|
+
getEncoderDataAccessor,
|
|
9
11
|
isPositionalChannel,
|
|
10
12
|
isChannelDefWithScale,
|
|
11
13
|
primaryPositionalChannels,
|
|
@@ -28,6 +30,7 @@ import { getEncodingSearchFields } from "../encoder/metadataChannels.js";
|
|
|
28
30
|
import { UNIQUE_ID_KEY } from "../data/transforms/identifier.js";
|
|
29
31
|
import { createEventFilterFunction } from "../utils/expression.js";
|
|
30
32
|
import { field } from "../utils/field.js";
|
|
33
|
+
import { collectDomainSensitiveScaleChannels } from "../data/flowNode.js";
|
|
31
34
|
|
|
32
35
|
/**
|
|
33
36
|
*
|
|
@@ -42,6 +45,8 @@ export const markTypes = {
|
|
|
42
45
|
// @ts-ignore
|
|
43
46
|
rule: RuleMark,
|
|
44
47
|
// @ts-ignore
|
|
48
|
+
tick: RuleMark,
|
|
49
|
+
// @ts-ignore
|
|
45
50
|
link: LinkMark,
|
|
46
51
|
// @ts-ignore
|
|
47
52
|
text: TextMark,
|
|
@@ -120,6 +125,16 @@ export default class UnitView extends View {
|
|
|
120
125
|
}
|
|
121
126
|
}
|
|
122
127
|
|
|
128
|
+
this.registerDisposer(
|
|
129
|
+
this._addBroadcastHandler("subtreeDataReady", () => {
|
|
130
|
+
for (const channel of primaryPositionalChannels) {
|
|
131
|
+
this.getScaleResolution(
|
|
132
|
+
channel
|
|
133
|
+
)?.syncLinkedSelectionFromDomain();
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
);
|
|
137
|
+
|
|
123
138
|
this.needsAxes = { x: true, y: true };
|
|
124
139
|
|
|
125
140
|
this.#setupPointSelection();
|
|
@@ -166,8 +181,7 @@ export default class UnitView extends View {
|
|
|
166
181
|
: () => true;
|
|
167
182
|
|
|
168
183
|
const listener = (
|
|
169
|
-
/** @type {
|
|
170
|
-
/** @type {import("../utils/interactionEvent.js").default} */ event
|
|
184
|
+
/** @type {import("../utils/interaction.js").default} */ event
|
|
171
185
|
) => {
|
|
172
186
|
if (!eventPredicate(event.proxiedMouseEvent)) {
|
|
173
187
|
return;
|
|
@@ -209,7 +223,7 @@ export default class UnitView extends View {
|
|
|
209
223
|
}
|
|
210
224
|
};
|
|
211
225
|
|
|
212
|
-
this.
|
|
226
|
+
this.addInteractionListener(
|
|
213
227
|
["mouseover", "pointerover"].includes(eventConfig.type)
|
|
214
228
|
? "mousemove"
|
|
215
229
|
: eventConfig.type,
|
|
@@ -222,8 +236,7 @@ export default class UnitView extends View {
|
|
|
222
236
|
: () => true;
|
|
223
237
|
|
|
224
238
|
const clearListener = (
|
|
225
|
-
/** @type {
|
|
226
|
-
/** @type {import("../utils/interactionEvent.js").default} */ event
|
|
239
|
+
/** @type {import("../utils/interaction.js").default} */ event
|
|
227
240
|
) => {
|
|
228
241
|
if (!clearPredicate(event.proxiedMouseEvent)) {
|
|
229
242
|
return;
|
|
@@ -235,7 +248,7 @@ export default class UnitView extends View {
|
|
|
235
248
|
setter(selection);
|
|
236
249
|
};
|
|
237
250
|
|
|
238
|
-
this.
|
|
251
|
+
this.addInteractionListener(
|
|
239
252
|
clearEventConfig.type,
|
|
240
253
|
clearListener
|
|
241
254
|
);
|
|
@@ -291,7 +304,6 @@ export default class UnitView extends View {
|
|
|
291
304
|
*
|
|
292
305
|
* @param {ResolutionTarget} [type] If not specified, both scales and axes are resolved.
|
|
293
306
|
*/
|
|
294
|
-
// eslint-disable-next-line complexity
|
|
295
307
|
resolve(type) {
|
|
296
308
|
if (!type) {
|
|
297
309
|
this.resolve("scale");
|
|
@@ -346,7 +358,6 @@ export default class UnitView extends View {
|
|
|
346
358
|
continue;
|
|
347
359
|
}
|
|
348
360
|
|
|
349
|
-
// eslint-disable-next-line consistent-this
|
|
350
361
|
let view = this;
|
|
351
362
|
while (
|
|
352
363
|
(view.getConfiguredOrDefaultResolution(targetChannel, type) ==
|
|
@@ -462,7 +473,9 @@ export default class UnitView extends View {
|
|
|
462
473
|
if (!encoders) {
|
|
463
474
|
return undefined;
|
|
464
475
|
}
|
|
465
|
-
return encoders[channel]
|
|
476
|
+
return encoders[channel]
|
|
477
|
+
? getEncoderDataAccessor(encoders[channel])
|
|
478
|
+
: undefined;
|
|
466
479
|
}
|
|
467
480
|
|
|
468
481
|
/**
|
|
@@ -526,6 +539,9 @@ export default class UnitView extends View {
|
|
|
526
539
|
|
|
527
540
|
this.#domainSubscriptionsRegistered = true;
|
|
528
541
|
|
|
542
|
+
const domainDependentChannels =
|
|
543
|
+
collectDomainSensitiveScaleChannels(collector);
|
|
544
|
+
|
|
529
545
|
/** @type {Map<import("../scales/scaleResolution.js").default, Set<import("../types/encoder.js").ScaleAccessor>>} */
|
|
530
546
|
const accessorsByResolution = new Map();
|
|
531
547
|
|
|
@@ -534,7 +550,7 @@ export default class UnitView extends View {
|
|
|
534
550
|
continue;
|
|
535
551
|
}
|
|
536
552
|
|
|
537
|
-
const accessors = encoder
|
|
553
|
+
const accessors = getEncoderAccessors(encoder);
|
|
538
554
|
if (accessors.length === 0) {
|
|
539
555
|
continue;
|
|
540
556
|
}
|
|
@@ -543,9 +559,6 @@ export default class UnitView extends View {
|
|
|
543
559
|
if (!isScaleAccessor(accessor)) {
|
|
544
560
|
continue;
|
|
545
561
|
}
|
|
546
|
-
if (accessor.channelDef.domainInert) {
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
562
|
const resolution = this.getScaleResolution(
|
|
550
563
|
accessor.scaleChannel
|
|
551
564
|
);
|
|
@@ -555,6 +568,18 @@ export default class UnitView extends View {
|
|
|
555
568
|
accessor.scaleChannel
|
|
556
569
|
);
|
|
557
570
|
}
|
|
571
|
+
if (accessor.channelDef.domainInert) {
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
if (
|
|
575
|
+
createsDomainFeedback(
|
|
576
|
+
accessor,
|
|
577
|
+
resolution,
|
|
578
|
+
domainDependentChannels
|
|
579
|
+
)
|
|
580
|
+
) {
|
|
581
|
+
continue;
|
|
582
|
+
}
|
|
558
583
|
|
|
559
584
|
let accessorsForResolution =
|
|
560
585
|
accessorsByResolution.get(resolution);
|
|
@@ -592,17 +617,17 @@ export default class UnitView extends View {
|
|
|
592
617
|
}
|
|
593
618
|
|
|
594
619
|
/**
|
|
595
|
-
* @param {import("../utils/
|
|
620
|
+
* @param {import("../utils/interaction.js").default} event
|
|
596
621
|
*/
|
|
597
|
-
|
|
598
|
-
this.
|
|
622
|
+
propagateInteraction(event) {
|
|
623
|
+
this.handleInteraction(event, true);
|
|
599
624
|
event.target = this;
|
|
600
625
|
|
|
601
626
|
if (event.stopped) {
|
|
602
627
|
return;
|
|
603
628
|
}
|
|
604
629
|
|
|
605
|
-
this.
|
|
630
|
+
this.handleInteraction(event, false);
|
|
606
631
|
}
|
|
607
632
|
|
|
608
633
|
/**
|
|
@@ -615,3 +640,28 @@ export default class UnitView extends View {
|
|
|
615
640
|
return channel == "x" ? "shared" : "independent";
|
|
616
641
|
}
|
|
617
642
|
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Returns true when subscribing this accessor as a domain contributor would
|
|
646
|
+
* create a feedback loop: the current scale domain already affects the
|
|
647
|
+
* collector output upstream, so the derived values must not feed back into
|
|
648
|
+
* the same shared-domain resolution.
|
|
649
|
+
*
|
|
650
|
+
* Example: `filterScoredLabels` recomputes visible labels from the current
|
|
651
|
+
* x-domain, so downstream label x positions must not contribute to x-domain.
|
|
652
|
+
*
|
|
653
|
+
* @param {import("../types/encoder.js").ScaleAccessor} accessor
|
|
654
|
+
* @param {import("../scales/scaleResolution.js").default} resolution
|
|
655
|
+
* @param {Set<import("../spec/channel.js").ChannelWithScale>} domainDependentChannels
|
|
656
|
+
* @returns {boolean}
|
|
657
|
+
*/
|
|
658
|
+
function createsDomainFeedback(accessor, resolution, domainDependentChannels) {
|
|
659
|
+
return (
|
|
660
|
+
!resolution.isDomainDefinedExplicitly() &&
|
|
661
|
+
domainDependentChannels.has(
|
|
662
|
+
/** @type {import("../spec/channel.js").ChannelWithScale} */ (
|
|
663
|
+
getPrimaryChannel(accessor.scaleChannel)
|
|
664
|
+
)
|
|
665
|
+
)
|
|
666
|
+
);
|
|
667
|
+
}
|
package/dist/src/view/view.d.ts
CHANGED
|
@@ -18,18 +18,34 @@ export const VISIT_STOP: "VISIT_STOP";
|
|
|
18
18
|
* @typedef {object} BroadcastMessage
|
|
19
19
|
* @prop {import("../genomeSpy.js").BroadcastEventType} type Broadcast type
|
|
20
20
|
* @prop {any} [payload] Anything
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Internal listener contract for view interactions.
|
|
24
|
+
*
|
|
25
|
+
* Listeners receive a single `Interaction` object. They are attached per
|
|
26
|
+
* event type and may run either in the capture phase or in the bubbling
|
|
27
|
+
* phase, depending on how the containing view routes the interaction.
|
|
28
|
+
*
|
|
29
|
+
* Ordinary pointer events are routed by container views, which may do hit
|
|
30
|
+
* testing, scrollbar dispatch, zoom policy, or other view-specific work
|
|
31
|
+
* before or after child propagation. In addition, `mouseenter` and
|
|
32
|
+
* `mouseleave` are synthesized by `InteractionDispatcher` from changes in the
|
|
33
|
+
* pointed view path.
|
|
21
34
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @param {import("../utils/interactionEvent.js").default} event
|
|
35
|
+
* `stopPropagation()` prevents further routing to later views, but it does
|
|
36
|
+
* not provide DOM-style stop-immediate semantics for sibling listeners on the
|
|
37
|
+
* same view.
|
|
26
38
|
*
|
|
39
|
+
* @callback InteractionListener
|
|
40
|
+
* @param {import("../utils/interaction.js").default} event
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
27
43
|
* @typedef {object} ViewOptions
|
|
28
44
|
* @prop {boolean} [blockEncodingInheritance]
|
|
29
45
|
* Don't inherit encodings from parent. Default: false.
|
|
30
|
-
* @prop {
|
|
31
|
-
*
|
|
32
|
-
*
|
|
46
|
+
* @prop {"own" | "inherit"} [layoutSizeParams]
|
|
47
|
+
* Whether the view should introduce local layout-driven width/height params.
|
|
48
|
+
* Default: "own".
|
|
33
49
|
*/
|
|
34
50
|
/**
|
|
35
51
|
* @template {import("../spec/view.js").ViewSpec} [TSpec=import("../spec/view.js").ViewSpec]
|
|
@@ -80,10 +96,10 @@ export default class View<TSpec extends import("../spec/view.js").ViewSpec = imp
|
|
|
80
96
|
*/
|
|
81
97
|
blockEncodingInheritance: boolean;
|
|
82
98
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
99
|
+
* Whether the view should introduce local layout-driven width/height params.
|
|
100
|
+
* Default: "own".
|
|
85
101
|
*/
|
|
86
|
-
|
|
102
|
+
layoutSizeParams: string;
|
|
87
103
|
};
|
|
88
104
|
/**
|
|
89
105
|
* @type {import("../data/flowHandle.js").FlowHandle | undefined}
|
|
@@ -111,6 +127,15 @@ export default class View<TSpec extends import("../spec/view.js").ViewSpec = imp
|
|
|
111
127
|
* Intended for debugging only.
|
|
112
128
|
*/
|
|
113
129
|
get defaultName(): string;
|
|
130
|
+
getConfig(): import("../spec/config.js").GenomeSpyConfig;
|
|
131
|
+
getCursorSpec(): string | import("../spec/parameter.js").ExprRef;
|
|
132
|
+
getCursor(): any;
|
|
133
|
+
/**
|
|
134
|
+
* @param {() => void} listener
|
|
135
|
+
* @param {(disposer: () => void) => void} [registerDisposer]
|
|
136
|
+
*/
|
|
137
|
+
watchCursor(listener: () => void, registerDisposer?: (disposer: () => void) => void): void;
|
|
138
|
+
getConfigScopes(): import("../spec/config.js").GenomeSpyConfig[];
|
|
114
139
|
/**
|
|
115
140
|
* Returns the coords of the view. If view has been faceted, returns the coords
|
|
116
141
|
* of an arbitrary facet. If all or specific facet coords are needed, use `facetCoords`.
|
|
@@ -206,33 +231,37 @@ export default class View<TSpec extends import("../spec/view.js").ViewSpec = imp
|
|
|
206
231
|
*/
|
|
207
232
|
_addBroadcastHandler(type: string, handler: (arg0: BroadcastMessage) => void): () => void;
|
|
208
233
|
/**
|
|
209
|
-
*
|
|
234
|
+
* Invokes this view's listeners for the current interaction phase.
|
|
210
235
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
236
|
+
* This method does not route the event to children or parents. Container
|
|
237
|
+
* subclasses implement that routing in `propagateInteraction(...)`
|
|
238
|
+
* and call `handleInteraction(...)` when the current phase reaches
|
|
239
|
+
* this view.
|
|
240
|
+
*
|
|
241
|
+
* @param {import("../utils/interaction.js").default} event
|
|
214
242
|
* @param {boolean} capturing
|
|
215
|
-
* @protected
|
|
216
243
|
*/
|
|
217
|
-
|
|
244
|
+
handleInteraction(event: import("../utils/interaction.js").default, capturing: boolean): void;
|
|
218
245
|
/**
|
|
219
|
-
*
|
|
220
|
-
* the view hierarchy.
|
|
246
|
+
* Registers an internal interaction listener.
|
|
221
247
|
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
248
|
+
* Interaction listeners are internal view-hierarchy hooks, not part of
|
|
249
|
+
* the supported embed API. They receive the refactored `Interaction`
|
|
250
|
+
* object directly, without the removed legacy `coords` argument.
|
|
224
251
|
*
|
|
225
252
|
* @param {string} type
|
|
226
|
-
* @param {
|
|
253
|
+
* @param {InteractionListener} listener
|
|
227
254
|
* @param {boolean} [useCapture]
|
|
228
255
|
*/
|
|
229
|
-
|
|
256
|
+
addInteractionListener(type: string, listener: InteractionListener, useCapture?: boolean): void;
|
|
230
257
|
/**
|
|
258
|
+
* Removes a previously registered interaction listener.
|
|
259
|
+
*
|
|
231
260
|
* @param {string} type
|
|
232
|
-
* @param {
|
|
261
|
+
* @param {InteractionListener} listener
|
|
233
262
|
* @param {boolean} [useCapture]
|
|
234
263
|
*/
|
|
235
|
-
|
|
264
|
+
removeInteractionListener(type: string, listener: InteractionListener, useCapture?: boolean): void;
|
|
236
265
|
/**
|
|
237
266
|
* Visits child views in depth-first order. Visitor's return value
|
|
238
267
|
* controls the traversal.
|
|
@@ -361,9 +390,9 @@ export default class View<TSpec extends import("../spec/view.js").ViewSpec = imp
|
|
|
361
390
|
* Broadcasts a message to views that include the given (x, y) point.
|
|
362
391
|
* This is mainly intended for mouse events.
|
|
363
392
|
*
|
|
364
|
-
* @param {import("../utils/
|
|
393
|
+
* @param {import("../utils/interaction.js").default} event
|
|
365
394
|
*/
|
|
366
|
-
|
|
395
|
+
propagateInteraction(event: import("../utils/interaction.js").default): void;
|
|
367
396
|
#private;
|
|
368
397
|
}
|
|
369
398
|
export function isStepSize(size: any): size is import("../spec/view.js").Step;
|
|
@@ -384,17 +413,34 @@ export type BroadcastMessage = {
|
|
|
384
413
|
*/
|
|
385
414
|
payload?: any;
|
|
386
415
|
};
|
|
387
|
-
|
|
416
|
+
/**
|
|
417
|
+
* Internal listener contract for view interactions.
|
|
418
|
+
*
|
|
419
|
+
* Listeners receive a single `Interaction` object. They are attached per
|
|
420
|
+
* event type and may run either in the capture phase or in the bubbling
|
|
421
|
+
* phase, depending on how the containing view routes the interaction.
|
|
422
|
+
*
|
|
423
|
+
* Ordinary pointer events are routed by container views, which may do hit
|
|
424
|
+
* testing, scrollbar dispatch, zoom policy, or other view-specific work
|
|
425
|
+
* before or after child propagation. In addition, `mouseenter` and
|
|
426
|
+
* `mouseleave` are synthesized by `InteractionDispatcher` from changes in the
|
|
427
|
+
* pointed view path.
|
|
428
|
+
*
|
|
429
|
+
* `stopPropagation()` prevents further routing to later views, but it does
|
|
430
|
+
* not provide DOM-style stop-immediate semantics for sibling listeners on the
|
|
431
|
+
* same view.
|
|
432
|
+
*/
|
|
433
|
+
export type InteractionListener = (event: import("../utils/interaction.js").default) => any;
|
|
388
434
|
export type ViewOptions = {
|
|
389
435
|
/**
|
|
390
436
|
* Don't inherit encodings from parent. Default: false.
|
|
391
437
|
*/
|
|
392
438
|
blockEncodingInheritance?: boolean;
|
|
393
439
|
/**
|
|
394
|
-
*
|
|
395
|
-
*
|
|
440
|
+
* Whether the view should introduce local layout-driven width/height params.
|
|
441
|
+
* Default: "own".
|
|
396
442
|
*/
|
|
397
|
-
|
|
443
|
+
layoutSizeParams?: "own" | "inherit";
|
|
398
444
|
};
|
|
399
445
|
import ViewParamRuntime from "../paramRuntime/viewParamRuntime.js";
|
|
400
446
|
import Padding from "./layout/padding.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/view/view.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/view/view.js"],"names":[],"mappings":"AA6BA,oBAAoB;AACpB,yBAA0B,YAAY,CAAC;AACvC,0BAA0B;AAC1B,yBAA0B,YAAY,CAAC;AAKvC;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH;;GAEG;AACH,0BAFmD,KAAK,SAA3C,OAAQ,iBAAiB,EAAE,QAAS;IAuD7C;;;;;;;;;OASG;IACH,kBARW,KAAK,WACL,OAAO,yBAAyB,EAAE,OAAO,gBACzC,OAAO,oBAAoB,EAAE,OAAO,cACpC,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,YACN,WAAW,EAgFrB;IA3ID,oBAAoB;IACpB,MADW,KAAK,CACX;IA4BL;;OAEG;IACH,iBAFU,CAAS,IAAM,EAAN,MAAM,KAAE,MAAM,CAEQ;IAYzC;;;;;OAKG;IACH,aAFU,GAAG,CAAC,GAAG,EAAE,OAAO,uBAAuB,EAAE,OAAO,CAAC,CAEX;IAiB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