@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
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The id of the piece of a feature lying past a circular sequence's origin,
3
+ * the feature cut there and `id` the piece before it. Only GFF3 cuts:
4
+ * bedToBigBed refuses an end past the contig, and on 2026-10-11 none of hg38's
5
+ * 35 hosted BED tabix tracks had a chrM record ending past 16569.
6
+ *
7
+ * The linear view reads across the origin with the tail and head typed as two
8
+ * regions, `NC_012920.1:15,000-16,569 NC_012920.1:1-2,000`, where the two
9
+ * pieces abut in one row. A locstring that wraps past the origin, or a menu
10
+ * item, would save the typing; neither was built (2026-10-14).
11
+ */
12
+ export declare function originTailId(id: string): string;
13
+ /** The id of the piece before the origin, when `id` names the one past it. */
14
+ export declare function originHeadId(id: string): string | undefined;
@@ -0,0 +1,19 @@
1
+ const TAIL_SUFFIX = '-origin';
2
+ /**
3
+ * The id of the piece of a feature lying past a circular sequence's origin,
4
+ * the feature cut there and `id` the piece before it. Only GFF3 cuts:
5
+ * bedToBigBed refuses an end past the contig, and on 2026-10-11 none of hg38's
6
+ * 35 hosted BED tabix tracks had a chrM record ending past 16569.
7
+ *
8
+ * The linear view reads across the origin with the tail and head typed as two
9
+ * regions, `NC_012920.1:15,000-16,569 NC_012920.1:1-2,000`, where the two
10
+ * pieces abut in one row. A locstring that wraps past the origin, or a menu
11
+ * item, would save the typing; neither was built (2026-10-14).
12
+ */
13
+ export function originTailId(id) {
14
+ return `${id}${TAIL_SUFFIX}`;
15
+ }
16
+ /** The id of the piece before the origin, when `id` names the one past it. */
17
+ export function originHeadId(id) {
18
+ return id.endsWith(TAIL_SUFFIX) ? id.slice(0, -TAIL_SUFFIX.length) : undefined;
19
+ }
@@ -6,7 +6,7 @@ export type PaintLayerOpts = SvgRasterCanvasOpts & {
6
6
  rasterizeLayers?: boolean;
7
7
  };
8
8
  /**
9
- * Paint into either a 2× rasterize canvas (PNG-embedded as <image>) or an
9
+ * Paint into either a rasterize canvas (PNG-embedded as <image>) or an
10
10
  * SvgCanvas (serialized into a <g>). Renders one element — callers don't
11
11
  * branch on which mode was picked.
12
12
  *
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SvgCanvas } from './SvgCanvas.js';
3
- import { createSvgRasterCanvas } from './createSvgRasterCanvas.js';
3
+ import { createSvgRasterCanvas, svgRasterDataUrl, } from './createSvgRasterCanvas.js';
4
4
  /**
5
- * Paint into either a 2× rasterize canvas (PNG-embedded as <image>) or an
5
+ * Paint into either a rasterize canvas (PNG-embedded as <image>) or an
6
6
  * SvgCanvas (serialized into a <g>). Renders one element — callers don't
7
7
  * branch on which mode was picked.
8
8
  *
@@ -20,11 +20,12 @@ import { createSvgRasterCanvas } from './createSvgRasterCanvas.js';
20
20
  * canvas is blank means reading its pixels back — and it does not need one: a
21
21
  * fully transparent PNG is a couple of hundred bytes.
22
22
  */
