@jbrowse/core 5.0.0-beta.1 → 5.0.0-beta.11

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 (637) hide show
  1. package/README.md +1709 -390
  2. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
  3. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +5 -5
  4. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +3 -5
  5. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +34 -29
  6. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +1 -4
  7. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +11 -0
  8. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +37 -14
  9. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +1 -1
  10. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +15 -31
  11. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +4 -3
  12. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +12 -25
  13. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetailsFrame.d.ts +11 -0
  14. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetailsFrame.js +11 -0
  15. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +8 -0
  16. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +24 -0
  17. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +6 -4
  18. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +4 -0
  19. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +17 -0
  20. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
  21. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +5 -3
  22. package/esm/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +6 -2
  23. package/esm/BaseFeatureWidget/BaseFeatureDetail/index.js +7 -18
  24. package/esm/BaseFeatureWidget/BaseFeatureDetail/jexlFilterActions.d.ts +16 -0
  25. package/esm/BaseFeatureWidget/BaseFeatureDetail/jexlFilterActions.js +49 -0
  26. package/esm/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +0 -8
  27. package/esm/BaseFeatureWidget/BaseFeatureDetail/util.js +6 -29
  28. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.js +7 -34
  29. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +2 -2
  30. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.js +2 -2
  31. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +3 -1
  32. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +12 -0
  33. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +12 -5
  34. package/esm/BaseFeatureWidget/SequenceFeatureDetails/useSequenceData.js +8 -5
  35. package/esm/BaseFeatureWidget/configSchema.d.ts +1 -1
  36. package/esm/BaseFeatureWidget/formatDetails.d.ts +13 -29
  37. package/esm/BaseFeatureWidget/formatDetails.js +62 -83
  38. package/esm/BaseFeatureWidget/index.d.ts +2 -1
  39. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +42 -29
  40. package/esm/BaseFeatureWidget/stateModelFactory.js +98 -98
  41. package/esm/BaseFeatureWidget/types.d.ts +12 -6
  42. package/esm/BaseFeatureWidget/util.d.ts +0 -10
  43. package/esm/BaseFeatureWidget/util.js +0 -17
  44. package/esm/CorePlugin.js +34 -3
  45. package/esm/PluginLoader.d.ts +24 -13
  46. package/esm/PluginLoader.js +167 -51
  47. package/esm/PluginManager.d.ts +130 -24
  48. package/esm/PluginManager.js +180 -32
  49. package/esm/ReExports/MuiDataGridReExports.d.ts +1 -0
  50. package/esm/ReExports/MuiDataGridReExports.js +2 -2
  51. package/esm/ReExports/coreModules.generated.d.ts +2 -0
  52. package/esm/ReExports/coreModules.generated.js +530 -0
  53. package/esm/ReExports/coreWorkerModules.generated.d.ts +2 -0
  54. package/esm/ReExports/coreWorkerModules.generated.js +490 -0
  55. package/esm/ReExports/frameworkModules.d.ts +2 -0
  56. package/esm/ReExports/frameworkModules.js +68 -0
  57. package/esm/ReExports/frameworkShared.d.ts +12 -0
  58. package/esm/ReExports/frameworkShared.js +16 -0
  59. package/esm/ReExports/frameworkWorkerModules.generated.d.ts +2 -0
  60. package/esm/ReExports/frameworkWorkerModules.generated.js +130 -0
  61. package/esm/ReExports/list.js +528 -79
  62. package/esm/ReExports/modules.d.ts +1 -1
  63. package/esm/ReExports/modules.js +10 -165
  64. package/esm/ReExports/registry.d.ts +1 -0
  65. package/esm/ReExports/registry.js +23 -5
  66. package/esm/ReExports/uiStub.d.ts +3 -0
  67. package/esm/ReExports/uiStub.js +33 -0
  68. package/esm/ReExports/workerModules.d.ts +2 -0
  69. package/esm/ReExports/workerModules.js +11 -0
  70. package/esm/TextSearch/TextSearchManager.d.ts +27 -13
  71. package/esm/TextSearch/TextSearchManager.js +77 -36
  72. package/esm/TextSearch/places.d.ts +12 -0
  73. package/esm/TextSearch/places.js +94 -0
  74. package/esm/assemblyManager/assembly.d.ts +21 -19
  75. package/esm/assemblyManager/assembly.js +28 -26
  76. package/esm/assemblyManager/assemblyAdapters.d.ts +1 -1
  77. package/esm/assemblyManager/assemblyAdapters.js +8 -2
  78. package/esm/assemblyManager/assemblyConfigSchema.d.ts +31 -90
  79. package/esm/assemblyManager/assemblyConfigSchema.js +35 -47
  80. package/esm/assemblyManager/assemblyManager.d.ts +35 -180
  81. package/esm/assemblyManager/assemblyManager.js +47 -51
  82. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +25 -18
  83. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +78 -49
  84. package/esm/assemblyManager/geneticCodes.js +2 -5
  85. package/esm/assemblyManager/getSequenceAdapterConfig.d.ts +10 -0
  86. package/esm/assemblyManager/getSequenceAdapterConfig.js +10 -0
  87. package/esm/assemblyManager/indexAssemblyNames.d.ts +9 -0
  88. package/esm/assemblyManager/indexAssemblyNames.js +22 -0
  89. package/esm/assemblyManager/loadRefNameMap.d.ts +1 -1
  90. package/esm/assemblyManager/loadRefNameMap.js +4 -9
  91. package/esm/assemblyManager/refNameMapKey.d.ts +7 -0
  92. package/esm/assemblyManager/refNameMapKey.js +12 -0
  93. package/esm/checkPlugins.d.ts +2 -0
  94. package/esm/checkPlugins.js +38 -17
  95. package/esm/configuration/bamIndexFields.d.ts +49 -0
  96. package/esm/configuration/bamIndexFields.js +41 -0
  97. package/esm/configuration/configurationSchema.d.ts +101 -71
  98. package/esm/configuration/configurationSchema.js +207 -134
  99. package/esm/configuration/configurationSchemaUnion.d.ts +39 -0
  100. package/esm/configuration/configurationSchemaUnion.js +56 -0
  101. package/esm/configuration/configurationSlot.d.ts +150 -60
  102. package/esm/configuration/configurationSlot.js +103 -75
  103. package/esm/configuration/fillLocations.d.ts +14 -0
  104. package/esm/configuration/fillLocations.js +14 -0
  105. package/esm/configuration/formatAboutConfigSchema.d.ts +7 -21
  106. package/esm/configuration/formatDetailsConfigSchema.d.ts +11 -37
  107. package/esm/configuration/formatDetailsConfigSchema.js +10 -13
  108. package/esm/configuration/fullConfSnapshot.d.ts +4 -19
  109. package/esm/configuration/fullConfSnapshot.js +30 -52
  110. package/esm/configuration/getConf.d.ts +45 -41
  111. package/esm/configuration/getConf.js +111 -44
  112. package/esm/configuration/index.d.ts +26 -11
  113. package/esm/configuration/index.js +16 -7
  114. package/esm/configuration/indexType.d.ts +26 -0
  115. package/esm/configuration/indexType.js +38 -0
  116. package/esm/configuration/mergeFormatCallbacks.d.ts +6 -7
  117. package/esm/configuration/mergeFormatCallbacks.js +13 -10
  118. package/esm/configuration/plot.d.ts +61 -0
  119. package/esm/configuration/plot.js +142 -0
  120. package/esm/configuration/readConfObject.d.ts +2 -24
  121. package/esm/configuration/readConfObject.js +20 -63
  122. package/esm/configuration/requirements.d.ts +37 -0
  123. package/esm/configuration/requirements.js +88 -0
  124. package/esm/configuration/schemaRegistry.d.ts +32 -15
  125. package/esm/configuration/schemaRegistry.js +33 -35
  126. package/esm/configuration/schemaTypes.d.ts +21 -5
  127. package/esm/configuration/schemaTypes.js +66 -55
  128. package/esm/configuration/slotFacade.d.ts +12 -29
  129. package/esm/configuration/slotFacade.js +44 -23
  130. package/esm/configuration/snapshotPreprocess.d.ts +43 -0
  131. package/esm/configuration/snapshotPreprocess.js +161 -0
  132. package/esm/configuration/tabixIndexFields.d.ts +30 -4
  133. package/esm/configuration/tabixIndexFields.js +21 -4
  134. package/esm/configuration/tabixShorthand.d.ts +34 -17
  135. package/esm/configuration/tabixShorthand.js +49 -22
  136. package/esm/configuration/types.d.ts +182 -43
  137. package/esm/configuration/uriShorthand.d.ts +9 -0
  138. package/esm/configuration/uriShorthand.js +16 -0
  139. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +13 -19
  140. package/esm/data_adapters/BaseAdapter/BaseAdapter.js +12 -19
  141. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +40 -2
  142. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +68 -5
  143. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +40 -0
  144. package/esm/data_adapters/BaseAdapter/featureDensity.js +31 -0
  145. package/esm/data_adapters/BaseAdapter/index.d.ts +23 -3
  146. package/esm/data_adapters/BaseAdapter/index.js +1 -0
  147. package/esm/data_adapters/BaseAdapter/rowSources.d.ts +37 -0
  148. package/esm/data_adapters/BaseAdapter/rowSources.js +7 -0
  149. package/esm/data_adapters/BaseAdapter/stats.d.ts +33 -1
  150. package/esm/data_adapters/BaseAdapter/stats.js +52 -13
  151. package/esm/data_adapters/BaseAdapter/types.d.ts +8 -12
  152. package/esm/data_adapters/BaseAdapter/zoomRange.d.ts +10 -0
  153. package/esm/data_adapters/CytobandAdapter/CytobandAdapter.js +1 -1
  154. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +7 -11
  155. package/esm/data_adapters/CytobandAdapter/configSchema.js +3 -17
  156. package/esm/data_adapters/dataAdapterCache.d.ts +19 -2
  157. package/esm/data_adapters/dataAdapterCache.js +44 -10
  158. package/esm/data_adapters/getFeatureAdapter.d.ts +6 -4
  159. package/esm/data_adapters/getFeatureAdapter.js +8 -8
  160. package/esm/data_adapters/getSequenceSubAdapter.d.ts +7 -9
  161. package/esm/data_adapters/getSequenceSubAdapter.js +8 -10
  162. package/esm/pluggableElementTypes/AdapterType.d.ts +8 -8
  163. package/esm/pluggableElementTypes/AdapterType.js +1 -1
  164. package/esm/pluggableElementTypes/DisplayType.d.ts +53 -16
  165. package/esm/pluggableElementTypes/DisplayType.js +28 -12
  166. package/esm/pluggableElementTypes/LazyStateModelElement.d.ts +32 -0
  167. package/esm/pluggableElementTypes/LazyStateModelElement.js +77 -0
  168. package/esm/pluggableElementTypes/PluggableElementBase.d.ts +3 -5
  169. package/esm/pluggableElementTypes/PluggableElementBase.js +3 -5
  170. package/esm/pluggableElementTypes/RpcMethodType.d.ts +11 -1
  171. package/esm/pluggableElementTypes/RpcMethodType.js +25 -9
  172. package/esm/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +1 -2
  173. package/esm/pluggableElementTypes/TextSearchAdapterType.d.ts +7 -7
  174. package/esm/pluggableElementTypes/ViewType.d.ts +20 -4
  175. package/esm/pluggableElementTypes/ViewType.js +32 -4
  176. package/esm/pluggableElementTypes/WidgetType.d.ts +6 -0
  177. package/esm/pluggableElementTypes/WidgetType.js +6 -0
  178. package/esm/pluggableElementTypes/addMenuItems.d.ts +3 -2
  179. package/esm/pluggableElementTypes/extendElementType.d.ts +1 -2
  180. package/esm/pluggableElementTypes/extendElementType.js +9 -5
  181. package/esm/pluggableElementTypes/index.d.ts +2 -1
  182. package/esm/pluggableElementTypes/index.js +2 -9
  183. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +19 -9
  184. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +122 -28
  185. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +155 -11
  186. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +65 -16
  187. package/esm/pluggableElementTypes/models/BaseTrackModel.js +179 -117
  188. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +87 -18
  189. package/esm/pluggableElementTypes/models/BaseViewModel.js +54 -11
  190. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +26 -16
  191. package/esm/pluggableElementTypes/models/assertDisplayContract.d.ts +15 -11
  192. package/esm/pluggableElementTypes/models/assertDisplayContract.js +25 -32
  193. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +22 -18
  194. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +5 -5
  195. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +26 -31
  196. package/esm/pluggableElementTypes/models/baseTrackConfig.d.ts +108 -147
  197. package/esm/pluggableElementTypes/models/baseTrackConfig.js +96 -73
  198. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +4 -6
  199. package/esm/pluggableElementTypes/models/components/fetchTrackData.d.ts +3 -4
  200. package/esm/pluggableElementTypes/models/components/fetchTrackData.js +3 -3
  201. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +23 -13
  202. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +80 -48
  203. package/esm/pluggableElementTypes/models/index.d.ts +2 -3
  204. package/esm/pluggableElementTypes/models/index.js +2 -3
  205. package/esm/pluggableElementTypes/models/migrateTrackConfig.d.ts +15 -1
  206. package/esm/pluggableElementTypes/models/migrateTrackConfig.js +85 -25
  207. package/esm/pluggableElementTypes/models/saveTrackFileTypes/genbank.d.ts +4 -3
  208. package/esm/pluggableElementTypes/models/saveTrackFileTypes/genbank.js +141 -19
  209. package/esm/pluggableElementTypes/models/saveTrackFileTypes/types.d.ts +3 -3
  210. package/esm/pluginDefinitions.d.ts +34 -7
  211. package/esm/pluginDefinitions.js +54 -20
  212. package/esm/rpc/BaseRpcDriver.d.ts +2 -2
  213. package/esm/rpc/BaseRpcDriver.js +25 -30
  214. package/esm/rpc/MainThreadRpcDriver.d.ts +2 -2
  215. package/esm/rpc/MainThreadRpcDriver.js +13 -8
  216. package/esm/rpc/RpcClient.d.ts +18 -6
  217. package/esm/rpc/RpcClient.js +51 -16
  218. package/esm/rpc/RpcManager.d.ts +14 -10
  219. package/esm/rpc/RpcManager.js +11 -1
  220. package/esm/rpc/RpcRegistry.d.ts +40 -7
  221. package/esm/rpc/RpcServer.d.ts +3 -1
  222. package/esm/rpc/RpcServer.js +19 -12
  223. package/esm/rpc/WebWorkerRpcDriver.d.ts +11 -4
  224. package/esm/rpc/WebWorkerRpcDriver.js +64 -68
  225. package/esm/rpc/byteBudget.d.ts +20 -5
  226. package/esm/rpc/byteBudget.js +16 -5
  227. package/esm/rpc/configSchema.d.ts +7 -21
  228. package/esm/rpc/coreRpcMethods.d.ts +4 -0
  229. package/esm/rpc/coreRpcMethods.js +4 -0
  230. package/esm/rpc/methods/CoreGetEncodedFeature.d.ts +13 -0
  231. package/esm/rpc/methods/CoreGetEncodedFeature.js +32 -0
  232. package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +16 -0
  233. package/esm/rpc/methods/CoreGetEncodedLayers.js +59 -0
  234. package/esm/rpc/methods/CoreGetExportData.js +3 -4
  235. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +11 -0
  236. package/esm/rpc/methods/CoreGetFeatureDensity.js +22 -0
  237. package/esm/rpc/methods/CoreGetFeatures.js +3 -5
  238. package/esm/rpc/methods/CoreGetRefNames.js +2 -12
  239. package/esm/rpc/methods/CoreGetRegionByteEstimate.js +1 -1
  240. package/esm/rpc/methods/CoreGetSequence.js +2 -2
  241. package/esm/rpc/methods/CoreLoadAdapterCode.d.ts +13 -0
  242. package/esm/rpc/methods/CoreLoadAdapterCode.js +16 -0
  243. package/esm/rpc/methods/layerFeatures.d.ts +33 -0
  244. package/esm/rpc/methods/layerFeatures.js +29 -0
  245. package/esm/svg/SvgExport.js +6 -7
  246. package/esm/svg/SvgThemeProviders.d.ts +12 -0
  247. package/esm/svg/SvgThemeProviders.js +15 -0
  248. package/esm/svg/exportViewSvg.d.ts +28 -0
  249. package/esm/svg/exportViewSvg.js +13 -0
  250. package/esm/svg/normalizeSvgMarkup.d.ts +7 -0
  251. package/esm/svg/normalizeSvgMarkup.js +99 -0
  252. package/esm/svg/serializeSvg.d.ts +7 -0
  253. package/esm/svg/serializeSvg.js +11 -0
  254. package/esm/svg/svgId.d.ts +1 -1
  255. package/esm/svg/svgId.js +1 -1
  256. package/esm/svg/svgReady.d.ts +9 -7
  257. package/esm/svg/svgReady.js +8 -7
  258. package/esm/svg/trackNames.d.ts +7 -5
  259. package/esm/svg/trackNames.js +12 -9
  260. package/esm/svg/wrapSvgExport.js +6 -74
  261. package/esm/ui/AddCustomPluginDialog.js +3 -8
  262. package/esm/ui/AppReadyMarker.d.ts +45 -0
  263. package/esm/ui/AppReadyMarker.js +89 -0
  264. package/esm/ui/BaseExportSvgDialog.d.ts +1 -1
  265. package/esm/ui/CascadingMenu.js +181 -104
  266. package/esm/ui/DropDownMenu.js +2 -1
  267. package/esm/ui/ErrorBanner.js +1 -1
  268. package/esm/ui/ErrorBoundary.d.ts +2 -2
  269. package/esm/ui/ErrorMessageStackTraceContents.js +2 -1
  270. package/esm/ui/ErrorMessageStackTraceDialog.js +5 -11
  271. package/esm/ui/ExportSvgDialog.d.ts +1 -1
  272. package/esm/ui/FileDropZone.js +2 -1
  273. package/esm/ui/FileSelector/useInternetAccounts.d.ts +156 -96
  274. package/esm/ui/HoverMenu.d.ts +1 -2
  275. package/esm/ui/HoverMenu.js +6 -3
  276. package/esm/ui/JexlFilterDialog.d.ts +13 -10
  277. package/esm/ui/JexlFilterDialog.js +122 -50
  278. package/esm/ui/JexlFilterRowEditors.d.ts +15 -0
  279. package/esm/ui/JexlFilterRowEditors.js +90 -0
  280. package/esm/ui/LazyBaseTooltip.d.ts +4 -0
  281. package/esm/ui/LazyBaseTooltip.js +9 -0
  282. package/esm/ui/LegendSwatchGlyph.js +26 -21
  283. package/esm/ui/LoadingOverlay.d.ts +14 -0
  284. package/esm/ui/LoadingOverlay.js +4 -2
  285. package/esm/ui/MenuTypes.d.ts +23 -53
  286. package/esm/ui/MenuTypes.js +3 -0
  287. package/esm/ui/MonospaceTextField.d.ts +2 -1
  288. package/esm/ui/MonospaceTextField.js +23 -20
  289. package/esm/ui/PaletteContext.d.ts +10 -5
  290. package/esm/ui/PaletteContext.js +44 -6
  291. package/esm/ui/RefNameAutocomplete/SearchOption.d.ts +13 -0
  292. package/esm/ui/RefNameAutocomplete/SearchOption.js +45 -0
  293. package/esm/ui/RefNameAutocomplete/index.d.ts +1 -2
  294. package/esm/ui/RefNameAutocomplete/index.js +8 -2
  295. package/esm/ui/RefNameAutocomplete/util.d.ts +13 -0
  296. package/esm/ui/RefNameAutocomplete/util.js +42 -1
  297. package/esm/ui/ResizeHandle.d.ts +3 -1
  298. package/esm/ui/ResizeHandle.js +44 -11
  299. package/esm/ui/ScrollChrome.d.ts +13 -0
  300. package/esm/ui/ScrollChrome.js +11 -0
  301. package/esm/ui/ScrollEdgeShadow.d.ts +6 -9
  302. package/esm/ui/ScrollEdgeShadow.js +14 -35
  303. package/esm/ui/ScrollZoomToggle.d.ts +4 -27
  304. package/esm/ui/ScrollZoomToggle.js +34 -51
  305. package/esm/ui/SessionJsonPanel.d.ts +3 -0
  306. package/esm/ui/SessionJsonPanel.js +14 -0
  307. package/esm/ui/SettingsChangesTable.d.ts +1 -0
  308. package/esm/ui/SettingsChangesTable.js +49 -11
  309. package/esm/ui/ShareLinkField.d.ts +1 -3
  310. package/esm/ui/ShareLinkField.js +13 -40
  311. package/esm/ui/SizeSliderRow.d.ts +1 -3
  312. package/esm/ui/SizeSliderRow.js +4 -6
  313. package/esm/ui/SnackbarModel.js +79 -67
  314. package/esm/ui/StatusProgressBar.js +2 -2
  315. package/esm/ui/SvgColorLegend.d.ts +9 -4
  316. package/esm/ui/SvgColorLegend.js +82 -41
  317. package/esm/ui/VerticalScrollbar.d.ts +13 -34
  318. package/esm/ui/VerticalScrollbar.js +29 -83
  319. package/esm/ui/ViewLoadingScreen.d.ts +5 -4
  320. package/esm/ui/ViewLoadingScreen.js +8 -32
  321. package/esm/ui/colorScale.d.ts +92 -0
  322. package/esm/ui/colorScale.js +72 -0
  323. package/esm/ui/colors.d.ts +64 -0
  324. package/esm/ui/colors.js +230 -1
  325. package/esm/ui/hoverBoxStyle.d.ts +14 -2
  326. package/esm/ui/hoverBoxStyle.js +17 -2
  327. package/esm/ui/index.d.ts +12 -12
  328. package/esm/ui/index.js +14 -22
  329. package/esm/ui/launchViewMenu.js +15 -5
  330. package/esm/ui/legendMenuItem.d.ts +10 -32
  331. package/esm/ui/legendMenuItem.js +9 -36
  332. package/esm/ui/legendSpec.d.ts +15 -8
  333. package/esm/ui/legendSpec.js +14 -23
  334. package/esm/ui/makeSizeMenu.d.ts +0 -6
  335. package/esm/ui/makeSizeMenu.js +6 -30
  336. package/esm/ui/measureLegendText.js +1 -1
  337. package/esm/ui/menuItemAdornment.d.ts +9 -20
  338. package/esm/ui/menuItemAdornment.js +10 -32
  339. package/esm/ui/menuItems.d.ts +2 -7
  340. package/esm/ui/menuItems.js +1 -6
  341. package/esm/ui/multiTrackMenuItems.d.ts +6 -0
  342. package/esm/ui/palette.d.ts +118 -116
  343. package/esm/ui/palette.js +114 -75
  344. package/esm/ui/replaceViewAction.d.ts +1 -1
  345. package/esm/ui/replaceViewAction.js +1 -1
  346. package/esm/ui/theme.d.ts +43 -119
  347. package/esm/ui/theme.js +62 -78
  348. package/esm/ui/toggleMenuItems.d.ts +1 -3
  349. package/esm/ui/toggleMenuItems.js +6 -5
  350. package/esm/ui/useAssemblySelection.d.ts +4 -4
  351. package/esm/ui/viewHeaderHeight.d.ts +1 -0
  352. package/esm/ui/viewHeaderHeight.js +1 -0
  353. package/esm/util/Base1DUtils.d.ts +5 -3
  354. package/esm/util/Base1DUtils.js +14 -6
  355. package/esm/util/Base1DViewModel.d.ts +2 -1
  356. package/esm/util/Base1DViewModel.js +3 -2
  357. package/esm/util/SvgCanvas.d.ts +15 -13
  358. package/esm/util/SvgCanvas.js +76 -56
  359. package/esm/util/TimeTraveller.d.ts +3 -0
  360. package/esm/util/TimeTraveller.js +34 -2
  361. package/esm/util/aborting.d.ts +39 -0
  362. package/esm/util/aborting.js +88 -6
  363. package/esm/util/adapterMetadata.d.ts +1 -1
  364. package/esm/util/adapterMetadata.js +6 -5
  365. package/esm/util/addAndShowTrack.d.ts +2 -5
  366. package/esm/util/addAndShowTrack.js +5 -1
  367. package/esm/util/addRelativeUris.d.ts +17 -5
  368. package/esm/util/addRelativeUris.js +46 -10
  369. package/esm/util/addTrackFromWidget.d.ts +2 -5
  370. package/esm/util/addTrackFromWidget.js +5 -4
  371. package/esm/util/aggregateFieldName.d.ts +10 -0
  372. package/esm/util/aggregateFieldName.js +8 -0
  373. package/esm/util/analytics.js +46 -13
  374. package/esm/util/animationAllowed.d.ts +9 -0
  375. package/esm/util/animationAllowed.js +13 -0
  376. package/esm/util/applyRowResizeWheel.d.ts +10 -5
  377. package/esm/util/applyRowResizeWheel.js +10 -21
  378. package/esm/util/bandHeight.d.ts +10 -0
  379. package/esm/util/bandHeight.js +29 -0
  380. package/esm/util/bandLayout.d.ts +4 -4
  381. package/esm/util/bandLayout.js +4 -4
  382. package/esm/util/baseDisplayConfig.d.ts +8 -0
  383. package/esm/util/baseDisplayConfig.js +27 -0
  384. package/esm/util/bezierConnector.d.ts +4 -3
  385. package/esm/util/bezierConnector.js +38 -45
  386. package/esm/util/bgzfWorkerPool.d.ts +20 -74
  387. package/esm/util/bgzfWorkerPool.js +20 -74
  388. package/esm/util/binnedAggregate.d.ts +17 -0
  389. package/esm/util/binnedAggregate.js +275 -0
  390. package/esm/util/cacheBudgets.d.ts +22 -19
  391. package/esm/util/cacheBudgets.js +22 -19
  392. package/esm/util/cachedSetup.d.ts +16 -6
  393. package/esm/util/cachedSetup.js +108 -38
  394. package/esm/util/categoricalField.d.ts +56 -0
  395. package/esm/util/categoricalField.js +73 -0
  396. package/esm/util/cellMatches.d.ts +23 -0
  397. package/esm/util/cellMatches.js +264 -0
  398. package/esm/util/cellsStep.d.ts +29 -0
  399. package/esm/util/cellsStep.js +437 -0
  400. package/esm/util/clampToContig.d.ts +17 -0
  401. package/esm/util/clampToContig.js +19 -0
  402. package/esm/util/coarseStripHTML.js +1 -2
  403. package/esm/util/color/cssColorsLevel4.d.ts +1 -0
  404. package/esm/util/color/cssColorsLevel4.js +1 -0
  405. package/esm/util/color/index.d.ts +5 -3
  406. package/esm/util/color/index.js +7 -4
  407. package/esm/util/colorBits.d.ts +3 -3
  408. package/esm/util/colorBits.js +19 -44
  409. package/esm/util/colorRamp.d.ts +49 -5
  410. package/esm/util/colorRamp.js +169 -18
  411. package/esm/util/colorScale.d.ts +156 -0
  412. package/esm/util/colorScale.js +243 -0
  413. package/esm/util/colorSchemes.d.ts +21 -0
  414. package/esm/util/colorSchemes.js +30 -0
  415. package/esm/util/copyToClipboard.js +8 -1
  416. package/esm/util/{createStopTokenRotation.d.ts → createAbortRotation.d.ts} +21 -23
  417. package/esm/util/{createStopTokenRotation.js → createAbortRotation.js} +21 -52
  418. package/esm/util/createSvgRasterCanvas.d.ts +10 -0
  419. package/esm/util/cssColorParse.d.ts +15 -0
  420. package/esm/util/cssColorParse.js +53 -0
  421. package/esm/util/diagonalizeRegions.d.ts +2 -3
  422. package/esm/util/diagonalizeRegions.js +8 -13
  423. package/esm/util/expandLooseSearchIndex.d.ts +19 -0
  424. package/esm/util/expandLooseSearchIndex.js +29 -0
  425. package/esm/util/featureTable.d.ts +224 -0
  426. package/esm/util/featureTable.js +366 -0
  427. package/esm/util/featureTransforms.d.ts +81 -0
  428. package/esm/util/featureTransforms.js +1231 -0
  429. package/esm/util/featureTypes.d.ts +24 -0
  430. package/esm/util/featureTypes.js +35 -0
  431. package/esm/util/fetchAndMaybeUnzip.js +16 -9
  432. package/esm/util/fetchContext.d.ts +7 -8
  433. package/esm/util/fetchContext.js +3 -3
  434. package/esm/util/fetchHub.d.ts +4 -2
  435. package/esm/util/fetchHub.js +2 -2
  436. package/esm/util/fetchPhases.d.ts +10 -10
  437. package/esm/util/fetchSeq.d.ts +2 -3
  438. package/esm/util/fetchSeq.js +2 -2
  439. package/esm/util/fieldReader.d.ts +17 -0
  440. package/esm/util/fieldReader.js +62 -0
  441. package/esm/util/formatBytes.js +1 -1
  442. package/esm/util/formatGuessers.d.ts +25 -14
  443. package/esm/util/formatGuessers.js +42 -27
  444. package/esm/util/formatRelativeTime.js +1 -1
  445. package/esm/util/freezeDeep.d.ts +8 -10
  446. package/esm/util/freezeDeep.js +8 -10
  447. package/esm/util/getLocationUri.d.ts +2 -1
  448. package/esm/util/getLocationUri.js +8 -2
  449. package/esm/util/groupKeys.d.ts +76 -0
  450. package/esm/util/groupKeys.js +156 -0
  451. package/esm/util/highlights.d.ts +10 -6
  452. package/esm/util/highlights.js +12 -25
  453. package/esm/util/hooks.d.ts +31 -2
  454. package/esm/util/hooks.js +72 -3
  455. package/esm/util/index.d.ts +11 -11
  456. package/esm/util/index.js +11 -10
  457. package/esm/util/indexCandidates.d.ts +1 -31
  458. package/esm/util/indexCandidates.js +5 -63
  459. package/esm/util/installFetch.d.ts +77 -37
  460. package/esm/util/installFetch.js +65 -38
  461. package/esm/util/installInitAutorun.d.ts +14 -13
  462. package/esm/util/installInitAutorun.js +17 -17
  463. package/esm/util/installPrerequisiteFetch.d.ts +115 -0
  464. package/esm/util/installPrerequisiteFetch.js +111 -0
  465. package/esm/util/intervals.js +9 -4
  466. package/esm/util/io/index.js +22 -15
  467. package/esm/util/isDataCurrent.d.ts +7 -5
  468. package/esm/util/isDataCurrent.js +9 -6
  469. package/esm/util/isTextEntryFocused.d.ts +7 -0
  470. package/esm/util/isTextEntryFocused.js +16 -0
  471. package/esm/util/jexl.js +24 -21
  472. package/esm/util/jexlFilterRows.d.ts +89 -0
  473. package/esm/util/jexlFilterRows.js +252 -0
  474. package/esm/util/jexlFilters.d.ts +32 -57
  475. package/esm/util/jexlFilters.js +31 -29
  476. package/esm/util/jexlStrings.d.ts +3 -4
  477. package/esm/util/jexlStrings.js +2 -3
  478. package/esm/util/layouts/GranularRectLayout.d.ts +8 -1
  479. package/esm/util/layouts/GranularRectLayout.js +25 -8
  480. package/esm/util/lazyAfterAttach.d.ts +13 -0
  481. package/esm/util/lazyAfterAttach.js +31 -0
  482. package/esm/util/lazyWithPreload.d.ts +19 -0
  483. package/esm/util/lazyWithPreload.js +27 -0
  484. package/esm/util/legendCandidates.d.ts +72 -0
  485. package/esm/util/legendCandidates.js +138 -0
  486. package/esm/util/locString.js +5 -2
  487. package/esm/util/localStorage.js +4 -4
  488. package/esm/util/markEncoding.d.ts +150 -0
  489. package/esm/util/markEncoding.js +885 -0
  490. package/esm/util/markEncodingTypes.d.ts +595 -0
  491. package/esm/util/markEncodingTypes.js +8 -0
  492. package/esm/util/mst-reflection.d.ts +2 -20
  493. package/esm/util/mst-reflection.js +3 -53
  494. package/esm/util/mstUtils.d.ts +31 -23
  495. package/esm/util/mstUtils.js +39 -24
  496. package/esm/util/numericUtils.d.ts +7 -0
  497. package/esm/util/numericUtils.js +16 -0
  498. package/esm/util/numericValue.d.ts +14 -0
  499. package/esm/util/numericValue.js +34 -0
  500. package/esm/util/openFeatureWidget.d.ts +5 -0
  501. package/esm/util/openFeatureWidget.js +2 -2
  502. package/esm/util/openViews.d.ts +17 -0
  503. package/esm/util/openViews.js +22 -0
  504. package/esm/util/parentWalk.d.ts +1 -1
  505. package/esm/util/parentWalk.js +1 -1
  506. package/esm/util/parseLineByLine.d.ts +4 -5
  507. package/esm/util/parseLineByLine.js +8 -14
  508. package/esm/util/pluginStore.d.ts +6 -8
  509. package/esm/util/pluginStore.js +17 -16
  510. package/esm/util/preloadComponent.d.ts +5 -0
  511. package/esm/util/preloadComponent.js +11 -0
  512. package/esm/util/progress.d.ts +22 -22
  513. package/esm/util/progress.js +27 -26
  514. package/esm/util/quantileExtent.d.ts +49 -0
  515. package/esm/util/quantileExtent.js +162 -0
  516. package/esm/util/range.d.ts +13 -9
  517. package/esm/util/range.js +17 -8
  518. package/esm/util/renameRegions.d.ts +26 -6
  519. package/esm/util/renameRegions.js +68 -54
  520. package/esm/util/renderToStaticMarkup.js +24 -14
  521. package/esm/util/rxjs.d.ts +23 -8
  522. package/esm/util/rxjs.js +61 -15
  523. package/esm/util/samplesTsv.d.ts +49 -0
  524. package/esm/util/samplesTsv.js +86 -0
  525. package/esm/util/scheduleDetachedDestroy.d.ts +18 -0
  526. package/esm/util/scheduleDetachedDestroy.js +24 -0
  527. package/esm/util/scrollLatch.d.ts +1 -0
  528. package/esm/util/scrollLatch.js +8 -0
  529. package/esm/util/selectEncodedFeature.d.ts +16 -0
  530. package/esm/util/selectEncodedFeature.js +34 -0
  531. package/esm/util/sessionSharing.d.ts +7 -5
  532. package/esm/util/sessionSharing.js +23 -23
  533. package/esm/util/shapeNameList.d.ts +2 -0
  534. package/esm/util/shapeNameList.js +6 -0
  535. package/esm/util/shapeNames.d.ts +7 -0
  536. package/esm/util/shapeNames.js +11 -0
  537. package/esm/util/simpleFeature.d.ts +0 -1
  538. package/esm/util/springAnimate.js +1 -1
  539. package/esm/util/starFusion.d.ts +26 -0
  540. package/esm/util/starFusion.js +37 -0
  541. package/esm/util/stepTables.d.ts +96 -0
  542. package/esm/util/stepTables.js +277 -0
  543. package/esm/util/svAlt.d.ts +145 -0
  544. package/esm/util/svAlt.js +364 -0
  545. package/esm/util/svgColorProps.d.ts +11 -0
  546. package/esm/util/svgColorProps.js +28 -1
  547. package/esm/util/systemColorScheme.d.ts +12 -0
  548. package/esm/util/systemColorScheme.js +27 -0
  549. package/esm/util/tabix.d.ts +19 -10
  550. package/esm/util/tabix.js +19 -14
  551. package/esm/util/thresholdScale.d.ts +91 -0
  552. package/esm/util/thresholdScale.js +166 -0
  553. package/esm/util/timeGate.d.ts +4 -5
  554. package/esm/util/timeGate.js +4 -5
  555. package/esm/util/trackConfigDelta.d.ts +26 -26
  556. package/esm/util/trackConfigDelta.js +63 -47
  557. package/esm/util/tracks.d.ts +120 -66
  558. package/esm/util/tracks.js +501 -151
  559. package/esm/util/translateTranscript.d.ts +44 -0
  560. package/esm/util/translateTranscript.js +102 -0
  561. package/esm/util/types/data.d.ts +0 -2
  562. package/esm/util/types/index.d.ts +121 -22
  563. package/esm/util/types/index.js +9 -0
  564. package/esm/util/types/mst.d.ts +3 -0
  565. package/esm/util/types/mst.js +4 -0
  566. package/esm/util/types/renameIds.d.ts +1 -0
  567. package/esm/util/types/renameIds.js +29 -0
  568. package/esm/util/types/services.d.ts +1 -1
  569. package/esm/util/unknownSnapshotKeys.d.ts +53 -0
  570. package/esm/util/unknownSnapshotKeys.js +76 -0
  571. package/esm/util/useFeatureSequence.js +5 -5
  572. package/esm/util/useFetch.d.ts +3 -4
  573. package/esm/util/useFetch.js +19 -10
  574. package/esm/util/useFetchPlugins.d.ts +6 -2
  575. package/esm/util/useFetchPlugins.js +7 -3
  576. package/esm/util/usePanZoom.js +10 -3
  577. package/esm/util/usePanelVirtualScroll.d.ts +7 -35
  578. package/esm/util/usePanelVirtualScroll.js +9 -36
  579. package/esm/util/useRafCommit.js +1 -0
  580. package/esm/util/useRowVirtualScroll.d.ts +6 -29
  581. package/esm/util/useRowVirtualScroll.js +8 -49
  582. package/esm/util/useVirtualScrollWheel.d.ts +20 -4
  583. package/esm/util/useVirtualScrollWheel.js +40 -74
  584. package/esm/util/viewHighlights.d.ts +3 -0
  585. package/esm/util/viewHighlights.js +5 -0
  586. package/esm/util/viewStatus.d.ts +47 -15
  587. package/esm/util/viewStatus.js +34 -0
  588. package/esm/util/wheelZoom.d.ts +7 -1
  589. package/esm/util/wheelZoom.js +85 -19
  590. package/esm/util/whenViewSettled.d.ts +55 -8
  591. package/esm/util/whenViewSettled.js +56 -7
  592. package/esm/util/withFeatureDetails.js +4 -0
  593. package/esm/util/withLaunchInput.d.ts +174 -0
  594. package/esm/util/withLaunchInput.js +274 -0
  595. package/package.json +75 -24
  596. package/esm/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +0 -2
  597. package/esm/BaseFeatureWidget/BaseFeatureDetail/Position.js +0 -8
  598. package/esm/BaseFeatureWidget/BaseFeatureDetail/types.d.ts +0 -8
  599. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.d.ts +0 -80
  600. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.js +0 -583
  601. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.d.ts +0 -141
  602. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.js +0 -1116
  603. package/esm/ReExports/BaseFeatureDetails.d.ts +0 -1
  604. package/esm/ReExports/BaseFeatureDetails.js +0 -10
  605. package/esm/ReExports/index.d.ts +0 -1
  606. package/esm/ReExports/index.js +0 -1
  607. package/esm/ReExports/publicUtil.d.ts +0 -1
  608. package/esm/ReExports/publicUtil.js +0 -28
  609. package/esm/configuration/promotableDefaults.d.ts +0 -199
  610. package/esm/configuration/promotableDefaults.js +0 -326
  611. package/esm/configuration/promotablePin.d.ts +0 -55
  612. package/esm/configuration/promotablePin.js +0 -1
  613. package/esm/configuration/promotableResolve.d.ts +0 -108
  614. package/esm/configuration/promotableResolve.js +0 -117
  615. package/esm/configuration/promotableSlots.d.ts +0 -12
  616. package/esm/configuration/promotableSlots.js +0 -45
  617. package/esm/configuration/slotShape.d.ts +0 -12
  618. package/esm/configuration/slotShape.js +0 -84
  619. package/esm/pluggableElementTypes/models/HighlightsMixin.d.ts +0 -51
  620. package/esm/pluggableElementTypes/models/HighlightsMixin.js +0 -78
  621. package/esm/ui/PinAdornment.d.ts +0 -5
  622. package/esm/ui/PinAdornment.js +0 -79
  623. package/esm/ui/SvgGradientLegend.d.ts +0 -26
  624. package/esm/ui/SvgGradientLegend.js +0 -26
  625. package/esm/ui/highlightChipReveal.d.ts +0 -32
  626. package/esm/ui/highlightChipReveal.js +0 -39
  627. package/esm/ui/promotableMenuItems.d.ts +0 -19
  628. package/esm/ui/promotableMenuItems.js +0 -89
  629. package/esm/ui/promotablePinCoverage.d.ts +0 -44
  630. package/esm/ui/promotablePinCoverage.js +0 -87
  631. package/esm/util/applyInitSettings.d.ts +0 -79
  632. package/esm/util/applyInitSettings.js +0 -91
  633. package/esm/util/openDisplays.d.ts +0 -23
  634. package/esm/util/openDisplays.js +0 -79
  635. package/esm/util/stopToken.d.ts +0 -211
  636. package/esm/util/stopToken.js +0 -438
  637. /package/esm/{BaseFeatureWidget/BaseFeatureDetail/types.js → data_adapters/BaseAdapter/zoomRange.js} +0 -0
