@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
|
@@ -6,26 +6,17 @@ import ConfigSlot, { slotWriteRefusal } from './configurationSlot.js';
|
|
|
6
6
|
import { checkRequirements } from './requirements.js';
|
|
7
7
|
import { getConfigurationSchemaMetadata, registerConfigurationSchema, } from './schemaRegistry.js';
|
|
8
8
|
import { isConfigurationSchemaType, isConstantEntry, isSlotDefinitionEntry, shorthandTargetsOf, } from './schemaTypes.js';
|
|
9
|
-
import { preProcessSnapshotWith } from './snapshotPreprocess.js';
|
|
9
|
+
import { preProcessSnapshotWith, refusingUndeclaredKeys, } from './snapshotPreprocess.js';
|
|
10
10
|
function hookList(hook) {
|
|
11
11
|
return hook === undefined ? [] : Array.isArray(hook) ? hook : [hook];
|
|
12
12
|
}
|
|
13
|
-
// base first, then child. Returns the single function unchanged when only one
|
|
14
|
-
// side declares the hook, so the common case never allocates a chain.
|
|
15
13
|
function chainHooks(base, child) {
|
|
16
14
|
return base && child
|
|
17
15
|
? [...hookList(base), ...hookList(child)]
|
|
18
16
|
: (child ?? base);
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* are added and sub-schema entries replaced wholesale, but a slot the subclass
|
|
23
|
-
* **redeclares merges field-by-field over the base's** — so an override states
|
|
24
|
-
* only what actually differs and inherits the rest. (`type` comes along
|
|
25
|
-
* regardless: it is what marks an entry as a slot rather than a nested
|
|
26
|
-
* sub-schema, per `isSlotDefinitionEntry`.) The cases are pinned by the
|
|
27
|
-
* "baseConfiguration slot override merge" tests.
|
|
28
|
-
*/
|
|
18
|
+
// A redeclared slot merges field-by-field over the base's, so an override states
|
|
19
|
+
// only what differs; a sub-schema or a constant is replaced whole.
|
|
29
20
|
function mergeSchemaDefinition(baseDefinition, childDefinition) {
|
|
30
21
|
const merged = {
|
|
31
22
|
...baseDefinition,
|
|
@@ -33,8 +24,6 @@ function mergeSchemaDefinition(baseDefinition, childDefinition) {
|
|
|
33
24
|
};
|
|
34
25
|
for (const [slot, childEntry] of Object.entries(childDefinition)) {
|
|
35
26
|
const baseEntry = baseDefinition[slot];
|
|
36
|
-
// both sides must be slot definitions: a sub-schema (or a constant) is an
|
|
37
|
-
// opaque entry with no fields to fold, so it keeps replace semantics
|
|
38
27
|
if (isSlotDefinitionEntry(baseEntry) && isSlotDefinitionEntry(childEntry)) {
|
|
39
28
|
merged[slot] = { ...baseEntry, ...childEntry };
|
|
40
29
|
}
|
|
@@ -58,32 +47,19 @@ function preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition
|
|
|
58
47
|
if (typeof modelName !== 'string') {
|
|
59
48
|
throw new Error('first arg must be string name of the model that this config schema goes with');
|
|
60
49
|
}
|
|
61
|
-
// if we have a base configuration schema that we are
|
|
62
|
-
// extending, grab the slot definitions from that
|
|
63
50
|
let schemaDefinition = inputSchemaDefinition;
|
|
64
51
|
let options = inputOptions;
|
|
65
52
|
const baseMeta = inputOptions.baseConfiguration
|
|
66
53
|
? getConfigurationSchemaMetadata(inputOptions.baseConfiguration)
|
|
67
54
|
: undefined;
|
|
68
|
-
// A base with no registry entry used to be skipped in silence, producing a
|
|
69
|
-
// schema missing every inherited slot with nothing thrown anywhere, and
|
|
70
|
-
// reachable without doing anything obviously wrong:
|
|
71
|
-
// `pluginManager.pluggableConfigSchemaType(…)` hands back a `types.union`,
|
|
72
|
-
// which carries no slot table of its own.
|
|
73
55
|
if (inputOptions.baseConfiguration && !baseMeta) {
|
|
74
56
|
throw new Error(`${modelName}'s baseConfiguration is not a configuration schema: it has no registered slot table, so every slot it was meant to inherit would be dropped silently. Pass the type ConfigurationSchema() returned, not a union (pluginManager.pluggableConfigSchemaType) or a plain MST model.`);
|
|
75
57
|
}
|
|
76
58
|
if (baseMeta) {
|
|
77
59
|
schemaDefinition = mergeSchemaDefinition(baseMeta.definition, schemaDefinition);
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
// replace-semantics meant no track config schema could ever declare its
|
|
82
|
-
// own without silently dropping display-stub injection and the legacy-key
|
|
83
|
-
// migration, and a subclass stating one requirement would have dropped
|
|
84
|
-
// every one its base stated. They compose instead, base first, and
|
|
85
|
-
// `retired` merges per key so a subclass adds a spelling without dropping
|
|
86
|
-
// the ones its base retired. See MergedConfigurationSchemaOptions.
|
|
60
|
+
// The hooks, `requires` and `retired` compose, base first, where every
|
|
61
|
+
// other option is replaced by the child's: a track schema's own
|
|
62
|
+
// preProcessSnapshot must not drop the base's display-stub injection.
|
|
87
63
|
const basePreProcess = baseMeta.options.preProcessSnapshot;
|
|
88
64
|
const childPreProcess = inputOptions.preProcessSnapshot;
|
|
89
65
|
const requires = [
|
|
@@ -106,10 +82,12 @@ function preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition
|
|
|
106
82
|
requires: requires.length ? requires : undefined,
|
|
107
83
|
};
|
|
108
84
|
}
|
|
85
|
+
if (options.explicitlyTyped && options.explicitIdentifier === 'displayId') {
|
|
86
|
+
options = { ...options, closed: options.closed ?? true };
|
|
87
|
+
}
|
|
109
88
|
return { schemaDefinition, options };
|
|
110
89
|
}
|
|
111
90
|
function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
112
|
-
// now assemble the MST model of the configuration schema
|
|
113
91
|
const modelDefinition = {};
|
|
114
92
|
if (options.explicitlyTyped) {
|
|
115
93
|
modelDefinition.type = types.optional(types.literal(modelName), modelName);
|
|
@@ -118,30 +96,18 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
118
96
|
if (identifier) {
|
|
119
97
|
modelDefinition[identifier] = types.identifier;
|
|
120
98
|
}
|
|
121
|
-
// String/number entries in the schema definition become volatile instance
|
|
122
|
-
// constants (read via `model.someName`). Per-slot metadata lives in the
|
|
123
|
-
// schema registry (a WeakMap keyed by the MST type, see schemaRegistry.ts),
|
|
124
|
-
// not on the instance.
|
|
125
99
|
const volatileConstants = {};
|
|
126
|
-
// The members `setSubschema` replaces: a single sub-schema, swapped for a
|
|
127
|
-
// node built from the data, or a collection of them, assigned whole so MST
|
|
128
|
-
// reconciles the entries. Collected as the loop classifies each entry.
|
|
129
100
|
const subSchemaKeys = new Set();
|
|
130
101
|
const collectionKeys = new Set();
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
// which setSlot may write. Same collect-as-you-classify as subSchemaKeys.
|
|
102
|
+
// narrower than `modelDefinition`, which also holds the identifier and the
|
|
103
|
+
// sub-schemas, neither of which setSlot may write
|
|
134
104
|
const slotKeys = new Set();
|
|
135
|
-
const storesNull = new Set();
|
|
136
105
|
const featureFields = new Set();
|
|
137
106
|
const takesNoCallback = new Map();
|
|
138
107
|
for (const [slotName, slotDefinition] of Object.entries(schemaDefinition)) {
|
|
139
108
|
if (isConfigurationSchemaType(slotDefinition)) {
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
// wrapped so an empty collection is likewise omitted from the snapshot,
|
|
143
|
-
// unless it is wrapped in a default of its own: a display built on
|
|
144
|
-
// another names its own default plot that way.
|
|
109
|
+
// an empty collection strips from the snapshot as an all-default
|
|
110
|
+
// sub-schema does, unless it names a default of its own
|
|
145
111
|
if (isArrayType(slotDefinition) || isMapType(slotDefinition)) {
|
|
146
112
|
modelDefinition[slotName] = isOptionalType(slotDefinition)
|
|
147
113
|
? slotDefinition
|
|
@@ -157,13 +123,9 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
157
123
|
volatileConstants[slotName] = slotDefinition;
|
|
158
124
|
}
|
|
159
125
|
else if (isSlotDefinitionEntry(slotDefinition)) {
|
|
160
|
-
// slotDefinition is narrowed to ConfigSlotDefinition here (no cast)
|
|
161
126
|
slotKeys.add(slotName);
|
|
162
127
|
try {
|
|
163
128
|
modelDefinition[slotName] = ConfigSlot(slotDefinition);
|
|
164
|
-
if (modelDefinition[slotName].is(null)) {
|
|
165
|
-
storesNull.add(slotName);
|
|
166
|
-
}
|
|
167
129
|
if (slotDefinition.type === 'featureField') {
|
|
168
130
|
featureFields.add(slotName);
|
|
169
131
|
}
|
|
@@ -176,8 +138,6 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
176
138
|
}
|
|
177
139
|
}
|
|
178
140
|
else if (typeof slotDefinition === 'object') {
|
|
179
|
-
// an object that's neither a sub-schema nor a slot is almost always a
|
|
180
|
-
// slot definition missing its required `type` field
|
|
181
141
|
throw new Error(`no type set for config slot ${modelName}.${slotName}`);
|
|
182
142
|
}
|
|
183
143
|
else {
|
|
@@ -188,16 +148,17 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
188
148
|
checkShorthand(modelName, schemaDefinition, options.shorthand);
|
|
189
149
|
let completeModel = types
|
|
190
150
|
.model(`${modelName}ConfigurationSchema`, modelDefinition)
|
|
191
|
-
// annotated so `ConfigurationSchemaType['Type']`, which
|
|
192
|
-
//
|
|
193
|
-
// nothing derived off them keeps a signature), cannot drift from them
|
|
151
|
+
// annotated so `ConfigurationSchemaType['Type']`, which names these by
|
|
152
|
+
// hand, cannot drift from them
|
|
194
153
|
.actions((self) => ({
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
// collection it is the whole list or map, and `null` resets it to its
|
|
198
|
-
// default, empty unless the collection names one.
|
|
154
|
+
// `data` is whatever the sub-schema's preProcessSnapshot takes; a
|
|
155
|
+
// collection takes the whole list or map, and `null` resets it
|
|
199
156
|
setSubschema(slotName, data) {
|
|
200
157
|
if (collectionKeys.has(slotName)) {
|
|
158
|
+
// checked on a copy, since the assignment runs patch listeners
|
|
159
|
+
if (data != null && !isStateTreeNode(data)) {
|
|
160
|
+
refusingUndeclaredKeys(() => modelDefinition[slotName].create(data));
|
|
161
|
+
}
|
|
201
162
|
self[slotName] = data ?? undefined;
|
|
202
163
|
return self[slotName];
|
|
203
164
|
}
|
|
@@ -206,32 +167,16 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
206
167
|
}
|
|
207
168
|
const newSchema = isStateTreeNode(data)
|
|
208
169
|
? data
|
|
209
|
-
: modelDefinition[slotName].create(data);
|
|
170
|
+
: refusingUndeclaredKeys(() => modelDefinition[slotName].create(data));
|
|
210
171
|
self[slotName] = newSchema;
|
|
211
172
|
return newSchema;
|
|
212
173
|
},
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
//
|
|
216
|
-
//
|
|
217
|
-
// **Don't weaken the membership check to a warning, and don't check
|
|
218
|
-
// against `modelDefinition`** — that also holds the identifier and the
|
|
219
|
-
// sub-schema properties, neither of which is a write this action is for.
|
|
220
|
-
// Slot-name safety is a write guard (ADR-052); `setSlot`'s tests in
|
|
221
|
-
// `configurationSchema.test.ts` pin both halves. `slotKeys` already has
|
|
222
|
-
// base-schema slots merged in, so an inherited slot passes.
|
|
223
|
-
// `null` resets, the same thing `undefined` does, because a JSON-borne
|
|
224
|
-
// caller cannot spell `undefined`: a session spec, share link or agent
|
|
225
|
-
// call can set a slot and then has no way to put it back. Omitting the
|
|
226
|
-
// key is not that — this action is the merge path, where an absent key
|
|
227
|
-
// means "leave it alone". A sub-schema reads `null` the same way, and
|
|
228
|
-
// no slot stores `null` as a value.
|
|
174
|
+
// The name check is a write guard (ADR-052), never a warning. `null`
|
|
175
|
+
// resets, as `undefined` does, since JSON cannot spell `undefined`
|
|
176
|
+
// (ADR-146).
|
|
229
177
|
setSlot(slotName, rawValue) {
|
|
230
178
|
const value = rawValue ?? undefined;
|
|
231
179
|
if (!slotKeys.has(slotName)) {
|
|
232
|
-
// the sub-schema branch re-classifies off the definition rather than
|
|
233
|
-
// carrying a second Set: it runs only on the way to a throw, and the
|
|
234
|
-
// predicate is the same one the loop above classified with
|
|
235
180
|
throw new Error(isConfigurationSchemaType(schemaDefinition[slotName])
|
|
236
181
|
? `${slotName} is a sub-schema on ${modelName}, not a config slot — replace it with setSubschema`
|
|
237
182
|
: `${modelName} has no config slot "${slotName}". Valid slots: ${[
|
|
@@ -240,10 +185,7 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
240
185
|
.sort()
|
|
241
186
|
.join(', ')}`);
|
|
242
187
|
}
|
|
243
|
-
// MST skips its own type check in a production build
|
|
244
|
-
// slot's union cannot take is then dropped with no throw: the write
|
|
245
|
-
// reported success and the slot kept its old value. `is` still runs
|
|
246
|
-
// there, so the guard holds in both builds.
|
|
188
|
+
// MST skips its own type check in a production build; `is` does not
|
|
247
189
|
if (!modelDefinition[slotName].is(value)) {
|
|
248
190
|
const declared = schemaDefinition[slotName];
|
|
249
191
|
const slotType = isSlotDefinitionEntry(declared)
|
|
@@ -263,8 +205,6 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
263
205
|
if (Object.keys(volatileConstants).length) {
|
|
264
206
|
completeModel = completeModel.volatile(( /* self */) => volatileConstants);
|
|
265
207
|
}
|
|
266
|
-
// one MST call per entry, base's before the subclass's — chaining is what
|
|
267
|
-
// makes the base's members visible on `self` inside the subclass's function
|
|
268
208
|
for (const hook of hookList(options.actions)) {
|
|
269
209
|
completeModel = completeModel.actions(hook);
|
|
270
210
|
}
|
|
@@ -278,7 +218,6 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
278
218
|
name: modelName,
|
|
279
219
|
definition: schemaDefinition,
|
|
280
220
|
options,
|
|
281
|
-
storesNull,
|
|
282
221
|
featureFields,
|
|
283
222
|
takesNoCallback,
|
|
284
223
|
};
|
|
@@ -287,18 +226,15 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
287
226
|
const modelDefault = options.explicitlyTyped
|
|
288
227
|
? { type: modelName, ...identifierDefault }
|
|
289
228
|
: identifierDefault;
|
|
290
|
-
// stripDefault
|
|
291
|
-
//
|
|
292
|
-
// collapses to its default, and the parent's stripDefault drops the key.
|
|
229
|
+
// stripDefault, not optional, so an all-default sub-schema leaves its
|
|
230
|
+
// parent's snapshot
|
|
293
231
|
registerConfigurationSchema(completeModel, metadata);
|
|
294
232
|
return types.stripDefault(completeModel, modelDefault);
|
|
295
233
|
}
|
|
296
|
-
// Assigning an array makes MST reconcile it,
|
|
297
|
-
//
|
|
298
|
-
//
|
|
299
|
-
//
|
|
300
|
-
// `push` overflows the stack past about 120,000 names. An unchanged array is
|
|
301
|
-
// left alone, so it fires no observer.
|
|
234
|
+
// Assigning an array makes MST reconcile it entry by entry, seconds for a
|
|
235
|
+
// reorder of 5,000 row names; refilling a scalar array takes 50 ms.
|
|
236
|
+
// spliceWithArray, since spreading into `push` overflows the stack past about
|
|
237
|
+
// 120,000 entries.
|
|
302
238
|
function refillArray(held, value) {
|
|
303
239
|
if (held.length !== value.length || held.some((v, i) => v !== value[i])) {
|
|
304
240
|
held.clear();
|
|
@@ -309,39 +245,22 @@ export function ConfigurationSchema(modelName, inputSchemaDefinition, inputOptio
|
|
|
309
245
|
const { schemaDefinition, options } = preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition, inputOptions);
|
|
310
246
|
return makeConfigurationSchemaModel(modelName, schemaDefinition, options);
|
|
311
247
|
}
|
|
312
|
-
//
|
|
313
|
-
//
|
|
314
|
-
// drift on which env they build with. The memo it goes through belongs to the
|
|
315
|
-
// PluginManager instance (ADR-031): a node built with one instance's env must
|
|
316
|
-
// never be handed to another, and `pluginManager.hydratedTrackConfig` scopes
|
|
317
|
-
// that structurally rather than by convention.
|
|
248
|
+
// memoized per PluginManager, so a node never crosses to another instance's env
|
|
249
|
+
// (ADR-031)
|
|
318
250
|
function hydrateInto(pluginManager, schemaType, frozen) {
|
|
319
251
|
return pluginManager.hydratedTrackConfig(schemaType, frozen, () => schemaType.create(frozen, { pluginManager }));
|
|
320
252
|
}
|
|
321
253
|
/**
|
|
322
254
|
* #api core/configuration
|
|
323
|
-
* Hydrate a plain track config
|
|
324
|
-
* `type` to find the schema.
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
* `preProcessSnapshot` has not run, and nothing that walks a live node applies
|
|
328
|
-
* to it.
|
|
329
|
-
*
|
|
330
|
-
* Use it where a caller needs the resolved config and may be handed either
|
|
331
|
-
* form. The About dialog's "Copy config" is reached from two menus, and one of
|
|
332
|
-
* them passes a `session.tracks` entry.
|
|
333
|
-
*
|
|
334
|
-
* Returns **undefined** when the config names a track type no plugin
|
|
335
|
-
* registered, or when `create` rejects it as invalid. An un-hydrated config has
|
|
336
|
-
* never been validated, so the dialog opening over it should not throw. Callers
|
|
337
|
-
* fall back to using the plain object.
|
|
255
|
+
* Hydrate a plain track config, such as a `session.tracks` entry, into a live
|
|
256
|
+
* config node, dispatching on its `type` to find the schema. A plain entry
|
|
257
|
+
* holds only what was authored: a slot at its default is absent and
|
|
258
|
+
* `preProcessSnapshot` has not run.
|
|
338
259
|
*
|
|
339
|
-
*
|
|
340
|
-
* the
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* returns the pristine mirror beside it. The two have the same content;
|
|
344
|
-
* `CopyConfigEntryPoints.test.ts` tests both cases.
|
|
260
|
+
* Returns **undefined** when no plugin registered the type or `create` rejects
|
|
261
|
+
* the config, which has never been validated; callers fall back to the plain
|
|
262
|
+
* object. Hydrating one entry twice returns one node. A shown track resolves to
|
|
263
|
+
* the session's working copy instead (ADR-032), which has the same content.
|
|
345
264
|
*/
|
|
346
265
|
export function hydrateTrackConfig(pluginManager, config) {
|
|
347
266
|
const type = config.type;
|
|
@@ -349,10 +268,6 @@ export function hydrateTrackConfig(pluginManager, config) {
|
|
|
349
268
|
return undefined;
|
|
350
269
|
}
|
|
351
270
|
try {
|
|
352
|
-
// getTrackType throws on an unregistered name rather than returning
|
|
353
|
-
// undefined, so it is inside the guard with `create` — the two failures are
|
|
354
|
-
// the same failure (nothing here can build this config) and neither should
|
|
355
|
-
// reach a dialog that is only trying to show it
|
|
356
271
|
const { configSchema } = pluginManager.getTrackType(type);
|
|
357
272
|
return hydrateInto(pluginManager, configSchema, config);
|
|
358
273
|
}
|
|
@@ -361,52 +276,24 @@ export function hydrateTrackConfig(pluginManager, config) {
|
|
|
361
276
|
return undefined;
|
|
362
277
|
}
|
|
363
278
|
}
|
|
364
|
-
//
|
|
365
|
-
//
|
|
366
|
-
//
|
|
367
|
-
// side — the explicit snapshot dispatcher (string → ref, object → schema)
|
|
368
|
-
// disambiguates. Shared by TrackConfigurationReference/DisplayConfigurationReference,
|
|
369
|
-
// and by neither accident nor oversight NOT by the plain branch — see the note
|
|
370
|
-
// on it in `ConfigurationReference`.
|
|
371
|
-
//
|
|
372
|
-
// One consequence, because both refs' `set` callbacks read as if it were not
|
|
373
|
-
// true: assigning a config **node** here does not store a reference to it. The
|
|
374
|
-
// dispatcher sees a non-string and picks `schemaType`, so MST tries to adopt the
|
|
375
|
-
// node as an inline child — which throws if it already has a parent. `set` is
|
|
376
|
-
// therefore unreachable on both refs (checked by making it throw: 231 suites
|
|
377
|
-
// stayed green), and exists only because MST rejects a custom reference
|
|
378
|
-
// declaring `get` without it. The plain branch, with no dispatcher, does the
|
|
379
|
-
// opposite and stores the reference.
|
|
279
|
+
// An id string resolves through `ref`; an object is an inline config. So
|
|
280
|
+
// assigning a node here adopts it as a child rather than storing a reference,
|
|
281
|
+
// which makes both refs' `set` unreachable: MST only requires one beside `get`.
|
|
380
282
|
function idOrSnapshotUnion(ref, schemaType) {
|
|
381
283
|
return types.union({
|
|
382
284
|
dispatcher: snapshot => (typeof snapshot === 'string' ? ref : schemaType),
|
|
383
285
|
}, ref, schemaType);
|
|
384
286
|
}
|
|
385
287
|
/**
|
|
386
|
-
* Reference to a track configuration
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* string id OR a full config.** A view that synthesizes a track nobody else can
|
|
390
|
-
* draw — a read-vs-ref synteny band, an SV inspector row, a circular view's
|
|
391
|
-
* added track — writes the config here rather than registering it in
|
|
392
|
-
* `session.tracks`, and it then lives and dies with the track that holds it.
|
|
393
|
-
* `ReadVsRef.test.tsx` and `SVInspector.test.tsx` are the canaries.
|
|
394
|
-
*
|
|
395
|
-
* NOTE: don't add `as SCHEMATYPE` to the return value. It narrows SnapshotIn
|
|
396
|
-
* to just the object branch, forcing callers to wrap string ids in
|
|
397
|
-
* `@ts-expect-error`. The inferred union SnapshotIn is `string | SnapshotIn<schema>`.
|
|
288
|
+
* Reference to a track configuration, snapshotted as its trackId. It also takes
|
|
289
|
+
* a whole config: a view's synthesized track (a read-vs-ref band, an SV
|
|
290
|
+
* inspector row) holds its config inline and lives and dies with it. ADR-084.
|
|
398
291
|
*/
|
|
399
292
|
function TrackConfigurationReference(schemaType) {
|
|
400
293
|
const trackRef = types.reference(schemaType, {
|
|
401
294
|
get(id, parent) {
|
|
402
295
|
const session = getSession(parent);
|
|
403
296
|
const trackId = String(id);
|
|
404
|
-
// Per-id lookup: subscribes only to this trackId's derivation, so
|
|
405
|
-
// resolving one track's config doesn't re-render the others. A session
|
|
406
|
-
// with track deltas hands back a private, per-track working copy so a
|
|
407
|
-
// shown track's in-place quick-edits mutate that copy and never the
|
|
408
|
-
// shared frozen base (ADR-032); any other session falls through to the
|
|
409
|
-
// frozen hydration cache (ADR-031).
|
|
410
297
|
const ret = isSessionWithEditableTrackConfig(session)
|
|
411
298
|
? session.getEditableTrackConfig(trackId, schemaType)
|
|
412
299
|
: session.getTrackById(trackId);
|
|
@@ -424,52 +311,19 @@ function TrackConfigurationReference(schemaType) {
|
|
|
424
311
|
return idOrSnapshotUnion(trackRef, schemaType);
|
|
425
312
|
}
|
|
426
313
|
/**
|
|
427
|
-
* Reference to a display configuration
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
* 2. by `parent.type` — handles old sessions where the saved displayId
|
|
433
|
-
* no longer matches but a display of the same type exists on the track
|
|
434
|
-
*
|
|
435
|
-
* Step 2 is the safety net because `baseTrackConfig.preProcessSnapshot`
|
|
436
|
-
* already injects a stub display for every registered displayType on the
|
|
437
|
-
* track, so a same-type lookup always succeeds at runtime for properly
|
|
438
|
-
* loaded tracks. It is what carries a **renamed display type** across for a
|
|
439
|
-
* catalog track: the injected stub is named for the new type, the display
|
|
440
|
-
* model's own `preProcessSnapshot` rewrites the state model's, and the saved
|
|
441
|
-
* `configuration` id still spells the old name, so only the type match
|
|
442
|
-
* reconnects them. Not every pre-rename session reaches it — a track config
|
|
443
|
-
* that itself declares the old display entry keeps that entry's `displayId`
|
|
444
|
-
* through the alias rewrite (`{ ...d, type: canonical }`) and wins the
|
|
445
|
-
* first-wins dedupe, so its session resolves by id. An older third step
|
|
446
|
-
* auto-created a *detached* config when neither matched — that produced an
|
|
447
|
-
* orphaned MST node whose edits silently didn't persist. Removed in favor of a
|
|
448
|
-
* clear throw.
|
|
449
|
-
*
|
|
450
|
-
* The union's schemaType branch is symmetry with `TrackConfigurationReference`
|
|
451
|
-
* rather than a path anything in tree takes: the two production writers,
|
|
452
|
-
* `showTrackGeneric` and `BaseTrackModel.replaceDisplay`, both write a
|
|
453
|
-
* displayId string, because a display config belongs in its track config's
|
|
454
|
-
* `displays` array. It stays because it costs nothing and because dropping it
|
|
455
|
-
* narrows `SnapshotIn` for every caller.
|
|
314
|
+
* Reference to a display configuration in the containing track config's
|
|
315
|
+
* `displays`, snapshotted as its displayId. An id that matches nothing falls
|
|
316
|
+
* back to the display of the parent's type, which the track config always
|
|
317
|
+
* holds a stub of: that is what reconnects a session saved before a display
|
|
318
|
+
* type was renamed.
|
|
456
319
|
*/
|
|
457
320
|
function DisplayConfigurationReference(schemaType) {
|
|
458
321
|
const displayRef = types.reference(schemaType, {
|
|
459
322
|
get(id, parent) {
|
|
460
|
-
// track.configuration is a hydrated MST node (hydrated lazily via
|
|
461
|
-
// TrackConfigurationReference), so its displays array contains MST nodes.
|
|
462
323
|
const track = getContainingTrack(parent);
|
|
463
324
|
const displays = track.configuration.displays;
|
|
464
325
|
const displayType = parent.type;
|
|
465
326
|
let ret = displays.find(d => d.displayId === id);
|
|
466
|
-
// Fallback: match by display type when the displayId isn't found.
|
|
467
|
-
// baseTrackConfig.preProcessSnapshot injects a display entry for every
|
|
468
|
-
// registered displayType for the track, so id-mismatch (e.g. an old
|
|
469
|
-
// session with a different displayId convention) finds a same-type
|
|
470
|
-
// entry here. The `if (displayType)` guard prevents an undefined
|
|
471
|
-
// parent.type from silently matching a display whose `.type` is also
|
|
472
|
-
// undefined.
|
|
473
327
|
if (!ret && displayType) {
|
|
474
328
|
ret = displays.find(d => d.type === displayType);
|
|
475
329
|
}
|
|
@@ -486,21 +340,10 @@ function DisplayConfigurationReference(schemaType) {
|
|
|
486
340
|
return idOrSnapshotUnion(displayRef, schemaType);
|
|
487
341
|
}
|
|
488
342
|
/**
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
* Display schemas must declare `explicitIdentifier: 'displayId'` (directly or
|
|
494
|
-
* via `baseConfiguration: baseLinearDisplayConfigSchema`, which merges its
|
|
495
|
-
* options through `preprocessConfigurationSchemaArguments`).
|
|
496
|
-
*
|
|
497
|
-
* The return is annotated `IConfigurationReference<SCHEMATYPE>` (see its doc)
|
|
498
|
-
* so `self.configuration` carries the concrete schema. The three runtime
|
|
499
|
-
* branches produce MST reference/union types over `schemaType` that are
|
|
500
|
-
* assignable to that annotation, so `return ref` needs no cast — and must not
|
|
501
|
-
* get one: a prior `as SCHEMATYPE` was dropped because it narrowed `SnapshotIn`
|
|
502
|
-
* to just the object branch and forced callers pushing string ids to
|
|
503
|
-
* `@ts-expect-error` (see `TrackConfigurationReference`'s note).
|
|
343
|
+
* A reference resolved by the schema's identifier: a `trackId` through the
|
|
344
|
+
* session, a `displayId` through the containing track's `displays`, anything
|
|
345
|
+
* else by MST's own identifier lookup. No `as SCHEMATYPE` on the return: it
|
|
346
|
+
* would narrow `SnapshotIn` to the object branch and refuse a string id.
|
|
504
347
|
*/
|
|
505
348
|
export function ConfigurationReference(schemaType) {
|
|
506
349
|
const id = getConfigurationSchemaMetadata(schemaType)?.options.explicitIdentifier;
|
|
@@ -508,17 +351,8 @@ export function ConfigurationReference(schemaType) {
|
|
|
508
351
|
? TrackConfigurationReference(schemaType)
|
|
509
352
|
: id === 'displayId'
|
|
510
353
|
? DisplayConfigurationReference(schemaType)
|
|
511
|
-
: //
|
|
512
|
-
//
|
|
513
|
-
// session. **Deliberately not `idOrSnapshotUnion`**, even though it is
|
|
514
|
-
// the same two members: this branch is also handed a *live, in-tree*
|
|
515
|
-
// config node (`initializeInternetAccount` pushes
|
|
516
|
-
// `jbrowse.internetAccounts[i]` straight through), and an undispatched
|
|
517
|
-
// union sends that to the reference member because
|
|
518
|
-
// `BaseReferenceType.isAssignableFrom` defers to its target type. A
|
|
519
|
-
// `typeof snapshot === 'string'` dispatcher sends it to the schema
|
|
520
|
-
// member instead, and MST refuses to adopt a node that already has a
|
|
521
|
-
// parent. `InternetAccounts.test.ts` is the canary.
|
|
354
|
+
: // not idOrSnapshotUnion: this branch is handed live in-tree nodes
|
|
355
|
+
// (an internet account), which its dispatcher would try to adopt
|
|
522
356
|
types.union(types.reference(schemaType), schemaType);
|
|
523
357
|
return ref;
|
|
524
358
|
}
|
|
@@ -27,7 +27,8 @@ export type ConfigurationSchemaUnionType<MEMBERS extends Record<string, AnyConfi
|
|
|
27
27
|
* member, and a `type` naming no member is refused in every build — where a
|
|
28
28
|
* bare `types.union` would load it as its first member. Each member is an
|
|
29
29
|
* `explicitlyTyped`, `closed` schema named by its key, so a key belonging to
|
|
30
|
-
* another member is
|
|
30
|
+
* another member is named on a load and refused on a write rather than
|
|
31
|
+
* dropped; one that is not throws here.
|
|
31
32
|
*/
|
|
32
33
|
export declare function ConfigurationSchemaUnion<const MEMBERS extends Record<string, AnyConfigurationSchemaType>>(name: string, members: MEMBERS): ConfigurationSchemaUnionType<MEMBERS>;
|
|
33
34
|
/**
|
|
@@ -21,7 +21,8 @@ function memberRefusal(key, member) {
|
|
|
21
21
|
* member, and a `type` naming no member is refused in every build — where a
|
|
22
22
|
* bare `types.union` would load it as its first member. Each member is an
|
|
23
23
|
* `explicitlyTyped`, `closed` schema named by its key, so a key belonging to
|
|
24
|
-
* another member is
|
|
24
|
+
* another member is named on a load and refused on a write rather than
|
|
25
|
+
* dropped; one that is not throws here.
|
|
25
26
|
*/
|
|
26
27
|
export function ConfigurationSchemaUnion(name, members) {
|
|
27
28
|
for (const [key, member] of Object.entries(members)) {
|
|
@@ -261,29 +261,15 @@ declare const slotTypes: {
|
|
|
261
261
|
fallbackDefault: {};
|
|
262
262
|
};
|
|
263
263
|
};
|
|
264
|
-
/**
|
|
265
|
-
* The builtin table's own names — every slot type whose MST model this module
|
|
266
|
-
* supplies, so excluding the two enum types. Exported for `SlotValueByType` in
|
|
267
|
-
* `types.ts`, which has to name the same set and is checked against this.
|
|
268
|
-
*/
|
|
264
|
+
/** the types whose model this module supplies; `SlotValueByType` names the same set */
|
|
269
265
|
export type BuiltinSlotTypeName = keyof typeof slotTypes;
|
|
270
266
|
declare const ENUM_SLOT_TYPES: readonly ['stringEnum', 'maybeStringEnum', 'stringEnumArray'];
|
|
271
267
|
/**
|
|
272
|
-
* Every legal `type` on a slot definition
|
|
273
|
-
* the
|
|
274
|
-
*
|
|
275
|
-
* Closed on purpose. A name outside this set still *works* at runtime as long
|
|
276
|
-
* as a `model` is given — which is exactly the trap: the value round-trips
|
|
277
|
-
* fine, and the only symptom is that everything keyed off the type name stops
|
|
278
|
-
* recognising the slot (`slotFacade` hands the editor no `choices`, so an enum
|
|
279
|
-
* renders as a free text box).
|
|
268
|
+
* Every legal `type` on a slot definition. Closed, since a name outside it
|
|
269
|
+
* would still load with a `model` given, and every surface keyed on the name
|
|
270
|
+
* would stop recognising the slot.
|
|
280
271
|
*/
|
|
281
272
|
export type ConfigSlotType = keyof typeof slotTypes | (typeof ENUM_SLOT_TYPES)[number];
|
|
282
|
-
/**
|
|
283
|
-
* The same set as `MAYBE_TYPES`, at the type level, and derived from the same
|
|
284
|
-
* property of the same table so the two cannot disagree: an entry with no
|
|
285
|
-
* `fallbackDefault` is one whose fixed form is "unset".
|
|
286
|
-
*/
|
|
287
273
|
type MaybeBuiltinSlotTypeName = {
|
|
288
274
|
[K in keyof typeof slotTypes]: 'fallbackDefault' extends keyof (typeof slotTypes)[K] ? never : K;
|
|
289
275
|
}[keyof typeof slotTypes];
|
|
@@ -301,31 +287,19 @@ interface ConfigSlotDefinitionCommon {
|
|
|
301
287
|
*/
|
|
302
288
|
contextVariable?: string[];
|
|
303
289
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
290
|
+
* put this slot behind a toggle so common slots aren't crowded out by
|
|
291
|
+
* rarely-changed ones: "Show advanced settings" in the config editor, and
|
|
292
|
+
* the collapsed Advanced card in a track's About dialog, which also takes
|
|
293
|
+
* every slot with a `contextVariable`
|
|
306
294
|
*/
|
|
307
295
|
advanced?: boolean;
|
|
308
296
|
}
|
|
309
297
|
/**
|
|
310
|
-
* A slot definition
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
* across the repo carry a `defaultValue: undefined` line that said nothing.
|
|
316
|
-
*
|
|
317
|
-
* A `maybe*` slot's only legal `defaultValue` is the sentinel itself, but the
|
|
318
|
-
* field stays `unknown` rather than being pinned to `undefined`: the spread in
|
|
319
|
-
* `mergeSchemaDefinition` combines a base and a child whose halves may disagree,
|
|
320
|
-
* so pinning it forces a cast through the one place slot definitions are
|
|
321
|
-
* combined. `ConfigSlot` throws on a concrete one instead — and has to anyway,
|
|
322
|
-
* since no type can see what a `baseConfiguration` merged in, which is the way
|
|
323
|
-
* this mistake actually happens.
|
|
324
|
-
*
|
|
325
|
-
* Stating the sentinel stays meaningful in a subclass override, where the merge
|
|
326
|
-
* is a spread and an omitted key inherits the base's value. The same spread is
|
|
327
|
-
* why an enum slot's `model` stays optional here though `ConfigSlot` requires
|
|
328
|
-
* one: a subclass restating only the default inherits the vocabulary.
|
|
298
|
+
* A slot definition: a `maybe*` type's `defaultValue` is optional, every
|
|
299
|
+
* other's required. A `maybe*` default stays `unknown` rather than `undefined`
|
|
300
|
+
* because a subclass override is spread over its base's, which no type can see;
|
|
301
|
+
* `ConfigSlot` throws on a concrete one. An enum's `model` is optional for the
|
|
302
|
+
* same spread: an override restating only the default inherits the vocabulary.
|
|
329
303
|
*/
|
|
330
304
|
export type ConfigSlotDefinition = (ConfigSlotDefinitionCommon & {
|
|
331
305
|
/** a `maybe*` slot type, whose unset state is `undefined` */
|
|
@@ -339,33 +313,13 @@ export type ConfigSlotDefinition = (ConfigSlotDefinitionCommon & {
|
|
|
339
313
|
defaultValue: unknown;
|
|
340
314
|
});
|
|
341
315
|
/**
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* holds a `jexl:` expression as its value, which the display evaluates per
|
|
347
|
-
* feature. The value lives directly on the parent configuration model — there
|
|
348
|
-
* is no per-slot sub-model. `types.stripDefault` omits the property from the
|
|
349
|
-
* parent snapshot when it equals the default, so saved sessions stay minimal.
|
|
350
|
-
* Per-slot metadata (type/description/defaultValue/contextVariable) lives in
|
|
351
|
-
* the schema registry (a WeakMap keyed by the MST type, see
|
|
352
|
-
* schemaRegistry.ts); jexl callbacks are evaluated on read by
|
|
353
|
-
* `readConfObject`.
|
|
354
|
-
*
|
|
355
|
-
* Interning the returned type on `(type, model, defaultValue)` was prototyped
|
|
356
|
-
* and declined: a session builds 1197 slot types for 222 distinct ones, and
|
|
357
|
-
* removing the repeats moves neither the time nor the heap
|
|
358
|
-
* (`config-schema-construction`, published in `reference/EAGER_BUNDLE.md`).
|
|
316
|
+
* The MST property a slot is: its value type, or that or a `jexl:` callback
|
|
317
|
+
* where the slot declares a `contextVariable` (ADR-155), stripped from the
|
|
318
|
+
* snapshot at its default. Interning these was measured and declined
|
|
319
|
+
* (`config-schema-construction` in `reference/EAGER_BUNDLE.md`).
|
|
359
320
|
*/
|
|
360
321
|
export default function ConfigSlot(definition: ConfigSlotDefinition): import("@jbrowse/mobx-state-tree").IOptionalIType<IAnyType, [undefined]>;
|
|
361
|
-
/**
|
|
362
|
-
* New value when converting a fixed-value slot to a jexl callback. Already-
|
|
363
|
-
* callback values are returned unchanged.
|
|
364
|
-
*
|
|
365
|
-
* A single JSON.stringify covers every type: `jexl:${42}` and
|
|
366
|
-
* `jexl:${JSON.stringify(42)}` are identical for numbers/booleans, and the rest
|
|
367
|
-
* need the quoting/serialization anyway.
|
|
368
|
-
*/
|
|
322
|
+
/** A fixed value as the `jexl:` callback that returns it. */
|
|
369
323
|
export declare function toCallbackValue(value: unknown): string;
|
|
370
324
|
/**
|
|
371
325
|
* New value when converting a jexl callback back to a fixed value: try
|