@jbrowse/core 5.0.0-beta.4 → 5.0.0-beta.7

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.
Files changed (110) hide show
  1. package/README.md +278 -250
  2. package/esm/PluginManager.js +1 -1
  3. package/esm/ReExports/publicUi.d.ts +1 -1
  4. package/esm/ReExports/publicUi.js +1 -1
  5. package/esm/ReExports/publicUtil.d.ts +1 -1
  6. package/esm/ReExports/publicUtil.js +1 -1
  7. package/esm/ReExports/workerNamespaceNames.js +3 -9
  8. package/esm/assemblyManager/assemblyConfigSchema.d.ts +2 -1
  9. package/esm/assemblyManager/assemblyConfigSchema.js +2 -1
  10. package/esm/assemblyManager/expandAssemblyConfigShorthand.d.ts +15 -15
  11. package/esm/assemblyManager/expandAssemblyConfigShorthand.js +34 -18
  12. package/esm/configuration/configurationSchema.d.ts +1 -2
  13. package/esm/configuration/configurationSchema.js +3 -8
  14. package/esm/configuration/configurationSlot.d.ts +0 -47
  15. package/esm/configuration/configurationSlot.js +4 -54
  16. package/esm/configuration/fillLocations.d.ts +14 -0
  17. package/esm/configuration/fillLocations.js +14 -0
  18. package/esm/configuration/fullConfSnapshot.d.ts +0 -15
  19. package/esm/configuration/fullConfSnapshot.js +0 -28
  20. package/esm/configuration/getConf.d.ts +4 -34
  21. package/esm/configuration/getConf.js +3 -38
  22. package/esm/configuration/index.d.ts +3 -4
  23. package/esm/configuration/index.js +3 -2
  24. package/esm/configuration/schemaRegistry.d.ts +1 -2
  25. package/esm/configuration/schemaRegistry.js +1 -2
  26. package/esm/configuration/slotFacade.d.ts +1 -16
  27. package/esm/configuration/slotFacade.js +1 -2
  28. package/esm/configuration/tabixShorthand.js +3 -3
  29. package/esm/configuration/types.d.ts +4 -16
  30. package/esm/data_adapters/CytobandAdapter/configSchema.js +3 -4
  31. package/esm/pluggableElementTypes/DisplayType.d.ts +5 -3
  32. package/esm/pluggableElementTypes/DisplayType.js +3 -1
  33. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +30 -0
  34. package/esm/pluggableElementTypes/models/BaseTrackModel.js +45 -17
  35. package/esm/rpc/RpcRegistry.d.ts +7 -1
  36. package/esm/rpc/coreRpcMethods.d.ts +1 -0
  37. package/esm/rpc/coreRpcMethods.js +1 -0
  38. package/esm/rpc/methods/CoreEncodeFeatures.d.ts +15 -0
  39. package/esm/rpc/methods/CoreEncodeFeatures.js +62 -0
  40. package/esm/svg/svgId.d.ts +1 -1
  41. package/esm/svg/svgId.js +1 -1
  42. package/esm/ui/LegendSwatchGlyph.js +26 -21
  43. package/esm/ui/MenuTypes.d.ts +5 -52
  44. package/esm/ui/SizeSliderRow.d.ts +1 -3
  45. package/esm/ui/SizeSliderRow.js +4 -6
  46. package/esm/ui/SvgColorLegend.d.ts +9 -3
  47. package/esm/ui/SvgColorLegend.js +74 -33
  48. package/esm/ui/colorScale.d.ts +64 -0
  49. package/esm/ui/colorScale.js +41 -0
  50. package/esm/ui/colors.d.ts +11 -0
  51. package/esm/ui/colors.js +7 -0
  52. package/esm/ui/index.d.ts +5 -7
  53. package/esm/ui/index.js +3 -13
  54. package/esm/ui/legendMenuItem.d.ts +5 -16
  55. package/esm/ui/legendMenuItem.js +3 -14
  56. package/esm/ui/legendSpec.d.ts +11 -5
  57. package/esm/ui/legendSpec.js +8 -11
  58. package/esm/ui/makeSizeMenu.d.ts +0 -6
  59. package/esm/ui/makeSizeMenu.js +6 -30
  60. package/esm/ui/measureLegendText.js +1 -1
  61. package/esm/ui/menuItemAdornment.d.ts +9 -19
  62. package/esm/ui/menuItemAdornment.js +10 -31
  63. package/esm/ui/menuItems.d.ts +2 -6
  64. package/esm/ui/menuItems.js +0 -4
  65. package/esm/ui/palette.js +2 -1
  66. package/esm/ui/toggleMenuItems.d.ts +6 -13
  67. package/esm/ui/toggleMenuItems.js +13 -29
  68. package/esm/util/colorRamp.d.ts +3 -3
  69. package/esm/util/colorRamp.js +2 -2
  70. package/esm/util/featureTransforms.d.ts +15 -0
  71. package/esm/util/featureTransforms.js +342 -0
  72. package/esm/util/freezeDeep.d.ts +8 -10
  73. package/esm/util/freezeDeep.js +8 -10
  74. package/esm/util/glyphNames.d.ts +8 -0
  75. package/esm/util/glyphNames.js +12 -0
  76. package/esm/util/index.d.ts +0 -1
  77. package/esm/util/index.js +0 -1
  78. package/esm/util/markEncoding.d.ts +76 -0
  79. package/esm/util/markEncoding.js +436 -0
  80. package/esm/util/markEncodingTypes.d.ts +331 -0
  81. package/esm/util/markEncodingTypes.js +8 -0
  82. package/esm/util/renderToStaticMarkup.js +1 -1
  83. package/esm/util/starFusion.d.ts +26 -0
  84. package/esm/util/starFusion.js +37 -0
  85. package/esm/util/trackConfigDelta.d.ts +4 -8
  86. package/esm/util/trackConfigDelta.js +2 -4
  87. package/esm/util/tracks.d.ts +7 -1
  88. package/esm/util/tracks.js +72 -7
  89. package/esm/util/types/index.d.ts +12 -4
  90. package/esm/util/whenViewSettled.d.ts +9 -0
  91. package/esm/util/whenViewSettled.js +12 -4
  92. package/package.json +13 -3
  93. package/esm/configuration/promotableDefaults.d.ts +0 -234
  94. package/esm/configuration/promotableDefaults.js +0 -395
  95. package/esm/configuration/promotablePin.d.ts +0 -65
  96. package/esm/configuration/promotablePin.js +0 -1
  97. package/esm/configuration/promotableResolve.d.ts +0 -108
  98. package/esm/configuration/promotableResolve.js +0 -117
  99. package/esm/configuration/promotableSlots.d.ts +0 -12
  100. package/esm/configuration/promotableSlots.js +0 -45
  101. package/esm/configuration/slotShape.d.ts +0 -12
  102. package/esm/configuration/slotShape.js +0 -84
  103. package/esm/ui/PinAdornment.d.ts +0 -5
  104. package/esm/ui/PinAdornment.js +0 -67
  105. package/esm/ui/SvgGradientLegend.d.ts +0 -26
  106. package/esm/ui/SvgGradientLegend.js +0 -26
  107. package/esm/ui/promotablePinCoverage.d.ts +0 -58
  108. package/esm/ui/promotablePinCoverage.js +0 -124
  109. package/esm/util/openDisplays.d.ts +0 -23
  110. package/esm/util/openDisplays.js +0 -79
