@genome-spy/core 0.77.0 → 0.79.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 (317) hide show
  1. package/dist/bundle/{browser-KWU9rWZT.js → browser-CETrb2cm.js} +53 -33
  2. package/dist/bundle/esm-BdLYkz-m.js +248 -0
  3. package/dist/bundle/esm-BwiDsqSb.js +1367 -0
  4. package/dist/bundle/esm-CDFd1cjk.js +441 -0
  5. package/dist/bundle/{esm-CRMf_I9V.js → esm-CTUHLDbv.js} +30 -30
  6. package/dist/bundle/esm-Cx-EbkOj.js +1221 -0
  7. package/dist/bundle/esm-DlYGqi79.js +128 -0
  8. package/dist/bundle/{esm-BygJiwh0.js → esm-k9p3oHkt.js} +133 -158
  9. package/dist/bundle/{esm-CT3ygiMq.js → esm-zAZJQO6D.js} +226 -212
  10. package/dist/bundle/index.es.js +14102 -10810
  11. package/dist/bundle/index.js +109 -95
  12. package/dist/bundle/{parquetRead-DG_-F5j5.js → parquetRead-Cad1SOVV.js} +473 -399
  13. package/dist/schema.json +23788 -11049
  14. package/dist/src/config/axisConfig.d.ts +2 -2
  15. package/dist/src/config/axisConfig.d.ts.map +1 -1
  16. package/dist/src/config/axisConfig.js +28 -44
  17. package/dist/src/config/configLayers.d.ts +45 -0
  18. package/dist/src/config/configLayers.d.ts.map +1 -0
  19. package/dist/src/config/configLayers.js +110 -0
  20. package/dist/src/config/defaultConfig.d.ts.map +1 -1
  21. package/dist/src/config/defaultConfig.js +8 -1
  22. package/dist/src/config/defaults/legendDefaults.d.ts +14 -0
  23. package/dist/src/config/defaults/legendDefaults.d.ts.map +1 -0
  24. package/dist/src/config/defaults/legendDefaults.js +46 -0
  25. package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -1
  26. package/dist/src/config/defaults/titleDefaults.js +26 -18
  27. package/dist/src/config/legendConfig.d.ts +11 -0
  28. package/dist/src/config/legendConfig.d.ts.map +1 -0
  29. package/dist/src/config/legendConfig.js +63 -0
  30. package/dist/src/config/styleUtils.d.ts +8 -2
  31. package/dist/src/config/styleUtils.d.ts.map +1 -1
  32. package/dist/src/config/styleUtils.js +25 -1
  33. package/dist/src/config/themes.d.ts.map +1 -1
  34. package/dist/src/config/themes.js +21 -2
  35. package/dist/src/config/titleConfig.d.ts.map +1 -1
  36. package/dist/src/config/titleConfig.js +2 -18
  37. package/dist/src/data/collector.d.ts.map +1 -1
  38. package/dist/src/data/collector.js +40 -18
  39. package/dist/src/data/flowInit.d.ts +6 -0
  40. package/dist/src/data/flowInit.d.ts.map +1 -1
  41. package/dist/src/data/flowInit.js +1 -1
  42. package/dist/src/data/flowNode.d.ts +32 -0
  43. package/dist/src/data/flowNode.d.ts.map +1 -1
  44. package/dist/src/data/flowNode.js +59 -0
  45. package/dist/src/data/sources/lazy/bamSource.d.ts +0 -1
  46. package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
  47. package/dist/src/data/sources/lazy/bamSource.js +39 -30
  48. package/dist/src/data/sources/lazy/bigBedSource.d.ts +0 -10
  49. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  50. package/dist/src/data/sources/lazy/bigBedSource.js +127 -62
  51. package/dist/src/data/sources/lazy/bigWigSource.d.ts +2 -2
  52. package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
  53. package/dist/src/data/sources/lazy/bigWigSource.js +234 -81
  54. package/dist/src/data/sources/lazy/gff3Source.d.ts +7 -3
  55. package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
  56. package/dist/src/data/sources/lazy/gff3Source.js +7 -8
  57. package/dist/src/data/sources/lazy/indexedFastaSource.d.ts +1 -1
  58. package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
  59. package/dist/src/data/sources/lazy/indexedFastaSource.js +28 -19
  60. package/dist/src/data/sources/lazy/legendEntriesSource.d.ts +24 -0
  61. package/dist/src/data/sources/lazy/legendEntriesSource.d.ts.map +1 -0
  62. package/dist/src/data/sources/lazy/legendEntriesSource.js +217 -0
  63. package/dist/src/data/sources/lazy/legendGradientSource.d.ts +30 -0
  64. package/dist/src/data/sources/lazy/legendGradientSource.d.ts.map +1 -0
  65. package/dist/src/data/sources/lazy/legendGradientSource.js +388 -0
  66. package/dist/src/data/sources/lazy/mockLazySource.d.ts +4 -1
  67. package/dist/src/data/sources/lazy/mockLazySource.d.ts.map +1 -1
  68. package/dist/src/data/sources/lazy/mockLazySource.js +49 -4
  69. package/dist/src/data/sources/lazy/registerCoreLazySources.js +2 -0
  70. package/dist/src/data/sources/lazy/singleAxisWindowedSource.d.ts.map +1 -1
  71. package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -4
  72. package/dist/src/data/sources/lazy/tabixSource.d.ts +9 -4
  73. package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
  74. package/dist/src/data/sources/lazy/tabixSource.js +201 -70
  75. package/dist/src/data/sources/lazy/tabixTsvSource.d.ts +2 -3
  76. package/dist/src/data/sources/lazy/tabixTsvSource.d.ts.map +1 -1
  77. package/dist/src/data/sources/lazy/tabixTsvSource.js +14 -12
  78. package/dist/src/data/sources/lazy/vcfSource.d.ts +7 -3
  79. package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
  80. package/dist/src/data/sources/lazy/vcfSource.js +7 -8
  81. package/dist/src/data/sources/urlDescriptor.d.ts +165 -0
  82. package/dist/src/data/sources/urlDescriptor.d.ts.map +1 -0
  83. package/dist/src/data/sources/urlDescriptor.js +473 -0
  84. package/dist/src/data/sources/urlDescriptorController.d.ts +25 -0
  85. package/dist/src/data/sources/urlDescriptorController.d.ts.map +1 -0
  86. package/dist/src/data/sources/urlDescriptorController.js +72 -0
  87. package/dist/src/data/sources/urlDescriptorState.d.ts +47 -0
  88. package/dist/src/data/sources/urlDescriptorState.d.ts.map +1 -0
  89. package/dist/src/data/sources/urlDescriptorState.js +129 -0
  90. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  91. package/dist/src/data/sources/urlSource.js +101 -61
  92. package/dist/src/data/transforms/packLegendLabels.d.ts +21 -0
  93. package/dist/src/data/transforms/packLegendLabels.d.ts.map +1 -0
  94. package/dist/src/data/transforms/packLegendLabels.js +189 -0
  95. package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
  96. package/dist/src/data/transforms/transformFactory.js +4 -0
  97. package/dist/src/data/transforms/truncateText.d.ts +27 -0
  98. package/dist/src/data/transforms/truncateText.d.ts.map +1 -0
  99. package/dist/src/data/transforms/truncateText.js +94 -0
  100. package/dist/src/debug/dataflowDebugSnapshot.d.ts +58 -0
  101. package/dist/src/debug/dataflowDebugSnapshot.d.ts.map +1 -0
  102. package/dist/src/debug/dataflowDebugSnapshot.js +159 -0
  103. package/dist/src/debug/markDebugSnapshot.d.ts +54 -0
  104. package/dist/src/debug/markDebugSnapshot.d.ts.map +1 -0
  105. package/dist/src/debug/markDebugSnapshot.js +100 -0
  106. package/dist/src/debug/paramDebugSnapshot.d.ts +53 -0
  107. package/dist/src/debug/paramDebugSnapshot.d.ts.map +1 -0
  108. package/dist/src/debug/paramDebugSnapshot.js +86 -0
  109. package/dist/src/debug/resolutionDebugSnapshot.d.ts +155 -0
  110. package/dist/src/debug/resolutionDebugSnapshot.d.ts.map +1 -0
  111. package/dist/src/debug/resolutionDebugSnapshot.js +291 -0
  112. package/dist/src/debug/valuePreview.d.ts +9 -0
  113. package/dist/src/debug/valuePreview.d.ts.map +1 -0
  114. package/dist/src/debug/valuePreview.js +57 -0
  115. package/dist/src/debug/viewDebugSnapshot.d.ts +131 -0
  116. package/dist/src/debug/viewDebugSnapshot.d.ts.map +1 -0
  117. package/dist/src/debug/viewDebugSnapshot.js +390 -0
  118. package/dist/src/embedFactory.d.ts.map +1 -1
  119. package/dist/src/embedFactory.js +6 -1
  120. package/dist/src/encoder/encoder.d.ts +2 -2
  121. package/dist/src/encoder/encoder.d.ts.map +1 -1
  122. package/dist/src/encoder/encoder.js +5 -4
  123. package/dist/src/fonts/bmFontManager.d.ts +1 -1
  124. package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
  125. package/dist/src/fonts/bmFontManager.js +45 -10
  126. package/dist/src/fonts/textMetrics.d.ts +69 -0
  127. package/dist/src/fonts/textMetrics.d.ts.map +1 -0
  128. package/dist/src/fonts/textMetrics.js +73 -0
  129. package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -1
  130. package/dist/src/genomeSpy/headlessBootstrap.js +8 -0
  131. package/dist/src/genomeSpy/interactionController.d.ts +4 -1
  132. package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
  133. package/dist/src/genomeSpy/interactionController.js +57 -13
  134. package/dist/src/genomeSpy/renderCoordinator.d.ts.map +1 -1
  135. package/dist/src/genomeSpy/renderCoordinator.js +25 -3
  136. package/dist/src/genomeSpy/viewDataInit.d.ts +14 -0
  137. package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
  138. package/dist/src/genomeSpy/viewDataInit.js +45 -8
  139. package/dist/src/genomeSpyBase.d.ts +6 -0
  140. package/dist/src/genomeSpyBase.d.ts.map +1 -1
  141. package/dist/src/genomeSpyBase.js +25 -4
  142. package/dist/src/gl/glslScaleGenerator.d.ts +17 -0
  143. package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
  144. package/dist/src/gl/glslScaleGenerator.js +39 -2
  145. package/dist/src/gl/includes/common.glsl.js +1 -1
  146. package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -1
  147. package/dist/src/gl/vertexRangeIndex.js +4 -2
  148. package/dist/src/gl/webGLHelper.d.ts +1 -1
  149. package/dist/src/gl/webGLHelper.d.ts.map +1 -1
  150. package/dist/src/gl/webGLHelper.js +13 -8
  151. package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +140 -3
  152. package/dist/src/marks/mark.d.ts +47 -4
  153. package/dist/src/marks/mark.d.ts.map +1 -1
  154. package/dist/src/marks/mark.js +158 -54
  155. package/dist/src/marks/point.d.ts.map +1 -1
  156. package/dist/src/marks/point.js +4 -0
  157. package/dist/src/marks/point.vertex.glsl.js +1 -1
  158. package/dist/src/marks/text.d.ts +1 -1
  159. package/dist/src/marks/text.d.ts.map +1 -1
  160. package/dist/src/marks/text.js +2 -7
  161. package/dist/src/marks/text.vertex.glsl.js +1 -1
  162. package/dist/src/paramRuntime/paramUtils.d.ts +43 -9
  163. package/dist/src/paramRuntime/paramUtils.d.ts.map +1 -1
  164. package/dist/src/paramRuntime/paramUtils.js +61 -1
  165. package/dist/src/paramRuntime/viewParamRuntime.d.ts +32 -0
  166. package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
  167. package/dist/src/paramRuntime/viewParamRuntime.js +63 -0
  168. package/dist/src/scales/axisResolution.d.ts +35 -0
  169. package/dist/src/scales/axisResolution.d.ts.map +1 -1
  170. package/dist/src/scales/axisResolution.js +115 -7
  171. package/dist/src/scales/domainExpressions.d.ts +21 -0
  172. package/dist/src/scales/domainExpressions.d.ts.map +1 -0
  173. package/dist/src/scales/domainExpressions.js +43 -0
  174. package/dist/src/scales/domainPlanner.d.ts +12 -1
  175. package/dist/src/scales/domainPlanner.d.ts.map +1 -1
  176. package/dist/src/scales/domainPlanner.js +55 -36
  177. package/dist/src/scales/legendResolution.d.ts +83 -0
  178. package/dist/src/scales/legendResolution.d.ts.map +1 -0
  179. package/dist/src/scales/legendResolution.js +461 -0
  180. package/dist/src/scales/scaleInstanceManager.d.ts +1 -0
  181. package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
  182. package/dist/src/scales/scaleInstanceManager.js +5 -0
  183. package/dist/src/scales/scalePropsResolver.d.ts +6 -1
  184. package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
  185. package/dist/src/scales/scalePropsResolver.js +35 -10
  186. package/dist/src/scales/scaleResolution.d.ts +52 -0
  187. package/dist/src/scales/scaleResolution.d.ts.map +1 -1
  188. package/dist/src/scales/scaleResolution.js +195 -16
  189. package/dist/src/scales/scaleRules.d.ts +10 -0
  190. package/dist/src/scales/scaleRules.d.ts.map +1 -1
  191. package/dist/src/scales/scaleRules.js +38 -1
  192. package/dist/src/scales/viewLevelGuideConfig.d.ts +53 -0
  193. package/dist/src/scales/viewLevelGuideConfig.d.ts.map +1 -0
  194. package/dist/src/scales/viewLevelGuideConfig.js +224 -0
  195. package/dist/src/scales/viewLevelScaleConfig.d.ts +45 -0
  196. package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -0
  197. package/dist/src/scales/viewLevelScaleConfig.js +149 -0
  198. package/dist/src/spec/axis.d.ts +109 -3
  199. package/dist/src/spec/channel.d.ts +23 -4
  200. package/dist/src/spec/config.d.ts +59 -4
  201. package/dist/src/spec/data.d.ts +177 -17
  202. package/dist/src/spec/legend.d.ts +246 -0
  203. package/dist/src/spec/mark.d.ts +16 -4
  204. package/dist/src/spec/scale.d.ts +19 -6
  205. package/dist/src/spec/title.d.ts +58 -1
  206. package/dist/src/spec/transform.d.ts +149 -0
  207. package/dist/src/spec/view.d.ts +50 -6
  208. package/dist/src/styles/genome-spy.css +4 -1
  209. package/dist/src/styles/genome-spy.css.d.ts +1 -1
  210. package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
  211. package/dist/src/styles/genome-spy.css.js +4 -1
  212. package/dist/src/types/embedApi.d.ts +262 -6
  213. package/dist/src/types/rendering.d.ts +19 -3
  214. package/dist/src/types/viewContext.d.ts +18 -2
  215. package/dist/src/utils/arrayUtils.d.ts +11 -0
  216. package/dist/src/utils/arrayUtils.d.ts.map +1 -1
  217. package/dist/src/utils/arrayUtils.js +23 -0
  218. package/dist/src/utils/suspension.d.ts +17 -0
  219. package/dist/src/utils/suspension.d.ts.map +1 -0
  220. package/dist/src/utils/suspension.js +41 -0
  221. package/dist/src/utils/ui/tooltip.d.ts +4 -0
  222. package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
  223. package/dist/src/utils/ui/tooltip.js +35 -10
  224. package/dist/src/view/axisGridView.d.ts.map +1 -1
  225. package/dist/src/view/axisGridView.js +1 -4
  226. package/dist/src/view/axisView.d.ts +18 -2
  227. package/dist/src/view/axisView.d.ts.map +1 -1
  228. package/dist/src/view/axisView.js +180 -75
  229. package/dist/src/view/concatView.d.ts +10 -2
  230. package/dist/src/view/concatView.d.ts.map +1 -1
  231. package/dist/src/view/concatView.js +46 -9
  232. package/dist/src/view/containerMutationHelper.d.ts +20 -1
  233. package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
  234. package/dist/src/view/containerMutationHelper.js +203 -32
  235. package/dist/src/view/facetView.d.ts +1 -1
  236. package/dist/src/view/gridView/gridChild.d.ts +54 -4
  237. package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
  238. package/dist/src/view/gridView/gridChild.js +301 -120
  239. package/dist/src/view/gridView/gridChildLegends.d.ts +57 -0
  240. package/dist/src/view/gridView/gridChildLegends.d.ts.map +1 -0
  241. package/dist/src/view/gridView/gridChildLegends.js +503 -0
  242. package/dist/src/view/gridView/gridView.d.ts +25 -0
  243. package/dist/src/view/gridView/gridView.d.ts.map +1 -1
  244. package/dist/src/view/gridView/gridView.js +454 -78
  245. package/dist/src/view/gridView/legendLayout.d.ts +26 -0
  246. package/dist/src/view/gridView/legendLayout.d.ts.map +1 -0
  247. package/dist/src/view/gridView/legendLayout.js +111 -0
  248. package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
  249. package/dist/src/view/gridView/scrollbar.js +1 -4
  250. package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
  251. package/dist/src/view/gridView/selectionRect.js +1 -4
  252. package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
  253. package/dist/src/view/gridView/separatorView.js +1 -4
  254. package/dist/src/view/layerView.d.ts +9 -2
  255. package/dist/src/view/layerView.d.ts.map +1 -1
  256. package/dist/src/view/layerView.js +18 -1
  257. package/dist/src/view/layout/flexLayout.d.ts +20 -4
  258. package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
  259. package/dist/src/view/layout/flexLayout.js +331 -31
  260. package/dist/src/view/layout/rectangle.d.ts +14 -0
  261. package/dist/src/view/layout/rectangle.d.ts.map +1 -1
  262. package/dist/src/view/layout/rectangle.js +40 -0
  263. package/dist/src/view/legend/legendEntries.d.ts +20 -0
  264. package/dist/src/view/legend/legendEntries.d.ts.map +1 -0
  265. package/dist/src/view/legend/legendEntries.js +21 -0
  266. package/dist/src/view/legendView.d.ts +134 -0
  267. package/dist/src/view/legendView.d.ts.map +1 -0
  268. package/dist/src/view/legendView.js +1611 -0
  269. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
  270. package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +26 -4
  271. package/dist/src/view/renderingContext/clipOptions.d.ts +44 -0
  272. package/dist/src/view/renderingContext/clipOptions.d.ts.map +1 -0
  273. package/dist/src/view/renderingContext/clipOptions.js +140 -0
  274. package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
  275. package/dist/src/view/renderingContext/simpleViewRenderingContext.js +12 -1
  276. package/dist/src/view/resolutionPlanner.d.ts +2 -1
  277. package/dist/src/view/resolutionPlanner.d.ts.map +1 -1
  278. package/dist/src/view/resolutionPlanner.js +89 -25
  279. package/dist/src/view/testUtils.d.ts +4 -2
  280. package/dist/src/view/testUtils.d.ts.map +1 -1
  281. package/dist/src/view/testUtils.js +29 -7
  282. package/dist/src/view/titleView.d.ts +37 -0
  283. package/dist/src/view/titleView.d.ts.map +1 -0
  284. package/dist/src/view/titleView.js +584 -0
  285. package/dist/src/view/unitView.d.ts +3 -3
  286. package/dist/src/view/unitView.d.ts.map +1 -1
  287. package/dist/src/view/unitView.js +3 -2
  288. package/dist/src/view/view.d.ts +25 -24
  289. package/dist/src/view/view.d.ts.map +1 -1
  290. package/dist/src/view/view.js +121 -16
  291. package/dist/src/view/viewFactory.d.ts +2 -5
  292. package/dist/src/view/viewFactory.d.ts.map +1 -1
  293. package/dist/src/view/viewFactory.js +1 -2
  294. package/dist/src/view/viewIdentityRegistry.d.ts +37 -0
  295. package/dist/src/view/viewIdentityRegistry.d.ts.map +1 -0
  296. package/dist/src/view/viewIdentityRegistry.js +71 -0
  297. package/dist/src/view/viewMutationAcidTestUtils.d.ts +112 -0
  298. package/dist/src/view/viewMutationAcidTestUtils.d.ts.map +1 -0
  299. package/dist/src/view/viewMutationAcidTestUtils.js +234 -0
  300. package/dist/src/view/viewMutationApi.d.ts +42 -0
  301. package/dist/src/view/viewMutationApi.d.ts.map +1 -0
  302. package/dist/src/view/viewMutationApi.js +811 -0
  303. package/dist/src/view/viewSelectors.d.ts +10 -0
  304. package/dist/src/view/viewSelectors.d.ts.map +1 -1
  305. package/dist/src/view/viewSelectors.js +23 -1
  306. package/package.json +4 -4
  307. package/dist/bundle/esm-0dYHNV_D.js +0 -121
  308. package/dist/bundle/esm-C49STiCR.js +0 -1248
  309. package/dist/bundle/esm-CscjKVDc.js +0 -1426
  310. package/dist/bundle/esm-CuMSzCHy.js +0 -298
  311. package/dist/bundle/esm-DMXpJXM4.js +0 -369
  312. package/dist/src/view/title.d.ts +0 -13
  313. package/dist/src/view/title.d.ts.map +0 -1
  314. package/dist/src/view/title.js +0 -154
  315. /package/dist/bundle/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
  316. /package/dist/bundle/{esm-CuVa5T98.js → esm-VvpZ9hsq.js} +0 -0
  317. /package/dist/bundle/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
