@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
@@ -14,7 +14,7 @@ export { mergeFormatCallbacks } from './mergeFormatCallbacks.js';
14
14
  export { evaluateForFeature, readConfObject, readConfigValue, } from './readConfObject.js';
15
15
  export { applyConfSettings, getConf, setConf } from './getConf.js';
16
16
  export { fillLocations } from './fillLocations.js';
17
- export { applyRetiredSpellings, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, } from './snapshotPreprocess.js';
17
+ export { applyRetiredSpellings, declaredSnapshot, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.js';
18
18
  export { shorthandTargets, shorthandTargetsOf } from './schemaTypes.js';
19
19
  export { requirementProblems } from './requirements.js';
20
20
  export { expandTabixShorthand, indexSnapshot, requestedIndexType, tabixIndexSnapshot, } from './tabixShorthand.js';
@@ -60,8 +60,8 @@ export declare function liftPlot(conf: AnyConfigurationModel, draft: Plot): AnyC
60
60
  */
61
61
  export declare function plotWrites(conf: AnyConfigurationModel, draft: Plot): Record<string, unknown>;
62
62
  /**
63
- * What a lifted plot's colour objects and `scales.y` say together that the
64
- * display cannot draw as written, as corner-notice lines: each colour object
63
+ * What a lifted plot's color objects and `scales.y` say together that the
64
+ * display cannot draw as written, as corner-notice lines: each color object
65
65
  * under its schema's `fieldPresets`, as `jbrowse validate` judges it.
66
66
  */
67
67
  export declare function schemaPlotProblems(lifted: AnyConfigurationModel): string[];
@@ -1,9 +1,10 @@
1
1
  import { getSnapshot, getType, isArrayType, isStateTreeNode, } from '@jbrowse/mobx-state-tree';
2
2
  import { compareStructural } from 'mobx';
3
- import { colorProblems, colorSlotsOf, noticeLines, scaleEndProblems, scaleEndsOf, } from '../util/colorScale.js';
3
+ import { colorProblems, colorSlotsOf, noticeLines, scaleEndProblems, scaleEndsOf, withImpliedField, } from '../util/colorScale.js';
4
4
  import { readConfObject } from './readConfObject.js';
5
5
  import { getConfigurationSchemaMetadata } from './schemaRegistry.js';
6
6
  import { bareFormOf, shorthandTargets } from './schemaTypes.js';
7
+ import { refusingUndeclaredKeys } from './snapshotPreprocess.js';
7
8
  /**
8
9
  * #api core/configuration
9
10
  * The grammar's settings, by the slot name every display that has one gives
@@ -11,22 +12,30 @@ import { bareFormOf, shorthandTargets } from './schemaTypes.js';
11
12
  * display's `plot`. A display's plot is the ones its config declares
12
13
  * (`plotKeysOf`).
13
14
  */
15
+ // The multi-row display's `rowGroups` is not here yet; it joins when "Edit
16
+ // plot..." should show the row grouping.
14
17
  export const PLOT_VOCABULARY = {
15
18
  marks: 'the marks drawn in order, each a mark and an encoding',
19
+ mark: 'the shape each value is drawn as: a bar, a point, a line or a span',
20
+ interpolate: 'the path a line takes between values: held across each bin, or centre to centre',
21
+ aggregate: 'the stored zoom-bin summary drawn: mean, min or max',
22
+ extent: "the span drawn around each bin's aggregate: its min to max, or none",
16
23
  transform: 'the steps run over the features before any mark',
17
- unit: 'what one row stands for: a read or a chain, a sample or a haplotype',
24
+ unit: 'the unit one row draws: a read or a chain, a sample or a haplotype',
18
25
  facet: 'one section per value of a field',
26
+ sort: 'the order the rows stack in: one over the whole window, or by a column at one base',
19
27
  rows: 'the rows: their field or order, labels, focus and tree',
20
- rowColor: 'the colour of each row, by a row attribute',
21
- color: 'the colour',
28
+ rowColor: 'the color of each row, by a row attribute',
29
+ color: 'the color',
22
30
  baseColor: 'the per-base layer over the reads',
23
- arcColor: 'the colour of the arcs between mates',
24
- ribbonColor: 'the colour of the ribbons between lanes',
31
+ arcColor: 'the color of the arcs between mates',
32
+ ribbonColor: 'the color of the ribbons between lanes',
25
33
  laneLayers: 'the layers drawn over each lane',
26
34
  scales: 'the axes, scales.y the value axis',
27
- y: "what each row's bar height carries",
28
- filter: 'the jexl: expressions a feature has to pass',
29
- filterBy: 'the read flags and tags a read has to pass',
35
+ y: 'the field plotted on the value axis',
36
+ size: "a point's diameter or a line's width, in px",
37
+ origin: 'the value bars grow from',
38
+ filter: 'the tests a feature has to pass: jexl: expressions, or on an alignments display the read flags, name, tags and categories',
30
39
  };
31
40
  const LIFT_ID = 'plotLift';
32
41
  /**
@@ -120,10 +129,10 @@ function merged(draft, current) {
120
129
  */
121
130
  export function liftPlot(conf, draft) {
122
131
  checkKeys(draft, plotKeysOf(conf));
123
- return getType(conf).create({
132
+ return refusingUndeclaredKeys(() => getType(conf).create({
124
133
  displayId: LIFT_ID,
125
134
  ...structuredClone(merged(draft, plotOf(conf))),
126
- });
135
+ }));
127
136
  }
128
137
  /**
129
138
  * #api core/configuration
@@ -140,7 +149,7 @@ export function plotWrites(conf, draft) {
140
149
  if (value === undefined || compareStructural(lifted[key], current[key])) {
141
150
  continue;
142
151
  }
143
- writes[key] = lifted[key] ?? null;
152
+ writes[key] = value === null ? null : (lifted[key] ?? null);
144
153
  }
145
154
  return writes;
146
155
  }
@@ -148,24 +157,29 @@ function subConfOf(conf, key) {
148
157
  const member = conf[key];
149
158
  return isStateTreeNode(member) ? member : undefined;
150
159
  }
160
+ // `value` raw, as `colorSettingOf` reads it: a `jexl:` constant is a constant
161
+ // to judge, never a callback to evaluate here.
151
162
  function membersOf(node) {
152
- return (name) => readConfObject(node, name);
163
+ return (name) => name === 'value'
164
+ ? node.value
165
+ : readConfObject(node, name);
153
166
  }
154
167
  /**
155
- * What a lifted plot's colour objects and `scales.y` say together that the
156
- * display cannot draw as written, as corner-notice lines: each colour object
168
+ * What a lifted plot's color objects and `scales.y` say together that the
169
+ * display cannot draw as written, as corner-notice lines: each color object
157
170
  * under its schema's `fieldPresets`, as `jbrowse validate` judges it.
158
171
  */
159
172
  export function schemaPlotProblems(lifted) {
160
173
  return plotKeysOf(lifted).flatMap(key => {
161
174
  const node = subConfOf(lifted, key);
162
- const presets = node
163
- ? getConfigurationSchemaMetadata(node)?.options.fieldPresets
175
+ const options = node
176
+ ? getConfigurationSchemaMetadata(node)?.options
164
177
  : undefined;
178
+ const presets = options?.fieldPresets;
165
179
  const y = key === 'scales' && node ? subConfOf(node, 'y') : undefined;
166
180
  return [
167
181
  ...(node && presets
168
- ? noticeLines(key, colorProblems(colorSlotsOf(membersOf(node)), presets))
182
+ ? noticeLines(key, colorProblems(withImpliedField(colorSlotsOf(membersOf(node)), options.impliedField), presets))
169
183
  : []),
170
184
  ...(y
171
185
  ? noticeLines('scales.y', scaleEndProblems(scaleEndsOf(membersOf(y))))
@@ -11,8 +11,6 @@ export interface ConfigurationSchemaMetadata {
11
11
  * i.e. with any `baseConfiguration`'s hooks already composed in
12
12
  */
13
13
  options: MergedConfigurationSchemaOptions<any, any>;
14
- /** the frozen-family slots, the only members a snapshot's `null` is stored in */
15
- storesNull: ReadonlySet<string>;
16
14
  /** the `featureField` slots, which the reader hands over as written */
17
15
  featureFields: ReadonlySet<string>;
18
16
  /** the slots that refuse a `jexl:` string: every one but a callback and a featureField */
@@ -5,7 +5,7 @@ import { slotWriteRefusal } from './configurationSlot.js';
5
5
  import { setConf } from './getConf.js';
6
6
  import { getConfigurationSchemaDefinition, getConfigurationSchemaMetadata, } from './schemaRegistry.js';
7
7
  import { isConfigurationSchemaType, isSlotDefinitionEntry, } from './schemaTypes.js';
8
- import { preProcessSnapshotWith } from './snapshotPreprocess.js';
8
+ import { preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.js';
9
9
  /**
10
10
  * The slot's metadata entry, or undefined when `slotName` names a nested
11
11
  * sub-schema or a string/number constant rather than a slot.
@@ -42,7 +42,7 @@ export function slotValueRefusal(schema, key, value) {
42
42
  try {
43
43
  const lifted = preProcessSnapshotWith(meta, { [key]: value })[key];
44
44
  if (subSchema) {
45
- subSchema.create(lifted);
45
+ refusingUndeclaredKeys(() => subSchema.create(lifted));
46
46
  }
47
47
  else if (isSlotDefinitionEntry(entry) && !slotType?.is(lifted)) {
48
48
  return slotWriteRefusal(`${meta.name}.${key}`, entry.type, value);
@@ -2,42 +2,66 @@ import type { RetiredSpelling } from './configurationSchema.ts';
2
2
  import type { ConfigurationSchemaMetadata } from './schemaRegistry.ts';
3
3
  import type { IAnyType } from '@jbrowse/mobx-state-tree';
4
4
  export declare function listed(keys: readonly string[]): string;
5
+ /**
6
+ * #api core/configuration
7
+ * Runs `write` as a write: a `closed` schema created inside it refuses a key
8
+ * it does not declare, at any depth, where a config loading only names the
9
+ * key on the console. `setConf`, a settings bag and a plot draft write this
10
+ * way, so a typo in an edit is an error and a config written for another
11
+ * version still draws.
12
+ */
13
+ export declare function refusingUndeclaredKeys<T>(write: () => T): T;
5
14
  /**
6
15
  * The snapshot with each spelling `retired` names rewritten: a lift's members
7
16
  * take the old key's place, and what the snapshot already spells wins, member
8
17
  * by member inside an object, since writing the current name is the stronger
9
18
  * statement — so a retired flag lifting into `scales.y` lands beside a
10
19
  * `scales.y` the snapshot writes. The old key goes whether or not it carried a
11
- * value, so a `closed` schema never meets it. Where two retired names lift
12
- * onto one member — a slot the entry spelt directly and the same slot inside a
13
- * retired `renderer` — the one declared first wins.
20
+ * value, so a `closed` schema never meets it, and a member a lift produces
21
+ * that no slot takes goes with it: a v4 `renderer` block carried settings
22
+ * the display has no slot for, and they were dropped then too. Where two
23
+ * retired names lift onto one member — a slot the entry spelt directly and
24
+ * the same slot inside a retired `renderer` — the one declared first wins.
25
+ * A retired name the schema itself declares is that slot, not a spelling,
26
+ * so a list shared across displays leaves it alone where one still takes it.
14
27
  */
15
28
  export declare function liftRetiredSpellings(schema: ConfigurationSchemaMetadata, snapshot: Record<string, unknown>): Record<string, unknown>;
16
29
  /**
17
- * `liftRetiredSpellings` over a map directly, for a schema whose own
18
- * `preProcessSnapshot` uncovers a retired name the pass above could not see —
19
- * one that arrives out of a legacy sub-config rather than off the entry.
30
+ * `liftRetiredSpellings` over a map directly, for a lift that uncovers a
31
+ * retired name one level down, as a v4 `renderer` block carries a `color1`.
20
32
  * Applying the same map twice costs nothing, since a lift deletes the name it
21
- * reads.
33
+ * reads. `takes` says which lifted members land; every one does unless given.
22
34
  */
23
- export declare function applyRetiredSpellings(retired: Record<string, RetiredSpelling>, snapshot: Record<string, unknown>): Record<string, unknown>;
35
+ export declare function applyRetiredSpellings(retired: Record<string, RetiredSpelling>, snapshot: Record<string, unknown>, takes?: (name: string) => boolean): Record<string, unknown>;
24
36
  /**
25
37
  * What a schema does to every snapshot on its way in, whichever door it
26
38
  * arrives by (`create`, `applySnapshot`, `setSubschema`, a settings bag): a
27
39
  * bare string or number lifts into the `shorthand` slot taking its form, beside any
28
40
  * `shorthandWith` slots, and `null` into the empty object that clears it; a
29
- * `null` member reads as unset, except in a frozen-family slot, which stores
30
- * it; a `retired` spelling becomes the members that replaced it; a `closed`
31
- * schema refuses a key it does not declare, then the schema's
32
- * own `preProcessSnapshot` runs, and a `jexl:` callback in a slot declaring no
33
- * `contextVariable` is refused. A bare value the shorthand does not lift
34
- * passes through for MST to refuse.
41
+ * `null` member reads as unset; a `retired` spelling becomes the members that
42
+ * replaced it; the schema's own `preProcessSnapshot` runs, which is where a
43
+ * track folds `displayDefaults` into its displays; then a `closed` schema
44
+ * names a key it does not declare on the console, or refuses it inside
45
+ * `refusingUndeclaredKeys`, unless the caller is a settings bag that routes
46
+ * an undeclared key itself (`routesUndeclared`); it refuses a bare value no
47
+ * shorthand lifted on every door, and so is a `jexl:` callback in a slot
48
+ * declaring no `contextVariable`.
49
+ */
50
+ export declare function preProcessSnapshotWith(schema: ConfigurationSchemaMetadata, snapshot: unknown, { routesUndeclared }?: {
51
+ routesUndeclared?: boolean | undefined;
52
+ }): Record<string, unknown>;
53
+ /**
54
+ * #api core/configuration
55
+ * A snapshot as `type` lifts it, without the keys it does not declare: the
56
+ * config half of an entry that carries its owner's keys beside one, as a
57
+ * `MultiWiggleAdapter` subadapter carries its row's `name` and `color`.
35
58
  */
36
- export declare function preProcessSnapshotWith(schema: ConfigurationSchemaMetadata, snapshot: unknown): Record<string, unknown>;
59
+ export declare function declaredSnapshot(type: IAnyType, snapshot: Record<string, unknown>): Record<string, unknown>;
37
60
  /**
38
61
  * #api core/configuration
39
- * A snapshot as `type` admits it: the same lift and checks `type.create`
40
- * applies, so a dialog or a validator refuses exactly what a config file
41
- * cannot hold. Throws what the schema's `preProcessSnapshot` throws.
62
+ * A snapshot as a write to `type` admits it: the lift and checks `setConf`
63
+ * applies, so a dialog or a validator refuses what an edit cannot hold, an
64
+ * undeclared key included. Throws what the schema's `preProcessSnapshot`
65
+ * throws.
42
66
  */
43
67
  export declare function preProcessConfigSnapshot(type: IAnyType, snapshot: unknown): Record<string, unknown>;
@@ -11,18 +11,51 @@ export function listed(keys) {
11
11
  ? `${keys.slice(0, -1).join(', ')} and ${keys.at(-1)}`
12
12
  : (keys[0] ?? 'nothing');
13
13
  }
14
- function refuseUndeclaredKeys({ name, definition, options }, snapshot) {
14
+ function declaredKeys({ definition, options }) {
15
15
  const id = options.explicitIdentifier;
16
- const declared = [
16
+ return [
17
17
  ...Object.keys(definition).filter(key => !isConstantEntry(definition[key])),
18
18
  ...(options.explicitlyTyped ? ['type'] : []),
19
19
  ...(id ? [id] : []),
20
20
  ];
21
- const unknown = typeof snapshot === 'string'
21
+ }
22
+ const warned = new Set();
23
+ let writes = 0;
24
+ /**
25
+ * #api core/configuration
26
+ * Runs `write` as a write: a `closed` schema created inside it refuses a key
27
+ * it does not declare, at any depth, where a config loading only names the
28
+ * key on the console. `setConf`, a settings bag and a plot draft write this
29
+ * way, so a typo in an edit is an error and a config written for another
30
+ * version still draws.
31
+ */
32
+ export function refusingUndeclaredKeys(write) {
33
+ writes++;
34
+ try {
35
+ return write();
36
+ }
37
+ finally {
38
+ writes--;
39
+ }
40
+ }
41
+ function checkUndeclaredKeys(schema, snapshot) {
42
+ const { name, options } = schema;
43
+ const declared = declaredKeys(schema);
44
+ const bare = snapshot !== undefined &&
45
+ (typeof snapshot !== 'object' || Array.isArray(snapshot));
46
+ const unknown = bare
22
47
  ? [JSON.stringify(snapshot)]
23
48
  : Object.keys(snapshot ?? {}).filter(key => !declared.includes(key) && !COMMENT_KEY.test(key));
24
49
  if (unknown.length > 0) {
25
- throw new Error(`${name} takes ${listed(declared)}, not ${unknown.join(', ')}`);
50
+ if (bare || writes > 0) {
51
+ throw new Error(`${name} takes ${listed(declared)}, not ${unknown.join(', ')}`);
52
+ }
53
+ const key = `${name} ${unknown.toSorted().join(' ')}`;
54
+ if (!warned.has(key)) {
55
+ warned.add(key);
56
+ const id = snapshot[options.explicitIdentifier ?? ''];
57
+ console.warn(`${name}${typeof id === 'string' ? ` "${id}"` : ''} does not declare ${listed(unknown)}: loading without it`);
58
+ }
26
59
  }
27
60
  }
28
61
  // Checked here as well as by each slot's MST type because this runs on every
@@ -39,11 +72,13 @@ function refuseCallbacks({ name, takesNoCallback }, snapshot) {
39
72
  }
40
73
  }
41
74
  // ADR-146's reset, on the snapshot path: the member keeps its key, so a
42
- // settings bag still resets it, and `create` reads `undefined` as the default
43
- function nullMembersAsUnset(snapshot, storesNull) {
75
+ // settings bag still resets it, and `create` reads `undefined` as the default.
76
+ // A frozen slot resets too, since its readers take the default's shape and
77
+ // `setSlot` already resets it; storing the null put one past them.
78
+ function nullMembersAsUnset(snapshot) {
44
79
  let out = snapshot;
45
80
  for (const key in snapshot) {
46
- if (snapshot[key] === null && !storesNull.has(key)) {
81
+ if (snapshot[key] === null) {
47
82
  out = out === snapshot ? { ...snapshot } : out;
48
83
  out[key] = undefined;
49
84
  }
@@ -82,24 +117,30 @@ function underWritten(written, lifted) {
82
117
  * by member inside an object, since writing the current name is the stronger
83
118
  * statement — so a retired flag lifting into `scales.y` lands beside a
84
119
  * `scales.y` the snapshot writes. The old key goes whether or not it carried a
85
- * value, so a `closed` schema never meets it. Where two retired names lift
86
- * onto one member — a slot the entry spelt directly and the same slot inside a
87
- * retired `renderer` — the one declared first wins.
120
+ * value, so a `closed` schema never meets it, and a member a lift produces
121
+ * that no slot takes goes with it: a v4 `renderer` block carried settings
122
+ * the display has no slot for, and they were dropped then too. Where two
123
+ * retired names lift onto one member — a slot the entry spelt directly and
124
+ * the same slot inside a retired `renderer` — the one declared first wins.
125
+ * A retired name the schema itself declares is that slot, not a spelling,
126
+ * so a list shared across displays leaves it alone where one still takes it.
88
127
  */
89
128
  export function liftRetiredSpellings(schema, snapshot) {
90
129
  const { retired } = schema.options;
91
- return retired && isOwnSnapshot(schema, snapshot)
92
- ? applyRetiredSpellings(retired, snapshot)
93
- : snapshot;
130
+ if (!retired || !isOwnSnapshot(schema, snapshot)) {
131
+ return snapshot;
132
+ }
133
+ const declared = new Set(declaredKeys(schema));
134
+ const spellings = Object.fromEntries(Object.entries(retired).filter(([name]) => !declared.has(name)));
135
+ return applyRetiredSpellings(spellings, snapshot, name => declared.has(name));
94
136
  }
95
137
  /**
96
- * `liftRetiredSpellings` over a map directly, for a schema whose own
97
- * `preProcessSnapshot` uncovers a retired name the pass above could not see —
98
- * one that arrives out of a legacy sub-config rather than off the entry.
138
+ * `liftRetiredSpellings` over a map directly, for a lift that uncovers a
139
+ * retired name one level down, as a v4 `renderer` block carries a `color1`.
99
140
  * Applying the same map twice costs nothing, since a lift deletes the name it
100
- * reads.
141
+ * reads. `takes` says which lifted members land; every one does unless given.
101
142
  */
102
- export function applyRetiredSpellings(retired, snapshot) {
143
+ export function applyRetiredSpellings(retired, snapshot, takes = () => true) {
103
144
  const present = Object.keys(retired).filter(key => key in snapshot);
104
145
  if (present.length === 0) {
105
146
  return snapshot;
@@ -111,7 +152,9 @@ export function applyRetiredSpellings(retired, snapshot) {
111
152
  for (const key of present.filter(key => snapshot[key] !== undefined)) {
112
153
  const lifted = retired[key](snapshot[key]);
113
154
  for (const [name, value] of Object.entries(lifted)) {
114
- out[name] = underWritten(out[name], value);
155
+ if (takes(name)) {
156
+ out[name] = underWritten(out[name], value);
157
+ }
115
158
  }
116
159
  }
117
160
  return out;
@@ -121,14 +164,16 @@ export function applyRetiredSpellings(retired, snapshot) {
121
164
  * arrives by (`create`, `applySnapshot`, `setSubschema`, a settings bag): a
122
165
  * bare string or number lifts into the `shorthand` slot taking its form, beside any
123
166
  * `shorthandWith` slots, and `null` into the empty object that clears it; a
124
- * `null` member reads as unset, except in a frozen-family slot, which stores
125
- * it; a `retired` spelling becomes the members that replaced it; a `closed`
126
- * schema refuses a key it does not declare, then the schema's
127
- * own `preProcessSnapshot` runs, and a `jexl:` callback in a slot declaring no
128
- * `contextVariable` is refused. A bare value the shorthand does not lift
129
- * passes through for MST to refuse.
167
+ * `null` member reads as unset; a `retired` spelling becomes the members that
168
+ * replaced it; the schema's own `preProcessSnapshot` runs, which is where a
169
+ * track folds `displayDefaults` into its displays; then a `closed` schema
170
+ * names a key it does not declare on the console, or refuses it inside
171
+ * `refusingUndeclaredKeys`, unless the caller is a settings bag that routes
172
+ * an undeclared key itself (`routesUndeclared`); it refuses a bare value no
173
+ * shorthand lifted on every door, and so is a `jexl:` callback in a slot
174
+ * declaring no `contextVariable`.
130
175
  */
131
- export function preProcessSnapshotWith(schema, snapshot) {
176
+ export function preProcessSnapshotWith(schema, snapshot, { routesUndeclared = false } = {}) {
132
177
  const { shorthandWith, closed, preProcessSnapshot } = schema.options;
133
178
  const form = bareFormOf(snapshot);
134
179
  const target = form && shorthandTargets(schema)[form];
@@ -136,24 +181,39 @@ export function preProcessSnapshotWith(schema, snapshot) {
136
181
  ? {}
137
182
  : target !== undefined
138
183
  ? { ...shorthandWith, [target]: snapshot }
139
- : nullMembersAsUnset(snapshot, schema.storesNull);
184
+ : nullMembersAsUnset(snapshot);
140
185
  const named = liftRetiredSpellings(schema, lifted);
141
- if (closed) {
142
- refuseUndeclaredKeys(schema, named);
143
- }
144
186
  const processed = preProcessSnapshot ? preProcessSnapshot(named) : named;
187
+ if (closed && !routesUndeclared && isOwnSnapshot(schema, processed)) {
188
+ checkUndeclaredKeys(schema, processed);
189
+ }
145
190
  refuseCallbacks(schema, processed);
146
191
  return processed;
147
192
  }
148
193
  /**
149
194
  * #api core/configuration
150
- * A snapshot as `type` admits it: the same lift and checks `type.create`
151
- * applies, so a dialog or a validator refuses exactly what a config file
152
- * cannot hold. Throws what the schema's `preProcessSnapshot` throws.
195
+ * A snapshot as `type` lifts it, without the keys it does not declare: the
196
+ * config half of an entry that carries its owner's keys beside one, as a
197
+ * `MultiWiggleAdapter` subadapter carries its row's `name` and `color`.
198
+ */
199
+ export function declaredSnapshot(type, snapshot) {
200
+ const schema = getConfigurationSchemaMetadata(type);
201
+ if (!schema) {
202
+ return snapshot;
203
+ }
204
+ const declared = new Set(declaredKeys(schema));
205
+ return Object.fromEntries(Object.entries(preProcessSnapshotWith(schema, snapshot, { routesUndeclared: true })).filter(([key]) => declared.has(key)));
206
+ }
207
+ /**
208
+ * #api core/configuration
209
+ * A snapshot as a write to `type` admits it: the lift and checks `setConf`
210
+ * applies, so a dialog or a validator refuses what an edit cannot hold, an
211
+ * undeclared key included. Throws what the schema's `preProcessSnapshot`
212
+ * throws.
153
213
  */
154
214
  export function preProcessConfigSnapshot(type, snapshot) {
155
215
  const schema = getConfigurationSchemaMetadata(type);
156
216
  return schema
157
- ? preProcessSnapshotWith(schema, snapshot)
217
+ ? refusingUndeclaredKeys(() => preProcessSnapshotWith(schema, snapshot))
158
218
  : snapshot;
159
219
  }
@@ -63,9 +63,7 @@ export function tabixIndexSnapshot(snap) {
63
63
  export function expandTabixShorthand(snap, locationKey) {
64
64
  return snap.uri
65
65
  ? {
66
- ...fillLocations(snap, {
67
- [locationKey]: { uri: snap.uri, baseUri: snap.baseUri },
68
- }),
66
+ ...fillLocations(snap, { [locationKey]: { uri: snap.uri, baseUri: snap.baseUri } }, ['csi']),
69
67
  index: tabixIndexSnapshot(snap),
70
68
  }
71
69
  : snap;
@@ -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';