@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
|
@@ -1,22 +1,136 @@
|
|
|
1
1
|
import type { FileLocation } from '../util/types/index.ts';
|
|
2
|
+
import type { IsAny } from '../util/types/isAny.ts';
|
|
2
3
|
import type { ConfigurationSchemaDefinition, ConfigurationSchemaOptions, ConfigurationSchemaType } from './configurationSchema.ts';
|
|
3
4
|
import type { BuiltinSlotTypeName } from './configurationSlot.ts';
|
|
4
|
-
import type { ISimpleType, IStateTreeNode, Instance, SnapshotOut } from '@jbrowse/mobx-state-tree';
|
|
5
|
-
export type GetOptions<SCHEMA> = SCHEMA extends ConfigurationSchemaType<any, infer OPTIONS> ? OPTIONS : never;
|
|
6
|
-
export type GetBase<SCHEMA> = SCHEMA extends undefined ? never : GetOptions<SCHEMA> extends ConfigurationSchemaOptions<undefined, any> ? undefined : GetOptions<SCHEMA> extends ConfigurationSchemaOptions<infer BASE extends AnyConfigurationSchemaType, any> ? BASE : never;
|
|
7
|
-
export type GetExplicitIdentifier<SCHEMA> = GetOptions<SCHEMA> extends ConfigurationSchemaOptions<any, infer EXPLICIT_IDENTIFIER extends string> ? EXPLICIT_IDENTIFIER : never;
|
|
8
|
-
/**
|
|
9
|
-
* The identifier prop a schema declares **or inherits** — `trackId`,
|
|
10
|
-
* `displayId`, or whatever `explicitIdentifier` names. Recursive because most
|
|
11
|
-
* display schemas never declare it themselves: they pick up `displayId` from
|
|
12
|
-
* `baseConfiguration: baseLinearDisplayConfigSchema`, whose options
|
|
13
|
-
* `preprocessConfigurationSchemaArguments` merges in at runtime, leaving the
|
|
14
|
-
* subclass's own `EXPLICIT_IDENTIFIER` param `undefined`. Same walk
|
|
15
|
-
* `ConfigurationSlotName` does for inherited slot names.
|
|
16
|
-
*/
|
|
17
|
-
export type GetInheritedIdentifier<SCHEMA> = SCHEMA extends undefined ? never : SCHEMA extends ConfigurationSchemaType<any, any> ? GetExplicitIdentifier<SCHEMA> | (GetBase<SCHEMA> extends ConfigurationSchemaType<any, any> ? GetInheritedIdentifier<GetBase<SCHEMA>> : never) : never;
|
|
5
|
+
import type { IAnyType, IArrayType, ISimpleType, IStateTreeNode, Instance, SnapshotOut } from '@jbrowse/mobx-state-tree';
|
|
18
6
|
export type ConfigurationSchemaForModel<MODEL> = MODEL extends IStateTreeNode<infer SCHEMA extends AnyConfigurationSchemaType> ? SCHEMA : never;
|
|
19
|
-
|
|
7
|
+
/**
|
|
8
|
+
* A schema's definition as **stored**: the author's own entries over the ones
|
|
9
|
+
* its `baseConfiguration` contributed, the type-level twin of
|
|
10
|
+
* `mergeSchemaDefinition`. The base arrives already merged with its own base,
|
|
11
|
+
* so one level here covers a chain of any depth.
|
|
12
|
+
*
|
|
13
|
+
* A flat mapped type over the union of both key sets, not
|
|
14
|
+
* `Omit<BASE, keyof D> & D`: an intersection's `keyof` is a union of key sets,
|
|
15
|
+
* and mapping over a union that includes `string` — which
|
|
16
|
+
* `ConfigurationSchemaDefinition`'s index signature contributes — collapses
|
|
17
|
+
* back to an index signature, which is the thing `ConfigNodeProps` exists to
|
|
18
|
+
* get rid of.
|
|
19
|
+
*/
|
|
20
|
+
export type MergeConfigDef<D, BASE> = BASE extends ConfigurationSchemaType<infer BD, any> ? {
|
|
21
|
+
[K in keyof BD | keyof D]: NormalizeSlotDef<K extends keyof D ? K extends keyof BD ? MergeSlotDef<BD[K], D[K]> : D[K] : K extends keyof BD ? BD[K] : never>;
|
|
22
|
+
} : {
|
|
23
|
+
[K in keyof D]: NormalizeSlotDef<D[K]>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A redeclared slot merges field-by-field over the base's; a sub-schema or a
|
|
27
|
+
* constant keeps replace semantics, matching `mergeSchemaDefinition`'s
|
|
28
|
+
* `isSlotDefinitionEntry` guard.
|
|
29
|
+
*/
|
|
30
|
+
type MergeSlotDef<BASE_ENTRY, ENTRY> = BASE_ENTRY extends {
|
|
31
|
+
type: string;
|
|
32
|
+
} ? ENTRY extends {
|
|
33
|
+
type: string;
|
|
34
|
+
} ? Omit<BASE_ENTRY, keyof ENTRY> & ENTRY : ENTRY : ENTRY;
|
|
35
|
+
/**
|
|
36
|
+
* What the type level reads off a slot definition: the slot's `type`, a
|
|
37
|
+
* `stringEnum`'s `model`, and whether a `defaultValue` is there at all — widened
|
|
38
|
+
* off its literal. The description, `advanced`, `contextVariable` and the
|
|
39
|
+
* literal default are documentation and runtime, and carrying them makes two
|
|
40
|
+
* schemas that differ only in one of them mutually unassignable: a subclass
|
|
41
|
+
* raising `height` from 100 to 250 stopped satisfying a parameter pinned to its
|
|
42
|
+
* base. `SlotValueRawFromDef` re-widens a scalar default anyway, and reaches
|
|
43
|
+
* `any` for everything else, so nothing downstream loses precision.
|
|
44
|
+
*/
|
|
45
|
+
type NormalizeSlotDef<E> = E extends AnyConfigurationSchemaType ? E : E extends {
|
|
46
|
+
type: infer T;
|
|
47
|
+
} ? {
|
|
48
|
+
type: T;
|
|
49
|
+
} & (E extends {
|
|
50
|
+
model: infer M;
|
|
51
|
+
} ? {
|
|
52
|
+
model: M;
|
|
53
|
+
} : unknown) & (E extends {
|
|
54
|
+
defaultValue: infer V;
|
|
55
|
+
} ? {
|
|
56
|
+
defaultValue: WidenDefaultValue<V>;
|
|
57
|
+
} : unknown) : E;
|
|
58
|
+
type WidenDefaultValue<V> = [V] extends [boolean] ? boolean : [V] extends [string] ? string : [V] extends [number] ? number : unknown;
|
|
59
|
+
type ConfigNodeValue<DEF> = IsAny<DEF> extends true ? any : DEF extends AnyConfigurationSchemaType ? DEF['Type'] : DEF extends IArrayType<any> ? DEF['Type'] : DEF extends string ? string : DEF extends number ? number : SlotValueRawFromDef<DEF>;
|
|
60
|
+
/**
|
|
61
|
+
* The slots a config node presents, read off the schema's own DEFINITION rather
|
|
62
|
+
* than the `Record<string, any>` `makeConfigurationSchemaModel` assembles its
|
|
63
|
+
* MST props from. Those props carry an index signature, so every
|
|
64
|
+
* `node.anything` resolves to `any`; mapping the definition instead is what
|
|
65
|
+
* makes `node.colorr` a compile error.
|
|
66
|
+
*
|
|
67
|
+
* A plain mapped type, and it has to stay one. Wrapping it in a conditional —
|
|
68
|
+
* to answer early for a widened definition, say — makes TypeScript measure
|
|
69
|
+
* DEFINITION as covariant instead of invariant, and it refuses a failed
|
|
70
|
+
* covariant check on a type argument outright where a failed invariant one
|
|
71
|
+
* falls back to comparing the two schemas structurally. Structural is the
|
|
72
|
+
* comparison that matters: a subclass schema's node has every slot the base's
|
|
73
|
+
* does, while its *definition* restates `defaultValue` and `description` and so
|
|
74
|
+
* matches nothing. The widened case belongs on `AnyConfigurationModel`.
|
|
75
|
+
*/
|
|
76
|
+
export type ConfigNodeProps<DEFINITION> = {
|
|
77
|
+
[K in keyof DEFINITION]: ConfigNodeValue<DEFINITION[K]>;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* The three write actions every config node carries. A type alias rather than
|
|
81
|
+
* an interface because it annotates the `.actions` block: MST constrains that
|
|
82
|
+
* to `ModelActions`, an index signature of functions, and only a type alias of
|
|
83
|
+
* an object literal gets the implicit index signature that satisfies it.
|
|
84
|
+
*/
|
|
85
|
+
export type ConfigNodeActions = {
|
|
86
|
+
setSubschema: (slotName: string, data: unknown) => unknown;
|
|
87
|
+
setSubschemaArray: (slotName: string, data: unknown[]) => void;
|
|
88
|
+
setSlot: (slotName: string, value: unknown) => void;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* MST's node brand, restated. A config node carries its own schema here by
|
|
92
|
+
* polymorphic `this`, and `ConfigurationSchemaForModel` walks it back out —
|
|
93
|
+
* which is what every `getConf` / `readConfObject` / `setConf` slot-name
|
|
94
|
+
* constraint hangs off, so losing it switches the read-side check off with no
|
|
95
|
+
* error anywhere. `scripts/audit-config-read-types.ts` is the only thing that
|
|
96
|
+
* reports that; run it after touching this.
|
|
97
|
+
*
|
|
98
|
+
* Structurally identical to `IStateTreeNode<IT>`, but an alias rather than an
|
|
99
|
+
* interface: TypeScript infers an implicit index signature for an intersection
|
|
100
|
+
* only when every constituent is an alias or a mapped type, and that is what
|
|
101
|
+
* leaves a concrete config node — whose props are a mapped type with no index
|
|
102
|
+
* signature of its own — assignable to `AnyConfigurationModel`.
|
|
103
|
+
*/
|
|
104
|
+
export type ConfigNodeBrand<IT extends IAnyType> = {
|
|
105
|
+
readonly $treenode?: any;
|
|
106
|
+
readonly $__mstStateTreeNodeType__?: [IT] | [any];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* The identifier a schema's `explicitIdentifier` installs, folded into the
|
|
110
|
+
* definition as if it were a declared string slot — which is what it is at
|
|
111
|
+
* runtime, `makeConfigurationSchemaModel` just builds it from the options rather
|
|
112
|
+
* than from the table. Folding it in rather than intersecting it onto `Type`
|
|
113
|
+
* keeps it out of `ConfigurationSchemaType`'s parameter list: as a parameter it
|
|
114
|
+
* reads as invariant (it lands in a `Record<K, …>` key position), which stops a
|
|
115
|
+
* concrete schema widening to `AnyConfigurationSchemaType`. Inheritance comes
|
|
116
|
+
* free, since `MergeConfigDef` already folds the base's whole definition in.
|
|
117
|
+
*/
|
|
118
|
+
export interface IdentifierSlotDef {
|
|
119
|
+
type: 'string';
|
|
120
|
+
defaultValue: '';
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The `type` prop an `explicitlyTyped` schema installs, folded into the
|
|
124
|
+
* definition the same way and for the same reasons. Separate from
|
|
125
|
+
* `IdentifierSlotDef` despite the identical shape, because the runtime prop is
|
|
126
|
+
* `types.literal(modelName)` and this is where that would be said if the model
|
|
127
|
+
* name ever became a type parameter.
|
|
128
|
+
*/
|
|
129
|
+
export interface TypeSlotDef {
|
|
130
|
+
type: 'string';
|
|
131
|
+
defaultValue: '';
|
|
132
|
+
}
|
|
133
|
+
export type ConfigurationSlotName<SCHEMA> = IsAny<SCHEMA> extends true ? string : SCHEMA extends ConfigurationSchemaType<infer D, any> ? keyof D & string : never;
|
|
20
134
|
/**
|
|
21
135
|
* The names a config snapshot for `SCHEMA` may use — its own slots, its
|
|
22
136
|
* sub-schemas recursively, its identifier and everything it inherits — with
|
|
@@ -31,9 +145,7 @@ export type ConfigurationSlotName<SCHEMA> = SCHEMA extends undefined ? never : S
|
|
|
31
145
|
*/
|
|
32
146
|
export type ConfigurationSnapshot<SCHEMA> = SCHEMA extends undefined ? never : SCHEMA extends ConfigurationSchemaType<infer D, any> ? {
|
|
33
147
|
[K in keyof D]?: D[K] extends ConfigurationSchemaType<any, any> ? ConfigurationSnapshot<D[K]> : unknown;
|
|
34
|
-
}
|
|
35
|
-
[K in GetExplicitIdentifier<SCHEMA>]?: string;
|
|
36
|
-
} & (GetBase<SCHEMA> extends ConfigurationSchemaType<any, any> ? ConfigurationSnapshot<GetBase<SCHEMA>> : unknown) : unknown;
|
|
148
|
+
} : unknown;
|
|
37
149
|
/**
|
|
38
150
|
* The value each builtin slot `type` reads as — the type-level twin of
|
|
39
151
|
* `slotTypes` in `configurationSlot.ts`, which is the same list as MST models.
|
|
@@ -55,6 +167,7 @@ interface SlotValueByType {
|
|
|
55
167
|
maybeNumber: number | undefined;
|
|
56
168
|
maybeBoolean: boolean | undefined;
|
|
57
169
|
maybeColor: string | undefined;
|
|
170
|
+
maybeString: string | undefined;
|
|
58
171
|
/**
|
|
59
172
|
* `frozen` and its `maybe*` form are `any` deliberately — arbitrary dynamic
|
|
60
173
|
* JSON whose shape the caller asserts at the read boundary. `unknown` would
|
|
@@ -71,7 +184,9 @@ interface SlotValueByType {
|
|
|
71
184
|
boolean: boolean;
|
|
72
185
|
string: string;
|
|
73
186
|
text: string;
|
|
187
|
+
featureField: string;
|
|
74
188
|
color: string;
|
|
189
|
+
colorArray: string[];
|
|
75
190
|
}
|
|
76
191
|
/**
|
|
77
192
|
* The two tables name the same builtin slot types, checked rather than
|
|
@@ -93,13 +208,37 @@ type SlotValueRawFromDef<DEF> = DEF extends AnyConfigurationSchemaType ? AnyConf
|
|
|
93
208
|
model: ISimpleType<infer T extends string>;
|
|
94
209
|
} ? DEF extends {
|
|
95
210
|
type: 'maybeStringEnum';
|
|
96
|
-
} ? T | undefined :
|
|
211
|
+
} ? T | undefined : DEF extends {
|
|
212
|
+
type: 'stringEnumArray';
|
|
213
|
+
} ? T[] : T : DEF extends {
|
|
97
214
|
type: infer T extends keyof SlotValueByType;
|
|
98
215
|
} ? SlotValueByType[T] : DEF extends {
|
|
99
216
|
defaultValue: infer V;
|
|
100
217
|
} ? [V] extends [boolean] ? boolean : [V] extends [string] ? string : [V] extends [number] ? number : any : any;
|
|
218
|
+
type SubSchemaOf<SCHEMA, K> = IsAny<SCHEMA> extends true ? any : SCHEMA extends ConfigurationSchemaType<infer D, any> ? K extends keyof D ? D[K] : never : never;
|
|
219
|
+
type SubSchemaSlotPath<SCHEMA> = SCHEMA extends ConfigurationSchemaType<infer D, any> ? IsAny<D> extends true ? readonly string[] : {
|
|
220
|
+
[K in keyof D & string]: D[K] extends AnyConfigurationSchemaType ? readonly [K, ConfigurationSlotName<D[K]>] | readonly [K, ...SubSchemaSlotPath<D[K]>] : D[K] extends IAnyType | {
|
|
221
|
+
type: 'frozen' | 'maybeFrozen';
|
|
222
|
+
} ? readonly [K, ...string[]] : never;
|
|
223
|
+
}[keyof D & string] : readonly string[];
|
|
224
|
+
/**
|
|
225
|
+
* The array paths a read may take into `SCHEMA`. Past one segment each is
|
|
226
|
+
* checked: a sub-schema's name, then one of its slot names or a deeper path. A
|
|
227
|
+
* head naming something other than a sub-schema — a pluggable adapter union, an
|
|
228
|
+
* array or map of sub-schemas, a `frozen` slot — keeps an unchecked tail, and a
|
|
229
|
+
* widened schema admits any `string[]`.
|
|
230
|
+
*
|
|
231
|
+
* A one-segment path stays unchecked: it is how a generic class body, where
|
|
232
|
+
* `SCHEMA` is unresolved, reads a slot at all (`FastaAdapterBase`).
|
|
233
|
+
*/
|
|
234
|
+
export type ConfigurationSlotPath<SCHEMA> = readonly [] | readonly [string] | SubSchemaSlotPath<SCHEMA>;
|
|
235
|
+
/** what a read of `PATH` into `SCHEMA` yields */
|
|
236
|
+
export type ConfigurationSlotPathValue<SCHEMA, PATH> = PATH extends readonly [
|
|
237
|
+
infer HEAD,
|
|
238
|
+
...infer REST
|
|
239
|
+
] ? SubSchemaOf<SCHEMA, HEAD> extends infer SUB extends AnyConfigurationSchemaType ? REST extends readonly [infer SLOT extends string] ? ConfigurationSlotValue<SUB, SLOT> : ConfigurationSlotPathValue<SUB, REST> : any : any;
|
|
101
240
|
/** what a raw read (`getConf` / `readConfObject`) of this slot yields */
|
|
102
|
-
export type ConfigurationSlotValue<SCHEMA, K extends string> = SCHEMA extends ConfigurationSchemaType<infer D, any> ? K extends keyof D ? SlotValueRawFromDef<D[K]> :
|
|
241
|
+
export type ConfigurationSlotValue<SCHEMA, K extends string> = SCHEMA extends ConfigurationSchemaType<infer D, any> ? K extends keyof D ? SlotValueRawFromDef<D[K]> : any : any;
|
|
103
242
|
/**
|
|
104
243
|
* Naming convention for config types, paired per schema:
|
|
105
244
|
* - `XConfigSchema` is the MST IType (the schema itself). Use it for
|
|
@@ -114,7 +253,7 @@ export type ConfigurationSlotValue<SCHEMA, K extends string> = SCHEMA extends Co
|
|
|
114
253
|
* model-or-snapshot union, not a plain instance).
|
|
115
254
|
*/
|
|
116
255
|
export type AnyConfigurationSchemaType = ConfigurationSchemaType<any, any>;
|
|
117
|
-
export type AnyConfigurationModel = Instance<AnyConfigurationSchemaType>;
|
|
256
|
+
export type AnyConfigurationModel = Instance<AnyConfigurationSchemaType> & Record<string, any>;
|
|
118
257
|
/**
|
|
119
258
|
* The `XConfigModel` for a **field table** — a `*ConfigSchemaFields` export —
|
|
120
259
|
* rather than for a whole assembled schema. What it is for is the cast a
|
|
@@ -133,7 +272,7 @@ export type AnyConfigurationModel = Instance<AnyConfigurationSchemaType>;
|
|
|
133
272
|
* `RowHeightMixin` + `rowHeightConfigSchemaFields` is the worked example, and
|
|
134
273
|
* `packages/tree-sidebar/CLAUDE.md` has the reasoning.
|
|
135
274
|
*/
|
|
136
|
-
export type ConfigModelForFields<FIELDS extends ConfigurationSchemaDefinition, BASE extends AnyConfigurationSchemaType | undefined = undefined> = Instance<ConfigurationSchemaType<FIELDS, ConfigurationSchemaOptions<BASE, undefined>>>;
|
|
275
|
+
export type ConfigModelForFields<FIELDS extends ConfigurationSchemaDefinition, BASE extends AnyConfigurationSchemaType | undefined = undefined> = Instance<ConfigurationSchemaType<MergeConfigDef<FIELDS, BASE>, ConfigurationSchemaOptions<BASE, undefined>>>;
|
|
137
276
|
/**
|
|
138
277
|
* `true` when HOST's `configuration` still narrows slot names, `false` when it
|
|
139
278
|
* has widened them back to `string`. One line per mixin pins it:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type PluginManager from '../../PluginManager.ts';
|
|
2
|
-
import type { AnyConfigurationModel, ConfigurationSchemaForModel, ConfigurationSlotName, ConfigurationSlotValue } from '../../configuration/index.ts';
|
|
2
|
+
import type { AnyConfigurationModel, ConfigurationSchemaForModel, ConfigurationSlotName, ConfigurationSlotPath, ConfigurationSlotPathValue, ConfigurationSlotValue } from '../../configuration/index.ts';
|
|
3
3
|
import type { getSubAdapterType } from '../dataAdapterCache.ts';
|
|
4
4
|
export declare class BaseAdapter<CONF extends AnyConfigurationModel = AnyConfigurationModel> {
|
|
5
5
|
id: string;
|
|
@@ -26,5 +26,5 @@ export declare class BaseAdapter<CONF extends AnyConfigurationModel = AnyConfigu
|
|
|
26
26
|
*/
|
|
27
27
|
setSequenceAdapterConfig(config: Record<string, unknown> | undefined): void;
|
|
28
28
|
/** shorthand for `readConfObject(this.config, arg)` */
|
|
29
|
-
getConf<SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONF>> |
|
|
29
|
+
getConf<const SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONF>> | ConfigurationSlotPath<ConfigurationSchemaForModel<CONF>> = ConfigurationSlotName<ConfigurationSchemaForModel<CONF>>>(arg: SLOT, args?: Record<string, unknown>): SLOT extends string ? ConfigurationSlotValue<ConfigurationSchemaForModel<CONF>, SLOT> : ConfigurationSlotPathValue<ConfigurationSchemaForModel<CONF>, SLOT>;
|
|
30
30
|
}
|
|
@@ -3,7 +3,7 @@ import type { AnyConfigurationModel } from '../../configuration/index.ts';
|
|
|
3
3
|
import type { Feature } from '../../util/simpleFeature.ts';
|
|
4
4
|
import type { AugmentedRegion as Region } from '../../util/types/index.ts';
|
|
5
5
|
import type { FeatureDensity } from './featureDensity.ts';
|
|
6
|
-
import type { BaseOptions } from './types.ts';
|
|
6
|
+
import type { BaseOptions, ZoomRange } from './types.ts';
|
|
7
7
|
import type { Observable } from 'rxjs';
|
|
8
8
|
/**
|
|
9
9
|
* Base class for feature adapters to extend. Defines some methods that
|
|
@@ -76,7 +76,7 @@ export declare abstract class BaseFeatureDataAdapter<CONF extends AnyConfigurati
|
|
|
76
76
|
/**
|
|
77
77
|
* Convenience wrapper that collects {@link getFeatures} for a region into an
|
|
78
78
|
* array — the common shape across RPC methods (RenderFeatureData, Manhattan,
|
|
79
|
-
* Wiggle, etc.). Pass `opts` so `statusCallback`/`
|
|
79
|
+
* Wiggle, etc.). Pass `opts` so `statusCallback`/`signal` reach the
|
|
80
80
|
* adapter; omitting them means no download progress and a fetch that can't be
|
|
81
81
|
* interrupted mid-flight.
|
|
82
82
|
*/
|
|
@@ -118,6 +118,15 @@ export declare abstract class BaseFeatureDataAdapter<CONF extends AnyConfigurati
|
|
|
118
118
|
* agent-docs/reference/REGION_TOO_LARGE.md.
|
|
119
119
|
*/
|
|
120
120
|
getRegionByteSize(_regions: Region[], _opts?: BaseOptions): Promise<number | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* The bp/px interval over which this adapter answers a fetch from the same
|
|
123
|
+
* zoom level it answers `opts.bpPerPx` from, so a display holding the answer
|
|
124
|
+
* refetches only when the view leaves it. The default, `undefined`, is an
|
|
125
|
+
* answer that does not depend on the zoom, which a display never refetches
|
|
126
|
+
* for a zoom. An adapter that reads `bpPerPx` declares its range here
|
|
127
|
+
* (`BigWigAdapter` from its header's zoom levels).
|
|
128
|
+
*/
|
|
129
|
+
getZoomRange(_opts?: BaseOptions): Promise<ZoomRange | undefined>;
|
|
121
130
|
/**
|
|
122
131
|
* Features per bin over each region, at the view's `bpPerPx`, for the density
|
|
123
132
|
* tier the display draws where the region-too-large gate refused the
|
|
@@ -49,7 +49,7 @@ export class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
49
49
|
/**
|
|
50
50
|
* Convenience wrapper that collects {@link getFeatures} for a region into an
|
|
51
51
|
* array — the common shape across RPC methods (RenderFeatureData, Manhattan,
|
|
52
|
-
* Wiggle, etc.). Pass `opts` so `statusCallback`/`
|
|
52
|
+
* Wiggle, etc.). Pass `opts` so `statusCallback`/`signal` reach the
|
|
53
53
|
* adapter; omitting them means no download progress and a fetch that can't be
|
|
54
54
|
* interrupted mid-flight.
|
|
55
55
|
*/
|
|
@@ -109,6 +109,17 @@ export class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
109
109
|
async getRegionByteSize(_regions, _opts) {
|
|
110
110
|
return undefined;
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* The bp/px interval over which this adapter answers a fetch from the same
|
|
114
|
+
* zoom level it answers `opts.bpPerPx` from, so a display holding the answer
|
|
115
|
+
* refetches only when the view leaves it. The default, `undefined`, is an
|
|
116
|
+
* answer that does not depend on the zoom, which a display never refetches
|
|
117
|
+
* for a zoom. An adapter that reads `bpPerPx` declares its range here
|
|
118
|
+
* (`BigWigAdapter` from its header's zoom levels).
|
|
119
|
+
*/
|
|
120
|
+
async getZoomRange(_opts) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
112
123
|
/**
|
|
113
124
|
* Features per bin over each region, at the view's `bpPerPx`, for the density
|
|
114
125
|
* tier the display draws where the region-too-large gate refused the
|
|
@@ -22,9 +22,8 @@ export declare const densityAdapterConfigSchemaFields: {
|
|
|
22
22
|
* #slot
|
|
23
23
|
*/
|
|
24
24
|
readonly densityAdapter: {
|
|
25
|
-
readonly type: '
|
|
26
|
-
readonly
|
|
27
|
-
readonly description: 'optional quantitative sub-adapter (e.g. a BigWigAdapter over a features-per-bin bigWig) drawn as a density band where the region is too large to fetch features; null disables it';
|
|
25
|
+
readonly type: 'maybeFrozen';
|
|
26
|
+
readonly description: 'optional quantitative sub-adapter (e.g. a BigWigAdapter over a features-per-bin bigWig) drawn as a density band where the region is too large to fetch features; leave it unset to disable';
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
/**
|
|
@@ -10,9 +10,8 @@ export const densityAdapterConfigSchemaFields = {
|
|
|
10
10
|
* #slot
|
|
11
11
|
*/
|
|
12
12
|
densityAdapter: {
|
|
13
|
-
type: '
|
|
14
|
-
|
|
15
|
-
description: 'optional quantitative sub-adapter (e.g. a BigWigAdapter over a features-per-bin bigWig) drawn as a density band where the region is too large to fetch features; null disables it',
|
|
13
|
+
type: 'maybeFrozen',
|
|
14
|
+
description: 'optional quantitative sub-adapter (e.g. a BigWigAdapter over a features-per-bin bigWig) drawn as a density band where the region is too large to fetch features; leave it unset to disable',
|
|
16
15
|
},
|
|
17
16
|
};
|
|
18
17
|
/**
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type PluginManager from '../../PluginManager.ts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../../configuration/index.ts';
|
|
3
3
|
import type { getSubAdapterType } from '../dataAdapterCache.ts';
|
|
4
4
|
import type { AnyDataAdapter } from './util.ts';
|
|
5
|
+
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
5
6
|
export { type AnyDataAdapter, isFeatureAdapter, isRefNameAliasAdapter, isRegionsAdapter, isSequenceAdapter, isTextSearchAdapter, } from './util.ts';
|
|
6
|
-
export type { BaseOptions, BaseTextSearchArgs, LodTier, SearchType, } from './types.ts';
|
|
7
|
+
export type { BaseOptions, BaseTextSearchArgs, LodTier, SearchType, ZoomRange, } from './types.ts';
|
|
7
8
|
export { BaseAdapter } from './BaseAdapter.ts';
|
|
8
9
|
export { cachedSetup } from '../../util/cachedSetup.ts';
|
|
9
10
|
export { BaseFeatureDataAdapter } from './BaseFeatureDataAdapter.ts';
|
|
@@ -13,4 +14,22 @@ export type { BaseTextSearchAdapter } from './BaseTextSearchAdapter.ts';
|
|
|
13
14
|
export type { Alias, BaseRefNameAliasAdapter, } from './BaseRefNameAliasAdapter.ts';
|
|
14
15
|
export type { RegionsAdapter } from './RegionsAdapter.ts';
|
|
15
16
|
export type { CytobandAdapter } from './CytobandAdapter.ts';
|
|
16
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The adapter class that goes with SCHEMA — the class whose `config` is that
|
|
19
|
+
* schema's node. `AdapterType` is generic over the schema so registering the
|
|
20
|
+
* two together checks that they are the same adapter's; the pairing is
|
|
21
|
+
* otherwise only a shared `type` string, and nothing reports a class reading
|
|
22
|
+
* slots its declared schema never had.
|
|
23
|
+
*
|
|
24
|
+
* see
|
|
25
|
+
* https://www.typescriptlang.org/docs/handbook/2/classes.html#abstract-construct-signatures
|
|
26
|
+
* for why this is the abstract construct signature
|
|
27
|
+
*/
|
|
28
|
+
export type AdapterClassFor<SCHEMA> = new (config: SCHEMA extends AnyConfigurationSchemaType ? Instance<SCHEMA> : any, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager) => AnyDataAdapter;
|
|
29
|
+
/**
|
|
30
|
+
* An adapter class with its schema forgotten, which is what the registry holds
|
|
31
|
+
* and `dataAdapterCache` constructs: the config node it has in hand came from
|
|
32
|
+
* the `AdapterType` the same `type` name resolved to, and that lookup is the
|
|
33
|
+
* only thing tying the two together.
|
|
34
|
+
*/
|
|
35
|
+
export type AnyAdapter = AdapterClassFor<any>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { StatusCallback } from '../../util/progress.ts';
|
|
2
|
-
|
|
2
|
+
export type { ZoomRange } from './zoomRange.ts';
|
|
3
3
|
export type LodTier = 'fine' | 'coarse';
|
|
4
4
|
export interface BaseOptions {
|
|
5
|
-
|
|
5
|
+
signal?: AbortSignal;
|
|
6
6
|
bpPerPx?: number;
|
|
7
7
|
sessionId?: string;
|
|
8
|
-
signal?: AbortSignal;
|
|
9
8
|
statusCallback?: StatusCallback;
|
|
10
9
|
headers?: Record<string, string>;
|
|
11
10
|
assemblyName?: string;
|
|
@@ -16,5 +15,5 @@ export type SearchType = 'full' | 'prefix' | 'exact';
|
|
|
16
15
|
export interface BaseTextSearchArgs {
|
|
17
16
|
queryString: string;
|
|
18
17
|
searchType?: SearchType;
|
|
19
|
-
|
|
18
|
+
signal?: AbortSignal;
|
|
20
19
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #api
|
|
3
|
+
* The bp/px interval, `[minBpPerPx, maxBpPerPx)`, over which an adapter with
|
|
4
|
+
* zoom levels answers a fetch from the same level it answered `opts.bpPerPx`
|
|
5
|
+
* from. A display holding the answer refetches when the view leaves it.
|
|
6
|
+
*/
|
|
7
|
+
export interface ZoomRange {
|
|
8
|
+
minBpPerPx: number;
|
|
9
|
+
maxBpPerPx: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -25,17 +25,15 @@
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
declare const configSchema: import("../../configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
28
|
+
type: {
|
|
29
|
+
type: "string";
|
|
30
|
+
} & {
|
|
31
|
+
defaultValue: string;
|
|
32
|
+
};
|
|
34
33
|
readonly cytobandLocation: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
34
|
+
type: "fileLocation";
|
|
35
|
+
} & {
|
|
36
|
+
defaultValue: unknown;
|
|
39
37
|
};
|
|
40
|
-
}, import("../../configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined
|
|
38
|
+
}, import("../../configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined, true, import("../../configuration/requirements.ts").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
41
39
|
export default configSchema;
|
|
@@ -11,9 +11,7 @@ import type { BaseAdapter, BaseSequenceAdapter } from './BaseAdapter/index.ts';
|
|
|
11
11
|
* so it wins only when explicitly present, and `jbrowse validate` warns about it.
|
|
12
12
|
*
|
|
13
13
|
* In core rather than beside one of its callers because the field it reads is
|
|
14
|
-
* `BaseAdapter`'s.
|
|
15
|
-
* `@jbrowse/core/*` re-export, and a name published there is load-bearing ABI —
|
|
16
|
-
* `abi.test.ts`/`abiBaseline.json` fails a removal from it.
|
|
14
|
+
* `BaseAdapter`'s.
|
|
17
15
|
*
|
|
18
16
|
* `configured` is passed in rather than read here so each adapter reads its own
|
|
19
17
|
* slot through its own config type.
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
* so it wins only when explicitly present, and `jbrowse validate` warns about it.
|
|
11
11
|
*
|
|
12
12
|
* In core rather than beside one of its callers because the field it reads is
|
|
13
|
-
* `BaseAdapter`'s.
|
|
14
|
-
* `@jbrowse/core/*` re-export, and a name published there is load-bearing ABI —
|
|
15
|
-
* `abi.test.ts`/`abiBaseline.json` fails a removal from it.
|
|
13
|
+
* `BaseAdapter`'s.
|
|
16
14
|
*
|
|
17
15
|
* `configured` is passed in rather than read here so each adapter reads its own
|
|
18
16
|
* slot through its own config type.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PluggableElementBase from './PluggableElementBase.ts';
|
|
2
2
|
import type { AnyConfigurationSchemaType } from '../configuration/index.ts';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AdapterClassFor } from '../data_adapters/BaseAdapter/index.ts';
|
|
4
4
|
export interface AdapterMetadata {
|
|
5
5
|
category?: string;
|
|
6
6
|
hiddenFromGUI?: boolean;
|
|
@@ -25,9 +25,9 @@ export interface AdapterMetadata {
|
|
|
25
25
|
}
|
|
26
26
|
/** Expand a raw adapter config snapshot (plain JSON) to its canonical form. */
|
|
27
27
|
export type NormalizeSnapshot = (snap: Record<string, unknown>) => Record<string, unknown>;
|
|
28
|
-
export default class AdapterType extends PluggableElementBase {
|
|
29
|
-
getAdapterClass: () => Promise<
|
|
30
|
-
configSchema:
|
|
28
|
+
export default class AdapterType<SCHEMA extends AnyConfigurationSchemaType = any> extends PluggableElementBase {
|
|
29
|
+
getAdapterClass: () => Promise<AdapterClassFor<SCHEMA>>;
|
|
30
|
+
configSchema: SCHEMA;
|
|
31
31
|
adapterCapabilities: string[];
|
|
32
32
|
adapterMetadata?: AdapterMetadata;
|
|
33
33
|
private declaredNormalizeSnapshot?;
|
|
@@ -61,7 +61,7 @@ export default class AdapterType extends PluggableElementBase {
|
|
|
61
61
|
locationKey?: string;
|
|
62
62
|
constructor(stuff: {
|
|
63
63
|
name: string;
|
|
64
|
-
configSchema:
|
|
64
|
+
configSchema: SCHEMA;
|
|
65
65
|
displayName?: string;
|
|
66
66
|
aliases?: string[];
|
|
67
67
|
adapterCapabilities?: string[];
|
|
@@ -69,8 +69,8 @@ export default class AdapterType extends PluggableElementBase {
|
|
|
69
69
|
normalizeSnapshot?: NormalizeSnapshot;
|
|
70
70
|
locationKey?: string;
|
|
71
71
|
} & ({
|
|
72
|
-
getAdapterClass: () => Promise<
|
|
72
|
+
getAdapterClass: () => Promise<AdapterClassFor<SCHEMA>>;
|
|
73
73
|
} | {
|
|
74
|
-
AdapterClass:
|
|
74
|
+
AdapterClass: AdapterClassFor<SCHEMA>;
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
@@ -109,7 +109,7 @@ export default abstract class RpcMethodType<MethodName extends string = string>
|
|
|
109
109
|
* is not cosmetic, because the two handles every method receives are the two
|
|
110
110
|
* an author who did not write them down never forwards.
|
|
111
111
|
*
|
|
112
|
-
* `CoreGetExportData` is the worked example: the
|
|
112
|
+
* `CoreGetExportData` is the worked example: the signal and status
|
|
113
113
|
* callback arrived on every call and its `execute` destructured neither, so
|
|
114
114
|
* the Save-track-data dialog's cancel did nothing and its progress never moved
|
|
115
115
|
* on the adapter-export branch. Nothing was mistyped — the fields simply were
|
|
@@ -64,17 +64,12 @@ function isCloneable(thing) {
|
|
|
64
64
|
}
|
|
65
65
|
// Values that structuredClone handles natively and that must pass through
|
|
66
66
|
// ownArgs unchanged: `Object.entries` on them yields `[]`, so naive cloning
|
|
67
|
-
// would collapse them to plain `{}` (
|
|
68
|
-
// would silently stop working, a typed array would lose its data).
|
|
67
|
+
// would collapse them to plain `{}` (a typed array would lose its data).
|
|
69
68
|
function isStructuredClonePassthrough(thing) {
|
|
70
69
|
return (thing instanceof File ||
|
|
71
70
|
thing instanceof Blob ||
|
|
72
71
|
thing instanceof ArrayBuffer ||
|
|
73
|
-
//
|
|
74
|
-
// collapses to {} and SAB-based stop tokens silently stop working. Nothing
|
|
75
|
-
// we ship mints one (see `stopToken.ts`, "Which path runs where"), so this
|
|
76
|
-
// arm is correctness for an isolated embedding host and nothing else —
|
|
77
|
-
// keep it, but it is not a hot path and never was.
|
|
72
|
+
// not an ArrayBuffer subclass
|
|
78
73
|
(typeof SharedArrayBuffer !== 'undefined' &&
|
|
79
74
|
thing instanceof SharedArrayBuffer) ||
|
|
80
75
|
ArrayBuffer.isView(thing) ||
|
|
@@ -96,7 +91,7 @@ function isStructuredClonePassthrough(thing) {
|
|
|
96
91
|
// DataCloneError on every call a display makes.
|
|
97
92
|
//
|
|
98
93
|
// So: non-cloneable leaves (functions, Errors) and structured-clone natives
|
|
99
|
-
// (typed arrays, Blobs
|
|
94
|
+
// (typed arrays, Blobs...) pass through by reference
|
|
100
95
|
// unchanged. A genuinely non-cloneable value that leaked in by mistake is still
|
|
101
96
|
// caught — at the worker postMessage boundary, which is a real structuredClone.
|
|
102
97
|
function ownArgs(thing, seen = new WeakMap()) {
|
|
@@ -2,7 +2,6 @@ import RpcMethodTypeWithRenameRegions from './RpcMethodTypeWithRenameRegions.ts'
|
|
|
2
2
|
import SerializableFilterChain from './renderers/util/serializableFilterChain.ts';
|
|
3
3
|
import type { Region } from '../util/index.ts';
|
|
4
4
|
import type { StatusCallback } from '../util/progress.ts';
|
|
5
|
-
import type { StopToken } from '../util/stopToken.ts';
|
|
6
5
|
interface FilterRenameArgs {
|
|
7
6
|
sessionId: string;
|
|
8
7
|
regions?: Region[];
|
|
@@ -14,7 +13,7 @@ export default abstract class RpcMethodTypeWithFiltersAndRenameRegions<MethodNam
|
|
|
14
13
|
filters?: unknown;
|
|
15
14
|
}): Promise<T>;
|
|
16
15
|
serializeArguments(args: FilterRenameArgs & {
|
|
17
|
-
|
|
16
|
+
signal?: AbortSignal;
|
|
18
17
|
statusCallback?: StatusCallback;
|
|
19
18
|
}): Promise<Record<string, unknown>>;
|
|
20
19
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import PluggableElementBase from './PluggableElementBase.ts';
|
|
2
2
|
import type { AnyConfigurationSchemaType } from '../configuration/index.ts';
|
|
3
|
-
import type {
|
|
4
|
-
export default class TextSearchAdapterType extends PluggableElementBase {
|
|
5
|
-
getAdapterClass: () => Promise<
|
|
6
|
-
configSchema:
|
|
3
|
+
import type { AdapterClassFor } from '../data_adapters/BaseAdapter/index.ts';
|
|
4
|
+
export default class TextSearchAdapterType<SCHEMA extends AnyConfigurationSchemaType = any> extends PluggableElementBase {
|
|
5
|
+
getAdapterClass: () => Promise<AdapterClassFor<SCHEMA>>;
|
|
6
|
+
configSchema: SCHEMA;
|
|
7
7
|
description?: string;
|
|
8
8
|
constructor(stuff: {
|
|
9
9
|
name: string;
|
|
10
|
-
configSchema:
|
|
10
|
+
configSchema: SCHEMA;
|
|
11
11
|
displayName?: string;
|
|
12
12
|
description?: string;
|
|
13
13
|
} & ({
|
|
14
|
-
getAdapterClass: () => Promise<
|
|
14
|
+
getAdapterClass: () => Promise<AdapterClassFor<SCHEMA>>;
|
|
15
15
|
} | {
|
|
16
|
-
AdapterClass:
|
|
16
|
+
AdapterClass: AdapterClassFor<SCHEMA>;
|
|
17
17
|
}));
|
|
18
18
|
}
|
|
@@ -8,7 +8,7 @@ import type TextSearchAdapterType from './TextSearchAdapterType.ts';
|
|
|
8
8
|
import type TrackType from './TrackType.ts';
|
|
9
9
|
import type ViewType from './ViewType.ts';
|
|
10
10
|
import type WidgetType from './WidgetType.ts';
|
|
11
|
-
export { BaseConnectionModelFactory, BaseDisplay, type BaseDisplayModel, type BaseDisplayStateModel, BaseInternetAccountConfig, type BaseInternetAccountModel, type BaseInternetAccountStateModel, type BaseTrackConfig, type BaseTrackModel, type BaseTrackStateModel, BaseViewModel, type DisplayModel, type FileTypeExporter,
|
|
11
|
+
export { BaseConnectionModelFactory, BaseDisplay, type BaseDisplayModel, type BaseDisplayStateModel, BaseInternetAccountConfig, type BaseInternetAccountModel, type BaseInternetAccountStateModel, type BaseTrackConfig, type BaseTrackModel, type BaseTrackStateModel, BaseViewModel, type DisplayModel, type FileTypeExporter, type IBaseViewModel, InternetAccount, addDisplayConfigMigration, baseConnectionConfig, createBaseTrackConfig, createBaseTrackModel, preprocessTrackConfigSnapshot, type TrackConfigSnapshot, } from './models/index.ts';
|
|
12
12
|
export type PluggableElementType = AdapterType | ConnectionType | WidgetType | TrackType | DisplayType | ViewType | RpcMethodType | InternetAccountType | TextSearchAdapterType | AddTrackWorkflowType;
|
|
13
13
|
export { extendDisplayType, extendViewType } from './extendElementType.ts';
|
|
14
14
|
export { addDisplayMenuItems, addViewMenuItems } from './addMenuItems.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BaseConnectionModelFactory, BaseDisplay, BaseInternetAccountConfig, BaseViewModel,
|
|
1
|
+
export { BaseConnectionModelFactory, BaseDisplay, BaseInternetAccountConfig, BaseViewModel, InternetAccount, addDisplayConfigMigration, baseConnectionConfig, createBaseTrackConfig, createBaseTrackModel, preprocessTrackConfigSnapshot, } from './models/index.js';
|
|
2
2
|
export { extendDisplayType, extendViewType } from './extendElementType.js';
|
|
3
3
|
export { addDisplayMenuItems, addViewMenuItems } from './addMenuItems.js';
|
|
4
4
|
export { default as AdapterType } from './AdapterType.js';
|