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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/README.md +450 -132
  2. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
  3. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
  4. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +6 -2
  5. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +18 -3
  6. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.d.ts +2 -1
  7. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.js +4 -2
  8. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -1
  9. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +4 -2
  10. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.d.ts +2 -1
  11. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.js +4 -2
  12. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +5 -4
  13. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +6 -4
  14. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -1
  15. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +4 -2
  16. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +3 -2
  17. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +4 -2
  18. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +2 -2
  19. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.d.ts +3 -2
  20. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.js +4 -2
  21. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +3 -2
  22. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +4 -2
  23. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +3 -2
  24. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +4 -2
  25. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.d.ts +3 -2
  26. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +4 -2
  27. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +3 -2
  28. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +4 -2
  29. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
  30. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +4 -2
  31. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +3 -2
  32. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js +4 -2
  33. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.d.ts +3 -2
  34. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.js +4 -2
  35. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -1
  36. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +15 -24
  37. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -1
  38. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
  39. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
  40. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
  41. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.d.ts +3 -1
  42. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.js +2 -2
  43. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
  44. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
  45. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
  46. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
  47. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
  48. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
  49. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
  50. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
  51. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +4 -2
  52. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +29 -20
  53. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
  54. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
  55. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +3 -3
  56. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
  57. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +9 -0
  58. package/esm/BaseFeatureWidget/stateModelFactory.js +11 -0
  59. package/esm/BaseFeatureWidget/types.d.ts +2 -0
  60. package/esm/PluginManager.d.ts +7 -3
  61. package/esm/PluginManager.js +12 -3
  62. package/esm/ReExports/coreModules.generated.js +538 -518
  63. package/esm/ReExports/coreWorkerModules.generated.js +456 -438
  64. package/esm/ReExports/lazify.js +3 -2
  65. package/esm/ReExports/list.js +22 -6
  66. package/esm/ReExports/names.d.ts +1 -0
  67. package/esm/ReExports/names.generated.d.ts +2 -0
  68. package/esm/ReExports/names.generated.js +566 -0
  69. package/esm/ReExports/names.js +3 -0
  70. package/esm/TextSearch/TextSearchManager.d.ts +3 -3
  71. package/esm/TextSearch/TextSearchManager.js +6 -13
  72. package/esm/assemblyManager/assembly.d.ts +9 -0
  73. package/esm/assemblyManager/assembly.js +13 -0
  74. package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
  75. package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
  76. package/esm/assemblyManager/assemblyManager.d.ts +11 -0
  77. package/esm/assemblyManager/assemblyManager.js +2 -0
  78. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
  79. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
  80. package/esm/checkPlugins.js +10 -4
  81. package/esm/configuration/configurationSchema.d.ts +51 -100
  82. package/esm/configuration/configurationSchema.js +59 -225
  83. package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
  84. package/esm/configuration/configurationSchemaUnion.js +2 -1
  85. package/esm/configuration/configurationSlot.d.ts +18 -64
  86. package/esm/configuration/configurationSlot.js +32 -98
  87. package/esm/configuration/fillLocations.d.ts +4 -2
  88. package/esm/configuration/fillLocations.js +9 -3
  89. package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
  90. package/esm/configuration/formatAboutConfigSchema.js +2 -2
  91. package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
  92. package/esm/configuration/formatDetailsConfigSchema.js +7 -5
  93. package/esm/configuration/getConf.d.ts +7 -36
  94. package/esm/configuration/getConf.js +20 -41
  95. package/esm/configuration/index.d.ts +4 -3
  96. package/esm/configuration/index.js +3 -2
  97. package/esm/configuration/partitionAdvanced.d.ts +12 -0
  98. package/esm/configuration/partitionAdvanced.js +42 -0
  99. package/esm/configuration/plot.d.ts +6 -0
  100. package/esm/configuration/plot.js +56 -9
  101. package/esm/configuration/readConfObject.d.ts +15 -17
  102. package/esm/configuration/readConfObject.js +19 -50
  103. package/esm/configuration/schemaRegistry.d.ts +0 -2
  104. package/esm/configuration/schemaTypes.js +5 -1
  105. package/esm/configuration/slotFacade.js +2 -2
  106. package/esm/configuration/snapshotPreprocess.d.ts +42 -18
  107. package/esm/configuration/snapshotPreprocess.js +95 -37
  108. package/esm/configuration/tabixShorthand.js +1 -3
  109. package/esm/configuration/types.d.ts +60 -159
  110. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
  111. package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
  112. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
  113. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
  114. package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
  115. package/esm/data_adapters/BaseAdapter/index.js +0 -1
  116. package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
  117. package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
  118. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
  119. package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
  120. package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
  121. package/esm/data_adapters/dataAdapterCache.js +68 -24
  122. package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
  123. package/esm/data_adapters/getFeatureAdapter.js +17 -0
  124. package/esm/pluggableElementTypes/DisplayType.d.ts +7 -0
  125. package/esm/pluggableElementTypes/DisplayType.js +7 -0
  126. package/esm/pluggableElementTypes/RpcMethodType.d.ts +7 -0
  127. package/esm/pluggableElementTypes/RpcMethodType.js +9 -0
  128. package/esm/pluggableElementTypes/addMenuItems.d.ts +2 -1
  129. package/esm/pluggableElementTypes/addMenuItems.js +2 -1
  130. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
  131. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
  132. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -5
  133. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +57 -9
  134. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -7
  135. package/esm/pluggableElementTypes/models/BaseTrackModel.js +9 -10
  136. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
  137. package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
  138. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
  139. package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
  140. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
  141. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
  142. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
  143. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
  144. package/esm/pluggableElementTypes/models/baseTrackConfig.js +12 -1
  145. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
  146. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
  147. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
  148. package/esm/pluginDefinitions.d.ts +7 -0
  149. package/esm/pluginDefinitions.js +20 -0
  150. package/esm/rpc/RpcRegistry.d.ts +2 -11
  151. package/esm/rpc/byteBudget.d.ts +15 -0
  152. package/esm/rpc/byteBudget.js +23 -0
  153. package/esm/rpc/configSchema.d.ts +2 -0
  154. package/esm/rpc/configSchema.js +3 -1
  155. package/esm/rpc/coreRpcMethods.d.ts +1 -2
  156. package/esm/rpc/coreRpcMethods.js +1 -2
  157. package/esm/rpc/explainTransferError.js +3 -3
  158. package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
  159. package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
  160. package/esm/rpc/methods/CoreLoadTrackCode.d.ts +17 -0
  161. package/esm/rpc/methods/CoreLoadTrackCode.js +24 -0
  162. package/esm/rpc/methods/layerFeatures.d.ts +9 -6
  163. package/esm/rpc/methods/layerFeatures.js +21 -5
  164. package/esm/ui/ActionLink.d.ts +3 -2
  165. package/esm/ui/ActionLink.js +4 -2
  166. package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
  167. package/esm/ui/AddCustomPluginDialog.js +6 -4
  168. package/esm/ui/AppLogo.js +43 -3
  169. package/esm/ui/BaseTooltip.d.ts +3 -2
  170. package/esm/ui/BaseTooltip.js +4 -2
  171. package/esm/ui/CascadingMenu.js +14 -12
  172. package/esm/ui/CascadingMenuButton.d.ts +2 -2
  173. package/esm/ui/CascadingMenuButton.js +5 -4
  174. package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
  175. package/esm/ui/CascadingMenuHelpDialog.js +4 -2
  176. package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
  177. package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
  178. package/esm/ui/ColorPicker.d.ts +5 -4
  179. package/esm/ui/ColorPicker.js +6 -4
  180. package/esm/ui/ContextMenu.d.ts +1 -1
  181. package/esm/ui/ContextMenu.js +1 -1
  182. package/esm/ui/CopyToClipboardButton.d.ts +3 -2
  183. package/esm/ui/CopyToClipboardButton.js +4 -2
  184. package/esm/ui/Crosshairs.js +13 -10
  185. package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
  186. package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
  187. package/esm/ui/DataGridFlexContainer.d.ts +3 -2
  188. package/esm/ui/DataGridFlexContainer.js +4 -2
  189. package/esm/ui/Dialog.d.ts +1 -1
  190. package/esm/ui/Dialog.js +5 -4
  191. package/esm/ui/DropDownMenu.js +2 -2
  192. package/esm/ui/EditableTypography.d.ts +1 -1
  193. package/esm/ui/EditableTypography.js +3 -2
  194. package/esm/ui/ErrorActions.d.ts +3 -2
  195. package/esm/ui/ErrorActions.js +4 -2
  196. package/esm/ui/ErrorBanner.d.ts +2 -2
  197. package/esm/ui/ErrorBanner.js +3 -2
  198. package/esm/ui/ErrorBar.d.ts +3 -2
  199. package/esm/ui/ErrorBar.js +4 -2
  200. package/esm/ui/ErrorMessage.d.ts +3 -2
  201. package/esm/ui/ErrorMessage.js +4 -2
  202. package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
  203. package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
  204. package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
  205. package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
  206. package/esm/ui/ErrorOverlay.d.ts +3 -2
  207. package/esm/ui/ErrorOverlay.js +4 -2
  208. package/esm/ui/ExportSvgDialog.d.ts +3 -2
  209. package/esm/ui/ExportSvgDialog.js +4 -2
  210. package/esm/ui/ExternalLink.d.ts +2 -1
  211. package/esm/ui/ExternalLink.js +4 -2
  212. package/esm/ui/FactoryResetDialog.d.ts +3 -2
  213. package/esm/ui/FactoryResetDialog.js +4 -2
  214. package/esm/ui/FatalErrorDialog.d.ts +3 -2
  215. package/esm/ui/FatalErrorDialog.js +6 -4
  216. package/esm/ui/FileDropZone.d.ts +3 -2
  217. package/esm/ui/FileDropZone.js +4 -2
  218. package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
  219. package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
  220. package/esm/ui/FileSelector/LocationInput.js +4 -2
  221. package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
  222. package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
  223. package/esm/ui/GpuFallbackButton.d.ts +3 -2
  224. package/esm/ui/GpuFallbackButton.js +4 -2
  225. package/esm/ui/HoverMenu.d.ts +2 -2
  226. package/esm/ui/HoverMenu.js +7 -3
  227. package/esm/ui/HoverTooltip.d.ts +3 -2
  228. package/esm/ui/HoverTooltip.js +4 -2
  229. package/esm/ui/Icons.d.ts +5 -5
  230. package/esm/ui/Icons.js +11 -10
  231. package/esm/ui/InlineMenuControls.d.ts +2 -2
  232. package/esm/ui/InlineMenuControls.js +4 -3
  233. package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
  234. package/esm/ui/JexlFilterRowEditors.js +9 -8
  235. package/esm/ui/LabeledCheckbox.d.ts +3 -2
  236. package/esm/ui/LabeledCheckbox.js +4 -2
  237. package/esm/ui/LazyBaseTooltip.d.ts +12 -3
  238. package/esm/ui/LazyBaseTooltip.js +4 -2
  239. package/esm/ui/LegendSwatchGlyph.js +1 -0
  240. package/esm/ui/LoadingDots.d.ts +2 -1
  241. package/esm/ui/LoadingDots.js +4 -2
  242. package/esm/ui/LoadingEllipses.d.ts +5 -2
  243. package/esm/ui/LoadingEllipses.js +5 -3
  244. package/esm/ui/LoadingOverlay.d.ts +3 -2
  245. package/esm/ui/LoadingOverlay.js +4 -2
  246. package/esm/ui/LoadingProgress.d.ts +3 -2
  247. package/esm/ui/LoadingProgress.js +4 -2
  248. package/esm/ui/Logo.d.ts +2 -2
  249. package/esm/ui/Logo.js +9 -8
  250. package/esm/ui/MenuItemChevron.d.ts +2 -2
  251. package/esm/ui/MenuItemChevron.js +3 -2
  252. package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
  253. package/esm/ui/MenuItemEndDecoration.js +3 -2
  254. package/esm/ui/MenuItemTrailing.d.ts +2 -2
  255. package/esm/ui/MenuItemTrailing.js +7 -6
  256. package/esm/ui/MenuTypes.d.ts +21 -1
  257. package/esm/ui/MenuTypes.js +20 -0
  258. package/esm/ui/MonospaceTextField.d.ts +3 -2
  259. package/esm/ui/MonospaceTextField.js +4 -2
  260. package/esm/ui/NumberTextField.d.ts +2 -2
  261. package/esm/ui/NumberTextField.js +4 -2
  262. package/esm/ui/PaletteContext.d.ts +11 -9
  263. package/esm/ui/PaletteContext.js +33 -18
  264. package/esm/ui/PluginStoreCard.d.ts +3 -2
  265. package/esm/ui/PluginStoreCard.js +4 -2
  266. package/esm/ui/PopoverPicker.d.ts +3 -2
  267. package/esm/ui/PopoverPicker.js +4 -2
  268. package/esm/ui/PrerenderedCanvas.d.ts +2 -2
  269. package/esm/ui/PrerenderedCanvas.js +3 -2
  270. package/esm/ui/RedErrorMessageBox.d.ts +3 -2
  271. package/esm/ui/RedErrorMessageBox.js +4 -2
  272. package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
  273. package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
  274. package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
  275. package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
  276. package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
  277. package/esm/ui/ReplaceCurrentViewButton.js +4 -2
  278. package/esm/ui/ResizeHandle.d.ts +2 -2
  279. package/esm/ui/ResizeHandle.js +3 -2
  280. package/esm/ui/SanitizedHTML.d.ts +3 -2
  281. package/esm/ui/SanitizedHTML.js +6 -4
  282. package/esm/ui/ScrollChrome.d.ts +3 -2
  283. package/esm/ui/ScrollChrome.js +4 -2
  284. package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
  285. package/esm/ui/ScrollEdgeShadow.js +2 -2
  286. package/esm/ui/SessionJsonPanel.d.ts +3 -2
  287. package/esm/ui/SessionJsonPanel.js +4 -2
  288. package/esm/ui/ShareLinkField.d.ts +3 -2
  289. package/esm/ui/ShareLinkField.js +4 -2
  290. package/esm/ui/SingleSlider.d.ts +2 -2
  291. package/esm/ui/SingleSlider.js +4 -2
  292. package/esm/ui/SliderTooltip.d.ts +2 -1
  293. package/esm/ui/SliderTooltip.js +4 -2
  294. package/esm/ui/SnackbarContents.d.ts +3 -2
  295. package/esm/ui/SnackbarContents.js +4 -2
  296. package/esm/ui/SnackbarModel.d.ts +2 -0
  297. package/esm/ui/SnackbarModel.js +2 -0
  298. package/esm/ui/StackTraceButton.d.ts +3 -2
  299. package/esm/ui/StackTraceButton.js +4 -2
  300. package/esm/ui/StatusProgressBar.d.ts +3 -2
  301. package/esm/ui/StatusProgressBar.js +4 -2
  302. package/esm/ui/SubmitForm.d.ts +2 -1
  303. package/esm/ui/SubmitForm.js +4 -2
  304. package/esm/ui/SvgColorLegend.d.ts +3 -4
  305. package/esm/ui/SvgColorLegend.js +27 -18
  306. package/esm/ui/TagTextField.d.ts +2 -2
  307. package/esm/ui/TagTextField.js +4 -2
  308. package/esm/ui/ViewLoadingScreen.d.ts +3 -2
  309. package/esm/ui/ViewLoadingScreen.js +4 -2
  310. package/esm/ui/buildExtraTrackMenuItems.d.ts +2 -2
  311. package/esm/ui/colorScale.d.ts +5 -1
  312. package/esm/ui/colorScale.js +12 -10
  313. package/esm/ui/colors.d.ts +42 -31
  314. package/esm/ui/colors.js +85 -48
  315. package/esm/ui/filterMenuItems.d.ts +10 -31
  316. package/esm/ui/filterMenuItems.js +13 -14
  317. package/esm/ui/index.d.ts +1 -1
  318. package/esm/ui/index.js +1 -1
  319. package/esm/ui/launchTargetsMenuItem.js +9 -13
  320. package/esm/ui/legendMenuItem.d.ts +4 -4
  321. package/esm/ui/legendMenuItem.js +4 -4
  322. package/esm/ui/menuItemAdornment.d.ts +1 -1
  323. package/esm/ui/menuItemAdornment.js +1 -1
  324. package/esm/ui/menuItems.d.ts +1 -1
  325. package/esm/ui/menuItems.js +1 -1
  326. package/esm/ui/menuLabels.d.ts +2 -2
  327. package/esm/ui/menuLabels.js +2 -2
  328. package/esm/ui/multiTrackMenuItems.d.ts +2 -2
  329. package/esm/ui/palette.d.ts +2 -2
  330. package/esm/ui/palette.js +10 -10
  331. package/esm/ui/radioSubMenu.d.ts +5 -3
  332. package/esm/ui/radioSubMenu.js +2 -2
  333. package/esm/ui/rampKey.d.ts +15 -0
  334. package/esm/ui/rampKey.js +17 -0
  335. package/esm/ui/showSubMenu.d.ts +0 -5
  336. package/esm/ui/showSubMenu.js +6 -15
  337. package/esm/ui/theme.d.ts +2 -2
  338. package/esm/ui/theme.js +1 -1
  339. package/esm/ui/useAssemblySelection.d.ts +2 -0
  340. package/esm/ui/useMouseTracking.d.ts +8 -20
  341. package/esm/ui/useMouseTracking.js +23 -62
  342. package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
  343. package/esm/ui/usePlacedMenuFocus.js +28 -0
  344. package/esm/util/Base1DViewModel.d.ts +5 -3
  345. package/esm/util/Base1DViewModel.js +5 -3
  346. package/esm/util/SvgCanvas.js +1 -1
  347. package/esm/util/aggregateFieldName.d.ts +1 -10
  348. package/esm/util/aggregateFieldName.js +1 -8
  349. package/esm/util/alignedBytes.d.ts +19 -0
  350. package/esm/util/alignedBytes.js +37 -0
  351. package/esm/util/analytics.d.ts +6 -9
  352. package/esm/util/analytics.js +148 -15
  353. package/esm/util/bezierConnector.d.ts +20 -0
  354. package/esm/util/bezierConnector.js +34 -96
  355. package/esm/util/cacheBudgets.d.ts +3 -0
  356. package/esm/util/cacheBudgets.js +3 -0
  357. package/esm/util/categoricalField.d.ts +24 -4
  358. package/esm/util/categoricalField.js +38 -5
  359. package/esm/util/cellMatches.js +14 -14
  360. package/esm/util/cellsStep.d.ts +3 -5
  361. package/esm/util/cellsStep.js +31 -29
  362. package/esm/util/color/index.d.ts +1 -1
  363. package/esm/util/color/index.js +2 -2
  364. package/esm/util/color-bits/bit.js +1 -1
  365. package/esm/util/color-bits/parse.js +28 -17
  366. package/esm/util/colorBits.d.ts +15 -4
  367. package/esm/util/colorBits.js +38 -15
  368. package/esm/util/colorRamp.d.ts +3 -3
  369. package/esm/util/colorRamp.js +20 -2
  370. package/esm/util/colorScale.d.ts +123 -22
  371. package/esm/util/colorScale.js +157 -28
  372. package/esm/util/colorSchemes.d.ts +7 -3
  373. package/esm/util/colorSchemes.js +8 -2
  374. package/esm/util/createSvgRasterCanvas.d.ts +14 -1
  375. package/esm/util/createSvgRasterCanvas.js +36 -12
  376. package/esm/util/diagonalizeRegions.js +18 -9
  377. package/esm/util/featureTransforms.d.ts +2 -2
  378. package/esm/util/featureTransforms.js +85 -135
  379. package/esm/util/fileHandleStore.js +5 -0
  380. package/esm/util/groupKeys.d.ts +5 -4
  381. package/esm/util/groupKeys.js +15 -9
  382. package/esm/util/index.js +1 -1
  383. package/esm/util/installFetch.d.ts +2 -2
  384. package/esm/util/installPrerequisiteFetch.d.ts +8 -3
  385. package/esm/util/installPrerequisiteFetch.js +9 -7
  386. package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
  387. package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
  388. package/esm/util/isoformRank.d.ts +39 -0
  389. package/esm/util/isoformRank.js +118 -0
  390. package/esm/util/jexl.js +1 -1
  391. package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
  392. package/esm/util/layouts/GranularRectLayout.js +57 -34
  393. package/esm/util/leadingEdgeAutorun.d.ts +9 -1
  394. package/esm/util/leadingEdgeAutorun.js +5 -2
  395. package/esm/util/markEncoding.d.ts +10 -8
  396. package/esm/util/markEncoding.js +50 -12
  397. package/esm/util/markEncodingTypes.d.ts +77 -21
  398. package/esm/util/originCut.d.ts +14 -0
  399. package/esm/util/originCut.js +19 -0
  400. package/esm/util/paintLayer.d.ts +1 -1
  401. package/esm/util/paintLayer.js +4 -3
  402. package/esm/util/pathSeries.d.ts +18 -0
  403. package/esm/util/pathSeries.js +143 -0
  404. package/esm/util/pressOwner.d.ts +20 -0
  405. package/esm/util/pressOwner.js +26 -0
  406. package/esm/util/quantileExtent.d.ts +23 -1
  407. package/esm/util/quantileExtent.js +25 -2
  408. package/esm/util/rowStackGeometry.d.ts +1 -1
  409. package/esm/util/rowStackGeometry.js +1 -1
  410. package/esm/util/sessionActivity.d.ts +36 -0
  411. package/esm/util/sessionActivity.js +88 -0
  412. package/esm/util/stepOutputs.d.ts +165 -0
  413. package/esm/util/stepOutputs.js +201 -0
  414. package/esm/util/stepTables.d.ts +7 -3
  415. package/esm/util/stepTables.js +86 -3
  416. package/esm/util/systemColorScheme.d.ts +4 -0
  417. package/esm/util/systemColorScheme.js +21 -0
  418. package/esm/util/tabix.d.ts +1 -1
  419. package/esm/util/tabix.js +1 -1
  420. package/esm/util/temporaryAssembly.d.ts +2 -2
  421. package/esm/util/temporaryAssembly.js +2 -3
  422. package/esm/util/thresholdScale.d.ts +1 -1
  423. package/esm/util/thresholdScale.js +1 -1
  424. package/esm/util/trackConfigDelta.d.ts +1 -1
  425. package/esm/util/tracks.d.ts +25 -15
  426. package/esm/util/tracks.js +68 -44
  427. package/esm/util/types/index.d.ts +15 -7
  428. package/esm/util/types/index.js +21 -2
  429. package/esm/util/usePanZoom.js +4 -10
  430. package/esm/util/useRowVirtualScroll.d.ts +1 -0
  431. package/esm/util/windowStep.d.ts +6 -0
  432. package/esm/util/windowStep.js +153 -0
  433. package/package.json +27 -16
  434. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
  435. package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
  436. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
  437. package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
  438. package/esm/rpc/methods/CoreLoadAdapterCode.d.ts +0 -13
  439. package/esm/rpc/methods/CoreLoadAdapterCode.js +0 -16
