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

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 (439) hide show
  1. package/README.md +450 -132
  2. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
  3. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
  4. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +6 -2
  5. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +18 -3
  6. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.d.ts +2 -1
  7. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.js +4 -2
  8. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -1
  9. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +4 -2
  10. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.d.ts +2 -1
  11. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.js +4 -2
  12. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +5 -4
  13. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +6 -4
  14. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -1
  15. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +4 -2
  16. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +3 -2
  17. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +4 -2
  18. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +2 -2
  19. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.d.ts +3 -2
  20. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.js +4 -2
  21. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +3 -2
  22. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +4 -2
  23. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +3 -2
  24. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +4 -2
  25. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.d.ts +3 -2
  26. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +4 -2
  27. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +3 -2
  28. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +4 -2
  29. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
  30. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +4 -2
  31. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +3 -2
  32. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js +4 -2
  33. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.d.ts +3 -2
  34. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.js +4 -2
  35. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -1
  36. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +15 -24
  37. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -1
  38. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
  39. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
  40. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
  41. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.d.ts +3 -1
  42. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.js +2 -2
  43. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
  44. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
  45. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
  46. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
  47. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
  48. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
  49. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
  50. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
  51. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +4 -2
  52. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +29 -20
  53. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
  54. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
  55. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +3 -3
  56. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
  57. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +9 -0
  58. package/esm/BaseFeatureWidget/stateModelFactory.js +11 -0
  59. package/esm/BaseFeatureWidget/types.d.ts +2 -0
  60. package/esm/PluginManager.d.ts +7 -3
  61. package/esm/PluginManager.js +12 -3
  62. package/esm/ReExports/coreModules.generated.js +538 -518
  63. package/esm/ReExports/coreWorkerModules.generated.js +456 -438
  64. package/esm/ReExports/lazify.js +3 -2
  65. package/esm/ReExports/list.js +22 -6
  66. package/esm/ReExports/names.d.ts +1 -0
  67. package/esm/ReExports/names.generated.d.ts +2 -0
  68. package/esm/ReExports/names.generated.js +566 -0
  69. package/esm/ReExports/names.js +3 -0
  70. package/esm/TextSearch/TextSearchManager.d.ts +3 -3
  71. package/esm/TextSearch/TextSearchManager.js +6 -13
  72. package/esm/assemblyManager/assembly.d.ts +9 -0
  73. package/esm/assemblyManager/assembly.js +13 -0
  74. package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
  75. package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
  76. package/esm/assemblyManager/assemblyManager.d.ts +11 -0
  77. package/esm/assemblyManager/assemblyManager.js +2 -0
  78. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
  79. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
  80. package/esm/checkPlugins.js +10 -4
  81. package/esm/configuration/configurationSchema.d.ts +51 -100
  82. package/esm/configuration/configurationSchema.js +59 -225
  83. package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
  84. package/esm/configuration/configurationSchemaUnion.js +2 -1
  85. package/esm/configuration/configurationSlot.d.ts +18 -64
  86. package/esm/configuration/configurationSlot.js +32 -98
  87. package/esm/configuration/fillLocations.d.ts +4 -2
  88. package/esm/configuration/fillLocations.js +9 -3
  89. package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
  90. package/esm/configuration/formatAboutConfigSchema.js +2 -2
  91. package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
  92. package/esm/configuration/formatDetailsConfigSchema.js +7 -5
  93. package/esm/configuration/getConf.d.ts +7 -36
  94. package/esm/configuration/getConf.js +20 -41
  95. package/esm/configuration/index.d.ts +4 -3
  96. package/esm/configuration/index.js +3 -2
  97. package/esm/configuration/partitionAdvanced.d.ts +12 -0
  98. package/esm/configuration/partitionAdvanced.js +42 -0
  99. package/esm/configuration/plot.d.ts +6 -0
  100. package/esm/configuration/plot.js +56 -9
  101. package/esm/configuration/readConfObject.d.ts +15 -17
  102. package/esm/configuration/readConfObject.js +19 -50
  103. package/esm/configuration/schemaRegistry.d.ts +0 -2
  104. package/esm/configuration/schemaTypes.js +5 -1
  105. package/esm/configuration/slotFacade.js +2 -2
  106. package/esm/configuration/snapshotPreprocess.d.ts +42 -18
  107. package/esm/configuration/snapshotPreprocess.js +95 -37
  108. package/esm/configuration/tabixShorthand.js +1 -3
  109. package/esm/configuration/types.d.ts +60 -159
  110. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
  111. package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
  112. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
  113. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
  114. package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
  115. package/esm/data_adapters/BaseAdapter/index.js +0 -1
  116. package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
  117. package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
  118. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
  119. package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
  120. package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
  121. package/esm/data_adapters/dataAdapterCache.js +68 -24
  122. package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
  123. package/esm/data_adapters/getFeatureAdapter.js +17 -0
  124. package/esm/pluggableElementTypes/DisplayType.d.ts +7 -0
  125. package/esm/pluggableElementTypes/DisplayType.js +7 -0
  126. package/esm/pluggableElementTypes/RpcMethodType.d.ts +7 -0
  127. package/esm/pluggableElementTypes/RpcMethodType.js +9 -0
  128. package/esm/pluggableElementTypes/addMenuItems.d.ts +2 -1
  129. package/esm/pluggableElementTypes/addMenuItems.js +2 -1
  130. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
  131. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
  132. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -5
  133. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +57 -9
  134. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -7
  135. package/esm/pluggableElementTypes/models/BaseTrackModel.js +9 -10
  136. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
  137. package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
  138. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
  139. package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
  140. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
  141. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
  142. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
  143. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
  144. package/esm/pluggableElementTypes/models/baseTrackConfig.js +12 -1
  145. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
  146. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
  147. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
  148. package/esm/pluginDefinitions.d.ts +7 -0
  149. package/esm/pluginDefinitions.js +20 -0
  150. package/esm/rpc/RpcRegistry.d.ts +2 -11
  151. package/esm/rpc/byteBudget.d.ts +15 -0
  152. package/esm/rpc/byteBudget.js +23 -0
  153. package/esm/rpc/configSchema.d.ts +2 -0
  154. package/esm/rpc/configSchema.js +3 -1
  155. package/esm/rpc/coreRpcMethods.d.ts +1 -2
  156. package/esm/rpc/coreRpcMethods.js +1 -2
  157. package/esm/rpc/explainTransferError.js +3 -3
  158. package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
  159. package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
  160. package/esm/rpc/methods/CoreLoadTrackCode.d.ts +17 -0
  161. package/esm/rpc/methods/CoreLoadTrackCode.js +24 -0
  162. package/esm/rpc/methods/layerFeatures.d.ts +9 -6
  163. package/esm/rpc/methods/layerFeatures.js +21 -5
  164. package/esm/ui/ActionLink.d.ts +3 -2
  165. package/esm/ui/ActionLink.js +4 -2
  166. package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
  167. package/esm/ui/AddCustomPluginDialog.js +6 -4
  168. package/esm/ui/AppLogo.js +43 -3
  169. package/esm/ui/BaseTooltip.d.ts +3 -2
  170. package/esm/ui/BaseTooltip.js +4 -2
  171. package/esm/ui/CascadingMenu.js +14 -12
  172. package/esm/ui/CascadingMenuButton.d.ts +2 -2
  173. package/esm/ui/CascadingMenuButton.js +5 -4
  174. package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
  175. package/esm/ui/CascadingMenuHelpDialog.js +4 -2
  176. package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
  177. package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
  178. package/esm/ui/ColorPicker.d.ts +5 -4
  179. package/esm/ui/ColorPicker.js +6 -4
  180. package/esm/ui/ContextMenu.d.ts +1 -1
  181. package/esm/ui/ContextMenu.js +1 -1
  182. package/esm/ui/CopyToClipboardButton.d.ts +3 -2
  183. package/esm/ui/CopyToClipboardButton.js +4 -2
  184. package/esm/ui/Crosshairs.js +13 -10
  185. package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
  186. package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
  187. package/esm/ui/DataGridFlexContainer.d.ts +3 -2
  188. package/esm/ui/DataGridFlexContainer.js +4 -2
  189. package/esm/ui/Dialog.d.ts +1 -1
  190. package/esm/ui/Dialog.js +5 -4
  191. package/esm/ui/DropDownMenu.js +2 -2
  192. package/esm/ui/EditableTypography.d.ts +1 -1
  193. package/esm/ui/EditableTypography.js +3 -2
  194. package/esm/ui/ErrorActions.d.ts +3 -2
  195. package/esm/ui/ErrorActions.js +4 -2
  196. package/esm/ui/ErrorBanner.d.ts +2 -2
  197. package/esm/ui/ErrorBanner.js +3 -2
  198. package/esm/ui/ErrorBar.d.ts +3 -2
  199. package/esm/ui/ErrorBar.js +4 -2
  200. package/esm/ui/ErrorMessage.d.ts +3 -2
  201. package/esm/ui/ErrorMessage.js +4 -2
  202. package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
  203. package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
  204. package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
  205. package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
  206. package/esm/ui/ErrorOverlay.d.ts +3 -2
  207. package/esm/ui/ErrorOverlay.js +4 -2
  208. package/esm/ui/ExportSvgDialog.d.ts +3 -2
  209. package/esm/ui/ExportSvgDialog.js +4 -2
  210. package/esm/ui/ExternalLink.d.ts +2 -1
  211. package/esm/ui/ExternalLink.js +4 -2
  212. package/esm/ui/FactoryResetDialog.d.ts +3 -2
  213. package/esm/ui/FactoryResetDialog.js +4 -2
  214. package/esm/ui/FatalErrorDialog.d.ts +3 -2
  215. package/esm/ui/FatalErrorDialog.js +6 -4
  216. package/esm/ui/FileDropZone.d.ts +3 -2
  217. package/esm/ui/FileDropZone.js +4 -2
  218. package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
  219. package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
  220. package/esm/ui/FileSelector/LocationInput.js +4 -2
  221. package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
  222. package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
  223. package/esm/ui/GpuFallbackButton.d.ts +3 -2
  224. package/esm/ui/GpuFallbackButton.js +4 -2
  225. package/esm/ui/HoverMenu.d.ts +2 -2
  226. package/esm/ui/HoverMenu.js +7 -3
  227. package/esm/ui/HoverTooltip.d.ts +3 -2
  228. package/esm/ui/HoverTooltip.js +4 -2
  229. package/esm/ui/Icons.d.ts +5 -5
  230. package/esm/ui/Icons.js +11 -10
  231. package/esm/ui/InlineMenuControls.d.ts +2 -2
  232. package/esm/ui/InlineMenuControls.js +4 -3
  233. package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
  234. package/esm/ui/JexlFilterRowEditors.js +9 -8
  235. package/esm/ui/LabeledCheckbox.d.ts +3 -2
  236. package/esm/ui/LabeledCheckbox.js +4 -2
  237. package/esm/ui/LazyBaseTooltip.d.ts +12 -3
  238. package/esm/ui/LazyBaseTooltip.js +4 -2
  239. package/esm/ui/LegendSwatchGlyph.js +1 -0
  240. package/esm/ui/LoadingDots.d.ts +2 -1
  241. package/esm/ui/LoadingDots.js +4 -2
  242. package/esm/ui/LoadingEllipses.d.ts +5 -2
  243. package/esm/ui/LoadingEllipses.js +5 -3
  244. package/esm/ui/LoadingOverlay.d.ts +3 -2
  245. package/esm/ui/LoadingOverlay.js +4 -2
  246. package/esm/ui/LoadingProgress.d.ts +3 -2
  247. package/esm/ui/LoadingProgress.js +4 -2
  248. package/esm/ui/Logo.d.ts +2 -2
  249. package/esm/ui/Logo.js +9 -8
  250. package/esm/ui/MenuItemChevron.d.ts +2 -2
  251. package/esm/ui/MenuItemChevron.js +3 -2
  252. package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
  253. package/esm/ui/MenuItemEndDecoration.js +3 -2
  254. package/esm/ui/MenuItemTrailing.d.ts +2 -2
  255. package/esm/ui/MenuItemTrailing.js +7 -6
  256. package/esm/ui/MenuTypes.d.ts +21 -1
  257. package/esm/ui/MenuTypes.js +20 -0
  258. package/esm/ui/MonospaceTextField.d.ts +3 -2
  259. package/esm/ui/MonospaceTextField.js +4 -2
  260. package/esm/ui/NumberTextField.d.ts +2 -2
  261. package/esm/ui/NumberTextField.js +4 -2
  262. package/esm/ui/PaletteContext.d.ts +11 -9
  263. package/esm/ui/PaletteContext.js +33 -18
  264. package/esm/ui/PluginStoreCard.d.ts +3 -2
  265. package/esm/ui/PluginStoreCard.js +4 -2
  266. package/esm/ui/PopoverPicker.d.ts +3 -2
  267. package/esm/ui/PopoverPicker.js +4 -2
  268. package/esm/ui/PrerenderedCanvas.d.ts +2 -2
  269. package/esm/ui/PrerenderedCanvas.js +3 -2
  270. package/esm/ui/RedErrorMessageBox.d.ts +3 -2
  271. package/esm/ui/RedErrorMessageBox.js +4 -2
  272. package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
  273. package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
  274. package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
  275. package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
  276. package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
  277. package/esm/ui/ReplaceCurrentViewButton.js +4 -2
  278. package/esm/ui/ResizeHandle.d.ts +2 -2
  279. package/esm/ui/ResizeHandle.js +3 -2
  280. package/esm/ui/SanitizedHTML.d.ts +3 -2
  281. package/esm/ui/SanitizedHTML.js +6 -4
  282. package/esm/ui/ScrollChrome.d.ts +3 -2
  283. package/esm/ui/ScrollChrome.js +4 -2
  284. package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
  285. package/esm/ui/ScrollEdgeShadow.js +2 -2
  286. package/esm/ui/SessionJsonPanel.d.ts +3 -2
  287. package/esm/ui/SessionJsonPanel.js +4 -2
  288. package/esm/ui/ShareLinkField.d.ts +3 -2
  289. package/esm/ui/ShareLinkField.js +4 -2
  290. package/esm/ui/SingleSlider.d.ts +2 -2
  291. package/esm/ui/SingleSlider.js +4 -2
  292. package/esm/ui/SliderTooltip.d.ts +2 -1
  293. package/esm/ui/SliderTooltip.js +4 -2
  294. package/esm/ui/SnackbarContents.d.ts +3 -2
  295. package/esm/ui/SnackbarContents.js +4 -2
  296. package/esm/ui/SnackbarModel.d.ts +2 -0
  297. package/esm/ui/SnackbarModel.js +2 -0
  298. package/esm/ui/StackTraceButton.d.ts +3 -2
  299. package/esm/ui/StackTraceButton.js +4 -2
  300. package/esm/ui/StatusProgressBar.d.ts +3 -2
  301. package/esm/ui/StatusProgressBar.js +4 -2
  302. package/esm/ui/SubmitForm.d.ts +2 -1
  303. package/esm/ui/SubmitForm.js +4 -2
  304. package/esm/ui/SvgColorLegend.d.ts +3 -4
  305. package/esm/ui/SvgColorLegend.js +27 -18
  306. package/esm/ui/TagTextField.d.ts +2 -2
  307. package/esm/ui/TagTextField.js +4 -2
  308. package/esm/ui/ViewLoadingScreen.d.ts +3 -2
  309. package/esm/ui/ViewLoadingScreen.js +4 -2
  310. package/esm/ui/buildExtraTrackMenuItems.d.ts +2 -2
  311. package/esm/ui/colorScale.d.ts +5 -1
  312. package/esm/ui/colorScale.js +12 -10
  313. package/esm/ui/colors.d.ts +42 -31
  314. package/esm/ui/colors.js +85 -48
  315. package/esm/ui/filterMenuItems.d.ts +10 -31
  316. package/esm/ui/filterMenuItems.js +13 -14
  317. package/esm/ui/index.d.ts +1 -1
  318. package/esm/ui/index.js +1 -1
  319. package/esm/ui/launchTargetsMenuItem.js +9 -13
  320. package/esm/ui/legendMenuItem.d.ts +4 -4
  321. package/esm/ui/legendMenuItem.js +4 -4
  322. package/esm/ui/menuItemAdornment.d.ts +1 -1
  323. package/esm/ui/menuItemAdornment.js +1 -1
  324. package/esm/ui/menuItems.d.ts +1 -1
  325. package/esm/ui/menuItems.js +1 -1
  326. package/esm/ui/menuLabels.d.ts +2 -2
  327. package/esm/ui/menuLabels.js +2 -2
  328. package/esm/ui/multiTrackMenuItems.d.ts +2 -2
  329. package/esm/ui/palette.d.ts +2 -2
  330. package/esm/ui/palette.js +10 -10
  331. package/esm/ui/radioSubMenu.d.ts +5 -3
  332. package/esm/ui/radioSubMenu.js +2 -2
  333. package/esm/ui/rampKey.d.ts +15 -0
  334. package/esm/ui/rampKey.js +17 -0
  335. package/esm/ui/showSubMenu.d.ts +0 -5
  336. package/esm/ui/showSubMenu.js +6 -15
  337. package/esm/ui/theme.d.ts +2 -2
  338. package/esm/ui/theme.js +1 -1
  339. package/esm/ui/useAssemblySelection.d.ts +2 -0
  340. package/esm/ui/useMouseTracking.d.ts +8 -20
  341. package/esm/ui/useMouseTracking.js +23 -62
  342. package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
  343. package/esm/ui/usePlacedMenuFocus.js +28 -0
  344. package/esm/util/Base1DViewModel.d.ts +5 -3
  345. package/esm/util/Base1DViewModel.js +5 -3
  346. package/esm/util/SvgCanvas.js +1 -1
  347. package/esm/util/aggregateFieldName.d.ts +1 -10
  348. package/esm/util/aggregateFieldName.js +1 -8
  349. package/esm/util/alignedBytes.d.ts +19 -0
  350. package/esm/util/alignedBytes.js +37 -0
  351. package/esm/util/analytics.d.ts +6 -9
  352. package/esm/util/analytics.js +148 -15
  353. package/esm/util/bezierConnector.d.ts +20 -0
  354. package/esm/util/bezierConnector.js +34 -96
  355. package/esm/util/cacheBudgets.d.ts +3 -0
  356. package/esm/util/cacheBudgets.js +3 -0
  357. package/esm/util/categoricalField.d.ts +24 -4
  358. package/esm/util/categoricalField.js +38 -5
  359. package/esm/util/cellMatches.js +14 -14
  360. package/esm/util/cellsStep.d.ts +3 -5
  361. package/esm/util/cellsStep.js +31 -29
  362. package/esm/util/color/index.d.ts +1 -1
  363. package/esm/util/color/index.js +2 -2
  364. package/esm/util/color-bits/bit.js +1 -1
  365. package/esm/util/color-bits/parse.js +28 -17
  366. package/esm/util/colorBits.d.ts +15 -4
  367. package/esm/util/colorBits.js +38 -15
  368. package/esm/util/colorRamp.d.ts +3 -3
  369. package/esm/util/colorRamp.js +20 -2
  370. package/esm/util/colorScale.d.ts +123 -22
  371. package/esm/util/colorScale.js +157 -28
  372. package/esm/util/colorSchemes.d.ts +7 -3
  373. package/esm/util/colorSchemes.js +8 -2
  374. package/esm/util/createSvgRasterCanvas.d.ts +14 -1
  375. package/esm/util/createSvgRasterCanvas.js +36 -12
  376. package/esm/util/diagonalizeRegions.js +18 -9
  377. package/esm/util/featureTransforms.d.ts +2 -2
  378. package/esm/util/featureTransforms.js +85 -135
  379. package/esm/util/fileHandleStore.js +5 -0
  380. package/esm/util/groupKeys.d.ts +5 -4
  381. package/esm/util/groupKeys.js +15 -9
  382. package/esm/util/index.js +1 -1
  383. package/esm/util/installFetch.d.ts +2 -2
  384. package/esm/util/installPrerequisiteFetch.d.ts +8 -3
  385. package/esm/util/installPrerequisiteFetch.js +9 -7
  386. package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
  387. package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
  388. package/esm/util/isoformRank.d.ts +39 -0
  389. package/esm/util/isoformRank.js +118 -0
  390. package/esm/util/jexl.js +1 -1
  391. package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
  392. package/esm/util/layouts/GranularRectLayout.js +57 -34
  393. package/esm/util/leadingEdgeAutorun.d.ts +9 -1
  394. package/esm/util/leadingEdgeAutorun.js +5 -2
  395. package/esm/util/markEncoding.d.ts +10 -8
  396. package/esm/util/markEncoding.js +50 -12
  397. package/esm/util/markEncodingTypes.d.ts +77 -21
  398. package/esm/util/originCut.d.ts +14 -0
  399. package/esm/util/originCut.js +19 -0
  400. package/esm/util/paintLayer.d.ts +1 -1
  401. package/esm/util/paintLayer.js +4 -3
  402. package/esm/util/pathSeries.d.ts +18 -0
  403. package/esm/util/pathSeries.js +143 -0
  404. package/esm/util/pressOwner.d.ts +20 -0
  405. package/esm/util/pressOwner.js +26 -0
  406. package/esm/util/quantileExtent.d.ts +23 -1
  407. package/esm/util/quantileExtent.js +25 -2
  408. package/esm/util/rowStackGeometry.d.ts +1 -1
  409. package/esm/util/rowStackGeometry.js +1 -1
  410. package/esm/util/sessionActivity.d.ts +36 -0
  411. package/esm/util/sessionActivity.js +88 -0
  412. package/esm/util/stepOutputs.d.ts +165 -0
  413. package/esm/util/stepOutputs.js +201 -0
  414. package/esm/util/stepTables.d.ts +7 -3
  415. package/esm/util/stepTables.js +86 -3
  416. package/esm/util/systemColorScheme.d.ts +4 -0
  417. package/esm/util/systemColorScheme.js +21 -0
  418. package/esm/util/tabix.d.ts +1 -1
  419. package/esm/util/tabix.js +1 -1
  420. package/esm/util/temporaryAssembly.d.ts +2 -2
  421. package/esm/util/temporaryAssembly.js +2 -3
  422. package/esm/util/thresholdScale.d.ts +1 -1
  423. package/esm/util/thresholdScale.js +1 -1
  424. package/esm/util/trackConfigDelta.d.ts +1 -1
  425. package/esm/util/tracks.d.ts +25 -15
  426. package/esm/util/tracks.js +68 -44
  427. package/esm/util/types/index.d.ts +15 -7
  428. package/esm/util/types/index.js +21 -2
  429. package/esm/util/usePanZoom.js +4 -10
  430. package/esm/util/useRowVirtualScroll.d.ts +1 -0
  431. package/esm/util/windowStep.d.ts +6 -0
  432. package/esm/util/windowStep.js +153 -0
  433. package/package.json +27 -16
  434. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
  435. package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
  436. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
  437. package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
  438. package/esm/rpc/methods/CoreLoadAdapterCode.d.ts +0 -13
  439. package/esm/rpc/methods/CoreLoadAdapterCode.js +0 -16
