@jbrowse/react-app2 3.2.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/LICENSE +201 -0
- package/dist/JBrowseApp/AppReExport.d.ts +1 -0
- package/dist/JBrowseApp/AppReExport.js +5 -0
- package/dist/JBrowseApp/JBrowseApp.d.ts +5 -0
- package/dist/JBrowseApp/JBrowseApp.js +55 -0
- package/dist/JBrowseApp/index.d.ts +1 -0
- package/dist/JBrowseApp/index.js +8 -0
- package/dist/components/AboutDialog.d.ts +1 -0
- package/dist/components/AboutDialog.js +5 -0
- package/dist/components/PreferencesDialog.d.ts +14 -0
- package/dist/components/PreferencesDialog.js +21 -0
- package/dist/corePlugins.d.ts +3 -0
- package/dist/corePlugins.js +64 -0
- package/dist/createModel.d.ts +581 -0
- package/dist/createModel.js +26 -0
- package/dist/createViewState.d.ts +1769 -0
- package/dist/createViewState.js +23 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/dist/jbrowseModel.d.ts +139 -0
- package/dist/jbrowseModel.js +7 -0
- package/dist/loadPlugins.d.ts +12 -0
- package/dist/loadPlugins.js +12 -0
- package/dist/react-app.umd.production.min.js +185 -0
- package/dist/react-app.umd.production.min.js.LICENSE.txt +198 -0
- package/dist/react-app.umd.production.min.js.map +1 -0
- package/dist/rootModel/rootModel.d.ts +596 -0
- package/dist/rootModel/rootModel.js +166 -0
- package/dist/rootModel/rootModel.test.d.ts +1 -0
- package/dist/rootModel/rootModel.test.js +140 -0
- package/dist/rpcWorker.d.ts +2 -0
- package/dist/rpcWorker.js +49 -0
- package/dist/sessionModel/index.d.ts +2003 -0
- package/dist/sessionModel/index.js +10 -0
- package/dist/util.d.ts +5 -0
- package/dist/util.js +119 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/webpack.d.ts +7 -0
- package/dist/webpack.js +53 -0
- package/dist/workerPolyfill.d.ts +0 -0
- package/dist/workerPolyfill.js +32 -0
- package/esm/JBrowseApp/AppReExport.d.ts +1 -0
- package/esm/JBrowseApp/AppReExport.js +1 -0
- package/esm/JBrowseApp/JBrowseApp.d.ts +5 -0
- package/esm/JBrowseApp/JBrowseApp.js +20 -0
- package/esm/JBrowseApp/index.d.ts +1 -0
- package/esm/JBrowseApp/index.js +1 -0
- package/esm/components/AboutDialog.d.ts +1 -0
- package/esm/components/AboutDialog.js +1 -0
- package/esm/components/PreferencesDialog.d.ts +14 -0
- package/esm/components/PreferencesDialog.js +19 -0
- package/esm/corePlugins.d.ts +3 -0
- package/esm/corePlugins.js +59 -0
- package/esm/createModel.d.ts +581 -0
- package/esm/createModel.js +20 -0
- package/esm/createViewState.d.ts +1769 -0
- package/esm/createViewState.js +17 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +4 -0
- package/esm/jbrowseModel.d.ts +139 -0
- package/esm/jbrowseModel.js +4 -0
- package/esm/loadPlugins.d.ts +12 -0
- package/esm/loadPlugins.js +6 -0
- package/esm/makeWorkerInstance.d.ts +1 -0
- package/esm/makeWorkerInstance.js +3 -0
- package/esm/rootModel/rootModel.d.ts +596 -0
- package/esm/rootModel/rootModel.js +160 -0
- package/esm/rpcWorker.d.ts +2 -0
- package/esm/rpcWorker.js +10 -0
- package/esm/sessionModel/index.d.ts +2003 -0
- package/esm/sessionModel/index.js +7 -0
- package/esm/util.d.ts +5 -0
- package/esm/util.js +80 -0
- package/esm/version.d.ts +1 -0
- package/esm/version.js +1 -0
- package/esm/webpack.d.ts +7 -0
- package/esm/webpack.js +7 -0
- package/esm/workerPolyfill.d.ts +0 -0
- package/esm/workerPolyfill.js +32 -0
- package/package.json +103 -0
package/esm/util.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IAnyStateTreeNode, IAnyType } from 'mobx-state-tree';
|
|
2
|
+
export declare function b64PadSuffix(b64: string): string;
|
|
3
|
+
export declare function fromUrlSafeB64(b64: string): Promise<string>;
|
|
4
|
+
export declare function toUrlSafeB64(str: string): Promise<string>;
|
|
5
|
+
export declare function filterSessionInPlace(node: IAnyStateTreeNode | undefined, type: IAnyType): void;
|
package/esm/util.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { getChildType, getPropertyMembers, isArrayType, isMapType, isModelType, isReferenceType, isValidReference, } from 'mobx-state-tree';
|
|
2
|
+
export function b64PadSuffix(b64) {
|
|
3
|
+
let num = 0;
|
|
4
|
+
const mo = b64.length % 4;
|
|
5
|
+
switch (mo) {
|
|
6
|
+
case 3:
|
|
7
|
+
num = 1;
|
|
8
|
+
break;
|
|
9
|
+
case 2:
|
|
10
|
+
num = 2;
|
|
11
|
+
break;
|
|
12
|
+
case 0:
|
|
13
|
+
num = 0;
|
|
14
|
+
break;
|
|
15
|
+
default:
|
|
16
|
+
throw new Error('base64 not a valid length');
|
|
17
|
+
}
|
|
18
|
+
return b64 + '='.repeat(num);
|
|
19
|
+
}
|
|
20
|
+
export async function fromUrlSafeB64(b64) {
|
|
21
|
+
const originalB64 = b64PadSuffix(b64.replaceAll('-', '+').replaceAll('_', '/'));
|
|
22
|
+
const { toByteArray } = await import('base64-js');
|
|
23
|
+
const { inflate } = await import('pako');
|
|
24
|
+
const bytes = toByteArray(originalB64);
|
|
25
|
+
const inflated = inflate(bytes);
|
|
26
|
+
return new TextDecoder().decode(inflated);
|
|
27
|
+
}
|
|
28
|
+
export async function toUrlSafeB64(str) {
|
|
29
|
+
const bytes = new TextEncoder().encode(str);
|
|
30
|
+
const { deflate } = await import('pako');
|
|
31
|
+
const { fromByteArray } = await import('base64-js');
|
|
32
|
+
const deflated = deflate(bytes);
|
|
33
|
+
const encoded = fromByteArray(deflated);
|
|
34
|
+
const pos = encoded.indexOf('=');
|
|
35
|
+
return pos > 0
|
|
36
|
+
? encoded.slice(0, pos).replaceAll('+', '-').replaceAll('/', '_')
|
|
37
|
+
: encoded.replaceAll('+', '-').replaceAll('/', '_');
|
|
38
|
+
}
|
|
39
|
+
export function filterSessionInPlace(node, type) {
|
|
40
|
+
if (node === undefined) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (isArrayType(type)) {
|
|
44
|
+
const array = node;
|
|
45
|
+
const childType = getChildType(node);
|
|
46
|
+
if (isReferenceType(childType)) {
|
|
47
|
+
for (let i = 0; i < array.length;) {
|
|
48
|
+
if (!isValidReference(() => array[i])) {
|
|
49
|
+
array.splice(i, 1);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
i += 1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
for (const el of array) {
|
|
57
|
+
filterSessionInPlace(el, childType);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (isMapType(type)) {
|
|
61
|
+
const map = node;
|
|
62
|
+
const childType = getChildType(map);
|
|
63
|
+
if (isReferenceType(childType)) {
|
|
64
|
+
for (const key in map.keys()) {
|
|
65
|
+
if (!isValidReference(() => map.get(key))) {
|
|
66
|
+
map.delete(key);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
for (const child of map) {
|
|
71
|
+
filterSessionInPlace(child, childType);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else if (isModelType(type)) {
|
|
75
|
+
const { properties } = getPropertyMembers(node);
|
|
76
|
+
for (const [pname, ptype] of Object.entries(properties)) {
|
|
77
|
+
filterSessionInPlace(node[pname], ptype);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
package/esm/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const version: "3.2.0";
|
package/esm/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const version = '3.2.0';
|
package/esm/webpack.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export { default as JBrowseApp } from './JBrowseApp';
|
|
3
|
+
export { default as createModel } from './createModel';
|
|
4
|
+
export { default as createViewState } from './createViewState';
|
|
5
|
+
export { default as loadPlugins } from './loadPlugins';
|
|
6
|
+
export * from 'react-dom/client';
|
|
7
|
+
export { React };
|
package/esm/webpack.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export { default as JBrowseApp } from './JBrowseApp';
|
|
3
|
+
export { default as createModel } from './createModel';
|
|
4
|
+
export { default as createViewState } from './createViewState';
|
|
5
|
+
export { default as loadPlugins } from './loadPlugins';
|
|
6
|
+
export * from 'react-dom/client';
|
|
7
|
+
export { React };
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
self.window = {
|
|
3
|
+
addEventListener() { },
|
|
4
|
+
fetch: self.fetch.bind(self),
|
|
5
|
+
location: self.location,
|
|
6
|
+
Date: self.Date,
|
|
7
|
+
requestIdleCallback: cb => {
|
|
8
|
+
cb();
|
|
9
|
+
},
|
|
10
|
+
cancelIdleCallback: () => { },
|
|
11
|
+
requestAnimationFrame: cb => {
|
|
12
|
+
cb();
|
|
13
|
+
},
|
|
14
|
+
cancelAnimationFrame: () => { },
|
|
15
|
+
navigator: {},
|
|
16
|
+
};
|
|
17
|
+
self.document = {
|
|
18
|
+
createTextNode() { },
|
|
19
|
+
querySelector() {
|
|
20
|
+
return { appendChild() { } };
|
|
21
|
+
},
|
|
22
|
+
documentElement: {},
|
|
23
|
+
querySelectorAll: () => [],
|
|
24
|
+
createElement() {
|
|
25
|
+
return {
|
|
26
|
+
style: {},
|
|
27
|
+
setAttribute() { },
|
|
28
|
+
removeAttribute() { },
|
|
29
|
+
appendChild() { },
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jbrowse/react-app2",
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"description": "JBrowse 2 app React component",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jbrowse",
|
|
7
|
+
"jbrowse2"
|
|
8
|
+
],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"homepage": "https://jbrowse.org",
|
|
11
|
+
"bugs": "https://github.com/GMOD/jbrowse-components/issues",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/GMOD/jbrowse-components.git",
|
|
15
|
+
"directory": "products/jbrowse-react-app"
|
|
16
|
+
},
|
|
17
|
+
"author": "JBrowse Team",
|
|
18
|
+
"distMain": "dist/index.js",
|
|
19
|
+
"srcMain": "src/index.ts",
|
|
20
|
+
"distModule": "esm/index.js",
|
|
21
|
+
"srcModule": "src/index.ts",
|
|
22
|
+
"module": "esm/index.js",
|
|
23
|
+
"main": "dist/index.js",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"esm",
|
|
27
|
+
"docs"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "npm-run-all build:*",
|
|
31
|
+
"prepublishOnly": "node output-version.js > src/version.js && git add -A src && git commit -m '[skip ci] Bump version.js'",
|
|
32
|
+
"build:esm": "tsc --build tsconfig.build.esm.json",
|
|
33
|
+
"build:commonjs": "tsc --build tsconfig.build.commonjs.json",
|
|
34
|
+
"build:webpack": "webpack",
|
|
35
|
+
"clean": "rimraf dist esm *.tsbuildinfo",
|
|
36
|
+
"storybook": "storybook dev --port 6006",
|
|
37
|
+
"storybook:build": "storybook build",
|
|
38
|
+
"prebuild": "yarn clean",
|
|
39
|
+
"prepack": "yarn build && yarn useDist",
|
|
40
|
+
"postpack": "yarn useSrc",
|
|
41
|
+
"useDist": "node ../../scripts/useDist.js",
|
|
42
|
+
"useSrc": "node ../../scripts/useSrc.js"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@babel/runtime": "^7.17.9",
|
|
46
|
+
"@emotion/cache": "^11.7.1",
|
|
47
|
+
"@emotion/react": "^11.9.0",
|
|
48
|
+
"@emotion/styled": "^11.8.1",
|
|
49
|
+
"@jbrowse/app-core": "^3.2.0",
|
|
50
|
+
"@jbrowse/core": "^3.2.0",
|
|
51
|
+
"@jbrowse/plugin-alignments": "^3.2.0",
|
|
52
|
+
"@jbrowse/plugin-arc": "^3.2.0",
|
|
53
|
+
"@jbrowse/plugin-authentication": "^3.2.0",
|
|
54
|
+
"@jbrowse/plugin-bed": "^3.2.0",
|
|
55
|
+
"@jbrowse/plugin-breakpoint-split-view": "^3.2.0",
|
|
56
|
+
"@jbrowse/plugin-circular-view": "^3.2.0",
|
|
57
|
+
"@jbrowse/plugin-comparative-adapters": "^3.2.0",
|
|
58
|
+
"@jbrowse/plugin-config": "^3.2.0",
|
|
59
|
+
"@jbrowse/plugin-data-management": "^3.2.0",
|
|
60
|
+
"@jbrowse/plugin-dotplot-view": "^3.2.0",
|
|
61
|
+
"@jbrowse/plugin-gccontent": "^3.2.0",
|
|
62
|
+
"@jbrowse/plugin-gff3": "^3.2.0",
|
|
63
|
+
"@jbrowse/plugin-grid-bookmark": "^3.2.0",
|
|
64
|
+
"@jbrowse/plugin-gtf": "^3.2.0",
|
|
65
|
+
"@jbrowse/plugin-hic": "^3.2.0",
|
|
66
|
+
"@jbrowse/plugin-legacy-jbrowse": "^3.2.0",
|
|
67
|
+
"@jbrowse/plugin-linear-comparative-view": "^3.2.0",
|
|
68
|
+
"@jbrowse/plugin-linear-genome-view": "^3.2.0",
|
|
69
|
+
"@jbrowse/plugin-lollipop": "^3.2.0",
|
|
70
|
+
"@jbrowse/plugin-menus": "^3.2.0",
|
|
71
|
+
"@jbrowse/plugin-rdf": "^3.2.0",
|
|
72
|
+
"@jbrowse/plugin-sequence": "^3.2.0",
|
|
73
|
+
"@jbrowse/plugin-spreadsheet-view": "^3.2.0",
|
|
74
|
+
"@jbrowse/plugin-sv-inspector": "^3.2.0",
|
|
75
|
+
"@jbrowse/plugin-svg": "^3.2.0",
|
|
76
|
+
"@jbrowse/plugin-trix": "^3.2.0",
|
|
77
|
+
"@jbrowse/plugin-variants": "^3.2.0",
|
|
78
|
+
"@jbrowse/plugin-wiggle": "^3.2.0",
|
|
79
|
+
"@jbrowse/product-core": "^3.2.0",
|
|
80
|
+
"@jbrowse/web-core": "^3.2.0",
|
|
81
|
+
"@mui/icons-material": "^6.0.0",
|
|
82
|
+
"@mui/material": "^6.0.0",
|
|
83
|
+
"base64-js": "^1.0.0",
|
|
84
|
+
"copy-to-clipboard": "^3.3.1",
|
|
85
|
+
"crypto-js": "^4.2.0",
|
|
86
|
+
"file-saver": "^2.0.0",
|
|
87
|
+
"mobx": "^6.6.0",
|
|
88
|
+
"mobx-react": "^9.0.0",
|
|
89
|
+
"mobx-state-tree": "^5.0.0",
|
|
90
|
+
"pako": "^1.0.0",
|
|
91
|
+
"rxjs": "^7.0.0",
|
|
92
|
+
"tss-react": "^4.4.1",
|
|
93
|
+
"use-query-params": "^2.0.0",
|
|
94
|
+
"webpack": "^5.72.0"
|
|
95
|
+
},
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"react": ">=18.0.0"
|
|
98
|
+
},
|
|
99
|
+
"publishConfig": {
|
|
100
|
+
"access": "public"
|
|
101
|
+
},
|
|
102
|
+
"gitHead": "c750e3f56706a490c19ba75abd807fec5e38aebf"
|
|
103
|
+
}
|