@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
|
@@ -11,7 +11,7 @@ export type FieldRef = string;
|
|
|
11
11
|
/**
|
|
12
12
|
* #api
|
|
13
13
|
* A field bound to a categorical scale: each distinct value takes one entry
|
|
14
|
-
* of the channel's `range` — a
|
|
14
|
+
* of the channel's `range` — a color for `color`, a shape name for
|
|
15
15
|
* `shape`. Every value derives its entry from itself (an integer takes the
|
|
16
16
|
* slot it names, anything else hashes in), so every region agrees on a value
|
|
17
17
|
* it shares with another at the cost of an occasional collision. A `domain`
|
|
@@ -29,7 +29,7 @@ export interface CategoricalRef {
|
|
|
29
29
|
/**
|
|
30
30
|
* #api
|
|
31
31
|
* A numeric field cut into intervals: `domain` is the ascending cut points
|
|
32
|
-
* and `range` holds one
|
|
32
|
+
* and `range` holds one color more, so a value paints the entry for the
|
|
33
33
|
* number of cut points it is at or past. A value that is not a number
|
|
34
34
|
* belongs to no interval.
|
|
35
35
|
*/
|
|
@@ -40,13 +40,15 @@ export interface ThresholdRef {
|
|
|
40
40
|
range?: string[];
|
|
41
41
|
/** What the key names each bin, one each from the lowest. */
|
|
42
42
|
labels?: string[];
|
|
43
|
+
/** The key lists the bins from the highest. */
|
|
44
|
+
descending?: boolean;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* #api
|
|
46
48
|
* A numeric field read through a linear or log scale into a ramp. Each end of
|
|
47
49
|
* the domain is pinned by `domainMin` or `domainMax`, or is the region's own
|
|
48
|
-
* extreme where unset, so pinning both keeps
|
|
49
|
-
* whole view. The ramp is `range`'s CSS
|
|
50
|
+
* extreme where unset, so pinning both keeps colors consistent across a
|
|
51
|
+
* whole view. The ramp is `range`'s CSS colors, evenly spaced, where it
|
|
50
52
|
* lists any, else the named `scheme`; `reverse` turns it round.
|
|
51
53
|
*/
|
|
52
54
|
export interface ContinuousRef {
|
|
@@ -67,7 +69,7 @@ export interface ContinuousRef {
|
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* #api
|
|
70
|
-
* How a mark's `color` channel resolves. A CSS
|
|
72
|
+
* How a mark's `color` channel resolves. A CSS color or a `jexl:` expression
|
|
71
73
|
* returning one paints per feature with no scale; the object forms bind a
|
|
72
74
|
* field to a scale, which a legend can describe, and share the config's
|
|
73
75
|
* member names.
|
|
@@ -101,7 +103,7 @@ export interface LocusRef {
|
|
|
101
103
|
* A numeric field read through a linear or log scale into a width in CSS px:
|
|
102
104
|
* `range` is the px at each end of the domain (1 to 6 unset), and each end of
|
|
103
105
|
* the domain is pinned by `domainMin` or `domainMax` or follows the loaded
|
|
104
|
-
* regions' extremes where unset, as a
|
|
106
|
+
* regions' extremes where unset, as a color ramp's does. A feature holding
|
|
105
107
|
* no number takes the range's first px.
|
|
106
108
|
*/
|
|
107
109
|
export interface SizeRef {
|
|
@@ -149,18 +151,18 @@ export interface MarkEncoding {
|
|
|
149
151
|
* allocated nor transferred, and a caller that never hovers declines the
|
|
150
152
|
* index, which is most of the encoder's cost after the walk.
|
|
151
153
|
*/
|
|
152
|
-
export type LaneName = 'y' | 'color' | 'colorValue' | 'colorKey' | 'glyph' | 'row' | 'text' | 'size' | 'x2Ref' | 'index';
|
|
154
|
+
export type LaneName = 'y' | 'color' | 'colorValue' | 'colorKey' | 'glyph' | 'row' | 'text' | 'size' | 'x2Ref' | 'series' | 'index';
|
|
153
155
|
/**
|
|
154
156
|
* #api
|
|
155
|
-
* The scale a
|
|
156
|
-
* the same table the
|
|
157
|
+
* The scale a color channel was resolved through, as the legend reads it —
|
|
158
|
+
* the same table the colors in the payload came from, so the key cannot
|
|
157
159
|
* disagree with the painting.
|
|
158
160
|
*/
|
|
159
161
|
export type ColorScaleTable = {
|
|
160
162
|
kind: 'categorical';
|
|
161
163
|
field: string;
|
|
162
164
|
domain: string[];
|
|
163
|
-
/** The declared range, the other half of what assigns a key its
|
|
165
|
+
/** The declared range, the other half of what assigns a key its color. */
|
|
164
166
|
range?: string[];
|
|
165
167
|
/**
|
|
166
168
|
* Whether every non-empty key met here parsed as a finite number: a
|
|
@@ -180,7 +182,7 @@ export type ColorScaleTable = {
|
|
|
180
182
|
/** The cut points, ascending, as numbers. */
|
|
181
183
|
domain: number[];
|
|
182
184
|
/**
|
|
183
|
-
* The declared interval
|
|
185
|
+
* The declared interval colors, one more than the cuts; the default
|
|
184
186
|
* palette fills what the declaration leaves.
|
|
185
187
|
*/
|
|
186
188
|
range?: string[];
|
|
@@ -213,7 +215,7 @@ export type ColorScaleTable = {
|
|
|
213
215
|
*/
|
|
214
216
|
domainMid?: number;
|
|
215
217
|
/**
|
|
216
|
-
* The declared stops — `range`'s
|
|
218
|
+
* The declared stops — `range`'s colors or the `scheme` — and
|
|
217
219
|
* `reverse`, which with both ends pinned make up the whole declaration,
|
|
218
220
|
* so marks declaring one ramp alike share a key on it.
|
|
219
221
|
*/
|
|
@@ -272,7 +274,7 @@ export interface SizeScaleTable {
|
|
|
272
274
|
}
|
|
273
275
|
/**
|
|
274
276
|
* #api
|
|
275
|
-
* The table behind a channel a key is drawn from: a
|
|
277
|
+
* The table behind a channel a key is drawn from: a color's, whose `kind`
|
|
276
278
|
* names the scale it resolved through, or a shape's. A `size` channel's
|
|
277
279
|
* ({@link SizeScaleTable}) draws no key and stands outside.
|
|
278
280
|
*/
|
|
@@ -297,7 +299,7 @@ export interface EncodedChannels {
|
|
|
297
299
|
/**
|
|
298
300
|
* Of `skipped`, the features whose `x` or `x2` read no number, such as
|
|
299
301
|
* the edges a `bin` writes for a feature lacking its field. Absent where
|
|
300
|
-
* the layer placed nothing by a field
|
|
302
|
+
* the layer placed nothing by a field.
|
|
301
303
|
*/
|
|
302
304
|
skippedPosition?: number;
|
|
303
305
|
x: Uint32Array;
|
|
@@ -306,20 +308,20 @@ export interface EncodedChannels {
|
|
|
306
308
|
y?: Float32Array;
|
|
307
309
|
/**
|
|
308
310
|
* Each instance's packed ABGR, or one number every instance paints where
|
|
309
|
-
* the
|
|
311
|
+
* the color is a constant; {@link colorAt} reads either.
|
|
310
312
|
*/
|
|
311
313
|
color?: Uint32Array | number;
|
|
312
314
|
/**
|
|
313
|
-
* The raw values of a quantitative
|
|
315
|
+
* The raw values of a quantitative color channel — a ramp's or a
|
|
314
316
|
* threshold's — for a caller that named the `colorValue` lane: the scale
|
|
315
317
|
* then resolves on the main thread and in the shader, a ramp against a
|
|
316
318
|
* domain unioned over the loaded regions (`scale.extent` is this region's
|
|
317
319
|
* contribution) and a threshold against its cuts as uniforms. Where the
|
|
318
|
-
*
|
|
320
|
+
* color reads the field `y` plots, this IS the `y` array, not a copy.
|
|
319
321
|
*/
|
|
320
322
|
colorValue?: Float32Array;
|
|
321
323
|
/**
|
|
322
|
-
* Each instance's index into `scale.entries` under a categorical
|
|
324
|
+
* Each instance's index into `scale.entries` under a categorical color, for
|
|
323
325
|
* a caller that named the `colorKey` lane in place of `color`: the display
|
|
324
326
|
* then paints each key through its own `domain` and `range`, which never
|
|
325
327
|
* reach the worker.
|
|
@@ -328,6 +330,18 @@ export interface EncodedChannels {
|
|
|
328
330
|
/** The point painter's code for each feature's `shape`. */
|
|
329
331
|
glyph?: Uint8Array;
|
|
330
332
|
row?: Uint32Array;
|
|
333
|
+
/**
|
|
334
|
+
* Which series of its row each instance belongs to, for a layer whose
|
|
335
|
+
* request names a {@link PathSpec}: the instances come grouped series by
|
|
336
|
+
* series, each in start order, so a path strokes each series as a run of
|
|
337
|
+
* its own.
|
|
338
|
+
*/
|
|
339
|
+
series?: Uint32Array;
|
|
340
|
+
/**
|
|
341
|
+
* The stretch in bp past which a path breaks, from the request's
|
|
342
|
+
* {@link PathSpec}. Absent, a series is one run.
|
|
343
|
+
*/
|
|
344
|
+
gapBp?: number;
|
|
331
345
|
/**
|
|
332
346
|
* Each feature's `text` channel as text, `''` where the field holds
|
|
333
347
|
* nothing; a list joins its members with commas. Strings, so the lane is
|
|
@@ -343,12 +357,19 @@ export interface EncodedChannels {
|
|
|
343
357
|
*/
|
|
344
358
|
x2Ref?: Uint32Array;
|
|
345
359
|
x2RefNames?: string[];
|
|
360
|
+
/**
|
|
361
|
+
* Which arm each end's junction keeps, as render-core's `linkFeet` packs
|
|
362
|
+
* the two directions: the record's own `mateDirection` and the one beside
|
|
363
|
+
* a {@link LocusRef} `x2`'s position. Filled with `x2Ref`, and absent where
|
|
364
|
+
* no record states a direction.
|
|
365
|
+
*/
|
|
366
|
+
feet?: Uint8Array;
|
|
346
367
|
/** The finite `y` extremes, `Infinity`/`-Infinity` when nothing plotted. */
|
|
347
368
|
yMin: number;
|
|
348
369
|
yMax: number;
|
|
349
370
|
/** A Flatbush over (x, y, x2, y), when `index` was asked for and `count` is not 0. */
|
|
350
371
|
flatbushData?: ArrayBuffer;
|
|
351
|
-
/** The
|
|
372
|
+
/** The color channel's table, when `color` is a scale. */
|
|
352
373
|
scale?: ColorScaleTable;
|
|
353
374
|
/** The shape channel's table, when `shape` is a scale. */
|
|
354
375
|
shapeScale?: ShapeScaleTable;
|
|
@@ -371,6 +392,20 @@ export interface LayerRequest {
|
|
|
371
392
|
lanes: LaneName[];
|
|
372
393
|
/** This layer's own steps, run after the request's shared ones. */
|
|
373
394
|
transform?: TransformStep[];
|
|
395
|
+
/** How a mark stroking through its instances splits them into series. */
|
|
396
|
+
path?: PathSpec;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* #api
|
|
400
|
+
* A path's series, as Vega-Lite draws a line: one per row and, within a row,
|
|
401
|
+
* one per distinct value of `by`, a categorical color's field, each in start
|
|
402
|
+
* order. `gapBp` breaks a series where the next instance's middle lies further
|
|
403
|
+
* on than that; absent, a `window` step among the layer's steps sets it to the
|
|
404
|
+
* bases a frame spans at the median row, and with none a series is one run.
|
|
405
|
+
*/
|
|
406
|
+
export interface PathSpec {
|
|
407
|
+
by?: FieldRef;
|
|
408
|
+
gapBp?: number;
|
|
374
409
|
}
|
|
375
410
|
/**
|
|
376
411
|
* #api
|
|
@@ -386,6 +421,8 @@ export interface EncodedLayersResult {
|
|
|
386
421
|
zoomRange?: ZoomRange;
|
|
387
422
|
/** What the adapter said about this answer that the features cannot show. */
|
|
388
423
|
notices?: string[];
|
|
424
|
+
/** What the adapter read off the features, under names of its own. */
|
|
425
|
+
facts?: Record<string, unknown>;
|
|
389
426
|
}
|
|
390
427
|
/**
|
|
391
428
|
* #api
|
|
@@ -459,11 +496,30 @@ export interface AggregateStep {
|
|
|
459
496
|
groupby?: FieldRef[];
|
|
460
497
|
ops: AggregateOp[];
|
|
461
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* #api
|
|
501
|
+
* Every row kept, each written with `ops` summarized over the rows of its
|
|
502
|
+
* group around it, Vega-Lite's window transform: a group is a distinct
|
|
503
|
+
* `groupby` value set within a section, its rows taken in `start` order, and
|
|
504
|
+
* `frame` counts rows before and after the current one, `null` running to the
|
|
505
|
+
* group's end. `[-10, 10]`, the default, is a moving average over 21 rows,
|
|
506
|
+
* whatever bases they span; `[null, 0]` a running total. A frame cut off at a
|
|
507
|
+
* group's end summarizes the rows it has. The rows come out grouped, each
|
|
508
|
+
* group in `start` order, so a `line` walks one group at a time.
|
|
509
|
+
*/
|
|
510
|
+
export interface WindowStep {
|
|
511
|
+
type: 'window';
|
|
512
|
+
groupby?: FieldRef[];
|
|
513
|
+
frame?: [number | null, number | null];
|
|
514
|
+
ops: AggregateOp[];
|
|
515
|
+
}
|
|
462
516
|
/**
|
|
463
517
|
* #api
|
|
464
518
|
* Replace the features with runs of constant depth: how many of them overlap
|
|
465
519
|
* each stretch of the region, in a field `as` (`coverage` by default), with
|
|
466
|
-
* the stretches nothing overlaps left out.
|
|
520
|
+
* the stretches nothing overlaps left out. A read counts across its whole
|
|
521
|
+
* span, deletions and introns included; gap-aware depth stays the alignments
|
|
522
|
+
* display's (ADR-118).
|
|
467
523
|
*/
|
|
468
524
|
export interface CoverageStep {
|
|
469
525
|
type: 'coverage';
|
|
@@ -541,7 +597,7 @@ export interface MateStep {
|
|
|
541
597
|
* way GenomeSpy spells a transform; every step runs in order and the next
|
|
542
598
|
* reads what the last answered.
|
|
543
599
|
*/
|
|
544
|
-
export type TransformStep = FilterStep | FormulaStep | FlattenStep | CellsStep | BinStep | AggregateStep | CoverageStep | PileupStep | MateStep;
|
|
600
|
+
export type TransformStep = FilterStep | FormulaStep | FlattenStep | CellsStep | BinStep | AggregateStep | WindowStep | CoverageStep | PileupStep | MateStep;
|
|
545
601
|
export type CoreGetEncodedLayersArgs = {
|
|
546
602
|
adapterConfig: Record<string, unknown>;
|
|
547
603
|
region: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The id of the piece of a feature lying past a circular sequence's origin,
|
|
3
|
+
* the feature cut there and `id` the piece before it. Only GFF3 cuts:
|
|
4
|
+
* bedToBigBed refuses an end past the contig, and on 2026-10-11 none of hg38's
|
|
5
|
+
* 35 hosted BED tabix tracks had a chrM record ending past 16569.
|
|
6
|
+
*
|
|
7
|
+
* The linear view reads across the origin with the tail and head typed as two
|
|
8
|
+
* regions, `NC_012920.1:15,000-16,569 NC_012920.1:1-2,000`, where the two
|
|
9
|
+
* pieces abut in one row. A locstring that wraps past the origin, or a menu
|
|
10
|
+
* item, would save the typing; neither was built (2026-10-14).
|
|
11
|
+
*/
|
|
12
|
+
export declare function originTailId(id: string): string;
|
|
13
|
+
/** The id of the piece before the origin, when `id` names the one past it. */
|
|
14
|
+
export declare function originHeadId(id: string): string | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const TAIL_SUFFIX = '-origin';
|
|
2
|
+
/**
|
|
3
|
+
* The id of the piece of a feature lying past a circular sequence's origin,
|
|
4
|
+
* the feature cut there and `id` the piece before it. Only GFF3 cuts:
|
|
5
|
+
* bedToBigBed refuses an end past the contig, and on 2026-10-11 none of hg38's
|
|
6
|
+
* 35 hosted BED tabix tracks had a chrM record ending past 16569.
|
|
7
|
+
*
|
|
8
|
+
* The linear view reads across the origin with the tail and head typed as two
|
|
9
|
+
* regions, `NC_012920.1:15,000-16,569 NC_012920.1:1-2,000`, where the two
|
|
10
|
+
* pieces abut in one row. A locstring that wraps past the origin, or a menu
|
|
11
|
+
* item, would save the typing; neither was built (2026-10-14).
|
|
12
|
+
*/
|
|
13
|
+
export function originTailId(id) {
|
|
14
|
+
return `${id}${TAIL_SUFFIX}`;
|
|
15
|
+
}
|
|
16
|
+
/** The id of the piece before the origin, when `id` names the one past it. */
|
|
17
|
+
export function originHeadId(id) {
|
|
18
|
+
return id.endsWith(TAIL_SUFFIX) ? id.slice(0, -TAIL_SUFFIX.length) : undefined;
|
|
19
|
+
}
|
package/esm/util/paintLayer.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type PaintLayerOpts = SvgRasterCanvasOpts & {
|
|
|
6
6
|
rasterizeLayers?: boolean;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* Paint into either a
|
|
9
|
+
* Paint into either a rasterize canvas (PNG-embedded as <image>) or an
|
|
10
10
|
* SvgCanvas (serialized into a <g>). Renders one element — callers don't
|
|
11
11
|
* branch on which mode was picked.
|
|
12
12
|
*
|
package/esm/util/paintLayer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { SvgCanvas } from './SvgCanvas.js';
|
|
3
|
-
import { createSvgRasterCanvas } from './createSvgRasterCanvas.js';
|
|
3
|
+
import { createSvgRasterCanvas, svgRasterDataUrl, } from './createSvgRasterCanvas.js';
|
|
4
4
|
/**
|
|
5
|
-
* Paint into either a
|
|
5
|
+
* Paint into either a rasterize canvas (PNG-embedded as <image>) or an
|
|
6
6
|
* SvgCanvas (serialized into a <g>). Renders one element — callers don't
|
|
7
7
|
* branch on which mode was picked.
|
|
8
8
|
*
|
|
@@ -20,11 +20,12 @@ import { createSvgRasterCanvas } from './createSvgRasterCanvas.js';
|
|
|
20
20
|
* canvas is blank means reading its pixels back — and it does not need one: a
|
|
21
21
|
* fully transparent PNG is a couple of hundred bytes.
|
|
22
22
|
*/
|
|
23
|
+
// eslint-disable-next-line no-restricted-syntax -- drawn inside a frozen SVG figure
|
|
23
24
|
export function PaintLayer({ width, height, opts, paint, }) {
|
|
24
25
|
if (opts?.rasterizeLayers && width > 0 && height > 0) {
|
|
25
26
|
const { canvas, ctx } = createSvgRasterCanvas(width, height, opts);
|
|
26
27
|
paint(ctx);
|
|
27
|
-
return (_jsx("image", { width: width, height: height, xlinkHref: canvas
|
|
28
|
+
return (_jsx("image", { width: width, height: height, xlinkHref: svgRasterDataUrl(canvas) }));
|
|
28
29
|
}
|
|
29
30
|
const svg = new SvgCanvas();
|
|
30
31
|
paint(svg);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FeatureTable } from './featureTable.ts';
|
|
2
|
+
import type { JexlInstance } from './jexlStrings.ts';
|
|
3
|
+
import type { FieldRef, PathSpec, TransformStep } from './markEncodingTypes.ts';
|
|
4
|
+
type RowEncoding = FieldRef | ArrayLike<number> | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* #api
|
|
7
|
+
* A path layer's table in series order, as {@link PathSpec} defines a series,
|
|
8
|
+
* with each row's series beside it and the stretch past which a series breaks.
|
|
9
|
+
* `steps` are every step the layer's rows went through, which a `window` among
|
|
10
|
+
* them reads the default break from.
|
|
11
|
+
*/
|
|
12
|
+
export declare function pathSeries(table: FeatureTable, row: RowEncoding, path: PathSpec, steps: readonly TransformStep[], jexl?: JexlInstance): {
|
|
13
|
+
table: FeatureTable;
|
|
14
|
+
row: RowEncoding;
|
|
15
|
+
series: Uint32Array<ArrayBuffer>;
|
|
16
|
+
gapBp: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// A path layer's rows in series order. `layerFeatures` applies it, so the
|
|
2
|
+
// table `CoreGetEncodedFeature` reads is the one `CoreGetEncodedLayers`
|
|
3
|
+
// encoded and an instance's index names the same row in both. Imported by
|
|
4
|
+
// relative path only.
|
|
5
|
+
import { numberReaderOf, readerOf, selectRows } from './featureTable.js';
|
|
6
|
+
import { fieldReader, isPlainFieldRef } from './fieldReader.js';
|
|
7
|
+
import { groupKey, sortByStart } from './stepTables.js';
|
|
8
|
+
import { DEFAULT_WINDOW_FRAME } from './windowStep.js';
|
|
9
|
+
function reader(table, ref, jexl) {
|
|
10
|
+
if (isPlainFieldRef(ref)) {
|
|
11
|
+
return readerOf(table.column(ref));
|
|
12
|
+
}
|
|
13
|
+
const read = fieldReader(ref, jexl);
|
|
14
|
+
return (i) => read(table.row(i));
|
|
15
|
+
}
|
|
16
|
+
// Each row's series, numbered in the order met: one per distinct pair of the
|
|
17
|
+
// row it stands in and its `by` value.
|
|
18
|
+
function seriesOf(table, row, by, jexl) {
|
|
19
|
+
const n = table.length;
|
|
20
|
+
const readRow = typeof row === 'string'
|
|
21
|
+
? reader(table, row, jexl)
|
|
22
|
+
: row
|
|
23
|
+
? (i) => row[i]
|
|
24
|
+
: () => 0;
|
|
25
|
+
const readBy = by === undefined ? () => undefined : reader(table, by, jexl);
|
|
26
|
+
const keys = new Map();
|
|
27
|
+
const series = new Uint32Array(n);
|
|
28
|
+
let count = 0;
|
|
29
|
+
for (let i = 0; i < n; i++) {
|
|
30
|
+
const r = readRow(i);
|
|
31
|
+
let byRow = keys.get(r);
|
|
32
|
+
if (!byRow) {
|
|
33
|
+
byRow = new Map();
|
|
34
|
+
keys.set(r, byRow);
|
|
35
|
+
}
|
|
36
|
+
const key = groupKey(readBy(i));
|
|
37
|
+
let s = byRow.get(key);
|
|
38
|
+
if (s === undefined) {
|
|
39
|
+
s = count++;
|
|
40
|
+
byRow.set(key, s);
|
|
41
|
+
}
|
|
42
|
+
series[i] = s;
|
|
43
|
+
}
|
|
44
|
+
return { series, count };
|
|
45
|
+
}
|
|
46
|
+
// The rows grouped by series, each series in start order, and where each
|
|
47
|
+
// series begins.
|
|
48
|
+
function seriesOrder(starts, series, count) {
|
|
49
|
+
const n = series.length;
|
|
50
|
+
const first = new Uint32Array(count + 1);
|
|
51
|
+
for (let i = 0; i < n; i++) {
|
|
52
|
+
first[series[i] + 1]++;
|
|
53
|
+
}
|
|
54
|
+
for (let s = 0; s < count; s++) {
|
|
55
|
+
first[s + 1] += first[s];
|
|
56
|
+
}
|
|
57
|
+
const order = new Uint32Array(n);
|
|
58
|
+
const next = first.slice(0, count);
|
|
59
|
+
for (let i = 0; i < n; i++) {
|
|
60
|
+
order[next[series[i]]++] = i;
|
|
61
|
+
}
|
|
62
|
+
for (let s = 0; s < count; s++) {
|
|
63
|
+
const rows = order.subarray(first[s], first[s + 1]);
|
|
64
|
+
let sorted = true;
|
|
65
|
+
for (let k = 1; k < rows.length && sorted; k++) {
|
|
66
|
+
sorted = starts[rows[k]] >= starts[rows[k - 1]];
|
|
67
|
+
}
|
|
68
|
+
if (!sorted) {
|
|
69
|
+
sortByStart(rows, starts);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return { order, first };
|
|
73
|
+
}
|
|
74
|
+
// The bases a window's frame spans at the median row: each row's frame runs
|
|
75
|
+
// from the start `before` rows back to the start `after` rows on, cut at its
|
|
76
|
+
// series' ends, as the window step cut it.
|
|
77
|
+
function frameSpanBp(starts, order, first, [before, after]) {
|
|
78
|
+
const spans = [];
|
|
79
|
+
for (let s = 0; s + 1 < first.length; s++) {
|
|
80
|
+
const lo = first[s];
|
|
81
|
+
const m = first[s + 1] - lo;
|
|
82
|
+
for (let j = 0; j < m; j++) {
|
|
83
|
+
const a = Math.max(0, j + before);
|
|
84
|
+
const b = Math.min(m - 1, j + after);
|
|
85
|
+
if (a <= b) {
|
|
86
|
+
spans.push(starts[order[lo + b]] - starts[order[lo + a]]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (spans.length === 0) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
spans.sort((x, y) => x - y);
|
|
94
|
+
return spans[spans.length >> 1];
|
|
95
|
+
}
|
|
96
|
+
function windowFrame(steps) {
|
|
97
|
+
const step = steps.findLast(s => s.type === 'window');
|
|
98
|
+
if (step?.type !== 'window') {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
const [before, after] = step.frame ?? DEFAULT_WINDOW_FRAME;
|
|
102
|
+
return before === null || after === null
|
|
103
|
+
? undefined
|
|
104
|
+
: [before, after];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* #api
|
|
108
|
+
* A path layer's table in series order, as {@link PathSpec} defines a series,
|
|
109
|
+
* with each row's series beside it and the stretch past which a series breaks.
|
|
110
|
+
* `steps` are every step the layer's rows went through, which a `window` among
|
|
111
|
+
* them reads the default break from.
|
|
112
|
+
*/
|
|
113
|
+
export function pathSeries(table, row, path, steps, jexl) {
|
|
114
|
+
const n = table.length;
|
|
115
|
+
const { series, count } = seriesOf(table, row, path.by, jexl);
|
|
116
|
+
const readStart = numberReaderOf(table.column('start'));
|
|
117
|
+
const starts = new Float64Array(n);
|
|
118
|
+
for (let i = 0; i < n; i++) {
|
|
119
|
+
const s = readStart(i);
|
|
120
|
+
starts[i] = Number.isNaN(s) ? Infinity : s;
|
|
121
|
+
}
|
|
122
|
+
const { order, first } = seriesOrder(starts, series, count);
|
|
123
|
+
const ordered = new Uint32Array(n);
|
|
124
|
+
for (let k = 0; k < n; k++) {
|
|
125
|
+
ordered[k] = series[order[k]];
|
|
126
|
+
}
|
|
127
|
+
let rowOut = row;
|
|
128
|
+
if (row !== undefined && typeof row !== 'string') {
|
|
129
|
+
const permuted = new Uint32Array(n);
|
|
130
|
+
for (let k = 0; k < n; k++) {
|
|
131
|
+
permuted[k] = row[order[k]];
|
|
132
|
+
}
|
|
133
|
+
rowOut = permuted;
|
|
134
|
+
}
|
|
135
|
+
const frame = path.gapBp === undefined ? windowFrame(steps) : undefined;
|
|
136
|
+
return {
|
|
137
|
+
table: selectRows(table, order),
|
|
138
|
+
row: rowOut,
|
|
139
|
+
series: ordered,
|
|
140
|
+
gapBp: path.gapBp ??
|
|
141
|
+
(frame ? frameSpanBp(starts, order, first, frame) : undefined),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface Press {
|
|
2
|
+
target: EventTarget | null;
|
|
3
|
+
currentTarget: EventTarget | null;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Whether an event reached a container's React handler from outside the
|
|
7
|
+
* container's DOM. React bubbles a portal's events to its React parent, so a
|
|
8
|
+
* press in a dialog or menu that a track opened arrives at every handler above
|
|
9
|
+
* the track.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isFromPortal({ target, currentTarget }: Press): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether a container's own drag gesture leaves a press alone: one from a
|
|
14
|
+
* portal, or one on a control that claimed it (`[data-gesture-owner]`,
|
|
15
|
+
* JBrowse's marker on the parts that drag on their own), a button, or a
|
|
16
|
+
* draggable element. `closest`, because the press usually lands on an icon
|
|
17
|
+
* inside the control.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isClaimedPress(event: Press): boolean;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether an event reached a container's React handler from outside the
|
|
3
|
+
* container's DOM. React bubbles a portal's events to its React parent, so a
|
|
4
|
+
* press in a dialog or menu that a track opened arrives at every handler above
|
|
5
|
+
* the track.
|
|
6
|
+
*/
|
|
7
|
+
export function isFromPortal({ target, currentTarget }) {
|
|
8
|
+
return (target instanceof Node &&
|
|
9
|
+
currentTarget instanceof Node &&
|
|
10
|
+
!currentTarget.contains(target));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Whether a container's own drag gesture leaves a press alone: one from a
|
|
14
|
+
* portal, or one on a control that claimed it (`[data-gesture-owner]`,
|
|
15
|
+
* JBrowse's marker on the parts that drag on their own), a button, or a
|
|
16
|
+
* draggable element. `closest`, because the press usually lands on an icon
|
|
17
|
+
* inside the control.
|
|
18
|
+
*/
|
|
19
|
+
export function isClaimedPress(event) {
|
|
20
|
+
const { target } = event;
|
|
21
|
+
return (isFromPortal(event) ||
|
|
22
|
+
(target instanceof HTMLElement && target.draggable) ||
|
|
23
|
+
(target instanceof Element &&
|
|
24
|
+
target.closest('button, [data-gesture-owner], [draggable="true"]') !==
|
|
25
|
+
null));
|
|
26
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** The quantile "Clip outliers" clips at on a scale whose own default is the extremes. */
|
|
2
2
|
export declare const DEFAULT_CLIP_QUANTILE = 0.99;
|
|
3
|
+
/** The lowest `domainQuantile` a scale reads, where its two ends meet; one below reads as this. */
|
|
4
|
+
export declare const MIN_DOMAIN_QUANTILE = 0.5;
|
|
3
5
|
/**
|
|
4
6
|
* #api
|
|
5
7
|
* The quantile a clip toggle writes: a scale's declared default where that
|
|
@@ -35,10 +37,30 @@ export declare function quantileOf(a: Float32Array, n: number, quantile: number)
|
|
|
35
37
|
* the axis nor the ramp, and a sparse tail of the other sign keeps its own
|
|
36
38
|
* end. An axis that starts at 0 adds it itself. Under 0.5 reads as 0.5,
|
|
37
39
|
* where the ends meet rather than cross. `scales.y.domainQuantile` and a
|
|
38
|
-
*
|
|
40
|
+
* color's `domainQuantile` both name it. `[Infinity, -Infinity]` where
|
|
39
41
|
* nothing is finite.
|
|
42
|
+
*
|
|
43
|
+
* Nearest rank keeps ties: where one value holds the rank, as on a segmented
|
|
44
|
+
* copy-number track, a ramp clipped below 1 paints nearly every value one
|
|
45
|
+
* color. A value axis fences instead ({@link fenceOutliers}); a ramp takes
|
|
46
|
+
* the same fence once a color default below 1 meets tied data.
|
|
40
47
|
*/
|
|
41
48
|
export declare function quantileExtent(values: ArrayLike<number>, count: number, quantile?: number): [number, number];
|
|
49
|
+
/**
|
|
50
|
+
* #api
|
|
51
|
+
* Where a value axis's open ends stand below a `domainQuantile` of 1: at the
|
|
52
|
+
* `extremes`, unless one would stretch the axis past twice the span the
|
|
53
|
+
* {@link quantileExtent} ends `quantiles` draw, 0 included where the axis
|
|
54
|
+
* reaches it (`zero`); that end stops at the fence. So a plot with no spike
|
|
55
|
+
* shows every value and cuts none, and a spike leaves the values under it at
|
|
56
|
+
* least half the axis. Quantiles that meet span their own size, as a flat
|
|
57
|
+
* domain widens in `getNiceDomain`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function fenceOutliers({ extremes, quantiles, zero, }: {
|
|
60
|
+
extremes: readonly [number, number];
|
|
61
|
+
quantiles: readonly [number, number];
|
|
62
|
+
zero: boolean;
|
|
63
|
+
}): [number, number];
|
|
42
64
|
/**
|
|
43
65
|
* #api
|
|
44
66
|
* {@link quantileExtent} as a scale's open ends read it: over every finite
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** The quantile "Clip outliers" clips at on a scale whose own default is the extremes. */
|
|
2
2
|
export const DEFAULT_CLIP_QUANTILE = 0.99;
|
|
3
|
+
/** The lowest `domainQuantile` a scale reads, where its two ends meet; one below reads as this. */
|
|
4
|
+
export const MIN_DOMAIN_QUANTILE = 0.5;
|
|
3
5
|
/**
|
|
4
6
|
* #api
|
|
5
7
|
* The quantile a clip toggle writes: a scale's declared default where that
|
|
@@ -109,14 +111,19 @@ function lowQuantileOf(a, n, quantile) {
|
|
|
109
111
|
* the axis nor the ramp, and a sparse tail of the other sign keeps its own
|
|
110
112
|
* end. An axis that starts at 0 adds it itself. Under 0.5 reads as 0.5,
|
|
111
113
|
* where the ends meet rather than cross. `scales.y.domainQuantile` and a
|
|
112
|
-
*
|
|
114
|
+
* color's `domainQuantile` both name it. `[Infinity, -Infinity]` where
|
|
113
115
|
* nothing is finite.
|
|
116
|
+
*
|
|
117
|
+
* Nearest rank keeps ties: where one value holds the rank, as on a segmented
|
|
118
|
+
* copy-number track, a ramp clipped below 1 paints nearly every value one
|
|
119
|
+
* color. A value axis fences instead ({@link fenceOutliers}); a ramp takes
|
|
120
|
+
* the same fence once a color default below 1 meets tied data.
|
|
114
121
|
*/
|
|
115
122
|
export function quantileExtent(values, count, quantile = 1) {
|
|
116
123
|
if (!(quantile < 1)) {
|
|
117
124
|
return finiteExtremes(values, count);
|
|
118
125
|
}
|
|
119
|
-
const q = Math.max(
|
|
126
|
+
const q = Math.max(MIN_DOMAIN_QUANTILE, quantile);
|
|
120
127
|
const positive = new Float32Array(count);
|
|
121
128
|
const negative = new Float32Array(count);
|
|
122
129
|
let np = 0;
|
|
@@ -139,6 +146,22 @@ export function quantileExtent(values, count, quantile = 1) {
|
|
|
139
146
|
const high = np > 0 ? quantileOf(positive, np, q) : quantileOf(negative, nn, q);
|
|
140
147
|
return [Math.min(low, high), high];
|
|
141
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* #api
|
|
151
|
+
* Where a value axis's open ends stand below a `domainQuantile` of 1: at the
|
|
152
|
+
* `extremes`, unless one would stretch the axis past twice the span the
|
|
153
|
+
* {@link quantileExtent} ends `quantiles` draw, 0 included where the axis
|
|
154
|
+
* reaches it (`zero`); that end stops at the fence. So a plot with no spike
|
|
155
|
+
* shows every value and cuts none, and a spike leaves the values under it at
|
|
156
|
+
* least half the axis. Quantiles that meet span their own size, as a flat
|
|
157
|
+
* domain widens in `getNiceDomain`.
|
|
158
|
+
*/
|
|
159
|
+
export function fenceOutliers({ extremes, quantiles, zero, }) {
|
|
160
|
+
const lo = zero ? Math.min(0, quantiles[0]) : quantiles[0];
|
|
161
|
+
const hi = zero ? Math.max(0, quantiles[1]) : quantiles[1];
|
|
162
|
+
const span = hi - lo || Math.abs(hi) || 1;
|
|
163
|
+
return [Math.max(extremes[0], lo - span), Math.min(extremes[1], hi + span)];
|
|
164
|
+
}
|
|
142
165
|
/**
|
|
143
166
|
* #api
|
|
144
167
|
* {@link quantileExtent} as a scale's open ends read it: over every finite
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* cohort-sized track. Two rules follow, and each caller used to restate them:
|
|
10
10
|
*
|
|
11
11
|
* - **Ask at the pixel's centre.** Rasterization fills a pixel when its centre
|
|
12
|
-
* falls inside the rect, so the centre is the scanline the
|
|
12
|
+
* falls inside the rect, so the centre is the scanline the color the reader
|
|
13
13
|
* is pointing at was decided on. The top edge misses by `0.5 / rowHeight`
|
|
14
14
|
* rows — 5.4 of them on a 2,504-sample matrix at the default fit height.
|
|
15
15
|
* - **Floor `mouseY` before adding `scrollTop`.** The canvas draws at
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* cohort-sized track. Two rules follow, and each caller used to restate them:
|
|
10
10
|
*
|
|
11
11
|
* - **Ask at the pixel's centre.** Rasterization fills a pixel when its centre
|
|
12
|
-
* falls inside the rect, so the centre is the scanline the
|
|
12
|
+
* falls inside the rect, so the centre is the scanline the color the reader
|
|
13
13
|
* is pointing at was decided on. The top edge misses by `0.5 / rowHeight`
|
|
14
14
|
* rows — 5.4 of them on a 2,504-sample matrix at the default fit height.
|
|
15
15
|
* - **Floor `mouseY` before adding `scrollTop`.** The canvas draws at
|