@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.
Files changed (539) hide show
  1. package/esm/ChordVariantDisplay/components/ChordVariantDisplay.d.ts +11 -0
  2. package/esm/ChordVariantDisplay/components/ChordVariantDisplay.js +16 -0
  3. package/esm/ChordVariantDisplay/components/DisplayError.d.ts +9 -0
  4. package/esm/ChordVariantDisplay/components/DisplayError.js +7 -0
  5. package/esm/ChordVariantDisplay/components/Loading.d.ts +8 -0
  6. package/esm/ChordVariantDisplay/components/Loading.js +28 -0
  7. package/esm/ChordVariantDisplay/index.js +4 -4
  8. package/esm/ChordVariantDisplay/models/configSchema.d.ts +4 -5
  9. package/esm/ChordVariantDisplay/models/configSchema.js +10 -5
  10. package/esm/ChordVariantDisplay/models/renderReaction.d.ts +30 -0
  11. package/esm/ChordVariantDisplay/models/renderReaction.js +48 -0
  12. package/esm/ChordVariantDisplay/models/renderSvg.d.ts +6 -0
  13. package/esm/ChordVariantDisplay/models/renderSvg.js +12 -0
  14. package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +535 -46
  15. package/esm/ChordVariantDisplay/models/stateModelFactory.js +146 -8
  16. package/esm/LinearVariantDisplay/configSchema.d.ts +5 -5
  17. package/esm/LinearVariantDisplay/configSchema.js +2 -2
  18. package/esm/LinearVariantDisplay/index.js +6 -4
  19. package/esm/LinearVariantDisplay/model.d.ts +1086 -103
  20. package/esm/LinearVariantDisplay/model.js +10 -26
  21. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -1
  22. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +8 -18
  23. package/esm/MultiLinearVariantDisplay/configSchema.d.ts +6 -44
  24. package/esm/MultiLinearVariantDisplay/configSchema.js +2 -2
  25. package/esm/MultiLinearVariantDisplay/index.js +4 -3
  26. package/esm/MultiLinearVariantDisplay/model.d.ts +1031 -125
  27. package/esm/MultiLinearVariantDisplay/model.js +3 -23
  28. package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -1
  29. package/esm/MultiLinearVariantDisplay/renderSvg.js +4 -4
  30. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +8 -2
  31. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +26 -23
  32. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -1
  33. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +9 -20
  34. package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +6 -6
  35. package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +1 -1
  36. package/esm/MultiLinearVariantMatrixDisplay/index.js +5 -4
  37. package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +1110 -131
  38. package/esm/MultiLinearVariantMatrixDisplay/model.js +22 -48
  39. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -1
  40. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -3
  41. package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +4 -35
  42. package/esm/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +19 -33
  43. package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +12 -1
  44. package/esm/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +48 -22
  45. package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +1 -1
  46. package/esm/MultiLinearVariantMatrixRenderer/index.js +4 -4
  47. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -2
  48. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +155 -135
  49. package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +2 -14
  50. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +3 -60
  51. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +9 -18
  52. package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +7 -6
  53. package/esm/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +30 -26
  54. package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -1
  55. package/esm/MultiLinearVariantRenderer/index.js +4 -4
  56. package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +14 -11
  57. package/esm/MultiLinearVariantRenderer/makeImageData.js +127 -110
  58. package/esm/MultiLinearVariantRenderer/types.d.ts +3 -20
  59. package/esm/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +1 -1
  60. package/esm/SplitVcfTabixAdapter/configSchema.d.ts +2 -2
  61. package/esm/SplitVcfTabixAdapter/index.d.ts +1 -1
  62. package/esm/SplitVcfTabixAdapter/index.js +3 -3
  63. package/esm/StructuralVariantChordRenderer/Chord.d.ts +1 -1
  64. package/esm/StructuralVariantChordRenderer/Chord.js +41 -58
  65. package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
  66. package/esm/StructuralVariantChordRenderer/ReactComponent.js +3 -3
  67. package/esm/StructuralVariantChordRenderer/configSchema.d.ts +2 -2
  68. package/esm/StructuralVariantChordRenderer/index.js +3 -3
  69. package/esm/Tooltip.js +2 -2
  70. package/esm/VariantFeatureWidget/AltFormatter.js +1 -1
  71. package/esm/VariantFeatureWidget/Formatter.js +2 -2
  72. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.d.ts +1 -0
  73. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakpointSplitViewChoiceDialog.js +1 -0
  74. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +1 -1
  75. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +8 -23
  76. package/esm/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +1 -1
  77. package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
  78. package/esm/VariantFeatureWidget/VariantFeatureWidget.js +16 -29
  79. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +5 -2
  80. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +68 -59
  81. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +13 -2
  82. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +1 -1
  83. package/esm/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +72 -30
  84. package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +2 -2
  85. package/esm/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +49 -26
  86. package/esm/VariantFeatureWidget/VariantSampleGrid/types.d.ts +3 -5
  87. package/esm/VariantFeatureWidget/configSchema.d.ts +1 -1
  88. package/esm/VariantFeatureWidget/index.js +3 -3
  89. package/esm/VariantFeatureWidget/stateModelFactory.d.ts +39 -39
  90. package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
  91. package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +2 -7
  92. package/esm/VariantRPC/MultiVariantClusterGenotypeMatrix.js +3 -14
  93. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +4 -2
  94. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +2 -5
  95. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +2 -2
  96. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +34 -19
  97. package/esm/VariantRPC/MultiVariantGetSources.js +2 -6
  98. package/esm/VariantRPC/executeClusterGenotypeMatrix.d.ts +22 -0
  99. package/esm/VariantRPC/executeClusterGenotypeMatrix.js +19 -0
  100. package/esm/VariantRPC/getGenotypeMatrix.d.ts +18 -3
  101. package/esm/VariantRPC/getGenotypeMatrix.js +23 -40
  102. package/esm/VariantRPC/types.d.ts +10 -24
  103. package/esm/VariantTrack/configSchema.d.ts +16 -11
  104. package/esm/VariantTrack/index.js +13 -2
  105. package/esm/VariantTrack/saveTrackFormats/vcf.d.ts +4 -0
  106. package/esm/VariantTrack/saveTrackFormats/vcf.js +15 -0
  107. package/esm/VcfAdapter/VcfAdapter.d.ts +6 -3
  108. package/esm/VcfAdapter/VcfAdapter.js +36 -24
  109. package/esm/VcfAdapter/configSchema.d.ts +2 -2
  110. package/esm/VcfAdapter/index.js +3 -2
  111. package/esm/VcfExtensionPoints/index.d.ts +2 -0
  112. package/esm/{extensionPoints.js → VcfExtensionPoints/index.js} +1 -1
  113. package/esm/VcfFeature/index.js +20 -8
  114. package/esm/VcfFeature/util.d.ts +0 -1
  115. package/esm/VcfFeature/util.js +70 -188
  116. package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +2 -0
  117. package/esm/VcfTabixAdapter/VcfTabixAdapter.js +28 -3
  118. package/esm/VcfTabixAdapter/configSchema.d.ts +5 -5
  119. package/esm/VcfTabixAdapter/configSchema.js +1 -1
  120. package/esm/VcfTabixAdapter/index.d.ts +1 -1
  121. package/esm/VcfTabixAdapter/index.js +4 -3
  122. package/esm/d3-hierarchy2/accessors.d.ts +2 -0
  123. package/esm/d3-hierarchy2/accessors.js +8 -0
  124. package/esm/d3-hierarchy2/array.d.ts +2 -0
  125. package/esm/d3-hierarchy2/array.js +15 -0
  126. package/esm/d3-hierarchy2/cluster.d.ts +8 -0
  127. package/esm/d3-hierarchy2/cluster.js +63 -0
  128. package/esm/d3-hierarchy2/constant.d.ts +2 -0
  129. package/esm/d3-hierarchy2/constant.js +8 -0
  130. package/esm/d3-hierarchy2/hierarchy/ancestors.d.ts +1 -0
  131. package/esm/d3-hierarchy2/hierarchy/ancestors.js +7 -0
  132. package/esm/d3-hierarchy2/hierarchy/count.d.ts +1 -0
  133. package/esm/d3-hierarchy2/hierarchy/count.js +12 -0
  134. package/esm/d3-hierarchy2/hierarchy/descendants.d.ts +1 -0
  135. package/esm/d3-hierarchy2/hierarchy/descendants.js +3 -0
  136. package/esm/d3-hierarchy2/hierarchy/each.d.ts +1 -0
  137. package/esm/d3-hierarchy2/hierarchy/each.js +7 -0
  138. package/esm/d3-hierarchy2/hierarchy/eachAfter.d.ts +1 -0
  139. package/esm/d3-hierarchy2/hierarchy/eachAfter.js +15 -0
  140. package/esm/d3-hierarchy2/hierarchy/eachBefore.d.ts +1 -0
  141. package/esm/d3-hierarchy2/hierarchy/eachBefore.js +12 -0
  142. package/esm/d3-hierarchy2/hierarchy/find.d.ts +1 -0
  143. package/esm/d3-hierarchy2/hierarchy/find.js +8 -0
  144. package/esm/d3-hierarchy2/hierarchy/index.d.ts +3 -0
  145. package/esm/d3-hierarchy2/hierarchy/index.js +78 -0
  146. package/esm/d3-hierarchy2/hierarchy/iterator.d.ts +1 -0
  147. package/esm/d3-hierarchy2/hierarchy/iterator.js +14 -0
  148. package/esm/d3-hierarchy2/hierarchy/leaves.d.ts +1 -0
  149. package/esm/d3-hierarchy2/hierarchy/leaves.js +9 -0
  150. package/esm/d3-hierarchy2/hierarchy/links.d.ts +1 -0
  151. package/esm/d3-hierarchy2/hierarchy/links.js +9 -0
  152. package/esm/d3-hierarchy2/hierarchy/path.d.ts +1 -0
  153. package/esm/d3-hierarchy2/hierarchy/path.js +26 -0
  154. package/esm/d3-hierarchy2/hierarchy/sort.d.ts +1 -0
  155. package/esm/d3-hierarchy2/hierarchy/sort.js +7 -0
  156. package/esm/d3-hierarchy2/hierarchy/sum.d.ts +1 -0
  157. package/esm/d3-hierarchy2/hierarchy/sum.js +8 -0
  158. package/esm/d3-hierarchy2/index.d.ts +15 -0
  159. package/esm/d3-hierarchy2/index.js +15 -0
  160. package/esm/d3-hierarchy2/lcg.d.ts +1 -0
  161. package/esm/d3-hierarchy2/lcg.js +7 -0
  162. package/esm/d3-hierarchy2/pack/enclose.d.ts +10 -0
  163. package/esm/d3-hierarchy2/pack/enclose.js +84 -0
  164. package/esm/d3-hierarchy2/pack/index.d.ts +7 -0
  165. package/esm/d3-hierarchy2/pack/index.js +68 -0
  166. package/esm/d3-hierarchy2/pack/siblings.d.ts +2 -0
  167. package/esm/d3-hierarchy2/pack/siblings.js +94 -0
  168. package/esm/d3-hierarchy2/partition.d.ts +6 -0
  169. package/esm/d3-hierarchy2/partition.js +42 -0
  170. package/esm/d3-hierarchy2/stratify.d.ts +9 -0
  171. package/esm/d3-hierarchy2/stratify.js +115 -0
  172. package/esm/d3-hierarchy2/tree.d.ts +8 -0
  173. package/esm/d3-hierarchy2/tree.js +153 -0
  174. package/esm/d3-hierarchy2/treemap/binary.d.ts +1 -0
  175. package/esm/d3-hierarchy2/treemap/binary.js +36 -0
  176. package/esm/d3-hierarchy2/treemap/dice.d.ts +1 -0
  177. package/esm/d3-hierarchy2/treemap/dice.js +7 -0
  178. package/esm/d3-hierarchy2/treemap/index.d.ts +17 -0
  179. package/esm/d3-hierarchy2/treemap/index.js +72 -0
  180. package/esm/d3-hierarchy2/treemap/resquarify.d.ts +5 -0
  181. package/esm/d3-hierarchy2/treemap/resquarify.js +28 -0
  182. package/esm/d3-hierarchy2/treemap/round.d.ts +1 -0
  183. package/esm/d3-hierarchy2/treemap/round.js +6 -0
  184. package/esm/d3-hierarchy2/treemap/slice.d.ts +1 -0
  185. package/esm/d3-hierarchy2/treemap/slice.js +7 -0
  186. package/esm/d3-hierarchy2/treemap/sliceDice.d.ts +1 -0
  187. package/esm/d3-hierarchy2/treemap/sliceDice.js +5 -0
  188. package/esm/d3-hierarchy2/treemap/squarify.d.ts +11 -0
  189. package/esm/d3-hierarchy2/treemap/squarify.js +46 -0
  190. package/esm/index.d.ts +1 -1
  191. package/esm/index.js +19 -22
  192. package/esm/shared/MultiVariantBaseModel.d.ts +1103 -117
  193. package/esm/shared/MultiVariantBaseModel.js +231 -65
  194. package/esm/shared/SharedVariantConfigSchema.d.ts +2 -40
  195. package/esm/shared/SharedVariantConfigSchema.js +1 -46
  196. package/esm/shared/components/AddFiltersDialog.d.ts +2 -3
  197. package/esm/shared/components/AddFiltersDialog.js +20 -28
  198. package/esm/shared/components/{ui/SetColorDialog.d.ts → BaseSetColorDialog.d.ts} +2 -1
  199. package/esm/shared/components/BaseSetColorDialog.js +61 -0
  200. package/esm/shared/components/ClearTreeWarningDialog.d.ts +4 -0
  201. package/esm/shared/components/ClearTreeWarningDialog.js +9 -0
  202. package/esm/shared/components/MAFFilterDialog.d.ts +2 -3
  203. package/esm/shared/components/MAFFilterDialog.js +4 -8
  204. package/esm/shared/components/MultiVariantBaseDisplayComponent.d.ts +1 -1
  205. package/esm/shared/components/MultiVariantBaseDisplayComponent.js +8 -17
  206. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +1 -1
  207. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialog.js +3 -3
  208. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +1 -1
  209. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +9 -14
  210. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +1 -1
  211. package/esm/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +11 -15
  212. package/esm/shared/components/MultiVariantClusterDialog/types.d.ts +3 -2
  213. package/esm/shared/components/MultiVariantColorLegend.d.ts +1 -1
  214. package/esm/shared/components/MultiVariantColorLegend.js +22 -12
  215. package/esm/shared/components/MultiVariantCrosshairs.d.ts +4 -2
  216. package/esm/shared/components/MultiVariantCrosshairs.js +31 -23
  217. package/esm/shared/components/MultiVariantLegendBar.d.ts +4 -4
  218. package/esm/shared/components/MultiVariantLegendBar.js +24 -22
  219. package/esm/shared/components/MultiVariantLegendBarWrapper.d.ts +7 -0
  220. package/esm/shared/components/MultiVariantLegendBarWrapper.js +18 -0
  221. package/esm/shared/components/MultiVariantTooltip.d.ts +5 -6
  222. package/esm/shared/components/MultiVariantTooltip.js +35 -17
  223. package/esm/shared/components/ScrollableVariantContainer.d.ts +8 -0
  224. package/esm/shared/components/ScrollableVariantContainer.js +23 -0
  225. package/esm/shared/components/SetColorDialog.d.ts +3 -2
  226. package/esm/shared/components/SetColorDialog.js +2 -2
  227. package/esm/shared/components/SetColorDialogBulkEditPanel.d.ts +7 -8
  228. package/esm/shared/components/SetColorDialogBulkEditPanel.js +24 -54
  229. package/esm/shared/components/SetColorDialogRowPalettizer.js +13 -23
  230. package/esm/shared/components/SetRowHeightDialog.d.ts +2 -3
  231. package/esm/shared/components/SourcesDataGrid.d.ts +1 -1
  232. package/esm/shared/components/SourcesDataGrid.js +1 -1
  233. package/esm/shared/components/SourcesGrid.d.ts +1 -1
  234. package/esm/shared/components/SourcesGrid.js +2 -2
  235. package/esm/shared/components/SourcesGridHeader.d.ts +1 -1
  236. package/esm/shared/components/SourcesGridHeader.js +1 -1
  237. package/esm/shared/components/SvgTree.d.ts +5 -0
  238. package/esm/shared/components/SvgTree.js +19 -0
  239. package/esm/shared/components/TreeSidebar.d.ts +5 -0
  240. package/esm/shared/components/TreeSidebar.js +121 -0
  241. package/esm/shared/components/types.d.ts +43 -0
  242. package/esm/shared/components/types.js +1 -0
  243. package/esm/shared/constants.d.ts +8 -2
  244. package/esm/shared/constants.js +11 -2
  245. package/esm/shared/drawAlleleCount.d.ts +2 -1
  246. package/esm/shared/drawAlleleCount.js +50 -16
  247. package/esm/shared/drawPhased.js +11 -12
  248. package/{dist → esm/shared}/getMultiVariantFeaturesAutorun.d.ts +5 -4
  249. package/esm/{getMultiVariantFeaturesAutorun.js → shared/getMultiVariantFeaturesAutorun.js} +9 -2
  250. package/esm/{getMultiVariantSourcesAutorun.d.ts → shared/getMultiVariantSourcesAutorun.d.ts} +4 -3
  251. package/esm/{getMultiVariantSourcesAutorun.js → shared/getMultiVariantSourcesAutorun.js} +10 -2
  252. package/esm/shared/getSources.d.ts +1 -1
  253. package/esm/shared/getSources.js +2 -2
  254. package/esm/shared/hooks/useMouseTracking.d.ts +6 -0
  255. package/esm/shared/hooks/useMouseTracking.js +34 -0
  256. package/esm/shared/makeSidebarSvg.d.ts +9 -0
  257. package/esm/shared/makeSidebarSvg.js +9 -0
  258. package/esm/shared/minorAlleleFrequencyUtils.d.ts +6 -5
  259. package/esm/shared/minorAlleleFrequencyUtils.js +37 -38
  260. package/esm/shared/setupMultiVariantAutoruns.d.ts +2 -0
  261. package/esm/shared/setupMultiVariantAutoruns.js +8 -0
  262. package/esm/shared/treeDrawingAutorun.d.ts +16 -0
  263. package/esm/shared/treeDrawingAutorun.js +71 -0
  264. package/esm/shared/types.d.ts +15 -0
  265. package/package.json +38 -39
  266. package/dist/ChordVariantDisplay/index.d.ts +0 -2
  267. package/dist/ChordVariantDisplay/index.js +0 -25
  268. package/dist/ChordVariantDisplay/models/configSchema.d.ts +0 -12
  269. package/dist/ChordVariantDisplay/models/configSchema.js +0 -15
  270. package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +0 -115
  271. package/dist/ChordVariantDisplay/models/stateModelFactory.js +0 -35
  272. package/dist/LinearVariantDisplay/configSchema.d.ts +0 -34
  273. package/dist/LinearVariantDisplay/configSchema.js +0 -12
  274. package/dist/LinearVariantDisplay/index.d.ts +0 -2
  275. package/dist/LinearVariantDisplay/index.js +0 -24
  276. package/dist/LinearVariantDisplay/model.d.ts +0 -278
  277. package/dist/LinearVariantDisplay/model.js +0 -37
  278. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +0 -5
  279. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +0 -29
  280. package/dist/MultiLinearVariantDisplay/configSchema.d.ts +0 -80
  281. package/dist/MultiLinearVariantDisplay/configSchema.js +0 -30
  282. package/dist/MultiLinearVariantDisplay/index.d.ts +0 -2
  283. package/dist/MultiLinearVariantDisplay/index.js +0 -57
  284. package/dist/MultiLinearVariantDisplay/model.d.ts +0 -422
  285. package/dist/MultiLinearVariantDisplay/model.js +0 -82
  286. package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +0 -3
  287. package/dist/MultiLinearVariantDisplay/renderSvg.js +0 -15
  288. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +0 -6
  289. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +0 -83
  290. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +0 -5
  291. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +0 -31
  292. package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +0 -37
  293. package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +0 -22
  294. package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +0 -2
  295. package/dist/MultiLinearVariantMatrixDisplay/index.js +0 -24
  296. package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +0 -431
  297. package/dist/MultiLinearVariantMatrixDisplay/model.js +0 -125
  298. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +0 -3
  299. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +0 -17
  300. package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.d.ts +0 -37
  301. package/dist/MultiLinearVariantMatrixRenderer/MultiLinearVariantMatrixRenderer.js +0 -87
  302. package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.d.ts +0 -8
  303. package/dist/MultiLinearVariantMatrixRenderer/components/MultiLinearVariantMatrixRendering.js +0 -41
  304. package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +0 -2
  305. package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +0 -6
  306. package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +0 -2
  307. package/dist/MultiLinearVariantMatrixRenderer/index.js +0 -20
  308. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +0 -14
  309. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +0 -154
  310. package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +0 -14
  311. package/dist/MultiLinearVariantMatrixRenderer/types.js +0 -2
  312. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +0 -63
  313. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +0 -79
  314. package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.d.ts +0 -33
  315. package/dist/MultiLinearVariantRenderer/components/MultiLinearVariantRendering.js +0 -67
  316. package/dist/MultiLinearVariantRenderer/components/util.d.ts +0 -1
  317. package/dist/MultiLinearVariantRenderer/components/util.js +0 -15
  318. package/dist/MultiLinearVariantRenderer/configSchema.d.ts +0 -2
  319. package/dist/MultiLinearVariantRenderer/configSchema.js +0 -8
  320. package/dist/MultiLinearVariantRenderer/index.d.ts +0 -2
  321. package/dist/MultiLinearVariantRenderer/index.js +0 -19
  322. package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +0 -14
  323. package/dist/MultiLinearVariantRenderer/makeImageData.js +0 -140
  324. package/dist/MultiLinearVariantRenderer/types.d.ts +0 -21
  325. package/dist/MultiLinearVariantRenderer/types.js +0 -2
  326. package/dist/MultiVariantBaseRenderer.d.ts +0 -46
  327. package/dist/MultiVariantBaseRenderer.js +0 -39
  328. package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.d.ts +0 -18
  329. package/dist/SplitVcfTabixAdapter/SplitVcfTabixAdapter.js +0 -92
  330. package/dist/SplitVcfTabixAdapter/configSchema.d.ts +0 -23
  331. package/dist/SplitVcfTabixAdapter/configSchema.js +0 -29
  332. package/dist/SplitVcfTabixAdapter/index.d.ts +0 -3
  333. package/dist/SplitVcfTabixAdapter/index.js +0 -52
  334. package/dist/StructuralVariantChordRenderer/Chord.d.ts +0 -13
  335. package/dist/StructuralVariantChordRenderer/Chord.js +0 -82
  336. package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +0 -16
  337. package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -30
  338. package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -21
  339. package/dist/StructuralVariantChordRenderer/configSchema.js +0 -25
  340. package/dist/StructuralVariantChordRenderer/index.d.ts +0 -2
  341. package/dist/StructuralVariantChordRenderer/index.js +0 -18
  342. package/dist/StructuralVariantChordRenderer/types.d.ts +0 -17
  343. package/dist/StructuralVariantChordRenderer/types.js +0 -2
  344. package/dist/Tooltip.d.ts +0 -19
  345. package/dist/Tooltip.js +0 -32
  346. package/dist/VariantFeatureWidget/AltFormatter.d.ts +0 -4
  347. package/dist/VariantFeatureWidget/AltFormatter.js +0 -13
  348. package/dist/VariantFeatureWidget/Checkbox2.d.ts +0 -6
  349. package/dist/VariantFeatureWidget/Checkbox2.js +0 -8
  350. package/dist/VariantFeatureWidget/Formatter.d.ts +0 -3
  351. package/dist/VariantFeatureWidget/Formatter.js +0 -23
  352. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
  353. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -5
  354. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
  355. package/dist/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -5
  356. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.d.ts +0 -7
  357. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendPanel.js +0 -111
  358. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
  359. package/dist/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -60
  360. package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
  361. package/dist/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -8
  362. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.d.ts +0 -5
  363. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGrid.js +0 -15
  364. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.d.ts +0 -5
  365. package/dist/VariantFeatureWidget/VariantConsequence/VariantConsequenceDataGridWrapper.js +0 -18
  366. package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +0 -5
  367. package/dist/VariantFeatureWidget/VariantFeatureWidget.js +0 -103
  368. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.d.ts +0 -4
  369. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantGenotypeFrequencyTable.js +0 -80
  370. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.d.ts +0 -9
  371. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleFilters.js +0 -10
  372. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.d.ts +0 -6
  373. package/dist/VariantFeatureWidget/VariantSampleGrid/VariantSampleGrid.js +0 -54
  374. package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.d.ts +0 -5
  375. package/dist/VariantFeatureWidget/VariantSampleGrid/getSampleGridRows.js +0 -51
  376. package/dist/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
  377. package/dist/VariantFeatureWidget/VariantSampleGrid/index.js +0 -8
  378. package/dist/VariantFeatureWidget/VariantSampleGrid/types.d.ts +0 -21
  379. package/dist/VariantFeatureWidget/VariantSampleGrid/types.js +0 -2
  380. package/dist/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
  381. package/dist/VariantFeatureWidget/VariantSampleGrid/util.js +0 -14
  382. package/dist/VariantFeatureWidget/configSchema.d.ts +0 -1
  383. package/dist/VariantFeatureWidget/configSchema.js +0 -5
  384. package/dist/VariantFeatureWidget/index.d.ts +0 -2
  385. package/dist/VariantFeatureWidget/index.js +0 -52
  386. package/dist/VariantFeatureWidget/stateModelFactory.d.ts +0 -104
  387. package/dist/VariantFeatureWidget/stateModelFactory.js +0 -12
  388. package/dist/VariantFeatureWidget/types.d.ts +0 -16
  389. package/dist/VariantFeatureWidget/types.js +0 -2
  390. package/dist/VariantFeatureWidget/variantFieldDescriptions.d.ts +0 -9
  391. package/dist/VariantFeatureWidget/variantFieldDescriptions.js +0 -12
  392. package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.d.ts +0 -14
  393. package/dist/VariantRPC/MultiVariantClusterGenotypeMatrix.js +0 -30
  394. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +0 -6
  395. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +0 -21
  396. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +0 -19
  397. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +0 -58
  398. package/dist/VariantRPC/MultiVariantGetSources.d.ts +0 -14
  399. package/dist/VariantRPC/MultiVariantGetSources.js +0 -22
  400. package/dist/VariantRPC/getGenotypeMatrix.d.ts +0 -6
  401. package/dist/VariantRPC/getGenotypeMatrix.js +0 -68
  402. package/dist/VariantRPC/types.d.ts +0 -36
  403. package/dist/VariantRPC/types.js +0 -2
  404. package/dist/VariantTrack/configSchema.d.ts +0 -79
  405. package/dist/VariantTrack/configSchema.js +0 -10
  406. package/dist/VariantTrack/index.d.ts +0 -2
  407. package/dist/VariantTrack/index.js +0 -20
  408. package/dist/VcfAdapter/VcfAdapter.d.ts +0 -35
  409. package/dist/VcfAdapter/VcfAdapter.js +0 -119
  410. package/dist/VcfAdapter/configSchema.d.ts +0 -18
  411. package/dist/VcfAdapter/configSchema.js +0 -35
  412. package/dist/VcfAdapter/index.d.ts +0 -2
  413. package/dist/VcfAdapter/index.js +0 -49
  414. package/dist/VcfAdapter/vcfParser.d.ts +0 -7
  415. package/dist/VcfAdapter/vcfParser.js +0 -26
  416. package/dist/VcfFeature/index.d.ts +0 -19
  417. package/dist/VcfFeature/index.js +0 -80
  418. package/dist/VcfFeature/util.d.ts +0 -6
  419. package/dist/VcfFeature/util.js +0 -227
  420. package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +0 -25
  421. package/dist/VcfTabixAdapter/VcfTabixAdapter.js +0 -117
  422. package/dist/VcfTabixAdapter/configSchema.d.ts +0 -32
  423. package/dist/VcfTabixAdapter/configSchema.js +0 -56
  424. package/dist/VcfTabixAdapter/index.d.ts +0 -3
  425. package/dist/VcfTabixAdapter/index.js +0 -52
  426. package/dist/extensionPoints.d.ts +0 -2
  427. package/dist/extensionPoints.js +0 -39
  428. package/dist/getMultiVariantFeaturesAutorun.js +0 -48
  429. package/dist/getMultiVariantSourcesAutorun.d.ts +0 -11
  430. package/dist/getMultiVariantSourcesAutorun.js +0 -38
  431. package/dist/index.d.ts +0 -7
  432. package/dist/index.js +0 -52
  433. package/dist/shared/MultiVariantBaseModel.d.ts +0 -413
  434. package/dist/shared/MultiVariantBaseModel.js +0 -373
  435. package/dist/shared/SharedVariantConfigSchema.d.ts +0 -66
  436. package/dist/shared/SharedVariantConfigSchema.js +0 -56
  437. package/dist/shared/SharedVariantMixin.d.ts +0 -325
  438. package/dist/shared/SharedVariantMixin.js +0 -58
  439. package/dist/shared/components/AddFiltersDialog.d.ts +0 -9
  440. package/dist/shared/components/AddFiltersDialog.js +0 -61
  441. package/dist/shared/components/MAFFilterDialog.d.ts +0 -8
  442. package/dist/shared/components/MAFFilterDialog.js +0 -28
  443. package/dist/shared/components/MultiVariantBaseDisplayComponent.d.ts +0 -5
  444. package/dist/shared/components/MultiVariantBaseDisplayComponent.js +0 -29
  445. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.d.ts +0 -6
  446. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialog.js +0 -29
  447. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.d.ts +0 -7
  448. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogAuto.js +0 -74
  449. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.d.ts +0 -7
  450. package/dist/shared/components/MultiVariantClusterDialog/ClusterDialogManual.js +0 -145
  451. package/dist/shared/components/MultiVariantClusterDialog/types.d.ts +0 -10
  452. package/dist/shared/components/MultiVariantClusterDialog/types.js +0 -2
  453. package/dist/shared/components/MultiVariantColorLegend.d.ts +0 -10
  454. package/dist/shared/components/MultiVariantColorLegend.js +0 -24
  455. package/dist/shared/components/MultiVariantCrosshairs.d.ts +0 -7
  456. package/dist/shared/components/MultiVariantCrosshairs.js +0 -40
  457. package/dist/shared/components/MultiVariantLegendBar.d.ts +0 -7
  458. package/dist/shared/components/MultiVariantLegendBar.js +0 -32
  459. package/dist/shared/components/MultiVariantTooltip.d.ts +0 -10
  460. package/dist/shared/components/MultiVariantTooltip.js +0 -24
  461. package/dist/shared/components/RectBg.d.ts +0 -8
  462. package/dist/shared/components/RectBg.js +0 -10
  463. package/dist/shared/components/SetColorDialog.d.ts +0 -11
  464. package/dist/shared/components/SetColorDialog.js +0 -12
  465. package/dist/shared/components/SetColorDialogBulkEditPanel.d.ts +0 -10
  466. package/dist/shared/components/SetColorDialogBulkEditPanel.js +0 -84
  467. package/dist/shared/components/SetColorDialogHelpfulTips.d.ts +0 -1
  468. package/dist/shared/components/SetColorDialogHelpfulTips.js +0 -7
  469. package/dist/shared/components/SetColorDialogRowPalettizer.d.ts +0 -10
  470. package/dist/shared/components/SetColorDialogRowPalettizer.js +0 -41
  471. package/dist/shared/components/SetMinMaxDialog.d.ts +0 -10
  472. package/dist/shared/components/SetMinMaxDialog.js +0 -26
  473. package/dist/shared/components/SetRowHeightDialog.d.ts +0 -8
  474. package/dist/shared/components/SetRowHeightDialog.js +0 -18
  475. package/dist/shared/components/SourcesDataGrid.d.ts +0 -7
  476. package/dist/shared/components/SourcesDataGrid.js +0 -68
  477. package/dist/shared/components/SourcesGrid.d.ts +0 -7
  478. package/dist/shared/components/SourcesGrid.js +0 -14
  479. package/dist/shared/components/SourcesGridHeader.d.ts +0 -8
  480. package/dist/shared/components/SourcesGridHeader.js +0 -41
  481. package/dist/shared/components/ui/SetColorDialog.d.ts +0 -31
  482. package/dist/shared/components/ui/SetColorDialog.js +0 -51
  483. package/dist/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
  484. package/dist/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -84
  485. package/dist/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
  486. package/dist/shared/components/ui/SetColorDialogHelpfulTips.js +0 -7
  487. package/dist/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
  488. package/dist/shared/components/ui/SetColorDialogRowPalettizer.js +0 -41
  489. package/dist/shared/constants.d.ts +0 -2
  490. package/dist/shared/constants.js +0 -5
  491. package/dist/shared/drawAlleleCount.d.ts +0 -2
  492. package/dist/shared/drawAlleleCount.js +0 -50
  493. package/dist/shared/drawPhased.d.ts +0 -1
  494. package/dist/shared/drawPhased.js +0 -25
  495. package/dist/shared/findSecondLargestNumber.d.ts +0 -0
  496. package/dist/shared/findSecondLargestNumber.js +0 -1
  497. package/dist/shared/getSources.d.ts +0 -15
  498. package/dist/shared/getSources.js +0 -34
  499. package/dist/shared/minorAlleleFrequencyUtils.d.ts +0 -14
  500. package/dist/shared/minorAlleleFrequencyUtils.js +0 -72
  501. package/dist/shared/sourcesGridUtils.d.ts +0 -11
  502. package/dist/shared/sourcesGridUtils.js +0 -32
  503. package/dist/shared/types.d.ts +0 -14
  504. package/dist/shared/types.js +0 -2
  505. package/dist/shared/util.d.ts +0 -2
  506. package/dist/shared/util.js +0 -21
  507. package/dist/util.d.ts +0 -0
  508. package/dist/util.js +0 -1
  509. package/esm/MultiVariantBaseRenderer.d.ts +0 -46
  510. package/esm/MultiVariantBaseRenderer.js +0 -33
  511. package/esm/VariantFeatureWidget/Checkbox2.d.ts +0 -6
  512. package/esm/VariantFeatureWidget/Checkbox2.js +0 -5
  513. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.d.ts +0 -1
  514. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendMultiLevelOptionDialog.js +0 -1
  515. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.d.ts +0 -1
  516. package/esm/VariantFeatureWidget/LaunchBreakendPanel/BreakendSingleLevelOptionDialog.js +0 -1
  517. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.d.ts +0 -4
  518. package/esm/VariantFeatureWidget/LaunchBreakendPanel/LaunchBreakendWidgetArea.js +0 -24
  519. package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.d.ts +0 -1
  520. package/esm/VariantFeatureWidget/LaunchBreakendPanel/index.js +0 -1
  521. package/esm/VariantFeatureWidget/VariantSampleGrid/index.d.ts +0 -1
  522. package/esm/VariantFeatureWidget/VariantSampleGrid/index.js +0 -1
  523. package/esm/VariantFeatureWidget/VariantSampleGrid/util.d.ts +0 -1
  524. package/esm/VariantFeatureWidget/VariantSampleGrid/util.js +0 -11
  525. package/esm/extensionPoints.d.ts +0 -2
  526. package/esm/getMultiVariantFeaturesAutorun.d.ts +0 -18
  527. package/esm/shared/SharedVariantMixin.d.ts +0 -325
  528. package/esm/shared/SharedVariantMixin.js +0 -55
  529. package/esm/shared/components/ui/SetColorDialog.js +0 -45
  530. package/esm/shared/components/ui/SetColorDialogBulkEditPanel.d.ts +0 -10
  531. package/esm/shared/components/ui/SetColorDialogBulkEditPanel.js +0 -81
  532. package/esm/shared/components/ui/SetColorDialogHelpfulTips.d.ts +0 -1
  533. package/esm/shared/components/ui/SetColorDialogHelpfulTips.js +0 -4
  534. package/esm/shared/components/ui/SetColorDialogRowPalettizer.d.ts +0 -10
  535. package/esm/shared/components/ui/SetColorDialogRowPalettizer.js +0 -38
  536. package/esm/shared/findSecondLargestNumber.d.ts +0 -0
  537. package/esm/shared/findSecondLargestNumber.js +0 -1
  538. package/esm/shared/util.d.ts +0 -2
  539. package/esm/shared/util.js +0 -17
