@jbrowse/core 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import type { BaseCardProps, BaseProps } from '../types';
2
+ export interface BaseInputProps extends BaseCardProps {
3
+ omit?: string[];
4
+ model: any;
5
+ descriptions?: Record<string, React.ReactNode>;
6
+ formatter?: (val: unknown, key: string) => React.ReactNode;
7
+ }
8
+ export default function BaseAttributes(props: BaseProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
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
+ exports.default = BaseAttributes;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const Attributes_1 = __importDefault(require("./Attributes"));
9
+ const BaseCard_1 = __importDefault(require("./BaseCard"));
10
+ function BaseAttributes(props) {
11
+ const { title = 'Attributes', feature } = props;
12
+ return ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { ...props, title: title, children: (0, jsx_runtime_1.jsx)(Attributes_1.default, { ...props, attributes: feature }) }));
13
+ }
@@ -0,0 +1,2 @@
1
+ import type { BaseProps } from '../types';
2
+ export default function BaseCoreDetails(props: BaseProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
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
+ exports.default = BaseCoreDetails;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const BaseCard_1 = __importDefault(require("./BaseCard"));
9
+ const CoreDetails_1 = __importDefault(require("./CoreDetails"));
10
+ function BaseCoreDetails(props) {
11
+ const { title = 'Primary data' } = props;
12
+ return ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { ...props, title: title, children: (0, jsx_runtime_1.jsx)(CoreDetails_1.default, { ...props }) }));
13
+ }
@@ -1,13 +1,7 @@
1
- import type { BaseCardProps, BaseProps } from '../types';
2
- export declare const BaseCoreDetails: (props: BaseProps) => import("react/jsx-runtime").JSX.Element;
3
- export declare const BaseAttributes: (props: BaseProps) => import("react/jsx-runtime").JSX.Element;
4
- export interface BaseInputProps extends BaseCardProps {
5
- omit?: string[];
6
- model: any;
7
- descriptions?: Record<string, React.ReactNode>;
8
- formatter?: (val: unknown, key: string) => React.ReactNode;
9
- }
1
+ import type { BaseInputProps } from './types';
10
2
  declare const BaseFeatureDetail: ({ model }: BaseInputProps) => import("react/jsx-runtime").JSX.Element | null;
11
3
  export default BaseFeatureDetail;
12
4
  export { default as BaseCard } from './BaseCard';
5
+ export { default as BaseAttributes } from './BaseAttributes';
6
+ export { default as BaseCoreDetails } from './BaseCoreDetails';
13
7
  export { default as FeatureDetails } from './FeatureDetails';
@@ -3,26 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FeatureDetails = exports.BaseCard = exports.BaseAttributes = exports.BaseCoreDetails = void 0;
6
+ exports.FeatureDetails = exports.BaseCoreDetails = exports.BaseAttributes = exports.BaseCard = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const mobx_react_1 = require("mobx-react");
9
9
  const util_1 = require("./util");
10
10
  const util_2 = require("../util");
11
- const Attributes_1 = __importDefault(require("./Attributes"));
12
- const BaseCard_1 = __importDefault(require("./BaseCard"));
13
- const CoreDetails_1 = __importDefault(require("./CoreDetails"));
14
11
  const FeatureDetails_1 = __importDefault(require("./FeatureDetails"));
15
12
  const ui_1 = require("../../ui");