@@ -5,42 +5,23 @@ import type { BuiltinSlotTypeName } from './configurationSlot.ts';
5
5
  import type { IAnyType, IArrayType, IOptionalIType, ISimpleType, IStateTreeNode, Instance, SnapshotOut } from '@jbrowse/mobx-state-tree';
6
6
  export type ConfigurationSchemaForModel<MODEL> = IsAny<MODEL> extends true ? AnyConfigurationSchemaType : MODEL extends IStateTreeNode<infer T> ? T extends AnyConfigurationSchemaType ? T : T extends IOptionalIType<infer INNER extends AnyConfigurationSchemaType, any> ? INNER : AnyConfigurationSchemaType : never;
7
7
  /**
8
- * A schema's definition as **stored**: the author's own entries over the ones
9
- * its `baseConfiguration` contributed, the type-level twin of
10
- * `mergeSchemaDefinition`. The base arrives already merged with its own base,
11
- * so one level here covers a chain of any depth.
12
- *
13
- * A flat mapped type over the union of both key sets, not
14
- * `Omit<BASE, keyof D> & D`: an intersection's `keyof` is a union of key sets,
15
- * and mapping over a union that includes `string` — which
16
- * `ConfigurationSchemaDefinition`'s index signature contributes — collapses
17
- * back to an index signature, which is the thing `ConfigNodeProps` exists to
18
- * get rid of.
8
+ * A schema's definition over its `baseConfiguration`'s, the type-level twin of
9
+ * `mergeSchemaDefinition`. A flat mapped type rather than
10
+ * `Omit<BASE, keyof D> & D`, which states it less clearly. ADR-145.
19
11
  */