package/README.md CHANGED
@@ -25,6 +25,68 @@ Apache-2.0 © Evolutionary Software Foundation
25
25
 
26
26
  Auto-generated from `#api` JSDoc tags in this package. Do not edit by hand.
27
27
 
28
+ ### AggregateOp
29
+
30
+ One summary over a group: `count` needs no field; `sum`, `mean`, `min` and `max`
31
+ read one, skipping values that are not numbers. The output field is `as`, else
32
+ `count` or `<op>_<field>`.
33
+
34
+ `weight` names a field each row counts by: `count` is then the sum of the
35
+ weights, `sum` the sum of value times weight, and `mean` that over the sum of
36
+ the weights, a row whose weight is not a number counting for nothing. A weight
37
+ moves no minimum or maximum, so `min` and `max` read none.
38
+
39
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
40
+
41
+ ### AggregateStep
42
+
43
+ One feature per distinct `groupby` value set (one for the whole region with
44
+ none), spanning its members' extent, carrying the group's fields and every `ops`
45
+ entry.
46
+
47
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
48
+
49
+ ### applyConfSettings
50
+
51
+ Write a settings bag — a session spec's track entry, a share link, an agent call
52
+ — onto a config. Each key names a member: a slot or a channel is written whole,
53
+ as `setConf` writes it, so `null` resets it (ADR-146); a namespace's object
54
+ names members inside it, at any depth, and the ones it leaves out keep their
55
+ values. The config's own lift and checks run over the bag first, and each
56
+ namespace's over its part, so a shorthand or a legacy key reads the same here as
57
+ in `config.json`. A key the config does not declare is reported for the caller
58
+ to route or refuse, and a declared key whose write throws costs that key alone.
59
+
60
+ ```js
61
+ // type signature
62
+ (target: AnyConfigurationModel | { configuration: AnyConfigurationModel; }, settings: Record<string, unknown>) => ConfSettingsReport
63
+ ```
64
+
65
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
66
+
67
+ ### arraySlotUnion
68
+
69
+ The `ConfigurationSchemaUnion` an array slot's entries answer to, read off the
70
+ slot's MST type, or undefined for any other slot.
71
+
72
+ ```js
73
+ // type signature
74
+ (slotType: IAnyType) => ConfigurationSchemaUnionMetadata | undefined
75
+ ```
76
+
77
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchemaUnion.ts)
78
+
79
+ ### asTable
80
+
81
+ A table over a feature list, or the table itself.
82
+
83
+ ```js
84
+ // type signature
85
+ (input: readonly Feature[] | FeatureTable) => FeatureTable
86
+ ```
87
+
88
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
89
+
28
90
  ### Band
