@jbrowse/core 5.0.0-beta.1 → 5.0.0-beta.2

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 (115) hide show
  1. package/README.md +42 -3
  2. package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.d.ts +2 -2
  3. package/esm/PluginLoader.d.ts +1 -0
  4. package/esm/PluginLoader.js +52 -8
  5. package/esm/PluginManager.d.ts +70 -17
  6. package/esm/PluginManager.js +151 -20
  7. package/esm/ReExports/modules.js +3 -53
  8. package/esm/ReExports/publicUtil.d.ts +1 -1
  9. package/esm/ReExports/publicUtil.js +1 -1
  10. package/esm/ReExports/sharedModules.d.ts +96 -0
  11. package/esm/ReExports/sharedModules.js +59 -0
  12. package/esm/ReExports/uiStub.d.ts +1 -0
  13. package/esm/ReExports/uiStub.js +13 -0
  14. package/esm/ReExports/workerModules.d.ts +2 -0
  15. package/esm/ReExports/workerModules.js +10 -0
  16. package/esm/configuration/configurationSchema.d.ts +5 -38
  17. package/esm/configuration/configurationSchema.js +53 -40
  18. package/esm/configuration/promotableDefaults.js +12 -6
  19. package/esm/configuration/promotableResolve.d.ts +1 -1
  20. package/esm/configuration/promotableResolve.js +1 -1
  21. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +12 -0
  22. package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +39 -0
  23. package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +29 -0
  24. package/esm/data_adapters/BaseAdapter/featureDensity.js +17 -0
  25. package/esm/data_adapters/BaseAdapter/index.d.ts +1 -0
  26. package/esm/data_adapters/BaseAdapter/index.js +1 -0
  27. package/esm/data_adapters/BaseAdapter/stats.d.ts +33 -1
  28. package/esm/data_adapters/BaseAdapter/stats.js +52 -13
  29. package/esm/data_adapters/BaseAdapter/types.d.ts +1 -0
  30. package/esm/pluggableElementTypes/DisplayType.d.ts +9 -10
  31. package/esm/pluggableElementTypes/DisplayType.js +43 -8
  32. package/esm/pluggableElementTypes/ViewType.d.ts +25 -2
  33. package/esm/pluggableElementTypes/ViewType.js +75 -2
  34. package/esm/pluggableElementTypes/extendElementType.js +8 -3
  35. package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +41 -0
  36. package/esm/pluggableElementTypes/models/BaseDisplayModel.js +74 -1
  37. package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +21 -0
  38. package/esm/pluggableElementTypes/models/BaseTrackModel.js +37 -2
  39. package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +49 -0
  40. package/esm/pluggableElementTypes/models/BaseViewModel.js +39 -0
  41. package/esm/pluggableElementTypes/models/assertDisplayContract.d.ts +10 -7
  42. package/esm/pluggableElementTypes/models/assertDisplayContract.js +23 -30
  43. package/esm/rpc/RpcRegistry.d.ts +10 -0
  44. package/esm/rpc/byteBudget.d.ts +9 -0
  45. package/esm/rpc/coreRpcMethods.d.ts +1 -0
  46. package/esm/rpc/coreRpcMethods.js +1 -0
  47. package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +11 -0
  48. package/esm/rpc/methods/CoreGetFeatureDensity.js +22 -0
  49. package/esm/svg/svgReady.d.ts +1 -0
  50. package/esm/ui/CascadingMenu.js +30 -8
  51. package/esm/ui/LoadingOverlay.d.ts +14 -0
  52. package/esm/ui/LoadingOverlay.js +1 -1
  53. package/esm/ui/MenuTypes.d.ts +11 -2
  54. package/esm/ui/MenuTypes.js +3 -0
  55. package/esm/ui/PaletteContext.d.ts +11 -4
  56. package/esm/ui/PaletteContext.js +34 -5
  57. package/esm/ui/PinAdornment.js +12 -6
  58. package/esm/ui/index.d.ts +1 -1
  59. package/esm/ui/index.js +1 -1
  60. package/esm/ui/launchViewMenu.js +7 -1
  61. package/esm/ui/legendMenuItem.d.ts +5 -5
  62. package/esm/ui/legendMenuItem.js +5 -5
  63. package/esm/ui/makeSizeMenu.js +1 -1
  64. package/esm/ui/menuItems.d.ts +1 -1
  65. package/esm/ui/menuItems.js +1 -1
  66. package/esm/ui/promotableMenuItems.js +8 -6
  67. package/esm/ui/promotablePinCoverage.js +2 -1
  68. package/esm/ui/toggleMenuItems.d.ts +1 -3
  69. package/esm/util/addAndShowTrack.d.ts +1 -1
  70. package/esm/util/addAndShowTrack.js +5 -1
  71. package/esm/util/addTrackFromWidget.js +2 -2
  72. package/esm/util/cacheBudgets.d.ts +22 -19
  73. package/esm/util/cacheBudgets.js +22 -19
  74. package/esm/util/createStopTokenRotation.d.ts +1 -0
  75. package/esm/util/createStopTokenRotation.js +7 -27
  76. package/esm/util/fetchContext.d.ts +2 -2
  77. package/esm/util/fetchContext.js +2 -2
  78. package/esm/util/fetchPhases.d.ts +9 -9
  79. package/esm/util/hooks.d.ts +8 -0
  80. package/esm/util/hooks.js +27 -0
  81. package/esm/util/index.d.ts +2 -3
  82. package/esm/util/index.js +2 -3
  83. package/esm/util/installFetch.d.ts +49 -23
  84. package/esm/util/installFetch.js +49 -21
  85. package/esm/util/installInitAutorun.d.ts +8 -8
  86. package/esm/util/installInitAutorun.js +15 -15
  87. package/esm/util/lazyAfterAttach.d.ts +13 -0
  88. package/esm/util/lazyAfterAttach.js +31 -0
  89. package/esm/util/legendCandidates.d.ts +50 -0
  90. package/esm/util/legendCandidates.js +87 -0
  91. package/esm/util/mstUtils.d.ts +12 -1
  92. package/esm/util/mstUtils.js +20 -2
  93. package/esm/util/pluginStore.d.ts +1 -0
  94. package/esm/util/pluginStore.js +8 -1
  95. package/esm/util/range.d.ts +13 -9
  96. package/esm/util/range.js +17 -8
  97. package/esm/util/rxjs.d.ts +16 -0
  98. package/esm/util/rxjs.js +49 -0
  99. package/esm/util/tabix.d.ts +10 -4
  100. package/esm/util/tabix.js +11 -5
  101. package/esm/util/tracks.d.ts +48 -0
  102. package/esm/util/tracks.js +192 -66
  103. package/esm/util/types/index.d.ts +48 -5
  104. package/esm/util/types/index.js +3 -0
  105. package/esm/util/unknownSnapshotKeys.d.ts +36 -0
  106. package/esm/util/unknownSnapshotKeys.js +69 -0
  107. package/esm/util/viewStatus.d.ts +23 -0
  108. package/esm/util/viewStatus.js +17 -0
  109. package/esm/util/whenViewSettled.d.ts +17 -4
  110. package/esm/util/whenViewSettled.js +19 -6
  111. package/esm/util/withLaunchInput.d.ts +123 -0
  112. package/esm/util/withLaunchInput.js +228 -0
  113. package/package.json +12 -9
  114. package/esm/util/applyInitSettings.d.ts +0 -79
  115. package/esm/util/applyInitSettings.js +0 -91
