@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
@@ -1,21 +1,21 @@
1
1
  /**
2
- * The scales a colour object paints through, in a module that imports
2
+ * The scales a color object paints through, in a module that imports
3
3
  * nothing: `jbrowse validate` carries a copy of it, so the validator and the
4
4
  * displays read one statement.
5
5
  */
6
- /** How a colour object maps its `field`; `none` paints `value`. */
6
+ /** How a color object maps its `field`; `none` paints `value`. */
7
7
  export declare const COLOR_SCALES: readonly ['none', 'categorical', 'linear', 'log', 'threshold'];
8
8
  /**
9
- * The scale that maps no field: each feature paints the colour it carries, and
10
- * the key names the colours `domain` lists. Only a display whose features
11
- * carry colours of their own declares it.
9
+ * The scale that maps no field: each feature paints the color it carries, and
10
+ * the key names the colors `domain` lists. Only a display whose features
11
+ * carry colors of their own declares it.
12
12
  */
13
13
  export declare const IDENTITY_SCALE = "identity";
14
14
  export type ColorScaleName = (typeof COLOR_SCALES)[number] | typeof IDENTITY_SCALE;
15
15
  /**
16
16
  * A field's defaults on a display: the scale it paints through while `scale`
17
17
  * is unset, and the members that scale reads while the config leaves them
18
- * unwritten, so a field with a vocabulary or ramp of its own is the colour
18
+ * unwritten, so a field with a vocabulary or ramp of its own is the color
19
19
  * object's defaults rather than a painter beside it.
20
20
  */
