@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
|
@@ -4,18 +4,13 @@ import RuleMark from "../marks/rule.js";
|
|
|
4
4
|
import LinkMark from "../marks/link.js";
|
|
5
5
|
import TextMark from "../marks/text.js";
|
|
6
6
|
|
|
7
|
-
import ScaleResolution from "../scales/scaleResolution.js";
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
primaryPositionalChannels,
|
|
8
|
+
getEncoderAccessors,
|
|
9
|
+
getEncoderDataAccessor,
|
|
12
10
|
getPrimaryChannel,
|
|
13
|
-
|
|
14
|
-
isPrimaryPositionalChannel,
|
|
15
|
-
isValueDefWithCondition,
|
|
11
|
+
primaryPositionalChannels,
|
|
16
12
|
} from "../encoder/encoder.js";
|
|
17
13
|
import { isScaleAccessor } from "../encoder/accessor.js";
|
|
18
|
-
import AxisResolution from "../scales/axisResolution.js";
|
|
19
14
|
import View from "./view.js";
|
|
20
15
|
import {
|
|
21
16
|
asSelectionConfig,
|
|
@@ -28,6 +23,8 @@ import { getEncodingSearchFields } from "../encoder/metadataChannels.js";
|
|
|
28
23
|
import { UNIQUE_ID_KEY } from "../data/transforms/identifier.js";
|
|
29
24
|
import { createEventFilterFunction } from "../utils/expression.js";
|
|
30
25
|
import { field } from "../utils/field.js";
|
|
26
|
+
import { collectDomainSensitiveScaleChannels } from "../data/flowNode.js";
|
|
27
|
+
import { resolveViewResolutions } from "./resolutionPlanner.js";
|
|
31
28
|
|
|
32
29
|
/**
|
|
33
30
|
*
|
|
@@ -42,6 +39,8 @@ export const markTypes = {
|
|
|
42
39
|
// @ts-ignore
|
|
43
40
|
rule: RuleMark,
|
|
44
41
|
// @ts-ignore
|
|
42
|
+
tick: RuleMark,
|
|
43
|
+
// @ts-ignore
|
|
45
44
|
link: LinkMark,
|
|
46
45
|
// @ts-ignore
|
|
47
46
|
text: TextMark,
|
|
@@ -97,13 +96,13 @@ export default class UnitView extends View {
|
|
|
97
96
|
throw new Error(`No such mark: ${this.getMarkType()}`);
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
this.resolve();
|
|
101
|
-
|
|
102
99
|
this.#zoomLevelSetter = this.paramRuntime.allocateSetter(
|
|
103
100
|
"zoomLevel",
|
|
104
101
|
1.0
|
|
105
102
|
);
|
|
106
103
|
|
|
104
|
+
this.resolve();
|
|
105
|
+
|
|
107
106
|
for (const channel of /** @type {import("../spec/channel.js").ChannelWithScale[]} */ ([
|
|
108
107
|
"x",
|
|
109
108
|
"y",
|
|
@@ -120,6 +119,16 @@ export default class UnitView extends View {
|
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
121
|
|
|
122
|
+
this.registerDisposer(
|
|
123
|
+
this._addBroadcastHandler("subtreeDataReady", () => {
|
|
124
|
+
for (const channel of primaryPositionalChannels) {
|
|
125
|
+
this.getScaleResolution(
|
|
126
|
+
channel
|
|
127
|
+
)?.syncLinkedSelectionFromDomain();
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
);
|
|
131
|
+
|
|
123
132
|
this.needsAxes = { x: true, y: true };
|
|
124
133
|
|
|
125
134
|
this.#setupPointSelection();
|
|
@@ -166,8 +175,7 @@ export default class UnitView extends View {
|
|
|
166
175
|
: () => true;
|
|
167
176
|
|
|
168
177
|
const listener = (
|
|
169
|
-
/** @type {
|
|
170
|
-
/** @type {import("../utils/interactionEvent.js").default} */ event
|
|
178
|
+
/** @type {import("../utils/interaction.js").default} */ event
|
|
171
179
|
) => {
|
|
172
180
|
if (!eventPredicate(event.proxiedMouseEvent)) {
|
|
173
181
|
return;
|
|
@@ -209,7 +217,7 @@ export default class UnitView extends View {
|
|
|
209
217
|
}
|
|
210
218
|
};
|
|
211
219
|
|
|
212
|
-
this.
|
|
220
|
+
this.addInteractionListener(
|
|
213
221
|
["mouseover", "pointerover"].includes(eventConfig.type)
|
|
214
222
|
? "mousemove"
|
|
215
223
|
: eventConfig.type,
|
|
@@ -222,8 +230,7 @@ export default class UnitView extends View {
|
|
|
222
230
|
: () => true;
|
|
223
231
|
|
|
224
232
|
const clearListener = (
|
|
225
|
-
/** @type {
|
|
226
|
-
/** @type {import("../utils/interactionEvent.js").default} */ event
|
|
233
|
+
/** @type {import("../utils/interaction.js").default} */ event
|
|
227
234
|
) => {
|
|
228
235
|
if (!clearPredicate(event.proxiedMouseEvent)) {
|
|
229
236
|
return;
|
|
@@ -235,7 +242,7 @@ export default class UnitView extends View {
|
|
|
235
242
|
setter(selection);
|
|
236
243
|
};
|
|
237
244
|
|
|
238
|
-
this.
|
|
245
|
+
this.addInteractionListener(
|
|
239
246
|
clearEventConfig.type,
|
|
240
247
|
clearListener
|
|
241
248
|
);
|
|
@@ -291,156 +298,13 @@ export default class UnitView extends View {
|
|
|
291
298
|
*
|
|
292
299
|
* @param {ResolutionTarget} [type] If not specified, both scales and axes are resolved.
|
|
293
300
|
*/
|
|
294
|
-
// eslint-disable-next-line complexity
|
|
295
301
|
resolve(type) {
|
|
296
302
|
if (!type) {
|
|
297
303
|
this.resolve("scale");
|
|
298
304
|
this.resolve("axis");
|
|
299
305
|
return;
|
|
300
306
|
}
|
|
301
|
-
|
|
302
|
-
// TODO: Complain about nonsensical configuration, e.g. shared parent has independent children.
|
|
303
|
-
|
|
304
|
-
const encoding = this.mark.encoding;
|
|
305
|
-
|
|
306
|
-
for (const [channel, channelDef] of Object.entries(encoding)) {
|
|
307
|
-
if (!channelDef) {
|
|
308
|
-
continue;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
if (Array.isArray(channelDef)) {
|
|
312
|
-
continue;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/** @type {import("../spec/channel.js").ChannelDefWithScale} */
|
|
316
|
-
let channelDefWithScale;
|
|
317
|
-
|
|
318
|
-
if (isChannelDefWithScale(channelDef)) {
|
|
319
|
-
channelDefWithScale = channelDef;
|
|
320
|
-
} else {
|
|
321
|
-
if (isValueDefWithCondition(channelDef)) {
|
|
322
|
-
const condition = channelDef.condition;
|
|
323
|
-
if (
|
|
324
|
-
!Array.isArray(condition) &&
|
|
325
|
-
isChannelDefWithScale(condition)
|
|
326
|
-
) {
|
|
327
|
-
// There's a single condition (maybe) with a scale
|
|
328
|
-
channelDefWithScale = condition;
|
|
329
|
-
} else {
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
} else {
|
|
333
|
-
continue;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
const targetChannel = getPrimaryChannel(
|
|
338
|
-
channelDefWithScale.resolutionChannel ?? channel
|
|
339
|
-
);
|
|
340
|
-
|
|
341
|
-
if (!isChannelWithScale(targetChannel)) {
|
|
342
|
-
continue;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (type == "axis" && !isPositionalChannel(targetChannel)) {
|
|
346
|
-
continue;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// eslint-disable-next-line consistent-this
|
|
350
|
-
let view = this;
|
|
351
|
-
while (
|
|
352
|
-
(view.getConfiguredOrDefaultResolution(targetChannel, type) ==
|
|
353
|
-
"forced" ||
|
|
354
|
-
(view.dataParent &&
|
|
355
|
-
["shared", "excluded", "forced"].includes(
|
|
356
|
-
view.dataParent.getConfiguredOrDefaultResolution(
|
|
357
|
-
targetChannel,
|
|
358
|
-
type
|
|
359
|
-
)
|
|
360
|
-
))) &&
|
|
361
|
-
view.getConfiguredOrDefaultResolution(targetChannel, type) !=
|
|
362
|
-
"excluded"
|
|
363
|
-
) {
|
|
364
|
-
// @ts-ignore
|
|
365
|
-
view = view.dataParent;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
// Quite a bit of redundancy, but makes type checker happy.
|
|
369
|
-
if (
|
|
370
|
-
type == "axis" &&
|
|
371
|
-
isPositionalChannel(channel) &&
|
|
372
|
-
isPrimaryPositionalChannel(targetChannel)
|
|
373
|
-
) {
|
|
374
|
-
if (!view.resolutions[type][targetChannel]) {
|
|
375
|
-
view.resolutions[type][targetChannel] = new AxisResolution(
|
|
376
|
-
targetChannel
|
|
377
|
-
);
|
|
378
|
-
}
|
|
379
|
-
const resolution = view.resolutions[type][targetChannel];
|
|
380
|
-
const unregister = resolution.registerMember({
|
|
381
|
-
view: this,
|
|
382
|
-
channel,
|
|
383
|
-
channelDef: channelDefWithScale,
|
|
384
|
-
});
|
|
385
|
-
this.registerDisposer(() => {
|
|
386
|
-
// Unregister returns true when it removed the last member.
|
|
387
|
-
if (
|
|
388
|
-
unregister() &&
|
|
389
|
-
view.resolutions[type][targetChannel] === resolution
|
|
390
|
-
) {
|
|
391
|
-
delete view.resolutions[type][targetChannel];
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
} else if (type == "scale" && isChannelWithScale(channel)) {
|
|
395
|
-
if (!view.resolutions[type][targetChannel]) {
|
|
396
|
-
const resolution = new ScaleResolution(targetChannel);
|
|
397
|
-
view.resolutions[type][targetChannel] = resolution;
|
|
398
|
-
|
|
399
|
-
const updateRangeTexture = (
|
|
400
|
-
/** @type {import("../types/scaleResolutionApi.js").ScaleResolutionEvent} */ event
|
|
401
|
-
) => {
|
|
402
|
-
// Create if WebGLHelper is available, i.e., if not running in headless mode.
|
|
403
|
-
// Domain changes can alter discrete texture sizes as well.
|
|
404
|
-
this.context.glHelper?.createRangeTexture(
|
|
405
|
-
event.scaleResolution,
|
|
406
|
-
true
|
|
407
|
-
);
|
|
408
|
-
};
|
|
409
|
-
resolution.addEventListener("range", updateRangeTexture);
|
|
410
|
-
resolution.addEventListener("domain", updateRangeTexture);
|
|
411
|
-
this.registerDisposer(() => {
|
|
412
|
-
resolution.removeEventListener(
|
|
413
|
-
"range",
|
|
414
|
-
updateRangeTexture
|
|
415
|
-
);
|
|
416
|
-
resolution.removeEventListener(
|
|
417
|
-
"domain",
|
|
418
|
-
updateRangeTexture
|
|
419
|
-
);
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
const contributesToDomain = !this.isDomainInert();
|
|
424
|
-
|
|
425
|
-
const resolution = view.resolutions[type][targetChannel];
|
|
426
|
-
const unregister = resolution.registerMember({
|
|
427
|
-
view: this,
|
|
428
|
-
channel,
|
|
429
|
-
channelDef: channelDefWithScale,
|
|
430
|
-
contributesToDomain,
|
|
431
|
-
});
|
|
432
|
-
this.registerDisposer(() => {
|
|
433
|
-
// Unregister returns true when it removed the last member.
|
|
434
|
-
if (
|
|
435
|
-
unregister() &&
|
|
436
|
-
view.resolutions[type][targetChannel] === resolution
|
|
437
|
-
) {
|
|
438
|
-
resolution.dispose();
|
|
439
|
-
delete view.resolutions[type][targetChannel];
|
|
440
|
-
}
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
}
|
|
307
|
+
resolveViewResolutions(this, type);
|
|
444
308
|
}
|
|
445
309
|
|
|
446
310
|
/**
|
|
@@ -462,7 +326,9 @@ export default class UnitView extends View {
|
|
|
462
326
|
if (!encoders) {
|
|
463
327
|
return undefined;
|
|
464
328
|
}
|
|
465
|
-
return encoders[channel]
|
|
329
|
+
return encoders[channel]
|
|
330
|
+
? getEncoderDataAccessor(encoders[channel])
|
|
331
|
+
: undefined;
|
|
466
332
|
}
|
|
467
333
|
|
|
468
334
|
/**
|
|
@@ -526,6 +392,9 @@ export default class UnitView extends View {
|
|
|
526
392
|
|
|
527
393
|
this.#domainSubscriptionsRegistered = true;
|
|
528
394
|
|
|
395
|
+
const domainDependentChannels =
|
|
396
|
+
collectDomainSensitiveScaleChannels(collector);
|
|
397
|
+
|
|
529
398
|
/** @type {Map<import("../scales/scaleResolution.js").default, Set<import("../types/encoder.js").ScaleAccessor>>} */
|
|
530
399
|
const accessorsByResolution = new Map();
|
|
531
400
|
|
|
@@ -534,7 +403,7 @@ export default class UnitView extends View {
|
|
|
534
403
|
continue;
|
|
535
404
|
}
|
|
536
405
|
|
|
537
|
-
const accessors = encoder
|
|
406
|
+
const accessors = getEncoderAccessors(encoder);
|
|
538
407
|
if (accessors.length === 0) {
|
|
539
408
|
continue;
|
|
540
409
|
}
|
|
@@ -543,9 +412,6 @@ export default class UnitView extends View {
|
|
|
543
412
|
if (!isScaleAccessor(accessor)) {
|
|
544
413
|
continue;
|
|
545
414
|
}
|
|
546
|
-
if (accessor.channelDef.domainInert) {
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
415
|
const resolution = this.getScaleResolution(
|
|
550
416
|
accessor.scaleChannel
|
|
551
417
|
);
|
|
@@ -555,6 +421,18 @@ export default class UnitView extends View {
|
|
|
555
421
|
accessor.scaleChannel
|
|
556
422
|
);
|
|
557
423
|
}
|
|
424
|
+
if (accessor.channelDef.domainInert) {
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (
|
|
428
|
+
createsDomainFeedback(
|
|
429
|
+
accessor,
|
|
430
|
+
resolution,
|
|
431
|
+
domainDependentChannels
|
|
432
|
+
)
|
|
433
|
+
) {
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
558
436
|
|
|
559
437
|
let accessorsForResolution =
|
|
560
438
|
accessorsByResolution.get(resolution);
|
|
@@ -592,17 +470,17 @@ export default class UnitView extends View {
|
|
|
592
470
|
}
|
|
593
471
|
|
|
594
472
|
/**
|
|
595
|
-
* @param {import("../utils/
|
|
473
|
+
* @param {import("../utils/interaction.js").default} event
|
|
596
474
|
*/
|
|
597
|
-
|
|
598
|
-
this.
|
|
475
|
+
propagateInteraction(event) {
|
|
476
|
+
this.handleInteraction(event, true);
|
|
599
477
|
event.target = this;
|
|
600
478
|
|
|
601
479
|
if (event.stopped) {
|
|
602
480
|
return;
|
|
603
481
|
}
|
|
604
482
|
|
|
605
|
-
this.
|
|
483
|
+
this.handleInteraction(event, false);
|
|
606
484
|
}
|
|
607
485
|
|
|
608
486
|
/**
|
|
@@ -615,3 +493,28 @@ export default class UnitView extends View {
|
|
|
615
493
|
return channel == "x" ? "shared" : "independent";
|
|
616
494
|
}
|
|
617
495
|
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Returns true when subscribing this accessor as a domain contributor would
|
|
499
|
+
* create a feedback loop: the current scale domain already affects the
|
|
500
|
+
* collector output upstream, so the derived values must not feed back into
|
|
501
|
+
* the same shared-domain resolution.
|
|
502
|
+
*
|
|
503
|
+
* Example: `filterScoredLabels` recomputes visible labels from the current
|
|
504
|
+
* x-domain, so downstream label x positions must not contribute to x-domain.
|
|
505
|
+
*
|
|
506
|
+
* @param {import("../types/encoder.js").ScaleAccessor} accessor
|
|
507
|
+
* @param {import("../scales/scaleResolution.js").default} resolution
|
|
508
|
+
* @param {Set<import("../spec/channel.js").ChannelWithScale>} domainDependentChannels
|
|
509
|
+
* @returns {boolean}
|
|
510
|
+
*/
|
|
511
|
+
function createsDomainFeedback(accessor, resolution, domainDependentChannels) {
|
|
512
|
+
return (
|
|
513
|
+
!resolution.isDomainDefinedExplicitly() &&
|
|
514
|
+
domainDependentChannels.has(
|
|
515
|
+
/** @type {import("../spec/channel.js").ChannelWithScale} */ (
|
|
516
|
+
getPrimaryChannel(accessor.scaleChannel)
|
|
517
|
+
)
|
|
518
|
+
)
|
|
519
|
+
);
|
|
520
|
+
}
|
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,EAiFrB;IA5ID,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;IAiB5C,mDAAsB;IACtB,4FAAgC;IAChC,qDAA4B;IAmB5B;QACI;;;WAGG;eADO,OAAO,CAAC,MAAM,CAAC,OAAO,oBAAoB,EAAE,gBAAgB,EAAE,OAAO,8BAA8B,EAAE,OAAO,CAAC,CAAC;QAGxH;;;WAGG;cADO,OAAO,CAAC,MAAM,CAAC,OAAO,oBAAoB,EAAE,w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