@jbrowse/core 5.0.0-beta.8 → 5.0.0-beta.9

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 (379) hide show
  1. package/README.md +427 -130
  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 +8 -9
  6. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +8 -13
  7. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -1
  8. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +3 -3
  9. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +8 -0
  10. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +24 -0
  11. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
  12. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +5 -3
  13. package/esm/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +1 -0
  14. package/esm/BaseFeatureWidget/BaseFeatureDetail/index.js +1 -4
  15. package/esm/BaseFeatureWidget/BaseFeatureDetail/jexlFilterActions.d.ts +16 -0
  16. package/esm/BaseFeatureWidget/BaseFeatureDetail/jexlFilterActions.js +53 -0
  17. package/esm/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +0 -8
  18. package/esm/BaseFeatureWidget/BaseFeatureDetail/util.js +0 -16
  19. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.js +7 -34
  20. package/esm/BaseFeatureWidget/configSchema.d.ts +1 -1
  21. package/esm/BaseFeatureWidget/formatDetails.d.ts +13 -29
  22. package/esm/BaseFeatureWidget/formatDetails.js +46 -79
  23. package/esm/BaseFeatureWidget/index.d.ts +1 -0
  24. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +35 -28
  25. package/esm/BaseFeatureWidget/stateModelFactory.js +94 -102
  26. package/esm/BaseFeatureWidget/types.d.ts +3 -0
  27. package/esm/BaseFeatureWidget/util.d.ts +0 -3
  28. package/esm/BaseFeatureWidget/util.js +0 -17
  29. package/esm/PluginLoader.d.ts +14 -9
  30. package/esm/PluginLoader.js +34 -26
  31. package/esm/PluginManager.d.ts +4 -4
  32. package/esm/PluginManager.js +1 -1
  33. package/esm/ReExports/coreModules.generated.d.ts +2 -0
  34. package/esm/ReExports/coreModules.generated.js +492 -0
  35. package/esm/ReExports/coreWorkerModules.generated.d.ts +2 -0
  36. package/esm/ReExports/coreWorkerModules.generated.js +453 -0
  37. package/esm/ReExports/frameworkModules.d.ts +2 -0
  38. package/esm/ReExports/frameworkModules.js +67 -0
  39. package/esm/ReExports/frameworkShared.d.ts +12 -0
  40. package/esm/ReExports/frameworkShared.js +16 -0
  41. package/esm/ReExports/frameworkWorkerModules.generated.d.ts +2 -0
  42. package/esm/ReExports/frameworkWorkerModules.generated.js +130 -0
  43. package/esm/ReExports/list.js +493 -79
  44. package/esm/ReExports/modules.d.ts +1 -1
  45. package/esm/ReExports/modules.js +10 -87
  46. package/esm/ReExports/registry.d.ts +1 -0
  47. package/esm/ReExports/registry.js +23 -5
  48. package/esm/ReExports/uiStub.d.ts +2 -1
  49. package/esm/ReExports/uiStub.js +24 -2
  50. package/esm/ReExports/workerModules.js +8 -12
  51. package/esm/TextSearch/TextSearchManager.d.ts +3 -12
  52. package/esm/TextSearch/TextSearchManager.js +22 -10
  53. package/esm/assemblyManager/assembly.d.ts +10 -14
  54. package/esm/assemblyManager/assembly.js +10 -14
  55. package/esm/assemblyManager/assemblyConfigSchema.d.ts +23 -81
  56. package/esm/assemblyManager/assemblyManager.d.ts +10 -16
  57. package/esm/assemblyManager/assemblyManager.js +7 -10
  58. package/esm/assemblyManager/loadRefNameMap.js +3 -3
  59. package/esm/configuration/configurationSchema.d.ts +75 -31
  60. package/esm/configuration/configurationSchema.js +74 -40
  61. package/esm/configuration/configurationSchemaUnion.d.ts +39 -0
  62. package/esm/configuration/configurationSchemaUnion.js +59 -0
  63. package/esm/configuration/configurationSlot.d.ts +37 -12
  64. package/esm/configuration/configurationSlot.js +83 -22
  65. package/esm/configuration/formatAboutConfigSchema.d.ts +7 -21
  66. package/esm/configuration/formatDetailsConfigSchema.d.ts +11 -37
  67. package/esm/configuration/formatDetailsConfigSchema.js +10 -13
  68. package/esm/configuration/getConf.d.ts +17 -9
  69. package/esm/configuration/getConf.js +52 -7
  70. package/esm/configuration/index.d.ts +11 -4
  71. package/esm/configuration/index.js +7 -4
  72. package/esm/configuration/mergeFormatCallbacks.d.ts +6 -7
  73. package/esm/configuration/mergeFormatCallbacks.js +13 -10
  74. package/esm/configuration/readConfObject.d.ts +2 -22
  75. package/esm/configuration/readConfObject.js +15 -49
  76. package/esm/configuration/requirements.d.ts +37 -0
  77. package/esm/configuration/requirements.js +88 -0
  78. package/esm/configuration/schemaRegistry.d.ts +21 -1
  79. package/esm/configuration/schemaRegistry.js +11 -0
  80. package/esm/configuration/schemaTypes.d.ts +3 -0
  81. package/esm/configuration/schemaTypes.js +10 -0
  82. package/esm/configuration/slotFacade.d.ts +35 -4
  83. package/esm/configuration/slotFacade.js +96 -9
  84. package/esm/configuration/snapshotPreprocess.d.ts +27 -0
  85. package/esm/configuration/snapshotPreprocess.js +102 -0
  86. package/esm/configuration/types.d.ts +161 -22
  87. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +2 -2
  88. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +11 -2
  89. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +12 -1
  90. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +2 -3
  91. package/esm/data_adapters/BaseAdapter/featureDensity.js +2 -3
  92. package/esm/data_adapters/BaseAdapter/index.d.ts +22 -3
  93. package/esm/data_adapters/BaseAdapter/types.d.ts +3 -4
  94. package/esm/data_adapters/BaseAdapter/zoomRange.d.ts +10 -0
  95. package/esm/data_adapters/BaseAdapter/zoomRange.js +1 -0
  96. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +9 -11
  97. package/esm/data_adapters/getSequenceSubAdapter.d.ts +1 -3
  98. package/esm/data_adapters/getSequenceSubAdapter.js +1 -3
  99. package/esm/pluggableElementTypes/AdapterType.d.ts +7 -7
  100. package/esm/pluggableElementTypes/RpcMethodType.d.ts +1 -1
  101. package/esm/pluggableElementTypes/RpcMethodType.js +3 -8
  102. package/esm/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +1 -2
  103. package/esm/pluggableElementTypes/TextSearchAdapterType.d.ts +7 -7
  104. package/esm/pluggableElementTypes/index.d.ts +1 -1
  105. package/esm/pluggableElementTypes/index.js +1 -1
  106. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +17 -7
  107. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +45 -48
  108. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +40 -36
  109. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +10 -13
  110. package/esm/pluggableElementTypes/models/BaseTrackModel.js +6 -6
  111. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +37 -17
  112. package/esm/pluggableElementTypes/models/BaseViewModel.js +25 -10
  113. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +26 -16
  114. package/esm/pluggableElementTypes/models/assertDisplayContract.d.ts +1 -1
  115. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +22 -18
  116. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +5 -5
  117. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +26 -31
  118. package/esm/pluggableElementTypes/models/baseTrackConfig.d.ts +57 -141
  119. package/esm/pluggableElementTypes/models/baseTrackConfig.js +22 -26
  120. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
  121. package/esm/pluggableElementTypes/models/components/fetchTrackData.d.ts +3 -4
  122. package/esm/pluggableElementTypes/models/components/fetchTrackData.js +3 -3
  123. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +15 -7
  124. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +38 -29
  125. package/esm/pluggableElementTypes/models/index.d.ts +1 -2
  126. package/esm/pluggableElementTypes/models/index.js +1 -2
  127. package/esm/pluggableElementTypes/models/saveTrackFileTypes/genbank.d.ts +3 -3
  128. package/esm/pluggableElementTypes/models/saveTrackFileTypes/genbank.js +4 -4
  129. package/esm/pluggableElementTypes/models/saveTrackFileTypes/types.d.ts +3 -3
  130. package/esm/rpc/BaseRpcDriver.d.ts +1 -2
  131. package/esm/rpc/BaseRpcDriver.js +23 -30
  132. package/esm/rpc/MainThreadRpcDriver.d.ts +2 -2
  133. package/esm/rpc/MainThreadRpcDriver.js +13 -8
  134. package/esm/rpc/RpcClient.d.ts +17 -6
  135. package/esm/rpc/RpcClient.js +42 -12
  136. package/esm/rpc/RpcManager.d.ts +8 -10
  137. package/esm/rpc/RpcManager.js +1 -1
  138. package/esm/rpc/RpcRegistry.d.ts +8 -2
  139. package/esm/rpc/RpcServer.d.ts +3 -1
  140. package/esm/rpc/RpcServer.js +19 -12
  141. package/esm/rpc/WebWorkerRpcDriver.d.ts +3 -3
  142. package/esm/rpc/WebWorkerRpcDriver.js +9 -47
  143. package/esm/rpc/byteBudget.d.ts +3 -5
  144. package/esm/rpc/byteBudget.js +4 -4
  145. package/esm/rpc/configSchema.d.ts +7 -21
  146. package/esm/rpc/coreRpcMethods.d.ts +1 -0
  147. package/esm/rpc/coreRpcMethods.js +1 -0
  148. package/esm/rpc/methods/CoreEncodeFeatures.d.ts +6 -5
  149. package/esm/rpc/methods/CoreEncodeFeatures.js +26 -31
  150. package/esm/rpc/methods/CoreGetEncodedFeature.d.ts +13 -0
  151. package/esm/rpc/methods/CoreGetEncodedFeature.js +31 -0
  152. package/esm/rpc/methods/CoreGetExportData.js +2 -2
  153. package/esm/rpc/methods/CoreGetFeatureDensity.js +2 -2
  154. package/esm/rpc/methods/CoreGetFeatures.js +2 -2
  155. package/esm/rpc/methods/CoreGetSequence.js +2 -2
  156. package/esm/rpc/methods/layerFeatures.d.ts +26 -0
  157. package/esm/rpc/methods/layerFeatures.js +40 -0
  158. package/esm/svg/SvgExport.js +3 -4
  159. package/esm/svg/SvgThemeProviders.d.ts +12 -0
  160. package/esm/svg/SvgThemeProviders.js +15 -0
  161. package/esm/svg/exportViewSvg.d.ts +32 -0
  162. package/esm/svg/exportViewSvg.js +13 -0
  163. package/esm/svg/normalizeSvgMarkup.d.ts +7 -0
  164. package/esm/svg/normalizeSvgMarkup.js +99 -0
  165. package/esm/svg/serializeSvg.d.ts +7 -0
  166. package/esm/svg/serializeSvg.js +11 -0
  167. package/esm/svg/svgReady.d.ts +8 -7
  168. package/esm/svg/svgReady.js +8 -7
  169. package/esm/svg/trackNames.d.ts +5 -5
  170. package/esm/svg/trackNames.js +6 -6
  171. package/esm/svg/wrapSvgExport.js +6 -74
  172. package/esm/ui/CascadingMenu.js +83 -86
  173. package/esm/ui/ErrorMessageStackTraceDialog.js +0 -5
  174. package/esm/ui/FileSelector/useInternetAccounts.d.ts +156 -96
  175. package/esm/ui/HoverMenu.d.ts +1 -2
  176. package/esm/ui/HoverMenu.js +6 -3
  177. package/esm/ui/JexlFilterDialog.d.ts +13 -10
  178. package/esm/ui/JexlFilterDialog.js +122 -49
  179. package/esm/ui/JexlFilterRowEditors.d.ts +15 -0
  180. package/esm/ui/JexlFilterRowEditors.js +90 -0
  181. package/esm/ui/LazyBaseTooltip.d.ts +4 -0
  182. package/esm/ui/LazyBaseTooltip.js +9 -0
  183. package/esm/ui/LoadingOverlay.js +3 -1
  184. package/esm/ui/MonospaceTextField.d.ts +2 -1
  185. package/esm/ui/MonospaceTextField.js +21 -19
  186. package/esm/ui/PaletteContext.d.ts +7 -9
  187. package/esm/ui/PaletteContext.js +24 -10
  188. package/esm/ui/RefNameAutocomplete/index.d.ts +1 -2
  189. package/esm/ui/RefNameAutocomplete/index.js +1 -1
  190. package/esm/ui/ScrollChrome.d.ts +6 -9
  191. package/esm/ui/ScrollChrome.js +5 -6
  192. package/esm/ui/ScrollEdgeShadow.d.ts +6 -9
  193. package/esm/ui/ScrollEdgeShadow.js +9 -24
  194. package/esm/ui/SettingsChangesTable.js +3 -3
  195. package/esm/ui/VerticalScrollbar.d.ts +13 -34
  196. package/esm/ui/VerticalScrollbar.js +29 -83
  197. package/esm/ui/ViewLoadingScreen.d.ts +2 -2
  198. package/esm/ui/ViewLoadingScreen.js +3 -3
  199. package/esm/ui/colorScale.d.ts +26 -1
  200. package/esm/ui/colorScale.js +28 -5
  201. package/esm/ui/colors.d.ts +49 -1
  202. package/esm/ui/colors.js +139 -4
  203. package/esm/ui/hoverBoxStyle.d.ts +14 -2
  204. package/esm/ui/hoverBoxStyle.js +17 -2
  205. package/esm/ui/index.d.ts +5 -3
  206. package/esm/ui/index.js +9 -7
  207. package/esm/ui/launchViewMenu.js +3 -3
  208. package/esm/ui/legendSpec.d.ts +2 -0
  209. package/esm/ui/legendSpec.js +3 -0
  210. package/esm/ui/palette.d.ts +0 -1
  211. package/esm/ui/palette.js +3 -27
  212. package/esm/ui/replaceViewAction.d.ts +1 -1
  213. package/esm/ui/replaceViewAction.js +1 -1
  214. package/esm/ui/theme.d.ts +1 -1
  215. package/esm/ui/theme.js +6 -40
  216. package/esm/ui/viewHeaderHeight.d.ts +1 -0
  217. package/esm/ui/viewHeaderHeight.js +1 -0
  218. package/esm/util/Base1DUtils.d.ts +1 -1
  219. package/esm/util/Base1DUtils.js +2 -2
  220. package/esm/util/SvgCanvas.d.ts +15 -13
  221. package/esm/util/SvgCanvas.js +72 -53
  222. package/esm/util/aborting.d.ts +39 -0
  223. package/esm/util/aborting.js +84 -0
  224. package/esm/util/adapterMetadata.d.ts +1 -1
  225. package/esm/util/adapterMetadata.js +6 -6
  226. package/esm/util/addAndShowTrack.d.ts +1 -4
  227. package/esm/util/addRelativeUris.d.ts +10 -2
  228. package/esm/util/addRelativeUris.js +22 -7
  229. package/esm/util/addTrackFromWidget.d.ts +2 -5
  230. package/esm/util/animationAllowed.d.ts +9 -0
  231. package/esm/util/animationAllowed.js +13 -0
  232. package/esm/util/applyRowResizeWheel.d.ts +10 -5
  233. package/esm/util/applyRowResizeWheel.js +10 -21
  234. package/esm/util/bandLayout.d.ts +4 -4
  235. package/esm/util/bandLayout.js +4 -4
  236. package/esm/util/bezierConnector.js +5 -4
  237. package/esm/util/bgzfWorkerPool.d.ts +20 -74
  238. package/esm/util/bgzfWorkerPool.js +20 -74
  239. package/esm/util/cachedSetup.d.ts +1 -1
  240. package/esm/util/cachedSetup.js +2 -2
  241. package/esm/util/categoricalField.d.ts +37 -0
  242. package/esm/util/categoricalField.js +52 -0
  243. package/esm/util/color/cssColorsLevel4.d.ts +1 -0
  244. package/esm/util/color/cssColorsLevel4.js +1 -0
  245. package/esm/util/color/index.d.ts +5 -3
  246. package/esm/util/color/index.js +7 -4
  247. package/esm/util/colorBits.d.ts +1 -2
  248. package/esm/util/colorBits.js +17 -39
  249. package/esm/util/colorRamp.d.ts +27 -1
  250. package/esm/util/colorRamp.js +56 -2
  251. package/esm/util/colorSchemes.d.ts +9 -0
  252. package/esm/util/colorSchemes.js +7 -0
  253. package/esm/util/{createStopTokenRotation.d.ts → createAbortRotation.d.ts} +11 -14
  254. package/esm/util/{createStopTokenRotation.js → createAbortRotation.js} +14 -26
  255. package/esm/util/cssColorParse.d.ts +15 -0
  256. package/esm/util/cssColorParse.js +53 -0
  257. package/esm/util/diagonalizeRegions.d.ts +2 -3
  258. package/esm/util/diagonalizeRegions.js +7 -12
  259. package/esm/util/expandLooseSearchIndex.d.ts +7 -0
  260. package/esm/util/expandLooseSearchIndex.js +25 -0
  261. package/esm/util/featureTransforms.d.ts +30 -3
  262. package/esm/util/featureTransforms.js +233 -36
  263. package/esm/util/fetchAndMaybeUnzip.js +5 -6
  264. package/esm/util/fetchContext.d.ts +5 -6
  265. package/esm/util/fetchContext.js +1 -1
  266. package/esm/util/fetchHub.d.ts +3 -1
  267. package/esm/util/fetchHub.js +2 -2
  268. package/esm/util/fetchSeq.d.ts +2 -3
  269. package/esm/util/fetchSeq.js +2 -2
  270. package/esm/util/fieldReader.d.ts +17 -0
  271. package/esm/util/fieldReader.js +62 -0
  272. package/esm/util/groupKeys.d.ts +75 -0
  273. package/esm/util/groupKeys.js +152 -0
  274. package/esm/util/highlights.d.ts +6 -4
  275. package/esm/util/highlights.js +12 -25
  276. package/esm/util/hooks.d.ts +1 -2
  277. package/esm/util/hooks.js +1 -2
  278. package/esm/util/index.d.ts +3 -3
  279. package/esm/util/index.js +4 -3
  280. package/esm/util/indexCandidates.js +1 -1
  281. package/esm/util/installFetch.d.ts +13 -10
  282. package/esm/util/installFetch.js +11 -10
  283. package/esm/util/installPrerequisiteFetch.d.ts +5 -3
  284. package/esm/util/installPrerequisiteFetch.js +3 -4
  285. package/esm/util/io/index.js +12 -12
  286. package/esm/util/isDataCurrent.d.ts +7 -5
  287. package/esm/util/isDataCurrent.js +9 -6
  288. package/esm/util/jexl.js +24 -21
  289. package/esm/util/jexlFilterRows.d.ts +89 -0
  290. package/esm/util/jexlFilterRows.js +252 -0
  291. package/esm/util/jexlFilters.d.ts +7 -5
  292. package/esm/util/jexlStrings.d.ts +3 -4
  293. package/esm/util/jexlStrings.js +2 -3
  294. package/esm/util/legendCandidates.d.ts +31 -27
  295. package/esm/util/legendCandidates.js +79 -53
  296. package/esm/util/localStorage.js +4 -4
  297. package/esm/util/markEncoding.d.ts +32 -16
  298. package/esm/util/markEncoding.js +177 -150
  299. package/esm/util/markEncodingTypes.d.ts +137 -66
  300. package/esm/util/mstUtils.d.ts +19 -22
  301. package/esm/util/mstUtils.js +19 -22
  302. package/esm/util/numericUtils.d.ts +7 -0
  303. package/esm/util/numericUtils.js +16 -0
  304. package/esm/util/numericValue.d.ts +14 -0
  305. package/esm/util/numericValue.js +34 -0
  306. package/esm/util/openFeatureWidget.js +1 -2
  307. package/esm/util/openViews.d.ts +1 -0
  308. package/esm/util/openViews.js +3 -3
  309. package/esm/util/parseLineByLine.d.ts +3 -4
  310. package/esm/util/parseLineByLine.js +7 -13
  311. package/esm/util/progress.d.ts +21 -21
  312. package/esm/util/progress.js +27 -26
  313. package/esm/util/renameRegions.d.ts +1 -2
  314. package/esm/util/renderToStaticMarkup.js +16 -16
  315. package/esm/util/rxjs.d.ts +7 -8
  316. package/esm/util/rxjs.js +12 -15
  317. package/esm/util/simpleFeature.d.ts +0 -1
  318. package/esm/util/svgColorProps.d.ts +11 -0
  319. package/esm/util/svgColorProps.js +28 -1
  320. package/esm/util/tabix.d.ts +3 -4
  321. package/esm/util/tabix.js +6 -7
  322. package/esm/util/thresholdScale.d.ts +54 -0
  323. package/esm/util/thresholdScale.js +112 -0
  324. package/esm/util/timeGate.d.ts +4 -5
  325. package/esm/util/timeGate.js +4 -5
  326. package/esm/util/trackConfigDelta.d.ts +22 -18
  327. package/esm/util/trackConfigDelta.js +40 -38
  328. package/esm/util/tracks.d.ts +27 -4
  329. package/esm/util/tracks.js +116 -43
  330. package/esm/util/translateTranscript.d.ts +44 -0
  331. package/esm/util/translateTranscript.js +102 -0
  332. package/esm/util/types/index.d.ts +19 -7
  333. package/esm/util/types/services.d.ts +1 -1
  334. package/esm/util/unknownSnapshotKeys.d.ts +15 -0
  335. package/esm/util/unknownSnapshotKeys.js +13 -0
  336. package/esm/util/useFeatureSequence.js +4 -4
  337. package/esm/util/useFetch.d.ts +3 -4
  338. package/esm/util/useFetch.js +5 -6
  339. package/esm/util/usePanelVirtualScroll.d.ts +7 -39
  340. package/esm/util/usePanelVirtualScroll.js +9 -40
  341. package/esm/util/useRowVirtualScroll.d.ts +6 -29
  342. package/esm/util/useRowVirtualScroll.js +8 -49
  343. package/esm/util/useVirtualScrollWheel.d.ts +20 -4
  344. package/esm/util/useVirtualScrollWheel.js +40 -84
  345. package/esm/util/viewHighlights.d.ts +3 -0
  346. package/esm/util/viewHighlights.js +5 -0
  347. package/esm/util/viewStatus.d.ts +24 -15
  348. package/esm/util/viewStatus.js +17 -0
  349. package/esm/util/withLaunchInput.d.ts +1 -1
  350. package/esm/util/withLaunchInput.js +0 -4
  351. package/package.json +26 -12
  352. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.d.ts +0 -80
  353. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.js +0 -583
  354. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.d.ts +0 -141
  355. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.js +0 -1116
  356. package/esm/ReExports/BaseFeatureDetails.d.ts +0 -1
  357. package/esm/ReExports/BaseFeatureDetails.js +0 -10
  358. package/esm/ReExports/barrelOnlyNames.d.ts +0 -5
  359. package/esm/ReExports/barrelOnlyNames.js +0 -63
  360. package/esm/ReExports/index.d.ts +0 -1
  361. package/esm/ReExports/index.js +0 -1
  362. package/esm/ReExports/publicTracks.d.ts +0 -1
  363. package/esm/ReExports/publicTracks.js +0 -14
  364. package/esm/ReExports/publicUi.d.ts +0 -4
  365. package/esm/ReExports/publicUi.js +0 -33
  366. package/esm/ReExports/publicUtil.d.ts +0 -1
  367. package/esm/ReExports/publicUtil.js +0 -32
  368. package/esm/ReExports/sharedModules.d.ts +0 -96
  369. package/esm/ReExports/sharedModules.js +0 -66
  370. package/esm/ReExports/workerNamespaceNames.d.ts +0 -11
  371. package/esm/ReExports/workerNamespaceNames.js +0 -275
  372. package/esm/pluggableElementTypes/models/HighlightsMixin.d.ts +0 -51
  373. package/esm/pluggableElementTypes/models/HighlightsMixin.js +0 -78
  374. package/esm/ui/highlightChipReveal.d.ts +0 -32
  375. package/esm/ui/highlightChipReveal.js +0 -39
  376. package/esm/util/adapterConfigKey.d.ts +0 -12
  377. package/esm/util/adapterConfigKey.js +0 -14
  378. package/esm/util/stopToken.d.ts +0 -212
  379. package/esm/util/stopToken.js +0 -438
