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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +365 -69
  2. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
  3. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
  4. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +3 -2
  5. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -2
  6. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.d.ts +2 -1
  7. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.js +4 -2
  8. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -1
  9. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +4 -2
  10. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.d.ts +2 -1
  11. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.js +4 -2
  12. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +5 -4
  13. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +6 -4
  14. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -1
  15. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +4 -2
  16. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +3 -2
  17. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +4 -2
  18. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +2 -2
  19. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.d.ts +3 -2
  20. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.js +4 -2
  21. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +3 -2
  22. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +4 -2
  23. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +3 -2
  24. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +4 -2
  25. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.d.ts +3 -2
  26. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +4 -2
  27. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +3 -2
  28. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +4 -2
  29. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
  30. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +4 -2
  31. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +3 -2
  32. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js +4 -2
  33. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.d.ts +3 -2
  34. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.js +4 -2
  35. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +1 -1
  36. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +10 -19
  37. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
  38. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
  39. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
  40. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
  41. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
  42. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
  43. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
  44. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
  45. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
  46. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
  47. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
  48. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +2 -1
  49. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +22 -6
  50. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
  51. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
  52. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
  53. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +2 -0
  54. package/esm/PluginManager.d.ts +1 -0
  55. package/esm/PluginManager.js +6 -0
  56. package/esm/ReExports/coreModules.generated.js +538 -524
  57. package/esm/ReExports/coreWorkerModules.generated.js +454 -441
  58. package/esm/ReExports/lazify.js +3 -2
  59. package/esm/ReExports/list.js +15 -6
  60. package/esm/ReExports/names.d.ts +1 -0
  61. package/esm/ReExports/names.generated.d.ts +2 -0
  62. package/esm/ReExports/names.generated.js +566 -0
  63. package/esm/ReExports/names.js +3 -0
  64. package/esm/assemblyManager/assembly.d.ts +9 -0
  65. package/esm/assemblyManager/assembly.js +13 -0
  66. package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
  67. package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
  68. package/esm/assemblyManager/assemblyManager.d.ts +11 -0
  69. package/esm/assemblyManager/assemblyManager.js +2 -0
  70. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
  71. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
  72. package/esm/checkPlugins.js +10 -4
  73. package/esm/configuration/configurationSchema.d.ts +18 -5
  74. package/esm/configuration/configurationSchema.js +9 -7
  75. package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
  76. package/esm/configuration/configurationSchemaUnion.js +2 -1
  77. package/esm/configuration/configurationSlot.js +4 -4
  78. package/esm/configuration/fillLocations.d.ts +4 -2
  79. package/esm/configuration/fillLocations.js +9 -3
  80. package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
  81. package/esm/configuration/formatAboutConfigSchema.js +2 -2
  82. package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
  83. package/esm/configuration/formatDetailsConfigSchema.js +5 -5
  84. package/esm/configuration/getConf.js +13 -4
  85. package/esm/configuration/index.d.ts +1 -1
  86. package/esm/configuration/index.js +1 -1
  87. package/esm/configuration/plot.d.ts +2 -2
  88. package/esm/configuration/plot.js +32 -18
  89. package/esm/configuration/schemaRegistry.d.ts +0 -2
  90. package/esm/configuration/slotFacade.js +2 -2
  91. package/esm/configuration/snapshotPreprocess.d.ts +42 -18
  92. package/esm/configuration/snapshotPreprocess.js +94 -34
  93. package/esm/configuration/tabixShorthand.js +1 -3
  94. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
  95. package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
  96. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
  97. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
  98. package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
  99. package/esm/data_adapters/BaseAdapter/index.js +0 -1
  100. package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
  101. package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
  102. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
  103. package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
  104. package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
  105. package/esm/data_adapters/dataAdapterCache.js +68 -24
  106. package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
  107. package/esm/data_adapters/getFeatureAdapter.js +17 -0
  108. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
  109. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
  110. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -6
  111. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +56 -8
  112. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +3 -3
  113. package/esm/pluggableElementTypes/models/BaseTrackModel.js +7 -6
  114. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
  115. package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
  116. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
  117. package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
  118. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
  119. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
  120. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
  121. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
  122. package/esm/pluggableElementTypes/models/baseTrackConfig.js +9 -1
  123. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
  124. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
  125. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
  126. package/esm/pluginDefinitions.d.ts +7 -0
  127. package/esm/pluginDefinitions.js +20 -0
  128. package/esm/rpc/RpcRegistry.d.ts +0 -10
  129. package/esm/rpc/byteBudget.d.ts +8 -0
  130. package/esm/rpc/byteBudget.js +13 -0
  131. package/esm/rpc/configSchema.d.ts +2 -0
  132. package/esm/rpc/configSchema.js +3 -1
  133. package/esm/rpc/coreRpcMethods.d.ts +0 -1
  134. package/esm/rpc/coreRpcMethods.js +0 -1
  135. package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
  136. package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
  137. package/esm/rpc/methods/layerFeatures.d.ts +9 -6
  138. package/esm/rpc/methods/layerFeatures.js +21 -5
  139. package/esm/ui/ActionLink.d.ts +3 -2
  140. package/esm/ui/ActionLink.js +4 -2
  141. package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
  142. package/esm/ui/AddCustomPluginDialog.js +6 -4
  143. package/esm/ui/BaseTooltip.d.ts +3 -2
  144. package/esm/ui/BaseTooltip.js +4 -2
  145. package/esm/ui/CascadingMenu.js +14 -12
  146. package/esm/ui/CascadingMenuButton.d.ts +2 -2
  147. package/esm/ui/CascadingMenuButton.js +5 -4
  148. package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
  149. package/esm/ui/CascadingMenuHelpDialog.js +4 -2
  150. package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
  151. package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
  152. package/esm/ui/ColorPicker.d.ts +5 -4
  153. package/esm/ui/ColorPicker.js +6 -4
  154. package/esm/ui/ContextMenu.d.ts +1 -1
  155. package/esm/ui/ContextMenu.js +1 -1
  156. package/esm/ui/CopyToClipboardButton.d.ts +3 -2
  157. package/esm/ui/CopyToClipboardButton.js +4 -2
  158. package/esm/ui/Crosshairs.js +13 -10
  159. package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
  160. package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
  161. package/esm/ui/DataGridFlexContainer.d.ts +3 -2
  162. package/esm/ui/DataGridFlexContainer.js +4 -2
  163. package/esm/ui/Dialog.d.ts +1 -1
  164. package/esm/ui/Dialog.js +5 -4
  165. package/esm/ui/DropDownMenu.js +2 -2
  166. package/esm/ui/EditableTypography.d.ts +1 -1
  167. package/esm/ui/EditableTypography.js +3 -2
  168. package/esm/ui/ErrorActions.d.ts +3 -2
  169. package/esm/ui/ErrorActions.js +4 -2
  170. package/esm/ui/ErrorBanner.d.ts +2 -2
  171. package/esm/ui/ErrorBanner.js +3 -2
  172. package/esm/ui/ErrorBar.d.ts +3 -2
  173. package/esm/ui/ErrorBar.js +4 -2
  174. package/esm/ui/ErrorMessage.d.ts +3 -2
  175. package/esm/ui/ErrorMessage.js +4 -2
  176. package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
  177. package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
  178. package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
  179. package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
  180. package/esm/ui/ErrorOverlay.d.ts +3 -2
  181. package/esm/ui/ErrorOverlay.js +4 -2
  182. package/esm/ui/ExportSvgDialog.d.ts +3 -2
  183. package/esm/ui/ExportSvgDialog.js +4 -2
  184. package/esm/ui/ExternalLink.d.ts +2 -1
  185. package/esm/ui/ExternalLink.js +4 -2
  186. package/esm/ui/FactoryResetDialog.d.ts +3 -2
  187. package/esm/ui/FactoryResetDialog.js +4 -2
  188. package/esm/ui/FatalErrorDialog.d.ts +3 -2
  189. package/esm/ui/FatalErrorDialog.js +6 -4
  190. package/esm/ui/FileDropZone.d.ts +3 -2
  191. package/esm/ui/FileDropZone.js +4 -2
  192. package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
  193. package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
  194. package/esm/ui/FileSelector/LocationInput.js +4 -2
  195. package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
  196. package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
  197. package/esm/ui/GpuFallbackButton.d.ts +3 -2
  198. package/esm/ui/GpuFallbackButton.js +4 -2
  199. package/esm/ui/HoverMenu.d.ts +2 -2
  200. package/esm/ui/HoverMenu.js +7 -3
  201. package/esm/ui/HoverTooltip.d.ts +3 -2
  202. package/esm/ui/HoverTooltip.js +4 -2
  203. package/esm/ui/Icons.d.ts +5 -5
  204. package/esm/ui/Icons.js +11 -10
  205. package/esm/ui/InlineMenuControls.d.ts +2 -2
  206. package/esm/ui/InlineMenuControls.js +4 -3
  207. package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
  208. package/esm/ui/JexlFilterRowEditors.js +9 -8
  209. package/esm/ui/LabeledCheckbox.d.ts +3 -2
  210. package/esm/ui/LabeledCheckbox.js +4 -2
  211. package/esm/ui/LazyBaseTooltip.d.ts +12 -3
  212. package/esm/ui/LazyBaseTooltip.js +4 -2
  213. package/esm/ui/LegendSwatchGlyph.js +1 -0
  214. package/esm/ui/LoadingDots.d.ts +2 -1
  215. package/esm/ui/LoadingDots.js +4 -2
  216. package/esm/ui/LoadingEllipses.d.ts +5 -2
  217. package/esm/ui/LoadingEllipses.js +5 -3
  218. package/esm/ui/LoadingOverlay.d.ts +3 -2
  219. package/esm/ui/LoadingOverlay.js +4 -2
  220. package/esm/ui/LoadingProgress.d.ts +3 -2
  221. package/esm/ui/LoadingProgress.js +4 -2
  222. package/esm/ui/Logo.d.ts +2 -2
  223. package/esm/ui/Logo.js +9 -8
  224. package/esm/ui/MenuItemChevron.d.ts +2 -2
  225. package/esm/ui/MenuItemChevron.js +3 -2
  226. package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
  227. package/esm/ui/MenuItemEndDecoration.js +3 -2
  228. package/esm/ui/MenuItemTrailing.d.ts +2 -2
  229. package/esm/ui/MenuItemTrailing.js +7 -6
  230. package/esm/ui/MenuTypes.d.ts +21 -1
  231. package/esm/ui/MenuTypes.js +20 -0
  232. package/esm/ui/MonospaceTextField.d.ts +3 -2
  233. package/esm/ui/MonospaceTextField.js +4 -2
  234. package/esm/ui/NumberTextField.d.ts +2 -2
  235. package/esm/ui/NumberTextField.js +4 -2
  236. package/esm/ui/PaletteContext.d.ts +11 -9
  237. package/esm/ui/PaletteContext.js +33 -18
  238. package/esm/ui/PluginStoreCard.d.ts +3 -2
  239. package/esm/ui/PluginStoreCard.js +4 -2
  240. package/esm/ui/PopoverPicker.d.ts +3 -2
  241. package/esm/ui/PopoverPicker.js +4 -2
  242. package/esm/ui/PrerenderedCanvas.d.ts +2 -2
  243. package/esm/ui/PrerenderedCanvas.js +3 -2
  244. package/esm/ui/RedErrorMessageBox.d.ts +3 -2
  245. package/esm/ui/RedErrorMessageBox.js +4 -2
  246. package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
  247. package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
  248. package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
  249. package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
  250. package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
  251. package/esm/ui/ReplaceCurrentViewButton.js +4 -2
  252. package/esm/ui/ResizeHandle.d.ts +2 -2
  253. package/esm/ui/ResizeHandle.js +3 -2
  254. package/esm/ui/SanitizedHTML.d.ts +3 -2
  255. package/esm/ui/SanitizedHTML.js +6 -4
  256. package/esm/ui/ScrollChrome.d.ts +3 -2
  257. package/esm/ui/ScrollChrome.js +4 -2
  258. package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
  259. package/esm/ui/ScrollEdgeShadow.js +2 -2
  260. package/esm/ui/SessionJsonPanel.d.ts +3 -2
  261. package/esm/ui/SessionJsonPanel.js +4 -2
  262. package/esm/ui/ShareLinkField.d.ts +3 -2
  263. package/esm/ui/ShareLinkField.js +4 -2
  264. package/esm/ui/SingleSlider.d.ts +2 -2
  265. package/esm/ui/SingleSlider.js +4 -2
  266. package/esm/ui/SliderTooltip.d.ts +2 -1
  267. package/esm/ui/SliderTooltip.js +4 -2
  268. package/esm/ui/SnackbarContents.d.ts +3 -2
  269. package/esm/ui/SnackbarContents.js +4 -2
  270. package/esm/ui/SnackbarModel.d.ts +2 -0
  271. package/esm/ui/SnackbarModel.js +2 -0
  272. package/esm/ui/StackTraceButton.d.ts +3 -2
  273. package/esm/ui/StackTraceButton.js +4 -2
  274. package/esm/ui/StatusProgressBar.d.ts +3 -2
  275. package/esm/ui/StatusProgressBar.js +4 -2
  276. package/esm/ui/SubmitForm.d.ts +2 -1
  277. package/esm/ui/SubmitForm.js +4 -2
  278. package/esm/ui/SvgColorLegend.d.ts +3 -4
  279. package/esm/ui/SvgColorLegend.js +27 -18
  280. package/esm/ui/TagTextField.d.ts +2 -2
  281. package/esm/ui/TagTextField.js +4 -2
  282. package/esm/ui/ViewLoadingScreen.d.ts +3 -2
  283. package/esm/ui/ViewLoadingScreen.js +4 -2
  284. package/esm/ui/colorScale.d.ts +5 -1
  285. package/esm/ui/colorScale.js +12 -10
  286. package/esm/ui/colors.d.ts +3 -3
  287. package/esm/ui/colors.js +7 -7
  288. package/esm/ui/filterMenuItems.d.ts +10 -31
  289. package/esm/ui/filterMenuItems.js +13 -14
  290. package/esm/ui/index.d.ts +1 -1
  291. package/esm/ui/index.js +1 -1
  292. package/esm/ui/launchTargetsMenuItem.js +9 -13
  293. package/esm/ui/legendMenuItem.d.ts +4 -4
  294. package/esm/ui/legendMenuItem.js +4 -4
  295. package/esm/ui/menuItemAdornment.d.ts +1 -1
  296. package/esm/ui/menuItemAdornment.js +1 -1
  297. package/esm/ui/menuItems.d.ts +1 -1
  298. package/esm/ui/menuItems.js +1 -1
  299. package/esm/ui/menuLabels.d.ts +2 -2
  300. package/esm/ui/menuLabels.js +2 -2
  301. package/esm/ui/palette.d.ts +2 -2
  302. package/esm/ui/palette.js +10 -10
  303. package/esm/ui/radioSubMenu.d.ts +5 -3
  304. package/esm/ui/radioSubMenu.js +2 -2
  305. package/esm/ui/rampKey.d.ts +15 -0
  306. package/esm/ui/rampKey.js +17 -0
  307. package/esm/ui/showSubMenu.d.ts +0 -5
  308. package/esm/ui/showSubMenu.js +6 -15
  309. package/esm/ui/theme.d.ts +2 -2
  310. package/esm/ui/theme.js +1 -1
  311. package/esm/ui/useAssemblySelection.d.ts +2 -0
  312. package/esm/ui/useMouseTracking.d.ts +8 -20
  313. package/esm/ui/useMouseTracking.js +23 -62
  314. package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
  315. package/esm/ui/usePlacedMenuFocus.js +28 -0
  316. package/esm/util/Base1DViewModel.d.ts +5 -3
  317. package/esm/util/Base1DViewModel.js +5 -3
  318. package/esm/util/SvgCanvas.js +1 -1
  319. package/esm/util/aggregateFieldName.d.ts +1 -10
  320. package/esm/util/aggregateFieldName.js +1 -8
  321. package/esm/util/analytics.d.ts +4 -6
  322. package/esm/util/analytics.js +143 -12
  323. package/esm/util/bezierConnector.d.ts +20 -0
  324. package/esm/util/bezierConnector.js +34 -100
  325. package/esm/util/cacheBudgets.d.ts +3 -0
  326. package/esm/util/cacheBudgets.js +3 -0
  327. package/esm/util/categoricalField.d.ts +2 -2
  328. package/esm/util/categoricalField.js +3 -3
  329. package/esm/util/color/index.d.ts +1 -1
  330. package/esm/util/color/index.js +2 -2
  331. package/esm/util/color-bits/bit.js +1 -1
  332. package/esm/util/color-bits/parse.js +6 -6
  333. package/esm/util/colorBits.d.ts +15 -4
  334. package/esm/util/colorBits.js +38 -15
  335. package/esm/util/colorRamp.d.ts +3 -3
  336. package/esm/util/colorRamp.js +14 -2
  337. package/esm/util/colorScale.d.ts +114 -20
  338. package/esm/util/colorScale.js +124 -26
  339. package/esm/util/colorSchemes.d.ts +6 -4
  340. package/esm/util/colorSchemes.js +6 -3
  341. package/esm/util/createSvgRasterCanvas.d.ts +14 -1
  342. package/esm/util/createSvgRasterCanvas.js +36 -12
  343. package/esm/util/diagonalizeRegions.js +18 -9
  344. package/esm/util/featureTransforms.d.ts +2 -2
  345. package/esm/util/featureTransforms.js +85 -135
  346. package/esm/util/fileHandleStore.js +5 -0
  347. package/esm/util/groupKeys.d.ts +5 -4
  348. package/esm/util/groupKeys.js +15 -9
  349. package/esm/util/index.js +1 -1
  350. package/esm/util/installFetch.d.ts +2 -2
  351. package/esm/util/installPrerequisiteFetch.d.ts +8 -3
  352. package/esm/util/installPrerequisiteFetch.js +9 -7
  353. package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
  354. package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
  355. package/esm/util/jexl.js +1 -1
  356. package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
  357. package/esm/util/layouts/GranularRectLayout.js +57 -34
  358. package/esm/util/leadingEdgeAutorun.d.ts +9 -1
  359. package/esm/util/leadingEdgeAutorun.js +5 -2
  360. package/esm/util/markEncoding.d.ts +10 -8
  361. package/esm/util/markEncoding.js +50 -12
  362. package/esm/util/markEncodingTypes.d.ts +74 -20
  363. package/esm/util/originCut.d.ts +14 -0
  364. package/esm/util/originCut.js +19 -0
  365. package/esm/util/paintLayer.d.ts +1 -1
  366. package/esm/util/paintLayer.js +4 -3
  367. package/esm/util/pathSeries.d.ts +18 -0
  368. package/esm/util/pathSeries.js +143 -0
  369. package/esm/util/pressOwner.d.ts +20 -0
  370. package/esm/util/pressOwner.js +26 -0
  371. package/esm/util/quantileExtent.d.ts +3 -3
  372. package/esm/util/quantileExtent.js +3 -3
  373. package/esm/util/rowStackGeometry.d.ts +1 -1
  374. package/esm/util/rowStackGeometry.js +1 -1
  375. package/esm/util/sessionActivity.d.ts +36 -0
  376. package/esm/util/sessionActivity.js +88 -0
  377. package/esm/util/stepOutputs.d.ts +165 -0
  378. package/esm/util/stepOutputs.js +201 -0
  379. package/esm/util/stepTables.d.ts +7 -3
  380. package/esm/util/stepTables.js +86 -3
  381. package/esm/util/thresholdScale.d.ts +1 -1
  382. package/esm/util/thresholdScale.js +1 -1
  383. package/esm/util/tracks.js +1 -1
  384. package/esm/util/usePanZoom.js +4 -10
  385. package/esm/util/windowStep.d.ts +6 -0
  386. package/esm/util/windowStep.js +153 -0
  387. package/package.json +23 -15
  388. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
  389. package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
  390. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
  391. package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
