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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/README.md +450 -132
  2. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
  3. package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
  4. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +6 -2
  5. package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +18 -3
  6. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.d.ts +2 -1
  7. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.js +4 -2
  8. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -1
  9. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +4 -2
  10. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.d.ts +2 -1
  11. package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.js +4 -2
  12. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +5 -4
  13. package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +6 -4
  14. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -1
  15. package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +4 -2
  16. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +3 -2
  17. package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +4 -2
  18. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +2 -2
  19. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.d.ts +3 -2
  20. package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.js +4 -2
  21. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +3 -2
  22. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +4 -2
  23. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +3 -2
  24. package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +4 -2
  25. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.d.ts +3 -2
  26. package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +4 -2
  27. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +3 -2
  28. package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +4 -2
  29. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
  30. package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +4 -2
  31. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +3 -2
  32. package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js +4 -2
  33. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.d.ts +3 -2
  34. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.js +4 -2
  35. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -1
  36. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +15 -24
  37. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -1
  38. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
  39. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
  40. package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
  41. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.d.ts +3 -1
  42. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.js +2 -2
  43. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
  44. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
  45. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
  46. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
  47. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
  48. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
  49. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
  50. package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
  51. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +4 -2
  52. package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +29 -20
  53. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
  54. package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
  55. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +3 -3
  56. package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
  57. package/esm/BaseFeatureWidget/stateModelFactory.d.ts +9 -0
  58. package/esm/BaseFeatureWidget/stateModelFactory.js +11 -0
  59. package/esm/BaseFeatureWidget/types.d.ts +2 -0
  60. package/esm/PluginManager.d.ts +7 -3
  61. package/esm/PluginManager.js +12 -3
  62. package/esm/ReExports/coreModules.generated.js +538 -518
  63. package/esm/ReExports/coreWorkerModules.generated.js +456 -438
  64. package/esm/ReExports/lazify.js +3 -2
  65. package/esm/ReExports/list.js +22 -6
  66. package/esm/ReExports/names.d.ts +1 -0
  67. package/esm/ReExports/names.generated.d.ts +2 -0
  68. package/esm/ReExports/names.generated.js +566 -0
  69. package/esm/ReExports/names.js +3 -0
  70. package/esm/TextSearch/TextSearchManager.d.ts +3 -3
  71. package/esm/TextSearch/TextSearchManager.js +6 -13
  72. package/esm/assemblyManager/assembly.d.ts +9 -0
  73. package/esm/assemblyManager/assembly.js +13 -0
  74. package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
  75. package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
  76. package/esm/assemblyManager/assemblyManager.d.ts +11 -0
  77. package/esm/assemblyManager/assemblyManager.js +2 -0
  78. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
  79. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
  80. package/esm/checkPlugins.js +10 -4
  81. package/esm/configuration/configurationSchema.d.ts +51 -100
  82. package/esm/configuration/configurationSchema.js +59 -225
  83. package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
  84. package/esm/configuration/configurationSchemaUnion.js +2 -1
  85. package/esm/configuration/configurationSlot.d.ts +18 -64
  86. package/esm/configuration/configurationSlot.js +32 -98
  87. package/esm/configuration/fillLocations.d.ts +4 -2
  88. package/esm/configuration/fillLocations.js +9 -3
  89. package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
  90. package/esm/configuration/formatAboutConfigSchema.js +2 -2
  91. package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
  92. package/esm/configuration/formatDetailsConfigSchema.js +7 -5
  93. package/esm/configuration/getConf.d.ts +7 -36
  94. package/esm/configuration/getConf.js +20 -41
  95. package/esm/configuration/index.d.ts +4 -3
  96. package/esm/configuration/index.js +3 -2
  97. package/esm/configuration/partitionAdvanced.d.ts +12 -0
  98. package/esm/configuration/partitionAdvanced.js +42 -0
  99. package/esm/configuration/plot.d.ts +6 -0
  100. package/esm/configuration/plot.js +56 -9
  101. package/esm/configuration/readConfObject.d.ts +15 -17
  102. package/esm/configuration/readConfObject.js +19 -50
  103. package/esm/configuration/schemaRegistry.d.ts +0 -2
  104. package/esm/configuration/schemaTypes.js +5 -1
  105. package/esm/configuration/slotFacade.js +2 -2
  106. package/esm/configuration/snapshotPreprocess.d.ts +42 -18
  107. package/esm/configuration/snapshotPreprocess.js +95 -37
  108. package/esm/configuration/tabixShorthand.js +1 -3
  109. package/esm/configuration/types.d.ts +60 -159
  110. package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
  111. package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
  112. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
  113. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
  114. package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
  115. package/esm/data_adapters/BaseAdapter/index.js +0 -1
  116. package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
  117. package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
  118. package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
  119. package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
  120. package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
  121. package/esm/data_adapters/dataAdapterCache.js +68 -24
  122. package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
  123. package/esm/data_adapters/getFeatureAdapter.js +17 -0
  124. package/esm/pluggableElementTypes/DisplayType.d.ts +7 -0
  125. package/esm/pluggableElementTypes/DisplayType.js +7 -0
  126. package/esm/pluggableElementTypes/RpcMethodType.d.ts +7 -0
  127. package/esm/pluggableElementTypes/RpcMethodType.js +9 -0
  128. package/esm/pluggableElementTypes/addMenuItems.d.ts +2 -1
  129. package/esm/pluggableElementTypes/addMenuItems.js +2 -1
  130. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
  131. package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
  132. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -5
  133. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +57 -9
  134. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -7
  135. package/esm/pluggableElementTypes/models/BaseTrackModel.js +9 -10
  136. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
  137. package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
  138. package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
  139. package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
  140. package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
  141. package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
  142. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
  143. package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
  144. package/esm/pluggableElementTypes/models/baseTrackConfig.js +12 -1
  145. package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
  146. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
  147. package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
  148. package/esm/pluginDefinitions.d.ts +7 -0
  149. package/esm/pluginDefinitions.js +20 -0
  150. package/esm/rpc/RpcRegistry.d.ts +2 -11
  151. package/esm/rpc/byteBudget.d.ts +15 -0
  152. package/esm/rpc/byteBudget.js +23 -0
  153. package/esm/rpc/configSchema.d.ts +2 -0
  154. package/esm/rpc/configSchema.js +3 -1
  155. package/esm/rpc/coreRpcMethods.d.ts +1 -2
  156. package/esm/rpc/coreRpcMethods.js +1 -2
  157. package/esm/rpc/explainTransferError.js +3 -3
  158. package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
  159. package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
  160. package/esm/rpc/methods/CoreLoadTrackCode.d.ts +17 -0
  161. package/esm/rpc/methods/CoreLoadTrackCode.js +24 -0
  162. package/esm/rpc/methods/layerFeatures.d.ts +9 -6
  163. package/esm/rpc/methods/layerFeatures.js +21 -5
  164. package/esm/ui/ActionLink.d.ts +3 -2
  165. package/esm/ui/ActionLink.js +4 -2
  166. package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
  167. package/esm/ui/AddCustomPluginDialog.js +6 -4
  168. package/esm/ui/AppLogo.js +43 -3
  169. package/esm/ui/BaseTooltip.d.ts +3 -2
  170. package/esm/ui/BaseTooltip.js +4 -2
  171. package/esm/ui/CascadingMenu.js +14 -12
  172. package/esm/ui/CascadingMenuButton.d.ts +2 -2
  173. package/esm/ui/CascadingMenuButton.js +5 -4
  174. package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
  175. package/esm/ui/CascadingMenuHelpDialog.js +4 -2
  176. package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
  177. package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
  178. package/esm/ui/ColorPicker.d.ts +5 -4
  179. package/esm/ui/ColorPicker.js +6 -4
  180. package/esm/ui/ContextMenu.d.ts +1 -1
  181. package/esm/ui/ContextMenu.js +1 -1
  182. package/esm/ui/CopyToClipboardButton.d.ts +3 -2
  183. package/esm/ui/CopyToClipboardButton.js +4 -2
  184. package/esm/ui/Crosshairs.js +13 -10
  185. package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
  186. package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
  187. package/esm/ui/DataGridFlexContainer.d.ts +3 -2
  188. package/esm/ui/DataGridFlexContainer.js +4 -2
  189. package/esm/ui/Dialog.d.ts +1 -1
  190. package/esm/ui/Dialog.js +5 -4
  191. package/esm/ui/DropDownMenu.js +2 -2
  192. package/esm/ui/EditableTypography.d.ts +1 -1
  193. package/esm/ui/EditableTypography.js +3 -2
  194. package/esm/ui/ErrorActions.d.ts +3 -2
  195. package/esm/ui/ErrorActions.js +4 -2
  196. package/esm/ui/ErrorBanner.d.ts +2 -2
  197. package/esm/ui/ErrorBanner.js +3 -2
  198. package/esm/ui/ErrorBar.d.ts +3 -2
  199. package/esm/ui/ErrorBar.js +4 -2
  200. package/esm/ui/ErrorMessage.d.ts +3 -2
  201. package/esm/ui/ErrorMessage.js +4 -2
  202. package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
  203. package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
  204. package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
  205. package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
  206. package/esm/ui/ErrorOverlay.d.ts +3 -2
  207. package/esm/ui/ErrorOverlay.js +4 -2
  208. package/esm/ui/ExportSvgDialog.d.ts +3 -2
  209. package/esm/ui/ExportSvgDialog.js +4 -2
  210. package/esm/ui/ExternalLink.d.ts +2 -1
  211. package/esm/ui/ExternalLink.js +4 -2
  212. package/esm/ui/FactoryResetDialog.d.ts +3 -2
  213. package/esm/ui/FactoryResetDialog.js +4 -2
  214. package/esm/ui/FatalErrorDialog.d.ts +3 -2
  215. package/esm/ui/FatalErrorDialog.js +6 -4
  216. package/esm/ui/FileDropZone.d.ts +3 -2
  217. package/esm/ui/FileDropZone.js +4 -2
  218. package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
  219. package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
  220. package/esm/ui/FileSelector/LocationInput.js +4 -2
  221. package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
  222. package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
  223. package/esm/ui/GpuFallbackButton.d.ts +3 -2
  224. package/esm/ui/GpuFallbackButton.js +4 -2
  225. package/esm/ui/HoverMenu.d.ts +2 -2
  226. package/esm/ui/HoverMenu.js +7 -3
  227. package/esm/ui/HoverTooltip.d.ts +3 -2
  228. package/esm/ui/HoverTooltip.js +4 -2
  229. package/esm/ui/Icons.d.ts +5 -5
  230. package/esm/ui/Icons.js +11 -10
  231. package/esm/ui/InlineMenuControls.d.ts +2 -2
  232. package/esm/ui/InlineMenuControls.js +4 -3
  233. package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
  234. package/esm/ui/JexlFilterRowEditors.js +9 -8
  235. package/esm/ui/LabeledCheckbox.d.ts +3 -2
  236. package/esm/ui/LabeledCheckbox.js +4 -2
  237. package/esm/ui/LazyBaseTooltip.d.ts +12 -3
  238. package/esm/ui/LazyBaseTooltip.js +4 -2
  239. package/esm/ui/LegendSwatchGlyph.js +1 -0
  240. package/esm/ui/LoadingDots.d.ts +2 -1
  241. package/esm/ui/LoadingDots.js +4 -2
  242. package/esm/ui/LoadingEllipses.d.ts +5 -2
  243. package/esm/ui/LoadingEllipses.js +5 -3
  244. package/esm/ui/LoadingOverlay.d.ts +3 -2
  245. package/esm/ui/LoadingOverlay.js +4 -2
  246. package/esm/ui/LoadingProgress.d.ts +3 -2
  247. package/esm/ui/LoadingProgress.js +4 -2
  248. package/esm/ui/Logo.d.ts +2 -2
  249. package/esm/ui/Logo.js +9 -8
  250. package/esm/ui/MenuItemChevron.d.ts +2 -2
  251. package/esm/ui/MenuItemChevron.js +3 -2
  252. package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
  253. package/esm/ui/MenuItemEndDecoration.js +3 -2
  254. package/esm/ui/MenuItemTrailing.d.ts +2 -2
  255. package/esm/ui/MenuItemTrailing.js +7 -6
  256. package/esm/ui/MenuTypes.d.ts +21 -1
  257. package/esm/ui/MenuTypes.js +20 -0
  258. package/esm/ui/MonospaceTextField.d.ts +3 -2
  259. package/esm/ui/MonospaceTextField.js +4 -2
  260. package/esm/ui/NumberTextField.d.ts +2 -2
  261. package/esm/ui/NumberTextField.js +4 -2
  262. package/esm/ui/PaletteContext.d.ts +11 -9
  263. package/esm/ui/PaletteContext.js +33 -18
  264. package/esm/ui/PluginStoreCard.d.ts +3 -2
  265. package/esm/ui/PluginStoreCard.js +4 -2
  266. package/esm/ui/PopoverPicker.d.ts +3 -2
  267. package/esm/ui/PopoverPicker.js +4 -2
  268. package/esm/ui/PrerenderedCanvas.d.ts +2 -2
  269. package/esm/ui/PrerenderedCanvas.js +3 -2
  270. package/esm/ui/RedErrorMessageBox.d.ts +3 -2
  271. package/esm/ui/RedErrorMessageBox.js +4 -2
  272. package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
  273. package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
  274. package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
  275. package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
  276. package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
  277. package/esm/ui/ReplaceCurrentViewButton.js +4 -2
  278. package/esm/ui/ResizeHandle.d.ts +2 -2
  279. package/esm/ui/ResizeHandle.js +3 -2
  280. package/esm/ui/SanitizedHTML.d.ts +3 -2
  281. package/esm/ui/SanitizedHTML.js +6 -4
  282. package/esm/ui/ScrollChrome.d.ts +3 -2
  283. package/esm/ui/ScrollChrome.js +4 -2
  284. package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
  285. package/esm/ui/ScrollEdgeShadow.js +2 -2
  286. package/esm/ui/SessionJsonPanel.d.ts +3 -2
  287. package/esm/ui/SessionJsonPanel.js +4 -2
  288. package/esm/ui/ShareLinkField.d.ts +3 -2
  289. package/esm/ui/ShareLinkField.js +4 -2
  290. package/esm/ui/SingleSlider.d.ts +2 -2
  291. package/esm/ui/SingleSlider.js +4 -2
  292. package/esm/ui/SliderTooltip.d.ts +2 -1
  293. package/esm/ui/SliderTooltip.js +4 -2
  294. package/esm/ui/SnackbarContents.d.ts +3 -2
  295. package/esm/ui/SnackbarContents.js +4 -2
  296. package/esm/ui/SnackbarModel.d.ts +2 -0
  297. package/esm/ui/SnackbarModel.js +2 -0
  298. package/esm/ui/StackTraceButton.d.ts +3 -2
  299. package/esm/ui/StackTraceButton.js +4 -2
  300. package/esm/ui/StatusProgressBar.d.ts +3 -2
  301. package/esm/ui/StatusProgressBar.js +4 -2
  302. package/esm/ui/SubmitForm.d.ts +2 -1
  303. package/esm/ui/SubmitForm.js +4 -2
  304. package/esm/ui/SvgColorLegend.d.ts +3 -4
  305. package/esm/ui/SvgColorLegend.js +27 -18
  306. package/esm/ui/TagTextField.d.ts +2 -2
  307. package/esm/ui/TagTextField.js +4 -2
  308. package/esm/ui/ViewLoadingScreen.d.ts +3 -2
  309. package/esm/ui/ViewLoadingScreen.js +4 -2
  310. package/esm/ui/buildExtraTrackMenuItems.d.ts +2 -2
  311. package/esm/ui/colorScale.d.ts +5 -1
  312. package/esm/ui/colorScale.js +12 -10
  313. package/esm/ui/colors.d.ts +42 -31
  314. package/esm/ui/colors.js +85 -48
  315. package/esm/ui/filterMenuItems.d.ts +10 -31
  316. package/esm/ui/filterMenuItems.js +13 -14
  317. package/esm/ui/index.d.ts +1 -1
  318. package/esm/ui/index.js +1 -1
  319. package/esm/ui/launchTargetsMenuItem.js +9 -13
  320. package/esm/ui/legendMenuItem.d.ts +4 -4
  321. package/esm/ui/legendMenuItem.js +4 -4
  322. package/esm/ui/menuItemAdornment.d.ts +1 -1
  323. package/esm/ui/menuItemAdornment.js +1 -1
  324. package/esm/ui/menuItems.d.ts +1 -1
  325. package/esm/ui/menuItems.js +1 -1
  326. package/esm/ui/menuLabels.d.ts +2 -2
  327. package/esm/ui/menuLabels.js +2 -2
  328. package/esm/ui/multiTrackMenuItems.d.ts +2 -2
  329. package/esm/ui/palette.d.ts +2 -2
  330. package/esm/ui/palette.js +10 -10
  331. package/esm/ui/radioSubMenu.d.ts +5 -3
  332. package/esm/ui/radioSubMenu.js +2 -2
  333. package/esm/ui/rampKey.d.ts +15 -0
  334. package/esm/ui/rampKey.js +17 -0
  335. package/esm/ui/showSubMenu.d.ts +0 -5
  336. package/esm/ui/showSubMenu.js +6 -15
  337. package/esm/ui/theme.d.ts +2 -2
  338. package/esm/ui/theme.js +1 -1
  339. package/esm/ui/useAssemblySelection.d.ts +2 -0
  340. package/esm/ui/useMouseTracking.d.ts +8 -20
  341. package/esm/ui/useMouseTracking.js +23 -62
  342. package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
  343. package/esm/ui/usePlacedMenuFocus.js +28 -0
  344. package/esm/util/Base1DViewModel.d.ts +5 -3
  345. package/esm/util/Base1DViewModel.js +5 -3
  346. package/esm/util/SvgCanvas.js +1 -1
  347. package/esm/util/aggregateFieldName.d.ts +1 -10
  348. package/esm/util/aggregateFieldName.js +1 -8
  349. package/esm/util/alignedBytes.d.ts +19 -0
  350. package/esm/util/alignedBytes.js +37 -0
  351. package/esm/util/analytics.d.ts +6 -9
  352. package/esm/util/analytics.js +148 -15
  353. package/esm/util/bezierConnector.d.ts +20 -0
  354. package/esm/util/bezierConnector.js +34 -96
  355. package/esm/util/cacheBudgets.d.ts +3 -0
  356. package/esm/util/cacheBudgets.js +3 -0
  357. package/esm/util/categoricalField.d.ts +24 -4
  358. package/esm/util/categoricalField.js +38 -5
  359. package/esm/util/cellMatches.js +14 -14
  360. package/esm/util/cellsStep.d.ts +3 -5
  361. package/esm/util/cellsStep.js +31 -29
  362. package/esm/util/color/index.d.ts +1 -1
  363. package/esm/util/color/index.js +2 -2
  364. package/esm/util/color-bits/bit.js +1 -1
  365. package/esm/util/color-bits/parse.js +28 -17
  366. package/esm/util/colorBits.d.ts +15 -4
  367. package/esm/util/colorBits.js +38 -15
  368. package/esm/util/colorRamp.d.ts +3 -3
  369. package/esm/util/colorRamp.js +20 -2
  370. package/esm/util/colorScale.d.ts +123 -22
  371. package/esm/util/colorScale.js +157 -28
  372. package/esm/util/colorSchemes.d.ts +7 -3
  373. package/esm/util/colorSchemes.js +8 -2
  374. package/esm/util/createSvgRasterCanvas.d.ts +14 -1
  375. package/esm/util/createSvgRasterCanvas.js +36 -12
  376. package/esm/util/diagonalizeRegions.js +18 -9
  377. package/esm/util/featureTransforms.d.ts +2 -2
  378. package/esm/util/featureTransforms.js +85 -135
  379. package/esm/util/fileHandleStore.js +5 -0
  380. package/esm/util/groupKeys.d.ts +5 -4
  381. package/esm/util/groupKeys.js +15 -9
  382. package/esm/util/index.js +1 -1
  383. package/esm/util/installFetch.d.ts +2 -2
  384. package/esm/util/installPrerequisiteFetch.d.ts +8 -3
  385. package/esm/util/installPrerequisiteFetch.js +9 -7
  386. package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
  387. package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
  388. package/esm/util/isoformRank.d.ts +39 -0
  389. package/esm/util/isoformRank.js +118 -0
  390. package/esm/util/jexl.js +1 -1
  391. package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
  392. package/esm/util/layouts/GranularRectLayout.js +57 -34
  393. package/esm/util/leadingEdgeAutorun.d.ts +9 -1
  394. package/esm/util/leadingEdgeAutorun.js +5 -2
  395. package/esm/util/markEncoding.d.ts +10 -8
  396. package/esm/util/markEncoding.js +50 -12
  397. package/esm/util/markEncodingTypes.d.ts +77 -21
  398. package/esm/util/originCut.d.ts +14 -0
  399. package/esm/util/originCut.js +19 -0
  400. package/esm/util/paintLayer.d.ts +1 -1
  401. package/esm/util/paintLayer.js +4 -3
  402. package/esm/util/pathSeries.d.ts +18 -0
  403. package/esm/util/pathSeries.js +143 -0
  404. package/esm/util/pressOwner.d.ts +20 -0
  405. package/esm/util/pressOwner.js +26 -0
  406. package/esm/util/quantileExtent.d.ts +23 -1
  407. package/esm/util/quantileExtent.js +25 -2
  408. package/esm/util/rowStackGeometry.d.ts +1 -1
  409. package/esm/util/rowStackGeometry.js +1 -1
  410. package/esm/util/sessionActivity.d.ts +36 -0
  411. package/esm/util/sessionActivity.js +88 -0
  412. package/esm/util/stepOutputs.d.ts +165 -0
  413. package/esm/util/stepOutputs.js +201 -0
  414. package/esm/util/stepTables.d.ts +7 -3
  415. package/esm/util/stepTables.js +86 -3
  416. package/esm/util/systemColorScheme.d.ts +4 -0
  417. package/esm/util/systemColorScheme.js +21 -0
  418. package/esm/util/tabix.d.ts +1 -1
  419. package/esm/util/tabix.js +1 -1
  420. package/esm/util/temporaryAssembly.d.ts +2 -2
  421. package/esm/util/temporaryAssembly.js +2 -3
  422. package/esm/util/thresholdScale.d.ts +1 -1
  423. package/esm/util/thresholdScale.js +1 -1
  424. package/esm/util/trackConfigDelta.d.ts +1 -1
  425. package/esm/util/tracks.d.ts +25 -15
  426. package/esm/util/tracks.js +68 -44
  427. package/esm/util/types/index.d.ts +15 -7
  428. package/esm/util/types/index.js +21 -2
  429. package/esm/util/usePanZoom.js +4 -10
  430. package/esm/util/useRowVirtualScroll.d.ts +1 -0
  431. package/esm/util/windowStep.d.ts +6 -0
  432. package/esm/util/windowStep.js +153 -0
  433. package/package.json +27 -16
  434. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
  435. package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
  436. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
  437. package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
  438. package/esm/rpc/methods/CoreLoadAdapterCode.d.ts +0 -13
  439. package/esm/rpc/methods/CoreLoadAdapterCode.js +0 -16
