@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
@@ -0,0 +1,39 @@
1
+ import type { Feature, SimpleFeatureSerializedNoId } from './simpleFeature.ts';
2
+ /**
3
+ * Which isoform of a gene a display shows first: the canvas gene glyph's
4
+ * `longestCoding` collapse and the sequence panel's default transcript both
5
+ * rank with this, so the panel opens on the isoform the track drew. Generic
6
+ * over the feature shape because the worker ranks live `Feature`s and the
7
+ * panel ranks their serialized form.
8
+ */
9
+ export interface IsoformReader<T> {
10
+ type: (feature: T) => string | undefined;
11
+ start: (feature: T) => number;
12
+ end: (feature: T) => number;
13
+ subfeatures: (feature: T) => readonly T[];
14
+ attribute: (feature: T, field: string) => unknown;
15
+ }
16
+ export declare const featureIsoformReader: IsoformReader<Feature>;
17
+ export declare const serializedIsoformReader: IsoformReader<SimpleFeatureSerializedNoId>;
18
+ /**
19
+ * The attribute naming a gene's representative isoform, and the values of it
20
+ * that do, best first. The canvas display's `canonicalTranscriptField` and
21
+ * `canonicalTranscriptTags` slots default to these.
22
+ */
23
+ export interface CanonicalTranscripts {
24
+ field: string;
25
+ tags: readonly string[];
26
+ }
27
+ export declare const DEFAULT_CANONICAL_TRANSCRIPTS: CanonicalTranscripts;
28
+ export interface IsoformScore {
29
+ canonical: number;
30
+ coding: boolean;
31
+ size: number;
32
+ }
33
+ export declare function isCodingIsoform<T>(read: IsoformReader<T>, feature: T): boolean;
34
+ export declare function isoformScorer<T>(read: IsoformReader<T>, { field, tags }: CanonicalTranscripts): (feature: T) => IsoformScore;
35
+ export declare function rankIsoforms<T>(isoforms: readonly T[], scoreOf: (feature: T) => IsoformScore): T[];
36
+ export interface CanonicalTranscriptsHost {
37
+ canonicalTranscripts: CanonicalTranscripts;
38
+ }
39
+ export declare function isCanonicalTranscriptsHost(thing: unknown): thing is CanonicalTranscriptsHost;
@@ -0,0 +1,118 @@
1
+ export const featureIsoformReader = {
2
+ type: f => f.get('type'),
3
+ start: f => f.get('start'),
4
+ end: f => f.get('end'),
5
+ subfeatures: f => f.get('subfeatures') ?? [],
6
+ attribute: (f, field) => f.get(field),
7
+ };
8
+ export const serializedIsoformReader = {
9
+ type: f => f.type,
10
+ start: f => f.start,
11
+ end: f => f.end,
12
+ subfeatures: f => f.subfeatures ?? [],
13
+ attribute: (f, field) => f[field],
14
+ };
15
+ export const DEFAULT_CANONICAL_TRANSCRIPTS = {
16
+ field: 'tag',
17
+ tags: [
18
+ 'MANE Select',
19
+ 'MANE_Select',
20
+ 'RefSeq Select',
21
+ 'Ensembl_canonical',
22
+ 'MANE Plus Clinical',
23
+ 'MANE_Plus_Clinical',
24
+ ],
25
+ };
26
+ function isCDSType(type) {
27
+ return type?.toLowerCase() === 'cds';
28
+ }
29
+ // The feature itself counts, because an isoform can BE the CDS: a viral
30
+ // polyprotein hangs its cleavage products off its CDS, not off further CDSs.
31
+ export function isCodingIsoform(read, feature) {
32
+ return (isCDSType(read.type(feature)) ||
33
+ read.subfeatures(feature).some(sub => isCodingIsoform(read, sub)));
34
+ }
35
+ // "Longest coding" is the longest protein — summed CDS length, not the widest
36
+ // genomic footprint an isoform with a large intron could win. A duplicated CDS
37
+ // row is a real GFF3 quirk that would otherwise inflate one isoform past a
38
+ // genuinely longer protein, so equal spans count once.
39
+ function codingLength(read, feature) {
40
+ const spans = [];
41
+ const walk = (f) => {
42
+ for (const sub of read.subfeatures(f)) {
43
+ if (isCDSType(read.type(sub))) {
44
+ spans.push([read.start(sub), read.end(sub)]);
45
+ }
46
+ else {
47
+ walk(sub);
48
+ }
49
+ }
50
+ };
51
+ walk(feature);
52
+ if (spans.length === 0) {
53
+ return isCDSType(read.type(feature))
54
+ ? read.end(feature) - read.start(feature)
55
+ : 0;
56
+ }
57
+ spans.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
58
+ let sum = 0;
59
+ for (const [i, span] of spans.entries()) {
60
+ const prev = spans[i - 1];
61
+ if (!prev || prev[0] !== span[0] || prev[1] !== span[1]) {
62
+ sum += span[1] - span[0];
63
+ }
64
+ }
65
+ return sum;
66
+ }
67
+ // A position in the tag list rather than a boolean, because the default list
68
+ // holds two tags one gene can carry at once and flattening them to "tagged"
69
+ // leaves the coding-length tiebreak to pick between them. A GFF3 attribute
70
+ // holding a comma list arrives as an array, hence both shapes.
71
+ function canonicalRank(value, wanted) {
72
+ const values = Array.isArray(value)
73
+ ? value.map(v => String(v).toLowerCase())
74
+ : typeof value === 'string'
75
+ ? [value.toLowerCase()]
76
+ : [];
77
+ let best = Infinity;
78
+ for (const v of values) {
79
+ const rank = wanted.indexOf(v);
80
+ if (rank !== -1 && rank < best) {
81
+ best = rank;
82
+ }
83
+ }
84
+ return best;
85
+ }
86
+ export function isoformScorer(read, { field, tags }) {
87
+ const wanted = tags.map(t => t.toLowerCase());
88
+ return (feature) => {
89
+ const coding = isCodingIsoform(read, feature);
90
+ return {
91
+ canonical: wanted.length
92
+ ? canonicalRank(read.attribute(feature, field), wanted)
93
+ : Infinity,
94
+ coding,
95
+ size: coding
96
+ ? codingLength(read, feature)
97
+ : read.end(feature) - read.start(feature),
98
+ };
99
+ };
100
+ }
101
+ // Best first. A curated tag outranks every measurement, because for a gene whose
102
+ // longest protein is a minor variant it is the only thing that picks the right
103
+ // isoform. A coding-length tie resolves to the LATER isoform, which a stable
104
+ // sort would break the other way — hence the explicit index term.
105
+ export function rankIsoforms(isoforms, scoreOf) {
106
+ return isoforms
107
+ .map((feature, index) => ({ feature, index, ...scoreOf(feature) }))
108
+ .sort((a, b) => a.canonical - b.canonical ||
109
+ Number(b.coding) - Number(a.coding) ||
110
+ b.size - a.size ||
111
+ b.index - a.index)
112
+ .map(s => s.feature);
113
+ }
114
+ export function isCanonicalTranscriptsHost(thing) {
115
+ return (typeof thing === 'object' &&
116
+ thing !== null &&
117
+ 'canonicalTranscripts' in thing);
118
+ }
package/esm/util/jexl.js CHANGED
@@ -131,7 +131,7 @@ export default function JexlF( /* config?: any*/) {
131
131
  // BAM features expose a targeted `getTag` that walks the tag block and
132
132
  // decodes only the requested tag; `get('tags')` decodes every tag on the
133
133
  // read (a Record allocation plus NM/AS/ms/de/… — often ~10 per read) to
134
- // answer one, and this runs per feature on colour/label callbacks like
134
+ // answer one, and this runs per feature on color/label callbacks like
135
135
  // `jexl:getTag(feature,'HP')`. Same duck-typing as
136
136
  // `@jbrowse/modifications-utils`' getTag(), which core cannot import (that
137
137
  // package depends on core). Unwrap first: on a jexlFeatureProxy every
@@ -1,3 +1,8 @@
1
+ interface LowerSpan {
2
+ top: number;
3
+ left: number;
4
+ right: number;
5
+ }
1
6
  export default class GranularRectLayout {
2
7
  private pitchX;
3
8
  private pitchY;
@@ -23,10 +28,21 @@ export default class GranularRectLayout {
23
28
  * @returns top position for the rect, or Null if laying
24
29
  * out the rect would exceed maxHeight
25
30
  */
26
- addRect(id: string, left: number, right: number, height: number, lower?: {
27
- top: number;
31
+ addRect(id: string, left: number, right: number, height: number, lower?: LowerSpan): number | null;
32
+ /**
33
+ * Lays out rects, none of them placed yet, at one shared top: the lowest
34
+ * where every one fits. For the pieces of one feature drawn apart.
35
+ */
36
+ addRectsAtOneTop(rects: readonly {
37
+ id: string;
28
38
  left: number;
29
39
  right: number;
30
- }): number | null;
40
+ height: number;
41
+ lower?: LowerSpan;
42
+ }[]): number | null;
43
+ private placement;
44
+ private firstFit;
45
+ private commit;
31
46
  private getOrCreateRow;
32
47
  }
48
+ export {};
@@ -56,39 +56,64 @@ export default class GranularRectLayout {
56
56
  * out the rect would exceed maxHeight
57
57
  */
58
58
  addRect(id, left, right, height, lower) {
59
- const pitchX = this.pitchX;
60
- const pitchY = this.pitchY;
61
- // if we have already laid it out, return its layout
62
59
  const storedRec = this.rectangles.get(id);
63
60
  if (storedRec) {
64
- return storedRec.top === null ? null : storedRec.top * pitchY;
61
+ return storedRec.top === null ? null : storedRec.top * this.pitchY;
62
+ }
63
+ const placement = this.placement(left, right, height, lower);
64
+ return this.commit(id, placement, this.firstFit(placement, 0));
65
+ }
66
+ /**
67
+ * Lays out rects, none of them placed yet, at one shared top: the lowest
68
+ * where every one fits. For the pieces of one feature drawn apart.
69
+ */
70
+ addRectsAtOneTop(rects) {
71
+ const placements = rects.map(r => this.placement(r.left, r.right, r.height, r.lower));
72
+ let top = 0;
73
+ for (let i = 0; i < placements.length && top <= this.maxHeight;) {
74
+ const fit = this.firstFit(placements[i], top);
75
+ if (fit === top) {
76
+ i += 1;
77
+ }
78
+ else {
79
+ top = fit;
80
+ i = 0;
81
+ }
82
+ }
83
+ let result = null;
84
+ for (const [i, rect] of rects.entries()) {
85
+ result = this.commit(rect.id, placements[i], top);
65
86
  }
66
- // Use Math.trunc for fast floor operation that works with large coordinates
67
- // (bitwise | 0 overflows above 2^31, causing layout issues with large genomic coordinates)
68
- const pLeft = Math.trunc(left / pitchX);
69
- const pRight = Math.trunc(right / pitchX);
70
- const pHeight = Math.ceil(height / pitchY);
71
- const pLowerTop = lower ? Math.ceil(lower.top / pitchY) : pHeight;
87
+ return result;
88
+ }
89
+ placement(left, right, height, lower) {
90
+ const pitchX = this.pitchX;
91
+ const pitchY = this.pitchY;
92
+ // Math.trunc, not `| 0`, which overflows above 2^31 genomic coordinates
72
93
  const rectangle = {
73
- l: pLeft,
74
- r: pRight,
94
+ l: Math.trunc(left / pitchX),
95
+ r: Math.trunc(right / pitchX),
75
96
  top: null,
76
- h: pHeight,
97
+ h: Math.ceil(height / pitchY),
77
98
  };
78
- const lowerSpan = lower
79
- ? {
80
- l: Math.trunc(lower.left / pitchX),
81
- r: Math.trunc(lower.right / pitchX),
82
- }
83
- : rectangle;
84
- // Allow features to start at any position up to maxHeight
85
- // Features starting at maxHeight or beyond are filtered out, but features
86
- // that start below maxHeight and extend past it are allowed
99
+ return {
100
+ rectangle,
101
+ lowerTop: lower ? Math.ceil(lower.top / pitchY) : rectangle.h,
102
+ lowerSpan: lower
103
+ ? {
104
+ l: Math.trunc(lower.left / pitchX),
105
+ r: Math.trunc(lower.right / pitchX),
106
+ }
107
+ : rectangle,
108
+ };
109
+ }
110
+ // The first top at or past `fromTop` where the rect fits, maxHeight + 1
111
+ // when none does. A rect starting below maxHeight may extend past it.
112
+ firstFit({ rectangle, lowerTop: pLowerTop, lowerSpan }, fromTop) {
113
+ const { l: pLeft, r: pRight, h: pHeight } = rectangle;
87
114
  const maxTop = this.maxHeight;
88
- let top = 0;
89
- // OPTIMIZATION: Inline collision checking for hot path
90
- // Eliminates function call overhead which is critical at 100k+ features
91
115
  const bitmap = this.bitmap;
116
+ let top = fromTop;
92
117
  // On a collision at row y, the next top worth trying is y + 1, not top + 1.
93
118
  // Rows top..y-1 are clear (y is the first hit walking upward) and every top'
94
119
  // between them still spans y, because y < top + pHeight — so nothing between
@@ -99,11 +124,9 @@ export default class GranularRectLayout {
99
124
  // blocks every top to y, and a hit in the lower span blocks just the tops
100
125
  // keeping y there: the jump goes to the first top putting y above it.
101
126
  outer: for (; top <= maxTop; top += 1) {
102
- // Check all rows that this rectangle would occupy
103
127
  const maxY = top + pHeight;
104
128
  for (let y = top; y < maxY; y += 1) {
105
129
  const row = bitmap[y];
106
- // Fast path: no row created yet
107
130
  if (!row) {
108
131
  continue;
109
132
  }
@@ -115,7 +138,6 @@ export default class GranularRectLayout {
115
138
  const r = inLower ? lowerSpan.r : pRight;
116
139
  const blockedTop = inLower ? y - pLowerTop : y;
117
140
  if (len < 40) {
118
- // Linear scan for small arrays
119
141
  for (let i = 0; i < len; i += 2) {
120
142
  const start = intervals[i];
121
143
  const end = intervals[i + 1];
@@ -126,7 +148,6 @@ export default class GranularRectLayout {
126
148
  }
127
149
  }
128
150
  else {
129
- // Binary search for larger arrays
130
151
  let low = 0;
131
152
  let high = len >> 1;
132
153
  while (low < high) {
@@ -150,19 +171,21 @@ export default class GranularRectLayout {
150
171
  }
151
172
  }
152
173
  }
153
- // No collision found in any row
154
174
  break;
155
175
  }
176
+ return top;
177
+ }
178
+ commit(id, { rectangle, lowerTop, lowerSpan }, top) {
156
179
  this.rectangles.set(id, rectangle);
157
- if (top > maxTop) {
180
+ if (top > this.maxHeight) {
158
181
  return null;
159
182
  }
160
183
  rectangle.top = top;
161
- const yEnd = top + pHeight;
184
+ const yEnd = top + rectangle.h;
162
185
  for (let y = top; y < yEnd; y += 1) {
163
- this.getOrCreateRow(y).addRect(y - top >= pLowerTop ? lowerSpan : rectangle);
186
+ this.getOrCreateRow(y).addRect(y - top >= lowerTop ? lowerSpan : rectangle);
164
187
  }
165
- return top * pitchY;
188
+ return top * this.pitchY;
166
189
  }
167
190
  getOrCreateRow(y) {
168
191
  let row = this.bitmap[y];
@@ -4,6 +4,14 @@ export interface LeadingEdgeAutorunOptions {
4
4
  name: string;
5
5
  /** how long to coalesce reruns once the body has started work once */
6
6
  delay: number;
7
+ /**
8
+ * Run on the leading edge again once the last run that started work is at
9
+ * least `delay` old. A change that arrives after the autorun has sat idle,
10
+ * such as a jump to a new locus, has nothing to coalesce with, so waiting the
11
+ * delay out only adds latency. A change within `delay` of that work is
12
+ * coalesced as before.
13
+ */
14
+ idleLeading?: boolean;
7
15
  }
8
16
  /**
9
17
  * An autorun that runs on the leading edge until its body reports having
@@ -37,4 +45,4 @@ export interface LeadingEdgeAutorunOptions {
37
45
  * The debounce is per-installation, so two autoruns on one model coalesce
38
46
  * independently.
39
47
  */
40
- export declare function leadingEdgeAutorun(self: IAnyStateTreeNode, body: () => boolean | void, { name, delay }: LeadingEdgeAutorunOptions): import("mobx").IReactionDisposer;
48
+ export declare function leadingEdgeAutorun(self: IAnyStateTreeNode, body: () => boolean | void, { name, delay, idleLeading }: LeadingEdgeAutorunOptions): import("mobx").IReactionDisposer;
@@ -31,16 +31,19 @@ import { namedAutorun } from '@jbrowse/render-core/namedReactions';
31
31
  * The debounce is per-installation, so two autoruns on one model coalesce
32
32
  * independently.
33
33
  */
34
- export function leadingEdgeAutorun(self, body, { name, delay }) {
34
+ export function leadingEdgeAutorun(self, body, { name, delay, idleLeading = false }) {
35
35
  let primed = false;
36
+ let lastWork = Number.NEGATIVE_INFINITY;
36
37
  return namedAutorun(self, () => {
37
38
  if (body()) {
38
39
  primed = true;
40
+ lastWork = performance.now();
39
41
  }
40
42
  }, {
41
43
  name,
42
44
  scheduler: run => {
43
- if (primed) {
45
+ const idle = idleLeading && performance.now() - lastWork >= delay;
46
+ if (primed && !idle) {
44
47
  setTimeout(run, delay);
45
48
  }
46
49
  else {
@@ -4,7 +4,7 @@ import type { JexlInstance } from './jexlStrings.ts';
4
4
  import type { ColorEncoding, ColorScaleTable, ContinuousRef, Encoded, EncodedChannels, FieldRef, LocusRef, ShapeEncoding, SizeEncoding, LaneName } from './markEncodingTypes.ts';
5
5
  import type { ProgressReporter } from './progress.ts';
6
6
  import type { Feature } from './simpleFeature.ts';
7
- export type { AggregateOp, AggregateStep, BinStep, CategoricalRef, ColorEncoding, ContinuousRef, CoverageStep, ColorScaleTable, CoreGetEncodedLayersArgs, Encoded, EncodedChannels, EncodedLayersResult, FacetSection, FacetSpec, FieldRef, FilterStep, FormulaStep, LocusRef, MateStep, ShapeEncoding, ShapeName, ShapeScaleTable, SizeEncoding, SizeRef, SizeScaleTable, LaneName, LayerRequest, MarkEncoding, ScaleTable, ThresholdRef, TransformStep, } from './markEncodingTypes.ts';
7
+ export type { AggregateOp, AggregateStep, BinStep, CategoricalRef, ColorEncoding, ContinuousRef, CoverageStep, ColorScaleTable, CoreGetEncodedLayersArgs, Encoded, EncodedChannels, EncodedLayersResult, FacetSection, FacetSpec, FieldRef, FilterStep, FormulaStep, LocusRef, MateStep, PathSpec, ShapeEncoding, ShapeName, ShapeScaleTable, SizeEncoding, SizeRef, SizeScaleTable, LaneName, LayerRequest, MarkEncoding, ScaleTable, ThresholdRef, TransformStep, WindowStep, } from './markEncodingTypes.ts';
8
8
  export type { ColorSchemeName } from './colorSchemes.ts';
9
9
  export { COLOR_SCHEMES } from './colorSchemes.ts';
10
10
  export { NO_VALUE_LABEL } from './categoricalField.ts';
@@ -12,7 +12,7 @@ export declare const DEFAULT_MARK_COLOR = "#0068d1";
12
12
  export declare const DEFAULT_SIZE_RANGE_PX: [number, number];
13
13
  /**
14
14
  * #api
15
- * The misconfiguration grey packed as the encoder paints it: a `jexl:` colour
15
+ * The misconfiguration grey packed as the encoder paints it: a `jexl:` color
16
16
  * that answered no string, a ramp value that is no number, text a threshold
17
17
  * cannot read.
18
18
  */
@@ -44,6 +44,8 @@ export interface MarkEncodingInput {
44
44
  x2?: FieldRef | LocusRef | ChannelReader;
45
45
  y?: FieldRef | ChannelReader;
46
46
  row?: FieldRef | ChannelReader | ArrayLike<number>;
47
+ /** Each row's series, what the `series` lane is filled from. */
48
+ series?: ArrayLike<number>;
47
49
  color?: ColorEncoding | ChannelReader<number>;
48
50
  shape?: ShapeEncoding | ChannelReader<number>;
49
51
  text?: FieldRef | ChannelReader;
@@ -97,12 +99,12 @@ export declare function withHitIndex<T extends EncodedChannels>(channels: T): Hi
97
99
  export declare function encodeFeatures<L extends LaneName>(input: readonly Feature[] | FeatureTable, encoding: MarkEncodingInput, lanes: readonly L[], ctx?: EncodeContext): Encoded<L>;
98
100
  /**
99
101
  * #api
100
- * A continuous colour scale over `extent`, the values it met: the domain its
102
+ * A continuous color scale over `extent`, the values it met: the domain its
101
103
  * declared ends and the extent make, the straight table its stops bake to and
102
- * where its middle stop sits, and the packed colour a value paints through
104
+ * where its middle stop sits, and the packed color a value paints through
103
105
  * them: an infinity the end on its side, as a threshold places it, and NaN,
104
106
  * text that is no number, the misconfiguration grey. The encoder and every
105
- * display painting a ramp itself read it, so a value takes one colour whoever
107
+ * display painting a ramp itself read it, so a value takes one color whoever
106
108
  * paints it.
107
109
  */
108
110
  export declare function continuousColorScale(encoding: ContinuousRef, extent: readonly [number, number]): {
@@ -125,7 +127,7 @@ export declare function rampOverExtent(table: Extract<ColorScaleTable, {
125
127
  }>;
126
128
  /**
127
129
  * #api
128
- * A CSS colour or `jexl:` colour expression as a per-feature packed ABGR —
130
+ * A CSS color or `jexl:` color expression as a per-feature packed ABGR —
129
131
  * the unscaled arm of {@link ColorEncoding}, on its own for a display that
130
132
  * carries a plain `color` slot.
131
133
  */
@@ -138,8 +140,8 @@ export declare function colorEvaluator(color: string, jexl: JexlInstance | undef
138
140
  export declare function featureIndexAt(channels: Pick<EncodedChannels, 'featureIndex'>, i: number): number;
139
141
  /**
140
142
  * #api
141
- * The packed colour instance `i` of `channels` paints: `color[i]`, or `color`
142
- * itself where the colour is a constant and so shipped as one number.
143
+ * The packed color instance `i` of `channels` paints: `color[i]`, or `color`
144
+ * itself where the color is a constant and so shipped as one number.
143
145
  */
144
146
  export declare function colorAt(channels: Pick<EncodedChannels, 'color'>, i: number): number | undefined;
145
147
  /**
@@ -1,3 +1,4 @@
1
+ import { linkFeet } from '@jbrowse/render-core/linkFeet';
1
2
  import { makeScoreNormalizer, rampMidNorm, scaleTypeCode, } from '@jbrowse/render-core/scoreScale';
2
3
  import { rampMidT } from '@jbrowse/render-core/shaders/colorRampLut';
3
4
  import { RAMP_NO_VALUE_BITS } from '@jbrowse/render-core/shaders/markColorConsts';
@@ -23,7 +24,7 @@ export const DEFAULT_MARK_COLOR = '#0068d1';
23
24
  export const DEFAULT_SIZE_RANGE_PX = [1, 6];
24
25
  /**
25
26
  * #api
26
- * The misconfiguration grey packed as the encoder paints it: a `jexl:` colour
27
+ * The misconfiguration grey packed as the encoder paints it: a `jexl:` color
27
28
  * that answered no string, a ramp value that is no number, text a threshold
28
29
  * cannot read.
29
30
  */
@@ -74,6 +75,25 @@ function numberChannelReader(table, ref, jexl) {
74
75
  const read = channelReader(table, ref, jexl);
75
76
  return i => numericValue(read(i));
76
77
  }
78
+ // A far end stated as `mate.start` carries its direction as
79
+ // `mate.mateDirection`, beside the record's own.
80
+ function feetLane(table, farPos, count, rowAt, jexl) {
81
+ const dot = farPos.lastIndexOf('.');
82
+ const farDirection = `${farPos.slice(0, dot)}.mateDirection`;
83
+ if (dot === -1 || isJexl(farPos)) {
84
+ return undefined;
85
+ }
86
+ const own = numberChannelReader(table, 'mateDirection', jexl);
87
+ const far = numberChannelReader(table, farDirection, jexl);
88
+ const feet = new Uint8Array(count);
89
+ let any = false;
90
+ for (let k = 0; k < count; k++) {
91
+ const r = rowAt(k);
92
+ feet[k] = linkFeet(own(r), far(r));
93
+ any ||= feet[k] !== 0;
94
+ }
95
+ return any ? feet : undefined;
96
+ }
77
97
  function isShapeName(shape) {
78
98
  return shape in SHAPE_CODES;
79
99
  }
@@ -439,6 +459,9 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
439
459
  x2Ref[k] = ref;
440
460
  }
441
461
  }
462
+ const feet = x2Ref && x2Locus
463
+ ? feetLane(table, x2Locus.pos, count, rowAt, jexl)
464
+ : undefined;
442
465
  const sizeRef = has('size') &&
443
466
  sizeEncoding !== undefined &&
444
467
  typeof sizeEncoding !== 'number'
@@ -467,6 +490,13 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
467
490
  typeof rowEncoding !== 'object') {
468
491
  fillNumbers(row, rowSource(table, rowEncoding, jexl), kept, count);
469
492
  }
493
+ const seriesOf = encoding.series;
494
+ const series = has('series') ? new Uint32Array(count) : undefined;
495
+ if (series && seriesOf) {
496
+ for (let k = 0; k < count; k++) {
497
+ series[k] = seriesOf[rowAt(k)];
498
+ }
499
+ }
470
500
  const text = has('text') ? new Array(count) : undefined;
471
501
  if (text) {
472
502
  if (textEncoding === undefined) {
@@ -518,11 +548,11 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
518
548
  ? declaredScale
519
549
  : undefined;
520
550
  const thresholdEncoding = declaredScale?.scale === 'threshold' ? declaredScale : undefined;
521
- // Which side of the wire a quantitative colour resolves on is the caller's
551
+ // Which side of the wire a quantitative color resolves on is the caller's
522
552
  // lane choice: a mark that reads the scale itself names `colorValue` and
523
553
  // gets the raw values, so a ramp's domain unions over the regions and a
524
554
  // threshold's cuts move as uniforms. Anything else names `color` and the
525
- // encoder resolves per region. A colour over the field `y` plots is the `y`
555
+ // encoder resolves per region. A color over the field `y` plots is the `y`
526
556
  // lane itself, aliased rather than copied.
527
557
  const quantitative = rampEncoding ?? thresholdEncoding;
528
558
  const colorReadsY = quantitative !== undefined &&
@@ -581,7 +611,7 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
581
611
  else if (scaled && quantitative) {
582
612
  // The raw values, where they are kept: a ramp's always, a threshold's
583
613
  // where the caller resolves it; the encoder resolves a threshold into
584
- // packed colours only for a caller naming `color` alone.
614
+ // packed colors only for a caller naming `color` alone.
585
615
  const values = colorValue ?? (rampEncoding ? new Float32Array(count) : undefined);
586
616
  const read = channelReader(table, quantitative.field, jexl);
587
617
  if (values && !colorReadsY) {
@@ -689,7 +719,7 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
689
719
  encoded.color = color;
690
720
  }
691
721
  if (colorValue) {
692
- // the y view itself where the colour reads y, so a reader can tell
722
+ // the y view itself where the color reads y, so a reader can tell
693
723
  encoded.colorValue = colorValue;
694
724
  }
695
725
  if (colorKey) {
@@ -698,6 +728,9 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
698
728
  if (glyph) {
699
729
  encoded.glyph = glyph;
700
730
  }
731
+ if (series) {
732
+ encoded.series = series;
733
+ }
701
734
  if (text) {
702
735
  encoded.text = text;
703
736
  }
@@ -708,6 +741,9 @@ export function encodeFeatures(input, encoding, lanes, ctx = {}) {
708
741
  encoded.x2Ref = x2Ref;
709
742
  encoded.x2RefNames = x2RefNames;
710
743
  }
744
+ if (feet) {
745
+ encoded.feet = feet;
746
+ }
711
747
  if (sizeScale) {
712
748
  encoded.sizeScale = sizeScale;
713
749
  }
@@ -756,12 +792,12 @@ function rampScale(rampEncoding, values, count, color, met) {
756
792
  }
757
793
  /**
758
794
  * #api
759
- * A continuous colour scale over `extent`, the values it met: the domain its
795
+ * A continuous color scale over `extent`, the values it met: the domain its
760
796
  * declared ends and the extent make, the straight table its stops bake to and
761
- * where its middle stop sits, and the packed colour a value paints through
797
+ * where its middle stop sits, and the packed color a value paints through
762
798
  * them: an infinity the end on its side, as a threshold places it, and NaN,
763
799
  * text that is no number, the misconfiguration grey. The encoder and every
764
- * display painting a ramp itself read it, so a value takes one colour whoever
800
+ * display painting a ramp itself read it, so a value takes one color whoever
765
801
  * paints it.
766
802
  */
767
803
  export function continuousColorScale(encoding, extent) {
@@ -799,14 +835,14 @@ function keysAreNumeric(entries) {
799
835
  // extents passes over.
800
836
  /**
801
837
  * #api
802
- * A CSS colour or `jexl:` colour expression as a per-feature packed ABGR —
838
+ * A CSS color or `jexl:` color expression as a per-feature packed ABGR —
803
839
  * the unscaled arm of {@link ColorEncoding}, on its own for a display that
804
840
  * carries a plain `color` slot.
805
841
  */
806
842
  export function colorEvaluator(color, jexl) {
807
843
  if (isJexl(color)) {
808
844
  const expr = jexlExpression(color, jexl);
809
- // A jexl colour answers from a handful of strings over a million
845
+ // A jexl color answers from a handful of strings over a million
810
846
  // features; parsing each answer once is a third of the arm's cost
811
847
  // (packages/core/benches/encodeFeatures.bench.ts).
812
848
  const packed = new Map();
@@ -847,8 +883,8 @@ export function featureIndexAt(channels, i) {
847
883
  }
848
884
  /**
849
885
  * #api
850
- * The packed colour instance `i` of `channels` paints: `color[i]`, or `color`
851
- * itself where the colour is a constant and so shipped as one number.
886
+ * The packed color instance `i` of `channels` paints: `color[i]`, or `color`
887
+ * itself where the color is a constant and so shipped as one number.
852
888
  */
853
889
  export function colorAt(channels, i) {
854
890
  const { color } = channels;
@@ -867,12 +903,14 @@ export function encodedChannelTransferables(c) {
867
903
  c.featureIndex,
868
904
  c.y,
869
905
  c.row,
906
+ c.series,
870
907
  typeof c.color === 'number' ? undefined : c.color,
871
908
  c.colorValue,
872
909
  c.colorKey,
873
910
  c.glyph,
874
911
  c.size,
875
912
  c.x2Ref,
913
+ c.feet,
876
914
  ]) {
877
915
  if (lane) {
878
916
  buffers.add(lane.buffer);