package/README.md CHANGED
@@ -58,6 +58,8 @@ in `config.json`. A key the config does not declare is reported for the caller
58
58
  to route or refuse, and a declared key whose write throws costs that key alone.
59
59
 
60
60
  ```js
61
+ import { applyConfSettings } from '@jbrowse/core/configuration'
62
+
61
63
  // type signature
62
64
  (target: AnyConfigurationModel | { configuration: AnyConfigurationModel; }, settings: Record<string, unknown>) => ConfSettingsReport
63
65
  ```
@@ -70,6 +72,8 @@ The `ConfigurationSchemaUnion` an array slot's entries answer to, read off the
70
72
  slot's MST type, or undefined for any other slot.
71
73
 
72
74
  ```js
75
+ import { arraySlotUnion } from '@jbrowse/core/configuration'
76
+
73
77
  // type signature
74
78
  (slotType: IAnyType) => ConfigurationSchemaUnionMetadata | undefined
75
79
  ```
@@ -81,6 +85,8 @@ slot's MST type, or undefined for any other slot.
81
85
  A table over a feature list, or the table itself.
82
86
 
83
87
  ```js
88
+ import { asTable } from '@jbrowse/core/util/featureTable'
89
+
84
90
  // type signature
85
91
  (input: readonly Feature[] | FeatureTable) => FeatureTable
86
92
  ```
@@ -106,6 +112,8 @@ this the reader's" compares against: the config.json's, or the one a track the
106
112
  session owns was added with; empty in a session that keeps no base.
107
113
 
108
114
  ```js
115
+ import { baseDisplayConfig } from '@jbrowse/core/util/baseDisplayConfig'
116
+
109
117
  // type signature
110
118
  (self: object) => Record<string, unknown>
111
119
  ```
@@ -147,6 +155,8 @@ rather than each band re-deriving the reasoning — that is how the two
147
155
  this rule and a doc comment claiming to be the whole of it.
