@jbrowse/core 5.0.0-beta.13 → 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 (391) hide show
  1. package/README.md +365 -69
  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 +3 -2
  5. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -2
  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 +1 -1
  36. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +10 -19
  37. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
  38. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
  39. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
  40. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
  41. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
  42. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
  43. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
  44. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
  45. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
  46. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
  47. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
  48. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +2 -1
  49. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +22 -6
  50. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
  51. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
  52. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
  53. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +2 -0
  54. package/esm/PluginManager.d.ts +1 -0
  55. package/esm/PluginManager.js +6 -0
  56. package/esm/ReExports/coreModules.generated.js +538 -524
  57. package/esm/ReExports/coreWorkerModules.generated.js +454 -441
  58. package/esm/ReExports/lazify.js +3 -2
  59. package/esm/ReExports/list.js +15 -6
  60. package/esm/ReExports/names.d.ts +1 -0
  61. package/esm/ReExports/names.generated.d.ts +2 -0
  62. package/esm/ReExports/names.generated.js +566 -0
  63. package/esm/ReExports/names.js +3 -0
  64. package/esm/assemblyManager/assembly.d.ts +9 -0
  65. package/esm/assemblyManager/assembly.js +13 -0
  66. package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
  67. package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
  68. package/esm/assemblyManager/assemblyManager.d.ts +11 -0
  69. package/esm/assemblyManager/assemblyManager.js +2 -0
  70. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
  71. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
  72. package/esm/checkPlugins.js +10 -4
  73. package/esm/configuration/configurationSchema.d.ts +18 -5
  74. package/esm/configuration/configurationSchema.js +9 -7
  75. package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
  76. package/esm/configuration/configurationSchemaUnion.js +2 -1
  77. package/esm/configuration/configurationSlot.js +4 -4
  78. package/esm/configuration/fillLocations.d.ts +4 -2
  79. package/esm/configuration/fillLocations.js +9 -3
  80. package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
  81. package/esm/configuration/formatAboutConfigSchema.js +2 -2
  82. package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
  83. package/esm/configuration/formatDetailsConfigSchema.js +5 -5
  84. package/esm/configuration/getConf.js +13 -4
  85. package/esm/configuration/index.d.ts +1 -1
  86. package/esm/configuration/index.js +1 -1
  87. package/esm/configuration/plot.d.ts +2 -2
  88. package/esm/configuration/plot.js +32 -18
  89. package/esm/configuration/schemaRegistry.d.ts +0 -2
  90. package/esm/configuration/slotFacade.js +2 -2
  91. package/esm/configuration/snapshotPreprocess.d.ts +42 -18
  92. package/esm/configuration/snapshotPreprocess.js +94 -34
  93. package/esm/configuration/tabixShorthand.js +1 -3
  94. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
  95. package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
  96. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
  97. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
  98. package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
  99. package/esm/data_adapters/BaseAdapter/index.js +0 -1
  100. package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
  101. package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
  102. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
  103. package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
  104. package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
  105. package/esm/data_adapters/dataAdapterCache.js +68 -24
  106. package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
  107. package/esm/data_adapters/getFeatureAdapter.js +17 -0
  108. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
  109. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
  110. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -6
  111. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +56 -8
  112. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +3 -3
  113. package/esm/pluggableElementTypes/models/BaseTrackModel.js +7 -6
  114. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
  115. package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
  116. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
  117. package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
  118. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
  119. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
  120. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
  121. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
  122. package/esm/pluggableElementTypes/models/baseTrackConfig.js +9 -1
  123. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
  124. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
  125. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
  126. package/esm/pluginDefinitions.d.ts +7 -0
  127. package/esm/pluginDefinitions.js +20 -0
  128. package/esm/rpc/RpcRegistry.d.ts +0 -10
  129. package/esm/rpc/byteBudget.d.ts +8 -0
  130. package/esm/rpc/byteBudget.js +13 -0
  131. package/esm/rpc/configSchema.d.ts +2 -0
  132. package/esm/rpc/configSchema.js +3 -1
  133. package/esm/rpc/coreRpcMethods.d.ts +0 -1
  134. package/esm/rpc/coreRpcMethods.js +0 -1
  135. package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
  136. package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
  137. package/esm/rpc/methods/layerFeatures.d.ts +9 -6
  138. package/esm/rpc/methods/layerFeatures.js +21 -5
  139. package/esm/ui/ActionLink.d.ts +3 -2
  140. package/esm/ui/ActionLink.js +4 -2
  141. package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
  142. package/esm/ui/AddCustomPluginDialog.js +6 -4
  143. package/esm/ui/BaseTooltip.d.ts +3 -2
  144. package/esm/ui/BaseTooltip.js +4 -2
  145. package/esm/ui/CascadingMenu.js +14 -12
  146. package/esm/ui/CascadingMenuButton.d.ts +2 -2
  147. package/esm/ui/CascadingMenuButton.js +5 -4
  148. package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
  149. package/esm/ui/CascadingMenuHelpDialog.js +4 -2
  150. package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
  151. package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
  152. package/esm/ui/ColorPicker.d.ts +5 -4
  153. package/esm/ui/ColorPicker.js +6 -4
  154. package/esm/ui/ContextMenu.d.ts +1 -1
  155. package/esm/ui/ContextMenu.js +1 -1
  156. package/esm/ui/CopyToClipboardButton.d.ts +3 -2
  157. package/esm/ui/CopyToClipboardButton.js +4 -2
  158. package/esm/ui/Crosshairs.js +13 -10
  159. package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
  160. package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
  161. package/esm/ui/DataGridFlexContainer.d.ts +3 -2
  162. package/esm/ui/DataGridFlexContainer.js +4 -2
  163. package/esm/ui/Dialog.d.ts +1 -1
  164. package/esm/ui/Dialog.js +5 -4
  165. package/esm/ui/DropDownMenu.js +2 -2
  166. package/esm/ui/EditableTypography.d.ts +1 -1
  167. package/esm/ui/EditableTypography.js +3 -2
  168. package/esm/ui/ErrorActions.d.ts +3 -2
  169. package/esm/ui/ErrorActions.js +4 -2
  170. package/esm/ui/ErrorBanner.d.ts +2 -2
  171. package/esm/ui/ErrorBanner.js +3 -2
  172. package/esm/ui/ErrorBar.d.ts +3 -2
  173. package/esm/ui/ErrorBar.js +4 -2
  174. package/esm/ui/ErrorMessage.d.ts +3 -2
  175. package/esm/ui/ErrorMessage.js +4 -2
  176. package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
  177. package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
  178. package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
  179. package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
  180. package/esm/ui/ErrorOverlay.d.ts +3 -2
  181. package/esm/ui/ErrorOverlay.js +4 -2
  182. package/esm/ui/ExportSvgDialog.d.ts +3 -2
  183. package/esm/ui/ExportSvgDialog.js +4 -2
  184. package/esm/ui/ExternalLink.d.ts +2 -1
  185. package/esm/ui/ExternalLink.js +4 -2
  186. package/esm/ui/FactoryResetDialog.d.ts +3 -2
  187. package/esm/ui/FactoryResetDialog.js +4 -2
  188. package/esm/ui/FatalErrorDialog.d.ts +3 -2
  189. package/esm/ui/FatalErrorDialog.js +6 -4
  190. package/esm/ui/FileDropZone.d.ts +3 -2
  191. package/esm/ui/FileDropZone.js +4 -2
  192. package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
  193. package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
  194. package/esm/ui/FileSelector/LocationInput.js +4 -2
  195. package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
  196. package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
  197. package/esm/ui/GpuFallbackButton.d.ts +3 -2
  198. package/esm/ui/GpuFallbackButton.js +4 -2
  199. package/esm/ui/HoverMenu.d.ts +2 -2
  200. package/esm/ui/HoverMenu.js +7 -3
  201. package/esm/ui/HoverTooltip.d.ts +3 -2
  202. package/esm/ui/HoverTooltip.js +4 -2
  203. package/esm/ui/Icons.d.ts +5 -5
  204. package/esm/ui/Icons.js +11 -10
  205. package/esm/ui/InlineMenuControls.d.ts +2 -2
  206. package/esm/ui/InlineMenuControls.js +4 -3
  207. package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
  208. package/esm/ui/JexlFilterRowEditors.js +9 -8
  209. package/esm/ui/LabeledCheckbox.d.ts +3 -2
  210. package/esm/ui/LabeledCheckbox.js +4 -2
  211. package/esm/ui/LazyBaseTooltip.d.ts +12 -3
  212. package/esm/ui/LazyBaseTooltip.js +4 -2
  213. package/esm/ui/LegendSwatchGlyph.js +1 -0
  214. package/esm/ui/LoadingDots.d.ts +2 -1
  215. package/esm/ui/LoadingDots.js +4 -2
  216. package/esm/ui/LoadingEllipses.d.ts +5 -2
  217. package/esm/ui/LoadingEllipses.js +5 -3
  218. package/esm/ui/LoadingOverlay.d.ts +3 -2
  219. package/esm/ui/LoadingOverlay.js +4 -2
  220. package/esm/ui/LoadingProgress.d.ts +3 -2
  221. package/esm/ui/LoadingProgress.js +4 -2
  222. package/esm/ui/Logo.d.ts +2 -2
  223. package/esm/ui/Logo.js +9 -8
  224. package/esm/ui/MenuItemChevron.d.ts +2 -2
  225. package/esm/ui/MenuItemChevron.js +3 -2
  226. package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
  227. package/esm/ui/MenuItemEndDecoration.js +3 -2
  228. package/esm/ui/MenuItemTrailing.d.ts +2 -2
  229. package/esm/ui/MenuItemTrailing.js +7 -6
  230. package/esm/ui/MenuTypes.d.ts +21 -1
  231. package/esm/ui/MenuTypes.js +20 -0
  232. package/esm/ui/MonospaceTextField.d.ts +3 -2
  233. package/esm/ui/MonospaceTextField.js +4 -2
  234. package/esm/ui/NumberTextField.d.ts +2 -2
  235. package/esm/ui/NumberTextField.js +4 -2
  236. package/esm/ui/PaletteContext.d.ts +11 -9
  237. package/esm/ui/PaletteContext.js +33 -18
  238. package/esm/ui/PluginStoreCard.d.ts +3 -2
  239. package/esm/ui/PluginStoreCard.js +4 -2
  240. package/esm/ui/PopoverPicker.d.ts +3 -2
  241. package/esm/ui/PopoverPicker.js +4 -2
  242. package/esm/ui/PrerenderedCanvas.d.ts +2 -2
  243. package/esm/ui/PrerenderedCanvas.js +3 -2
  244. package/esm/ui/RedErrorMessageBox.d.ts +3 -2
  245. package/esm/ui/RedErrorMessageBox.js +4 -2
  246. package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
  247. package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
  248. package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
  249. package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
  250. package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
  251. package/esm/ui/ReplaceCurrentViewButton.js +4 -2
  252. package/esm/ui/ResizeHandle.d.ts +2 -2
  253. package/esm/ui/ResizeHandle.js +3 -2
  254. package/esm/ui/SanitizedHTML.d.ts +3 -2
  255. package/esm/ui/SanitizedHTML.js +6 -4
  256. package/esm/ui/ScrollChrome.d.ts +3 -2
  257. package/esm/ui/ScrollChrome.js +4 -2
  258. package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
  259. package/esm/ui/ScrollEdgeShadow.js +2 -2
  260. package/esm/ui/SessionJsonPanel.d.ts +3 -2
  261. package/esm/ui/SessionJsonPanel.js +4 -2
  262. package/esm/ui/ShareLinkField.d.ts +3 -2
  263. package/esm/ui/ShareLinkField.js +4 -2
  264. package/esm/ui/SingleSlider.d.ts +2 -2
  265. package/esm/ui/SingleSlider.js +4 -2
  266. package/esm/ui/SliderTooltip.d.ts +2 -1
  267. package/esm/ui/SliderTooltip.js +4 -2
  268. package/esm/ui/SnackbarContents.d.ts +3 -2
  269. package/esm/ui/SnackbarContents.js +4 -2
  270. package/esm/ui/SnackbarModel.d.ts +2 -0
  271. package/esm/ui/SnackbarModel.js +2 -0
  272. package/esm/ui/StackTraceButton.d.ts +3 -2
  273. package/esm/ui/StackTraceButton.js +4 -2
  274. package/esm/ui/StatusProgressBar.d.ts +3 -2
  275. package/esm/ui/StatusProgressBar.js +4 -2
  276. package/esm/ui/SubmitForm.d.ts +2 -1
  277. package/esm/ui/SubmitForm.js +4 -2
  278. package/esm/ui/SvgColorLegend.d.ts +3 -4
  279. package/esm/ui/SvgColorLegend.js +27 -18
  280. package/esm/ui/TagTextField.d.ts +2 -2
  281. package/esm/ui/TagTextField.js +4 -2
  282. package/esm/ui/ViewLoadingScreen.d.ts +3 -2
  283. package/esm/ui/ViewLoadingScreen.js +4 -2
  284. package/esm/ui/colorScale.d.ts +5 -1
  285. package/esm/ui/colorScale.js +12 -10
  286. package/esm/ui/colors.d.ts +3 -3
  287. package/esm/ui/colors.js +7 -7
  288. package/esm/ui/filterMenuItems.d.ts +10 -31
  289. package/esm/ui/filterMenuItems.js +13 -14
  290. package/esm/ui/index.d.ts +1 -1
  291. package/esm/ui/index.js +1 -1
  292. package/esm/ui/launchTargetsMenuItem.js +9 -13
  293. package/esm/ui/legendMenuItem.d.ts +4 -4
  294. package/esm/ui/legendMenuItem.js +4 -4
  295. package/esm/ui/menuItemAdornment.d.ts +1 -1
  296. package/esm/ui/menuItemAdornment.js +1 -1
  297. package/esm/ui/menuItems.d.ts +1 -1
  298. package/esm/ui/menuItems.js +1 -1
  299. package/esm/ui/menuLabels.d.ts +2 -2
  300. package/esm/ui/menuLabels.js +2 -2
  301. package/esm/ui/palette.d.ts +2 -2
  302. package/esm/ui/palette.js +10 -10
  303. package/esm/ui/radioSubMenu.d.ts +5 -3
  304. package/esm/ui/radioSubMenu.js +2 -2
  305. package/esm/ui/rampKey.d.ts +15 -0
  306. package/esm/ui/rampKey.js +17 -0
  307. package/esm/ui/showSubMenu.d.ts +0 -5
  308. package/esm/ui/showSubMenu.js +6 -15
  309. package/esm/ui/theme.d.ts +2 -2
  310. package/esm/ui/theme.js +1 -1
  311. package/esm/ui/useAssemblySelection.d.ts +2 -0
  312. package/esm/ui/useMouseTracking.d.ts +8 -20
  313. package/esm/ui/useMouseTracking.js +23 -62
  314. package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
  315. package/esm/ui/usePlacedMenuFocus.js +28 -0
  316. package/esm/util/Base1DViewModel.d.ts +5 -3
  317. package/esm/util/Base1DViewModel.js +5 -3
  318. package/esm/util/SvgCanvas.js +1 -1
  319. package/esm/util/aggregateFieldName.d.ts +1 -10
  320. package/esm/util/aggregateFieldName.js +1 -8
  321. package/esm/util/analytics.d.ts +4 -6
  322. package/esm/util/analytics.js +143 -12
  323. package/esm/util/bezierConnector.d.ts +20 -0
  324. package/esm/util/bezierConnector.js +34 -100
  325. package/esm/util/cacheBudgets.d.ts +3 -0
  326. package/esm/util/cacheBudgets.js +3 -0
  327. package/esm/util/categoricalField.d.ts +2 -2
  328. package/esm/util/categoricalField.js +3 -3
  329. package/esm/util/color/index.d.ts +1 -1
  330. package/esm/util/color/index.js +2 -2
  331. package/esm/util/color-bits/bit.js +1 -1
  332. package/esm/util/color-bits/parse.js +6 -6
  333. package/esm/util/colorBits.d.ts +15 -4
  334. package/esm/util/colorBits.js +38 -15
  335. package/esm/util/colorRamp.d.ts +3 -3
  336. package/esm/util/colorRamp.js +14 -2
  337. package/esm/util/colorScale.d.ts +114 -20
  338. package/esm/util/colorScale.js +124 -26
  339. package/esm/util/colorSchemes.d.ts +6 -4
  340. package/esm/util/colorSchemes.js +6 -3
  341. package/esm/util/createSvgRasterCanvas.d.ts +14 -1
  342. package/esm/util/createSvgRasterCanvas.js +36 -12
  343. package/esm/util/diagonalizeRegions.js +18 -9
  344. package/esm/util/featureTransforms.d.ts +2 -2
  345. package/esm/util/featureTransforms.js +85 -135
  346. package/esm/util/fileHandleStore.js +5 -0
  347. package/esm/util/groupKeys.d.ts +5 -4
  348. package/esm/util/groupKeys.js +15 -9
  349. package/esm/util/index.js +1 -1
  350. package/esm/util/installFetch.d.ts +2 -2
  351. package/esm/util/installPrerequisiteFetch.d.ts +8 -3
  352. package/esm/util/installPrerequisiteFetch.js +9 -7
  353. package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
  354. package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
  355. package/esm/util/jexl.js +1 -1
  356. package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
  357. package/esm/util/layouts/GranularRectLayout.js +57 -34
  358. package/esm/util/leadingEdgeAutorun.d.ts +9 -1
  359. package/esm/util/leadingEdgeAutorun.js +5 -2
  360. package/esm/util/markEncoding.d.ts +10 -8
  361. package/esm/util/markEncoding.js +50 -12
  362. package/esm/util/markEncodingTypes.d.ts +74 -20
  363. package/esm/util/originCut.d.ts +14 -0
  364. package/esm/util/originCut.js +19 -0
  365. package/esm/util/paintLayer.d.ts +1 -1
  366. package/esm/util/paintLayer.js +4 -3
  367. package/esm/util/pathSeries.d.ts +18 -0
  368. package/esm/util/pathSeries.js +143 -0
  369. package/esm/util/pressOwner.d.ts +20 -0
  370. package/esm/util/pressOwner.js +26 -0
  371. package/esm/util/quantileExtent.d.ts +3 -3
  372. package/esm/util/quantileExtent.js +3 -3
  373. package/esm/util/rowStackGeometry.d.ts +1 -1
  374. package/esm/util/rowStackGeometry.js +1 -1
  375. package/esm/util/sessionActivity.d.ts +36 -0
  376. package/esm/util/sessionActivity.js +88 -0
  377. package/esm/util/stepOutputs.d.ts +165 -0
  378. package/esm/util/stepOutputs.js +201 -0
  379. package/esm/util/stepTables.d.ts +7 -3
  380. package/esm/util/stepTables.js +86 -3
  381. package/esm/util/thresholdScale.d.ts +1 -1
  382. package/esm/util/thresholdScale.js +1 -1
  383. package/esm/util/tracks.js +1 -1
  384. package/esm/util/usePanZoom.js +4 -10
  385. package/esm/util/windowStep.d.ts +6 -0
  386. package/esm/util/windowStep.js +153 -0
  387. package/package.json +23 -15
  388. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
  389. package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
  390. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
  391. package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
