@jbrowse/core 5.0.0-beta.2 → 5.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -40
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +4 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +17 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/index.js +4 -3
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +2 -2
- package/esm/BaseFeatureWidget/index.d.ts +1 -1
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +8 -1
- package/esm/BaseFeatureWidget/stateModelFactory.js +6 -0
- package/esm/BaseFeatureWidget/types.d.ts +10 -2
- package/esm/PluginManager.d.ts +30 -1
- package/esm/PluginManager.js +107 -70
- package/esm/ReExports/BaseFeatureDetails.js +1 -1
- package/esm/ReExports/MuiDataGridReExports.d.ts +1 -0
- package/esm/ReExports/MuiDataGridReExports.js +2 -2
- package/esm/ReExports/barrelOnlyNames.d.ts +5 -0
- package/esm/ReExports/barrelOnlyNames.js +63 -0
- package/esm/ReExports/modules.js +28 -56
- package/esm/ReExports/publicTracks.d.ts +1 -0
- package/esm/ReExports/publicTracks.js +14 -0
- package/esm/ReExports/publicUi.d.ts +4 -0
- package/esm/ReExports/publicUi.js +33 -0
- package/esm/ReExports/publicUtil.d.ts +1 -1
- package/esm/ReExports/publicUtil.js +8 -4
- package/esm/ReExports/sharedModules.d.ts +1 -1
- package/esm/ReExports/sharedModules.js +8 -1
- package/esm/ReExports/uiStub.d.ts +1 -0
- package/esm/ReExports/uiStub.js +6 -8
- package/esm/ReExports/workerModules.js +9 -4
- package/esm/ReExports/workerNamespaceNames.d.ts +11 -0
- package/esm/ReExports/workerNamespaceNames.js +281 -0
- package/esm/configuration/configurationSchema.js +11 -0
- package/esm/configuration/index.d.ts +2 -2
- package/esm/configuration/index.js +1 -1
- package/esm/configuration/promotableDefaults.d.ts +54 -19
- package/esm/configuration/promotableDefaults.js +108 -45
- package/esm/configuration/promotablePin.d.ts +50 -40
- package/esm/configuration/promotableResolve.d.ts +1 -1
- package/esm/configuration/promotableResolve.js +1 -1
- package/esm/configuration/tabixIndexFields.d.ts +2 -2
- package/esm/configuration/tabixIndexFields.js +2 -2
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +4 -12
- package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +12 -0
- package/esm/data_adapters/BaseAdapter/featureDensity.js +15 -0
- package/esm/data_adapters/BaseAdapter/index.d.ts +2 -2
- package/esm/data_adapters/BaseAdapter/index.js +1 -1
- package/esm/data_adapters/BaseAdapter/types.d.ts +2 -8
- package/esm/pluggableElementTypes/AdapterType.d.ts +2 -1
- package/esm/pluggableElementTypes/AdapterType.js +1 -1
- package/esm/pluggableElementTypes/DisplayType.d.ts +3 -10
- package/esm/pluggableElementTypes/DisplayType.js +3 -45
- package/esm/pluggableElementTypes/LazyStateModelElement.d.ts +27 -0
- package/esm/pluggableElementTypes/LazyStateModelElement.js +71 -0
- package/esm/pluggableElementTypes/ViewType.d.ts +3 -10
- package/esm/pluggableElementTypes/ViewType.js +6 -51
- package/esm/pluggableElementTypes/extendElementType.d.ts +1 -2
- package/esm/pluggableElementTypes/extendElementType.js +1 -2
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -3
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +1 -1
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +1 -4
- package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +34 -34
- package/esm/pluggableElementTypes/models/BaseViewModel.js +19 -30
- package/esm/pluggableElementTypes/models/assertDisplayContract.d.ts +4 -3
- package/esm/pluggableElementTypes/models/assertDisplayContract.js +2 -2
- package/esm/pluggableElementTypes/models/baseTrackConfig.js +7 -1
- package/esm/ui/BaseExportSvgDialog.d.ts +1 -1
- package/esm/ui/ErrorMessageStackTraceDialog.js +5 -6
- package/esm/ui/ExportSvgDialog.d.ts +1 -1
- package/esm/ui/MenuTypes.d.ts +3 -3
- package/esm/ui/PinAdornment.js +22 -40
- package/esm/ui/ScrollChrome.d.ts +16 -0
- package/esm/ui/ScrollChrome.js +12 -0
- package/esm/ui/ScrollZoomToggle.d.ts +4 -3
- package/esm/ui/ScrollZoomToggle.js +4 -3
- package/esm/ui/SizeSliderRow.js +1 -1
- package/esm/ui/index.d.ts +2 -2
- package/esm/ui/index.js +3 -3
- package/esm/ui/legendMenuItem.d.ts +9 -15
- package/esm/ui/legendMenuItem.js +8 -19
- package/esm/ui/menuItemAdornment.d.ts +2 -3
- package/esm/ui/menuItemAdornment.js +2 -3
- package/esm/ui/menuItems.d.ts +1 -2
- package/esm/ui/menuItems.js +0 -1
- package/esm/ui/palette.d.ts +11 -11
- package/esm/ui/palette.js +11 -11
- package/esm/ui/promotablePinCoverage.d.ts +16 -2
- package/esm/ui/promotablePinCoverage.js +38 -2
- package/esm/ui/theme.js +5 -0
- package/esm/ui/toggleMenuItems.d.ts +13 -6
- package/esm/ui/toggleMenuItems.js +32 -15
- package/esm/util/Base1DUtils.d.ts +4 -2
- package/esm/util/Base1DUtils.js +12 -4
- package/esm/util/SvgCanvas.js +4 -3
- package/esm/util/adapterConfigKey.d.ts +12 -0
- package/esm/util/adapterConfigKey.js +14 -0
- package/esm/util/adapterMetadata.js +2 -1
- package/esm/util/analytics.js +4 -5
- package/esm/util/clampToContig.d.ts +17 -0
- package/esm/util/clampToContig.js +19 -0
- package/esm/util/colorBits.d.ts +2 -1
- package/esm/util/colorBits.js +2 -5
- package/esm/util/createStopTokenRotation.d.ts +8 -7
- package/esm/util/featureTypes.d.ts +24 -0
- package/esm/util/featureTypes.js +35 -0
- package/esm/util/fetchPhases.d.ts +1 -1
- package/esm/util/index.d.ts +4 -2
- package/esm/util/index.js +3 -1
- package/esm/util/installFetch.d.ts +29 -18
- package/esm/util/installFetch.js +17 -17
- package/esm/util/installInitAutorun.d.ts +6 -5
- package/esm/util/installInitAutorun.js +2 -2
- package/esm/util/installPrerequisiteFetch.d.ts +86 -0
- package/esm/util/installPrerequisiteFetch.js +73 -0
- package/esm/util/openFeatureWidget.d.ts +5 -0
- package/esm/util/openFeatureWidget.js +1 -0
- package/esm/util/openViews.d.ts +16 -0
- package/esm/util/openViews.js +22 -0
- package/esm/util/parentWalk.d.ts +1 -1
- package/esm/util/parentWalk.js +1 -1
- package/esm/util/renderToStaticMarkup.js +10 -0
- package/esm/util/scheduleDetachedDestroy.d.ts +18 -0
- package/esm/util/scheduleDetachedDestroy.js +24 -0
- package/esm/util/scrollLatch.d.ts +1 -0
- package/esm/util/scrollLatch.js +8 -0
- package/esm/util/stopToken.d.ts +6 -5
- package/esm/util/trackConfigDelta.d.ts +6 -6
- package/esm/util/trackConfigDelta.js +3 -3
- package/esm/util/types/index.d.ts +25 -20
- package/esm/util/usePanelVirtualScroll.d.ts +6 -2
- package/esm/util/usePanelVirtualScroll.js +6 -2
- package/esm/util/useRowVirtualScroll.d.ts +1 -1
- package/esm/util/useRowVirtualScroll.js +1 -1
- package/esm/util/useVirtualScrollWheel.js +11 -1
- package/esm/util/wheelZoom.d.ts +3 -1
- package/esm/util/wheelZoom.js +39 -14
- package/esm/util/whenViewSettled.d.ts +31 -6
- package/esm/util/whenViewSettled.js +33 -5
- package/esm/util/withLaunchInput.d.ts +47 -2
- package/esm/util/withLaunchInput.js +56 -11
- package/package.json +10 -5
- package/esm/ui/promotableMenuItems.d.ts +0 -19
- package/esm/ui/promotableMenuItems.js +0 -91
|
@@ -3,7 +3,7 @@ import { lazy } from 'react';
|
|
|
3
3
|
// export off it, so they're generated from a name list rather than written out
|
|
4
4
|
// 45 times. The static import specifier means webpack still emits a single
|
|
5
5
|
// x-data-grid chunk shared by all entries.
|
|
6
|
-
const
|
|
6
|
+
export const DATA_GRID_NAMES = [
|
|
7
7
|
'DataGrid',
|
|
8
8
|
'GridActionsCellItem',
|
|
9
9
|
'GridAddIcon',
|
|
@@ -51,7 +51,7 @@ const names = [
|
|
|
51
51
|
'GridViewHeadlineIcon',
|
|
52
52
|
'GridViewStreamIcon',
|
|
53
53
|
];
|
|
54
|
-
export const DataGridEntries = Object.fromEntries(
|
|
54
|
+
export const DataGridEntries = Object.fromEntries(DATA_GRID_NAMES.map(name => [
|
|
55
55
|
name,
|
|
56
56
|
lazy(() => import('@mui/x-data-grid').then(m => ({
|
|
57
57
|
default: m[name],
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Names a source barrel exports that its ABI file deliberately does not serve.
|
|
2
|
+
//
|
|
3
|
+
// The public*.ts split stopped a barrel removal from silently narrowing the ABI
|
|
4
|
+
// -- take a name out of ui/index.ts and publicUi.tsx no longer compiles. This
|
|
5
|
+
// closes the other direction, which the split opened: a name *added* to a barrel
|
|
6
|
+
// is not served until someone adds it here too, and an external plugin cannot
|
|
7
|
+
// see that. Its `import { X } from '@jbrowse/core/ui'` type-checks, because
|
|
8
|
+
// package.json's `./ui` resolves to the barrel, and reads undefined off
|
|
9
|
+
// JBrowseExports at runtime -- the same shape of failure a removal used to
|
|
10
|
+
// cause, just for new code instead of old.
|
|
11
|
+
//
|
|
12
|
+
// So publicSurface.test.ts requires barrel-minus-ABI to be exactly this list.
|
|
13
|
+
// Adding an export to a barrel then fails until the ABI question is answered,
|
|
14
|
+
// and either answer is one line: serve it from the public*.ts file, or name it
|
|
15
|
+
// here. Nothing about being on this list is wrong -- most of these are helpers
|
|
16
|
+
// for app code, session plumbing and in-tree hooks that a plugin has no use for.
|
|
17
|
+
export const BARREL_ONLY_NAMES = {
|
|
18
|
+
'@jbrowse/core/ui': [],
|
|
19
|
+
'@jbrowse/core/util/tracks': [],
|
|
20
|
+
'@jbrowse/core/util': [
|
|
21
|
+
'MAX_GLOB_REGIONS',
|
|
22
|
+
'adapterNeedsAddTrackComponent',
|
|
23
|
+
'assembleLocStrings',
|
|
24
|
+
'canonicalizeViewRefName',
|
|
25
|
+
'clampToContig',
|
|
26
|
+
'clampToListedContig',
|
|
27
|
+
'containerDisplaysAssembly',
|
|
28
|
+
'downloadPhase',
|
|
29
|
+
'finishAddTrack',
|
|
30
|
+
'formatBytes',
|
|
31
|
+
'getDisplayStr',
|
|
32
|
+
'getLocationUri',
|
|
33
|
+
'handleFetchError',
|
|
34
|
+
'indexedDBAvailable',
|
|
35
|
+
'installablePlugins',
|
|
36
|
+
'isSessionWithMultipleViews',
|
|
37
|
+
'isSessionWithPermanentPlugins',
|
|
38
|
+
'isWebWorker',
|
|
39
|
+
'localStorageAvailable',
|
|
40
|
+
'localStorageGetStringArray',
|
|
41
|
+
'matchRefNames',
|
|
42
|
+
'measuredFont',
|
|
43
|
+
'namesTemporaryAssembly',
|
|
44
|
+
'notifyFeatureDetailsMiss',
|
|
45
|
+
'notifyLocalStorageKey',
|
|
46
|
+
'parseBpString',
|
|
47
|
+
'parseRegionNames',
|
|
48
|
+
'resolveNamedRegions',
|
|
49
|
+
'resolveStorePluginRefs',
|
|
50
|
+
'resolveStoreRefs',
|
|
51
|
+
'resolveUri',
|
|
52
|
+
'sessionStorageAvailable',
|
|
53
|
+
'sessionStorageGetItem',
|
|
54
|
+
'sessionStorageRemoveItem',
|
|
55
|
+
'sessionStorageSetItem',
|
|
56
|
+
'statusSource',
|
|
57
|
+
'subscribeToLocalStorageKey',
|
|
58
|
+
'throttleStatusEmits',
|
|
59
|
+
'useCreateOnce',
|
|
60
|
+
'useFinalUnmount',
|
|
61
|
+
'withFeatureDetails',
|
|
62
|
+
],
|
|
63
|
+
};
|
package/esm/ReExports/modules.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
// eslint-disable-next-line no-restricted-imports
|
|
2
|
-
import * as React from 'react';
|
|
3
1
|
import { alpha, createTheme, useTheme } from '@mui/material';
|
|
4
2
|
import SvgIcon, { createSvgIcon } from '@mui/material/SvgIcon';
|
|
5
3
|
import * as MUIUtils from '@mui/material/utils';
|
|
6
4
|
import * as mxreact from 'mobx-react';
|
|
7
5
|
import * as ReactDom from 'react-dom';
|
|
8
6
|
import * as ReactDomClient from 'react-dom/client';
|
|
9
|
-
import * as coreUi from '../ui/index.js';
|
|
10
7
|
import { cx, keyframes, makeStyles } from '../util/tss-react/index.js';
|
|
11
8
|
import { BaseFeatureDetail } from './BaseFeatureDetails.js';
|
|
12
9
|
import { DataGridEntries } from './MuiDataGridReExports.js';
|
|
13
10
|
import { Entries } from './MuiReExports.js';
|
|
14
11
|
import { MUIStyles } from './MuiStylesReExports.js';
|
|
15
12
|
import { lazyMap } from './lazify.js';
|
|
16
|
-
import
|
|
13
|
+
import * as coreUi from './publicUi.js';
|
|
17
14
|
import { sharedModules } from './sharedModules.js';
|
|
18
15
|
function makeLegacyMakeStyles() {
|
|
19
16
|
return (args) => {
|
|
@@ -23,6 +20,25 @@ function makeLegacyMakeStyles() {
|
|
|
23
20
|
}
|
|
24
21
|
const tssReact = { cx, keyframes, makeStyles };
|
|
25
22
|
const legacyMakeStyles = makeLegacyMakeStyles();
|
|
23
|
+
const materialUiCoreLib = {
|
|
24
|
+
...lazyMap(Entries),
|
|
25
|
+
useTheme,
|
|
26
|
+
alpha,
|
|
27
|
+
makeStyles: legacyMakeStyles,
|
|
28
|
+
};
|
|
29
|
+
const muiMaterialLib = {
|
|
30
|
+
...lazyMap(Entries),
|
|
31
|
+
alpha,
|
|
32
|
+
useTheme,
|
|
33
|
+
createTheme,
|
|
34
|
+
};
|
|
35
|
+
const materialUiLabLib = {
|
|
36
|
+
Alert: Entries.Alert,
|
|
37
|
+
Autocomplete: Entries.Autocomplete,
|
|
38
|
+
ToggleButton: Entries.ToggleButton,
|
|
39
|
+
ToggleButtonGroup: Entries.ToggleButtonGroup,
|
|
40
|
+
};
|
|
41
|
+
const muiStylesLib = { ...MUIStyles, makeStyles: legacyMakeStyles };
|
|
26
42
|
const libs = {
|
|
27
43
|
...sharedModules,
|
|
28
44
|
'mobx-react': mxreact,
|
|
@@ -41,18 +57,8 @@ const libs = {
|
|
|
41
57
|
'@material-ui/core/utils': MUIUtils,
|
|
42
58
|
'tss-react': tssReact,
|
|
43
59
|
'tss-react/mui': tssReact,
|
|
44
|
-
'@material-ui/core':
|
|
45
|
-
|
|
46
|
-
useTheme,
|
|
47
|
-
alpha,
|
|
48
|
-
makeStyles: legacyMakeStyles,
|
|
49
|
-
},
|
|
50
|
-
'@mui/material': {
|
|
51
|
-
...lazyMap(Entries),
|
|
52
|
-
alpha,
|
|
53
|
-
useTheme,
|
|
54
|
-
createTheme,
|
|
55
|
-
},
|
|
60
|
+
'@material-ui/core': materialUiCoreLib,
|
|
61
|
+
'@mui/material': muiMaterialLib,
|
|
56
62
|
...lazyMap(Entries, '@mui/material/'),
|
|
57
63
|
...lazyMap(Entries, '@material-ui/core/'),
|
|
58
64
|
// @mui/icons-material — bundled into external plugins — reads the
|
|
@@ -67,52 +73,18 @@ const libs = {
|
|
|
67
73
|
// Overrides the lazy entry above; verified against both bundlers.
|
|
68
74
|
// GMOD/jbrowse-components#5606.
|
|
69
75
|
'@mui/material/SvgIcon': Object.assign({}, SvgIcon, { createSvgIcon }),
|
|
70
|
-
'@mui/material/styles':
|
|
71
|
-
|
|
72
|
-
makeStyles: legacyMakeStyles,
|
|
73
|
-
},
|
|
74
|
-
'@material-ui/core/styles': {
|
|
75
|
-
...MUIStyles,
|
|
76
|
-
makeStyles: legacyMakeStyles,
|
|
77
|
-
},
|
|
76
|
+
'@mui/material/styles': muiStylesLib,
|
|
77
|
+
'@material-ui/core/styles': muiStylesLib,
|
|
78
78
|
// these are core in @mui/material, but used to be in @material-ui/lab
|
|
79
79
|
'@material-ui/lab/ToggleButton': Entries.ToggleButton,
|
|
80
80
|
'@material-ui/lab/ToggleButtonGroup': Entries.ToggleButtonGroup,
|
|
81
81
|
'@material-ui/lab/Autocomplete': Entries.Autocomplete,
|
|
82
82
|
'@material-ui/lab/Alert': Entries.Alert,
|
|
83
|
-
'@material-ui/lab':
|
|
84
|
-
Alert: Entries.Alert,
|
|
85
|
-
Autocomplete: Entries.Autocomplete,
|
|
86
|
-
ToggleButton: Entries.ToggleButton,
|
|
87
|
-
ToggleButtonGroup: Entries.ToggleButtonGroup,
|
|
88
|
-
},
|
|
83
|
+
'@material-ui/lab': materialUiLabLib,
|
|
89
84
|
'@jbrowse/core/ui': coreUi,
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
// React.lazy keeps it off that path while leaving external plugins a way to
|
|
94
|
-
// reach it -- published apollo deep-imports this exact path, and react-msaview
|
|
95
|
-
// (bundled by tview and msaview) reads it too, so dropping it from the barrel
|
|
96
|
-
// with no ABI home is what broke them.
|
|
97
|
-
...lazyMap({ BaseTooltip: React.lazy(() => import('../ui/BaseTooltip.js')) }, '@jbrowse/core/ui/'),
|
|
85
|
+
// the same lazy component publicUi.tsx puts on the namespace; published
|
|
86
|
+
// react-msaview deep-imports this path, apollo reads the namespace
|
|
87
|
+
'@jbrowse/core/ui/BaseTooltip': coreUi.BaseTooltip,
|
|
98
88
|
'@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail': BaseFeatureDetail,
|
|
99
|
-
// `adapterCache` is module-level state, so a plugin that bundles its own copy
|
|
100
|
-
// of this file gets a second cache in the RPC worker — and `freeAdapterResources`,
|
|
101
|
-
// which CoreFreeResources calls on the host's copy when the last track using
|
|
102
|
-
// an adapter config closes, never sees it. The cache is the only strong
|
|
103
|
-
// reference to an adapter (see the comment on that function), so those
|
|
104
|
-
// adapters and everything they hold live as long as the worker. Serving the
|
|
105
|
-
// module is what makes an external RPC method share the host's cache.
|
|
106
89
|
};
|
|
107
|
-
const libsList = Object.keys(libs);
|
|
108
|
-
// make sure that all the items in the ReExports/list array (used by build
|
|
109
|
-
// systems and such) are included here, and vice versa
|
|
110
|
-
const inLibsOnly = libsList.filter(mod => !reExportsList.includes(mod));
|
|
111
|
-
if (inLibsOnly.length > 0) {
|
|
112
|
-
throw new Error(`The following modules are in the modules libs, but not the re-exports list: ${inLibsOnly.join(', ')}`);
|
|
113
|
-
}
|
|
114
|
-
const inReExportsOnly = reExportsList.filter(mod => !libsList.includes(mod));
|
|
115
|
-
if (inReExportsOnly.length) {
|
|
116
|
-
throw new Error(`The following modules are in the re-exports list, but not the modules libs: ${inReExportsOnly.join(', ')}`);
|
|
117
|
-
}
|
|
118
90
|
export default libs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UNKNOWN, UNSUPPORTED, addAdapterGuesser, addTrackTypeGuesser, allSessionTracks, annotationTrackIds, canonicalAssemblyNames, clearFileFromCache, ensureFileHandleReady, expandLooseTrackConfig, findFileHandleIds, generateUnknownTrackConf, generateUnsupportedTrackConf, getBlob, getBlobMap, getConfAssemblyNames, getConfAssemblyNamesOrNone, getFileFromCache, getFileName, getRpcSessionId, getTrackAssemblyNames, getTrackName, guessAdapter, guessTabixIndex, guessTrackConf, guessTrackConfForLocation, guessTrackType, hasFileHandlesInCache, hideTrackGeneric, isLooseTrackConfig, isSameAssemblyName, launchToggleTrackGeneric, launchTrackGeneric, makeIndex, makeIndexType, normalizeTrackInit, openAssemblyInLinearView, openMateLabel, pickDisplayForView, restoreFileHandles, restoreFileHandlesFromSnapshot, setBlobMap, setFileInCache, showTrackGeneric, storeBlobLocation, storeFileHandleLocation, stripFileExtension, stripTrackIds, toggleTrackGeneric, viewCanDisplayTrack, viewDisplayNames, } from '../util/tracks.ts';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// The published `@jbrowse/core/util/tracks` module, listed by name. Same split,
|
|
2
|
+
// and the same reasons, as publicUtil.ts: serving `import * as trackUtils from
|
|
3
|
+
// '../util/tracks.ts'` made the external ABI a side effect of an internal
|
|
4
|
+
// module, so moving a helper out of tracks.ts silently edited what plugins get.
|
|
5
|
+
// `getParentRenderProps` left that way -- deleted as dead in-tree code, which it
|
|
6
|
+
// was, while published apollo called it on three display models.
|
|
7
|
+
//
|
|
8
|
+
// Unlike publicUi.tsx this one is served in the RPC worker too (sharedModules.ts),
|
|
9
|
+
// so it stays React-free; sharedModules.purity.test.ts fails on the graph, not
|
|
10
|
+
// on this list.
|
|
11
|
+
//
|
|
12
|
+
// So: adding a line is how a helper becomes public, and it is a decision rather
|
|
13
|
+
// than a side effect of where the code happens to live.
|
|
14
|
+
export { UNKNOWN, UNSUPPORTED, addAdapterGuesser, addTrackTypeGuesser, allSessionTracks, annotationTrackIds, canonicalAssemblyNames, clearFileFromCache, ensureFileHandleReady, expandLooseTrackConfig, findFileHandleIds, generateUnknownTrackConf, generateUnsupportedTrackConf, getBlob, getBlobMap, getConfAssemblyNames, getConfAssemblyNamesOrNone, getFileFromCache, getFileName, getRpcSessionId, getTrackAssemblyNames, getTrackName, guessAdapter, guessTabixIndex, guessTrackConf, guessTrackConfForLocation, guessTrackType, hasFileHandlesInCache, hideTrackGeneric, isLooseTrackConfig, isSameAssemblyName, launchToggleTrackGeneric, launchTrackGeneric, makeIndex, makeIndexType, normalizeTrackInit, openAssemblyInLinearView, openMateLabel, pickDisplayForView, restoreFileHandles, restoreFileHandlesFromSnapshot, setBlobMap, setFileInCache, showTrackGeneric, storeBlobLocation, storeFileHandleLocation, stripFileExtension, stripTrackIds, toggleTrackGeneric, viewCanDisplayTrack, viewDisplayNames, } from '../util/tracks.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
declare const LazyBaseTooltip: import("react").LazyExoticComponent<typeof import("../ui/BaseTooltip.tsx").default>;
|
|
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';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// The published `@jbrowse/core/ui` module, listed by name. Same split, and the
|
|
3
|
+
// same reasons, as publicUtil.ts: an internal barrel and an external ABI want
|
|
4
|
+
// opposite things, and serving `import * as coreUi from '../ui/index.ts'` made
|
|
5
|
+
// the second a side effect of the first.
|
|
6
|
+
//
|
|
7
|
+
// That coupling has a second cost here that util does not have, and it is the
|
|
8
|
+
// one that keeps biting: **removing a component from ui/index.ts is how this
|
|
9
|
+
// codebase does lazy loading.** The barrel is imported by eagerly-evaluated
|
|
10
|
+
// plugin entries, so a re-export of a heavy component holds it on the startup
|
|
11
|
+
// path -- that is why BaseTooltip left (the line alone held ~266KB of
|
|
12
|
+
// @floating-ui). With the ABI derived from the barrel, every such fix was also a
|
|
13
|
+
// silent ABI removal. BaseTooltip's spent two releases missing from the served
|
|
14
|
+
// namespace while apollo read it there.
|
|
15
|
+
//
|
|
16
|
+
// Splitting them makes those independent. Deleting an `export … from` line in
|
|
17
|
+
// ui/index.ts now stops compiling here, so the ABI question is asked; and the
|
|
18
|
+
// answer can be `lazy()`, since **this file may serve a component the barrel
|
|
19
|
+
// does not export** -- see BaseTooltip below, which is exactly that. The eager
|
|
20
|
+
// win and the plugin surface stop being the same edit.
|
|
21
|
+
//
|
|
22
|
+
// So: adding a line is how a component becomes public, and it is a decision
|
|
23
|
+
// rather than a side effect of where the code happens to live.
|
|
24
|
+
import { Suspense, lazy } from 'react';
|
|
25
|
+
// Deliberately not re-exported by ui/index.ts -- see above. Served from its own
|
|
26
|
+
// path too ('@jbrowse/core/ui/BaseTooltip', which published react-msaview uses),
|
|
27
|
+
// and read off this namespace by published apollo; both spellings are this one
|
|
28
|
+
// component, and neither puts @floating-ui on the startup path.
|
|
29
|
+
const LazyBaseTooltip = lazy(() => import('../ui/BaseTooltip.js'));
|
|
30
|
+
export function BaseTooltip(props) {
|
|
31
|
+
return (_jsx(Suspense, { fallback: null, children: _jsx(LazyBaseTooltip, { ...props }) }));
|
|
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';
|
|
@@ -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, 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';
|
|
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';
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
// by the time this was written. A list that has to be edited by hand cannot
|
|
23
23
|
// drift that way.
|
|
24
24
|
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
|
|
25
|
+
// '@jbrowse/core/ui' (publicUi.tsx, 128) and '@jbrowse/core/util/tracks'
|
|
26
|
+
// (publicTracks.ts, 51) are split the same way now, and each had already lost a
|
|
27
|
+
// name to the coupling: BaseTooltip and getParentRenderProps. publicUi.tsx also
|
|
28
|
+
// carries the part this file has no use for -- an ABI file may serve a component
|
|
29
|
+
// its barrel does not export, behind lazy(). That is what makes "take it out of
|
|
30
|
+
// the barrel so it leaves the startup path" a different edit from "stop serving
|
|
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';
|
|
@@ -20,8 +20,8 @@ import * as coreIo from '../util/io/index.ts';
|
|
|
20
20
|
import * as coreLayouts from '../util/layouts/index.ts';
|
|
21
21
|
import * as coreMstReflection from '../util/mst-reflection.ts';
|
|
22
22
|
import * as rxjs from '../util/rxjs.ts';
|
|
23
|
-
import * as trackUtils from '../util/tracks.ts';
|
|
24
23
|
import * as mstTypes from '../util/types/mst.ts';
|
|
24
|
+
import * as trackUtils from './publicTracks.ts';
|
|
25
25
|
import * as coreUtil from './publicUtil.ts';
|
|
26
26
|
export declare const sharedModules: {
|
|
27
27
|
mobx: typeof mobx;
|
|
@@ -22,8 +22,8 @@ import * as coreIo from '../util/io/index.js';
|
|
|
22
22
|
import * as coreLayouts from '../util/layouts/index.js';
|
|
23
23
|
import * as coreMstReflection from '../util/mst-reflection.js';
|
|
24
24
|
import * as rxjs from '../util/rxjs.js';
|
|
25
|
-
import * as trackUtils from '../util/tracks.js';
|
|
26
25
|
import * as mstTypes from '../util/types/mst.js';
|
|
26
|
+
import * as trackUtils from './publicTracks.js';
|
|
27
27
|
import * as coreUtil from './publicUtil.js';
|
|
28
28
|
// The part of the runtime plugin ABI that is not UI: what a plugin evaluated in
|
|
29
29
|
// the RPC worker can actually use. modules.ts adds the UI on top of it for the
|
|
@@ -55,5 +55,12 @@ export const sharedModules = {
|
|
|
55
55
|
'@jbrowse/core/pluggableElementTypes/WidgetType': WidgetType,
|
|
56
56
|
'@jbrowse/core/pluggableElementTypes/models': pluggableElementTypeModels,
|
|
57
57
|
'@jbrowse/core/data_adapters/BaseAdapter': BaseAdapterExports,
|
|
58
|
+
// `adapterCache` is module-level state, so a plugin that bundles its own copy
|
|
59
|
+
// of this file gets a second cache in the RPC worker — and
|
|
60
|
+
// `freeAdapterResources`, which CoreFreeResources calls on the host's copy
|
|
61
|
+
// when the last track using an adapter config closes, never sees it. The
|
|
62
|
+
// cache is the only strong reference to an adapter, so those adapters and
|
|
63
|
+
// everything they hold live as long as the worker. Serving the module is what
|
|
64
|
+
// makes an external RPC method share the host's cache.
|
|
58
65
|
'@jbrowse/core/data_adapters/dataAdapterCache': dataAdapterCache,
|
|
59
66
|
};
|
package/esm/ReExports/uiStub.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
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, {
|
|
1
|
+
// The RPC worker's stand-in for a UI entry of the plugin ABI; why, and why a
|
|
2
|
+
// namespace gets real own keys: agent-docs/reference/EAGER_BUNDLE.md.
|
|
3
|
+
export const uiStub = new Proxy(function stubTarget() { }, {
|
|
9
4
|
get: (_, key) => key === 'then' ? undefined : key === Symbol.toPrimitive ? () => '' : uiStub,
|
|
10
5
|
has: () => true,
|
|
11
6
|
apply: () => uiStub,
|
|
12
7
|
construct: () => uiStub,
|
|
13
8
|
});
|
|
9
|
+
export function uiNamespace(names) {
|
|
10
|
+
return Object.fromEntries(names.map(name => [name, uiStub]));
|
|
11
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import reExportsList from './list.js';
|
|
2
2
|
import { sharedModules } from './sharedModules.js';
|
|
3
|
-
import { uiStub } from './uiStub.js';
|
|
4
|
-
|
|
5
|
-
//
|
|
3
|
+
import { uiNamespace, uiStub } from './uiStub.js';
|
|
4
|
+
import { WORKER_NAMESPACE_NAMES } from './workerNamespaceNames.js';
|
|
5
|
+
// Same keys as modules.ts; UI entries stubbed. agent-docs/reference/EAGER_BUNDLE.md
|
|
6
6
|
const libs = {
|
|
7
|
-
...Object.fromEntries(reExportsList.map(name => [
|
|
7
|
+
...Object.fromEntries(reExportsList.map(name => [
|
|
8
|
+
name,
|
|
9
|
+
name in WORKER_NAMESPACE_NAMES
|
|
10
|
+
? uiNamespace(WORKER_NAMESPACE_NAMES[name])
|
|
11
|
+
: uiStub,
|
|
12
|
+
])),
|
|
8
13
|
...sharedModules,
|
|
9
14
|
};
|
|
10
15
|
export default libs;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const REACT_DOM_NAMES: string[];
|
|
2
|
+
export declare const REACT_DOM_CLIENT_NAMES: string[];
|
|
3
|
+
export declare const MOBX_REACT_NAMES: string[];
|
|
4
|
+
export declare const MUI_UTILS_NAMES: string[];
|
|
5
|
+
export declare const MUI_STYLES_NAMES: string[];
|
|
6
|
+
export declare const TSS_REACT_NAMES: string[];
|
|
7
|
+
export declare const MATERIAL_UI_LAB_NAMES: string[];
|
|
8
|
+
export declare const MUI_MATERIAL_NAMES: string[];
|
|
9
|
+
export declare const MATERIAL_UI_CORE_NAMES: string[];
|
|
10
|
+
export declare const CORE_UI_NAMES: string[];
|
|
11
|
+
export declare const WORKER_NAMESPACE_NAMES: Record<string, readonly string[]>;
|