29
91
 
30
92
  One band of a display's vertical stack — a coverage histogram, an arc strip, a
@@ -37,6 +99,36 @@ historically drifted.
37
99
 
38
100
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandLayout.ts)
39
101
 
102
+ ### baseDisplayConfig
103
+
104
+ The base's entry for this display, hydrated, which a reset returns to and "is
105
+ this the reader's" compares against: the config.json's, or the one a track the
106
+ session owns was added with; empty in a session that keeps no base.
107
+
108
+ ```js
109
+ // type signature
110
+ (self: object) => Record<string, unknown>
111
+ ```
112
+
113
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/baseDisplayConfig.ts)
114
+
115
+ ### BinStep
116
+
117
+ Place every feature in a genome-aligned bin of `step` bp, writing the bin's
118
+ edges over the fields `as` names — `start` and `end` by default, so an
119
+ `aggregate` grouped by those counts per bin and the bar spans the bin.
120
+
121
+ With `field` (`start` by default) a feature lands in the one bin that field
122
+ falls in. With `fields`, an interval's start and end, it is cut at the bin edges
123
+ into one piece per bin it overlaps, each piece writing `overlap`, the bases of
124
+ the interval inside its bin; a zero-length interval (an insertion) is one piece
125
+ of overlap 0 in the bin holding its position, and one whose ends are not numbers
126
+ is none. A piece is its feature with those fields beside it, so its id and hover
127
+ are the feature's, and an `aggregate` over the pieces weighted by `overlap` is a
128
+ mean per base.
129
+
130
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
131
+
40
132
  ### boundBandHeight
41
133
 
42
134
  Bound a band height to its legal range — a config value, a menu choice, or a
@@ -61,6 +153,33 @@ this rule and a doc comment claiming to be the whole of it.
61
153
 
62
154
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandHeight.ts)
63
155
 
156
+ ### breakendKeepsDirections
157
+
158
+ Which way the sequence each end of a breakend KEEPS runs from its breakpoint, as
159
+ `+1 = right` / `-1 = left` — the convention `StarFusionAdapter`'s
160
+ `tickDirection` states and the one every producer in the tree emits.
161
+
162
+ The two halves read their strings with OPPOSITE polarity, which is the whole
163
+ reason to state them together. `Join: 'right'` says the mate piece is joined to
164
+ the RIGHT of the ref base, so this end keeps the sequence to its left: negated.
165
+ `MateDirection: 'right'` says the mate's own piece extends to the right of the
166
+ mate position, which is already the direction it keeps: taken as read. So
167
+ `N[chr2:2000[` is `{ joinDirection: -1, mateDirection: 1 }`, and that is the
168
+ same pair `StarFusionAdapter` emits for the fusion it describes — the donor
169
+ keeps the sequence below its breakpoint (-1) and the acceptor the sequence above
170
+ its own (+1).
171
+
172
+ Split out of `parseSvAlt` because a consumer holding an already-parsed
173
+ `Breakend` was re-deriving it by hand, in two adjacent ternaries of opposite
174
+ polarity — the shape that produced 78bb7b84f9.
175
+
176
+ ```js
177
+ // type signature
178
+ (bnd: Breakend) => { mateDirection: number; joinDirection: number; }
179
+ ```
180
+
181
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
182
+
64
183
  ### buildColorRampLut
65
184
 
66
185
  An RGBA lookup table over sampleColorRamp, laid out as the Nx1 texture both GPU
@@ -68,6 +187,10 @@ backends upload and the Canvas2D twins index — entry `i` is the color at
68
187
  `t = i / (N - 1)`. N comes off the shader that samples it, so the table and
69
188
  `rampColor`'s texel mapping cannot disagree.
70
189
 
190
+ The table is always straight. A diverging ramp whose middle belongs at a value
191
+ off the centre of the domain reads it through `rampMidT`, the shader's rule and
192
+ its generated twin, so the middle follows a moving domain without a new table.
193
+
71
194
  ```js
72
195
  // type signature
73
196
  (stops: readonly ColorRampStop[]) => Uint8Array<ArrayBuffer>
@@ -78,33 +201,29 @@ backends upload and the Canvas2D twins index — entry `i` is the color at
78
201
  ### canonicalizeViewRefName
79
202
 
80
203
  Resolve user-authored refName text against the assembly of the view containing
81
- `node` — the one normalization layer, which resolves aliases and casing
82
- together. Falls back to the input when the assembly is absent or its aliases
83
- have not loaded.
204
+ `node`, resolving aliases and casing together. Falls back to the input when the
205
+ assembly is absent or its aliases have not loaded.
84
206
 
85
- Keyed off the VIEW's assembly rather than the track's, because the view is what
86
- the comparison is against: displayed regions, loaded regions and blocks all
87
- carry the refNames the view laid out.
207
+ Uses the view's assembly, not the track's, because displayed regions, loaded
208
+ regions and blocks all carry the refNames the view laid out.
88
209
 
89
- Reach for this wherever a refName a _person_ wrote is about to be compared
90
- against regions, features or blocks, which carry the assembly's canonical name.
91
- A refName a display copied off a region is canonical already and needs nothing;
92
- one that arrived in a session spec, a config slot or a URL is whatever the
93
- author read out of the location box.
210
+ Call it wherever a refName a _person_ wrote is about to be compared against
211
+ regions, features or blocks, which carry the assembly's canonical name. A
212
+ refName a display copied off a region is already canonical. One from a session
213
+ spec, a config slot or a URL is whatever the author typed.
94
214
 
95
- Skipping it fails silently and, worse, assembly-dependently: `chr12` matches on
96
- an assembly canonicalized `chr12` and matches nothing on one canonicalized `12`,
97
- so the same spec key works on one config and quietly does nothing on the next,
98
- with no error for anyone to act on.
215
+ Without it, matching depends on the assembly: `chr12` matches on an assembly
216
+ canonicalized `chr12` and matches nothing on one canonicalized `12`. The same
217
+ spec key works on one config and does nothing on the next, with no error.
99
218
 
100
- Resolves through `getCanonicalRefName2`, whose fallback is what keeps a spec
101
- read before the alias file has loaded from throwing — and the getters that read
102
- user specs do run from the first render.
219
+ Resolves through `getCanonicalRefName2`, which falls back to the input instead
220
+ of throwing when a spec is read before the alias file has loaded. The getters
221
+ that read user specs run from the first render.
103
222
 
104
- Takes a refName, not a spec that might hold one: the resolver reads
105
- `refName.toLowerCase()`, so anything else throws once the aliases are there, and
106
- a caller reading an untyped `frozen` slot has to establish that it names a
107
- refName at all before this is the right question to ask of it.
223
+ Takes a refName, not a spec that might hold one. The resolver calls
224
+ `refName.toLowerCase()`, so any other value throws once the aliases have loaded,
225
+ and a caller reading an untyped `frozen` slot must first check that the value is
226
+ a refName.
108
227
 
109
228
  ```js
110
229
  // type signature
@@ -113,6 +232,63 @@ refName at all before this is the right question to ask of it.
113
232
 
114
233
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
115
234
 
235
+ ### categoricalField
236
+
237
+ `labels` names the `domain`'s values in a key, one each in order, where a config
238
+ spells them for a reader rather than as the data does.
239
+
240
+ ```js
241
+ // type signature
242
+ (field: string, {…}?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; labels?: readonly string[] | undefined; }) => CategoricalField
243
+ ```
244
+
245
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
246
+
247
+ ### CategoricalField
248
+
249
+ One categorical field as every channel reads it — a facet's sections, a color's
250
+ range entries, a key's rows. `key` files a value, `compare` orders keys (the
251
+ `domain` first, the rest by `compareGroupKeys`, `''` after them), `label` names
252
+ a key in a legend, `sectionLabel` on a chip, and `color` paints it. A key's
253
+ color depends only on the key and the declaration, so every region agrees on it.
254
+
255
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
256
+
257
+ ### CategoricalRef
258
+
259
+ A field bound to a categorical scale: each distinct value takes one entry of the
260
+ channel's `range` — a colour for `color`, a shape name for `shape`. Every value
261
+ derives its entry from itself (an integer takes the slot it names, anything else
262
+ hashes in), so every region agrees on a value it shares with another at the cost
263
+ of an occasional collision. A `domain` spends the range deliberately: the listed
264
+ values take it in order, and a value the domain leaves out never takes a listed
265
+ value's entry. The domain orders and spends; it never adds a value the data
266
+ lacks.
267
+
268
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
269
+
270
+ ### CellsStep
271
+
272
+ Replace each aligned row with its cells against the reference: one feature per
273
+ run of columns in one `state` — `match`, `mismatch` or `gap` — on the row's own
274
+ reference span, a mismatch run carrying its `base` and a match or mismatch run
275
+ `match` as 1 or 0, and one interbase feature per `insertion`, standing at the
276
+ reference base it precedes with the inserted bases in `base` and their count in
277
+ `length`. The row's `field` (`seq`) is the aligned text, and the reference's is
278
+ the same field on the feature the row was fanned out of, so a `flatten` over a
279
+ MAF block's `alignments` stands in front. A gap run reaching either end of the
280
+ row is no cell, and a feature with no parent answers none.
281
+
282
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
283
+
284
+ ### ChannelReader
285
+
286
+ A channel read per feature: the compiled form of a FieldRef, and what a
287
+ display's own worker method hands the encoder for a channel no field name can
288
+ say — a join against a second adapter, a lookup table, a rule over two fields.
289
+
290
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
291
+
116
292
  ### clampBandHeight