148
156
 
149
157
  ```js
158
+ import { boundBandHeight } from '@jbrowse/core/util/bandHeight'
159
+
150
160
  // type signature
151
161
  (n: number, { min, max }?: BandBounds) => number
152
162
  ```
@@ -174,6 +184,8 @@ Split out of `parseSvAlt` because a consumer holding an already-parsed
174
184
  polarity — the shape that produced 78bb7b84f9.
175
185
 
176
186
  ```js
187
+ import { breakendKeepsDirections } from '@jbrowse/core/util/svAlt'
188
+
177
189
  // type signature
178
190
  (bnd: Breakend) => { mateDirection: number; joinDirection: number; }
179
191
  ```
@@ -192,6 +204,8 @@ off the centre of the domain reads it through `rampMidT`, the shader's rule and
192
204
  its generated twin, so the middle follows a moving domain without a new table.
193
205
 
194
206
  ```js
207
+ import { buildColorRampLut } from '@jbrowse/core/util/colorRamp'
208
+
195
209
  // type signature
196
210
  (stops: readonly ColorRampStop[]) => Uint8Array<ArrayBuffer>
197
211
  ```
@@ -226,6 +240,8 @@ and a caller reading an untyped `frozen` slot must first check that the value is
226
240
  a refName.
227
241
 
228
242
  ```js
243
+ import { canonicalizeViewRefName } from '@jbrowse/core/util'
244
+
229
245
  // type signature
230
246
  (node: IAnyStateTreeNode, refName: string) => string
231
247
  ```
@@ -235,11 +251,15 @@ a refName.
235
251
  ### categoricalField
236
252
 
237
253
  `labels` names the `domain`'s values in a key, one each in order, where a config
238
- spells them for a reader rather than as the data does.
254
+ spells them for a reader rather than as the data does. `held` deals each key the
255
+ domain does not list a color of its own on first sight (`categoricalScale`); the
256
+ caller keeps it for as long as the colors should hold.
239
257
 
240
258
  ```js
259
+ import { categoricalField } from '@jbrowse/core/util/categoricalField'
260
+
241
261
  // type signature
242
- (field: string, {…}?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; labels?: readonly string[] | undefined; }) => CategoricalField
262
+ (field: string, { domain, range, labels, held, }?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; labels?: readonly string[] | undefined; held?: HeldSlots | undefined; }) => CategoricalField
243
263
  ```
244
264
 
245
265
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
@@ -250,14 +270,16 @@ One categorical field as every channel reads it — a facet's sections, a color'
250
270
  range entries, a key's rows. `key` files a value, `compare` orders keys (the
251
271
  `domain` first, the rest by `compareGroupKeys`, `''` after them), `label` names
252
272
  a key in a legend, `sectionLabel` on a chip, and `color` paints it. A key's
253
- color depends only on the key and the declaration, so every region agrees on it.
273
+ color depends only on the key and the declaration, so every region agrees on it,
274
+ except that a field dealing its colors (`categoricalField`'s `held`) also steps
275
+ a key off the colors of the keys met before it.
254
276
 
255
277
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
256
278
 
257
279
  ### CategoricalRef
258
280
 
259
281
  A field bound to a categorical scale: each distinct value takes one entry of the
260
- channel's `range` — a colour for `color`, a shape name for `shape`. Every value
282
+ channel's `range` — a color for `color`, a shape name for `shape`. Every value
261
283
  derives its entry from itself (an integer takes the slot it names, anything else
262
284
  hashes in), so every region agrees on a value it shares with another at the cost
263
285
  of an occasional collision. A `domain` spends the range deliberately: the listed
@@ -310,6 +332,8 @@ component computing the target from a rendered height drops every tick that
310
332
  lands before React re-renders.
311
333
 
312
334
  ```js
335
+ import { clampBandHeight } from '@jbrowse/core/util/bandHeight'
336
+
313
337
  // type signature
314
338
  (current: number, target: number, bounds?: BandBounds) => number
315
339
  ```
@@ -322,6 +346,8 @@ The quantile a clip toggle writes: a scale's declared default where that clips,
322
346
  below 1, else DEFAULT_CLIP_QUANTILE.
323
347
 
324
348
  ```js
349
+ import { clipQuantileOf } from '@jbrowse/core/util/quantileExtent'
350
+
325
351
  // type signature
326
352
  (declaredDefault: unknown) => number
327
353
  ```
@@ -336,16 +362,21 @@ Codes into a list of labels, one per row.
336
362
 
337
363
  ### COLOR_SCHEMES
338
364
 
339
- The named ramps a continuous colour scale's `scheme` takes, each one a stop
340
- table in `colorRamp.ts` that every ramp baker reads, so no display can name a
341
- scheme nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are
342
- matplotlib's perceptual ramps, dark at the low end; `juicebox` fades from
343
- transparent to red, as Juicebox paints contacts; `fall` runs white through
344
- yellow and red to black, as HiGlass does; `reds` and `blues` are ColorBrewer's,
345
- from white; `redblue` and `purpleorange` diverge through white, ColorBrewer's
346
- RdBu and PuOr.
365
+ The named ramps a continuous color scale's `scheme` takes, each one a stop table
366
+ in `colorRamp.ts` that every ramp baker reads, so no display can name a scheme
367
+ nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are matplotlib's
368
+ perceptual ramps, dark at the low end; `juicebox` fades from transparent to red,
369
+ as Juicebox paints contacts; `fall` runs white through yellow and red to black,
370
+ as HiGlass does; `reds` and `blues` are ColorBrewer's, from white; `redblue` and
371
+ `purpleorange` diverge through white, ColorBrewer's RdBu and PuOr; `redgreyblue`
372
+ diverges through a grey middle, which stays visible on a white page where a
373
+ white middle would not, as `identity` paints; `blueyellowred` is ColorBrewer's
374
+ RdYlBu turned round, so low reads cool and high hot through a pale yellow
375
+ middle, as `dnds` paints.
347
376
 
348
377
  ```js
378
+ import { COLOR_SCHEMES } from '@jbrowse/core/util/colorSchemes'
379
+
349
380
  // type signature
350
381
  readonly[
351
382
  ('viridis',
@@ -357,7 +388,9 @@ readonly[
357
388
  'reds',
358
389
  'blues',
359
390
  'redblue',
360
- 'purpleorange')
391
+ 'purpleorange',
392
+ 'redgreyblue',
393
+ 'blueyellowred')
361
394
  ]
362
395
  ```
363
396
 
@@ -365,10 +398,12 @@ readonly[
365
398
 
366
399
  ### colorAt
367
400
 
368
- The packed colour instance `i` of `channels` paints: `color[i]`, or `color`
369
- itself where the colour is a constant and so shipped as one number.
401
+ The packed color instance `i` of `channels` paints: `color[i]`, or `color`
402
+ itself where the color is a constant and so shipped as one number.
370
403
 
371
404
  ```js
405
+ import { colorAt } from '@jbrowse/core/util/markEncoding'
406
+
372
407
  // type signature
373
408
  (channels: Pick<EncodedChannels, "color">, i: number) => number | undefined
374
409
  ```
@@ -377,7 +412,7 @@ itself where the colour is a constant and so shipped as one number.
377
412
 
378
413
  ### ColorEncoding
379
414
 
380
- How a mark's `color` channel resolves. A CSS colour or a `jexl:` expression
415
+ How a mark's `color` channel resolves. A CSS color or a `jexl:` expression
381
416
  returning one paints per feature with no scale; the object forms bind a field to
382
417
  a scale, which a legend can describe, and share the config's member names.
383
418
 
@@ -385,11 +420,13 @@ a scale, which a legend can describe, and share the config's member names.
385
420
 
386
421
  ### colorEvaluator
387
422
 
388
- A CSS colour or `jexl:` colour expression as a per-feature packed ABGR — the
423
+ A CSS color or `jexl:` color expression as a per-feature packed ABGR — the
389
424
  unscaled arm of ColorEncoding, on its own for a display that carries a plain
390
425
  `color` slot.
391
426
 
392
427
  ```js
428
+ import { colorEvaluator } from '@jbrowse/core/util/markEncoding'
429
+
393
430
  // type signature
394
431
  (color: string, jexl: JexlInstance | undefined) => (feature: Feature) => number
395
432
  ```
@@ -398,11 +435,13 @@ unscaled arm of ColorEncoding, on its own for a display that carries a plain
398
435
 
399
436
  ### colorRampStops
400
437
 
401
- The stops a continuous colour scale samples: `range`'s CSS colours where it
402
- lists any, else the named `scheme`, viridis while that is unset, turned round
403
- under `reverse`.
438
+ The stops a continuous color scale samples: `range`'s CSS colors where it lists
439
+ any, else the named `scheme`, viridis while that is unset, turned round under
440
+ `reverse`.
404
441
 
405
442
  ```js
443
+ import { colorRampStops } from '@jbrowse/core/util/colorRamp'
444
+
406
445
  // type signature
407
446
  ({ range, scheme, reverse, }: RampDeclaration) => readonly ColorRampStop[]
408
447
  ```
@@ -411,8 +450,8 @@ under `reverse`.
411
450
 
412
451
  ### ColorScaleTable
413
452
 
414
- The scale a colour channel was resolved through, as the legend reads it — the
415
- same table the colours in the payload came from, so the key cannot disagree with
453
+ The scale a color channel was resolved through, as the legend reads it — the
454
+ same table the colors in the payload came from, so the key cannot disagree with
416
455
  the painting.
417
456
 
418
457
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
@@ -438,6 +477,8 @@ A table an adapter answers from the typed arrays it already holds, where
438
477
  row's id. A row's hover JSON is every field it holds.
439
478
 
440
479
  ```js
480
+ import { ColumnTable } from '@jbrowse/core/util/featureTable'
481
+
441
482
  // type signature
442
483
  typeof ColumnTable
443
484
  ```
@@ -452,10 +493,12 @@ A list entry that is one of several configuration schemas, each keyed by the
452
493
  the vocabulary, the snapshot's `type` picks the member, and a `type` naming no
453
494
  member is refused in every build — where a bare `types.union` would load it as
454
495
  its first member. Each member is an `explicitlyTyped`, `closed` schema named by
455
- its key, so a key belonging to another member is refused rather than dropped;
456
- one that is not throws here.
496
+ its key, so a key belonging to another member is named on a load and refused on
497
+ a write rather than dropped; one that is not throws here.
457
498
 
458
499
  ```js
500
+ import { ConfigurationSchemaUnion } from '@jbrowse/core/configuration'
501
+
459
502
  // type signature
460
503
  <const MEMBERS extends Record<string, AnyConfigurationSchemaType>>(name: string, members: MEMBERS) => ConfigurationSchemaUnionType<MEMBERS>
461
504
  ```
@@ -464,14 +507,16 @@ one that is not throws here.
464
507
 
465
508
  ### continuousColorScale
466
509
 
467
- A continuous colour scale over `extent`, the values it met: the domain its
510
+ A continuous color scale over `extent`, the values it met: the domain its
468
511
  declared ends and the extent make, the straight table its stops bake to and
469
- where its middle stop sits, and the packed colour a value paints through them:
470
- an infinity the end on its side, as a threshold places it, and NaN, text that is
471
- no number, the misconfiguration grey. The encoder and every display painting a
472
- ramp itself read it, so a value takes one colour whoever paints it.
512
+ where its middle stop sits, and the packed color a value paints through them: an
513
+ infinity the end on its side, as a threshold places it, and NaN, text that is no
514
+ number, the misconfiguration grey. The encoder and every display painting a ramp
515
+ itself read it, so a value takes one color whoever paints it.
473
516
 
474
517
  ```js
518
+ import { continuousColorScale } from '@jbrowse/core/util/markEncoding'
519
+
475
520
  // type signature
476
521
  (encoding: ContinuousRef, extent: readonly [number, number]) => { domain: [number, number]; lut: Uint8Array<ArrayBufferLike>; midNorm: number; colorOf: (value: number) => number; }
477
522
  ```
@@ -482,8 +527,8 @@ ramp itself read it, so a value takes one colour whoever paints it.
482
527
 
483
528
  A numeric field read through a linear or log scale into a ramp. Each end of the
484
529
  domain is pinned by `domainMin` or `domainMax`, or is the region's own extreme
485
- where unset, so pinning both keeps colours consistent across a whole view. The
486
- ramp is `range`'s CSS colours, evenly spaced, where it lists any, else the named
530
+ where unset, so pinning both keeps colors consistent across a whole view. The
531
+ ramp is `range`'s CSS colors, evenly spaced, where it lists any, else the named
487
532
  `scheme`; `reverse` turns it round.
488
533
 
489
534
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
@@ -492,7 +537,9 @@ ramp is `range`'s CSS colours, evenly spaced, where it lists any, else the named
492
537
 
493
538
  Replace the features with runs of constant depth: how many of them overlap each
494
539
  stretch of the region, in a field `as` (`coverage` by default), with the
495
- stretches nothing overlaps left out.
540
+ stretches nothing overlaps left out. A read counts across its whole span,
541
+ deletions and introns included; gap-aware depth stays the alignments display's
542
+ (ADR-118).
496
543
 
497
544
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
498
545
 
@@ -502,20 +549,55 @@ Whether a named ramp runs dark at its low end, drawn over white: viridis and its
502
549
  siblings do, juicebox, fall, reds and blues do not.
503
550
 
504
551
  ```js
552
+ import { darkAtLowEnd } from '@jbrowse/core/util/colorRamp'
553
+
505
554
  // type signature
506
- (scheme: "blues" | "cividis" | "fall" | "inferno" | "juicebox" | "magma" | "purpleorange" | "redblue" | "reds" | "viridis") => boolean
555
+ (scheme: "blues" | "blueyellowred" | "cividis" | "fall" | "inferno" | "juicebox" | "magma" | "purpleorange" | "redblue" | "redgreyblue" | "reds" | "viridis") => boolean
507
556
  ```
508
557
 
509
558
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
510
559
 
560
+ ### dealKeyColors
561
+
562
+ Deals `keys` their colors in `field.compare` order, so the colors a set of keys
563
+ first seen together takes do not depend on the order they arrive in. A no-op for
564
+ a field that deals nothing.
565
+
566
+ ```js
567
+ import { dealKeyColors } from '@jbrowse/core/util/categoricalField'
568
+
569
+ // type signature
570
+ (field: CategoricalField, keys: Iterable<string>) => void
571
+ ```
572
+
573
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
574
+
575
+ ### declaredSnapshot
576
+
577
+ A snapshot as `type` lifts it, without the keys it does not declare: the config
578
+ half of an entry that carries its owner's keys beside one, as a
579
+ `MultiWiggleAdapter` subadapter carries its row's `name` and `color`.
580
+
581
+ ```js
582
+ import { declaredSnapshot } from '@jbrowse/core/configuration'
583
+
584
+ // type signature
585
+ (type: IAnyType, snapshot: Record<string, unknown>) => Record<string, unknown>
586
+ ```
587
+
588
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/snapshotPreprocess.ts)
589
+
511
590
  ### DEFAULT_COLOR_SCHEME
512
591
 
513
592
  The ramp a continuous scale samples while it names no `range` and no `scheme`,
514
593
  so a declaration spelling it out and one leaving it unset resolve alike.
515
594
 
516
595
  ```js
596
+ import { DEFAULT_COLOR_SCHEME } from '@jbrowse/core/util/colorSchemes'
597
+
517
598
  // type signature
518
599
  ;'blues' |
600
+ 'blueyellowred' |
519
601
  'cividis' |
520
602
  'fall' |
521
603
  'inferno' |
@@ -523,6 +605,7 @@ so a declaration spelling it out and one leaving it unset resolve alike.
523
605
  'magma' |
524
606
  'purpleorange' |
525
607
  'redblue' |
608
+ 'redgreyblue' |
526
609
  'reds' |
527
610
  'viridis'
528
611
  ```
@@ -559,6 +642,8 @@ feature `i` (featureIndexAt). A lane is present when the caller asked for it
559
642
  The buffers an EncodedChannels owns, for `rpcResult`'s transfer list.
560
643
 
561
644
  ```js
645
+ import { encodedChannelTransferables } from '@jbrowse/core/util/markEncoding'
646
+
562
647
  // type signature
563
648
  (c: EncodedChannels) => ArrayBufferLike[]
564
649
  ```
@@ -590,12 +675,28 @@ its own loop over the admitted rows, a lane straight off a typed column and a
590
675
  categorical over a `category` column per label.
591
676
 
592
677
  ```js
678
+ import { encodeFeatures } from '@jbrowse/core/util/markEncoding'
679
+
593
680
  // type signature
594
681
  <L extends LaneName>(input: readonly Feature[] | FeatureTable, encoding: MarkEncodingInput, lanes: readonly L[], ctx?: EncodeContext) => Encoded<L>
595
682
  ```
596
683
 
597
684
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
598
685
 
686
+ ### evaluateForFeature
687
+
688
+ A config value as `feature` reads it: a `jexl:` callback evaluated against the
689
+ feature, anything else as written.
690
+
691
+ ```js
692
+ import { evaluateForFeature } from '@jbrowse/core/configuration'
693
+
694
+ // type signature
695
+ (value: unknown, feature: Feature, jexl: JexlInstance) => unknown
696
+ ```
697
+
698
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
699
+
599
700
  ### FacetedLayer
600
701
 
601
702
  One layer of a faceted request: its rows in section order, and the stacked row
@@ -619,8 +720,10 @@ every step runs once over the ordered rows, keeping section order, and one that
619
720
  groups rows groups within a section.
620
721
 
621
722
  ```js
723
+ import { facetLayers } from '@jbrowse/core/util/featureTransforms'
724
+
622
725
  // type signature
623
- (input: readonly Feature[] | FeatureTable, facet: FacetSpec, layers: readonly {…}[], jexl?: JexlInstance | undefined) => { ...; }
726
+ (input: readonly Feature[] | FeatureTable, facet: FacetSpec, layers: readonly { transform?: readonly TransformStep[] | undefined; row?: string | undefined; }[], jexl?: JexlInstance | undefined) => { layers: FacetedLayer[]; sections: FacetSection[]; }
624
727
  ```
625
728
 
626
729
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
@@ -646,6 +749,8 @@ The input feature instance `i` of `channels` was: `featureIndex[i]`, or `i`
646
749
  itself where the encoder skipped none and so shipped no index.
647
750
 
648
751
  ```js
752
+ import { featureIndexAt } from '@jbrowse/core/util/markEncoding'
753
+
649
754
  // type signature
650
755
  (channels: Pick<EncodedChannels, "featureIndex">, i: number) => number
651
756
  ```
@@ -660,6 +765,25 @@ the hover.
660
765
 
661
766
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTable.ts)
662
767
 
