@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getConfAssemblyNamesOrNone } from './tracks.js';
|
|
2
2
|
/**
|
|
3
3
|
* Whether a track config names an assembly the session holds as **temporary** —
|
|
4
4
|
* the read-vs-ref pair a comparative view synthesizes, which goes away when that
|
|
@@ -24,6 +24,5 @@ export function namesTemporaryAssembly(session, trackConf) {
|
|
|
24
24
|
if (!temporary?.length) {
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
return !!names?.some(name => temporary.some(a => a.name === name));
|
|
27
|
+
return getConfAssemblyNamesOrNone(trackConf).some(name => temporary.some(a => a.name === name));
|
|
29
28
|
}
|
|
@@ -27,7 +27,7 @@ export declare function thresholdCuts(domain: readonly (string | number)[]): num
|
|
|
27
27
|
export declare function thresholdIndex(value: unknown, domain: readonly number[]): number;
|
|
28
28
|
/**
|
|
29
29
|
* #api
|
|
30
|
-
* The
|
|
30
|
+
* The color of each interval, in order: the declared palette, and the
|
|
31
31
|
* default categorical palette where it runs out.
|
|
32
32
|
*/
|
|
33
33
|
export declare function thresholdPalette(bins: number, palette?: readonly string[]): string[];
|
|
@@ -46,7 +46,7 @@ export function thresholdIndex(value, domain) {
|
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* #api
|
|
49
|
-
* The
|
|
49
|
+
* The color of each interval, in order: the declared palette, and the
|
|
50
50
|
* default categorical palette where it runs out.
|
|
51
51
|
*/
|
|
52
52
|
export function thresholdPalette(bins, palette = []) {
|
|
@@ -53,7 +53,7 @@ export declare function diffTrackConfig(base: Record<string, unknown>, edited: R
|
|
|
53
53
|
* longer has is dropped, so no `null` member reaches the config a track
|
|
54
54
|
* hydrates from.
|
|
55
55
|
*/
|
|
56
|
-
export declare function mergeTrackConfig
|
|
56
|
+
export declare function mergeTrackConfig<BASE extends Record<string, unknown>>(base: BASE, delta: Record<string, unknown>): BASE;
|
|
57
57
|
/**
|
|
58
58
|
* A single overridden slot: the dotted `path`, its base `from` and edited `to`,
|
|
59
59
|
* which is `undefined` for a reset.
|
package/esm/util/tracks.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { makeIndex } from './formatGuessers.ts';
|
|
|
4
4
|
export { isLooseTrackConfig, type LooseTrackInput, } from '@jbrowse/add-track-core';
|
|
5
5
|
import { type LooseTrackInput } from '@jbrowse/add-track-core';
|
|
6
6
|
import type PluginManager from '../PluginManager.ts';
|
|
7
|
-
import type { AnyConfigurationModel } from '../configuration/index.ts';
|
|
7
|
+
import type { AnyConfiguration, AnyConfigurationModel, AnyTrackConfig, TrackConfigEntry } from '../configuration/index.ts';
|
|
8
8
|
import type { BlobLocation, FileHandleLocation, FileLocation, PreFileLocation } from './types/data.ts';
|
|
9
9
|
import type { AbstractViewContainer } from './types/index.ts';
|
|
10
10
|
import type { IAnyStateTreeNode, IAnyType, IStateTreeNode, Instance, types } from '@jbrowse/mobx-state-tree';
|
|
@@ -68,7 +68,7 @@ export declare function canonicalAssemblyNames(names: string[], assemblyManager:
|
|
|
68
68
|
* to compare equal to themselves.
|
|
69
69
|
*/
|
|
70
70
|
export declare function isSameAssemblyName(a: string | undefined, b: string | undefined, assemblyManager: AssemblyNameResolver): boolean;
|
|
71
|
-
export declare function getConfAssemblyNames(conf:
|
|
71
|
+
export declare function getConfAssemblyNames(conf: AnyConfiguration): string[];
|
|
72
72
|
/**
|
|
73
73
|
* {@link getConfAssemblyNames} for a caller that cannot afford its throw — a
|
|
74
74
|
* config answering neither way leaves the question unanswered instead.
|
|
@@ -80,7 +80,12 @@ export declare function getConfAssemblyNames(conf: AnyConfigurationModel): strin
|
|
|
80
80
|
* answers `[]` for a ReferenceSequenceTrack whose assembly this already knows
|
|
81
81
|
* how to name.
|
|
82
82
|
*/
|
|
83
|
-
export declare function getConfAssemblyNamesOrNone(conf:
|
|
83
|
+
export declare function getConfAssemblyNamesOrNone(conf: AnyConfiguration): string[];
|
|
84
|
+
/**
|
|
85
|
+
* A track config as a frozen entry: `conf` itself, or a live node's snapshot.
|
|
86
|
+
* Either way a slot at its default is absent, so a read supplies the default.
|
|
87
|
+
*/
|
|
88
|
+
export declare function toTrackConfigEntry(conf: AnyTrackConfig): TrackConfigEntry;
|
|
84
89
|
/**
|
|
85
90
|
* The RPC session id a track's own requests go out under, from its config:
|
|
86
91
|
* what `BaseTrackModel.rpcSessionId` computes, for a caller holding no model.
|
|
@@ -277,11 +282,7 @@ export declare function generateUnknownTrackConf(trackName: string, trackUrl: st
|
|
|
277
282
|
category: string[] | undefined;
|
|
278
283
|
trackId: string;
|
|
279
284
|
};
|
|
280
|
-
export declare function getTrackName(conf:
|
|
281
|
-
name?: string;
|
|
282
|
-
type?: string;
|
|
283
|
-
trackId?: string;
|
|
284
|
-
}, session: {
|
|
285
|
+
export declare function getTrackName(conf: AnyConfiguration, session: {
|
|
285
286
|
assemblies: AnyConfigurationModel[];
|
|
286
287
|
}): string;
|
|
287
288
|
type MSTArray<T extends IAnyType> = Instance<ReturnType<typeof types.array<T>>>;
|
|
@@ -347,22 +348,22 @@ export declare function viewCanDisplayTrack(pluginManager: PluginManager, viewDi
|
|
|
347
348
|
* and every other picker that opens a track into a view read this one answer,
|
|
348
349
|
* or one of them offers a track the next hides.
|
|
349
350
|
*/
|
|
350
|
-
export declare function filterTracks(tracks:
|
|
351
|
+
export declare function filterTracks<T extends AnyTrackConfig>(tracks: T[], self: {
|
|
351
352
|
view?: IStateTreeNode & {
|
|
352
353
|
type: string;
|
|
353
354
|
};
|
|
354
355
|
assemblyNames: string[];
|
|
355
|
-
}):
|
|
356
|
+
}): T[];
|
|
356
357
|
/**
|
|
357
358
|
* Every track config a view can be offered, each assembly's sequence track
|
|
358
359
|
* first and then {@link filterTracks} over the list handed in.
|
|
359
360
|
*/
|
|
360
|
-
export declare function offeredTracks(tracks:
|
|
361
|
+
export declare function offeredTracks(tracks: AnyTrackConfig[], self: {
|
|
361
362
|
view?: IStateTreeNode & {
|
|
362
363
|
type: string;
|
|
363
364
|
};
|
|
364
365
|
assemblyNames: string[];
|
|
365
|
-
}):
|
|
366
|
+
}): AnyTrackConfig[];
|
|
366
367
|
/**
|
|
367
368
|
* Which display a track opens with in a given view, and the declared entry
|
|
368
369
|
* that configures it: `{ type, conf }`, or undefined when the view draws none
|
|
@@ -408,6 +409,15 @@ export declare function normalizeTrackInit(t: TrackInit): {
|
|
|
408
409
|
[x: string]: unknown;
|
|
409
410
|
};
|
|
410
411
|
};
|
|
412
|
+
/**
|
|
413
|
+
* The display type a view of `viewType` opens the track `rawConf` as, the one
|
|
414
|
+
* `showTrack` picks, or undefined when the view draws none of the track's
|
|
415
|
+
* displays. For a caller that needs to know the display before the view exists,
|
|
416
|
+
* such as a CLI choosing which settings to write.
|
|
417
|
+
*/
|
|
418
|
+
export declare function trackDisplayType(pluginManager: PluginManager, rawConf: {
|
|
419
|
+
type: string;
|
|
420
|
+
}, viewType: string, requested?: string): string | undefined;
|
|
411
421
|
export declare function showTrackGeneric(self: GenericView, trackId: string, initialSnapshot?: object, displayInitialSnapshot?: DisplayInitialSnapshot, inlineConf?: Record<string, unknown>): any;
|
|
412
422
|
export interface DisplaySnapshot {
|
|
413
423
|
id: string;
|
|
@@ -446,11 +456,11 @@ export declare function launchToggleTrackGeneric(self: GenericView, trackId: str
|
|
|
446
456
|
* yields every session track twice.
|
|
447
457
|
*/
|
|
448
458
|
export declare function allSessionTracks(session: {
|
|
449
|
-
tracks:
|
|
459
|
+
tracks: TrackConfigEntry[];
|
|
450
460
|
connectionInstances?: {
|
|
451
461
|
tracks: AnyConfigurationModel[];
|
|
452
462
|
}[];
|
|
453
|
-
}):
|
|
463
|
+
}): AnyTrackConfig[];
|
|
454
464
|
/**
|
|
455
465
|
* The session's annotation for `assemblyName`, as trackIds: what a view opened
|
|
456
466
|
* on another genome starts with. Only FeatureTracks, not everything configured
|
|
@@ -459,7 +469,7 @@ export declare function allSessionTracks(session: {
|
|
|
459
469
|
* range query.
|
|
460
470
|
*/
|
|
461
471
|
export declare function annotationTrackIds(session: {
|
|
462
|
-
tracks:
|
|
472
|
+
tracks: TrackConfigEntry[];
|
|
463
473
|
connectionInstances?: {
|
|
464
474
|
tracks: AnyConfigurationModel[];
|
|
465
475
|
}[];
|
package/esm/util/tracks.js
CHANGED
|
@@ -13,7 +13,7 @@ export { isLooseTrackConfig, } from '@jbrowse/add-track-core';
|
|
|
13
13
|
import { isLooseTrackConfig, } from '@jbrowse/add-track-core';
|
|
14
14
|
import { asModelType, getParent, getSnapshot, getType, hasParent, isAlive, isStateTreeNode, } from '@jbrowse/mobx-state-tree';
|
|
15
15
|
import { observable, runInAction, untracked } from 'mobx';
|
|
16
|
-
import { readConfObject } from '../configuration/index.js';
|
|
16
|
+
import { isConfigurationModel, readConfObject } from '../configuration/index.js';
|
|
17
17
|
import { adapterConfigCacheKey } from '../data_adapters/dataAdapterCache.js';
|
|
18
18
|
import { displayCandidates, displayTypesFedBy, } from '../pluggableElementTypes/models/baseTrackConfig.js';
|
|
19
19
|
import { getFileHandle, storeFileHandle, verifyPermission, } from './fileHandleStore.js';
|
|
@@ -90,8 +90,14 @@ export function isSameAssemblyName(a, b, assemblyManager) {
|
|
|
90
90
|
* copy a non-admin's edits would go to, ADR-032). `hasParent` is the guard:
|
|
91
91
|
* without it the walk raises MST's "Failed to find the parent" from a helper
|
|
92
92
|
* whose other two failure modes are a plain `undefined`.
|
|
93
|
+
*
|
|
94
|
+
* A frozen {@link TrackConfigEntry} omits a slot at its default, so one
|
|
95
|
+
* without `assemblyNames` names the slot's default, `[]`.
|
|
93
96
|
*/
|
|
94
97
|
function confAssemblyNames(conf) {
|
|
98
|
+
if (!isConfigurationModel(conf)) {
|
|
99
|
+
return conf.assemblyNames ?? [];
|
|
100
|
+
}
|
|
95
101
|
const trackAssemblyNames = readConfObject(conf, 'assemblyNames');
|
|
96
102
|
if (trackAssemblyNames) {
|
|
97
103
|
return trackAssemblyNames;
|
|
@@ -125,6 +131,13 @@ export function getConfAssemblyNames(conf) {
|
|
|
125
131
|
export function getConfAssemblyNamesOrNone(conf) {
|
|
126
132
|
return confAssemblyNames(conf) ?? [];
|
|
127
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* A track config as a frozen entry: `conf` itself, or a live node's snapshot.
|
|
136
|
+
* Either way a slot at its default is absent, so a read supplies the default.
|
|
137
|
+
*/
|
|
138
|
+
export function toTrackConfigEntry(conf) {
|
|
139
|
+
return isStateTreeNode(conf) ? getSnapshot(conf) : conf;
|
|
140
|
+
}
|
|
128
141
|
/**
|
|
129
142
|
* The RPC session id a track's own requests go out under, from its config:
|
|
130
143
|
* what `BaseTrackModel.rpcSessionId` computes, for a caller holding no model.
|
|
@@ -463,21 +476,16 @@ export function generateUnknownTrackConf(trackName, trackUrl, categories) {
|
|
|
463
476
|
return generateProblemTrackConf(trackName, categories, 'Unknown', `Could not determine track type for "${trackUrl}"`);
|
|
464
477
|
}
|
|
465
478
|
export function getTrackName(conf, session) {
|
|
466
|
-
const
|
|
467
|
-
const trackName = isMst
|
|
479
|
+
const trackName = isConfigurationModel(conf)
|
|
468
480
|
? readConfObject(conf, 'name')
|
|
469
481
|
: (conf.name ?? '');
|
|
470
|
-
|
|
471
|
-
if (!trackName && trackType === 'ReferenceSequenceTrack') {
|
|
482
|
+
if (!trackName && conf.type === 'ReferenceSequenceTrack') {
|
|
472
483
|
const asm = session.assemblies.find(a => a.sequence === conf);
|
|
473
484
|
return asm
|
|
474
485
|
? `Reference sequence (${readConfObject(asm, 'displayName') || readConfObject(asm, 'name')})`
|
|
475
486
|
: 'Reference sequence';
|
|
476
487
|
}
|
|
477
|
-
|
|
478
|
-
? readConfObject(conf, 'trackId')
|
|
479
|
-
: (conf.trackId ?? '');
|
|
480
|
-
return trackName || trackId;
|
|
488
|
+
return trackName || (conf.trackId ?? '');
|
|
481
489
|
}
|
|
482
490
|
// The first-show path spreads the same settings into the display's `create()`
|
|
483
491
|
// snapshot, so a DECLARED PROP (`resolution` on the wiggle displays) has
|
|
@@ -614,12 +622,11 @@ export function filterTracks(tracks, self) {
|
|
|
614
622
|
const viewAssemblyNames = canonical(self.assemblyNames);
|
|
615
623
|
const viewDisplays = viewDisplayNames(pluginManager, view.type);
|
|
616
624
|
return tracks.filter(c => {
|
|
617
|
-
const trackAssemblyNames = readConfObject(c, 'assemblyNames');
|
|
618
625
|
return (
|
|
619
626
|
// a view that declares no assemblies (one still initializing) constrains
|
|
620
627
|
// nothing; otherwise the track must cover every one of them
|
|
621
628
|
(viewAssemblyNames.length === 0 ||
|
|
622
|
-
containsAll(
|
|
629
|
+
containsAll(canonical(getConfAssemblyNamesOrNone(c)), viewAssemblyNames)) &&
|
|
623
630
|
viewCanDisplayTrack(pluginManager, viewDisplays, {
|
|
624
631
|
type: c.type,
|
|
625
632
|
adapter: c.adapter,
|
|
@@ -686,7 +693,7 @@ export function pickDisplayForView({ candidates, declaredDisplays, requestedType
|
|
|
686
693
|
// displaySnapshot) triple that `showTrackGeneric` expects. Display props written
|
|
687
694
|
// inline on the track object (everything except trackId/trackSnapshot/
|
|
688
695
|
// displaySnapshot) fold into the display snapshot, so a spec can write
|
|
689
|
-
// `{ trackId,
|
|
696
|
+
// `{ trackId, showLabels: 'name' }` instead of nesting under
|
|
690
697
|
// `displaySnapshot`. An explicit `displaySnapshot` still wins over an inline
|
|
691
698
|
// key of the same name, and the older nested form keeps working unchanged.
|
|
692
699
|
// `showTrackGeneric` then routes any inline key that is a real config slot (e.g.
|
|
@@ -705,6 +712,43 @@ export function normalizeTrackInit(t) {
|
|
|
705
712
|
};
|
|
706
713
|
}
|
|
707
714
|
}
|
|
715
|
+
/**
|
|
716
|
+
* The display a view of `viewType` opens `conf` as, chosen from the displays the
|
|
717
|
+
* track's adapter feeds and the view draws. `requested` is the display type a
|
|
718
|
+
* caller asks for; a name no display answers to leaves `picked` undefined.
|
|
719
|
+
* Aliases resolve first, so a caller or a config naming a pre-consolidation
|
|
720
|
+
* display type (`LinearPileupDisplay`) reaches the type that replaced it.
|
|
721
|
+
*/
|
|
722
|
+
function pickTrackDisplay(pluginManager, conf, viewTypeName, requested) {
|
|
723
|
+
const viewType = pluginManager.getViewType(viewTypeName);
|
|
724
|
+
const candidates = displayCandidates(pluginManager, conf);
|
|
725
|
+
const viewDisplayTypes = viewType.displayTypes.map(d => d.name);
|
|
726
|
+
const canonical = (name) => pluginManager.resolveDisplayTypeRecord(name)?.name ?? name;
|
|
727
|
+
const declaredDisplays = conf.displays ?? [];
|
|
728
|
+
const picked = pickDisplayForView({
|
|
729
|
+
candidates,
|
|
730
|
+
declaredDisplays: declaredDisplays.map(d => ({
|
|
731
|
+
...d,
|
|
732
|
+
type: canonical(d.type),
|
|
733
|
+
})),
|
|
734
|
+
requestedType: requested === undefined ? undefined : canonical(requested),
|
|
735
|
+
viewDisplayTypes,
|
|
736
|
+
preferredDisplayTypes: new Set(viewType.displayTypes
|
|
737
|
+
.filter(d => d.viewType === viewTypeName)
|
|
738
|
+
.map(d => d.name)),
|
|
739
|
+
});
|
|
740
|
+
return { picked, candidates, viewDisplayTypes };
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* The display type a view of `viewType` opens the track `rawConf` as, the one
|
|
744
|
+
* `showTrack` picks, or undefined when the view draws none of the track's
|
|
745
|
+
* displays. For a caller that needs to know the display before the view exists,
|
|
746
|
+
* such as a CLI choosing which settings to write.
|
|
747
|
+
*/
|
|
748
|
+
export function trackDisplayType(pluginManager, rawConf, viewType, requested) {
|
|
749
|
+
const conf = pluginManager.evaluateExtensionPoint('Core-preProcessTrackConfig', structuredClone(rawConf));
|
|
750
|
+
return pickTrackDisplay(pluginManager, conf, viewType, requested).picked?.type;
|
|
751
|
+
}
|
|
708
752
|
function resolveTrackDisplayChoice(self, trackId, displayInitialSnapshot, inlineConf) {
|
|
709
753
|
const { pluginManager } = getEnv(self);
|
|
710
754
|
const session = getSession(self);
|
|
@@ -747,27 +791,8 @@ function resolveTrackDisplayChoice(self, trackId, displayInitialSnapshot, inline
|
|
|
747
791
|
// display choice from the view it sits in, which is the same node
|
|
748
792
|
// getContainingView already resolves to for everything else beneath it.
|
|
749
793
|
const view = isViewModel(self) ? self : getContainingView(self);
|
|
750
|
-
const viewType = pluginManager.getViewType(view.type);
|
|
751
|
-
const candidates = displayCandidates(pluginManager, conf);
|
|
752
|
-
const viewDisplayTypes = viewType.displayTypes.map(d => d.name);
|
|
753
|
-
// Aliases resolve first, so a caller or a config naming a pre-consolidation
|
|
754
|
-
// display type (`LinearPileupDisplay`) reaches the type that replaced it; a
|
|
755
|
-
// name no display answers to stays as written, for the refusal to quote.
|
|
756
|
-
const canonical = (name) => pluginManager.resolveDisplayTypeRecord(name)?.name ?? name;
|
|
757
794
|
const requested = displayInitialSnapshot.type;
|
|
758
|
-
const
|
|
759
|
-
const picked = pickDisplayForView({
|
|
760
|
-
candidates,
|
|
761
|
-
declaredDisplays: declaredDisplays.map(d => ({
|
|
762
|
-
...d,
|
|
763
|
-
type: canonical(d.type),
|
|
764
|
-
})),
|
|
765
|
-
requestedType: requested === undefined ? undefined : canonical(requested),
|
|
766
|
-
viewDisplayTypes,
|
|
767
|
-
preferredDisplayTypes: new Set(viewType.displayTypes
|
|
768
|
-
.filter(d => d.viewType === view.type)
|
|
769
|
-
.map(d => d.name)),
|
|
770
|
-
});
|
|
795
|
+
const { picked, candidates, viewDisplayTypes } = pickTrackDisplay(pluginManager, conf, view.type, requested);
|
|
771
796
|
if (!picked) {
|
|
772
797
|
const drawable = candidates.filter(name => viewDisplayTypes.includes(name));
|
|
773
798
|
throw new Error(requested === undefined
|
|
@@ -898,11 +923,9 @@ export function warmTrackDisplayGeneric(self, trackId, displayInitialSnapshot =
|
|
|
898
923
|
const { pluginManager } = getEnv(self);
|
|
899
924
|
try {
|
|
900
925
|
const { picked } = resolveTrackDisplayChoice(self, trackId, displayInitialSnapshot);
|
|
901
|
-
pluginManager
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
.catch(() => { });
|
|
905
|
-
warmTrackAdapter(self, trackId, assemblyName);
|
|
926
|
+
const display = pluginManager.resolveDisplayTypeRecord(picked.type);
|
|
927
|
+
display?.loadStateModel().catch(() => { });
|
|
928
|
+
warmTrackAdapter(self, trackId, display?.rpcMethods ?? [], assemblyName);
|
|
906
929
|
}
|
|
907
930
|
catch {
|
|
908
931
|
// the launch reports an unresolvable track
|
|
@@ -921,8 +944,8 @@ function adapterTypesIn(value, pluginManager, found = new Set()) {
|
|
|
921
944
|
return found;
|
|
922
945
|
}
|
|
923
946
|
/**
|
|
924
|
-
* Load the track's adapter code and
|
|
925
|
-
* assembly load the track's first request waits for.
|
|
947
|
+
* Load the track's adapter code and its display's RPC code, and read its index,
|
|
948
|
+
* in the worker, beside the assembly load the track's first request waits for.
|
|
926
949
|
*
|
|
927
950
|
* Sent under the id the track's own requests will use, so it reaches, and
|
|
928
951
|
* boots, the worker that serves them. That id hashes the adapter config as the
|
|
@@ -942,7 +965,7 @@ function declaresLanes(adapterConfig, pluginManager) {
|
|
|
942
965
|
.getAdapterType(type)
|
|
943
966
|
.adapterCapabilities.includes('headerLanes'));
|
|
944
967
|
}
|
|
945
|
-
function warmTrackAdapter(self, trackId, assemblyName) {
|
|
968
|
+
function warmTrackAdapter(self, trackId, rpcMethods, assemblyName) {
|
|
946
969
|
const { pluginManager } = getEnv(self);
|
|
947
970
|
const session = getSession(self);
|
|
948
971
|
const raw = session.getTrackById(trackId);
|
|
@@ -958,8 +981,9 @@ function warmTrackAdapter(self, trackId, assemblyName) {
|
|
|
958
981
|
const sessionId = getConfRpcSessionId(conf);
|
|
959
982
|
session.rpcManager
|
|
960
983
|
// eslint-disable-next-line no-restricted-syntax -- a code download the track's first request would make anyway: nothing to show, and nothing a user can move on from
|
|
961
|
-
.call(sessionId, '
|
|
984
|
+
.call(sessionId, 'CoreLoadTrackCode', {
|
|
962
985
|
adapterTypes: [...adapterTypesIn(adapterConfig, pluginManager)],
|
|
986
|
+
rpcMethods: [...rpcMethods],
|
|
963
987
|
})
|
|
964
988
|
.catch(() => { });
|
|
965
989
|
// a source that declares its lanes reads an index per lane asked about,
|
|
@@ -1046,9 +1070,9 @@ export function allSessionTracks(session) {
|
|
|
1046
1070
|
* range query.
|
|
1047
1071
|
*/
|
|
1048
1072
|
export function annotationTrackIds(session, assemblyName) {
|
|
1049
|
-
return allSessionTracks(session).flatMap(track =>
|
|
1050
|
-
|
|
1051
|
-
? [
|
|
1073
|
+
return allSessionTracks(session).flatMap(track => track.type === 'FeatureTrack' &&
|
|
1074
|
+
getConfAssemblyNamesOrNone(track).some(name => isSameAssemblyName(name, assemblyName, session.assemblyManager))
|
|
1075
|
+
? [track.trackId]
|
|
1052
1076
|
: []);
|
|
1053
1077
|
}
|
|
1054
1078
|
function isNavigableView(view) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ViewSnapshotInput } from '../../PluginManager.ts';
|
|
2
2
|
import type TextSearchManager from '../../TextSearch/TextSearchManager.ts';
|
|
3
|
-
import type { AnyConfigurationModel } from '../../configuration/index.ts';
|
|
3
|
+
import type { AnyConfigurationModel, AnyTrackConfig, TrackConfigEntry } from '../../configuration/index.ts';
|
|
4
4
|
import type { BaseInternetAccountModel, BaseTrackConfig } from '../../pluggableElementTypes/models/index.ts';
|
|
5
5
|
import type { PluginDefinition } from '../../pluginDefinitions.ts';
|
|
6
6
|
import type RpcManager from '../../rpc/RpcManager.ts';
|
|
@@ -53,17 +53,17 @@ export type AnimationMode = 'system' | 'enabled' | 'disabled';
|
|
|
53
53
|
* in `./services.ts`, which is the file that stays cheap to name.
|
|
54
54
|
*/
|
|
55
55
|
export interface TrackCatalog {
|
|
56
|
-
tracks:
|
|
56
|
+
tracks: TrackConfigEntry[];
|
|
57
57
|
assemblies: AnyConfigurationModel[];
|
|
58
58
|
connectionInstances?: {
|
|
59
59
|
tracks: AnyConfigurationModel[];
|
|
60
60
|
}[];
|
|
61
|
-
getTrackById: (id: string) =>
|
|
61
|
+
getTrackById: (id: string) => AnyTrackConfig | undefined;
|
|
62
62
|
}
|
|
63
63
|
/** minimum interface that all session state models must implement */
|
|
64
64
|
export interface AbstractSessionModel extends AbstractViewContainer, RenderingServices, NotificationSink, DialogHost, TrackCatalog {
|
|
65
65
|
/** @deprecated prefer the per-id reactive `getTrackById(id)` */
|
|
66
|
-
getTracksById: () => Record<string,
|
|
66
|
+
getTracksById: () => Record<string, AnyTrackConfig>;
|
|
67
67
|
jbrowse: IAnyStateTreeNode;
|
|
68
68
|
drawerPosition?: DrawerPosition;
|
|
69
69
|
stickyViewHeaders?: boolean;
|
|
@@ -112,8 +112,8 @@ export interface AbstractSessionModel extends AbstractViewContainer, RenderingSe
|
|
|
112
112
|
config: BaseTrackConfig;
|
|
113
113
|
view?: TrackActionView;
|
|
114
114
|
}) => MenuItem[];
|
|
115
|
-
getTrackActions?: (arg:
|
|
116
|
-
getTrackListMenuItems?: (arg:
|
|
115
|
+
getTrackActions?: (arg: AnyTrackConfig, view?: TrackActionView) => MenuItem[];
|
|
116
|
+
getTrackListMenuItems?: (arg: AnyTrackConfig, view?: TrackActionView) => MenuItem[];
|
|
117
117
|
addAssembly?: (conf: Record<string, unknown>) => void;
|
|
118
118
|
addSessionAssembly?: (conf: Record<string, unknown>) => void;
|
|
119
119
|
sessionAssemblies?: AnyConfigurationModel[];
|
|
@@ -184,6 +184,14 @@ export interface SessionWithEditableTrackConfig extends AbstractSessionModel {
|
|
|
184
184
|
getEditableTrackConfig(trackId: string, schemaType: IAnyType): AnyConfigurationModel | undefined;
|
|
185
185
|
}
|
|
186
186
|
export declare function isSessionWithEditableTrackConfig(t: unknown): t is SessionWithEditableTrackConfig;
|
|
187
|
+
/**
|
|
188
|
+
* The working copy `trackId` resolves to (ADR-032), through its track type's
|
|
189
|
+
* own schema, which is the one a shown track's `configuration` reference
|
|
190
|
+
* holds, so both reach one node. Re-resolves on every read: an undo or a
|
|
191
|
+
* session restore replaces the working copy. Undefined when the session keeps
|
|
192
|
+
* no working copies or nothing answers the id.
|
|
193
|
+
*/
|
|
194
|
+
export declare function getEditableTrackConfigById(session: unknown, trackId: string): AnyConfigurationModel | undefined;
|
|
187
195
|
/**
|
|
188
196
|
* abstract interface for a session that keeps a list of views, so that `addView`
|
|
189
197
|
* appends and the view a launch came out of survives it.
|
|
@@ -304,7 +312,7 @@ export interface SessionWithAddAssembly extends AbstractSessionModel {
|
|
|
304
312
|
export declare function isSessionWithAddAssembly(t: unknown): t is SessionWithAddAssembly;
|
|
305
313
|
/** abstract interface for a session that allows deleting track configs */
|
|
306
314
|
export interface SessionWithDeleteTrackConf extends AbstractSessionModel {
|
|
307
|
-
deleteTrackConf(configuration:
|
|
315
|
+
deleteTrackConf(configuration: AnyTrackConfig): void;
|
|
308
316
|
}
|
|
309
317
|
export declare function isSessionWithDeleteTrackConf(t: unknown): t is SessionWithDeleteTrackConf;
|
|
310
318
|
/** abstract interface for a session allows adding tracks */
|
package/esm/util/types/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isStateTreeNode } from '@jbrowse/mobx-state-tree';
|
|
1
|
+
import { getEnv, isStateTreeNode } from '@jbrowse/mobx-state-tree';
|
|
2
2
|
import { isSessionServices } from './services.js';
|
|
3
3
|
export { isSessionServices } from './services.js';
|
|
4
4
|
// The plain-data half of this file's former self, kept re-exported here so
|
|
@@ -24,6 +24,23 @@ export function isSessionWithBaseTrackConfig(t) {
|
|
|
24
24
|
export function isSessionWithEditableTrackConfig(t) {
|
|
25
25
|
return isSessionModel(t) && 'getEditableTrackConfig' in t;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The working copy `trackId` resolves to (ADR-032), through its track type's
|
|
29
|
+
* own schema, which is the one a shown track's `configuration` reference
|
|
30
|
+
* holds, so both reach one node. Re-resolves on every read: an undo or a
|
|
31
|
+
* session restore replaces the working copy. Undefined when the session keeps
|
|
32
|
+
* no working copies or nothing answers the id.
|
|
33
|
+
*/
|
|
34
|
+
export function getEditableTrackConfigById(session, trackId) {
|
|
35
|
+
if (!isSessionWithEditableTrackConfig(session)) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
const type = session.getTrackById(trackId)?.type;
|
|
39
|
+
const schema = typeof type === 'string'
|
|
40
|
+
? getEnv(session).pluginManager.getTrackType(type).configSchema
|
|
41
|
+
: undefined;
|
|
42
|
+
return schema ? session.getEditableTrackConfig(trackId, schema) : undefined;
|
|
43
|
+
}
|
|
27
44
|
export function isSessionWithMultipleViews(t) {
|
|
28
45
|
return isSessionModel(t) && isStateTreeNode(t.views);
|
|
29
46
|
}
|
|
@@ -106,7 +123,9 @@ export function isSessionModelWithConnections(thing) {
|
|
|
106
123
|
return isSessionModel(thing) && 'makeConnection' in thing;
|
|
107
124
|
}
|
|
108
125
|
export function isSessionModelWithConnectionEditing(thing) {
|
|
109
|
-
return isSessionModel(thing) &&
|
|
126
|
+
return (isSessionModel(thing) &&
|
|
127
|
+
'addConnectionConf' in thing &&
|
|
128
|
+
!('disableAddTracks' in thing && thing.disableAddTracks));
|
|
110
129
|
}
|
|
111
130
|
export function isSessionWithSessionPlugins(thing) {
|
|
112
131
|
return isSessionModel(thing) && 'sessionPlugins' in thing;
|
package/esm/util/usePanZoom.js
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
// tooltip is also where ctrl/⌘+scroll — which zooms whatever the preference
|
|
24
24
|
// says — is named.
|
|
25
25
|
import { useEffect, useRef } from 'react';
|
|
26
|
+
import { isClaimedPress } from './pressOwner.js';
|
|
26
27
|
import { createWheelZoomController } from './wheelZoom.js';
|
|
27
28
|
/**
|
|
28
29
|
* Wheel zoom and side-scroll, bound to `ref` for as long as the component
|
|
@@ -126,19 +127,12 @@ export function usePanZoom(ref, view, { touchAction = 'none', } = {}) {
|
|
|
126
127
|
return {
|
|
127
128
|
containerProps: {
|
|
128
129
|
onPointerDown(event) {
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
// that drag on their own — a display's vertical scrollbar, a resize
|
|
132
|
-
// handle), a button (the track-sizing button a display draws in its own
|
|
133
|
-
// corner), or a draggable element. `closest`, because the press usually
|
|
134
|
-
// lands on an icon inside the control. Shift is left alone too: it is
|
|
135
|
-
// what a range-select of the host's own would want, and it is what
|
|
136
|
-
// JBrowse's own view uses it for.
|
|
130
|
+
// Shift is left alone: it is what a range-select of the host's own
|
|
131
|
+
// would want, and it is what JBrowse's own view uses it for.
|
|
137
132
|
if (!event.isPrimary || event.button !== 0 || event.shiftKey) {
|
|
138
133
|
return;
|
|
139
134
|
}
|
|
140
|
-
if (event
|
|
141
|
-
event.target.closest('button, [data-gesture-owner], [draggable="true"]')) {
|
|
135
|
+
if (isClaimedPress(event)) {
|
|
142
136
|
return;
|
|
143
137
|
}
|
|
144
138
|
// Note what this does *not* do: capture the pointer. See onPointerMove.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RowResizeTarget } from './applyRowResizeWheel.ts';
|
|
2
|
+
export type { RowResizeTarget } from './applyRowResizeWheel.ts';
|
|
2
3
|
/**
|
|
3
4
|
* Wheel gestures over a **row-stack** panel — the multi-sample variant displays
|
|
4
5
|
* and MAF: `shift`+wheel resizes the rows, keeping the row under the cursor
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WindowStep } from './markEncodingTypes.ts';
|
|
2
|
+
import type { Staged } from './stepTables.ts';
|
|
3
|
+
type Frame = NonNullable<WindowStep['frame']>;
|
|
4
|
+
export declare const DEFAULT_WINDOW_FRAME: Frame;
|
|
5
|
+
export declare function windowStep({ table, bounds }: Staged, step: WindowStep): Staged;
|
|
6
|
+
export {};
|