117
293
 
118
294
  Clamp one _resize_ of a drag-resizable band: boundBandHeight, plus the one rule
@@ -140,513 +316,1317 @@ lands before React re-renders.
140
316
 
141
317
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandHeight.ts)
142
318
 
143
- ### clearPromotedDefaults
144
-
145
- Clear the named promoted defaults for this display type, so every track
146
- following one reverts to its own config value. Backs the badge's "clear session
147
- default" action, which passes the slots it actually listed
148
- (`getDisplayTypeDefaultChanges`).
319
+ ### clipQuantileOf
149
320
 
150
- **`slots` is required, and an all-slots default is not the convenience it looks
151
- like.** It reaches further than any list a dialog can have shown: a promoted
152
- default the track _customized_ over, or one promoted to a value equal to
153
- `promotedBase`, is `inherited: false` and so appears in no row, yet still
154
- governs sibling tracks — so clearing it from a dialog that never showed it moves
155
- tracks other than the one whose badge was clicked. Clearing every promoted
156
- default at once is a preferences-scope action, and Preferences → "Reset to
157
- defaults" is where it lives (`clearPreferenceOverrides`).
321
+ The quantile a clip toggle writes: a scale's declared default where that clips,
322
+ below 1, else DEFAULT_CLIP_QUANTILE.
158
323
 
159
324
  ```js
160
325
  // type signature
161
- (self: ResolvableDisplay, slots: Iterable<string>) => void
326
+ (declaredDefault: unknown) => number
162
327
  ```
163
328
 
164
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
329
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
165
330
 
166
- ### getAssemblyHost
331
+ ### CodeLane
167
332
 
168
- The host's assembly manager, for a module that resolves names and nothing else.
333
+ Codes into a list of labels, one per row.
169
334
 
170
- Unlike the accessors in `sessionServices.ts` this one buys the caller no smaller
171
- type graph — an `AssemblyManager` is an MST model a `PluginManager` built, so
172
- naming it costs what naming a session costs. It is here to say which service is
173
- wanted, and because that cost is the finding: the assembly manager is the one
174
- thing on `AbstractSessionModel` a third-party host cannot simply implement.
335
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
336
+
337
+ ### COLOR_SCHEMES
338
+
339
+ The named ramps a continuous colour scale's `scheme` takes, each one a stop
340
+ table in `colorRamp.ts` that every ramp baker reads, so no display can name a
341
+ scheme nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are
342
+ matplotlib's perceptual ramps, dark at the low end; `juicebox` fades from
343
+ transparent to red, as Juicebox paints contacts; `fall` runs white through
344
+ yellow and red to black, as HiGlass does; `reds` and `blues` are ColorBrewer's,
345
+ from white; `redblue` and `purpleorange` diverge through white, ColorBrewer's
346
+ RdBu and PuOr.
175
347
 
176
348
  ```js
177
349
  // type signature
178
- (node: IAnyStateTreeNode) => AssemblyHost
350
+ readonly[
351
+ ('viridis',
352
+ 'magma',
353
+ 'inferno',
354
+ 'cividis',
355
+ 'juicebox',
356
+ 'fall',
357
+ 'reds',
358
+ 'blues',
359
+ 'redblue',
360
+ 'purpleorange')
361
+ ]
179
362
  ```
180
363
 
181
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
182
-
183
- ### getConf
184
-
185
- Reads a configuration value from a state model that has a `.configuration`
186
- member (a track or display state model). For a raw configuration model, use
187
- `readConfObject` instead.
364
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorSchemes.ts)
188
365
 
189
- **This is exactly `readConfObject(model.configuration, path)`** — sugar for the
190
- `.configuration` hop, and nothing more. The two readers carry the same slot-name
191
- check, so reaching for the other one does not get a typo past tsc. It does not
192
- consult the session and has no per-slot behavior; what you read is what the
193
- track stores.
366
+ ### colorAt
194
367
 
195
- A `promotable` slot read this way therefore yields the raw stored value,
196
- `undefined` included — that `undefined` is the cascade's inherit sentinel, and
197
- `resolveConf` is what turns it into a real value. The read type keeps the
198
- `undefined` on purpose, so reaching for the wrong reader is a compile error
199
- rather than a silent one.
368
+ The packed colour instance `i` of `channels` paints: `color[i]`, or `color`
369
+ itself where the colour is a constant and so shipped as one number.
200
370
 
201
371
  ```js
202
372
  // type signature
203
- { (model: {…}): ModelSnapshotType<…>; <…>(model: {…}, slotPath: SLOT, args?: Record<…> | undefined): SLOT extends string ? ConfigurationSlotValue<…> : any; }
373
+ (channels: Pick<EncodedChannels, "color">, i: number) => number | undefined
204
374
  ```
205
375
 
206
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
376
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
377
+
378
+ ### ColorEncoding
207
379
 
208
- ### getConfigSnapshotWithPromotables
380
+ How a mark's `color` channel resolves. A CSS colour or a `jexl:` expression
381
+ returning one paints per feature with no scale; the object forms bind a field to
382
+ a scale, which a legend can describe, and share the config's member names.
209
383
 
210
- The display's full config snapshot with every `promotable` slot overwritten by
211
- its resolved value in place. For building a worker payload: a promotable slot
212
- serializes as its raw inherit sentinel (`undefined`, since they're all `maybe*`
213
- types), which the worker can't interpret — it has no session to resolve against.
214
- This hands it concrete values instead, with no per-slot bookkeeping, so adding a
215
- promotable worker-consumed slot needs no rpcProps change and can't silently ship
216
- a sentinel. Main-thread only (the cascade consults the session). Display-only
217
- promotable slots the worker never reads (e.g. displayMode) are still excluded by
218
- the caller — resolving them here is a harmless no-op since they're dropped
219
- anyway.
384
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
220
385
 
221
- The return type is branded (`ResolvedConfigSnapshot`) so a payload builder can
222
- demand a snapshot that has been through here. The assertion below is the one
223
- place the brand is applied, and it sits on the line after the resolve.
386
+ ### colorEvaluator
387
+
388
+ A CSS colour or `jexl:` colour expression as a per-feature packed ABGR — the
389
+ unscaled arm of ColorEncoding, on its own for a display that carries a plain
390
+ `color` slot.
224
391
 
225
392
  ```js
226
393
  // type signature
227
- (self: ResolvableDisplay) => ResolvedConfigSnapshot
394
+ (color: string, jexl: JexlInstance | undefined) => (feature: Feature) => number
228
395
  ```
229
396
 
230
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
397
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
231
398
 
232
- ### getContainingDisplay
399
+ ### colorRampStops
233
400
 
234
- Returns the display model that contains the given node. Throws if the node has
235
- no containing display.
401
+ The stops a continuous colour scale samples: `range`'s CSS colours where it
402
+ lists any, else the named `scheme`, viridis while that is unset, turned round
403
+ under `reverse`.
236
404
 
237
405
  ```js
238
406
  // type signature
239
- (node: IAnyStateTreeNode) => AbstractDisplayModel
407
+ ({ range, scheme, reverse, }: RampDeclaration) => readonly ColorRampStop[]
240
408
  ```
241
409
 
242
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
410
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
243
411
 
244
- ### getContainingTrack
412
+ ### ColorScaleTable
245
413
 
246
- Returns the track model that contains the given node. Throws if the node has no
247
- containing track.
414
+ The scale a colour channel was resolved through, as the legend reads it — the
415
+ same table the colours in the payload came from, so the key cannot disagree with
416
+ the painting.
248
417
 
249
- ```js
250
- // type signature
251
- (node: IAnyStateTreeNode) => AbstractTrackModel
252
- ```
418
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
253
419
 
254
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
420
+ ### ColorSchemeName
255
421
 
256
- ### getContainingView
422
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorSchemes.ts)
257
423
 
258
- Returns the view model that contains the given node. Throws if the node has no
259
- containing view.
424
+ ### Column
260
425
 
261
- ```js
262
- // type signature
263
- (node: IAnyStateTreeNode) => AbstractViewModel
264
- ```
426
+ A field's values over a table's rows, resolved once per step so the loop reading
427
+ it is chosen before the loop runs: a lane a step wrote, codes into labels, a
428
+ field read off the parser's own features, text or lists an adapter holds typed,
429
+ or a value a step computes per row. `at` is the row each of the table's rows
430
+ reads, where the lane or the features belong to a table this one stands on.
265
431
 
266
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
432
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
267
433
 
268
- ### getDialogHost
434
+ ### ColumnTable
269
435
 
270
- Where a display puts a dialog it cannot mount itself.
436
+ A table an adapter answers from the typed arrays it already holds, where
437
+ `getFeaturesArray` would make an object per row: a column per field, and each
438
+ row's id. A row's hover JSON is every field it holds.
271
439
 
272
440
  ```js
273
441
  // type signature
274
- (node: IAnyStateTreeNode) => DialogHost
442
+ typeof ColumnTable
275
443
  ```
276
444
 
277
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
445
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
278
446
 
279
- ### getDisplayTypeDefaultChanges
447
+ ### ConfigurationSchemaUnion
280
448
 
281
- Effective differences a track following the default inherits from session-wide
282
- defaults, one per promotable slot whose inherited value differs from its schema
283
- default. Drives the track-selector "affected by a session default" badge.
449
+ A list entry that is one of several configuration schemas, each keyed by the
450
+ `type` it answers to:
451
+ `types.array(ConfigurationSchemaUnion('Step', { filter, bin }))`. The keys are
452
+ the vocabulary, the snapshot's `type` picks the member, and a `type` naming no
453
+ member is refused in every build — where a bare `types.union` would load it as
454
+ its first member. Each member is an `explicitlyTyped`, `closed` schema named by
455
+ its key, so a key belonging to another member is refused rather than dropped;
456
+ one that is not throws here.
284
457
 
285
458
  ```js
286
459
  // type signature
287
- (self: ResolvableDisplay) => TrackConfigChange[]
460
+ <const MEMBERS extends Record<string, AnyConfigurationSchemaType>>(name: string, members: MEMBERS) => ConfigurationSchemaUnionType<MEMBERS>
288
461
  ```
289
462
 
290
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
463
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchemaUnion.ts)
291
464
 
292
- ### getEnv
465
+ ### continuousColorScale
293
466
 
294
- Returns the MST environment for a node, which carries the `pluginManager`.
467
+ A continuous colour scale over `extent`, the values it met: the domain its
468
+ declared ends and the extent make, the straight table its stops bake to and
469
+ where its middle stop sits, and the packed colour a value paints through them:
470
+ an infinity the end on its side, as a threshold places it, and NaN, text that is
471
+ no number, the misconfiguration grey. The encoder and every display painting a
472
+ ramp itself read it, so a value takes one colour whoever paints it.
295
473
 
296
474
  ```js
297
475
  // type signature
298
- (obj: IAnyStateTreeNode) => { pluginManager: PluginManager; }
476
+ (encoding: ContinuousRef, extent: readonly [number, number]) => { domain: [number, number]; lut: Uint8Array<ArrayBufferLike>; midNorm: number; colorOf: (value: number) => number; }
299
477
  ```
300
478
 
301
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
479
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
302
480
 
303
- ### getNotificationSink
481
+ ### ContinuousRef
304
482
 
305
- Where a display puts a message it cannot draw itself.
483
+ A numeric field read through a linear or log scale into a ramp. Each end of the
484
+ domain is pinned by `domainMin` or `domainMax`, or is the region's own extreme
485
+ where unset, so pinning both keeps colours consistent across a whole view. The
486
+ ramp is `range`'s CSS colours, evenly spaced, where it lists any, else the named
487
+ `scheme`; `reverse` turns it round.
306
488
 
307
- ```js
308
- // type signature
309
- (node: IAnyStateTreeNode) => NotificationSink
310
- ```
489
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
311
490
 
312
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
491
+ ### CoverageStep
313
492
 
314
- ### getPaletteHost
493
+ Replace the features with runs of constant depth: how many of them overlap each
494
+ stretch of the region, in a field `as` (`coverage` by default), with the
495
+ stretches nothing overlaps left out.
315
496
 
316
- The colors to draw with, and the args that rebuild them in a worker.
497
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
498
+
499
+ ### darkAtLowEnd
500
+
501
+ Whether a named ramp runs dark at its low end, drawn over white: viridis and its
502
+ siblings do, juicebox, fall, reds and blues do not.
317
503
 
318
504
  ```js
319
505
  // type signature
320
- (node: IAnyStateTreeNode) => PaletteHost
506
+ (scheme: "blues" | "cividis" | "fall" | "inferno" | "juicebox" | "magma" | "purpleorange" | "redblue" | "reds" | "viridis") => boolean
321
507
  ```
322
508
 
323
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
509
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
324
510
 
325
- ### getRenderingServices
511
+ ### DEFAULT_COLOR_SCHEME
326
512
 
327
- Everything a display needs of its host in order to draw a region: the
328
- assemblies, the RPC entry point and the colors.
513
+ The ramp a continuous scale samples while it names no `range` and no `scheme`,
514
+ so a declaration spelling it out and one leaving it unset resolve alike.
329
515
 
330
516
  ```js
331
517
  // type signature
332
- (node: IAnyStateTreeNode) => RenderingServices
518
+ ;'blues' |
519
+ 'cividis' |
520
+ 'fall' |
521
+ 'inferno' |
522
+ 'juicebox' |
523
+ 'magma' |
524
+ 'purpleorange' |
525
+ 'redblue' |
526
+ 'reds' |
527
+ 'viridis'
333
528
  ```
334
529
 
335
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
530
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorSchemes.ts)
336
531
 
337
- ### getRpcHost
532
+ ### EncodeContext
338
533
 
339
- The host's RPC entry point, for a module that issues RPCs and nothing else.
534
+ What surrounds an encode: the jexl instance a `jexl:` channel compiles against —
535
+ a caller whose channels are all readers or field names passes none — and a
536
+ progress reporter.
340
537
 
341
- ```js
342
- // type signature
343
- (node: IAnyStateTreeNode) => RpcHost
344
- ```
538
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
345
539
 
346
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
540
+ ### Encoded
347
541
 
348
- ### getSession
542
+ EncodedChannels with the lanes in `L` present — what `encodeFeatures` answers a
543
+ caller that named them.
349
544
 
350
- Returns the JBrowse session model for any node in the state tree. Throws if the
351
- node has no session ancestor.
545
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
352
546
 
353
- ```js
354
- // type signature
355
- (node: IAnyStateTreeNode) => AbstractSessionModel
356
- ```
547
+ ### EncodedChannels
357
548
 
358
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
549
+ One encoding's channels over one region's features, dense and index-aligned:
550
+ instance `i` of every array is the same feature, and `featureIndex[i]` says
551
+ which one of the input list it was, or it is absent where instance `i` is
552
+ feature `i` (featureIndexAt). A lane is present when the caller asked for it
553
+ (LaneName); Encoded is this type with a known lane set required.
359
554
 
360
- ### getSessionServices
555
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
361
556
 
362
- The services a session offers that cost nothing application-shaped to name.
363
- Prefer one of the narrower accessors below, which say which of them the calling
364
- module actually uses.
557
+ ### encodedChannelTransferables
558
+
559
+ The buffers an EncodedChannels owns, for `rpcResult`'s transfer list.
365
560
 
366
561
  ```js
367
562
  // type signature
368
- (node: IAnyStateTreeNode) => SessionServices
563
+ (c: EncodedChannels) => ArrayBufferLike[]
369
564
  ```
370
565
 
371
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
372
-
373
- ### getTrackConfigWithPromotables
566
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
374
567
 
375
- See TrackConfigWithPromotables.
568
+ ### EncodedLayersResult
376
569
 
377
- ```js
378
- // type signature
379
- (session: PromotedDefaultStore, trackConfig: ModelInstanceTypeProps<…> & {…} & IStateTreeNode<…>) => TrackConfigWithPromotables
380
- ```
570
+ What `CoreGetEncodedLayers` answers for one region: `layers[i]` is the request's
571
+ `layers[i]` over the region's features, so a display's mark list indexes
572
+ straight into it.
381
573
 
382
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
574
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
383
575
 
384
- ### hydrateTrackConfig
576
+ ### encodeFeatures
385
577
 