768
+ ### fenceOutliers
769
+
770
+ Where a value axis's open ends stand below a `domainQuantile` of 1: at the
771
+ `extremes`, unless one would stretch the axis past twice the span the
772
+ quantileExtent ends `quantiles` draw, 0 included where the axis reaches it
773
+ (`zero`); that end stops at the fence. So a plot with no spike shows every value
774
+ and cuts none, and a spike leaves the values under it at least half the axis.
775
+ Quantiles that meet span their own size, as a flat domain widens in
776
+ `getNiceDomain`.
777
+
778
+ ```js
779
+ import { fenceOutliers } from '@jbrowse/core/util/quantileExtent'
780
+
781
+ // type signature
782
+ ({ extremes, quantiles, zero, }: { extremes: readonly [number, number]; quantiles: readonly [number, number]; zero: boolean; }) => [number, number]
783
+ ```
784
+
785
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/quantileExtent.ts)
786
+
663
787
  ### fieldReader
664
788
 
665
789
  What a channel reads off a feature: a field by name, a dotted path into a
@@ -668,6 +792,8 @@ record), or a `jexl:` expression over `feature`. A jexl expression that does not
668
792
  compile throws here, once, rather than on every feature.
669
793
 
670
794
  ```js
795
+ import { fieldReader } from '@jbrowse/core/util/fieldReader'
796
+
671
797
  // type signature
672
798
  (ref: string, jexl: JexlInstance | undefined) => (feature: Feature) => unknown
673
799
  ```
@@ -695,6 +821,8 @@ The least and greatest finite values of `values[0, count)`,
695
821
  `[Infinity, -Infinity]` where none is finite.
696
822
 
697
823
  ```js
824
+ import { finiteExtremes } from '@jbrowse/core/util/quantileExtent'
825
+
698
826
  // type signature
699
827
  (values: ArrayLike<number>, count: number) => [number, number]
700
828
  ```
@@ -732,6 +860,8 @@ wanted, and because that cost is the finding: the assembly manager is the one
732
860
  thing on `AbstractSessionModel` a third-party host cannot simply implement.
733
861
 
734
862
  ```js
863
+ import { getAssemblyHost } from '@jbrowse/core/util'
864
+
735
865
  // type signature
736
866
  (node: IAnyStateTreeNode) => AssemblyHost
737
867
  ```
@@ -748,6 +878,8 @@ allele id where a contig name belongs. Callers that navigate or split-view a
748
878
  mate must drop both rather than treat `<DEL>` as a refName.
749
879
 
750
880
  ```js
881
+ import { getBreakendMateLocString } from '@jbrowse/core/util/svAlt'
882
+
751
883
  // type signature
752
884
  (breakend?: Breakend | undefined) => string | undefined
753
885
  ```
@@ -756,19 +888,15 @@ mate must drop both rather than treat `<DEL>` as a refName.
756
888
 
757
889
  ### getConf
758
890
 
759
- Reads a configuration value from a state model that has a `.configuration`
760
- member (a track or display state model). For a raw configuration model, use
761
- `readConfObject` instead.
762
-
763
- **This is exactly `readConfObject(model.configuration, path)`** — sugar for the
764
- `.configuration` hop, and nothing more. The two readers carry the same slot-name
765
- check, so reaching for the other one does not get a typo past tsc. It does not
766
- consult the session and has no per-slot behavior; what you read is what the
767
- track stores.
891
+ Reads a configuration value from a track or display state model: exactly
892
+ `readConfObject(model.configuration, path)`, with the same slot-name check.
768
893
 
769
894
  ```js
895
+ import { getConf } from '@jbrowse/core/configuration'
896
+
770
897
  // type signature
771
- {…}
898
+ (model: { configuration: AnyConfigurationModel; }) => AnyConfigurationSnapshot
899
+ <CONFMODEL extends AnyConfigurationModel, const SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>> | ConfigurationSlotPath<ConfigurationSchemaForModel<CONFMODEL>> = ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(model: { configuration: CONFMODEL; }, slotPath: SLOT, args?: Record<string, unknown>) => SLOT extends string ? ConfigurationSlotValue<ConfigurationSchemaForModel<CONFMODEL>, SLOT> : ConfigurationSlotPathValue<ConfigurationSchemaForModel<CONFMODEL>, SLOT>
772
900
  ```
773
901
 
774
902
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
@@ -779,6 +907,8 @@ Returns the display model that contains the given node. Throws if the node has
779
907
  no containing display.
780
908
 
781
909
  ```js
910
+ import { getContainingDisplay } from '@jbrowse/core/util'
911
+
782
912
  // type signature
783
913
  (node: IAnyStateTreeNode) => AbstractDisplayModel
784
914
  ```
@@ -791,6 +921,8 @@ Returns the track model that contains the given node. Throws if the node has no
791
921
  containing track.
792
922
 
793
923
  ```js
924
+ import { getContainingTrack } from '@jbrowse/core/util'
925
+
794
926
  // type signature
795
927
  (node: IAnyStateTreeNode) => AbstractTrackModel
796
928
  ```
@@ -803,6 +935,8 @@ Returns the view model that contains the given node. Throws if the node has no
803
935
  containing view.
804
936
 
805
937
  ```js
938
+ import { getContainingView } from '@jbrowse/core/util'
939
+
806
940
  // type signature
807
941
  (node: IAnyStateTreeNode) => AbstractViewModel
808
942
  ```
@@ -814,6 +948,8 @@ containing view.
814
948
  Where a display puts a dialog it cannot mount itself.
815
949
 
816
950
  ```js
951
+ import { getDialogHost } from '@jbrowse/core/util'
952
+
817
953
  // type signature
818
954
  (node: IAnyStateTreeNode) => DialogHost
819
955
  ```
@@ -825,6 +961,8 @@ Where a display puts a dialog it cannot mount itself.
825
961
  Returns the MST environment for a node, which carries the `pluginManager`.
826
962
 
827
963
  ```js
964
+ import { getEnv } from '@jbrowse/core/util'
965
+
828
966
  // type signature
829
967
  (obj: IAnyStateTreeNode) => { pluginManager: PluginManager; }
830
968
  ```
@@ -836,6 +974,8 @@ Returns the MST environment for a node, which carries the `pluginManager`.
836
974
  Where a display puts a message it cannot draw itself.
837
975
 
838
976
  ```js
977
+ import { getNotificationSink } from '@jbrowse/core/util'
978
+
839
979
  // type signature
840
980
  (node: IAnyStateTreeNode) => NotificationSink
841
981
  ```