package/README.md CHANGED
@@ -41,6 +41,18 @@ entry.
41
41
 
42
42
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
43
43
 
44
+ ### arraySlotUnion
45
+
46
+ The `ConfigurationSchemaUnion` an array slot's entries answer to, read off the
47
+ slot's MST type, or undefined for any other slot.
48
+
49
+ ```js
50
+ // type signature
51
+ (slotType: IAnyType) => ConfigurationSchemaUnionMetadata | undefined
52
+ ```
53
+
54
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchemaUnion.ts)
55
+
44
56
  ### Band
45
57
 
46
58
  One band of a display's vertical stack — a coverage histogram, an arc strip, a
@@ -93,9 +105,15 @@ backends upload and the Canvas2D twins index — entry `i` is the color at
93
105
  `t = i / (N - 1)`. N comes off the shader that samples it, so the table and
94
106
  `rampColor`'s texel mapping cannot disagree.
95
107
 
108
+ `mid` is where the stop list's own midpoint lands in the table, so a diverging
109
+ ramp whose middle colour belongs at a value off the centre of the domain is
110
+ baked into the bytes. Every reader — the shader, the Canvas2D fillStyle table,
111
+ the legend bar — then samples one evenly spaced table and cannot disagree about
112
+ the warp.
113
+
96
114
  ```js
97
115
  // type signature
98
- (stops: readonly ColorRampStop[]) => Uint8Array<ArrayBuffer>
116
+ (stops: readonly ColorRampStop[], mid?: number) => Uint8Array<ArrayBuffer>
99
117
  ```