386
- Hydrate a plain track config into a live config node, dispatching on its `type`
387
- to find the schema. `session.tracks` holds `types.frozen` plain objects until
388
- something references a track (ADR-031), so a caller handed one of those has a
389
- config that reads nothing but what was literally authored: a slot at its schema
390
- default is absent, `preProcessSnapshot` has not run, and nothing that walks a
391
- live node — the promotable cascade above all — applies to it.
392
-
393
- For the callers that need the resolved answer rather than the authored one and
394
- cannot know which of the two they were handed. The About dialog's "Copy config"
395
- is the case this exists for: it is reached from two menus, and one of them
396
- passes a `session.tracks` entry.
578
+ Evaluate one encoding over a feature list into dense channel arrays for the
579
+ lanes named, the scale table each scaled channel came from, the `y` extremes and
580
+ — when `index` is among the lanes — a hit index.
397
581
 
398
- Returns **undefined** rather than throwing when the config names a track type no
399
- plugin registered, or when it is invalid enough that `create` rejects it — an
400
- un-hydrated config has never been validated, so a dialog that opens over it must
401
- not be the thing that discovers this. Callers fall back to treating it as the
402
- plain object it is.
582
+ A feature whose `x`, `x2` or (declared and asked-for) `y` is not finite is
583
+ skipped and counted in `skipped`, so every array stays index-aligned with the
584
+ Flatbush. Pure: the RPC around it owns the adapter, the filters and the
585
+ transferables.
403
586
 
404
- Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating the
405
- same entry twice returns the same node and a track that gets opened later reuses
406
- it.
587
+ Columnar: one pass admits the rows over `x`, `x2` and `y` alone, and none runs
588
+ where all three are lanes of whole numbers; every other lane is then filled in
589
+ its own loop over the admitted rows, a lane straight off a typed column and a
590
+ categorical over a `category` column per label.
407
591
 
408
592
  ```js
409
593
  // type signature
410
- (pluginManager: PluginManager, config: Record<string, unknown>) => (ModelInstanceTypeProps<Record<string, any>> & { ...; } & IStateTreeNode<...>) | undefined
594
+ <L extends LaneName>(input: readonly Feature[] | FeatureTable, encoding: MarkEncodingInput, lanes: readonly L[], ctx?: EncodeContext) => Encoded<L>
411
595
  ```
412
596
 
413
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchema.ts)
597
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
414
598
 
415
- ### isSlotCustomized
599
+ ### FacetedLayer
416
600
 
417
- Whether this track has customized the slot (holds a non-default value of its
418
- own) rather than following the display type's default. The correct "reset to
419
- default" predicate for a promotable slot: comparing the resolved value to the
420
- base instead reads as at-default for a track merely _following_ a non-base
421
- promoted default, so the reset control lights up on a no-op.
601
+ One layer of a faceted request: its rows in section order, and the stacked row
602
+ of each, index for index.
422
603
 
423
- `SLOT` is constrained the way `getConf`'s is. A pin or a reset over a slot name
424
- the schema does not declare is inert and silent — `resolveSlot` answers about
425
- nothing, so the control draws outline forever — and a widened `self` switches
426
- the check off (`HostChecksSlotNames`).
604
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
605
+
606
+ ### facetLayers
607
+
608
+ A faceted request's layers: the rows split on the facet's field, the facet's own
609
+ steps and then each layer's run over each section alone, and the sections
610
+ stacked — a section's rows start where the one above it ends, and it is as tall
611
+ as the tallest layer packed it. Every layer's rows come back in section order
612
+ beside their stacked rows, so a faceted display is the unfaceted one drawn once
613
+ per section, and a row is handed on as its steps left it. A layer naming no
614
+ `row` field stands on each section's first row, the answer the unfaceted encoder
615
+ gives it.
616
+
617
+ The split is a counting sort into section order rather than a list per section:
618
+ every step runs once over the ordered rows, keeping section order, and one that
619
+ groups rows groups within a section.
427
620
 
428
621
  ```js
429
622
  // type signature
430
- <CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(self: ResolvableDisplay<CONFMODEL>, slot: SLOT) => boolean
623
+ (input: readonly Feature[] | FeatureTable, facet: FacetSpec, layers: readonly {…}[], jexl?: JexlInstance | undefined) => { ...; }
431
624
  ```
432
625
 
433
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
626
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
627
+
628
+ ### FacetSection
434
629
 
435
- ### makePin
630
+ One faceted section as the worker stacked it: its key, the row it starts on and
631
+ how many rows it holds.
436
632
 
437
- The pin for one promotable slot: "apply this value to every open track of this
438
- display type", and — via the snackbar it raises — "keep it as the default for
439
- the ones opened later".
633
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
440
634
 
441
- `value` chooses between the subsystem's two meanings, which are otherwise
442
- identical:
635
+ ### FacetSpec
443
636
 
444
- - **Give it** for a per-value pin — "make _arcs_ the default" — independent of
445
- what the track currently shows. Use on an always-visible pin so it can never
446
- promote a meaningless value, and so two rows sharing one slot (arcs `'arc'` vs
447
- read cloud `'cloud'`; sashimi `'down'` vs `'auto'`) stay independent.
448
- - **Omit it** for "whatever I'm showing", resolved through the cascade. Use for
449
- a symmetric or continuous setting where no fixed on-value makes sense (wiggle
450
- point size, arc line width, `mismatchAlpha`).
637
+ A row facet: split the features on `field`'s value, run `transform` and then
638
+ every layer's own steps over each section alone, and stack the sections, each
639
+ starting on the row after the one above it ends.
451
640
 
452
- One function with an optional argument, rather than the two exported builders it
453
- replaces — a per-value one and a `…CurrentValue…` one, the second of which was
454
- exactly the first applied to `resolveSlot(self, slot).value`. The pair was one
455
- function plus a doc section explaining which name to reach for; omitting the
456
- argument now says what the longer name said.
641
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
642
+
643
+ ### featureIndexAt
644
+
645
+ The input feature instance `i` of `channels` was: `featureIndex[i]`, or `i`
646
+ itself where the encoder skipped none and so shipped no index.
457
647
 
458
648
  ```js
459
649
  // type signature
460
- <CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<…>>(self: ResolvableDisplay<CONFMODEL>, slot: SLOT, ...value: [] | [...]) => Pin
650
+ (channels: Pick<EncodedChannels, "featureIndex">, i: number) => number
461
651
  ```
462
652
 
463
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
653
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
464
654
 
465
- ### openPromotableDisplays
655
+ ### FeatureTable
466
656
 
467
- Every display on an open track, across all open views — the reach of anything
468
- that acts on "the tracks the user is looking at": a promoted default's "apply to
469
- open tracks", and the share/export bake. One walk so those can't drift apart.
657
+ The rows one step of a mark's declaration hands the next: a column per field and
658
+ a view of one row as a `Feature`, for a `jexl:` expression, a channel reader and
659
+ the hover.
470
660
 
471
- Recurses into composite views. A display nested in one resolves the cascade like
472
- any other but was invisible to both callers, so the share/export bake didn't
473
- bake its inherited values and a shared session containing a breakpoint-split or
474
- synteny view rendered differently for the recipient. `LGVSyntenyDisplay` is only
475
- ever reached through this branch, so don't flatten the recursion away.
476
- `hasChildViews` names the one composite shape it does not cover.
661
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
477
662
 
478
- A view holding neither (e.g. spreadsheet) drops out via the structural guards. A
479
- view whose displays declare no promotable slot (e.g. dotplot, which does hold
480
- tracks) is walked and contributes nothing — harmless, and cheaper than asking
481
- each display whether it has anything to promote.
663
+ ### fieldReader
664
+
665
+ What a channel reads off a feature: a field by name, a dotted path into a
666
+ structured field where no field carries the whole name (`INFO.SVTYPE` on a VCF
667
+ record), or a `jexl:` expression over `feature`. A jexl expression that does not
668
+ compile throws here, once, rather than on every feature.
482
669
 
483
670
  ```js
484
671
  // type signature
485
- (session: AbstractSessionModel) => ResolvableDisplay[]
672
+ (ref: string, jexl: JexlInstance | undefined) => (feature: Feature) => unknown
486
673
  ```
487
674
 
488
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/openDisplays.ts)
489
-
490
- ### Pin
675
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/fieldReader.ts)
491
676
 
492
- The "apply this to every open track of this type" affordance on a menu row — the
493
- trailing `PushPin`, bundled so the row consumes it as one prop. Built by
494
- makePin.
677
+ ### FieldRef
495
678
 
496
- `active` = this value is currently the session default (a filled pin), which is
497
- the state, not the click. `toggle` **applies the value to every open track of
498
- the display type** and raises a snackbar whose one action promotes it to the
499
- display type's default; on an already-promoted value it clears that default
500
- instead, touching no track (see `applyPinClick`).
679
+ Where a channel's value comes from: a feature field name, read natively
680
+ (`feature.get(name)`), or a `jexl:` expression over `feature` — the opt-in
681
+ escape, measured at 1.5x to 2.0x native per feature (MARK_ENCODING.md "The jexl
682
+ channel, measured").
501
683
 
502
- **`toggle` rather than an `apply`/`clear` pair**, which was tried and dropped:
503
- the sole renderer is a MUI `ToggleButton` whose `onChange` means exactly "flip",
504
- so splitting it adds a member _and_ a branch at the one call site that never
505
- needed one. `active` is already public for a caller that wants to state a
506
- direction. (The house preference for explicit setters over toggles is about MST
507
- actions, where a toggle destroys the ability to set a known state; nothing here
508
- stores a value.)
684
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
509
685
 
510
- Lives here, alone and with no imports, rather than beside `makePin` in
511
- `promotableDefaults.ts`: the menu types describe a pin without building one, and
512
- `MenuTypes.ts` taking this one interface from that module gave a React-free type
513
- file a type closure of 374 files. See
514
- `agent-docs/ideas/barrels-block-extraction.md` and `scripts/moduleClosure.ts`.
686
+ ### FilterStep
515
687
 
516
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotablePin.ts)
688
+ Keep the features a `jexl:` expression over `feature` admits.
517
689
 
518
- ### readConfObject
519
-
520
- Given a configuration model (an instance of a ConfigurationSchema), read the
521
- configuration value at the given path. Use this when you hold the configuration
522
- model directly, e.g. an entry from `session.tracks`.
690
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
523
691
 
524
- Wants a **live config node**, not a snapshot of one, and passing a snapshot is a
525
- type error. Slots are built with `types.stripDefault`, so a slot sitting at its
526
- default is absent from a snapshot — "unset" and "at its default" are
527
- indistinguishable there, and a read off one reports a default as missing.
692
+ ### finiteExtremes
528
693
 
529
- That is enforced in the types only, deliberately: it can't be a runtime check.
530
- `generateHierarchy` reads slots straight off the **un-hydrated frozen** entries
531
- of `jbrowse.tracks` on purpose, because hydrating every track to answer the
532
- track selector is what `types.frozen` exists to avoid — and those reads are
533
- indistinguishable at runtime from the broken spelling.
694
+ The least and greatest finite values of `values[0, count)`,
695
+ `[Infinity, -Infinity]` where none is finite.
534
696
 
535
697
  ```js
536
698
  // type signature
537
- {…}
699
+ (values: ArrayLike<number>, count: number) => [number, number]
538
700
  ```
539
701
 
540
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
541
-
542
- ### readConfSlot
702
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
543
703
 
544
- Read a single config slot from a config that may be **either** a live MST node
545
- or a plain snapshot object, evaluating the value if it is a `jexl:` expression.
546
- For the dialogs and panels that are handed a track config without knowing which
547
- of the two they got. An About panel gets a hydrated track config from the
548
- session and a bare object from an embedded caller.
704
+ ### FlattenStep
549
705
 
550
- Reach for `readConfObject` or `readConfigValue` when the shape is known: this
551
- one decides at runtime, and the plain branch inherits the snapshot caveat (a
552
- slot at its default is absent from a snapshot, so it reads `undefined`).
706
+ Fan each feature out into one feature per element of an array-valued field —
707
+ `subfeatures`, so a gene answers its transcripts and a transcript its exons — or
708
+ per entry of a record keyed by name, so a VCF record answers one feature per
709
+ sample and a MAF block one per species, each with its key in `key`. Each answer
710
+ reads the element's own fields first and the feature it came from for everything
711
+ else, so an exon still knows its gene's name and strand and a species row its
712
+ block's reference span. A feature whose field holds no array and no record drops
713
+ out unless `keepEmpty` says otherwise.
553
714
 
554
- ```js
555
- // type signature
556
- <…>(config: Record<…> | (ModelInstanceTypeProps<…> & {…} & IStateTreeNode<…>), slotPath: string | string[], args?: Record<…>, jexl?: JexlInstance | undefined) => T
557
- ```
715
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
558
716
 
559
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
717
+ ### FormulaStep
560
718
 
561
- ### relight
719
+ Write a `jexl:` expression's value over `feature` into the field `as` of every
720
+ feature.
562
721
 
563
- Move a color's OKLCH lightness by `lightnessShift` and scale its chroma, holding
564
- its hue.
722
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
565
723
 
566
- For extending a categorical palette past its length. Cycling a nine-color list
567
- over a 24-chromosome karyotype repeats the color outright; cycling it with a
568
- lightness shift per lap gives the hue back as a variant still told apart from
569
- the original — tab20's construction, which pairs a light and a dark of each hue.
724
+ ### getAssemblyHost
570
725
 
571
- SHIFT rather than a fixed lightness, and SCALE rather than a fixed chroma,
572
- because a categorical palette is uneven on purpose: category10's brown and its
573
- red are 5 degrees apart in hue and are told apart by chroma alone, so
574
- re-lighting both to one (lightness, chroma) makes them the same color. Keeping
575
- each color's own relative chroma keeps brown reading as brown.
726
+ The host's assembly manager, for a module that resolves names and nothing else.
576
727
 
577
- In OKLCH rather than through `lighten`/`darken`, which work in sRGB, where the
578
- same coefficient moves a yellow and a blue by visibly different amounts: a lap
579
- has to read as one tone across the whole palette or it reads as noise.
728
+ Unlike the accessors in `sessionServices.ts` this one buys the caller no smaller
729
+ type graph — an `AssemblyManager` is an MST model a `PluginManager` built, so
730
+ naming it costs what naming a session costs. It is here to say which service is
731
+ wanted, and because that cost is the finding: the assembly manager is the one
732
+ thing on `AbstractSessionModel` a third-party host cannot simply implement.
580
733
 
581
734
  ```js
582
735
  // type signature
583
- (color: string, lightnessShift: number, chromaScale?: number) => string
736
+ (node: IAnyStateTreeNode) => AssemblyHost
584
737
  ```
585
738
 
586
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/color/index.ts)
739
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
587
740
 
588
- ### reservedPx
741
+ ### getBreakendMateLocString
589
742
 
590
- The pixels a band takes from the plot below it: 0 when off, the (optionally
591
- bound) stated height when on. This is the single spelling of "off spends 0 px".
743
+ The mate locString ("chr2:100") of a parsed breakend, or undefined when it names
744
+ no navigable position. Two ALT forms reach here without one: a single breakend
745
+ (`.A` / `G.`) has no mate at all, and the symbolic-mate forms (`G<DEL>`,
746
+ `<DEL>G`) get a placeholder `<DEL>:1` from parseBreakend, which puts a symbolic
747
+ allele id where a contig name belongs. Callers that navigate or split-view a
748
+ mate must drop both rather than treat `<DEL>` as a refName.
592
749
 
593
750
  ```js
594
751
  // type signature
595
- (band: Band) => number
752
+ (breakend?: Breakend | undefined) => string | undefined
596
753
  ```
597
754
 
598
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandLayout.ts)
599
-
600
- ### resolveConf
601
-
602
- Reads a `promotable` slot through the display-type-default cascade — the track's
603
- own value, else the session-wide promoted default for this display type, else
604
- the slot's `promotedBase`. Always yields a real value, never the `undefined`
605
- inherit sentinel, so a display's value getter is
606
- `get displayMode(): DisplayMode { return resolveConf(self, 'displayMode') }`
607
- with no post-guard and no cast.
755
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
608
756
 
609
- Separate from `getConf` rather than folded into it, deliberately: resolution
610
- consults the session, so it is main-thread only and throws on a detached node.
611
- Folding it in was built and reverted — ADR-046.
757
+ ### getConf
612
758
 
613
- Throws if `slot` isn't promotable — the cascade has nothing to say about a plain
614
- slot, and `getConf` is what you want there.
759
+ Reads a configuration value from a state model that has a `.configuration`
760
+ member (a track or display state model). For a raw configuration model, use
761
+ `readConfObject` instead.
615
762
 
616
- Takes no jexl `args`, unlike `getConf`: a promotable slot cannot hold a callback
617
- (see `SlotResolution`), so there is no per-feature context to supply.
763
+ **This is exactly `readConfObject(model.configuration, path)`** — sugar for the
764
+ `.configuration` hop, and nothing more. The two readers carry the same slot-name
765
+ check, so reaching for the other one does not get a typo past tsc. It does not
766
+ consult the session and has no per-slot behavior; what you read is what the
767
+ track stores.
618
768
 
619
769
  ```js
620
770
  // type signature
621
- <…>(model: ResolvableDisplay<...>, slot: SLOT) => ConfigurationSlotValueResolved<...>
771
+ {…}
622
772
  ```
623
773
 
624
774
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
625
775
 
626
- ### ResolvedConfigSnapshot
776
+ ### getContainingDisplay
627
777
 
628
- A display config snapshot whose promotable slots hold RESOLVED values rather
629
- than the inherit sentinel — what a worker payload has to be built from.
778
+ Returns the display model that contains the given node. Throws if the node has
779
+ no containing display.
630
780
 
