@genome-spy/core 0.37.4 → 0.39.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/__vite-browser-external-ENoMJThg.js +8 -0
- package/dist/bundle/_commonjsHelpers-QtkX90xp.js +30 -0
- package/dist/bundle/index-1QVesMzU.js +1074 -0
- package/dist/bundle/index-Cbz74kpR.js +638 -0
- package/dist/bundle/index-LD6yPc3X.js +515 -0
- package/dist/bundle/index-Pv3tKJ1W.js +2190 -0
- package/dist/bundle/index-UyrC0vvF.js +72 -0
- package/dist/bundle/index-Y-LdHNIz.js +501 -0
- package/dist/bundle/index-gn8bhQ8w.js +4050 -0
- package/dist/bundle/index-lmJu1tfP.js +1372 -0
- package/dist/bundle/index-z4Cs62EO.js +279 -0
- package/dist/bundle/index.es.js +6467 -20590
- package/dist/bundle/index.js +92 -123
- package/dist/bundle/long-Veu0zKh9.js +2382 -0
- package/dist/bundle/remoteFile-Ur-gRKsH.js +96 -0
- package/dist/schema.json +524 -122
- package/dist/src/data/collector.d.ts +11 -11
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +8 -8
- package/dist/src/data/dataFlow.d.ts +18 -18
- package/dist/src/data/dataFlow.d.ts.map +1 -1
- package/dist/src/data/dataFlow.js +7 -7
- package/dist/src/data/flowNode.d.ts +9 -9
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +5 -5
- package/dist/src/data/flowOptimizer.d.ts +11 -11
- package/dist/src/data/flowOptimizer.d.ts.map +1 -1
- package/dist/src/data/flowOptimizer.js +7 -7
- package/dist/src/data/flowTestUtils.d.ts +2 -2
- package/dist/src/data/flowTestUtils.d.ts.map +1 -1
- package/dist/src/data/flowTestUtils.js +1 -1
- package/dist/src/data/sources/dataSource.js +1 -1
- package/dist/src/data/sources/dataSourceFactory.d.ts +3 -3
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +20 -20
- package/dist/src/data/sources/dataUtils.d.ts +20 -20
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +11 -11
- package/dist/src/data/sources/dynamic/axisGenomeSource.d.ts +3 -3
- package/dist/src/data/sources/dynamic/axisGenomeSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/axisGenomeSource.js +2 -2
- package/dist/src/data/sources/dynamic/axisTickSource.d.ts +6 -6
- package/dist/src/data/sources/dynamic/axisTickSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/axisTickSource.js +4 -4
- package/dist/src/data/sources/dynamic/bamSource.d.ts +7 -13
- package/dist/src/data/sources/dynamic/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bamSource.js +35 -27
- package/dist/src/data/sources/dynamic/bigBedSource.d.ts +9 -9
- package/dist/src/data/sources/dynamic/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bigBedSource.js +31 -18
- package/dist/src/data/sources/dynamic/bigWigSource.d.ts +7 -7
- package/dist/src/data/sources/dynamic/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bigWigSource.js +33 -26
- package/dist/src/data/sources/dynamic/gff3Source.d.ts +9 -0
- package/dist/src/data/sources/dynamic/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/gff3Source.js +17 -2
- package/dist/src/data/sources/dynamic/indexedFastaSource.d.ts +6 -9
- package/dist/src/data/sources/dynamic/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/indexedFastaSource.js +28 -18
- package/dist/src/data/sources/dynamic/singleAxisLazySource.d.ts +10 -10
- package/dist/src/data/sources/dynamic/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/singleAxisLazySource.js +6 -6
- package/dist/src/data/sources/dynamic/tabixSource.d.ts +11 -8
- package/dist/src/data/sources/dynamic/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/tabixSource.js +31 -17
- package/dist/src/data/sources/inlineSource.d.ts +7 -7
- package/dist/src/data/sources/inlineSource.d.ts.map +1 -1
- package/dist/src/data/sources/inlineSource.js +5 -5
- package/dist/src/data/sources/namedSource.d.ts +9 -9
- package/dist/src/data/sources/namedSource.d.ts.map +1 -1
- package/dist/src/data/sources/namedSource.js +6 -6
- package/dist/src/data/sources/sequenceSource.d.ts +7 -7
- package/dist/src/data/sources/sequenceSource.d.ts.map +1 -1
- package/dist/src/data/sources/sequenceSource.js +4 -4
- package/dist/src/data/sources/urlSource.d.ts +7 -7
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +4 -4
- package/dist/src/data/transforms/aggregate.d.ts +3 -3
- package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregate.js +2 -2
- package/dist/src/data/transforms/clone.d.ts +2 -2
- package/dist/src/data/transforms/clone.d.ts.map +1 -1
- package/dist/src/data/transforms/clone.js +1 -1
- package/dist/src/data/transforms/coverage.d.ts +3 -3
- package/dist/src/data/transforms/coverage.d.ts.map +1 -1
- package/dist/src/data/transforms/coverage.js +1 -1
- package/dist/src/data/transforms/coverage.test.js +1 -1
- package/dist/src/data/transforms/filter.d.ts +3 -3
- package/dist/src/data/transforms/filter.d.ts.map +1 -1
- package/dist/src/data/transforms/filter.js +2 -2
- package/dist/src/data/transforms/filter.test.js +1 -1
- package/dist/src/data/transforms/filterScoredLabels.d.ts +4 -4
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +3 -3
- package/dist/src/data/transforms/flatten.d.ts +2 -2
- package/dist/src/data/transforms/flatten.d.ts.map +1 -1
- package/dist/src/data/transforms/flatten.js +3 -3
- package/dist/src/data/transforms/flatten.test.js +6 -6
- package/dist/src/data/transforms/flattenCompressedExons.d.ts +2 -2
- package/dist/src/data/transforms/flattenCompressedExons.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenCompressedExons.js +1 -1
- package/dist/src/data/transforms/flattenDelimited.d.ts +2 -2
- package/dist/src/data/transforms/flattenDelimited.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenDelimited.js +2 -2
- package/dist/src/data/transforms/flattenDelimited.test.js +5 -5
- package/dist/src/data/transforms/flattenSequence.d.ts +2 -2
- package/dist/src/data/transforms/flattenSequence.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenSequence.js +1 -1
- package/dist/src/data/transforms/flattenSequence.test.js +1 -1
- package/dist/src/data/transforms/formula.d.ts +3 -3
- package/dist/src/data/transforms/formula.d.ts.map +1 -1
- package/dist/src/data/transforms/formula.js +2 -2
- package/dist/src/data/transforms/identifier.d.ts +3 -3
- package/dist/src/data/transforms/identifier.d.ts.map +1 -1
- package/dist/src/data/transforms/identifier.js +2 -2
- package/dist/src/data/transforms/linearizeGenomicCoordinate.d.ts +3 -3
- package/dist/src/data/transforms/linearizeGenomicCoordinate.d.ts.map +1 -1
- package/dist/src/data/transforms/linearizeGenomicCoordinate.js +2 -2
- package/dist/src/data/transforms/measureText.d.ts +2 -2
- package/dist/src/data/transforms/measureText.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +1 -1
- package/dist/src/data/transforms/pileup.d.ts +3 -3
- package/dist/src/data/transforms/pileup.d.ts.map +1 -1
- package/dist/src/data/transforms/pileup.js +1 -1
- package/dist/src/data/transforms/pileup.test.js +1 -1
- package/dist/src/data/transforms/project.d.ts +2 -2
- package/dist/src/data/transforms/project.d.ts.map +1 -1
- package/dist/src/data/transforms/project.js +1 -1
- package/dist/src/data/transforms/project.test.js +1 -1
- package/dist/src/data/transforms/regexExtract.d.ts +2 -2
- package/dist/src/data/transforms/regexExtract.d.ts.map +1 -1
- package/dist/src/data/transforms/regexExtract.js +1 -1
- package/dist/src/data/transforms/regexExtract.test.js +3 -3
- package/dist/src/data/transforms/regexFold.d.ts +2 -2
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +2 -2
- package/dist/src/data/transforms/regexFold.test.js +3 -3
- package/dist/src/data/transforms/sample.d.ts +2 -2
- package/dist/src/data/transforms/sample.d.ts.map +1 -1
- package/dist/src/data/transforms/sample.js +2 -2
- package/dist/src/data/transforms/stack.d.ts +3 -3
- package/dist/src/data/transforms/stack.d.ts.map +1 -1
- package/dist/src/data/transforms/stack.js +2 -2
- package/dist/src/data/transforms/stack.test.js +2 -2
- package/dist/src/data/transforms/transformFactory.d.ts +5 -5
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/data/transforms/transformFactory.js +3 -3
- package/dist/src/encoder/accessor.d.ts +6 -6
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +4 -4
- package/dist/src/encoder/encoder.d.ts +59 -59
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +47 -42
- package/dist/src/encoder/encoder.test.js +4 -4
- package/dist/src/fonts/bmFontManager.d.ts +7 -7
- package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
- package/dist/src/fonts/bmFontManager.js +3 -3
- package/dist/src/fonts/bmFontMetrics.d.ts +6 -6
- package/dist/src/fonts/bmFontMetrics.d.ts.map +1 -1
- package/dist/src/fonts/bmFontMetrics.js +4 -4
- package/dist/src/genome/genome.d.ts +7 -7
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +2 -2
- package/dist/src/genome/genomeStore.d.ts +2 -2
- package/dist/src/genome/genomeStore.d.ts.map +1 -1
- package/dist/src/genome/genomeStore.js +1 -1
- package/dist/src/genome/locusFormat.d.ts +7 -7
- package/dist/src/genome/locusFormat.d.ts.map +1 -1
- package/dist/src/genome/locusFormat.js +4 -4
- package/dist/src/genome/scaleIndex.d.ts +1 -1
- package/dist/src/genome/scaleIndex.d.ts.map +1 -1
- package/dist/src/genome/scaleIndex.js +1 -1
- package/dist/src/genome/scaleLocus.d.ts +2 -2
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +3 -3
- package/dist/src/genomeSpy.d.ts +12 -12
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +51 -34
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.d.ts +19 -19
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +11 -11
- package/dist/src/gl/link.vertex.glsl.js +1 -1
- package/dist/src/gl/point.fragment.glsl.js +1 -1
- package/dist/src/gl/point.vertex.glsl.js +1 -1
- package/dist/src/gl/webGLHelper.d.ts +4 -4
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +35 -14
- package/dist/src/marks/mark.d.ts +35 -32
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +26 -23
- package/dist/src/marks/markUtils.d.ts +10 -10
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +5 -5
- package/dist/src/marks/pointMark.d.ts +1 -1
- package/dist/src/marks/pointMark.d.ts.map +1 -1
- package/dist/src/marks/pointMark.js +7 -7
- package/dist/src/marks/rectMark.d.ts +2 -2
- package/dist/src/marks/rectMark.d.ts.map +1 -1
- package/dist/src/marks/rectMark.js +7 -7
- package/dist/src/marks/rule.js +6 -6
- package/dist/src/marks/text.d.ts +1 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +6 -6
- package/dist/src/scale/colorUtils.d.ts +4 -4
- package/dist/src/scale/colorUtils.d.ts.map +1 -1
- package/dist/src/scale/colorUtils.js +2 -2
- package/dist/src/scale/glslScaleGenerator.d.ts +3 -3
- package/dist/src/scale/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/scale/glslScaleGenerator.js +2 -2
- package/dist/src/scale/scale.d.ts +3 -3
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +2 -2
- package/dist/src/scale/ticks.d.ts +4 -4
- package/dist/src/scale/ticks.js +4 -4
- package/dist/src/spec/axis.d.ts +1 -1
- package/dist/src/spec/channel.d.ts +2 -2
- package/dist/src/spec/data.d.ts +2 -2
- package/dist/src/spec/mark.d.ts +36 -14
- package/dist/src/spec/root.d.ts +2 -2
- package/dist/src/spec/sampleView.d.ts +5 -5
- package/dist/src/spec/scale.d.ts +1 -1
- package/dist/src/spec/title.d.ts +1 -1
- package/dist/src/spec/view.d.ts +36 -9
- package/dist/src/tooltip/dataTooltipHandler.js +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.js +1 -1
- package/dist/src/tooltip/tooltipHandler.d.ts +1 -1
- package/dist/src/tooltip/tooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/tooltipHandler.ts +1 -1
- package/dist/src/types/embedApi.d.ts +3 -3
- package/dist/src/types/encoder.d.ts +4 -4
- package/dist/src/types/flowBatch.d.ts +1 -1
- package/dist/src/types/rendering.d.ts +3 -3
- package/dist/src/types/scaleResolutionApi.d.ts +2 -2
- package/dist/src/types/viewContext.d.ts +41 -12
- package/dist/src/utils/animator.d.ts +2 -2
- package/dist/src/utils/animator.d.ts.map +1 -1
- package/dist/src/utils/animator.js +1 -1
- package/dist/src/utils/inertia.d.ts +3 -3
- package/dist/src/utils/inertia.d.ts.map +1 -1
- package/dist/src/utils/inertia.js +1 -1
- package/dist/src/utils/interactionEvent.d.ts +5 -5
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +2 -2
- package/dist/src/utils/trees.js +1 -1
- package/dist/src/view/axisGridView.d.ts +17 -16
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +24 -20
- package/dist/src/view/axisResolution.d.ts +10 -10
- package/dist/src/view/axisResolution.d.ts.map +1 -1
- package/dist/src/view/axisResolution.js +6 -6
- package/dist/src/view/axisResolution.test.js +1 -1
- package/dist/src/view/axisView.d.ts +18 -17
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +39 -35
- package/dist/src/view/concatView.d.ts +5 -5
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +23 -23
- package/dist/src/view/containerView.d.ts +10 -8
- package/dist/src/view/containerView.d.ts.map +1 -1
- package/dist/src/view/containerView.js +18 -13
- package/dist/src/view/facetView.d.ts +12 -12
- package/dist/src/view/facetView.d.ts.map +1 -1
- package/dist/src/view/facetView.js +19 -19
- package/dist/src/view/flowBuilder.d.ts +4 -4
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +13 -13
- package/dist/src/view/flowBuilder.test.js +7 -7
- package/dist/src/view/gridView.d.ts +63 -35
- package/dist/src/view/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView.js +400 -113
- package/dist/src/view/layerView.d.ts +12 -14
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +55 -26
- package/dist/src/{utils → view}/layout/flexLayout.d.ts +6 -6
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/flexLayout.js +4 -4
- package/dist/src/view/layout/grid.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/padding.d.ts +4 -4
- package/dist/src/view/layout/padding.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/padding.js +2 -2
- package/dist/src/view/layout/point.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/rectangle.d.ts +8 -2
- package/dist/src/view/layout/rectangle.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/rectangle.js +22 -2
- package/dist/src/{utils → view}/layout/rectangle.test.js +8 -0
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts +10 -10
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +10 -10
- package/dist/src/view/renderingContext/compositeViewRenderingContext.d.ts +2 -2
- package/dist/src/view/renderingContext/compositeViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/compositeViewRenderingContext.js +4 -4
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.d.ts +4 -4
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.js +3 -3
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.d.ts +8 -8
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.js +4 -4
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts +6 -6
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/simpleViewRenderingContext.js +7 -7
- package/dist/src/view/renderingContext/svgViewRenderingContext.d.ts +4 -4
- package/dist/src/view/renderingContext/svgViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/svgViewRenderingContext.js +6 -6
- package/dist/src/view/renderingContext/viewRenderingContext.d.ts +10 -10
- package/dist/src/view/renderingContext/viewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/viewRenderingContext.js +5 -5
- package/dist/src/view/scaleResolution.d.ts +21 -17
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +33 -26
- package/dist/src/view/scaleResolution.test.js +57 -72
- package/dist/src/view/testUtils.d.ts +6 -15
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +40 -44
- package/dist/src/view/title.d.ts +3 -3
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +12 -12
- package/dist/src/view/unitView.d.ts +31 -30
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +30 -22
- package/dist/src/view/view.d.ts +86 -57
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +148 -103
- package/dist/src/view/view.test.js +9 -8
- package/dist/src/view/viewError.d.ts +9 -0
- package/dist/src/view/viewError.d.ts.map +1 -0
- package/dist/src/view/viewError.js +11 -0
- package/dist/src/view/viewFactory.d.ts +53 -20
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +148 -33
- package/dist/src/view/viewFactory.test.js +8 -0
- package/dist/src/view/viewUtils.d.ts +14 -12
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +10 -63
- package/dist/src/view/zoom.d.ts +4 -4
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +3 -3
- package/package.json +7 -5
- package/dist/src/utils/layout/flexLayout.d.ts.map +0 -1
- package/dist/src/utils/layout/grid.d.ts.map +0 -1
- package/dist/src/utils/layout/padding.d.ts.map +0 -1
- package/dist/src/utils/layout/point.d.ts.map +0 -1
- package/dist/src/utils/layout/rectangle.d.ts.map +0 -1
- package/dist/src/view/implicitRootView.d.ts +0 -9
- package/dist/src/view/implicitRootView.d.ts.map +0 -1
- package/dist/src/view/implicitRootView.js +0 -23
- package/dist/src/view/importView.d.ts +0 -17
- package/dist/src/view/importView.d.ts.map +0 -1
- package/dist/src/view/importView.js +0 -22
- /package/dist/src/{utils → view}/layout/flexLayout.test.js +0 -0
- /package/dist/src/{utils → view}/layout/grid.d.ts +0 -0
- /package/dist/src/{utils → view}/layout/grid.js +0 -0
- /package/dist/src/{utils → view}/layout/grid.test.js +0 -0
- /package/dist/src/{utils → view}/layout/point.d.ts +0 -0
- /package/dist/src/{utils → view}/layout/point.js +0 -0
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
export default class LayerView extends ContainerView {
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {import("./view").default} View
|
|
4
|
-
*/
|
|
5
2
|
/**
|
|
6
3
|
*
|
|
7
|
-
* @param {import("../spec/view").LayerSpec} spec
|
|
8
|
-
* @param {import("../types/viewContext").default} context
|
|
4
|
+
* @param {import("../spec/view.js").LayerSpec} spec
|
|
5
|
+
* @param {import("../types/viewContext.js").default} context
|
|
9
6
|
* @param {ContainerView} layoutParent
|
|
10
|
-
* @param {import("./view").default} dataParent
|
|
7
|
+
* @param {import("./view.js").default} dataParent
|
|
11
8
|
* @param {string} name
|
|
9
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
12
10
|
*/
|
|
13
|
-
constructor(spec: import("../spec/view").LayerSpec, context: import("../types/viewContext").default, layoutParent: ContainerView, dataParent: import("./view").default, name: string);
|
|
14
|
-
spec: import("../spec/view").LayerSpec;
|
|
15
|
-
|
|
16
|
-
children: (LayerView | import("./unitView").default)[];
|
|
11
|
+
constructor(spec: import("../spec/view.js").LayerSpec, context: import("../types/viewContext.js").default, layoutParent: ContainerView, dataParent: import("./view.js").default, name: string, options?: import("./view.js").ViewOptions);
|
|
12
|
+
spec: import("../spec/view.js").LayerSpec;
|
|
13
|
+
get children(): (import("./unitView.js").default | LayerView)[];
|
|
17
14
|
/**
|
|
18
|
-
* @param {import("./renderingContext/viewRenderingContext").default} context
|
|
19
|
-
* @param {import("
|
|
20
|
-
* @param {import("../types/rendering").RenderingOptions} [options]
|
|
15
|
+
* @param {import("./renderingContext/viewRenderingContext.js").default} context
|
|
16
|
+
* @param {import("./layout/rectangle.js").default} coords
|
|
17
|
+
* @param {import("../types/rendering.js").RenderingOptions} [options]
|
|
21
18
|
*/
|
|
22
|
-
render(context: import("./renderingContext/viewRenderingContext").default, coords: import("
|
|
19
|
+
render(context: import("./renderingContext/viewRenderingContext.js").default, coords: import("./layout/rectangle.js").default, options?: import("../types/rendering.js").RenderingOptions): void;
|
|
20
|
+
#private;
|
|
23
21
|
}
|
|
24
22
|
import ContainerView from "./containerView.js";
|
|
25
23
|
//# sourceMappingURL=layerView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layerView.d.ts","sourceRoot":"","sources":["../../../src/view/layerView.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layerView.d.ts","sourceRoot":"","sources":["../../../src/view/layerView.js"],"names":[],"mappings":"AAIA;IAQI;;;;;;;;OAQG;IACH,kBAPW,OAAO,iBAAiB,EAAE,SAAS,WACnC,OAAO,yBAAyB,EAAE,OAAO,gBACzC,aAAa,cACb,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,YACN,OAAO,WAAW,EAAE,WAAW,EAQzC;IAHG,0CAAgB;IAoCpB,gEAEC;IAWD;;;;OAIG;IACH,gBAJW,OAAO,4CAA4C,EAAE,OAAO,UAC5D,OAAO,uBAAuB,EAAE,OAAO,YACvC,OAAO,uBAAuB,EAAE,gBAAgB,QAc1D;;CAeJ;0BAxGyB,oBAAoB"}
|
|
@@ -1,51 +1,80 @@
|
|
|
1
1
|
import { isLayerSpec, isUnitSpec } from "./viewFactory.js";
|
|
2
2
|
import ContainerView from "./containerView.js";
|
|
3
|
+
import ViewError from "./viewError.js";
|
|
3
4
|
|
|
4
5
|
export default class LayerView extends ContainerView {
|
|
5
6
|
/**
|
|
6
|
-
* @typedef {import("./view").default} View
|
|
7
|
+
* @typedef {import("./view.js").default} View
|
|
7
8
|
*/
|
|
9
|
+
|
|
10
|
+
/** @type {(LayerView | import("./unitView.js").default)[]} */
|
|
11
|
+
#children = [];
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
*
|
|
10
|
-
* @param {import("../spec/view").LayerSpec} spec
|
|
11
|
-
* @param {import("../types/viewContext").default} context
|
|
15
|
+
* @param {import("../spec/view.js").LayerSpec} spec
|
|
16
|
+
* @param {import("../types/viewContext.js").default} context
|
|
12
17
|
* @param {ContainerView} layoutParent
|
|
13
|
-
* @param {import("./view").default} dataParent
|
|
18
|
+
* @param {import("./view.js").default} dataParent
|
|
14
19
|
* @param {string} name
|
|
20
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
15
21
|
*/
|
|
16
|
-
constructor(spec, context, layoutParent, dataParent, name) {
|
|
17
|
-
super(spec, context, layoutParent, dataParent, name);
|
|
22
|
+
constructor(spec, context, layoutParent, dataParent, name, options) {
|
|
23
|
+
super(spec, context, layoutParent, dataParent, name, options);
|
|
18
24
|
|
|
19
25
|
this.spec = spec;
|
|
20
26
|
|
|
21
|
-
/** @type {(LayerView | import("./unitView").default)[]} */
|
|
22
|
-
// @ts-expect-error TODO: Fix typing
|
|
23
|
-
this.children = (spec.layer || []).map((childSpec, i) => {
|
|
24
|
-
if (isLayerSpec(childSpec) || isUnitSpec(childSpec)) {
|
|
25
|
-
return context.createView(childSpec, this, this, "layer" + i);
|
|
26
|
-
} else {
|
|
27
|
-
throw new Error(
|
|
28
|
-
"LayerView accepts only unit or layer specs as children!"
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
27
|
this.needsAxes = { x: true, y: true };
|
|
34
28
|
}
|
|
35
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @override
|
|
32
|
+
*/
|
|
33
|
+
async initializeChildren() {
|
|
34
|
+
this.#children = await Promise.all(
|
|
35
|
+
this.spec.layer.map(
|
|
36
|
+
(childSpec, i) =>
|
|
37
|
+
/** @type {(Promise<LayerView | import("./unitView.js").default>)} */ (
|
|
38
|
+
this.context.createOrImportView(
|
|
39
|
+
childSpec,
|
|
40
|
+
this,
|
|
41
|
+
this,
|
|
42
|
+
"grid" + i,
|
|
43
|
+
(importedSpec) => {
|
|
44
|
+
if (
|
|
45
|
+
!isLayerSpec(importedSpec) &&
|
|
46
|
+
!isUnitSpec(importedSpec)
|
|
47
|
+
) {
|
|
48
|
+
throw new ViewError(
|
|
49
|
+
"LayerView accepts only unit or layer specs as children!",
|
|
50
|
+
this
|
|
51
|
+
);
|
|
52
|
+
// TODO: Add view to exception
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
get children() {
|
|
62
|
+
return this.#children.slice();
|
|
63
|
+
}
|
|
64
|
+
|
|
36
65
|
/**
|
|
37
66
|
* @returns {IterableIterator<View>}
|
|
38
67
|
*/
|
|
39
68
|
*[Symbol.iterator]() {
|
|
40
|
-
for (const child of this
|
|
69
|
+
for (const child of this.#children) {
|
|
41
70
|
yield child;
|
|
42
71
|
}
|
|
43
72
|
}
|
|
44
73
|
|
|
45
74
|
/**
|
|
46
|
-
* @param {import("./renderingContext/viewRenderingContext").default} context
|
|
47
|
-
* @param {import("
|
|
48
|
-
* @param {import("../types/rendering").RenderingOptions} [options]
|
|
75
|
+
* @param {import("./renderingContext/viewRenderingContext.js").default} context
|
|
76
|
+
* @param {import("./layout/rectangle.js").default} coords
|
|
77
|
+
* @param {import("../types/rendering.js").RenderingOptions} [options]
|
|
49
78
|
*/
|
|
50
79
|
render(context, coords, options = {}) {
|
|
51
80
|
if (!this.isConfiguredVisible()) {
|
|
@@ -54,7 +83,7 @@ export default class LayerView extends ContainerView {
|
|
|
54
83
|
|
|
55
84
|
context.pushView(this, coords);
|
|
56
85
|
|
|
57
|
-
for (const child of this
|
|
86
|
+
for (const child of this.#children) {
|
|
58
87
|
child.render(context, coords, options);
|
|
59
88
|
}
|
|
60
89
|
|
|
@@ -62,12 +91,12 @@ export default class LayerView extends ContainerView {
|
|
|
62
91
|
}
|
|
63
92
|
|
|
64
93
|
/**
|
|
65
|
-
* @param {import("../utils/interactionEvent").default} event
|
|
94
|
+
* @param {import("../utils/interactionEvent.js").default} event
|
|
66
95
|
*/
|
|
67
96
|
propagateInteractionEvent(event) {
|
|
68
97
|
this.handleInteractionEvent(undefined, event, true);
|
|
69
|
-
for (let i = this
|
|
70
|
-
this
|
|
98
|
+
for (let i = this.#children.length - 1; i >= 0; i--) {
|
|
99
|
+
this.#children[i].propagateInteractionEvent(event);
|
|
71
100
|
if (event.stopped) {
|
|
72
101
|
return;
|
|
73
102
|
}
|
|
@@ -66,10 +66,10 @@ export function isZeroSizeDef(sizeDef: SizeDef): boolean;
|
|
|
66
66
|
export function isSizeDef(spec: any): spec is SizeDef;
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
|
-
* @param {"container" | number | SizeDef | import("../../spec/view").Step} size
|
|
69
|
+
* @param {"container" | number | SizeDef | import("../../spec/view.js").Step} size
|
|
70
70
|
* @returns {SizeDef}
|
|
71
71
|
*/
|
|
72
|
-
export function parseSizeDef(size: "container" | number | SizeDef | import("../../spec/view").Step): SizeDef;
|
|
72
|
+
export function parseSizeDef(size: "container" | number | SizeDef | import("../../spec/view.js").Step): SizeDef;
|
|
73
73
|
/**
|
|
74
74
|
* Interpolates between two LocSizes
|
|
75
75
|
*
|
|
@@ -114,15 +114,15 @@ export class FlexDimensions {
|
|
|
114
114
|
/**
|
|
115
115
|
* Adds padding to absolute (px) dimensions
|
|
116
116
|
*
|
|
117
|
-
* @param {import("./padding").default} padding
|
|
117
|
+
* @param {import("./padding.js").default} padding
|
|
118
118
|
*/
|
|
119
|
-
addPadding(padding: import("./padding").default): FlexDimensions;
|
|
119
|
+
addPadding(padding: import("./padding.js").default): FlexDimensions;
|
|
120
120
|
/**
|
|
121
121
|
* Subtracts padding from absolute (px) dimensions
|
|
122
122
|
*
|
|
123
|
-
* @param {import("./padding").default} padding
|
|
123
|
+
* @param {import("./padding.js").default} padding
|
|
124
124
|
*/
|
|
125
|
-
subtractPadding(padding: import("./padding").default): FlexDimensions;
|
|
125
|
+
subtractPadding(padding: import("./padding.js").default): FlexDimensions;
|
|
126
126
|
#private;
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flexLayout.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/flexLayout.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wCALW,OAAO,EAAE,iBACT,MAAM,mDACN,WAAW,GACT,OAAO,EAAE,CAqGrB;AAED;;;;;GAKG;AACH,sCAHW,SAAS,OAAO,CAAC,gBACjB,WAAW,UAQrB;AAED;;;GAGG;AACH,sCAHW,SAAS,OAAO,CAAC,GACf,OAAO,CAWnB;AAED;;;GAGG;AACH,oCAFW,OAAO,EAAE,WAInB;AAED;;;GAGG;AACH,sCAFW,OAAO,EAAE;;;EASnB;AAmED;;;;GAIG;AACH,uCAFW,OAAO,WAIjB;AAWD;;;;GAIG;AACH,sDAEC;AAED;;;;GAIG;AACH,mCAHW,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,oBAAoB,EAAE,IAAI,GAChE,OAAO,CAiBnB;AAID;;;;;;;GAOG;AACH,0CALW,OAAO,MACP,OAAO,eACI,MAAM,GACf,OAAO,CA4BnB;AAED;;;;;;GAMG;AACH,0CAJW,OAAO,UACP,MAAM,UAAc,MAAM,CAAA,GACxB,OAAO,CAanB;AAED;;;;;;GAMG;AACH,sCAJW,OAAO,UACP,MAAM,UAAc,MAAM,CAAA,GACxB,OAAO,CAanB;AAED;;;GAGG;AACH,yCAHW,OAAO,SACP,MAAM,WAIhB;AAtMD;IACI;;;;OAIG;IACH,mBAHW,OAAO,UACP,OAAO,EAQjB;IAJG,gBAAgB;IAChB,wBAAkB;IAClB,gBAAgB;IAChB,yBAAoB;IAGxB;;;;OAIG;IACH,oBAFW,OAAO,cAAc,EAAE,OAAO,kBAIxC;IAED;;;;OAIG;IACH,yBAFW,OAAO,cAAc,EAAE,OAAO,kBAIxC;;CAkBJ;AAED;;;;GAIG;AACH,2BAFU,OAAO,CAKd;AAEH,iDAGE;;;;;;;;SAzOQ,MAAM;;;;WACN,MAAM;;;;;;cAGN,MAAM;UACN,MAAM;;;;;;;;;;;;;;cAGN,MAAM;;;;;uBACN,MAAM;;;;aAEN,MAAM;;;;cACN,OAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNumber } from "vega-util";
|
|
2
|
-
import { isStepSize } from "
|
|
2
|
+
import { isStepSize } from "../view.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -197,7 +197,7 @@ export class FlexDimensions {
|
|
|
197
197
|
/**
|
|
198
198
|
* Adds padding to absolute (px) dimensions
|
|
199
199
|
*
|
|
200
|
-
* @param {import("./padding").default} padding
|
|
200
|
+
* @param {import("./padding.js").default} padding
|
|
201
201
|
*/
|
|
202
202
|
addPadding(padding) {
|
|
203
203
|
return this.#addPx(padding.width, padding.height);
|
|
@@ -206,7 +206,7 @@ export class FlexDimensions {
|
|
|
206
206
|
/**
|
|
207
207
|
* Subtracts padding from absolute (px) dimensions
|
|
208
208
|
*
|
|
209
|
-
* @param {import("./padding").default} padding
|
|
209
|
+
* @param {import("./padding.js").default} padding
|
|
210
210
|
*/
|
|
211
211
|
subtractPadding(padding) {
|
|
212
212
|
return this.#addPx(-padding.width, -padding.height);
|
|
@@ -274,7 +274,7 @@ export function isSizeDef(spec) {
|
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
276
|
*
|
|
277
|
-
* @param {"container" | number | SizeDef | import("../../spec/view").Step} size
|
|
277
|
+
* @param {"container" | number | SizeDef | import("../../spec/view.js").Step} size
|
|
278
278
|
* @returns {SizeDef}
|
|
279
279
|
*/
|
|
280
280
|
export function parseSizeDef(size) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/grid.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IACI;;;;OAIG;IACH,uBAHW,MAAM,YACN,MAAM,EAKhB;IAFG,UAAkB;IAClB,gBAAkC;IAGtC,oBAEC;IAED,oBAEC;IAED,6BAmBC;IAED,6BAmBC;IAED;;;OAGG;IACH,kBAHW,MAAM,OACN,MAAM,UAchB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ5B;CACJ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A class for handing paddings, borders, margins, etc.
|
|
3
3
|
*
|
|
4
|
-
* @typedef {import("../../spec/view").Paddings} Paddings
|
|
5
|
-
* @typedef {import("../../spec/view").PaddingConfig} PaddingConfig
|
|
4
|
+
* @typedef {import("../../spec/view.js").Paddings} Paddings
|
|
5
|
+
* @typedef {import("../../spec/view.js").PaddingConfig} PaddingConfig
|
|
6
6
|
*/
|
|
7
7
|
export default class Padding {
|
|
8
8
|
/**
|
|
@@ -75,9 +75,9 @@ export default class Padding {
|
|
|
75
75
|
/**
|
|
76
76
|
* A class for handing paddings, borders, margins, etc.
|
|
77
77
|
*/
|
|
78
|
-
export type Paddings = import("../../spec/view").Paddings;
|
|
78
|
+
export type Paddings = import("../../spec/view.js").Paddings;
|
|
79
79
|
/**
|
|
80
80
|
* A class for handing paddings, borders, margins, etc.
|
|
81
81
|
*/
|
|
82
|
-
export type PaddingConfig = import("../../spec/view").PaddingConfig;
|
|
82
|
+
export type PaddingConfig = import("../../spec/view.js").PaddingConfig;
|
|
83
83
|
//# sourceMappingURL=padding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"padding.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/padding.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH;IAyGI;;;OAGG;IACH,gCAFW,aAAa,WAUvB;IAED;;OAEG;IACH,kCAFW,QAAQ,WASlB;IAED;;OAEG;IACH,uBAEC;IAED;;;OAGG;IACH,mCAFW,MAAM,WAIhB;IA/ID;;;;;OAKG;IACH,iBALW,MAAM,SACN,MAAM,UACN,MAAM,QACN,MAAM,EAOhB;IAJG,gBAAgB,CAAC,qBAAmB;IACpC,gBAAgB,CAAC,uBAAuB;IACxC,gBAAgB,CAAC,wBAAyB;IAC1C,gBAAgB,CAAC,sBAAqB;IAG1C;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,eAFW,MAAM,WAahB;IAED;;;OAGG;IACH,aAFW,OAAO,WASjB;IAED;;;OAGG;IACH,kBAFW,OAAO,WASjB;IAED;;;OAGG;IACH,eAFW,OAAO,WASjB;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,uBAEC;IAED,8BAEC;IAED,4BAEC;CA0CJ;;;;uBApJY,OAAO,oBAAoB,EAAE,QAAQ;;;;4BACrC,OAAO,oBAAoB,EAAE,aAAa"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A class for handing paddings, borders, margins, etc.
|
|
3
3
|
*
|
|
4
|
-
* @typedef {import("../../spec/view").Paddings} Paddings
|
|
5
|
-
* @typedef {import("../../spec/view").PaddingConfig} PaddingConfig
|
|
4
|
+
* @typedef {import("../../spec/view.js").Paddings} Paddings
|
|
5
|
+
* @typedef {import("../../spec/view.js").PaddingConfig} PaddingConfig
|
|
6
6
|
*/
|
|
7
7
|
export default class Padding {
|
|
8
8
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/point.js"],"names":[],"mappings":"AAAA;IACI;;;;OAIG;IACH,eAHW,MAAM,KACN,MAAM,EAKhB;IAFG,gBAAgB,CAAC,mBAAU;IAC3B,gBAAgB,CAAC,mBAAU;IAG/B;;;OAGG;IACH,cAFW,KAAK,WAQf;CACJ"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Allows for implementing scrolling viewports etc.
|
|
4
4
|
*
|
|
5
5
|
* @typedef {("x" | "y" | "width" | "height")} Prop
|
|
6
|
-
* @typedef {import("./padding").default } Padding
|
|
6
|
+
* @typedef {import("./padding.js").default } Padding
|
|
7
7
|
* @typedef {() => number} Accessor
|
|
8
8
|
*/
|
|
9
9
|
export default class Rectangle {
|
|
@@ -95,6 +95,12 @@ export default class Rectangle {
|
|
|
95
95
|
* @param {Rectangle} rectangle
|
|
96
96
|
*/
|
|
97
97
|
intersect(rectangle: Rectangle): Rectangle;
|
|
98
|
+
/**
|
|
99
|
+
* Returns an union of this and the other rectangle.
|
|
100
|
+
*
|
|
101
|
+
* @param {Rectangle} rectangle
|
|
102
|
+
*/
|
|
103
|
+
union(rectangle: Rectangle): Rectangle;
|
|
98
104
|
/**
|
|
99
105
|
* Returns true if width and height are greater than equal to zero.
|
|
100
106
|
*/
|
|
@@ -133,7 +139,7 @@ export type Prop = ("x" | "y" | "width" | "height");
|
|
|
133
139
|
* An immutable rectangle with a scene-graph -like hierarchy.
|
|
134
140
|
* Allows for implementing scrolling viewports etc.
|
|
135
141
|
*/
|
|
136
|
-
export type Padding = import("./padding").default;
|
|
142
|
+
export type Padding = import("./padding.js").default;
|
|
137
143
|
/**
|
|
138
144
|
* An immutable rectangle with a scene-graph -like hierarchy.
|
|
139
145
|
* Allows for implementing scrolling viewports etc.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/rectangle.js"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH;IACI;;;;;;OAMG;IACH,iBALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,aAShB;IAED,uBAA2C;IA+B3C;;;;;;OAMG;IACH,eALW,QAAQ,KACR,QAAQ,SACR,QAAQ,UACR,QAAQ,EAOlB;IAzCD;;;;OAIG;IACH,cAJW,IAAI,SACJ,MAAM,UAAc,MAAM,CAAA,GACxB,QAAQ,CAiBpB;IAED;;OAEG;IACH,mBAFW,IAAI,YAId;IAUG,gBAAgB,CAAC,sBAAW;IAC5B,gBAAgB,CAAC,sBAAW;IAC5B,gBAAgB,CAAC,0BAAmB;IACpC,gBAAgB,CAAC,2BAAqB;IAG1C;;OAEG;IACH,gBAEC;IAED;;OAEG;IACH,gBAEC;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,qBAEC;IAED,iBAEC;IAED,iBAEC;IAED;;;;OAIG;IACH,kBAFW,SAAS,WAcnB;IAED;;;OAGG;IACH,cAFW,QAAQ,OAAO,IAAI,EAAE,MAAM,UAAc,MAAM,CAAA,CAAC,CAAC,aAkB3D;IAED;;;;OAIG;IACH,aAHW,MAAM,UAAc,MAAM,CAAA,KAC1B,MAAM,UAAc,MAAM,CAAA,aAapC;IAED;;;;OAIG;IACH,uBAFW,SAAS,aAKnB;IAED;;;OAGG;IACH,gBAFW,OAAO,iCA0BjB;IAED;;;OAGG;IACH,gBAFW,OAAO,aAIjB;IAED;;;;OAIG;IACH,qBAFW,SAAS,aAenB;IAED;;;;OAIG;IACH,iBAFW,SAAS,aAenB;IAED;;OAEG;IACH,qBAEC;IAED;;;OAGG;IACH,qBAOC;IAED;;;;;OAKG;IACH,iBAHW,MAAM,KACN,MAAM,WAIhB;IAED;;;;;OAKG;IACH,kBAHW,MAAM,KACN,MAAM;;;MAOhB;IAED,mBAEC;IAED,0BAMC;CACJ;;;;;mBA/SY,CAAC,GAAG,GAAG,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC;;;;;sBAChC,OAAO,cAAc,EAAE,OAAO;;;;;uBAC9B,MAAM,MAAM"}
|
|
@@ -11,7 +11,7 @@ function constant(value) {
|
|
|
11
11
|
* Allows for implementing scrolling viewports etc.
|
|
12
12
|
*
|
|
13
13
|
* @typedef {("x" | "y" | "width" | "height")} Prop
|
|
14
|
-
* @typedef {import("./padding").default } Padding
|
|
14
|
+
* @typedef {import("./padding.js").default } Padding
|
|
15
15
|
* @typedef {() => number} Accessor
|
|
16
16
|
*/
|
|
17
17
|
export default class Rectangle {
|
|
@@ -225,7 +225,7 @@ export default class Rectangle {
|
|
|
225
225
|
* @param {Rectangle} rectangle
|
|
226
226
|
*/
|
|
227
227
|
intersect(rectangle) {
|
|
228
|
-
if (this === rectangle) {
|
|
228
|
+
if (this === rectangle || rectangle == null) {
|
|
229
229
|
return this;
|
|
230
230
|
}
|
|
231
231
|
|
|
@@ -239,6 +239,26 @@ export default class Rectangle {
|
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Returns an union of this and the other rectangle.
|
|
244
|
+
*
|
|
245
|
+
* @param {Rectangle} rectangle
|
|
246
|
+
*/
|
|
247
|
+
union(rectangle) {
|
|
248
|
+
if (this === rectangle || rectangle == null) {
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return new Rectangle(
|
|
253
|
+
() => Math.min(this.x, rectangle.x),
|
|
254
|
+
() => Math.min(this.y, rectangle.y),
|
|
255
|
+
() =>
|
|
256
|
+
Math.max(this.x2, rectangle.x2) - Math.min(this.x, rectangle.x),
|
|
257
|
+
() =>
|
|
258
|
+
Math.max(this.y2, rectangle.y2) - Math.min(this.y, rectangle.y)
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
242
262
|
/**
|
|
243
263
|
* Returns true if width and height are greater than equal to zero.
|
|
244
264
|
*/
|
|
@@ -114,6 +114,14 @@ test("intersect", () => {
|
|
|
114
114
|
expect(x.intersect(y).isDefined()).toBeFalsy();
|
|
115
115
|
});
|
|
116
116
|
|
|
117
|
+
test("union", () => {
|
|
118
|
+
const a = Rectangle.create(1, 1, 6, 3);
|
|
119
|
+
const b = Rectangle.create(5, 2, 3, 4);
|
|
120
|
+
const c = Rectangle.create(1, 1, 7, 5);
|
|
121
|
+
|
|
122
|
+
expect(a.union(b).equals(c)).toBeTruthy();
|
|
123
|
+
});
|
|
124
|
+
|
|
117
125
|
test("isDefined", () => {
|
|
118
126
|
expect(Rectangle.create(0, 0, 1, 1).isDefined()).toBeTruthy();
|
|
119
127
|
expect(Rectangle.create(0, 0, 0, 0).isDefined()).toBeTruthy();
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export default class BufferedViewRenderingContext extends ViewRenderingContext {
|
|
2
2
|
/**
|
|
3
|
-
* @param {import("../../types/rendering").GlobalRenderingOptions} globalOptions
|
|
4
|
-
* @param {import("../../gl/webGLHelper").default} webGLHelper
|
|
3
|
+
* @param {import("../../types/rendering.js").GlobalRenderingOptions} globalOptions
|
|
4
|
+
* @param {import("../../gl/webGLHelper.js").default} webGLHelper
|
|
5
5
|
*/
|
|
6
|
-
constructor(globalOptions: import("../../types/rendering").GlobalRenderingOptions, webGLHelper: import("../../gl/webGLHelper").default);
|
|
7
|
-
webGLHelper: import("../../gl/webGLHelper").default;
|
|
6
|
+
constructor(globalOptions: import("../../types/rendering.js").GlobalRenderingOptions, webGLHelper: import("../../gl/webGLHelper.js").default);
|
|
7
|
+
webGLHelper: import("../../gl/webGLHelper.js").default;
|
|
8
8
|
/**
|
|
9
|
-
* @type {import("../../types/rendering").BufferedRenderingRequest[]}
|
|
9
|
+
* @type {import("../../types/rendering.js").BufferedRenderingRequest[]}
|
|
10
10
|
*/
|
|
11
|
-
buffer: import("../../types/rendering").BufferedRenderingRequest[];
|
|
12
|
-
/** @type {import("
|
|
13
|
-
coords: import("
|
|
14
|
-
/** @type {Set<import("../view").default>} */
|
|
15
|
-
views: Set<import("../view").default>;
|
|
11
|
+
buffer: import("../../types/rendering.js").BufferedRenderingRequest[];
|
|
12
|
+
/** @type {import("../layout/rectangle.js").default} */
|
|
13
|
+
coords: import("../layout/rectangle.js").default;
|
|
14
|
+
/** @type {Set<import("../view.js").default>} */
|
|
15
|
+
views: Set<import("../view.js").default>;
|
|
16
16
|
/**
|
|
17
17
|
* Renders marks in an optimized order, minimizing the number of WebGL state
|
|
18
18
|
* changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bufferedViewRenderingContext.d.ts","sourceRoot":"","sources":["../../../../src/view/renderingContext/bufferedViewRenderingContext.js"],"names":[],"mappings":"AAIA;IACI;;;OAGG;IACH,2BAHW,OAAO,
|
|
1
|
+
{"version":3,"file":"bufferedViewRenderingContext.d.ts","sourceRoot":"","sources":["../../../../src/view/renderingContext/bufferedViewRenderingContext.js"],"names":[],"mappings":"AAIA;IACI;;;OAGG;IACH,2BAHW,OAAO,0BAA0B,EAAE,sBAAsB,eACzD,OAAO,yBAAyB,EAAE,OAAO,EAiBnD;IAZG,uDAA8B;IAE9B;;OAEG;IACH,QAFU,OAAO,0BAA0B,EAAE,wBAAwB,EAAE,CAEvD;IAEhB,uDAAuD;IACvD,QADW,OAAO,wBAAwB,EAAE,OAAO,CAC5B;IAEvB,gDAAgD;IAChD,OADW,IAAI,OAAO,YAAY,EAAE,OAAO,CAAC,CACtB;IAsC1B;;;OAGG;IACH,eA+BC;IAED,oBA2EC;IA1EG;;;;OAIG;IACH,OAFU,OAAY,IAAI,CAAC,EAAE,CAEd;CAsEtB;iCA5KgC,2BAA2B"}
|
|
@@ -4,8 +4,8 @@ import ViewRenderingContext from "./viewRenderingContext.js";
|
|
|
4
4
|
|
|
5
5
|
export default class BufferedViewRenderingContext extends ViewRenderingContext {
|
|
6
6
|
/**
|
|
7
|
-
* @param {import("../../types/rendering").GlobalRenderingOptions} globalOptions
|
|
8
|
-
* @param {import("../../gl/webGLHelper").default} webGLHelper
|
|
7
|
+
* @param {import("../../types/rendering.js").GlobalRenderingOptions} globalOptions
|
|
8
|
+
* @param {import("../../gl/webGLHelper.js").default} webGLHelper
|
|
9
9
|
*/
|
|
10
10
|
constructor(globalOptions, webGLHelper) {
|
|
11
11
|
super(globalOptions);
|
|
@@ -13,22 +13,22 @@ export default class BufferedViewRenderingContext extends ViewRenderingContext {
|
|
|
13
13
|
this.webGLHelper = webGLHelper;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @type {import("../../types/rendering").BufferedRenderingRequest[]}
|
|
16
|
+
* @type {import("../../types/rendering.js").BufferedRenderingRequest[]}
|
|
17
17
|
*/
|
|
18
18
|
this.buffer = [];
|
|
19
19
|
|
|
20
|
-
/** @type {import("
|
|
20
|
+
/** @type {import("../layout/rectangle.js").default} */
|
|
21
21
|
this.coords = undefined;
|
|
22
22
|
|
|
23
|
-
/** @type {Set<import("../view").default>} */
|
|
23
|
+
/** @type {Set<import("../view.js").default>} */
|
|
24
24
|
this.views = new Set();
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Must be called when a view's render() method is entered
|
|
29
29
|
*
|
|
30
|
-
* @param {import("../view").default} view
|
|
31
|
-
* @param {import("
|
|
30
|
+
* @param {import("../view.js").default} view
|
|
31
|
+
* @param {import("../layout/rectangle.js").default} coords View coordinates
|
|
32
32
|
* inside the padding.
|
|
33
33
|
* @override
|
|
34
34
|
*/
|
|
@@ -39,8 +39,8 @@ export default class BufferedViewRenderingContext extends ViewRenderingContext {
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
|
-
* @param {import("../../marks/mark").default} mark
|
|
43
|
-
* @param {import("../../types/rendering").RenderingOptions} options
|
|
42
|
+
* @param {import("../../marks/mark.js").default} mark
|
|
43
|
+
* @param {import("../../types/rendering.js").RenderingOptions} options
|
|
44
44
|
* @override
|
|
45
45
|
*/
|
|
46
46
|
renderMark(mark, options) {
|
|
@@ -150,7 +150,7 @@ export default class BufferedViewRenderingContext extends ViewRenderingContext {
|
|
|
150
150
|
.map((op) => ifEnabled(op))
|
|
151
151
|
);
|
|
152
152
|
|
|
153
|
-
/** @type {import("
|
|
153
|
+
/** @type {import("../layout/rectangle.js").default} */
|
|
154
154
|
let previousCoords;
|
|
155
155
|
for (const request of requests) {
|
|
156
156
|
const coords = request.coords;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {import("../view").default} View
|
|
2
|
+
* @typedef {import("../view.js").default} View
|
|
3
3
|
*/
|
|
4
4
|
export default class CompositeViewRenderingContext extends ViewRenderingContext {
|
|
5
5
|
/**
|
|
@@ -9,6 +9,6 @@ export default class CompositeViewRenderingContext extends ViewRenderingContext
|
|
|
9
9
|
constructor(...contexts: ViewRenderingContext[]);
|
|
10
10
|
contexts: ViewRenderingContext[];
|
|
11
11
|
}
|
|
12
|
-
export type View = import("../view").default;
|
|
12
|
+
export type View = import("../view.js").default;
|
|
13
13
|
import ViewRenderingContext from "./viewRenderingContext.js";
|
|
14
14
|
//# sourceMappingURL=compositeViewRenderingContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compositeViewRenderingContext.d.ts","sourceRoot":"","sources":["../../../../src/view/renderingContext/compositeViewRenderingContext.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI;;;OAGG;IACH,yBAFe,oBAAoB,IAMlC;IADG,iCAAwB;CAqC/B;mBA/CY,OAAO,
|
|
1
|
+
{"version":3,"file":"compositeViewRenderingContext.d.ts","sourceRoot":"","sources":["../../../../src/view/renderingContext/compositeViewRenderingContext.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI;;;OAGG;IACH,yBAFe,oBAAoB,IAMlC;IADG,iCAAwB;CAqC/B;mBA/CY,OAAO,YAAY,EAAE,OAAO;iCAHR,2BAA2B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ViewRenderingContext from "./viewRenderingContext.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef {import("../view").default} View
|
|
4
|
+
* @typedef {import("../view.js").default} View
|
|
5
5
|
*/
|
|
6
6
|
export default class CompositeViewRenderingContext extends ViewRenderingContext {
|
|
7
7
|
/**
|
|
@@ -18,7 +18,7 @@ export default class CompositeViewRenderingContext extends ViewRenderingContext
|
|
|
18
18
|
* Must be called when a view's render() method is entered
|
|
19
19
|
*
|
|
20
20
|
* @param {View} view
|
|
21
|
-
* @param {import("
|
|
21
|
+
* @param {import("../layout/rectangle.js").default} coords View coordinates
|
|
22
22
|
* inside the padding.
|
|
23
23
|
*/
|
|
24
24
|
pushView(view, coords) {
|
|
@@ -40,8 +40,8 @@ export default class CompositeViewRenderingContext extends ViewRenderingContext
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
|
-
* @param {import("../../marks/mark").default} mark
|
|
44
|
-
* @param {import("../../types/rendering").RenderingOptions} options
|
|
43
|
+
* @param {import("../../marks/mark.js").default} mark
|
|
44
|
+
* @param {import("../../types/rendering.js").RenderingOptions} options
|
|
45
45
|
*/
|
|
46
46
|
renderMark(mark, options) {
|
|
47
47
|
for (const context of this.contexts) {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
4
4
|
* The coordinates can be used for debugging or testing of the layout engine.
|
|
5
5
|
*
|
|
6
|
-
* @typedef {import("../view").default} View
|
|
7
|
-
* @typedef {import("
|
|
6
|
+
* @typedef {import("../view.js").default} View
|
|
7
|
+
* @typedef {import("../layout/rectangle.js").default} Rectangle
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
export default class DebugginViewRenderingContext extends ViewRenderingContext {
|
|
@@ -19,13 +19,13 @@ export default class DebugginViewRenderingContext extends ViewRenderingContext {
|
|
|
19
19
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
20
20
|
* The coordinates can be used for debugging or testing of the layout engine.
|
|
21
21
|
*/
|
|
22
|
-
export type View = import("../view").default;
|
|
22
|
+
export type View = import("../view.js").default;
|
|
23
23
|
/**
|
|
24
24
|
* A Rendering context that doesn't render anything. It creates a hierarchy
|
|
25
25
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
26
26
|
* The coordinates can be used for debugging or testing of the layout engine.
|
|
27
27
|
*/
|
|
28
|
-
export type Rectangle = import("
|
|
28
|
+
export type Rectangle = import("../layout/rectangle.js").default;
|
|
29
29
|
import ViewRenderingContext from "./viewRenderingContext.js";
|
|
30
30
|
/**
|
|
31
31
|
* Represents coordinates of view instances. Faceted views objects may have
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debuggingViewRenderingContext.d.ts","sourceRoot":"","sources":["../../../../src/view/renderingContext/debuggingViewRenderingContext.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH;IAOQ,yBAAyB;IACzB,MADW,UAAU,CACA;IAErB,2BAA2B;IAC3B,OADW,UAAU,EAAE,CACR;IAgCnB,wBAEC;CACJ;;;;;;mBAlDY,OAAO,
|
|
1
|
+
{"version":3,"file":"debuggingViewRenderingContext.d.ts","sourceRoot":"","sources":["../../../../src/view/renderingContext/debuggingViewRenderingContext.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH;IAOQ,yBAAyB;IACzB,MADW,UAAU,CACA;IAErB,2BAA2B;IAC3B,OADW,UAAU,EAAE,CACR;IAgCnB,wBAEC;CACJ;;;;;;mBAlDY,OAAO,YAAY,EAAE,OAAO;;;;;;wBAC5B,OAAO,wBAAwB,EAAE,OAAO;iCARpB,2BAA2B;AA2D5D;;;GAGG;AACH;IACI;;;OAGG;IACH,sBAHW,MAAM,UACN,SAAS,EAOnB;IAJG,iBAAwB;IACxB,eAAsC;IACtC,2BAA2B;IAC3B,UADW,UAAU,EAAE,CACL;IAGtB;;;OAGG;IACH,qBAFW,UAAU,QAcpB;CACJ"}
|
|
@@ -6,13 +6,13 @@ import ViewRenderingContext from "./viewRenderingContext.js";
|
|
|
6
6
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
7
7
|
* The coordinates can be used for debugging or testing of the layout engine.
|
|
8
8
|
*
|
|
9
|
-
* @typedef {import("../view").default} View
|
|
10
|
-
* @typedef {import("
|
|
9
|
+
* @typedef {import("../view.js").default} View
|
|
10
|
+
* @typedef {import("../layout/rectangle.js").default} Rectangle
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
export default class DebugginViewRenderingContext extends ViewRenderingContext {
|
|
14
14
|
/**
|
|
15
|
-
* @param {import("../../types/rendering").GlobalRenderingOptions} globalOptions
|
|
15
|
+
* @param {import("../../types/rendering.js").GlobalRenderingOptions} globalOptions
|
|
16
16
|
*/
|
|
17
17
|
constructor(globalOptions) {
|
|
18
18
|
super(globalOptions);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
4
4
|
* The coordinates can be used for mouse events / interactions, for example.
|
|
5
5
|
*
|
|
6
|
-
* @typedef {import("../view").default} View
|
|
7
|
-
* @typedef {import("
|
|
6
|
+
* @typedef {import("../view.js").default} View
|
|
7
|
+
* @typedef {import("../layout/rectangle.js").default} Rectangle
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
export default class LayoutRecorderViewRenderingContext extends ViewRenderingContext {
|
|
@@ -21,13 +21,13 @@ export default class LayoutRecorderViewRenderingContext extends ViewRenderingCon
|
|
|
21
21
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
22
22
|
* The coordinates can be used for mouse events / interactions, for example.
|
|
23
23
|
*/
|
|
24
|
-
export type View = import("../view").default;
|
|
24
|
+
export type View = import("../view.js").default;
|
|
25
25
|
/**
|
|
26
26
|
* A Rendering context that doesn't render anything. It creates a hierarchy
|
|
27
27
|
* of view coordinates, including faceted views that are repeated multiple times.
|
|
28
28
|
* The coordinates can be used for mouse events / interactions, for example.
|
|
29
29
|
*/
|
|
30
|
-
export type Rectangle = import("
|
|
30
|
+
export type Rectangle = import("../layout/rectangle.js").default;
|
|
31
31
|
import ViewRenderingContext from "./viewRenderingContext.js";
|
|
32
32
|
/**
|
|
33
33
|
* Represents coordinates of view instances. Faceted views objects may have
|
|
@@ -39,8 +39,8 @@ declare class ViewCoords {
|
|
|
39
39
|
* @param {Rectangle} coords
|
|
40
40
|
*/
|
|
41
41
|
constructor(view: View, coords: Rectangle);
|
|
42
|
-
view: import("../view").default;
|
|
43
|
-
coords: import("
|
|
42
|
+
view: import("../view.js").default;
|
|
43
|
+
coords: import("../layout/rectangle.js").default;
|
|
44
44
|
/** @type {ViewCoords[]} */
|
|
45
45
|
children: ViewCoords[];
|
|
46
46
|
/**
|
|
@@ -52,9 +52,9 @@ declare class ViewCoords {
|
|
|
52
52
|
* Broadcasts a message to views that include the given (x, y) point.
|
|
53
53
|
* This is mainly intended for mouse events.
|
|
54
54
|
*
|
|
55
|
-
* @param {import("../../utils/interactionEvent").default} event
|
|
55
|
+
* @param {import("../../utils/interactionEvent.js").default} event
|
|
56
56
|
*/
|
|
57
|
-
dispatchInteractionEvent(event: import("../../utils/interactionEvent").default): void;
|
|
57
|
+
dispatchInteractionEvent(event: import("../../utils/interactionEvent.js").default): void;
|
|
58
58
|
}
|
|
59
59
|
export {};
|
|
60
60
|
//# sourceMappingURL=layoutRecorderViewRenderingContext.d.ts.map
|