@jbrowse/core 5.0.0-beta.11 → 5.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +450 -132
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +6 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +18 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseAttributes.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +5 -4
- package/esm/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +6 -4
- package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +2 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureWash.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Formatter.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceBody.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +15 -24
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceLegend.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +4 -4
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.d.ts +3 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/FeatureSequenceDialog.js +2 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +1 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +2 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +15 -36
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.d.ts +3 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/dialogs/TranscriptSelector.js +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.d.ts +4 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +29 -20
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +3 -3
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +9 -0
- package/esm/BaseFeatureWidget/stateModelFactory.js +11 -0
- package/esm/BaseFeatureWidget/types.d.ts +2 -0
- package/esm/PluginManager.d.ts +7 -3
- package/esm/PluginManager.js +12 -3
- package/esm/ReExports/coreModules.generated.js +538 -518
- package/esm/ReExports/coreWorkerModules.generated.js +456 -438
- package/esm/ReExports/lazify.js +3 -2
- package/esm/ReExports/list.js +22 -6
- package/esm/ReExports/names.d.ts +1 -0
- package/esm/ReExports/names.generated.d.ts +2 -0
- package/esm/ReExports/names.generated.js +566 -0
- package/esm/ReExports/names.js +3 -0
- package/esm/TextSearch/TextSearchManager.d.ts +3 -3
- package/esm/TextSearch/TextSearchManager.js +6 -13
- package/esm/assemblyManager/assembly.d.ts +9 -0
- package/esm/assemblyManager/assembly.js +13 -0
- package/esm/assemblyManager/assemblyConfigSchema.d.ts +6 -1
- package/esm/assemblyManager/assemblyConfigSchema.js +23 -22
- package/esm/assemblyManager/assemblyManager.d.ts +11 -0
- package/esm/assemblyManager/assemblyManager.js +2 -0
- package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +9 -0
- package/esm/assemblyManager/expandAssemblyConfigShorthand.js +23 -0
- package/esm/checkPlugins.js +10 -4
- package/esm/configuration/configurationSchema.d.ts +51 -100
- package/esm/configuration/configurationSchema.js +59 -225
- package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
- package/esm/configuration/configurationSchemaUnion.js +2 -1
- package/esm/configuration/configurationSlot.d.ts +18 -64
- package/esm/configuration/configurationSlot.js +32 -98
- package/esm/configuration/fillLocations.d.ts +4 -2
- package/esm/configuration/fillLocations.js +9 -3
- package/esm/configuration/formatAboutConfigSchema.d.ts +2 -2
- package/esm/configuration/formatAboutConfigSchema.js +2 -2
- package/esm/configuration/formatDetailsConfigSchema.d.ts +2 -2
- package/esm/configuration/formatDetailsConfigSchema.js +7 -5
- package/esm/configuration/getConf.d.ts +7 -36
- package/esm/configuration/getConf.js +20 -41
- package/esm/configuration/index.d.ts +4 -3
- package/esm/configuration/index.js +3 -2
- package/esm/configuration/partitionAdvanced.d.ts +12 -0
- package/esm/configuration/partitionAdvanced.js +42 -0
- package/esm/configuration/plot.d.ts +6 -0
- package/esm/configuration/plot.js +56 -9
- package/esm/configuration/readConfObject.d.ts +15 -17
- package/esm/configuration/readConfObject.js +19 -50
- package/esm/configuration/schemaRegistry.d.ts +0 -2
- package/esm/configuration/schemaTypes.js +5 -1
- package/esm/configuration/slotFacade.js +2 -2
- package/esm/configuration/snapshotPreprocess.d.ts +42 -18
- package/esm/configuration/snapshotPreprocess.js +95 -37
- package/esm/configuration/tabixShorthand.js +1 -3
- package/esm/configuration/types.d.ts +60 -159
- package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +7 -0
- package/esm/data_adapters/BaseAdapter/BaseAdapter.js +7 -0
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +0 -22
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +0 -55
- package/esm/data_adapters/BaseAdapter/index.d.ts +0 -1
- package/esm/data_adapters/BaseAdapter/index.js +0 -1
- package/esm/data_adapters/BaseAdapter/rowSources.d.ts +2 -2
- package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
- package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +2 -0
- package/esm/data_adapters/CytobandAdapter/configSchema.js +5 -0
- package/esm/data_adapters/dataAdapterCache.d.ts +25 -13
- package/esm/data_adapters/dataAdapterCache.js +68 -24
- package/esm/data_adapters/getFeatureAdapter.d.ts +9 -0
- package/esm/data_adapters/getFeatureAdapter.js +17 -0
- package/esm/pluggableElementTypes/DisplayType.d.ts +7 -0
- package/esm/pluggableElementTypes/DisplayType.js +7 -0
- package/esm/pluggableElementTypes/RpcMethodType.d.ts +7 -0
- package/esm/pluggableElementTypes/RpcMethodType.js +9 -0
- package/esm/pluggableElementTypes/addMenuItems.d.ts +2 -1
- package/esm/pluggableElementTypes/addMenuItems.js +2 -1
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -0
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -5
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +57 -9
- package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -7
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +9 -10
- package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +2 -0
- package/esm/pluggableElementTypes/models/BaseViewModel.js +2 -0
- package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -0
- package/esm/pluggableElementTypes/models/InternetAccountModel.js +3 -0
- package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +3 -0
- package/esm/pluggableElementTypes/models/baseConnectionConfig.js +3 -0
- package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +3 -1
- package/esm/pluggableElementTypes/models/baseInternetAccountConfig.js +3 -1
- package/esm/pluggableElementTypes/models/baseTrackConfig.js +12 -1
- package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
- package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +1 -1
- package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +1 -1
- package/esm/pluginDefinitions.d.ts +7 -0
- package/esm/pluginDefinitions.js +20 -0
- package/esm/rpc/RpcRegistry.d.ts +2 -11
- package/esm/rpc/byteBudget.d.ts +15 -0
- package/esm/rpc/byteBudget.js +23 -0
- package/esm/rpc/configSchema.d.ts +2 -0
- package/esm/rpc/configSchema.js +3 -1
- package/esm/rpc/coreRpcMethods.d.ts +1 -2
- package/esm/rpc/coreRpcMethods.js +1 -2
- package/esm/rpc/explainTransferError.js +3 -3
- package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
- package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
- package/esm/rpc/methods/CoreLoadTrackCode.d.ts +17 -0
- package/esm/rpc/methods/CoreLoadTrackCode.js +24 -0
- package/esm/rpc/methods/layerFeatures.d.ts +9 -6
- package/esm/rpc/methods/layerFeatures.js +21 -5
- package/esm/ui/ActionLink.d.ts +3 -2
- package/esm/ui/ActionLink.js +4 -2
- package/esm/ui/AddCustomPluginDialog.d.ts +3 -2
- package/esm/ui/AddCustomPluginDialog.js +6 -4
- package/esm/ui/AppLogo.js +43 -3
- package/esm/ui/BaseTooltip.d.ts +3 -2
- package/esm/ui/BaseTooltip.js +4 -2
- package/esm/ui/CascadingMenu.js +14 -12
- package/esm/ui/CascadingMenuButton.d.ts +2 -2
- package/esm/ui/CascadingMenuButton.js +5 -4
- package/esm/ui/CascadingMenuHelpDialog.d.ts +3 -2
- package/esm/ui/CascadingMenuHelpDialog.js +4 -2
- package/esm/ui/CascadingMenuHelpIconButton.d.ts +4 -3
- package/esm/ui/CascadingMenuHelpIconButton.js +9 -5
- package/esm/ui/ColorPicker.d.ts +5 -4
- package/esm/ui/ColorPicker.js +6 -4
- package/esm/ui/ContextMenu.d.ts +1 -1
- package/esm/ui/ContextMenu.js +1 -1
- package/esm/ui/CopyToClipboardButton.d.ts +3 -2
- package/esm/ui/CopyToClipboardButton.js +4 -2
- package/esm/ui/Crosshairs.js +13 -10
- package/esm/ui/DOMPurifySanitizedHTML.d.ts +3 -2
- package/esm/ui/DOMPurifySanitizedHTML.js +4 -2
- package/esm/ui/DataGridFlexContainer.d.ts +3 -2
- package/esm/ui/DataGridFlexContainer.js +4 -2
- package/esm/ui/Dialog.d.ts +1 -1
- package/esm/ui/Dialog.js +5 -4
- package/esm/ui/DropDownMenu.js +2 -2
- package/esm/ui/EditableTypography.d.ts +1 -1
- package/esm/ui/EditableTypography.js +3 -2
- package/esm/ui/ErrorActions.d.ts +3 -2
- package/esm/ui/ErrorActions.js +4 -2
- package/esm/ui/ErrorBanner.d.ts +2 -2
- package/esm/ui/ErrorBanner.js +3 -2
- package/esm/ui/ErrorBar.d.ts +3 -2
- package/esm/ui/ErrorBar.js +4 -2
- package/esm/ui/ErrorMessage.d.ts +3 -2
- package/esm/ui/ErrorMessage.js +4 -2
- package/esm/ui/ErrorMessageStackTraceContents.d.ts +3 -2
- package/esm/ui/ErrorMessageStackTraceContents.js +4 -2
- package/esm/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
- package/esm/ui/ErrorMessageStackTraceDialog.js +4 -2
- package/esm/ui/ErrorOverlay.d.ts +3 -2
- package/esm/ui/ErrorOverlay.js +4 -2
- package/esm/ui/ExportSvgDialog.d.ts +3 -2
- package/esm/ui/ExportSvgDialog.js +4 -2
- package/esm/ui/ExternalLink.d.ts +2 -1
- package/esm/ui/ExternalLink.js +4 -2
- package/esm/ui/FactoryResetDialog.d.ts +3 -2
- package/esm/ui/FactoryResetDialog.js +4 -2
- package/esm/ui/FatalErrorDialog.d.ts +3 -2
- package/esm/ui/FatalErrorDialog.js +6 -4
- package/esm/ui/FileDropZone.d.ts +3 -2
- package/esm/ui/FileDropZone.js +4 -2
- package/esm/ui/FileSelector/LocalFileChooser.js +4 -4
- package/esm/ui/FileSelector/LocationInput.d.ts +3 -2
- package/esm/ui/FileSelector/LocationInput.js +4 -2
- package/esm/ui/FileSelector/SourceTypeSelector.d.ts +3 -2
- package/esm/ui/FileSelector/SourceTypeSelector.js +8 -6
- package/esm/ui/GpuFallbackButton.d.ts +3 -2
- package/esm/ui/GpuFallbackButton.js +4 -2
- package/esm/ui/HoverMenu.d.ts +2 -2
- package/esm/ui/HoverMenu.js +7 -3
- package/esm/ui/HoverTooltip.d.ts +3 -2
- package/esm/ui/HoverTooltip.js +4 -2
- package/esm/ui/Icons.d.ts +5 -5
- package/esm/ui/Icons.js +11 -10
- package/esm/ui/InlineMenuControls.d.ts +2 -2
- package/esm/ui/InlineMenuControls.js +4 -3
- package/esm/ui/JexlFilterRowEditors.d.ts +4 -4
- package/esm/ui/JexlFilterRowEditors.js +9 -8
- package/esm/ui/LabeledCheckbox.d.ts +3 -2
- package/esm/ui/LabeledCheckbox.js +4 -2
- package/esm/ui/LazyBaseTooltip.d.ts +12 -3
- package/esm/ui/LazyBaseTooltip.js +4 -2
- package/esm/ui/LegendSwatchGlyph.js +1 -0
- package/esm/ui/LoadingDots.d.ts +2 -1
- package/esm/ui/LoadingDots.js +4 -2
- package/esm/ui/LoadingEllipses.d.ts +5 -2
- package/esm/ui/LoadingEllipses.js +5 -3
- package/esm/ui/LoadingOverlay.d.ts +3 -2
- package/esm/ui/LoadingOverlay.js +4 -2
- package/esm/ui/LoadingProgress.d.ts +3 -2
- package/esm/ui/LoadingProgress.js +4 -2
- package/esm/ui/Logo.d.ts +2 -2
- package/esm/ui/Logo.js +9 -8
- package/esm/ui/MenuItemChevron.d.ts +2 -2
- package/esm/ui/MenuItemChevron.js +3 -2
- package/esm/ui/MenuItemEndDecoration.d.ts +2 -2
- package/esm/ui/MenuItemEndDecoration.js +3 -2
- package/esm/ui/MenuItemTrailing.d.ts +2 -2
- package/esm/ui/MenuItemTrailing.js +7 -6
- package/esm/ui/MenuTypes.d.ts +21 -1
- package/esm/ui/MenuTypes.js +20 -0
- package/esm/ui/MonospaceTextField.d.ts +3 -2
- package/esm/ui/MonospaceTextField.js +4 -2
- package/esm/ui/NumberTextField.d.ts +2 -2
- package/esm/ui/NumberTextField.js +4 -2
- package/esm/ui/PaletteContext.d.ts +11 -9
- package/esm/ui/PaletteContext.js +33 -18
- package/esm/ui/PluginStoreCard.d.ts +3 -2
- package/esm/ui/PluginStoreCard.js +4 -2
- package/esm/ui/PopoverPicker.d.ts +3 -2
- package/esm/ui/PopoverPicker.js +4 -2
- package/esm/ui/PrerenderedCanvas.d.ts +2 -2
- package/esm/ui/PrerenderedCanvas.js +3 -2
- package/esm/ui/RedErrorMessageBox.d.ts +3 -2
- package/esm/ui/RedErrorMessageBox.js +4 -2
- package/esm/ui/RefNameAutocomplete/EndAdornment.d.ts +3 -2
- package/esm/ui/RefNameAutocomplete/EndAdornment.js +4 -2
- package/esm/ui/RefNameAutocomplete/HelpDialog.d.ts +3 -2
- package/esm/ui/RefNameAutocomplete/HelpDialog.js +4 -2
- package/esm/ui/ReplaceCurrentViewButton.d.ts +3 -2
- package/esm/ui/ReplaceCurrentViewButton.js +4 -2
- package/esm/ui/ResizeHandle.d.ts +2 -2
- package/esm/ui/ResizeHandle.js +3 -2
- package/esm/ui/SanitizedHTML.d.ts +3 -2
- package/esm/ui/SanitizedHTML.js +6 -4
- package/esm/ui/ScrollChrome.d.ts +3 -2
- package/esm/ui/ScrollChrome.js +4 -2
- package/esm/ui/ScrollEdgeShadow.d.ts +2 -2
- package/esm/ui/ScrollEdgeShadow.js +2 -2
- package/esm/ui/SessionJsonPanel.d.ts +3 -2
- package/esm/ui/SessionJsonPanel.js +4 -2
- package/esm/ui/ShareLinkField.d.ts +3 -2
- package/esm/ui/ShareLinkField.js +4 -2
- package/esm/ui/SingleSlider.d.ts +2 -2
- package/esm/ui/SingleSlider.js +4 -2
- package/esm/ui/SliderTooltip.d.ts +2 -1
- package/esm/ui/SliderTooltip.js +4 -2
- package/esm/ui/SnackbarContents.d.ts +3 -2
- package/esm/ui/SnackbarContents.js +4 -2
- package/esm/ui/SnackbarModel.d.ts +2 -0
- package/esm/ui/SnackbarModel.js +2 -0
- package/esm/ui/StackTraceButton.d.ts +3 -2
- package/esm/ui/StackTraceButton.js +4 -2
- package/esm/ui/StatusProgressBar.d.ts +3 -2
- package/esm/ui/StatusProgressBar.js +4 -2
- package/esm/ui/SubmitForm.d.ts +2 -1
- package/esm/ui/SubmitForm.js +4 -2
- package/esm/ui/SvgColorLegend.d.ts +3 -4
- package/esm/ui/SvgColorLegend.js +27 -18
- package/esm/ui/TagTextField.d.ts +2 -2
- package/esm/ui/TagTextField.js +4 -2
- package/esm/ui/ViewLoadingScreen.d.ts +3 -2
- package/esm/ui/ViewLoadingScreen.js +4 -2
- package/esm/ui/buildExtraTrackMenuItems.d.ts +2 -2
- package/esm/ui/colorScale.d.ts +5 -1
- package/esm/ui/colorScale.js +12 -10
- package/esm/ui/colors.d.ts +42 -31
- package/esm/ui/colors.js +85 -48
- package/esm/ui/filterMenuItems.d.ts +10 -31
- package/esm/ui/filterMenuItems.js +13 -14
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/esm/ui/launchTargetsMenuItem.js +9 -13
- package/esm/ui/legendMenuItem.d.ts +4 -4
- package/esm/ui/legendMenuItem.js +4 -4
- package/esm/ui/menuItemAdornment.d.ts +1 -1
- package/esm/ui/menuItemAdornment.js +1 -1
- package/esm/ui/menuItems.d.ts +1 -1
- package/esm/ui/menuItems.js +1 -1
- package/esm/ui/menuLabels.d.ts +2 -2
- package/esm/ui/menuLabels.js +2 -2
- package/esm/ui/multiTrackMenuItems.d.ts +2 -2
- package/esm/ui/palette.d.ts +2 -2
- package/esm/ui/palette.js +10 -10
- package/esm/ui/radioSubMenu.d.ts +5 -3
- package/esm/ui/radioSubMenu.js +2 -2
- package/esm/ui/rampKey.d.ts +15 -0
- package/esm/ui/rampKey.js +17 -0
- package/esm/ui/showSubMenu.d.ts +0 -5
- package/esm/ui/showSubMenu.js +6 -15
- package/esm/ui/theme.d.ts +2 -2
- package/esm/ui/theme.js +1 -1
- package/esm/ui/useAssemblySelection.d.ts +2 -0
- package/esm/ui/useMouseTracking.d.ts +8 -20
- package/esm/ui/useMouseTracking.js +23 -62
- package/esm/ui/usePlacedMenuFocus.d.ts +19 -0
- package/esm/ui/usePlacedMenuFocus.js +28 -0
- package/esm/util/Base1DViewModel.d.ts +5 -3
- package/esm/util/Base1DViewModel.js +5 -3
- package/esm/util/SvgCanvas.js +1 -1
- package/esm/util/aggregateFieldName.d.ts +1 -10
- package/esm/util/aggregateFieldName.js +1 -8
- package/esm/util/alignedBytes.d.ts +19 -0
- package/esm/util/alignedBytes.js +37 -0
- package/esm/util/analytics.d.ts +6 -9
- package/esm/util/analytics.js +148 -15
- package/esm/util/bezierConnector.d.ts +20 -0
- package/esm/util/bezierConnector.js +34 -96
- package/esm/util/cacheBudgets.d.ts +3 -0
- package/esm/util/cacheBudgets.js +3 -0
- package/esm/util/categoricalField.d.ts +24 -4
- package/esm/util/categoricalField.js +38 -5
- package/esm/util/cellMatches.js +14 -14
- package/esm/util/cellsStep.d.ts +3 -5
- package/esm/util/cellsStep.js +31 -29
- package/esm/util/color/index.d.ts +1 -1
- package/esm/util/color/index.js +2 -2
- package/esm/util/color-bits/bit.js +1 -1
- package/esm/util/color-bits/parse.js +28 -17
- package/esm/util/colorBits.d.ts +15 -4
- package/esm/util/colorBits.js +38 -15
- package/esm/util/colorRamp.d.ts +3 -3
- package/esm/util/colorRamp.js +20 -2
- package/esm/util/colorScale.d.ts +123 -22
- package/esm/util/colorScale.js +157 -28
- package/esm/util/colorSchemes.d.ts +7 -3
- package/esm/util/colorSchemes.js +8 -2
- package/esm/util/createSvgRasterCanvas.d.ts +14 -1
- package/esm/util/createSvgRasterCanvas.js +36 -12
- package/esm/util/diagonalizeRegions.js +18 -9
- package/esm/util/featureTransforms.d.ts +2 -2
- package/esm/util/featureTransforms.js +85 -135
- package/esm/util/fileHandleStore.js +5 -0
- package/esm/util/groupKeys.d.ts +5 -4
- package/esm/util/groupKeys.js +15 -9
- package/esm/util/index.js +1 -1
- package/esm/util/installFetch.d.ts +2 -2
- package/esm/util/installPrerequisiteFetch.d.ts +8 -3
- package/esm/util/installPrerequisiteFetch.js +9 -7
- package/esm/util/io/RemoteFileWithRangeCache.d.ts +1 -1
- package/esm/util/io/RemoteFileWithRangeCache.js +1 -1
- package/esm/util/isoformRank.d.ts +39 -0
- package/esm/util/isoformRank.js +118 -0
- package/esm/util/jexl.js +1 -1
- package/esm/util/layouts/GranularRectLayout.d.ts +19 -3
- package/esm/util/layouts/GranularRectLayout.js +57 -34
- package/esm/util/leadingEdgeAutorun.d.ts +9 -1
- package/esm/util/leadingEdgeAutorun.js +5 -2
- package/esm/util/markEncoding.d.ts +10 -8
- package/esm/util/markEncoding.js +50 -12
- package/esm/util/markEncodingTypes.d.ts +77 -21
- package/esm/util/originCut.d.ts +14 -0
- package/esm/util/originCut.js +19 -0
- package/esm/util/paintLayer.d.ts +1 -1
- package/esm/util/paintLayer.js +4 -3
- package/esm/util/pathSeries.d.ts +18 -0
- package/esm/util/pathSeries.js +143 -0
- package/esm/util/pressOwner.d.ts +20 -0
- package/esm/util/pressOwner.js +26 -0
- package/esm/util/quantileExtent.d.ts +23 -1
- package/esm/util/quantileExtent.js +25 -2
- package/esm/util/rowStackGeometry.d.ts +1 -1
- package/esm/util/rowStackGeometry.js +1 -1
- package/esm/util/sessionActivity.d.ts +36 -0
- package/esm/util/sessionActivity.js +88 -0
- package/esm/util/stepOutputs.d.ts +165 -0
- package/esm/util/stepOutputs.js +201 -0
- package/esm/util/stepTables.d.ts +7 -3
- package/esm/util/stepTables.js +86 -3
- package/esm/util/systemColorScheme.d.ts +4 -0
- package/esm/util/systemColorScheme.js +21 -0
- package/esm/util/tabix.d.ts +1 -1
- package/esm/util/tabix.js +1 -1
- package/esm/util/temporaryAssembly.d.ts +2 -2
- package/esm/util/temporaryAssembly.js +2 -3
- package/esm/util/thresholdScale.d.ts +1 -1
- package/esm/util/thresholdScale.js +1 -1
- package/esm/util/trackConfigDelta.d.ts +1 -1
- package/esm/util/tracks.d.ts +25 -15
- package/esm/util/tracks.js +68 -44
- package/esm/util/types/index.d.ts +15 -7
- package/esm/util/types/index.js +21 -2
- package/esm/util/usePanZoom.js +4 -10
- package/esm/util/useRowVirtualScroll.d.ts +1 -0
- package/esm/util/windowStep.d.ts +6 -0
- package/esm/util/windowStep.js +153 -0
- package/package.json +27 -16
- package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +0 -40
- package/esm/data_adapters/BaseAdapter/featureDensity.js +0 -31
- package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +0 -11
- package/esm/rpc/methods/CoreGetFeatureDensity.js +0 -22
- package/esm/rpc/methods/CoreLoadAdapterCode.d.ts +0 -13
- package/esm/rpc/methods/CoreLoadAdapterCode.js +0 -16
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import CloseIcon from '@mui/icons-material/Close';
|
|
3
3
|
import { Autocomplete, IconButton, ListItemText, MenuItem, TextField, } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
4
5
|
import { OPERATORS, stripJexlPrefix, typedField, withField, withOp, } from '../util/jexlFilterRows.js';
|
|
5
6
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
6
7
|
import MonospaceTextField from './MonospaceTextField.js';
|
|
@@ -42,10 +43,10 @@ export function compileError(line, jexl) {
|
|
|
42
43
|
return e instanceof Error ? e.message : String(e);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
function RemoveButton({ onClick }) {
|
|
46
|
+
const RemoveButton = observer(function RemoveButton({ onClick, }) {
|
|
46
47
|
return (_jsx(IconButton, { size: "small", "aria-label": "Remove condition", onClick: onClick, children: _jsx(CloseIcon, { fontSize: "small" }) }));
|
|
47
|
-
}
|
|
48
|
-
function ValueInput({ row, onChange, }) {
|
|
48
|
+
});
|
|
49
|
+
const ValueInput = observer(function ValueInput({ row, onChange, }) {
|
|
49
50
|
const { classes } = useStyles();
|
|
50
51
|
const { field, op, value } = row;
|
|
51
52
|
if (op === 'set' || op === '!set') {
|
|
@@ -63,8 +64,8 @@ function ValueInput({ row, onChange, }) {
|
|
|
63
64
|
}, renderInput: params => _jsx(TextField, { ...params, placeholder: "Value" }) })) : (_jsx(TextField, { className: classes.value, size: "small", placeholder: op === '~' ? 'Regular expression' : 'Value', type: field?.type === 'number' ? 'number' : 'text', disabled: !field, value: text, onChange: event => {
|
|
64
65
|
onChange({ ...row, value: event.target.value });
|
|
65
66
|
} }));
|
|
66
|
-
}
|
|
67
|
-
export function ConditionRowEditor({ row, choices, onChange, onRemove, }) {
|
|
67
|
+
});
|
|
68
|
+
export const ConditionRowEditor = observer(function ConditionRowEditor({ row, choices, onChange, onRemove, }) {
|
|
68
69
|
const { classes } = useStyles();
|
|
69
70
|
const { field } = row;
|
|
70
71
|
const grouped = choices.some(choice => choice.group);
|
|
@@ -81,10 +82,10 @@ export function ConditionRowEditor({ row, choices, onChange, onRemove, }) {
|
|
|
81
82
|
}, renderOption: ({ key, ...props }, choice) => (_jsx("li", { ...props, children: _jsx(ListItemText, { primary: choice.label, secondary: choice.description }) }, key)), renderInput: params => _jsx(TextField, { ...params, placeholder: "Field" }) }), _jsx(TextField, { className: classes.op, select: true, size: "small", disabled: !field, value: row.op, helperText: field?.multi ? 'any value' : undefined, onChange: event => {
|
|
82
83
|
onChange(withOp(row, event.target.value));
|
|
83
84
|
}, children: OPERATORS[field?.type ?? 'any'].map(({ op, label }) => (_jsx(MenuItem, { value: op, children: label }, op))) }), _jsx(ValueInput, { row: row, onChange: onChange }), _jsx(RemoveButton, { onClick: onRemove })] }));
|
|
84
|
-
}
|
|
85
|
-
export function TextRowEditor({ row, jexl, onChange, onRemove, }) {
|
|
85
|
+
});
|
|
86
|
+
export const TextRowEditor = observer(function TextRowEditor({ row, jexl, onChange, onRemove, }) {
|
|
86
87
|
const { classes } = useStyles();
|
|
87
88
|
return (_jsxs("div", { className: classes.row, children: [_jsx("div", { className: classes.expression, title: "An expression the field pickers cannot show", children: "\u0192" }), _jsx(MonospaceTextField, { className: classes.value, variant: "standard", fullWidth: true, value: row.text, error: compileError(row.text, jexl), onChange: text => {
|
|
88
89
|
onChange({ ...row, text });
|
|
89
90
|
} }), _jsx(RemoveButton, { onClick: onRemove })] }));
|
|
90
|
-
}
|
|
91
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
declare const LabeledCheckbox: ({ checked, onChange, label, className, disabled, size, }: {
|
|
3
3
|
checked: boolean;
|
|
4
4
|
onChange: (checked: boolean) => void;
|
|
5
5
|
label: ReactNode;
|
|
6
6
|
className?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
size?: 'small' | 'medium';
|
|
9
|
-
})
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
|
+
export default LabeledCheckbox;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox, FormControlLabel } from '@mui/material';
|
|
3
|
-
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const LabeledCheckbox = observer(function LabeledCheckbox({ checked, onChange, label, className, disabled, size, }) {
|
|
4
5
|
return (_jsx(FormControlLabel, { className: className, disabled: disabled, control: _jsx(Checkbox, { size: size, checked: checked, onChange: event => {
|
|
5
6
|
onChange(event.target.checked);
|
|
6
7
|
} }), label: label }));
|
|
7
|
-
}
|
|
8
|
+
});
|
|
9
|
+
export default LabeledCheckbox;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
declare const Lazy: import("react").LazyExoticComponent<
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const Lazy: import("react").LazyExoticComponent<({ clientPoint: clientPointCoords, anchor, id, children, placement, }: {
|
|
3
|
+
placement?: import("./BaseTooltip.tsx").TooltipPlacement;
|
|
4
|
+
clientPoint?: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
anchor?: HTMLElement;
|
|
9
|
+
id?: string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}) => import("react").ReactPortal | null>;
|
|
12
|
+
declare const LazyBaseTooltip: (props: ComponentProps<typeof Lazy>) => import("react").JSX.Element;
|
|
13
|
+
export default LazyBaseTooltip;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy } from 'react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
// The tooltip, behind its own chunk: @floating-ui is ~266KB and this is what
|
|
4
5
|
// lets the ui barrel export it without putting that on the startup path. A
|
|
5
6
|
// consumer that wants the eager component deep-imports './BaseTooltip.tsx'.
|
|
6
7
|
const Lazy = lazy(() => import('./BaseTooltip.js'));
|
|
7
|
-
|
|
8
|
+
const LazyBaseTooltip = observer(function LazyBaseTooltip(props) {
|
|
8
9
|
return (_jsx(Suspense, { fallback: null, children: _jsx(Lazy, { ...props }) }));
|
|
9
|
-
}
|
|
10
|
+
});
|
|
11
|
+
export default LazyBaseTooltip;
|
|
@@ -25,6 +25,7 @@ function glyphPathData(shape, size, x, y) {
|
|
|
25
25
|
//
|
|
26
26
|
// The shape fills the `size` box from (x, y) so a caller can lay swatches out on
|
|
27
27
|
// a fixed pitch.
|
|
28
|
+
// eslint-disable-next-line no-restricted-syntax -- drawn inside a frozen SVG figure
|
|
28
29
|
export function LegendSwatchGlyph({ swatch, size, x = 0, y = 0, }) {
|
|
29
30
|
return swatch.shape ? (_jsx("path", { d: glyphPathData(swatch.shape, size, x, y), fill: swatch.color })) : (_jsx("rect", { x: x, y: y, width: size, height: size, fill: swatch.color }));
|
|
30
31
|
}
|
package/esm/ui/LoadingDots.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
declare const LoadingDots: () => import("react").JSX.Element;
|
|
2
|
+
export default LoadingDots;
|
package/esm/ui/LoadingDots.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
2
3
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
3
4
|
import { dot1, dot2, dot3 } from './loadingDotKeyframes.js';
|
|
4
5
|
const useStyles = makeStyles()({
|
|
@@ -24,7 +25,8 @@ const useStyles = makeStyles()({
|
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
const LoadingDots = observer(function LoadingDots() {
|
|
28
29
|
const { classes } = useStyles();
|
|
29
30
|
return (_jsxs("span", { className: classes.dots, children: [_jsx("span", { children: "." }), _jsx("span", { children: "." }), _jsx("span", { children: "." })] }));
|
|
30
|
-
}
|
|
31
|
+
});
|
|
32
|
+
export default LoadingDots;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { TypographyProps } from '@mui/material';
|
|
2
2
|
interface Props extends TypographyProps {
|
|
3
3
|
message?: string;
|
|
4
|
+
/** false for a label that stands in for work not yet started, such as an
|
|
5
|
+
* off-screen view's placeholder, which a capture must not wait on */
|
|
6
|
+
busy?: boolean;
|
|
4
7
|
children?: never;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
@@ -19,5 +22,5 @@ interface Props extends TypographyProps {
|
|
|
19
22
|
* should carry the attribute too — see `isPageBusyInPage` in
|
|
20
23
|
* `@jbrowse/capture`, which is what reads it.
|
|
21
24
|
*/
|
|
22
|
-
|
|
23
|
-
export
|
|
25
|
+
declare const LoadingEllipses: ({ message, variant, busy, ...rest }: Props) => import("react").JSX.Element;
|
|
26
|
+
export default LoadingEllipses;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Typography } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
import LoadingDots from './LoadingDots.js';
|
|
4
5
|
/**
|
|
5
6
|
* The label every part of the app shows while it is working, and — through
|
|
@@ -17,6 +18,7 @@ import LoadingDots from './LoadingDots.js';
|
|
|
17
18
|
* should carry the attribute too — see `isPageBusyInPage` in
|
|
18
19
|
* `@jbrowse/capture`, which is what reads it.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
-
return (_jsxs(Typography, { ...rest, variant: variant, "data-busy":
|
|
22
|
-
}
|
|
21
|
+
const LoadingEllipses = observer(function LoadingEllipses({ message, variant = 'body2', busy = true, ...rest }) {
|
|
22
|
+
return (_jsxs(Typography, { ...rest, variant: variant, "data-busy": busy || undefined, children: [message || 'Loading', _jsx(LoadingDots, {})] }));
|
|
23
|
+
});
|
|
24
|
+
export default LoadingEllipses;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* one `setTimeout` per loading pulse, which is the floor for these semantics.
|
|
13
13
|
*/
|
|
14
14
|
export declare function useDelayedFlag(active: boolean, delayMs: number): boolean;
|
|
15
|
-
|
|
15
|
+
declare const LoadingOverlay: ({ statusMessage, progress, isVisible, immediate, canceled, onCancel, onRetry, }: {
|
|
16
16
|
statusMessage?: string;
|
|
17
17
|
progress?: number;
|
|
18
18
|
isVisible?: boolean;
|
|
@@ -20,4 +20,5 @@ export default function LoadingOverlay({ statusMessage, progress, isVisible, imm
|
|
|
20
20
|
canceled?: boolean;
|
|
21
21
|
onCancel?: () => void;
|
|
22
22
|
onRetry?: () => void;
|
|
23
|
-
})
|
|
23
|
+
}) => import("react").JSX.Element | null;
|
|
24
|
+
export default LoadingOverlay;
|
package/esm/ui/LoadingOverlay.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import CloseIcon from '@mui/icons-material/Close';
|
|
4
4
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
5
5
|
import { IconButton, Tooltip } from '@mui/material';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
6
7
|
import { progressLabel } from '../util/progress.js';
|
|
7
8
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
8
9
|
import LoadingDots from './LoadingDots.js';
|
|
@@ -98,7 +99,7 @@ const useStyles = makeStyles()(theme => {
|
|
|
98
99
|
},
|
|
99
100
|
};
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
+
const LoadingOverlay = observer(function LoadingOverlay({ statusMessage, progress, isVisible, immediate, canceled, onCancel, onRetry, }) {
|
|
102
103
|
const { classes } = useStyles();
|
|
103
104
|
const hasProgress = progress !== undefined;
|
|
104
105
|
// anti-flash: only render after the load has run long enough to be worth
|
|
@@ -136,4 +137,5 @@ export default function LoadingOverlay({ statusMessage, progress, isVisible, imm
|
|
|
136
137
|
}, children: _jsx(RefreshIcon, { fontSize: "inherit" }) }) })) : null] })) : (_jsxs(_Fragment, { children: [_jsxs("span", { className: classes.row, children: [_jsxs("span", { className: classes.text, children: [progressLabel(statusMessage || 'Loading', progress), hasProgress ? null : _jsx(LoadingDots, {})] }), onCancel && cancelable ? (_jsx(Tooltip, { title: "Cancel", children: _jsx(IconButton, { size: "small", "data-testid": "loading-overlay-cancel", onClick: () => {
|
|
137
138
|
onCancel();
|
|
138
139
|
}, children: _jsx(CloseIcon, { fontSize: "inherit" }) }) })) : null] }), hasProgress ? (_jsx(StatusProgressBar, { className: classes.bar, fraction: progress })) : null] })) }) })) : null;
|
|
139
|
-
}
|
|
140
|
+
});
|
|
141
|
+
export default LoadingOverlay;
|
|
@@ -8,9 +8,10 @@ import type { TypographyProps } from '@mui/material';
|
|
|
8
8
|
* no bar). Callers own the surrounding layout and supply `barClassName` for the
|
|
9
9
|
* bar width.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
declare const LoadingProgress: ({ message, fraction, variant, barClassName, }: {
|
|
12
12
|
message?: string;
|
|
13
13
|
fraction?: number;
|
|
14
14
|
variant?: TypographyProps['variant'];
|
|
15
15
|
barClassName?: string;
|
|
16
|
-
})
|
|
16
|
+
}) => import("react").JSX.Element;
|
|
17
|
+
export default LoadingProgress;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
2
3
|
import { progressLabel } from '../util/progress.js';
|
|
3
4
|
import LoadingEllipses from './LoadingEllipses.js';
|
|
4
5
|
import StatusProgressBar from './StatusProgressBar.js';
|
|
@@ -11,6 +12,7 @@ import StatusProgressBar from './StatusProgressBar.js';
|
|
|
11
12
|
* no bar). Callers own the surrounding layout and supply `barClassName` for the
|
|
12
13
|
* bar width.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
const LoadingProgress = observer(function LoadingProgress({ message, fraction, variant, barClassName, }) {
|
|
15
16
|
return (_jsxs(_Fragment, { children: [_jsx(LoadingEllipses, { variant: variant, message: progressLabel(message || 'Loading', fraction) }), fraction === undefined ? null : (_jsx(StatusProgressBar, { className: barClassName, fraction: fraction }))] }));
|
|
16
|
-
}
|
|
17
|
+
});
|
|
18
|
+
export default LoadingProgress;
|
package/esm/ui/Logo.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ type LogoVariant = 'color' | 'black' | 'white';
|
|
|
2
2
|
interface LogoProps {
|
|
3
3
|
variant?: LogoVariant;
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare const Logomark: ({ variant }: LogoProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const LogoFull: ({ variant }: LogoProps) => import("react").JSX.Element;
|
|
7
7
|
export {};
|
package/esm/ui/Logo.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
2
3
|
const colorSets = {
|
|
3
4
|
black: {
|
|
4
5
|
midnight: '#808080',
|
|
@@ -25,17 +26,17 @@ const colorSets = {
|
|
|
25
26
|
function getColors(variant = 'color') {
|
|
26
27
|
return colorSets[variant];
|
|
27
28
|
}
|
|
28
|
-
export function Logomark({ variant }) {
|
|
29
|
+
export const Logomark = observer(function Logomark({ variant }) {
|
|
29
30
|
return (_jsx("svg", { viewBox: "0 0 175 175", children: _jsx(Icon, { variant: variant }) }));
|
|
30
|
-
}
|
|
31
|
-
export function LogoFull({ variant }) {
|
|
31
|
+
});
|
|
32
|
+
export const LogoFull = observer(function LogoFull({ variant }) {
|
|
32
33
|
return (_jsxs("svg", { viewBox: "0 0 641 175", children: [_jsx(Text, { variant: variant }), _jsx(Icon, { variant: variant })] }));
|
|
33
|
-
}
|
|
34
|
-
function Icon({ variant }) {
|
|
34
|
+
});
|
|
35
|
+
const Icon = observer(function Icon({ variant }) {
|
|
35
36
|
const colors = getColors(variant);
|
|
36
37
|
return (_jsxs(_Fragment, { children: [_jsx("path", { style: { fill: colors.midnight }, d: "M120.5,57.5c.168,0,.333.012.5.013V40.506c-.167,0-.333-.006-.5-.006a98.325,98.325,0,0,0-77.4,37.565q-2.664,3.378-5.023,6.994l14.206,9.327Q54.043,91.709,56,89.179A81.363,81.363,0,0,1,120.5,57.5Z" }), _jsx("path", { style: { fill: colors.forest }, d: "M148.668,86.223c.308.133.6.283.908.42l6.746-15.618c-.153-.067-.3-.143-.454-.21a81.36,81.36,0,0,0-71.777,3.5q-2.8,1.544-5.469,3.309l9.249,14.054A63.93,63.93,0,0,1,148.668,86.223Z" }), _jsx("path", { style: { fill: colors.grape }, d: "M170.894,109.37A63.929,63.929,0,0,0,113.4,88.861l2.336,15.474a48.456,48.456,0,0,1,44.322,15.42c.111.125.214.255.324.381l11.16-10C171.323,109.879,171.118,109.62,170.894,109.37Z" }), _jsx("path", { style: { fill: colors.mandarin }, d: "M150.921,150.314c.04.163.07.326.107.489l16.509-4.058c-.039-.163-.067-.326-.107-.489A48.457,48.457,0,0,0,135.575,111.8l-5.515,15.591A32.466,32.466,0,0,1,150.921,150.314Z" }), _jsx("path", { style: { fill: colors.gray }, d: "M134.1,138.129l-9.779,13.213a32.486,32.486,0,0,1,7.823,14.463l15.147.852c.012-.166.032-.331.041-.5A32.464,32.464,0,0,0,134.1,138.129Z" })] }));
|
|
37
|
-
}
|
|
38
|
-
function Text({ variant }) {
|
|
38
|
+
});
|
|
39
|
+
const Text = observer(function Text({ variant }) {
|
|
39
40
|
const colors = getColors(variant);
|
|
40
41
|
return (_jsxs("g", { "aria-label": "JBrowse", transform: "translate(213.084 144.241)", style: { fill: colors.midnight }, children: [_jsx("path", { d: "m 26.355,-71.505 v 54.075 2.835 q 0,6.825 -0.42,10.185 -0.735,5.67 -2.835,9.135 -3.255,5.355 -8.505,8.4 -4.83,2.73 -11.55,3.57 L 1.47,11.76 Q 7.35,10.185 9.24,4.2 10.605,-0.105 10.605,-9.975 v -5.565 -55.965 q 1.785,0 4.62,0.315 2.835,0.21 3.255,0.21 1.785,0 2.94,-0.105 4.515,-0.42 4.935,-0.42 z" }), _jsx("path", { d: "m 60.68836,-65.415 v 24.78 h 3.255 q 2.94,0 4.935,-0.525 2.1,-0.525 3.885,-2.1 2.31,-1.995 3.36,-4.83 1.155,-2.835 1.155,-6.09 0,-5.565 -2.94,-8.61 -2.94,-3.045 -8.295,-3.045 -2.52,0 -5.355,0.42 z m 0,30.87 V -6.09 h 5.25 q 4.725,0 8.505,-3.675 3.885,-3.78 3.885,-10.08 0,-8.19 -4.62,-11.655 -4.095,-3.045 -13.02,-3.045 z M 44.93836,0 v -71.505 h 27.09 q 9.135,0 14.385,3.255 6.51,3.99 6.51,12.6 0,7.035 -5.25,11.655 -4.62,4.095 -11.97,5.145 v 0.945 q 7.56,0.735 12.285,3.99 6.615,4.62 6.615,13.335 0,10.185 -7.98,15.75 -6.93,4.83 -17.43,4.83 z" }), _jsx("path", { d: "M 109.44281,0.525 V -50.4 q 1.785,0.21 3.99,0.42 2.31,0.105 3.255,0.105 2.31,0 4.2,-0.21 1.89,-0.21 3.045,-0.315 v 13.02 q 1.89,-6.51 5.46,-9.87 4.41,-4.095 11.655,-4.095 -0.315,2.73 -0.42,6.825 -0.105,3.99 -0.105,7.455 l -0.945,0.84 q -0.945,-0.735 -2.415,-1.05 -1.47,-0.315 -2.94,-0.315 -3.57,0 -6.195,1.89 -2.52,1.785 -3.465,5.04 -0.42,1.155 -0.525,3.15 -0.105,1.89 -0.105,4.515 v 4.515 19.005 q -1.785,-0.21 -2.625,-0.21 -3.675,-0.315 -4.62,-0.315 -2.31,0 -4.2,0.21 -1.89,0.21 -3.045,0.315 z" }), _jsx("path", { d: "m 173.77337,1.47 q -11.655,0 -18.585,-6.825 -6.93,-6.825 -6.93,-18.48 0,-12.6 6.72,-20.055 6.825,-7.455 18.9,-7.455 11.97,0 18.9,6.72 6.93,6.72 6.93,18.48 0,12.285 -6.72,19.74 -7.14,7.875 -19.215,7.875 z m 0.735,-48.09 q -5.88,0 -8.505,6.51 -2.205,5.565 -2.205,15.96 0,8.19 1.47,12.915 2.415,7.98 8.505,7.98 5.565,0 8.19,-7.875 2.205,-6.51 2.205,-16.695 0,-8.505 -2.1,-13.23 -2.52,-5.565 -7.56,-5.565 z" }), _jsx("path", { d: "m 222.03563,-50.4 10.5,36.015 q 3.675,-11.235 5.67,-17.85 2.415,-8.085 5.04,-18.165 1.05,0.105 3.045,0.315 2.1,0.21 2.835,0.21 1.995,0 3.15,-0.105 1.26,-0.21 2.73,-0.42 l 10.71,36.015 q 5.88,-17.43 10.71,-36.015 l 4.2,0.315 4.095,-0.315 q -5.145,13.125 -9.135,24.57 -5.04,14.28 -8.505,26.355 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.205,-0.105 -1.89,0 -3.36,0.21 -1.365,0.21 -2.31,0.315 l -10.605,-34.755 q -4.41,13.65 -6.72,21.105 -2.31,7.35 -4.095,13.65 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.31,-0.105 -1.995,0 -3.465,0.21 -1.365,0.21 -2.31,0.315 -3.78,-12.81 -5.04,-17.01 -2.205,-7.245 -5.46,-17.01 -2.835,-8.4 -5.88,-16.905 1.575,0 4.305,0.315 2.73,0.21 3.36,0.21 1.47,0 4.305,-0.21 2.835,-0.315 3.465,-0.315 z" }), _jsx("path", { d: "m 292.84172,-12.81 h 2.625 q 1.47,4.095 4.62,6.51 3.15,2.415 7.35,2.415 2.94,0 5.46,-1.785 2.625,-1.89 2.625,-4.62 0,-3.885 -6.195,-6.615 -10.395,-4.62 -11.655,-5.46 -6.405,-4.515 -6.405,-12.285 0,-7.77 5.25,-12.18 5.25,-4.515 12.81,-4.515 3.99,0 8.085,1.365 4.095,1.26 7.14,3.57 l -2.52,9.24 h -2.94 q -0.63,-3.57 -3.57,-6.195 -2.835,-2.625 -6.405,-2.625 -3.15,0 -5.46,1.575 -2.31,1.47 -2.31,4.515 0,3.885 6.405,6.51 10.185,4.095 11.865,5.25 6.405,4.41 6.405,12.81 0,7.455 -5.46,12.18 -5.355,4.62 -14.805,4.62 -8.19,0 -14.49,-4.305 z" }), _jsx("path", { d: "m 349.61228,-29.925 h 15.54 q 0,-6.51 -1.05,-10.395 -1.68,-6.3 -5.88,-6.3 -5.04,0 -7.14,6.195 -1.47,4.305 -1.47,10.5 z m 30.03,5.04 h -30.03 q 0,9.135 3.045,13.86 3.57,5.67 11.55,5.67 3.255,0 6.405,-1.26 3.15,-1.26 5.88,-3.465 l 1.26,0.945 -2.31,5.88 q -6.72,4.725 -15.015,4.725 -12.915,0 -19.635,-7.245 -6.72,-7.245 -6.72,-20.37 0,-11.235 6.405,-18.165 6.51,-7.035 17.64,-7.035 11.655,0 16.905,7.56 4.62,6.615 4.62,18.9 z" })] }));
|
|
41
|
-
}
|
|
42
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const MenuItemChevron: ({ hidden, }: {
|
|
2
2
|
hidden?: boolean;
|
|
3
|
-
})
|
|
3
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ChevronRight from '@mui/icons-material/ChevronRight';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
// The chevron a submenu row ends in, and — `hidden` — an invisible copy
|
|
4
5
|
// reserving the identical footprint on a clickable row that has none, so a menu
|
|
5
6
|
// carrying help on both kinds lands every "?" in one column.
|
|
@@ -14,6 +15,6 @@ import ChevronRight from '@mui/icons-material/ChevronRight';
|
|
|
14
15
|
// actually draws at ~20.6px and every clickable row's "?" sat ~3.4px inboard of
|
|
15
16
|
// the submenu rows'. Rendering the icon itself cannot be off by a scale factor
|
|
16
17
|
// nothing here gets to see.
|
|
17
|
-
export function MenuItemChevron({ hidden }) {
|
|
18
|
+
export const MenuItemChevron = observer(function MenuItemChevron({ hidden, }) {
|
|
18
19
|
return _jsx(ChevronRight, { style: hidden ? { visibility: 'hidden' } : undefined });
|
|
19
|
-
}
|
|
20
|
+
});
|
|
@@ -3,6 +3,7 @@ import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
|
|
3
3
|
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
|
|
4
4
|
import RadioButtonCheckedIcon from '@mui/icons-material/RadioButtonChecked';
|
|
5
5
|
import RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
6
7
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
7
8
|
const useStyles = makeStyles()({
|
|
8
9
|
menuItemEndDecoration: {
|
|
@@ -11,7 +12,7 @@ const useStyles = makeStyles()({
|
|
|
11
12
|
height: 16,
|
|
12
13
|
},
|
|
13
14
|
});
|
|
14
|
-
export function MenuItemEndDecoration({ type, checked, }) {
|
|
15
|
+
export const MenuItemEndDecoration = observer(function MenuItemEndDecoration({ type, checked, }) {
|
|
15
16
|
const { classes } = useStyles();
|
|
16
17
|
let icon;
|
|
17
18
|
switch (type) {
|
|
@@ -25,4 +26,4 @@ export function MenuItemEndDecoration({ type, checked, }) {
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
return _jsx("div", { className: classes.menuItemEndDecoration, children: icon });
|
|
28
|
-
}
|
|
29
|
+
});
|
|
@@ -6,7 +6,7 @@ export interface MenuColumnFlags {
|
|
|
6
6
|
hasSubmenuWithHelp: boolean;
|
|
7
7
|
sharedActionColumn: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare
|
|
9
|
+
export declare const MenuItemTrailing: ({ item, columns: { hasCheckboxOrRadioWithHelp, hasEndAdornment, hasSubmenuWithHelp, sharedActionColumn, }, }: {
|
|
10
10
|
item: DecoratedMenuItem;
|
|
11
11
|
columns: MenuColumnFlags;
|
|
12
|
-
})
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
2
3
|
import CascadingMenuHelpIconButton, { CascadingMenuHelpIconSpacer, } from './CascadingMenuHelpIconButton.js';
|
|
3
4
|
import { MenuItemChevron } from './MenuItemChevron.js';
|
|
4
5
|
import { MenuItemEndDecoration } from './MenuItemEndDecoration.js';
|
|
@@ -10,27 +11,27 @@ const valueActionGap = 8;
|
|
|
10
11
|
const endAdornmentColumnWidth = 28;
|
|
11
12
|
// The checkbox/radio glyph reflecting a row's value. Held slightly apart from
|
|
12
13
|
// the action column when the menu has one, so state and actions don't blur.
|
|
13
|
-
function MenuItemValueGlyph({ type, checked, separated, }) {
|
|
14
|
+
const MenuItemValueGlyph = observer(function MenuItemValueGlyph({ type, checked, separated, }) {
|
|
14
15
|
return (_jsx("div", { style: { marginRight: separated ? valueActionGap : 0 }, children: _jsx(MenuItemEndDecoration, { type: type, checked: checked }) }));
|
|
15
|
-
}
|
|
16
|
+
});
|
|
16
17
|
// Fixed-width column holding an item's endAdornment (e.g. the "default for all"
|
|
17
18
|
// pin). Reserved on every row of a menu that has any adornment so they
|
|
18
19
|
// right-align into their own column.
|
|
19
|
-
function MenuItemEndAdornmentSlot({ children }) {
|
|
20
|
+
const MenuItemEndAdornmentSlot = observer(function MenuItemEndAdornmentSlot({ children, }) {
|
|
20
21
|
return (_jsx("div", { style: {
|
|
21
22
|
width: endAdornmentColumnWidth,
|
|
22
23
|
display: 'flex',
|
|
23
24
|
justifyContent: 'flex-end',
|
|
24
25
|
alignItems: 'center',
|
|
25
26
|
}, children: children }));
|
|
26
|
-
}
|
|
27
|
+
});
|
|
27
28
|
// Everything trailing a menu row's label, for a clickable row and a submenu row
|
|
28
29
|
// alike: a flex spacer that right-aligns the decorations, then the value glyph,
|
|
29
30
|
// help affordance, endAdornment column, and the chevron column. When
|
|
30
31
|
// `sharedActionColumn` is set, no row in the menu combines help with an
|
|
31
32
|
// adornment, so the two share one trailing column (whichever this row has)
|
|
32
33
|
// rather than each claiming its own.
|
|
33
|
-
export function MenuItemTrailing({ item, columns: { hasCheckboxOrRadioWithHelp, hasEndAdornment, hasSubmenuWithHelp, sharedActionColumn, }, }) {
|
|
34
|
+
export const MenuItemTrailing = observer(function MenuItemTrailing({ item, columns: { hasCheckboxOrRadioWithHelp, hasEndAdornment, hasSubmenuWithHelp, sharedActionColumn, }, }) {
|
|
34
35
|
const isSubmenu = 'subMenu' in item;
|
|
35
36
|
const isCheckOrRadio = item.type === 'checkbox' || item.type === 'radio';
|
|
36
37
|
const hasActionColumn = hasCheckboxOrRadioWithHelp || hasEndAdornment;
|
|
@@ -39,4 +40,4 @@ export function MenuItemTrailing({ item, columns: { hasCheckboxOrRadioWithHelp,
|
|
|
39
40
|
const helpButton = item.helpText && !item.disabled ? (_jsx(CascadingMenuHelpIconButton, { helpText: item.helpText, label: item.label })) : undefined;
|
|
40
41
|
return (_jsxs(_Fragment, { children: [_jsx("div", { style: { flexGrow: 1, minWidth: 10 } }), isCheckOrRadio ? (_jsx(MenuItemValueGlyph, { type: item.type, checked: item.checked, separated: hasActionColumn })) : null, sharedActionColumn ? (_jsx(MenuItemEndAdornmentSlot, { children: helpButton ?? menuItemAdornment(item) })) : (_jsxs(_Fragment, { children: [helpButton ??
|
|
41
42
|
(isCheckOrRadio && hasCheckboxOrRadioWithHelp ? (_jsx(CascadingMenuHelpIconSpacer, {})) : null), hasEndAdornment ? (_jsx(MenuItemEndAdornmentSlot, { children: menuItemAdornment(item) })) : null] })), isSubmenu ? (_jsx(MenuItemChevron, {})) : hasSubmenuWithHelp ? (_jsx(MenuItemChevron, { hidden: true })) : null] }));
|
|
42
|
-
}
|
|
43
|
+
});
|
package/esm/ui/MenuTypes.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface BaseMenuItem {
|
|
|
67
67
|
*
|
|
68
68
|
* An **element**, so a module that sets it drags React and whatever it renders
|
|
69
69
|
* into its own graph. Reach for it only when the content is genuinely
|
|
70
|
-
* arbitrary — synteny's and wiggle's
|
|
70
|
+
* arbitrary — synteny's and wiggle's color swatches are what it exists for.
|
|
71
71
|
*/
|
|
72
72
|
endAdornment?: React.ReactNode;
|
|
73
73
|
}
|
|
@@ -101,6 +101,26 @@ export interface SubMenuItem extends BaseMenuItem {
|
|
|
101
101
|
type?: 'subMenu';
|
|
102
102
|
subMenu: MenuItem[] | (() => MenuItem[]);
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* #menuBuilder TRACK_MENU_PRIORITY | the `priority` of each shared track menu row, higher first
|
|
106
|
+
*
|
|
107
|
+
* A display's own rows sit at 0, between the track's actions above and the
|
|
108
|
+
* recovery, Advanced and Display types rows below.
|
|
109
|
+
*/
|
|
110
|
+
export declare const TRACK_MENU_PRIORITY: {
|
|
111
|
+
readonly aboutTrack: 1002;
|
|
112
|
+
readonly trackActions: 1001;
|
|
113
|
+
readonly trackOrder: 1000;
|
|
114
|
+
readonly saveTrackData: 998;
|
|
115
|
+
readonly trackActionsDivider: 997;
|
|
116
|
+
readonly recovery: -100;
|
|
117
|
+
readonly advanced: -999;
|
|
118
|
+
readonly displayTypes: -1000;
|
|
119
|
+
};
|
|
120
|
+
/** #menuBuilder subMenuIfAny | a submenu row, or no row while it has nothing to hold */
|
|
121
|
+
export declare function subMenuIfAny(item: BaseMenuItem & {
|
|
122
|
+
subMenu: MenuItem[];
|
|
123
|
+
}): MenuItem[];
|
|
104
124
|
export declare function resolveSubMenu(item: SubMenuItem): MenuItem[];
|
|
105
125
|
/**
|
|
106
126
|
* #menuItem custom | renders arbitrary React content inline, e.g. a slider
|
package/esm/ui/MenuTypes.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #menuBuilder TRACK_MENU_PRIORITY | the `priority` of each shared track menu row, higher first
|
|
3
|
+
*
|
|
4
|
+
* A display's own rows sit at 0, between the track's actions above and the
|
|
5
|
+
* recovery, Advanced and Display types rows below.
|
|
6
|
+
*/
|
|
7
|
+
export const TRACK_MENU_PRIORITY = {
|
|
8
|
+
aboutTrack: 1002,
|
|
9
|
+
trackActions: 1001,
|
|
10
|
+
trackOrder: 1000,
|
|
11
|
+
saveTrackData: 998,
|
|
12
|
+
trackActionsDivider: 997,
|
|
13
|
+
recovery: -100,
|
|
14
|
+
advanced: -999,
|
|
15
|
+
displayTypes: -1000,
|
|
16
|
+
};
|
|
17
|
+
/** #menuBuilder subMenuIfAny | a submenu row, or no row while it has nothing to hold */
|
|
18
|
+
export function subMenuIfAny(item) {
|
|
19
|
+
return item.subMenu.length ? [{ ...item, type: 'subMenu' }] : [];
|
|
20
|
+
}
|
|
1
21
|
export function resolveSubMenu(item) {
|
|
2
22
|
return typeof item.subMenu === 'function' ? item.subMenu() : item.subMenu;
|
|
3
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextFieldProps } from '@mui/material';
|
|
2
|
-
|
|
2
|
+
declare const MonospaceTextField: ({ value, onChange, error, label, children, style, className, readOnly, inputTestId, helperText, variant, ...rest }: {
|
|
3
3
|
value: string;
|
|
4
4
|
onChange?: (value: string) => void;
|
|
5
5
|
error?: unknown;
|
|
@@ -7,4 +7,5 @@ export default function MonospaceTextField({ value, onChange, error, label, chil
|
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
inputTestId?: string;
|
|
10
|
-
} & Omit<TextFieldProps, 'value' | 'onChange' | 'error' | 'slotProps'>)
|
|
10
|
+
} & Omit<TextFieldProps, 'value' | 'onChange' | 'error' | 'slotProps'>) => import("react").JSX.Element;
|
|
11
|
+
export default MonospaceTextField;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InputLabel, TextField } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
4
5
|
import { alpha } from './palette.js';
|
|
5
6
|
const monospaceFontFamily = 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace';
|
|
@@ -19,7 +20,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
19
20
|
// error turns it red and takes the helper text's place under the field, so
|
|
20
21
|
// the text does not move while it flips between valid and invalid. `children`
|
|
21
22
|
// render below the field (e.g. a description or help button).
|
|
22
|
-
|
|
23
|
+
const MonospaceTextField = observer(function MonospaceTextField({ value, onChange, error, label, children, style, className, readOnly, inputTestId, helperText, variant = 'outlined', ...rest }) {
|
|
23
24
|
const { classes, cx } = useStyles();
|
|
24
25
|
return (_jsxs("div", { className: classes.container, children: [label ? _jsx(InputLabel, { shrink: true, children: label }) : null, _jsx(TextField, { ...rest, variant: variant, multiline: true, error: !!error, helperText: error ? `${error}` : helperText, value: value, onChange: event => {
|
|
25
26
|
onChange?.(event.target.value);
|
|
@@ -37,4 +38,5 @@ export default function MonospaceTextField({ value, onChange, error, label, chil
|
|
|
37
38
|
autoCapitalize: 'off',
|
|
38
39
|
},
|
|
39
40
|
} }), children] }));
|
|
40
|
-
}
|
|
41
|
+
});
|
|
42
|
+
export default MonospaceTextField;
|
|
@@ -27,5 +27,5 @@ type Props = Omit<TextFieldProps, 'value' | 'onChange' | 'type' | 'error'> & Own
|
|
|
27
27
|
* spinners). This component keeps a plain text input and validates with
|
|
28
28
|
* `Number.isFinite` + optional min/max.
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
export
|
|
30
|
+
declare const NumberTextField: (props: Props) => import("react").JSX.Element;
|
|
31
|
+
export default NumberTextField;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { TextField } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
4
5
|
/**
|
|
5
6
|
* Uncontrolled-style numeric TextField. Owns the input *text* internally;
|
|
6
7
|
* emits the parsed *number* (or undefined) to the parent on every change.
|
|
@@ -10,7 +11,7 @@ import { TextField } from '@mui/material';
|
|
|
10
11
|
* spinners). This component keeps a plain text input and validates with
|
|
11
12
|
* `Number.isFinite` + optional min/max.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
const NumberTextField = observer(function NumberTextField(props) {
|
|
14
15
|
const { defaultValue, onValueChange, min, max, errorText = 'Must be a valid number', helperText, ...rest } = props;
|
|
15
16
|
const [text, setText] = useState(defaultValue === undefined ? '' : `${defaultValue}`);
|
|
16
17
|
const parsed = parseInBounds(text, min, max);
|
|
@@ -20,7 +21,8 @@ export default function NumberTextField(props) {
|
|
|
20
21
|
setText(next);
|
|
21
22
|
onValueChange(parseInBounds(next, min, max));
|
|
22
23
|
} }));
|
|
23
|
-
}
|
|
24
|
+
});
|
|
25
|
+
export default NumberTextField;
|
|
24
26
|
function parseInBounds(text, min, max) {
|
|
25
27
|
if (text === '') {
|
|
26
28
|
return undefined;
|
|
@@ -21,10 +21,10 @@ export declare function StyleThemeProvider({ theme, children, }: {
|
|
|
21
21
|
* write that the worker-side half of the rendering derives from. This one
|
|
22
22
|
* colors React and nothing else.
|
|
23
23
|
*/
|
|
24
|
-
export declare
|
|
24
|
+
export declare const PaletteProvider: ({ palette, children, }: {
|
|
25
25
|
palette: JBrowsePalette;
|
|
26
26
|
children: ReactNode;
|
|
27
|
-
})
|
|
27
|
+
}) => import("react").JSX.Element;
|
|
28
28
|
export declare function useStyleTheme(): JBrowseStyleTheme;
|
|
29
29
|
export declare function usePalette(): JBrowsePalette;
|
|
30
30
|
/** What {@link useSessionPalette} needs of a session. */
|
|
@@ -39,9 +39,11 @@ export interface ThemeModeSession {
|
|
|
39
39
|
* follow its dark mode mounts {@link SessionPaletteProvider}, which is this
|
|
40
40
|
* hook and the provider in one.
|
|
41
41
|
*
|
|
42
|
-
* Pass no mode and JBrowse follows the page
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* Pass no mode and JBrowse follows the page's CSS `color-scheme`: light or dark
|
|
43
|
+
* where the page names one, the OS preference where it names both, and light
|
|
44
|
+
* where it names neither, so a page with no dark styling never gets a dark
|
|
45
|
+
* JBrowse from a dark OS. A host whose mode lives somewhere a stylesheet cannot
|
|
46
|
+
* see passes it.
|
|
45
47
|
*
|
|
46
48
|
* **Both halves are load-bearing, which is why the pairing is published as a
|
|
47
49
|
* component.** The palette is what *React* draws with; the config `theme` slot
|
|
@@ -69,8 +71,8 @@ export declare function useSessionPalette(session: ThemeModeSession, mode?: 'lig
|
|
|
69
71
|
*
|
|
70
72
|
* `mode` is optional. Left out, JBrowse follows the page's declared
|
|
71
73
|
* `color-scheme` — so a host whose dark-mode toggle sets it, as most do, mounts
|
|
72
|
-
* this with a session and nothing else
|
|
73
|
-
* declares
|
|
74
|
+
* this with a session and nothing else. A page that declares `light dark`
|
|
75
|
+
* follows the OS, and a page that declares nothing stays light.
|
|
74
76
|
*
|
|
75
77
|
* A component rather than a documented pair of calls because the pair has a
|
|
76
78
|
* half that can be left out with nothing to show for it. `PaletteProvider` is
|
|
@@ -83,8 +85,8 @@ export declare function useSessionPalette(session: ThemeModeSession, mode?: 'lig
|
|
|
83
85
|
* The session is the only thing that resolves a palette here, so a host
|
|
84
86
|
* supplying colors of its own mounts `PaletteProvider` directly instead.
|
|
85
87
|
*/
|
|
86
|
-
export declare
|
|
88
|
+
export declare const SessionPaletteProvider: ({ session, mode, children, }: {
|
|
87
89
|
session: ThemeModeSession;
|
|
88
90
|
mode?: 'light' | 'dark';
|
|
89
91
|
children: ReactNode;
|
|
90
|
-
})
|
|
92
|
+
}) => import("react").JSX.Element;
|