@@ -3,28 +3,22 @@ import { isCssColor } from '../util/cssColorParse.js';
3
3
  import { isJexl, stringToJexlExpression } from '../util/jexlStrings.js';
4
4
  import { FileLocation, JexlExpressionString } from '../util/types/mst.js';
5
5
  import { isCallbackValue } from './slotValueUtils.js';
6
- // What a color slot admits is what the painters parse (`isCssColor`), plus the
7
- // empty string a slot such as `outlineColor` spells "none" with; a field name
8
- // written where a color goes used to load and paint the invalid sentinel.
9
6
  function notAColor(value) {
10
- 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()", or "transparent"; a color computed per feature is a "jexl:" callback, in a slot that takes one`;
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`;
11
8
  }
9
+ // '' is a color slot's "none", as in `rowColor.unknown`
12
10
  const CssColorType = types.refinement('CssColor', types.string, value => value === '' || isCssColor(value), notAColor);
13
- // An entry of a colour list has no "none" to spell, so '' is refused with the
14
- // rest of what is not a colour.
11
+ // a color list's entry has no "none" to spell
15
12
  const CssColorEntryType = types.refinement('CssColorEntry', types.string, isCssColor, notAColor);
16
13
  const MaybeFileLocation = types.snapshotProcessor(types.maybe(FileLocation), {
17
- preProcessor: (snap) => snap && 'uri' in snap && snap.uri === '' ? undefined : snap,
14
+ preProcessor: (snap) => snap &&
15
+ (('uri' in snap && snap.uri === '') ||
16
+ ('localPath' in snap && snap.localPath === ''))
17
+ ? undefined
18
+ : snap,
18
19
  });
19
- // Single source of truth for the builtin slot type names, pairing each with its
20
- // MST value type and its editor fallback default. Keeping model + fallback in
21
- // one table means adding a slot type is one edit and can't half-register.
22
- //
23
- // `satisfies` rather than an annotation: a `Record<string, …>` annotation
24
- // widens the keys to `string`, which is what let `type: 'enum'` — a name this
25
- // table has never had — compile for years and silently lose the config
26
- // editor's dropdown. The literal keys are what `ConfigSlotType` below is made
27
- // of.
20
+ // The slot type vocabulary. `satisfies`, not an annotation, so the literal keys
21
+ // make up `ConfigSlotType`; every surface naming a type checks against it.
28
22
  const slotTypes = {
29
23
  stringArray: { model: types.array(types.string), fallbackDefault: [] },
30
24
  expressionArray: {
@@ -42,23 +36,17 @@ const slotTypes = {
42
36
  color: { model: CssColorType, fallbackDefault: 'black' },
43
37
  integer: { model: types.integer, fallbackDefault: 1 },
44
38
  number: { model: types.number, fallbackDefault: 1 },
45
- // The `maybe*` types spend `undefined` on "not explicitly set", which is the
46
- // one value no config can spell and so the only reliable way to say it — a
47
- // computed/auto fallback, e.g. a drag-resized track height.
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 color
48
41
  maybeNumber: { model: types.maybe(types.number) },
49
42
  maybeBoolean: { model: types.maybe(types.boolean) },
50
- // for a slot whose unset state means "decide from the data" — a feature's own
51
- // BED itemRgb, say
52
43
  maybeColor: { model: types.maybe(CssColorType) },
53
- // object-valued, e.g. alignments `sortedBy`
54
44
  maybeFrozen: { model: types.maybe(types.frozen()) },
55
- // for text whose unset state is a third thing beside some text and none: an
56
- // axis title is derived while unset, and drawn bare once it is ''
57
45
  maybeString: { model: types.maybe(types.string) },
58
46
  string: { model: types.string, fallbackDefault: '' },
59
47
  text: { model: types.string, fallbackDefault: '' },
60
- // a field the display reads per feature: a name, a dotted path, or a
61
- // `jexl:` expression, which the display evaluates and the reader never does
48
+ // a field the display reads per feature; its `jexl:` expression is the
49
+ // display's to evaluate, never the reader's
62
50
  featureField: { model: types.string, fallbackDefault: '' },
63
51
  fileLocation: {
64
52
  model: FileLocation,
@@ -67,48 +55,25 @@ const slotTypes = {
67
55
  locationType: 'UriLocation',
68
56
  },
69
57
  },
70
- // for a sidecar the adapter works without: unset means no file is
71
- // configured, and so does the `{ uri: '' }` a cleared URL field in the
72
- // config editor writes
58
+ // a sidecar the adapter works without; the editor's cleared `{ uri: '' }`
59
+ // reads as unset
73
60
  maybeFileLocation: { model: MaybeFileLocation },
74
61
  frozen: { model: types.frozen(), fallbackDefault: {} },
75
62
  };
76
- // The types with no builtin table entry, because the author supplies the
77
- // `types.enumeration` as `model` and `ConfigSlot` wraps it: in `types.maybe`
78
- // for `maybeStringEnum`, in `types.array` for `stringEnumArray`. Named once,
79
- // and spliced into both the type union and the runtime set below so those two
80
- // cannot drift apart.
63
+ // the author supplies the `types.enumeration` as `model`, and `ConfigSlot`
64
+ // wraps it in `types.maybe` or `types.array`
81
65
  const ENUM_SLOT_TYPES = [
82
66
  'stringEnum',
83
67
  'maybeStringEnum',
84
68
  'stringEnumArray',
85
69
  ];
86
- /**
87
- * The same closed set, at runtime, because the type alone does not close it for
88
- * the callers that matter most: `ConfigSlot` is plugin-facing, and a JS plugin
89
- * or one built against an older core reaches it with no checking at all. Those
90
- * are exactly the callers that hit the silent-degradation trap above, and
91
- * `type: 'enum'` — a name this table has never had — is the one that did.
92
- *
93
- * Typed `Set<string>` rather than `Set<ConfigSlotType>` so the membership test
94
- * stays a question TypeScript has not already answered for in-tree callers. It
95
- * is a real runtime check, not a restatement of the signature.
96
- */
70
+ // the same set at runtime, for a JS plugin the type never checked
97
71
  const CONFIG_SLOT_TYPE_NAMES = new Set([
98
72
  ...Object.keys(slotTypes),
99
73
  ...ENUM_SLOT_TYPES,
100
74
  ]);
101
- // Lookup view over the table. The two enum types are legal `ConfigSlotType`s
102
- // with no entry, so indexing by the union has to tolerate a miss — this states
103
- // that in the type rather than casting it away at each call.
104
75
  const builtinSlotTypes = slotTypes;
105
- // The slot types whose default is `undefined` — the genuine "unset" state,
106
- // distinguishable from every value a config can spell. Mostly derived from the
107
- // table above (they're exactly the entries with no `fallbackDefault`, since
108
- // "unset" is their fixed form) so the two can't drift. `maybeStringEnum` is
109
- // named explicitly because, like plain `stringEnum`, it has no builtin model:
110
- // the author supplies the enumeration and `ConfigSlot` wraps it in
111
- // `types.maybe`.
76
+ // an entry with no `fallbackDefault` is one whose fixed form is unset
112
77
  const MAYBE_TYPES = new Set([
113
78
  ...Object.entries(slotTypes)
114
79
  .filter(([, spec]) => spec.fallbackDefault === undefined)
@@ -135,23 +100,10 @@ function refusingCallbacks(model) {
135
100
  return types.refinement(model, value => !isJexl(value), notACallbackSlot);
136
101
  }
137
102
  /**
138
- * A configuration slot is a plain MST property holding the slot's value type,
139
- * or, where the slot declares a `contextVariable`, that or a `jexl:...`
140
- * callback string. Every other slot refuses a `jexl:` string, so a callback
141
- * the reader would evaluate is one the schema says it takes. A `featureField`
142
- * holds a `jexl:` expression as its value, which the display evaluates per
143
- * feature. The value lives directly on the parent configuration model — there
144
- * is no per-slot sub-model. `types.stripDefault` omits the property from the
145
- * parent snapshot when it equals the default, so saved sessions stay minimal.
146
- * Per-slot metadata (type/description/defaultValue/contextVariable) lives in
147
- * the schema registry (a WeakMap keyed by the MST type, see
148
- * schemaRegistry.ts); jexl callbacks are evaluated on read by
149
- * `readConfObject`.
150
- *
151
- * Interning the returned type on `(type, model, defaultValue)` was prototyped
152
- * and declined: a session builds 1197 slot types for 222 distinct ones, and
153
- * removing the repeats moves neither the time nor the heap
154
- * (`config-schema-construction`, published in `reference/EAGER_BUNDLE.md`).
103
+ * The MST property a slot is: its value type, or that or a `jexl:` callback
104
+ * where the slot declares a `contextVariable` (ADR-155), stripped from the
105
+ * snapshot at its default. Interning these was measured and declined
106
+ * (`config-schema-construction` in `reference/EAGER_BUNDLE.md`).
155
107
  */
156
108
  export default function ConfigSlot(definition) {
157
109
  const { model, type, defaultValue } = definition;
@@ -162,24 +114,15 @@ export default function ConfigSlot(definition) {
162
114
  if (!valueModel) {
163
115
  throw new Error(`no builtin config slot type "${type}", and no 'model' param provided`);
164
116
  }
165
- // the `maybe*` types intentionally default to `undefined` (the "unset"
166
- // state); every other slot type must declare a concrete default so a missing
167
- // one is caught as an authoring mistake.
117
+ if (defaultValue === null) {
118
+ throw new Error(`a slot cannot default to null, which a write reads as a reset to the default (ADR-146): a slot meaning "unset" is a maybe* type, such as maybeFrozen`);
119
+ }
168
120
  if (defaultValue === undefined && !MAYBE_TYPES.has(type)) {
169
121
  throw new Error("no 'defaultValue' provided");
170
122
  }
171
- // The inverse of the `defaultValue === undefined` check above, and the half
172
- // that had no guard. A `maybe*` slot whose default is concrete can never *be*
173
- // unset — no config can spell `undefined` — so the unset state such a slot
174
- // exists to express (auto-fit, decide-from-the-data, inherit) is unreachable
175
- // and the branch reading it never runs. There is no symptom: the slot reads as
176
- // a perfectly good value everywhere.
177
- //
178
- // The way this happens is **inheritance**, which is why the type can't catch
179
- // it: a `maybe*` override of a plain base slot inherits the base's concrete
180
- // default through the definition spread, and the override's own literal looks
181
- // right. `LinearMafDisplay.height` over `BaseLinearDisplay`'s `number`/100 is
182
- // the case in the repo, and only that display's own tests noticed.
123
+ // A concrete default makes a maybe* slot's unset state unreachable, with no
124
+ // symptom. It arrives by inheritance: an override spread over a base slot's
125
+ // default.
183
126
  if (defaultValue !== undefined && MAYBE_TYPES.has(type)) {
184
127
  throw new Error(`a "${type}" slot cannot have a concrete defaultValue (${JSON.stringify(defaultValue)}): unset is the state a maybe* slot exists for, and no config can spell undefined, so it would be unreachable. If this slot overrides a base slot, the base's defaultValue merged in — state 'defaultValue: undefined' to overwrite it. Otherwise use the non-maybe form of the type.`);
185
128
  }