@@ -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);
@@ -11,7 +11,7 @@ export type FieldRef = string;
11
11
  /**
12
12
  * #api
13
13
  * A field bound to a categorical scale: each distinct value takes one entry
14
- * of the channel's `range` — a colour for `color`, a shape name for
14
+ * of the channel's `range` — a color for `color`, a shape name for
15
15
  * `shape`. Every value derives its entry from itself (an integer takes the
16
16
  * slot it names, anything else hashes in), so every region agrees on a value
17
17
  * it shares with another at the cost of an occasional collision. A `domain`
@@ -29,7 +29,7 @@ export interface CategoricalRef {
29
29
  /**
30
30
  * #api
31
31
  * A numeric field cut into intervals: `domain` is the ascending cut points
32
- * and `range` holds one colour more, so a value paints the entry for the
32
+ * and `range` holds one color more, so a value paints the entry for the
33
33
  * number of cut points it is at or past. A value that is not a number
34
34
  * belongs to no interval.
35
35
  */
@@ -40,13 +40,15 @@ export interface ThresholdRef {
40
40
  range?: string[];
41
41
  /** What the key names each bin, one each from the lowest. */
42
42
  labels?: string[];
43
+ /** The key lists the bins from the highest. */
44
+ descending?: boolean;
43
45
  }
