@genome-spy/core 0.72.0 → 0.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/LICENSE +1 -1
  2. package/dist/bundle/AbortablePromiseCache-3gHJdF3E.js +96 -0
  3. package/dist/bundle/browser-BTgw5ieH.js +126 -0
  4. package/dist/bundle/chunk-DmhlhrBa.js +11 -0
  5. package/dist/bundle/esm-BDFRLEuD.js +1248 -0
  6. package/dist/bundle/esm-BygJiwh0.js +573 -0
  7. package/dist/bundle/esm-CGX-qz1d.js +155 -0
  8. package/dist/bundle/esm-CgfVIRJ-.js +121 -0
  9. package/dist/bundle/esm-CuMSzCHy.js +298 -0
  10. package/dist/bundle/esm-DMXpJXM4.js +369 -0
  11. package/dist/bundle/esm-DQiq2Zhd.js +1426 -0
  12. package/dist/bundle/esm-DtE8VqAv.js +1015 -0
  13. package/dist/bundle/esm-sIoQYZ21.js +461 -0
  14. package/dist/bundle/index.es.js +21078 -24556
  15. package/dist/bundle/index.js +379 -383
  16. package/dist/bundle/parquetRead-DG_-F5j5.js +1609 -0
  17. package/dist/schema.json +13349 -7082
  18. package/dist/src/config/axisConfig.d.ts +16 -0
  19. package/dist/src/config/axisConfig.d.ts.map +1 -0
  20. package/dist/src/config/axisConfig.js +84 -0
  21. package/dist/src/config/defaultConfig.d.ts +3 -0
  22. package/dist/src/config/defaultConfig.d.ts.map +1 -0
  23. package/dist/src/config/defaultConfig.js +38 -0
  24. package/dist/src/config/defaults/axisDefaults.d.ts +5 -0
  25. package/dist/src/config/defaults/axisDefaults.d.ts.map +1 -0
  26. package/dist/src/config/defaults/axisDefaults.js +72 -0
  27. package/dist/src/config/defaults/markDefaults.d.ts +15 -0
  28. package/dist/src/config/defaults/markDefaults.d.ts.map +1 -0
  29. package/dist/src/config/defaults/markDefaults.js +121 -0
  30. package/dist/src/config/defaults/scaleDefaults.d.ts +5 -0
  31. package/dist/src/config/defaults/scaleDefaults.d.ts.map +1 -0
  32. package/dist/src/config/defaults/scaleDefaults.js +18 -0
  33. package/dist/src/config/defaults/titleDefaults.d.ts +5 -0
  34. package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -0
  35. package/dist/src/config/defaults/titleDefaults.js +47 -0
  36. package/dist/src/config/defaults/viewDefaults.d.ts +3 -0
  37. package/dist/src/config/defaults/viewDefaults.d.ts.map +1 -0
  38. package/dist/src/config/defaults/viewDefaults.js +2 -0
  39. package/dist/src/config/markConfig.d.ts +8 -0
  40. package/dist/src/config/markConfig.d.ts.map +1 -0
  41. package/dist/src/config/markConfig.js +27 -0
  42. package/dist/src/config/mergeConfig.d.ts +8 -0
  43. package/dist/src/config/mergeConfig.d.ts.map +1 -0
  44. package/dist/src/config/mergeConfig.js +81 -0
  45. package/dist/src/config/resolveConfig.d.ts +22 -0
  46. package/dist/src/config/resolveConfig.d.ts.map +1 -0
  47. package/dist/src/config/resolveConfig.js +32 -0
  48. package/dist/src/config/scaleConfig.d.ts +40 -0
  49. package/dist/src/config/scaleConfig.d.ts.map +1 -0
  50. package/dist/src/config/scaleConfig.js +220 -0
  51. package/dist/src/config/styleUtils.d.ts +6 -0
  52. package/dist/src/config/styleUtils.d.ts.map +1 -0
  53. package/dist/src/config/styleUtils.js +10 -0
  54. package/dist/src/config/themes.d.ts +15 -0
  55. package/dist/src/config/themes.d.ts.map +1 -0
  56. package/dist/src/config/themes.js +293 -0
  57. package/dist/src/config/titleConfig.d.ts +12 -0
  58. package/dist/src/config/titleConfig.d.ts.map +1 -0
  59. package/dist/src/config/titleConfig.js +42 -0
  60. package/dist/src/config/viewConfig.d.ts +7 -0
  61. package/dist/src/config/viewConfig.d.ts.map +1 -0
  62. package/dist/src/config/viewConfig.js +29 -0
  63. package/dist/src/data/flowNode.d.ts +22 -1
  64. package/dist/src/data/flowNode.d.ts.map +1 -1
  65. package/dist/src/data/flowNode.js +37 -1
  66. package/dist/src/data/formats/bed.d.ts +8 -0
  67. package/dist/src/data/formats/bed.d.ts.map +1 -0
  68. package/dist/src/data/formats/bed.js +58 -0
  69. package/dist/src/data/formats/bedpe.d.ts +8 -0
  70. package/dist/src/data/formats/bedpe.d.ts.map +1 -0
  71. package/dist/src/data/formats/bedpe.js +164 -0
  72. package/dist/src/data/formats/fasta.d.ts.map +1 -1
  73. package/dist/src/data/formats/fasta.js +4 -0
  74. package/dist/src/data/formats/parquet.d.ts.map +1 -1
  75. package/dist/src/data/formats/parquet.js +4 -0
  76. package/dist/src/data/sources/dataSourceFactory.d.ts +2 -13
  77. package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
  78. package/dist/src/data/sources/dataSourceFactory.js +5 -141
  79. package/dist/src/data/sources/dataUtils.d.ts +16 -0
  80. package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
  81. package/dist/src/data/sources/dataUtils.js +53 -3
  82. package/dist/src/data/sources/lazy/axisGenomeSource.d.ts.map +1 -1
  83. package/dist/src/data/sources/lazy/axisGenomeSource.js +11 -0
  84. package/dist/src/data/sources/lazy/axisTickSource.d.ts +1 -1
  85. package/dist/src/data/sources/lazy/axisTickSource.d.ts.map +1 -1
  86. package/dist/src/data/sources/lazy/axisTickSource.js +19 -8
  87. package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
  88. package/dist/src/data/sources/lazy/bamSource.js +11 -0
  89. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  90. package/dist/src/data/sources/lazy/bigBedSource.js +12 -1
  91. package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
  92. package/dist/src/data/sources/lazy/bigWigSource.js +11 -0
  93. package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
  94. package/dist/src/data/sources/lazy/gff3Source.js +12 -1
  95. package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
  96. package/dist/src/data/sources/lazy/indexedFastaSource.js +11 -0
  97. package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts +27 -0
  98. package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts.map +1 -0
  99. package/dist/src/data/sources/lazy/lazyDataSourceRegistry.js +65 -0
  100. package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts +2 -0
  101. package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts.map +1 -0
  102. package/dist/src/data/sources/lazy/registerBuiltInLazySources.js +8 -0
  103. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
  104. package/dist/src/data/sources/lazy/singleAxisLazySource.js +11 -2
  105. package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
  106. package/dist/src/data/sources/lazy/vcfSource.js +11 -0
  107. package/dist/src/data/sources/urlSource.d.ts +4 -0
  108. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  109. package/dist/src/data/sources/urlSource.js +138 -16
  110. package/dist/src/data/transforms/aggregate.d.ts +1 -0
  111. package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
  112. package/dist/src/data/transforms/aggregate.js +30 -8
  113. package/dist/src/data/transforms/aggregateOps.d.ts.map +1 -1
  114. package/dist/src/data/transforms/aggregateOps.js +12 -1
  115. package/dist/src/data/transforms/coverage.js +2 -2
  116. package/dist/src/data/transforms/filter.js +1 -1
  117. package/dist/src/data/transforms/filterScoredLabels.d.ts +6 -0
  118. package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
  119. package/dist/src/data/transforms/filterScoredLabels.js +9 -0
  120. package/dist/src/data/transforms/measureText.d.ts +1 -0
  121. package/dist/src/data/transforms/measureText.d.ts.map +1 -1
  122. package/dist/src/data/transforms/measureText.js +14 -5
  123. package/dist/src/data/transforms/pileup.d.ts.map +1 -1
  124. package/dist/src/data/transforms/pileup.js +1 -2
  125. package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
  126. package/dist/src/data/transforms/regexFold.js +0 -1
  127. package/dist/src/embedFactory.d.ts +13 -0
  128. package/dist/src/embedFactory.d.ts.map +1 -0
  129. package/dist/src/embedFactory.js +127 -0
  130. package/dist/src/encoder/accessor.d.ts +3 -12
  131. package/dist/src/encoder/accessor.d.ts.map +1 -1
  132. package/dist/src/encoder/accessor.js +10 -65
  133. package/dist/src/encoder/encoder.d.ts +51 -8
  134. package/dist/src/encoder/encoder.d.ts.map +1 -1
  135. package/dist/src/encoder/encoder.js +179 -55
  136. package/dist/src/fonts/bmFontManager.js +1 -1
  137. package/dist/src/full.d.ts +2 -0
  138. package/dist/src/full.d.ts.map +1 -0
  139. package/dist/src/full.js +2 -0
  140. package/dist/src/genome/assemblyPreflight.d.ts +31 -0
  141. package/dist/src/genome/assemblyPreflight.d.ts.map +1 -0
  142. package/dist/src/genome/assemblyPreflight.js +99 -0
  143. package/dist/src/genome/genome.d.ts +10 -2
  144. package/dist/src/genome/genome.d.ts.map +1 -1
  145. package/dist/src/genome/genome.js +20 -2
  146. package/dist/src/genome/genomeStore.d.ts +34 -3
  147. package/dist/src/genome/genomeStore.d.ts.map +1 -1
  148. package/dist/src/genome/genomeStore.js +409 -18
  149. package/dist/src/genome/rootGenomeConfig.d.ts +26 -0
  150. package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -0
  151. package/dist/src/genome/rootGenomeConfig.js +98 -0
  152. package/dist/src/genome/scaleLocus.d.ts.map +1 -1
  153. package/dist/src/genome/scaleLocus.js +26 -7
  154. package/dist/src/genomeSpy/cursorManager.d.ts +69 -0
  155. package/dist/src/genomeSpy/cursorManager.d.ts.map +1 -0
  156. package/dist/src/genomeSpy/cursorManager.js +131 -0
  157. package/dist/src/genomeSpy/headlessBootstrap.d.ts +113 -0
  158. package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -0
  159. package/dist/src/genomeSpy/headlessBootstrap.js +246 -0
  160. package/dist/src/genomeSpy/interactionController.d.ts +10 -1
  161. package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
  162. package/dist/src/genomeSpy/interactionController.js +448 -40
  163. package/dist/src/genomeSpy/interactionDispatcher.d.ts +50 -0
  164. package/dist/src/genomeSpy/interactionDispatcher.d.ts.map +1 -0
  165. package/dist/src/genomeSpy/interactionDispatcher.js +203 -0
  166. package/dist/src/genomeSpy/renderCoordinator.js +1 -1
  167. package/dist/src/genomeSpy/viewContextFactory.d.ts +4 -2
  168. package/dist/src/genomeSpy/viewContextFactory.d.ts.map +1 -1
  169. package/dist/src/genomeSpy/viewContextFactory.js +12 -4
  170. package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
  171. package/dist/src/genomeSpy/viewDataInit.js +7 -3
  172. package/dist/src/genomeSpy.d.ts +1 -114
  173. package/dist/src/genomeSpy.d.ts.map +1 -1
  174. package/dist/src/genomeSpy.js +7 -614
  175. package/dist/src/genomeSpyBase.d.ts +133 -0
  176. package/dist/src/genomeSpyBase.d.ts.map +1 -0
  177. package/dist/src/genomeSpyBase.js +719 -0
  178. package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
  179. package/dist/src/gl/arrayBuilder.js +0 -3
  180. package/dist/src/gl/canvasSizeHelper.d.ts +74 -0
  181. package/dist/src/gl/canvasSizeHelper.d.ts.map +1 -0
  182. package/dist/src/gl/canvasSizeHelper.js +203 -0
  183. package/dist/src/gl/colorUtils.d.ts.map +1 -1
  184. package/dist/src/gl/colorUtils.js +3 -0
  185. package/dist/src/gl/dataToVertices.d.ts.map +1 -1
  186. package/dist/src/gl/dataToVertices.js +13 -8
  187. package/dist/src/gl/glslScaleGenerator.d.ts +2 -2
  188. package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
  189. package/dist/src/gl/glslScaleGenerator.js +5 -7
  190. package/dist/src/gl/webGLHelper.d.ts +25 -11
  191. package/dist/src/gl/webGLHelper.d.ts.map +1 -1
  192. package/dist/src/gl/webGLHelper.js +59 -33
  193. package/dist/src/index.d.ts +3 -9
  194. package/dist/src/index.d.ts.map +1 -1
  195. package/dist/src/index.js +5 -111
  196. package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +4462 -0
  197. package/dist/src/marks/link.d.ts.map +1 -1
  198. package/dist/src/marks/link.js +5 -26
  199. package/dist/src/marks/mark.d.ts +8 -1
  200. package/dist/src/marks/mark.d.ts.map +1 -1
  201. package/dist/src/marks/mark.js +67 -21
  202. package/dist/src/marks/markUtils.d.ts +18 -1
  203. package/dist/src/marks/markUtils.d.ts.map +1 -1
  204. package/dist/src/marks/markUtils.js +52 -4
  205. package/dist/src/marks/point.d.ts.map +1 -1
  206. package/dist/src/marks/point.js +6 -26
  207. package/dist/src/marks/rect.d.ts.map +1 -1
  208. package/dist/src/marks/rect.js +13 -21
  209. package/dist/src/marks/rule.d.ts +7 -2
  210. package/dist/src/marks/rule.d.ts.map +1 -1
  211. package/dist/src/marks/rule.js +125 -16
  212. package/dist/src/marks/text.d.ts.map +1 -1
  213. package/dist/src/marks/text.js +5 -47
  214. package/dist/src/minimal.d.ts +8 -0
  215. package/dist/src/minimal.d.ts.map +1 -0
  216. package/dist/src/minimal.js +21 -0
  217. package/dist/src/paramRuntime/viewParamRuntime.d.ts +19 -0
  218. package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
  219. package/dist/src/paramRuntime/viewParamRuntime.js +35 -0
  220. package/dist/src/scale/scale.d.ts.map +1 -1
  221. package/dist/src/scale/scale.js +13 -7
  222. package/dist/src/scales/axisResolution.d.ts.map +1 -1
  223. package/dist/src/scales/axisResolution.js +9 -5
  224. package/dist/src/scales/domainPlanner.d.ts +58 -7
  225. package/dist/src/scales/domainPlanner.d.ts.map +1 -1
  226. package/dist/src/scales/domainPlanner.js +395 -40
  227. package/dist/src/scales/indexLikeDomainUtils.d.ts +29 -0
  228. package/dist/src/scales/indexLikeDomainUtils.d.ts.map +1 -0
  229. package/dist/src/scales/indexLikeDomainUtils.js +67 -0
  230. package/dist/src/scales/resolutionMemberOrder.d.ts +15 -0
  231. package/dist/src/scales/resolutionMemberOrder.d.ts.map +1 -0
  232. package/dist/src/scales/resolutionMemberOrder.js +22 -0
  233. package/dist/src/scales/scaleInstanceManager.d.ts +2 -1
  234. package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
  235. package/dist/src/scales/scaleInstanceManager.js +10 -11
  236. package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
  237. package/dist/src/scales/scaleInteractionController.js +59 -18
  238. package/dist/src/scales/scalePropsResolver.d.ts +3 -1
  239. package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
  240. package/dist/src/scales/scalePropsResolver.js +83 -6
  241. package/dist/src/scales/scaleResolution.d.ts +39 -0
  242. package/dist/src/scales/scaleResolution.d.ts.map +1 -1
  243. package/dist/src/scales/scaleResolution.js +504 -82
  244. package/dist/src/scales/scaleResolutionTestUtils.d.ts +21 -0
  245. package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -0
  246. package/dist/src/scales/scaleResolutionTestUtils.js +37 -0
  247. package/dist/src/scales/scaleRules.d.ts.map +1 -1
  248. package/dist/src/scales/scaleRules.js +16 -2
  249. package/dist/src/scales/selectionDomainUtils.d.ts +52 -0
  250. package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -0
  251. package/dist/src/scales/selectionDomainUtils.js +194 -0
  252. package/dist/src/scales/zoomDomainUtils.d.ts +18 -0
  253. package/dist/src/scales/zoomDomainUtils.d.ts.map +1 -0
  254. package/dist/src/scales/zoomDomainUtils.js +69 -0
  255. package/dist/src/screenshotHarness.d.ts +16 -0
  256. package/dist/src/screenshotHarness.d.ts.map +1 -0
  257. package/dist/src/screenshotHarness.js +241 -0
  258. package/dist/src/singlePageApp.js +1 -1
  259. package/dist/src/spec/axis.d.ts +41 -30
  260. package/dist/src/spec/channel.d.ts +15 -9
  261. package/dist/src/spec/config.d.ts +264 -0
  262. package/dist/src/spec/data.d.ts +30 -3
  263. package/dist/src/spec/decoration.d.ts +51 -0
  264. package/dist/src/spec/exampleFiles.d.ts +12 -0
  265. package/dist/src/spec/exampleFiles.d.ts.map +1 -0
  266. package/dist/src/spec/exampleFiles.js +52 -0
  267. package/dist/src/spec/font.d.ts +1 -1
  268. package/dist/src/spec/genome.d.ts +22 -2
  269. package/dist/src/spec/mark.d.ts +97 -13
  270. package/dist/src/spec/parameter.d.ts +62 -5
  271. package/dist/src/spec/root.d.ts +34 -1
  272. package/dist/src/spec/scale.d.ts +46 -5
  273. package/dist/src/spec/title.d.ts +13 -2
  274. package/dist/src/spec/tooltip.d.ts +1 -1
  275. package/dist/src/spec/transform.d.ts +39 -4
  276. package/dist/src/spec/view.d.ts +67 -19
  277. package/dist/src/styles/genome-spy.css +63 -55
  278. package/dist/src/styles/genome-spy.css.d.ts +1 -1
  279. package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
  280. package/dist/src/styles/genome-spy.css.js +31 -22
  281. package/dist/src/testSetup.d.ts +2 -0
  282. package/dist/src/testSetup.d.ts.map +1 -0
  283. package/dist/src/testSetup.js +5 -0
  284. package/dist/src/tooltip/dataTooltipHandler.js +66 -11
  285. package/dist/src/tooltip/tooltipContext.d.ts.map +1 -1
  286. package/dist/src/tooltip/tooltipContext.js +3 -2
  287. package/dist/src/types/embedApi.d.ts +26 -0
  288. package/dist/src/types/encoder.d.ts +17 -15
  289. package/dist/src/types/scaleResolutionApi.d.ts +20 -0
  290. package/dist/src/types/viewContext.d.ts +23 -1
  291. package/dist/src/utils/expression.d.ts +2 -2
  292. package/dist/src/utils/expression.d.ts.map +1 -1
  293. package/dist/src/utils/expression.js +63 -8
  294. package/dist/src/utils/field.d.ts.map +1 -1
  295. package/dist/src/utils/field.js +0 -1
  296. package/dist/src/utils/inertia.d.ts.map +1 -1
  297. package/dist/src/utils/inertia.js +0 -1
  298. package/dist/src/utils/inferSpecBaseUrl.d.ts +14 -0
  299. package/dist/src/utils/inferSpecBaseUrl.d.ts.map +1 -0
  300. package/dist/src/utils/inferSpecBaseUrl.js +73 -0
  301. package/dist/src/utils/inputBinding.d.ts +1 -1
  302. package/dist/src/utils/interaction.d.ts +109 -0
  303. package/dist/src/utils/interaction.d.ts.map +1 -0
  304. package/dist/src/utils/interaction.js +200 -0
  305. package/dist/src/utils/interactionEvent.d.ts +62 -33
  306. package/dist/src/utils/interactionEvent.d.ts.map +1 -1
  307. package/dist/src/utils/interactionEvent.js +86 -48
  308. package/dist/src/utils/kWayMerge.js +1 -1
  309. package/dist/src/utils/mergeObjects.d.ts.map +1 -1
  310. package/dist/src/utils/mergeObjects.js +0 -2
  311. package/dist/src/utils/radixSort.d.ts.map +1 -1
  312. package/dist/src/utils/radixSort.js +0 -2
  313. package/dist/src/utils/throttle.d.ts.map +1 -1
  314. package/dist/src/utils/throttle.js +0 -2
  315. package/dist/src/utils/ui/tooltip.d.ts +1 -0
  316. package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
  317. package/dist/src/utils/ui/tooltip.js +1 -0
  318. package/dist/src/utils/url.js +1 -1
  319. package/dist/src/view/axisGridView.d.ts +1 -1
  320. package/dist/src/view/axisGridView.d.ts.map +1 -1
  321. package/dist/src/view/axisGridView.js +2 -47
  322. package/dist/src/view/axisView.d.ts +2 -3
  323. package/dist/src/view/axisView.d.ts.map +1 -1
  324. package/dist/src/view/axisView.js +251 -106
  325. package/dist/src/view/concatView.d.ts +2 -1
  326. package/dist/src/view/concatView.d.ts.map +1 -1
  327. package/dist/src/view/concatView.js +4 -2
  328. package/dist/src/view/containerMutationHelper.d.ts +3 -0
  329. package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
  330. package/dist/src/view/containerMutationHelper.js +12 -1
  331. package/dist/src/view/dataReadiness.d.ts +2 -2
  332. package/dist/src/view/dataReadiness.d.ts.map +1 -1
  333. package/dist/src/view/dataReadiness.js +63 -58
  334. package/dist/src/view/facetView.d.ts +1 -1
  335. package/dist/src/view/facetView.js +4 -4
  336. package/dist/src/view/flowBuilder.js +2 -2
  337. package/dist/src/view/gridView/gridChild.d.ts +13 -0
  338. package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
  339. package/dist/src/view/gridView/gridChild.js +247 -49
  340. package/dist/src/view/gridView/gridView.d.ts.map +1 -1
  341. package/dist/src/view/gridView/gridView.js +296 -99
  342. package/dist/src/view/gridView/keyboardZoomController.d.ts +2 -2
  343. package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -1
  344. package/dist/src/view/gridView/keyboardZoomController.js +1 -1
  345. package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
  346. package/dist/src/view/gridView/scrollbar.js +4 -2
  347. package/dist/src/view/gridView/selectionRect.d.ts +4 -0
  348. package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
  349. package/dist/src/view/gridView/selectionRect.js +20 -1
  350. package/dist/src/view/gridView/separatorView.d.ts +1 -0
  351. package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
  352. package/dist/src/view/gridView/separatorView.js +9 -0
  353. package/dist/src/view/interactionRouting.d.ts +20 -0
  354. package/dist/src/view/interactionRouting.d.ts.map +1 -0
  355. package/dist/src/view/interactionRouting.js +53 -0
  356. package/dist/src/view/layerView.d.ts.map +1 -1
  357. package/dist/src/view/layerView.js +12 -9
  358. package/dist/src/view/layout/grid.js +1 -1
  359. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
  360. package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +0 -2
  361. package/dist/src/view/testUtils.d.ts +17 -3
  362. package/dist/src/view/testUtils.d.ts.map +1 -1
  363. package/dist/src/view/testUtils.js +62 -69
  364. package/dist/src/view/title.d.ts +8 -1
  365. package/dist/src/view/title.d.ts.map +1 -1
  366. package/dist/src/view/title.js +66 -76
  367. package/dist/src/view/unitView.d.ts +1 -1
  368. package/dist/src/view/unitView.d.ts.map +1 -1
  369. package/dist/src/view/unitView.js +67 -17
  370. package/dist/src/view/view.d.ts +76 -30
  371. package/dist/src/view/view.d.ts.map +1 -1
  372. package/dist/src/view/view.js +136 -47
  373. package/dist/src/view/viewFactory.d.ts +11 -3
  374. package/dist/src/view/viewFactory.d.ts.map +1 -1
  375. package/dist/src/view/viewFactory.js +37 -11
  376. package/dist/src/view/viewUtils.d.ts.map +1 -1
  377. package/dist/src/view/viewUtils.js +41 -5
  378. package/dist/src/view/zoom.d.ts +15 -3
  379. package/dist/src/view/zoom.d.ts.map +1 -1
  380. package/dist/src/view/zoom.js +375 -80
  381. package/package.json +20 -10
  382. package/dist/bundle/AbortablePromiseCache-Dj0vzLnp.js +0 -149
  383. package/dist/bundle/browser-0iNU5Wit.js +0 -138
  384. package/dist/bundle/index-BYsZN7b0.js +0 -1597
  385. package/dist/bundle/index-C3kClAEN.js +0 -1771
  386. package/dist/bundle/index-C7wOh6y1.js +0 -657
  387. package/dist/bundle/index-CRaQAuki.js +0 -326
  388. package/dist/bundle/index-D9v1PCj9.js +0 -507
  389. package/dist/bundle/index-GDOuv_D5.js +0 -266
  390. package/dist/bundle/index-Gt44EOIH.js +0 -628
  391. package/dist/bundle/inflate-GtwLkvSP.js +0 -1048
  392. package/dist/bundle/parquetRead-BnAGCa4_.js +0 -1663
  393. package/dist/bundle/unzip-Bac01w6X.js +0 -1492
  394. package/dist/src/config/scaleDefaults.d.ts +0 -8
  395. package/dist/src/config/scaleDefaults.d.ts.map +0 -1
  396. package/dist/src/config/scaleDefaults.js +0 -45