@@ -0,0 +1,3 @@
1
+ // Published as `@jbrowse/core/ReExports/names` for plugin build tooling; the
2
+ // generated file keeps its suffix so the formatter skips it.
3
+ export { default } from './names.generated.js';
@@ -22,6 +22,9 @@ export interface BasicRegion {
22
22
  }
23
23
  /**
24
24
  * #stateModel Assembly
25
+ * Loads an assembly's reference sequence names, refName aliases and
26
+ * cytobands, and maps each data file's refNames onto the assembly's canonical
27
+ * names.
25
28
  */
26
29
  export default function assemblyFactory(assemblyConfigType: IAnyType, pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
27
30
  /**
@@ -294,6 +297,12 @@ export default function assemblyFactory(assemblyConfigType: IAnyType, pluginMana
294
297
  */
295
298
  isValidRefName(refName: string): boolean;
296
299
  } & {
300
+ /**
301
+ * #method
302
+ * Whether the assembly's `circularRefNames` lists this refName, matched
303
+ * through its aliases.
304
+ */
305
+ isCircularRefName(refName: string): boolean;
297
306
  /**
298
307
  * #method
299
308
  * Where a refName — canonical or any alias — sits in this assembly's own
@@ -17,6 +17,9 @@ export { lookupGeneticCodeId } from './geneticCodes.js';
17
17
  export { refNameMismatchMessage } from './refNameMismatch.js';
18
18
  /**
19
19
  * #stateModel Assembly
20
+ * Loads an assembly's reference sequence names, refName aliases and
21
+ * cytobands, and maps each data file's refNames onto the assembly's canonical
22
+ * names.
20
23
  */
21
24
  export default function assemblyFactory(assemblyConfigType, pluginManager) {
22
25
  return types
@@ -542,6 +545,16 @@ export default function assemblyFactory(assemblyConfigType, pluginManager) {
542
545
  },
543
546
  }))