100
118
 
101
119
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
@@ -103,33 +121,29 @@ backends upload and the Canvas2D twins index — entry `i` is the color at
103
121
  ### canonicalizeViewRefName
104
122
 
105
123
  Resolve user-authored refName text against the assembly of the view containing
106
- `node` — the one normalization layer, which resolves aliases and casing
107
- together. Falls back to the input when the assembly is absent or its aliases
108
- have not loaded.
124
+ `node`, resolving aliases and casing together. Falls back to the input when the
125
+ assembly is absent or its aliases have not loaded.
109
126
 
110
- Keyed off the VIEW's assembly rather than the track's, because the view is what
111
- the comparison is against: displayed regions, loaded regions and blocks all
112
- carry the refNames the view laid out.
127
+ Uses the view's assembly, not the track's, because displayed regions, loaded
128
+ regions and blocks all carry the refNames the view laid out.
113
129
 
114
- Reach for this wherever a refName a _person_ wrote is about to be compared
115
- against regions, features or blocks, which carry the assembly's canonical name.
116
- A refName a display copied off a region is canonical already and needs nothing;
117
- one that arrived in a session spec, a config slot or a URL is whatever the
118
- author read out of the location box.
130
+ Call it wherever a refName a _person_ wrote is about to be compared against
131
+ regions, features or blocks, which carry the assembly's canonical name. A
132
+ refName a display copied off a region is already canonical. One from a session
133
+ spec, a config slot or a URL is whatever the author typed.
119
134
 
