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

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