@@ -847,6 +987,8 @@ Where a display puts a message it cannot draw itself.
847
987
  The colors to draw with, and the args that rebuild them in a worker.
848
988
 
849
989
  ```js
990
+ import { getPaletteHost } from '@jbrowse/core/util'
991
+
850
992
  // type signature
851
993
  (node: IAnyStateTreeNode) => PaletteHost
852
994
  ```
@@ -859,6 +1001,8 @@ Everything a display needs of its host in order to draw a region: the
859
1001
  assemblies, the RPC entry point and the colors.
860
1002
 
861
1003
  ```js
1004
+ import { getRenderingServices } from '@jbrowse/core/util'
1005
+
862
1006
  // type signature
863
1007
  (node: IAnyStateTreeNode) => RenderingServices
864
1008
  ```
@@ -870,6 +1014,8 @@ assemblies, the RPC entry point and the colors.
870
1014
  The host's RPC entry point, for a module that issues RPCs and nothing else.
871
1015
 
872
1016
  ```js
1017
+ import { getRpcHost } from '@jbrowse/core/util'
1018
+
873
1019
  // type signature
874
1020
  (node: IAnyStateTreeNode) => RpcHost
875
1021
  ```
@@ -882,6 +1028,8 @@ Returns the JBrowse session model for any node in the state tree. Throws if the
882
1028
  node has no session ancestor.
883
1029
 
884
1030
  ```js
1031
+ import { getSession } from '@jbrowse/core/util'
1032
+
885
1033
  // type signature
886
1034
  (node: IAnyStateTreeNode) => AbstractSessionModel
887
1035
  ```
@@ -895,12 +1043,28 @@ Prefer one of the narrower accessors below, which say which of them the calling
895
1043
  module actually uses.
896
1044
 
897
1045
  ```js
1046
+ import { getSessionServices } from '@jbrowse/core/util'
1047
+
898
1048
  // type signature
899
1049
  (node: IAnyStateTreeNode) => SessionServices
900
1050
  ```
901
1051
 
902
1052
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/sessionServices.ts)
903
1053
 
1054
+ ### heldSlotsOf
1055
+
1056
+ The `HeldSlots` `owner` keeps under `key`, made empty on first ask. Lives as
1057
+ long as `owner` and is never persisted, so a reload deals afresh.
1058
+
1059
+ ```js
1060
+ import { heldSlotsOf } from '@jbrowse/core/util/categoricalField'
1061
+
1062
+ // type signature
1063
+ (owner: object, key: string) => HeldSlots
1064
+ ```
1065
+
1066
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
1067
+
904
1068
  ### HitIndexed
905
1069
 
906
1070
  An encoded payload as a display stores it: the hit index the worker built with
@@ -914,6 +1078,8 @@ The hit index over `count` instances: each a box from `x` to `x2` at its `y`, or
914
1078
  at 0 for a mark with no value.
915
1079
 
916
1080
  ```js
1081
+ import { hitIndexOf } from '@jbrowse/core/util/markEncoding'
1082
+
917
1083
  // type signature
918
1084
  (x: Uint32Array<ArrayBufferLike>, x2: Uint32Array<ArrayBufferLike>, y: Float32Array<ArrayBufferLike> | undefined, count?: number) => Flatbush
919
1085
  ```
@@ -922,29 +1088,19 @@ at 0 for a mark with no value.
922
1088
 
923
1089
  ### hydrateTrackConfig
924
1090
 
925
- Hydrate a plain track config into a live config node, dispatching on its `type`
926
- to find the schema. `session.tracks` holds `types.frozen` plain objects until
927
- something references a track (ADR-031). One of those holds only what was
928
- literally authored: a slot at its schema default is absent, `preProcessSnapshot`
929
- has not run, and nothing that walks a live node applies to it.
1091
+ Hydrate a plain track config, such as a `session.tracks` entry, into a live
1092
+ config node, dispatching on its `type` to find the schema. A plain entry holds
1093
+ only what was authored: a slot at its default is absent and `preProcessSnapshot`
1094
+ has not run.
930
1095
 
931
- Use it where a caller needs the resolved config and may be handed either form.
932
- The About dialog's "Copy config" is reached from two menus, and one of them
933
- passes a `session.tracks` entry.
934
-
935
- Returns **undefined** when the config names a track type no plugin registered,
936
- or when `create` rejects it as invalid. An un-hydrated config has never been
937
- validated, so the dialog opening over it should not throw. Callers fall back to
938
- using the plain object.
939
-
940
- Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating the
941
- same entry twice returns the same node, and in an admin session a track opened
942
- later resolves to that same node. A non-admin's open track resolves to the
943
- session's private working copy (ADR-032), and this function returns the pristine
944
- mirror beside it. The two have the same content; `CopyConfigEntryPoints.test.ts`
945
- tests both cases.
1096
+ Returns **undefined** when no plugin registered the type or `create` rejects the
1097
+ config, which has never been validated; callers fall back to the plain object.
1098
+ Hydrating one entry twice returns one node. A shown track resolves to the
1099
+ session's working copy instead (ADR-032), which has the same content.
946
1100
 
947
1101
  ```js
1102
+ import { hydrateTrackConfig } from '@jbrowse/core/configuration'
1103
+
948
1104
  // type signature
949
1105
  (pluginManager: PluginManager, config: Record<string, unknown>) => AnyConfigurationModel | undefined
950
1106
  ```
@@ -958,6 +1114,8 @@ breakends (`.A` / `G.`), and the symbolic-mate form (`G<DEL>`, an angle bracket
958
1114
  past position 0; a leading `<` is a plain symbolic allele).
959
1115
 
960
1116
  ```js
1117
+ import { isBreakend } from '@jbrowse/core/util/svAlt'
1118
+
961
1119
  // type signature
962
1120
  (alt: string) => boolean
963
1121
  ```
@@ -970,6 +1128,8 @@ Whether a field holds no value at all, as against text that fails to parse:
970
1128
  absent, empty, or a VCF's `AF=.`, which arrives as `[undefined]`.
971
1129
 
972
1130
  ```js
1131
+ import { isMissing } from '@jbrowse/core/util/thresholdScale'
1132
+
973
1133
  // type signature
974
1134
  (value: unknown) => boolean
975
1135
  ```
@@ -983,6 +1143,8 @@ no path to walk and no expression to evaluate. A loop over a plain name keeps
983
1143
  the direct call, and only a config that writes a path pays for one.
984
1144
 
985
1145
  ```js
1146
+ import { isPlainFieldRef } from '@jbrowse/core/util/fieldReader'
1147
+
986
1148
  // type signature
987
1149
  (ref: string) => ref is never
988
1150
  ```
@@ -1006,6 +1168,8 @@ face each other. A PAF row's strand is the query's orientation and states none
1006
1168
  for the target, so it names no side.
1007
1169
 
1008
1170
  ```js
1171
+ import { junctionEnds } from '@jbrowse/core/util/svAlt'
1172
+
1009
1173
  // type signature
1010
1174
  (feature: Feature, alt?: string | undefined, alleleIndex?: number | undefined) => { own: JunctionEnd; mate: JunctionEnd; } | undefined
1011
1175
  ```
@@ -1014,12 +1178,14 @@ for the target, so it names no side.
1014
1178
 
1015
1179
  ### keyNames
1016
1180
 
1017
- What a key names each of `keys`, from a colour object's `labels`: one each in
1181
+ What a key names each of `keys`, from a color object's `labels`: one each in
1018
1182
  order, an empty or missing entry leaving that key its own name. Every key that
1019
1183
  takes `labels` reads them through this, so a config means one thing by them
1020
1184
  everywhere.
1021
1185
 
1022
1186
  ```js
1187
+ import { keyNames } from '@jbrowse/core/util/categoricalField'
1188
+
1023
1189
  // type signature
1024
1190
  (keys: readonly unknown[], labels?: readonly string[]) => ReadonlyMap<string, string>
1025
1191
  ```
@@ -1042,8 +1208,10 @@ hovers declines the index, which is most of the encoder's cost after the walk.
1042
1208
  synchronous `addOrReplaceView` requires it loaded already.
1043
1209
 
1044
1210
  ```js
1211
+ import { launchOrReplaceView } from '@jbrowse/core/util'
1212
+
1045
1213
  // type signature
1046
- (args: { session: AbstractViewContainer; typeName: string; initialState?: Record<string, unknown> | undefined; replacing?: AbstractViewModel | undefined; }) => Promise<...>
1214
+ (args: { session: AbstractViewContainer; typeName: string; initialState?: Record<string, unknown> | undefined; replacing?: AbstractViewModel | undefined; }) => Promise<AbstractViewModel>
1047
1215
  ```
1048
1216
 
1049
1217
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/mstUtils.ts)
@@ -1064,8 +1232,10 @@ early as it can: after the last shared step that must see every row, so the
1064
1232
  steps that follow it read the rows already in section order.
1065
1233
 
1066
1234
  ```js
1235
+ import { layerTables } from '@jbrowse/core/util/featureTransforms'
1236
+
1067
1237
  // type signature
1068
- (input: readonly Feature[] | FeatureTable, request: {…}, jexl?: JexlInstance | undefined) => { ...; }
1238
+ (input: readonly Feature[] | FeatureTable, request: { transform?: readonly TransformStep[] | undefined; facet?: FacetSpec | undefined; layers: readonly { transform?: readonly TransformStep[] | undefined; row?: string | undefined; }[]; }, jexl?: JexlInstance | undefined) => { layers: { table: FeatureTable; row: string | Uint32Array<ArrayBufferLike> | undefined; }[]; sections: FacetSection[] | undefined; }
1069
1239
  ```
1070
1240
 
1071
1241
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/featureTransforms.ts)
@@ -1080,6 +1250,8 @@ members off it. The draft is copied first, since MST freezes what it creates
1080
1250
  from.
1081
1251
 
1082
1252
  ```js
1253
+ import { liftPlot } from '@jbrowse/core/configuration'
1254
+
1083
1255
  // type signature
1084
1256
  (conf: AnyConfigurationModel, draft: Plot) => AnyConfigurationModel
1085
1257
  ```
@@ -1097,7 +1269,7 @@ name, the name of each entry.
1097
1269
  ### ListedRowSource
1098
1270
 
1099
1271
  One row an adapter lists: `name` is a value of the listing's field, and `label`
1100
- and `color` are what the adapter names and colours that row with.
1272
+ and `color` are what the adapter names and colors that row with.
1101
1273
 
1102
1274
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/rowSources.ts)
1103
1275
 
@@ -1106,6 +1278,8 @@ and `color` are what the adapter names and colours that row with.
1106
1278
  Whether an adapter implements RowSourceLister.
1107
1279
 
1108
1280
  ```js
1281
+ import { listsRowSources } from '@jbrowse/core/data_adapters/BaseAdapter/rowSources'
1282
+
1109
1283
  // type signature
1110
1284
  (adapter: object) => adapter is RowSourceLister
1111
1285
  ```
@@ -1159,6 +1333,8 @@ whether links are the picture a track wants asks here rather than re-reading the
1159
1333
  fields.
1160
1334
 
1161
1335
  ```js
1336
+ import { matedBy } from '@jbrowse/core/util/featureTransforms'
1337
+
1162
1338
  // type signature
1163
1339
  (f: Feature) => "alt" | "mate" | "pair" | undefined
1164
1340
  ```
@@ -1180,11 +1356,13 @@ ends answer once.
1180
1356
 
1181
1357
  ### MISCONFIGURED_ABGR
1182
1358
 
1183
- The misconfiguration grey packed as the encoder paints it: a `jexl:` colour that
1359
+ The misconfiguration grey packed as the encoder paints it: a `jexl:` color that
1184
1360
  answered no string, a ramp value that is no number, text a threshold cannot
1185
1361
  read.
1186
1362
 
1187
1363
  ```js
1364
+ import { MISCONFIGURED_ABGR } from '@jbrowse/core/util/markEncoding'
1365
+
1188
1366
  // type signature
1189
1367
  number
1190
1368
  ```
@@ -1197,6 +1375,8 @@ The no-value grey packed as the encoder paints it: a feature with nothing in the
1197
1375
  field a threshold reads.
1198
1376
 
1199
1377
  ```js
1378
+ import { NO_VALUE_ABGR } from '@jbrowse/core/util/markEncoding'
1379
+
1200
1380
  // type signature
1201
1381
  number
1202
1382
  ```
@@ -1209,8 +1389,10 @@ The row a feature with nothing in a categorical field lands on, so a key says
1209
1389
  why a mark is grey rather than listing a blank value.