120
- Skipping it fails silently and, worse, assembly-dependently: `chr12` matches on
121
- an assembly canonicalized `chr12` and matches nothing on one canonicalized `12`,
122
- so the same spec key works on one config and quietly does nothing on the next,
123
- with no error for anyone to act on.
135
+ Without it, matching depends on the assembly: `chr12` matches on an assembly
136
+ canonicalized `chr12` and matches nothing on one canonicalized `12`. The same
137
+ spec key works on one config and does nothing on the next, with no error.
124
138
 
125
- Resolves through `getCanonicalRefName2`, whose fallback is what keeps a spec
126
- read before the alias file has loaded from throwing — and the getters that read
127
- user specs do run from the first render.
139
+ Resolves through `getCanonicalRefName2`, which falls back to the input instead
140
+ of throwing when a spec is read before the alias file has loaded. The getters
141
+ that read user specs run from the first render.
128
142
 
129
- Takes a refName, not a spec that might hold one: the resolver reads
130
- `refName.toLowerCase()`, so anything else throws once the aliases are there, and
131
- a caller reading an untyped `frozen` slot has to establish that it names a
132
- refName at all before this is the right question to ask of it.
143
+ Takes a refName, not a spec that might hold one. The resolver calls
144
+ `refName.toLowerCase()`, so any other value throws once the aliases have loaded,
145
+ and a caller reading an untyped `frozen` slot must first check that the value is
146
+ a refName.
133
147
 