@@ -0,0 +1,203 @@
1
+ import Interaction from "../utils/interaction.js";
2
+
3
+ /**
4
+ * Dispatches `Interaction` objects through the view hierarchy and synthesizes
5
+ * subtree-level pointer transition events.
6
+ *
7
+ * The dispatcher keeps track of the previously hovered target path and
8
+ * compares it with the current one on every `mousemove`. From that diff it
9
+ * emits:
10
+ * - `mouseleave` for views that are no longer in the pointed subtree
11
+ * - `mouseenter` for views that have newly entered the pointed subtree
12
+ *
13
+ * This is intentionally closer to `mouseenter` / `mouseleave` semantics than
14
+ * DOM `mouseover` / `mouseout`. Moving between descendants inside the same
15
+ * subtree does not cause the ancestor to leave and re-enter.
16
+ *
17
+ * `dispatch()` handles ordinary event propagation and updates the current
18
+ * pointed target. `handlePointerLeave()` is used when the pointer leaves the
19
+ * canvas entirely, in which case the dispatcher emits `mouseleave` for the
20
+ * whole previously hovered path and clears its tracked state.
21
+ *
22
+ * The dispatcher does not do hit testing itself. It relies on views to route
23
+ * the incoming interaction and set `interaction.target` during propagation.
24
+ */
25
+ export default class InteractionDispatcher {
26
+ /** @type {import("../view/view.js").default} */
27
+ #viewRoot;
28
+ /** @type {import("../view/layout/point.js").default | undefined} */
29
+ #lastPoint;
30
+ /** @type {import("../view/view.js").default | undefined} */
31
+ #lastTarget;
32
+ /** @type {import("../view/view.js").default[]} */
33
+ #previousPath = [];
34
+
35
+ /**
36
+ * @param {object} options
37
+ * @param {import("../view/view.js").default} options.viewRoot
38
+ */
39
+ constructor({ viewRoot }) {
40
+ this.#viewRoot = viewRoot;
41
+ }
42
+
43
+ /**
44
+ * Dispatches an interaction through the view tree and updates the tracked
45
+ * hover path for transition synthesis.
46
+ *
47
+ * @param {import("../view/layout/point.js").default} point
48
+ * @param {import("../utils/interactionEvent.js").InteractionUiEvent} uiEvent
49
+ * @returns {Interaction}
50
+ */
51
+ dispatch(point, uiEvent) {
52
+ this.#lastPoint = point;
53
+ const interaction = new Interaction(point, uiEvent);
54
+ this.#viewRoot.propagateInteraction(interaction);
55
+ this.#lastTarget = interaction.target;
56
+
57
+ if (interaction.type === "mousemove") {
58
+ this.#dispatchPointerTransitions(interaction);
59
+ }
60
+
61
+ return interaction;
62
+ }
63
+
64
+ /**
65
+ * Dispatches mouseleave transitions when the pointer leaves the canvas.
66
+ *
67
+ * @param {import("../utils/interactionEvent.js").InteractionUiEvent} uiEvent
68
+ */
69
+ handlePointerLeave(uiEvent) {
70
+ if (!this.#lastPoint || this.#previousPath.length === 0) {
71
+ this.#previousPath = [];
72
+ this.#lastTarget = undefined;
73
+ return;
74
+ }
75
+
76
+ const interaction = new Interaction(
77
+ this.#lastPoint,
78
+ uiEvent,
79
+ "mouseleave"
80
+ );
81
+ this.#dispatchLeaveEvents(interaction, this.#previousPath, undefined);
82
+ this.#previousPath = [];
83
+ this.#lastTarget = undefined;
84
+ }
85
+
86
+ getCurrentTarget() {
87
+ return this.#lastTarget;
88
+ }
89
+
90
+ /**
91
+ * Diffs the old and new pointed paths and emits synthetic subtree
92
+ * transitions.
93
+ *
94
+ * @param {Interaction} interaction
95
+ */
96
+ #dispatchPointerTransitions(interaction) {
97
+ const currentPath = this.#toRootPath(interaction.target);
98
+ const previousPath = this.#previousPath;
99
+
100
+ let commonLength = 0;
101
+ while (
102
+ commonLength < previousPath.length &&
103
+ commonLength < currentPath.length &&
104
+ previousPath[commonLength] === currentPath[commonLength]
105
+ ) {
106
+ commonLength++;
107
+ }
108
+
109
+ if (commonLength < previousPath.length) {
110
+ this.#dispatchLeaveEvents(
111
+ interaction,
112
+ previousPath.slice(commonLength),
113
+ currentPath.at(-1)
114
+ );
115
+ }
116
+
117
+ if (commonLength < currentPath.length) {
118
+ this.#dispatchEnterEvents(
119
+ interaction,
120
+ currentPath.slice(commonLength),
121
+ previousPath.at(-1)
122
+ );
123
+ }
124
+
125
+ this.#previousPath = currentPath;
126
+ }
127
+
128
+ /**
129
+ * @param {Interaction} baseInteraction
130
+ * @param {import("../view/view.js").default[]} leavingViews
131
+ * @param {import("../view/view.js").default | undefined} relatedTarget
132
+ */
133
+ #dispatchLeaveEvents(baseInteraction, leavingViews, relatedTarget) {
134
+ for (let i = leavingViews.length - 1; i >= 0; i--) {
135
+ const interaction = new Interaction(
136
+ baseInteraction.point,
137
+ baseInteraction.uiEvent,
138
+ "mouseleave"
139
+ );
140
+ const view = leavingViews[i];
141
+ interaction.target = view;
142
+ interaction.currentTarget = view;
143
+ interaction.relatedTarget = relatedTarget;
144
+ this.#dispatchDirect(view, interaction);
145
+
146
+ if (interaction.stopped) {
147
+ return;
148
+ }
149
+ }
150
+ }
151
+
152
+ /**
153
+ * @param {Interaction} baseInteraction
154
+ * @param {import("../view/view.js").default[]} enteringViews
155
+ * @param {import("../view/view.js").default | undefined} relatedTarget
156
+ */
157
+ #dispatchEnterEvents(baseInteraction, enteringViews, relatedTarget) {
158
+ for (const view of enteringViews) {
159
+ const interaction = new Interaction(
160
+ baseInteraction.point,
161
+ baseInteraction.uiEvent,
162
+ "mouseenter"
163
+ );
164
+ interaction.target = view;
165
+ interaction.currentTarget = view;
166
+ interaction.relatedTarget = relatedTarget;
167
+ this.#dispatchDirect(view, interaction);
168
+
169
+ if (interaction.stopped) {
170
+ return;
171
+ }
172
+ }
173
+ }
174
+
175
+ /**
176
+ * @param {import("../view/view.js").default | undefined} target
177
+ * @returns {import("../view/view.js").default[]}
178
+ */
179
+ #toRootPath(target) {
180
+ return target ? target.getLayoutAncestors().reverse() : [];
181
+ }
182
+
183
+ /**
184
+ * Dispatches a synthetic transition directly on a single view.
185
+ *
186
+ * Unlike ordinary routed propagation, enter/leave transitions are already
187
+ * resolved to a specific view. Therefore the dispatcher invokes that
188
+ * view's capture listeners first and bubble listeners second without
189
+ * re-entering container routing.
190
+ *
191
+ * @param {import("../view/view.js").default} view
192
+ * @param {Interaction} interaction
193
+ */
194
+ #dispatchDirect(view, interaction) {
195
+ view.handleInteraction(interaction, true);
196
+
197
+ if (interaction.stopped) {
198
+ return;
199
+ }
200
+
201
+ view.handleInteraction(interaction, false);
202
+ }
203
+ }
@@ -70,7 +70,7 @@ export default class RenderCoordinator {
70
70
  const commonOptions = {
71
71
  webGLHelper: this.#glHelper,
72
72
  canvasSize,
73
- devicePixelRatio: window.devicePixelRatio ?? 1,
73
+ devicePixelRatio: this.#glHelper.getDevicePixelRatio(canvasSize),
74
74
  };
75
75
 
76
76
  this.#renderingContext = new BufferedViewRenderingContext(
@@ -7,12 +7,14 @@
7
7
  * what they need while keeping production usage explicit.
8
8
  *
9
9
  * @param {Partial<ViewContext> & {
10
- * createOrImportViewWithContext?: (context: ViewContext, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, layoutParent?: import("../view/containerView.js").default, dataParent?: import("../view/view.js").default, defaultName?: string, validator?: (spec: import("../spec/view.js").ViewSpec) => void) => Promise<import("../view/view.js").default>
10
+ * createOrImportViewWithContext?: (context: ViewContext, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, layoutParent?: import("../view/containerView.js").default, dataParent?: import("../view/view.js").default, defaultName?: string, validator?: (spec: import("../spec/view.js").ViewSpec) => void, options?: import("../types/viewContext.js").CreateViewOptions) => Promise<import("../view/view.js").default>
11
+ * allowMissingGlHelper?: boolean
11
12
  * }} options
12
13
  * @returns {ViewContext}
13
14
  */
14
15
  export function createViewContext(options: Partial<ViewContext> & {
15
- createOrImportViewWithContext?: (context: ViewContext, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, layoutParent?: import("../view/containerView.js").default, dataParent?: import("../view/view.js").default, defaultName?: string, validator?: (spec: import("../spec/view.js").ViewSpec) => void) => Promise<import("../view/view.js").default>;
16
+ createOrImportViewWithContext?: (context: ViewContext, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, layoutParent?: import("../view/containerView.js").default, dataParent?: import("../view/view.js").default, defaultName?: string, validator?: (spec: import("../spec/view.js").ViewSpec) => void, options?: import("../types/viewContext.js").CreateViewOptions) => Promise<import("../view/view.js").default>;
17
+ allowMissingGlHelper?: boolean;
16
18
  }): ViewContext;
17
19
  export type ViewContext = import("../types/viewContext.js").default;
18
20
  //# sourceMappingURL=viewContextFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewContextFactory.d.ts","sourceRoot":"","sources":["../../../src/genomeSpy/viewContextFactory.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,2CALW,OAAO,CAAC,WAAW,CAAC,GAAG;IAC7B,6BAA6B,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,iBAAiB,EAAE,QAAQ,GAAG,OAAO,iBAAiB,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,0BAA0B,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,iBAAiB,EAAE,QAAQ,KAAK,IAAI,KAAK,OAAO,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,CAAA;CACvX,GACS,WAAW,CAiEvB;0BA5EY,OAAO,yBAAyB,EAAE,OAAO"}
1
+ {"version":3,"file":"viewContextFactory.d.ts","sourceRoot":"","sources":["../../../src/genomeSpy/viewContextFactory.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,2CANW,OAAO,CAAC,WAAW,CAAC,GAAG;IAC7B,6BAA6B,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,iBAAiB,EAAE,QAAQ,GAAG,OAAO,iBAAiB,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,0BAA0B,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,iBAAiB,EAAE,QAAQ,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,yBAAyB,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,CAAA;IACrb,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,GACS,WAAW,CAwEvB;0BApFY,OAAO,yBAAyB,EAAE,OAAO"}
@@ -8,7 +8,8 @@
8
8
  * what they need while keeping production usage explicit.
9
9
  *
10
10
  * @param {Partial<ViewContext> & {
11
- * createOrImportViewWithContext?: (context: ViewContext, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, layoutParent?: import("../view/containerView.js").default, dataParent?: import("../view/view.js").default, defaultName?: string, validator?: (spec: import("../spec/view.js").ViewSpec) => void) => Promise<import("../view/view.js").default>
11
+ * createOrImportViewWithContext?: (context: ViewContext, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, layoutParent?: import("../view/containerView.js").default, dataParent?: import("../view/view.js").default, defaultName?: string, validator?: (spec: import("../spec/view.js").ViewSpec) => void, options?: import("../types/viewContext.js").CreateViewOptions) => Promise<import("../view/view.js").default>
12
+ * allowMissingGlHelper?: boolean
12
13
  * }} options
13
14
  * @returns {ViewContext}
14
15
  */
@@ -20,7 +21,9 @@ export function createViewContext(options) {
20
21
  /** @type {Partial<ViewContext>} */
21
22
  const context = {
22
23
  dataFlow: options.dataFlow ?? missing("dataFlow"),
23
- glHelper: options.glHelper ?? missing("glHelper"),
24
+ glHelper: options.allowMissingGlHelper
25
+ ? options.glHelper
26
+ : (options.glHelper ?? missing("glHelper")),
24
27
  animator: options.animator ?? missing("animator"),
25
28
  genomeStore: options.genomeStore,
26
29
  fontManager: options.fontManager ?? missing("fontManager"),
@@ -29,7 +32,8 @@ export function createViewContext(options) {
29
32
  layoutParent,
30
33
  dataParent,
31
34
  defaultName,
32
- validator
35
+ validator,
36
+ createOptions
33
37
  ) {
34
38
  const create = options.createOrImportViewWithContext;
35
39
  if (!create) {
@@ -47,7 +51,8 @@ export function createViewContext(options) {
47
51
  layoutParent,
48
52
  dataParent,
49
53
  defaultName,
50
- validator
54
+ validator,
55
+ createOptions
51
56
  );
52
57
  },
53
58
  };
@@ -58,12 +63,15 @@ export function createViewContext(options) {
58
63
  "updateTooltip",
59
64
  "getNamedDataFromProvider",
60
65
  "getCurrentHover",
66
+ "suspendHoverTracking",
67
+ "resumeHoverTracking",
61
68
  "addKeyboardListener",
62
69
  "addBroadcastListener",
63
70
  "removeBroadcastListener",
64
71
  "highlightView",
65
72
  "isViewConfiguredVisible",
66
73
  "isViewSpec",
74
+ "getBaseConfig",
67
75
  ];
68
76
 
69
77
  /** @type {Partial<ViewContext>} */
@@ -1 +1 @@
1
- {"version":3,"file":"viewDataInit.d.ts","sourceRoot":"","sources":["../../../src/genomeSpy/viewDataInit.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,6CANW,OAAO,iBAAiB,EAAE,OAAO,YACjC,OAAO,qBAAqB,EAAE,OAAO,eACrC,OAAO,2BAA2B,EAAE,OAAO,mBAC3C,CAAC,QAAQ,EAAE,OAAO,qBAAqB,EAAE,OAAO,KAAK,IAAI,GACvD,OAAO,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC,CAkC1D;AAED;;;;;;;;GAQG;AACH,oDALW,OAAO,iBAAiB,EAAE,OAAO,YACjC,OAAO,qBAAqB,EAAE,OAAO,eACrC,OAAO,2BAA2B,EAAE,OAAO,GACzC,OAAO,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC,CA2E1D"}
1
+ {"version":3,"file":"viewDataInit.d.ts","sourceRoot":"","sources":["../../../src/genomeSpy/viewDataInit.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,6CANW,OAAO,iBAAiB,EAAE,OAAO,YACjC,OAAO,qBAAqB,EAAE,OAAO,eACrC,OAAO,2BAA2B,EAAE,OAAO,mBAC3C,CAAC,QAAQ,EAAE,OAAO,qBAAqB,EAAE,OAAO,KAAK,IAAI,GACvD,OAAO,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC,CAoC1D;AAED;;;;;;;;GAQG;AACH,oDALW,OAAO,iBAAiB,EAAE,OAAO,YACjC,OAAO,qBAAqB,EAAE,OAAO,eACrC,OAAO,2BAA2B,EAAE,OAAO,GACzC,OAAO,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC,CA6E1D"}
@@ -32,9 +32,11 @@ export async function initializeViewData(
32
32
  onDataFlowBuilt(builtDataFlow);
33
33
 
34
34
  // Have to wait until asynchronous font loading is complete.
35
- // Text mark's geometry builder needs font metrics before data can be
36
- // converted into geometries.
37
- // TODO: Make updateGraphicsData async and await font loading there.
35
+ // Text mark's geometry builder and measureText transforms need font metrics
36
+ // before data can be converted into geometries or derived widths.
37
+ // TODO: Replace this subtree-wide wait with consumer-specific waits:
38
+ // await fonts inside text mark graphics updates and before loading data for
39
+ // subtrees that contain measureText transforms.
38
40
  await fontManager.waitUntilReady();
39
41
 
40
42
  // Find all data sources and initiate loading.
@@ -108,6 +110,8 @@ export async function initializeVisibleViewData(
108
110
  viewInitializationPredicate
109
111
  );
110
112
 
113
+ // Newly visible subtrees may introduce text marks or measureText transforms
114
+ // that request fonts during initializeViewSubtree.
111
115
  await fontManager.waitUntilReady();
112
116
 
113
117
  for (const collector of collectorsToRepropagate) {
@@ -1,119 +1,6 @@
1
- export default class GenomeSpy {
2
- /**
3
- * @typedef {import("./view/view.js").default} View
4
- * @typedef {import("./spec/view.js").ViewSpec} ViewSpec
5
- * @typedef {import("./spec/root.js").RootSpec} RootSpec
6
- * @typedef {import("./spec/root.js").RootConfig} RootConfig
7
- */
8
- /**
9
- *
10
- * @param {HTMLElement} container
11
- * @param {RootSpec} spec
12
- * @param {import("./types/embedApi.js").EmbedOptions} [options]
13
- */
14
- constructor(container: HTMLElement, spec: import("./spec/root.js").RootSpec, options?: import("./types/embedApi.js").EmbedOptions);
15
- container: HTMLElement;
16
- options: import("./types/embedApi.js").EmbedOptions;
17
- /** Root level configuration object */
18
- spec: import("./spec/root.js").RootSpec;
19
- viewFactory: ViewFactory;
20
- /** @type {(function(string):object[])[]} */
21
- namedDataProviders: ((arg0: string) => object[])[];
22
- animator: Animator;
23
- /** @type {GenomeStore} */
24
- genomeStore: GenomeStore;
25
- /**
26
- * View visibility is checked using a predicate that can be overridden
27
- * for more dynamic visibility management.
28
- *
29
- * @type {(view: View) => boolean}
30
- */
31
- viewVisibilityPredicate: (view: import("./view/view.js").default<import("./spec/view.js").ViewSpec>) => boolean;
32
- /** @type {Record<string, import("./tooltip/tooltipHandler.js").TooltipHandler>}> */
33
- tooltipHandlers: Record<string, import("./tooltip/tooltipHandler.js").TooltipHandler>;
34
- /** @type {View} */
35
- viewRoot: import("./view/view.js").default<import("./spec/view.js").ViewSpec>;
36
- dpr: number;
37
- /**
38
- *
39
- * @param {(name: string) => any[]} provider
40
- */
41
- registerNamedDataProvider(provider: (name: string) => any[]): void;
42
- /**
43
- * @param {string} name
44
- */
45
- getNamedDataFromProvider(name: string): object[];
46
- /**
47
- *
48
- * @param {string} name
49
- * @param {any[]} data
50
- */
51
- updateNamedData(name: string, data: any[]): void;
52
- /**
53
- * @param {string} type
54
- * @param {(event: any) => void} listener
55
- */
56
- addEventListener(type: string, listener: (event: any) => void): void;
57
- /**
58
- * @param {string} type
59
- * @param {(event: any) => void} listener
60
- */
61
- removeEventListener(type: string, listener: (event: any) => void): void;
62
- /**
63
- * Broadcast a message to all views
64
-
65
- * @param {BroadcastEventType} type
66
- * @param {any} [payload]
67
- */
68
- broadcast(type: BroadcastEventType, payload?: any): void;
69
- tooltip: import("./utils/ui/tooltip.js").default;
70
- /**
71
- * Unregisters all listeners, removes all created dom elements, removes all css classes from the container
72
- */
73
- destroy(): void;
74
- /**
75
- * TODO: Come up with a sensible name. And maybe this should be called at the end of the constructor.
76
- * @returns {Promise<boolean>} true if the launch was successful
77
- */
78
- launch(): Promise<boolean>;
79
- initializeVisibleViewData(): Promise<void>;
80
- registerMouseEvents(): void;
81
- /**
82
- * This method should be called in a mouseMove handler. If not called, the
83
- * tooltip will be hidden.
84
- *
85
- * @param {T} datum
86
- * @param {function(T):Promise<string | HTMLElement | import("lit").TemplateResult>} [converter]
87
- * @template T
88
- */
89
- updateTooltip<T>(datum: T, converter?: (arg0: T) => Promise<string | HTMLElement | import("lit").TemplateResult>): void;
90
- /**
91
- * Returns a PNG data URL of the current canvas.
92
- *
93
- * @param {number} [logicalWidth] defaults to canvas width
94
- * @param {number} [logicalHeight] defaults to canvas height
95
- * @param {number} [devicePixelRatio] defaults to window.devicePixelRatio
96
- * @param {string} [clearColor] null for transparent
97
- * @returns A PNG data Url
98
- */
99
- exportCanvas(logicalWidth?: number, logicalHeight?: number, devicePixelRatio?: number, clearColor?: string): string;
100
- getLogicalCanvasSize(): {
101
- width: any;
102
- height: any;
103
- };
104
- computeLayout(): void;
105
- renderAll(): void;
106
- renderPickingFramebuffer(): void;
107
- getSearchableViews(): UnitView<import("./spec/view.js").UnitSpec>[];
108
- getNamedScaleResolutions(): Map<string, import("./scales/scaleResolution.js").default>;
109
- #private;
110
- }
1
+ export { default } from "./genomeSpyBase.js";
111
2
  /**
112
3
  * Events that are broadcasted to all views.
113
4
  */
114
5
  export type BroadcastEventType = "dataFlowBuilt" | "layout" | "layoutComputed" | "subtreeDataReady";
115
- import { ViewFactory } from "./view/viewFactory.js";
116
- import Animator from "./utils/animator.js";
117
- import GenomeStore from "./genome/genomeStore.js";
118
- import UnitView from "./view/unitView.js";
119
6
  //# sourceMappingURL=genomeSpy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"genomeSpy.d.ts","sourceRoot":"","sources":["../../src/genomeSpy.js"],"names":[],"mappings":"AAiDA;IAoBI;;;;;OAKG;IAEH;;;;;OAKG;IACH,uBAJW,WAAW,qDAEX,OAAO,qBAAqB,EAAE,YAAY,EA0CpD;IAvCG,uBAA0B;IAC1B,oDAAsB;IAItB,sCAAsC;IACtC,wCAAgB;IAEhB,yBAAoC;IAEpC,4CAA4C;IAC5C,oBADW,CAAC,CAAS,IAAM,EAAN,MAAM,KAAE,MAAM,EAAE,CAAC,EAAE,CACZ;IAE5B,mBAAoD;IAEpD,0BAA0B;IAC1B,aADW,WAAW,CACM;IAE5B;;;;;OAKG;IACH,yBAFU,CAAC,IAAI,qEAAM,KAAK,OAAO,CAE8B;IAE/D,oFAAoF;IACpF,iBADW,MAAM,CAAC,MAAM,EAAE,OAAO,6BAA6B,EAAE,cAAc,CAAC,CAK9E;IAED,mBAAmB;IACnB,8EAAyB;IAIzB,YAAkC;IAatC;;;OAGG;IACH,oCAFW,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,EAAE,QAIjC;IAED;;OAEG;IACH,+BAFW,MAAM,YAShB;IAED;;;;OAIG;IACH,sBAHW,MAAM,QACN,GAAG,EAAE,QAYf;IAED;;;OAGG;IACH,uBAHW,MAAM,YACN,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,QAI9B;IAED;;;OAGG;IACH,0BAHW,MAAM,YACN,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,QAI9B;IAED;;;;;OAKG;IACH,gBAHW,kBAAkB,YAClB,GAAG,QAMb;IA8DG,iDAAsB;IAQ1B;;OAEG;IACH,gBAqBC;IA+KD;;;OAGG;IACH,UAFa,OAAO,CAAC,OAAO,CAAC,CAyC5B;IAED,2CAiBC;IAED,4BAEC;IAED;;;;;;;OAOG;IACH,cAFa,CAAC,SAFH,CAAC,cACD,CAAS,IAAC,EAAD,CAAC,KAAE,OAAO,CAAC,MAAM,GAAG,WAAW,GAAG,OAAO,KAAK,EAAE,cAAc,CAAC,QAKlF;IAED;;;;;;;;OAQG;IACH,4BANW,MAAM,kBACN,MAAM,qBACN,MAAM,eACN,MAAM,UAuBhB;IAED;;;MAEC;IAED,sBAEC;IAED,kBAEC;IAED,iCAEC;IAED,oEAYC;IAED,uFAWC;;CACJ;;;;iCAhkBY,eAAe,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB;4BAdnC,uBAAuB;qBAR9C,qBAAqB;wBAElB,yBAAyB;qBAL5B,oBAAoB"}
1
+ {"version":3,"file":"genomeSpy.d.ts","sourceRoot":"","sources":["../../src/genomeSpy.js"],"names":[],"mappings":";;;;iCAEa,eAAe,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB"}