@jbrowse/core 5.0.0-beta.8 → 5.0.0-beta.9
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 +427 -130
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +5 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +3 -5
- package/esm/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +8 -9
- package/esm/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +8 -13
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -1
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +3 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.d.ts +8 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FieldActionsButton.js +24 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +3 -2
- package/esm/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +5 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +1 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/index.js +1 -4
- package/esm/BaseFeatureWidget/BaseFeatureDetail/jexlFilterActions.d.ts +16 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/jexlFilterActions.js +53 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +0 -8
- package/esm/BaseFeatureWidget/BaseFeatureDetail/util.js +0 -16
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.js +7 -34
- package/esm/BaseFeatureWidget/configSchema.d.ts +1 -1
- package/esm/BaseFeatureWidget/formatDetails.d.ts +13 -29
- package/esm/BaseFeatureWidget/formatDetails.js +46 -79
- package/esm/BaseFeatureWidget/index.d.ts +1 -0
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +35 -28
- package/esm/BaseFeatureWidget/stateModelFactory.js +94 -102
- package/esm/BaseFeatureWidget/types.d.ts +3 -0
- package/esm/BaseFeatureWidget/util.d.ts +0 -3
- package/esm/BaseFeatureWidget/util.js +0 -17
- package/esm/PluginLoader.d.ts +14 -9
- package/esm/PluginLoader.js +34 -26
- package/esm/PluginManager.d.ts +4 -4
- package/esm/PluginManager.js +1 -1
- package/esm/ReExports/coreModules.generated.d.ts +2 -0
- package/esm/ReExports/coreModules.generated.js +492 -0
- package/esm/ReExports/coreWorkerModules.generated.d.ts +2 -0
- package/esm/ReExports/coreWorkerModules.generated.js +453 -0
- package/esm/ReExports/frameworkModules.d.ts +2 -0
- package/esm/ReExports/frameworkModules.js +67 -0
- package/esm/ReExports/frameworkShared.d.ts +12 -0
- package/esm/ReExports/frameworkShared.js +16 -0
- package/esm/ReExports/frameworkWorkerModules.generated.d.ts +2 -0
- package/esm/ReExports/frameworkWorkerModules.generated.js +130 -0
- package/esm/ReExports/list.js +493 -79
- package/esm/ReExports/modules.d.ts +1 -1
- package/esm/ReExports/modules.js +10 -87
- package/esm/ReExports/registry.d.ts +1 -0
- package/esm/ReExports/registry.js +23 -5
- package/esm/ReExports/uiStub.d.ts +2 -1
- package/esm/ReExports/uiStub.js +24 -2
- package/esm/ReExports/workerModules.js +8 -12
- package/esm/TextSearch/TextSearchManager.d.ts +3 -12
- package/esm/TextSearch/TextSearchManager.js +22 -10
- package/esm/assemblyManager/assembly.d.ts +10 -14
- package/esm/assemblyManager/assembly.js +10 -14
- package/esm/assemblyManager/assemblyConfigSchema.d.ts +23 -81
- package/esm/assemblyManager/assemblyManager.d.ts +10 -16
- package/esm/assemblyManager/assemblyManager.js +7 -10
- package/esm/assemblyManager/loadRefNameMap.js +3 -3
- package/esm/configuration/configurationSchema.d.ts +75 -31
- package/esm/configuration/configurationSchema.js +74 -40
- package/esm/configuration/configurationSchemaUnion.d.ts +39 -0
- package/esm/configuration/configurationSchemaUnion.js +59 -0
- package/esm/configuration/configurationSlot.d.ts +37 -12
- package/esm/configuration/configurationSlot.js +83 -22
- package/esm/configuration/formatAboutConfigSchema.d.ts +7 -21
- package/esm/configuration/formatDetailsConfigSchema.d.ts +11 -37
- package/esm/configuration/formatDetailsConfigSchema.js +10 -13
- package/esm/configuration/getConf.d.ts +17 -9
- package/esm/configuration/getConf.js +52 -7
- package/esm/configuration/index.d.ts +11 -4
- package/esm/configuration/index.js +7 -4
- package/esm/configuration/mergeFormatCallbacks.d.ts +6 -7
- package/esm/configuration/mergeFormatCallbacks.js +13 -10
- package/esm/configuration/readConfObject.d.ts +2 -22
- package/esm/configuration/readConfObject.js +15 -49
- package/esm/configuration/requirements.d.ts +37 -0
- package/esm/configuration/requirements.js +88 -0
- package/esm/configuration/schemaRegistry.d.ts +21 -1
- package/esm/configuration/schemaRegistry.js +11 -0
- package/esm/configuration/schemaTypes.d.ts +3 -0
- package/esm/configuration/schemaTypes.js +10 -0
- package/esm/configuration/slotFacade.d.ts +35 -4
- package/esm/configuration/slotFacade.js +96 -9
- package/esm/configuration/snapshotPreprocess.d.ts +27 -0
- package/esm/configuration/snapshotPreprocess.js +102 -0
- package/esm/configuration/types.d.ts +161 -22
- package/esm/data_adapters/BaseAdapter/BaseAdapter.d.ts +2 -2
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +11 -2
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +12 -1
- package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +2 -3
- package/esm/data_adapters/BaseAdapter/featureDensity.js +2 -3
- package/esm/data_adapters/BaseAdapter/index.d.ts +22 -3
- package/esm/data_adapters/BaseAdapter/types.d.ts +3 -4
- package/esm/data_adapters/BaseAdapter/zoomRange.d.ts +10 -0
- package/esm/data_adapters/BaseAdapter/zoomRange.js +1 -0
- package/esm/data_adapters/CytobandAdapter/configSchema.d.ts +9 -11
- package/esm/data_adapters/getSequenceSubAdapter.d.ts +1 -3
- package/esm/data_adapters/getSequenceSubAdapter.js +1 -3
- package/esm/pluggableElementTypes/AdapterType.d.ts +7 -7
- package/esm/pluggableElementTypes/RpcMethodType.d.ts +1 -1
- package/esm/pluggableElementTypes/RpcMethodType.js +3 -8
- package/esm/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +1 -2
- package/esm/pluggableElementTypes/TextSearchAdapterType.d.ts +7 -7
- package/esm/pluggableElementTypes/index.d.ts +1 -1
- package/esm/pluggableElementTypes/index.js +1 -1
- package/esm/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +17 -7
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +45 -48
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +40 -36
- package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +10 -13
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +6 -6
- package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +37 -17
- package/esm/pluggableElementTypes/models/BaseViewModel.js +25 -10
- package/esm/pluggableElementTypes/models/InternetAccountModel.d.ts +26 -16
- package/esm/pluggableElementTypes/models/assertDisplayContract.d.ts +1 -1
- package/esm/pluggableElementTypes/models/baseConnectionConfig.d.ts +22 -18
- package/esm/pluggableElementTypes/models/baseConnectionConfig.js +5 -5
- package/esm/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +26 -31
- package/esm/pluggableElementTypes/models/baseTrackConfig.d.ts +57 -141
- package/esm/pluggableElementTypes/models/baseTrackConfig.js +22 -26
- package/esm/pluggableElementTypes/models/components/SaveTrackData.js +2 -2
- package/esm/pluggableElementTypes/models/components/fetchTrackData.d.ts +3 -4
- package/esm/pluggableElementTypes/models/components/fetchTrackData.js +3 -3
- package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.d.ts +15 -7
- package/esm/pluggableElementTypes/models/expandTrackConfigShorthand.js +38 -29
- package/esm/pluggableElementTypes/models/index.d.ts +1 -2
- package/esm/pluggableElementTypes/models/index.js +1 -2
- package/esm/pluggableElementTypes/models/saveTrackFileTypes/genbank.d.ts +3 -3
- package/esm/pluggableElementTypes/models/saveTrackFileTypes/genbank.js +4 -4
- package/esm/pluggableElementTypes/models/saveTrackFileTypes/types.d.ts +3 -3
- package/esm/rpc/BaseRpcDriver.d.ts +1 -2
- package/esm/rpc/BaseRpcDriver.js +23 -30
- package/esm/rpc/MainThreadRpcDriver.d.ts +2 -2
- package/esm/rpc/MainThreadRpcDriver.js +13 -8
- package/esm/rpc/RpcClient.d.ts +17 -6
- package/esm/rpc/RpcClient.js +42 -12
- package/esm/rpc/RpcManager.d.ts +8 -10
- package/esm/rpc/RpcManager.js +1 -1
- package/esm/rpc/RpcRegistry.d.ts +8 -2
- package/esm/rpc/RpcServer.d.ts +3 -1
- package/esm/rpc/RpcServer.js +19 -12
- package/esm/rpc/WebWorkerRpcDriver.d.ts +3 -3
- package/esm/rpc/WebWorkerRpcDriver.js +9 -47
- package/esm/rpc/byteBudget.d.ts +3 -5
- package/esm/rpc/byteBudget.js +4 -4
- package/esm/rpc/configSchema.d.ts +7 -21
- package/esm/rpc/coreRpcMethods.d.ts +1 -0
- package/esm/rpc/coreRpcMethods.js +1 -0
- package/esm/rpc/methods/CoreEncodeFeatures.d.ts +6 -5
- package/esm/rpc/methods/CoreEncodeFeatures.js +26 -31
- package/esm/rpc/methods/CoreGetEncodedFeature.d.ts +13 -0
- package/esm/rpc/methods/CoreGetEncodedFeature.js +31 -0
- package/esm/rpc/methods/CoreGetExportData.js +2 -2
- package/esm/rpc/methods/CoreGetFeatureDensity.js +2 -2
- package/esm/rpc/methods/CoreGetFeatures.js +2 -2
- package/esm/rpc/methods/CoreGetSequence.js +2 -2
- package/esm/rpc/methods/layerFeatures.d.ts +26 -0
- package/esm/rpc/methods/layerFeatures.js +40 -0
- package/esm/svg/SvgExport.js +3 -4
- package/esm/svg/SvgThemeProviders.d.ts +12 -0
- package/esm/svg/SvgThemeProviders.js +15 -0
- package/esm/svg/exportViewSvg.d.ts +32 -0
- package/esm/svg/exportViewSvg.js +13 -0
- package/esm/svg/normalizeSvgMarkup.d.ts +7 -0
- package/esm/svg/normalizeSvgMarkup.js +99 -0
- package/esm/svg/serializeSvg.d.ts +7 -0
- package/esm/svg/serializeSvg.js +11 -0
- package/esm/svg/svgReady.d.ts +8 -7
- package/esm/svg/svgReady.js +8 -7
- package/esm/svg/trackNames.d.ts +5 -5
- package/esm/svg/trackNames.js +6 -6
- package/esm/svg/wrapSvgExport.js +6 -74
- package/esm/ui/CascadingMenu.js +83 -86
- package/esm/ui/ErrorMessageStackTraceDialog.js +0 -5
- package/esm/ui/FileSelector/useInternetAccounts.d.ts +156 -96
- package/esm/ui/HoverMenu.d.ts +1 -2
- package/esm/ui/HoverMenu.js +6 -3
- package/esm/ui/JexlFilterDialog.d.ts +13 -10
- package/esm/ui/JexlFilterDialog.js +122 -49
- package/esm/ui/JexlFilterRowEditors.d.ts +15 -0
- package/esm/ui/JexlFilterRowEditors.js +90 -0
- package/esm/ui/LazyBaseTooltip.d.ts +4 -0
- package/esm/ui/LazyBaseTooltip.js +9 -0
- package/esm/ui/LoadingOverlay.js +3 -1
- package/esm/ui/MonospaceTextField.d.ts +2 -1
- package/esm/ui/MonospaceTextField.js +21 -19
- package/esm/ui/PaletteContext.d.ts +7 -9
- package/esm/ui/PaletteContext.js +24 -10
- package/esm/ui/RefNameAutocomplete/index.d.ts +1 -2
- package/esm/ui/RefNameAutocomplete/index.js +1 -1
- package/esm/ui/ScrollChrome.d.ts +6 -9
- package/esm/ui/ScrollChrome.js +5 -6
- package/esm/ui/ScrollEdgeShadow.d.ts +6 -9
- package/esm/ui/ScrollEdgeShadow.js +9 -24
- package/esm/ui/SettingsChangesTable.js +3 -3
- package/esm/ui/VerticalScrollbar.d.ts +13 -34
- package/esm/ui/VerticalScrollbar.js +29 -83
- package/esm/ui/ViewLoadingScreen.d.ts +2 -2
- package/esm/ui/ViewLoadingScreen.js +3 -3
- package/esm/ui/colorScale.d.ts +26 -1
- package/esm/ui/colorScale.js +28 -5
- package/esm/ui/colors.d.ts +49 -1
- package/esm/ui/colors.js +139 -4
- package/esm/ui/hoverBoxStyle.d.ts +14 -2
- package/esm/ui/hoverBoxStyle.js +17 -2
- package/esm/ui/index.d.ts +5 -3
- package/esm/ui/index.js +9 -7
- package/esm/ui/launchViewMenu.js +3 -3
- package/esm/ui/legendSpec.d.ts +2 -0
- package/esm/ui/legendSpec.js +3 -0
- package/esm/ui/palette.d.ts +0 -1
- package/esm/ui/palette.js +3 -27
- package/esm/ui/replaceViewAction.d.ts +1 -1
- package/esm/ui/replaceViewAction.js +1 -1
- package/esm/ui/theme.d.ts +1 -1
- package/esm/ui/theme.js +6 -40
- package/esm/ui/viewHeaderHeight.d.ts +1 -0
- package/esm/ui/viewHeaderHeight.js +1 -0
- package/esm/util/Base1DUtils.d.ts +1 -1
- package/esm/util/Base1DUtils.js +2 -2
- package/esm/util/SvgCanvas.d.ts +15 -13
- package/esm/util/SvgCanvas.js +72 -53
- package/esm/util/aborting.d.ts +39 -0
- package/esm/util/aborting.js +84 -0
- package/esm/util/adapterMetadata.d.ts +1 -1
- package/esm/util/adapterMetadata.js +6 -6
- package/esm/util/addAndShowTrack.d.ts +1 -4
- package/esm/util/addRelativeUris.d.ts +10 -2
- package/esm/util/addRelativeUris.js +22 -7
- package/esm/util/addTrackFromWidget.d.ts +2 -5
- package/esm/util/animationAllowed.d.ts +9 -0
- package/esm/util/animationAllowed.js +13 -0
- package/esm/util/applyRowResizeWheel.d.ts +10 -5
- package/esm/util/applyRowResizeWheel.js +10 -21
- package/esm/util/bandLayout.d.ts +4 -4
- package/esm/util/bandLayout.js +4 -4
- package/esm/util/bezierConnector.js +5 -4
- package/esm/util/bgzfWorkerPool.d.ts +20 -74
- package/esm/util/bgzfWorkerPool.js +20 -74
- package/esm/util/cachedSetup.d.ts +1 -1
- package/esm/util/cachedSetup.js +2 -2
- package/esm/util/categoricalField.d.ts +37 -0
- package/esm/util/categoricalField.js +52 -0
- package/esm/util/color/cssColorsLevel4.d.ts +1 -0
- package/esm/util/color/cssColorsLevel4.js +1 -0
- package/esm/util/color/index.d.ts +5 -3
- package/esm/util/color/index.js +7 -4
- package/esm/util/colorBits.d.ts +1 -2
- package/esm/util/colorBits.js +17 -39
- package/esm/util/colorRamp.d.ts +27 -1
- package/esm/util/colorRamp.js +56 -2
- package/esm/util/colorSchemes.d.ts +9 -0
- package/esm/util/colorSchemes.js +7 -0
- package/esm/util/{createStopTokenRotation.d.ts → createAbortRotation.d.ts} +11 -14
- package/esm/util/{createStopTokenRotation.js → createAbortRotation.js} +14 -26
- package/esm/util/cssColorParse.d.ts +15 -0
- package/esm/util/cssColorParse.js +53 -0
- package/esm/util/diagonalizeRegions.d.ts +2 -3
- package/esm/util/diagonalizeRegions.js +7 -12
- package/esm/util/expandLooseSearchIndex.d.ts +7 -0
- package/esm/util/expandLooseSearchIndex.js +25 -0
- package/esm/util/featureTransforms.d.ts +30 -3
- package/esm/util/featureTransforms.js +233 -36
- package/esm/util/fetchAndMaybeUnzip.js +5 -6
- package/esm/util/fetchContext.d.ts +5 -6
- package/esm/util/fetchContext.js +1 -1
- package/esm/util/fetchHub.d.ts +3 -1
- package/esm/util/fetchHub.js +2 -2
- package/esm/util/fetchSeq.d.ts +2 -3
- package/esm/util/fetchSeq.js +2 -2
- package/esm/util/fieldReader.d.ts +17 -0
- package/esm/util/fieldReader.js +62 -0
- package/esm/util/groupKeys.d.ts +75 -0
- package/esm/util/groupKeys.js +152 -0
- package/esm/util/highlights.d.ts +6 -4
- package/esm/util/highlights.js +12 -25
- package/esm/util/hooks.d.ts +1 -2
- package/esm/util/hooks.js +1 -2
- package/esm/util/index.d.ts +3 -3
- package/esm/util/index.js +4 -3
- package/esm/util/indexCandidates.js +1 -1
- package/esm/util/installFetch.d.ts +13 -10
- package/esm/util/installFetch.js +11 -10
- package/esm/util/installPrerequisiteFetch.d.ts +5 -3
- package/esm/util/installPrerequisiteFetch.js +3 -4
- package/esm/util/io/index.js +12 -12
- package/esm/util/isDataCurrent.d.ts +7 -5
- package/esm/util/isDataCurrent.js +9 -6
- package/esm/util/jexl.js +24 -21
- package/esm/util/jexlFilterRows.d.ts +89 -0
- package/esm/util/jexlFilterRows.js +252 -0
- package/esm/util/jexlFilters.d.ts +7 -5
- package/esm/util/jexlStrings.d.ts +3 -4
- package/esm/util/jexlStrings.js +2 -3
- package/esm/util/legendCandidates.d.ts +31 -27
- package/esm/util/legendCandidates.js +79 -53
- package/esm/util/localStorage.js +4 -4
- package/esm/util/markEncoding.d.ts +32 -16
- package/esm/util/markEncoding.js +177 -150
- package/esm/util/markEncodingTypes.d.ts +137 -66
- package/esm/util/mstUtils.d.ts +19 -22
- package/esm/util/mstUtils.js +19 -22
- package/esm/util/numericUtils.d.ts +7 -0
- package/esm/util/numericUtils.js +16 -0
- package/esm/util/numericValue.d.ts +14 -0
- package/esm/util/numericValue.js +34 -0
- package/esm/util/openFeatureWidget.js +1 -2
- package/esm/util/openViews.d.ts +1 -0
- package/esm/util/openViews.js +3 -3
- package/esm/util/parseLineByLine.d.ts +3 -4
- package/esm/util/parseLineByLine.js +7 -13
- package/esm/util/progress.d.ts +21 -21
- package/esm/util/progress.js +27 -26
- package/esm/util/renameRegions.d.ts +1 -2
- package/esm/util/renderToStaticMarkup.js +16 -16
- package/esm/util/rxjs.d.ts +7 -8
- package/esm/util/rxjs.js +12 -15
- package/esm/util/simpleFeature.d.ts +0 -1
- package/esm/util/svgColorProps.d.ts +11 -0
- package/esm/util/svgColorProps.js +28 -1
- package/esm/util/tabix.d.ts +3 -4
- package/esm/util/tabix.js +6 -7
- package/esm/util/thresholdScale.d.ts +54 -0
- package/esm/util/thresholdScale.js +112 -0
- package/esm/util/timeGate.d.ts +4 -5
- package/esm/util/timeGate.js +4 -5
- package/esm/util/trackConfigDelta.d.ts +22 -18
- package/esm/util/trackConfigDelta.js +40 -38
- package/esm/util/tracks.d.ts +27 -4
- package/esm/util/tracks.js +116 -43
- package/esm/util/translateTranscript.d.ts +44 -0
- package/esm/util/translateTranscript.js +102 -0
- package/esm/util/types/index.d.ts +19 -7
- package/esm/util/types/services.d.ts +1 -1
- package/esm/util/unknownSnapshotKeys.d.ts +15 -0
- package/esm/util/unknownSnapshotKeys.js +13 -0
- package/esm/util/useFeatureSequence.js +4 -4
- package/esm/util/useFetch.d.ts +3 -4
- package/esm/util/useFetch.js +5 -6
- package/esm/util/usePanelVirtualScroll.d.ts +7 -39
- package/esm/util/usePanelVirtualScroll.js +9 -40
- package/esm/util/useRowVirtualScroll.d.ts +6 -29
- package/esm/util/useRowVirtualScroll.js +8 -49
- package/esm/util/useVirtualScrollWheel.d.ts +20 -4
- package/esm/util/useVirtualScrollWheel.js +40 -84
- package/esm/util/viewHighlights.d.ts +3 -0
- package/esm/util/viewHighlights.js +5 -0
- package/esm/util/viewStatus.d.ts +24 -15
- package/esm/util/viewStatus.js +17 -0
- package/esm/util/withLaunchInput.d.ts +1 -1
- package/esm/util/withLaunchInput.js +0 -4
- package/package.json +26 -12
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.d.ts +0 -80
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.js +0 -583
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.d.ts +0 -141
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.js +0 -1116
- package/esm/ReExports/BaseFeatureDetails.d.ts +0 -1
- package/esm/ReExports/BaseFeatureDetails.js +0 -10
- package/esm/ReExports/barrelOnlyNames.d.ts +0 -5
- package/esm/ReExports/barrelOnlyNames.js +0 -63
- package/esm/ReExports/index.d.ts +0 -1
- package/esm/ReExports/index.js +0 -1
- package/esm/ReExports/publicTracks.d.ts +0 -1
- package/esm/ReExports/publicTracks.js +0 -14
- package/esm/ReExports/publicUi.d.ts +0 -4
- package/esm/ReExports/publicUi.js +0 -33
- package/esm/ReExports/publicUtil.d.ts +0 -1
- package/esm/ReExports/publicUtil.js +0 -32
- package/esm/ReExports/sharedModules.d.ts +0 -96
- package/esm/ReExports/sharedModules.js +0 -66
- package/esm/ReExports/workerNamespaceNames.d.ts +0 -11
- package/esm/ReExports/workerNamespaceNames.js +0 -275
- package/esm/pluggableElementTypes/models/HighlightsMixin.d.ts +0 -51
- package/esm/pluggableElementTypes/models/HighlightsMixin.js +0 -78
- package/esm/ui/highlightChipReveal.d.ts +0 -32
- package/esm/ui/highlightChipReveal.js +0 -39
- package/esm/util/adapterConfigKey.d.ts +0 -12
- package/esm/util/adapterConfigKey.js +0 -14
- package/esm/util/stopToken.d.ts +0 -212
- package/esm/util/stopToken.js +0 -438
package/esm/ui/CascadingMenu.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, use, useEffect,
|
|
2
|
+
import { createContext, memo, use, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { Divider, ListItemIcon, ListItemText, ListSubheader, Menu, MenuItem, Tooltip, } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
5
|
import { makeStyles } from '../util/tss-react/index.js';
|
|
6
|
-
import { useEventCallback } from '../util/useEventCallback.js';
|
|
7
6
|
import HoverMenu from './HoverMenu.js';
|
|
8
7
|
import { MenuItemTrailing } from './MenuItemTrailing.js';
|
|
9
8
|
import { resolveSubMenu, staysOpenOnClick } from './MenuTypes.js';
|
|
@@ -65,36 +64,35 @@ function useCascadingMenu() {
|
|
|
65
64
|
*/
|
|
66
65
|
const submenuAimGraceMs = 120;
|
|
67
66
|
/**
|
|
68
|
-
*
|
|
67
|
+
* The hover intent that moves which submenu of ONE list is open.
|
|
69
68
|
*
|
|
70
69
|
* A click or ArrowRight says where the pointer meant to go and acts at once. A
|
|
71
70
|
* hover is read against {@link isAimedAtPanel}: outside the cone it acts at
|
|
72
71
|
* once too, and inside it defers, because the rows between a submenu row and
|
|
73
72
|
* its panel are exactly the ones a pointer on its way there has to cross.
|
|
73
|
+
*
|
|
74
|
+
* Built once per list, so every row gets the same handlers and a row whose
|
|
75
|
+
* open state didn't change skips the re-render a hover triggers.
|
|
74
76
|
*/
|
|
75
|
-
function
|
|
76
|
-
|
|
77
|
+
function createSubmenuHover(setOpenSubmenu) {
|
|
78
|
+
let openKey;
|
|
77
79
|
// the open panel's paper, so the cone has a real edge to open onto. Written
|
|
78
80
|
// by whichever CascadingSubmenu is open and cleared as it closes, so at most
|
|
79
81
|
// one submenu of this list ever owns it
|
|
80
|
-
const panelRef =
|
|
82
|
+
const panelRef = { current: null };
|
|
81
83
|
// where the pointer was when the open panel opened — the cone's tip
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
let apex;
|
|
85
|
+
let pending;
|
|
84
86
|
const cancelPending = () => {
|
|
85
|
-
if (pending
|
|
86
|
-
clearTimeout(pending.
|
|
87
|
-
pending
|
|
87
|
+
if (pending) {
|
|
88
|
+
clearTimeout(pending.timer);
|
|
89
|
+
pending = undefined;
|
|
88
90
|
}
|
|
89
91
|
};
|
|
90
|
-
useEffect(() => () => {
|
|
91
|
-
if (pending.current) {
|
|
92
|
-
clearTimeout(pending.current.timer);
|
|
93
|
-
}
|
|
94
|
-
}, []);
|
|
95
92
|
const commit = (key, point) => {
|
|
96
93
|
cancelPending();
|
|
97
|
-
apex
|
|
94
|
+
apex = key === undefined ? undefined : point;
|
|
95
|
+
openKey = key;
|
|
98
96
|
setOpenSubmenu(key);
|
|
99
97
|
};
|
|
100
98
|
// 'unmeasured' is its own answer, not a lenient 'inside': a cone pointing at
|
|
@@ -103,19 +101,18 @@ function useSubmenuHover() {
|
|
|
103
101
|
// moving anywhere at all
|
|
104
102
|
const aimAt = (point) => {
|
|
105
103
|
const panel = panelRef.current;
|
|
106
|
-
|
|
107
|
-
if (!panel || !tip) {
|
|
104
|
+
if (!panel || !apex) {
|
|
108
105
|
return 'unmeasured';
|
|
109
106
|
}
|
|
110
107
|
const rect = panel.getBoundingClientRect();
|
|
111
108
|
if (rect.width === 0 && rect.height === 0) {
|
|
112
109
|
return 'unmeasured';
|
|
113
110
|
}
|
|
114
|
-
return isAimedAtPanel(point,
|
|
111
|
+
return isAimedAtPanel(point, apex, rect) ? 'inside' : 'outside';
|
|
115
112
|
};
|
|
116
113
|
const defer = (key, point) => {
|
|
117
114
|
cancelPending();
|
|
118
|
-
pending
|
|
115
|
+
pending = {
|
|
119
116
|
key,
|
|
120
117
|
point,
|
|
121
118
|
timer: setTimeout(() => {
|
|
@@ -123,57 +120,67 @@ function useSubmenuHover() {
|
|
|
123
120
|
}, submenuAimGraceMs),
|
|
124
121
|
};
|
|
125
122
|
};
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const deferred = pending.current;
|
|
132
|
-
if (!deferred) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const aim = aimAt({ x: event.clientX, y: event.clientY });
|
|
136
|
-
if (aim === 'outside') {
|
|
137
|
-
commit(deferred.key, deferred.point);
|
|
123
|
+
// the pointer arrived at a row wanting `key` open — undefined from a row with
|
|
124
|
+
// no submenu, i.e. "close whatever is"
|
|
125
|
+
const hoverSubmenu = (key, point) => {
|
|
126
|
+
if (key === openKey) {
|
|
127
|
+
cancelPending();
|
|
138
128
|
}
|
|
139
|
-
else if (
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
|
|
129
|
+
else if (openKey === undefined || aimAt(point) === 'outside') {
|
|
130
|
+
// nothing to protect, or a pointer that was never heading for the open
|
|
131
|
+
// panel: either way there is nothing to wait for
|
|
132
|
+
commit(key, point);
|
|
143
133
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (openSubmenu === undefined) {
|
|
147
|
-
return;
|
|
134
|
+
else {
|
|
135
|
+
defer(key, point);
|
|
148
136
|
}
|
|
149
|
-
|
|
150
|
-
return () => {
|
|
151
|
-
document.removeEventListener('mousemove', onPointerMove);
|
|
152
|
-
};
|
|
153
|
-
}, [openSubmenu, onPointerMove]);
|
|
137
|
+
};
|
|
154
138
|
return {
|
|
155
|
-
openSubmenu,
|
|
156
139
|
panelRef,
|
|
157
140
|
setSubmenu: commit,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
141
|
+
cancelPending,
|
|
142
|
+
hoverSubmenu,
|
|
143
|
+
// every row a pointer can rest on asks for the open panel to go away; only
|
|
144
|
+
// a row that owns a submenu, or the panel itself, keeps one up
|
|
145
|
+
closeOnHover: (event) => {
|
|
146
|
+
hoverSubmenu(undefined, { x: event.clientX, y: event.clientY });
|
|
147
|
+
},
|
|
148
|
+
// Watched only while a panel is up, and only a deferred change is waiting
|
|
149
|
+
// on it. A row's own hover cannot answer this alone: the pointer can leave
|
|
150
|
+
// the cone without ever crossing into another row, by turning around inside
|
|
151
|
+
// the one it is already on.
|
|
152
|
+
onPointerMove: (event) => {
|
|
153
|
+
const deferred = pending;
|
|
154
|
+
if (!deferred) {
|
|
155
|
+
return;
|
|
165
156
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
commit(key, point);
|
|
157
|
+
const aim = aimAt({ x: event.clientX, y: event.clientY });
|
|
158
|
+
if (aim === 'outside') {
|
|
159
|
+
commit(deferred.key, deferred.point);
|
|
170
160
|
}
|
|
171
|
-
else {
|
|
172
|
-
|
|
161
|
+
else if (aim === 'inside') {
|
|
162
|
+
// still traveling, so the grace starts over — it is there to catch a
|
|
163
|
+
// pointer that stops, and this one has not
|
|
164
|
+
defer(deferred.key, deferred.point);
|
|
173
165
|
}
|
|
174
166
|
},
|
|
175
167
|
};
|
|
176
168
|
}
|
|
169
|
+
function useSubmenuHover() {
|
|
170
|
+
const [openSubmenu, setOpenSubmenu] = useState();
|
|
171
|
+
const [hover] = useState(() => createSubmenuHover(setOpenSubmenu));
|
|
172
|
+
useEffect(() => hover.cancelPending, [hover]);
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
if (openSubmenu === undefined) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
document.addEventListener('mousemove', hover.onPointerMove);
|
|
178
|
+
return () => {
|
|
179
|
+
document.removeEventListener('mousemove', hover.onPointerMove);
|
|
180
|
+
};
|
|
181
|
+
}, [openSubmenu, hover]);
|
|
182
|
+
return { openSubmenu, hover };
|
|
183
|
+
}
|
|
177
184
|
// Identity of a submenu row, used both as its React key and to remember which
|
|
178
185
|
// submenu is open. Deliberately not the array index: the items are re-derived on
|
|
179
186
|
// every observable change (a checkbox toggle can add or drop a row above), so an
|
|
@@ -286,12 +293,12 @@ function DisabledTooltip({ item, children, }) {
|
|
|
286
293
|
// toggle), whose content stops its own click so using it doesn't also open the
|
|
287
294
|
// submenu. Both go through `MenuItemTrailing`, so they land in the columns the
|
|
288
295
|
// clickable rows reserve rather than in a hand-assembled copy of them.
|
|
289
|
-
function CascadingSubmenu({ item, itemKey, inset, columns, hover, onNavigateBack, }) {
|
|
296
|
+
const CascadingSubmenu = memo(function CascadingSubmenu({ item, itemKey, inset, columns, open, hover, onNavigateBack, }) {
|
|
290
297
|
const { zIndex } = useCascadingMenu();
|
|
291
298
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
292
299
|
// a rebuild can disable the row while its panel is up, and a disabled row has
|
|
293
300
|
// no way left to close it
|
|
294
|
-
const isOpen =
|
|
301
|
+
const isOpen = open && !item.disabled;
|
|
295
302
|
return (_jsxs(_Fragment, { children: [_jsx(DisabledTooltip, { item: item, children: _jsxs(MenuItem, { ref: setAnchorEl, "data-testid": makeTestId('submenu', item.label), disabled: item.disabled, "aria-haspopup": "menu", "aria-expanded": isOpen,
|
|
296
303
|
// keeps the panel visually attached to the row it hangs off: that
|
|
297
304
|
// row's own hover highlight is gone the moment the pointer moves
|
|
@@ -309,21 +316,17 @@ function CascadingSubmenu({ item, itemKey, inset, columns, hover, onNavigateBack
|
|
|
309
316
|
e.stopPropagation();
|
|
310
317
|
onNavigateBack?.();
|
|
311
318
|
}
|
|
312
|
-
}, children: [_jsx(MenuItemLeadingIcon, { Icon: item.icon }), _jsx(ListItemText, { primary: item.label, inset: inset }), _jsx(MenuItemTrailing, { item: item, columns: columns })] }) }), _jsx(HoverMenu, {
|
|
313
|
-
// the pointer completed the trip, so drop the close a row it crossed
|
|
314
|
-
// the way scheduled
|
|
315
|
-
onMouseEnter: hover.
|
|
316
|
-
// only while open: a panel MUI is still fading out is not something to
|
|
317
|
-
// aim at, and this list keeps one cone target for whichever submenu is
|
|
318
|
-
// up
|
|
319
|
-
paperRef: isOpen ? hover.panelRef : undefined, onClose: () => {
|
|
319
|
+
}, children: [_jsx(MenuItemLeadingIcon, { Icon: item.icon }), _jsx(ListItemText, { primary: item.label, inset: inset }), _jsx(MenuItemTrailing, { item: item, columns: columns })] }) }), isOpen ? (_jsx(HoverMenu, { anchorEl: anchorEl, anchorOrigin: { vertical: 'top', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'left' }, zIndex: zIndex,
|
|
320
|
+
// the pointer completed the trip, so drop the close a row it crossed
|
|
321
|
+
// on the way scheduled
|
|
322
|
+
onMouseEnter: hover.cancelPending, paperRef: hover.panelRef, onClose: () => {
|
|
320
323
|
hover.setSubmenu(undefined);
|
|
321
324
|
}, children: _jsx(SubMenuList, { item: item, onNavigateBack: () => {
|
|
322
325
|
hover.setSubmenu(undefined);
|
|
323
326
|
anchorEl?.focus();
|
|
324
|
-
} }) })] }));
|
|
325
|
-
}
|
|
326
|
-
// Resolves the rows inside the panel, which
|
|
327
|
+
} }) })) : null] }));
|
|
328
|
+
});
|
|
329
|
+
// Resolves the rows inside the panel, which mounts only while it is open:
|
|
327
330
|
// a function-form `subMenu` is not called by listing the parent menu. An
|
|
328
331
|
// observer so the observables that builder reads re-render the open panel, the
|
|
329
332
|
// way an array built in the root observer's render already did.
|
|
@@ -333,7 +336,7 @@ const SubMenuList = observer(function SubMenuList({ item, onNavigateBack, }) {
|
|
|
333
336
|
// One clickable menu row: label (with optional leading icon) plus its trailing
|
|
334
337
|
// value/help/adornment decorations. The menu-wide `columns` flags let every row
|
|
335
338
|
// reserve matching decoration slots so the columns line up down the menu.
|
|
336
|
-
function CascadingMenuItem({ item, inset, columns, onNavigateBack, onHover, }) {
|
|
339
|
+
const CascadingMenuItem = memo(function CascadingMenuItem({ item, inset, columns, onNavigateBack, onHover, }) {
|
|
337
340
|
const { closeAfterItemClick, onMenuItemClick, onCloseRoot } = useCascadingMenu();
|
|
338
341
|
return (_jsx(DisabledTooltip, { item: item, children: _jsxs(MenuItem, { "data-testid": makeTestId('menuitem', item.label), disabled: item.disabled,
|
|
339
342
|
// A checkbox or radio row states its own value. The glyph
|
|
@@ -362,23 +365,17 @@ function CascadingMenuItem({ item, inset, columns, onNavigateBack, onHover, }) {
|
|
|
362
365
|
onNavigateBack?.();
|
|
363
366
|
}
|
|
364
367
|
}, children: [_jsx(MenuItemLeadingIcon, { Icon: item.icon }), _jsx(ListItemText, { primary: item.label, secondary: item.subLabel, inset: inset }), _jsx(MenuItemTrailing, { item: item, columns: columns })] }) }));
|
|
365
|
-
}
|
|
368
|
+
});
|
|
366
369
|
function CascadingMenuList({ menuItems, onNavigateBack, }) {
|
|
367
370
|
const { classes, cx } = useStyles();
|
|
368
|
-
const hover = useSubmenuHover();
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
// pointer comes with it
|
|
373
|
-
const closeOnHover = (event) => {
|
|
374
|
-
hover.hoverSubmenu(undefined, { x: event.clientX, y: event.clientY });
|
|
375
|
-
};
|
|
376
|
-
const { hasIcon, columns } = getMenuColumnFlags(menuItems);
|
|
377
|
-
const sortedItems = menuItems.toSorted((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
371
|
+
const { openSubmenu, hover } = useSubmenuHover();
|
|
372
|
+
const { closeOnHover } = hover;
|
|
373
|
+
const { hasIcon, columns } = useMemo(() => getMenuColumnFlags(menuItems), [menuItems]);
|
|
374
|
+
const sortedItems = useMemo(() => menuItems.toSorted((a, b) => (b.priority ?? 0) - (a.priority ?? 0)), [menuItems]);
|
|
378
375
|
return (_jsx(_Fragment, { children: sortedItems.map((item, idx) => {
|
|
379
376
|
if ('subMenu' in item) {
|
|
380
377
|
const key = submenuKey(item.label);
|
|
381
|
-
return (_jsx(CascadingSubmenu, { itemKey: key, item: item, inset: hasIcon && !item.icon, columns: columns, hover: hover, onNavigateBack: onNavigateBack }, key));
|
|
378
|
+
return (_jsx(CascadingSubmenu, { itemKey: key, item: item, inset: hasIcon && !item.icon, columns: columns, open: openSubmenu === key, hover: hover, onNavigateBack: onNavigateBack }, key));
|
|
382
379
|
}
|
|
383
380
|
if (item.type === 'divider') {
|
|
384
381
|
// eslint-disable-next-line @eslint-react/no-array-index-key -- dividers have no identifying field, list order is fixed
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { effectiveRenderer } from '@jbrowse/render-core/graphicsCapabilities';
|
|
3
3
|
import { useGraphicsCapabilities } from '@jbrowse/render-core/useGraphicsCapabilities';
|
|
4
|
-
import { hasSharedArrayBuffer } from '../util/stopToken.js';
|
|
5
4
|
import { useFetch } from '../util/useFetch.js';
|
|
6
5
|
import CopyToClipboardButton from './CopyToClipboardButton.js';
|
|
7
6
|
import ErrorMessageStackTraceContents from './ErrorMessageStackTraceContents.js';
|
|
@@ -33,9 +32,6 @@ export default function ErrorMessageStackTraceDialog({ error, onClose, extra, })
|
|
|
33
32
|
const glRendererInfo = graphicsCapabilities?.glRenderer
|
|
34
33
|
? `GL renderer: ${graphicsCapabilities.glRenderer}${graphicsCapabilities.softwareWebgl ? ' (SOFTWARE RASTERIZER)' : ''}`
|
|
35
34
|
: '';
|
|
36
|
-
// Both paths cancel at await boundaries by posted message; SharedArrayBuffer
|
|
37
|
-
// additionally interrupts a synchronous worker loop mid-run.
|
|
38
|
-
const sabInfo = `Worker abort: postMessage${hasSharedArrayBuffer ? ' + SharedArrayBuffer' : ''}`;
|
|
39
35
|
const session = window
|
|
40
36
|
.JBrowseSession;
|
|
41
37
|
const version = session?.version;
|
|
@@ -52,7 +48,6 @@ export default function ErrorMessageStackTraceDialog({ error, onClose, extra, })
|
|
|
52
48
|
gpuInfo,
|
|
53
49
|
glRendererInfo,
|
|
54
50
|
rpcInfo,
|
|
55
|
-
sabInfo,
|
|
56
51
|
`Cross-origin isolated: ${crossOriginIsolated}`,
|
|
57
52
|
`CPU cores: ${navigator.hardwareConcurrency}`,
|
|
58
53
|
`Device pixel ratio: ${window.devicePixelRatio}`,
|