1210
1390
 
1211
1391
  ```js
1392
+ import { NO_VALUE_LABEL } from '@jbrowse/core/util/markEncoding'
1393
+
1212
1394
  // type signature
1213
- '(no value)'
1395
+ ;('(no value)')
1214
1396
  ```
1215
1397
 
1216
1398
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
@@ -1221,8 +1403,10 @@ The key a value holding text that is no number files under on a threshold scale,
1221
1403
  painted the misconfiguration grey rather than passing for a missing value.
1222
1404
 
1223
1405
  ```js
1406
+ import { NOT_A_NUMBER_LABEL } from '@jbrowse/core/util/thresholdScale'
1407
+
1224
1408
  // type signature
1225
- '(not a number)'
1409
+ ;('(not a number)')
1226
1410
  ```
1227
1411
 
1228
1412
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
@@ -1239,6 +1423,8 @@ readerOf as the number a quantitative channel or step reads, `NaN` where a row
1239
1423
  holds none, by `numericValue`'s rules.
1240
1424
 
1241
1425
  ```js
1426
+ import { numberReaderOf } from '@jbrowse/core/util/featureTable'
1427
+
1242
1428
  // type signature
1243
1429
  (column: Column) => (i: number) => number
1244
1430
  ```
@@ -1252,6 +1438,8 @@ back as the numbers it names. A member that is not a number reads NaN, which
1252
1438
  every comparison against it declines.
1253
1439
 
1254
1440
  ```js
1441
+ import { numericDomain } from '@jbrowse/core/util/thresholdScale'
1442
+
1255
1443
  // type signature
1256
1444
  (domain: readonly (string | number)[]) => number[]
1257
1445
  ```
@@ -1264,6 +1452,8 @@ The text as a plot, refusing a key the display's plot does not hold. The schema
1264
1452
  is the parser past this point.
1265
1453
 
1266
1454
  ```js
1455
+ import { parsePlot } from '@jbrowse/core/configuration'
1456
+
1267
1457
  // type signature
1268
1458
  (text: string, keys: readonly string[]) => Plot
1269
1459
  ```
@@ -1278,12 +1468,38 @@ alt's place in `ALT`, which a record repeating one symbolic allele with several
1278
1468
  lengths needs; it defaults to the first place `alt` appears.
1279
1469
 
1280
1470
  ```js
1471
+ import { parseSvAlt } from '@jbrowse/core/util/svAlt'
1472
+
1281
1473
  // type signature
1282
- (feature: Feature, alt?: string | undefined, alleleIndex?: number) => {…} | undefined
1474
+ (feature: Feature, alt?: string | undefined, alleleIndex?: number) => { mateRefName: string; matePos: number; mateDirection?: number | undefined; joinDirection?: number | undefined; } | undefined
1283
1475
  ```
1284
1476
 
1285
1477
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/svAlt.ts)
1286
1478
 
1479
+ ### pathSeries
1480
+
1481
+ A path layer's table in series order, as PathSpec defines a series, with each
1482
+ row's series beside it and the stretch past which a series breaks. `steps` are
1483
+ every step the layer's rows went through, which a `window` among them reads the
1484
+ default break from.
1485
+
1486
+ ```js
1487
+ // type signature
1488
+ (table: FeatureTable, row: RowEncoding, path: PathSpec, steps: readonly TransformStep[], jexl?: JexlInstance | undefined) => { table: FeatureTable; row: RowEncoding; series: Uint32Array<ArrayBuffer>; gapBp: number | undefined; }
1489
+ ```
1490
+
1491
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/pathSeries.ts)
1492
+
1493
+ ### PathSpec
1494
+
1495
+ A path's series, as Vega-Lite draws a line: one per row and, within a row, one
1496
+ per distinct value of `by`, a categorical color's field, each in start order.
1497
+ `gapBp` breaks a series where the next instance's middle lies further on than
1498
+ that; absent, a `window` step among the layer's steps sets it to the bases a
1499
+ frame spans at the median row, and with none a series is one run.
1500
+
1501
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
1502
+
1287
1503
  ### PileupStep
1288
1504
 
1289
1505
  Assign every feature the lowest row on which it overlaps nothing already there —
@@ -1310,6 +1526,8 @@ and what each holds: what "Edit plot..." shows and an agent reads as a display's
1310
1526
  `plot`. A display's plot is the ones its config declares (`plotKeysOf`).
1311
1527
 
1312
1528
  ```js
1529
+ import { PLOT_VOCABULARY } from '@jbrowse/core/configuration'
1530
+
1313
1531
  // type signature
1314
1532
  Readonly<Record<string, string>>
1315
1533
  ```
@@ -1328,6 +1546,8 @@ what it does.
1328
1546
  The plot keys a display config declares.
1329
1547
 
1330
1548
  ```js
1549
+ import { plotKeysOf } from '@jbrowse/core/configuration'
1550
+
1331
1551
  // type signature
1332
1552
  (conf: AnyConfigurationModel) => string[]
1333
1553
  ```
@@ -1341,6 +1561,8 @@ shares with no other display, a default plot's marks, shows its entries, since
1341
1561
  they are what is drawn.
1342
1562
 
1343
1563
  ```js
1564
+ import { plotOf } from '@jbrowse/core/configuration'
1565
+
1344
1566
  // type signature
1345
1567
  (conf: AnyConfigurationModel) => Plot
1346
1568
  ```
@@ -1355,6 +1577,8 @@ way but lifting to the same setting writes nothing. Throws a refusal before
1355
1577
  anything is written.
1356
1578
 
1357
1579
  ```js
1580
+ import { plotWrites } from '@jbrowse/core/configuration'
1581
+
1358
1582
  // type signature
1359
1583
  (conf: AnyConfigurationModel, draft: Plot) => Record<string, unknown>
1360
1584
  ```
@@ -1363,11 +1587,13 @@ anything is written.
1363
1587
 
1364
1588
  ### preProcessConfigSnapshot
1365
1589
 
1366
- A snapshot as `type` admits it: the same lift and checks `type.create` applies,
1367
- so a dialog or a validator refuses exactly what a config file cannot hold.
1368
- Throws what the schema's `preProcessSnapshot` throws.
1590
+ A snapshot as a write to `type` admits it: the lift and checks `setConf`
1591
+ applies, so a dialog or a validator refuses what an edit cannot hold, an
1592
+ undeclared key included. Throws what the schema's `preProcessSnapshot` throws.
1369
1593
 
1370
1594
  ```js
1595
+ import { preProcessConfigSnapshot } from '@jbrowse/core/configuration'
1596
+
1371
1597
  // type signature
1372
1598
  (type: IAnyType, snapshot: unknown) => Record<string, unknown>
1373
1599
  ```
@@ -1381,10 +1607,17 @@ What the open ends of a scale follow over `values[0, count)`: at a `quantile` of
1381
1607
  values on its side of 0, so one spike takes neither the axis nor the ramp, and a
1382
1608
  sparse tail of the other sign keeps its own end. An axis that starts at 0 adds
1383
1609
  it itself. Under 0.5 reads as 0.5, where the ends meet rather than cross.
1384
- `scales.y.domainQuantile` and a colour's `domainQuantile` both name it.
1610
+ `scales.y.domainQuantile` and a color's `domainQuantile` both name it.
1385
1611
  `[Infinity, -Infinity]` where nothing is finite.
1386
1612
 
1613
+ Nearest rank keeps ties: where one value holds the rank, as on a segmented
1614
+ copy-number track, a ramp clipped below 1 paints nearly every value one color. A
1615
+ value axis fences instead (fenceOutliers); a ramp takes the same fence once a
1616
+ color default below 1 meets tied data.
1617
+
1387
1618
  ```js
1619
+ import { quantileExtent } from '@jbrowse/core/util/quantileExtent'
1620
+
1388
1621
  // type signature
1389
1622
  (values: ArrayLike<number>, count: number, quantile?: number) => [number, number]
1390
1623
  ```
@@ -1398,6 +1631,8 @@ of them sit at or below, so a handful of values clips at their maximum. Permutes
1398
1631
  `a`; 0 where `n` is.
1399
1632
 
1400
1633
  ```js
1634
+ import { quantileOf } from '@jbrowse/core/util/quantileExtent'
1635
+
1401
1636
  // type signature
1402
1637
  (a: Float32Array<ArrayBufferLike>, n: number, quantile: number) => number
1403
1638
  ```
@@ -1406,18 +1641,20 @@ of them sit at or below, so a handful of values clips at their maximum. Permutes
1406
1641
 
1407
1642
  ### RampDeclaration
1408
1643
 
1409
- A continuous colour scale's ramp as a config declares it.
1644
+ A continuous color scale's ramp as a config declares it.
1410
1645
 
1411
1646
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
1412
1647
 
1413
1648
  ### rampDomain
1414
1649
 
1415
- The domain a continuous colour scale spans: each end `min` or `max` pins, else
1650
+ The domain a continuous color scale spans: each end `min` or `max` pins, else
1416
1651
  the extent's, ascending, since a span has no direction and `reverse` is the
1417
1652
  ramp's. An open end stops at a pinned one rather than crossing it, and an extent
1418
1653
  holding no value (`[Infinity, -Infinity]`) spans [0, 1].
1419
1654
 
1420
1655
  ```js
1656
+ import { rampDomain } from '@jbrowse/core/util/colorRamp'
1657
+
1421
1658
  // type signature
1422
1659
  (min: number | undefined, max: number | undefined, extent: readonly [number, number]) => [number, number]
1423
1660
  ```
@@ -1431,6 +1668,8 @@ not-a-number and no-value rows a threshold's key ends with. Empty while neither
1431
1668
  painted.
1432
1669
 
1433
1670
  ```js
1671
+ import { rampGapScales } from '@jbrowse/core/util/thresholdScale'
1672
+
1434
1673
  // type signature
1435
1674
  (id: string, met: { missing?: boolean | undefined; notNumber?: boolean | undefined; }) => CategoricalScale[]
1436
1675
  ```
@@ -1444,6 +1683,8 @@ for the same declaration, since a GPU backend re-uploads its ramp texture when
1444
1683
  the identity changes and a render state is rebuilt far more often than its ramp.
1445
1684
 
1446
1685
  ```js
1686
+ import { rampLutOf } from '@jbrowse/core/util/colorRamp'
1687
+
1447
1688
  // type signature
1448
1689
  (ramp: RampDeclaration) => Uint8Array<ArrayBufferLike>
1449
1690
  ```
@@ -1458,32 +1699,30 @@ The table stays straight and `domainMid` a value, so the middle stop follows the
1458
1699
  widened domain with no table baked again.
1459
1700
 
1460
1701
  ```js
1702
+ import { rampOverExtent } from '@jbrowse/core/util/markEncoding'
1703
+
1461
1704
  // type signature
1462
- (table: {…}, extent: [...]) => { ...; }
1705
+ (table: {…}, extent: [number, number]) => { kind: "ramp"; field: string; scale: "linear" | "log"; domain: [number, number]; pinned: [boolean, boolean]; domainMid?: number | undefined; range?: string[] | undefined; scheme?: "blues" | "blueyellowred" | "cividis" | "fall" | "inferno" | "juicebox" | "magma" | "purpleorange" | "redblue" | "redgreyblue" | "reds" | "viridis" | undefined; reverse?: boolean | undefined; extent: [number, number]; quantile?: number | undefined; lut: Uint8Array<…>; missing?: boolean | undefined; notNumber?: boolean | undefined; }
1463
1706
  ```
1464
1707
 
1465
1708
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncoding.ts)
1466
1709
 
1467
1710
  ### readConfObject
1468
1711
 
1469
- Given a configuration model (an instance of a ConfigurationSchema), read the
1470
- configuration value at the given path. Use this when you hold the configuration
1471
- model directly, e.g. an entry from `session.tracks`.
1472
-
1473
- Wants a **live config node**, not a snapshot of one, and passing a snapshot is a
1474
- type error. Slots are built with `types.stripDefault`, so a slot sitting at its
1475
- default is absent from a snapshot — "unset" and "at its default" are
1476
- indistinguishable there, and a read off one reports a default as missing.
1712
+ Read the value at a path of a live config node, such as a track's
1713
+ `configuration`, evaluating a `jexl:` callback with `args`.
1477
1714
 