@@ -1,44 +1,20 @@
1
1
  // eslint-disable-next-line no-restricted-imports
2
2
  import * as React from 'react';
3
- import * as mst from '@jbrowse/mobx-state-tree';
4
3
  import { alpha, createTheme, useTheme } from '@mui/material';
5
4
  import SvgIcon, { createSvgIcon } from '@mui/material/SvgIcon';
6
5
  import * as MUIUtils from '@mui/material/utils';
7
- import * as mobx from 'mobx';
8
6
  import * as mxreact from 'mobx-react';
9
7
  import * as ReactDom from 'react-dom';
10
8
  import * as ReactDomClient from 'react-dom/client';
11
- import * as ReactJSXRuntime from 'react/jsx-runtime';
12
- import Plugin from '../Plugin.js';
13
- import * as Configuration from '../configuration/index.js';
14
- import * as BaseAdapterExports from '../data_adapters/BaseAdapter/index.js';
15
- import * as dataAdapterCache from '../data_adapters/dataAdapterCache.js';
16
- import AdapterType from '../pluggableElementTypes/AdapterType.js';
17
- import DisplayType from '../pluggableElementTypes/DisplayType.js';
18
- import TrackType from '../pluggableElementTypes/TrackType.js';
19
- import ViewType from '../pluggableElementTypes/ViewType.js';
20
- import WidgetType from '../pluggableElementTypes/WidgetType.js';
21
- import * as pluggableElementTypes from '../pluggableElementTypes/index.js';
22
- import * as pluggableElementTypeModels from '../pluggableElementTypes/models/index.js';
23
9
  import * as coreUi from '../ui/index.js';
24
- import * as corePalette from '../ui/palette.js';
25
- import * as coreTheme from '../ui/theme.js';
26
- import Base1DView from '../util/Base1DViewModel.js';
27
- import * as coreColor from '../util/color/index.js';
28
- import * as coreIo from '../util/io/index.js';
29
- import * as coreLayouts from '../util/layouts/index.js';
30
- import * as coreMstReflection from '../util/mst-reflection.js';
31
- import * as rxjs from '../util/rxjs.js';
32
- import * as trackUtils from '../util/tracks.js';
33
10
  import { cx, keyframes, makeStyles } from '../util/tss-react/index.js';
34
- import * as mstTypes from '../util/types/mst.js';
35
11
  import { BaseFeatureDetail } from './BaseFeatureDetails.js';
36
12
  import { DataGridEntries } from './MuiDataGridReExports.js';
37
13
  import { Entries } from './MuiReExports.js';
38
14
  import { MUIStyles } from './MuiStylesReExports.js';
39
15
  import { lazyMap } from './lazify.js';
40
16
  import reExportsList from './list.js';