631
- The brand is required and unforgeable, so a plain `Record<string, unknown>` is
632
- not assignable to it and neither is `getSnapshot(self.configuration)`. That is
633
- the whole point. Everything downstream of the resolve is an ERASED container — a
634
- snapshot is `Record<string, unknown>`, and the payload it becomes is an
635
- `as`-asserted interface — so a payload builder handed the RAW snapshot instead
636
- typechecks, ships `undefined` for every promotable slot, and types it as the
637
- resolved value. That was measured, not supposed: the raw spelling in
638
- `LinearBasicDisplay`'s `rpcProps()` passed `pnpm typecheck` and every suite in
639
- `plugins/canvas`, `packages/core/src/configuration` and `products/jbrowse-web`,
640
- while sending the worker `undefined` for chevrons, subfeature labels and feature
641
- height.
781
+ ```js
782
+ // type signature
783
+ (node: IAnyStateTreeNode) => AbstractDisplayModel
784
+ ```
642
785
 
643
- The rest of this subsystem's guarantees are carried by types that stay connected
644
- to the schema: a raw read of a promotable `maybe*` slot is `T | undefined` (see
645
- `ConfigurationSlotValue`), so `getConf` where `resolveConf` was meant is a
646
- compile error at any typed consumer. The brand is that guarantee re-established
647
- at the point where the connection is cut.
786
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
648
787
 
649
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
788
+ ### getContainingTrack
789
+
790
+ Returns the track model that contains the given node. Throws if the node has no
791
+ containing track.
792
+
793
+ ```js
794
+ // type signature
795
+ (node: IAnyStateTreeNode) => AbstractTrackModel
796
+ ```
797
+
798
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
799
+
800
+ ### getContainingView
801
+
802
+ Returns the view model that contains the given node. Throws if the node has no
803
+ containing view.
804
+
805
+ ```js
806
+ // type signature
807
+ (node: IAnyStateTreeNode) => AbstractViewModel
808
+ ```
809
+
810
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
811
+
812
+ ### getDialogHost
813
+
814
+ Where a display puts a dialog it cannot mount itself.
815
+
816
+ ```js
817
+ // type signature
818
+ (node: IAnyStateTreeNode) => DialogHost
819
+ ```
820
+
821
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
822
+
823
+ ### getEnv
824
+
825
+ Returns the MST environment for a node, which carries the `pluginManager`.
826
+
827
+ ```js
828
+ // type signature
829
+ (obj: IAnyStateTreeNode) => { pluginManager: PluginManager; }
830
+ ```
831
+
832
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
833
+
834
+ ### getNotificationSink
835
+
836
+ Where a display puts a message it cannot draw itself.
837
+
838
+ ```js
839
+ // type signature
840
+ (node: IAnyStateTreeNode) => NotificationSink
841
+ ```
842
+
843
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
844
+
845
+ ### getPaletteHost
846
+
847
+ The colors to draw with, and the args that rebuild them in a worker.
848
+
849
+ ```js
850
+ // type signature
851
+ (node: IAnyStateTreeNode) => PaletteHost
852
+ ```
853
+
854
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
855
+
856
+ ### getRenderingServices
857
+
858
+ Everything a display needs of its host in order to draw a region: the
859
+ assemblies, the RPC entry point and the colors.
860
+
861
+ ```js
862
+ // type signature
863
+ (node: IAnyStateTreeNode) => RenderingServices
864
+ ```
865
+
866
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
867
+
868
+ ### getRpcHost
869
+
870
+ The host's RPC entry point, for a module that issues RPCs and nothing else.
871
+
872
+ ```js
873
+ // type signature
874
+ (node: IAnyStateTreeNode) => RpcHost
875
+ ```
876
+
877
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
878
+
879
+ ### getSession
880
+
881
+ Returns the JBrowse session model for any node in the state tree. Throws if the
882
+ node has no session ancestor.
883
+
884
+ ```js
885
+ // type signature
886
+ (node: IAnyStateTreeNode) => AbstractSessionModel
887
+ ```
888
+
889
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
890
+
891
+ ### getSessionServices
892
+
893
+ The services a session offers that cost nothing application-shaped to name.
894
+ Prefer one of the narrower accessors below, which say which of them the calling
895
+ module actually uses.
896
+
897
+ ```js
898
+ // type signature
899
+ (node: IAnyStateTreeNode) => SessionServices
900
+ ```
901
+
902
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
903
+
904
+ ### HitIndexed
905
+
906
+ An encoded payload as a display stores it: the hit index the worker built with
907
+ hitIndexOf, wrapped once where the payload lands.
908
+
909
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
910
+
911
+ ### hitIndexOf
912
+
913
+ The hit index over `count` instances: each a box from `x` to `x2` at its `y`, or
914
+ at 0 for a mark with no value.
915
+
916
+ ```js
917
+ // type signature
918
+ (x: Uint32Array<ArrayBufferLike>, x2: Uint32Array<ArrayBufferLike>, y: Float32Array<ArrayBufferLike> | undefined, count?: number) => Flatbush
919
+ ```
920
+
921
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
922
+
923
+ ### hydrateTrackConfig
924
+
925
+ Hydrate a plain track config into a live config node, dispatching on its `type`
926
+ to find the schema. `session.tracks` holds `types.frozen` plain objects until
927
+ something references a track (ADR-031). One of those holds only what was
928
+ literally authored: a slot at its schema default is absent, `preProcessSnapshot`
929
+ has not run, and nothing that walks a live node applies to it.
930
+
931
+ Use it where a caller needs the resolved config and may be handed either form.
932
+ The About dialog's "Copy config" is reached from two menus, and one of them
933
+ passes a `session.tracks` entry.
934
+
935
+ Returns **undefined** when the config names a track type no plugin registered,
936
+ or when `create` rejects it as invalid. An un-hydrated config has never been
937
+ validated, so the dialog opening over it should not throw. Callers fall back to
938
+ using the plain object.
939
+
940
+ Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating the
941
+ same entry twice returns the same node, and in an admin session a track opened
942
+ later resolves to that same node. A non-admin's open track resolves to the
943
+ session's private working copy (ADR-032), and this function returns the pristine
944
+ mirror beside it. The two have the same content; `CopyConfigEntryPoints.test.ts`
945
+ tests both cases.
946
+
947
+ ```js
948
+ // type signature
949
+ (pluginManager: PluginManager, config: Record<string, unknown>) => AnyConfigurationModel | undefined
950
+ ```
951
+
952
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchema.ts)
953
+
954
+ ### isBreakend
955
+
956
+ Breakend notation, without parsing it: bracket forms (`G[chr2:100[`), single
957
+ breakends (`.A` / `G.`), and the symbolic-mate form (`G<DEL>`, an angle bracket
958
+ past position 0; a leading `<` is a plain symbolic allele).
959
+
960
+ ```js
961
+ // type signature
962
+ (alt: string) => boolean
963
+ ```
964
+
965
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
966
+
967
+ ### isMissing
968
+
969
+ Whether a field holds no value at all, as against text that fails to parse:
970
+ absent, empty, or a VCF's `AF=.`, which arrives as `[undefined]`.
971
+
972
+ ```js
973
+ // type signature
974
+ (value: unknown) => boolean
975
+ ```
976
+
977
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
978
+
979
+ ### isPlainFieldRef
980
+
981
+ Whether a field ref is a bare name: what `feature.get` answers on its own, with
982
+ no path to walk and no expression to evaluate. A loop over a plain name keeps
983
+ the direct call, and only a config that writes a path pays for one.
984
+
985
+ ```js
986
+ // type signature
987
+ (ref: string) => ref is never
988
+ ```
989
+
990
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/fieldReader.ts)
991
+
992
+ ### junctionEnds
993
+
994
+ Where a paired record's junction is at each of its two ends, and which side of
995
+ it each end keeps — the one answer every launcher, the row menu and the chain
996
+ walk take, whether the record is a VCF breakend, a symbolic SV or a paired
997
+ adapter's row (BEDPE, STAR-Fusion). Refnames are as the record spells them.
998
+ `undefined` for a record naming no other end. A VCF record is read through
999
+ `alt`, its first ALT unless the caller names another.
1000
+
1001
+ A VCF end is its own position. A paired adapter's end is a block, and the
1002
+ junction is the block's edge on the side the end keeps: stated by
1003
+ `mateDirection` where the adapter knows it, read off the strands where the
1004
+ record states one for each end as BEDPE does, and with neither the two blocks
1005
+ face each other. A PAF row's strand is the query's orientation and states none
1006
+ for the target, so it names no side.
1007
+
1008
+ ```js
1009
+ // type signature
1010
+ (feature: Feature, alt?: string | undefined, alleleIndex?: number | undefined) => { own: JunctionEnd; mate: JunctionEnd; } | undefined
1011
+ ```
1012
+
1013
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1014
+
1015
+ ### keyNames
1016
+
1017
+ What a key names each of `keys`, from a colour object's `labels`: one each in
1018
+ order, an empty or missing entry leaving that key its own name. Every key that
1019
+ takes `labels` reads them through this, so a config means one thing by them
1020
+ everywhere.
1021
+
1022
+ ```js
1023
+ // type signature
1024
+ (keys: readonly unknown[], labels?: readonly string[]) => ReadonlyMap<string, string>
1025
+ ```
1026
+
1027
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
1028
+
1029
+ ### LaneName
1030
+
1031
+ The lanes a caller asks the encoder to fill, beyond `x` and `x2`, which every
1032
+ payload carries, and `featureIndex`, which one carries where a feature was
1033
+ skipped: a mark's channels, and `index` for the Flatbush a hover reads. A lane
1034
+ not asked for is neither allocated nor transferred, and a caller that never
1035
+ hovers declines the index, which is most of the encoder's cost after the walk.
1036
+
1037
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1038
+
1039
+ ### launchOrReplaceView
1040
+
1041
+ `addOrReplaceView` for view types whose state model may be lazily loaded; the
1042
+ synchronous `addOrReplaceView` requires it loaded already.
1043
+
1044
+ ```js
1045
+ // type signature
1046
+ (args: { session: AbstractViewContainer; typeName: string; initialState?: Record<string, unknown> | undefined; replacing?: AbstractViewModel | undefined; }) => Promise<...>
1047
+ ```
1048
+
1049
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
1050
+
1051
+ ### LayerRequest
1052
+
1053
+ One layer of a `CoreGetEncodedLayers` request: the encoding to evaluate and the
1054
+ lanes the display's mark reads.
1055
+
1056
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1057
+
1058
+ ### layerTables
1059
+
1060
+ A layered request's rows: the shared steps, the facet's split where it names
1061
+ one, and each layer's own steps, with the row each layer's rows stand in — the
1062
+ field it names, or under a facet each row's stacked row. The split comes as
1063
+ early as it can: after the last shared step that must see every row, so the
1064
+ steps that follow it read the rows already in section order.
1065
+
1066
+ ```js
1067
+ // type signature
1068
+ (input: readonly Feature[] | FeatureTable, request: {…}, jexl?: JexlInstance | undefined) => { ...; }
1069
+ ```
1070
+
1071
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
1072
+
1073
+ ### liftPlot
1074
+
1075
+ A draft as the display's config would hold it, through the schema's own lift and
1076
+ checks: a shorthand becomes its object, a default falls off, and what a config
1077
+ file is refused for throws, a key outside the plot included. The node is never
1078
+ attached, so nothing on the display is touched; a display reads its typed
1079
+ members off it. The draft is copied first, since MST freezes what it creates
1080
+ from.
1081
+
1082
+ ```js
1083
+ // type signature
1084
+ (conf: AnyConfigurationModel, draft: Plot) => AnyConfigurationModel
1085
+ ```
1086
+
1087
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1088
+
1089
+ ### ListColumn
1090
+
1091
+ A list of rows per row: row `i`'s entries are the rows of `entries` from
1092
+ `start[i]` up to `start[i + 1]`, and `keys`, where the list is a record keyed by
1093
+ name, the name of each entry.
1094
+
1095
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1096
+
1097
+ ### ListedRowSource
1098
+
1099
+ One row an adapter lists: `name` is a value of the listing's field, and `label`
1100
+ and `color` are what the adapter names and colours that row with.
1101
+
1102
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/rowSources.ts)
1103
+
1104
+ ### listsRowSources
1105
+
1106
+ Whether an adapter implements RowSourceLister.
1107
+
1108
+ ```js
1109
+ // type signature
1110
+ (adapter: object) => adapter is RowSourceLister
1111
+ ```
1112
+
1113
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/rowSources.ts)
1114
+
1115
+ ### LocusRef
1116
+
1117
+ A position that may lie on another sequence: the field holding its refName and
1118
+ the field holding its 0-based coordinate, as a paired record states its mate
1119
+ (`{ chrom: 'mate.refName', pos: 'mate.start' }`). Spelt the way GenomeSpy spells
1120
+ a genomic position over two columns.
1121
+
1122
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1123
+
1124
+ ### MadeRows
1125
+
1126
+ A table whose rows a step made, which answers each row's identity, its hover
1127
+ JSON and the feature it hangs from.
1128
+
1129
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1130
+
1131
+ ### MarkEncoding
1132
+
1133
+ The declared mapping from a feature's fields to a mark's channels. Every
1134
+ positional channel is a field: `x` defaults to `start` and `x2` to `end`, a mark
1135
+ that plots no value leaves `y` off, and the scale `y` is read through belongs to
1136
+ the display rather than to the encoding. `shape` is read by the `point` mark
1137
+ alone, `row` — an integer field, 0 where missing — by every mark, which stands a
1138
+ feature in the band it names.
1139
+
1140
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1141
+
1142
+ ### MarkEncodingInput
1143
+
1144
+ What `encodeFeatures` takes: a MarkEncoding, any channel of which may be a
1145
+ ChannelReader in place of its declared form, and `row` the values themselves,
1146
+ one per input feature, where the caller computed them — a facet's stacked rows.
1147
+ The declared form is what crosses the wire; a reader or a value list is built in
1148
+ the worker.
1149
+
1150
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
1151
+
1152
+ ### matedBy
1153
+
1154
+ How a record states its other end, or undefined where it states none: the `mate`
1155
+ a paired adapter fills (BEDPE, STAR-Fusion), an `ALT` the breakend and
1156
+ symbolic-SV readers resolve, or a read's `next_ref` and `next_pos`. The `mate`
1157
+ step admits exactly the features this names one for, so a caller deciding
1158
+ whether links are the picture a track wants asks here rather than re-reading the
1159
+ fields.
1160
+
1161
+ ```js
1162
+ // type signature
1163
+ (f: Feature) => "alt" | "mate" | "pair" | undefined
1164
+ ```
1165
+
1166
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
1167
+
1168
+ ### MateStep
1169
+
1170
+ One feature per other end a record states: the `mate` a paired adapter fills in
1171
+ (BEDPE, STAR-Fusion), or each VCF `ALT` naming a locus, a breakend's mate or a
1172
+ symbolic allele's `END` on `CHR2` or its own sequence. Each answer carries
1173
+ `mate` (`refName`, `start`, `end`, 0-based and half-open, and the far end's
1174
+ `mateDirection`), its own end's `mateDirection`, the `alt` it came from and
1175
+ `svType`, the structural class the allele states (`svClassOfAlt`). A record
1176
+ naming no other end drops out, and two records or alleles stating one pair of
1177
+ ends answer once.
1178
+
1179
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1180
+
1181
+ ### MISCONFIGURED_ABGR
1182
+
1183
+ The misconfiguration grey packed as the encoder paints it: a `jexl:` colour that
1184
+ answered no string, a ramp value that is no number, text a threshold cannot
1185
+ read.
1186
+
1187
+ ```js
1188
+ // type signature
1189
+ number
1190
+ ```
1191
+
1192
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
1193
+
1194
+ ### NO_VALUE_ABGR
1195
+
1196
+ The no-value grey packed as the encoder paints it: a feature with nothing in the
1197
+ field a threshold reads.
1198
+
1199
+ ```js
1200
+ // type signature
1201
+ number
1202
+ ```
1203
+
1204
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
1205
+
1206
+ ### NO_VALUE_LABEL
1207
+
1208
+ The row a feature with nothing in a categorical field lands on, so a key says
1209
+ why a mark is grey rather than listing a blank value.
1210
+
1211
+ ```js
1212
+ // type signature
1213
+ '(no value)'
1214
+ ```
1215
+
1216
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
1217
+
1218
+ ### NOT_A_NUMBER_LABEL
1219
+
1220
+ The key a value holding text that is no number files under on a threshold scale,
1221
+ painted the misconfiguration grey rather than passing for a missing value.
1222
+
1223
+ ```js
1224
+ // type signature
1225
+ '(not a number)'
1226
+ ```
1227
+
1228
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1229
+
1230
+ ### NumberLane
1231
+
1232
+ A typed lane a step wrote, one number per row.
1233
+
1234
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1235
+
1236
+ ### numberReaderOf
1237
+
1238
+ readerOf as the number a quantitative channel or step reads, `NaN` where a row
1239
+ holds none, by `numericValue`'s rules.
1240
+
1241
+ ```js
1242
+ // type signature
1243
+ (column: Column) => (i: number) => number
1244
+ ```
1245
+
1246
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1247
+
1248
+ ### numericDomain
1249
+
1250
+ A domain written as strings — the shared `domain` slot is a `stringArray` — read
1251
+ back as the numbers it names. A member that is not a number reads NaN, which
1252
+ every comparison against it declines.
1253
+
1254
+ ```js
1255
+ // type signature
1256
+ (domain: readonly (string | number)[]) => number[]
1257
+ ```
1258
+
1259
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1260
+
1261
+ ### parsePlot
1262
+
1263
+ The text as a plot, refusing a key the display's plot does not hold. The schema
1264
+ is the parser past this point.
1265
+
1266
+ ```js
1267
+ // type signature
1268
+ (text: string, keys: readonly string[]) => Plot
1269
+ ```
1270
+
1271
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1272
+
1273
+ ### parseSvAlt
1274
+
1275
+ Parse raw (non-assembly-resolved) mate coordinates from a VCF SV feature+alt.
1276
+ Returns undefined when no mate coordinate info is found. `alleleIndex` is the
1277
+ alt's place in `ALT`, which a record repeating one symbolic allele with several
1278
+ lengths needs; it defaults to the first place `alt` appears.
1279
+
1280
+ ```js
1281
+ // type signature
1282
+ (feature: Feature, alt?: string | undefined, alleleIndex?: number) => {…} | undefined
1283
+ ```
1284
+
1285
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1286
+
1287
+ ### PileupStep
1288
+
1289
+ Assign every feature the lowest row on which it overlaps nothing already there —
1290
+ greedy first fit in start order, the packing a pileup is — and write it to the
1291
+ field `as` (`row`). `fields` names the interval read (`start`, `end`); `padding`
1292
+ is bp of clearance kept between two features sharing a row. The answer is the
1293
+ input in start order, so a `span` encoding `row` stacks it. Under a facet it
1294
+ packs each section on its own.
1295
+
1296
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1297
+
1298
+ ### Plot
1299
+
1300
+ A display's plot settings as written: a key left out is left alone, and `null`
1301
+ resets that setting. Untyped, since a value may be a shorthand the schema lifts,
1302
+ and the schema is what judges it.
1303
+
1304
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1305
+
1306
+ ### PLOT_VOCABULARY
1307
+
1308
+ The grammar's settings, by the slot name every display that has one gives it,
1309
+ and what each holds: what "Edit plot..." shows and an agent reads as a display's
1310
+ `plot`. A display's plot is the ones its config declares (`plotKeysOf`).
1311
+
1312
+ ```js
1313
+ // type signature
1314
+ Readonly<Record<string, string>>
1315
+ ```
1316
+
1317
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1318
+
1319
+ ### PlotExample
1320
+
1321
+ A worked example of a display's plot: the text it fills the editor with, and
1322
+ what it does.
1323
+
1324
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1325
+
1326
+ ### plotKeysOf
1327
+
1328
+ The plot keys a display config declares.
1329
+
1330
+ ```js
1331
+ // type signature
1332
+ (conf: AnyConfigurationModel) => string[]
1333
+ ```
1334
+
1335
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1336
+
1337
+ ### plotOf
1338
+
1339
+ A display's plot as declared, defaults left off. A list sitting at a default it
1340
+ shares with no other display, a default plot's marks, shows its entries, since
1341
+ they are what is drawn.
1342
+
1343
+ ```js
1344
+ // type signature
1345
+ (conf: AnyConfigurationModel) => Plot
1346
+ ```
1347
+
1348
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1349
+
1350
+ ### plotWrites
1351
+
1352
+ What applying a draft writes: each setting whose lifted value differs from the
1353
+ plot, as the lifted value, and `null` for one it resets. A value spelled another
1354
+ way but lifting to the same setting writes nothing. Throws a refusal before
1355
+ anything is written.
1356
+
1357
+ ```js
1358
+ // type signature
1359
+ (conf: AnyConfigurationModel, draft: Plot) => Record<string, unknown>
1360
+ ```
1361
+
1362
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/plot.ts)
1363
+
1364
+ ### preProcessConfigSnapshot
1365
+
1366
+ A snapshot as `type` admits it: the same lift and checks `type.create` applies,
1367
+ so a dialog or a validator refuses exactly what a config file cannot hold.
1368
+ Throws what the schema's `preProcessSnapshot` throws.
1369
+
1370
+ ```js
1371
+ // type signature
1372
+ (type: IAnyType, snapshot: unknown) => Record<string, unknown>
1373
+ ```
1374
+
1375
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/snapshotPreprocess.ts)
1376
+
1377
+ ### quantileExtent
1378
+
1379
+ What the open ends of a scale follow over `values[0, count)`: at a `quantile` of
1380
+ 1 their finite extremes, and below it each end clipped at that quantile of the
1381
+ values on its side of 0, so one spike takes neither the axis nor the ramp, and a
1382
+ sparse tail of the other sign keeps its own end. An axis that starts at 0 adds
1383
+ it itself. Under 0.5 reads as 0.5, where the ends meet rather than cross.
1384
+ `scales.y.domainQuantile` and a colour's `domainQuantile` both name it.
1385
+ `[Infinity, -Infinity]` where nothing is finite.
1386
+
1387
+ ```js
1388
+ // type signature
1389
+ (values: ArrayLike<number>, count: number, quantile?: number) => [number, number]
1390
+ ```
1391
+
1392
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
1393
+
1394
+ ### quantileOf
1395
+
1396
+ The nearest-rank `quantile` of `a[0, n)`: the smallest value at least that share
1397
+ of them sit at or below, so a handful of values clips at their maximum. Permutes
1398
+ `a`; 0 where `n` is.
1399
+
1400
+ ```js
1401
+ // type signature
1402
+ (a: Float32Array<ArrayBufferLike>, n: number, quantile: number) => number
1403
+ ```
1404
+
1405
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
1406
+
1407
+ ### RampDeclaration
1408
+
1409
+ A continuous colour scale's ramp as a config declares it.
1410
+
1411
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
1412
+
1413
+ ### rampDomain
1414
+
1415
+ The domain a continuous colour scale spans: each end `min` or `max` pins, else
1416
+ the extent's, ascending, since a span has no direction and `reverse` is the
1417
+ ramp's. An open end stops at a pinned one rather than crossing it, and an extent
1418
+ holding no value (`[Infinity, -Infinity]`) spans [0, 1].
1419
+
1420
+ ```js
1421
+ // type signature
1422
+ (min: number | undefined, max: number | undefined, extent: readonly [number, number]) => [number, number]
1423
+ ```
1424
+
1425
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
1426
+
1427
+ ### rampGapScales
1428
+
1429
+ The rows a ramp's key lists beside its bar once a feature painted one: the
1430
+ not-a-number and no-value rows a threshold's key ends with. Empty while neither
1431
+ painted.
1432
+
1433
+ ```js
1434
+ // type signature
1435
+ (id: string, met: { missing?: boolean | undefined; notNumber?: boolean | undefined; }) => CategoricalScale[]
1436
+ ```
1437
+
1438
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1439
+
1440
+ ### rampLutOf
1441
+
1442
+ The buildColorRampLut table a ramp declaration asks for, the same `Uint8Array`
1443
+ for the same declaration, since a GPU backend re-uploads its ramp texture when
1444
+ the identity changes and a render state is rebuilt far more often than its ramp.
1445
+
1446
+ ```js
1447
+ // type signature
1448
+ (ramp: RampDeclaration) => Uint8Array<ArrayBufferLike>
1449
+ ```
1450
+
1451
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
1452
+
1453
+ ### rampOverExtent
1454
+
1455
+ A ramp table over `extent`, the union a display took across the regions it
1456
+ loaded: each open end of the domain moved to the union's, the pinned ends kept.
1457
+ The table stays straight and `domainMid` a value, so the middle stop follows the
1458
+ widened domain with no table baked again.
1459
+
1460
+ ```js
1461
+ // type signature
1462
+ (table: {…}, extent: [...]) => { ...; }
1463
+ ```
1464
+
1465
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
1466
+
1467
+ ### readConfObject
1468
+
1469
+ Given a configuration model (an instance of a ConfigurationSchema), read the
1470
+ configuration value at the given path. Use this when you hold the configuration
1471
+ model directly, e.g. an entry from `session.tracks`.
1472
+
1473
+ Wants a **live config node**, not a snapshot of one, and passing a snapshot is a
1474
+ type error. Slots are built with `types.stripDefault`, so a slot sitting at its
1475
+ default is absent from a snapshot — "unset" and "at its default" are
1476
+ indistinguishable there, and a read off one reports a default as missing.
1477
+
1478
+ That is enforced in the types only, deliberately: it can't be a runtime check.
1479
+ `generateHierarchy` reads slots straight off the **un-hydrated frozen** entries
1480
+ of `jbrowse.tracks` on purpose, because hydrating every track to answer the
1481
+ track selector is what `types.frozen` exists to avoid — and those reads are
1482
+ indistinguishable at runtime from the broken spelling.
1483
+
1484
+ ```js
1485
+ // type signature
1486
+ {…}
1487
+ ```
1488
+
1489
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
1490
+
1491
+ ### readerOf
1492
+
1493
+ A reader of a column's values by row, its kind resolved here once. A `number`
1494
+ lane with no index reads straight off the lane.
1495
+
1496
+ ```js
1497
+ // type signature
1498
+ (column: Column) => (i: number) => unknown
1499
+ ```
1500
+
1501
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1502
+
1503
+ ### READS_REFERENCE
1504
+
1505
+ The `adapterCapabilities` entry of an adapter that reads the reference sequence
1506
+ of the assembly it is displayed against: BAM and SAM for mismatches without an
1507
+ MD tag, CRAM to rebuild bases, GC content and the reference scans for everything
1508
+ they answer. Such an adapter is built with that reference and keyed on it as
1509
+ well as on its config, so one config shown on two genomes is two instances, each
1510
+ reading its own, and an instance never changes reference for its life. Every
1511
+ other adapter keys on its config alone: a synteny adapter is fetched from each
1512
+ of its assemblies and reads no reference.
1513
+
1514
+ ```js
1515
+ // type signature
1516
+ 'readsReference'
1517
+ ```
1518
+
1519
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/dataAdapterCache.ts)
1520
+
1521
+ ### relight
1522
+
1523
+ Move a color's OKLCH lightness by `lightnessShift` and scale its chroma, holding
1524
+ its hue.
1525
+
1526
+ For extending a categorical palette past its length. Cycling a nine-color list
1527
+ over a 24-chromosome karyotype repeats the color outright; cycling it with a
1528
+ lightness shift per lap gives the hue back as a variant still told apart from
1529
+ the original — tab20's construction, which pairs a light and a dark of each hue.
1530
+
1531
+ SHIFT rather than a fixed lightness, and SCALE rather than a fixed chroma,
1532
+ because a categorical palette is uneven on purpose: category10's brown and its
1533
+ red are 5 degrees apart in hue and are told apart by chroma alone, so
1534
+ re-lighting both to one (lightness, chroma) makes them the same color. Keeping
1535
+ each color's own relative chroma keeps brown reading as brown.
1536
+
1537
+ In OKLCH rather than through `lighten`/`darken`, which work in sRGB, where the
1538
+ same coefficient moves a yellow and a blue by visibly different amounts: a lap
1539
+ has to read as one tone across the whole palette or it reads as noise.
1540
+
1541
+ ```js
1542
+ // type signature
1543
+ (color: string, lightnessShift: number, chromaScale?: number) => string
1544
+ ```
1545
+
1546
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/color/index.ts)
1547
+
1548
+ ### requirementProblems
1549
+
1550
+ The `requires` entries of a configuration schema that `snapshot` does not meet,
1551
+ as a config file or `getSnapshot` spells it: a slot left off reads as its
1552
+ default, so a `when` value that is the default fires for an absent slot, which
1553
+ is what the generated JSON Schema's `if` does.
1554
+
1555
+ ```js
1556
+ // type signature
1557
+ (type: IAnyType, snapshot: Record<string, unknown>) => RequirementProblem[]
1558
+ ```
1559
+
1560
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/requirements.ts)
1561
+
1562
+ ### reservedPx
1563
+
1564
+ The pixels a band takes from the plot below it: 0 when off, the (optionally
1565
+ bound) stated height when on. This is the single spelling of "off spends 0 px".
1566
+
1567
+ ```js
1568
+ // type signature
1569
+ (band: Band) => number
1570
+ ```
1571
+
1572
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandLayout.ts)
1573
+
1574
+ ### RowSourceLister
1575
+
1576
+ An adapter that lists its rows without reading a region: a multi-BigWig its
1577
+ files, a MAF its species.
1578
+
1579
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/rowSources.ts)
1580
+
1581
+ ### RowSourceListing
1582
+
1583
+ Every row an adapter has, in its own order, whatever the loaded regions hold, so
1584
+ a row display gives a row with nothing in view its place, label and colour.
1585
+
1586
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/rowSources.ts)
1587
+
1588
+ ### runLazyAfterAttach
1589
+
1590
+ Run a display's `afterAttach` body from a module loaded on demand, so the
1591
+ autorun installers stay out of the display's eager bundle.
1592
+
1593
+ One policy for the gap the `await` opens: a node torn down before the module
1594
+ lands installs nothing, and a module that fails to load is reported where the
1595
+ user can see it rather than onto the display's own error slot — that slot is
1596
+ what `reload()` clears, and nothing would re-run the install behind it. Three
1597
+ displays hand-rolled this IIFE and each drew the lines differently.
1598
+
1599
+ ```js
1600
+ // type signature
1601
+ <Self extends IStateTreeNode>(self: Self, load: () => Promise<(self: Self) => void>) => void
1602
+ ```
1603
+
1604
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/lazyAfterAttach.ts)
1605
+
1606
+ ### runTransforms
1607
+
1608
+ Run the transform steps over a feature list or a table, in order, in the worker.
1609
+ The table a step answers is what the next one reads, and the last one is what
1610
+ the encoder walks.
1611
+
1612
+ ```js
1613
+ // type signature
1614
+ (input: readonly Feature[] | FeatureTable, steps: readonly TransformStep[], jexl?: JexlInstance | undefined) => FeatureTable
1615
+ ```
1616
+
1617
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
1618
+
1619
+ ### safeParseBreakend
1620
+
1621
+ parseBreakend, honoring its `Breakend | undefined` signature. ALT strings are
1622
+ user data and malformed breakends do occur;
1623
+
1624
+ ```js
1625
+ // type signature
1626
+ (alt: string) => Breakend | undefined
1627
+ ```
1628
+
1629
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
650
1630
 
