@jbrowse/core 2.6.3 → 2.7.1
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 +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +1 -3
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +18 -8
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +2 -11
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +5 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +1 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +1 -1
- package/BaseFeatureWidget/util.js +0 -4
- package/PluginManager.d.ts +9 -17
- package/ReExports/modules.d.ts +5 -5
- package/ReExports/modules.js +24 -18
- package/TextSearch/TextSearchManager.d.ts +1 -1
- package/assemblyManager/assembly.d.ts +2 -0
- package/assemblyManager/assembly.js +9 -4
- package/assemblyManager/assemblyManager.d.ts +123 -111
- package/assemblyManager/assemblyManager.js +1 -1
- package/configuration/configurationSchema.js +2 -2
- package/configuration/configurationSlot.js +3 -6
- package/data_adapters/BaseAdapter/index.d.ts +1 -3
- package/data_adapters/dataAdapterCache.js +2 -2
- package/package.json +5 -6
- package/pluggableElementTypes/AdapterType.d.ts +2 -2
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -5
- package/pluggableElementTypes/models/BaseTrackModel.js +1 -16
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +2 -2
- package/pluggableElementTypes/models/InternetAccountModel.js +2 -2
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +1 -3
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +3 -0
- package/pluggableElementTypes/renderers/RendererType.js +1 -1
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +7 -3
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +45 -2
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +2 -2
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +49 -12
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +2 -2
- package/rpc/RpcManager.d.ts +2 -2
- package/rpc/WebWorkerRpcDriver.js +3 -3
- package/rpc/methods/CoreGetFeatureDensityStats.js +0 -1
- package/rpc/methods/CoreGetFeatureDetails.js +0 -1
- package/rpc/methods/CoreGetFeatures.js +0 -1
- package/rpc/methods/CoreRender.js +0 -1
- package/rpc/remoteAbortSignals.d.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/ColorPicker.js +3 -6
- package/ui/Dialog.d.ts +2 -2
- package/ui/Dialog.js +2 -1
- package/ui/DropDownMenu.d.ts +3 -4
- package/ui/DropDownMenu.js +8 -12
- package/ui/EditableTypography.js +7 -5
- package/ui/FactoryResetDialog.d.ts +3 -4
- package/ui/FactoryResetDialog.js +3 -2
- package/ui/FileSelector/FileSelector.d.ts +2 -2
- package/ui/FileSelector/FileSelector.js +2 -1
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -2
- package/ui/FileSelector/LocalFileChooser.js +4 -3
- package/ui/FileSelector/UrlChooser.d.ts +5 -5
- package/ui/FileSelector/UrlChooser.js +2 -2
- package/ui/Menu.js +1 -1
- package/ui/MenuButton.d.ts +8 -0
- package/ui/MenuButton.js +42 -0
- package/ui/ResizeBar.d.ts +0 -4
- package/ui/ResizeBar.js +12 -31
- package/ui/ResizeHandle.d.ts +3 -2
- package/ui/ResizeHandle.js +10 -7
- package/ui/ReturnToImportFormDialog.d.ts +4 -5
- package/ui/ReturnToImportFormDialog.js +3 -3
- package/ui/SanitizedHTML.d.ts +1 -2
- package/ui/SanitizedHTML.js +4 -3
- package/ui/Snackbar.d.ts +2 -2
- package/ui/Snackbar.js +2 -1
- package/ui/Tooltip.d.ts +4 -7
- package/ui/Tooltip.js +3 -3
- package/ui/theme.d.ts +1 -3
- package/ui/theme.js +2 -2
- package/ui/useResizeBar.d.ts +5 -0
- package/ui/useResizeBar.js +22 -0
- package/util/Base1DUtils.js +0 -1
- package/util/blobToDataURL.d.ts +1 -0
- package/util/blobToDataURL.js +18 -0
- package/util/blockTypes.d.ts +1 -9
- package/util/blockTypes.js +5 -21
- package/util/calculateDynamicBlocks.js +3 -2
- package/util/calculateStaticBlocks.js +3 -4
- package/util/colord.d.ts +1 -0
- package/util/colord.js +13 -0
- package/util/dedupe.js +1 -2
- package/util/index.d.ts +16 -17
- package/util/index.js +27 -26
- package/util/io/RemoteFileWithRangeCache.js +2 -2
- package/util/layouts/GranularRectLayout.js +1 -2
- package/util/map-obj.d.ts +1 -1
- package/util/nanoid.d.ts +5 -0
- package/util/nanoid.js +73 -0
- package/util/offscreenCanvasPonyfill.js +1 -2
- package/util/offscreenCanvasUtils.js +3 -2
- package/util/tracks.d.ts +2 -6
- package/util/types/index.d.ts +36 -10
- package/util/types/index.js +5 -1
- package/util/types/mst.js +2 -2
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.d.ts +0 -7
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.js +0 -13
package/util/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { NoAssemblyRegion as MUNoAssemblyRegion, Region as MUIRegion, LocalPathL
|
|
|
8
8
|
import RpcManager from '../../rpc/RpcManager';
|
|
9
9
|
import { Feature } from '../simpleFeature';
|
|
10
10
|
import { BaseInternetAccountModel } from '../../pluggableElementTypes/models';
|
|
11
|
+
import { ThemeOptions } from '@mui/material';
|
|
11
12
|
export * from './util';
|
|
12
13
|
/** abstract type for a model that contains multiple views */
|
|
13
14
|
export interface AbstractViewContainer extends IStateTreeNode<IType<any, unknown, any>> {
|
|
@@ -42,16 +43,25 @@ export interface JBrowsePlugin {
|
|
|
42
43
|
export type DialogComponentType = React.LazyExoticComponent<React.FC<any>> | React.FC<any>;
|
|
43
44
|
/** minimum interface that all session state models must implement */
|
|
44
45
|
export interface AbstractSessionModel extends AbstractViewContainer {
|
|
46
|
+
jbrowse: IAnyStateTreeNode;
|
|
45
47
|
drawerPosition?: string;
|
|
46
|
-
setSelection(feature: Feature): void;
|
|
47
|
-
clearSelection(): void;
|
|
48
48
|
configuration: AnyConfigurationModel;
|
|
49
49
|
rpcManager: RpcManager;
|
|
50
50
|
assemblyNames: string[];
|
|
51
51
|
assemblies: AnyConfigurationModel[];
|
|
52
52
|
selection?: unknown;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
focusedViewId?: string;
|
|
54
|
+
themeName?: string;
|
|
55
|
+
setFocusedViewId?: (id: string) => void;
|
|
56
|
+
allThemes?: () => Record<string, ThemeOptions | undefined>;
|
|
57
|
+
setSelection: (feature: Feature) => void;
|
|
58
|
+
setSession?: (arg: {
|
|
59
|
+
name: string;
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}) => void;
|
|
62
|
+
clearSelection: () => void;
|
|
63
|
+
duplicateCurrentSession?: () => void;
|
|
64
|
+
notify: (message: string, level?: NotificationLevel, action?: SnackAction) => void;
|
|
55
65
|
assemblyManager: AssemblyManager;
|
|
56
66
|
version: string;
|
|
57
67
|
getTrackActionMenuItems?: Function;
|
|
@@ -60,13 +70,19 @@ export interface AbstractSessionModel extends AbstractViewContainer {
|
|
|
60
70
|
textSearchManager?: TextSearchManager;
|
|
61
71
|
connections: AnyConfigurationModel[];
|
|
62
72
|
deleteConnection?: Function;
|
|
73
|
+
temporaryAssemblies?: unknown[];
|
|
74
|
+
addTemporaryAssembly?: (arg: Record<string, unknown>) => void;
|
|
75
|
+
removeTemporaryAssembly?: (arg: string) => void;
|
|
63
76
|
sessionConnections?: AnyConfigurationModel[];
|
|
77
|
+
sessionTracks?: AnyConfigurationModel[];
|
|
64
78
|
connectionInstances?: {
|
|
65
79
|
name: string;
|
|
66
80
|
tracks: AnyConfigurationModel[];
|
|
67
81
|
configuration: AnyConfigurationModel;
|
|
68
82
|
}[];
|
|
69
83
|
makeConnection?: Function;
|
|
84
|
+
breakConnection?: Function;
|
|
85
|
+
prepareToBreakConnection?: (arg: AnyConfigurationModel) => any;
|
|
70
86
|
adminMode?: boolean;
|
|
71
87
|
showWidget?: Function;
|
|
72
88
|
addWidget?: Function;
|
|
@@ -88,6 +104,11 @@ export interface SessionWithConfigEditing extends AbstractSessionModel {
|
|
|
88
104
|
addTrackConf(configuration: AnyConfigurationModel | SnapshotIn<AnyConfigurationModel>): void;
|
|
89
105
|
}
|
|
90
106
|
export declare function isSessionWithAddTracks(thing: unknown): thing is SessionWithConfigEditing;
|
|
107
|
+
/** abstract interface for a session allows adding tracks */
|
|
108
|
+
export interface SessionWithShareURL extends AbstractSessionModel {
|
|
109
|
+
shareURL: string;
|
|
110
|
+
}
|
|
111
|
+
export declare function isSessionWithShareURL(thing: unknown): thing is SessionWithShareURL;
|
|
91
112
|
export interface Widget {
|
|
92
113
|
type: string;
|
|
93
114
|
id: string;
|
|
@@ -134,6 +155,11 @@ export interface SelectionContainer extends AbstractSessionModel {
|
|
|
134
155
|
setSelection(thing: unknown): void;
|
|
135
156
|
}
|
|
136
157
|
export declare function isSelectionContainer(thing: unknown): thing is SelectionContainer;
|
|
158
|
+
/** abstract interface for a session allows applying focus to views and widgets */
|
|
159
|
+
export interface SessionWithFocusedViewAndDrawerWidgets extends SessionWithDrawerWidgets {
|
|
160
|
+
focusedViewId: string | undefined;
|
|
161
|
+
setFocusedViewId(id: string): void;
|
|
162
|
+
}
|
|
137
163
|
/** minimum interface that all view state models must implement */
|
|
138
164
|
export interface AbstractViewModel {
|
|
139
165
|
id: string;
|
|
@@ -228,14 +254,14 @@ export declare function isRetryException(exception: Error): boolean;
|
|
|
228
254
|
export interface BlobLocation extends SnapshotIn<typeof MUBlobLocation> {
|
|
229
255
|
}
|
|
230
256
|
export type FileLocation = LocalPathLocation | UriLocation | BlobLocation;
|
|
231
|
-
export
|
|
257
|
+
export interface PreUriLocation {
|
|
232
258
|
uri: string;
|
|
233
|
-
}
|
|
234
|
-
export
|
|
259
|
+
}
|
|
260
|
+
export interface PreLocalPathLocation {
|
|
235
261
|
localPath: string;
|
|
236
|
-
}
|
|
237
|
-
export
|
|
262
|
+
}
|
|
263
|
+
export interface PreBlobLocation {
|
|
238
264
|
blob: File;
|
|
239
|
-
}
|
|
265
|
+
}
|
|
240
266
|
export type PreFileLocation = PreUriLocation | PreLocalPathLocation | PreBlobLocation;
|
|
241
267
|
export { type default as TextSearchManager } from '../../TextSearch/TextSearchManager';
|
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.isBlobLocation = exports.isLocalPathLocation = 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;
|
|
17
|
+
exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isBlobLocation = exports.isLocalPathLocation = 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.isSessionWithShareURL = 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) {
|
|
@@ -41,6 +41,10 @@ function isSessionWithAddTracks(thing) {
|
|
|
41
41
|
isSessionModel(thing) && 'addTrackConf' in thing && !thing.disableAddTracks);
|
|
42
42
|
}
|
|
43
43
|
exports.isSessionWithAddTracks = isSessionWithAddTracks;
|
|
44
|
+
function isSessionWithShareURL(thing) {
|
|
45
|
+
return isSessionModel(thing) && 'shareURL' in thing && !!thing.shareURL;
|
|
46
|
+
}
|
|
47
|
+
exports.isSessionWithShareURL = isSessionWithShareURL;
|
|
44
48
|
function isSessionModelWithWidgets(thing) {
|
|
45
49
|
return isSessionModel(thing) && 'widgets' in thing;
|
|
46
50
|
}
|
package/util/types/mst.js
CHANGED
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FileLocation = exports.UriLocation = exports.UriLocationRaw = exports.BlobLocation = exports.LocalPathLocation = exports.Region = exports.NoAssemblyRegion = exports.PropTypes = exports.ElementId = void 0;
|
|
7
|
-
const shortid_1 = __importDefault(require("shortid"));
|
|
8
7
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
8
|
const prop_types_1 = __importDefault(require("prop-types"));
|
|
10
9
|
const mobx_react_1 = require("mobx-react");
|
|
11
|
-
|
|
10
|
+
const nanoid_1 = require("../nanoid");
|
|
11
|
+
exports.ElementId = mobx_state_tree_1.types.optional(mobx_state_tree_1.types.identifier, () => (0, nanoid_1.nanoid)());
|
|
12
12
|
// PropTypes that are useful when working with instances of these in react components
|
|
13
13
|
exports.PropTypes = {
|
|
14
14
|
Region: prop_types_1.default.shape({
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const util_1 = require("../../util");
|
|
8
|
-
const ui_1 = require("../../ui");
|
|
9
|
-
function UriLink({ value, }) {
|
|
10
|
-
const href = (0, util_1.getUriLink)(value);
|
|
11
|
-
return react_1.default.createElement(ui_1.SanitizedHTML, { html: `<a href="${href}">${href}</a>` });
|
|
12
|
-
}
|
|
13
|
-
exports.default = UriLink;
|