20
12
  export type MergeConfigDef<D, BASE> = BASE extends ConfigurationSchemaType<infer BD, any> ? {
21
13
  [K in keyof BD | keyof D]: NormalizeSlotDef<K extends keyof D ? K extends keyof BD ? MergeSlotDef<BD[K], D[K]> : D[K] : K extends keyof BD ? BD[K] : never>;
22
14
  } : {
23
15
  [K in keyof D]: NormalizeSlotDef<D[K]>;
24
16
  };
25
- /**
26
- * A redeclared slot merges field-by-field over the base's; a sub-schema or a
27
- * constant keeps replace semantics, matching `mergeSchemaDefinition`'s
28
- * `isSlotDefinitionEntry` guard.
29
- */
30
17
  type MergeSlotDef<BASE_ENTRY, ENTRY> = BASE_ENTRY extends {
31
18
  type: string;
32
19
  } ? ENTRY extends {
33
20
  type: string;
34
21
  } ? Omit<BASE_ENTRY, keyof ENTRY> & ENTRY : ENTRY : ENTRY;
35
22
  /**
36
- * What the type level reads off a slot definition: the slot's `type`, a
37
- * `stringEnum`'s `model`, and whether a `defaultValue` is there at all — widened
38
- * off its literal. The description, `advanced`, `contextVariable` and the
39
- * literal default are documentation and runtime, and carrying them makes two
40
- * schemas that differ only in one of them mutually unassignable: a subclass
41
- * raising `height` from 100 to 250 stopped satisfying a parameter pinned to its
42
- * base. `SlotValueRawFromDef` re-widens a scalar default anyway, and reaches
43
- * `any` for everything else, so nothing downstream loses precision.
23
+ * Only `type`, `model` and a widened `defaultValue`: carrying a description or
24
+ * a literal default makes a subclass that changes one unassignable to its base.
44
25
  */