134
148
  ```js
135
149
  // type signature
@@ -138,15 +152,35 @@ refName at all before this is the right question to ask of it.
138
152
 
139
153
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
140
154
 
155
+ ### categoricalField
156
+
157
+ ```js
158
+ // type signature
159
+ (field: string, { domain, range, }?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; }) => CategoricalField
160
+ ```
161
+
162
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
163
+
164
+ ### CategoricalField
165
+
166
+ One categorical field as every channel reads it — a facet's sections, a color's
167
+ range entries, a key's rows. `key` files a value, `compare` orders keys (the
168
+ `domain` first, the rest by `compareGroupKeys`, `''` after them), `label` names
169
+ a key in a legend, `sectionLabel` on a chip, and `color` paints it. A key's
170
+ color depends only on the key and the declaration, so every region agrees on it.
171
+
172
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
173
+
141
174
  ### CategoricalRef
142
175
 
143
176
  A field bound to a categorical scale: each distinct value takes one entry of the
144
- channel's range — a palette entry for `color`, a glyph name for `glyph`. With a
145
- `domain`, the listed values take the range in that order and whatever else the
146
- region meets follows, sorted; without one each value derives its entry from
147
- itself (an integer takes the slot it names, anything else hashes in), so every
148
- region agrees on a value it shares with another at the cost of an occasional
149
- collision, and `domain` is the way to spend the range deliberately.
177
+ channel's `range` — a colour for `color`, a glyph name for `glyph`. Every value
178
+ derives its entry from itself (an integer takes the slot it names, anything else
179
+ hashes in), so every region agrees on a value it shares with another at the cost
180
+ of an occasional collision. A `domain` spends the range deliberately: the listed
181
+ values take it in order, and a value the domain leaves out never takes a listed
182
+ value's entry. The domain orders and spends; it never adds a value the data
183
+ lacks.
150
184
 
151
185
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
152
186
 
@@ -185,13 +219,24 @@ lands before React re-renders.
185
219
 
186
220
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandHeight.ts)
187
221
 
222
+ ### COLOR_SCHEMES
223
+
224
+ The named ramps a continuous colour scale's `scheme` takes, each one a stop
225
+ table in `colorRamp.ts` that every ramp baker reads, so no display can name a
226
+ scheme nothing bakes.
227
+
228
+ ```js
229
+ // type signature
230
+ readonly['viridis']
231
+ ```
232
+
233
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorSchemes.ts)
234
+
188
235
  ### ColorEncoding
189
236
 
190
237
  How a mark's `color` channel resolves. A CSS colour or a `jexl:` expression
191
- returning one paints per feature with no scale; the two object forms bind a
192
- field to a scale, which is what a legend can describe. A continuous scale reads
193
- the field through `domain` (the region's own extremes when absent) into `ramp`,
194
- and there a listed `domain` is what pins the answer across a whole view.
238
+ returning one paints per feature with no scale; the object forms bind a field to
239
+ a scale, which a legend can describe, and share the config's member names.
195
240
 
196
241
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
197
242
 
@@ -208,6 +253,19 @@ unscaled arm of ColorEncoding, on its own for a display that carries a plain
208
253
 
209
254
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
210
255
 
256
+ ### colorRampStops
257
+
258
+ The stops a continuous colour scale samples: `range`'s CSS colours where it
259
+ lists any, else the named `scheme`, viridis while that is unset, turned round
260
+ under `reverse`.
261
+
262
+ ```js
263
+ // type signature
264
+ ({ range, scheme, reverse, }: { range?: readonly string[] | undefined; scheme?: "viridis" | undefined; reverse?: boolean | undefined; }) => readonly ColorRampStop[]
265
+ ```
266
+
267
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
268
+
211
269
  ### ColorScaleTable
212
270
 
213
271
  The scale a colour channel was resolved through, as the legend reads it — the
@@ -216,6 +274,38 @@ the painting.
216
274
 
217
275
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
218
276
 
277
+ ### ColorSchemeName
278
+
279
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorSchemes.ts)
280
+
281
+ ### ConfigurationSchemaUnion
282
+
283
+ A list entry that is one of several configuration schemas, each keyed by the
284
+ `type` it answers to:
285
+ `types.array(ConfigurationSchemaUnion('Step', { filter, bin }))`. The keys are
286
+ the vocabulary, the snapshot's `type` picks the member, and a `type` naming no
287
+ member is refused in every build — where a bare `types.union` would load it as
288
+ its first member. Each member is an `explicitlyTyped`, `closed` schema named by
289
+ its key, so a key belonging to another member is refused rather than dropped;
290
+ one that is not throws here.
291
+
292
+ ```js
293
+ // type signature
294
+ <const MEMBERS extends Record<string, AnyConfigurationSchemaType>>(name: string, members: MEMBERS) => ConfigurationSchemaUnionType<MEMBERS>
295
+ ```
296
+
297
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchemaUnion.ts)
298
+
299
+ ### ContinuousRef
300
+
301
+ A numeric field read through a linear or log scale into a ramp. Each end of the
302
+ domain is pinned by `domainMin` or `domainMax`, or is the region's own extreme
303
+ where unset, so pinning both keeps colours consistent across a whole view. The
304
+ ramp is `range`'s CSS colours, evenly spaced, where it lists any, else the named
305
+ `scheme`; `reverse` turns it round.
306
+
307
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
308
+
219
309
  ### CoverageStep
220
310
 
221
311
  Replace the features with runs of constant depth: how many of them overlap each
@@ -285,11 +375,64 @@ transferables.
285
375
 
286
376
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
287
377
 
378
+ ### FacetedLayer
379
+
380
+ One layer of a faceted request: its features in section order, and the stacked
381
+ row of each, index for index.
382
+
383
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
384
+
385
+ ### facetLayers
386
+
387
+ A faceted request's layers: the features split on `field`'s key, each layer's
388
+ own steps run over each section alone, and the sections stacked — a section's
389
+ rows start where the one above it ends, and it is as tall as the tallest layer
390
+ packed it. Every layer's features come back in section order beside their
391
+ stacked rows, so a faceted display is the unfaceted one drawn once per section,
392
+ and a feature is handed on as its steps left it.
393
+
394
+ ```js
395
+ // type signature
396
+ (features: readonly Feature[], field: string, layers: readonly {…}[], jexl?: JexlInstance | undefined) => { ...; }
397
+ ```
398
+
399
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
400
+
401
+ ### FacetSection
402
+
403
+ One faceted section as the worker stacked it: its key, the row it starts on and
404
+ how many rows it holds.
405
+
406
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
407
+
408
+ ### FacetSpec
409
+
410
+ A row facet: split the features on `field`'s value, run every layer's own steps
411
+ over each section alone, and stack the sections, each starting on the row after
412
+ the one above it ends.
413
+
414
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
415
+
416
+ ### fieldReader
417
+
418
+ What a channel reads off a feature: a field by name, a dotted path into a
419
+ structured field where no field carries the whole name (`INFO.SVTYPE` on a VCF
420
+ record), or a `jexl:` expression over `feature`. A jexl expression that does not
421
+ compile throws here, once, rather than on every feature.
422
+
423
+ ```js
424
+ // type signature
425
+ (ref: string, jexl: JexlInstance | undefined) => (feature: Feature) => unknown
426
+ ```
427
+
428
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/fieldReader.ts)
429
+
288
430
  ### FieldRef
289
431
 
290
432
  Where a channel's value comes from: a feature field name, read natively
291
433
  (`feature.get(name)`), or a `jexl:` expression over `feature` — the opt-in
292
- escape, three orders of magnitude slower per feature.
434
+ escape, measured at 1.5x to 2.0x native per feature (MARK_ENCODING.md "The jexl
435
+ channel, measured").
293
436
 
294
437
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
295
438
 
@@ -347,7 +490,7 @@ track stores.
347
490
 
348
491
  ```js