544
547
  .views(self => ({
548
+ /**
549
+ * #method
550
+ * Whether the assembly's `circularRefNames` lists this refName, matched
551
+ * through its aliases.
552
+ */
553
+ isCircularRefName(refName) {
554
+ const canonical = self.getCanonicalRefName2(refName);
555
+ const names = self.getConf('circularRefNames') ?? [];
556
+ return names.some(name => self.getCanonicalRefName2(name) === canonical);
557
+ },
545
558
  /**
546
559
  * #method
547
560
  * Where a refName — canonical or any alias — sits in this assembly's own
@@ -1,6 +1,6 @@
1
1
  import type PluginManager from '../PluginManager.ts';
2
2
  import type { Instance } from '@jbrowse/mobx-state-tree';
3
- export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, } from './expandAssemblyConfigShorthand.ts';
3
+ export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, expandSidecarShorthand, refNameAliasAdapterType, } from './expandAssemblyConfigShorthand.ts';
4
4
  /**
5
5
  * #config BaseAssembly
6
6
  * #category assemblyManagement
@@ -116,6 +116,11 @@ declare function assemblyConfigSchema(pluginManager: PluginManager): import("../
116
116
  } & {
117
117
  defaultValue: unknown;
118
118
  };
119
+ readonly circularRefNames: {
120
+ type: "stringArray";
121
+ } & {
122
+ defaultValue: unknown;
123
+ };
119
124
  readonly geneticCodesLocation: {
120
125
  type: "maybeFileLocation";
121
126
  };
@@ -1,26 +1,10 @@
1
1
  import { ConfigurationSchema } from '../configuration/index.js';
2
- import { expandAssemblyShorthand } from './expandAssemblyConfigShorthand.js';
3
- export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, } from './expandAssemblyConfigShorthand.js';
4
- /**
5
- * A sidecar sub-schema written as just its file: `'aliases.txt'` or
6
- * `{ uri: 'aliases.txt' }` becomes `{ adapter: { type, uri } }`, with `type`
7
- * picked from the uri. baseUri, stamped by addRelativeUris, rides along. An
8
- * explicit `adapter` passes through untouched.
9
- */
2
+ import { expandAssemblyShorthand, expandSidecarShorthand, refNameAliasAdapterType, } from './expandAssemblyConfigShorthand.js';
3
+ export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, expandSidecarShorthand, refNameAliasAdapterType, } from './expandAssemblyConfigShorthand.js';
10
4
  function fileAdapterShorthand(typeFor) {
11
5
  return {
12
6
  shorthand: 'uri',
13
- preProcessSnapshot: (snap) => {
14
- const { uri, baseUri, adapter } = snap;
15
- if (adapter) {
16
- return snap;
17
- }
18
- return {
19
- adapter: typeof uri === 'string'
20
- ? { type: typeFor(uri), uri, ...(baseUri ? { baseUri } : {}) }
21
- : { type: typeFor('') },
22
- };
23
- },
7
+ preProcessSnapshot: (snap) => expandSidecarShorthand(snap, typeFor),
24
8
  };
25
9
  }
26
10
  /**
@@ -172,6 +156,25 @@ function assemblyConfigSchema(pluginManager) {
172
156
  defaultValue: {},
173
157
  description: 'Map of reference sequence name to NCBI genetic-code (translation table) id for sequences not using the standard code, e.g. { "chrM": 2 }',
174
158
  },
159
+ /**
160
+ * #slot
161
+ * The reference sequences that are circular: a plasmid, an organelle, a
162
+ * bacterial chromosome. The circular view closes a circle of one such
163
+ * sequence into a ring with no gap at its origin; every other sequence
164
+ * keeps the gap that marks its two ends. Names are matched through
165
+ * refName aliasing.
166
+ *
167
+ * #example
168
+ * The human mitochondrion, by its RefSeq accession:
169
+ * ```js
170
+ * ['NC_012920.1']
171
+ * ```
172
+ */
173
+ circularRefNames: {
174
+ type: 'stringArray',
175
+ defaultValue: [],
176
+ description: 'Reference sequences that are circular (a plasmid, an organelle, a bacterial chromosome), which the circular view closes into a ring',
177
+ },
175
178
  /**
176
179
  * #slot
177
180
  * Optional file (tab-separated `refName<TAB>geneticCodeId`, `#` comments
@@ -198,9 +201,7 @@ function assemblyConfigSchema(pluginManager) {
198
201
  * commonly a tsv like chromAliases.txt from UCSC or similar
199
202
  */
200
203
  adapter: pluginManager.pluggableConfigSchemaType('adapter'),
201
- }, fileAdapterShorthand(uri => /sequence_report\.tsv(\.gz)?$/i.test(uri)
202
- ? 'NcbiSequenceReportAliasAdapter'
203
- : 'RefNameAliasAdapter')),
204
+ }, fileAdapterShorthand(refNameAliasAdapterType)),
204
205
  cytobands: ConfigurationSchema('Cytoband', {
205
206
  /**
206
207
  * #slot cytobands.adapter
@@ -12,6 +12,8 @@ export interface AssemblyBaseOpts {
12
12
  }
13
13
  /**
14
14
  * #stateModel AssemblyManager
15
+ * Keeps an `Assembly` for each assembly in the config and the session, and
16
+ * looks one up by name or alias.
15
17
  */
16
18
  declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
17
19
  /**
@@ -81,6 +83,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
81
83
  getCanonicalRefName2(refName: string): string;
82
84
  isValidRefName(refName: string): boolean;
83
85
  } & {
86
+ isCircularRefName(refName: string): boolean;
84
87
  getRefNamePosition(refName: string): number | undefined;
85
88
  getAliasesForRefName(refName: string): string[];
86
89
  getRefNameMapForAdapter(adapterConf: {
@@ -192,6 +195,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
192
195
  getCanonicalRefName2(refName: string): string;
193
196
  isValidRefName(refName: string): boolean;
194
197
  } & {
198
+ isCircularRefName(refName: string): boolean;
195
199
  getRefNamePosition(refName: string): number | undefined;
196
200
  getAliasesForRefName(refName: string): string[];
197
201
  getRefNameMapForAdapter(adapterConf: {
@@ -259,6 +263,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
259
263
  getCanonicalRefName2(refName: string): string;
260
264
  isValidRefName(refName: string): boolean;
261
265
  } & {
266
+ isCircularRefName(refName: string): boolean;
262
267
  getRefNamePosition(refName: string): number | undefined;
263
268
  getAliasesForRefName(refName: string): string[];
264
269
  getRefNameMapForAdapter(adapterConf: {
@@ -346,6 +351,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
346
351
  getCanonicalRefName2(refName: string): string;
347
352
  isValidRefName(refName: string): boolean;
348
353
  } & {
354
+ isCircularRefName(refName: string): boolean;
349
355
  getRefNamePosition(refName: string): number | undefined;
350
356
  getAliasesForRefName(refName: string): string[];
351
357
  getRefNameMapForAdapter(adapterConf: {
@@ -413,6 +419,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
413
419
  getCanonicalRefName2(refName: string): string;
414
420
  isValidRefName(refName: string): boolean;
415
421
  } & {
422
+ isCircularRefName(refName: string): boolean;
416
423
  getRefNamePosition(refName: string): number | undefined;
417
424
  getAliasesForRefName(refName: string): string[];
418
425
  getRefNameMapForAdapter(adapterConf: {
@@ -532,6 +539,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
532
539
  getCanonicalRefName2(refName: string): string;
533
540
  isValidRefName(refName: string): boolean;
534
541
  } & {
542
+ isCircularRefName(refName: string): boolean;
535
543
  getRefNamePosition(refName: string): number | undefined;
536
544
  getAliasesForRefName(refName: string): string[];
537
545
  getRefNameMapForAdapter(adapterConf: {
@@ -599,6 +607,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
599
607
  getCanonicalRefName2(refName: string): string;
600
608
  isValidRefName(refName: string): boolean;
601
609
  } & {
610
+ isCircularRefName(refName: string): boolean;
602
611
  getRefNamePosition(refName: string): number | undefined;
603
612
  getAliasesForRefName(refName: string): string[];
604
613
  getRefNameMapForAdapter(adapterConf: {
@@ -682,6 +691,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
682
691
  getCanonicalRefName2(refName: string): string;
683
692
  isValidRefName(refName: string): boolean;
684
693
  } & {
694
+ isCircularRefName(refName: string): boolean;
685
695
  getRefNamePosition(refName: string): number | undefined;
686
696
  getAliasesForRefName(refName: string): string[];
687
697
  getRefNameMapForAdapter(adapterConf: {
@@ -749,6 +759,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
749
759
  getCanonicalRefName2(refName: string): string;
750
760
  isValidRefName(refName: string): boolean;
751
761
  } & {
762
+ isCircularRefName(refName: string): boolean;
752
763
  getRefNamePosition(refName: string): number | undefined;
753
764
  getAliasesForRefName(refName: string): string[];
754
765
  getRefNameMapForAdapter(adapterConf: {
@@ -85,6 +85,8 @@ function createUnrecognizedAssemblyReports() {
85
85
  }
86
86
  /**
87
87
  * #stateModel AssemblyManager
88
+ * Keeps an `Assembly` for each assembly in the config and the session, and
89
+ * looks one up by name or alias.
88
90
  */
89
91
  function assemblyManagerFactory(conf, pm) {
90
92
  return types
@@ -7,6 +7,15 @@ export declare function referenceSequenceTrackId(assemblyName: unknown): string;
7
7
  * filled in when omitted. Returns `snap` itself when there is nothing to do.
8
8
  */
9
9
  export declare function expandAssemblySequence<T>(snap: T): T;
10
+ /**
11
+ * A sidecar sub-schema written as just its file: `{ uri: 'aliases.txt' }`
12
+ * becomes `{ adapter: { type, uri } }`, with `type` picked from the uri.
13
+ * baseUri, stamped by addRelativeUris, rides along. An explicit `adapter`
14
+ * passes through untouched.
15
+ */
16
+ export declare function expandSidecarShorthand(snap: Record<string, unknown>, typeFor: (uri: string) => string): Record<string, unknown>;
17
+ /** The alias adapter an assembly's `refNameAliases` file is read with. */
18
+ export declare function refNameAliasAdapterType(uri: string): "NcbiSequenceReportAliasAdapter" | "RefNameAliasAdapter";
10
19
  /**
11
20
  * Expand an assembly snapshot's own shorthands into the `sequence` an assembly
12
21
  * config declares: {@link expandAssemblySequence}, then the sequence adapter's
@@ -37,6 +37,29 @@ export function expandAssemblySequence(snap) {
37
37
  },
38
38
  };
39
39
  }
40
+ /**
41
+ * A sidecar sub-schema written as just its file: `{ uri: 'aliases.txt' }`
42
+ * becomes `{ adapter: { type, uri } }`, with `type` picked from the uri.
43
+ * baseUri, stamped by addRelativeUris, rides along. An explicit `adapter`
44
+ * passes through untouched.
45
+ */
46
+ export function expandSidecarShorthand(snap, typeFor) {
47
+ const { uri, baseUri, adapter } = snap;
48
+ if (adapter) {
49
+ return snap;
50
+ }
51
+ return {
52
+ adapter: typeof uri === 'string'
53
+ ? { type: typeFor(uri), uri, ...(baseUri ? { baseUri } : {}) }
54
+ : { type: typeFor('') },
55
+ };
56
+ }
57
+ /** The alias adapter an assembly's `refNameAliases` file is read with. */
58
+ export function refNameAliasAdapterType(uri) {
59
+ return /sequence_report\.tsv(\.gz)?$/i.test(uri)
60
+ ? 'NcbiSequenceReportAliasAdapter'
61
+ : 'RefNameAliasAdapter';
62
+ }
40
63
  /**
41
64
  * Expand an assembly snapshot's own shorthands into the `sequence` an assembly
42
65
  * config declares: {@link expandAssemblySequence}, then the sequence adapter's
@@ -1,4 +1,4 @@
1
- import { isStorePluginDefinition, maybePluginUrl, pluginUrl, } from './pluginDefinitions.js';
1
+ import { isStorePluginDefinition, maybePluginUrl, resolvedPluginUrl, } from './pluginDefinitions.js';
2
2
  // Whether a set of plugin definitions is safe to load without asking the user.
3
3
  // Lives in core rather than a product because every product that can be handed
4
4
  // a config by an untrusted party needs the same gate: Web from its address bar,
@@ -66,8 +66,11 @@ function isTrustedUrl(url) {
66
66
  * exist to prevent on the loader side.
67
67
  */
68
68
  function isTrustedDefinition(def) {
69
- const url = maybePluginUrl(def);
70
- return url === undefined ? isStorePluginDefinition(def) : isTrustedUrl(url);
69
+ if (maybePluginUrl(def) === undefined) {
70
+ return isStorePluginDefinition(def);
71
+ }
72
+ const url = resolvedPluginUrl(def);
73
+ return url !== undefined && isTrustedUrl(url);
71
74
  }
72
75
  // Every url a store entry can resolve to: the top-level fallback plus each
73
76
  // version-pinned build. A config plugin is "in the store" if its url is any of
@@ -82,7 +85,10 @@ export function checkPluginsAgainstStore(pluginsToCheck, storePlugins) {
82
85
  return true;
83
86
  }
84
87
  const storeUrls = new Set(storePlugins.plugins.flatMap(storePluginUrls));
85
- return pluginsToCheck.every(p => isTrustedDefinition(p) || storeUrls.has(pluginUrl(p)));
88
+ return pluginsToCheck.every(p => {
89
+ const url = resolvedPluginUrl(p);
90
+ return isTrustedDefinition(p) || (url !== undefined && storeUrls.has(url));
91
+ });
86
92
  }
87
93
  export async function checkPlugins(pluginsToCheck) {
88
94
  // Trusted-by-prefix plugins and store refs are accepted without consulting
@@ -37,9 +37,14 @@ export interface ConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfiguration
37
37
  */
38
38
  shorthandWith?: Record<string, unknown>;
39
39
  /**
40
- * Refuse a snapshot key the schema does not declare, where MST would drop
41
- * it in silence. Checked after the `shorthand` lift and before
42
- * `preProcessSnapshot`, on the same paths.
40
+ * What a snapshot key the schema does not declare meets, where MST would
41
+ * drop it in silence: a config loading names the key on the console and
42
+ * loads without it, so a config written for another version still draws,
43
+ * and a write (`refusingUndeclaredKeys`) refuses it. Checked after the
44
+ * `shorthand` lift and the schema's own `preProcessSnapshot`, on the same
45
+ * paths, and only on the schema's own snapshot where a union runs every
46
+ * member over an entry. A display, the `explicitlyTyped` schema identified
47
+ * by `displayId`, is closed unless it says `false`.
43
48
  */
44
49
  closed?: boolean;
45
50
  /**
@@ -49,16 +54,24 @@ export interface ConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfiguration
49
54
  * snapshot or a settings bag arrives by, and read by the `displayDefaults`
50
55
  * router, so one declaration serves a config entry, the shorthand object, a
51
56
  * share link and an agent's bag alike. A spelling the snapshot already
52
- * carries wins over the one a lift produces.
57
+ * carries wins over the one a lift produces, and a name the schema declares
58
+ * is left alone, so a subclass keeping a slot its base retired still takes
59
+ * it. A lift reading no value and answering no member (`() => ({})`) drops
60
+ * the key, which `jbrowse validate` reports as never read.
53
61
  */
54
62
  retired?: Record<string, RetiredSpelling>;
55
63
  /**
56
- * A colour object's defaults by `field`, `*` for any other: the scale while
64
+ * A color object's defaults by `field`, `*` for any other: the scale while
57
65
  * `scale` is unset, and the members that scale reads while unwritten.
58
66
  */
59
67
  fieldPresets?: Readonly<Record<string, {
60
68
  readonly scale: string;
61
69
  }>>;
70
+ /**
71
+ * The field a color object naming neither a field nor a constant maps
72
+ * (`withImpliedField`).
73
+ */
74
+ impliedField?: string;
62
75
  preProcessSnapshot?: (snapshot: Record<string, unknown>) => Record<string, unknown>;
63
76
  requires?: REQUIREMENT[];
64
77
  }
@@ -6,7 +6,7 @@ import ConfigSlot, { slotWriteRefusal } from './configurationSlot.js';
6
6
  import { checkRequirements } from './requirements.js';
7
7
  import { getConfigurationSchemaMetadata, registerConfigurationSchema, } from './schemaRegistry.js';
8
8
  import { isConfigurationSchemaType, isConstantEntry, isSlotDefinitionEntry, shorthandTargetsOf, } from './schemaTypes.js';
9
- import { preProcessSnapshotWith } from './snapshotPreprocess.js';
9
+ import { preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.js';
10
10
  function hookList(hook) {
11
11
  return hook === undefined ? [] : Array.isArray(hook) ? hook : [hook];
12
12
  }
@@ -82,6 +82,9 @@ function preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition
82
82
  requires: requires.length ? requires : undefined,
83
83
  };
84
84
  }
85
+ if (options.explicitlyTyped && options.explicitIdentifier === 'displayId') {
86
+ options = { ...options, closed: options.closed ?? true };
87
+ }
85
88
  return { schemaDefinition, options };
86
89
  }