@@ -187,7 +130,7 @@ export default function ConfigSlot(definition) {
187
130
  if (type === 'featureField' && callback) {
188
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\'.');
189
132
  }
190
- if (!callback && isJexl(defaultValue)) {
133
+ if (!callback && type !== 'featureField' && isJexl(defaultValue)) {
191
134
  throw new Error(`the defaultValue ${JSON.stringify(defaultValue)} is a jexl: callback, so the slot declares the contextVariable names it reads`);
192
135
  }
193
136
  const value = enumShaped(type, valueModel);
@@ -197,8 +140,6 @@ export default function ConfigSlot(definition) {
197
140
  ? value
198
141
  : refusingCallbacks(value), defaultValue);
199
142
  }
200
- // The author writes an enum slot's plain vocabulary, and the slot's shape
201
- // around it is added here.
202
143
  function enumShaped(type, model) {
203
144
  return type === 'maybeStringEnum'
204
145
  ? types.maybe(model)
@@ -206,14 +147,7 @@ function enumShaped(type, model) {
206
147
  ? types.array(model)
207
148
  : model;
208
149
  }
209
- /**
210
- * New value when converting a fixed-value slot to a jexl callback. Already-
211
- * callback values are returned unchanged.
212
- *
213
- * A single JSON.stringify covers every type: `jexl:${42}` and
214
- * `jexl:${JSON.stringify(42)}` are identical for numbers/booleans, and the rest
215
- * need the quoting/serialization anyway.
216
- */
150
+ /** A fixed value as the `jexl:` callback that returns it. */
217
151
  export function toCallbackValue(value) {
218
152
  return isCallbackValue(value) ? value : `jexl:${JSON.stringify(value)}`;
219
153
  }
@@ -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
@@ -72,16 +72,18 @@ export function FormatDetailsConfigSchemaFactory() {
72
72
  depth: {
73
73
  type: 'maybeNumber',
74
74
  description: 'levels of subfeature the formatDetails.subfeatures callback runs on, default 2',
75
+ advanced: true,
75
76
  },
76
77
  /**
77
78
  * #slot formatDetails.maxDepth
78
- * how many levels of subfeature card the panel renders at all, which is a
79
- * 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
80
81
  * limit. A track's value wins over the session's
81
82
  */
82
83
  maxDepth: {
83
84
  type: 'maybeNumber',
84
85
  description: 'hide subfeatures nested deeper than this, default no limit',
86
+ advanced: true,
85
87
  },
86
88
  });