@@ -0,0 +1,224 @@
1
+ import { VISIT_SKIP } from "../view/view.js";
2
+ import { visitNonChromeViews } from "../view/viewSelectors.js";
3
+
4
+ /**
5
+ * @typedef {import("../spec/channel.js").ChannelWithScale} ChannelWithScale
6
+ * @typedef {import("../spec/channel.js").PrimaryPositionalChannel} PrimaryPositionalChannel
7
+ * @typedef {import("../spec/axis.js").Axis & import("../spec/axis.js").GenomeAxis} AxisConfig
8
+ * @typedef {import("../spec/legend.js").Legend} LegendConfig
9
+ * @typedef {import("../view/view.js").default} View
10
+ * @typedef {import("./axisResolution.js").default} AxisResolution
11
+ * @typedef {import("./legendResolution.js").default} LegendResolution
12
+ *
13
+ * @typedef {object} ViewLevelAxisConfigMapping
14
+ * @prop {View} view
15
+ * @prop {PrimaryPositionalChannel} channel
16
+ * @prop {Partial<AxisConfig>} config
17
+ * @prop {AxisResolution | undefined} resolution
18
+ *
19
+ * @typedef {object} ViewLevelLegendConfigMapping
20
+ * @prop {View} view
21
+ * @prop {ChannelWithScale} channel
22
+ * @prop {LegendConfig} config
23
+ * @prop {LegendResolution | undefined} resolution
24
+ *
25
+ * @typedef {object} GuideConfigSpec
26
+ * @prop {"axes" | "legends"} configKey
27
+ * @prop {"axis" | "legend"} resolutionType
28
+ * @prop {(view: View, channel: any) => AxisResolution | LegendResolution | undefined} getResolution
29
+ * @prop {(view: View) => Iterable<AxisResolution | LegendResolution>} getAllResolutions
30
+ * @prop {(resolution: any, view: View, config: any) => void} attach
31
+ * @prop {(resolution: any) => { view: View } | undefined} getAttachedConfig
32
+ * @prop {(resolution: any, view: View) => void} clear
33
+ */
34
+
35
+ /** @type {GuideConfigSpec} */
36
+ const AXIS_GUIDE = {
37
+ configKey: "axes",
38
+ resolutionType: "axis",
39
+ getResolution: (view, channel) => view.getAxisResolution(channel),
40
+ getAllResolutions: (view) => Object.values(view.resolutions.axis),
41
+ attach: (resolution, view, config) =>
42
+ resolution.attachViewLevelAxisConfig(view, config),
43
+ getAttachedConfig: (resolution) => resolution.getViewLevelAxisConfig(),
44
+ clear: (resolution, view) => resolution.clearViewLevelAxisConfig(view),
45
+ };
46
+
47
+ /** @type {GuideConfigSpec} */
48
+ const LEGEND_GUIDE = {
49
+ configKey: "legends",
50
+ resolutionType: "legend",
51
+ getResolution: (view, channel) => view.getLegendResolution(channel),
52
+ getAllResolutions: (view) => Object.values(view.resolutions.legend),
53
+ attach: (resolution, view, config) =>
54
+ resolution.attachViewLevelLegendConfig(view, config),
55
+ getAttachedConfig: (resolution) => resolution.getViewLevelLegendConfig(),
56
+ clear: (resolution, view) => resolution.clearViewLevelLegendConfig(view),
57
+ };
58
+
59
+ /**
60
+ * Maps view-level axis configs and attaches non-pending configs to their
61
+ * target resolutions.
62
+ *
63
+ * @param {View} root
64
+ * @returns {ViewLevelAxisConfigMapping[]}
65
+ */
66
+ export function attachViewLevelAxisConfigs(root) {
67
+ return /** @type {ViewLevelAxisConfigMapping[]} */ (
68
+ attachViewLevelGuideConfigs(root, AXIS_GUIDE)
69
+ );
70
+ }
71
+
72
+ /**
73
+ * Maps view-level legend configs and attaches non-pending configs to their
74
+ * target resolutions.
75
+ *
76
+ * @param {View} root
77
+ * @returns {ViewLevelLegendConfigMapping[]}
78
+ */
79
+ export function attachViewLevelLegendConfigs(root) {
80
+ return /** @type {ViewLevelLegendConfigMapping[]} */ (
81
+ attachViewLevelGuideConfigs(root, LEGEND_GUIDE)
82
+ );
83
+ }
84
+
85
+ /**
86
+ * Clears view-level guide configs owned by views in the subtree.
87
+ *
88
+ * @param {View} root
89
+ */
90
+ export function clearViewLevelGuideConfigs(root) {
91
+ clearViewLevelGuideConfigsOfType(root, AXIS_GUIDE);
92
+ clearViewLevelGuideConfigsOfType(root, LEGEND_GUIDE);
93
+ }
94
+
95
+ /**
96
+ * @param {View} root
97
+ * @param {GuideConfigSpec} guide
98
+ * @returns {Array<ViewLevelAxisConfigMapping | ViewLevelLegendConfigMapping>}
99
+ */
100
+ function attachViewLevelGuideConfigs(root, guide) {
101
+ clearViewLevelGuideConfigsOfType(root, guide);
102
+ const mappings = mapViewLevelGuideConfigs(root, guide);
103
+ for (const mapping of mappings) {
104
+ if (mapping.resolution) {
105
+ guide.attach(mapping.resolution, mapping.view, mapping.config);
106
+ }
107
+ }
108
+ return mappings;
109
+ }
110
+
111
+ /**
112
+ * Maps view-level guide configs to the unique guide resolution visible from
113
+ * each configured subtree. Configs with no matching resolution stay pending.
114
+ *
115
+ * @param {View} root
116
+ * @param {GuideConfigSpec} guide
117
+ * @returns {Array<ViewLevelAxisConfigMapping | ViewLevelLegendConfigMapping>}
118
+ */
119
+ function mapViewLevelGuideConfigs(root, guide) {
120
+ /** @type {Array<ViewLevelAxisConfigMapping | ViewLevelLegendConfigMapping>} */
121
+ const mappings = [];
122
+
123
+ for (const view of root.getDescendants()) {
124
+ const configs = view.spec[guide.configKey];
125
+ if (!configs) {
126
+ continue;
127
+ }
128
+
129
+ for (const [channel, config] of Object.entries(configs)) {
130
+ mappings.push(
131
+ mapViewLevelGuideConfig(view, guide, channel, config)
132
+ );
133
+ }
134
+ }
135
+
136
+ return mappings;
137
+ }
138
+
139
+ /**
140
+ * @param {View} view
141
+ * @param {GuideConfigSpec} guide
142
+ * @param {string} channel
143
+ * @param {unknown} config
144
+ * @returns {ViewLevelAxisConfigMapping | ViewLevelLegendConfigMapping}
145
+ */
146
+ function mapViewLevelGuideConfig(view, guide, channel, config) {
147
+ const resolutions = collectVisibleGuideResolutions(view, guide, channel);
148
+
149
+ if (resolutions.size > 1) {
150
+ throw new Error(
151
+ `View-level ${guide.configKey}.${channel} maps to multiple ${guide.resolutionType} resolutions. ` +
152
+ `Move ${guide.configKey}.${channel} closer to the intended subtree or configure ${guide.resolutionType} resolution explicitly.`
153
+ );
154
+ }
155
+
156
+ return {
157
+ view,
158
+ channel: /** @type {PrimaryPositionalChannel & ChannelWithScale} */ (
159
+ channel
160
+ ),
161
+ config: /** @type {Partial<AxisConfig> & LegendConfig} */ (config),
162
+ resolution: resolutions.values().next().value,
163
+ };
164
+ }
165
+
166
+ /**
167
+ * @param {View} view
168
+ * @param {GuideConfigSpec} guide
169
+ * @param {string} channel
170
+ * @returns {Set<AxisResolution | LegendResolution>}
171
+ */
172
+ function collectVisibleGuideResolutions(view, guide, channel) {
173
+ /** @type {Set<AxisResolution | LegendResolution>} */
174
+ const resolutions = new Set();
175
+ visitNonChromeViews(view, (descendant) => {
176
+ if (
177
+ descendant !== view &&
178
+ descendant.getConfiguredOrDefaultResolution(
179
+ /** @type {ChannelWithScale} */ (channel),
180
+ guide.resolutionType
181
+ ) === "excluded"
182
+ ) {
183
+ return VISIT_SKIP;
184
+ }
185
+
186
+ const resolution = guide.getResolution(descendant, channel);
187
+ if (resolution) {
188
+ resolutions.add(resolution);
189
+ }
190
+ });
191
+ return resolutions;
192
+ }
193
+
194
+ /**
195
+ * @param {View} root
196
+ * @param {GuideConfigSpec} guide
197
+ */
198
+ function clearViewLevelGuideConfigsOfType(root, guide) {
199
+ const views = new Set(root.getDescendants());
200
+ const resolutions = collectAllGuideResolutions(root, guide);
201
+
202
+ for (const resolution of resolutions) {
203
+ const config = guide.getAttachedConfig(resolution);
204
+ if (config && views.has(config.view)) {
205
+ guide.clear(resolution, config.view);
206
+ }
207
+ }
208
+ }
209
+
210
+ /**
211
+ * @param {View} view
212
+ * @param {GuideConfigSpec} guide
213
+ * @returns {Set<AxisResolution | LegendResolution>}
214
+ */
215
+ function collectAllGuideResolutions(view, guide) {
216
+ /** @type {Set<AxisResolution | LegendResolution>} */
217
+ const resolutions = new Set();
218
+ for (const descendant of view.getDescendants()) {
219
+ for (const resolution of guide.getAllResolutions(descendant)) {
220
+ resolutions.add(resolution);
221
+ }
222
+ }
223
+ return resolutions;
224
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @typedef {import("../spec/channel.js").ChannelWithScale} ChannelWithScale
3
+ * @typedef {import("../spec/scale.js").Scale} Scale
4
+ * @typedef {import("../view/view.js").default} View
5
+ * @typedef {import("./scaleResolution.js").default} ScaleResolution
6
+ *
7
+ * @typedef {object} ViewLevelScaleConfigMapping
8
+ * @prop {View} view
9
+ * @prop {ChannelWithScale} channel
10
+ * @prop {Scale} config
11
+ * @prop {ScaleResolution | undefined} resolution
12
+ */
13
+ /**
14
+ * Maps view-level scale configs to the unique scale resolution visible from
15
+ * each configured subtree. Configs with no matching resolution stay pending.
16
+ *
17
+ * @param {View} root
18
+ * @returns {ViewLevelScaleConfigMapping[]}
19
+ */
20
+ export function mapViewLevelScaleConfigs(root: View): ViewLevelScaleConfigMapping[];
21
+ /**
22
+ * Maps view-level scale configs and attaches non-pending configs to their
23
+ * target resolutions.
24
+ *
25
+ * @param {View} root
26
+ * @returns {ViewLevelScaleConfigMapping[]}
27
+ */
28
+ export function attachViewLevelScaleConfigs(root: View): ViewLevelScaleConfigMapping[];
29
+ /**
30
+ * Clears view-level scale configs owned by views in the subtree.
31
+ *
32
+ * @param {View} root
33
+ */
34
+ export function clearViewLevelScaleConfigs(root: View): void;
35
+ export type ChannelWithScale = import("../spec/channel.js").ChannelWithScale;
36
+ export type Scale = import("../spec/scale.js").Scale;
37
+ export type View = import("../view/view.js").default;
38
+ export type ScaleResolution = import("./scaleResolution.js").default;
39
+ export type ViewLevelScaleConfigMapping = {
40
+ view: View;
41
+ channel: ChannelWithScale;
42
+ config: Scale;
43
+ resolution: ScaleResolution | undefined;
44
+ };
45
+ //# sourceMappingURL=viewLevelScaleConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewLevelScaleConfig.d.ts","sourceRoot":"","sources":["../../../src/scales/viewLevelScaleConfig.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AACH,+CAHW,IAAI,GACF,2BAA2B,EAAE,CAwBzC;AAED;;;;;;GAMG;AACH,kDAHW,IAAI,GACF,2BAA2B,EAAE,CAczC;AAED;;;;GAIG;AACH,iDAFW,IAAI,QAYd;+BA/EY,OAAO,oBAAoB,EAAE,gBAAgB;oBAC7C,OAAO,kBAAkB,EAAE,KAAK;mBAChC,OAAO,iBAAiB,EAAE,OAAO;8BACjC,OAAO,sBAAsB,EAAE,OAAO;;UAGzC,IAAI;aACJ,gBAAgB;YAChB,KAAK;gBACL,eAAe,GAAG,SAAS"}
@@ -0,0 +1,149 @@
1
+ import { VISIT_SKIP } from "../view/view.js";
2
+ import { visitNonChromeViews } from "../view/viewSelectors.js";
3
+
4
+ /**
5
+ * @typedef {import("../spec/channel.js").ChannelWithScale} ChannelWithScale
6
+ * @typedef {import("../spec/scale.js").Scale} Scale
7
+ * @typedef {import("../view/view.js").default} View
8
+ * @typedef {import("./scaleResolution.js").default} ScaleResolution
9
+ *
10
+ * @typedef {object} ViewLevelScaleConfigMapping
11
+ * @prop {View} view
12
+ * @prop {ChannelWithScale} channel
13
+ * @prop {Scale} config
14
+ * @prop {ScaleResolution | undefined} resolution
15
+ */
16
+
17
+ /**
18
+ * Maps view-level scale configs to the unique scale resolution visible from
19
+ * each configured subtree. Configs with no matching resolution stay pending.
20
+ *
21
+ * @param {View} root
22
+ * @returns {ViewLevelScaleConfigMapping[]}
23
+ */
24
+ export function mapViewLevelScaleConfigs(root) {
25
+ /** @type {ViewLevelScaleConfigMapping[]} */
26
+ const mappings = [];
27
+
28
+ for (const view of root.getDescendants()) {
29
+ const scales = view.spec.scales;
30
+ if (!scales) {
31
+ continue;
32
+ }
33
+
34
+ for (const [channel, config] of Object.entries(scales)) {
35
+ mappings.push(
36
+ mapViewLevelScaleConfig(
37
+ view,
38
+ /** @type {ChannelWithScale} */ (channel),
39
+ config
40
+ )
41
+ );
42
+ }
43
+ }
44
+
45
+ return mappings;
46
+ }
47
+
48
+ /**
49
+ * Maps view-level scale configs and attaches non-pending configs to their
50
+ * target resolutions.
51
+ *
52
+ * @param {View} root
53
+ * @returns {ViewLevelScaleConfigMapping[]}
54
+ */
55
+ export function attachViewLevelScaleConfigs(root) {
56
+ clearViewLevelScaleConfigs(root);
57
+ const mappings = mapViewLevelScaleConfigs(root);
58
+ for (const mapping of mappings) {
59
+ if (mapping.resolution) {
60
+ mapping.resolution.attachViewLevelScaleConfig(
61
+ mapping.view,
62
+ mapping.config
63
+ );
64
+ }
65
+ }
66
+ return mappings;
67
+ }
68
+
69
+ /**
70
+ * Clears view-level scale configs owned by views in the subtree.
71
+ *
72
+ * @param {View} root
73
+ */
74
+ export function clearViewLevelScaleConfigs(root) {
75
+ const views = new Set(root.getDescendants());
76
+ const resolutions = collectAllScaleResolutions(root);
77
+
78
+ for (const resolution of resolutions) {
79
+ const config = resolution.getViewLevelScaleConfig();
80
+ if (config && views.has(config.view)) {
81
+ resolution.clearViewLevelScaleConfig(config.view);
82
+ }
83
+ }
84
+ }
85
+
86
+ /**
87
+ * @param {View} view
88
+ * @param {ChannelWithScale} channel
89
+ * @param {Scale} config
90
+ * @returns {ViewLevelScaleConfigMapping}
91
+ */
92
+ function mapViewLevelScaleConfig(view, channel, config) {
93
+ const resolutions = collectVisibleScaleResolutions(view, channel);
94
+
95
+ if (resolutions.size > 1) {
96
+ throw new Error(
97
+ `View-level scales.${channel} maps to multiple scale resolutions. ` +
98
+ `Move scales.${channel} closer to the intended subtree or configure scale resolution explicitly.`
99
+ );
100
+ }
101
+
102
+ const resolution = resolutions.values().next().value;
103
+ return {
104
+ view,
105
+ channel,
106
+ config,
107
+ resolution,
108
+ };
109
+ }
110
+
111
+ /**
112
+ * @param {View} view
113
+ * @param {ChannelWithScale} channel
114
+ * @returns {Set<ScaleResolution>}
115
+ */
116
+ function collectVisibleScaleResolutions(view, channel) {
117
+ /** @type {Set<ScaleResolution>} */
118
+ const resolutions = new Set();
119
+ visitNonChromeViews(view, (descendant) => {
120
+ if (
121
+ descendant !== view &&
122
+ descendant.getConfiguredOrDefaultResolution(channel, "scale") ===
123
+ "excluded"
124
+ ) {
125
+ return VISIT_SKIP;
126
+ }
127
+
128
+ const resolution = descendant.getScaleResolution(channel);
129
+ if (resolution) {
130
+ resolutions.add(resolution);
131
+ }
132
+ });
133
+ return resolutions;
134
+ }
135
+
136
+ /**
137
+ * @param {View} view
138
+ * @returns {Set<ScaleResolution>}
139
+ */
140
+ function collectAllScaleResolutions(view) {
141
+ /** @type {Set<ScaleResolution>} */
142
+ const resolutions = new Set();
143
+ for (const descendant of view.getDescendants()) {
144
+ for (const resolution of Object.values(descendant.resolutions.scale)) {
145
+ resolutions.add(resolution);
146
+ }
147
+ }
148
+ return resolutions;
149
+ }
@@ -2,20 +2,103 @@ import { Align, Baseline, FontStyle, FontWeight } from "./font.js";
2
2
  import { ZIndexProps } from "./decoration.js";
3
3
 
4
4
  export interface GenomeAxis extends Axis {
5
+ /**
6
+ * A boolean flag indicating if chromosome boundary ticks should be included as part of the genome axis.
7
+ *
8
+ * __Default value:__ `true`
9
+ */
5
10
  chromTicks?: boolean;
11
+
12
+ /**
13
+ * The size in pixels of chromosome boundary ticks.
14
+ *
15
+ * __Default value:__ `18`
16
+ * @minimum 0
17
+ */
6
18
  chromTickSize?: number;
19
+
20
+ /**
21
+ * The width, in pixels, of chromosome boundary ticks.
22
+ *
23
+ * __Default value:__ `1`
24
+ * @minimum 0
25
+ */
7
26
  chromTickWidth?: number;
27
+
28
+ /**
29
+ * The color of chromosome boundary ticks.
30
+ *
31
+ * __Default value:__ `"#989898"`
32
+ */
8
33
  chromTickColor?: string;
34
+
35
+ /**
36
+ * An array of alternating [stroke, space] lengths for dashed chromosome boundary ticks.
37
+ *
38
+ * __Default value:__ `[4, 2]`
39
+ */
9
40
  chromTickDash?: number[];
41
+
42
+ /**
43
+ * The pixel offset at which to start drawing with the chromosome tick dash array.
44
+ *
45
+ * __Default value:__ `1`
46
+ */
10
47
  chromTickDashOffset?: number;
11
48
 
49
+ /**
50
+ * A boolean flag indicating if chromosome name labels should be included as part of the genome axis.
51
+ *
52
+ * __Default value:__ `true`
53
+ */
12
54
  chromLabels?: boolean;
55
+
56
+ /**
57
+ * The font of chromosome name labels.
58
+ */
13
59
  chromLabelFont?: string;
60
+
61
+ /**
62
+ * Font size of chromosome name labels, in pixels.
63
+ *
64
+ * __Default value:__ `13`
65
+ * @minimum 0
66
+ */
14
67
  chromLabelFontSize?: number;
68
+
69
+ /**
70
+ * Font weight of chromosome name labels.
71
+ *
72
+ * __Default value:__ `"normal"`
73
+ */
15
74
  chromLabelFontWeight?: FontWeight;
75
+
76
+ /**
77
+ * Font style of chromosome name labels.
78
+ *
79
+ * __Default value:__ `"normal"`
80
+ */
16
81
  chromLabelFontStyle?: FontStyle;
82
+
83
+ /**
84
+ * Text color of chromosome name labels.
85
+ *
86
+ * __Default value:__ `"black"`
87
+ */
17
88
  chromLabelColor?: string;
89
+
90
+ /**
91
+ * The padding, in pixels, between chromosome boundary ticks and chromosome name labels.
92
+ *
93
+ * __Default value:__ `7`
94
+ */
18
95
  chromLabelPadding?: number;
96
+
97
+ /**
98
+ * Horizontal text alignment of chromosome name labels.
99
+ *
100
+ * __Default value:__ `"left"`
101
+ */
19
102
  chromLabelAlign?: Align;
20
103
  // TODO: chromLabelPerpendicularPadding
21
104
 
@@ -92,12 +175,15 @@ export interface GenomeAxis extends Axis {
92
175
 
93
176
  export type AxisOrient = "top" | "bottom" | "left" | "right";
94
177
 
178
+ export type AxisPlacement = "outside" | "inside";
179
+
95
180
  export interface Axis extends BaseAxis, ZIndexProps {
96
181
  /**
97
182
  * Named style reference(s) resolved from `config.style`.
98
- * If an array is provided, later styles override earlier ones.
183
+ * If an array is provided, later styles override earlier ones. Set to
184
+ * `null` to reset inherited axis styles.
99
185
  */
100
- style?: string | string[];
186
+ style?: string | string[] | null;
101
187
 
102
188
  /**
103
189
  * The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).
@@ -106,6 +192,13 @@ export interface Axis extends BaseAxis, ZIndexProps {
106
192
  */
107
193
  orient?: AxisOrient;
108
194
 
195
+ /**
196
+ * Placement of the axis relative to the plotting area. Outside axes reserve layout space outside the plot. Inside axes are mirrored into the plot and do not reserve external layout space.
197
+ *
198
+ * __Default value:__ `"outside"`.
199
+ */
200
+ placement?: AxisPlacement;
201
+
109
202
  /**
110
203
  * The format specifier pattern for axis labels.
111
204
  * Must be a legal [d3-format](https://github.com/d3/d3-format#locale_format) specifier.
@@ -113,10 +206,23 @@ export interface Axis extends BaseAxis, ZIndexProps {
113
206
  format?: string;
114
207
 
115
208
  /**
116
- * A title for the axis (none by default). Set to `null` to remove it.
209
+ * A title for the axis. By default, the title is derived from the encoding title,
210
+ * field, or expression. Set to `null` to remove it.
117
211
  */
118
212
  title?: string | null;
119
213
 
214
+ /**
215
+ * Fitting mode for the axis title. `"point"` anchors the title at the
216
+ * center of the axis without constraining its length. `"range"` constrains
217
+ * the title to the axis span using
218
+ * [ranged text](https://genomespy.app/docs/grammar/mark/text/#ranged-text),
219
+ * allowing it to be squeezed to fit and kept visible inside scrollable
220
+ * viewports.
221
+ *
222
+ * __Default value:__ `"point"`
223
+ */
224
+ titleFit?: "point" | "range";
225
+
120
226
  /**
121
227
  * The orthogonal offset in pixels by which to displace the axis from its position along the edge of the chart.
122
228
  */
@@ -11,6 +11,7 @@
11
11
  import { ExprRef } from "./parameter.js";
12
12
  import { Scale } from "./scale.js";
13
13
  import { GenomeAxis } from "./axis.js";
14
+ import { Legend } from "./legend.js";
14
15
 
15
16
  // TODO: Rename Scalar to PrimitiveValue
16
17
  export type Scalar = string | number | boolean;
@@ -42,6 +43,11 @@ export type ChannelWithScale =
42
43
  | "dx"
43
44
  | "dy";
44
45
 
46
+ export type NonPositionalChannelWithScale = Exclude<
47
+ ChannelWithScale,
48
+ PositionalChannel
49
+ >;
50
+
45
51
  export type ChannelWithoutScale =
46
52
  | "uniqueId"
47
53
  | "search"
@@ -217,7 +223,8 @@ export interface ExprDef
217
223
  * Field definition of a mark property, which can contain a legend.
218
224
  */
219
225
  export type MarkPropFieldDef<T extends Type = Type> = ScaleFieldDef<T> &
220
- LegendMixins;
226
+ LegendMixins &
227
+ FormatMixins;
221
228
 
222
229
  export type MarkPropExprDef<T extends Type = Type> = ExprDef &
223
230
  TypeMixins<T> &
@@ -237,8 +244,16 @@ export type MarkPropDatumDef<T extends Type> = LegendMixins &
237
244
  *
238
245
  * __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
239
246
  */
240
- // TODO: legend?: Legend<ExprRef | SignalRef> | null;
241
- export type LegendMixins = Record<string, never>;
247
+ export interface LegendMixins {
248
+ /**
249
+ * Legend properties for the encoding channel. If `null`, the legend for
250
+ * the channel is removed. If an object is provided, a legend is created
251
+ * even when legends are disabled by default in the config.
252
+ *
253
+ * __Default value:__ If undefined, configured legend defaults are applied.
254
+ */
255
+ legend?: Legend | null;
256
+ }
242
257
 
243
258
  export type ConditionalTemplate =
244
259
  | FieldDef<any>
@@ -429,7 +444,11 @@ export type ChannelDef = Exclude<
429
444
  // TODO: Does this make sense?
430
445
  export type ChannelDefWithScale = ScaleMixins &
431
446
  TypeMixins<Type> &
432
- DomainContributionMixins;
447
+ DomainContributionMixins &
448
+ TitleMixins &
449
+ Partial<FormatMixins> & {
450
+ axis?: GenomeAxis | null;
451
+ };
433
452
 
434
453
  export interface XIndexDef {
435
454
  /**