349
492
  // type signature
350
- { (model: {…}): ModelSnapshotType<…>; <…>(model: {…}, slotPath: SLOT, args?: Record<…> | undefined): SLOT extends string ? ConfigurationSlotValue<…> : any; }
493
+ {…}
351
494
  ```
352
495
 
353
496
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
@@ -506,40 +649,62 @@ field took.
506
649
 
507
650
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
508
651
 
652
+ ### hitIndexOf
653
+
654
+ The hit index over `count` instances: each a box from `x` to `x2` at its `y`, or
655
+ at 0 for a mark with no value.
656
+
657
+ ```js
658
+ // type signature
659
+ (x: Uint32Array<ArrayBufferLike>, x2: Uint32Array<ArrayBufferLike>, y: Float32Array<ArrayBufferLike> | undefined, count?: number) => Flatbush
660
+ ```
661
+
662
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
663
+
509
664
  ### hydrateTrackConfig
510
665
 
511
666
  Hydrate a plain track config into a live config node, dispatching on its `type`
512
667
  to find the schema. `session.tracks` holds `types.frozen` plain objects until
513
- something references a track (ADR-031), so a caller handed one of those has a
514
- config that reads nothing but what was literally authored: a slot at its schema
515
- default is absent, `preProcessSnapshot` has not run, and nothing that walks a
516
- live node applies to it.
517
-
518
- For the callers that need the resolved answer rather than the authored one and
519
- cannot know which of the two they were handed. The About dialog's "Copy config"
520
- is the case this exists for: it is reached from two menus, and one of them
668
+ something references a track (ADR-031). One of those holds only what was
669
+ literally authored: a slot at its schema default is absent, `preProcessSnapshot`
670
+ has not run, and nothing that walks a live node applies to it.
671
+
672
+ Use it where a caller needs the resolved config and may be handed either form.
673
+ The About dialog's "Copy config" is reached from two menus, and one of them
521
674
  passes a `session.tracks` entry.
522
675
 
523
- Returns **undefined** rather than throwing when the config names a track type no
524
- plugin registered, or when it is invalid enough that `create` rejects it — an
525
- un-hydrated config has never been validated, so a dialog that opens over it must
526
- not be the thing that discovers this. Callers fall back to treating it as the
527
- plain object it is.
676
+ Returns **undefined** when the config names a track type no plugin registered,
677
+ or when `create` rejects it as invalid. An un-hydrated config has never been
678
+ validated, so the dialog opening over it should not throw. Callers fall back to
679
+ using the plain object.
528
680
 
529
681
  Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating the
530
- same entry twice returns the same node — and in admin/embedded sessions a track
531
- opened later resolves to that same node. A non-admin's open track does not: it
532
- resolves to the session's private working copy (ADR-032) and this is the
533
- pristine mirror beside it. The two agree in content, which is what the caller
534
- needs; `CopyConfigEntryPoints.test.ts` pins both halves.
682
+ same entry twice returns the same node, and in an admin session a track opened
683
+ later resolves to that same node. A non-admin's open track resolves to the
684
+ session's private working copy (ADR-032), and this function returns the pristine
685
+ mirror beside it. The two have the same content; `CopyConfigEntryPoints.test.ts`
686
+ tests both cases.
535
687
 
536
688
  ```js
537
689
  // type signature
538
- (pluginManager: PluginManager, config: Record<string, unknown>) => (ModelInstanceTypeProps<Record<string, any>> & { ...; } & IStateTreeNode<...>) | undefined
690
+ (pluginManager: PluginManager, config: Record<string, unknown>) => AnyConfigurationModel | undefined
539
691
  ```
540
692
 
541
693
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/configurationSchema.ts)
542
694
 
695
+ ### isPlainFieldRef
696
+
697
+ Whether a field ref is a bare name: what `feature.get` answers on its own, with
698
+ no path to walk and no expression to evaluate. A loop over a plain name keeps
699
+ the direct call, and only a config that writes a path pays for one.
700
+
701
+ ```js
702
+ // type signature
703
+ (ref: string) => ref is never
704
+ ```
705
+
706
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/fieldReader.ts)
707
+
543
708
  ### LaneName
544
709
 
545
710
  The lanes a caller asks the encoder to fill, beyond `x`, `x2` and
@@ -571,40 +736,119 @@ lanes the display's shape reads.
571
736
 
572
737
  ### MarkEncoding
573
738
 
574
- The declared mapping from a feature's fields to a mark's channels. `x` defaults
575
- to `start` and `x2` to `end`; a mark that plots no value leaves `y` off. `glyph`
576
- is read by the `point` shape alone, `row` — an integer field, 0 where missing —
577
- by the `span` shape, which stacks a feature on the band it names.
739
+ The declared mapping from a feature's fields to a mark's channels. Every
740
+ positional channel is a field: `x` defaults to `start` and `x2` to `end`, a mark
741
+ that plots no value leaves `y` off, and the scale `y` is read through belongs to
742
+ the display rather than to the encoding. `glyph` is read by the `point` shape
743
+ alone, `row` — an integer field, 0 where missing — by every shape, which stands
744
+ a feature in the band it names.
578
745
 
579
746
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
580
747
 
581
748
  ### MarkEncodingInput
582
749
 
583
750
  What `encodeFeatures` takes: a MarkEncoding, any channel of which may be a
584
- ChannelReader in place of its declared form. The declared form is what crosses
585
- the wire; a reader is built in the worker.
751
+ ChannelReader in place of its declared form, and `row` the values themselves,
752
+ one per input feature, where the caller computed them — a facet's stacked rows.
753
+ The declared form is what crosses the wire; a reader or a value list is built in
754
+ the worker.
586
755
 
587
756
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
588
757
 
589
758
  ### NO_VALUE_LABEL
590
759
 
591
- The key row a feature with nothing in a categorical field lands on, so the
592
- legend says why a mark is grey, or a disc, rather than listing a blank value.
760
+ The row a feature with nothing in a categorical field lands on, so a key says
761
+ why a mark is grey rather than listing a blank value.
593
762
 
594
763
  ```js
