@jbrowse/core 5.0.0-beta.7 → 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,3 +1,5 @@
|
|
|
1
|
+
import { legendIsReadable } from '../ui/legendSpec.js';
|
|
2
|
+
import { abgrToCssRgba, cssColorToABGR } from './colorBits.js';
|
|
1
3
|
// How many distinct colors a derived key may name and still BE a key. Past this
|
|
2
4
|
// the data is not a categorical vocabulary (a track keyed by unique per-feature
|
|
3
5
|
// names), and a list of every feature is the thing a key exists instead of.
|
|
@@ -10,78 +12,102 @@ export const MAX_LEGEND_ENTRIES = 30;
|
|
|
10
12
|
// per feature ships a prefix that reads the same way it would have.
|
|
11
13
|
export const MAX_LEGEND_CANDIDATES = 1024;
|
|
12
14
|
/**
|
|
13
|
-
* Accumulator for the distinct (row,
|
|
14
|
-
* past, in first-seen order and bounded
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* Deduped on the whole triple rather than on (row, color): the union takes the
|
|
19
|
-
* first NAME it sees for a color, so where that name is already spoken for, the
|
|
20
|
-
* second name on that color has to still be in the list to carry it.
|
|
21
|
-
*
|
|
22
|
-
* A nameless feature contributes nothing, which is the union's rule too — so a
|
|
23
|
-
* track whose features have no names ships an empty list rather than one entry
|
|
24
|
-
* per feature.
|
|
15
|
+
* Accumulator for the distinct (row, value, color) combinations a packer walks
|
|
16
|
+
* past, in first-seen order and bounded, so the main thread never re-walks the
|
|
17
|
+
* features. Deduped on the whole triple: a row of the union lists every value
|
|
18
|
+
* painted in its color, so a second value on that color has to still be in the
|
|
19
|
+
* list to reach it.
|
|
25
20
|
*/
|
|
26
21
|
export function createLegendCandidateCollector(maxCandidates = MAX_LEGEND_CANDIDATES) {
|
|
27
22
|
const candidates = [];
|
|
28
|
-
const
|
|
23
|
+
const seen = new Set();
|
|
29
24
|
return {
|
|
30
25
|
candidates,
|
|
31
|
-
add(rowIndex,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
colorsSeen.set(rowIndex, byLabel);
|
|
37
|
-
}
|
|
38
|
-
let colors = byLabel.get(label);
|
|
39
|
-
if (colors === undefined) {
|
|
40
|
-
colors = new Set();
|
|
41
|
-
byLabel.set(label, colors);
|
|
42
|
-
}
|
|
43
|
-
if (!colors.has(color)) {
|
|
44
|
-
colors.add(color);
|
|
45
|
-
candidates.push({ rowIndex, label, color });
|
|
46
|
-
}
|
|
26
|
+
add(rowIndex, value, color) {
|
|
27
|
+
const id = `${rowIndex}\u0000${color}\u0000${value}`;
|
|
28
|
+
if (candidates.length < maxCandidates && !seen.has(id)) {
|
|
29
|
+
seen.add(id);
|
|
30
|
+
candidates.push({ rowIndex, value, color });
|
|
47
31
|
}
|
|
48
32
|
},
|
|
49
33
|
};
|
|
50
34
|
}
|
|
51
35
|
/**
|
|
52
36
|
* The categorical color key over any number of packed regions: one entry per
|
|
53
|
-
* distinct color
|
|
54
|
-
* order.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* row is normally a toggle and hiding a category hides features BY color, so two
|
|
58
|
-
* names sharing one color must collapse to a single row. A name reused across
|
|
59
|
-
* two colors keeps its first-seen color.
|
|
37
|
+
* distinct color listing every value painted in it, colors in first-seen
|
|
38
|
+
* order. Keyed by color rather than by value because hiding a category hides
|
|
39
|
+
* features BY color, so two values sharing one color are one row that names
|
|
40
|
+
* both; a value met in two colors stays with the first.
|
|
60
41
|
*
|
|
61
|
-
* `[]` when
|
|
62
|
-
* `
|
|
63
|
-
*
|
|
64
|
-
* `regions` is consumed lazily, so a caller able to answer without reading any
|
|
65
|
-
* of them can pass a generator and have none of them touched.
|
|
42
|
+
* `[]` when there are more than `maxEntries` distinct colors, where the data is
|
|
43
|
+
* not a categorical vocabulary. `regions` is consumed lazily.
|
|
66
44
|
*/
|
|
67
45
|
export function unionLegendCandidates(regions, resolve, maxEntries = MAX_LEGEND_ENTRIES) {
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const seenLabels = new Set();
|
|
46
|
+
const rows = new Map();
|
|
47
|
+
const seenValues = new Set();
|
|
71
48
|
for (const region of regions) {
|
|
72
49
|
const { candidates, rowPaintsCandidateColor } = resolve(region);
|
|
73
|
-
for (const { rowIndex,
|
|
74
|
-
if (rowPaintsCandidateColor(rowIndex)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
for (const { rowIndex, value, color } of candidates) {
|
|
51
|
+
if (!rowPaintsCandidateColor(rowIndex) || seenValues.has(value)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
seenValues.add(value);
|
|
55
|
+
const row = rows.get(color);
|
|
56
|
+
if (row) {
|
|
57
|
+
row.values.push(value);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
rows.set(color, { values: [value], color });
|
|
61
|
+
if (rows.size > maxEntries) {
|
|
81
62
|
return [];
|
|
82
63
|
}
|
|
83
64
|
}
|
|
84
65
|
}
|
|
85
66
|
}
|
|
86
|
-
return
|
|
67
|
+
return [...rows.values()];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The one categorical key a color channel derives from what a worker painted:
|
|
71
|
+
* the union above over the loaded regions, each row a painted color naming
|
|
72
|
+
* every value in it through `field` and ordered by it, and nothing where the
|
|
73
|
+
* rows would say nothing (`legendIsReadable`). A display resolving its own colors hands the
|
|
74
|
+
* candidates its packer recorded; one resolved by `encodeFeatures` hands the
|
|
75
|
+
* entries of the scale tables that came back. Either way the key lists what
|
|
76
|
+
* the painting holds, and a `closed` field's domain besides once anything
|
|
77
|
+
* painted.
|
|
78
|
+
*/
|
|
79
|
+
export function derivedColorScale(regions, resolve, { id, field, maxItems, }) {
|
|
80
|
+
const painted = unionLegendCandidates(regions, resolve).map(({ values, color }) => {
|
|
81
|
+
const sorted = values.toSorted(field.compare);
|
|
82
|
+
const value = sorted[0];
|
|
83
|
+
return {
|
|
84
|
+
value,
|
|
85
|
+
values: sorted,
|
|
86
|
+
label: sorted.map(v => field.label(v)).join(', '),
|
|
87
|
+
color: abgrToCssRgba(color),
|
|
88
|
+
...(value === '' ? { missing: true } : {}),
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const named = new Set(painted.flatMap(e => e.values));
|
|
92
|
+
const unpainted = field.closed && painted.length > 0
|
|
93
|
+
? field.domain
|
|
94
|
+
.filter(value => !named.has(value))
|
|
95
|
+
.map(value => ({
|
|
96
|
+
value,
|
|
97
|
+
label: field.label(value),
|
|
98
|
+
color: abgrToCssRgba(cssColorToABGR(field.color(value))),
|
|
99
|
+
}))
|
|
100
|
+
: [];
|
|
101
|
+
const entries = [...painted, ...unpainted].sort((a, b) => field.compare(a.value, b.value));
|
|
102
|
+
return legendIsReadable(entries, maxItems)
|
|
103
|
+
? [
|
|
104
|
+
{
|
|
105
|
+
kind: 'categorical',
|
|
106
|
+
id,
|
|
107
|
+
title: field.field,
|
|
108
|
+
...(field.domain.length > 0 ? { domain: field.domain } : {}),
|
|
109
|
+
entries,
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
: [];
|
|
87
113
|
}
|
package/esm/util/localStorage.js
CHANGED
|
@@ -12,10 +12,10 @@ export const { available: localStorageAvailable, getItem: localStorageGetItem, s
|
|
|
12
12
|
// and has to be announced by hand. Missing that half is what let two components
|
|
13
13
|
// on one key show different values until one of them remounted.
|
|
14
14
|
//
|
|
15
|
-
// Announcing is deliberately not folded into localStorageSetItem.
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
15
|
+
// Announcing is deliberately not folded into localStorageSetItem. A writer
|
|
16
|
+
// that persists from an autorun over its own state would, if its write called
|
|
17
|
+
// its own subscriber back, re-enter that autorun and write again, forever. A
|
|
18
|
+
// writer says when its write is news.
|
|
19
19
|
const listeners = new Map();
|
|
20
20
|
// Installed on the first subscription rather than at module scope, so importing
|
|
21
21
|
// this file from a worker or a test never touches `window`.
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
+
import Flatbush from './flatbush/index.ts';
|
|
1
2
|
import type { JexlInstance } from './jexlStrings.ts';
|
|
2
|
-
import type { ColorEncoding, Encoded, EncodedChannels, FieldRef, GlyphEncoding, LaneName
|
|
3
|
+
import type { ColorEncoding, ColorScaleTable, Encoded, EncodedChannels, FieldRef, GlyphEncoding, LaneName } from './markEncodingTypes.ts';
|
|
3
4
|
import type { ProgressReporter } from './progress.ts';
|
|
4
5
|
import type { Feature } from './simpleFeature.ts';
|
|
5
|
-
export type { AggregateOp, AggregateStep, BinStep, CategoricalRef, ColorEncoding, CoverageStep, ColorScaleTable, CoreEncodeFeaturesArgs, Encoded, EncodedChannels, EncodedFeaturesResult, FieldRef, FilterStep, FormulaStep, GlyphEncoding, GlyphName, GlyphScaleTable, LaneName, LayerRequest, MarkEncoding,
|
|
6
|
+
export type { AggregateOp, AggregateStep, BinStep, CategoricalRef, ColorEncoding, ContinuousRef, CoverageStep, ColorScaleTable, CoreEncodeFeaturesArgs, Encoded, EncodedChannels, EncodedFeaturesResult, FacetSection, FacetSpec, FieldRef, FilterStep, FormulaStep, GlyphEncoding, GlyphName, GlyphScaleTable, LaneName, LayerRequest, MarkEncoding, ScaleTable, ThresholdRef, TransformStep, } from './markEncodingTypes.ts';
|
|
7
|
+
export type { ColorSchemeName } from './colorSchemes.ts';
|
|
8
|
+
export { COLOR_SCHEMES } from './colorSchemes.ts';
|
|
9
|
+
export { NO_VALUE_LABEL } from './categoricalField.ts';
|
|
6
10
|
export declare const DEFAULT_MARK_COLOR = "#0068d1";
|
|
7
|
-
/**
|
|
8
|
-
* #api
|
|
9
|
-
* The key row a feature with nothing in a categorical field lands on, so the
|
|
10
|
-
* legend says why a mark is grey, or a disc, rather than listing a blank
|
|
11
|
-
* value.
|
|
12
|
-
*/
|
|
13
|
-
export declare const NO_VALUE_LABEL = "(no value)";
|
|
14
11
|
/**
|
|
15
12
|
* #api
|
|
16
13
|
* A channel read per feature: the compiled form of a {@link FieldRef}, and
|
|
@@ -22,14 +19,16 @@ export type ChannelReader<T = unknown> = (feature: Feature) => T;
|
|
|
22
19
|
/**
|
|
23
20
|
* #api
|
|
24
21
|
* What `encodeFeatures` takes: a {@link MarkEncoding}, any channel of which
|
|
25
|
-
* may be a {@link ChannelReader} in place of its declared form
|
|
26
|
-
*
|
|
22
|
+
* may be a {@link ChannelReader} in place of its declared form, and `row` the
|
|
23
|
+
* values themselves, one per input feature, where the caller computed them —
|
|
24
|
+
* a facet's stacked rows. The declared form is what crosses the wire; a
|
|
25
|
+
* reader or a value list is built in the worker.
|
|
27
26
|
*/
|
|
28
27
|
export interface MarkEncodingInput {
|
|
29
28
|
x?: FieldRef | ChannelReader;
|
|
30
29
|
x2?: FieldRef | ChannelReader;
|
|
31
|
-
y?:
|
|
32
|
-
row?: FieldRef | ChannelReader
|
|
30
|
+
y?: FieldRef | ChannelReader;
|
|
31
|
+
row?: FieldRef | ChannelReader | ArrayLike<number>;
|
|
33
32
|
color?: ColorEncoding | ChannelReader<number>;
|
|
34
33
|
glyph?: GlyphEncoding | ChannelReader<number>;
|
|
35
34
|
}
|
|
@@ -45,10 +44,10 @@ export interface EncodeContext {
|
|
|
45
44
|
}
|
|
46
45
|
/**
|
|
47
46
|
* #api
|
|
48
|
-
* The
|
|
49
|
-
*
|
|
47
|
+
* The hit index over `count` instances: each a box from `x` to `x2` at its
|
|
48
|
+
* `y`, or at 0 for a mark with no value.
|
|
50
49
|
*/
|
|
51
|
-
export declare function
|
|
50
|
+
export declare function hitIndexOf(x: Uint32Array, x2: Uint32Array, y: Float32Array | undefined, count?: number): Flatbush;
|
|
52
51
|
/**
|
|
53
52
|
* #api
|
|
54
53
|
* Evaluate one encoding over a feature list into dense channel arrays for
|
|
@@ -61,6 +60,23 @@ export declare function valueField(y: ValueEncoding): FieldRef;
|
|
|
61
60
|
* transferables.
|
|
62
61
|
*/
|
|
63
62
|
export declare function encodeFeatures<L extends LaneName>(features: readonly Feature[], encoding: MarkEncodingInput, lanes: readonly L[], ctx?: EncodeContext): Encoded<L>;
|
|
63
|
+
/**
|
|
64
|
+
* #api
|
|
65
|
+
* A ramp table over `extent`, the union a display took across the regions it
|
|
66
|
+
* loaded: each open end of the domain moved to the union's, the pinned ends
|
|
67
|
+
* kept, and the table baked again where a `domainMid` places its middle stop
|
|
68
|
+
* by that domain. Each region baked its own, so keeping the first region's
|
|
69
|
+
* put the middle colour at a value none of them declared.
|
|
70
|
+
*
|
|
71
|
+
* One table per stop list and middle position, so a display asking again over
|
|
72
|
+
* an extent that has not moved gets the bytes it already uploaded: a backend
|
|
73
|
+
* re-uploads a ramp on identity.
|
|
74
|
+
*/
|
|
75
|
+
export declare function rampOverExtent(table: Extract<ColorScaleTable, {
|
|
76
|
+
kind: 'ramp';
|
|
77
|
+
}>, extent: [number, number]): Extract<ColorScaleTable, {
|
|
78
|
+
kind: 'ramp';
|
|
79
|
+
}>;
|
|
64
80
|
/**
|
|
65
81
|
* #api
|
|
66
82
|
* A CSS colour or `jexl:` colour expression as a per-feature packed ABGR —
|