@@ -0,0 +1,94 @@
1
+ import array from "../array.js";
2
+ import lcg from "../lcg.js";
3
+ import { packEncloseRandom } from "./enclose.js";
4
+ function place(b, a, c) {
5
+ var dx = b.x - a.x, x, a2, dy = b.y - a.y, y, b2, d2 = dx * dx + dy * dy;
6
+ if (d2) {
7
+ a2 = a.r + c.r, a2 *= a2;
8
+ b2 = b.r + c.r, b2 *= b2;
9
+ if (a2 > b2) {
10
+ x = (d2 + b2 - a2) / (2 * d2);
11
+ y = Math.sqrt(Math.max(0, b2 / d2 - x * x));
12
+ c.x = b.x - x * dx - y * dy;
13
+ c.y = b.y - x * dy + y * dx;
14
+ }
15
+ else {
16
+ x = (d2 + a2 - b2) / (2 * d2);
17
+ y = Math.sqrt(Math.max(0, a2 / d2 - x * x));
18
+ c.x = a.x + x * dx - y * dy;
19
+ c.y = a.y + x * dy + y * dx;
20
+ }
21
+ }
22
+ else {
23
+ c.x = a.x + c.r;
24
+ c.y = a.y;
25
+ }
26
+ }
27
+ function intersects(a, b) {
28
+ var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;
29
+ return dr > 0 && dr * dr > dx * dx + dy * dy;
30
+ }
31
+ function score(node) {
32
+ var a = node._, b = node.next._, ab = a.r + b.r, dx = (a.x * b.r + b.x * a.r) / ab, dy = (a.y * b.r + b.y * a.r) / ab;
33
+ return dx * dx + dy * dy;
34
+ }
35
+ function Node(circle) {
36
+ this._ = circle;
37
+ this.next = null;
38
+ this.previous = null;
39
+ }
40
+ export function packSiblingsRandom(circles, random) {
41
+ if (!(n = (circles = array(circles)).length))
42
+ return 0;
43
+ var a, b, c, n, aa, ca, i, j, k, sj, sk;
44
+ a = circles[0], a.x = 0, a.y = 0;
45
+ if (!(n > 1))
46
+ return a.r;
47
+ b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;
48
+ if (!(n > 2))
49
+ return a.r + b.r;
50
+ place(b, a, c = circles[2]);
51
+ a = new Node(a), b = new Node(b), c = new Node(c);
52
+ a.next = c.previous = b;
53
+ b.next = a.previous = c;
54
+ c.next = b.previous = a;
55
+ pack: for (i = 3; i < n; ++i) {
56
+ place(a._, b._, c = circles[i]), c = new Node(c);
57
+ j = b.next, k = a.previous, sj = b._.r, sk = a._.r;
58
+ do {
59
+ if (sj <= sk) {
60
+ if (intersects(j._, c._)) {
61
+ b = j, a.next = b, b.previous = a, --i;
62
+ continue pack;
63
+ }
64
+ sj += j._.r, j = j.next;
65
+ }
66
+ else {
67
+ if (intersects(k._, c._)) {
68
+ a = k, a.next = b, b.previous = a, --i;
69
+ continue pack;
70
+ }
71
+ sk += k._.r, k = k.previous;
72
+ }
73
+ } while (j !== k.next);
74
+ c.previous = a, c.next = b, a.next = b.previous = b = c;
75
+ aa = score(a);
76
+ while ((c = c.next) !== b) {
77
+ if ((ca = score(c)) < aa) {
78
+ a = c, aa = ca;
79
+ }
80
+ }
81
+ b = a.next;
82
+ }
83
+ a = [b._], c = b;
84
+ while ((c = c.next) !== b)
85
+ a.push(c._);
86
+ c = packEncloseRandom(a, random);
87
+ for (i = 0; i < n; ++i)
88
+ a = circles[i], a.x -= c.x, a.y -= c.y;
89
+ return c.r;
90
+ }
91
+ export default function (circles) {
92
+ packSiblingsRandom(circles, lcg());
93
+ return circles;
94
+ }
@@ -0,0 +1,6 @@
1
+ export default function (): {
2
+ (root: any): any;
3
+ round(x: any): boolean | any;
4
+ size(x: any): number[] | any;
5
+ padding(x: any): number | any;
6
+ };
@@ -0,0 +1,42 @@
1
+ import roundNode from "./treemap/round.js";
2
+ import treemapDice from "./treemap/dice.js";
3
+ export default function () {
4
+ var dx = 1, dy = 1, padding = 0, round = false;
5
+ function partition(root) {
6
+ var n = root.height + 1;
7
+ root.x0 =
8
+ root.y0 = padding;
9
+ root.x1 = dx;
10
+ root.y1 = dy / n;
11
+ root.eachBefore(positionNode(dy, n));
12
+ if (round)
13
+ root.eachBefore(roundNode);
14
+ return root;
15
+ }
16
+ function positionNode(dy, n) {
17
+ return function (node) {
18
+ if (node.children) {
19
+ treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);
20
+ }
21
+ var x0 = node.x0, y0 = node.y0, x1 = node.x1 - padding, y1 = node.y1 - padding;
22
+ if (x1 < x0)
23
+ x0 = x1 = (x0 + x1) / 2;
24
+ if (y1 < y0)
25
+ y0 = y1 = (y0 + y1) / 2;
26
+ node.x0 = x0;
27
+ node.y0 = y0;
28
+ node.x1 = x1;
29
+ node.y1 = y1;
30
+ };
31
+ }
32
+ partition.round = function (x) {
33
+ return arguments.length ? (round = !!x, partition) : round;
34
+ };
35
+ partition.size = function (x) {
36
+ return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];
37
+ };
38
+ partition.padding = function (x) {
39
+ return arguments.length ? (padding = +x, partition) : padding;
40
+ };
41
+ return partition;
42
+ }
@@ -0,0 +1,9 @@
1
+ declare function defaultId(d: any): any;
2
+ declare function defaultParentId(d: any): any;
3
+ export default function (): {
4
+ (data: any): any;
5
+ id(x: any): typeof defaultId;
6
+ parentId(x: any): typeof defaultParentId;
7
+ path(x: any): any;
8
+ };
9
+ export {};
@@ -0,0 +1,115 @@
1
+ import { optional } from "./accessors.js";
2
+ import { Node, computeHeight } from "./hierarchy/index.js";
3
+ var preroot = { depth: -1 }, ambiguous = {}, imputed = {};
4
+ function defaultId(d) {
5
+ return d.id;
6
+ }
7
+ function defaultParentId(d) {
8
+ return d.parentId;
9
+ }
10
+ export default function () {
11
+ var id = defaultId, parentId = defaultParentId, path;
12
+ function stratify(data) {
13
+ var nodes = Array.from(data), currentId = id, currentParentId = parentId, n, d, i, root, parent, node, nodeId, nodeKey, nodeByKey = new Map;
14
+ if (path != null) {
15
+ const I = nodes.map((d, i) => normalize(path(d, i, data)));
16
+ const P = I.map(parentof);
17
+ const S = new Set(I).add("");
18
+ for (const i of P) {
19
+ if (!S.has(i)) {
20
+ S.add(i);
21
+ I.push(i);
22
+ P.push(parentof(i));
23
+ nodes.push(imputed);
24
+ }
25
+ }
26
+ currentId = (_, i) => I[i];
27
+ currentParentId = (_, i) => P[i];
28
+ }
29
+ for (i = 0, n = nodes.length; i < n; ++i) {
30
+ d = nodes[i], node = nodes[i] = new Node(d);
31
+ if ((nodeId = currentId(d, i, data)) != null && (nodeId += "")) {
32
+ nodeKey = node.id = nodeId;
33
+ nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);
34
+ }
35
+ if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += "")) {
36
+ node.parent = nodeId;
37
+ }
38
+ }
39
+ for (i = 0; i < n; ++i) {
40
+ node = nodes[i];
41
+ if (nodeId = node.parent) {
42
+ parent = nodeByKey.get(nodeId);
43
+ if (!parent)
44
+ throw new Error("missing: " + nodeId);
45
+ if (parent === ambiguous)
46
+ throw new Error("ambiguous: " + nodeId);
47
+ if (parent.children)
48
+ parent.children.push(node);
49
+ else
50
+ parent.children = [node];
51
+ node.parent = parent;
52
+ }
53
+ else {
54
+ if (root)
55
+ throw new Error("multiple roots");
56
+ root = node;
57
+ }
58
+ }
59
+ if (!root)
60
+ throw new Error("no root");
61
+ if (path != null) {
62
+ while (root.data === imputed && root.children.length === 1) {
63
+ root = root.children[0], --n;
64
+ }
65
+ for (let i = nodes.length - 1; i >= 0; --i) {
66
+ node = nodes[i];
67
+ if (node.data !== imputed)
68
+ break;
69
+ node.data = null;
70
+ }
71
+ }
72
+ root.parent = preroot;
73
+ root.eachBefore(function (node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);
74
+ root.parent = null;
75
+ if (n > 0)
76
+ throw new Error("cycle");
77
+ return root;
78
+ }
79
+ stratify.id = function (x) {
80
+ return arguments.length ? (id = optional(x), stratify) : id;
81
+ };
82
+ stratify.parentId = function (x) {
83
+ return arguments.length ? (parentId = optional(x), stratify) : parentId;
84
+ };
85
+ stratify.path = function (x) {
86
+ return arguments.length ? (path = optional(x), stratify) : path;
87
+ };
88
+ return stratify;
89
+ }
90
+ function normalize(path) {
91
+ path = `${path}`;
92
+ let i = path.length;
93
+ if (slash(path, i - 1) && !slash(path, i - 2))
94
+ path = path.slice(0, -1);
95
+ return path[0] === "/" ? path : `/${path}`;
96
+ }
97
+ function parentof(path) {
98
+ let i = path.length;
99
+ if (i < 2)
100
+ return "";
101
+ while (--i > 1)
102
+ if (slash(path, i))
103
+ break;
104
+ return path.slice(0, i);
105
+ }
106
+ function slash(path, i) {
107
+ if (path[i] === "/") {
108
+ let k = 0;
109
+ while (i > 0 && path[--i] === "\\")
110
+ ++k;
111
+ if ((k & 1) === 0)
112
+ return true;
113
+ }
114
+ return false;
115
+ }
@@ -0,0 +1,8 @@
1
+ declare function defaultSeparation(a: any, b: any): 1 | 2;
2
+ export default function (): {
3
+ (root: any): any;
4
+ separation(x: any): any | typeof defaultSeparation;
5
+ size(x: any): number[] | any | null;
6
+ nodeSize(x: any): number[] | any | null;
7
+ };
8
+ export {};
@@ -0,0 +1,153 @@
1
+ import { Node } from "./hierarchy/index.js";
2
+ function defaultSeparation(a, b) {
3
+ return a.parent === b.parent ? 1 : 2;
4
+ }
5
+ function nextLeft(v) {
6
+ var children = v.children;
7
+ return children ? children[0] : v.t;
8
+ }
9
+ function nextRight(v) {
10
+ var children = v.children;
11
+ return children ? children[children.length - 1] : v.t;
12
+ }
13
+ function moveSubtree(wm, wp, shift) {
14
+ var change = shift / (wp.i - wm.i);
15
+ wp.c -= change;
16
+ wp.s += shift;
17
+ wm.c += change;
18
+ wp.z += shift;
19
+ wp.m += shift;
20
+ }
21
+ function executeShifts(v) {
22
+ var shift = 0, change = 0, children = v.children, i = children.length, w;
23
+ while (--i >= 0) {
24
+ w = children[i];
25
+ w.z += shift;
26
+ w.m += shift;
27
+ shift += w.s + (change += w.c);
28
+ }
29
+ }
30
+ function nextAncestor(vim, v, ancestor) {
31
+ return vim.a.parent === v.parent ? vim.a : ancestor;
32
+ }
33
+ function TreeNode(node, i) {
34
+ this._ = node;
35
+ this.parent = null;
36
+ this.children = null;
37
+ this.A = null;
38
+ this.a = this;
39
+ this.z = 0;
40
+ this.m = 0;
41
+ this.c = 0;
42
+ this.s = 0;
43
+ this.t = null;
44
+ this.i = i;
45
+ }
46
+ TreeNode.prototype = Object.create(Node.prototype);
47
+ function treeRoot(root) {
48
+ var tree = new TreeNode(root, 0), node, nodes = [tree], child, children, i, n;
49
+ while (node = nodes.pop()) {
50
+ if (children = node._.children) {
51
+ node.children = new Array(n = children.length);
52
+ for (i = n - 1; i >= 0; --i) {
53
+ nodes.push(child = node.children[i] = new TreeNode(children[i], i));
54
+ child.parent = node;
55
+ }
56
+ }
57
+ }
58
+ (tree.parent = new TreeNode(null, 0)).children = [tree];
59
+ return tree;
60
+ }
61
+ export default function () {
62
+ var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = null;
63
+ function tree(root) {
64
+ var t = treeRoot(root);
65
+ t.eachAfter(firstWalk), t.parent.m = -t.z;
66
+ t.eachBefore(secondWalk);
67
+ if (nodeSize)
68
+ root.eachBefore(sizeNode);
69
+ else {
70
+ var left = root, right = root, bottom = root;
71
+ root.eachBefore(function (node) {
72
+ if (node.x < left.x)
73
+ left = node;
74
+ if (node.x > right.x)
75
+ right = node;
76
+ if (node.depth > bottom.depth)
77
+ bottom = node;
78
+ });
79
+ var s = left === right ? 1 : separation(left, right) / 2, tx = s - left.x, kx = dx / (right.x + s + tx), ky = dy / (bottom.depth || 1);
80
+ root.eachBefore(function (node) {
81
+ node.x = (node.x + tx) * kx;
82
+ node.y = node.depth * ky;
83
+ });
84
+ }
85
+ return root;
86
+ }
87
+ function firstWalk(v) {
88
+ var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null;
89
+ if (children) {
90
+ executeShifts(v);
91
+ var midpoint = (children[0].z + children[children.length - 1].z) / 2;
92
+ if (w) {
93
+ v.z = w.z + separation(v._, w._);
94
+ v.m = v.z - midpoint;
95
+ }
96
+ else {
97
+ v.z = midpoint;
98
+ }
99
+ }
100
+ else if (w) {
101
+ v.z = w.z + separation(v._, w._);
102
+ }
103
+ v.parent.A = apportion(v, w, v.parent.A || siblings[0]);
104
+ }
105
+ function secondWalk(v) {
106
+ v._.x = v.z + v.parent.m;
107
+ v.m += v.parent.m;
108
+ }
109
+ function apportion(v, w, ancestor) {
110
+ if (w) {
111
+ var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;
112
+ while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {
113
+ vom = nextLeft(vom);
114
+ vop = nextRight(vop);
115
+ vop.a = v;
116
+ shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);
117
+ if (shift > 0) {
118
+ moveSubtree(nextAncestor(vim, v, ancestor), v, shift);
119
+ sip += shift;
120
+ sop += shift;
121
+ }
122
+ sim += vim.m;
123
+ sip += vip.m;
124
+ som += vom.m;
125
+ sop += vop.m;
126
+ }
127
+ if (vim && !nextRight(vop)) {
128
+ vop.t = vim;
129
+ vop.m += sim - sop;
130
+ }
131
+ if (vip && !nextLeft(vom)) {
132
+ vom.t = vip;
133
+ vom.m += sip - som;
134
+ ancestor = v;
135
+ }
136
+ }
137
+ return ancestor;
138
+ }
139
+ function sizeNode(node) {
140
+ node.x *= dx;
141
+ node.y = node.depth * dy;
142
+ }
143
+ tree.separation = function (x) {
144
+ return arguments.length ? (separation = x, tree) : separation;
145
+ };
146
+ tree.size = function (x) {
147
+ return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);
148
+ };
149
+ tree.nodeSize = function (x) {
150
+ return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);
151
+ };
152
+ return tree;
153
+ }
@@ -0,0 +1 @@
1
+ export default function (parent: any, x0: any, y0: any, x1: any, y1: any): void;
@@ -0,0 +1,36 @@
1
+ export default function (parent, x0, y0, x1, y1) {
2
+ var nodes = parent.children, i, n = nodes.length, sum, sums = new Array(n + 1);
3
+ for (sums[0] = sum = i = 0; i < n; ++i) {
4
+ sums[i + 1] = sum += nodes[i].value;
5
+ }
6
+ partition(0, n, parent.value, x0, y0, x1, y1);
7
+ function partition(i, j, value, x0, y0, x1, y1) {
8
+ if (i >= j - 1) {
9
+ var node = nodes[i];
10
+ node.x0 = x0, node.y0 = y0;
11
+ node.x1 = x1, node.y1 = y1;
12
+ return;
13
+ }
14
+ var valueOffset = sums[i], valueTarget = (value / 2) + valueOffset, k = i + 1, hi = j - 1;
15
+ while (k < hi) {
16
+ var mid = k + hi >>> 1;
17
+ if (sums[mid] < valueTarget)
18
+ k = mid + 1;
19
+ else
20
+ hi = mid;
21
+ }
22
+ if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k)
23
+ --k;
24
+ var valueLeft = sums[k] - valueOffset, valueRight = value - valueLeft;
25
+ if ((x1 - x0) > (y1 - y0)) {
26
+ var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1;
27
+ partition(i, k, valueLeft, x0, y0, xk, y1);
28
+ partition(k, j, valueRight, xk, y0, x1, y1);
29
+ }
30
+ else {
31
+ var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1;
32
+ partition(i, k, valueLeft, x0, y0, x1, yk);
33
+ partition(k, j, valueRight, x0, yk, x1, y1);
34
+ }
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ export default function (parent: any, x0: any, y0: any, x1: any, y1: any): void;
@@ -0,0 +1,7 @@
1
+ export default function (parent, x0, y0, x1, y1) {
2
+ var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (x1 - x0) / parent.value;
3
+ while (++i < n) {
4
+ node = nodes[i], node.y0 = y0, node.y1 = y1;
5
+ node.x0 = x0, node.x1 = x0 += node.value * k;
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ import { constantZero } from "../constant.ts";
2
+ export default function (): {
3
+ (root: any): any;
4
+ round(x: any): boolean | any;
5
+ size(x: any): number[] | any;
6
+ tile(x: any): {
7
+ (parent: any, x0: any, y0: any, x1: any, y1: any): void;
8
+ ratio(x: any): any;
9
+ } | any;
10
+ padding(x: any): any;
11
+ paddingInner(x: any): typeof constantZero | any;
12
+ paddingOuter(x: any): any;
13
+ paddingTop(x: any): typeof constantZero | any;
14
+ paddingRight(x: any): typeof constantZero | any;
15
+ paddingBottom(x: any): typeof constantZero | any;
16
+ paddingLeft(x: any): typeof constantZero | any;
17
+ };
@@ -0,0 +1,72 @@
1
+ import roundNode from "./round.js";
2
+ import squarify from "./squarify.js";
3
+ import { required } from "../accessors.js";
4
+ import constant, { constantZero } from "../constant.js";
5
+ export default function () {
6
+ var tile = squarify, round = false, dx = 1, dy = 1, paddingStack = [0], paddingInner = constantZero, paddingTop = constantZero, paddingRight = constantZero, paddingBottom = constantZero, paddingLeft = constantZero;
7
+ function treemap(root) {
8
+ root.x0 =
9
+ root.y0 = 0;
10
+ root.x1 = dx;
11
+ root.y1 = dy;
12
+ root.eachBefore(positionNode);
13
+ paddingStack = [0];
14
+ if (round)
15
+ root.eachBefore(roundNode);
16
+ return root;
17
+ }
18
+ function positionNode(node) {
19
+ var p = paddingStack[node.depth], x0 = node.x0 + p, y0 = node.y0 + p, x1 = node.x1 - p, y1 = node.y1 - p;
20
+ if (x1 < x0)
21
+ x0 = x1 = (x0 + x1) / 2;
22
+ if (y1 < y0)
23
+ y0 = y1 = (y0 + y1) / 2;
24
+ node.x0 = x0;
25
+ node.y0 = y0;
26
+ node.x1 = x1;
27
+ node.y1 = y1;
28
+ if (node.children) {
29
+ p = paddingStack[node.depth + 1] = paddingInner(node) / 2;
30
+ x0 += paddingLeft(node) - p;
31
+ y0 += paddingTop(node) - p;
32
+ x1 -= paddingRight(node) - p;
33
+ y1 -= paddingBottom(node) - p;
34
+ if (x1 < x0)
35
+ x0 = x1 = (x0 + x1) / 2;
36
+ if (y1 < y0)
37
+ y0 = y1 = (y0 + y1) / 2;
38
+ tile(node, x0, y0, x1, y1);
39
+ }
40
+ }
41
+ treemap.round = function (x) {
42
+ return arguments.length ? (round = !!x, treemap) : round;
43
+ };
44
+ treemap.size = function (x) {
45
+ return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];
46
+ };
47
+ treemap.tile = function (x) {
48
+ return arguments.length ? (tile = required(x), treemap) : tile;
49
+ };
50
+ treemap.padding = function (x) {
51
+ return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();
52
+ };
53
+ treemap.paddingInner = function (x) {
54
+ return arguments.length ? (paddingInner = typeof x === "function" ? x : constant(+x), treemap) : paddingInner;
55
+ };
56
+ treemap.paddingOuter = function (x) {
57
+ return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();
58
+ };
59
+ treemap.paddingTop = function (x) {
60
+ return arguments.length ? (paddingTop = typeof x === "function" ? x : constant(+x), treemap) : paddingTop;
61
+ };
62
+ treemap.paddingRight = function (x) {
63
+ return arguments.length ? (paddingRight = typeof x === "function" ? x : constant(+x), treemap) : paddingRight;
64
+ };
65
+ treemap.paddingBottom = function (x) {
66
+ return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant(+x), treemap) : paddingBottom;
67
+ };
68
+ treemap.paddingLeft = function (x) {
69
+ return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant(+x), treemap) : paddingLeft;
70
+ };
71
+ return treemap;
72
+ }
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ (parent: any, x0: any, y0: any, x1: any, y1: any): void;
3
+ ratio(x: any): any;
4
+ };
5
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import treemapDice from "./dice.js";
2
+ import treemapSlice from "./slice.js";
3
+ import { phi, squarifyRatio } from "./squarify.js";
4
+ export default (function custom(ratio) {
5
+ function resquarify(parent, x0, y0, x1, y1) {
6
+ if ((rows = parent._squarify) && (rows.ratio === ratio)) {
7
+ var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value;
8
+ while (++j < m) {
9
+ row = rows[j], nodes = row.children;
10
+ for (i = row.value = 0, n = nodes.length; i < n; ++i)
11
+ row.value += nodes[i].value;
12
+ if (row.dice)
13
+ treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);
14
+ else
15
+ treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);
16
+ value -= row.value;
17
+ }
18
+ }
19
+ else {
20
+ parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);
21
+ rows.ratio = ratio;
22
+ }
23
+ }
24
+ resquarify.ratio = function (x) {
25
+ return custom((x = +x) > 1 ? x : 1);
26
+ };
27
+ return resquarify;
28
+ })(phi);
@@ -0,0 +1 @@
1
+ export default function (node: any): void;
@@ -0,0 +1,6 @@
1
+ export default function (node) {
2
+ node.x0 = Math.round(node.x0);
3
+ node.y0 = Math.round(node.y0);
4
+ node.x1 = Math.round(node.x1);
5
+ node.y1 = Math.round(node.y1);
6
+ }
@@ -0,0 +1 @@
1
+ export default function (parent: any, x0: any, y0: any, x1: any, y1: any): void;
@@ -0,0 +1,7 @@
1
+ export default function (parent, x0, y0, x1, y1) {
2
+ var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (y1 - y0) / parent.value;
3
+ while (++i < n) {
4
+ node = nodes[i], node.x0 = x0, node.x1 = x1;
5
+ node.y0 = y0, node.y1 = y0 += node.value * k;
6
+ }
7
+ }
@@ -0,0 +1 @@
1
+ export default function (parent: any, x0: any, y0: any, x1: any, y1: any): void;
@@ -0,0 +1,5 @@
1
+ import dice from "./dice.js";
2
+ import slice from "./slice.js";
3
+ export default function (parent, x0, y0, x1, y1) {
4
+ (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);
5
+ }
@@ -0,0 +1,11 @@
1
+ export declare var phi: number;
2
+ export declare function squarifyRatio(ratio: any, parent: any, x0: any, y0: any, x1: any, y1: any): {
3
+ value: any;
4
+ dice: boolean;
5
+ children: any;
6
+ }[];
7
+ declare const _default: {
8
+ (parent: any, x0: any, y0: any, x1: any, y1: any): void;
9
+ ratio(x: any): any;
10
+ };
11
+ export default _default;