44
46
  /**
45
47
  * #api
46
48
  * A numeric field read through a linear or log scale into a ramp. Each end of
47
49
  * the domain is pinned by `domainMin` or `domainMax`, or is the region's own
48
- * extreme where unset, so pinning both keeps colours consistent across a
49
- * whole view. The ramp is `range`'s CSS colours, evenly spaced, where it
50
+ * extreme where unset, so pinning both keeps colors consistent across a
51
+ * whole view. The ramp is `range`'s CSS colors, evenly spaced, where it
50
52
  * lists any, else the named `scheme`; `reverse` turns it round.
51
53
  */
52
54
  export interface ContinuousRef {
@@ -67,7 +69,7 @@ export interface ContinuousRef {
67
69
  }
68
70
  /**
69
71
  * #api
70
- * How a mark's `color` channel resolves. A CSS colour or a `jexl:` expression
72
+ * How a mark's `color` channel resolves. A CSS color or a `jexl:` expression
71
73
  * returning one paints per feature with no scale; the object forms bind a
72
74
  * field to a scale, which a legend can describe, and share the config's
73
75
  * member names.
@@ -101,7 +103,7 @@ export interface LocusRef {
101
103
  * A numeric field read through a linear or log scale into a width in CSS px:
102
104
  * `range` is the px at each end of the domain (1 to 6 unset), and each end of
103
105
  * the domain is pinned by `domainMin` or `domainMax` or follows the loaded
104
- * regions' extremes where unset, as a colour ramp's does. A feature holding
106
+ * regions' extremes where unset, as a color ramp's does. A feature holding
105
107
  * no number takes the range's first px.
106
108
  */
107
109
  export interface SizeRef {
@@ -149,18 +151,18 @@ export interface MarkEncoding {
149
151
  * allocated nor transferred, and a caller that never hovers declines the
150
152
  * index, which is most of the encoder's cost after the walk.
151
153
  */
152
- export type LaneName = 'y' | 'color' | 'colorValue' | 'colorKey' | 'glyph' | 'row' | 'text' | 'size' | 'x2Ref' | 'index';
154
+ export type LaneName = 'y' | 'color' | 'colorValue' | 'colorKey' | 'glyph' | 'row' | 'text' | 'size' | 'x2Ref' | 'series' | 'index';
153
155
  /**
154
156
  * #api
155
- * The scale a colour channel was resolved through, as the legend reads it —
156
- * the same table the colours in the payload came from, so the key cannot
157
+ * The scale a color channel was resolved through, as the legend reads it —
158
+ * the same table the colors in the payload came from, so the key cannot
157
159
  * disagree with the painting.
158
160
  */
159
161
  export type ColorScaleTable = {
160
162
  kind: 'categorical';
161
163
  field: string;
162
164
  domain: string[];
163
- /** The declared range, the other half of what assigns a key its colour. */
165
+ /** The declared range, the other half of what assigns a key its color. */
164
166
  range?: string[];
165
167
  /**
166
168
  * Whether every non-empty key met here parsed as a finite number: a
@@ -180,7 +182,7 @@ export type ColorScaleTable = {
180
182
  /** The cut points, ascending, as numbers. */
181
183
  domain: number[];
182
184
  /**
183
- * The declared interval colours, one more than the cuts; the default
185
+ * The declared interval colors, one more than the cuts; the default
184
186
  * palette fills what the declaration leaves.
185
187
  */
186
188
  range?: string[];
@@ -213,7 +215,7 @@ export type ColorScaleTable = {
213
215
  */
214
216
  domainMid?: number;
215
217
  /**
216
- * The declared stops — `range`'s colours or the `scheme` — and
218
+ * The declared stops — `range`'s colors or the `scheme` — and
217
219
  * `reverse`, which with both ends pinned make up the whole declaration,
218
220
  * so marks declaring one ramp alike share a key on it.
219
221
  */
@@ -272,7 +274,7 @@ export interface SizeScaleTable {
272
274
  }
273
275
  /**
274
276
  * #api
275
- * The table behind a channel a key is drawn from: a colour's, whose `kind`
277
+ * The table behind a channel a key is drawn from: a color's, whose `kind`
276
278
  * names the scale it resolved through, or a shape's. A `size` channel's
277
279
  * ({@link SizeScaleTable}) draws no key and stands outside.
278
280
  */
@@ -297,7 +299,7 @@ export interface EncodedChannels {
297
299
  /**
298
300
  * Of `skipped`, the features whose `x` or `x2` read no number, such as
299
301
  * the edges a `bin` writes for a feature lacking its field. Absent where
300
- * the layer placed nothing by a field, as the density sidecar's does.
302
+ * the layer placed nothing by a field.
301
303
  */
302
304
  skippedPosition?: number;
303
305
  x: Uint32Array;
@@ -306,20 +308,20 @@ export interface EncodedChannels {
306
308
  y?: Float32Array;
307
309
  /**
308
310
  * Each instance's packed ABGR, or one number every instance paints where
309
- * the colour is a constant; {@link colorAt} reads either.
311
+ * the color is a constant; {@link colorAt} reads either.
310
312
  */
311
313
  color?: Uint32Array | number;
312
314
  /**
313
- * The raw values of a quantitative colour channel — a ramp's or a
315
+ * The raw values of a quantitative color channel — a ramp's or a
314
316
  * threshold's — for a caller that named the `colorValue` lane: the scale
315
317
  * then resolves on the main thread and in the shader, a ramp against a
316
318
  * domain unioned over the loaded regions (`scale.extent` is this region's
317
319
  * contribution) and a threshold against its cuts as uniforms. Where the
318
- * colour reads the field `y` plots, this IS the `y` array, not a copy.
320
+ * color reads the field `y` plots, this IS the `y` array, not a copy.
319
321
  */
320
322
  colorValue?: Float32Array;
321
323
  /**
322
- * Each instance's index into `scale.entries` under a categorical colour, for
324
+ * Each instance's index into `scale.entries` under a categorical color, for
323
325
  * a caller that named the `colorKey` lane in place of `color`: the display
324
326
  * then paints each key through its own `domain` and `range`, which never
325
327
  * reach the worker.
@@ -328,6 +330,18 @@ export interface EncodedChannels {
328
330
  /** The point painter's code for each feature's `shape`. */
329
331
  glyph?: Uint8Array;
330
332
  row?: Uint32Array;
333
+ /**
334
+ * Which series of its row each instance belongs to, for a layer whose
335
+ * request names a {@link PathSpec}: the instances come grouped series by
336
+ * series, each in start order, so a path strokes each series as a run of
337
+ * its own.
338
+ */
339
+ series?: Uint32Array;
340
+ /**
341
+ * The stretch in bp past which a path breaks, from the request's
342
+ * {@link PathSpec}. Absent, a series is one run.
343
+ */
344
+ gapBp?: number;
331
345
  /**
332
346
  * Each feature's `text` channel as text, `''` where the field holds
333
347
  * nothing; a list joins its members with commas. Strings, so the lane is
@@ -343,12 +357,19 @@ export interface EncodedChannels {
343
357
  */
344
358
  x2Ref?: Uint32Array;
345
359
  x2RefNames?: string[];
360
+ /**
361
+ * Which arm each end's junction keeps, as render-core's `linkFeet` packs
362
+ * the two directions: the record's own `mateDirection` and the one beside
363
+ * a {@link LocusRef} `x2`'s position. Filled with `x2Ref`, and absent where
364
+ * no record states a direction.
365
+ */
366
+ feet?: Uint8Array;
346
367
  /** The finite `y` extremes, `Infinity`/`-Infinity` when nothing plotted. */
347
368
  yMin: number;
348
369
  yMax: number;
349
370
  /** A Flatbush over (x, y, x2, y), when `index` was asked for and `count` is not 0. */
350
371
  flatbushData?: ArrayBuffer;
351
- /** The colour channel's table, when `color` is a scale. */
372
+ /** The color channel's table, when `color` is a scale. */
352
373
  scale?: ColorScaleTable;
353
374
  /** The shape channel's table, when `shape` is a scale. */
354
375
  shapeScale?: ShapeScaleTable;
@@ -371,6 +392,20 @@ export interface LayerRequest {
371
392
  lanes: LaneName[];
372
393
  /** This layer's own steps, run after the request's shared ones. */
373
394
  transform?: TransformStep[];
395
+ /** How a mark stroking through its instances splits them into series. */
396
+ path?: PathSpec;
397
+ }
398
+ /**
399
+ * #api
400
+ * A path's series, as Vega-Lite draws a line: one per row and, within a row,
401
+ * one per distinct value of `by`, a categorical color's field, each in start
402
+ * order. `gapBp` breaks a series where the next instance's middle lies further
403
+ * on than that; absent, a `window` step among the layer's steps sets it to the
404
+ * bases a frame spans at the median row, and with none a series is one run.
405
+ */
406
+ export interface PathSpec {
407
+ by?: FieldRef;
408
+ gapBp?: number;
374
409
  }
375
410
  /**
376
411
  * #api
@@ -386,6 +421,8 @@ export interface EncodedLayersResult {
386
421
  zoomRange?: ZoomRange;
387
422
  /** What the adapter said about this answer that the features cannot show. */
388
423
  notices?: string[];
424
+ /** What the adapter read off the features, under names of its own. */
425
+ facts?: Record<string, unknown>;
389
426
  }
390
427
  /**
391
428
  * #api
@@ -459,6 +496,23 @@ export interface AggregateStep {
459
496
  groupby?: FieldRef[];
460
497
  ops: AggregateOp[];
461
498
  }
499
+ /**
500
+ * #api
501
+ * Every row kept, each written with `ops` summarized over the rows of its
502
+ * group around it, Vega-Lite's window transform: a group is a distinct
503
+ * `groupby` value set within a section, its rows taken in `start` order, and
504
+ * `frame` counts rows before and after the current one, `null` running to the
505
+ * group's end. `[-10, 10]`, the default, is a moving average over 21 rows,
506
+ * whatever bases they span; `[null, 0]` a running total. A frame cut off at a
507
+ * group's end summarizes the rows it has. The rows come out grouped, each
508
+ * group in `start` order, so a `line` walks one group at a time.
509
+ */
510
+ export interface WindowStep {
511
+ type: 'window';
512
+ groupby?: FieldRef[];
513
+ frame?: [number | null, number | null];
514
+ ops: AggregateOp[];
515
+ }
462
516
  /**
463
517
  * #api
464
518
  * Replace the features with runs of constant depth: how many of them overlap
@@ -543,7 +597,7 @@ export interface MateStep {
543
597
  * way GenomeSpy spells a transform; every step runs in order and the next
544
598
  * reads what the last answered.
545
599
  */
546
- export type TransformStep = FilterStep | FormulaStep | FlattenStep | CellsStep | BinStep | AggregateStep | CoverageStep | PileupStep | MateStep;
600
+ export type TransformStep = FilterStep | FormulaStep | FlattenStep | CellsStep | BinStep | AggregateStep | WindowStep | CoverageStep | PileupStep | MateStep;
547
601
  export type CoreGetEncodedLayersArgs = {
548
602
  adapterConfig: Record<string, unknown>;
549
603
  region: {