87
90
  function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
@@ -99,7 +102,6 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
99
102
  // narrower than `modelDefinition`, which also holds the identifier and the
100
103
  // sub-schemas, neither of which setSlot may write
101
104
  const slotKeys = new Set();
102
- const storesNull = new Set();
103
105
  const featureFields = new Set();
104
106
  const takesNoCallback = new Map();
105
107
  for (const [slotName, slotDefinition] of Object.entries(schemaDefinition)) {
@@ -124,9 +126,6 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
124
126
  slotKeys.add(slotName);
125
127
  try {
126
128
  modelDefinition[slotName] = ConfigSlot(slotDefinition);
127
- if (modelDefinition[slotName].is(null)) {
128
- storesNull.add(slotName);
129
- }
130
129
  if (slotDefinition.type === 'featureField') {
131
130
  featureFields.add(slotName);
132
131
  }
@@ -156,6 +155,10 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
156
155
  // collection takes the whole list or map, and `null` resets it
157
156
  setSubschema(slotName, data) {
158
157
  if (collectionKeys.has(slotName)) {
158
+ // checked on a copy, since the assignment runs patch listeners
159
+ if (data != null && !isStateTreeNode(data)) {
160
+ refusingUndeclaredKeys(() => modelDefinition[slotName].create(data));
161
+ }
159
162
  self[slotName] = data ?? undefined;
160
163
  return self[slotName];
161
164
  }
@@ -164,7 +167,7 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
164
167
  }
165
168
  const newSchema = isStateTreeNode(data)
166
169
  ? data
167
- : modelDefinition[slotName].create(data);
170
+ : refusingUndeclaredKeys(() => modelDefinition[slotName].create(data));
168
171
  self[slotName] = newSchema;
169
172
  return newSchema;
170
173
  },
@@ -215,7 +218,6 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
215
218
  name: modelName,
216
219
  definition: schemaDefinition,
217
220
  options,
218
- storesNull,
219
221
  featureFields,
220
222
  takesNoCallback,
221
223
  };