87
89
  }
@@ -1,15 +1,8 @@
1
1
  import type { AnyConfigurationModel, AnyConfigurationSnapshot, ConfigurationSchemaForModel, ConfigurationSlotName, ConfigurationSlotPath, ConfigurationSlotPathValue, ConfigurationSlotValue } from './types.ts';
2
2
  /**
3
3
  * #api core/configuration
4
- * Reads a configuration value from a state model that has a `.configuration`
5
- * member (a track or display state model). For a raw configuration model, use
6
- * `readConfObject` instead.
7
- *
8
- * **This is exactly `readConfObject(model.configuration, path)`** — sugar for
9
- * the `.configuration` hop, and nothing more. The two readers carry the same
10
- * slot-name check, so reaching for the other one does not get a typo past tsc.
11
- * It does not consult the session and has no per-slot behavior; what you read is
12
- * what the track stores.
4
+ * Reads a configuration value from a track or display state model: exactly
5
+ * `readConfObject(model.configuration, path)`, with the same slot-name check.
13
6
  *
14
7
  * @param model - object containing a 'configuration' member
15
8
  * @param slotPaths - array of paths to read
@@ -29,33 +22,11 @@ export declare function getConf<CONFMODEL extends AnyConfigurationModel, const S
29
22
  * `setConf(self, ['scales', 'y', 'domainMin'], 5)`. Takes the display or track
30
23
  * model, or a config node directly.
31
24
  *
32
- * **The path length says what the write replaces.** A path ending on a slot
33
- * writes that slot and leaves the object around it alone; a path ending on a
34
- * sub-schema replaces the whole object, which is how a channel whose members
35
- * move together — a facet's field and the domain that field's values order —
36
- * gets written without a stale member surviving underneath.
37
- *
38
- * **Prefer this over a bare `self.configuration.setSlot('x', v)`.** The
39
- * constraint here mirrors `getConf`'s, so on a model with a concrete schema an
40
- * unknown slot name is a compile error. `setSlot` itself stays untyped on
41
- * purpose — the config editor's slot facade routes dynamic slot names through
42
- * it (`configurationSchema.ts`) — and guards the name at runtime instead
43
- * (ADR-052), so a misspelled write is diagnosed one way or the other.
44
- *
45
- * **The read is the half with no diagnostic at all.** `getConf` for a name the
46
- * schema doesn't declare returns `undefined` and reports nothing, at any layer,
47
- * so the slot keeps reading as its default forever. Which makes the
48
- * compile-time constraint worth keeping *reachable*: it is only as good as the
49
- * schema of the holder handed in, and a holder widened to
50
- * `AnyConfigurationModel` switches it off entirely — the trap a mixin casting
51
- * to reach its host walks into. Every such cast names a concrete schema instead
52
- * (`ConfigModelForFields`, or the base schema when the slot is the base's), and
53
- * `HostChecksSlotNames` pins each one.
54
- *
55
- * A wrong *value* type still throws at runtime (MST type-checks the assignment)
56
- * rather than at compile time. `value` is deliberately `unknown` because
57
- * `undefined` is a legitimate write — it resets a slot to its schema default —
58
- * and the declared slot value type doesn't include it.
25
+ * A path ending on a slot writes that slot; one ending on a sub-schema replaces
26
+ * the whole object, so a channel's members (a facet's field and its domain)
27
+ * move together. On a concrete schema an unknown slot name is a compile error,
28
+ * and `setSlot` refuses one at runtime (ADR-052). A wrong value type throws at
29
+ * runtime; `null` or `undefined` resets the slot to its default (ADR-146).
59
30
  *
60
31
  * @param target - a model with a `configuration` member, or a config node
61
32
  * @param slotPath - the slot to write, or the path to one
@@ -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
  }
@@ -14,33 +14,11 @@ export function getConf(model, slotPath, args = {}) {
14
14
  * `setConf(self, ['scales', 'y', 'domainMin'], 5)`. Takes the display or track
15
15
  * model, or a config node directly.
16
16
  *
17
- * **The path length says what the write replaces.** A path ending on a slot
18
- * writes that slot and leaves the object around it alone; a path ending on a
19
- * sub-schema replaces the whole object, which is how a channel whose members
20
- * move together — a facet's field and the domain that field's values order —
21
- * gets written without a stale member surviving underneath.
22
- *
23
- * **Prefer this over a bare `self.configuration.setSlot('x', v)`.** The
24
- * constraint here mirrors `getConf`'s, so on a model with a concrete schema an
25
- * unknown slot name is a compile error. `setSlot` itself stays untyped on
26
- * purpose — the config editor's slot facade routes dynamic slot names through
27
- * it (`configurationSchema.ts`) — and guards the name at runtime instead
28
- * (ADR-052), so a misspelled write is diagnosed one way or the other.
29
- *
30
- * **The read is the half with no diagnostic at all.** `getConf` for a name the
31
- * schema doesn't declare returns `undefined` and reports nothing, at any layer,
32
- * so the slot keeps reading as its default forever. Which makes the
33
- * compile-time constraint worth keeping *reachable*: it is only as good as the
34
- * schema of the holder handed in, and a holder widened to
35
- * `AnyConfigurationModel` switches it off entirely — the trap a mixin casting
36
- * to reach its host walks into. Every such cast names a concrete schema instead
37
- * (`ConfigModelForFields`, or the base schema when the slot is the base's), and
38
- * `HostChecksSlotNames` pins each one.
39
- *
40
- * A wrong *value* type still throws at runtime (MST type-checks the assignment)
41
- * rather than at compile time. `value` is deliberately `unknown` because
42
- * `undefined` is a legitimate write — it resets a slot to its schema default —
43
- * and the declared slot value type doesn't include it.
17
+ * A path ending on a slot writes that slot; one ending on a sub-schema replaces
18
+ * the whole object, so a channel's members (a facet's field and its domain)
19
+ * move together. On a concrete schema an unknown slot name is a compile error,
20
+ * and `setSlot` refuses one at runtime (ADR-052). A wrong value type throws at
21
+ * runtime; `null` or `undefined` resets the slot to its default (ADR-146).
44
22
  *
45
23
  * @param target - a model with a `configuration` member, or a config node
46
24
  * @param slotPath - the slot to write, or the path to one
@@ -49,13 +27,7 @@ export function getConf(model, slotPath, args = {}) {
49
27
  export function setConf(target, slotPath, value) {
50
28
  writeConfPath(isConfigurationModel(target) ? target : target.configuration, typeof slotPath === 'string' ? [slotPath] : slotPath, value);
51
29
  }
52
- /**
53
- * Walk to the node the last segment names a member of, then write that member
54
- * through whichever of the node's two write actions the member is: a
55
- * sub-schema, single or a collection, is replaced whole, and a slot goes
56
- * through `setSlot` so ADR-052's name guard and the value-type guard both run.
57
- * MST's `applyPatch` takes the same path and runs neither guard.
58
- */
30
+ // through setSlot or setSubschema, whose guards MST's `applyPatch` would skip
59
31
  function writeConfPath(conf, path, value) {
60
32
  if (!path.length) {
61
33
  throw new Error('setConf needs a slot name or a path to one');
@@ -69,9 +41,7 @@ function writeConfPath(conf, path, value) {
69
41
  node = child;
70
42
  }
71
43
  const leaf = path.at(-1);
72
- // Classify off the declaration, never off what the member holds: a
73
- // `stringArray` slot holds an array node, and an optional sub-schema nobody
74
- // has written yet holds nothing.
44
+ // off the declaration: a stringArray slot holds an array node too
75
45
  const declared = getConfigurationSchemaDefinition(node)?.[leaf];
76
46
  if (isConfigurationSchemaType(declared)) {
77
47
  // eslint-disable-next-line no-restricted-syntax -- this is setConf
@@ -96,7 +66,14 @@ function writeConfMember(conf, key, value) {
96
66
  const member = conf[key];
97
67
  const namespace = isPlainObject(value) ? namespaceMetadata(member) : undefined;
98
68
  if (namespace) {
99
- 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)) {
100
77
  writeConfMember(member, k, v);
101
78
  }
102
79
  }
@@ -119,7 +96,9 @@ function writeConfMember(conf, key, value) {
119
96
  export function applyConfSettings(target, settings) {
120
97
  const conf = isConfigurationModel(target) ? target : target.configuration;
121
98
  const meta = getConfigurationSchemaMetadata(conf);
122
- const values = meta ? preProcessSnapshotWith(meta, settings) : settings;
99
+ const values = meta
100
+ ? preProcessSnapshotWith(meta, settings, { routesUndeclared: true })
101
+ : settings;
123
102
  const report = { applied: [], undeclared: {}, failed: [] };
124
103
  for (const [key, value] of Object.entries(values)) {
125
104
  const declared = Object.hasOwn(meta?.definition ?? {}, key)
@@ -3,18 +3,19 @@ export type { ConfigurationSchemaDefinition, RetiredSpelling, } from './configur
3
3
  export { ConfigurationSchemaUnion, arraySlotUnion, } from './configurationSchemaUnion.ts';
4
4
  export type { ConfigurationSchemaUnionType } from './configurationSchemaUnion.ts';
5
5
  export type { ConfigSlotDefinition } from './configurationSlot.ts';
6
- export type { AnyConfiguration, AnyConfigurationModel, AnyConfigurationSchemaType, AnyConfigurationSnapshot, ConfigModelForFields, ConfigNodeActions, ConfigNodeBrand, ConfigNodeProps, ConfigurationSchemaForModel, ConfigurationSlotName, ConfigurationSlotPath, ConfigurationSlotPathValue, ConfigurationSlotValue, ConfigurationSnapshot, HostChecksSlotNames, IdentifierSlotDef, PluggableConfigNode, TypeSlotDef, } from './types.ts';
6
+ export type { AnyConfiguration, AnyConfigurationModel, AnyConfigurationSchemaType, AnyConfigurationSnapshot, AnyTrackConfig, ConfigModelForFields, ConfigNodeActions, ConfigNodeBrand, ConfigNodeProps, ConfigurationSchemaForModel, ConfigurationSlotName, ConfigurationSlotPath, ConfigurationSlotPathValue, ConfigurationSlotValue, ConfigurationSnapshot, HostChecksSlotNames, IdentifierSlotDef, PluggableConfigNode, TrackConfigEntry, TypeSlotDef, } from './types.ts';
7
7
  export { getConfigurationSchemaDefinition, getConfigurationSchemaMetadata, getConfigurationSchemaUnion, } from './schemaRegistry.ts';
8
8
  export type { ConfigurationSchemaUnionMetadata } from './schemaRegistry.ts';
9
9
  export { getTypeNamesFromExplicitlyTypedUnion, isBareConfigurationSchemaType, isConfigurationModel, isConfigurationSchemaType, isConstantEntry, isSlotDefinitionEntry, } from './schemaTypes.ts';
10
+ export { partitionAdvanced } from './partitionAdvanced.ts';
10
11
  export { FormatAboutConfigSchemaFactory } from './formatAboutConfigSchema.ts';
11
12
  export { DEFAULT_FORMAT_DETAILS_DEPTH, FormatDetailsConfigSchemaFactory, } from './formatDetailsConfigSchema.ts';
12
13
  export { mergeFormatCallbacks } from './mergeFormatCallbacks.ts';
13
- export { readConfObject, readConfigValue } from './readConfObject.ts';
14
+ export { evaluateForFeature, readConfObject, readConfigValue, } from './readConfObject.ts';
14
15
  export { applyConfSettings, getConf, setConf } from './getConf.ts';
15
16
  export type { ConfSettingsReport } from './getConf.ts';
16
17
  export { fillLocations } from './fillLocations.ts';
17
- export { applyRetiredSpellings, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, } from './snapshotPreprocess.ts';
18
+ export { applyRetiredSpellings, declaredSnapshot, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.ts';
18
19
  export { shorthandTargets, shorthandTargetsOf } from './schemaTypes.ts';
19
20
  export type { ShorthandForm } from './schemaTypes.ts';
20
21
  export { requirementProblems } from './requirements.ts';
@@ -7,13 +7,14 @@ export { getConfigurationSchemaDefinition,
7
7
  // way to write the config
8
8
  getConfigurationSchemaMetadata, getConfigurationSchemaUnion, } from './schemaRegistry.js';
9
9
  export { getTypeNamesFromExplicitlyTypedUnion, isBareConfigurationSchemaType, isConfigurationModel, isConfigurationSchemaType, isConstantEntry, isSlotDefinitionEntry, } from './schemaTypes.js';
10
+ export { partitionAdvanced } from './partitionAdvanced.js';
10
11
  export { FormatAboutConfigSchemaFactory } from './formatAboutConfigSchema.js';
11
12
  export { DEFAULT_FORMAT_DETAILS_DEPTH, FormatDetailsConfigSchemaFactory, } from './formatDetailsConfigSchema.js';
12
13
  export { mergeFormatCallbacks } from './mergeFormatCallbacks.js';
13
- export { readConfObject, readConfigValue } from './readConfObject.js';
14
+ export { evaluateForFeature, readConfObject, readConfigValue, } from './readConfObject.js';
14
15
  export { applyConfSettings, getConf, setConf } from './getConf.js';
15
16
  export { fillLocations } from './fillLocations.js';
16
- export { applyRetiredSpellings, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, } from './snapshotPreprocess.js';
17
+ export { applyRetiredSpellings, declaredSnapshot, liftRetiredSpellings, preProcessConfigSnapshot, preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.js';
17
18
  export { shorthandTargets, shorthandTargetsOf } from './schemaTypes.js';
18
19
  export { requirementProblems } from './requirements.js';
19
20
  export { expandTabixShorthand, indexSnapshot, requestedIndexType, tabixIndexSnapshot, } from './tabixShorthand.js';
@@ -0,0 +1,12 @@
1
+ import type { AnyConfigurationModel } from './types.ts';
2
+ /**
3
+ * Splits a config snapshot in two: the slots a schema flags `advanced` or gives
4
+ * a `contextVariable` (a `jexl:` callback), and everything else. A sub-schema
5
+ * member splits member by member and appears on a side only if something landed
6
+ * there. A key the schema does not define as a slot (`trackId`, a typed
7
+ * schema's `type`, an array of sub-schemas) stays with the rest.
8
+ */
9
+ export declare function partitionAdvanced(node: AnyConfigurationModel, snapshot: Record<string, unknown>): {
10
+ rest: Record<string, unknown>;
11
+ advanced: Record<string, unknown>;
12
+ };
@@ -0,0 +1,42 @@
1
+ import { isPlainObject } from '../util/objectUtils.js';
2
+ import { getConfigurationSchemaDefinition } from './schemaRegistry.js';
3
+ import { isConfigurationModel, isSlotDefinitionEntry } from './schemaTypes.js';
4
+ // wider than the config editor's toggle, which reads only `advanced`: a callback
5
+ // is editable there, and only jexl noise to a reader of the About dialog
6
+ function foldsIntoAdvancedCard(def) {
7
+ return !!def.advanced || !!def.contextVariable?.length;
8
+ }
9
+ /**
10
+ * Splits a config snapshot in two: the slots a schema flags `advanced` or gives
11
+ * a `contextVariable` (a `jexl:` callback), and everything else. A sub-schema
12
+ * member splits member by member and appears on a side only if something landed
13
+ * there. A key the schema does not define as a slot (`trackId`, a typed
14
+ * schema's `type`, an array of sub-schemas) stays with the rest.
15
+ */
16
+ export function partitionAdvanced(node, snapshot) {
17
+ const definition = getConfigurationSchemaDefinition(node);
18
+ const rest = {};
19
+ const advanced = {};
20
+ for (const [key, value] of Object.entries(snapshot)) {
21
+ const def = definition?.[key];
22
+ if (isSlotDefinitionEntry(def)) {
23
+ const side = foldsIntoAdvancedCard(def) ? advanced : rest;
24
+ side[key] = value;
25
+ continue;
26
+ }
27
+ const child = node[key];
28
+ if (isPlainObject(value) && isConfigurationModel(child)) {
29
+ const split = partitionAdvanced(child, value);
30
+ if (Object.keys(split.rest).length) {
31
+ rest[key] = split.rest;
32
+ }
33
+ if (Object.keys(split.advanced).length) {
34
+ advanced[key] = split.advanced;
35
+ }
36
+ }
37
+ else {
38
+ rest[key] = value;
39
+ }
40
+ }
41
+ return { rest, advanced };
42
+ }
@@ -59,3 +59,9 @@ export declare function liftPlot(conf: AnyConfigurationModel, draft: Plot): AnyC
59
59
  * Throws a refusal before anything is written.
60
60
  */
61
61
  export declare function plotWrites(conf: AnyConfigurationModel, draft: Plot): Record<string, unknown>;
62
+ /**
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
+ * under its schema's `fieldPresets`, as `jbrowse validate` judges it.
66
+ */
67
+ export declare function schemaPlotProblems(lifted: AnyConfigurationModel): string[];