595
764
  // type signature
596
765
  '(no value)'
597
766
  ```
598
767
 
599
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
768
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
769
+
770
+ ### NOT_A_NUMBER_LABEL
771
+
772
+ The key a value holding text that is no number files under on a threshold scale,
773
+ painted the misconfiguration grey rather than passing for a missing value.
774
+
775
+ ```js
776
+ // type signature
777
+ '(not a number)'
778
+ ```
779
+
780
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
781
+
782
+ ### numericDomain
783
+
784
+ A domain written as strings — the shared `domain` slot is a `stringArray` — read
785
+ back as the numbers it names. A member that is not a number reads NaN, which
786
+ every comparison against it declines.
787
+
788
+ ```js
789
+ // type signature
790
+ (domain: readonly (string | number)[]) => number[]
791
+ ```
600
792
 
601
- ### RampRef
793
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
602
794
 
603
- The ramp a continuous colour scale samples: a named ramp, or evenly spaced CSS
604
- colour stops.
795
+ ### PileupStep
796
+
797
+ Assign every feature the lowest row on which it overlaps nothing already there —
798
+ greedy first fit in start order, the packing a pileup is — and write it to the
799
+ field `as` (`row`). `fields` names the interval read (`start`, `end`); `padding`
800
+ is bp of clearance kept between two features sharing a row. The answer is the
801
+ input in start order, so a `span` encoding `row` stacks it. Under a facet it
802
+ packs each section on its own.
605
803
 
606
804
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
607
805
 
806
+ ### preProcessConfigSnapshot
807
+
808
+ A snapshot as `type` admits it: the same lift and checks `type.create` applies,
809
+ so a dialog or a validator refuses exactly what a config file cannot hold.
810
+ Throws what the schema's `preProcessSnapshot` throws.
811
+
812
+ ```js
813
+ // type signature
814
+ (type: IAnyType, snapshot: unknown) => Record<string, unknown>
815
+ ```
816
+
817
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/snapshotPreprocess.ts)
818
+
819
+ ### rampDomain
820
+
821
+ The domain a continuous colour scale spans: each end `min` or `max` pins, else
822
+ the extent's, ascending, since a span has no direction and `reverse` is the
823
+ ramp's. An open end stops at a pinned one rather than crossing it, and an extent
824
+ holding no value (`[Infinity, -Infinity]`) spans [0, 1].
825
+
826
+ ```js
827
+ // type signature
828
+ (min: number | undefined, max: number | undefined, extent: readonly [number, number]) => [number, number]
829
+ ```
830
+
831
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
832
+
833
+ ### rampOverExtent
834
+
835
+ A ramp table over `extent`, the union a display took across the regions it
836
+ loaded: each open end of the domain moved to the union's, the pinned ends kept,
837
+ and the table baked again where a `domainMid` places its middle stop by that
838
+ domain. Each region baked its own, so keeping the first region's put the middle
839
+ colour at a value none of them declared.
840
+
841
+ One table per stop list and middle position, so a display asking again over an
842
+ extent that has not moved gets the bytes it already uploaded: a backend
843
+ re-uploads a ramp on identity.
844
+
845
+ ```js
846
+ // type signature
847
+ (table: {…}, extent: [...]) => { ...; }
848
+ ```
849
+
850
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
851
+
608
852
  ### readConfObject
609
853
 
610
854
  Given a configuration model (an instance of a ConfigurationSchema), read the
@@ -629,25 +873,6 @@ indistinguishable at runtime from the broken spelling.
629
873
 
630
874
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
631
875
 
632
- ### readConfSlot
633
-
634
- Read a single config slot from a config that may be **either** a live MST node
635
- or a plain snapshot object, evaluating the value if it is a `jexl:` expression.
636
- For the dialogs and panels that are handed a track config without knowing which
637
- of the two they got. An About panel gets a hydrated track config from the
638
- session and a bare object from an embedded caller.
639
-
640
- Reach for `readConfObject` or `readConfigValue` when the shape is known: this
641
- one decides at runtime, and the plain branch inherits the snapshot caveat (a
642
- slot at its default is absent from a snapshot, so it reads `undefined`).
643
-
644
- ```js
645
- // type signature
646
- <…>(config: Record<…> | (ModelInstanceTypeProps<…> & {…} & IStateTreeNode<…>), slotPath: string | string[], args?: Record<…>, jexl?: JexlInstance | undefined) => T
647
- ```
648
-
649
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
650
-
651
876
  ### relight
652
877
 
653
878
  Move a color's OKLCH lightness by `lightnessShift` and scale its chroma, holding
@@ -675,6 +900,20 @@ has to read as one tone across the whole palette or it reads as noise.
675
900
 
676
901
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/color/index.ts)
677
902
 
903
+ ### requirementProblems
904
+
905
+ The `requires` entries of a configuration schema that `snapshot` does not meet,
906
+ as a config file or `getSnapshot` spells it: a slot left off reads as its
907
+ default, so a `when` value that is the default fires for an absent slot, which
908
+ is what the generated JSON Schema's `if` does.
909
+
910
+ ```js
911
+ // type signature
912
+ (type: IAnyType, snapshot: Record<string, unknown>) => RequirementProblem[]
913
+ ```
914
+
915
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/requirements.ts)
916
+
678
917
  ### reservedPx
679
918
 
680
919
  The pixels a band takes from the plot below it: 0 when off, the (optionally
@@ -747,11 +986,9 @@ Make JBrowse follow the host's light/dark state — the whole of it, in one moun
747
986
  </SessionPaletteProvider>
748
987
  ```
749
988
 
750
- `mode` is optional. Left out, JBrowse follows `prefers-color-scheme` and
751
- re-themes when the OS preference changes, through the same session write an
752
- explicit mode takes — so a host whose dark mode _is_ the OS preference mounts
753
- this with a session and nothing else. Pass a mode as soon as the host has a
754
- toggle of its own, since the media query cannot see it.
989
+ `mode` is optional. Left out, JBrowse follows the page's declared `color-scheme`
990
+ — so a host whose dark-mode toggle sets it, as most do, mounts this with a
991
+ session and nothing else — and the OS preference where the page declares none.
755
992
 
756
993
  A component rather than a documented pair of calls because the pair has a half
757
994
  that can be left out with nothing to show for it. `PaletteProvider` is the name
@@ -773,8 +1010,16 @@ colors of its own mounts `PaletteProvider` directly instead.
773
1010
 
774
1011
  ### setConf
775
1012
 
776
- Write counterpart to `getConf`: sets a slot on a state model that has a
777
- `.configuration` member (a track or display state model).
1013
+ Write counterpart to `getConf`, and it takes the same path: a slot name, or an
1014
+ array naming a sub-schema's member at any depth —
1015
+ `setConf(self, ['scales', 'y', 'domainMin'], 5)`. Takes the display or track
1016
+ model, or a config node directly.
1017
+
1018
+ **The path length says what the write replaces.** A path ending on a slot writes
1019
+ that slot and leaves the object around it alone; a path ending on a sub-schema
1020
+ replaces the whole object, which is how a channel whose members move together —
1021
+ a facet's field and the domain that field's values order — gets written without
1022
+ a stale member surviving underneath.
778
1023
 