651
1631
  ### sampleColorRamp
652
1632
 
@@ -661,6 +1641,87 @@ than an extrapolation past them, and a one-stop ramp is that stop everywhere.
661
1641
 
662
1642
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
663
1643
 
1644
+ ### scaleBandHeights
1645
+
1646
+ Heights after growing or shrinking a stack of bands by `distance` px in all: the
1647
+ one rule every whole-stack resize uses. Each band takes its share of the height
1648
+ it has above `floor`, so the tall bands give and take the most, and none goes
1649
+ below `floor`, or below its own height if it already sits under it (the
1650
+ clampBandHeight rule). Whole pixels, rounded by largest remainder, so the stack
1651
+ moves by exactly the rounded distance.
1652
+
1653
+ ```js
1654
+ // type signature
1655
+ (heights: number[], distance: number, floor?: number) => number[]
1656
+ ```
1657
+
1658
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandHeight.ts)
1659
+
1660
+ ### scaleExtent
1661
+
1662
+ quantileExtent as a scale's open ends read it: over every finite value on a
1663
+ linear scale, and on a log scale over the positive ones, since a 0 or a negative
1664
+ met there would floor the domain at 1 and fold a domain below 1 flat.
1665
+ `[Infinity, -Infinity]` where the scale reads nothing.
1666
+
1667
+ ```js
1668
+ // type signature
1669
+ (values: ArrayLike<number>, count: number, scale: string, quantile?: number) => [number, number]
1670
+ ```
1671
+
1672
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
1673
+
1674
+ ### ScaleTable
1675
+
1676
+ The table behind a channel a key is drawn from: a colour's, whose `kind` names
1677
+ the scale it resolved through, or a shape's. A `size` channel's (SizeScaleTable)
1678
+ draws no key and stands outside.
1679
+
1680
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1681
+
1682
+ ### selectEncodedFeature
1683
+
1684
+ Open the feature widget on the feature behind one instance of a
1685
+ `CoreGetEncodedLayers` answer. A display holds channels, not records, so it
1686
+ sends `CoreGetEncodedFeature` the request the instance's region came back under,
1687
+ and the worker answers the entry of `layer`'s list that the instance's
1688
+ `featureIndex` names: the record as the adapter wrote it, or the bin or run the
1689
+ steps made. A second click aborts the first.
1690
+
1691
+ ```js
1692
+ // type signature
1693
+ (self: IStateTreeNode<IAnyType>, rotation: { begin(): ActiveFetch; cancel: () => void; dispose(): void; }, args: Omit<CoreGetEncodedLayersArgs, "byteLimit"> & { ...; }) => void
1694
+ ```
1695
+
1696
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/selectEncodedFeature.ts)
1697
+
1698
+ ### selectNth
1699
+
1700
+ The `k`th smallest of `a[0, n)`, permuting `a` in place. Exact, where a
1701
+ histogram collapses skewed contact counts into its bottom bucket, and O(n) where
1702
+ a sort of 4.5M counts measured ~1s. Median-of-three because Hi-C contacts arrive
1703
+ nearly sorted.
1704
+
1705
+ ```js
1706
+ // type signature
1707
+ (a: Float32Array<ArrayBufferLike>, n: number, k: number) => number
1708
+ ```
1709
+
1710
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
1711
+
1712
+ ### selectRows
1713
+
1714
+ The table's rows `rows` names, in that order: over an adapter's features, a
1715
+ source table over those features again, so every field still reads straight off
1716
+ them; over rows a step made, a table standing on them.
1717
+
1718
+ ```js
1719
+ // type signature
1720
+ (table: FeatureTable, rows: Uint32Array<ArrayBufferLike>) => FeatureTable
1721
+ ```
1722
+
1723
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1724
+
664
1725
  ### SessionPaletteProvider