@@ -27,7 +27,8 @@ export type ConfigurationSchemaUnionType<MEMBERS extends Record<string, AnyConfi
27
27
  * member, and a `type` naming no member is refused in every build — where a
28
28
  * bare `types.union` would load it as its first member. Each member is an
29
29
  * `explicitlyTyped`, `closed` schema named by its key, so a key belonging to
30
- * another member is refused rather than dropped; one that is not throws here.
30
+ * another member is named on a load and refused on a write rather than
31
+ * dropped; one that is not throws here.
31
32
  */
32
33
  export declare function ConfigurationSchemaUnion<const MEMBERS extends Record<string, AnyConfigurationSchemaType>>(name: string, members: MEMBERS): ConfigurationSchemaUnionType<MEMBERS>;
33
34
  /**
@@ -21,7 +21,8 @@ function memberRefusal(key, member) {
21
21
  * member, and a `type` naming no member is refused in every build — where a
22
22
  * bare `types.union` would load it as its first member. Each member is an
23
23
  * `explicitlyTyped`, `closed` schema named by its key, so a key belonging to
24
- * another member is refused rather than dropped; one that is not throws here.
24
+ * another member is named on a load and refused on a write rather than
25
+ * dropped; one that is not throws here.
25
26
  */
26
27
  export function ConfigurationSchemaUnion(name, members) {
27
28
  for (const [key, member] of Object.entries(members)) {
@@ -6,9 +6,9 @@ import { isCallbackValue } from './slotValueUtils.js';
6
6
  function notAColor(value) {
7
7
  return `${JSON.stringify(value)} is not a color. A color is a CSS color: a name like "red" or "steelblue", "#rgb" / "#rrggbb" / "#rrggbbaa", "rgb()" / "rgba()" / "hsl()" / "hsla()", "transparent" or a BED triple like "255,0,0"; a color computed per feature is a "jexl:" callback, in a slot that takes one`;
8
8
  }
9
- // '' is a color slot's "none", as in `outlineColor`
9
+ // '' is a color slot's "none", as in `rowColor.unknown`
10
10
  const CssColorType = types.refinement('CssColor', types.string, value => value === '' || isCssColor(value), notAColor);
11
- // a colour list's entry has no "none" to spell
11
+ // a color list's entry has no "none" to spell
12
12
  const CssColorEntryType = types.refinement('CssColorEntry', types.string, isCssColor, notAColor);
13
13
  const MaybeFileLocation = types.snapshotProcessor(types.maybe(FileLocation), {
14
14
  preProcessor: (snap) => snap &&
@@ -37,7 +37,7 @@ const slotTypes = {
37
37
  integer: { model: types.integer, fallbackDefault: 1 },
38
38
  number: { model: types.number, fallbackDefault: 1 },
39
39
  // a `maybe*` type's unset is `undefined`, the one value no config spells:
40
- // "decide from the data", as an auto-fitted height or a BED itemRgb colour
40
+ // "decide from the data", as an auto-fitted height or a BED itemRgb color
41
41
  maybeNumber: { model: types.maybe(types.number) },
42
42
  maybeBoolean: { model: types.maybe(types.boolean) },
43
43
  maybeColor: { model: types.maybe(CssColorType) },
@@ -130,7 +130,7 @@ export default function ConfigSlot(definition) {
130
130
  if (type === 'featureField' && callback) {
131
131
  throw new Error('a "featureField" slot names a field the display reads per feature, and its jexl: expression is evaluated there, never called with a contextVariable. If this slot overrides a base callback slot, state \'contextVariable: undefined\'.');
132
132
  }
133
- if (!callback && isJexl(defaultValue)) {
133
+ if (!callback && type !== 'featureField' && isJexl(defaultValue)) {
134
134
  throw new Error(`the defaultValue ${JSON.stringify(defaultValue)} is a jexl: callback, so the slot declares the contextVariable names it reads`);
135
135
  }
136
136
  const value = enumShaped(type, valueModel);
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * A shorthand snapshot with its location slots filled in: `derived` supplies
3
3
  * what the shorthand implies, and any key the config spells out for itself
4
- * wins.
4
+ * wins. The shorthand's own keys leave the result, `uri` and `baseUri` and
5
+ * whichever others `consumed` names, since an adapter's schema is `closed`
6
+ * and would name one left behind as undeclared.
5
7
  *
6
8
  * Spread the other way round — derived over the snapshot — a config naming both
7
9
  * a `uri` and a location that is not the sibling of it, `{ uri: 'x.fa',
@@ -9,6 +11,6 @@
9
11
  * the one the shorthand invents. Every adapter's normalizer had its own copy of
10
12
  * the spread, so the precedence had to be got right 30-odd times.
11
13
  */
12
- export declare function fillLocations(snap: Record<string, unknown>, derived: Record<string, unknown>): {
14
+ export declare function fillLocations(snap: Record<string, unknown>, derived: Record<string, unknown>, consumed?: readonly string[]): {
13
15
  [x: string]: unknown;
14
16
  };
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * A shorthand snapshot with its location slots filled in: `derived` supplies
3
3
  * what the shorthand implies, and any key the config spells out for itself
4
- * wins.
4
+ * wins. The shorthand's own keys leave the result, `uri` and `baseUri` and
5
+ * whichever others `consumed` names, since an adapter's schema is `closed`
6
+ * and would name one left behind as undeclared.
5
7
  *
6
8
  * Spread the other way round — derived over the snapshot — a config naming both
7
9
  * a `uri` and a location that is not the sibling of it, `{ uri: 'x.fa',
@@ -9,6 +11,10 @@
9
11
  * the one the shorthand invents. Every adapter's normalizer had its own copy of
10
12
  * the spread, so the precedence had to be got right 30-odd times.
11
13
  */
12
- export function fillLocations(snap, derived) {
13
- return { ...derived, ...snap };
14
+ export function fillLocations(snap, derived, consumed = []) {
15
+ const written = { ...snap };
16
+ for (const key of ['uri', 'baseUri', ...consumed]) {
17
+ delete written[key];
18
+ }
19
+ return { ...derived, ...written };
14
20
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * #config FormatAbout
3
3
  * #category root
4
- * jexl callbacks that add, rewrite or hide fields in a track's About dialog.
5
- * The same schema hangs off every track and off the session as
4
+ * Holds jexl callbacks that add, rewrite or hide fields in a track's About
5
+ * dialog. Every track has this schema, and so does the root config as
6
6
  * `configuration.formatAbout`, which applies to every track at once. Where both
7
7
  * are set the track's object is spread over the session's, so a track can
8
8
  * override individual keys the global callback added.
@@ -2,8 +2,8 @@ import { ConfigurationSchema } from './configurationSchema.js';
2
2
  /**
3
3
  * #config FormatAbout
4
4
  * #category root
5
- * jexl callbacks that add, rewrite or hide fields in a track's About dialog.
6
- * The same schema hangs off every track and off the session as
5
+ * Holds jexl callbacks that add, rewrite or hide fields in a track's About
6
+ * dialog. Every track has this schema, and so does the root config as
7
7
  * `configuration.formatAbout`, which applies to every track at once. Where both
8
8
  * are set the track's object is spread over the session's, so a track can
9
9
  * override individual keys the global callback added.
@@ -7,8 +7,8 @@ export declare const DEFAULT_FORMAT_DETAILS_DEPTH = 2;
7
7
  /**
8
8
  * #config FormatDetails
9
9
  * #category root
10
- * jexl callbacks that add, rewrite or hide fields in the feature-details panel.
11
- * The same schema hangs off every track and off the session as
10
+ * Holds jexl callbacks that add, rewrite or hide fields in the feature-details
11
+ * panel. Every track has this schema, and so does the root config as
12
12
  * `configuration.formatDetails`, which applies to every track at once. Where
13
13
  * both are set, the callbacks merge with the track's object over the session's,
14
14
  * so a track can override individual keys the global callback added, and the
@@ -8,8 +8,8 @@ export const DEFAULT_FORMAT_DETAILS_DEPTH = 2;
8
8
  /**
9
9
  * #config FormatDetails
10
10
  * #category root
11
- * jexl callbacks that add, rewrite or hide fields in the feature-details panel.
12
- * The same schema hangs off every track and off the session as
11
+ * Holds jexl callbacks that add, rewrite or hide fields in the feature-details
12
+ * panel. Every track has this schema, and so does the root config as
13
13
  * `configuration.formatDetails`, which applies to every track at once. Where
14
14
  * both are set, the callbacks merge with the track's object over the session's,
15
15
  * so a track can override individual keys the global callback added, and the
@@ -64,7 +64,7 @@ export function FormatDetailsConfigSchemaFactory() {
64
64
  },
65
65
  /**
66
66
  * #slot formatDetails.depth
67
- * how many levels of subfeature the `subfeatures` callback runs on,
67
+ * The number of subfeature levels the `subfeatures` callback runs on,
68
68
  * defaulting to 2, which stops at a gene's transcripts rather than
69
69
  * descending into their exons and CDSs. A track's value wins over the
70
70
  * session's
@@ -76,8 +76,8 @@ export function FormatDetailsConfigSchemaFactory() {
76
76
  },
77
77
  /**
78
78
  * #slot formatDetails.maxDepth
79
- * how many levels of subfeature card the panel renders at all, which is a
80
- * separate question from how deep `subfeatures` formats. Unset means no
79
+ * The number of subfeature card levels the panel renders at all,
80
+ * independent of how deep `subfeatures` formats. Unset means no
81
81
  * limit. A track's value wins over the session's
82
82
  */
83
83
  maxDepth: {
@@ -1,9 +1,9 @@
1
- import { getType, isStateTreeNode } from '@jbrowse/mobx-state-tree';
1
+ import { getSnapshot, getType, isStateTreeNode } from '@jbrowse/mobx-state-tree';
2
2
  import { isPlainObject } from '../util/objectUtils.js';
3
3
  import { readConfObject } from './readConfObject.js';
4
4
  import { getConfigurationSchemaDefinition, getConfigurationSchemaMetadata, } from './schemaRegistry.js';
5
5
  import { isConfigurationModel, isConfigurationSchemaType, isConstantEntry, } from './schemaTypes.js';
6
- import { preProcessSnapshotWith } from './snapshotPreprocess.js';
6
+ import { preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.js';
7
7
  export function getConf(model, slotPath, args = {}) {
8
8
  return readConfObject(model.configuration, slotPath, args);
9
9
  }
@@ -66,7 +66,14 @@ function writeConfMember(conf, key, value) {
66
66
  const member = conf[key];
67
67
  const namespace = isPlainObject(value) ? namespaceMetadata(member) : undefined;
68
68
  if (namespace) {
69
- for (const [k, v] of Object.entries(preProcessSnapshotWith(namespace, value))) {
69
+ // refused as a whole before any member lands, so a bad member leaves the
70
+ // namespace as it was rather than half written and reported as rejected
71
+ const members = refusingUndeclaredKeys(() => {
72
+ const lifted = preProcessSnapshotWith(namespace, value);
73
+ getType(member).create({ ...getSnapshot(member), ...lifted });
74
+ return lifted;
75
+ });
76
+ for (const [k, v] of Object.entries(members)) {
70
77
  writeConfMember(member, k, v);
71
78
  }
72
79
  }
@@ -89,7 +96,9 @@ function writeConfMember(conf, key, value) {
89
96
  export function applyConfSettings(target, settings) {
90
97
  const conf = isConfigurationModel(target) ? target : target.configuration;
91
98
  const meta = getConfigurationSchemaMetadata(conf);
92
- const values = meta ? preProcessSnapshotWith(meta, settings) : settings;
99
+ const values = meta
100
+ ? preProcessSnapshotWith(meta, settings, { routesUndeclared: true })
101
+ : settings;
93
102
  const report = { applied: [], undeclared: {}, failed: [] };
94
103
  for (const [key, value] of Object.entries(values)) {
95
104
  const declared = Object.hasOwn(meta?.definition ?? {}, key)
@@ -15,7 +15,7 @@ export { evaluateForFeature, readConfObject, readConfigValue, } from './readConf
15
15
  export { applyConfSettings, getConf, setConf } from './getConf.ts';
16
16
  export type { ConfSettingsReport } from './getConf.ts';
17
17
  export { fillLocations } from './fillLocations.ts';
18
- export { applyRetiredSpellings, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, } from './snapshotPreprocess.ts';
18
+ export { applyRetiredSpellings, declaredSnapshot, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.ts';
19
19
  export { shorthandTargets, shorthandTargetsOf } from './schemaTypes.ts';
20
20
  export type { ShorthandForm } from './schemaTypes.ts';
21
21
  export { requirementProblems } from './requirements.ts';