@jbrowse/core 5.0.0-beta.13 → 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 +365 -69
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -2
- 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 +1 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +10 -19
- 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/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 +2 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/featureTypeUtil.js +22 -6
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +13 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/model.js +28 -1
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +2 -2
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +2 -0
- package/esm/PluginManager.d.ts +1 -0
- package/esm/PluginManager.js +6 -0
- package/esm/ReExports/coreModules.generated.js +538 -524
- package/esm/ReExports/coreWorkerModules.generated.js +454 -441
- package/esm/ReExports/lazify.js +3 -2
- package/esm/ReExports/list.js +15 -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/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 +18 -5
- package/esm/configuration/configurationSchema.js +9 -7
- package/esm/configuration/configurationSchemaUnion.d.ts +2 -1
- package/esm/configuration/configurationSchemaUnion.js +2 -1
- package/esm/configuration/configurationSlot.js +4 -4
- 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 +5 -5
- package/esm/configuration/getConf.js +13 -4
- package/esm/configuration/index.d.ts +1 -1
- package/esm/configuration/index.js +1 -1
- package/esm/configuration/plot.d.ts +2 -2
- package/esm/configuration/plot.js +32 -18
- package/esm/configuration/schemaRegistry.d.ts +0 -2
- package/esm/configuration/slotFacade.js +2 -2
- package/esm/configuration/snapshotPreprocess.d.ts +42 -18
- package/esm/configuration/snapshotPreprocess.js +94 -34
- package/esm/configuration/tabixShorthand.js +1 -3
- 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/models/BaseConnectionModelFactory.d.ts +2 -0
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.js +2 -0
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +40 -6
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +56 -8
- package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +3 -3
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +7 -6
- 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 +9 -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 +0 -10
- package/esm/rpc/byteBudget.d.ts +8 -0
- package/esm/rpc/byteBudget.js +13 -0
- package/esm/rpc/configSchema.d.ts +2 -0
- package/esm/rpc/configSchema.js +3 -1
- package/esm/rpc/coreRpcMethods.d.ts +0 -1
- package/esm/rpc/coreRpcMethods.js +0 -1
- package/esm/rpc/methods/CoreGetEncodedLayers.d.ts +2 -2
- package/esm/rpc/methods/CoreGetEncodedLayers.js +7 -5
- 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/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/colorScale.d.ts +5 -1
- package/esm/ui/colorScale.js +12 -10
- package/esm/ui/colors.d.ts +3 -3
- package/esm/ui/colors.js +7 -7
- 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/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/analytics.d.ts +4 -6
- package/esm/util/analytics.js +143 -12
- package/esm/util/bezierConnector.d.ts +20 -0
- package/esm/util/bezierConnector.js +34 -100
- package/esm/util/cacheBudgets.d.ts +3 -0
- package/esm/util/cacheBudgets.js +3 -0
- package/esm/util/categoricalField.d.ts +2 -2
- package/esm/util/categoricalField.js +3 -3
- 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 +6 -6
- 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 +14 -2
- package/esm/util/colorScale.d.ts +114 -20
- package/esm/util/colorScale.js +124 -26
- package/esm/util/colorSchemes.d.ts +6 -4
- package/esm/util/colorSchemes.js +6 -3
- 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/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 +74 -20
- 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 +3 -3
- package/esm/util/quantileExtent.js +3 -3
- 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/thresholdScale.d.ts +1 -1
- package/esm/util/thresholdScale.js +1 -1
- package/esm/util/tracks.js +1 -1
- package/esm/util/usePanZoom.js +4 -10
- package/esm/util/windowStep.d.ts +6 -0
- package/esm/util/windowStep.js +153 -0
- package/package.json +23 -15
- 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/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;
|
package/esm/ui/PaletteContext.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, use, useEffect, useMemo, useSyncExternalStore, } from 'react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
import { onColorSchemeChange, prefersDarkColorScheme, } from '../util/systemColorScheme.js';
|
|
4
5
|
import { defaultStyleTheme } from './styleTheme.js';
|
|
5
6
|
/**
|
|
@@ -25,6 +26,7 @@ const StyleThemeContext = createContext(undefined);
|
|
|
25
26
|
* `theme` that sets `spacing` or `typography` reaches `makeStyles` and Material
|
|
26
27
|
* UI alike.
|
|
27
28
|
*/
|
|
29
|
+
// eslint-disable-next-line no-restricted-syntax -- drawn inside a frozen SVG figure
|
|
28
30
|
export function StyleThemeProvider({ theme, children, }) {
|
|
29
31
|
return _jsx(StyleThemeContext, { value: theme, children: children });
|
|
30
32
|
}
|
|
@@ -38,10 +40,10 @@ export function StyleThemeProvider({ theme, children, }) {
|
|
|
38
40
|
* write that the worker-side half of the rendering derives from. This one
|
|
39
41
|
* colors React and nothing else.
|
|
40
42
|
*/
|
|
41
|
-
export function PaletteProvider({ palette, children, }) {
|
|
43
|
+
export const PaletteProvider = observer(function PaletteProvider({ palette, children, }) {
|
|
42
44
|
const theme = useMemo(() => ({ ...defaultStyleTheme, palette }), [palette]);
|
|
43
45
|
return _jsx(StyleThemeProvider, { theme: theme, children: children });
|
|
44
|
-
}
|
|
46
|
+
});
|
|
45
47
|
export function useStyleTheme() {
|
|
46
48
|
return use(StyleThemeContext) ?? defaultStyleTheme;
|
|
47
49
|
}
|
|
@@ -59,17 +61,28 @@ function subscribeToColorScheme(onChange) {
|
|
|
59
61
|
observer?.disconnect();
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// one that declares both, or neither, gets the OS preference.
|
|
65
|
-
function readColorScheme() {
|
|
66
|
-
const declared = getComputedStyle(document.documentElement)
|
|
67
|
-
.getPropertyValue('color-scheme')
|
|
64
|
+
function schemesNamedIn(value) {
|
|
65
|
+
return value
|
|
68
66
|
.split(/\s+/)
|
|
69
67
|
.filter((word) => ['light', 'dark'].includes(word));
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
}
|
|
69
|
+
// The page's `color-scheme`, as the browser resolves it for form controls and
|
|
70
|
+
// the canvas: a page that names one of light or dark gets that one, a page that
|
|
71
|
+
// names both gets the OS preference, and a page that names neither is light
|
|
72
|
+
// whatever the OS says. The `<meta name="color-scheme">` tag stands in where no
|
|
73
|
+
// stylesheet sets the property, since the computed value does not reflect it.
|
|
74
|
+
function readColorScheme() {
|
|
75
|
+
const computed = schemesNamedIn(getComputedStyle(document.documentElement).getPropertyValue('color-scheme'));
|
|
76
|
+
const declared = new Set(computed.length > 0
|
|
77
|
+
? computed
|
|
78
|
+
: schemesNamedIn(document
|
|
79
|
+
.querySelector('meta[name="color-scheme"]')
|
|
80
|
+
?.getAttribute('content') ?? ''));
|
|
81
|
+
return declared.size === 2
|
|
82
|
+
? prefersDarkColorScheme()
|
|
83
|
+
? 'dark'
|
|
84
|
+
: 'light'
|
|
85
|
+
: declared.has('dark')
|
|
73
86
|
? 'dark'
|
|
74
87
|
: 'light';
|
|
75
88
|
}
|
|
@@ -86,9 +99,11 @@ function useResolvedMode(mode) {
|
|
|
86
99
|
* follow its dark mode mounts {@link SessionPaletteProvider}, which is this
|
|
87
100
|
* hook and the provider in one.
|
|
88
101
|
*
|
|
89
|
-
* Pass no mode and JBrowse follows the page
|
|
90
|
-
*
|
|
91
|
-
*
|
|
102
|
+
* Pass no mode and JBrowse follows the page's CSS `color-scheme`: light or dark
|
|
103
|
+
* where the page names one, the OS preference where it names both, and light
|
|
104
|
+
* where it names neither, so a page with no dark styling never gets a dark
|
|
105
|
+
* JBrowse from a dark OS. A host whose mode lives somewhere a stylesheet cannot
|
|
106
|
+
* see passes it.
|
|
92
107
|
*
|
|
93
108
|
* **Both halves are load-bearing, which is why the pairing is published as a
|
|
94
109
|
* component.** The palette is what *React* draws with; the config `theme` slot
|
|
@@ -122,8 +137,8 @@ export function useSessionPalette(session, mode) {
|
|
|
122
137
|
*
|
|
123
138
|
* `mode` is optional. Left out, JBrowse follows the page's declared
|
|
124
139
|
* `color-scheme` — so a host whose dark-mode toggle sets it, as most do, mounts
|
|
125
|
-
* this with a session and nothing else
|
|
126
|
-
* declares
|
|
140
|
+
* this with a session and nothing else. A page that declares `light dark`
|
|
141
|
+
* follows the OS, and a page that declares nothing stays light.
|
|
127
142
|
*
|
|
128
143
|
* A component rather than a documented pair of calls because the pair has a
|
|
129
144
|
* half that can be left out with nothing to show for it. `PaletteProvider` is
|
|
@@ -136,7 +151,7 @@ export function useSessionPalette(session, mode) {
|
|
|
136
151
|
* The session is the only thing that resolves a palette here, so a host
|
|
137
152
|
* supplying colors of its own mounts `PaletteProvider` directly instead.
|
|
138
153
|
*/
|
|
139
|
-
export function SessionPaletteProvider({ session, mode, children, }) {
|
|
154
|
+
export const SessionPaletteProvider = observer(function SessionPaletteProvider({ session, mode, children, }) {
|
|
140
155
|
const palette = useSessionPalette(session, mode);
|
|
141
156
|
return _jsx(PaletteProvider, { palette: palette, children: children });
|
|
142
|
-
}
|
|
157
|
+
});
|
|
@@ -8,10 +8,11 @@ import type { JBrowsePlugin } from '../util/types/index.ts';
|
|
|
8
8
|
* version-pinned, integrity-carrying, and refused when no published version
|
|
9
9
|
* supports this JBrowse.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
declare const PluginStoreCard: ({ plugin, resolved, installed, disabled, onInstall, }: {
|
|
12
12
|
plugin: JBrowsePlugin;
|
|
13
13
|
resolved: ResolvedPlugin;
|
|
14
14
|
installed: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
onInstall: (definition: PluginDefinition) => void;
|
|
17
|
-
})
|
|
17
|
+
}) => import("react").JSX.Element;
|
|
18
|
+
export default PluginStoreCard;
|
|
@@ -3,6 +3,7 @@ import AddIcon from '@mui/icons-material/Add';
|
|
|
3
3
|
import CheckIcon from '@mui/icons-material/Check';
|
|
4
4
|
import PersonIcon from '@mui/icons-material/Person';
|
|
5
5
|
import { Button, Card, CardActions, CardContent, Chip, Typography, } from '@mui/material';
|
|
6
|
+
import { observer } from 'mobx-react';
|
|
6
7
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
7
8
|
import ExternalLink from './ExternalLink.js';
|
|
8
9
|
const useStyles = makeStyles()({
|
|
@@ -33,7 +34,7 @@ const useStyles = makeStyles()({
|
|
|
33
34
|
* version-pinned, integrity-carrying, and refused when no published version
|
|
34
35
|
* supports this JBrowse.
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
+
const PluginStoreCard = observer(function PluginStoreCard({ plugin, resolved, installed, disabled, onInstall, }) {
|
|
37
38
|
const { classes } = useStyles();
|
|
38
39
|
const { definition, compatible, supportedRanges, pluginVersion } = resolved;
|
|
39
40
|
const installable = compatible && definition !== undefined;
|
|
@@ -42,4 +43,5 @@ export default function PluginStoreCard({ plugin, resolved, installed, disabled,
|
|
|
42
43
|
onInstall(definition);
|
|
43
44
|
}
|
|
44
45
|
}, children: installed ? 'Installed' : 'Install' }) })] }));
|
|
45
|
-
}
|
|
46
|
+
});
|
|
47
|
+
export default PluginStoreCard;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
declare const PopoverPicker: ({ color, onChange, presetAlpha, unset, }: {
|
|
2
2
|
color: string;
|
|
3
3
|
onChange: (color: string) => void;
|
|
4
4
|
presetAlpha?: number;
|
|
5
5
|
unset?: boolean;
|
|
6
|
-
})
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
export default PopoverPicker;
|
package/esm/ui/PopoverPicker.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
4
5
|
import { ColorPopover } from './ColorPicker.js';
|
|
5
6
|
import { swatchStyle } from './colorSwatchStyle.js';
|
|
@@ -13,7 +14,7 @@ const useStyles = makeStyles()({
|
|
|
13
14
|
boxSizing: 'border-box',
|
|
14
15
|
},
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
+
const PopoverPicker = observer(function PopoverPicker({ color, onChange, presetAlpha, unset, }) {
|
|
17
18
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
18
19
|
const { classes, cx } = useStyles();
|
|
19
20
|
const isAuto = color === 'auto';
|
|
@@ -22,4 +23,5 @@ export default function PopoverPicker({ color, onChange, presetAlpha, unset, })
|
|
|
22
23
|
} }), _jsx(ColorPopover, { anchorEl: anchorEl, onClose: () => {
|
|
23
24
|
setAnchorEl(null);
|
|
24
25
|
}, color: isAuto ? 'blue' : color, onChange: onChange, presetAlpha: presetAlpha })] }));
|
|
25
|
-
}
|
|
26
|
+
});
|
|
27
|
+
export default PopoverPicker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const PrerenderedCanvas: (props: {
|
|
2
2
|
width: number;
|
|
3
3
|
height: number;
|
|
4
4
|
highResolutionScaling?: number;
|
|
@@ -6,5 +6,5 @@ declare function PrerenderedCanvas(props: {
|
|
|
6
6
|
imageData?: unknown;
|
|
7
7
|
showSoftClip?: boolean;
|
|
8
8
|
blockKey?: string;
|
|
9
|
-
})
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
10
|
export default PrerenderedCanvas;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
3
4
|
import { drawImageOntoCanvasContext } from '../util/offscreenCanvasPonyfill.js';
|
|
4
|
-
function PrerenderedCanvas(props) {
|
|
5
|
+
const PrerenderedCanvas = observer(function PrerenderedCanvas(props) {
|
|
5
6
|
const { width, height, highResolutionScaling = 1, style = {}, imageData, blockKey, showSoftClip, } = props;
|
|
6
7
|
const [done, setDone] = useState(false);
|
|
7
8
|
const featureCanvasRef = useRef(null);
|
|
@@ -30,5 +31,5 @@ function PrerenderedCanvas(props) {
|
|
|
30
31
|
]
|
|
31
32
|
.filter(f => !!f)
|
|
32
33
|
.join('_'), ref: featureCanvasRef, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
|
|
33
|
-
}
|
|
34
|
+
});
|
|
34
35
|
export default PrerenderedCanvas;
|