1478
- That is enforced in the types only, deliberately: it can't be a runtime check.
1479
- `generateHierarchy` reads slots straight off the **un-hydrated frozen** entries
1480
- of `jbrowse.tracks` on purpose, because hydrating every track to answer the
1481
- track selector is what `types.frozen` exists to avoid — and those reads are
1482
- indistinguishable at runtime from the broken spelling.
1715
+ A snapshot is refused by the types, since a slot at its default is absent from
1716
+ one. A `session.tracks` entry is one (`TrackConfigEntry`): read its `trackId`
1717
+ and `type` directly, and a slot through a helper that supplies the default, such
1718
+ as `getConfAssemblyNamesOrNone`.
1483
1719
 
1484
1720
  ```js
1721
+ import { readConfObject } from '@jbrowse/core/configuration'
1722
+
1485
1723
  // type signature
1486
- {…}
1724
+ (confObject: AnyConfigurationModel) => AnyConfigurationSnapshot
1725
+ <CONFMODEL extends AnyConfigurationModel, const SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>> | ConfigurationSlotPath<ConfigurationSchemaForModel<CONFMODEL>> = ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(confObject: CONFMODEL, slotPath?: SLOT, args?: Record<string, unknown>) => SLOT extends string ? ConfigurationSlotValue<ConfigurationSchemaForModel<CONFMODEL>, SLOT> : ConfigurationSlotPathValue<ConfigurationSchemaForModel<CONFMODEL>, SLOT>
1487
1726
  ```
1488
1727
 
1489
1728
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/readConfObject.ts)
@@ -1494,6 +1733,8 @@ A reader of a column's values by row, its kind resolved here once. A `number`
1494
1733
  lane with no index reads straight off the lane.
1495
1734
 
1496
1735
  ```js
1736
+ import { readerOf } from '@jbrowse/core/util/featureTable'
1737
+
1497
1738
  // type signature
1498
1739
  (column: Column) => (i: number) => unknown
1499
1740
  ```
@@ -1512,12 +1753,30 @@ other adapter keys on its config alone: a synteny adapter is fetched from each
1512
1753
  of its assemblies and reads no reference.
1513
1754
 
1514
1755
  ```js
1756
+ import { READS_REFERENCE } from '@jbrowse/core/data_adapters/dataAdapterCache'
1757
+
1515
1758
  // type signature
1516
- 'readsReference'
1759
+ ;('readsReference')
1517
1760
  ```
1518
1761
 
1519
1762
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/dataAdapterCache.ts)
1520
1763
 
1764
+ ### refusingUndeclaredKeys
1765
+
1766
+ Runs `write` as a write: a `closed` schema created inside it refuses a key it
1767
+ does not declare, at any depth, where a config loading only names the key on the
1768
+ console. `setConf`, a settings bag and a plot draft write this way, so a typo in
1769
+ an edit is an error and a config written for another version still draws.
1770
+
1771
+ ```js
1772
+ import { refusingUndeclaredKeys } from '@jbrowse/core/configuration'
1773
+
1774
+ // type signature
1775
+ <T>(write: () => T) => T
1776
+ ```
1777
+
1778
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/snapshotPreprocess.ts)
1779
+
1521
1780
  ### relight
1522
1781
 
1523
1782
  Move a color's OKLCH lightness by `lightnessShift` and scale its chroma, holding
@@ -1539,6 +1798,8 @@ same coefficient moves a yellow and a blue by visibly different amounts: a lap
1539
1798
  has to read as one tone across the whole palette or it reads as noise.
1540
1799
 
1541
1800
  ```js
1801
+ import { relight } from '@jbrowse/core/util/color'
1802
+
1542
1803
  // type signature
1543
1804
  (color: string, lightnessShift: number, chromaScale?: number) => string
1544
1805
  ```
@@ -1553,6 +1814,8 @@ default, so a `when` value that is the default fires for an absent slot, which
1553
1814
  is what the generated JSON Schema's `if` does.
1554
1815
 
1555
1816
  ```js
1817
+ import { requirementProblems } from '@jbrowse/core/configuration'
1818
+
1556
1819
  // type signature
1557
1820
  (type: IAnyType, snapshot: Record<string, unknown>) => RequirementProblem[]
1558
1821
  ```
@@ -1565,6 +1828,8 @@ The pixels a band takes from the plot below it: 0 when off, the (optionally
1565
1828
  bound) stated height when on. This is the single spelling of "off spends 0 px".
1566
1829
 
1567
1830
  ```js
1831
+ import { reservedPx } from '@jbrowse/core/util/bandLayout'
1832
+
1568
1833
  // type signature
1569
1834
  (band: Band) => number
1570
1835
  ```
@@ -1581,7 +1846,7 @@ files, a MAF its species.
1581
1846
  ### RowSourceListing
1582
1847
 
1583
1848
  Every row an adapter has, in its own order, whatever the loaded regions hold, so
1584
- a row display gives a row with nothing in view its place, label and colour.
1849
+ a row display gives a row with nothing in view its place, label and color.
1585
1850
 
1586
1851
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/data_adapters/BaseAdapter/rowSources.ts)
1587
1852
 
@@ -1597,6 +1862,8 @@ what `reload()` clears, and nothing would re-run the install behind it. Three
1597
1862
  displays hand-rolled this IIFE and each drew the lines differently.
1598
1863
 
1599
1864
  ```js
1865
+ import { runLazyAfterAttach } from '@jbrowse/core/util/lazyAfterAttach'
1866
+
1600
1867
  // type signature
1601
1868
  <Self extends IStateTreeNode>(self: Self, load: () => Promise<(self: Self) => void>) => void
1602
1869
  ```
@@ -1610,6 +1877,8 @@ The table a step answers is what the next one reads, and the last one is what
1610
1877
  the encoder walks.
1611
1878
 
1612
1879
  ```js
1880
+ import { runTransforms } from '@jbrowse/core/util/featureTransforms'
1881
+
1613
1882
  // type signature
1614
1883
  (input: readonly Feature[] | FeatureTable, steps: readonly TransformStep[], jexl?: JexlInstance | undefined) => FeatureTable
1615
1884
  ```
@@ -1622,6 +1891,8 @@ parseBreakend, honoring its `Breakend | undefined` signature. ALT strings are
1622
1891
  user data and malformed breakends do occur;
1623
1892
 
1624
1893
  ```js
1894
+ import { safeParseBreakend } from '@jbrowse/core/util/svAlt'
1895
+
1625
1896
  // type signature
1626
1897
  (alt: string) => Breakend | undefined
1627
1898
  ```
@@ -1635,6 +1906,8 @@ interpolated per channel. `t` is clamped, so the ends are the end stops rather
1635
1906
  than an extrapolation past them, and a one-stop ramp is that stop everywhere.
1636
1907
 
1637
1908
  ```js
1909
+ import { sampleColorRamp } from '@jbrowse/core/util/colorRamp'
1910
+
1638
1911
  // type signature
1639
1912
  (stops: readonly ColorRampStop[], t: number) => ColorRampStop
1640
1913
  ```
@@ -1651,6 +1924,8 @@ clampBandHeight rule). Whole pixels, rounded by largest remainder, so the stack
1651
1924
  moves by exactly the rounded distance.
1652
1925
 
1653
1926
  ```js
1927
+ import { scaleBandHeights } from '@jbrowse/core/util/bandHeight'
1928
+
1654
1929
  // type signature
1655
1930
  (heights: number[], distance: number, floor?: number) => number[]
1656
1931
  ```
@@ -1665,6 +1940,8 @@ met there would floor the domain at 1 and fold a domain below 1 flat.
1665
1940
  `[Infinity, -Infinity]` where the scale reads nothing.
1666
1941
 
1667
1942
  ```js
1943
+ import { scaleExtent } from '@jbrowse/core/util/quantileExtent'
1944
+
1668
1945
  // type signature
1669
1946
  (values: ArrayLike<number>, count: number, scale: string, quantile?: number) => [number, number]
1670
1947
  ```
@@ -1673,7 +1950,7 @@ met there would floor the domain at 1 and fold a domain below 1 flat.
1673
1950
 
1674
1951
  ### ScaleTable
1675
1952
 
1676
- The table behind a channel a key is drawn from: a colour's, whose `kind` names
1953
+ The table behind a channel a key is drawn from: a color's, whose `kind` names
1677
1954
  the scale it resolved through, or a shape's. A `size` channel's (SizeScaleTable)
1678
1955
  draws no key and stands outside.
1679
1956
 
@@ -1689,8 +1966,10 @@ and the worker answers the entry of `layer`'s list that the instance's
1689
1966
  steps made. A second click aborts the first.
1690
1967
 
1691
1968
  ```js
1969
+ import { selectEncodedFeature } from '@jbrowse/core/util/selectEncodedFeature'
1970
+
1692
1971
  // type signature
1693
- (self: IStateTreeNode<IAnyType>, rotation: { begin(): ActiveFetch; cancel: () => void; dispose(): void; }, args: Omit<CoreGetEncodedLayersArgs, "byteLimit"> & { ...; }) => void
1972
+ (self: IStateTreeNode<IAnyType>, rotation: { begin(): ActiveFetch; cancel: () => void; dispose(): void; }, args: Omit<CoreGetEncodedLayersArgs, "byteLimit"> & { layer: number; featureIndex: number; }) => void
1694
1973
  ```
1695
1974
 
1696
1975
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/selectEncodedFeature.ts)
@@ -1703,6 +1982,8 @@ a sort of 4.5M counts measured ~1s. Median-of-three because Hi-C contacts arrive
1703
1982
  nearly sorted.
1704
1983
 
1705
1984
  ```js
1985
+ import { selectNth } from '@jbrowse/core/util/quantileExtent'
1986
+
1706
1987
  // type signature
1707
1988
  (a: Float32Array<ArrayBufferLike>, n: number, k: number) => number
1708
1989
  ```
@@ -1716,6 +1997,8 @@ source table over those features again, so every field still reads straight off
1716
1997
  them; over rows a step made, a table standing on them.
1717
1998
 
1718
1999
  ```js
2000
+ import { selectRows } from '@jbrowse/core/util/featureTable'
2001
+
1719
2002
  // type signature
1720
2003
  (table: FeatureTable, rows: Uint32Array<ArrayBufferLike>) => FeatureTable
1721
2004
  ```
@@ -1734,7 +2017,8 @@ Make JBrowse follow the host's light/dark state — the whole of it, in one moun
1734
2017
 
1735
2018
  `mode` is optional. Left out, JBrowse follows the page's declared `color-scheme`
1736
2019
  — so a host whose dark-mode toggle sets it, as most do, mounts this with a
1737
- session and nothing else — and the OS preference where the page declares none.
2020
+ session and nothing else. A page that declares `light dark` follows the OS, and
2021
+ a page that declares nothing stays light.
1738
2022
 
1739
2023
  A component rather than a documented pair of calls because the pair has a half
1740
2024
  that can be left out with nothing to show for it. `PaletteProvider` is the name
@@ -1748,6 +2032,8 @@ The session is the only thing that resolves a palette here, so a host supplying
1748
2032
  colors of its own mounts `PaletteProvider` directly instead.
1749
2033
 
1750
2034
  ```js
2035
+ import { SessionPaletteProvider } from '@jbrowse/core/ui/PaletteContext'
2036
+
1751
2037
  // type signature
1752
2038
  ({ session, mode, children, }: { session: ThemeModeSession; mode?: "dark" | "light" | undefined; children: ReactNode; }) => Element
1753
2039
  ```
@@ -1761,36 +2047,17 @@ array naming a sub-schema's member at any depth —
1761
2047
  `setConf(self, ['scales', 'y', 'domainMin'], 5)`. Takes the display or track
1762
2048
  model, or a config node directly.
1763
2049
 
1764
- **The path length says what the write replaces.** A path ending on a slot writes
1765
- that slot and leaves the object around it alone; a path ending on a sub-schema
1766
- replaces the whole object, which is how a channel whose members move together —
1767
- a facet's field and the domain that field's values order — gets written without
1768
- a stale member surviving underneath.
1769
-
1770
- **Prefer this over a bare `self.configuration.setSlot('x', v)`.** The constraint
1771
- here mirrors `getConf`'s, so on a model with a concrete schema an unknown slot
1772
- name is a compile error. `setSlot` itself stays untyped on purpose — the config
1773
- editor's slot facade routes dynamic slot names through it
1774
- (`configurationSchema.ts`) — and guards the name at runtime instead (ADR-052),
1775
- so a misspelled write is diagnosed one way or the other.
1776
-
1777
- **The read is the half with no diagnostic at all.** `getConf` for a name the
1778
- schema doesn't declare returns `undefined` and reports nothing, at any layer, so
1779
- the slot keeps reading as its default forever. Which makes the compile-time
1780
- constraint worth keeping _reachable_: it is only as good as the schema of the
1781
- holder handed in, and a holder widened to `AnyConfigurationModel` switches it
1782
- off entirely — the trap a mixin casting to reach its host walks into. Every such
1783
- cast names a concrete schema instead (`ConfigModelForFields`, or the base schema
1784
- when the slot is the base's), and `HostChecksSlotNames` pins each one.
1785
-
1786
- A wrong _value_ type still throws at runtime (MST type-checks the assignment)
1787
- rather than at compile time. `value` is deliberately `unknown` because
1788
- `undefined` is a legitimate write — it resets a slot to its schema default — and
1789
- the declared slot value type doesn't include it.
2050
+ A path ending on a slot writes that slot; one ending on a sub-schema replaces
2051
+ the whole object, so a channel's members (a facet's field and its domain) move
2052
+ together. On a concrete schema an unknown slot name is a compile error, and
2053
+ `setSlot` refuses one at runtime (ADR-052). A wrong value type throws at
2054
+ runtime; `null` or `undefined` resets the slot to its default (ADR-146).
1790
2055
 