16
- const BaseCoreDetails = (props) => {
17
- const { title = 'Primary data' } = props;
18
- return ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { ...props, title: title, children: (0, jsx_runtime_1.jsx)(CoreDetails_1.default, { ...props }) }));
19
- };
20
- exports.BaseCoreDetails = BaseCoreDetails;
21
- const BaseAttributes = (props) => {
22
- const { feature } = props;
23
- return ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { ...props, title: "Attributes", children: (0, jsx_runtime_1.jsx)(Attributes_1.default, { ...props, attributes: feature }) }));
24
- };
25
- exports.BaseAttributes = BaseAttributes;
26
13
  const BaseFeatureDetail = (0, mobx_react_1.observer)(function ({ model }) {
27
14
  const { error, featureData } = model;
28
15
  if (error) {
@@ -37,7 +24,11 @@ const BaseFeatureDetail = (0, mobx_react_1.observer)(function ({ model }) {
37
24
  }
38
25
  });
39
26
  exports.default = BaseFeatureDetail;
40
- var BaseCard_2 = require("./BaseCard");
41
- Object.defineProperty(exports, "BaseCard", { enumerable: true, get: function () { return __importDefault(BaseCard_2).default; } });
27
+ var BaseCard_1 = require("./BaseCard");
28
+ Object.defineProperty(exports, "BaseCard", { enumerable: true, get: function () { return __importDefault(BaseCard_1).default; } });
29
+ var BaseAttributes_1 = require("./BaseAttributes");
30
+ Object.defineProperty(exports, "BaseAttributes", { enumerable: true, get: function () { return __importDefault(BaseAttributes_1).default; } });
31
+ var BaseCoreDetails_1 = require("./BaseCoreDetails");
32
+ Object.defineProperty(exports, "BaseCoreDetails", { enumerable: true, get: function () { return __importDefault(BaseCoreDetails_1).default; } });
42
33
  var FeatureDetails_2 = require("./FeatureDetails");
43
34
  Object.defineProperty(exports, "FeatureDetails", { enumerable: true, get: function () { return __importDefault(FeatureDetails_2).default; } });
@@ -0,0 +1,7 @@
1
+ import type { BaseCardProps } from '../types';
2
+ export interface BaseInputProps extends BaseCardProps {
3
+ omit?: string[];
4
+ model: any;
5
+ descriptions?: Record<string, React.ReactNode>;
6
+ formatter?: (val: unknown, key: string) => React.ReactNode;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/PluginLoader.d.ts CHANGED
@@ -39,7 +39,8 @@ export interface PluginRecord {
39
39
  export interface LoadedPlugin {
40
40
  default: PluginConstructor;
41
41
  }
42
- export declare function pluginDescriptionString(pluginDefinition: PluginDefinition): string;
42
+ export declare function pluginDescriptionString(d: PluginDefinition): string;
43
+ export declare function pluginUrl(d: PluginDefinition): any;
43
44
  export default class PluginLoader {
44
45
  definitions: PluginDefinition[];
45
46
  fetchESM?: (url: string) => Promise<LoadedPlugin>;
package/PluginLoader.js CHANGED
@@ -7,6 +7,7 @@ exports.isUMDPluginDefinition = isUMDPluginDefinition;
7
7
  exports.isESMPluginDefinition = isESMPluginDefinition;
8
8
  exports.isCJSPluginDefinition = isCJSPluginDefinition;
9
9
  exports.pluginDescriptionString = pluginDescriptionString;
10
+ exports.pluginUrl = pluginUrl;
10
11
  const load_script_1 = __importDefault(require("load-script"));
11
12
  const Plugin_1 = __importDefault(require("./Plugin"));
12
13
  const ReExports_1 = __importDefault(require("./ReExports"));
@@ -46,18 +47,35 @@ async function loadScript(scriptUrl) {
46
47
  function isCJSPluginDefinition(def) {
47
48
  return def.cjsUrl !== undefined;
48
49
  }
49
- function pluginDescriptionString(pluginDefinition) {
50
- if (isUMDPluginDefinition(pluginDefinition)) {
51
- return `UMD plugin ${pluginDefinition.name}`;
50
+ function pluginDescriptionString(d) {
51
+ if (isUMDPluginDefinition(d)) {
52
+ return `UMD plugin ${d.name}`;
52
53
  }
53
- if (isESMPluginDefinition(pluginDefinition)) {
54
- return `ESM plugin ${pluginDefinition.esmUrl ||
55
- pluginDefinition.esmLoc.uri}`;
54
+ else if (isESMPluginDefinition(d)) {
55
+ return `ESM plugin ${d.esmUrl ||
56
+ d.esmLoc.uri}`;
56
57
  }
57
- if (isCJSPluginDefinition(pluginDefinition)) {
58
- return `CJS plugin ${pluginDefinition.cjsUrl}`;
58
+ else if (isCJSPluginDefinition(d)) {
59
+ return `CJS plugin ${d.cjsUrl}`;
60
+ }
61
+ else {
62
+ return 'unknown plugin';
63
+ }
64
+ }
65
+ function pluginUrl(d) {
66
+ var _a, _b, _c;
67
+ if (isUMDPluginDefinition(d)) {
68
+ return (_b = (_a = d.url) !== null && _a !== void 0 ? _a : d.esmLoc.uri) !== null && _b !== void 0 ? _b : d.umdUrl;
69
+ }
70
+ else if (isESMPluginDefinition(d)) {
71
+ return (_c = d.esmUrl) !== null && _c !== void 0 ? _c : d.esmUri;
72
+ }
73
+ else if (isCJSPluginDefinition(d)) {
74
+ return d.cjsUrl || d.cjsLoc.uri;
75
+ }
76
+ else {
77
+ return 'unknown url';
59
78
  }
60
- return 'unknown plugin';
61
79
  }
62
80
  function isInWebWorker() {
63
81
  return Boolean('WorkerGlobalScope' in globalThis);
@@ -200,6 +200,8 @@ export default class PluginManager {
200
200
  Attributes: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
201
201
  FeatureDetails: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
202
202
  BaseCard: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
203
+ BaseCoreDetails: import("react").LazyExoticComponent<typeof import("./BaseFeatureWidget/BaseFeatureDetail").BaseCoreDetails>;
204
+ BaseAttributes: import("react").LazyExoticComponent<typeof import("./BaseFeatureWidget/BaseFeatureDetail").BaseAttributes>;
203
205
  };
204
206
  '@jbrowse/core/data_adapters/BaseAdapter': typeof import("./data_adapters/BaseAdapter");
205
207
  mobx: typeof import("mobx");
@@ -238,6 +240,7 @@ export default class PluginManager {
238
240
  '@mui/material': {
239
241
  alpha: typeof import("@mui/system").alpha;
240
242
  useTheme: typeof import("@mui/material").useTheme;
243
+ createTheme: typeof import("@mui/material").createTheme;
241
244
  };
242
245
  '@mui/material/styles': {
243
246
  MUIStyles: typeof import("@mui/material/styles");
package/ReExports/list.js CHANGED
@@ -19,6 +19,7 @@ exports.default = [
19
19
  '@material-ui/core/Accordion',
20
20
  '@material-ui/core/AccordionActions',
21
21
  '@material-ui/core/AccordionDetails',
22
+ '@material-ui/core/AccordionSummary',
22
23
  '@material-ui/core/Alert',
23
24
  '@material-ui/core/AlertTitle',
24
25
  '@material-ui/core/Autocomplete',
@@ -129,6 +130,7 @@ exports.default = [
129
130
  '@mui/material/Accordion',
130
131
  '@mui/material/AccordionActions',
131
132
  '@mui/material/AccordionDetails',
133
+ '@mui/material/AccordionSummary',
132
134
  '@mui/material/Alert',
133
135
  '@mui/material/AlertTitle',
134
136
  '@mui/material/Autocomplete',
@@ -1,6 +1,6 @@
1
1
  import type { LazyExoticComponent } from 'react';
2
2
  import * as React from 'react';
3
- import { useTheme } from '@mui/material';
3
+ import { alpha, createTheme, useTheme } from '@mui/material';
4
4
  import * as MUIStyles from '@mui/material/styles';
5
5
  import * as MUIUtils from '@mui/material/utils';
6
6
  import { useGridApiContext } from '@mui/x-data-grid';
@@ -120,6 +120,8 @@ declare const libs: {
120
120
  Attributes: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
121
121
  FeatureDetails: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
122
122
  BaseCard: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
123
+ BaseCoreDetails: LazyExoticComponent<typeof import("../BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails").default>;
124
+ BaseAttributes: LazyExoticComponent<typeof import("../BaseFeatureWidget/BaseFeatureDetail/BaseAttributes").default>;
123
125
  };
124
126
  '@jbrowse/core/data_adapters/BaseAdapter': typeof BaseAdapterExports;
125
127
  mobx: typeof mobx;
@@ -152,12 +154,13 @@ declare const libs: {
152
154
  };
153
155
  '@material-ui/core': {
154
156
  useTheme: typeof useTheme;
155
- alpha: typeof MUIStyles.alpha;
157
+ alpha: typeof alpha;
156
158
  makeStyles: (args: any) => () => Record<string, string>;
157
159
  };
158
160
  '@mui/material': {
159
- alpha: typeof MUIStyles.alpha;
161
+ alpha: typeof alpha;
160
162
  useTheme: typeof useTheme;
163
+ createTheme: typeof createTheme;
161
164
  };
162
165
  '@mui/material/styles': {
163
166
  MUIStyles: typeof MUIStyles;
@@ -80,6 +80,7 @@ const Entries = {
80
80
  Accordion: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Accordion')))),
81
81
  AccordionActions: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/AccordionActions')))),
82
82
  AccordionDetails: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/AccordionDetails')))),
83
+ AccordionSummary: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/AccordionSummary')))),
83
84
  Alert: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Alert')))),
84
85
  AlertTitle: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/AlertTitle')))),
85
86
  Autocomplete: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Autocomplete')))),
@@ -204,6 +205,8 @@ const MuiPrefixMUI = Object.fromEntries(Object.entries(LazyMUICore).map(([key, v
204
205
  const Attributes = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../BaseFeatureWidget/BaseFeatureDetail/Attributes'))));
205
206
  const FeatureDetails = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../BaseFeatureWidget/BaseFeatureDetail/FeatureDetails'))));
206
207
  const BaseCard = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../BaseFeatureWidget/BaseFeatureDetail/BaseCard'))));
208
+ const BaseAttributes = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../BaseFeatureWidget/BaseFeatureDetail/BaseAttributes'))));
209
+ const BaseCoreDetails = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails'))));
207
210
  const DataGridEntries = {
208
211
  DataGrid: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({ default: module.DataGrid }))),
209
212
  GridActionsCellItem: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
@@ -386,7 +389,7 @@ const libs = {
386
389
  '@material-ui/core': {
387
390
  ...LazyMUICore,
388
391
  useTheme: material_1.useTheme,
389
- alpha: MUIStyles.alpha,
392
+ alpha: material_1.alpha,
390
393
  makeStyles: (args) => {
391
394
  const useStyles = (0, mui_1.makeStyles)()(args);
392
395
  return () => useStyles().classes;
@@ -394,8 +397,9 @@ const libs = {
394
397
  },
395
398
  '@mui/material': {
396
399
  ...LazyMUICore,
397
- alpha: MUIStyles.alpha,
398
- useTheme: MUIStyles.useTheme,
400
+ alpha: material_1.alpha,
401
+ useTheme: material_1.useTheme,
402
+ createTheme: material_1.createTheme,
399
403
  },
400
404
  '@mui/material/styles': {
401
405
  MUIStyles,
@@ -451,6 +455,8 @@ const libs = {
451
455
  Attributes: LazyAttributes,
452
456
  FeatureDetails: LazyFeatureDetails,
453
457
  BaseCard: LazyBaseCard,
458
+ BaseCoreDetails,
459
+ BaseAttributes,
454
460
  },
455
461
  '@jbrowse/core/data_adapters/BaseAdapter': BaseAdapterExports,
456
462
  };
@@ -111,7 +111,7 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
111
111
  return self.getConf('aliases') || [];
112
112
  },
113
113
  get displayName() {
114
- return self.getConf('displayName');
114
+ return self.getConf('displayName') || self.getConf('name') || '';
115
115
  },
116
116
  hasName(name) {
117
117
  return this.allAliases.includes(name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/core",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "JBrowse 2 core libraries used by plugins",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -69,5 +69,5 @@
69
69
  "access": "public",
70
70
  "directory": "dist"
71
71
  },
72
- "gitHead": "aa2f1d1a89d2361c7fd1a93fe29506fa4554f5cc"
72
+ "gitHead": "c01a35edcb2612e94661af8793f09c95c0b13c75"
73
73
  }
@@ -19,6 +19,7 @@ export declare function createBaseTrackModel(pm: PluginManager, trackType: strin
19
19
  readonly rpcSessionId: any;
20
20
  readonly name: any;
21
21
  readonly textSearchAdapter: any;
22
+ readonly adapterConfig: any;
22
23
  readonly adapterType: import("..").AdapterType;
23
24
  readonly viewMenuActions: MenuItem[];
24
25
  readonly canConfigure: boolean | ({
@@ -39,6 +39,9 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
39
39
  get textSearchAdapter() {
40
40
  return (0, configuration_1.getConf)(self, 'textSearchAdapter');
41
41
  },
42
+ get adapterConfig() {
43
+ return (0, configuration_1.getConf)(self, 'adapter');
44
+ },
42
45
  get adapterType() {
43
46
  const adapterConfig = (0, configuration_1.getConf)(self, 'adapter');
44
47
  if (!adapterConfig) {