41
- import * as coreUtil from './publicUtil.js';
17
+ import { sharedModules } from './sharedModules.js';
42
18
  function makeLegacyMakeStyles() {
43
19
  return (args) => {
44
20
  const useStyles = makeStyles()(args);
@@ -48,14 +24,10 @@ function makeLegacyMakeStyles() {
48
24
  const tssReact = { cx, keyframes, makeStyles };
49
25
  const legacyMakeStyles = makeLegacyMakeStyles();
50
26
  const libs = {
51
- mobx,
52
- '@jbrowse/mobx-state-tree': mst,
53
- 'mobx-state-tree': mst,
54
- react: React,
55
- 'react/jsx-runtime': ReactJSXRuntime,
27
+ ...sharedModules,
28
+ 'mobx-react': mxreact,
56
29
  'react-dom': ReactDom,
57
30
  'react-dom/client': ReactDomClient,
58
- 'mobx-react': mxreact,
59
31
  // Only lazy component entries are re-exported. The grid *hooks*
60
32
  // (useGridApiContext/useGridApiRef/useGridRootProps) are intentionally left
61
33
  // out: statically importing them here pulled the entire ~1.2 MB
@@ -114,12 +86,7 @@ const libs = {
114
86
  ToggleButton: Entries.ToggleButton,
115
87
  ToggleButtonGroup: Entries.ToggleButtonGroup,
116
88
  },
117
- '@jbrowse/core/Plugin': Plugin,
118
- '@jbrowse/core/configuration': Configuration,
119
- '@jbrowse/core/util/types/mst': mstTypes,
120
89
  '@jbrowse/core/ui': coreUi,
121
- '@jbrowse/core/ui/theme': coreTheme,
122
- '@jbrowse/core/ui/palette': corePalette,
123
90
  // BaseTooltip is deliberately absent from the '@jbrowse/core/ui' barrel: the
124
91
  // re-export alone held @floating-ui (~266KB) on the startup path, since eager
125
92
  // plugin entries import that barrel. Serving it as its own module behind
@@ -128,23 +95,7 @@ const libs = {
128
95
  // (bundled by tview and msaview) reads it too, so dropping it from the barrel
129
96
  // with no ABI home is what broke them.
130
97
  ...lazyMap({ BaseTooltip: React.lazy(() => import('../ui/BaseTooltip.js')) }, '@jbrowse/core/ui/'),
131
- '@jbrowse/core/util': coreUtil,
132
- '@jbrowse/core/util/color': coreColor,
133
- '@jbrowse/core/util/layouts': coreLayouts,
134
- '@jbrowse/core/util/tracks': trackUtils,
135
- '@jbrowse/core/util/Base1DViewModel': Base1DView,
136
- '@jbrowse/core/util/io': coreIo,
137
- '@jbrowse/core/util/mst-reflection': coreMstReflection,
138
- '@jbrowse/core/util/rxjs': rxjs,
139
- '@jbrowse/core/pluggableElementTypes': pluggableElementTypes,
140
- '@jbrowse/core/pluggableElementTypes/ViewType': ViewType,
141
- '@jbrowse/core/pluggableElementTypes/AdapterType': AdapterType,
142
- '@jbrowse/core/pluggableElementTypes/DisplayType': DisplayType,
143
- '@jbrowse/core/pluggableElementTypes/TrackType': TrackType,
144
- '@jbrowse/core/pluggableElementTypes/WidgetType': WidgetType,
145
- '@jbrowse/core/pluggableElementTypes/models': pluggableElementTypeModels,
146
98
  '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail': BaseFeatureDetail,
147
- '@jbrowse/core/data_adapters/BaseAdapter': BaseAdapterExports,
148
99
  // `adapterCache` is module-level state, so a plugin that bundles its own copy
149
100
  // of this file gets a second cache in the RPC worker — and `freeAdapterResources`,
150
101
  // which CoreFreeResources calls on the host's copy when the last track using
@@ -152,7 +103,6 @@ const libs = {
152
103
  // reference to an adapter (see the comment on that function), so those
153
104
  // adapters and everything they hold live as long as the worker. Serving the
154
105
  // module is what makes an external RPC method share the host's cache.
155
- '@jbrowse/core/data_adapters/dataAdapterCache': dataAdapterCache,
156
106
  };
157
107
  const libsList = Object.keys(libs);
158
108
  // make sure that all the items in the ReExports/list array (used by build
@@ -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, 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, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, 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, renderToStaticMarkup, reorder, reorderWithin, resolvePlugin, resolveSelectedIds, restoreFileHandles, restoreFileHandlesFromSnapshot, revcom, reverse, reverseComplementIupac, revlist, saveAs, 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, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, 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, 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';
@@ -25,4 +25,4 @@
25
25
  // The same split is worth making for '@jbrowse/core/ui' (115 pinned names) and
26
26
  // '@jbrowse/core/util/tracks' (36), which have the same shape and the same
27
27
  // history: BaseTooltip and getParentRenderProps each left this way.
28
- 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, 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, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, 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, renderToStaticMarkup, reorder, reorderWithin, resolvePlugin, resolveSelectedIds, restoreFileHandles, restoreFileHandlesFromSnapshot, revcom, reverse, reverseComplementIupac, revlist, saveAs, 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';
28
+ 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, isGzip, isLocalPathLocation, isLooseTrackConfig, isNode, isObject, isPalindromic, isPluginInstalled, isRootModelWithInternetAccounts, isRpcResult, isSelectionContainer, 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, 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';
@@ -0,0 +1,96 @@
1
+ import * as React from 'react';
2
+ import * as mst from '@jbrowse/mobx-state-tree';
3
+ import * as mobx from 'mobx';
4
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
5
+ import Plugin from '../Plugin.ts';
6
+ import * as Configuration from '../configuration/index.ts';
7
+ import * as BaseAdapterExports from '../data_adapters/BaseAdapter/index.ts';
8
+ import * as dataAdapterCache from '../data_adapters/dataAdapterCache.ts';
9
+ import AdapterType from '../pluggableElementTypes/AdapterType.ts';
10
+ import DisplayType from '../pluggableElementTypes/DisplayType.ts';
11
+ import TrackType from '../pluggableElementTypes/TrackType.ts';
12
+ import ViewType from '../pluggableElementTypes/ViewType.ts';
13
+ import WidgetType from '../pluggableElementTypes/WidgetType.ts';
14
+ import * as pluggableElementTypes from '../pluggableElementTypes/index.ts';
15
+ import * as pluggableElementTypeModels from '../pluggableElementTypes/models/index.ts';
16
+ import * as corePalette from '../ui/palette.ts';
17
+ import * as coreTheme from '../ui/theme.ts';
18
+ import * as coreColor from '../util/color/index.ts';
19
+ import * as coreIo from '../util/io/index.ts';
20
+ import * as coreLayouts from '../util/layouts/index.ts';
21
+ import * as coreMstReflection from '../util/mst-reflection.ts';
22
+ import * as rxjs from '../util/rxjs.ts';
23
+ import * as trackUtils from '../util/tracks.ts';
24
+ import * as mstTypes from '../util/types/mst.ts';
25
+ import * as coreUtil from './publicUtil.ts';
26
+ export declare const sharedModules: {
27
+ mobx: typeof mobx;
28
+ '@jbrowse/mobx-state-tree': typeof mst;
29
+ 'mobx-state-tree': typeof mst;
30
+ react: typeof React;
31
+ 'react/jsx-runtime': typeof ReactJSXRuntime;
32
+ '@jbrowse/core/Plugin': typeof Plugin;
33
+ '@jbrowse/core/configuration': typeof Configuration;
34
+ '@jbrowse/core/util/types/mst': typeof mstTypes;
35
+ '@jbrowse/core/ui/theme': typeof coreTheme;
36
+ '@jbrowse/core/ui/palette': typeof corePalette;
37
+ '@jbrowse/core/util': typeof coreUtil;
38
+ '@jbrowse/core/util/color': typeof coreColor;
39
+ '@jbrowse/core/util/layouts': typeof coreLayouts;
40
+ '@jbrowse/core/util/tracks': typeof trackUtils;
41
+ '@jbrowse/core/util/Base1DViewModel': mst.IModelType<{
42
+ id: mst.IOptionalIType<mst.ISimpleType<string>, [undefined]>;
43
+ displayedRegions: mst.IOptionalIType<mst.IType<import("../util/index.ts").Region[], import("../util/index.ts").Region[], import("../util/index.ts").Region[]>, [undefined]>;
44
+ bpPerPx: mst.IType<number | undefined, number, number>;
45
+ offsetPx: mst.IType<number | undefined, number, number>;
46
+ minimumBlockWidth: mst.IOptionalIType<mst.ISimpleType<number>, [undefined]>;
47
+ }, {
48
+ volatileWidth: number;
49
+ } & {
50
+ setDisplayedRegions(regions: import("../util/index.ts").Region[]): void;
51
+ setBpPerPx(val: number): void;
52
+ setVolatileWidth(width: number): void;
53
+ } & {
54
+ readonly width: number;
55
+ readonly minBpPerPx: number;
56
+ readonly maxBpPerPx: number;
57
+ readonly assemblyNames: string[];
58
+ readonly displayedRegionsTotalPx: number;
59
+ readonly maxOffset: number;
60
+ readonly minOffset: number;
61
+ readonly totalBp: number;
62
+ } & {
63
+ readonly dynamicBlocks: import("../util/blockTypes.ts").BlockSet;
64
+ readonly staticBlocks: import("../util/blockTypes.ts").BlockSet;
65
+ readonly currBp: number;
66
+ } & {
67
+ pxToBp(px: number): import("../util/Base1DUtils.ts").PxToBpResult;
68
+ bpToPx(args: {
69
+ refName: string;
70
+ coord: number;
71
+ displayedRegionIndex?: number;
72
+ }): number | undefined;
73
+ } & {
74
+ showAllRegions(): void;
75
+ zoomOut(): void;
76
+ zoomIn(): void;
77
+ zoomTo(bpPerPx: number, offset?: any): number;
78
+ scrollTo(offsetPx: number): number;
79
+ centerAt(coord: number, refName: string | undefined, displayedRegionIndex: number): void;
80
+ scroll(distance: number): number;
81
+ } & {
82
+ moveTo(start?: import("../util/Base1DUtils.ts").BpOffset, end?: import("../util/Base1DUtils.ts").BpOffset): void;
83
+ }, mst._NotCustomized, mst._NotCustomized>;
84
+ '@jbrowse/core/util/io': typeof coreIo;
85
+ '@jbrowse/core/util/mst-reflection': typeof coreMstReflection;
86
+ '@jbrowse/core/util/rxjs': typeof rxjs;
87
+ '@jbrowse/core/pluggableElementTypes': typeof pluggableElementTypes;
88
+ '@jbrowse/core/pluggableElementTypes/ViewType': typeof ViewType;
89
+ '@jbrowse/core/pluggableElementTypes/AdapterType': typeof AdapterType;
90
+ '@jbrowse/core/pluggableElementTypes/DisplayType': typeof DisplayType;
91
+ '@jbrowse/core/pluggableElementTypes/TrackType': typeof TrackType;
92
+ '@jbrowse/core/pluggableElementTypes/WidgetType': typeof WidgetType;
93
+ '@jbrowse/core/pluggableElementTypes/models': typeof pluggableElementTypeModels;
94
+ '@jbrowse/core/data_adapters/BaseAdapter': typeof BaseAdapterExports;
95
+ '@jbrowse/core/data_adapters/dataAdapterCache': typeof dataAdapterCache;
96
+ };
@@ -0,0 +1,59 @@
1
+ // eslint-disable-next-line no-restricted-imports
2
+ import * as React from 'react';
3
+ import * as mst from '@jbrowse/mobx-state-tree';
4
+ import * as mobx from 'mobx';
5
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
6
+ import Plugin from '../Plugin.js';
7
+ import * as Configuration from '../configuration/index.js';
8
+ import * as BaseAdapterExports from '../data_adapters/BaseAdapter/index.js';
9
+ import * as dataAdapterCache from '../data_adapters/dataAdapterCache.js';
10
+ import AdapterType from '../pluggableElementTypes/AdapterType.js';
11
+ import DisplayType from '../pluggableElementTypes/DisplayType.js';
12
+ import TrackType from '../pluggableElementTypes/TrackType.js';
13
+ import ViewType from '../pluggableElementTypes/ViewType.js';
14
+ import WidgetType from '../pluggableElementTypes/WidgetType.js';
15
+ import * as pluggableElementTypes from '../pluggableElementTypes/index.js';
16
+ import * as pluggableElementTypeModels from '../pluggableElementTypes/models/index.js';
17
+ import * as corePalette from '../ui/palette.js';
18
+ import * as coreTheme from '../ui/theme.js';
19
+ import Base1DView from '../util/Base1DViewModel.js';
20
+ import * as coreColor from '../util/color/index.js';
21
+ import * as coreIo from '../util/io/index.js';
22
+ import * as coreLayouts from '../util/layouts/index.js';
23
+ import * as coreMstReflection from '../util/mst-reflection.js';
24
+ import * as rxjs from '../util/rxjs.js';
25
+ import * as trackUtils from '../util/tracks.js';
26
+ import * as mstTypes from '../util/types/mst.js';
27
+ import * as coreUtil from './publicUtil.js';
28
+ // The part of the runtime plugin ABI that is not UI: what a plugin evaluated in
29
+ // the RPC worker can actually use. modules.ts adds the UI on top of it for the
30
+ // main thread; workerModules.ts fills the same keys with a stub instead.
31
+ export const sharedModules = {
32
+ mobx,
33
+ '@jbrowse/mobx-state-tree': mst,
34
+ 'mobx-state-tree': mst,
35
+ react: React,
36
+ 'react/jsx-runtime': ReactJSXRuntime,
37
+ '@jbrowse/core/Plugin': Plugin,
38
+ '@jbrowse/core/configuration': Configuration,
39
+ '@jbrowse/core/util/types/mst': mstTypes,
40
+ '@jbrowse/core/ui/theme': coreTheme,
41
+ '@jbrowse/core/ui/palette': corePalette,
42
+ '@jbrowse/core/util': coreUtil,
43
+ '@jbrowse/core/util/color': coreColor,
44
+ '@jbrowse/core/util/layouts': coreLayouts,
45
+ '@jbrowse/core/util/tracks': trackUtils,
46
+ '@jbrowse/core/util/Base1DViewModel': Base1DView,
47
+ '@jbrowse/core/util/io': coreIo,
48
+ '@jbrowse/core/util/mst-reflection': coreMstReflection,
49
+ '@jbrowse/core/util/rxjs': rxjs,
50
+ '@jbrowse/core/pluggableElementTypes': pluggableElementTypes,
51
+ '@jbrowse/core/pluggableElementTypes/ViewType': ViewType,
52
+ '@jbrowse/core/pluggableElementTypes/AdapterType': AdapterType,
53
+ '@jbrowse/core/pluggableElementTypes/DisplayType': DisplayType,
54
+ '@jbrowse/core/pluggableElementTypes/TrackType': TrackType,
55
+ '@jbrowse/core/pluggableElementTypes/WidgetType': WidgetType,
56
+ '@jbrowse/core/pluggableElementTypes/models': pluggableElementTypeModels,
57
+ '@jbrowse/core/data_adapters/BaseAdapter': BaseAdapterExports,
58
+ '@jbrowse/core/data_adapters/dataAdapterCache': dataAdapterCache,
59
+ };
@@ -0,0 +1 @@
1
+ export declare const uiStub: unknown;
@@ -0,0 +1,13 @@
1
+ // What a UI entry of the plugin ABI resolves to inside the RPC worker. A plugin
2
+ // bundle is one file for both realms, and at module scope it reads and calls
3
+ // these entries — destructures components, `styled(Box)(...)`, `observer(C)`,
4
+ // `createSvgIcon(...)` — so every key must exist and every read and call must
5
+ // succeed. Nothing in a worker renders, so no code path ever reaches a
6
+ // difference. `then` is undefined so an await on it settles.
7
+ function stubTarget() { }
8
+ export const uiStub = new Proxy(stubTarget, {
9
+ get: (_, key) => key === 'then' ? undefined : key === Symbol.toPrimitive ? () => '' : uiStub,
10
+ has: () => true,
11
+ apply: () => uiStub,
12
+ construct: () => uiStub,
13
+ });
@@ -0,0 +1,2 @@
1
+ declare const libs: Record<string, unknown>;
2
+ export default libs;
@@ -0,0 +1,10 @@
1
+ import reExportsList from './list.js';
2
+ import { sharedModules } from './sharedModules.js';
3
+ import { uiStub } from './uiStub.js';
4
+ // The same keys as modules.ts, so a plugin finds every name it links against;
5
+ // the UI ones hold the stub rather than react-dom and Material UI.
6
+ const libs = {
7
+ ...Object.fromEntries(reExportsList.map(name => [name, uiStub])),
8
+ ...sharedModules,
9
+ };
10
+ export default libs;
@@ -85,46 +85,13 @@ export declare function ConfigurationSchema<const DEFINITION extends Configurati
85
85
  * it as the plain object it is.
86
86
  *
87
87
  * Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating
88
- * the same entry twice returns the same node and a track that gets opened later
89
- * reuses it.
88
+ * the same entry twice returns the same node — and in admin/embedded sessions a
89
+ * track opened later resolves to that same node. A non-admin's open track does
90
+ * not: it resolves to the session's private working copy (ADR-032) and this is
91
+ * the pristine mirror beside it. The two agree in content, which is what the
92
+ * caller needs; `CopyConfigEntryPoints.test.ts` pins both halves.
90
93
  */
91
94
  export declare function hydrateTrackConfig(pluginManager: PluginManager, config: Record<string, unknown>): AnyConfigurationModel | undefined;
92
- /**
93
- * Reference to a track configuration. Snapshot output is the trackId string.
94
- *
95
- * One load-bearing complication: **`types.union(trackRef, schemaType)` accepts a
96
- * string id OR a full config.** A view that synthesizes a track nobody else can
97
- * draw — a read-vs-ref synteny band, an SV inspector row, a circular view's
98
- * added track — writes the config here rather than registering it in
99
- * `session.tracks`, and it then lives and dies with the track that holds it.
100
- * `ReadVsRef.test.tsx` and `SVInspector.test.tsx` are the canaries.
101
- *
102
- * NOTE: don't add `as SCHEMATYPE` to the return value. It narrows SnapshotIn
103
- * to just the object branch, forcing callers to wrap string ids in
104
- * `@ts-expect-error`. The inferred union SnapshotIn is `string | SnapshotIn<schema>`.
105
- */
106
- export declare function TrackConfigurationReference(schemaType: IAnyType): import("@jbrowse/mobx-state-tree").ITypeUnion<any, any, any>;
107
- /**
108
- * Reference to a display configuration. Looked up inside the containing track
109
- * config's `displays` array. Snapshot output is the displayId string.
110
- *
111
- * Resolution order:
112
- * 1. by displayId
113
- * 2. by `parent.type` — handles old sessions where the saved displayId
114
- * no longer matches but a display of the same type exists on the track
115
- *
116
- * Step 2 is the safety net because `baseTrackConfig.preProcessSnapshot`
117
- * already injects a stub display for every registered displayType on the
118
- * track, so a same-type lookup always succeeds at runtime for properly
119
- * loaded tracks. An older third step auto-created a *detached* config when
120
- * neither matched — that produced an orphaned MST node whose edits silently
121
- * didn't persist. Removed in favor of a clear throw, since
122
- * preProcessSnapshot's injection makes the path effectively dead.
123
- *
124
- * Union-with-schemaType branch is for the same reason as `TrackConfigurationReference`:
125
- * `CircularView.addTrackConf` passes inline display configs as MST instances.
126
- */
127
- export declare function DisplayConfigurationReference(schemaType: IAnyType): import("@jbrowse/mobx-state-tree").ITypeUnion<any, any, any>;
128
95
  type ConfigReferenceInstance<SCHEMA extends AnyConfigurationSchemaType> = (SCHEMA extends ConfigurationSchemaType<infer D, any> ? IsAny<D> extends true ? any : SCHEMA['Type'] : SCHEMA['Type']) & {
129
96
  [K in GetInheritedIdentifier<SCHEMA>]: string;
130
97
  };
@@ -239,34 +239,14 @@ export function ConfigurationSchema(modelName, inputSchemaDefinition, inputOptio
239
239
  const { schemaDefinition, options } = preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition, inputOptions);
240
240
  return makeConfigurationSchemaModel(modelName, schemaDefinition, options);
241
241
  }
242
- // The hydration cache lives on the PluginManager instance (see
243
- // trackConfigHydrationCache's doc comment there and ADR-031), not as a
244
- // module-level singleton: it must never hand a track resolved on one
245
- // PluginManager instance a node built with another instance's env, and
246
- // scoping it to the instance rules that out structurally rather than by
247
- // convention. Nested a second level by schemaType, since one PluginManager
248
- // registers a distinct schemaType per track type.
249
- function frozenTrackHydrationCache(pluginManager, schemaType) {
250
- const byType = pluginManager.trackConfigHydrationCache;
251
- let cache = byType.get(schemaType);
252
- if (!cache) {
253
- cache = new WeakMap();
254
- byType.set(schemaType, cache);
255
- }
256
- return cache;
257
- }
258
242
  // The frozen -> live half of TrackConfigurationReference's `get`, shared with
259
- // hydrateTrackConfig below so there is one hydration and one cache rather than
260
- // two that can drift on which env or which key they use.
243
+ // hydrateTrackConfig below so there is one hydration rather than two that can
244
+ // drift on which env they build with. The memo it goes through belongs to the
245
+ // PluginManager instance (ADR-031): a node built with one instance's env must
246
+ // never be handed to another, and `pluginManager.hydratedTrackConfig` scopes
247
+ // that structurally rather than by convention.
261
248
  function hydrateInto(pluginManager, schemaType, frozen) {
262
- const cache = frozenTrackHydrationCache(pluginManager, schemaType);
263
- const cached = cache.get(frozen);
264
- if (cached) {
265
- return cached;
266
- }
267
- const model = schemaType.create(frozen, { pluginManager });
268
- cache.set(frozen, model);
269
- return model;
249
+ return pluginManager.hydratedTrackConfig(schemaType, frozen, () => schemaType.create(frozen, { pluginManager }));
270
250
  }
271
251
  /**
272
252
  * #api core/configuration
@@ -290,8 +270,11 @@ function hydrateInto(pluginManager, schemaType, frozen) {
290
270
  * it as the plain object it is.
291
271
  *
292
272
  * Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating
293
- * the same entry twice returns the same node and a track that gets opened later
294
- * reuses it.
273
+ * the same entry twice returns the same node — and in admin/embedded sessions a
274
+ * track opened later resolves to that same node. A non-admin's open track does
275
+ * not: it resolves to the session's private working copy (ADR-032) and this is
276
+ * the pristine mirror beside it. The two agree in content, which is what the
277
+ * caller needs; `CopyConfigEntryPoints.test.ts` pins both halves.
295
278
  */
296
279
  export function hydrateTrackConfig(pluginManager, config) {
297
280
  const type = config.type;
@@ -315,7 +298,18 @@ export function hydrateTrackConfig(pluginManager, config) {
315
298
  // config snapshot (held as a standalone schema instance). Both reference kinds
316
299
  // resolve to `schemaType` instances, so MST can't auto-dispatch on the instance
317
300
  // side — the explicit snapshot dispatcher (string → ref, object → schema)
318
- // disambiguates. Shared by TrackConfigurationReference/DisplayConfigurationReference.
301
+ // disambiguates. Shared by TrackConfigurationReference/DisplayConfigurationReference,
302
+ // and by neither accident nor oversight NOT by the plain branch — see the note
303
+ // on it in `ConfigurationReference`.
304
+ //
305
+ // One consequence, because both refs' `set` callbacks read as if it were not
306
+ // true: assigning a config **node** here does not store a reference to it. The
307
+ // dispatcher sees a non-string and picks `schemaType`, so MST tries to adopt the
308
+ // node as an inline child — which throws if it already has a parent. `set` is
309
+ // therefore unreachable on both refs (checked by making it throw: 231 suites
310
+ // stayed green), and exists only because MST rejects a custom reference
311
+ // declaring `get` without it. The plain branch, with no dispatcher, does the
312
+ // opposite and stores the reference.
319
313
  function idOrSnapshotUnion(ref, schemaType) {
320
314
  return types.union({
321
315
  dispatcher: snapshot => (typeof snapshot === 'string' ? ref : schemaType),
@@ -335,7 +329,7 @@ function idOrSnapshotUnion(ref, schemaType) {
335
329
  * to just the object branch, forcing callers to wrap string ids in
336
330
  * `@ts-expect-error`. The inferred union SnapshotIn is `string | SnapshotIn<schema>`.
337
331
  */
338
- export function TrackConfigurationReference(schemaType) {
332
+ function TrackConfigurationReference(schemaType) {
339
333
  const trackRef = types.reference(schemaType, {
340
334
  get(id, parent) {
341
335
  const session = getSession(parent);
@@ -381,15 +375,26 @@ export function TrackConfigurationReference(schemaType) {
381
375
  * Step 2 is the safety net because `baseTrackConfig.preProcessSnapshot`
382
376
  * already injects a stub display for every registered displayType on the
383
377
  * track, so a same-type lookup always succeeds at runtime for properly
384
- * loaded tracks. An older third step auto-created a *detached* config when
385
- * neither matched — that produced an orphaned MST node whose edits silently
386
- * didn't persist. Removed in favor of a clear throw, since
387
- * preProcessSnapshot's injection makes the path effectively dead.
378
+ * loaded tracks. It is what carries a **renamed display type** across for a
379
+ * catalog track: the injected stub is named for the new type, the display
380
+ * model's own `preProcessSnapshot` rewrites the state model's, and the saved
381
+ * `configuration` id still spells the old name, so only the type match
382
+ * reconnects them. Not every pre-rename session reaches it — a track config
383
+ * that itself declares the old display entry keeps that entry's `displayId`
384
+ * through the alias rewrite (`{ ...d, type: canonical }`) and wins the
385
+ * first-wins dedupe, so its session resolves by id. An older third step
386
+ * auto-created a *detached* config when neither matched — that produced an
387
+ * orphaned MST node whose edits silently didn't persist. Removed in favor of a
388
+ * clear throw.
388
389
  *
389
- * Union-with-schemaType branch is for the same reason as `TrackConfigurationReference`:
390
- * `CircularView.addTrackConf` passes inline display configs as MST instances.
390
+ * The union's schemaType branch is symmetry with `TrackConfigurationReference`
391
+ * rather than a path anything in tree takes: the two production writers,
392
+ * `showTrackGeneric` and `BaseTrackModel.replaceDisplay`, both write a
393
+ * displayId string, because a display config belongs in its track config's
394
+ * `displays` array. It stays because it costs nothing and because dropping it
395
+ * narrows `SnapshotIn` for every caller.
391
396
  */
392
- export function DisplayConfigurationReference(schemaType) {
397
+ function DisplayConfigurationReference(schemaType) {
393
398
  const displayRef = types.reference(schemaType, {
394
399
  get(id, parent) {
395
400
  // track.configuration is a hydrated MST node (hydrated lazily via
@@ -443,9 +448,17 @@ export function ConfigurationReference(schemaType) {
443
448
  ? TrackConfigurationReference(schemaType)
444
449
  : id === 'displayId'
445
450
  ? DisplayConfigurationReference(schemaType)
446
- : // Plain (non-track/display) ref. The union accepts either an id
447
- // string (resolved via `types.reference`) or an inline schema
448
- // snapshot (held as a standalone schema instance).
451
+ : // Plain (non-track/display) ref — internet accounts, connections —
452
+ // resolved by MST's own identifier lookup rather than through the
453
+ // session. **Deliberately not `idOrSnapshotUnion`**, even though it is
454
+ // the same two members: this branch is also handed a *live, in-tree*
455
+ // config node (`initializeInternetAccount` pushes
456
+ // `jbrowse.internetAccounts[i]` straight through), and an undispatched
457
+ // union sends that to the reference member because
458
+ // `BaseReferenceType.isAssignableFrom` defers to its target type. A
459
+ // `typeof snapshot === 'string'` dispatcher sends it to the schema
460
+ // member instead, and MST refuses to adopt a node that already has a
461
+ // parent. `InternetAccounts.test.ts` is the canary.
449
462
  types.union(types.reference(schemaType), schemaType);
450
463
  return ref;
451
464
  }
@@ -195,14 +195,20 @@ export function applySlotToOpenTracks(displays, slot, value) {
195
195
  * track is the same write as filling in a follower, and the distinction the two
196
196
  * actions drew is not one the user has any reason to see.
197
197
  *
198
- * The snackbar outlives the click that raised it, so the promotion re-derives
199
- * `self`'s liveness inside `onClick` rather than closing over a decision —
200
- * ADR-048 has the ways that goes wrong.
198
+ * The snackbar outlives the click that raised it, so the promotion closes over
199
+ * the display TYPE — a string — rather than reaching back through `self`. A
200
+ * promoted default is keyed by display type and governs tracks opened later, so
201
+ * it has nothing to do with the clicked display still being open; guarding on
202
+ * `self` instead meant a user who applied a value, closed the track, then took
203
+ * the offer got a silent no-op. What is still guarded is the session, which owns
204
+ * the map the write lands in. ADR-048 has the decisions this does not change:
205
+ * no track set and no apply/promote decision may be closed over.
201
206
  */
202
207
  function applyPinClick(self, slot, value, isDefault) {
203
208
  const session = getSession(self);
209
+ const displayType = self.type;
204
210
  if (isDefault) {
205
- session.setDisplayTypeDefault(self.type, slot, undefined);
211
+ session.setDisplayTypeDefault(displayType, slot, undefined);
206
212
  session.notify('Cleared the default', 'info');
207
213
  }
208
214
  else {
@@ -211,8 +217,8 @@ function applyPinClick(self, slot, value, isDefault) {
211
217
  session.notify(`Applied to ${open.length} open ${pluralize(open.length, 'track')}`, 'info', {
212
218
  name: 'Set as the default',
213
219
  onClick: () => {
214
- if (isAlive(self)) {
215
- session.setDisplayTypeDefault(self.type, slot, value);
220
+ if (isAlive(session)) {
221
+ session.setDisplayTypeDefault(displayType, slot, value);
216
222
  }
217
223
  },
218
224
  });
@@ -69,7 +69,7 @@ export declare function storedSlotValue(config: AnyConfigurationModel, slot: str
69
69
  * about a value a caller is about to offer as a pin's on-value.
70
70
  *
71
71
  * Exists because a pin built over a value the gate refuses is inert in a way
72
- * nothing reports: `applyDefaultToggle` writes it to the session store happily,
72
+ * nothing reports: `applyPinClick` writes it to the session store happily,
73
73
  * `resolveSlotIn` then drops it and every track keeps resolving to the tier
74
74
  * below, and `isPromotableDefault` compares the *raw* stored value, so the pin
75
75
  * draws outline forever while a dead key sits in the user's localStorage. See
@@ -51,7 +51,7 @@ export function storedSlotValue(config, slot) {
51
51
  * about a value a caller is about to offer as a pin's on-value.
52
52
  *
53
53
  * Exists because a pin built over a value the gate refuses is inert in a way
54
- * nothing reports: `applyDefaultToggle` writes it to the session store happily,
54
+ * nothing reports: `applyPinClick` writes it to the session store happily,
55
55
  * `resolveSlotIn` then drops it and every track keeps resolving to the tier
56
56
  * below, and `isPromotableDefault` compares the *raw* stored value, so the pin
57
57
  * draws outline forever while a dead key sits in the user's localStorage. See
@@ -2,6 +2,7 @@ import { BaseAdapter } from './BaseAdapter.ts';
2
2
  import type { AnyConfigurationModel } from '../../configuration/index.ts';
3
3
  import type { Feature } from '../../util/simpleFeature.ts';
4
4
  import type { AugmentedRegion as Region } from '../../util/types/index.ts';
5
+ import type { FeatureDensity } from './featureDensity.ts';
5
6
  import type { BaseOptions } from './types.ts';
6
7
  import type { Observable } from 'rxjs';
7
8
  /**
@@ -117,6 +118,17 @@ export declare abstract class BaseFeatureDataAdapter<CONF extends AnyConfigurati
117
118
  * agent-docs/reference/REGION_TOO_LARGE.md.
118
119
  */
119
120
  getRegionByteSize(_regions: Region[], _opts?: BaseOptions): Promise<number | undefined>;
121
+ /**
122
+ * Features per bin over each region, at the view's `bpPerPx`, for the density
123
+ * tier the display draws where the region-too-large gate refused the
124
+ * features. The default reads the `densityAdapter` sidecar slot
125
+ * (`densityAdapterConfigSchemaFields`) through `getSubAdapter`; `undefined`
126
+ * means no tier, and the banner stands. ADR-102 records why no index
127
+ * estimate stands in for a missing sidecar.
128
+ */
129
+ getFeatureDensity(regions: Region[], opts: BaseOptions & {
130
+ bpPerPx: number;
131
+ }): Promise<FeatureDensity[] | undefined>;
120
132
  getSources(regions: Region[], opts?: BaseOptions): Promise<{
121
133
  name: string;
122
134
  color?: string;