1791
2056
  ```js
2057
+ import { setConf } from '@jbrowse/core/configuration'
2058
+
1792
2059
  // type signature
1793
- <…>(target: CONFMODEL | { ...; }, slotPath: SLOT, value: unknown) => void
2060
+ <CONFMODEL extends AnyConfigurationModel, const SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>> | ConfigurationSlotPath<ConfigurationSchemaForModel<CONFMODEL>> = ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(target: CONFMODEL | { configuration: CONFMODEL; }, slotPath: SLOT, value: unknown) => void
1794
2061
  ```
1795
2062
 
1796
2063
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/configuration/getConf.ts)
@@ -1800,6 +2067,8 @@ the declared slot value type doesn't include it.
1800
2067
  The `point` mark's painter code for each shape an encoding can name.
1801
2068
 
1802
2069
  ```js
2070
+ import { SHAPE_CODES } from '@jbrowse/core/util/shapeNames'
2071
+
1803
2072
  // type signature
1804
2073
  Record<ShapeName, number>
1805
2074
  ```
@@ -1834,7 +2103,7 @@ binds the field to a scale.
1834
2103
  A numeric field read through a linear or log scale into a width in CSS px:
1835
2104
  `range` is the px at each end of the domain (1 to 6 unset), and each end of the
1836
2105
  domain is pinned by `domainMin` or `domainMax` or follows the loaded regions'
1837
- extremes where unset, as a colour ramp's does. A feature holding no number takes
2106
+ extremes where unset, as a color ramp's does. A feature holding no number takes
1838
2107
  the range's first px.
1839
2108
 
1840
2109
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
@@ -1860,6 +2129,8 @@ projected to the screen, and a band drawn outside its reservation (an overlay)
1860
2129
  carries its own draw rect beside the stack.
1861
2130
 
1862
2131
  ```js
2132
+ import { stackBands } from '@jbrowse/core/util/bandLayout'
2133
+
1863
2134
  // type signature
1864
2135
  <K extends string>(order: readonly K[], bands: Record<K, Band>) => BandStack<K>
1865
2136
  ```
@@ -1877,6 +2148,8 @@ ramp entry both backends read at `t`, through the ramp's middle stop at
1877
2148
  into the color string.
1878
2149
 
1879
2150
  ```js
2151
+ import { stopsFromRampLut } from '@jbrowse/core/util/colorRamp'
2152
+
1880
2153
  // type signature
1881
2154
  (lut: Uint8Array<ArrayBufferLike>, n: number, midNorm?: number) => RampStop[]
1882
2155
  ```
@@ -1886,8 +2159,10 @@ into the color string.
1886
2159
  ### STRAND_FIELD
1887
2160
 
1888
2161
  ```js
2162
+ import { STRAND_FIELD } from '@jbrowse/core/util/categoricalField'
2163
+
1889
2164
  // type signature
1890
- 'strand'
2165
+ ;('strand')
1891
2166
  ```
1892
2167
 
1893
2168
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
@@ -1897,6 +2172,8 @@ into the color string.
1897
2172
  The conventional size floor for calling a sequence indel structural.
1898
2173
 
1899
2174
  ```js
2175
+ import { SV_MIN_LENGTH } from '@jbrowse/core/util/svAlt'
2176
+
1900
2177
  // type signature
1901
2178
  50
1902
2179
  ```
@@ -1909,8 +2186,10 @@ The structural-variant class `svClassOf` names. A VCF record and a BEDPE row
1909
2186
  carry it, and the mark display's `mate` step writes it per allele.
1910
2187
 
1911
2188
  ```js
2189
+ import { SV_TYPE_FIELD } from '@jbrowse/core/util/categoricalField'
2190
+
1912
2191
  // type signature
1913
- 'svType'
2192
+ ;('svType')
1914
2193
  ```
1915
2194
 
1916
2195
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/categoricalField.ts)
@@ -1922,6 +2201,8 @@ alleles state, CNV where they are losses and gains of one segment, OTHER where
1922
2201
  they otherwise disagree, and `''` for a record with no structural allele.
1923
2202
 
1924
2203
  ```js
2204
+ import { svClassOf } from '@jbrowse/core/util/svAlt'
2205
+
1925
2206
  // type signature
1926
2207
  (feature: Feature) => string
1927
2208
  ```
@@ -1937,6 +2218,8 @@ than BND, and a sequence allele is an insertion or deletion by its length
1937
2218
  against REF, else its `SVTYPE`'s class.
1938
2219
 
1939
2220
  ```js
2221
+ import { svClassOfAlt } from '@jbrowse/core/util/svAlt'
2222
+
1940
2223
  // type signature
1941
2224
  (alt: string, { ref, info, alleleIndex, }?: { ref?: string | undefined; info?: Record<string, unknown> | undefined; alleleIndex?: number | undefined; }) => string
1942
2225
  ```
@@ -1953,6 +2236,8 @@ none is a deletion and two or more a duplication. `''` for an empty or missing
1953
2236
  token.
1954
2237
 
1955
2238
  ```js
2239
+ import { svClassOfToken } from '@jbrowse/core/util/svAlt'
2240
+
1956
2241
  // type signature
1957
2242
  (raw: string) => string
1958
2243
  ```
@@ -1975,6 +2260,8 @@ are, left the middle interval unreachable, the walk stopping at the first cut a
1975
2260
  value is under.
1976
2261
 
1977
2262
  ```js
2263
+ import { thresholdCuts } from '@jbrowse/core/util/thresholdScale'
2264
+
1978
2265
  // type signature
1979
2266
  (domain: readonly (string | number)[]) => number[]
1980
2267
  ```
@@ -1991,8 +2278,10 @@ each from the lowest, where a config spells them for a reader; a bin's key stays
1991
2278
  its interval.
1992
2279
 
1993
2280
  ```js
2281
+ import { thresholdField } from '@jbrowse/core/util/thresholdScale'
2282
+
1994
2283
  // type signature
1995
- (field: string, {…}?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; labels?: readonly string[] | undefined; }) => CategoricalField
2284
+ (field: string, { domain, range, labels: names, }?: { domain?: readonly string[] | undefined; range?: readonly string[] | undefined; labels?: readonly string[] | undefined; }) => CategoricalField
1996
2285
  ```
1997
2286
 
1998
2287
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
@@ -2006,6 +2295,8 @@ bin and answers -1; an infinite one takes the end bin on its side, as d3's
2006
2295
  threshold scale places it, so a `-log10` of a zero p-value lands in the top bin.
2007
2296
 
2008
2297
  ```js
2298
+ import { thresholdIndex } from '@jbrowse/core/util/thresholdScale'
2299
+
2009
2300
  // type signature
2010
2301
  (value: unknown, domain: readonly number[]) => number
2011
2302
  ```
@@ -2019,8 +2310,10 @@ whole domain, then the not-a-number and no-value rows where a feature took one,
2019
2310
  in the order `thresholdField` sorts them.
2020
2311
 
2021
2312
  ```js
2313
+ import { thresholdKeyEntries } from '@jbrowse/core/util/thresholdScale'
2314
+
2022
2315
  // type signature
2023
- (cuts: readonly number[], range: readonly string[] | undefined, met: {…}, names?: readonly string[]) => {…}[]
2316
+ (cuts: readonly number[], range: readonly string[] | undefined, met: { missing?: boolean | undefined; notNumber?: boolean | undefined; }, names?: readonly string[]) => { value: string; label: string; color: string; missing?: true | undefined; }[]
2024
2317
  ```
2025
2318
 
2026
2319
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/thresholdScale.ts)
@@ -2031,6 +2324,8 @@ What a threshold scale's bins are called in a key, one label per palette entry:
2031
2324
  `< a` below the first cut, `a – b` between two, `≥ b` past the last.
2032
2325
 
2033
2326
  ```js
2327
+ import { thresholdLabels } from '@jbrowse/core/util/thresholdScale'
2328
+
2034
2329
  // type signature
2035
2330
  (domain: readonly number[]) => string[]
2036
2331
  ```
@@ -2039,10 +2334,12 @@ What a threshold scale's bins are called in a key, one label per palette entry:
2039
2334
 
2040
2335
  ### thresholdPalette
2041
2336
 
2042
- The colour of each interval, in order: the declared palette, and the default
2337
+ The color of each interval, in order: the declared palette, and the default
2043
2338
  categorical palette where it runs out.
2044
2339
 
2045
2340
  ```js
2341
+ import { thresholdPalette } from '@jbrowse/core/util/thresholdScale'
2342
+
2046
2343
  // type signature
2047
2344
  (bins: number, palette?: readonly string[]) => string[]
2048
2345
  ```
@@ -2052,7 +2349,7 @@ categorical palette where it runs out.
2052
2349
  ### ThresholdRef
2053
2350
 
2054
2351
  A numeric field cut into intervals: `domain` is the ascending cut points and
2055
- `range` holds one colour more, so a value paints the entry for the number of cut
2352
+ `range` holds one color more, so a value paints the entry for the number of cut
2056
2353
  points it is at or past. A value that is not a number belongs to no interval.
2057
2354
 
2058
2355
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
@@ -2070,6 +2367,8 @@ the last answered.
2070
2367
  A column's value at a row, whatever its kind: for a loop that reads few rows.
2071
2368
 
2072
2369
  ```js
2370
+ import { valueAt } from '@jbrowse/core/util/featureTable'
2371
+
2073
2372
  // type signature
2074
2373
  (column: Column, i: number) => unknown
2075
2374
  ```
@@ -2082,18 +2381,35 @@ The 256 viridis stops, fully opaque. Feed them to buildColorRampLut for the
2082
2381
  texture/fillStyle form, or to sampleColorRamp for legend stops.
2083
2382
 
2084
2383
  ```js
2384
+ import { VIRIDIS_STOPS } from '@jbrowse/core/util/colorRamp'
2385
+
2085
2386
  // type signature
2086
2387
  readonly ColorRampStop[]
2087
2388
  ```
2088
2389
 
2089
2390
  [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/colorRamp.ts)
2090
2391
 
2392
+ ### WindowStep
2393
+
2394
+ Every row kept, each written with `ops` summarized over the rows of its group
2395
+ around it, Vega-Lite's window transform: a group is a distinct `groupby` value
2396
+ set within a section, its rows taken in `start` order, and `frame` counts rows
2397
+ before and after the current one, `null` running to the group's end.
2398
+ `[-10, 10]`, the default, is a moving average over 21 rows, whatever bases they
2399
+ span; `[null, 0]` a running total. A frame cut off at a group's end summarizes
2400
+ the rows it has. The rows come out grouped, each group in `start` order, so a
2401
+ `line` walks one group at a time.
2402
+
2403
+ [Source code](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/util/markEncodingTypes.ts)
2404
+
2091
2405
  ### withColumns
2092
2406
 
2093
2407
  The table's rows with `written` beside them, in the order `rows` names where it
2094
2408
  names one.
2095
2409
 
2096
2410
  ```js
2411
+ import { withColumns } from '@jbrowse/core/util/featureTable'
2412
+
2097
2413
  // type signature
2098
2414
  (table: FeatureTable, written: ReadonlyMap<string, Column>, rows?: Uint32Array<ArrayBufferLike> | undefined) => FeatureTable
2099
2415
  ```
@@ -2105,6 +2421,8 @@ names one.
2105
2421
  HitIndexed over what the worker shipped.
2106
2422
 
2107
2423
  ```js
2424
+ import { withHitIndex } from '@jbrowse/core/util/markEncoding'
2425
+
2108
2426
  // type signature
2109
2427
  <T extends EncodedChannels>(channels: T) => HitIndexed<T>
2110
2428
  ```