23
+ // eslint-disable-next-line no-restricted-syntax -- drawn inside a frozen SVG figure
23
24
  export function PaintLayer({ width, height, opts, paint, }) {
24
25
  if (opts?.rasterizeLayers && width > 0 && height > 0) {
25
26
  const { canvas, ctx } = createSvgRasterCanvas(width, height, opts);
26
27
  paint(ctx);
27
- return (_jsx("image", { width: width, height: height, xlinkHref: canvas.toDataURL('image/png') }));
28
+ return (_jsx("image", { width: width, height: height, xlinkHref: svgRasterDataUrl(canvas) }));
28
29
  }
29
30
  const svg = new SvgCanvas();
30
31
  paint(svg);
@@ -0,0 +1,18 @@
1
+ import type { FeatureTable } from './featureTable.ts';
2
+ import type { JexlInstance } from './jexlStrings.ts';
3
+ import type { FieldRef, PathSpec, TransformStep } from './markEncodingTypes.ts';
4
+ type RowEncoding = FieldRef | ArrayLike<number> | undefined;
5
+ /**
6
+ * #api
7
+ * A path layer's table in series order, as {@link PathSpec} defines a series,
8
+ * with each row's series beside it and the stretch past which a series breaks.
9
+ * `steps` are every step the layer's rows went through, which a `window` among
10
+ * them reads the default break from.
11
+ */
12
+ export declare function pathSeries(table: FeatureTable, row: RowEncoding, path: PathSpec, steps: readonly TransformStep[], jexl?: JexlInstance): {
13
+ table: FeatureTable;
14
+ row: RowEncoding;
15
+ series: Uint32Array<ArrayBuffer>;
16
+ gapBp: number | undefined;
17
+ };
18
+ export {};
@@ -0,0 +1,143 @@
1
+ // A path layer's rows in series order. `layerFeatures` applies it, so the
2
+ // table `CoreGetEncodedFeature` reads is the one `CoreGetEncodedLayers`
3
+ // encoded and an instance's index names the same row in both. Imported by
4
+ // relative path only.
5
+ import { numberReaderOf, readerOf, selectRows } from './featureTable.js';
6
+ import { fieldReader, isPlainFieldRef } from './fieldReader.js';
7
+ import { groupKey, sortByStart } from './stepTables.js';
8
+ import { DEFAULT_WINDOW_FRAME } from './windowStep.js';
9
+ function reader(table, ref, jexl) {
10
+ if (isPlainFieldRef(ref)) {
11
+ return readerOf(table.column(ref));
12
+ }
13
+ const read = fieldReader(ref, jexl);
14
+ return (i) => read(table.row(i));
15
+ }
16
+ // Each row's series, numbered in the order met: one per distinct pair of the
17
+ // row it stands in and its `by` value.
18
+ function seriesOf(table, row, by, jexl) {
19
+ const n = table.length;
20
+ const readRow = typeof row === 'string'
21
+ ? reader(table, row, jexl)
22
+ : row
23
+ ? (i) => row[i]
24
+ : () => 0;
25
+ const readBy = by === undefined ? () => undefined : reader(table, by, jexl);
26
+ const keys = new Map();
27
+ const series = new Uint32Array(n);
28
+ let count = 0;
29
+ for (let i = 0; i < n; i++) {
30
+ const r = readRow(i);
31
+ let byRow = keys.get(r);
32
+ if (!byRow) {
33
+ byRow = new Map();
34
+ keys.set(r, byRow);
35
+ }
36
+ const key = groupKey(readBy(i));
37
+ let s = byRow.get(key);
38
+ if (s === undefined) {
39
+ s = count++;
40
+ byRow.set(key, s);
41
+ }
42
+ series[i] = s;
43
+ }
44
+ return { series, count };
45
+ }
46
+ // The rows grouped by series, each series in start order, and where each
47
+ // series begins.
48
+ function seriesOrder(starts, series, count) {
49
+ const n = series.length;
50
+ const first = new Uint32Array(count + 1);
51
+ for (let i = 0; i < n; i++) {
52
+ first[series[i] + 1]++;
53
+ }
54
+ for (let s = 0; s < count; s++) {
55
+ first[s + 1] += first[s];
56
+ }
57
+ const order = new Uint32Array(n);
58
+ const next = first.slice(0, count);
59
+ for (let i = 0; i < n; i++) {
60
+ order[next[series[i]]++] = i;
61
+ }
62
+ for (let s = 0; s < count; s++) {
63
+ const rows = order.subarray(first[s], first[s + 1]);
64
+ let sorted = true;
65
+ for (let k = 1; k < rows.length && sorted; k++) {
66
+ sorted = starts[rows[k]] >= starts[rows[k - 1]];
67
+ }
68
+ if (!sorted) {
69
+ sortByStart(rows, starts);
70
+ }
71
+ }
72
+ return { order, first };
73
+ }
74
+ // The bases a window's frame spans at the median row: each row's frame runs
75
+ // from the start `before` rows back to the start `after` rows on, cut at its
76
+ // series' ends, as the window step cut it.
77
+ function frameSpanBp(starts, order, first, [before, after]) {
78
+ const spans = [];
79
+ for (let s = 0; s + 1 < first.length; s++) {
80
+ const lo = first[s];
81
+ const m = first[s + 1] - lo;
82
+ for (let j = 0; j < m; j++) {
83
+ const a = Math.max(0, j + before);
84
+ const b = Math.min(m - 1, j + after);
85
+ if (a <= b) {
86
+ spans.push(starts[order[lo + b]] - starts[order[lo + a]]);
87
+ }
88
+ }
89
+ }
90
+ if (spans.length === 0) {
91
+ return undefined;
92
+ }
93
+ spans.sort((x, y) => x - y);
94
+ return spans[spans.length >> 1];
95
+ }
96
+ function windowFrame(steps) {
97
+ const step = steps.findLast(s => s.type === 'window');
98
+ if (step?.type !== 'window') {
99
+ return undefined;
100
+ }
101
+ const [before, after] = step.frame ?? DEFAULT_WINDOW_FRAME;
102
+ return before === null || after === null
103
+ ? undefined
104
+ : [before, after];
105
+ }
106
+ /**
107
+ * #api
108
+ * A path layer's table in series order, as {@link PathSpec} defines a series,
109
+ * with each row's series beside it and the stretch past which a series breaks.
110
+ * `steps` are every step the layer's rows went through, which a `window` among
111
+ * them reads the default break from.
112
+ */
113
+ export function pathSeries(table, row, path, steps, jexl) {
114
+ const n = table.length;
115
+ const { series, count } = seriesOf(table, row, path.by, jexl);
116
+ const readStart = numberReaderOf(table.column('start'));
117
+ const starts = new Float64Array(n);
118
+ for (let i = 0; i < n; i++) {
119
+ const s = readStart(i);
120
+ starts[i] = Number.isNaN(s) ? Infinity : s;
121
+ }
122
+ const { order, first } = seriesOrder(starts, series, count);
123
+ const ordered = new Uint32Array(n);
124
+ for (let k = 0; k < n; k++) {
125
+ ordered[k] = series[order[k]];
126
+ }
127
+ let rowOut = row;
128
+ if (row !== undefined && typeof row !== 'string') {
129
+ const permuted = new Uint32Array(n);
130
+ for (let k = 0; k < n; k++) {
131
+ permuted[k] = row[order[k]];
132
+ }
133
+ rowOut = permuted;
134
+ }
135
+ const frame = path.gapBp === undefined ? windowFrame(steps) : undefined;
136
+ return {
137
+ table: selectRows(table, order),
138
+ row: rowOut,
139
+ series: ordered,
140
+ gapBp: path.gapBp ??
141
+ (frame ? frameSpanBp(starts, order, first, frame) : undefined),
142
+ };
143
+ }
@@ -0,0 +1,20 @@
1
+ interface Press {
2
+ target: EventTarget | null;
3
+ currentTarget: EventTarget | null;
4
+ }
5
+ /**
6
+ * Whether an event reached a container's React handler from outside the
7
+ * container's DOM. React bubbles a portal's events to its React parent, so a
8
+ * press in a dialog or menu that a track opened arrives at every handler above
9
+ * the track.
10
+ */
11
+ export declare function isFromPortal({ target, currentTarget }: Press): boolean;
12
+ /**
13
+ * Whether a container's own drag gesture leaves a press alone: one from a
14
+ * portal, or one on a control that claimed it (`[data-gesture-owner]`,
15
+ * JBrowse's marker on the parts that drag on their own), a button, or a
16
+ * draggable element. `closest`, because the press usually lands on an icon
17
+ * inside the control.
18
+ */
19
+ export declare function isClaimedPress(event: Press): boolean;
20
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Whether an event reached a container's React handler from outside the
3
+ * container's DOM. React bubbles a portal's events to its React parent, so a
4
+ * press in a dialog or menu that a track opened arrives at every handler above
5
+ * the track.
6
+ */
7
+ export function isFromPortal({ target, currentTarget }) {
8
+ return (target instanceof Node &&
9
+ currentTarget instanceof Node &&
10
+ !currentTarget.contains(target));
11
+ }
12
+ /**
13
+ * Whether a container's own drag gesture leaves a press alone: one from a
14
+ * portal, or one on a control that claimed it (`[data-gesture-owner]`,
15
+ * JBrowse's marker on the parts that drag on their own), a button, or a
16
+ * draggable element. `closest`, because the press usually lands on an icon
17
+ * inside the control.
18
+ */
19
+ export function isClaimedPress(event) {
20
+ const { target } = event;
21
+ return (isFromPortal(event) ||
22
+ (target instanceof HTMLElement && target.draggable) ||
23
+ (target instanceof Element &&
24
+ target.closest('button, [data-gesture-owner], [draggable="true"]') !==
25
+ null));
26
+ }
@@ -37,13 +37,13 @@ export declare function quantileOf(a: Float32Array, n: number, quantile: number)
37
37
  * the axis nor the ramp, and a sparse tail of the other sign keeps its own
38
38
  * end. An axis that starts at 0 adds it itself. Under 0.5 reads as 0.5,
39
39
  * where the ends meet rather than cross. `scales.y.domainQuantile` and a
40
- * colour's `domainQuantile` both name it. `[Infinity, -Infinity]` where
40
+ * color's `domainQuantile` both name it. `[Infinity, -Infinity]` where
41
41
  * nothing is finite.
42
42
  *
43
43
  * Nearest rank keeps ties: where one value holds the rank, as on a segmented
44
44
  * copy-number track, a ramp clipped below 1 paints nearly every value one
45
- * colour. A value axis fences instead ({@link fenceOutliers}); a ramp takes
46
- * the same fence once a colour default below 1 meets tied data.
45
+ * color. A value axis fences instead ({@link fenceOutliers}); a ramp takes
46
+ * the same fence once a color default below 1 meets tied data.
47
47
  */
48
48
  export declare function quantileExtent(values: ArrayLike<number>, count: number, quantile?: number): [number, number];
49
49
  /**
@@ -111,13 +111,13 @@ function lowQuantileOf(a, n, quantile) {
111
111
  * the axis nor the ramp, and a sparse tail of the other sign keeps its own
112
112
  * end. An axis that starts at 0 adds it itself. Under 0.5 reads as 0.5,
113
113
  * where the ends meet rather than cross. `scales.y.domainQuantile` and a
114
- * colour's `domainQuantile` both name it. `[Infinity, -Infinity]` where
114
+ * color's `domainQuantile` both name it. `[Infinity, -Infinity]` where
115
115
  * nothing is finite.
116
116
  *
117
117
  * Nearest rank keeps ties: where one value holds the rank, as on a segmented
118
118
  * copy-number track, a ramp clipped below 1 paints nearly every value one
119
- * colour. A value axis fences instead ({@link fenceOutliers}); a ramp takes
120
- * the same fence once a colour default below 1 meets tied data.
119
+ * color. A value axis fences instead ({@link fenceOutliers}); a ramp takes
120
+ * the same fence once a color default below 1 meets tied data.
121
121
  */
122
122
  export function quantileExtent(values, count, quantile = 1) {
123
123
  if (!(quantile < 1)) {
@@ -9,7 +9,7 @@
9
9
  * cohort-sized track. Two rules follow, and each caller used to restate them:
10
10
  *
11
11
  * - **Ask at the pixel's centre.** Rasterization fills a pixel when its centre
12
- * falls inside the rect, so the centre is the scanline the colour the reader
12
+ * falls inside the rect, so the centre is the scanline the color the reader
13
13
  * is pointing at was decided on. The top edge misses by `0.5 / rowHeight`
14
14
  * rows — 5.4 of them on a 2,504-sample matrix at the default fit height.
15
15
  * - **Floor `mouseY` before adding `scrollTop`.** The canvas draws at
@@ -9,7 +9,7 @@
9
9
  * cohort-sized track. Two rules follow, and each caller used to restate them:
10
10
  *
11
11
  * - **Ask at the pixel's centre.** Rasterization fills a pixel when its centre
12
- * falls inside the rect, so the centre is the scanline the colour the reader
12
+ * falls inside the rect, so the centre is the scanline the color the reader
13
13
  * is pointing at was decided on. The top edge misses by `0.5 / rowHeight`
14
14
  * rows — 5.4 of them on a 2,504-sample matrix at the default fit height.
15
15
  * - **Floor `mouseY` before adding `scrollTop`.** The canvas draws at
@@ -0,0 +1,36 @@
1
+ export interface ActivitySession {
2
+ sessionTracks: {
3
+ type: string;
4
+ }[];
5
+ views: {
6
+ type: string;
7
+ tracks?: readonly object[];
8
+ }[];
9
+ widgets?: {
10
+ values(): Iterable<{
11
+ type: string;
12
+ }>;
13
+ };
14
+ }
15
+ export interface SessionShape {
16
+ viewTypes: string[];
17
+ trackTypes: string[];
18
+ widgetTypes: string[];
19
+ }
20
+ export declare function describeSession(session: ActivitySession | undefined): SessionShape;
21
+ export declare function tallyTypes(types: string[]): string;
22
+ export declare function createSessionActivity(): {
23
+ watch(getSession: () => ActivitySession | undefined): void;
24
+ stop(): void;
25
+ readonly watching: boolean;
26
+ stats(): {
27
+ 'view-types': string;
28
+ 'open-track-types': string;
29
+ 'seen-view-types': string;
30
+ 'seen-track-types': string;
31
+ 'seen-widget-types': string;
32
+ 'max-open-views': number;
33
+ 'max-open-tracks': number;
34
+ };
35
+ };
36
+ export type SessionActivity = ReturnType<typeof createSessionActivity>;
@@ -0,0 +1,88 @@
1
+ import { autorun } from 'mobx';
2
+ export function describeSession(session) {
3
+ const shape = { viewTypes: [], trackTypes: [], widgetTypes: [] };
4
+ if (session) {
5
+ for (const view of session.views) {
6
+ shape.viewTypes.push(view.type);
7
+ for (const track of view.tracks ?? []) {
8
+ if ('type' in track && typeof track.type === 'string') {
9
+ shape.trackTypes.push(track.type);
10
+ }
11
+ }
12
+ }
13
+ for (const widget of session.widgets?.values() ?? []) {
14
+ shape.widgetTypes.push(widget.type);
15
+ }
16
+ }
17
+ return shape;
18
+ }
19
+ // `LinearGenomeView:2,DotplotView:1`, sorted so equal sessions give equal text
20
+ export function tallyTypes(types) {
21
+ const counts = new Map();
22
+ for (const type of types) {
23
+ counts.set(type, (counts.get(type) ?? 0) + 1);
24
+ }
25
+ return [...counts]
26
+ .sort(([a], [b]) => a.localeCompare(b))
27
+ .map(([type, count]) => `${type}:${count}`)
28
+ .join(',');
29
+ }
30
+ // Accumulates what a page load's sessions held at any point, so the end report
31
+ // can say what was opened during use and not only what is open at the end.
32
+ export function createSessionActivity() {
33
+ const seen = {
34
+ viewTypes: new Set(),
35
+ trackTypes: new Set(),
36
+ widgetTypes: new Set(),
37
+ };
38
+ let maxOpenViews = 0;
39
+ let maxOpenTracks = 0;
40
+ let current = describeSession(undefined);
41
+ let stopWatching;
42
+ function record(shape) {
43
+ current = shape;
44
+ maxOpenViews = Math.max(maxOpenViews, shape.viewTypes.length);
45
+ maxOpenTracks = Math.max(maxOpenTracks, shape.trackTypes.length);
46
+ for (const key of ['viewTypes', 'trackTypes', 'widgetTypes']) {
47
+ for (const type of shape[key]) {
48
+ seen[key].add(type);
49
+ }
50
+ }
51
+ }
52
+ return {
53
+ // jbrowse-web rebuilds the root model when plugins change and Desktop
54
+ // builds one per session opened, so each call replaces the previous watch.
55
+ // A root model that has left its state tree throws when read; the watch
56
+ // then keeps what it last saw.
57
+ watch(getSession) {
58
+ stopWatching?.();
59
+ stopWatching = autorun(() => {
60
+ try {
61
+ record(describeSession(getSession()));
62
+ }
63
+ catch {
64
+ // dead state tree
65
+ }
66
+ });
67
+ },
68
+ stop() {
69
+ stopWatching?.();
70
+ stopWatching = undefined;
71
+ },
72
+ get watching() {
73
+ return stopWatching !== undefined;
74
+ },
75
+ stats() {
76
+ const list = (types) => [...types].sort().join(',');
77
+ return {
78
+ 'view-types': tallyTypes(current.viewTypes),
79
+ 'open-track-types': tallyTypes(current.trackTypes),
80
+ 'seen-view-types': list(seen.viewTypes),
81
+ 'seen-track-types': list(seen.trackTypes),
82
+ 'seen-widget-types': list(seen.widgetTypes),
83
+ 'max-open-views': maxOpenViews,
84
+ 'max-open-tracks': maxOpenTracks,
85
+ };
86
+ },
87
+ };
88
+ }
@@ -0,0 +1,165 @@
1
+ /**
2
+ * What each transform step does to the rows it reads, stated once for the
3
+ * runtime's facet split, the validator, the field pickers and the channels a
4
+ * mark adopts by default. Imports nothing, so the validator's copy of the mark
5
+ * rule list carries it unchanged.
6
+ *
7
+ * Every step type answers three things:
8
+ * - `rowwise`: it answers each row from that row alone and in order, so a
9
+ * facet split may run ahead of it.
10
+ * - `replacesRows`: it makes its rows anew (an aggregate, a coverage), so a
11
+ * field survives it only where it writes that field or keeps it as a group.
12
+ * - `writes`: the fields it sets, each with the kind of value it holds and the
13
+ * channel a mark leaving that channel unwritten reads it through.
14
+ */
15
+ /** The field an aggregate op writes: `as` where named, else `count` for a count, else `<op>_<field>`. */
16
+ export declare function aggregateFieldName({ op, field, as, }: {
17
+ op: string;
18
+ field?: string;
19
+ as?: string;
20
+ }): string;
21
+ export declare const DEFAULT_FORMULA_AS = "value";
22
+ export declare const DEFAULT_COVERAGE_AS = "coverage";
23
+ export declare const DEFAULT_PILEUP_AS = "row";
24
+ export declare const DEFAULT_AGGREGATE_OP = "count";
25
+ export declare const DEFAULT_BIN_AS: readonly [string, string];
26
+ /** What a `bin` over `fields` writes on each piece: the bases of its interval inside its bin. */
27
+ export declare const BIN_OVERLAP_FIELD = "overlap";
28
+ /** What a `cells` step writes: `state` on every cell, `base` on a mismatch or an insertion, `match` off a gap or a reference `N`, `length` on an insertion. */
29
+ export declare const CELLS_FIELDS: readonly ['state', 'base', 'match', 'length'];
30
+ /** What a `mate` step writes on every feature it answers. */
31
+ export declare const MATE_FIELDS: readonly ['mate.refName', 'mate.start', 'mate.end', 'mate.mateDirection', 'mateDirection', 'alt', 'svType'];
32
+ /** Where a row stands, which every row keeps through every step. */
33
+ export declare const POSITION_FIELDS: readonly ['refName', 'start', 'end'];
34
+ /** The kind of value a step writes into a field; `unknown` keeps whatever the field held. */
35
+ export type FieldKind = 'numeric' | 'categorical' | 'unknown';
36
+ /** A channel a step's output fills where a mark leaves it unwritten. */
37
+ export type FilledChannel = 'y' | 'row' | 'x2';
38
+ export interface WrittenField {
39
+ field: string;
40
+ kind: FieldKind;
41
+ fills?: FilledChannel;
42
+ }
43
+ /** A step as a config node, a snapshot or a worker request holds it, any default unwritten. */
44
+ export interface StepOutline {
45
+ type: string;
46
+ as?: string | readonly string[];
47
+ ops?: readonly {
48
+ op?: string;
49
+ field?: string;
50
+ as?: string;
51
+ }[];
52
+ groupby?: readonly string[];
53
+ fields?: readonly string[];
54
+ index?: string;
55
+ key?: string;
56
+ }
57
+ export interface StepOutput {
58
+ rowwise: boolean;
59
+ replacesRows: boolean;
60
+ /** `edges` are the fields the last `bin` before this step wrote its edges to. */
61
+ writes: (step: StepOutline, edges: readonly string[]) => WrittenField[];
62
+ }
63
+ declare function summaries(step: StepOutline): WrittenField[];
64
+ export declare const STEP_OUTPUTS: {
65
+ filter: {
66
+ rowwise: true;
67
+ replacesRows: false;
68
+ writes: () => never[];
69
+ };
70
+ formula: {
71
+ rowwise: true;
72
+ replacesRows: false;
73
+ writes: (step: StepOutline) => {
74
+ field: string;
75
+ kind: "numeric";
76
+ }[];
77
+ };
78
+ bin: {
79
+ rowwise: true;
80
+ replacesRows: false;
81
+ writes: (step: StepOutline) => {
82
+ field: string;
83
+ kind: 'numeric';
84
+ }[];
85
+ };
86
+ cells: {
87
+ rowwise: true;
88
+ replacesRows: false;
89
+ writes: () => ({
90
+ field: string;
91
+ kind: "numeric";
92
+ } | {
93
+ field: string;
94
+ kind: "categorical";
95
+ })[];
96
+ };
97
+ aggregate: {
98
+ rowwise: false;
99
+ replacesRows: true;
100
+ writes: (step: StepOutline, edges: readonly string[]) => WrittenField[];
101
+ };
102
+ window: {
103
+ rowwise: false;
104
+ replacesRows: false;
105
+ writes: typeof summaries;
106
+ };
107
+ coverage: {
108
+ rowwise: false;
109
+ replacesRows: true;
110
+ writes: (step: StepOutline) => {
111
+ field: string;
112
+ kind: "numeric";
113
+ fills: "y";
114
+ }[];
115
+ };
116
+ pileup: {
117
+ rowwise: false;
118
+ replacesRows: false;
119
+ writes: (step: StepOutline) => {
120
+ field: string;
121
+ kind: "numeric";
122
+ fills: "row";
123
+ }[];
124
+ };
125
+ flatten: {
126
+ rowwise: false;
127
+ replacesRows: false;
128
+ writes: (step: StepOutline) => ({
129
+ field: string;
130
+ kind: 'numeric';
131
+ } | {
132
+ field: string;
133
+ kind: 'categorical';
134
+ })[];
135
+ };
136
+ mate: {
137
+ rowwise: false;
138
+ replacesRows: false;
139
+ writes: () => {
140
+ field: "alt" | "mate.end" | "mate.mateDirection" | "mate.refName" | "mate.start" | "mateDirection" | "svType";
141
+ kind: "categorical" | "numeric";
142
+ fills?: "x2" | undefined;
143
+ }[];
144
+ };
145
+ };
146
+ export type StepType = keyof typeof STEP_OUTPUTS;
147
+ /**
148
+ * The fields one step writes. A step this table does not know writes nothing
149
+ * it can name.
150
+ */
151
+ export declare function stepWrites(step: StepOutline, edges?: readonly string[]): WrittenField[];
152
+ /** Whether a step answers each row from that row alone, in order. */
153
+ export declare function isRowwise(step: StepOutline): boolean;
154
+ /**
155
+ * What a run of steps leaves: every field written, the last write of each
156
+ * winning, and, where a step made the rows anew, the only fields that survive
157
+ * it (`undefined` while the input's own fields all do). `channels` are what
158
+ * the output fills where a mark leaves them unwritten.
159
+ */
160
+ export declare function stepsOutput(steps: readonly (StepOutline | undefined)[]): {
161
+ written: WrittenField[];
162
+ surviving: Set<string> | undefined;
163
+ channels: Map<FilledChannel, string>;
164
+ };
165
+ export {};