665
1726
 
666
1727
  Make JBrowse follow the host's light/dark state — the whole of it, in one mount:
@@ -671,6 +1732,10 @@ Make JBrowse follow the host's light/dark state — the whole of it, in one moun
671
1732
  </SessionPaletteProvider>
672
1733
  ```
673
1734
 
1735
+ `mode` is optional. Left out, JBrowse follows the page's declared `color-scheme`
1736
+ — so a host whose dark-mode toggle sets it, as most do, mounts this with a
1737
+ session and nothing else — and the OS preference where the page declares none.
1738
+
674
1739
  A component rather than a documented pair of calls because the pair has a half
675
1740
  that can be left out with nothing to show for it. `PaletteProvider` is the name
676
1741
  a host reaches for, and it colors the React side alone; the session write is
@@ -684,15 +1749,23 @@ colors of its own mounts `PaletteProvider` directly instead.
684
1749
 
685
1750
  ```js
686
1751
  // type signature
687
- ({ session, mode, children, }: { session: ThemeModeSession; mode: "dark" | "light"; children: ReactNode; }) => Element
1752
+ ({ session, mode, children, }: { session: ThemeModeSession; mode?: "dark" | "light" | undefined; children: ReactNode; }) => Element
688
1753
  ```
689
1754
 
690
1755
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/ui/PaletteContext.tsx)
691
1756
 
692
1757
  ### setConf
693
1758
 
694
- Write counterpart to `getConf`: sets a slot on a state model that has a
695
- `.configuration` member (a track or display state model).
1759
+ Write counterpart to `getConf`, and it takes the same path: a slot name, or an
1760
+ array naming a sub-schema's member at any depth —
1761
+ `setConf(self, ['scales', 'y', 'domainMin'], 5)`. Takes the display or track
1762
+ model, or a config node directly.
1763
+
1764
+ **The path length says what the write replaces.** A path ending on a slot writes
1765
+ that slot and leaves the object around it alone; a path ending on a sub-schema
1766
+ replaces the whole object, which is how a channel whose members move together —
1767
+ a facet's field and the domain that field's values order — gets written without
1768
+ a stale member surviving underneath.
696
1769
 
697
1770
  **Prefer this over a bare `self.configuration.setSlot('x', v)`.** The constraint
698
1771
  here mirrors `getConf`'s, so on a model with a concrete schema an unknown slot
@@ -711,26 +1784,78 @@ cast names a concrete schema instead (`ConfigModelForFields`, or the base schema
711
1784
  when the slot is the base's), and `HostChecksSlotNames` pins each one.
712
1785
 
713
1786
  A wrong _value_ type still throws at runtime (MST type-checks the assignment)
714
- rather than at compile time. `value` is deliberately `unknown` because the
715
- inherit sentinel (`undefined`/`null`) is a legitimate write on every promotable
716
- slot, which the declared slot value type doesn't include.
1787
+ rather than at compile time. `value` is deliberately `unknown` because
1788
+ `undefined` is a legitimate write — it resets a slot to its schema default — and
1789
+ the declared slot value type doesn't include it.
717
1790
 
718
1791
  ```js
719
1792
  // type signature
720
- <CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<…> = ConfigurationSlotName<…>>(model: { ...; }, slotName: SLOT, value: unknown) => void
1793
+ <…>(target: CONFMODEL | { ...; }, slotPath: SLOT, value: unknown) => void
721
1794
  ```
722
1795
 
723
1796
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
724
1797
 
1798
+ ### SHAPE_CODES
1799
+
1800
+ The `point` mark's painter code for each shape an encoding can name.
1801
+
1802
+ ```js
1803
+ // type signature
1804
+ Record<ShapeName, number>
1805
+ ```
1806
+
1807
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/shapeNames.ts)
1808
+
1809
+ ### ShapeEncoding
1810
+
1811
+ A ShapeName, a `jexl:` expression over `feature` returning one, or a field bound
1812
+ to a categorical scale whose `range` lists the shape names handed out — the
1813
+ three shapes, in order, when absent.
1814
+
1815
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1816
+
1817
+ ### ShapeScaleTable
1818
+
1819
+ The scale a shape channel was resolved through: which shape each value of the
1820
+ field took.
1821
+
1822
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1823
+
1824
+ ### SizeEncoding
1825
+
1826
+ How a mark's `size` channel resolves: a number is a constant width in CSS px for
1827
+ every instance, a field name is `{ field }` with the defaults, and the object
1828
+ binds the field to a scale.
1829
+
1830
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1831
+
1832
+ ### SizeRef
1833
+
1834
+ A numeric field read through a linear or log scale into a width in CSS px:
1835
+ `range` is the px at each end of the domain (1 to 6 unset), and each end of the
1836
+ domain is pinned by `domainMin` or `domainMax` or follows the loaded regions'
1837
+ extremes where unset, as a colour ramp's does. A feature holding no number takes
1838
+ the range's first px.
1839
+
1840
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1841
+
1842
+ ### SizeScaleTable
1843
+
1844
+ The scale a size channel is read through: the `size` lane holds the raw values
1845
+ and the shape maps them to px through this, so a display unions `extent` over
1846
+ its loaded regions into the open ends of `domain` and every region strokes the
1847
+ same value at the same width.
1848
+
1849
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1850
+
725
1851
  ### stackBands
726
1852
 
727
1853
  Fold an ordered set of bands into tops and a bottom. The order is the argument,
728
- so a display states its band order exactly once; reserve, paint and pick all
729
- read the same fold, which is what keeps "the reserver and the painter read one
730
- function" true by construction rather than by prose.
1854
+ so a display states its band order exactly once. Reserve, paint and pick all
1855
+ call this function, so the reserved and painted positions cannot disagree.
731
1856
 
732
- Only the fold is shared. What varies per display stays there: per-lane iteration
733
- runs this once per lane, sticky-vs-scrolling is a property of how the result is
1857
+ Only the fold is shared; the rest stays in each display. Per-lane iteration runs
1858
+ this once per lane, sticky-vs-scrolling is a property of how the result is
734
1859
  projected to the screen, and a band drawn outside its reservation (an overlay)
735
1860
  carries its own draw rect beside the stack.
736
1861
 
@@ -745,48 +1870,211 @@ carries its own draw rect beside the stack.
745
1870
 
746
1871
  `n` evenly spaced legend stops read straight out of a buildColorRampLut byte
747
1872
  table — the same 256×1 RGBA array `uploadColorRampLut` hands the GPU and the
748
- Canvas2D fillStyle LUTs index — formatted for `SvgGradientLegend`. It holds one
1873
+ Canvas2D fillStyle LUTs index — as the stops of a `RampScale`. It holds one
749
1874
  claim by construction: the swatch at bar fraction `t` is byte-identical to the
750
- ramp entry at `t` on both backends. Alpha rides `opacity` (the juicebox fade),
751
- never baked into the color string.
1875
+ ramp entry both backends read at `t`, through the ramp's middle stop at
1876
+ `midNorm` (`rampMidT`). Alpha rides `opacity` (the juicebox fade), never baked
1877
+ into the color string.
752
1878
 
753
1879
  ```js
754
1880
  // type signature
755
- (lut: Uint8Array<ArrayBufferLike>, n: number) => GradientStop[]
1881
+ (lut: Uint8Array<ArrayBufferLike>, n: number, midNorm?: number) => RampStop[]
756
1882
  ```
757
1883
 
758
1884
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
759
1885
 
760
- ### TrackConfigWithPromotables
761
-
762
- A track config snapshot with every display's `promotable` slots resolved, plus
763
- the list of values that came from a session-wide default rather than from the
764
- config itself.
765
-
766
- For handing a track's config to somewhere that leaves the cascade for good — the
767
- About dialog's "Copy config", whose output a user pastes into a `config.json`. A
768
- raw `getSnapshot` records a slot a track merely _follows_ as absent
769
- (`stripDefault` collapsed it), so the copied config renders differently from the
770
- track it was copied from. This is `getComputedStyle` at that boundary, and
771
- `fromDisplayTypeDefaults` is what lets the UI say so rather than silently
772
- materializing a session preference into a track config.
773
-
774
- Resolves from the display _config_ alone, whether or not the track is open.
775
- Everything the cascade takes is on the config node: it is the same node an open
776
- display's `configuration` points at (the hydration cache makes it stable), its
777
- `type` is the display type the session-wide tier is keyed on (every display
778
- schema is `explicitlyTyped` under the display type's own name), and the session
779
- is passed in. So an unopened track — which has no display state at all — still
780
- has an answer to "what would this render as", by the same code path.
781
-
782
- **Writes every promotable slot, including the ones sitting at `promotedBase`,
783
- and that is the decision — don't "align" it with the share bake.** A pasted
784
- `config.json` is read by a mechanism with no cascade in it at all, so writing
785
- only the inherited values would leave every other slot to pick up whatever the
786
- reader has promoted in their own browser. Pinned by
787
- `products/jbrowse-web/src/tests/CopyConfigPromotedDefaults.test.ts`.
788
-
789
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/promotableDefaults.ts)
1886
+ ### STRAND_FIELD
1887
+
1888
+ ```js
1889
+ // type signature
1890
+ 'strand'
1891
+ ```
1892
+
1893
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
1894
+
1895
+ ### SV_MIN_LENGTH
1896
+
1897
+ The conventional size floor for calling a sequence indel structural.
1898
+
1899
+ ```js
1900
+ // type signature
1901
+ 50
1902
+ ```
1903
+
1904
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1905
+
1906
+ ### SV_TYPE_FIELD
1907
+
1908
+ The structural-variant class `svClassOf` names. A VCF record and a BEDPE row
1909
+ carry it, and the mark display's `mate` step writes it per allele.
1910
+
1911
+ ```js
1912
+ // type signature
1913
+ 'svType'
1914
+ ```
1915
+
1916
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
1917
+
1918
+ ### svClassOf
1919
+
1920
+ The structural-variant class of a VCF record as a whole: the one class its
1921
+ alleles state, CNV where they are losses and gains of one segment, OTHER where
1922
+ they otherwise disagree, and `''` for a record with no structural allele.
1923
+
1924
+ ```js
1925
+ // type signature
1926
+ (feature: Feature) => string
1927
+ ```
1928
+
1929
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1930
+
1931
+ ### svClassOfAlt
1932
+
1933
+ The structural-variant class one ALT allele states, `''` for one that is not
1934
+ structural. A symbolic allele's own id wins. Otherwise VCF 4.4's `EVENTTYPE`
1935
+ does; then a breakend is the class its `SVTYPE` declares where that says more
1936
+ than BND, and a sequence allele is an insertion or deletion by its length
1937
+ against REF, else its `SVTYPE`'s class.
1938
+
1939
+ ```js
1940
+ // type signature
1941
+ (alt: string, { ref, info, alleleIndex, }?: { ref?: string | undefined; info?: Record<string, unknown> | undefined; alleleIndex?: number | undefined; }) => string
1942
+ ```
1943
+
1944
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1945
+
1946
+ ### svClassOfToken
1947
+
1948
+ The class a symbolic allele id, `SVTYPE` or `EVENTTYPE` names. A subtype folds
1949
+ into its first level (`DEL:ME:ALU` is DEL, `DUP:TANDEM` DUP), except the tandem
1950
+ repeats VCF 4.4 spells `CNV:TR` and ExpansionHunter `STRn`, and the inverted
1951
+ duplication `INV:DUP`. 1000 Genomes' `CNn` counts one haplotype's copies, so
1952
+ none is a deletion and two or more a duplication. `''` for an empty or missing
1953
+ token.
1954
+
1955
+ ```js
1956
+ // type signature
1957
+ (raw: string) => string
1958
+ ```
1959
+
1960
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1961
+
1962
+ ### TextColumn
1963
+
1964
+ Text held as bytes, one per character: row `i`'s is `length[i]` bytes of `bytes`
1965
+ from `offset[i]`, so many rows share one buffer, as an adapter's arena holds
1966
+ them.
1967
+
1968
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
1969
+
1970
+ ### thresholdCuts
1971
+
1972
+ A threshold scale's cut points as thresholdIndex walks them: the numbers the
1973
+ domain names, ascending. Cuts written high to low, as p-value thresholds often
1974
+ are, left the middle interval unreachable, the walk stopping at the first cut a
1975
+ value is under.
1976
+
1977
+ ```js
1978
+ // type signature
1979
+ (domain: readonly (string | number)[]) => number[]
1980
+ ```
1981
+
1982
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1983
+
1984
+ ### thresholdField
1985
+
1986
+ A threshold scale read the way every categorical channel reads its field: a
1987
+ value files under the label of the bin it falls in, a feature with no value
1988
+ under `''`, and text that is no number under NOT_A_NUMBER_LABEL. The bins are
1989
+ the whole domain, so a key lists each one. `labels` names the bins in a key, one
1990
+ each from the lowest, where a config spells them for a reader; a bin's key stays
1991
+ its interval.
1992
+
1993
+ ```js
1994
+ // type signature
1995
+ (field: string, {…}?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; labels?: readonly string[] | undefined; }) => CategoricalField
1996
+ ```
1997
+
1998
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1999
+
2000
+ ### thresholdIndex
2001
+
2002
+ The bin a value falls in: how many of the ascending cut points it is at or past,
2003
+ so a palette with one more entry than the domain paints it as
2004
+ `palette[thresholdIndex(value, domain)]`. A value that is not a number is in no
2005
+ bin and answers -1; an infinite one takes the end bin on its side, as d3's
2006
+ threshold scale places it, so a `-log10` of a zero p-value lands in the top bin.
2007
+
2008
+ ```js
2009
+ // type signature
2010
+ (value: unknown, domain: readonly number[]) => number
2011
+ ```
2012
+
2013
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
2014
+
2015
+ ### thresholdKeyEntries
2016
+
2017
+ A threshold key's rows: every interval, painted or not, since the bins are the
2018
+ whole domain, then the not-a-number and no-value rows where a feature took one,
2019
+ in the order `thresholdField` sorts them.
2020
+
2021
+ ```js
2022
+ // type signature
2023
+ (cuts: readonly number[], range: readonly string[] | undefined, met: {…}, names?: readonly string[]) => {…}[]
2024
+ ```
2025
+
2026
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
2027
+
2028
+ ### thresholdLabels
2029
+
2030
+ What a threshold scale's bins are called in a key, one label per palette entry:
2031
+ `< a` below the first cut, `a – b` between two, `≥ b` past the last.
2032
+
2033
+ ```js
2034
+ // type signature
2035
+ (domain: readonly number[]) => string[]
2036
+ ```
2037
+
2038
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
2039
+
2040
+ ### thresholdPalette
2041
+
2042
+ The colour of each interval, in order: the declared palette, and the default
2043
+ categorical palette where it runs out.
2044
+
2045
+ ```js
2046
+ // type signature
2047
+ (bins: number, palette?: readonly string[]) => string[]
2048
+ ```
2049
+
2050
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
2051
+
2052
+ ### ThresholdRef
2053
+
2054
+ A numeric field cut into intervals: `domain` is the ascending cut points and
2055
+ `range` holds one colour more, so a value paints the entry for the number of cut
2056
+ points it is at or past. A value that is not a number belongs to no interval.
2057
+
2058
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
2059
+
2060
+ ### TransformStep
2061
+
2062
+ One step over the features before a layer is encoded, named by `type` the way
2063
+ GenomeSpy spells a transform; every step runs in order and the next reads what
2064
+ the last answered.
2065
+
2066
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
2067
+
2068
+ ### valueAt
2069
+
2070
+ A column's value at a row, whatever its kind: for a loop that reads few rows.
2071
+
2072
+ ```js
2073
+ // type signature
2074
+ (column: Column, i: number) => unknown
2075
+ ```
2076
+
2077
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
790
2078
 
791
2079
  ### VIRIDIS_STOPS
792
2080
 
@@ -800,4 +2088,35 @@ readonly ColorRampStop[]
800
2088
 
801
2089
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
802
2090
 
2091
+ ### withColumns
2092
+
2093
+ The table's rows with `written` beside them, in the order `rows` names where it
2094
+ names one.
2095
+
2096
+ ```js
2097
+ // type signature
2098
+ (table: FeatureTable, written: ReadonlyMap<string, Column>, rows?: Uint32Array<ArrayBufferLike> | undefined) => FeatureTable
2099
+ ```
2100
+
2101
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
2102
+
2103
+ ### withHitIndex
2104
+
2105
+ HitIndexed over what the worker shipped.
2106
+
2107
+ ```js
2108
+ // type signature
2109
+ <T extends EncodedChannels>(channels: T) => HitIndexed<T>
2110
+ ```
2111
+
2112
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
2113
+
2114
+ ### ZoomRange
2115
+
2116
+ The bp/px interval, `[minBpPerPx, maxBpPerPx)`, over which an adapter with zoom
2117
+ levels answers a fetch from the same level it answered `opts.bpPerPx` from. A
2118
+ display holding the answer refetches when the view leaves it.
2119
+
2120
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/zoomRange.ts)
2121
+
803
2122
  <!-- API_DOCS_END -->