21
21
  export interface FieldPreset<S extends string = ColorScaleName> {
@@ -31,17 +31,22 @@ export interface FieldPreset<S extends string = ColorScaleName> {
31
31
  domainMid?: number;
32
32
  scheme?: string;
33
33
  reverse?: boolean;
34
+ /** A threshold key's direction: its highest interval first. */
35
+ descending?: boolean;
34
36
  }
35
37
  /** Each field's preset, `*` for any other field. */
36
38
  export type FieldPresets<S extends string = ColorScaleName> = Readonly<Record<string, FieldPreset<S>>>;
37
39
  /**
38
- * The fields whose values have names, an order and colours of their own on
39
- * every display, beneath each display's own presets. Red forward and blue
40
- * reverse is what the synteny ribbons paint too. The SV classes are
40
+ * The fields whose values have names, an order and colors of their own on
41
+ * every display, beneath each display's own presets. The synteny ribbons
42
+ * paint strand from this range too. The SV classes are
41
43
  * `svClassOf`'s, deletion red and duplication blue as dbVar and gnomAD-SV
42
44
  * paint them, insertion the pileup's purple, and the rest kept apart under
43
45
  * deuteranopia and protanopia. A record with no class files under `''`, so
44
- * each display keeps its own no-value colour for it.
46
+ * each display keeps its own no-value color for it. The impact tiers are a
47
+ * variant's most severe SnpEff (ANN) or VEP (CSQ) consequence, and a record
48
+ * with neither files under Unannotated, its own color: "nobody looked" is
49
+ * not MODIFIER's "we looked and it is harmless".
45
50
  */
46
51
  export declare const UNIVERSAL_FIELD_PRESETS: {
47
52
  readonly strand: {
@@ -58,6 +63,13 @@ export declare const UNIVERSAL_FIELD_PRESETS: {
58
63
  readonly labels: readonly ["Deletion", "Duplication", "Insertion", "Inversion", "Copy-number variable", "Tandem repeat", "Breakend / translocation", "Complex", "Other / mixed"];
59
64
  readonly title: 'SV type';
60
65
  };
66
+ readonly impact: {
67
+ readonly scale: 'categorical';
68
+ readonly missing: 'Unannotated';
69
+ readonly domain: readonly ["HIGH", "MODERATE", "LOW", "MODIFIER", "Unannotated"];
70
+ readonly range: readonly ["#d32f2f", "#f57c00", "#fbc02d", "#9e9e9e", "#607d8b"];
71
+ readonly title: 'Consequence impact';
72
+ };
61
73
  };
62
74
  /** The universal preset of `field`, if it has one. */
63
75
  export declare function universalPresetOf(field: string): FieldPreset<'categorical'> | undefined;
@@ -75,6 +87,73 @@ export declare const FEATURE_FIELD_PRESETS: {
75
87
  };
76
88
  readonly '*': FieldPreset<"categorical">;
77
89
  };
90
+ /**
91
+ * Mapping quality's bins, each keyed by its lowest score and confident reads
92
+ * first: real MAPQ is bimodal at the aligner's ceiling and at 0, and these
93
+ * are the cuts people filter on (`samtools view -q 10` / `-q 30`).
94
+ */
95
+ export declare const MAPQ_BINS: readonly [{
96
+ readonly key: '30';
97
+ readonly min: 30;
98
+ readonly label: 'MAPQ 30+ (high confidence)';
99
+ }, {
100
+ readonly key: '10';
101
+ readonly min: 10;
102
+ readonly label: 'MAPQ 10-29';
103
+ }, {
104
+ readonly key: '1';
105
+ readonly min: 1;
106
+ readonly label: 'MAPQ 1-9 (low)';
107
+ }, {
108
+ readonly key: '0';
109
+ readonly min: 0;
110
+ readonly label: 'MAPQ 0 (multi-mapping)';
111
+ }];
112
+ /**
113
+ * The measurements whose scale is part of what they mean, for a display
114
+ * whose features carry them to spread into its own presets: `mapq` in the
115
+ * bins above; `identity` a fraction from 0 to 1, red where it diverges and
116
+ * blue where it is conserved, as conservation tracks paint it, through a grey
117
+ * middle that stays visible on a white page and under a faint ribbon, where
118
+ * viridis's bright top washed out; and `dnds` read against 1, its ramp's pale
119
+ * middle, up to 2, past which a few fast-evolving genes would flatten the
120
+ * rest into one blue; and `syntenicDepth` grey where a gene pair is
121
+ * one-to-one, so genes sharing one ortholog are what takes color. Opt-in rather
122
+ * than universal, since a column another file names `identity` need not be a
123
+ * fraction.
124
+ */
125
+ export declare const MEASURE_FIELD_PRESETS: {
126
+ readonly mapq: {
127
+ readonly scale: 'threshold';
128
+ readonly domain: ("0" | "1" | "10" | "30")[];
129
+ readonly scheme: 'cividis';
130
+ readonly labels: ("MAPQ 0 (multi-mapping)" | "MAPQ 1-9 (low)" | "MAPQ 10-29" | "MAPQ 30+ (high confidence)")[];
131
+ readonly title: 'Mapping quality';
132
+ readonly descending: true;
133
+ };
134
+ readonly identity: {
135
+ readonly scale: 'linear';
136
+ readonly domainMin: 0;
137
+ readonly domainMax: 1;
138
+ readonly scheme: 'redgreyblue';
139
+ readonly title: 'Identity';
140
+ };
141
+ readonly dnds: {
142
+ readonly scale: 'linear';
143
+ readonly domainMin: 0;
144
+ readonly domainMax: 2;
145
+ readonly domainMid: 1;
146
+ readonly scheme: 'blueyellowred';
147
+ readonly title: 'dN/dS';
148
+ };
149
+ readonly syntenicDepth: {
150
+ readonly scale: 'threshold';
151
+ readonly domain: readonly ["2", "3"];
152
+ readonly range: readonly ["#bdbdbd", "#fdae6b", "#e6550d"];
153
+ readonly labels: readonly ["One-to-one", "Shared by 2 genes", "Shared by 3 or more"];
154
+ readonly title: 'Syntenic depth';
155
+ };
156
+ };
78
157
  /**
79
158
  * A field's preset under `presets`: its own, else a universal one, else
80
159
  * `*`'s, else categorical.
@@ -83,20 +162,31 @@ export declare function presetOf<S extends string>(presets: FieldPresets<S>, fie
83
162
  /** What a field paints through under `presets` while `scale` is unset. */
84
163
  export declare function fieldScaleOf<S extends string>(presets: FieldPresets<S>, field: string): S | 'categorical';
85
164
  /**
86
- * A colour object with its field's preset under it: each member the preset
165
+ * A color object with its field's preset under it: each member the preset
87
166
  * names and the config leaves unwritten, an empty list counting as unwritten.
88
- * Only while the colour paints through the preset's own scale, so the cuts of
167
+ * Only while the color paints through the preset's own scale, so the cuts of
89
168
  * a threshold preset never reach a field read through a ramp. A categorical
90
- * preset's `range` and `labels` name its `domain`'s values in order, so they
91
- * fill only while `domain` does too: a written order keeps each value's own
92
- * colour and name.
169
+ * preset's `range` and `labels` name its `domain`'s values in order, and a
170
+ * threshold preset's `labels` its intervals, so they fill only while `domain`
171
+ * does too: a written order keeps each value's own color and name, and written
172
+ * cuts keep the preset's palette and lose its interval names.
93
173
  */
94
174
  export declare function withPreset<C extends {
95
175
  field?: string;
96
176
  scale?: string;
97
177
  }>(color: C, presets: FieldPresets<string>): C;
98
178
  /**
99
- * The scale a colour object paints through: `none` while no `field` is
179
+ * A color object with `implied` as its field while it names neither a field
180
+ * nor a constant, for a display whose bare color object still maps one (a
181
+ * quantitative display's `score`), so the display and `jbrowse validate`
182
+ * read it alike. A written `value` keeps the object a constant.
183
+ */
184
+ export declare function withImpliedField<C extends {
185
+ value?: unknown;
186
+ field?: string;
187
+ }>(color: C, implied: string | undefined): C;
188
+ /**
189
+ * The scale a color object paints through: `none` while no `field` is
100
190
  * named, else its own `scale`, or `fieldScale` where that is unset.
101
191
  */
102
192
  export declare function paintedScale<S extends string, F extends string>({ scale, field }: {
@@ -105,28 +195,32 @@ export declare function paintedScale<S extends string, F extends string>({ scale
105
195
  }, fieldScale: F): S | F | 'none';
106
196
  /** A combination of a scale's slots the display cannot draw as written. */
107
197
  export interface ScaleProblem {
108
- rule: 'threshold-cuts' | 'threshold-range' | 'ramp-domain' | 'domain-ends' | 'domain-quantile' | 'labels-domain';
198
+ rule: 'threshold-cuts' | 'threshold-range' | 'ramp-domain' | 'ramp-range' | 'domain-ends' | 'domain-quantile' | 'log-floor' | 'labels-domain';
109
199
  /** the slot to look at, relative to the scale's own object */
110
200
  slot: string;
111
201
  message: string;
112
202
  }
113
203
  /**
114
- * The members a quantitative scale's ends are read by, as a colour ramp,
204
+ * The members a quantitative scale's ends are read by, as a color ramp,
115
205
  * `scales.y` and a mark's width spell them alike.
116
206
  */
117
207
  export interface ScaleEnds {
118
208
  domainMin?: number;
119
209
  domainMax?: number;
120
210
  domainQuantile?: number;
211
+ /** the scale's kind, `scales.y.type` or a color's `scale`, where it bears on the ends */
212
+ type?: string;
121
213
  }
122
214
  /**
123
215
  * What a quantitative scale's ends say together that neither can refuse
124
216
  * alone: a `domainMax` below its `domainMin`, which every such scale draws in
125
217
  * order either way, and a `domainQuantile` outside 0.5 to 1, where the quantile
126
- * an open end follows is clamped. `reverse` is whether the scale turns round by
127
- * a member of its own, which is then the spelling to point at.
218
+ * an open end follows is clamped; and a log scale's `domainMin` at or below 0,
219
+ * which no log scale can hold, so the end floors above it. `reverse` is whether
220
+ * the scale turns round by a member of its own, which is then the spelling to
221
+ * point at.
128
222
  */
129
- export declare function scaleEndProblems({ domainMin, domainMax, domainQuantile }: ScaleEnds, { reverse }?: {
223
+ export declare function scaleEndProblems({ domainMin, domainMax, domainQuantile, type }: ScaleEnds, { reverse }?: {
130
224
  reverse?: boolean;
131
225
  }): ScaleProblem[];
132
226
  /** Problems as the lines a display's corner notice lists, under the setting that holds the scale. */
@@ -143,8 +237,15 @@ export interface ColorSlots {
143
237
  domainQuantile?: number;
144
238
  labels?: readonly unknown[];
145
239
  }
240
+ /** A quantitative scale's ends among the members `member` reads, each a number or unset. */
241
+ export declare function scaleEndsOf(member: (name: string) => unknown): ScaleEnds;
242
+ /**
243
+ * The members `colorProblems` reads among the ones `member` reads, each of the
244
+ * type it reads or unset, so a config snapshot and a config node answer alike.
245
+ */
246
+ export declare function colorSlotsOf(member: (name: string) => unknown): ColorSlots;
146
247
  /**
147
- * What a colour object's slots say together that no single slot can refuse,
248
+ * What a color object's slots say together that no single slot can refuse,
148
249
  * since the config editor writes one slot at a time (ADR-133), read with its
149
250
  * field's preset under it. A display shows these as a notice and draws what
150
251
  * it can. A threshold naming no cuts leaves its intervals to the display —
@@ -1,9 +1,9 @@
1
1
  /**
2
- * The scales a colour object paints through, in a module that imports
2
+ * The scales a color object paints through, in a module that imports
3
3
  * nothing: `jbrowse validate` carries a copy of it, so the validator and the
4
4
  * displays read one statement.
5
5
  */
6
- /** How a colour object maps its `field`; `none` paints `value`. */
6
+ /** How a color object maps its `field`; `none` paints `value`. */
7
7
  export const COLOR_SCALES = [
8
8
  'none',
9
9
  'categorical',
@@ -12,20 +12,23 @@ export const COLOR_SCALES = [
12
12
  'threshold',
13
13
  ];
14
14
  /**
15
- * The scale that maps no field: each feature paints the colour it carries, and
16
- * the key names the colours `domain` lists. Only a display whose features
17
- * carry colours of their own declares it.
15
+ * The scale that maps no field: each feature paints the color it carries, and
16
+ * the key names the colors `domain` lists. Only a display whose features
17
+ * carry colors of their own declares it.
18
18
  */
19
19
  export const IDENTITY_SCALE = 'identity';
20
20
  const CATEGORICAL_PRESET = { scale: 'categorical' };
21
21
  /**
22
- * The fields whose values have names, an order and colours of their own on
23
- * every display, beneath each display's own presets. Red forward and blue
24
- * reverse is what the synteny ribbons paint too. The SV classes are
22
+ * The fields whose values have names, an order and colors of their own on
23
+ * every display, beneath each display's own presets. The synteny ribbons
24
+ * paint strand from this range too. The SV classes are
25
25
  * `svClassOf`'s, deletion red and duplication blue as dbVar and gnomAD-SV
26
26
  * paint them, insertion the pileup's purple, and the rest kept apart under
27
27
  * deuteranopia and protanopia. A record with no class files under `''`, so
28
- * each display keeps its own no-value colour for it.
28
+ * each display keeps its own no-value color for it. The impact tiers are a
29
+ * variant's most severe SnpEff (ANN) or VEP (CSQ) consequence, and a record
30
+ * with neither files under Unannotated, its own color: "nobody looked" is
31
+ * not MODIFIER's "we looked and it is harmless".
29
32
  */
30
33
  export const UNIVERSAL_FIELD_PRESETS = {
31
34
  strand: {
@@ -62,6 +65,13 @@ export const UNIVERSAL_FIELD_PRESETS = {
62
65
  ],
63
66
  title: 'SV type',
64
67
  },
68
+ impact: {
69
+ scale: 'categorical',
70
+ missing: 'Unannotated',
71
+ domain: ['HIGH', 'MODERATE', 'LOW', 'MODIFIER', 'Unannotated'],
72
+ range: ['#d32f2f', '#f57c00', '#fbc02d', '#9e9e9e', '#607d8b'],
73
+ title: 'Consequence impact',
74
+ },
65
75
  };
66
76
  /** The universal preset of `field`, if it has one. */
67
77
  export function universalPresetOf(field) {
@@ -81,6 +91,63 @@ export const FEATURE_FIELD_PRESETS = {
81
91
  score: { scale: 'linear' },
82
92
  '*': CATEGORICAL_PRESET,
83
93
  };
94
+ /**
95
+ * Mapping quality's bins, each keyed by its lowest score and confident reads
96
+ * first: real MAPQ is bimodal at the aligner's ceiling and at 0, and these
97
+ * are the cuts people filter on (`samtools view -q 10` / `-q 30`).
98
+ */
99
+ export const MAPQ_BINS = [
100
+ { key: '30', min: 30, label: 'MAPQ 30+ (high confidence)' },
101
+ { key: '10', min: 10, label: 'MAPQ 10-29' },
102
+ { key: '1', min: 1, label: 'MAPQ 1-9 (low)' },
103
+ { key: '0', min: 0, label: 'MAPQ 0 (multi-mapping)' },
104
+ ];
105
+ const MAPQ_BINS_ASCENDING = [...MAPQ_BINS].reverse();
106
+ /**
107
+ * The measurements whose scale is part of what they mean, for a display
108
+ * whose features carry them to spread into its own presets: `mapq` in the
109
+ * bins above; `identity` a fraction from 0 to 1, red where it diverges and
110
+ * blue where it is conserved, as conservation tracks paint it, through a grey
111
+ * middle that stays visible on a white page and under a faint ribbon, where
112
+ * viridis's bright top washed out; and `dnds` read against 1, its ramp's pale
113
+ * middle, up to 2, past which a few fast-evolving genes would flatten the
114
+ * rest into one blue; and `syntenicDepth` grey where a gene pair is
115
+ * one-to-one, so genes sharing one ortholog are what takes color. Opt-in rather
116
+ * than universal, since a column another file names `identity` need not be a
117
+ * fraction.
118
+ */
119
+ export const MEASURE_FIELD_PRESETS = {
120
+ mapq: {
121
+ scale: 'threshold',
122
+ domain: MAPQ_BINS_ASCENDING.slice(1).map(bin => bin.key),
123
+ scheme: 'cividis',
124
+ labels: MAPQ_BINS_ASCENDING.map(bin => bin.label),
125
+ title: 'Mapping quality',
126
+ descending: true,
127
+ },
128
+ identity: {
129
+ scale: 'linear',
130
+ domainMin: 0,
131
+ domainMax: 1,
132
+ scheme: 'redgreyblue',
133
+ title: 'Identity',
134
+ },
135
+ dnds: {
136
+ scale: 'linear',
137
+ domainMin: 0,
138
+ domainMax: 2,
139
+ domainMid: 1,
140
+ scheme: 'blueyellowred',
141
+ title: 'dN/dS',
142
+ },
143
+ syntenicDepth: {
144
+ scale: 'threshold',
145
+ domain: ['2', '3'],
146
+ range: ['#bdbdbd', '#fdae6b', '#e6550d'],
147
+ labels: ['One-to-one', 'Shared by 2 genes', 'Shared by 3 or more'],
148
+ title: 'Syntenic depth',
149
+ },
150
+ };
84
151
  /**
85
152
  * A field's preset under `presets`: its own, else a universal one, else
86
153
  * `*`'s, else categorical.
@@ -98,13 +165,14 @@ function unwritten(value) {
98
165
  return value === undefined || (Array.isArray(value) && value.length === 0);
99
166
  }
100
167
  /**
101
- * A colour object with its field's preset under it: each member the preset
168
+ * A color object with its field's preset under it: each member the preset
102
169
  * names and the config leaves unwritten, an empty list counting as unwritten.
103
- * Only while the colour paints through the preset's own scale, so the cuts of
170
+ * Only while the color paints through the preset's own scale, so the cuts of
104
171
  * a threshold preset never reach a field read through a ramp. A categorical
105
- * preset's `range` and `labels` name its `domain`'s values in order, so they
106
- * fill only while `domain` does too: a written order keeps each value's own
107
- * colour and name.
172
+ * preset's `range` and `labels` name its `domain`'s values in order, and a
173
+ * threshold preset's `labels` its intervals, so they fill only while `domain`
174
+ * does too: a written order keeps each value's own color and name, and written
175
+ * cuts keep the preset's palette and lose its interval names.
108
176
  */
109
177
  export function withPreset(color, presets) {
110
178
  const field = color.field ?? '';
@@ -113,17 +181,27 @@ export function withPreset(color, presets) {
113
181
  return color;
114
182
  }
115
183
  const written = new Map(Object.entries(color));
116
- const ordered = preset.scale !== 'categorical' ||
117
- !preset.domain ||
118
- unwritten(written.get('domain'));
184
+ const ownDomain = !preset.domain || unwritten(written.get('domain'));
185
+ const named = preset.scale === 'categorical' ? ['range', 'labels'] : ['labels'];
119
186
  const filled = Object.entries(preset).filter(([key]) => key !== 'scale' &&
120
187
  key !== 'missing' &&
121
- (ordered || (key !== 'range' && key !== 'labels')) &&
188
+ (ownDomain || !named.includes(key)) &&
122
189
  unwritten(written.get(key)));
123
190
  return filled.length > 0 ? { ...color, ...Object.fromEntries(filled) } : color;
124
191
  }
125
192
  /**
126
- * The scale a colour object paints through: `none` while no `field` is
193
+ * A color object with `implied` as its field while it names neither a field
194
+ * nor a constant, for a display whose bare color object still maps one (a
195
+ * quantitative display's `score`), so the display and `jbrowse validate`
196
+ * read it alike. A written `value` keeps the object a constant.
197
+ */
198
+ export function withImpliedField(color, implied) {
199
+ return implied && !color.field && color.value === undefined
200
+ ? { ...color, field: implied }
201
+ : color;
202
+ }
203
+ /**
204
+ * The scale a color object paints through: `none` while no `field` is
127
205
  * named, else its own `scale`, or `fieldScale` where that is unset.
128
206
  */
129
207
  export function paintedScale({ scale, field }, fieldScale) {
@@ -133,11 +211,22 @@ export function paintedScale({ scale, field }, fieldScale) {
133
211
  * What a quantitative scale's ends say together that neither can refuse
134
212
  * alone: a `domainMax` below its `domainMin`, which every such scale draws in
135
213
  * order either way, and a `domainQuantile` outside 0.5 to 1, where the quantile
136
- * an open end follows is clamped. `reverse` is whether the scale turns round by
137
- * a member of its own, which is then the spelling to point at.
214
+ * an open end follows is clamped; and a log scale's `domainMin` at or below 0,
215
+ * which no log scale can hold, so the end floors above it. `reverse` is whether
216
+ * the scale turns round by a member of its own, which is then the spelling to
217
+ * point at.
138
218
  */
139
- export function scaleEndProblems({ domainMin, domainMax, domainQuantile }, { reverse = false } = {}) {
219
+ export function scaleEndProblems({ domainMin, domainMax, domainQuantile, type }, { reverse = false } = {}) {
140
220
  return [
221
+ ...(type === 'log' && domainMin !== undefined && domainMin <= 0
222
+ ? [
223
+ {
224
+ rule: 'log-floor',
225
+ slot: 'domainMin',
226
+ message: `a log scale has no ${domainMin}: the end floors to a positive value, so leave domainMin unset to follow the data or pin it above 0`,
227
+ },
228
+ ]
229
+ : []),
141
230
  ...(domainMin !== undefined &&
142
231
  domainMax !== undefined &&
143
232
  domainMin > domainMax
@@ -165,11 +254,44 @@ export function scaleEndProblems({ domainMin, domainMax, domainQuantile }, { rev
165
254
  export function noticeLines(setting, problems) {
166
255
  return problems.map(({ slot, message }) => `${setting}.${slot}: ${message}`);
167
256
  }
257
+ function numberOf(value) {
258
+ return typeof value === 'number' ? value : undefined;
259
+ }
260
+ function stringOf(value) {
261
+ return typeof value === 'string' ? value : undefined;
262
+ }
263
+ function listOf(value) {
264
+ return Array.isArray(value) ? value : undefined;
265
+ }
266
+ /** A quantitative scale's ends among the members `member` reads, each a number or unset. */
267
+ export function scaleEndsOf(member) {
268
+ return {
269
+ domainMin: numberOf(member('domainMin')),
270
+ domainMax: numberOf(member('domainMax')),
271
+ domainQuantile: numberOf(member('domainQuantile')),
272
+ type: stringOf(member('type')),
273
+ };
274
+ }
275
+ /**
276
+ * The members `colorProblems` reads among the ones `member` reads, each of the
277
+ * type it reads or unset, so a config snapshot and a config node answer alike.
278
+ */
279
+ export function colorSlotsOf(member) {
280
+ return {
281
+ ...scaleEndsOf(member),
282
+ value: stringOf(member('value')),
283
+ field: stringOf(member('field')) ?? '',
284
+ scale: stringOf(member('scale')),
285
+ domain: listOf(member('domain')),
286
+ range: listOf(member('range')),
287
+ labels: listOf(member('labels')),
288
+ };
289
+ }
168
290
  function pinned(entry) {
169
291
  return entry !== '' && Number.isFinite(Number(entry));
170
292
  }
171
293
  /**
172
- * What a colour object's slots say together that no single slot can refuse,
294
+ * What a color object's slots say together that no single slot can refuse,
173
295
  * since the config editor writes one slot at a time (ADR-133), read with its
174
296
  * field's preset under it. A display shows these as a notice and draws what
175
297
  * it can. A threshold naming no cuts leaves its intervals to the display —
@@ -198,7 +320,7 @@ export function colorProblems(written, presets) {
198
320
  problems.push({
199
321
  rule: 'threshold-range',
200
322
  slot: 'range',
201
- message: `${domain.length} threshold ${domain.length === 1 ? 'cut makes' : 'cuts make'} ${domain.length + 1} intervals, one colour each, and range lists ${range.length}: a missing colour comes from the default palette and an extra one is never read`,
323
+ message: `${domain.length} threshold ${domain.length === 1 ? 'cut makes' : 'cuts make'} ${domain.length + 1} intervals, one color each, and range lists ${range.length}: a missing color comes from the default palette and an extra one is never read`,
202
324
  });
203
325
  }
204
326
  }
@@ -207,10 +329,17 @@ export function colorProblems(written, presets) {
207
329
  problems.push({
208
330
  rule: 'ramp-domain',
209
331
  slot: 'domain',
210
- message: "a linear or log scale reads no domain, which is a categorical scale's order and a threshold scale's cuts; a ramp's ends are domainMin and domainMax where the colour has them",
332
+ message: "a linear or log scale reads no domain, which is a categorical scale's order and a threshold scale's cuts; a ramp's ends are domainMin and domainMax where the color has them",
333
+ });
334
+ }
335
+ if (range.length === 1) {
336
+ problems.push({
337
+ rule: 'ramp-range',
338
+ slot: 'range',
339
+ message: 'a linear or log ramp runs between at least two colors, and one paints every value alike; a single color is value',
211
340
  });
212
341
  }
213
- problems.push(...scaleEndProblems(color, { reverse: true }));
342
+ problems.push(...scaleEndProblems({ ...color, type: scale }, { reverse: true }));
214
343
  }
215
344
  const { labels = [] } = color;
216
345
  const named = scale === 'categorical' || scale === IDENTITY_SCALE
@@ -225,13 +354,13 @@ export function colorProblems(written, presets) {
225
354
  const what = scale === 'categorical'
226
355
  ? 'value'
227
356
  : scale === IDENTITY_SCALE
228
- ? 'colour'
357
+ ? 'color'
229
358
  : 'interval';
230
359
  problems.push({
231
360
  rule: 'labels-domain',
232
361
  slot: 'labels',
233
362
  message: named === undefined
234
- ? "labels names a categorical scale's values, a threshold scale's intervals or an identity scale's colours, and this colour paints none of them"
363
+ ? "labels names a categorical scale's values, a threshold scale's intervals or an identity scale's colors, and this color paints none of them"
235
364
  : `labels names one ${what} each, and ${labels.length} ${labels.length === 1 ? 'label names' : 'labels name'} ${named} ${named === 1 ? what : `${what}s`}: a label past them names nothing`,
236
365
  });
237
366
  }
@@ -1,15 +1,19 @@
1
1
  /**
2
2
  * #api
3
- * The named ramps a continuous colour scale's `scheme` takes, each one a stop
3
+ * The named ramps a continuous color scale's `scheme` takes, each one a stop
4
4
  * table in `colorRamp.ts` that every ramp baker reads, so no display can name
5
5
  * a scheme nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are
6
6
  * matplotlib's perceptual ramps, dark at the low end; `juicebox` fades from
7
7
  * transparent to red, as Juicebox paints contacts; `fall` runs white through
8
8
  * yellow and red to black, as HiGlass does; `reds` and `blues` are
9
9
  * ColorBrewer's, from white; `redblue` and `purpleorange` diverge through
10
- * white, ColorBrewer's RdBu and PuOr.
10
+ * white, ColorBrewer's RdBu and PuOr; `redgreyblue` diverges through a grey
11
+ * middle, which stays visible on a white page where a white middle would
12
+ * not, as `identity` paints;
13
+ * `blueyellowred` is ColorBrewer's RdYlBu turned round, so low reads cool and
14
+ * high hot through a pale yellow middle, as `dnds` paints.
11
15
  */
12
- export declare const COLOR_SCHEMES: readonly ['viridis', 'magma', 'inferno', 'cividis', 'juicebox', 'fall', 'reds', 'blues', 'redblue', 'purpleorange'];
16
+ export declare const COLOR_SCHEMES: readonly ['viridis', 'magma', 'inferno', 'cividis', 'juicebox', 'fall', 'reds', 'blues', 'redblue', 'purpleorange', 'redgreyblue', 'blueyellowred'];
13
17
  /** #api */
14
18
  export type ColorSchemeName = (typeof COLOR_SCHEMES)[number];
15
19
  /**
@@ -1,13 +1,17 @@
1
1
  /**
2
2
  * #api
3
- * The named ramps a continuous colour scale's `scheme` takes, each one a stop
3
+ * The named ramps a continuous color scale's `scheme` takes, each one a stop
4
4
  * table in `colorRamp.ts` that every ramp baker reads, so no display can name
5
5
  * a scheme nothing bakes. `viridis`, `magma`, `inferno` and `cividis` are
6
6
  * matplotlib's perceptual ramps, dark at the low end; `juicebox` fades from
7
7
  * transparent to red, as Juicebox paints contacts; `fall` runs white through
8
8
  * yellow and red to black, as HiGlass does; `reds` and `blues` are
9
9
  * ColorBrewer's, from white; `redblue` and `purpleorange` diverge through
10
- * white, ColorBrewer's RdBu and PuOr.
10
+ * white, ColorBrewer's RdBu and PuOr; `redgreyblue` diverges through a grey
11
+ * middle, which stays visible on a white page where a white middle would
12
+ * not, as `identity` paints;
13
+ * `blueyellowred` is ColorBrewer's RdYlBu turned round, so low reads cool and
14
+ * high hot through a pale yellow middle, as `dnds` paints.
11
15
  */
12
16
  export const COLOR_SCHEMES = [
13
17
  'viridis',
@@ -20,6 +24,8 @@ export const COLOR_SCHEMES = [
20
24
  'blues',
21
25
  'redblue',
22
26
  'purpleorange',
27
+ 'redgreyblue',
28
+ 'blueyellowred',
23
29
  ];
24
30
  /**
25
31
  * #api
@@ -1,3 +1,4 @@
1
+ export declare const MAX_SVG_RASTER_AREA_PX: number;
1
2
  export interface SvgRasterCanvasOpts {
2
3
  /**
3
4
  * headless canvas factory for `rasterizeLayers` (jbrowse-img passes one);
@@ -11,7 +12,19 @@ export interface SvgRasterCanvasOpts {
11
12
  */
12
13
  decodeSvg?: (markup: string) => Promise<CanvasImageSource>;
13
14
  }
14
- export declare function createSvgRasterCanvas(width: number, height: number, opts: SvgRasterCanvasOpts | undefined): {
15
+ /**
16
+ * A canvas for one rasterized export layer of `width`x`height` CSS px, drawn in
17
+ * CSS px. Its backing store is 2× where that fits under `maxAreaPx` and the
18
+ * per-axis limit, and smaller where it does not, so read `canvas.width` for the
19
+ * scale it got.
20
+ */
21
+ export declare function createSvgRasterCanvas(width: number, height: number, opts: SvgRasterCanvasOpts | undefined, maxAreaPx?: number): {
15
22
  canvas: HTMLCanvasElement;
16
23
  ctx: CanvasRenderingContext2D;
17
24
  };
25
+ /**
26
+ * The PNG data URL of an export raster. A canvas the browser could not
27
+ * allocate encodes to `data:,`, an image of nothing, so this throws and the
28
+ * export dialog shows the error.
29
+ */
30
+ export declare function svgRasterDataUrl(canvas: HTMLCanvasElement): string;