@jbrowse/plugin-variants 3.7.0 → 4.0.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/esm/ChordVariantDisplay/components/ChordVariantDisplay.d.ts +11 -0
- package/esm/ChordVariantDisplay/components/ChordVariantDisplay.js +16 -0
- package/esm/ChordVariantDisplay/components/DisplayError.d.ts +9 -0
- package/esm/ChordVariantDisplay/components/DisplayError.js +7 -0
- package/esm/ChordVariantDisplay/components/Loading.d.ts +8 -0
- package/esm/ChordVariantDisplay/components/Loading.js +28 -0
- package/esm/ChordVariantDisplay/index.js +4 -4
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +4 -5
- package/esm/ChordVariantDisplay/models/configSchema.js +10 -5
- package/esm/ChordVariantDisplay/models/renderReaction.d.ts +30 -0
- package/esm/ChordVariantDisplay/models/renderReaction.js +48 -0
- package/esm/ChordVariantDisplay/models/renderSvg.d.ts +6 -0
- package/esm/ChordVariantDisplay/models/renderSvg.js +12 -0
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +535 -46
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +146 -8
- package/esm/LinearVariantDisplay/configSchema.d.ts +5 -5
- package/esm/LinearVariantDisplay/configSchema.js +2 -2
- package/esm/LinearVariantDisplay/index.js +6 -4
- package/esm/LinearVariantDisplay/model.d.ts +1086 -103
- package/esm/LinearVariantDisplay/model.js +10 -26
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +8 -18
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +6 -44
- package/esm/MultiLinearVariantDisplay/configSchema.js +2 -2
- package/esm/MultiLinearVariantDisplay/index.js +4 -3
- package/esm/MultiLinearVariantDisplay/model.d.ts +1031 -125
- package/esm/MultiLinearVariantDisplay/model.js +3 -23
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -1
- package/esm/MultiLinearVariantDisplay/renderSvg.js +4 -4
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +8 -2
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +26 -23
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +9 -20
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +6 -6
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/index.js +5 -4
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +1110 -131
- package/esm/MultiLinearVariantMatrixDisplay/model.js +22 -48
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -3
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +4 -35
- package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +19 -33
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +12 -1
- package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +48 -22
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +1 -1
- package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -2
- package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +155 -135
- package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -14
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +3 -60
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +9 -18
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +7 -6
- package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +30 -26
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -1
- package/esm/MultiLinearVariantRenderer/index.js +4 -4
- package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +14 -11
- package/esm/MultiLinearVariantRenderer/makeImageData.js +127 -110
- package/esm/MultiLinearVariantRenderer/types.d.ts +3 -20
- package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +1 -1
- package/esm/SplitVcfTabixAdapter/configSchema.d.ts +2 -2
- package/esm/SplitVcfTabixAdapter/index.d.ts +1 -1
- package/esm/SplitVcfTabixAdapter/index.js +3 -3
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/Chord.js +41 -58
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +3 -3
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/index.js +3 -3
- package/esm/Tooltip.js +2 -2
- package/esm/VariantFeatureWidget/AltFormatter.js +1 -1
- package/esm/VariantFeatureWidget/Formatter.js +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.d.ts +1 -0
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.js +1 -0
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +1 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +8 -23
- package/esm/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -29
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +5 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +68 -59
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +13 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +72 -30
- package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +2 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +49 -26
- package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +3 -5
- package/esm/VariantFeatureWidget/configSchema.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +3 -3
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +39 -39
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -7
- package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +3 -14
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +4 -2
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +2 -5
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +2 -2
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +34 -19
- package/esm/VariantRPC/MultiVariantGetSources.js +2 -6
- package/esm/VariantRPC/executeClusterGenotypeMatrix.d.ts +22 -0
- package/esm/VariantRPC/executeClusterGenotypeMatrix.js +19 -0
- package/esm/VariantRPC/getGenotypeMatrix.d.ts +18 -3
- package/esm/VariantRPC/getGenotypeMatrix.js +23 -40
- package/esm/VariantRPC/types.d.ts +10 -24
- package/esm/VariantTrack/configSchema.d.ts +16 -11
- package/esm/VariantTrack/index.js +13 -2
- package/esm/VariantTrack/saveTrackFormats/vcf.d.ts +4 -0
- package/esm/VariantTrack/saveTrackFormats/vcf.js +15 -0
- package/esm/VcfAdapter/VcfAdapter.d.ts +6 -3
- package/esm/VcfAdapter/VcfAdapter.js +36 -24
- package/esm/VcfAdapter/configSchema.d.ts +2 -2
- package/esm/VcfAdapter/index.js +3 -2
- package/esm/VcfExtensionPoints/index.d.ts +2 -0
- package/esm/{extensionPoints.js → VcfExtensionPoints/index.js} +1 -1
- package/esm/VcfFeature/index.js +20 -8
- package/esm/VcfFeature/util.d.ts +0 -1
- package/esm/VcfFeature/util.js +70 -188
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +2 -0
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +28 -3
- package/esm/VcfTabixAdapter/configSchema.d.ts +5 -5
- package/esm/VcfTabixAdapter/configSchema.js +1 -1
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/VcfTabixAdapter/index.js +4 -3
- package/esm/d3-hierarchy2/accessors.d.ts +2 -0
- package/esm/d3-hierarchy2/accessors.js +8 -0
- package/esm/d3-hierarchy2/array.d.ts +2 -0
- package/esm/d3-hierarchy2/array.js +15 -0
- package/esm/d3-hierarchy2/cluster.d.ts +8 -0
- package/esm/d3-hierarchy2/cluster.js +63 -0
- package/esm/d3-hierarchy2/constant.d.ts +2 -0
- package/esm/d3-hierarchy2/constant.js +8 -0
- package/esm/d3-hierarchy2/hierarchy/ancestors.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/ancestors.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/count.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/count.js +12 -0
- package/esm/d3-hierarchy2/hierarchy/descendants.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/descendants.js +3 -0
- package/esm/d3-hierarchy2/hierarchy/each.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/each.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/eachAfter.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/eachAfter.js +15 -0
- package/esm/d3-hierarchy2/hierarchy/eachBefore.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/eachBefore.js +12 -0
- package/esm/d3-hierarchy2/hierarchy/find.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/find.js +8 -0
- package/esm/d3-hierarchy2/hierarchy/index.d.ts +3 -0
- package/esm/d3-hierarchy2/hierarchy/index.js +78 -0
- package/esm/d3-hierarchy2/hierarchy/iterator.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/iterator.js +14 -0
- package/esm/d3-hierarchy2/hierarchy/leaves.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/leaves.js +9 -0
- package/esm/d3-hierarchy2/hierarchy/links.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/links.js +9 -0
- package/esm/d3-hierarchy2/hierarchy/path.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/path.js +26 -0
- package/esm/d3-hierarchy2/hierarchy/sort.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/sort.js +7 -0
- package/esm/d3-hierarchy2/hierarchy/sum.d.ts +1 -0
- package/esm/d3-hierarchy2/hierarchy/sum.js +8 -0
- package/esm/d3-hierarchy2/index.d.ts +15 -0
- package/esm/d3-hierarchy2/index.js +15 -0
- package/esm/d3-hierarchy2/lcg.d.ts +1 -0
- package/esm/d3-hierarchy2/lcg.js +7 -0
- package/esm/d3-hierarchy2/pack/enclose.d.ts +10 -0
- package/esm/d3-hierarchy2/pack/enclose.js +84 -0
- package/esm/d3-hierarchy2/pack/index.d.ts +7 -0
- package/esm/d3-hierarchy2/pack/index.js +68 -0
- package/esm/d3-hierarchy2/pack/siblings.d.ts +2 -0
- package/esm/d3-hierarchy2/pack/siblings.js +94 -0
- package/esm/d3-hierarchy2/partition.d.ts +6 -0
- package/esm/d3-hierarchy2/partition.js +42 -0
- package/esm/d3-hierarchy2/stratify.d.ts +9 -0
- package/esm/d3-hierarchy2/stratify.js +115 -0
- package/esm/d3-hierarchy2/tree.d.ts +8 -0
- package/esm/d3-hierarchy2/tree.js +153 -0
- package/esm/d3-hierarchy2/treemap/binary.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/binary.js +36 -0
- package/esm/d3-hierarchy2/treemap/dice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/dice.js +7 -0
- package/esm/d3-hierarchy2/treemap/index.d.ts +17 -0
- package/esm/d3-hierarchy2/treemap/index.js +72 -0
- package/esm/d3-hierarchy2/treemap/resquarify.d.ts +5 -0
- package/esm/d3-hierarchy2/treemap/resquarify.js +28 -0
- package/esm/d3-hierarchy2/treemap/round.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/round.js +6 -0
- package/esm/d3-hierarchy2/treemap/slice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/slice.js +7 -0
- package/esm/d3-hierarchy2/treemap/sliceDice.d.ts +1 -0
- package/esm/d3-hierarchy2/treemap/sliceDice.js +5 -0
- package/esm/d3-hierarchy2/treemap/squarify.d.ts +11 -0
- package/esm/d3-hierarchy2/treemap/squarify.js +46 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +19 -22
- package/esm/shared/MultiVariantBaseModel.d.ts +1103 -117
- package/esm/shared/MultiVariantBaseModel.js +231 -65
- package/esm/shared/SharedVariantConfigSchema.d.ts +2 -40
- package/esm/shared/SharedVariantConfigSchema.js +1 -46
- package/esm/shared/components/AddFiltersDialog.d.ts +2 -3
- package/esm/shared/components/AddFiltersDialog.js +20 -28
- package/esm/shared/components/{ui/SetColorDialog.d.ts → BaseSetColorDialog.d.ts} +2 -1
- package/esm/shared/components/BaseSetColorDialog.js +61 -0
- package/esm/shared/components/ClearTreeWarningDialog.d.ts +4 -0
- package/esm/shared/components/ClearTreeWarningDialog.js +9 -0
- package/esm/shared/components/MAFFilterDialog.d.ts +2 -3
- package/esm/shared/components/MAFFilterDialog.js +4 -8
- package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +1 -1
- package/esm/shared/components/MultiVariantBaseDisplayComponent.js +8 -17
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.js +3 -3
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +9 -14
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +1 -1
- package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +11 -15
- package/esm/shared/components/MultiVariantClusterDialog/types.d.ts +3 -2
- package/esm/shared/components/MultiVariantColorLegend.d.ts +1 -1
- package/esm/shared/components/MultiVariantColorLegend.js +22 -12
- package/esm/shared/components/MultiVariantCrosshairs.d.ts +4 -2
- package/esm/shared/components/MultiVariantCrosshairs.js +31 -23
- package/esm/shared/components/MultiVariantLegendBar.d.ts +4 -4
- package/esm/shared/components/MultiVariantLegendBar.js +24 -22
- package/esm/shared/components/MultiVariantLegendBarWrapper.d.ts +7 -0
- package/esm/shared/components/MultiVariantLegendBarWrapper.js +18 -0
- package/esm/shared/components/MultiVariantTooltip.d.ts +5 -6
- package/esm/shared/components/MultiVariantTooltip.js +35 -17
- package/esm/shared/components/ScrollableVariantContainer.d.ts +8 -0
- package/esm/shared/components/ScrollableVariantContainer.js +23 -0
- package/esm/shared/components/SetColorDialog.d.ts +3 -2
- package/esm/shared/components/SetColorDialog.js +2 -2
- package/esm/shared/components/SetColorDialogBulkEditPanel.d.ts +7 -8
- package/esm/shared/components/SetColorDialogBulkEditPanel.js +24 -54
- package/esm/shared/components/SetColorDialogRowPalettizer.js +13 -23
- package/esm/shared/components/SetRowHeightDialog.d.ts +2 -3
- package/esm/shared/components/SourcesDataGrid.d.ts +1 -1
- package/esm/shared/components/SourcesDataGrid.js +1 -1
- package/esm/shared/components/SourcesGrid.d.ts +1 -1
- package/esm/shared/components/SourcesGrid.js +2 -2
- package/esm/shared/components/SourcesGridHeader.d.ts +1 -1
- package/esm/shared/components/SourcesGridHeader.js +1 -1
- package/esm/shared/components/SvgTree.d.ts +5 -0
- package/esm/shared/components/SvgTree.js +19 -0
- package/esm/shared/components/TreeSidebar.d.ts +5 -0
- package/esm/shared/components/TreeSidebar.js +121 -0
- package/esm/shared/components/types.d.ts +43 -0
- package/esm/shared/components/types.js +1 -0
- package/esm/shared/constants.d.ts +8 -2
- package/esm/shared/constants.js +11 -2
- package/esm/shared/drawAlleleCount.d.ts +2 -1
- package/esm/shared/drawAlleleCount.js +50 -16
- package/esm/shared/drawPhased.js +11 -12
- package/{dist → esm/shared}/getMultiVariantFeaturesAutorun.d.ts +5 -4
- package/esm/{getMultiVariantFeaturesAutorun.js → shared/getMultiVariantFeaturesAutorun.js} +9 -2
- package/esm/{getMultiVariantSourcesAutorun.d.ts → shared/getMultiVariantSourcesAutorun.d.ts} +4 -3
- package/esm/{getMultiVariantSourcesAutorun.js → shared/getMultiVariantSourcesAutorun.js} +10 -2
- package/esm/shared/getSources.d.ts +1 -1
- package/esm/shared/getSources.js +2 -2
- package/esm/shared/hooks/useMouseTracking.d.ts +6 -0
- package/esm/shared/hooks/useMouseTracking.js +34 -0
- package/esm/shared/makeSidebarSvg.d.ts +9 -0
- package/esm/shared/makeSidebarSvg.js +9 -0
- package/esm/shared/minorAlleleFrequencyUtils.d.ts +6 -5
- package/esm/shared/minorAlleleFrequencyUtils.js +37 -38
- package/esm/shared/setupMultiVariantAutoruns.d.ts +2 -0
- package/esm/shared/setupMultiVariantAutoruns.js +8 -0
- package/esm/shared/treeDrawingAutorun.d.ts +16 -0
- package/esm/shared/treeDrawingAutorun.js +71 -0
- package/esm/shared/types.d.ts +15 -0
- package/package.json +38 -39
- package/dist/ChordVariantDisplay/index.d.ts +0 -2
- package/dist/ChordVariantDisplay/index.js +0 -25
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +0 -12
- package/dist/ChordVariantDisplay/models/configSchema.js +0 -15
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +0 -115
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +0 -35
- package/dist/LinearVariantDisplay/configSchema.d.ts +0 -34
- package/dist/LinearVariantDisplay/configSchema.js +0 -12
- package/dist/LinearVariantDisplay/index.d.ts +0 -2
- package/dist/LinearVariantDisplay/index.js +0 -24
- package/dist/LinearVariantDisplay/model.d.ts +0 -278
- package/dist/LinearVariantDisplay/model.js +0 -37
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +0 -5
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +0 -29
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +0 -80
- package/dist/MultiLinearVariantDisplay/configSchema.js +0 -30
- package/dist/MultiLinearVariantDisplay/index.d.ts +0 -2
- package/dist/MultiLinearVariantDisplay/index.js +0 -57
- package/dist/MultiLinearVariantDisplay/model.d.ts +0 -422
- package/dist/MultiLinearVariantDisplay/model.js +0 -82
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +0 -3
- package/dist/MultiLinearVariantDisplay/renderSvg.js +0 -15
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +0 -6
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +0 -83
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +0 -5
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +0 -31
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +0 -37
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +0 -22
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixDisplay/index.js +0 -24
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +0 -431
- package/dist/MultiLinearVariantMatrixDisplay/model.js +0 -125
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +0 -3
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +0 -17
- package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +0 -37
- package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +0 -87
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +0 -8
- package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +0 -41
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +0 -6
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +0 -2
- package/dist/MultiLinearVariantMatrixRenderer/index.js +0 -20
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +0 -14
- package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +0 -154
- package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +0 -14
- package/dist/MultiLinearVariantMatrixRenderer/types.js +0 -2
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +0 -63
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +0 -79
- package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +0 -33
- package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +0 -67
- package/dist/MultiLinearVariantRenderer/components/util.d.ts +0 -1
- package/dist/MultiLinearVariantRenderer/components/util.js +0 -15
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +0 -2
- package/dist/MultiLinearVariantRenderer/configSchema.js +0 -8
- package/dist/MultiLinearVariantRenderer/index.d.ts +0 -2
- package/dist/MultiLinearVariantRenderer/index.js +0 -19
- package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +0 -14
- package/dist/MultiLinearVariantRenderer/makeImageData.js +0 -140
- package/dist/MultiLinearVariantRenderer/types.d.ts +0 -21
- package/dist/MultiLinearVariantRenderer/types.js +0 -2
- package/dist/MultiVariantBaseRenderer.d.ts +0 -46
- package/dist/MultiVariantBaseRenderer.js +0 -39
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -18
- package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -92
- package/dist/SplitVcfTabixAdapter/configSchema.d.ts +0 -23
- package/dist/SplitVcfTabixAdapter/configSchema.js +0 -29
- package/dist/SplitVcfTabixAdapter/index.d.ts +0 -3
- package/dist/SplitVcfTabixAdapter/index.js +0 -52
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +0 -13
- package/dist/StructuralVariantChordRenderer/Chord.js +0 -82
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +0 -16
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -30
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -21
- package/dist/StructuralVariantChordRenderer/configSchema.js +0 -25
- package/dist/StructuralVariantChordRenderer/index.d.ts +0 -2
- package/dist/StructuralVariantChordRenderer/index.js +0 -18
- package/dist/StructuralVariantChordRenderer/types.d.ts +0 -17
- package/dist/StructuralVariantChordRenderer/types.js +0 -2
- package/dist/Tooltip.d.ts +0 -19
- package/dist/Tooltip.js +0 -32
- package/dist/VariantFeatureWidget/AltFormatter.d.ts +0 -4
- package/dist/VariantFeatureWidget/AltFormatter.js +0 -13
- package/dist/VariantFeatureWidget/Checkbox2.d.ts +0 -6
- package/dist/VariantFeatureWidget/Checkbox2.js +0 -8
- package/dist/VariantFeatureWidget/Formatter.d.ts +0 -3
- package/dist/VariantFeatureWidget/Formatter.js +0 -23
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -5
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +0 -7
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +0 -111
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -60
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -8
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +0 -15
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.js +0 -18
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +0 -103
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +0 -4
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +0 -80
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.d.ts +0 -9
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +0 -10
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +0 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +0 -54
- package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +0 -51
- package/dist/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid/index.js +0 -8
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +0 -21
- package/dist/VariantFeatureWidget/VariantSampleGrid/types.js +0 -2
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +0 -14
- package/dist/VariantFeatureWidget/configSchema.d.ts +0 -1
- package/dist/VariantFeatureWidget/configSchema.js +0 -5
- package/dist/VariantFeatureWidget/index.d.ts +0 -2
- package/dist/VariantFeatureWidget/index.js +0 -52
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +0 -104
- package/dist/VariantFeatureWidget/stateModelFactory.js +0 -12
- package/dist/VariantFeatureWidget/types.d.ts +0 -16
- package/dist/VariantFeatureWidget/types.js +0 -2
- package/dist/VariantFeatureWidget/variantFieldDescriptions.d.ts +0 -9
- package/dist/VariantFeatureWidget/variantFieldDescriptions.js +0 -12
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +0 -14
- package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +0 -30
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +0 -6
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +0 -21
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +0 -19
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +0 -58
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +0 -14
- package/dist/VariantRPC/MultiVariantGetSources.js +0 -22
- package/dist/VariantRPC/getGenotypeMatrix.d.ts +0 -6
- package/dist/VariantRPC/getGenotypeMatrix.js +0 -68
- package/dist/VariantRPC/types.d.ts +0 -36
- package/dist/VariantRPC/types.js +0 -2
- package/dist/VariantTrack/configSchema.d.ts +0 -79
- package/dist/VariantTrack/configSchema.js +0 -10
- package/dist/VariantTrack/index.d.ts +0 -2
- package/dist/VariantTrack/index.js +0 -20
- package/dist/VcfAdapter/VcfAdapter.d.ts +0 -35
- package/dist/VcfAdapter/VcfAdapter.js +0 -119
- package/dist/VcfAdapter/configSchema.d.ts +0 -18
- package/dist/VcfAdapter/configSchema.js +0 -35
- package/dist/VcfAdapter/index.d.ts +0 -2
- package/dist/VcfAdapter/index.js +0 -49
- package/dist/VcfAdapter/vcfParser.d.ts +0 -7
- package/dist/VcfAdapter/vcfParser.js +0 -26
- package/dist/VcfFeature/index.d.ts +0 -19
- package/dist/VcfFeature/index.js +0 -80
- package/dist/VcfFeature/util.d.ts +0 -6
- package/dist/VcfFeature/util.js +0 -227
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -25
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +0 -117
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -32
- package/dist/VcfTabixAdapter/configSchema.js +0 -56
- package/dist/VcfTabixAdapter/index.d.ts +0 -3
- package/dist/VcfTabixAdapter/index.js +0 -52
- package/dist/extensionPoints.d.ts +0 -2
- package/dist/extensionPoints.js +0 -39
- package/dist/getMultiVariantFeaturesAutorun.js +0 -48
- package/dist/getMultiVariantSourcesAutorun.d.ts +0 -11
- package/dist/getMultiVariantSourcesAutorun.js +0 -38
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -52
- package/dist/shared/MultiVariantBaseModel.d.ts +0 -413
- package/dist/shared/MultiVariantBaseModel.js +0 -373
- package/dist/shared/SharedVariantConfigSchema.d.ts +0 -66
- package/dist/shared/SharedVariantConfigSchema.js +0 -56
- package/dist/shared/SharedVariantMixin.d.ts +0 -325
- package/dist/shared/SharedVariantMixin.js +0 -58
- package/dist/shared/components/AddFiltersDialog.d.ts +0 -9
- package/dist/shared/components/AddFiltersDialog.js +0 -61
- package/dist/shared/components/MAFFilterDialog.d.ts +0 -8
- package/dist/shared/components/MAFFilterDialog.js +0 -28
- package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +0 -5
- package/dist/shared/components/MultiVariantBaseDisplayComponent.js +0 -29
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +0 -6
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.js +0 -29
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +0 -7
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +0 -74
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +0 -7
- package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +0 -145
- package/dist/shared/components/MultiVariantClusterDialog/types.d.ts +0 -10
- package/dist/shared/components/MultiVariantClusterDialog/types.js +0 -2
- package/dist/shared/components/MultiVariantColorLegend.d.ts +0 -10
- package/dist/shared/components/MultiVariantColorLegend.js +0 -24
- package/dist/shared/components/MultiVariantCrosshairs.d.ts +0 -7
- package/dist/shared/components/MultiVariantCrosshairs.js +0 -40
- package/dist/shared/components/MultiVariantLegendBar.d.ts +0 -7
- package/dist/shared/components/MultiVariantLegendBar.js +0 -32
- package/dist/shared/components/MultiVariantTooltip.d.ts +0 -10
- package/dist/shared/components/MultiVariantTooltip.js +0 -24
- package/dist/shared/components/RectBg.d.ts +0 -8
- package/dist/shared/components/RectBg.js +0 -10
- package/dist/shared/components/SetColorDialog.d.ts +0 -11
- package/dist/shared/components/SetColorDialog.js +0 -12
- package/dist/shared/components/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/dist/shared/components/SetColorDialogBulkEditPanel.js +0 -84
- package/dist/shared/components/SetColorDialogHelpfulTips.d.ts +0 -1
- package/dist/shared/components/SetColorDialogHelpfulTips.js +0 -7
- package/dist/shared/components/SetColorDialogRowPalettizer.d.ts +0 -10
- package/dist/shared/components/SetColorDialogRowPalettizer.js +0 -41
- package/dist/shared/components/SetMinMaxDialog.d.ts +0 -10
- package/dist/shared/components/SetMinMaxDialog.js +0 -26
- package/dist/shared/components/SetRowHeightDialog.d.ts +0 -8
- package/dist/shared/components/SetRowHeightDialog.js +0 -18
- package/dist/shared/components/SourcesDataGrid.d.ts +0 -7
- package/dist/shared/components/SourcesDataGrid.js +0 -68
- package/dist/shared/components/SourcesGrid.d.ts +0 -7
- package/dist/shared/components/SourcesGrid.js +0 -14
- package/dist/shared/components/SourcesGridHeader.d.ts +0 -8
- package/dist/shared/components/SourcesGridHeader.js +0 -41
- package/dist/shared/components/ui/SetColorDialog.d.ts +0 -31
- package/dist/shared/components/ui/SetColorDialog.js +0 -51
- package/dist/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/dist/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -84
- package/dist/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
- package/dist/shared/components/ui/SetColorDialogHelpfulTips.js +0 -7
- package/dist/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
- package/dist/shared/components/ui/SetColorDialogRowPalettizer.js +0 -41
- package/dist/shared/constants.d.ts +0 -2
- package/dist/shared/constants.js +0 -5
- package/dist/shared/drawAlleleCount.d.ts +0 -2
- package/dist/shared/drawAlleleCount.js +0 -50
- package/dist/shared/drawPhased.d.ts +0 -1
- package/dist/shared/drawPhased.js +0 -25
- package/dist/shared/findSecondLargestNumber.d.ts +0 -0
- package/dist/shared/findSecondLargestNumber.js +0 -1
- package/dist/shared/getSources.d.ts +0 -15
- package/dist/shared/getSources.js +0 -34
- package/dist/shared/minorAlleleFrequencyUtils.d.ts +0 -14
- package/dist/shared/minorAlleleFrequencyUtils.js +0 -72
- package/dist/shared/sourcesGridUtils.d.ts +0 -11
- package/dist/shared/sourcesGridUtils.js +0 -32
- package/dist/shared/types.d.ts +0 -14
- package/dist/shared/types.js +0 -2
- package/dist/shared/util.d.ts +0 -2
- package/dist/shared/util.js +0 -21
- package/dist/util.d.ts +0 -0
- package/dist/util.js +0 -1
- package/esm/MultiVariantBaseRenderer.d.ts +0 -46
- package/esm/MultiVariantBaseRenderer.js +0 -33
- package/esm/VariantFeatureWidget/Checkbox2.d.ts +0 -6
- package/esm/VariantFeatureWidget/Checkbox2.js +0 -5
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -24
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/index.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +0 -11
- package/esm/extensionPoints.d.ts +0 -2
- package/esm/getMultiVariantFeaturesAutorun.d.ts +0 -18
- package/esm/shared/SharedVariantMixin.d.ts +0 -325
- package/esm/shared/SharedVariantMixin.js +0 -55
- package/esm/shared/components/ui/SetColorDialog.js +0 -45
- package/esm/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
- package/esm/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -81
- package/esm/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
- package/esm/shared/components/ui/SetColorDialogHelpfulTips.js +0 -4
- package/esm/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
- package/esm/shared/components/ui/SetColorDialogRowPalettizer.js +0 -38
- package/esm/shared/findSecondLargestNumber.d.ts +0 -0
- package/esm/shared/findSecondLargestNumber.js +0 -1
- package/esm/shared/util.d.ts +0 -2
- package/esm/shared/util.js +0 -17
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
2
|
-
import configSchema from
|
|
3
|
-
export { default as configSchema } from
|
|
2
|
+
import configSchema from "./configSchema.js";
|
|
3
|
+
export { default as configSchema } from "./configSchema.js";
|
|
4
4
|
export default function VcfTabixAdapterF(pluginManager) {
|
|
5
5
|
pluginManager.addAdapterType(() => new AdapterType({
|
|
6
6
|
name: 'VcfTabixAdapter',
|
|
7
7
|
displayName: 'VCF tabix adapter',
|
|
8
8
|
configSchema,
|
|
9
|
-
|
|
9
|
+
adapterCapabilities: ['exportData'],
|
|
10
|
+
getAdapterClass: () => import("./VcfTabixAdapter.js").then(r => r.default),
|
|
10
11
|
}));
|
|
11
12
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function (x) {
|
|
2
|
+
return typeof x === "object" && "length" in x
|
|
3
|
+
? x
|
|
4
|
+
: Array.from(x);
|
|
5
|
+
}
|
|
6
|
+
export function shuffle(array, random) {
|
|
7
|
+
let m = array.length, t, i;
|
|
8
|
+
while (m) {
|
|
9
|
+
i = random() * m-- | 0;
|
|
10
|
+
t = array[m];
|
|
11
|
+
array[m] = array[i];
|
|
12
|
+
array[i] = t;
|
|
13
|
+
}
|
|
14
|
+
return array;
|
|
15
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function defaultSeparation(a, b) {
|
|
2
|
+
return a.parent === b.parent ? 1 : 2;
|
|
3
|
+
}
|
|
4
|
+
function meanX(children) {
|
|
5
|
+
return children.reduce(meanXReduce, 0) / children.length;
|
|
6
|
+
}
|
|
7
|
+
function meanXReduce(x, c) {
|
|
8
|
+
return x + c.x;
|
|
9
|
+
}
|
|
10
|
+
function maxY(children) {
|
|
11
|
+
return 1 + children.reduce(maxYReduce, 0);
|
|
12
|
+
}
|
|
13
|
+
function maxYReduce(y, c) {
|
|
14
|
+
return Math.max(y, c.y);
|
|
15
|
+
}
|
|
16
|
+
function leafLeft(node) {
|
|
17
|
+
var children;
|
|
18
|
+
while (children = node.children)
|
|
19
|
+
node = children[0];
|
|
20
|
+
return node;
|
|
21
|
+
}
|
|
22
|
+
function leafRight(node) {
|
|
23
|
+
var children;
|
|
24
|
+
while (children = node.children)
|
|
25
|
+
node = children[children.length - 1];
|
|
26
|
+
return node;
|
|
27
|
+
}
|
|
28
|
+
export default function () {
|
|
29
|
+
var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = false;
|
|
30
|
+
function cluster(root) {
|
|
31
|
+
var previousNode, x = 0;
|
|
32
|
+
root.eachAfter(function (node) {
|
|
33
|
+
var children = node.children;
|
|
34
|
+
if (children) {
|
|
35
|
+
node.x = meanX(children);
|
|
36
|
+
node.y = maxY(children);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
node.x = previousNode ? x += separation(node, previousNode) : 0;
|
|
40
|
+
node.y = 0;
|
|
41
|
+
previousNode = node;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
var left = leafLeft(root), right = leafRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
|
|
45
|
+
return root.eachAfter(nodeSize ? function (node) {
|
|
46
|
+
node.x = (node.x - root.x) * dx;
|
|
47
|
+
node.y = (root.y - node.y) * dy;
|
|
48
|
+
} : function (node) {
|
|
49
|
+
node.x = (node.x - x0) / (x1 - x0) * dx;
|
|
50
|
+
node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
cluster.separation = function (x) {
|
|
54
|
+
return arguments.length ? (separation = x, cluster) : separation;
|
|
55
|
+
};
|
|
56
|
+
cluster.size = function (x) {
|
|
57
|
+
return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);
|
|
58
|
+
};
|
|
59
|
+
cluster.nodeSize = function (x) {
|
|
60
|
+
return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);
|
|
61
|
+
};
|
|
62
|
+
return cluster;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function count(node) {
|
|
2
|
+
var sum = 0, children = node.children, i = children && children.length;
|
|
3
|
+
if (!i)
|
|
4
|
+
sum = 1;
|
|
5
|
+
else
|
|
6
|
+
while (--i >= 0)
|
|
7
|
+
sum += children[i].value;
|
|
8
|
+
node.value = sum;
|
|
9
|
+
}
|
|
10
|
+
export default function () {
|
|
11
|
+
return this.eachAfter(count);
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): unknown[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (callback: any, that: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (callback: any, that: any): any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function (callback, that) {
|
|
2
|
+
var node = this, nodes = [node], next = [], children, i, n, index = -1;
|
|
3
|
+
while (node = nodes.pop()) {
|
|
4
|
+
next.push(node);
|
|
5
|
+
if (children = node.children) {
|
|
6
|
+
for (i = 0, n = children.length; i < n; ++i) {
|
|
7
|
+
nodes.push(children[i]);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
while (node = next.pop()) {
|
|
12
|
+
callback.call(that, node, ++index, this);
|
|
13
|
+
}
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (callback: any, that: any): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default function (callback, that) {
|
|
2
|
+
var node = this, nodes = [node], children, i, index = -1;
|
|
3
|
+
while (node = nodes.pop()) {
|
|
4
|
+
callback.call(that, node, ++index, this);
|
|
5
|
+
if (children = node.children) {
|
|
6
|
+
for (i = children.length - 1; i >= 0; --i) {
|
|
7
|
+
nodes.push(children[i]);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (callback: any, that: any): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import node_count from "./count.js";
|
|
2
|
+
import node_each from "./each.js";
|
|
3
|
+
import node_eachBefore from "./eachBefore.js";
|
|
4
|
+
import node_eachAfter from "./eachAfter.js";
|
|
5
|
+
import node_find from "./find.js";
|
|
6
|
+
import node_sum from "./sum.js";
|
|
7
|
+
import node_sort from "./sort.js";
|
|
8
|
+
import node_path from "./path.js";
|
|
9
|
+
import node_ancestors from "./ancestors.js";
|
|
10
|
+
import node_descendants from "./descendants.js";
|
|
11
|
+
import node_leaves from "./leaves.js";
|
|
12
|
+
import node_links from "./links.js";
|
|
13
|
+
import node_iterator from "./iterator.js";
|
|
14
|
+
export default function hierarchy(data, children) {
|
|
15
|
+
if (data instanceof Map) {
|
|
16
|
+
data = [undefined, data];
|
|
17
|
+
if (children === undefined)
|
|
18
|
+
children = mapChildren;
|
|
19
|
+
}
|
|
20
|
+
else if (children === undefined) {
|
|
21
|
+
children = objectChildren;
|
|
22
|
+
}
|
|
23
|
+
var root = new Node(data), node, nodes = [root], child, childs, i, n;
|
|
24
|
+
while (node = nodes.pop()) {
|
|
25
|
+
if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {
|
|
26
|
+
node.children = childs;
|
|
27
|
+
for (i = n - 1; i >= 0; --i) {
|
|
28
|
+
nodes.push(child = childs[i] = new Node(childs[i]));
|
|
29
|
+
child.parent = node;
|
|
30
|
+
child.depth = node.depth + 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return root.eachBefore(computeHeight);
|
|
35
|
+
}
|
|
36
|
+
function node_copy() {
|
|
37
|
+
return hierarchy(this).eachBefore(copyData);
|
|
38
|
+
}
|
|
39
|
+
function objectChildren(d) {
|
|
40
|
+
return d.children;
|
|
41
|
+
}
|
|
42
|
+
function mapChildren(d) {
|
|
43
|
+
return Array.isArray(d) ? d[1] : null;
|
|
44
|
+
}
|
|
45
|
+
function copyData(node) {
|
|
46
|
+
if (node.data.value !== undefined)
|
|
47
|
+
node.value = node.data.value;
|
|
48
|
+
node.data = node.data.data;
|
|
49
|
+
}
|
|
50
|
+
export function computeHeight(node) {
|
|
51
|
+
var height = 0;
|
|
52
|
+
do
|
|
53
|
+
node.height = height;
|
|
54
|
+
while ((node = node.parent) && (node.height < ++height));
|
|
55
|
+
}
|
|
56
|
+
export function Node(data) {
|
|
57
|
+
this.data = data;
|
|
58
|
+
this.depth =
|
|
59
|
+
this.height = 0;
|
|
60
|
+
this.parent = null;
|
|
61
|
+
}
|
|
62
|
+
Node.prototype = hierarchy.prototype = {
|
|
63
|
+
constructor: Node,
|
|
64
|
+
count: node_count,
|
|
65
|
+
each: node_each,
|
|
66
|
+
eachAfter: node_eachAfter,
|
|
67
|
+
eachBefore: node_eachBefore,
|
|
68
|
+
find: node_find,
|
|
69
|
+
sum: node_sum,
|
|
70
|
+
sort: node_sort,
|
|
71
|
+
path: node_path,
|
|
72
|
+
ancestors: node_ancestors,
|
|
73
|
+
descendants: node_descendants,
|
|
74
|
+
leaves: node_leaves,
|
|
75
|
+
links: node_links,
|
|
76
|
+
copy: node_copy,
|
|
77
|
+
[Symbol.iterator]: node_iterator
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): Generator<any, void, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default function* () {
|
|
2
|
+
var node = this, current, next = [node], children, i, n;
|
|
3
|
+
do {
|
|
4
|
+
current = next.reverse(), next = [];
|
|
5
|
+
while (node = current.pop()) {
|
|
6
|
+
yield node;
|
|
7
|
+
if (children = node.children) {
|
|
8
|
+
for (i = 0, n = children.length; i < n; ++i) {
|
|
9
|
+
next.push(children[i]);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
} while (next.length);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (end: any): any[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default function (end) {
|
|
2
|
+
var start = this, ancestor = leastCommonAncestor(start, end), nodes = [start];
|
|
3
|
+
while (start !== ancestor) {
|
|
4
|
+
start = start.parent;
|
|
5
|
+
nodes.push(start);
|
|
6
|
+
}
|
|
7
|
+
var k = nodes.length;
|
|
8
|
+
while (end !== ancestor) {
|
|
9
|
+
nodes.splice(k, 0, end);
|
|
10
|
+
end = end.parent;
|
|
11
|
+
}
|
|
12
|
+
return nodes;
|
|
13
|
+
}
|
|
14
|
+
function leastCommonAncestor(a, b) {
|
|
15
|
+
if (a === b)
|
|
16
|
+
return a;
|
|
17
|
+
var aNodes = a.ancestors(), bNodes = b.ancestors(), c = null;
|
|
18
|
+
a = aNodes.pop();
|
|
19
|
+
b = bNodes.pop();
|
|
20
|
+
while (a === b) {
|
|
21
|
+
c = a;
|
|
22
|
+
a = aNodes.pop();
|
|
23
|
+
b = bNodes.pop();
|
|
24
|
+
}
|
|
25
|
+
return c;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (compare: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (value: any): any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as cluster } from "./cluster.ts";
|
|
2
|
+
export { default as hierarchy, Node } from "./hierarchy/index.ts";
|
|
3
|
+
export { default as pack } from "./pack/index.ts";
|
|
4
|
+
export { default as packSiblings } from "./pack/siblings.ts";
|
|
5
|
+
export { default as packEnclose } from "./pack/enclose.ts";
|
|
6
|
+
export { default as partition } from "./partition.ts";
|
|
7
|
+
export { default as stratify } from "./stratify.ts";
|
|
8
|
+
export { default as tree } from "./tree.ts";
|
|
9
|
+
export { default as treemap } from "./treemap/index.ts";
|
|
10
|
+
export { default as treemapBinary } from "./treemap/binary.ts";
|
|
11
|
+
export { default as treemapDice } from "./treemap/dice.ts";
|
|
12
|
+
export { default as treemapSlice } from "./treemap/slice.ts";
|
|
13
|
+
export { default as treemapSliceDice } from "./treemap/sliceDice.ts";
|
|
14
|
+
export { default as treemapSquarify } from "./treemap/squarify.ts";
|
|
15
|
+
export { default as treemapResquarify } from "./treemap/resquarify.ts";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as cluster } from "./cluster.js";
|
|
2
|
+
export { default as hierarchy, Node } from "./hierarchy/index.js";
|
|
3
|
+
export { default as pack } from "./pack/index.js";
|
|
4
|
+
export { default as packSiblings } from "./pack/siblings.js";
|
|
5
|
+
export { default as packEnclose } from "./pack/enclose.js";
|
|
6
|
+
export { default as partition } from "./partition.js";
|
|
7
|
+
export { default as stratify } from "./stratify.js";
|
|
8
|
+
export { default as tree } from "./tree.js";
|
|
9
|
+
export { default as treemap } from "./treemap/index.js";
|
|
10
|
+
export { default as treemapBinary } from "./treemap/binary.js";
|
|
11
|
+
export { default as treemapDice } from "./treemap/dice.js";
|
|
12
|
+
export { default as treemapSlice } from "./treemap/slice.js";
|
|
13
|
+
export { default as treemapSliceDice } from "./treemap/sliceDice.js";
|
|
14
|
+
export { default as treemapSquarify } from "./treemap/squarify.js";
|
|
15
|
+
export { default as treemapResquarify } from "./treemap/resquarify.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): () => number;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { shuffle } from "../array.js";
|
|
2
|
+
import lcg from "../lcg.js";
|
|
3
|
+
export default function (circles) {
|
|
4
|
+
return packEncloseRandom(circles, lcg());
|
|
5
|
+
}
|
|
6
|
+
export function packEncloseRandom(circles, random) {
|
|
7
|
+
var i = 0, n = (circles = shuffle(Array.from(circles), random)).length, B = [], p, e;
|
|
8
|
+
while (i < n) {
|
|
9
|
+
p = circles[i];
|
|
10
|
+
if (e && enclosesWeak(e, p))
|
|
11
|
+
++i;
|
|
12
|
+
else
|
|
13
|
+
e = encloseBasis(B = extendBasis(B, p)), i = 0;
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
function extendBasis(B, p) {
|
|
18
|
+
var i, j;
|
|
19
|
+
if (enclosesWeakAll(p, B))
|
|
20
|
+
return [p];
|
|
21
|
+
for (i = 0; i < B.length; ++i) {
|
|
22
|
+
if (enclosesNot(p, B[i])
|
|
23
|
+
&& enclosesWeakAll(encloseBasis2(B[i], p), B)) {
|
|
24
|
+
return [B[i], p];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
for (i = 0; i < B.length - 1; ++i) {
|
|
28
|
+
for (j = i + 1; j < B.length; ++j) {
|
|
29
|
+
if (enclosesNot(encloseBasis2(B[i], B[j]), p)
|
|
30
|
+
&& enclosesNot(encloseBasis2(B[i], p), B[j])
|
|
31
|
+
&& enclosesNot(encloseBasis2(B[j], p), B[i])
|
|
32
|
+
&& enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {
|
|
33
|
+
return [B[i], B[j], p];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
throw new Error;
|
|
38
|
+
}
|
|
39
|
+
function enclosesNot(a, b) {
|
|
40
|
+
var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;
|
|
41
|
+
return dr < 0 || dr * dr < dx * dx + dy * dy;
|
|
42
|
+
}
|
|
43
|
+
function enclosesWeak(a, b) {
|
|
44
|
+
var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y;
|
|
45
|
+
return dr > 0 && dr * dr > dx * dx + dy * dy;
|
|
46
|
+
}
|
|
47
|
+
function enclosesWeakAll(a, B) {
|
|
48
|
+
for (var i = 0; i < B.length; ++i) {
|
|
49
|
+
if (!enclosesWeak(a, B[i])) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function encloseBasis(B) {
|
|
56
|
+
switch (B.length) {
|
|
57
|
+
case 1: return encloseBasis1(B[0]);
|
|
58
|
+
case 2: return encloseBasis2(B[0], B[1]);
|
|
59
|
+
case 3: return encloseBasis3(B[0], B[1], B[2]);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function encloseBasis1(a) {
|
|
63
|
+
return {
|
|
64
|
+
x: a.x,
|
|
65
|
+
y: a.y,
|
|
66
|
+
r: a.r
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function encloseBasis2(a, b) {
|
|
70
|
+
var x1 = a.x, y1 = a.y, r1 = a.r, x2 = b.x, y2 = b.y, r2 = b.r, x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, l = Math.sqrt(x21 * x21 + y21 * y21);
|
|
71
|
+
return {
|
|
72
|
+
x: (x1 + x2 + x21 / l * r21) / 2,
|
|
73
|
+
y: (y1 + y2 + y21 / l * r21) / 2,
|
|
74
|
+
r: (l + r1 + r2) / 2
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function encloseBasis3(a, b, c) {
|
|
78
|
+
var x1 = a.x, y1 = a.y, r1 = a.r, x2 = b.x, y2 = b.y, r2 = b.r, x3 = c.x, y3 = c.y, r3 = c.r, a2 = x1 - x2, a3 = x1 - x3, b2 = y1 - y2, b3 = y1 - y3, c2 = r2 - r1, c3 = r3 - r1, d1 = x1 * x1 + y1 * y1 - r1 * r1, d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, ab = a3 * b2 - a2 * b3, xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, xb = (b3 * c2 - b2 * c3) / ab, ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, yb = (a2 * c3 - a3 * c2) / ab, A = xb * xb + yb * yb - 1, B = 2 * (r1 + xa * xb + ya * yb), C = xa * xa + ya * ya - r1 * r1, r = -(Math.abs(A) > 1e-6 ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);
|
|
79
|
+
return {
|
|
80
|
+
x: x1 + xa + xb * r,
|
|
81
|
+
y: y1 + ya + yb * r,
|
|
82
|
+
r: r
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { optional } from "../accessors.js";
|
|
2
|
+
import constant, { constantZero } from "../constant.js";
|
|
3
|
+
import lcg from "../lcg.js";
|
|
4
|
+
import { packSiblingsRandom } from "./siblings.js";
|
|
5
|
+
function defaultRadius(d) {
|
|
6
|
+
return Math.sqrt(d.value);
|
|
7
|
+
}
|
|
8
|
+
export default function () {
|
|
9
|
+
var radius = null, dx = 1, dy = 1, padding = constantZero;
|
|
10
|
+
function pack(root) {
|
|
11
|
+
const random = lcg();
|
|
12
|
+
root.x = dx / 2, root.y = dy / 2;
|
|
13
|
+
if (radius) {
|
|
14
|
+
root.eachBefore(radiusLeaf(radius))
|
|
15
|
+
.eachAfter(packChildrenRandom(padding, 0.5, random))
|
|
16
|
+
.eachBefore(translateChild(1));
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
root.eachBefore(radiusLeaf(defaultRadius))
|
|
20
|
+
.eachAfter(packChildrenRandom(constantZero, 1, random))
|
|
21
|
+
.eachAfter(packChildrenRandom(padding, root.r / Math.min(dx, dy), random))
|
|
22
|
+
.eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));
|
|
23
|
+
}
|
|
24
|
+
return root;
|
|
25
|
+
}
|
|
26
|
+
pack.radius = function (x) {
|
|
27
|
+
return arguments.length ? (radius = optional(x), pack) : radius;
|
|
28
|
+
};
|
|
29
|
+
pack.size = function (x) {
|
|
30
|
+
return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];
|
|
31
|
+
};
|
|
32
|
+
pack.padding = function (x) {
|
|
33
|
+
return arguments.length ? (padding = typeof x === "function" ? x : constant(+x), pack) : padding;
|
|
34
|
+
};
|
|
35
|
+
return pack;
|
|
36
|
+
}
|
|
37
|
+
function radiusLeaf(radius) {
|
|
38
|
+
return function (node) {
|
|
39
|
+
if (!node.children) {
|
|
40
|
+
node.r = Math.max(0, +radius(node) || 0);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function packChildrenRandom(padding, k, random) {
|
|
45
|
+
return function (node) {
|
|
46
|
+
if (children = node.children) {
|
|
47
|
+
var children, i, n = children.length, r = padding(node) * k || 0, e;
|
|
48
|
+
if (r)
|
|
49
|
+
for (i = 0; i < n; ++i)
|
|
50
|
+
children[i].r += r;
|
|
51
|
+
e = packSiblingsRandom(children, random);
|
|
52
|
+
if (r)
|
|
53
|
+
for (i = 0; i < n; ++i)
|
|
54
|
+
children[i].r -= r;
|
|
55
|
+
node.r = e + r;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function translateChild(k) {
|
|
60
|
+
return function (node) {
|
|
61
|
+
var parent = node.parent;
|
|
62
|
+
node.r *= k;
|
|
63
|
+
if (parent) {
|
|
64
|
+
node.x = parent.x + k * node.x;
|
|
65
|
+
node.y = parent.y + k * node.y;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|