@@ -619,7 +619,7 @@ export default class PluginManager {
619
619
  const displays = this.getElementTypesInGroup('display');
620
620
  for (const display of displays) {
621
621
  // track may have already added the displayType in its cb
622
- if (display.trackType === track.name &&
622
+ if ([display.trackType].flat().includes(track.name) &&
623
623
  !track.displayTypes.includes(display)) {
624
624
  track.addDisplayType(display);
625
625
  }
@@ -1,4 +1,4 @@
1
1
  import type { ComponentProps } from 'react';
2
2
  declare const LazyBaseTooltip: import("react").LazyExoticComponent<typeof import("../ui/BaseTooltip.tsx").default>;
3
3
  export declare function BaseTooltip(props: ComponentProps<typeof LazyBaseTooltip>): import("react").JSX.Element;
4
- export { ActionLink, AssemblySelector, BaseExportSvgDialog, CONTEXT_MENU_Z_INDEX, CascadingMenu, CascadingMenuButton, ConfirmDialog, ContextMenu, CopyToClipboardButton, Crosshairs, Dialog, EditableTypography, ErrorBanner, ErrorBar, ErrorMessage, ErrorOverlay, ExportSvgDialog, ExternalLink, FatalErrorDialog, FileDropZone, FileSelector, GRADIENT_LEGEND_HEIGHT, GRADIENT_LEGEND_SVG_AREA_WIDTH, GRADIENT_LEGEND_WIDTH, GpuFallbackButton, INLINE_MENU_ROW_WIDTH, InfoDialog, JexlFilterDialog, LAUNCH_LABEL, LEGEND_ROW_HEIGHT, LEGEND_SWATCH, LabeledCheckbox, LegendSwatchGlyph, LoadingEllipses, LoadingOverlay, LoadingProgress, LogoFull, Logomark, MAX_LEGEND_ITEMS, Menu, MonospaceTextField, NumberTextField, PinAdornment, PluggableComponent, PluggableComponents, PluggableElements, PrerenderedCanvas, ProgressChip, RefNameAutocomplete, RefNameAutocompleteEndAdornment, ReplaceCurrentViewButton, ResetToDefaultButton, ResizeHandle, SanitizedHTML, ScrollChrome, ScrollEdgeShadow, SettingsChangesTable, ShareLinkField, SingleSlider, SliderTooltip, StatusProgressBar, SubmitDialog, SubmitForm, SvgColorLegend, SvgGradientLegend, TOOLTIP_Z_INDEX, TagTextField, VIEW_HEADER_HEIGHT, VerticalScrollbar, ViewLoadingScreen, addExtensionElement, adornmentReservePx, checkboxItem, colorFwdStrand, colorInterchrom, colorLongInsert, colorLongreadInv, colorNeutralRead, colorPairLL, colorPairLR, colorPairLRDark, colorPairRL, colorPairRR, colorRevStrand, colorShortInsert, colorSplitReadInversion, colorSupplementary, colorUnmappedMate, colorUnmappedMateDark, createJBrowseBaseTheme, createJBrowseTheme, createJBrowseThemeFromArgs, defaultThemes, displayTypesWithPromotableSlots, getInputWidth, hoverBoxStyle, launchTargetsMenuItem, legendEntries, legendIsReadable, legendSwatches, makePromotableSizeMenu, makeSizeMenu, makeSizeSubMenu, matchesTrackSelector, measureLegendText, methylated5hmC, methylated5mC, misKindedPins, nonEmptyLegendSections, promotableSlotsWithoutPin, pushIntoSubMenu, pushLaunchViewMenuItem, radioItems, replaceViewAction, resolveSubMenu, sliderScale, staysOpenOnClick, tagColorPalette, unmethylated5mC, useAssemblySelection, useCopyToClipboard, useExportSvgPreference, useMouseState, useMouseTracking, useRecentLocations, wrapComponent, } from '../ui/index.ts';
4
+ export { ActionLink, AssemblySelector, BaseExportSvgDialog, CONTEXT_MENU_Z_INDEX, CascadingMenu, CascadingMenuButton, ConfirmDialog, ContextMenu, CopyToClipboardButton, Crosshairs, Dialog, EditableTypography, ErrorBanner, ErrorBar, ErrorMessage, ErrorOverlay, ExportSvgDialog, ExternalLink, FatalErrorDialog, FileDropZone, FileSelector, GpuFallbackButton, INLINE_MENU_ROW_WIDTH, InfoDialog, JexlFilterDialog, LAUNCH_LABEL, LEGEND_ROW_HEIGHT, LEGEND_SVG_GUTTER_WIDTH, LEGEND_SWATCH, LabeledCheckbox, LegendSwatchGlyph, LoadingEllipses, LoadingOverlay, LoadingProgress, LogoFull, Logomark, MAX_LEGEND_ITEMS, Menu, MonospaceTextField, NumberTextField, PluggableComponent, PluggableComponents, PluggableElements, PrerenderedCanvas, ProgressChip, RefNameAutocomplete, RefNameAutocompleteEndAdornment, ReplaceCurrentViewButton, ResetToDefaultButton, ResizeHandle, SanitizedHTML, ScrollChrome, ScrollEdgeShadow, SettingsChangesTable, ShareLinkField, SingleSlider, SliderTooltip, StatusProgressBar, SubmitDialog, SubmitForm, SvgColorLegend, TOOLTIP_Z_INDEX, TagTextField, VIEW_HEADER_HEIGHT, VerticalScrollbar, ViewLoadingScreen, addExtensionElement, adornmentReservePx, checkboxItem, colorFwdStrand, colorInterchrom, colorLongInsert, colorLongreadInv, colorNeutralRead, colorPairLL, colorPairLR, colorPairLRDark, colorPairRL, colorPairRR, colorRevStrand, colorScaleIsEmpty, colorShortInsert, colorSplitReadInversion, colorSupplementary, colorUnmappedMate, colorUnmappedMateDark, createJBrowseBaseTheme, createJBrowseTheme, createJBrowseThemeFromArgs, defaultThemes, getInputWidth, hoverBoxStyle, launchTargetsMenuItem, legendEntries, legendIsReadable, legendSpecOf, legendSwatches, makeSizeMenu, makeSizeSubMenu, matchesTrackSelector, measureLegendText, methylated5hmC, methylated5mC, nonEmptyLegendSections, pushIntoSubMenu, pushLaunchViewMenuItem, radioItems, replaceViewAction, resolveSubMenu, sliderScale, staysOpenOnClick, tagColorPalette, unmethylated5mC, useAssemblySelection, useCopyToClipboard, useExportSvgPreference, useMouseState, useMouseTracking, useRecentLocations, wrapComponent, } from '../ui/index.ts';
@@ -30,4 +30,4 @@ const LazyBaseTooltip = lazy(() => import('../ui/BaseTooltip.js'));
30
30
  export function BaseTooltip(props) {
31
31
  return (_jsx(Suspense, { fallback: null, children: _jsx(LazyBaseTooltip, { ...props }) }));
32
32
  }
33
- export { ActionLink, AssemblySelector, BaseExportSvgDialog, CONTEXT_MENU_Z_INDEX, CascadingMenu, CascadingMenuButton, ConfirmDialog, ContextMenu, CopyToClipboardButton, Crosshairs, Dialog, EditableTypography, ErrorBanner, ErrorBar, ErrorMessage, ErrorOverlay, ExportSvgDialog, ExternalLink, FatalErrorDialog, FileDropZone, FileSelector, GRADIENT_LEGEND_HEIGHT, GRADIENT_LEGEND_SVG_AREA_WIDTH, GRADIENT_LEGEND_WIDTH, GpuFallbackButton, INLINE_MENU_ROW_WIDTH, InfoDialog, JexlFilterDialog, LAUNCH_LABEL, LEGEND_ROW_HEIGHT, LEGEND_SWATCH, LabeledCheckbox, LegendSwatchGlyph, LoadingEllipses, LoadingOverlay, LoadingProgress, LogoFull, Logomark, MAX_LEGEND_ITEMS, Menu, MonospaceTextField, NumberTextField, PinAdornment, PluggableComponent, PluggableComponents, PluggableElements, PrerenderedCanvas, ProgressChip, RefNameAutocomplete, RefNameAutocompleteEndAdornment, ReplaceCurrentViewButton, ResetToDefaultButton, ResizeHandle, SanitizedHTML, ScrollChrome, ScrollEdgeShadow, SettingsChangesTable, ShareLinkField, SingleSlider, SliderTooltip, StatusProgressBar, SubmitDialog, SubmitForm, SvgColorLegend, SvgGradientLegend, TOOLTIP_Z_INDEX, TagTextField, VIEW_HEADER_HEIGHT, VerticalScrollbar, ViewLoadingScreen, addExtensionElement, adornmentReservePx, checkboxItem, colorFwdStrand, colorInterchrom, colorLongInsert, colorLongreadInv, colorNeutralRead, colorPairLL, colorPairLR, colorPairLRDark, colorPairRL, colorPairRR, colorRevStrand, colorShortInsert, colorSplitReadInversion, colorSupplementary, colorUnmappedMate, colorUnmappedMateDark, createJBrowseBaseTheme, createJBrowseTheme, createJBrowseThemeFromArgs, defaultThemes, displayTypesWithPromotableSlots, getInputWidth, hoverBoxStyle, launchTargetsMenuItem, legendEntries, legendIsReadable, legendSwatches, makePromotableSizeMenu, makeSizeMenu, makeSizeSubMenu, matchesTrackSelector, measureLegendText, methylated5hmC, methylated5mC, misKindedPins, nonEmptyLegendSections, promotableSlotsWithoutPin, pushIntoSubMenu, pushLaunchViewMenuItem, radioItems, replaceViewAction, resolveSubMenu, sliderScale, staysOpenOnClick, tagColorPalette, unmethylated5mC, useAssemblySelection, useCopyToClipboard, useExportSvgPreference, useMouseState, useMouseTracking, useRecentLocations, wrapComponent, } from '../ui/index.js';
33
+ export { ActionLink, AssemblySelector, BaseExportSvgDialog, CONTEXT_MENU_Z_INDEX, CascadingMenu, CascadingMenuButton, ConfirmDialog, ContextMenu, CopyToClipboardButton, Crosshairs, Dialog, EditableTypography, ErrorBanner, ErrorBar, ErrorMessage, ErrorOverlay, ExportSvgDialog, ExternalLink, FatalErrorDialog, FileDropZone, FileSelector, GpuFallbackButton, INLINE_MENU_ROW_WIDTH, InfoDialog, JexlFilterDialog, LAUNCH_LABEL, LEGEND_ROW_HEIGHT, LEGEND_SVG_GUTTER_WIDTH, LEGEND_SWATCH, LabeledCheckbox, LegendSwatchGlyph, LoadingEllipses, LoadingOverlay, LoadingProgress, LogoFull, Logomark, MAX_LEGEND_ITEMS, Menu, MonospaceTextField, NumberTextField, PluggableComponent, PluggableComponents, PluggableElements, PrerenderedCanvas, ProgressChip, RefNameAutocomplete, RefNameAutocompleteEndAdornment, ReplaceCurrentViewButton, ResetToDefaultButton, ResizeHandle, SanitizedHTML, ScrollChrome, ScrollEdgeShadow, SettingsChangesTable, ShareLinkField, SingleSlider, SliderTooltip, StatusProgressBar, SubmitDialog, SubmitForm, SvgColorLegend, TOOLTIP_Z_INDEX, TagTextField, VIEW_HEADER_HEIGHT, VerticalScrollbar, ViewLoadingScreen, addExtensionElement, adornmentReservePx, checkboxItem, colorFwdStrand, colorInterchrom, colorLongInsert, colorLongreadInv, colorNeutralRead, colorPairLL, colorPairLR, colorPairLRDark, colorPairRL, colorPairRR, colorRevStrand, colorScaleIsEmpty, colorShortInsert, colorSplitReadInversion, colorSupplementary, colorUnmappedMate, colorUnmappedMateDark, createJBrowseBaseTheme, createJBrowseTheme, createJBrowseThemeFromArgs, defaultThemes, getInputWidth, hoverBoxStyle, launchTargetsMenuItem, legendEntries, legendIsReadable, legendSpecOf, legendSwatches, makeSizeMenu, makeSizeSubMenu, matchesTrackSelector, measureLegendText, methylated5hmC, methylated5mC, nonEmptyLegendSections, pushIntoSubMenu, pushLaunchViewMenuItem, radioItems, replaceViewAction, resolveSubMenu, sliderScale, staysOpenOnClick, tagColorPalette, unmethylated5mC, useAssemblySelection, useCopyToClipboard, useExportSvgPreference, useMouseState, useMouseTracking, useRecentLocations, wrapComponent, } from '../ui/index.js';
@@ -1 +1 @@
1
- export { AuthNeededError, BEZIER_CONNECTOR_MAX_REACH_PX, ENCODED_PREFIX, IUPAC_MOTIF_REGEX, IntervalTree, JSON_PREFIX, MAX_ZOOM_RATE_PER_MS, SCROLL_ZOOM_FACTOR_DIVISOR, SHARE_PREFIX, SimpleFeature, UNKNOWN, UNSUPPORTED, UnknownRefNameError, ZOOM_ACTIVE_WINDOW_MS, accumulateScroll, adapterConfigFromSpec, addAdapterGuesser, addAddTrackComponent, addAndShowTrack, addOrReplaceView, addTrackFromWidget, addTrackTypeGuesser, aesDecrypt, aesEncrypt, animationAllowed, applyOrderWithin, applyZoomAccum, assembleLocString, assembleLocStringRaw, avg, b64PadSuffix, bezierConnectorPath, bpSpanPx, bpToPx, bytesForRegions, calculateRedispatchRange, canReplaceView, capitalizeFirst, checkStopToken, checkStopTokenThrottled, clamp, clearFileFromCache, cmpStr, coarseStripHTML, codonTable, compareLocStrings, compareLocs, complement, complementTable, createProgressReporter, createScrollLatch, createSharedSetup, createStatusChannel, createStatusFanOut, createStatusWindow, createStopToken, createStopTokenChecker, createStopTokenRotation, dedupe, defaultCodonTable, defaultStarts, diagonalizeRegions, diffTrackConfig, doesIntersect2, downloadStatus, drawImageOntoCanvasContext, encodeSessionParam, ensureFileHandleReady, expandLooseTrackConfig, featureSpanPx, fetchAndMaybeUnzip, fetchAndMaybeUnzipText, fetchJson, fileToLocation, findFileHandleIds, findParentThat, findParentThatIs, flattenTrackConfigDelta, formatRelativeTime, fromUrlSafeB64, gatherOverlaps, generateCodonTable, generateUnknownTrackConf, generateUnsupportedTrackConf, getAssemblyHost, getBlob, getBlobMap, getBpDisplayStr, getConfAssemblyNames, getContainingDisplay, getContainingTrack, getContainingView, getDialogHost, getEnv, launchOrReplaceView, getFileFromCache, getFileHandle, getFileName, getFillProps, getFrame, getNotificationSink, getNumberGrouping, getPaletteHost, getPluginUpdate, getRenderingServices, getRpcHost, getRpcSessionId, getSession, getSessionServices, getStr, getStrokeProps, getTickDisplayStr, getTrackAssemblyNames, getTrackName, getZoomNormalizer, groupBy, guessAdapter, guessTrackConf, guessTrackType, hasFileHandlesInCache, hasSharedArrayBuffer, hashCode, hideTrackGeneric, installedVersionFromUrl, intersection2, isAbortException, isAbstractMenuManager, isActivelyZooming, isAppRootModel, isAuthNeededException, isBlobLocation, isDataCurrent, isDisplayModel, isElectron, isFeature, isFileHandleLocation, isFileSystemAccessSupported, isGeneLikeType, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, isSequenceMatchType, isSessionModel, isSessionServices, isSessionModelWithConfigEditing, isSessionModelWithConnectionEditing, isSessionModelWithConnections, isSessionModelWithWidgets, isSessionWithAddAssembly, isSessionWithAddSessionTrack, isSessionWithAddTracks, isSessionWithPublishTrackConf, isSessionWithDeleteTrackConf, isSessionWithSessionPlugins, isSessionWithSessionTracks, isSessionWithShareURL, isSessionWithViewReplacement, isStopToken, isStopped, isSupportedIndexingAdapter, isTrackModel, isTrackViewModel, isUriLocation, isValidTag, isViewContainer, isViewModel, iupacToRegex, linkify, locStringsToRegions, localStorageGetBoolean, localStorageGetItem, localStorageGetJSON, localStorageGetNumber, localStorageRemoveItem, localStorageSetBoolean, localStorageSetItem, localStorageSetJSON, localStorageSetNumber, makeAbortError, makeIndex, makeIndexType, makeTrackId, markStopTokenStopped, matchTrackId, max, maxFinite, measureGridWidth, measureText, mergeIntervals, mergeTrackConfig, min, minmax, normalizeWheelDelta, notEmpty, objectHash, openFeatureWidget, openPromotableDisplays, parseLocString, parseLocStringOneBased, parseMotifList, pluralize, polarToCartesian, progressLabel, rIC, radToDeg, readSessionFromDynamo, reducePrecision, registerStopTokenBroadcaster, renameRegionIfNeeded, renameRegionsIfNeeded, reorder, reorderWithin, resolvePlugin, resolveSelectedIds, restoreFileHandles, restoreFileHandlesFromSnapshot, revcom, reverse, reverseComplementIupac, revlist, saveAs, scheduleDetachedDestroy, saveSvgAsImage, selectNamedRegions, setBlobMap, setFileInCache, setNumberGrouping, sha256, sha256Base64, sha256Base64Url, shareEndpoint, shorten, shorten2, showTrackGeneric, springAnimate, statusFraction, statusMessageText, statusProgressLabel, statusReading, stitch, stopStopToken, stopTokenSignal, storeBlobLocation, storeFileHandle, storeFileHandleLocation, stringify, stripAlpha, stripFileExtension, stripTrackIds, sum, svgHtmlToPngBlob, tagRegex, testAdapter, toBase64, toBase64Url, toLocale, toUrlSafeB64, toggleTrackGeneric, truncateMiddle, updateStatus, useDebounce, useLocalStorage, useWidthSetter, verifyPermission, wheelFrameElapsedMs, wheelZoomAccum, withProgress, withStopTokenCheck, withStopTokenSignal, } from '../util/index.ts';
1
+ export { AuthNeededError, BEZIER_CONNECTOR_MAX_REACH_PX, ENCODED_PREFIX, IUPAC_MOTIF_REGEX, IntervalTree, JSON_PREFIX, MAX_ZOOM_RATE_PER_MS, SCROLL_ZOOM_FACTOR_DIVISOR, SHARE_PREFIX, SimpleFeature, UNKNOWN, UNSUPPORTED, UnknownRefNameError, ZOOM_ACTIVE_WINDOW_MS, accumulateScroll, adapterConfigFromSpec, addAdapterGuesser, addAddTrackComponent, addAndShowTrack, addOrReplaceView, addTrackFromWidget, addTrackTypeGuesser, aesDecrypt, aesEncrypt, animationAllowed, applyOrderWithin, applyZoomAccum, assembleLocString, assembleLocStringRaw, avg, b64PadSuffix, bezierConnectorPath, bpSpanPx, bpToPx, bytesForRegions, calculateRedispatchRange, canReplaceView, capitalizeFirst, checkStopToken, checkStopTokenThrottled, clamp, clearFileFromCache, cmpStr, coarseStripHTML, codonTable, compareLocStrings, compareLocs, complement, complementTable, createProgressReporter, createScrollLatch, createSharedSetup, createStatusChannel, createStatusFanOut, createStatusWindow, createStopToken, createStopTokenChecker, createStopTokenRotation, dedupe, defaultCodonTable, defaultStarts, diagonalizeRegions, diffTrackConfig, doesIntersect2, downloadStatus, drawImageOntoCanvasContext, encodeSessionParam, ensureFileHandleReady, expandLooseTrackConfig, featureSpanPx, fetchAndMaybeUnzip, fetchAndMaybeUnzipText, fetchJson, fileToLocation, findFileHandleIds, findParentThat, findParentThatIs, flattenTrackConfigDelta, formatRelativeTime, fromUrlSafeB64, gatherOverlaps, generateCodonTable, generateUnknownTrackConf, generateUnsupportedTrackConf, getAssemblyHost, getBlob, getBlobMap, getBpDisplayStr, getConfAssemblyNames, getContainingDisplay, getContainingTrack, getContainingView, getDialogHost, getEnv, launchOrReplaceView, getFileFromCache, getFileHandle, getFileName, getFillProps, getFrame, getNotificationSink, getNumberGrouping, getPaletteHost, getPluginUpdate, getRenderingServices, getRpcHost, getRpcSessionId, getSession, getSessionServices, getStr, getStrokeProps, getTickDisplayStr, getTrackAssemblyNames, getTrackName, getZoomNormalizer, groupBy, guessAdapter, guessTrackConf, guessTrackType, hasFileHandlesInCache, hasSharedArrayBuffer, hashCode, hideTrackGeneric, installedVersionFromUrl, intersection2, isAbortException, isAbstractMenuManager, isActivelyZooming, isAppRootModel, isAuthNeededException, isBlobLocation, isDataCurrent, isDisplayModel, isElectron, isFeature, isFileHandleLocation, isFileSystemAccessSupported, isGeneLikeType, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, isSequenceMatchType, isSessionModel, isSessionServices, isSessionModelWithConfigEditing, isSessionModelWithConnectionEditing, isSessionModelWithConnections, isSessionModelWithWidgets, isSessionWithAddAssembly, isSessionWithAddSessionTrack, isSessionWithAddTracks, isSessionWithPublishTrackConf, isSessionWithDeleteTrackConf, isSessionWithSessionPlugins, isSessionWithSessionTracks, isSessionWithShareURL, isSessionWithViewReplacement, isStopToken, isStopped, isSupportedIndexingAdapter, isTrackModel, isTrackViewModel, isUriLocation, isValidTag, isViewContainer, isViewModel, iupacToRegex, linkify, locStringsToRegions, localStorageGetBoolean, localStorageGetItem, localStorageGetJSON, localStorageGetNumber, localStorageRemoveItem, localStorageSetBoolean, localStorageSetItem, localStorageSetJSON, localStorageSetNumber, makeAbortError, makeIndex, makeIndexType, makeTrackId, markStopTokenStopped, matchTrackId, max, maxFinite, measureGridWidth, measureText, mergeIntervals, mergeTrackConfig, min, minmax, normalizeWheelDelta, notEmpty, objectHash, openFeatureWidget, parseLocString, parseLocStringOneBased, parseMotifList, pluralize, polarToCartesian, progressLabel, rIC, radToDeg, readSessionFromDynamo, reducePrecision, registerStopTokenBroadcaster, renameRegionIfNeeded, renameRegionsIfNeeded, reorder, reorderWithin, resolvePlugin, resolveSelectedIds, restoreFileHandles, restoreFileHandlesFromSnapshot, revcom, reverse, reverseComplementIupac, revlist, saveAs, scheduleDetachedDestroy, saveSvgAsImage, selectNamedRegions, setBlobMap, setFileInCache, setNumberGrouping, sha256, sha256Base64, sha256Base64Url, shareEndpoint, shorten, shorten2, showTrackGeneric, springAnimate, statusFraction, statusMessageText, statusProgressLabel, statusReading, stitch, stopStopToken, stopTokenSignal, storeBlobLocation, storeFileHandle, storeFileHandleLocation, stringify, stripAlpha, stripFileExtension, stripTrackIds, sum, svgHtmlToPngBlob, tagRegex, testAdapter, toBase64, toBase64Url, toLocale, toUrlSafeB64, toggleTrackGeneric, truncateMiddle, updateStatus, useDebounce, useLocalStorage, useWidthSetter, verifyPermission, wheelFrameElapsedMs, wheelZoomAccum, withProgress, withStopTokenCheck, withStopTokenSignal, } from '../util/index.ts';
@@ -29,4 +29,4 @@
29
29
  // its barrel does not export, behind lazy(). That is what makes "take it out of
30
30
  // the barrel so it leaves the startup path" a different edit from "stop serving
31
31
  // it to plugins", which here they were not.
32
- export { AuthNeededError, BEZIER_CONNECTOR_MAX_REACH_PX, ENCODED_PREFIX, IUPAC_MOTIF_REGEX, IntervalTree, JSON_PREFIX, MAX_ZOOM_RATE_PER_MS, SCROLL_ZOOM_FACTOR_DIVISOR, SHARE_PREFIX, SimpleFeature, UNKNOWN, UNSUPPORTED, UnknownRefNameError, ZOOM_ACTIVE_WINDOW_MS, accumulateScroll, adapterConfigFromSpec, addAdapterGuesser, addAddTrackComponent, addAndShowTrack, addOrReplaceView, addTrackFromWidget, addTrackTypeGuesser, aesDecrypt, aesEncrypt, animationAllowed, applyOrderWithin, applyZoomAccum, assembleLocString, assembleLocStringRaw, avg, b64PadSuffix, bezierConnectorPath, bpSpanPx, bpToPx, bytesForRegions, calculateRedispatchRange, canReplaceView, capitalizeFirst, checkStopToken, checkStopTokenThrottled, clamp, clearFileFromCache, cmpStr, coarseStripHTML, codonTable, compareLocStrings, compareLocs, complement, complementTable, createProgressReporter, createScrollLatch, createSharedSetup, createStatusChannel, createStatusFanOut, createStatusWindow, createStopToken, createStopTokenChecker, createStopTokenRotation, dedupe, defaultCodonTable, defaultStarts, diagonalizeRegions, diffTrackConfig, doesIntersect2, downloadStatus, drawImageOntoCanvasContext, encodeSessionParam, ensureFileHandleReady, expandLooseTrackConfig, featureSpanPx, fetchAndMaybeUnzip, fetchAndMaybeUnzipText, fetchJson, fileToLocation, findFileHandleIds, findParentThat, findParentThatIs, flattenTrackConfigDelta, formatRelativeTime, fromUrlSafeB64, gatherOverlaps, generateCodonTable, generateUnknownTrackConf, generateUnsupportedTrackConf, getAssemblyHost, getBlob, getBlobMap, getBpDisplayStr, getConfAssemblyNames, getContainingDisplay, getContainingTrack, getContainingView, getDialogHost, getEnv, launchOrReplaceView, getFileFromCache, getFileHandle, getFileName, getFillProps, getFrame, getNotificationSink, getNumberGrouping, getPaletteHost, getPluginUpdate, getRenderingServices, getRpcHost, getRpcSessionId, getSession, getSessionServices, getStr, getStrokeProps, getTickDisplayStr, getTrackAssemblyNames, getTrackName, getZoomNormalizer, groupBy, guessAdapter, guessTrackConf, guessTrackType, hasFileHandlesInCache, hasSharedArrayBuffer, hashCode, hideTrackGeneric, installedVersionFromUrl, intersection2, isAbortException, isAbstractMenuManager, isActivelyZooming, isAppRootModel, isAuthNeededException, isBlobLocation, isDataCurrent, isDisplayModel, isElectron, isFeature, isFileHandleLocation, isFileSystemAccessSupported, isGeneLikeType, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, isSequenceMatchType, isSessionModel, isSessionServices, isSessionModelWithConfigEditing, isSessionModelWithConnectionEditing, isSessionModelWithConnections, isSessionModelWithWidgets, isSessionWithAddAssembly, isSessionWithAddSessionTrack, isSessionWithAddTracks, isSessionWithPublishTrackConf, isSessionWithDeleteTrackConf, isSessionWithSessionPlugins, isSessionWithSessionTracks, isSessionWithShareURL, isSessionWithViewReplacement, isStopToken, isStopped, isSupportedIndexingAdapter, isTrackModel, isTrackViewModel, isUriLocation, isValidTag, isViewContainer, isViewModel, iupacToRegex, linkify, locStringsToRegions, localStorageGetBoolean, localStorageGetItem, localStorageGetJSON, localStorageGetNumber, localStorageRemoveItem, localStorageSetBoolean, localStorageSetItem, localStorageSetJSON, localStorageSetNumber, makeAbortError, makeIndex, makeIndexType, makeTrackId, markStopTokenStopped, matchTrackId, max, maxFinite, measureGridWidth, measureText, mergeIntervals, mergeTrackConfig, min, minmax, normalizeWheelDelta, notEmpty, objectHash, openFeatureWidget, openPromotableDisplays, parseLocString, parseLocStringOneBased, parseMotifList, pluralize, polarToCartesian, progressLabel, rIC, radToDeg, readSessionFromDynamo, reducePrecision, registerStopTokenBroadcaster, renameRegionIfNeeded, renameRegionsIfNeeded, reorder, reorderWithin, resolvePlugin, resolveSelectedIds, restoreFileHandles, restoreFileHandlesFromSnapshot, revcom, reverse, reverseComplementIupac, revlist, saveAs, scheduleDetachedDestroy, saveSvgAsImage, selectNamedRegions, setBlobMap, setFileInCache, setNumberGrouping, sha256, sha256Base64, sha256Base64Url, shareEndpoint, shorten, shorten2, showTrackGeneric, springAnimate, statusFraction, statusMessageText, statusProgressLabel, statusReading, stitch, stopStopToken, stopTokenSignal, storeBlobLocation, storeFileHandle, storeFileHandleLocation, stringify, stripAlpha, stripFileExtension, stripTrackIds, sum, svgHtmlToPngBlob, tagRegex, testAdapter, toBase64, toBase64Url, toLocale, toUrlSafeB64, toggleTrackGeneric, truncateMiddle, updateStatus, useDebounce, useLocalStorage, useWidthSetter, verifyPermission, wheelFrameElapsedMs, wheelZoomAccum, withProgress, withStopTokenCheck, withStopTokenSignal, } from '../util/index.js';
32
+ export { AuthNeededError, BEZIER_CONNECTOR_MAX_REACH_PX, ENCODED_PREFIX, IUPAC_MOTIF_REGEX, IntervalTree, JSON_PREFIX, MAX_ZOOM_RATE_PER_MS, SCROLL_ZOOM_FACTOR_DIVISOR, SHARE_PREFIX, SimpleFeature, UNKNOWN, UNSUPPORTED, UnknownRefNameError, ZOOM_ACTIVE_WINDOW_MS, accumulateScroll, adapterConfigFromSpec, addAdapterGuesser, addAddTrackComponent, addAndShowTrack, addOrReplaceView, addTrackFromWidget, addTrackTypeGuesser, aesDecrypt, aesEncrypt, animationAllowed, applyOrderWithin, applyZoomAccum, assembleLocString, assembleLocStringRaw, avg, b64PadSuffix, bezierConnectorPath, bpSpanPx, bpToPx, bytesForRegions, calculateRedispatchRange, canReplaceView, capitalizeFirst, checkStopToken, checkStopTokenThrottled, clamp, clearFileFromCache, cmpStr, coarseStripHTML, codonTable, compareLocStrings, compareLocs, complement, complementTable, createProgressReporter, createScrollLatch, createSharedSetup, createStatusChannel, createStatusFanOut, createStatusWindow, createStopToken, createStopTokenChecker, createStopTokenRotation, dedupe, defaultCodonTable, defaultStarts, diagonalizeRegions, diffTrackConfig, doesIntersect2, downloadStatus, drawImageOntoCanvasContext, encodeSessionParam, ensureFileHandleReady, expandLooseTrackConfig, featureSpanPx, fetchAndMaybeUnzip, fetchAndMaybeUnzipText, fetchJson, fileToLocation, findFileHandleIds, findParentThat, findParentThatIs, flattenTrackConfigDelta, formatRelativeTime, fromUrlSafeB64, gatherOverlaps, generateCodonTable, generateUnknownTrackConf, generateUnsupportedTrackConf, getAssemblyHost, getBlob, getBlobMap, getBpDisplayStr, getConfAssemblyNames, getContainingDisplay, getContainingTrack, getContainingView, getDialogHost, getEnv, launchOrReplaceView, getFileFromCache, getFileHandle, getFileName, getFillProps, getFrame, getNotificationSink, getNumberGrouping, getPaletteHost, getPluginUpdate, getRenderingServices, getRpcHost, getRpcSessionId, getSession, getSessionServices, getStr, getStrokeProps, getTickDisplayStr, getTrackAssemblyNames, getTrackName, getZoomNormalizer, groupBy, guessAdapter, guessTrackConf, guessTrackType, hasFileHandlesInCache, hasSharedArrayBuffer, hashCode, hideTrackGeneric, installedVersionFromUrl, intersection2, isAbortException, isAbstractMenuManager, isActivelyZooming, isAppRootModel, isAuthNeededException, isBlobLocation, isDataCurrent, isDisplayModel, isElectron, isFeature, isFileHandleLocation, isFileSystemAccessSupported, isGeneLikeType, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, isSequenceMatchType, isSessionModel, isSessionServices, isSessionModelWithConfigEditing, isSessionModelWithConnectionEditing, isSessionModelWithConnections, isSessionModelWithWidgets, isSessionWithAddAssembly, isSessionWithAddSessionTrack, isSessionWithAddTracks, isSessionWithPublishTrackConf, isSessionWithDeleteTrackConf, isSessionWithSessionPlugins, isSessionWithSessionTracks, isSessionWithShareURL, isSessionWithViewReplacement, isStopToken, isStopped, isSupportedIndexingAdapter, isTrackModel, isTrackViewModel, isUriLocation, isValidTag, isViewContainer, isViewModel, iupacToRegex, linkify, locStringsToRegions, localStorageGetBoolean, localStorageGetItem, localStorageGetJSON, localStorageGetNumber, localStorageRemoveItem, localStorageSetBoolean, localStorageSetItem, localStorageSetJSON, localStorageSetNumber, makeAbortError, makeIndex, makeIndexType, makeTrackId, markStopTokenStopped, matchTrackId, max, maxFinite, measureGridWidth, measureText, mergeIntervals, mergeTrackConfig, min, minmax, normalizeWheelDelta, notEmpty, objectHash, openFeatureWidget, parseLocString, parseLocStringOneBased, parseMotifList, pluralize, polarToCartesian, progressLabel, rIC, radToDeg, readSessionFromDynamo, reducePrecision, registerStopTokenBroadcaster, renameRegionIfNeeded, renameRegionsIfNeeded, reorder, reorderWithin, resolvePlugin, resolveSelectedIds, restoreFileHandles, restoreFileHandlesFromSnapshot, revcom, reverse, reverseComplementIupac, revlist, saveAs, scheduleDetachedDestroy, saveSvgAsImage, selectNamedRegions, setBlobMap, setFileInCache, setNumberGrouping, sha256, sha256Base64, sha256Base64Url, shareEndpoint, shorten, shorten2, showTrackGeneric, springAnimate, statusFraction, statusMessageText, statusProgressLabel, statusReading, stitch, stopStopToken, stopTokenSignal, storeBlobLocation, storeFileHandle, storeFileHandleLocation, stringify, stripAlpha, stripFileExtension, stripTrackIds, sum, svgHtmlToPngBlob, tagRegex, testAdapter, toBase64, toBase64Url, toLocale, toUrlSafeB64, toggleTrackGeneric, truncateMiddle, updateStatus, useDebounce, useLocalStorage, useWidthSetter, verifyPermission, wheelFrameElapsedMs, wheelZoomAccum, withProgress, withStopTokenCheck, withStopTokenSignal, } from '../util/index.js';
@@ -143,15 +143,13 @@ export const CORE_UI_NAMES = [
143
143
  'FatalErrorDialog',
144
144
  'FileDropZone',
145
145
  'FileSelector',
146
- 'GRADIENT_LEGEND_HEIGHT',
147
- 'GRADIENT_LEGEND_SVG_AREA_WIDTH',
148
- 'GRADIENT_LEGEND_WIDTH',
149
146
  'GpuFallbackButton',
150
147
  'INLINE_MENU_ROW_WIDTH',
151
148
  'InfoDialog',
152
149
  'JexlFilterDialog',
153
150
  'LAUNCH_LABEL',
154
151
  'LEGEND_ROW_HEIGHT',
152
+ 'LEGEND_SVG_GUTTER_WIDTH',
155
153
  'LEGEND_SWATCH',
156
154
  'LabeledCheckbox',
157
155
  'LegendSwatchGlyph',
@@ -164,7 +162,6 @@ export const CORE_UI_NAMES = [
164
162
  'Menu',
165
163
  'MonospaceTextField',
166
164
  'NumberTextField',
167
- 'PinAdornment',
168
165
  'PluggableComponent',
169
166
  'PluggableComponents',
170
167
  'PluggableElements',
@@ -186,7 +183,6 @@ export const CORE_UI_NAMES = [
186
183
  'SubmitDialog',
187
184
  'SubmitForm',
188
185
  'SvgColorLegend',
189
- 'SvgGradientLegend',
190
186
  'TOOLTIP_Z_INDEX',
191
187
  'TagTextField',
192
188
  'VIEW_HEADER_HEIGHT',
@@ -206,6 +202,7 @@ export const CORE_UI_NAMES = [
206
202
  'colorPairRL',
207
203
  'colorPairRR',
208
204
  'colorRevStrand',
205
+ 'colorScaleIsEmpty',
209
206
  'colorShortInsert',
210
207
  'colorSplitReadInversion',
211
208
  'colorSupplementary',
@@ -215,23 +212,20 @@ export const CORE_UI_NAMES = [
215
212
  'createJBrowseTheme',
216
213
  'createJBrowseThemeFromArgs',
217
214
  'defaultThemes',
218
- 'displayTypesWithPromotableSlots',
219
215
  'getInputWidth',
220
216
  'hoverBoxStyle',
221
217
  'launchTargetsMenuItem',
222
218
  'legendEntries',
223
219
  'legendIsReadable',
220
+ 'legendSpecOf',
224
221
  'legendSwatches',
225
- 'makePromotableSizeMenu',
226
222
  'makeSizeMenu',
227
223
  'makeSizeSubMenu',
228
224
  'matchesTrackSelector',
229
225
  'measureLegendText',
230
226
  'methylated5hmC',
231
227
  'methylated5mC',
232
- 'misKindedPins',
233
228
  'nonEmptyLegendSections',
234
- 'promotableSlotsWithoutPin',
235
229
  'pushIntoSubMenu',
236
230
  'pushLaunchViewMenuItem',
237
231
  'radioItems',
@@ -84,7 +84,8 @@ export { expandAssemblySequenceAdapter, expandAssemblyShorthand, } from './expan
84
84
  * #example custom-display-name-and-genetic-codes-sidecar
85
85
  * Sets a `displayName` for the assembly selector and loads the per-refName
86
86
  * genetic codes from a sidecar TSV (`geneticCodesLocation`) instead of inlining
87
- * them — handy when a config generator emits the mapping separately:
87
+ * them, which is the shape to use when a config generator emits the mapping
88
+ * separately:
88
89
  * ```js
89
90
  * {
90
91
  * name: 'hg38',
@@ -84,7 +84,8 @@ export { expandAssemblySequenceAdapter, expandAssemblyShorthand, } from './expan
84
84
  * #example custom-display-name-and-genetic-codes-sidecar
85
85
  * Sets a `displayName` for the assembly selector and loads the per-refName
86
86
  * genetic codes from a sidecar TSV (`geneticCodesLocation`) instead of inlining
87
- * them — handy when a config generator emits the mapping separately:
87
+ * them, which is the shape to use when a config generator emits the mapping
88
+ * separately:
88
89
  * ```js
89
90
  * {
90
91
  * name: 'hg38',
@@ -1,19 +1,4 @@
1
1
  import type PluginManager from '../PluginManager.ts';
2
- /**
3
- * Fill in an assembly `sequence.adapter`'s `type` from its `uri` when the type
4
- * is omitted, so `sequence: { adapter: { uri: 'genome.fa.gz' } }` resolves to a
5
- * `BgzipFastaAdapter` (and `.fa` → indexed, `.2bit` → `TwoBitAdapter`). Uses the
6
- * same `Core-guessAdapterForLocation` extension point the "Add track" flow uses,
7
- * so every host describes a custom genome with just a URL and lets jbrowse-core
8
- * pick the adapter — no adapter-type table in the Python/R/JS bindings.
9
- *
10
- * The guesser also derives the index locations (`.fai`/`.gzi`) from the uri;
11
- * explicit adapter fields (e.g. a non-sibling `faiLocation`) are spread on top
12
- * so they win. A `uri` matching no sequence adapter is left untouched, so a
13
- * genuinely bad config still surfaces its own downstream error. Returns the same
14
- * object reference when there is nothing to expand, so callers can cheaply skip
15
- * a rebuild.
16
- */
17
2
  /**
18
3
  * Expand an assembly snapshot's own shorthands into the `sequence` an assembly
19
4
  * config declares: the flat `{ name, uri: 'genome.fa.gz' }` form, the
@@ -29,4 +14,19 @@ import type PluginManager from '../PluginManager.ts';
29
14
  * consumed, so the schema's own later pass finds nothing to do.
30
15
  */
31
16
  export declare function expandAssemblyShorthand<T>(snap: T, pluginManager: PluginManager): T;
17
+ /**
18
+ * Fill in an assembly `sequence.adapter`'s `type` from its `uri` when the type
19
+ * is omitted, so `sequence: { adapter: { uri: 'genome.fa.gz' } }` resolves to a
20
+ * `BgzipFastaAdapter` (and `.fa` → indexed, `.2bit` → `TwoBitAdapter`). Uses the
21
+ * same `Core-guessAdapterForLocation` extension point the "Add track" flow uses,
22
+ * so every host describes a custom genome with just a URL and lets jbrowse-core
23
+ * pick the adapter — no adapter-type table in the Python/R/JS bindings.
24
+ *
25
+ * Only the type comes off the guess: the adapter's own `normalizeSnapshot`
26
+ * expands the `uri` into the location slots it declares, so the shorthand
27
+ * expands to the same thing here as it does when the config names the type.
28
+ * A `uri` matching no sequence adapter is left untouched, and the same object
29
+ * reference comes back when there is nothing to expand, so callers can cheaply
30
+ * skip a rebuild.
31
+ */
32
32
  export declare function expandAssemblySequenceAdapter(sequence: unknown, pluginManager: PluginManager): unknown;
@@ -2,21 +2,6 @@ import { UNKNOWN } from '../util/tracks.js';
2
2
  function isPlainObject(v) {
3
3
  return typeof v === 'object' && v !== null && !Array.isArray(v);
4
4
  }
5
- /**
6
- * Fill in an assembly `sequence.adapter`'s `type` from its `uri` when the type
7
- * is omitted, so `sequence: { adapter: { uri: 'genome.fa.gz' } }` resolves to a
8
- * `BgzipFastaAdapter` (and `.fa` → indexed, `.2bit` → `TwoBitAdapter`). Uses the
9
- * same `Core-guessAdapterForLocation` extension point the "Add track" flow uses,
10
- * so every host describes a custom genome with just a URL and lets jbrowse-core
11
- * pick the adapter — no adapter-type table in the Python/R/JS bindings.
12
- *
13
- * The guesser also derives the index locations (`.fai`/`.gzi`) from the uri;
14
- * explicit adapter fields (e.g. a non-sibling `faiLocation`) are spread on top
15
- * so they win. A `uri` matching no sequence adapter is left untouched, so a
16
- * genuinely bad config still surfaces its own downstream error. Returns the same
17
- * object reference when there is nothing to expand, so callers can cheaply skip
18
- * a rebuild.
19
- */
20
5
  /**
21
6
  * Expand an assembly snapshot's own shorthands into the `sequence` an assembly
22
7
  * config declares: the flat `{ name, uri: 'genome.fa.gz' }` form, the
@@ -60,6 +45,21 @@ export function expandAssemblyShorthand(snap, pluginManager) {
60
45
  // preserve the identity-unchanged case so nothing rebuilds needlessly
61
46
  return (sequence === snap.sequence ? snap : { ...rest, name, sequence });
62
47
  }
48
+ /**
49
+ * Fill in an assembly `sequence.adapter`'s `type` from its `uri` when the type
50
+ * is omitted, so `sequence: { adapter: { uri: 'genome.fa.gz' } }` resolves to a
51
+ * `BgzipFastaAdapter` (and `.fa` → indexed, `.2bit` → `TwoBitAdapter`). Uses the
52
+ * same `Core-guessAdapterForLocation` extension point the "Add track" flow uses,
53
+ * so every host describes a custom genome with just a URL and lets jbrowse-core
54
+ * pick the adapter — no adapter-type table in the Python/R/JS bindings.
55
+ *
56
+ * Only the type comes off the guess: the adapter's own `normalizeSnapshot`
57
+ * expands the `uri` into the location slots it declares, so the shorthand
58
+ * expands to the same thing here as it does when the config names the type.
59
+ * A `uri` matching no sequence adapter is left untouched, and the same object
60
+ * reference comes back when there is nothing to expand, so callers can cheaply
61
+ * skip a rebuild.
62
+ */
63
63
  export function expandAssemblySequenceAdapter(sequence, pluginManager) {
64
64
  const adapter = isPlainObject(sequence) ? sequence.adapter : undefined;
65
65
  if (isPlainObject(sequence) &&
@@ -77,9 +77,25 @@ export function expandAssemblySequenceAdapter(sequence, pluginManager) {
77
77
  ...(typeof baseUri === 'string' ? { baseUri } : {}),
78
78
  };
79
79
  const guess = guesser(file, undefined);
80
- return guess && guess.type !== UNKNOWN
81
- ? { ...sequence, adapter: { ...guess, ...extras } }
82
- : sequence;
80
+ if (!guess || guess.type === UNKNOWN) {
81
+ return sequence;
82
+ }
83
+ // the type is the only thing the guess is needed for. The adapter's own
84
+ // normalizeSnapshot expands `uri` and everything riding with it — a 2bit's
85
+ // `chromSizes`, which the guess has no slot for and MST then dropped
86
+ // unannounced — so this is not a second place that knows how a sequence
87
+ // file names its sidecars. An adapter declaring no shorthand keeps the
88
+ // guess's derived locations.
89
+ const normalize = pluginManager.hasAdapterType(guess.type)
90
+ ? pluginManager.getAdapterType(guess.type).normalizeSnapshot
91
+ : undefined;
92
+ const shorthand = { ...adapter, type: guess.type };
93
+ const normalized = normalize?.(shorthand) ?? shorthand;
94
+ // `uri` is consumed, and it has to GO: localFiles substitutes a blob into a
95
+ // location node, and an adapter still carrying `uri` reads as one
96
+ const full = normalized === shorthand ? { ...guess, ...extras } : normalized;
97
+ const { uri: _consumed, baseUri: _spent, ...expanded } = full;
98
+ return { ...sequence, adapter: expanded };
83
99
  }
84
100
  return sequence;
85
101
  }
@@ -70,8 +70,7 @@ export declare function ConfigurationSchema<const DEFINITION extends Configurati
70
70
  * objects until something references a track (ADR-031), so a caller handed one
71
71
  * of those has a config that reads nothing but what was literally authored: a
72
72
  * slot at its schema default is absent, `preProcessSnapshot` has not run, and
73
- * nothing that walks a live node — the promotable cascade above all — applies
74
- * to it.
73
+ * nothing that walks a live node applies to it.
75
74
  *
76
75
  * For the callers that need the resolved answer rather than the authored one
77
76
  * and cannot know which of the two they were handed. The About dialog's "Copy
@@ -20,12 +20,8 @@ function chainHooks(base, child) {
20
20
  * **redeclares merges field-by-field over the base's** — so an override states
21
21
  * only what actually differs and inherits the rest. (`type` comes along
22
22
  * regardless: it is what marks an entry as a slot rather than a nested
23
- * sub-schema, per `isSlotDefinitionEntry`.)
24
- *
25
- * A subclass that really wants a plain slot states `promotedBase: undefined`,
26
- * which works *because* this is a spread: a stated `undefined` overwrites the
27
- * base's value where an omitted key would inherit it. The four cases are pinned
28
- * by the "baseConfiguration slot override merge" tests.
23
+ * sub-schema, per `isSlotDefinitionEntry`.) The cases are pinned by the
24
+ * "baseConfiguration slot override merge" tests.
29
25
  */
30
26
  function mergeSchemaDefinition(baseDefinition, childDefinition) {
31
27
  const merged = {
@@ -266,8 +262,7 @@ function hydrateInto(pluginManager, schemaType, frozen) {
266
262
  * objects until something references a track (ADR-031), so a caller handed one
267
263
  * of those has a config that reads nothing but what was literally authored: a
268
264
  * slot at its schema default is absent, `preProcessSnapshot` has not run, and
269
- * nothing that walks a live node — the promotable cascade above all — applies
270
- * to it.
265
+ * nothing that walks a live node applies to it.
271
266
  *
272
267
  * For the callers that need the resolved answer rather than the authored one
273
268
  * and cannot know which of the two they were handed. The About dialog's "Copy
@@ -179,53 +179,6 @@ interface ConfigSlotDefinitionCommon {
179
179
  * editor, so common slots aren't crowded out by rarely-changed ones
180
180
  */
181
181
  advanced?: boolean;
182
- /**
183
- * **Declaring this makes the slot promotable**, and it is the only thing that
184
- * does: a user can promote the slot's value to a session-wide default for all
185
- * tracks of the same display type (the track-menu pin). An *unset* slot
186
- * follows (inherits) that promoted default; any concrete value customizes the
187
- * track. Read it with `resolveConf`, never `getConf`; see
188
- * `promotableResolve.ts`.
189
- *
190
- * The value itself is what the unset state resolves to when a track inherits
191
- * and nothing is promoted. This is the CSS model — being unset is the
192
- * `inherit` keyword and `promotedBase` is `initial` (the value at the bottom
193
- * of the cascade). Spending only `undefined` on the sentinel is what leaves
194
- * every *real* value — `promotedBase` included — customizable over an opposite
195
- * session default, so a track can hold `displayMode: 'normal'` under a
196
- * promoted `'compact'`.
197
- *
198
- * Requires a `maybe*` slot type (whose `undefined` is the inherit sentinel)
199
- * and no `defaultValue`; `ConfigSlot` throws otherwise, and both stay runtime
200
- * checks. Forbidding it on the plain half of `ConfigSlotDefinition` was tried:
201
- * it forces a cast into `mergeSchemaDefinition`, whose spread of two slot
202
- * definitions lands in neither member, and buys only an earlier version of a
203
- * throw that already fires when the schema is built.
204
- *
205
- * A subclass turns an inherited promotable slot back into a plain one by
206
- * stating `promotedBase: undefined` — the definition merge is a spread, so a
207
- * stated `undefined` really does overwrite the base's value.
208
- */
209
- promotedBase?: unknown;
210
- /**
211
- * For a promotable slot: an extra semantic check a stored value must pass,
212
- * on top of the built-in type-shape check, before the cascade
213
- * (`promotableResolve.ts`'s `isUsableValue`) treats it as usable. Applies to
214
- * both cascade tiers — a session-wide promoted default and a track's own saved
215
- * value. Needed when a slot's shape alone can't catch a semantically-invalid
216
- * value — e.g. alignments `colorBy`'s `.type` must name a currently-registered
217
- * color scheme, not just be *some* string — so a stale scheme name (renamed or
218
- * removed since the value was saved) degrades to "not usable" (falls back to
219
- * the base) instead of reaching a lookup that assumes every `.type` is
220
- * registered. Omit when the type-shape check alone is enough to trust the value.
221
- *
222
- * Runs at **schema build** too, over the slot's own `promotedBase` — the base
223
- * is what every failing tier degrades to, so it has to clear the same bar.
224
- * Keep the hook a function of module-level data (as `isRegisteredColorScheme`
225
- * is of `COLOR_SCHEMES`); one that consults state its plugin registers later
226
- * during `install()` would reject a base that is really fine.
227
- */
228
- validate?: (value: unknown) => boolean;
229
182
  }
230
183
  /**
231
184
  * A slot definition, split on whether the slot's type spends `undefined` on
@@ -1,8 +1,6 @@
1
1
  import { types } from '@jbrowse/mobx-state-tree';
2
- import { freezeDeep } from '../util/freezeDeep.js';
3
2
  import { isJexl, stringToJexlExpression } from '../util/jexlStrings.js';
4
3
  import { FileLocation } from '../util/types/mst.js';
5
- import { isUsableValue } from './slotShape.js';
6
4
  import { isCallbackValue } from './slotValueUtils.js';
7
5
  // Single source of truth for the builtin slot type names, pairing each with its
8
6
  // MST value type and its editor fallback default. Keeping model + fallback in
@@ -28,9 +26,7 @@ const slotTypes = {
28
26
  number: { model: types.number, fallbackDefault: 1 },
29
27
  // The `maybe*` types spend `undefined` on "not explicitly set", which is the
30
28
  // one value no config can spell and so the only reliable way to say it — a
31
- // computed/auto fallback (a drag-resized track height), or the inherit
32
- // sentinel every promotable slot needs (pair with `promotedBase`, and read
33
- // with `resolveConf`).
29
+ // computed/auto fallback, e.g. a drag-resized track height.
34
30
  maybeNumber: { model: types.maybe(types.number) },
35
31
  maybeBoolean: { model: types.maybe(types.boolean) },
36
32
  // for a slot whose unset state means "decide from the data" — a feature's own
@@ -97,7 +93,7 @@ const JexlStringType = types.refinement('JexlString', types.string, isJexl);
97
93
  * evaluated on read by `readConfObject`.
98
94
  */
99
95
  export default function ConfigSlot(definition) {
100
- const { model, type, defaultValue, promotedBase } = definition;
96
+ const { model, type, defaultValue } = definition;
101
97
  if (!CONFIG_SLOT_TYPE_NAMES.has(type)) {
102
98
  throw new Error(`config slot needs a known type name, got ${JSON.stringify(type)}`);
103
99
  }
@@ -111,49 +107,6 @@ export default function ConfigSlot(definition) {
111
107
  if (defaultValue === undefined && !MAYBE_TYPES.has(type)) {
112
108
  throw new Error("no 'defaultValue' provided");
113
109
  }
114
- // `promotedBase` is what makes a slot promotable, so its presence is the whole
115
- // condition here (ADR-047).
116
- //
117
- // A promotable slot spends being-unset on the inherit sentinel, so it must be a
118
- // `maybe*` type. Any *concrete* default would double as the inherit signal,
119
- // making that one value un-customizable under an opposite promoted default — an
120
- // authoring mistake with no runtime symptom other than a setting that won't
121
- // stay put, so fail at construction.
122
- if (promotedBase !== undefined) {
123
- if (!MAYBE_TYPES.has(type)) {
124
- throw new Error(`a 'promotedBase' slot needs a maybe* type whose undefined is the inherit sentinel, not "${type}"`);
125
- }
126
- if (defaultValue !== undefined) {
127
- throw new Error("a promotable slot must leave 'defaultValue' undefined — that IS the inherit sentinel; 'promotedBase' is what an unset slot resolves to");
128
- }
129
- // The base is the bottom of the cascade: every other tier that fails
130
- // `isUsableValue` falls back to it, so a base that would itself fail has
131
- // nowhere left to fall and every read of the slot returns a value no
132
- // consumer handles — with nothing thrown anywhere. The typo this catches is
133
- // a `promotedBase` outside the slot's own vocabulary (an enum member not in
134
- // `model`, a non-finite number), which nothing else in the system checks.
135
- if (!isUsableValue(definition, promotedBase)) {
136
- throw new Error(`a 'promotedBase' must be a value the slot can hold: ${JSON.stringify(promotedBase)} is not a valid "${type}"`);
137
- }
138
- // A promotable slot cannot hold a callback: `isUsableValue` refuses a
139
- // `jexl:` value at both cascade tiers, so one written into the slot is
140
- // discarded straight back to the base. `contextVariable` is the only thing
141
- // that offers writing one — it is what raises the config editor's jexl
142
- // toggle (`SlotEditor`) — so the pair is a control whose every write the
143
- // cascade throws away, with nothing thrown anywhere. Nothing else in the
144
- // system states this; DISPLAY_TYPE_DEFAULTS.md §"No callbacks" only
145
- // describes the read side.
146
- if (definition.contextVariable?.length) {
147
- throw new Error("a promotable slot ('promotedBase') cannot declare 'contextVariable': the cascade refuses a jexl: callback, so the config editor would offer a toggle whose writes silently degrade back to the base");
148
- }
149
- // The resolver hands `promotedBase` out by reference, so an object-valued one
150
- // (`maybeFrozen`, e.g. alignments `colorBy`) is one literal shared live by
151
- // every track sitting at base. Freeze it here, the only place it enters the
152
- // system, so mutating a resolved value throws instead of silently rewriting
153
- // the default for every other track — and for every later session, since this
154
- // object belongs to the schema. See `freezeDeep` for why by-reference stays.
155
- freezeDeep(promotedBase);
156
- }
157
110
  // The inverse of the `defaultValue === undefined` check above, and the half
158
111
  // that had no guard. A `maybe*` slot whose default is concrete can never *be*
159
112
  // unset — no config can spell `undefined` — so the unset state such a slot
@@ -161,8 +114,6 @@ export default function ConfigSlot(definition) {
161
114
  // and the branch reading it never runs. There is no symptom: the slot reads as
162
115
  // a perfectly good value everywhere.
163
116
  //
164
- // Last, so a promotable slot still gets the more specific message above.
165
- //
166
117
  // The way this happens is **inheritance**, which is why the type can't catch
167
118
  // it: a `maybe*` override of a plain base slot inherits the base's concrete
168
119
  // default through the definition spread, and the override's own literal looks
@@ -173,9 +124,8 @@ export default function ConfigSlot(definition) {
173
124
  }
174
125
  return types.stripDefault(types.union(JexlStringType,
175
126
  // `maybeStringEnum` is the only maybe type whose model comes from the
176
- // author: they write the plain vocabulary (`['fixed','grow','fit']`) and
177
- // the nullability is added here, so no enumeration has to carry a fake
178
- // member for the cascade's benefit.
127
+ // author: they write the plain vocabulary and the nullability is added
128
+ // here.
179
129
  type === 'maybeStringEnum' ? types.maybe(valueModel) : valueModel), defaultValue);
180
130
  }
181
131
  /**
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A shorthand snapshot with its location slots filled in: `derived` supplies
3
+ * what the shorthand implies, and any key the config spells out for itself
4
+ * wins.
5
+ *
6
+ * Spread the other way round — derived over the snapshot — a config naming both
7
+ * a `uri` and a location that is not the sibling of it, `{ uri: 'x.fa',
8
+ * faiLocation: { uri: 'custom.fai' } }`, silently lost the index it named to
9
+ * the one the shorthand invents. Every adapter's normalizer had its own copy of
10
+ * the spread, so the precedence had to be got right 30-odd times.
11
+ */
12
+ export declare function fillLocations(snap: Record<string, unknown>, derived: Record<string, unknown>): {
13
+ [x: string]: unknown;
14
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A shorthand snapshot with its location slots filled in: `derived` supplies
3
+ * what the shorthand implies, and any key the config spells out for itself
4
+ * wins.
5
+ *
6
+ * Spread the other way round — derived over the snapshot — a config naming both
7
+ * a `uri` and a location that is not the sibling of it, `{ uri: 'x.fa',
8
+ * faiLocation: { uri: 'custom.fai' } }`, silently lost the index it named to
9
+ * the one the shorthand invents. Every adapter's normalizer had its own copy of
10
+ * the spread, so the precedence had to be got right 30-odd times.
11
+ */
12
+ export function fillLocations(snap, derived) {
13
+ return { ...derived, ...snap };
14
+ }
@@ -7,21 +7,6 @@ import type { AnyConfigurationModel } from './types.ts';
7
7
  * schema. JEXL callback slots keep their raw `"jexl:..."` string for the worker
8
8
  * to evaluate per-feature.
9
9
  *
10
- * **Why this isn't exported from `@jbrowse/core/configuration`.** It was
11
- * (as `getConfSnapshot`), and being reachable was the hazard. A promotable slot
12
- * resolves against the session at read time, so snapshotting one raw ships the
13
- * bare `undefined` inherit sentinel to a worker with no session to resolve it
14
- * against — and every display in the repo now has promotable slots. The public
15
- * form used to defend itself by *throwing* on such a config, which meant the
16
- * obvious spelling in a new `rpcProps()` failed at runtime, on the first fetch,
17
- * in whichever product exercised that display. Off the barrel, the same mistake
18
- * is an unresolved import: it can't be written at all, and
19
- * `getConfigSnapshotWithPromotables(display)` is the one way across the boundary.
20
- * So this is the shared walker those resolvers are built on, not an entry point.
21
- *
22
- * The nested-schema guard below is the part of that defense still worth
23
- * enforcing at runtime, since no import can express it.
24
- *
25
10
  * Note: only handles slots and direct sub-configuration models. Arrays or maps
26
11
  * of sub-schemas are silently dropped — nothing has needed them.
27
12
  */
@@ -1,5 +1,4 @@
1
1
  import { getSnapshot, isArrayType, isMapType, isStateTreeNode, } from '@jbrowse/mobx-state-tree';
2
- import { promotableSlotNames } from './promotableSlots.js';
3
2
  import { getConfigurationSchemaDefinition } from './schemaRegistry.js';
4
3
  import { isConfigurationModel, isConfigurationSchemaType, isSlotDefinitionEntry, } from './schemaTypes.js';
5
4
  /**
@@ -10,21 +9,6 @@ import { isConfigurationModel, isConfigurationSchemaType, isSlotDefinitionEntry,
10
9
  * schema. JEXL callback slots keep their raw `"jexl:..."` string for the worker
11
10
  * to evaluate per-feature.
12
11
  *
13
- * **Why this isn't exported from `@jbrowse/core/configuration`.** It was
14
- * (as `getConfSnapshot`), and being reachable was the hazard. A promotable slot
15
- * resolves against the session at read time, so snapshotting one raw ships the
16
- * bare `undefined` inherit sentinel to a worker with no session to resolve it
17
- * against — and every display in the repo now has promotable slots. The public
18
- * form used to defend itself by *throwing* on such a config, which meant the
19
- * obvious spelling in a new `rpcProps()` failed at runtime, on the first fetch,
20
- * in whichever product exercised that display. Off the barrel, the same mistake
21
- * is an unresolved import: it can't be written at all, and
22
- * `getConfigSnapshotWithPromotables(display)` is the one way across the boundary.
23
- * So this is the shared walker those resolvers are built on, not an entry point.
24
- *
25
- * The nested-schema guard below is the part of that defense still worth
26
- * enforcing at runtime, since no import can express it.
27
- *
28
12
  * Note: only handles slots and direct sub-configuration models. Arrays or maps
29
13
  * of sub-schemas are silently dropped — nothing has needed them.
30
14
  */
@@ -47,20 +31,8 @@ export function fullConfSnapshot(confObject) {
47
31
  // array/map type carries no registered slot table, so recursing would
48
32
  // emit a meaningless `{}` (a type-confusion hazard for a consumer
49
33
  // expecting the array). Constants are skipped entirely.
50
- assertNoPromotableSlots(v);
51
34
  result[key] = fullConfSnapshot(v);
52
35
  }
53
36
  }
54
37
  return result;
55
38
  }
56
- // A promotable slot is only ever resolvable at a config's own top level — the
57
- // resolver walks that one slot table (`promotableSlotNames` / `getSlotDefinition`)
58
- // and never descends. So one declared inside a *nested* schema would resolve
59
- // nowhere and serialize as its bare inherit sentinel, with no import to get wrong
60
- // and no symptom until a worker read the sentinel. Fail at the snapshot instead.
61
- function assertNoPromotableSlots(confObject) {
62
- const promotable = promotableSlotNames(confObject);
63
- if (promotable.size > 0) {
64
- throw new Error(`nested config schema declares promotable slots (${[...promotable].join(', ')}): the cascade only resolves a display config's own top-level slots, so these would serialize as the bare inherit sentinel. Declare them on the display's own schema instead.`);
65
- }
66
- }