@jbrowse/core 2.4.2 → 2.6.0
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/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +16 -0
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +45 -0
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +15 -0
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +52 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +13 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +27 -0
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +15 -0
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +98 -0
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +16 -0
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +32 -0
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +17 -0
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +23 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +18 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +31 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.d.ts +7 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.js +13 -0
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +33 -0
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +170 -0
- package/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +5 -0
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +46 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +13 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.js +25 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.js +12 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.js +14 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +9 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.js +18 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +143 -0
- package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.d.ts → SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts} +2 -2
- package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.js → SequenceFeatureDetails/SequenceFeatureSettingsDialog.js} +1 -1
- package/BaseFeatureWidget/{SequenceHelpDialog.d.ts → SequenceFeatureDetails/SequenceHelpDialog.d.ts} +2 -2
- package/BaseFeatureWidget/{SequenceHelpDialog.js → SequenceFeatureDetails/SequenceHelpDialog.js} +6 -9
- package/BaseFeatureWidget/{SequencePanel.d.ts → SequenceFeatureDetails/SequencePanel.d.ts} +1 -1
- package/BaseFeatureWidget/{SequencePanel.js → SequenceFeatureDetails/SequencePanel.js} +10 -8
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +10 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +73 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/index.d.ts +3 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/index.js +68 -0
- package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.d.ts +17 -17
- package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.d.ts +16 -16
- package/BaseFeatureWidget/SequenceFeatureDetails/util.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/util.js +11 -0
- package/BaseFeatureWidget/index.d.ts +4 -1
- package/BaseFeatureWidget/index.js +29 -17
- package/BaseFeatureWidget/types.d.ts +2 -2
- package/BaseFeatureWidget/util.js +15 -5
- package/Plugin.d.ts +1 -1
- package/PluginLoader.js +17 -0
- package/PluginManager.d.ts +8 -5
- package/PluginManager.js +3 -0
- package/README.md +0 -2
- package/ReExports/list.js +1 -0
- package/ReExports/modules.d.ts +8 -5
- package/ReExports/modules.js +7 -7
- package/TextSearch/TextSearchManager.d.ts +2 -9
- package/assemblyManager/assembly.d.ts +91 -8
- package/assemblyManager/assembly.js +92 -8
- package/assemblyManager/assemblyConfigSchema.d.ts +52 -1
- package/assemblyManager/assemblyConfigSchema.js +1 -0
- package/assemblyManager/assemblyManager.d.ts +227 -58
- package/assemblyManager/assemblyManager.js +72 -13
- package/assemblyManager/index.d.ts +1 -0
- package/configuration/configurationSchema.d.ts +14 -16
- package/configuration/configurationSchema.js +4 -2
- package/configuration/index.d.ts +1 -1
- package/configuration/types.d.ts +15 -0
- package/configuration/types.js +2 -0
- package/configuration/util.d.ts +5 -3
- package/configuration/util.js +18 -18
- package/data_adapters/BaseAdapter/BaseAdapter.d.ts +23 -0
- package/data_adapters/BaseAdapter/BaseAdapter.js +37 -0
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +128 -0
- package/data_adapters/{BaseAdapter.js → BaseAdapter/BaseFeatureDataAdapter.js} +58 -88
- package/data_adapters/BaseAdapter/BaseOptions.d.ts +16 -0
- package/data_adapters/BaseAdapter/BaseOptions.js +2 -0
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +9 -0
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.js +2 -0
- package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +13 -0
- package/data_adapters/BaseAdapter/BaseSequenceAdapter.js +10 -0
- package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +6 -0
- package/data_adapters/BaseAdapter/BaseTextSearchAdapter.js +2 -0
- package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +6 -0
- package/data_adapters/BaseAdapter/RegionsAdapter.js +2 -0
- package/data_adapters/BaseAdapter/index.d.ts +15 -0
- package/data_adapters/BaseAdapter/index.js +25 -0
- package/data_adapters/BaseAdapter/types.d.ts +21 -0
- package/data_adapters/BaseAdapter/types.js +2 -0
- package/data_adapters/BaseAdapter/util.d.ts +12 -0
- package/data_adapters/BaseAdapter/util.js +23 -0
- package/data_adapters/CytobandAdapter/configSchema.d.ts +11 -1
- package/package.json +4 -4
- package/pluggableElementTypes/AdapterType.d.ts +1 -1
- package/pluggableElementTypes/ConnectionType.d.ts +1 -1
- package/pluggableElementTypes/DisplayType.d.ts +1 -1
- package/pluggableElementTypes/InternetAccountType.d.ts +1 -1
- package/pluggableElementTypes/RpcMethodType.d.ts +9 -7
- package/pluggableElementTypes/RpcMethodType.js +9 -7
- package/pluggableElementTypes/TextSearchAdapterType.d.ts +1 -1
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +18 -0
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +9 -0
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +10 -1
- package/pluggableElementTypes/models/BaseDisplayModel.js +9 -1
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +2 -1
- package/pluggableElementTypes/models/BaseTrackModel.js +4 -2
- package/pluggableElementTypes/models/BaseViewModel.d.ts +46 -2
- package/pluggableElementTypes/models/BaseViewModel.js +6 -0
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +36 -2
- package/pluggableElementTypes/models/InternetAccountModel.js +33 -21
- package/pluggableElementTypes/models/baseConnectionConfig.d.ts +22 -2
- package/pluggableElementTypes/models/baseConnectionConfig.js +2 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +42 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -1
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +120 -3
- package/pluggableElementTypes/models/baseTrackConfig.js +7 -5
- package/pluggableElementTypes/models/index.d.ts +1 -1
- package/pluggableElementTypes/renderers/BoxRendererType.js +1 -2
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +2 -2
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +4 -2
- package/pluggableElementTypes/renderers/FeatureRendererType.js +4 -6
- package/pluggableElementTypes/renderers/RendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -2
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
- package/rpc/BaseRpcDriver.js +1 -7
- package/rpc/RpcManager.d.ts +8 -1
- package/rpc/RpcManager.js +1 -1
- package/rpc/baseRpcConfig.d.ts +10 -1
- package/rpc/configSchema.d.ts +14 -1
- package/rpc/coreRpcMethods.d.ts +1 -1
- package/rpc/coreRpcMethods.js +3 -3
- package/rpc/mainThreadRpcConfig.d.ts +7 -1
- package/rpc/methods/{CoreEstimateRegionStats.d.ts → CoreGetFeatureDensityStats.d.ts} +2 -2
- package/rpc/methods/{CoreEstimateRegionStats.js → CoreGetFeatureDensityStats.js} +4 -4
- package/rpc/methods/CoreGetFeatureDetails.js +5 -5
- package/rpc/webWorkerRpcConfig.d.ts +7 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AppLogo.d.ts +2 -2
- package/ui/AssemblySelector.d.ts +2 -2
- package/ui/AssemblySelector.js +1 -1
- package/ui/CascadingMenu.d.ts +2 -2
- package/ui/CascadingMenuButton.d.ts +8 -0
- package/ui/CascadingMenuButton.js +20 -0
- package/ui/ColorPicker.d.ts +4 -4
- package/ui/Dialog.d.ts +5 -5
- package/ui/Dialog.js +19 -7
- package/ui/DropDownMenu.d.ts +2 -2
- package/ui/EditableTypography.js +1 -1
- package/ui/ErrorMessage.d.ts +2 -2
- package/ui/ErrorMessage.js +6 -2
- package/ui/FactoryResetDialog.d.ts +2 -2
- package/ui/FatalErrorDialog.d.ts +6 -7
- package/ui/FatalErrorDialog.js +7 -7
- package/ui/FileSelector/FileSelector.d.ts +2 -2
- package/ui/FileSelector/FileSelector.js +3 -2
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -2
- package/ui/FileSelector/UrlChooser.d.ts +3 -4
- package/ui/FileSelector/UrlChooser.js +8 -10
- package/ui/Icons.d.ts +10 -10
- package/ui/LoadingEllipses.d.ts +2 -2
- package/ui/Logo.d.ts +3 -3
- package/ui/Menu.d.ts +2 -2
- package/ui/PrerenderedCanvas.d.ts +2 -2
- package/ui/ResizeBar.d.ts +1 -1
- package/ui/ResizeBar.js +1 -1
- package/ui/ResizeHandle.d.ts +2 -2
- package/ui/ReturnToImportFormDialog.d.ts +2 -2
- package/ui/SanitizedHTML.d.ts +2 -2
- package/ui/SanitizedHTML.js +6 -0
- package/ui/Snackbar.d.ts +7 -9
- package/ui/Snackbar.js +12 -17
- package/ui/SnackbarModel.d.ts +9 -3
- package/ui/SnackbarModel.js +3 -3
- package/ui/Tooltip.d.ts +2 -2
- package/ui/index.d.ts +0 -1
- package/ui/index.js +1 -3
- package/ui/react-colorful.d.ts +1 -1
- package/ui/theme.js +3 -18
- package/util/Base1DUtils.js +2 -1
- package/util/QuickLRU.d.ts +1 -1
- package/util/blockTypes.js +1 -1
- package/util/formatFastaStrings.js +1 -1
- package/util/index.d.ts +18 -2
- package/util/index.js +77 -11
- package/util/io/index.js +1 -1
- package/util/layouts/PrecomputedMultiLayout.d.ts +1 -1
- package/util/mst-reflection.js +1 -2
- package/util/offscreenCanvasUtils.d.ts +2 -2
- package/util/stats.d.ts +5 -5
- package/util/types/index.d.ts +9 -3
- package/util/types/index.js +6 -2
- package/util/types/mst.d.ts +12 -9
- package/util/types/util.d.ts +0 -3
- package/BaseFeatureWidget/BaseFeatureDetail.d.ts +0 -62
- package/BaseFeatureWidget/BaseFeatureDetail.js +0 -378
- package/BaseFeatureWidget/SequenceBox.d.ts +0 -29
- package/BaseFeatureWidget/SequenceBox.js +0 -63
- package/BaseFeatureWidget/SequenceFeatureDetails.d.ts +0 -3
- package/BaseFeatureWidget/SequenceFeatureDetails.js +0 -230
- package/data_adapters/BaseAdapter.d.ts +0 -138
- package/ui/AboutDialog.d.ts +0 -12
- package/ui/AboutDialog.js +0 -125
- package/ui/App.d.ts +0 -18
- package/ui/App.js +0 -114
- package/ui/AppToolbar.d.ts +0 -19
- package/ui/AppToolbar.js +0 -56
- package/ui/Drawer.d.ts +0 -8
- package/ui/Drawer.js +0 -34
- package/ui/DrawerWidget.d.ts +0 -6
- package/ui/DrawerWidget.js +0 -130
- package/ui/ViewContainer.d.ts +0 -9
- package/ui/ViewContainer.js +0 -76
- package/ui/ViewContainerTitle.d.ts +0 -6
- package/ui/ViewContainerTitle.js +0 -42
- package/ui/ViewLauncher.d.ts +0 -18
- package/ui/ViewLauncher.js +0 -50
- package/ui/ViewMenu.d.ts +0 -9
- package/ui/ViewMenu.js +0 -69
- package/ui/ViewPanel.d.ts +0 -19
- package/ui/ViewPanel.js +0 -49
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.js +0 -0
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.js +0 -0
package/ui/Tooltip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Feature } from '../util';
|
|
3
3
|
declare const _default: ({ offsetX, offsetY, configuration, feature, timeout, }: {
|
|
4
4
|
offsetX: number;
|
|
@@ -10,5 +10,5 @@ declare const _default: ({ offsetX, offsetY, configuration, feature, timeout, }:
|
|
|
10
10
|
} & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>;
|
|
11
11
|
feature?: Feature | undefined;
|
|
12
12
|
timeout?: number | undefined;
|
|
13
|
-
}) => JSX.Element | null;
|
|
13
|
+
}) => React.JSX.Element | null;
|
|
14
14
|
export default _default;
|
package/ui/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './theme';
|
|
2
2
|
export { LogoFull, Logomark } from './Logo';
|
|
3
|
-
export { default as App } from './App';
|
|
4
3
|
export { default as AssemblySelector } from './AssemblySelector';
|
|
5
4
|
export { default as CascadingMenu } from './CascadingMenu';
|
|
6
5
|
export { default as Dialog } from './Dialog';
|
package/ui/index.js
CHANGED
|
@@ -17,13 +17,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.SanitizedHTML = exports.ResizeHandle = exports.ReturnToImportFormDialog = exports.Tooltip = exports.PrerenderedCanvas = exports.Menu = exports.LoadingEllipses = exports.FileSelector = exports.FatalErrorDialog = exports.FactoryResetDialog = exports.ErrorMessage = exports.EditableTypography = exports.Dialog = exports.CascadingMenu = exports.AssemblySelector = exports.
|
|
20
|
+
exports.SanitizedHTML = exports.ResizeHandle = exports.ReturnToImportFormDialog = exports.Tooltip = exports.PrerenderedCanvas = exports.Menu = exports.LoadingEllipses = exports.FileSelector = exports.FatalErrorDialog = exports.FactoryResetDialog = exports.ErrorMessage = exports.EditableTypography = exports.Dialog = exports.CascadingMenu = exports.AssemblySelector = exports.Logomark = exports.LogoFull = void 0;
|
|
21
21
|
__exportStar(require("./theme"), exports);
|
|
22
22
|
var Logo_1 = require("./Logo");
|
|
23
23
|
Object.defineProperty(exports, "LogoFull", { enumerable: true, get: function () { return Logo_1.LogoFull; } });
|
|
24
24
|
Object.defineProperty(exports, "Logomark", { enumerable: true, get: function () { return Logo_1.Logomark; } });
|
|
25
|
-
var App_1 = require("./App");
|
|
26
|
-
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return __importDefault(App_1).default; } });
|
|
27
25
|
var AssemblySelector_1 = require("./AssemblySelector");
|
|
28
26
|
Object.defineProperty(exports, "AssemblySelector", { enumerable: true, get: function () { return __importDefault(AssemblySelector_1).default; } });
|
|
29
27
|
var CascadingMenu_1 = require("./CascadingMenu");
|
package/ui/react-colorful.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ declare function Ce(r: any): e.FunctionComponentElement<any>;
|
|
|
13
13
|
declare function me(r: any): e.FunctionComponentElement<any>;
|
|
14
14
|
declare function pe(r: any): e.FunctionComponentElement<any>;
|
|
15
15
|
declare function X(e: any): void;
|
|
16
|
-
import e from
|
|
16
|
+
import e from 'react';
|
|
17
17
|
export { Ne as HexColorInput, J as HexColorPicker, oe as HslColorPicker, le as HslStringColorPicker, Z as HslaColorPicker, re as HslaStringColorPicker, de as HsvColorPicker, he as HsvStringColorPicker, se as HsvaColorPicker, ue as HsvaStringColorPicker, _e as RgbColorPicker, Ce as RgbStringColorPicker, me as RgbaColorPicker, pe as RgbaStringColorPicker, X as setNonce };
|
package/ui/theme.js
CHANGED
|
@@ -246,11 +246,6 @@ function createDefaultProps(theme) {
|
|
|
246
246
|
transitionDuration: 0,
|
|
247
247
|
},
|
|
248
248
|
},
|
|
249
|
-
MuiMenuList: {
|
|
250
|
-
defaultProps: {
|
|
251
|
-
dense: true,
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
249
|
MuiMenuItem: {
|
|
255
250
|
defaultProps: {
|
|
256
251
|
dense: true,
|
|
@@ -266,8 +261,6 @@ function createDefaultProps(theme) {
|
|
|
266
261
|
styleOverrides: {
|
|
267
262
|
// the default link color uses theme.palette.primary.main which is
|
|
268
263
|
// very bad with dark mode+midnight primary
|
|
269
|
-
//
|
|
270
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
271
264
|
root: ({ theme }) => ({
|
|
272
265
|
color: theme.palette.text.secondary,
|
|
273
266
|
}),
|
|
@@ -282,10 +275,7 @@ function createDefaultProps(theme) {
|
|
|
282
275
|
// keeps the forest-green checkbox by default but for darkmode, uses
|
|
283
276
|
// a text-like coloring to ensure contrast
|
|
284
277
|
// xref https://stackoverflow.com/a/72546130/2129219
|
|
285
|
-
|
|
286
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
287
|
-
root: (props) => {
|
|
288
|
-
const { theme } = props;
|
|
278
|
+
root: ({ theme }) => {
|
|
289
279
|
return theme.palette.mode === 'dark'
|
|
290
280
|
? {
|
|
291
281
|
color: theme.palette.text.secondary,
|
|
@@ -306,10 +296,7 @@ function createDefaultProps(theme) {
|
|
|
306
296
|
// keeps the forest-green checkbox by default but for darkmode, uses
|
|
307
297
|
// a text-like coloring to ensure contrast
|
|
308
298
|
// xref https://stackoverflow.com/a/72546130/2129219
|
|
309
|
-
|
|
310
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
311
|
-
root: (props) => {
|
|
312
|
-
const { theme } = props;
|
|
299
|
+
root: ({ theme }) => {
|
|
313
300
|
return theme.palette.mode === 'dark'
|
|
314
301
|
? {
|
|
315
302
|
color: theme.palette.text.secondary,
|
|
@@ -331,9 +318,7 @@ function createDefaultProps(theme) {
|
|
|
331
318
|
// a text-like coloring to ensure contrast
|
|
332
319
|
// xref https://stackoverflow.com/a/72546130/2129219
|
|
333
320
|
//
|
|
334
|
-
|
|
335
|
-
root: (props) => {
|
|
336
|
-
const { theme } = props;
|
|
321
|
+
root: ({ theme }) => {
|
|
337
322
|
return theme.palette.mode === 'dark'
|
|
338
323
|
? {
|
|
339
324
|
color: theme.palette.text.secondary,
|
package/util/Base1DUtils.js
CHANGED
|
@@ -109,7 +109,8 @@ function pxToBp(self, px) {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
if (bp >= bpSoFar && displayedRegions.length > 0) {
|
|
112
|
-
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
113
|
+
const r = displayedRegions.at(-1);
|
|
113
114
|
const len = r.end - r.start;
|
|
114
115
|
const offset = bp - bpSoFar + len;
|
|
115
116
|
const snap = (0, mobx_state_tree_1.getSnapshot)(r);
|
package/util/QuickLRU.d.ts
CHANGED
|
@@ -27,6 +27,6 @@ export default class QuickLRU extends Map<any, any> {
|
|
|
27
27
|
entriesDescending(): Generator<any[], void, unknown>;
|
|
28
28
|
entriesAscending(): Generator<any[], void, unknown>;
|
|
29
29
|
entries(): Generator<any[], void, unknown>;
|
|
30
|
-
forEach(callbackFunction: any, thisArgument?:
|
|
30
|
+
forEach(callbackFunction: any, thisArgument?: this): void;
|
|
31
31
|
[Symbol.iterator](): Generator<any[], void, unknown>;
|
|
32
32
|
}
|
package/util/blockTypes.js
CHANGED
|
@@ -7,7 +7,7 @@ class BlockSet {
|
|
|
7
7
|
}
|
|
8
8
|
push(block) {
|
|
9
9
|
if (block instanceof ElidedBlock && this.blocks.length > 0) {
|
|
10
|
-
const lastBlock = this.blocks
|
|
10
|
+
const lastBlock = this.blocks.at(-1);
|
|
11
11
|
if (lastBlock instanceof ElidedBlock) {
|
|
12
12
|
lastBlock.push(block);
|
|
13
13
|
return;
|
|
@@ -9,7 +9,7 @@ exports.formatSeqFasta = exports.formatFastaLines = void 0;
|
|
|
9
9
|
* @returns formatted sequence string
|
|
10
10
|
*/
|
|
11
11
|
function formatFastaLines(seqString) {
|
|
12
|
-
return seqString.
|
|
12
|
+
return seqString.replaceAll(/(.{1,80})/g, '$1\n').trimEnd();
|
|
13
13
|
}
|
|
14
14
|
exports.formatFastaLines = formatFastaLines;
|
|
15
15
|
/**
|
package/util/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PluginManager from '../PluginManager';
|
|
3
|
-
import { IAnyStateTreeNode, IStateTreeNode } from 'mobx-state-tree';
|
|
3
|
+
import { IAnyStateTreeNode, IStateTreeNode, Instance } from 'mobx-state-tree';
|
|
4
4
|
import { IReactionPublic, IReactionOptions } from 'mobx';
|
|
5
5
|
import { Feature } from './simpleFeature';
|
|
6
6
|
import { AssemblyManager, Region, TypeTestedByPredicate } from './types';
|
|
7
|
+
import { Region as MUIRegion } from './types/mst';
|
|
7
8
|
import { BaseBlock } from './blockTypes';
|
|
8
9
|
export * from './types';
|
|
9
10
|
export * from './aborting';
|
|
@@ -165,6 +166,7 @@ export declare function iterMap<T, U>(iter: Iterable<T>, func: (arg: T) => U, si
|
|
|
165
166
|
* Otherwise, findLastIndex returns -1.
|
|
166
167
|
*/
|
|
167
168
|
export declare function findLastIndex<T>(array: Array<T>, predicate: (value: T, index: number, obj: T[]) => boolean): number;
|
|
169
|
+
export declare function findLast<T>(array: Array<T>, predicate: (value: T, index: number, obj: T[]) => boolean): T | undefined;
|
|
168
170
|
/**
|
|
169
171
|
* makes a mobx reaction with the given functions, that calls actions on the
|
|
170
172
|
* model for each stage of execution, and to abort the reaction function when
|
|
@@ -183,7 +185,7 @@ export declare function findLastIndex<T>(array: Array<T>, predicate: (value: T,
|
|
|
183
185
|
* @param errorFunction -
|
|
184
186
|
*/
|
|
185
187
|
export declare function makeAbortableReaction<T, U, V>(self: T, dataFunction: (arg: T) => U, asyncReactionFunction: (arg: U | undefined, signal: AbortSignal, model: T, handle: IReactionPublic) => Promise<V>, reactionOptions: IReactionOptions, startedFunction: (aborter: AbortController) => void, successFunction: (arg: V) => void, errorFunction: (err: unknown) => void): void;
|
|
186
|
-
export declare function renameRegionIfNeeded(refNameMap: Record<string, string>, region: Region): Region & {
|
|
188
|
+
export declare function renameRegionIfNeeded(refNameMap: Record<string, string>, region: Region | Instance<typeof MUIRegion>): Region & {
|
|
187
189
|
originalRefName?: string;
|
|
188
190
|
};
|
|
189
191
|
export declare function renameRegionsIfNeeded<ARGTYPE extends {
|
|
@@ -354,4 +356,18 @@ export declare function max(arr: number[], init?: number): number;
|
|
|
354
356
|
export declare function min(arr: number[], init?: number): number;
|
|
355
357
|
export declare function sum(arr: number[]): number;
|
|
356
358
|
export declare function avg(arr: number[]): number;
|
|
359
|
+
export declare function groupBy<T>(array: T[], predicate: (v: T) => string): {
|
|
360
|
+
[key: string]: T[];
|
|
361
|
+
};
|
|
362
|
+
export declare function notEmpty<T>(value: T | null | undefined): value is T;
|
|
363
|
+
export declare function mergeIntervals<T extends {
|
|
364
|
+
start: number;
|
|
365
|
+
end: number;
|
|
366
|
+
}>(intervals: T[], w?: number): T[];
|
|
367
|
+
interface BasicFeature {
|
|
368
|
+
end: number;
|
|
369
|
+
start: number;
|
|
370
|
+
refName: string;
|
|
371
|
+
}
|
|
372
|
+
export declare function gatherOverlaps(regions: BasicFeature[]): BasicFeature[];
|
|
357
373
|
export { default as SimpleFeature, type Feature, type SimpleFeatureSerialized, isFeature, } from './simpleFeature';
|
package/util/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
21
|
-
exports.isFeature = exports.SimpleFeature = exports.avg = exports.sum = exports.min = exports.max = exports.localStorageSetItem = exports.localStorageGetItem = exports.getEnv = exports.measureGridWidth = exports.getStr = exports.getUriLink = exports.useLocalStorage = exports.getLayoutId = exports.getViewParams = exports.getTickDisplayStr = exports.toLocale = exports.getBpDisplayStr = void 0;
|
|
20
|
+
exports.bytesForRegions = exports.objectHash = exports.hashCode = exports.updateStatus = exports.generateCodonTable = exports.defaultCodonTable = exports.defaultStops = exports.defaultStarts = exports.measureText = exports.rIC = exports.blobToDataURL = exports.complement = exports.reverse = exports.revcom = exports.isElectron = exports.stringify = exports.shorten = exports.minmax = exports.renameRegionsIfNeeded = exports.renameRegionIfNeeded = exports.makeAbortableReaction = exports.findLast = exports.findLastIndex = exports.iterMap = exports.bpSpanPx = exports.featureSpanPx = exports.cartesianToPolar = exports.polarToCartesian = exports.degToRad = exports.radToDeg = exports.bpToPx = exports.clamp = exports.compareLocStrings = exports.compareLocs = exports.parseLocString = exports.parseLocStringOneBased = exports.assembleLocStringFast = exports.assembleLocString = exports.getContainingDisplay = exports.getContainingTrack = exports.getContainingView = exports.getSession = exports.findParentThatIs = exports.springAnimate = exports.findParentThat = exports.useDebouncedCallback = exports.useWidthSetter = exports.useDebounce = exports.inProduction = exports.inDevelopment = void 0;
|
|
21
|
+
exports.isFeature = exports.SimpleFeature = exports.gatherOverlaps = exports.mergeIntervals = exports.notEmpty = exports.groupBy = exports.avg = exports.sum = exports.min = exports.max = exports.localStorageSetItem = exports.localStorageGetItem = exports.getEnv = exports.measureGridWidth = exports.getStr = exports.getUriLink = exports.useLocalStorage = exports.getLayoutId = exports.getViewParams = exports.getTickDisplayStr = exports.toLocale = exports.getBpDisplayStr = exports.supportedIndexingAdapters = void 0;
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
23
23
|
const react_1 = require("react");
|
|
24
24
|
const is_object_1 = __importDefault(require("is-object"));
|
|
@@ -316,8 +316,8 @@ function parseLocStringOneBased(locString, isValidRefName) {
|
|
|
316
316
|
return {
|
|
317
317
|
assemblyName,
|
|
318
318
|
refName: prefix,
|
|
319
|
-
start: +start.
|
|
320
|
-
end: +end.
|
|
319
|
+
start: +start.replaceAll(',', ''),
|
|
320
|
+
end: +end.replaceAll(',', ''),
|
|
321
321
|
reversed,
|
|
322
322
|
};
|
|
323
323
|
}
|
|
@@ -330,15 +330,15 @@ function parseLocStringOneBased(locString, isValidRefName) {
|
|
|
330
330
|
return {
|
|
331
331
|
assemblyName,
|
|
332
332
|
refName: prefix,
|
|
333
|
-
start: +start.
|
|
333
|
+
start: +start.replaceAll(',', ''),
|
|
334
334
|
reversed,
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
return {
|
|
338
338
|
assemblyName,
|
|
339
339
|
refName: prefix,
|
|
340
|
-
start: +start.
|
|
341
|
-
end: +start.
|
|
340
|
+
start: +start.replaceAll(',', ''),
|
|
341
|
+
end: +start.replaceAll(',', ''),
|
|
342
342
|
reversed,
|
|
343
343
|
};
|
|
344
344
|
}
|
|
@@ -534,6 +534,16 @@ function findLastIndex(array, predicate) {
|
|
|
534
534
|
return -1;
|
|
535
535
|
}
|
|
536
536
|
exports.findLastIndex = findLastIndex;
|
|
537
|
+
function findLast(array, predicate) {
|
|
538
|
+
let l = array.length;
|
|
539
|
+
while (l--) {
|
|
540
|
+
if (predicate(array[l], l, array)) {
|
|
541
|
+
return array[l];
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
return undefined;
|
|
545
|
+
}
|
|
546
|
+
exports.findLast = findLast;
|
|
537
547
|
/**
|
|
538
548
|
* makes a mobx reaction with the given functions, that calls actions on the
|
|
539
549
|
* model for each stage of execution, and to abort the reaction function when
|
|
@@ -613,8 +623,7 @@ function renameRegionIfNeeded(refNameMap, region) {
|
|
|
613
623
|
if (region && (refNameMap === null || refNameMap === void 0 ? void 0 : refNameMap[region.refName])) {
|
|
614
624
|
// clone the region so we don't modify it
|
|
615
625
|
region = (0, mobx_state_tree_1.isStateTreeNode)(region)
|
|
616
|
-
?
|
|
617
|
-
{ ...(0, mobx_state_tree_1.getSnapshot)(region) }
|
|
626
|
+
? { ...(0, mobx_state_tree_1.getSnapshot)(region) }
|
|
618
627
|
: { ...region };
|
|
619
628
|
// modify it directly in the container
|
|
620
629
|
const newRef = refNameMap[region.refName];
|
|
@@ -716,7 +725,7 @@ exports.complement = (() => {
|
|
|
716
725
|
G: 'C',
|
|
717
726
|
};
|
|
718
727
|
return (seqString) => {
|
|
719
|
-
return seqString.
|
|
728
|
+
return seqString.replaceAll(complementRegex, m => complementTable[m] || '');
|
|
720
729
|
};
|
|
721
730
|
})();
|
|
722
731
|
function blobToDataURL(blob) {
|
|
@@ -995,7 +1004,7 @@ function getStr(obj) {
|
|
|
995
1004
|
exports.getStr = getStr;
|
|
996
1005
|
// tries to measure grid width without HTML tags included
|
|
997
1006
|
function coarseStripHTML(s) {
|
|
998
|
-
return s.
|
|
1007
|
+
return s.replaceAll(/(<([^>]+)>)/gi, '');
|
|
999
1008
|
}
|
|
1000
1009
|
// heuristic measurement for a column of a @mui/x-data-grid, pass in values from a column
|
|
1001
1010
|
function measureGridWidth(elements, args) {
|
|
@@ -1051,6 +1060,63 @@ function avg(arr) {
|
|
|
1051
1060
|
return sum(arr) / arr.length;
|
|
1052
1061
|
}
|
|
1053
1062
|
exports.avg = avg;
|
|
1063
|
+
function groupBy(array, predicate) {
|
|
1064
|
+
var _a;
|
|
1065
|
+
const result = {};
|
|
1066
|
+
for (const value of array) {
|
|
1067
|
+
const entry = (result[_a = predicate(value)] || (result[_a] = []));
|
|
1068
|
+
entry.push(value);
|
|
1069
|
+
}
|
|
1070
|
+
return result;
|
|
1071
|
+
}
|
|
1072
|
+
exports.groupBy = groupBy;
|
|
1073
|
+
function notEmpty(value) {
|
|
1074
|
+
return value !== null && value !== undefined;
|
|
1075
|
+
}
|
|
1076
|
+
exports.notEmpty = notEmpty;
|
|
1077
|
+
function mergeIntervals(intervals, w = 5000) {
|
|
1078
|
+
// test if there are at least 2 intervals
|
|
1079
|
+
if (intervals.length <= 1) {
|
|
1080
|
+
return intervals;
|
|
1081
|
+
}
|
|
1082
|
+
const stack = [];
|
|
1083
|
+
let top = null;
|
|
1084
|
+
// sort the intervals based on their start values
|
|
1085
|
+
intervals = intervals.sort((a, b) => a.start - b.start);
|
|
1086
|
+
// push the 1st interval into the stack
|
|
1087
|
+
stack.push(intervals[0]);
|
|
1088
|
+
// start from the next interval and merge if needed
|
|
1089
|
+
for (let i = 1; i < intervals.length; i++) {
|
|
1090
|
+
// get the top element
|
|
1091
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1092
|
+
top = stack.at(-1);
|
|
1093
|
+
// if the current interval doesn't overlap with the
|
|
1094
|
+
// stack top element, push it to the stack
|
|
1095
|
+
if (top.end + w < intervals[i].start - w) {
|
|
1096
|
+
stack.push(intervals[i]);
|
|
1097
|
+
}
|
|
1098
|
+
// otherwise update the end value of the top element
|
|
1099
|
+
// if end of current interval is higher
|
|
1100
|
+
else if (top.end < intervals[i].end) {
|
|
1101
|
+
top.end = Math.max(top.end, intervals[i].end);
|
|
1102
|
+
stack.pop();
|
|
1103
|
+
stack.push(top);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
return stack;
|
|
1107
|
+
}
|
|
1108
|
+
exports.mergeIntervals = mergeIntervals;
|
|
1109
|
+
function gatherOverlaps(regions) {
|
|
1110
|
+
const memo = {};
|
|
1111
|
+
for (const x of regions) {
|
|
1112
|
+
if (!memo[x.refName]) {
|
|
1113
|
+
memo[x.refName] = [];
|
|
1114
|
+
}
|
|
1115
|
+
memo[x.refName].push(x);
|
|
1116
|
+
}
|
|
1117
|
+
return Object.values(memo).flatMap(group => mergeIntervals(group.sort((a, b) => a.start - b.start)));
|
|
1118
|
+
}
|
|
1119
|
+
exports.gatherOverlaps = gatherOverlaps;
|
|
1054
1120
|
var simpleFeature_1 = require("./simpleFeature");
|
|
1055
1121
|
Object.defineProperty(exports, "SimpleFeature", { enumerable: true, get: function () { return __importDefault(simpleFeature_1).default; } });
|
|
1056
1122
|
Object.defineProperty(exports, "isFeature", { enumerable: true, get: function () { return simpleFeature_1.isFeature; } });
|
package/util/io/index.js
CHANGED
|
@@ -101,7 +101,7 @@ function getInternetAccount(location, pluginManager) {
|
|
|
101
101
|
configuration: location.internetAccountPreAuthorization.authInfo.configuration,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
return;
|
|
104
|
+
return undefined;
|
|
105
105
|
}
|
|
106
106
|
// This fetch throws a special error if the response is "401" and includes a
|
|
107
107
|
// "WWW-Authenticate: Basic" header. This is so downstream code can retry if
|
package/util/mst-reflection.js
CHANGED
|
@@ -58,8 +58,7 @@ exports.getUnionSubTypes = getUnionSubTypes;
|
|
|
58
58
|
* get the type of one of the properties of the given MST model type
|
|
59
59
|
*/
|
|
60
60
|
function getPropertyType(type, propertyName) {
|
|
61
|
-
|
|
62
|
-
return propertyType;
|
|
61
|
+
return type.properties[propertyName];
|
|
63
62
|
}
|
|
64
63
|
exports.getPropertyType = getPropertyType;
|
|
65
64
|
/**
|
|
@@ -10,7 +10,7 @@ export declare function renderToAbstractCanvas(width: number, height: number, op
|
|
|
10
10
|
}, cb: (ctx: CanvasRenderingContext2D) => RendererRet): Promise<{
|
|
11
11
|
canvasRecordedData: any;
|
|
12
12
|
} | {
|
|
13
|
-
reactElement: JSX.Element;
|
|
13
|
+
reactElement: React.JSX.Element;
|
|
14
14
|
} | {
|
|
15
15
|
imageData: any;
|
|
16
16
|
}>;
|
|
@@ -24,5 +24,5 @@ export declare function ReactRendering({ rendering, }: {
|
|
|
24
24
|
reactElement?: React.ReactNode;
|
|
25
25
|
html?: string;
|
|
26
26
|
};
|
|
27
|
-
}): JSX.Element;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
28
|
export {};
|
package/util/stats.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { NoAssemblyRegion } from './types';
|
|
3
3
|
import { Feature } from './simpleFeature';
|
|
4
|
-
export interface
|
|
4
|
+
export interface UnrectifiedQuantitativeStats {
|
|
5
5
|
scoreMin: number;
|
|
6
6
|
scoreMax: number;
|
|
7
7
|
scoreSum: number;
|
|
@@ -9,7 +9,7 @@ export interface UnrectifiedFeatureStats {
|
|
|
9
9
|
featureCount: number;
|
|
10
10
|
basesCovered: number;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface QuantitativeStats extends UnrectifiedQuantitativeStats {
|
|
13
13
|
featureDensity: number;
|
|
14
14
|
scoreMean: number;
|
|
15
15
|
scoreStdDev: number;
|
|
@@ -31,7 +31,7 @@ export declare function calcStdFromSums(sum: number, sumSquares: number, n: numb
|
|
|
31
31
|
* @returns - a summary stats object with
|
|
32
32
|
* scoreMean, scoreStdDev, and featureDensity added
|
|
33
33
|
*/
|
|
34
|
-
export declare function rectifyStats(s:
|
|
34
|
+
export declare function rectifyStats(s: UnrectifiedQuantitativeStats): QuantitativeStats;
|
|
35
35
|
/**
|
|
36
36
|
* calculates per-base scores for variable width features over a region
|
|
37
37
|
*
|
|
@@ -47,5 +47,5 @@ export declare function calcPerBaseStats(region: NoAssemblyRegion, features: Fea
|
|
|
47
47
|
* @param features - array of features which are possibly summary features
|
|
48
48
|
* @returns - object with scoreMax, scoreMin, scoreSum, scoreSumSquares, etc
|
|
49
49
|
*/
|
|
50
|
-
export declare function scoresToStats(region: NoAssemblyRegion, feats: Observable<Feature>): Promise<
|
|
51
|
-
export declare function blankStats():
|
|
50
|
+
export declare function scoresToStats(region: NoAssemblyRegion, feats: Observable<Feature>): Promise<QuantitativeStats>;
|
|
51
|
+
export declare function blankStats(): QuantitativeStats;
|
package/util/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Instance, SnapshotIn, IAnyStateTreeNode, IStateTreeNode, IType } from 'mobx-state-tree';
|
|
3
|
-
import { AnyConfigurationModel } from '../../configuration
|
|
3
|
+
import { AnyConfigurationModel } from '../../configuration';
|
|
4
4
|
import assemblyManager from '../../assemblyManager';
|
|
5
5
|
import TextSearchManager from '../../TextSearch/TextSearchManager';
|
|
6
6
|
import { MenuItem } from '../../ui';
|
|
@@ -63,8 +63,8 @@ export interface AbstractSessionModel extends AbstractViewContainer {
|
|
|
63
63
|
sessionConnections?: AnyConfigurationModel[];
|
|
64
64
|
connectionInstances?: {
|
|
65
65
|
name: string;
|
|
66
|
-
connectionId: string;
|
|
67
66
|
tracks: AnyConfigurationModel[];
|
|
67
|
+
configuration: AnyConfigurationModel;
|
|
68
68
|
}[];
|
|
69
69
|
makeConnection?: Function;
|
|
70
70
|
adminMode?: boolean;
|
|
@@ -97,6 +97,7 @@ export interface SessionWithWidgets extends AbstractSessionModel {
|
|
|
97
97
|
minimized: boolean;
|
|
98
98
|
visibleWidget?: Widget;
|
|
99
99
|
widgets: Map<string, Widget>;
|
|
100
|
+
hideAllWidgets: () => void;
|
|
100
101
|
activeWidgets: Map<string, Widget>;
|
|
101
102
|
addWidget(typeName: string, id: string, initialState?: Record<string, unknown>, configuration?: {
|
|
102
103
|
type: string;
|
|
@@ -114,9 +115,13 @@ export interface SessionWithDrawerWidgets extends SessionWithWidgets {
|
|
|
114
115
|
}
|
|
115
116
|
export declare function isSessionModelWithWidgets(thing: unknown): thing is SessionWithWidgets;
|
|
116
117
|
interface SessionWithConnections {
|
|
117
|
-
|
|
118
|
+
makeConnection: (arg: AnyConfigurationModel) => void;
|
|
118
119
|
}
|
|
119
120
|
export declare function isSessionModelWithConnections(thing: unknown): thing is SessionWithConnections;
|
|
121
|
+
interface SessionWithConnectionEditing {
|
|
122
|
+
addConnectionConf: (arg: AnyConfigurationModel) => void;
|
|
123
|
+
}
|
|
124
|
+
export declare function isSessionModelWithConnectionEditing(thing: unknown): thing is SessionWithConnectionEditing;
|
|
120
125
|
export interface SessionWithSessionPlugins extends AbstractSessionModel {
|
|
121
126
|
sessionPlugins: JBrowsePlugin[];
|
|
122
127
|
addSessionPlugin: Function;
|
|
@@ -144,6 +149,7 @@ export interface AbstractViewModel {
|
|
|
144
149
|
export declare function isViewModel(thing: unknown): thing is AbstractViewModel;
|
|
145
150
|
export interface AbstractTrackModel {
|
|
146
151
|
displays: AbstractDisplayModel[];
|
|
152
|
+
configuration: AnyConfigurationModel;
|
|
147
153
|
}
|
|
148
154
|
export declare function isTrackModel(thing: unknown): thing is AbstractTrackModel;
|
|
149
155
|
export interface AbstractDisplayModel {
|
package/util/types/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isUriLocation = exports.isAbstractMenuManager = exports.isRootModelWithInternetAccounts = exports.isAppRootModel = exports.isTrackViewModel = exports.isDisplayModel = exports.isTrackModel = exports.isViewModel = exports.isSelectionContainer = exports.isSessionWithSessionPlugins = exports.isSessionModelWithConnections = exports.isSessionModelWithWidgets = exports.isSessionWithAddTracks = exports.isSessionModelWithConfigEditing = exports.isSessionModel = exports.isViewContainer = void 0;
|
|
17
|
+
exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isUriLocation = exports.isAbstractMenuManager = exports.isRootModelWithInternetAccounts = exports.isAppRootModel = exports.isTrackViewModel = exports.isDisplayModel = exports.isTrackModel = exports.isViewModel = exports.isSelectionContainer = exports.isSessionWithSessionPlugins = exports.isSessionModelWithConnectionEditing = exports.isSessionModelWithConnections = exports.isSessionModelWithWidgets = exports.isSessionWithAddTracks = exports.isSessionModelWithConfigEditing = exports.isSessionModel = exports.isViewContainer = void 0;
|
|
18
18
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
19
19
|
__exportStar(require("./util"), exports);
|
|
20
20
|
function isViewContainer(thing) {
|
|
@@ -46,9 +46,13 @@ function isSessionModelWithWidgets(thing) {
|
|
|
46
46
|
}
|
|
47
47
|
exports.isSessionModelWithWidgets = isSessionModelWithWidgets;
|
|
48
48
|
function isSessionModelWithConnections(thing) {
|
|
49
|
-
return isSessionModel(thing) && '
|
|
49
|
+
return isSessionModel(thing) && 'makeConnection' in thing;
|
|
50
50
|
}
|
|
51
51
|
exports.isSessionModelWithConnections = isSessionModelWithConnections;
|
|
52
|
+
function isSessionModelWithConnectionEditing(thing) {
|
|
53
|
+
return isSessionModel(thing) && 'addConnectionConf' in thing;
|
|
54
|
+
}
|
|
55
|
+
exports.isSessionModelWithConnectionEditing = isSessionModelWithConnectionEditing;
|
|
52
56
|
function isSessionWithSessionPlugins(thing) {
|
|
53
57
|
return isSessionModel(thing) && 'sessionPlugins' in thing;
|
|
54
58
|
}
|
package/util/types/mst.d.ts
CHANGED
|
@@ -99,7 +99,17 @@ export declare const FileLocation: import("mobx-state-tree").ISnapshotProcessor<
|
|
|
99
99
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
100
100
|
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
101
101
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
102
|
-
}>, import("mobx-state-tree").
|
|
102
|
+
}>, import("mobx-state-tree").ModelInstanceType<{
|
|
103
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
104
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
105
|
+
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
106
|
+
}, {}> | import("mobx-state-tree").ModelInstanceType<{
|
|
107
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
108
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
109
|
+
}, {}> | ({
|
|
110
|
+
locationType: "UriLocation";
|
|
111
|
+
uri: string;
|
|
112
|
+
} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
103
113
|
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
104
114
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
105
115
|
baseUri: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -108,11 +118,4 @@ export declare const FileLocation: import("mobx-state-tree").ISnapshotProcessor<
|
|
|
108
118
|
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
109
119
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
110
120
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
111
|
-
}>>
|
|
112
|
-
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
113
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
114
|
-
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
115
|
-
}, {}> | import("mobx-state-tree").ModelInstanceType<{
|
|
116
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
117
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
118
|
-
}, {}>>, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
121
|
+
}>> & import("mobx-state-tree/dist/internal").NonEmptyObject)>, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
package/util/types/util.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IAnyModelType, Instance } from 'mobx-state-tree';
|
|
3
2
|
import PluginManager from '../../PluginManager';
|
|
4
3
|
/**
|
|
5
4
|
* Obtain the return type of a constructor function type.
|
|
@@ -12,5 +11,3 @@ export type ClassReturnedBy<FACT extends (pm: PluginManager) => any> = InstanceT
|
|
|
12
11
|
export type AnyReactComponentType = React.ComponentType<any>;
|
|
13
12
|
/** get the type that a predicate asserts */
|
|
14
13
|
export type TypeTestedByPredicate<PREDICATE extends (thing: any) => boolean> = PREDICATE extends (thing: any) => thing is infer TYPE ? TYPE : never;
|
|
15
|
-
/** get the type for an instance of an MST model in a PM factory function */
|
|
16
|
-
export type InstanceOfModelReturnedBy<FACTORY extends (pm: PluginManager) => IAnyModelType> = Instance<ReturnType<FACTORY>>;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
3
|
-
import { BaseCardProps, BaseProps } from './types';
|
|
4
|
-
import { SimpleFeatureSerializedNoId } from '../util/simpleFeature';
|
|
5
|
-
export declare const useStyles: (params: void, styleOverrides?: {
|
|
6
|
-
props: any;
|
|
7
|
-
ownerState?: Record<string, unknown> | undefined;
|
|
8
|
-
} | undefined) => {
|
|
9
|
-
classes: Record<"expansionPanelDetails" | "expandIcon" | "field" | "fieldDescription" | "fieldName" | "fieldValue" | "fieldSubvalue", string>;
|
|
10
|
-
theme: import("@mui/material").Theme;
|
|
11
|
-
css: import("tss-react").Css;
|
|
12
|
-
cx: import("tss-react").Cx;
|
|
13
|
-
};
|
|
14
|
-
export declare function BaseCard({ children, title, defaultExpanded, }: BaseCardProps): JSX.Element;
|
|
15
|
-
export declare const FieldName: ({ description, name, width, prefix, }: {
|
|
16
|
-
description?: React.ReactNode;
|
|
17
|
-
name: string;
|
|
18
|
-
prefix?: string[] | undefined;
|
|
19
|
-
width?: number | undefined;
|
|
20
|
-
}) => JSX.Element;
|
|
21
|
-
export declare const BasicValue: ({ value }: {
|
|
22
|
-
value: string | React.ReactNode;
|
|
23
|
-
}) => JSX.Element;
|
|
24
|
-
export declare function SimpleValue({ name, value, description, prefix, width, }: {
|
|
25
|
-
description?: React.ReactNode;
|
|
26
|
-
name: string;
|
|
27
|
-
value: any;
|
|
28
|
-
prefix?: string[];
|
|
29
|
-
width?: number;
|
|
30
|
-
}): JSX.Element | null;
|
|
31
|
-
export declare const BaseCoreDetails: (props: BaseProps) => JSX.Element;
|
|
32
|
-
export declare function UriLink({ value, }: {
|
|
33
|
-
value: {
|
|
34
|
-
uri: string;
|
|
35
|
-
baseUri?: string;
|
|
36
|
-
};
|
|
37
|
-
}): JSX.Element;
|
|
38
|
-
export declare function Attributes(props: {
|
|
39
|
-
attributes: Record<string, any>;
|
|
40
|
-
omit?: string[];
|
|
41
|
-
omitSingleLevel?: string[];
|
|
42
|
-
formatter?: (val: unknown, key: string) => React.ReactNode;
|
|
43
|
-
descriptions?: Record<string, React.ReactNode>;
|
|
44
|
-
prefix?: string[];
|
|
45
|
-
hideUris?: boolean;
|
|
46
|
-
}): JSX.Element;
|
|
47
|
-
export declare const BaseAttributes: (props: BaseProps) => JSX.Element;
|
|
48
|
-
export interface BaseInputProps extends BaseCardProps {
|
|
49
|
-
omit?: string[];
|
|
50
|
-
model: any;
|
|
51
|
-
descriptions?: Record<string, React.ReactNode>;
|
|
52
|
-
formatter?: (val: unknown, key: string) => React.ReactNode;
|
|
53
|
-
}
|
|
54
|
-
export declare function FeatureDetails(props: {
|
|
55
|
-
model: IAnyStateTreeNode;
|
|
56
|
-
feature: SimpleFeatureSerializedNoId;
|
|
57
|
-
depth?: number;
|
|
58
|
-
omit?: string[];
|
|
59
|
-
formatter?: (val: unknown, key: string) => React.ReactNode;
|
|
60
|
-
}): JSX.Element;
|
|
61
|
-
declare const _default: ({ model }: BaseInputProps) => JSX.Element | null;
|
|
62
|
-
export default _default;
|