779
1024
  **Prefer this over a bare `self.configuration.setSlot('x', v)`.** The constraint
780
1025
  here mirrors `getConf`'s, so on a model with a concrete schema an unknown slot
@@ -799,7 +1044,7 @@ the declared slot value type doesn't include it.
799
1044
 
800
1045
  ```js
801
1046
  // type signature
802
- <CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<…> = ConfigurationSlotName<…>>(model: { ...; }, slotName: SLOT, value: unknown) => void
1047
+ <…>(target: CONFMODEL | { ...; }, slotPath: SLOT, value: unknown) => void
803
1048
  ```
804
1049
 
805
1050
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
@@ -807,12 +1052,11 @@ the declared slot value type doesn't include it.
807
1052
  ### stackBands
808
1053
 
809
1054
  Fold an ordered set of bands into tops and a bottom. The order is the argument,
810
- so a display states its band order exactly once; reserve, paint and pick all
811
- read the same fold, which is what keeps "the reserver and the painter read one
812
- function" true by construction rather than by prose.
1055
+ so a display states its band order exactly once. Reserve, paint and pick all
1056
+ call this function, so the reserved and painted positions cannot disagree.
813
1057
 
814
- Only the fold is shared. What varies per display stays there: per-lane iteration
815
- runs this once per lane, sticky-vs-scrolling is a property of how the result is
1058
+ Only the fold is shared; the rest stays in each display. Per-lane iteration runs
1059
+ this once per lane, sticky-vs-scrolling is a property of how the result is
816
1060
  projected to the screen, and a band drawn outside its reservation (an overlay)
817
1061
  carries its own draw rect beside the stack.
818
1062
 
@@ -823,17 +1067,6 @@ carries its own draw rect beside the stack.
823
1067
 
824
1068
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/bandLayout.ts)
825
1069
 
826
- ### StackStep
827
-
828
- Assign every feature the lowest row on which it overlaps nothing already there —
829
- greedy first fit in start order, the packing a pileup is — and write it to the
830
- field `as` (`row`). `fields` names the interval read (`start`, `end`); `padding`
831
- is bp of clearance kept between two features sharing a row; `groupby` packs each
832
- distinct value set on its own rows, each numbered from 0. The answer is the
833
- input in start order, so a `span` encoding `row` stacks it.
834
-
835
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
836
-
837
1070
  ### stopsFromRampLut
838
1071
 
839
1072
  `n` evenly spaced legend stops read straight out of a buildColorRampLut byte
@@ -850,40 +1083,96 @@ never baked into the color string.
850
1083
 
851
1084
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
852
1085
 
853
- ### TransformStep
1086
+ ### STRAND_FIELD
854
1087
 
855
- One step over the features before a layer is encoded, named by `type` the way
856
- GenomeSpy spells a transform; every step runs in order and the next reads what
857
- the last answered.
1088
+ ```js
1089
+ // type signature
1090
+ 'strand'
1091
+ ```
858
1092
 
859
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1093
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
1094
+
1095
+ ### thresholdCuts
1096
+
1097
+ A threshold scale's cut points as thresholdIndex walks them: the numbers the
1098
+ domain names, ascending. Cuts written high to low, as p-value thresholds often
1099
+ are, left the middle interval unreachable, the walk stopping at the first cut a
1100
+ value is under.
1101
+
1102
+ ```js
1103
+ // type signature
1104
+ (domain: readonly (string | number)[]) => number[]
1105
+ ```
860
1106
 
861
- ### ValueEncoding
1107
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
862
1108
 
863
- How a mark's `y` channel resolves: a feature field (or `jexl:` expression) read
864
- on a linear scale over the loaded regions' extremes, or the same field with the
865
- scale spelled out — `log` to read the domain logarithmically, `domain` to pin
866
- `[min, max]` instead of autoscaling. The declaration is the one owner: the
867
- display's axis, its ticks and the shader's placement are all resolved from it.
1109
+ ### thresholdField
868
1110
 
869
- `resolve` is which axis the mark reads. `shared` — the default — folds it into
870
- the display's one y domain with every other mark. `independent` gives it a
871
- domain folded from its layers alone and a second axis on the right, so a
872
- coverage run and the raw features can share a plot; one mark per display may ask
873
- for it.
1111
+ A threshold scale read the way every categorical channel reads its field: a
1112
+ value files under the label of the bin it falls in, a feature with no value
1113
+ under `''`, and text that is no number under NOT_A_NUMBER_LABEL. The bins are
1114
+ the whole domain, so a key lists each one.
874
1115
 
875
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1116
+ ```js
1117
+ // type signature
1118
+ (field: string, { domain, range, }?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; }) => CategoricalField
1119
+ ```
876
1120
 
877
- ### valueField
1121
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
878
1122
 
879
- The field a `y` declaration reads, whichever of its two forms it is written in.
1123
+ ### thresholdIndex
1124
+
1125
+ The bin a value falls in: how many of the ascending cut points it is at or past,
1126
+ so a palette with one more entry than the domain paints it as
1127
+ `palette[thresholdIndex(value, domain)]`. A value that is not a finite number is
1128
+ in no bin and answers -1.
880
1129
 
881
1130
  ```js
882
1131
  // type signature
883
- (y: ValueEncoding) => string
1132
+ (value: unknown, domain: readonly number[]) => number
884
1133
  ```
885
1134
 
886
- [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
1135
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1136
+
1137
+ ### thresholdLabels
1138
+
1139
+ What a threshold scale's bins are called in a key, one label per palette entry:
1140
+ `< a` below the first cut, `a – b` between two, `≥ b` past the last.
1141
+
1142
+ ```js
1143
+ // type signature
1144
+ (domain: readonly number[]) => string[]
1145
+ ```
1146
+
1147
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1148
+
1149
+ ### thresholdPalette
1150
+
1151
+ The colour of each interval, in order: the declared palette, and the default
1152
+ categorical palette where it runs out.
1153
+
1154
+ ```js
1155
+ // type signature
1156
+ (bins: number, palette?: readonly string[]) => string[]
1157
+ ```
1158
+
1159
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
1160
+
1161
+ ### ThresholdRef
1162
+
1163
+ A numeric field cut into intervals: `domain` is the ascending cut points and
1164
+ `range` holds one colour more, so a value paints the entry for the number of cut
1165
+ points it is at or past. A value that is not a number belongs to no interval.
1166
+
1167
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1168
+
1169
+ ### TransformStep
1170
+
1171
+ One step over the features before a layer is encoded, named by `type` the way
1172
+ GenomeSpy spells a transform; every step runs in order and the next reads what
1173
+ the last answered.
1174
+
1175
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
887
1176
 
888
1177
  ### VIRIDIS_STOPS
889
1178
 
@@ -897,4 +1186,12 @@ readonly ColorRampStop[]
897
1186
 
898
1187
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
899
1188
 
1189
+ ### ZoomRange
1190
+
1191
+ The bp/px interval, `[minBpPerPx, maxBpPerPx)`, over which an adapter with zoom
1192
+ levels answers a fetch from the same level it answered `opts.bpPerPx` from. A
1193
+ display holding the answer refetches when the view leaves it.
1194
+
1195
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/zoomRange.ts)
1196
+
900
1197
  <!-- API_DOCS_END -->