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