45
26
  type NormalizeSlotDef<E> = E extends AnyConfigurationSchemaType ? E : E extends {
46
27
  type: infer T;
@@ -58,106 +39,58 @@ type NormalizeSlotDef<E> = E extends AnyConfigurationSchemaType ? E : E extends
58
39
  type WidenDefaultValue<V> = [V] extends [boolean] ? boolean : [V] extends [string] ? string : [V] extends [number] ? number : unknown;
59
40
  type ConfigNodeValue<DEF> = IsAny<DEF> extends true ? any : DEF extends AnyConfigurationSchemaType ? DEF['Type'] : DEF extends IArrayType<any> | IOptionalIType<IArrayType<any>, any> ? DEF['Type'] : DEF extends string ? string : DEF extends number ? number : SlotValueRawFromDef<DEF>;
60
41
  /**
61
- * The slots a config node presents, read off the schema's own DEFINITION rather
62
- * than the `Record<string, any>` `makeConfigurationSchemaModel` assembles its
63
- * MST props from. Those props carry an index signature, so every
64
- * `node.anything` resolves to `any`; mapping the definition instead is what
65
- * makes `node.colorr` a compile error.
66
- *
67
- * A plain mapped type, and it has to stay one. Wrapping it in a conditional —
68
- * to answer early for a widened definition, say — makes TypeScript measure
69
- * DEFINITION as covariant instead of invariant, and it refuses a failed
70
- * covariant check on a type argument outright where a failed invariant one
71
- * falls back to comparing the two schemas structurally. Structural is the
72
- * comparison that matters: a subclass schema's node has every slot the base's
73
- * does, while its *definition* restates `defaultValue` and `description` and so
74
- * matches nothing. The widened case belongs on `AnyConfigurationModel`.
42
+ * A config node's slots, off the schema's definition, so `node.colorr` is a
43
+ * compile error (ADR-145). It must stay a plain mapped type: a conditional
44
+ * wrapper makes TypeScript refuse a subclass schema where the base is expected
45
+ * instead of comparing the two structurally.
75
46
  */
76
47
  export type ConfigNodeProps<DEFINITION> = {
77
48
  [K in keyof DEFINITION]: ConfigNodeValue<DEFINITION[K]>;
78
49
  };
79
50
  /**
80
- * The two write actions every config node carries, which `setConf` is the
81
- * spelling of. A type alias rather than an interface because it annotates the
82
- * `.actions` block: MST constrains that to `ModelActions`, an index signature
83
- * of functions, and only a type alias of an object literal gets the implicit
84
- * index signature that satisfies it.
51
+ * The two write actions under `setConf`. An alias, not an interface: only an
52
+ * alias gets the implicit index signature MST's `ModelActions` requires.
85
53
  */
86
54
  export type ConfigNodeActions = {
87
55
  setSubschema: (slotName: string, data: unknown) => unknown;
88
56
  setSlot: (slotName: string, value: unknown) => void;
89
57
  };
90
58
  /**
91
- * MST's node brand, restated. A config node carries its own schema here by
92
- * polymorphic `this`, and `ConfigurationSchemaForModel` walks it back out —
93
- * which is what every `getConf` / `readConfObject` / `setConf` slot-name
94
- * constraint hangs off, so losing it switches the read-side check off with no
95
- * error anywhere. `scripts/audit-config-read-types.ts` is the only thing that
96
- * reports that; run it after touching this.
97
- *
98
- * Structurally identical to `IStateTreeNode<IT>`, but an alias rather than an
99
- * interface: TypeScript infers an implicit index signature for an intersection
100
- * only when every constituent is an alias or a mapped type, and that is what
101
- * leaves a concrete config node — whose props are a mapped type with no index
102
- * signature of its own — assignable to `AnyConfigurationModel`.
59
+ * MST's node brand restated as an alias, which keeps a concrete node assignable
60
+ * to `AnyConfigurationModel`. It carries the schema by polymorphic `this`, and
61
+ * every slot-name check hangs off `ConfigurationSchemaForModel` walking it back
62
+ * out: run `scripts/audit-config-read-types.ts` after touching it.
103
63
  */
104
64
  export type ConfigNodeBrand<IT extends IAnyType> = {
105
65
  readonly $treenode?: any;
106
66
  readonly $__mstStateTreeNodeType__?: [IT] | [any];
107
67
  };
108
68
  /**
109
- * The identifier a schema's `explicitIdentifier` installs, folded into the
110
- * definition as if it were a declared string slot — which is what it is at
111
- * runtime, `makeConfigurationSchemaModel` just builds it from the options rather
112
- * than from the table. Folding it in rather than intersecting it onto `Type`
113
- * keeps it out of `ConfigurationSchemaType`'s parameter list: as a parameter it
114
- * reads as invariant (it lands in a `Record<K, …>` key position), which stops a
115
- * concrete schema widening to `AnyConfigurationSchemaType`. Inheritance comes
116
- * free, since `MergeConfigDef` already folds the base's whole definition in.
69
+ * The `explicitIdentifier` prop, folded into the definition as a string slot
70
+ * rather than a type parameter, which would read as invariant and stop a
71
+ * concrete schema widening to `AnyConfigurationSchemaType`.
117
72
  */
118
73
  export interface IdentifierSlotDef {
119
74
  type: 'string';
120
75
  defaultValue: '';
121
76
  }
122
- /**
123
- * The `type` prop an `explicitlyTyped` schema installs, folded into the
124
- * definition the same way and for the same reasons. Separate from
125
- * `IdentifierSlotDef` despite the identical shape, because the runtime prop is
126
- * `types.literal(modelName)` and this is where that would be said if the model
127
- * name ever became a type parameter.
128
- */
77
+ /** An `explicitlyTyped` schema's `type` prop, folded in the same way. */
129
78
  export interface TypeSlotDef {
130
79
  type: 'string';
131
80
  defaultValue: '';
132
81
  }
133
82
  export type ConfigurationSlotName<SCHEMA> = IsAny<SCHEMA> extends true ? string : SCHEMA extends ConfigurationSchemaType<infer D, any> ? keyof D & string : never;
134
83
  /**
135
- * The names a config snapshot for `SCHEMA` may use — its own slots, its
136
- * sub-schemas recursively, its identifier and everything it inherits — with
137
- * every value left `unknown`.
138
- *
139
- * Names are the whole point of it. A slot value can be its own type, a `jexl:`
140
- * callback string, or (for a `maybe*` slot) absent, and nothing here tries to
141
- * check that; a *name* the schema does not declare is dropped on the way in
142
- * without a word, so `preferance` is a setting that reads as applied and never
143
- * applies. Against an object literal — which is how an embedder writes one —
144
- * TypeScript's excess-property check turns that into a compile error.
84
+ * The names a config snapshot for `SCHEMA` may use, sub-schemas included, with
85
+ * every value `unknown`. MST drops an undeclared name silently; against an
86
+ * object literal, the excess-property check makes it a compile error.
145
87
  */
146
88
  export type ConfigurationSnapshot<SCHEMA> = SCHEMA extends undefined ? never : SCHEMA extends ConfigurationSchemaType<infer D, any> ? {
147
89
  [K in keyof D]?: D[K] extends ConfigurationSchemaType<any, any> ? ConfigurationSnapshot<D[K]> : unknown;
148
90
  } : unknown;
149
91
  /**
150
- * The value each builtin slot `type` reads as — the type-level twin of
151
- * `slotTypes` in `configurationSlot.ts`, which is the same list as MST models.
152
- * A table rather than the fourteen-deep conditional staircase this used to be:
153
- * adding a slot type is now one row here and one there, and the two tables sit
154
- * side by side where a name present in one and missing from the other is
155
- * visible. Missing a row is not silent either — it drops the slot to the
156
- * `defaultValue` fallback below, which is what `SlotValueRawFromDef` documents.
157
- *
158
- * `stringEnum`/`maybeStringEnum` are deliberately absent: their value type comes
159
- * from the author's own `types.enumeration`, read off `model` before this table
160
- * is consulted.
92
+ * What each builtin slot type reads as, beside `slotTypes` in
93
+ * `configurationSlot.ts`. The enum types read their members off `model`.
161
94
  */
162
95
  interface SlotValueByType {
163
96
  stringArray: string[];
@@ -171,15 +104,7 @@ interface SlotValueByType {
171
104
  maybeBoolean: boolean | undefined;
172
105
  maybeColor: string | undefined;
173
106
  maybeString: string | undefined;
174
- /**
175
- * `frozen` and its `maybe*` form are `any` deliberately — arbitrary dynamic
176
- * JSON whose shape the caller asserts at the read boundary. `unknown` would
177
- * only add cast ceremony on values that are legitimately dynamic.
178
- *
179
- * Stated here rather than left to the `defaultValue` fallback, which reaches
180
- * `any` for these only by accident: no `frozen` slot in the repo happens to
181
- * default to a scalar.
182
- */
107
+ /** arbitrary JSON, whose shape the caller asserts where it reads it */
183
108
  frozen: any;
184
109
  maybeFrozen: any;
185
110
  number: number;
@@ -191,19 +116,6 @@ interface SlotValueByType {
191
116
  color: string;
192
117
  colorArray: string[];
193
118
  }
194
- /**
195
- * The two tables name the same builtin slot types, checked rather than
196
- * remembered.
197
- *
198
- * A row present in one and missing from the other is otherwise **not** an
199
- * error: the slot drops through to `SlotValueRawFromDef`'s `defaultValue`
200
- * fallback, which re-widens a scalar default but reaches `any` for everything
201
- * else — so a new `stringArray`-shaped type would silently read as `any` at
202
- * every call site. The "every builtin slot type reads as its declared value
203
- * type" case in `configTypeNarrowing.test.ts` lists the rows by hand, so it
204
- * only catches the drift if whoever adds the type also edits the test; this
205
- * catches it either way.
206
- */
207
119
  type MutuallyExtends<A, B> = [A] extends [B] ? [B] extends [A] ? true : false : false;
208
120
  type Assert<T extends true> = T;
209
121
  export type SlotValueTableCoversBuiltinSlotTypes = Assert<MutuallyExtends<BuiltinSlotTypeName, keyof SlotValueByType>>;
@@ -225,14 +137,10 @@ type SubSchemaSlotPath<SCHEMA> = SCHEMA extends ConfigurationSchemaType<infer D,
225
137
  } ? readonly [K, ...string[]] : never;
226
138
  }[keyof D & string] : readonly string[];
227
139
  /**
228
- * The array paths a read may take into `SCHEMA`. Past one segment each is
229
- * checked: a sub-schema's name, then one of its slot names or a deeper path. A
230
- * head naming something other than a sub-schema — a pluggable adapter union, an
231
- * array or map of sub-schemas, a `frozen` slot — keeps an unchecked tail, and a
232
- * widened schema admits any `string[]`.
233
- *
234
- * A one-segment path stays unchecked: it is how a generic class body, where
235
- * `SCHEMA` is unresolved, reads a slot at all (`FastaAdapterBase`).
140
+ * The array paths a read may take into `SCHEMA`, checked segment by segment
141
+ * through sub-schemas. A pluggable union, a collection or a `frozen` slot keeps
142
+ * an unchecked tail. A one-segment path stays unchecked, since a generic class
143
+ * body with `SCHEMA` unresolved reads a slot that way (`FastaAdapterBase`).
236
144
  */
237
145
  export type ConfigurationSlotPath<SCHEMA> = readonly [] | readonly [string] | SubSchemaSlotPath<SCHEMA>;
238
146
  /** what a read of `PATH` into `SCHEMA` yields */
@@ -243,17 +151,8 @@ export type ConfigurationSlotPathValue<SCHEMA, PATH> = PATH extends readonly [
243
151
  /** what a raw read (`getConf` / `readConfObject`) of this slot yields */
244
152
  export type ConfigurationSlotValue<SCHEMA, K extends string> = SCHEMA extends ConfigurationSchemaType<infer D, any> ? K extends keyof D ? SlotValueRawFromDef<D[K]> : any : any;
245
153
  /**
246
- * Naming convention for config types, paired per schema:
247
- * - `XConfigSchema` is the MST IType (the schema itself). Use it for
248
- * `getConf`, `ConfigurationReference`, and factory params — anywhere a schema
249
- * is expected.
250
- * - `XConfigModel` is `Instance<XConfigSchema>` (a resolved config node). Use it
251
- * for `readConfObject` results, model fields, and values read off a session.
252
- *
253
- * Prefer a named `XConfigModel` alias over inlining `Instance<XConfigSchema>` at
254
- * call sites. Two historical names predate this convention and stay as-is:
255
- * `BaseTrackConfig` (the track instance type) and `AnyConfiguration` (a
256
- * model-or-snapshot union, not a plain instance).
154
+ * Naming: `XConfigSchema` is the schema (an MST type), for factory params and
155
+ * `ConfigurationReference`; `XConfigModel` is `Instance<XConfigSchema>`, a node.
257
156
  */
258
157
  export type AnyConfigurationSchemaType = ConfigurationSchemaType<any, any>;
259
158
  export type AnyConfigurationModel = Instance<AnyConfigurationSchemaType> & Record<string, any>;
@@ -266,22 +165,11 @@ export interface PluggableConfigNode extends AnyConfigurationModel {
266
165
  type: string;
267
166
  }
268
167
  /**
269
- * The `XConfigModel` for a **field table** — a `*ConfigSchemaFields` export —
270
- * rather than for a whole assembled schema. What it is for is the cast a
271
- * cross-cutting mixin uses to reach the `configuration` its composing display
272
- * supplies but its own `self` cannot see: cast to `AnyConfigurationModel` there
273
- * and `getConf`/`setConf` derive their slot-name constraint from a schema
274
- * widened to `any`, so every name typechecks and a misspelled *read* returns
275
- * `undefined` with no diagnostic at any layer. Name the mixin's own field table
276
- * instead and the check comes back, scoped to exactly the slots that mixin owns.
277
- *
278
- * `BASE` is for the mixin that also reads a slot off the schema its displays
279
- * inherit from — `ConfigurationSlotName` walks the base chain, so passing it
280
- * admits those names too and nothing else (`HeightModeMixin` and `height`).
281
- *
282
- * The pairing this depends on is a mixin and its field table living together:
283
- * `RowHeightMixin` + `rowHeightConfigSchemaFields` is the worked example, and
284
- * `packages/tree-sidebar/CLAUDE.md` has the reasoning.
168
+ * The node type for a mixin's field table (a `*ConfigSchemaFields` export), for
169
+ * the cast a mixin uses to reach its host's `configuration`. A cast to
170
+ * `AnyConfigurationModel` there checks no slot name, so a misspelled read
171
+ * returns `undefined` silently. `BASE` admits the slots of the schema the
172
+ * mixin's displays inherit (`HeightModeMixin`'s `height`).
285
173
  */
286
174
  export type ConfigModelForFields<FIELDS extends ConfigurationSchemaDefinition, BASE extends AnyConfigurationSchemaType | undefined = undefined> = Instance<ConfigurationSchemaType<MergeConfigDef<FIELDS, BASE>, ConfigurationSchemaOptions<BASE, undefined>>>;
287
175
  /**
@@ -292,11 +180,8 @@ export type ConfigModelForFields<FIELDS extends ConfigurationSchemaDefinition, B
292
180
  * const pin: HostChecksSlotNames<HeightModeHost> = true
293
181
  * ```
294
182
  *
295
- * Worth a named type because the widened form has **no symptom** — a mixin host
296
- * cast to `AnyConfigurationModel` compiles and runs and checks nothing. Every
297
- * misspelled slot name below it typechecks, and a misspelled *read* returns
298
- * `undefined` with no diagnostic at any layer, so only a sabotage or this
299
- * assertion tells the two apart.
183
+ * The widened form has no symptom: a host cast to `AnyConfigurationModel`
184
+ * compiles, runs and checks nothing.
300
185
  */
301
186
  export type HostChecksSlotNames<HOST extends {
302
187
  configuration: AnyConfigurationModel;
@@ -305,12 +190,28 @@ export type HostChecksSlotNames<HOST extends {
305
190
  export type AnyConfigurationSnapshot = SnapshotOut<AnyConfigurationModel>;
306
191
  /**
307
192
  * A value readable as configuration: either a live configuration model or a
308
- * plain snapshot of one. `session.tracks` holds plain base or merged configs
309
- * that hydrate to MST only on first reference access, `getTrackById` also
310
- * answers live assembly-sequence and connection nodes, and `readConfObject`
311
- * reads both — so this is the honest type at those boundaries. Reserve
312
- * `AnyConfigurationModel` for values that must be live (actions, identity,
313
- * reference resolution).
193
+ * plain snapshot of one, such as a config a caller hands to an add action.
194
+ * Reserve `AnyConfigurationModel` for values that must be live (actions,
195
+ * identity, reference resolution).
314
196
  */
315
197
  export type AnyConfiguration = AnyConfigurationModel | AnyConfigurationSnapshot;
198
+ /**
199
+ * A track config as `jbrowse.tracks` and `session.tracks` hold it: a frozen
200
+ * plain object, which hydrates to a config node only when a track reads its
201
+ * `configuration`. It holds what was written, so a slot at its default is
202
+ * absent. `readConfObject` refuses one for that reason; read `trackId` and
203
+ * `type` off it directly, and a slot through a helper that supplies the
204
+ * default, such as `getConfAssemblyNamesOrNone`.
205
+ */
206
+ export interface TrackConfigEntry {
207
+ trackId: string;
208
+ type: string;
209
+ [key: string]: unknown;
210
+ }
211
+ /**
212
+ * What `getTrackById` answers: a {@link TrackConfigEntry}, or a live node for
213
+ * an assembly's sequence track or a track a connection holds. A raw member
214
+ * read works on both, and finds a slot at its default only on the node.
215
+ */
216
+ export type AnyTrackConfig = TrackConfigEntry | AnyConfigurationModel;
316
217
  export {};
@@ -19,6 +19,13 @@ export declare class BaseAdapter<CONF extends AnyConfigurationModel = AnyConfigu
19
19
  readonly sequenceAdapterConfig?: Record<string, unknown>;
20
20
  static capabilities: string[];
21
21
  constructor(config?: CONF, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager, sequenceAdapterConfig?: Record<string, unknown>);
22
+ /**
23
+ * Called once, when the last session holding this adapter lets go and
24
+ * dataAdapterCache drops it. An adapter whose library keeps parsed data
25
+ * clears it here, so the memory and its charge to the shared budget in
26
+ * cacheBudgets go back now rather than when the collector takes the cache.
27
+ */
28
+ freeResources(): void;
22
29
  /** shorthand for `readConfObject(this.config, arg)` */
23
30
  getConf<const SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONF>> | ConfigurationSlotPath<ConfigurationSchemaForModel<CONF>> = ConfigurationSlotName<ConfigurationSchemaForModel<CONF>>>(arg: SLOT, args?: Record<string, unknown>): SLOT extends string ? ConfigurationSlotValue<ConfigurationSchemaForModel<CONF>, SLOT> : ConfigurationSlotPathValue<ConfigurationSchemaForModel<CONF>, SLOT>;
24
31
  }
@@ -25,6 +25,13 @@ export class BaseAdapter {
25
25
  this.sequenceAdapterConfig = sequenceAdapterConfig;
26
26
  this.id = getAdapterId(config);
27
27
  }
28
+ /**
29
+ * Called once, when the last session holding this adapter lets go and
30
+ * dataAdapterCache drops it. An adapter whose library keeps parsed data
31
+ * clears it here, so the memory and its charge to the shared budget in
32
+ * cacheBudgets go back now rather than when the collector takes the cache.
33
+ */
34
+ freeResources() { }
28
35
  /** shorthand for `readConfObject(this.config, arg)` */
29
36
  getConf(arg, args) {
30
37
  return readConfObject(this.config, arg, args);
@@ -3,7 +3,6 @@ import type { AnyConfigurationModel } from '../../configuration/index.ts';
3
3
  import type { FeatureTable } from '../../util/featureTable.ts';
4
4
  import type { Feature } from '../../util/simpleFeature.ts';
5
5
  import type { AugmentedRegion as Region } from '../../util/types/index.ts';
6
- import type { FeatureDensity } from './featureDensity.ts';
7
6
  import type { BaseOptions, ZoomRange } from './types.ts';
8
7
  import type { Observable } from 'rxjs';
9
8
  /**
@@ -101,16 +100,6 @@ export declare abstract class BaseFeatureDataAdapter<CONF extends AnyConfigurati
101
100
  * @returns Whether data source has data for the given reference name
102
101
  */
103
102
  hasDataForRefName(refName: string, opts?: BaseOptions): Promise<boolean>;
104
- /**
105
- * Calculates the minimum score, maximum score, and other statistics from
106
- * features over a region, primarily used for quantitative tracks
107
- */
108
- getRegionQuantitativeStats(region: Region, opts?: BaseOptions): Promise<import("../../util/stats.ts").RectifiedQuantitativeStats>;
109
- /**
110
- * Calculates the minimum score, maximum score, and other statistics from
111
- * features over multiple regions, primarily used for quantitative tracks
112
- */
113
- getMultiRegionQuantitativeStats(regions?: Region[], opts?: BaseOptions): Promise<import("../../util/stats.ts").RectifiedQuantitativeStats>;
114
103
  /**
115
104
  * Cheap upper bound on the compressed bytes a fetch of `regions` would pull,
116
105
  * derived from an index without downloading or parsing any features. The
@@ -144,17 +133,6 @@ export declare abstract class BaseFeatureDataAdapter<CONF extends AnyConfigurati
144
133
  * for skew.
145
134
  */
146
135
  getValueDomain(_opts?: BaseOptions): Promise<[number, number] | undefined>;
147
- /**
148
- * Features per bin over each region, at the view's `bpPerPx`, for the density
149
- * tier the display draws where the region-too-large gate refused the
150
- * features. The default reads the `densityAdapter` sidecar slot
151
- * (`densityAdapterConfigSchemaFields`) through `getSubAdapter`; `undefined`
152
- * means no tier, and the banner stands. ADR-102 records why no index
153
- * estimate stands in for a missing sidecar.
154
- */
155
- getFeatureDensity(regions: Region[], opts: BaseOptions & {
156
- bpPerPx: number;
157
- }): Promise<FeatureDensity[] | undefined>;
158
136
  getSources(regions: Region[], opts?: BaseOptions): Promise<{
159
137
  name: string;
160
138
  color?: string;
@@ -2,11 +2,7 @@ import { firstValueFrom, merge } from 'rxjs';
2
2
  import { toArray } from 'rxjs/operators';
3
3
  import { asTable } from '../../util/featureTable.js';
4
4
  import { createStatusFanOut } from '../../util/progress.js';
5
- import { blankStats, scoresToStats } from '../../util/stats.js';
6
5
  import { BaseAdapter } from './BaseAdapter.js';
7
- import { isSubAdapterConfig } from './featureDensity.js';
8
- import { aggregateQuantitativeStats } from './stats.js';
9
- import { isFeatureAdapter } from './util.js';
10
6
  /**
11
7
  * Base class for feature adapters to extend. Defines some methods that
12
8
  * subclasses must implement.
@@ -83,25 +79,6 @@ export class BaseFeatureDataAdapter extends BaseAdapter {
83
79
  const refNames = await this.getRefNames(opts);
84
80
  return refNames.includes(refName);
85
81
  }
86
- /**
87
- * Calculates the minimum score, maximum score, and other statistics from
88
- * features over a region, primarily used for quantitative tracks
89
- */
90
- async getRegionQuantitativeStats(region, opts) {
91
- const feats = this.getFeatures(region, opts);
92
- return scoresToStats(region, feats);
93
- }
94
- /**
95
- * Calculates the minimum score, maximum score, and other statistics from
96
- * features over multiple regions, primarily used for quantitative tracks
97
- */
98
- async getMultiRegionQuantitativeStats(regions = [], opts) {
99
- if (!regions.length) {
100
- return blankStats();
101
- }
102
- const stats = await Promise.all(regions.map(region => this.getRegionQuantitativeStats(region, opts)));
103
- return aggregateQuantitativeStats(stats);
104
- }
105
82
  /**
106
83
  * Cheap upper bound on the compressed bytes a fetch of `regions` would pull,
107
84
  * derived from an index without downloading or parsing any features. The
@@ -141,38 +118,6 @@ export class BaseFeatureDataAdapter extends BaseAdapter {
141
118
  async getValueDomain(_opts) {
142
119
  return undefined;
143
120
  }
144
- /**
145
- * Features per bin over each region, at the view's `bpPerPx`, for the density
146
- * tier the display draws where the region-too-large gate refused the
147
- * features. The default reads the `densityAdapter` sidecar slot
148
- * (`densityAdapterConfigSchemaFields`) through `getSubAdapter`; `undefined`
149
- * means no tier, and the banner stands. ADR-102 records why no index
150
- * estimate stands in for a missing sidecar.
151
- */
152
- async getFeatureDensity(regions, opts) {
153
- const sidecar = this.getConf(['densityAdapter']);
154
- const resolved = isSubAdapterConfig(sidecar) && this.getSubAdapter
155
- ? (await this.getSubAdapter(sidecar)).dataAdapter
156
- : undefined;
157
- if (resolved && !isFeatureAdapter(resolved)) {
158
- throw new Error(`densityAdapter ${isSubAdapterConfig(sidecar) ? sidecar.type : ''} is not a feature adapter`);
159
- }
160
- return resolved
161
- ? Promise.all(regions.map(async (region) => {
162
- const features = await resolved.getFeaturesArray(region, opts);
163
- const starts = new Uint32Array(features.length);
164
- const ends = new Uint32Array(features.length);
165
- const scores = new Float32Array(features.length);
166
- features.forEach((feature, i) => {
167
- const score = feature.get('score');
168
- starts[i] = feature.get('start');
169
- ends[i] = feature.get('end');
170
- scores[i] = score === undefined ? 0 : score;
171
- });
172
- return { starts, ends, scores };
173
- }))
174
- : undefined;
175
- }
176
121
  async getSources(regions, opts = {}) {
177
122
  const features = await this.getFeaturesInMultipleRegionsArray(regions, opts);
178
123
  const sources = new Set();
@@ -8,7 +8,6 @@ export type { BaseOptions, BaseTextSearchArgs, LodTier, SearchType, ZoomRange, }
8
8
  export { BaseAdapter } from './BaseAdapter.ts';
9
9
  export { cachedSetup } from '../../util/cachedSetup.ts';
10
10
  export { BaseFeatureDataAdapter } from './BaseFeatureDataAdapter.ts';
11
- export { type FeatureDensity, densityAdapterConfigSchemaFields, isSubAdapterConfig, } from './featureDensity.ts';
12
11
  export { BaseSequenceAdapter } from './BaseSequenceAdapter.ts';
13
12
  export type { BaseTextSearchAdapter } from './BaseTextSearchAdapter.ts';
14
13
  export type { Alias, BaseRefNameAliasAdapter, } from './BaseRefNameAliasAdapter.ts';
@@ -2,5 +2,4 @@ export { isFeatureAdapter, isRefNameAliasAdapter, isRegionsAdapter, isSequenceAd
2
2
  export { BaseAdapter } from './BaseAdapter.js';
3
3
  export { cachedSetup } from '../../util/cachedSetup.js';
4
4
  export { BaseFeatureDataAdapter } from './BaseFeatureDataAdapter.js';
5
- export { densityAdapterConfigSchemaFields, isSubAdapterConfig, } from './featureDensity.js';
6
5
  export { BaseSequenceAdapter } from './BaseSequenceAdapter.js';
@@ -2,7 +2,7 @@ import type { BaseOptions } from './types.ts';
2
2
  /**
3
3
  * #api
4
4
  * One row an adapter lists: `name` is a value of the listing's field, and
5
- * `label` and `color` are what the adapter names and colours that row with.
5
+ * `label` and `color` are what the adapter names and colors that row with.
6
6
  */
7
7
  export interface ListedRowSource {
8
8
  name: string;
@@ -13,7 +13,7 @@ export interface ListedRowSource {
13
13
  * #api
14
14
  * Every row an adapter has, in its own order, whatever the loaded regions hold,
15
15
  * so a row display gives a row with nothing in view its place, label and
16
- * colour.
16
+ * color.
17
17
  */
18
18
  export interface RowSourceListing {
19
19
  /** The feature field the listed names are values of: `source` on a multi-BigWig, `alignments` on a MAF, whose per-species record is keyed by them. */
@@ -7,6 +7,7 @@ export interface BaseOptions {
7
7
  sessionId?: string;
8
8
  statusCallback?: StatusCallback;
9
9
  notices?: string[];
10
+ facts?: Record<string, unknown>;
10
11
  headers?: Record<string, string>;
11
12
  assemblyName?: string;
12
13
  lodMode?: LodTier;
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * #config CytobandAdapter
3
+ * Reads an assembly's cytoband file, which the linear genome view draws as
4
+ * ideogram banding in its overview bar.
3
5
  *
4
6
  * #example
5
7
  * Goes on an ASSEMBLY, under `cytobands` — not on a track. It draws the
@@ -1,6 +1,8 @@
1
1
  import { ConfigurationSchema, expandUriShorthand, } from '../../configuration/index.js';
2
2
  /**
3
3
  * #config CytobandAdapter
4
+ * Reads an assembly's cytoband file, which the linear genome view draws as
5
+ * ideogram banding in its overview bar.
4
6
  *
5
7
  * #example
6
8
  * Goes on an ASSEMBLY, under `cytobands` — not on a track. It draws the
@@ -37,6 +39,9 @@ const configSchema = ConfigurationSchema('CytobandAdapter', {
37
39
  },
38
40
  }, {
39
41
  explicitlyTyped: true,
42
+ closed: true,
43
+ // desktop's open-sequence dialog wrote the plural through v4.3
44
+ retired: { cytobandsLocation: cytobandLocation => ({ cytobandLocation }) },
40
45
  /**
41
46
  * #preProcessSnapshot
42
47
  *
@@ -38,20 +38,19 @@ export type getSubAdapterType = (adapterConfigSnap: ConfigSnap) => ReturnType<ty
38
38
  * other session still claims. Reached from the CoreFreeResources RPC when the
39
39
  * last track using an adapter config closes.
40
40
  *
41
- * Deleting the key is the whole reclamation: the cache is the only strong
42
- * reference to an adapter, so once it goes the instance and everything it holds
43
- * — a whole parsed GFF3, a BAM chunk cache — become unreachable and are
44
- * collected normally. There is nothing to free by hand.
41
+ * Deleting the key makes the instance unreachable from here, and for most
42
+ * adapters that is the whole reclamation: a parsed GFF3 goes with it.
45
43
  *
46
- * "Collected normally" is not the same as "collected now", and for the indexed
47
- * adapters it is not even soon. @gmod/bam, @gmod/cram and @gmod/tabix each hold
48
- * their parsed chunks in a SharedReadCache that sweeps itself on a setInterval,
49
- * and a pending timer is a GC root — so the instance stays reachable through its
50
- * own sweep timer until that sweep empties the cache and stops itself, three
51
- * minutes later. Measured: closing a panned alignments track reclaims nothing at
52
- * the time it happens, and the worker falls from 296 MB to 7 MB four minutes on.
53
- * Deleting the key is still the only thing to do here; just don't read a heap
54
- * immediately after a close and conclude this did nothing.
44
+ * The indexed adapters are the exception, which is why an evicted adapter is
45
+ * also told so (`freeResources`). @gmod/bam, @gmod/cram and @gmod/tabix each
46
+ * hold their parsed chunks in a SharedReadCache charged to the shared budget,
47
+ * and the budget credits a dropped cache back only once the collector has
48
+ * taken it. A run that opens and closes a track per image has no GC to wait
49
+ * for. `jb2export batch` drew a callset from CRAM slices of long reads at
50
+ * about a record every two seconds, and before @gmod/shared-read-cache 2.1 two
51
+ * of its four processes reached the 4 GB heap limit 135 s in, with the budget
52
+ * at 3,100 MB against its 1,024 MB limit: the budget left each of 54 caches
53
+ * its last entry. 2.1 keeps one entry per budget instead.
55
54
  *
56
55
  * The refcount is what makes this safe to call on any track close: an adapter
57
56
  * pulled in as a sub-adapter carries its parent's sessionId (getSubAdapter
@@ -61,5 +60,18 @@ export type getSubAdapterType = (adapterConfigSnap: ConfigSnap) => ReturnType<ty
61
60
  export declare function freeAdapterResources(args: {
62
61
  sessionId?: string;
63
62
  }): Promise<void>;
63
+ /** How many adapter requests the cache has answered. */
64
+ export declare function adapterRequests(): number;
65
+ /**
66
+ * Evict every cached adapter `keep` declines, each told to free what it holds,
67
+ * whatever sessions claim it. `keep` sees the settled adapters most recently
68
+ * requested first, each with the {@link adapterRequests} count at its latest
69
+ * request. For a host with no tracks to close, such as `@jbrowse/tables`,
70
+ * which would otherwise keep an adapter, its parsed index and its share of the
71
+ * decoded-bytes budget for every file it ever read.
72
+ */
73
+ export declare function keepAdapters(keep: (dataAdapter: AnyDataAdapter, lastRequest: number) => boolean): Promise<void>;
74
+ /** How many adapters the cache holds, failed and pending ones included. */
75
+ export declare function cachedAdapterCount(): number;
64
76
  export declare function clearAdapterCache(): void;
65
77
  export {};