@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,6 +1,6 @@
|
|
|
1
1
|
import QuickLRU from '../util/QuickLRU/index.ts';
|
|
2
2
|
import type PluginManager from '../PluginManager.ts';
|
|
3
|
-
import type { AnyConfigurationModel } from '../configuration/index.ts';
|
|
3
|
+
import type { AnyConfigurationModel, AnyTrackConfig } from '../configuration/index.ts';
|
|
4
4
|
import type { BaseTextSearchAdapter, BaseTextSearchArgs } from '../data_adapters/BaseAdapter/index.ts';
|
|
5
5
|
import type BaseResult from './BaseResults.ts';
|
|
6
6
|
export interface SearchIndex {
|
|
@@ -30,9 +30,9 @@ export default class TextSearchManager {
|
|
|
30
30
|
relevantAdapters(assemblyName: string): AnyConfigurationModel[];
|
|
31
31
|
relevantIndexes(assemblyName: string): SearchIndex[];
|
|
32
32
|
getAdaptersWithAssembly(matches: (names: string[] | undefined) => boolean, confs: AnyConfigurationModel[]): AnyConfigurationModel[];
|
|
33
|
-
getTrackAdaptersWithAssembly(matches: (names: string[] | undefined) => boolean, confs:
|
|
33
|
+
getTrackAdaptersWithAssembly(matches: (names: string[] | undefined) => boolean, confs: AnyTrackConfig[]): {
|
|
34
34
|
conf: AnyConfigurationModel;
|
|
35
|
-
trackId:
|
|
35
|
+
trackId: any;
|
|
36
36
|
}[];
|
|
37
37
|
search(args: BaseTextSearchArgs, assemblyName: string): Promise<BaseResult[]>;
|
|
38
38
|
searchIndexes(args: BaseTextSearchArgs, assemblyName: string): Promise<TextSearchReport>;
|
|
@@ -3,7 +3,7 @@ import { hydrateTrackConfig, readConfObject } from '../configuration/index.js';
|
|
|
3
3
|
import { adapterConfigCacheKey } from '../data_adapters/dataAdapterCache.js';
|
|
4
4
|
import QuickLRU from '../util/QuickLRU/index.js';
|
|
5
5
|
import { checkAbortSignal, isAbortException } from '../util/aborting.js';
|
|
6
|
-
import { allSessionTracks, canonicalAssemblyNames } from '../util/tracks.js';
|
|
6
|
+
import { allSessionTracks, canonicalAssemblyNames, getConfAssemblyNamesOrNone, } from '../util/tracks.js';
|
|
7
7
|
// A misconfigured or unreachable index (a 404 .ix, a config missing
|
|
8
8
|
// ixFilePath) must not take down search as a whole: the remaining indexes, and
|
|
9
9
|
// the refName results the caller merges in afterwards, are still useful. The
|
|
@@ -84,24 +84,17 @@ export default class TextSearchManager {
|
|
|
84
84
|
getTrackAdaptersWithAssembly(matches, confs) {
|
|
85
85
|
return confs
|
|
86
86
|
.filter(conf => {
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]);
|
|
92
|
-
return (!!readConfObject(conf, ['textSearching', 'textSearchAdapter']) &&
|
|
93
|
-
matches(indexNames?.length
|
|
94
|
-
? indexNames
|
|
95
|
-
: readConfObject(conf, 'assemblyNames')));
|
|
87
|
+
const adapter = conf.textSearching?.textSearchAdapter;
|
|
88
|
+
const indexNames = adapter?.assemblyNames;
|
|
89
|
+
return (!!adapter &&
|
|
90
|
+
matches(indexNames?.length ? indexNames : getConfAssemblyNamesOrNone(conf)));
|
|
96
91
|
})
|
|
97
92
|
.flatMap(track => {
|
|
98
93
|
const live = isStateTreeNode(track)
|
|
99
94
|
? track
|
|
100
95
|
: hydrateTrackConfig(this.pluginManager, track);
|
|
101
96
|
const conf = live?.textSearching.textSearchAdapter;
|
|
102
|
-
return conf
|
|
103
|
-
? [{ conf, trackId: readConfObject(track, 'trackId') }]
|
|
104
|
-
: [];
|
|
97
|
+
return conf ? [{ conf, trackId: track.trackId }] : [];
|
|
105
98
|
});
|
|
106
99
|
}
|
|
107
100
|
async search(args, assemblyName) {
|
|
@@ -22,6 +22,9 @@ export interface BasicRegion {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* #stateModel Assembly
|
|
25
|
+
* Loads an assembly's reference sequence names, refName aliases and
|
|
26
|
+
* cytobands, and maps each data file's refNames onto the assembly's canonical
|
|
27
|
+
* names.
|
|
25
28
|
*/
|
|
26
29
|
export default function assemblyFactory(assemblyConfigType: IAnyType, pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
27
30
|
/**
|
|
@@ -294,6 +297,12 @@ export default function assemblyFactory(assemblyConfigType: IAnyType, pluginMana
|
|
|
294
297
|
*/
|
|
295
298
|
isValidRefName(refName: string): boolean;
|
|
296
299
|
} & {
|
|
300
|
+
/**
|
|
301
|
+
* #method
|
|
302
|
+
* Whether the assembly's `circularRefNames` lists this refName, matched
|
|
303
|
+
* through its aliases.
|
|
304
|
+
*/
|
|
305
|
+
isCircularRefName(refName: string): boolean;
|
|
297
306
|
/**
|
|
298
307
|
* #method
|
|
299
308
|
* Where a refName — canonical or any alias — sits in this assembly's own
|
|
@@ -17,6 +17,9 @@ export { lookupGeneticCodeId } from './geneticCodes.js';
|
|
|
17
17
|
export { refNameMismatchMessage } from './refNameMismatch.js';
|
|
18
18
|
/**
|
|
19
19
|
* #stateModel Assembly
|
|
20
|
+
* Loads an assembly's reference sequence names, refName aliases and
|
|
21
|
+
* cytobands, and maps each data file's refNames onto the assembly's canonical
|
|
22
|
+
* names.
|
|
20
23
|
*/
|
|
21
24
|
export default function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
22
25
|
return types
|
|
@@ -542,6 +545,16 @@ export default function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
542
545
|
},
|
|
543
546
|
}))
|
|
544
547
|
.views(self => ({
|
|
548
|
+
/**
|
|
549
|
+
* #method
|
|
550
|
+
* Whether the assembly's `circularRefNames` lists this refName, matched
|
|
551
|
+
* through its aliases.
|
|
552
|
+
*/
|
|
553
|
+
isCircularRefName(refName) {
|
|
554
|
+
const canonical = self.getCanonicalRefName2(refName);
|
|
555
|
+
const names = self.getConf('circularRefNames') ?? [];
|
|
556
|
+
return names.some(name => self.getCanonicalRefName2(name) === canonical);
|
|
557
|
+
},
|
|
545
558
|
/**
|
|
546
559
|
* #method
|
|
547
560
|
* Where a refName — canonical or any alias — sits in this assembly's own
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type PluginManager from '../PluginManager.ts';
|
|
2
2
|
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
3
|
-
export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, } from './expandAssemblyConfigShorthand.ts';
|
|
3
|
+
export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, expandSidecarShorthand, refNameAliasAdapterType, } from './expandAssemblyConfigShorthand.ts';
|
|
4
4
|
/**
|
|
5
5
|
* #config BaseAssembly
|
|
6
6
|
* #category assemblyManagement
|
|
@@ -116,6 +116,11 @@ declare function assemblyConfigSchema(pluginManager: PluginManager): import("../
|
|
|
116
116
|
} & {
|
|
117
117
|
defaultValue: unknown;
|
|
118
118
|
};
|
|
119
|
+
readonly circularRefNames: {
|
|
120
|
+
type: "stringArray";
|
|
121
|
+
} & {
|
|
122
|
+
defaultValue: unknown;
|
|
123
|
+
};
|
|
119
124
|
readonly geneticCodesLocation: {
|
|
120
125
|
type: "maybeFileLocation";
|
|
121
126
|
};
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '../configuration/index.js';
|
|
2
|
-
import { expandAssemblyShorthand } from './expandAssemblyConfigShorthand.js';
|
|
3
|
-
export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, } from './expandAssemblyConfigShorthand.js';
|
|
4
|
-
/**
|
|
5
|
-
* A sidecar sub-schema written as just its file: `'aliases.txt'` or
|
|
6
|
-
* `{ uri: 'aliases.txt' }` becomes `{ adapter: { type, uri } }`, with `type`
|
|
7
|
-
* picked from the uri. baseUri, stamped by addRelativeUris, rides along. An
|
|
8
|
-
* explicit `adapter` passes through untouched.
|
|
9
|
-
*/
|
|
2
|
+
import { expandAssemblyShorthand, expandSidecarShorthand, refNameAliasAdapterType, } from './expandAssemblyConfigShorthand.js';
|
|
3
|
+
export { expandAssemblySequence, expandAssemblySequenceAdapter, expandAssemblyShorthand, expandSidecarShorthand, refNameAliasAdapterType, } from './expandAssemblyConfigShorthand.js';
|
|
10
4
|
function fileAdapterShorthand(typeFor) {
|
|
11
5
|
return {
|
|
12
6
|
shorthand: 'uri',
|
|
13
|
-
preProcessSnapshot: (snap) =>
|
|
14
|
-
const { uri, baseUri, adapter } = snap;
|
|
15
|
-
if (adapter) {
|
|
16
|
-
return snap;
|
|
17
|
-
}
|
|
18
|
-
return {
|
|
19
|
-
adapter: typeof uri === 'string'
|
|
20
|
-
? { type: typeFor(uri), uri, ...(baseUri ? { baseUri } : {}) }
|
|
21
|
-
: { type: typeFor('') },
|
|
22
|
-
};
|
|
23
|
-
},
|
|
7
|
+
preProcessSnapshot: (snap) => expandSidecarShorthand(snap, typeFor),
|
|
24
8
|
};
|
|
25
9
|
}
|
|
26
10
|
/**
|
|
@@ -172,6 +156,25 @@ function assemblyConfigSchema(pluginManager) {
|
|
|
172
156
|
defaultValue: {},
|
|
173
157
|
description: 'Map of reference sequence name to NCBI genetic-code (translation table) id for sequences not using the standard code, e.g. { "chrM": 2 }',
|
|
174
158
|
},
|
|
159
|
+
/**
|
|
160
|
+
* #slot
|
|
161
|
+
* The reference sequences that are circular: a plasmid, an organelle, a
|
|
162
|
+
* bacterial chromosome. The circular view closes a circle of one such
|
|
163
|
+
* sequence into a ring with no gap at its origin; every other sequence
|
|
164
|
+
* keeps the gap that marks its two ends. Names are matched through
|
|
165
|
+
* refName aliasing.
|
|
166
|
+
*
|
|
167
|
+
* #example
|
|
168
|
+
* The human mitochondrion, by its RefSeq accession:
|
|
169
|
+
* ```js
|
|
170
|
+
* ['NC_012920.1']
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
circularRefNames: {
|
|
174
|
+
type: 'stringArray',
|
|
175
|
+
defaultValue: [],
|
|
176
|
+
description: 'Reference sequences that are circular (a plasmid, an organelle, a bacterial chromosome), which the circular view closes into a ring',
|
|
177
|
+
},
|
|
175
178
|
/**
|
|
176
179
|
* #slot
|
|
177
180
|
* Optional file (tab-separated `refName<TAB>geneticCodeId`, `#` comments
|
|
@@ -198,9 +201,7 @@ function assemblyConfigSchema(pluginManager) {
|
|
|
198
201
|
* commonly a tsv like chromAliases.txt from UCSC or similar
|
|
199
202
|
*/
|
|
200
203
|
adapter: pluginManager.pluggableConfigSchemaType('adapter'),
|
|
201
|
-
}, fileAdapterShorthand(
|
|
202
|
-
? 'NcbiSequenceReportAliasAdapter'
|
|
203
|
-
: 'RefNameAliasAdapter')),
|
|
204
|
+
}, fileAdapterShorthand(refNameAliasAdapterType)),
|
|
204
205
|
cytobands: ConfigurationSchema('Cytoband', {
|
|
205
206
|
/**
|
|
206
207
|
* #slot cytobands.adapter
|
|
@@ -12,6 +12,8 @@ export interface AssemblyBaseOpts {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* #stateModel AssemblyManager
|
|
15
|
+
* Keeps an `Assembly` for each assembly in the config and the session, and
|
|
16
|
+
* looks one up by name or alias.
|
|
15
17
|
*/
|
|
16
18
|
declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
17
19
|
/**
|
|
@@ -81,6 +83,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
81
83
|
getCanonicalRefName2(refName: string): string;
|
|
82
84
|
isValidRefName(refName: string): boolean;
|
|
83
85
|
} & {
|
|
86
|
+
isCircularRefName(refName: string): boolean;
|
|
84
87
|
getRefNamePosition(refName: string): number | undefined;
|
|
85
88
|
getAliasesForRefName(refName: string): string[];
|
|
86
89
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -192,6 +195,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
192
195
|
getCanonicalRefName2(refName: string): string;
|
|
193
196
|
isValidRefName(refName: string): boolean;
|
|
194
197
|
} & {
|
|
198
|
+
isCircularRefName(refName: string): boolean;
|
|
195
199
|
getRefNamePosition(refName: string): number | undefined;
|
|
196
200
|
getAliasesForRefName(refName: string): string[];
|
|
197
201
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -259,6 +263,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
259
263
|
getCanonicalRefName2(refName: string): string;
|
|
260
264
|
isValidRefName(refName: string): boolean;
|
|
261
265
|
} & {
|
|
266
|
+
isCircularRefName(refName: string): boolean;
|
|
262
267
|
getRefNamePosition(refName: string): number | undefined;
|
|
263
268
|
getAliasesForRefName(refName: string): string[];
|
|
264
269
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -346,6 +351,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
346
351
|
getCanonicalRefName2(refName: string): string;
|
|
347
352
|
isValidRefName(refName: string): boolean;
|
|
348
353
|
} & {
|
|
354
|
+
isCircularRefName(refName: string): boolean;
|
|
349
355
|
getRefNamePosition(refName: string): number | undefined;
|
|
350
356
|
getAliasesForRefName(refName: string): string[];
|
|
351
357
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -413,6 +419,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
413
419
|
getCanonicalRefName2(refName: string): string;
|
|
414
420
|
isValidRefName(refName: string): boolean;
|
|
415
421
|
} & {
|
|
422
|
+
isCircularRefName(refName: string): boolean;
|
|
416
423
|
getRefNamePosition(refName: string): number | undefined;
|
|
417
424
|
getAliasesForRefName(refName: string): string[];
|
|
418
425
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -532,6 +539,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
532
539
|
getCanonicalRefName2(refName: string): string;
|
|
533
540
|
isValidRefName(refName: string): boolean;
|
|
534
541
|
} & {
|
|
542
|
+
isCircularRefName(refName: string): boolean;
|
|
535
543
|
getRefNamePosition(refName: string): number | undefined;
|
|
536
544
|
getAliasesForRefName(refName: string): string[];
|
|
537
545
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -599,6 +607,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
599
607
|
getCanonicalRefName2(refName: string): string;
|
|
600
608
|
isValidRefName(refName: string): boolean;
|
|
601
609
|
} & {
|
|
610
|
+
isCircularRefName(refName: string): boolean;
|
|
602
611
|
getRefNamePosition(refName: string): number | undefined;
|
|
603
612
|
getAliasesForRefName(refName: string): string[];
|
|
604
613
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -682,6 +691,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
682
691
|
getCanonicalRefName2(refName: string): string;
|
|
683
692
|
isValidRefName(refName: string): boolean;
|
|
684
693
|
} & {
|
|
694
|
+
isCircularRefName(refName: string): boolean;
|
|
685
695
|
getRefNamePosition(refName: string): number | undefined;
|
|
686
696
|
getAliasesForRefName(refName: string): string[];
|
|
687
697
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -749,6 +759,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
749
759
|
getCanonicalRefName2(refName: string): string;
|
|
750
760
|
isValidRefName(refName: string): boolean;
|
|
751
761
|
} & {
|
|
762
|
+
isCircularRefName(refName: string): boolean;
|
|
752
763
|
getRefNamePosition(refName: string): number | undefined;
|
|
753
764
|
getAliasesForRefName(refName: string): string[];
|
|
754
765
|
getRefNameMapForAdapter(adapterConf: {
|
|
@@ -85,6 +85,8 @@ function createUnrecognizedAssemblyReports() {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* #stateModel AssemblyManager
|
|
88
|
+
* Keeps an `Assembly` for each assembly in the config and the session, and
|
|
89
|
+
* looks one up by name or alias.
|
|
88
90
|
*/
|
|
89
91
|
function assemblyManagerFactory(conf, pm) {
|
|
90
92
|
return types
|
|
@@ -7,6 +7,15 @@ export declare function referenceSequenceTrackId(assemblyName: unknown): string;
|
|
|
7
7
|
* filled in when omitted. Returns `snap` itself when there is nothing to do.
|
|
8
8
|
*/
|
|
9
9
|
export declare function expandAssemblySequence<T>(snap: T): T;
|
|
10
|
+
/**
|
|
11
|
+
* A sidecar sub-schema written as just its file: `{ uri: 'aliases.txt' }`
|
|
12
|
+
* becomes `{ adapter: { type, uri } }`, with `type` picked from the uri.
|
|
13
|
+
* baseUri, stamped by addRelativeUris, rides along. An explicit `adapter`
|
|
14
|
+
* passes through untouched.
|
|
15
|
+
*/
|
|
16
|
+
export declare function expandSidecarShorthand(snap: Record<string, unknown>, typeFor: (uri: string) => string): Record<string, unknown>;
|
|
17
|
+
/** The alias adapter an assembly's `refNameAliases` file is read with. */
|
|
18
|
+
export declare function refNameAliasAdapterType(uri: string): "NcbiSequenceReportAliasAdapter" | "RefNameAliasAdapter";
|
|
10
19
|
/**
|
|
11
20
|
* Expand an assembly snapshot's own shorthands into the `sequence` an assembly
|
|
12
21
|
* config declares: {@link expandAssemblySequence}, then the sequence adapter's
|
|
@@ -37,6 +37,29 @@ export function expandAssemblySequence(snap) {
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* A sidecar sub-schema written as just its file: `{ uri: 'aliases.txt' }`
|
|
42
|
+
* becomes `{ adapter: { type, uri } }`, with `type` picked from the uri.
|
|
43
|
+
* baseUri, stamped by addRelativeUris, rides along. An explicit `adapter`
|
|
44
|
+
* passes through untouched.
|
|
45
|
+
*/
|
|
46
|
+
export function expandSidecarShorthand(snap, typeFor) {
|
|
47
|
+
const { uri, baseUri, adapter } = snap;
|
|
48
|
+
if (adapter) {
|
|
49
|
+
return snap;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
adapter: typeof uri === 'string'
|
|
53
|
+
? { type: typeFor(uri), uri, ...(baseUri ? { baseUri } : {}) }
|
|
54
|
+
: { type: typeFor('') },
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** The alias adapter an assembly's `refNameAliases` file is read with. */
|
|
58
|
+
export function refNameAliasAdapterType(uri) {
|
|
59
|
+
return /sequence_report\.tsv(\.gz)?$/i.test(uri)
|
|
60
|
+
? 'NcbiSequenceReportAliasAdapter'
|
|
61
|
+
: 'RefNameAliasAdapter';
|
|
62
|
+
}
|
|
40
63
|
/**
|
|
41
64
|
* Expand an assembly snapshot's own shorthands into the `sequence` an assembly
|
|
42
65
|
* config declares: {@link expandAssemblySequence}, then the sequence adapter's
|
package/esm/checkPlugins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isStorePluginDefinition, maybePluginUrl,
|
|
1
|
+
import { isStorePluginDefinition, maybePluginUrl, resolvedPluginUrl, } from './pluginDefinitions.js';
|
|
2
2
|
// Whether a set of plugin definitions is safe to load without asking the user.
|
|
3
3
|
// Lives in core rather than a product because every product that can be handed
|
|
4
4
|
// a config by an untrusted party needs the same gate: Web from its address bar,
|
|
@@ -66,8 +66,11 @@ function isTrustedUrl(url) {
|
|
|
66
66
|
* exist to prevent on the loader side.
|
|
67
67
|
*/
|
|
68
68
|
function isTrustedDefinition(def) {
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (maybePluginUrl(def) === undefined) {
|
|
70
|
+
return isStorePluginDefinition(def);
|
|
71
|
+
}
|
|
72
|
+
const url = resolvedPluginUrl(def);
|
|
73
|
+
return url !== undefined && isTrustedUrl(url);
|
|
71
74
|
}
|
|
72
75
|
// Every url a store entry can resolve to: the top-level fallback plus each
|
|
73
76
|
// version-pinned build. A config plugin is "in the store" if its url is any of
|
|
@@ -82,7 +85,10 @@ export function checkPluginsAgainstStore(pluginsToCheck, storePlugins) {
|
|
|
82
85
|
return true;
|
|
83
86
|
}
|
|
84
87
|
const storeUrls = new Set(storePlugins.plugins.flatMap(storePluginUrls));
|
|
85
|
-
return pluginsToCheck.every(p =>
|
|
88
|
+
return pluginsToCheck.every(p => {
|
|
89
|
+
const url = resolvedPluginUrl(p);
|
|
90
|
+
return isTrustedDefinition(p) || (url !== undefined && storeUrls.has(url));
|
|
91
|
+
});
|
|
86
92
|
}
|
|
87
93
|
export async function checkPlugins(pluginsToCheck) {
|
|
88
94
|
// Trusted-by-prefix plugins and store refs are accepted without consulting
|
|
@@ -6,17 +6,8 @@ import type { AnyConfigurationModel, AnyConfigurationSchemaType, ConfigNodeActio
|
|
|
6
6
|
import type { IAnyType, ISimpleType, IType, ReferenceIdentifier, SnapshotIn, SnapshotOut } from '@jbrowse/mobx-state-tree';
|
|
7
7
|
export type { AnyConfigurationModel, AnyConfigurationSchemaType, } from './types.ts';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* is the **MST type** `ConfigurationSchema()` returned, hence `IAnyType`.
|
|
12
|
-
*
|
|
13
|
-
* A raw nested `ConfigurationSchemaDefinition` used to be a fourth member here,
|
|
14
|
-
* and it was both dead and load-bearing in the wrong direction: nothing
|
|
15
|
-
* constructs a sub-schema from one (the loop has no branch for it, so it throws
|
|
16
|
-
* "no type set for config slot"), while a plain object of strings and numbers is
|
|
17
|
-
* exactly what a *slot definition* is — so every slot in the repo matched that
|
|
18
|
-
* member instead and was never checked against `ConfigSlotDefinition` at all.
|
|
19
|
-
* `type: 'enum'`, a name this system has never had, compiled for years that way.
|
|
9
|
+
* Each entry is a slot definition, a constant (bare string/number), or a
|
|
10
|
+
* sub-schema: the MST type `ConfigurationSchema()` returned.
|
|
20
11
|
*/
|
|
21
12
|
export interface ConfigurationSchemaDefinition {
|
|
22
13
|
[n: string]: ConfigSlotDefinition | string | number | IAnyType;
|
|
@@ -46,9 +37,14 @@ export interface ConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfiguration
|
|
|
46
37
|
*/
|
|
47
38
|
shorthandWith?: Record<string, unknown>;
|
|
48
39
|
/**
|
|
49
|
-
*
|
|
50
|
-
* it in silence
|
|
51
|
-
*
|
|
40
|
+
* What a snapshot key the schema does not declare meets, where MST would
|
|
41
|
+
* drop it in silence: a config loading names the key on the console and
|
|
42
|
+
* loads without it, so a config written for another version still draws,
|
|
43
|
+
* and a write (`refusingUndeclaredKeys`) refuses it. Checked after the
|
|
44
|
+
* `shorthand` lift and the schema's own `preProcessSnapshot`, on the same
|
|
45
|
+
* paths, and only on the schema's own snapshot where a union runs every
|
|
46
|
+
* member over an entry. A display, the `explicitlyTyped` schema identified
|
|
47
|
+
* by `displayId`, is closed unless it says `false`.
|
|
52
48
|
*/
|
|
53
49
|
closed?: boolean;
|
|
54
50
|
/**
|
|
@@ -58,38 +54,36 @@ export interface ConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfiguration
|
|
|
58
54
|
* snapshot or a settings bag arrives by, and read by the `displayDefaults`
|
|
59
55
|
* router, so one declaration serves a config entry, the shorthand object, a
|
|
60
56
|
* share link and an agent's bag alike. A spelling the snapshot already
|
|
61
|
-
* carries wins over the one a lift produces
|
|
57
|
+
* carries wins over the one a lift produces, and a name the schema declares
|
|
58
|
+
* is left alone, so a subclass keeping a slot its base retired still takes
|
|
59
|
+
* it. A lift reading no value and answering no member (`() => ({})`) drops
|
|
60
|
+
* the key, which `jbrowse validate` reports as never read.
|
|
62
61
|
*/
|
|
63
62
|
retired?: Record<string, RetiredSpelling>;
|
|
64
63
|
/**
|
|
65
|
-
* A
|
|
64
|
+
* A color object's defaults by `field`, `*` for any other: the scale while
|
|
66
65
|
* `scale` is unset, and the members that scale reads while unwritten.
|
|
67
66
|
*/
|
|
68
67
|
fieldPresets?: Readonly<Record<string, {
|
|
69
68
|
readonly scale: string;
|
|
70
69
|
}>>;
|
|
70
|
+
/**
|
|
71
|
+
* The field a color object naming neither a field nor a constant maps
|
|
72
|
+
* (`withImpliedField`).
|
|
73
|
+
*/
|
|
74
|
+
impliedField?: string;
|
|
71
75
|
preProcessSnapshot?: (snapshot: Record<string, unknown>) => Record<string, unknown>;
|
|
72
76
|
requires?: REQUIREMENT[];
|
|
73
77
|
}
|
|
74
78
|
type SchemaHook = (self: any) => any;
|
|
75
79
|
/**
|
|
76
|
-
* Options as
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* puts the base's members on `self` by the time the subclass's function runs,
|
|
84
|
-
* and what lets the subclass override one by redeclaring its name. Folding to
|
|
85
|
-
* `self => ({...base(self), ...child(self)})` would give neither, and would
|
|
86
|
-
* corrupt `extend` outright (it returns `{actions, views, state}`, so a spread
|
|
87
|
-
* merge drops whichever side declared fewer of the three).
|
|
88
|
-
*
|
|
89
|
-
* `preProcessSnapshot` is the exception and composes into a single function,
|
|
90
|
-
* `child(base(snapshot))`: the base normalizes and migrates first, the subclass
|
|
91
|
-
* refines. It has to stay one function because `preProcessSnapshotWith` runs it
|
|
92
|
-
* straight off the registry, over a partial settings bag as well as a snapshot.
|
|
80
|
+
* Options as stored, with a `baseConfiguration`'s hooks merged in. `actions`,
|
|
81
|
+
* `views` and `extend` stay a chain that MST applies one call per entry, which
|
|
82
|
+
* puts the base's members on `self` before the subclass's function runs and
|
|
83
|
+
* lets the subclass override one by name; a spread merge would give neither,
|
|
84
|
+
* and would drop half of `extend`'s `{actions, views, state}`.
|
|
85
|
+
* `preProcessSnapshot` composes into one function, `child(base(snapshot))`,
|
|
86
|
+
* since `preProcessSnapshotWith` runs it off the registry.
|
|
93
87
|
*/
|
|
94
88
|
export interface MergedConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfigurationSchemaType | undefined, EXPLICIT_IDENTIFIER extends string | undefined> extends Omit<ConfigurationSchemaOptions<BASE_SCHEMA, EXPLICIT_IDENTIFIER>, 'actions' | 'views' | 'extend'> {
|
|
95
89
|
actions?: SchemaHook | SchemaHook[];
|
|
@@ -98,21 +92,16 @@ export interface MergedConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfigu
|
|
|
98
92
|
}
|
|
99
93
|
declare function makeConfigurationSchemaModel<DEFINITION extends ConfigurationSchemaDefinition, OPTIONS extends MergedConfigurationSchemaOptions<any, any>>(modelName: string, schemaDefinition: DEFINITION, options: OPTIONS): import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IModelType<Record<string, any>, ConfigNodeActions, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
100
94
|
/**
|
|
101
|
-
* DEFINITION is unconstrained
|
|
102
|
-
* `
|
|
103
|
-
*
|
|
104
|
-
* satisfy one would put an index signature straight back into
|
|
105
|
-
* `keyof DEFINITION`. The authoring check lives on `ConfigurationSchema`'s own
|
|
106
|
-
* parameter, where the literal arrives, and on the `extends` clause below.
|
|
95
|
+
* DEFINITION is unconstrained: a constraint would put an index signature back
|
|
96
|
+
* into `keyof DEFINITION`. `ConfigurationSchema`'s own parameter checks the
|
|
97
|
+
* literal where it arrives. ADR-145.
|
|
107
98
|
*/
|
|
108
99
|
export interface ConfigurationSchemaType<out DEFINITION, OPTIONS extends ConfigurationSchemaOptions<any, any>> extends ReturnType<typeof makeConfigurationSchemaModel<DEFINITION & ConfigurationSchemaDefinition, OPTIONS>> {
|
|
109
100
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* out. `TypeWithoutSTN` too, since a wrapper — `types.optional`,
|
|
115
|
-
* `types.stripDefault` — builds its instance from that one.
|
|
101
|
+
* Replaces the factory's `Record<string, any>` props with the definition's,
|
|
102
|
+
* and brands the node with this schema for `ConfigurationSchemaForModel`.
|
|
103
|
+
* `TypeWithoutSTN` is what a `types.optional` or `stripDefault` wrapper builds
|
|
104
|
+
* its instance from.
|
|
116
105
|
*/
|
|
117
106
|
readonly Type: ConfigNodeProps<DEFINITION> & ConfigNodeActions & ConfigNodeBrand<this>;
|
|
118
107
|
readonly TypeWithoutSTN: ConfigNodeProps<DEFINITION> & ConfigNodeActions;
|
|
@@ -133,70 +122,32 @@ export declare function ConfigurationSchema<const DEFINITION extends Configurati
|
|
|
133
122
|
} : unknown), BASE_SCHEMA>, ConfigurationSchemaOptions<BASE_SCHEMA, EXPLICIT_IDENTIFIER, EXPLICITLY_TYPED>>;
|
|
134
123
|
/**
|
|
135
124
|
* #api core/configuration
|
|
136
|
-
* Hydrate a plain track config
|
|
137
|
-
* `type` to find the schema.
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* `preProcessSnapshot` has not run, and nothing that walks a live node applies
|
|
141
|
-
* to it.
|
|
125
|
+
* Hydrate a plain track config, such as a `session.tracks` entry, into a live
|
|
126
|
+
* config node, dispatching on its `type` to find the schema. A plain entry
|
|
127
|
+
* holds only what was authored: a slot at its default is absent and
|
|
128
|
+
* `preProcessSnapshot` has not run.
|
|
142
129
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* Returns **undefined** when the config names a track type no plugin
|
|
148
|
-
* registered, or when `create` rejects it as invalid. An un-hydrated config has
|
|
149
|
-
* never been validated, so the dialog opening over it should not throw. Callers
|
|
150
|
-
* fall back to using the plain object.
|
|
151
|
-
*
|
|
152
|
-
* Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating
|
|
153
|
-
* the same entry twice returns the same node, and in an admin session a track
|
|
154
|
-
* opened later resolves to that same node. A non-admin's open track
|
|
155
|
-
* resolves to the session's private working copy (ADR-032), and this function
|
|
156
|
-
* returns the pristine mirror beside it. The two have the same content;
|
|
157
|
-
* `CopyConfigEntryPoints.test.ts` tests both cases.
|
|
130
|
+
* Returns **undefined** when no plugin registered the type or `create` rejects
|
|
131
|
+
* the config, which has never been validated; callers fall back to the plain
|
|
132
|
+
* object. Hydrating one entry twice returns one node. A shown track resolves to
|
|
133
|
+
* the session's working copy instead (ADR-032), which has the same content.
|
|
158
134
|
*/
|
|
159
135
|
export declare function hydrateTrackConfig(pluginManager: PluginManager, config: Record<string, unknown>): AnyConfigurationModel | undefined;
|
|
160
136
|
type ConfigReferenceInstance<SCHEMA extends AnyConfigurationSchemaType> = SCHEMA extends ConfigurationSchemaType<infer D, any> ? IsAny<D> extends true ? any : SCHEMA['Type'] : SCHEMA['Type'];
|
|
161
137
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* `
|
|
166
|
-
*
|
|
167
|
-
* its precise slot value types instead of `any`. The snapshot types stay
|
|
168
|
-
* `id-string | schema-snapshot`, matching the runtime union (`idOrSnapshotUnion`):
|
|
169
|
-
* a saved config serializes to its id string, and both an id string and a full
|
|
170
|
-
* inline snapshot are accepted as input — so views that push string ids or
|
|
171
|
-
* synthesized configs (`CircularView`, `SvInspectorView`) keep type-checking.
|
|
172
|
-
*
|
|
173
|
-
* Built by `Omit`-ing `Type` off `IType` and re-adding it, rather than reusing
|
|
174
|
-
* the runtime `ITypeUnion`: `IType`'s own `Type` is `STNValue<T, this>`, which
|
|
175
|
-
* re-brands `T` with `IStateTreeNode<this>`. Layering that over an already-branded
|
|
176
|
-
* `SCHEMA['Type']` (which carries `IStateTreeNode<SCHEMA>`) double-brands the
|
|
177
|
-
* node, and the two competing `IStateTreeNode<…>` brands defeat the single
|
|
178
|
-
* `infer SCHEMA` in `ConfigurationSchemaForModel` (leaving it `any`). Re-adding a
|
|
179
|
-
* plain `Type` keeps the single brand. See the "Config read type narrowing"
|
|
180
|
-
* section of `packages/core/src/configuration/CLAUDE.md`.
|
|
138
|
+
* The type of a track or display model's `configuration` prop: snapshots are
|
|
139
|
+
* `id | config`, as the runtime union takes, and the instance carries the
|
|
140
|
+
* concrete schema so `getConf(self, slot)` narrows. `Type` is re-added rather
|
|
141
|
+
* than taken from `IType`, whose `STNValue` would brand the node a second time
|
|
142
|
+
* and leave `ConfigurationSchemaForModel` inferring `any`.
|
|
181
143
|
*/
|
|
182
144
|
export type IConfigurationReference<SCHEMA extends AnyConfigurationSchemaType> = Omit<IType<ReferenceIdentifier | SnapshotIn<SCHEMA>, ReferenceIdentifier | SnapshotOut<SCHEMA>, ConfigReferenceInstance<SCHEMA>>, 'Type'> & {
|
|
183
145
|
readonly Type: ConfigReferenceInstance<SCHEMA>;
|
|
184
146
|
};
|
|
185
147
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
* Display schemas must declare `explicitIdentifier: 'displayId'` (directly or
|
|
191
|
-
* via `baseConfiguration: baseLinearDisplayConfigSchema`, which merges its
|
|
192
|
-
* options through `preprocessConfigurationSchemaArguments`).
|
|
193
|
-
*
|
|
194
|
-
* The return is annotated `IConfigurationReference<SCHEMATYPE>` (see its doc)
|
|
195
|
-
* so `self.configuration` carries the concrete schema. The three runtime
|
|
196
|
-
* branches produce MST reference/union types over `schemaType` that are
|
|
197
|
-
* assignable to that annotation, so `return ref` needs no cast — and must not
|
|
198
|
-
* get one: a prior `as SCHEMATYPE` was dropped because it narrowed `SnapshotIn`
|
|
199
|
-
* to just the object branch and forced callers pushing string ids to
|
|
200
|
-
* `@ts-expect-error` (see `TrackConfigurationReference`'s note).
|
|
148
|
+
* A reference resolved by the schema's identifier: a `trackId` through the
|
|
149
|
+
* session, a `displayId` through the containing track's `displays`, anything
|
|
150
|
+
* else by MST's own identifier lookup. No `as SCHEMATYPE` on the return: it
|
|
151
|
+
* would narrow `SnapshotIn` to the object branch and refuse a string id.
|
|
201
152
|
*/
|
|
202
153
|
export declare function ConfigurationReference<SCHEMATYPE extends AnyConfigurationSchemaType>(schemaType: SCHEMATYPE): IConfigurationReference<SCHEMATYPE>;
|