@jbrowse/core 1.5.0 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail.d.ts +4 -2
  2. package/BaseFeatureWidget/BaseFeatureDetail.js +43 -16
  3. package/BaseFeatureWidget/SequenceFeatureDetails.js +5 -4
  4. package/BaseFeatureWidget/index.js +1 -1
  5. package/BaseFeatureWidget/util.js +5 -5
  6. package/CorePlugin.d.ts +0 -1
  7. package/CorePlugin.js +13 -1
  8. package/PluginLoader.d.ts +25 -2
  9. package/PluginLoader.js +334 -47
  10. package/PluginManager.d.ts +9 -7
  11. package/PluginManager.js +1 -5
  12. package/ReExports/list.js +1 -1
  13. package/ReExports/material-ui-colors.js +38 -38
  14. package/ReExports/modules.d.ts +11 -13
  15. package/ReExports/modules.js +8 -2
  16. package/TextSearch/BaseResults.js +1 -1
  17. package/TextSearch/TextSearchManager.d.ts +2 -2
  18. package/TextSearch/TextSearchManager.js +0 -2
  19. package/assemblyManager/assembly.d.ts +21 -8
  20. package/assemblyManager/assembly.js +165 -122
  21. package/assemblyManager/assemblyConfigSchema.d.ts +3 -0
  22. package/assemblyManager/{assemblyConfigSchemas.js → assemblyConfigSchema.js} +35 -27
  23. package/assemblyManager/assemblyManager.d.ts +126 -45
  24. package/assemblyManager/index.d.ts +1 -1
  25. package/assemblyManager/index.js +5 -5
  26. package/configuration/configurationSchema.js +7 -7
  27. package/configuration/configurationSlot.js +3 -1
  28. package/configuration/index.js +4 -4
  29. package/configuration/util.js +2 -2
  30. package/data_adapters/BaseAdapter.d.ts +5 -5
  31. package/data_adapters/BaseAdapter.js +9 -18
  32. package/data_adapters/CytobandAdapter.d.ts +8 -0
  33. package/data_adapters/CytobandAdapter.js +128 -0
  34. package/data_adapters/dataAdapterCache.js +2 -2
  35. package/package.json +9 -8
  36. package/pluggableElementTypes/AdapterType.d.ts +9 -1
  37. package/pluggableElementTypes/AdapterType.js +23 -1
  38. package/pluggableElementTypes/ConnectionType.js +3 -1
  39. package/pluggableElementTypes/DisplayType.js +3 -1
  40. package/pluggableElementTypes/InternetAccountType.js +3 -1
  41. package/pluggableElementTypes/PluggableElementBase.js +4 -3
  42. package/pluggableElementTypes/RpcMethodType.js +2 -4
  43. package/pluggableElementTypes/TextSearchAdapterType.js +3 -1
  44. package/pluggableElementTypes/WidgetType.js +3 -1
  45. package/pluggableElementTypes/index.d.ts +6 -3
  46. package/pluggableElementTypes/index.js +127 -1
  47. package/pluggableElementTypes/models/BaseDisplayModel.js +2 -2
  48. package/pluggableElementTypes/models/BaseTrackModel.js +4 -3
  49. package/pluggableElementTypes/models/BaseViewModel.js +6 -2
  50. package/pluggableElementTypes/models/InternetAccountModel.d.ts +2 -2
  51. package/pluggableElementTypes/models/baseTrackConfig.js +2 -2
  52. package/pluggableElementTypes/models/index.js +14 -14
  53. package/pluggableElementTypes/renderers/BoxRendererType.js +3 -3
  54. package/pluggableElementTypes/renderers/CircularChordRendererType.js +3 -1
  55. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -2
  56. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +1 -1
  57. package/pluggableElementTypes/renderers/FeatureRendererType.js +4 -4
  58. package/pluggableElementTypes/renderers/RendererType.js +3 -1
  59. package/pluggableElementTypes/renderers/ServerSideRendererType.js +2 -2
  60. package/pluggableElementTypes/renderers/index.d.ts +9 -0
  61. package/pluggableElementTypes/renderers/index.js +63 -0
  62. package/rpc/BaseRpcDriver.d.ts +1 -1
  63. package/rpc/BaseRpcDriver.js +3 -5
  64. package/rpc/BaseRpcDriver.test.js +1 -1
  65. package/rpc/RpcManager.d.ts +3 -3
  66. package/rpc/RpcManager.js +44 -22
  67. package/rpc/WebWorkerRpcDriver.d.ts +2 -2
  68. package/rpc/WebWorkerRpcDriver.js +5 -7
  69. package/rpc/coreRpcMethods.js +3 -3
  70. package/rpc/remoteAbortSignals.js +2 -2
  71. package/ui/App.js +13 -12
  72. package/ui/DrawerWidget.js +10 -3
  73. package/ui/EditableTypography.js +2 -2
  74. package/ui/ErrorMessage.d.ts +5 -0
  75. package/ui/ErrorMessage.js +54 -0
  76. package/ui/FileSelector/FileSelector.js +75 -100
  77. package/ui/Icons.js +4 -4
  78. package/ui/Logo.js +1 -1
  79. package/ui/Menu.js +2 -2
  80. package/ui/NewSessionCards.js +2 -2
  81. package/ui/PrerenderedCanvas.d.ts +1 -0
  82. package/ui/PrerenderedCanvas.js +6 -3
  83. package/ui/SanitizedHTML.js +1 -1
  84. package/ui/SnackbarModel.d.ts +16 -0
  85. package/ui/SnackbarModel.js +56 -0
  86. package/ui/ViewContainer.js +4 -3
  87. package/ui/index.js +24 -24
  88. package/ui/theme.js +7 -5
  89. package/util/Base1DViewModel.js +2 -2
  90. package/util/aborting.js +7 -4
  91. package/util/blockTypes.js +8 -11
  92. package/util/calculateDynamicBlocks.test.js +2 -2
  93. package/util/color/cssColorsLevel4.js +1 -1
  94. package/util/color/index.js +5 -5
  95. package/util/compositeMap.js +3 -11
  96. package/util/index.d.ts +3 -1
  97. package/util/index.js +75 -32
  98. package/util/index.test.js +2 -2
  99. package/util/io/RemoteFileWithRangeCache.js +3 -3
  100. package/util/io/index.js +1 -1
  101. package/util/jexl.js +4 -1
  102. package/util/layouts/BaseLayout.d.ts +3 -0
  103. package/util/layouts/GranularRectLayout.d.ts +19 -10
  104. package/util/layouts/GranularRectLayout.js +459 -100
  105. package/util/layouts/GranularRectLayout.test.js +57 -10
  106. package/util/layouts/MultiLayout.d.ts +1 -1
  107. package/util/layouts/MultiLayout.js +0 -2
  108. package/util/layouts/PrecomputedLayout.js +2 -1
  109. package/util/layouts/PrecomputedMultiLayout.js +5 -3
  110. package/util/layouts/SceneGraph.d.ts +3 -3
  111. package/util/layouts/SceneGraph.js +0 -14
  112. package/util/layouts/index.d.ts +7 -0
  113. package/util/layouts/index.js +68 -0
  114. package/util/mst-reflection.d.ts +3 -3
  115. package/util/mst-reflection.js +3 -3
  116. package/util/offscreenCanvasPonyfill.js +1 -1
  117. package/util/range.js +1 -1
  118. package/util/simpleFeature.js +3 -3
  119. package/util/stats.js +4 -4
  120. package/util/tracks.d.ts +30 -433
  121. package/util/tracks.js +72 -192
  122. package/util/types/index.d.ts +14 -2
  123. package/util/types/index.js +21 -18
  124. package/util/types/mst.js +6 -6
  125. package/assemblyManager/assemblyConfigSchemas.d.ts +0 -7
  126. package/value.d.ts +0 -1
  127. package/value.js +0 -10
package/util/tracks.js CHANGED
@@ -3,22 +3,25 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getTrackAssemblyNames = getTrackAssemblyNames;
7
- exports.getRpcSessionId = getRpcSessionId;
8
- exports.getParentRenderProps = getParentRenderProps;
6
+ exports.UNSUPPORTED = exports.UNKNOWN = void 0;
7
+ exports.generateUnknownTrackConf = generateUnknownTrackConf;
8
+ exports.generateUnsupportedTrackConf = generateUnsupportedTrackConf;
9
9
  exports.getBlob = getBlob;
10
10
  exports.getBlobMap = getBlobMap;
11
- exports.setBlobMap = setBlobMap;
12
- exports.storeBlobLocation = storeBlobLocation;
11
+ exports.getFileName = getFileName;
12
+ exports.getParentRenderProps = getParentRenderProps;
13
+ exports.getRpcSessionId = getRpcSessionId;
14
+ exports.getTrackAssemblyNames = getTrackAssemblyNames;
13
15
  exports.guessAdapter = guessAdapter;
14
16
  exports.guessTrackType = guessTrackType;
15
- exports.generateUnsupportedTrackConf = generateUnsupportedTrackConf;
16
- exports.generateUnknownTrackConf = generateUnknownTrackConf;
17
- exports.UNSUPPORTED = exports.UNKNOWN = void 0;
17
+ exports.makeIndex = makeIndex;
18
+ exports.makeIndexType = makeIndexType;
19
+ exports.setBlobMap = setBlobMap;
20
+ exports.storeBlobLocation = storeBlobLocation;
18
21
 
19
22
  var _mobxStateTree = require("mobx-state-tree");
20
23
 
21
- var _index = require("./index");
24
+ var _index2 = require("./index");
22
25
 
23
26
  var _configuration = require("../configuration");
24
27
 
@@ -112,187 +115,63 @@ function storeBlobLocation(location) {
112
115
 
113
116
  return location;
114
117
  }
118
+ /**
119
+ * creates a new location from the provided location including the appropriate suffix and location type
120
+ * @param location - the FileLocation
121
+ * @param suffix - the file suffix (e.g. .bam)
122
+ * @returns the constructed location object from the provided prameters
123
+ */
115
124
 
116
- function guessAdapter(file, index, getFileName, adapterHint) {
117
- function makeIndex(location, suffix) {
118
- if ('uri' in location) {
119
- return {
120
- uri: location.uri + suffix,
121
- locationType: 'UriLocation'
122
- };
123
- }
124
-
125
- if ('localPath' in location) {
126
- return {
127
- localPath: location.localPath + suffix,
128
- locationType: 'LocalPathLocation'
129
- };
130
- }
131
-
132
- return location;
133
- }
134
-
135
- var fileName = getFileName(file);
136
- var indexName = index && getFileName(index);
137
-
138
- function makeIndexType(name, typeA, typeB) {
139
- return name !== null && name !== void 0 && name.toUpperCase().endsWith(typeA) ? typeA : typeB;
140
- }
141
-
142
- if (/\.bam$/i.test(fileName) || adapterHint === 'BamAdapter') {
143
- return {
144
- type: 'BamAdapter',
145
- bamLocation: file,
146
- index: {
147
- location: index || makeIndex(file, '.bai'),
148
- indexType: makeIndexType(indexName, 'CSI', 'BAI')
149
- }
150
- };
151
- }
152
-
153
- if (/\.cram$/i.test(fileName) || adapterHint === 'CramAdapter') {
154
- return {
155
- type: 'CramAdapter',
156
- cramLocation: file,
157
- craiLocation: index || makeIndex(file, '.crai')
158
- };
159
- }
160
-
161
- if (/\.gff3?$/i.test(fileName)) {
162
- return {
163
- type: 'Gff3Adapter',
164
- gffLocation: file
165
- };
166
- }
167
-
168
- if (/\.gff3?\.b?gz$/i.test(fileName) || adapterHint === 'Gff3TabixAdapter') {
169
- return {
170
- type: 'Gff3TabixAdapter',
171
- gffGzLocation: file,
172
- index: {
173
- location: index || makeIndex(file, '.tbi'),
174
- indexType: makeIndexType(indexName, 'CSI', 'TBI')
175
- }
176
- };
177
- }
178
-
179
- if (/\.gtf?$/i.test(fileName)) {
180
- return {
181
- type: 'UNSUPPORTED'
182
- };
183
- }
184
-
185
- if (/\.vcf$/i.test(fileName) || adapterHint === 'VcfAdapter') {
186
- return {
187
- type: 'VcfAdapter',
188
- vcfLocation: file
189
- };
190
- }
191
-
192
- if (/\.vcf\.b?gz$/i.test(fileName) || adapterHint === 'VcfTabixAdapter') {
193
- return {
194
- type: 'VcfTabixAdapter',
195
- vcfGzLocation: file,
196
- index: {
197
- location: index || makeIndex(file, '.tbi'),
198
- indexType: makeIndexType(indexName, 'CSI', 'TBI')
199
- }
200
- };
201
- }
202
-
203
- if (/\.vcf\.idx$/i.test(fileName)) {
204
- return {
205
- type: 'UNSUPPORTED'
206
- };
207
- }
208
-
209
- if (/\.bed$/i.test(fileName)) {
210
- return {
211
- type: 'UNSUPPORTED'
212
- };
213
- }
214
-
215
- if (/\.bed\.b?gz$/i.test(fileName) || adapterHint === 'BedTabixAdapter') {
216
- return {
217
- type: 'BedTabixAdapter',
218
- bedGzLocation: file,
219
- index: {
220
- location: index || makeIndex(file, '.tbi'),
221
- indexType: makeIndexType(indexName, 'CSI', 'TBI')
222
- }
223
- };
224
- }
225
-
226
- if (/\.(bb|bigbed)$/i.test(fileName) || adapterHint === 'BigBedAdapter') {
227
- return {
228
- type: 'BigBedAdapter',
229
- bigBedLocation: file
230
- };
231
- }
232
-
233
- if (/\.(bw|bigwig)$/i.test(fileName) || adapterHint === 'BigWigAdapter') {
234
- return {
235
- type: 'BigWigAdapter',
236
- bigWigLocation: file
237
- };
238
- }
239
-
240
- if (/\.(fa|fasta|fas|fna|mfa)$/i.test(fileName) || adapterHint === 'IndexedFastaAdapter') {
241
- return {
242
- type: 'IndexedFastaAdapter',
243
- fastaLocation: file,
244
- faiLocation: index || makeIndex(file, '.fai')
245
- };
246
- }
247
125
 
248
- if (/\.(fa|fasta|fas|fna|mfa)\.b?gz$/i.test(fileName) || adapterHint === 'BgzipFastaAdapter') {
126
+ function makeIndex(location, suffix) {
127
+ if ('uri' in location) {
249
128
  return {
250
- type: 'BgzipFastaAdapter',
251
- fastaLocation: file,
252
- faiLocation: makeIndex(file, '.fai'),
253
- gziLocation: makeIndex(file, '.gzi')
129
+ uri: location.uri + suffix,
130
+ locationType: 'UriLocation'
254
131
  };
255
132
  }
256
133
 
257
- if (/\.2bit$/i.test(fileName) || adapterHint === 'TwoBitAdapter') {
134
+ if ('localPath' in location) {
258
135
  return {
259
- type: 'TwoBitAdapter',
260
- twoBitLocation: file
136
+ localPath: location.localPath + suffix,
137
+ locationType: 'LocalPathLocation'
261
138
  };
262
139
  }
263
140
 
264
- if (/\.sizes$/i.test(fileName)) {
265
- return {
266
- type: 'UNSUPPORTED'
267
- };
268
- }
141
+ return location;
142
+ }
143
+ /**
144
+ * constructs a potential index file (with suffix) from the provided file name
145
+ * @param name - the name of the index file
146
+ * @param typeA - one option of a potential two file suffix (e.g. CSI, BAI)
147
+ * @param typeB - the second option of a potential two file suffix (e.g. CSI, BAI)
148
+ * @returns a likely name of the index file for a given filename
149
+ */
269
150
 
270
- if (/\/trackData.jsonz?$/i.test(fileName) || adapterHint === 'NCListAdapter') {
271
- return {
272
- type: 'NCListAdapter',
273
- rootUrlTemplate: file
274
- };
275
- }
276
151
 
277
- if (/\/sparql$/i.test(fileName) || adapterHint === 'SPARQLAdapter') {
278
- return {
279
- type: 'SPARQLAdapter',
280
- endpoint: file
281
- };
282
- }
152
+ function makeIndexType(name, typeA, typeB) {
153
+ return name !== null && name !== void 0 && name.toUpperCase().endsWith(typeA) ? typeA : typeB;
154
+ }
283
155
 
284
- if (/\.hic/i.test(fileName) || adapterHint === 'HicAdapter') {
285
- return {
286
- type: 'HicAdapter',
287
- hicLocation: file
288
- };
289
- }
156
+ function getFileName(track) {
157
+ var uri = 'uri' in track ? track.uri : undefined;
158
+ var localPath = 'localPath' in track ? track.localPath : undefined;
159
+ var blob = 'blobId' in track ? track : undefined;
160
+ return (blob === null || blob === void 0 ? void 0 : blob.name) || (uri === null || uri === void 0 ? void 0 : uri.slice(uri.lastIndexOf('/') + 1)) || (localPath === null || localPath === void 0 ? void 0 : localPath.slice(localPath.lastIndexOf('/') + 1)) || '';
161
+ }
290
162
 
291
- if (/\.paf/i.test(fileName) || adapterHint === 'PAFAdapter') {
292
- return {
293
- type: 'PAFAdapter',
294
- pafLocation: file
295
- };
163
+ function guessAdapter(file, index, adapterHint, model) {
164
+ if (model) {
165
+ // @ts-ignore
166
+ var session = (0, _index2.getSession)(model);
167
+ var adapterGuesser = (0, _mobxStateTree.getEnv)(session).pluginManager.evaluateExtensionPoint('Core-guessAdapterForLocation', function (_file, _index, _adapterHint) {
168
+ return undefined;
169
+ });
170
+ var adapter = adapterGuesser(file, index, adapterHint);
171
+
172
+ if (adapter) {
173
+ return adapter;
174
+ }
296
175
  }
297
176
 
298
177
  return {
@@ -300,20 +179,21 @@ function guessAdapter(file, index, getFileName, adapterHint) {
300
179
  };
301
180
  }
302
181
 
303
- function guessTrackType(adapterType) {
304
- var known = {
305
- BamAdapter: 'AlignmentsTrack',
306
- CramAdapter: 'AlignmentsTrack',
307
- BgzipFastaAdapter: 'ReferenceSequenceTrack',
308
- BigWigAdapter: 'QuantitativeTrack',
309
- IndexedFastaAdapter: 'ReferenceSequenceTrack',
310
- TwoBitAdapter: 'ReferenceSequenceTrack',
311
- VcfAdapter: 'VariantTrack',
312
- VcfTabixAdapter: 'VariantTrack',
313
- HicAdapter: 'HicTrack',
314
- PAFAdapter: 'SyntenyTrack'
315
- };
316
- return known[adapterType] || 'FeatureTrack';
182
+ function guessTrackType(adapterType, model) {
183
+ if (model) {
184
+ // @ts-ignore
185
+ var session = (0, _index2.getSession)(model);
186
+ var trackTypeGuesser = (0, _mobxStateTree.getEnv)(session).pluginManager.evaluateExtensionPoint('Core-guessTrackTypeForLocation', function (_adapterName) {
187
+ return undefined;
188
+ });
189
+ var trackType = trackTypeGuesser(adapterType);
190
+
191
+ if (trackType) {
192
+ return trackType;
193
+ }
194
+ }
195
+
196
+ return 'FeatureTrack';
317
197
  }
318
198
 
319
199
  function generateUnsupportedTrackConf(trackName, trackUrl, categories) {
@@ -324,7 +204,7 @@ function generateUnsupportedTrackConf(trackName, trackUrl, categories) {
324
204
  category: categories,
325
205
  trackId: ''
326
206
  };
327
- conf.trackId = (0, _index.objectHash)(conf);
207
+ conf.trackId = (0, _index2.objectHash)(conf);
328
208
  return conf;
329
209
  }
330
210
 
@@ -336,6 +216,6 @@ function generateUnknownTrackConf(trackName, trackUrl, categories) {
336
216
  category: categories,
337
217
  trackId: ''
338
218
  };
339
- conf.trackId = (0, _index.objectHash)(conf);
219
+ conf.trackId = (0, _index2.objectHash)(conf);
340
220
  return conf;
341
221
  }
@@ -29,7 +29,10 @@ export interface JBrowsePlugin {
29
29
  authors: string[];
30
30
  description: string;
31
31
  location: string;
32
- url: string;
32
+ url?: string;
33
+ umdUrl?: string;
34
+ esmUrl?: string;
35
+ cjsUrl?: string;
33
36
  license: string;
34
37
  image?: string;
35
38
  }
@@ -61,7 +64,6 @@ export interface AbstractSessionModel extends AbstractViewContainer {
61
64
  adminMode?: boolean;
62
65
  showWidget?: Function;
63
66
  addWidget?: Function;
64
- addTrackConf?: Function;
65
67
  DialogComponent?: DialogComponentType;
66
68
  DialogProps: any;
67
69
  queueDialog: (callback: (doneCallback: Function) => [DialogComponentType, any]) => void;
@@ -74,6 +76,11 @@ export interface SessionWithConfigEditing extends AbstractSessionModel {
74
76
  editConfiguration(configuration: AnyConfigurationModel): void;
75
77
  }
76
78
  export declare function isSessionModelWithConfigEditing(thing: unknown): thing is SessionWithConfigEditing;
79
+ /** abstract interface for a session allows adding tracks */
80
+ export interface SessionWithConfigEditing extends AbstractSessionModel {
81
+ addTrackConf(configuration: AnyConfigurationModel | SnapshotIn<AnyConfigurationModel>): void;
82
+ }
83
+ export declare function isSessionWithAddTracks(thing: unknown): thing is SessionWithConfigEditing;
77
84
  export interface Widget {
78
85
  type: string;
79
86
  id: string;
@@ -169,16 +176,21 @@ export interface NoAssemblyRegion extends SnapshotIn<typeof MUNoAssemblyRegion>
169
176
  }
170
177
  export interface Region extends SnapshotIn<typeof MUIRegion> {
171
178
  }
179
+ export interface AugmentedRegion extends Region {
180
+ originalRefName?: string;
181
+ }
172
182
  export interface LocalPathLocation extends SnapshotIn<typeof MULocalPathLocation> {
173
183
  }
174
184
  export interface UriLocation extends SnapshotIn<typeof MUUriLocation> {
175
185
  }
176
186
  export declare function isUriLocation(location: unknown): location is UriLocation;
177
187
  export declare class AuthNeededError extends Error {
188
+ message: string;
178
189
  location: UriLocation;
179
190
  constructor(message: string, location: UriLocation);
180
191
  }
181
192
  export declare class RetryError extends Error {
193
+ message: string;
182
194
  internetAccountId: string;
183
195
  constructor(message: string, internetAccountId: string);
184
196
  }
@@ -9,6 +9,7 @@ var _exportNames = {
9
9
  isViewContainer: true,
10
10
  isSessionModel: true,
11
11
  isSessionModelWithConfigEditing: true,
12
+ isSessionWithAddTracks: true,
12
13
  isSessionModelWithWidgets: true,
13
14
  isSessionWithSessionPlugins: true,
14
15
  isSelectionContainer: true,
@@ -24,22 +25,25 @@ var _exportNames = {
24
25
  isAuthNeededException: true,
25
26
  isRetryException: true
26
27
  };
27
- exports.isViewContainer = isViewContainer;
28
+ exports.RetryError = exports.AuthNeededError = void 0;
29
+ exports.isAbstractMenuManager = isAbstractMenuManager;
30
+ exports.isAppRootModel = isAppRootModel;
31
+ exports.isAuthNeededException = isAuthNeededException;
32
+ exports.isDisplayModel = isDisplayModel;
33
+ exports.isRetryException = isRetryException;
34
+ exports.isSelectionContainer = isSelectionContainer;
28
35
  exports.isSessionModel = isSessionModel;
29
36
  exports.isSessionModelWithConfigEditing = isSessionModelWithConfigEditing;
30
37
  exports.isSessionModelWithWidgets = isSessionModelWithWidgets;
38
+ exports.isSessionWithAddTracks = isSessionWithAddTracks;
31
39
  exports.isSessionWithSessionPlugins = isSessionWithSessionPlugins;
32
- exports.isSelectionContainer = isSelectionContainer;
33
- exports.isViewModel = isViewModel;
34
40
  exports.isTrackModel = isTrackModel;
35
- exports.isDisplayModel = isDisplayModel;
36
41
  exports.isTrackViewModel = isTrackViewModel;
37
- exports.isAppRootModel = isAppRootModel;
38
- exports.isAbstractMenuManager = isAbstractMenuManager;
39
42
  exports.isUriLocation = isUriLocation;
40
- exports.isAuthNeededException = isAuthNeededException;
41
- exports.isRetryException = isRetryException;
42
- exports.RetryError = exports.AuthNeededError = void 0;
43
+ exports.isViewContainer = isViewContainer;
44
+ exports.isViewModel = isViewModel;
45
+
46
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
43
47
 
44
48
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
45
49
 
@@ -53,8 +57,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
53
57
 
54
58
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
55
59
 
56
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
57
-
58
60
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
59
61
 
60
62
  var _mobxStateTree = require("mobx-state-tree");
@@ -90,6 +92,12 @@ function isSessionModel(thing) {
90
92
  function isSessionModelWithConfigEditing(thing) {
91
93
  return isSessionModel(thing) && 'editConfiguration' in thing;
92
94
  }
95
+ /** abstract interface for a session allows adding tracks */
96
+
97
+
98
+ function isSessionWithAddTracks(thing) {
99
+ return isSessionModel(thing) && 'addTrackConf' in thing;
100
+ }
93
101
 
94
102
  function isSessionModelWithWidgets(thing) {
95
103
  return isSessionModel(thing) && 'widgets' in thing;
@@ -155,14 +163,12 @@ var AuthNeededError = /*#__PURE__*/function (_Error) {
155
163
 
156
164
  (0, _classCallCheck2.default)(this, AuthNeededError);
157
165
  _this = _super.call(this, message);
158
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "location", void 0);
159
- _this.location = location;
160
166
  _this.name = 'AuthNeededError';
161
167
  Object.setPrototypeOf((0, _assertThisInitialized2.default)(_this), AuthNeededError.prototype);
162
168
  return _this;
163
169
  }
164
170
 
165
- return AuthNeededError;
171
+ return (0, _createClass2.default)(AuthNeededError);
166
172
  }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
167
173
 
168
174
  exports.AuthNeededError = AuthNeededError;
@@ -177,14 +183,11 @@ var RetryError = /*#__PURE__*/function (_Error2) {
177
183
 
178
184
  (0, _classCallCheck2.default)(this, RetryError);
179
185
  _this2 = _super2.call(this, message);
180
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "internetAccountId", void 0);
181
- _this2.message = message;
182
- _this2.internetAccountId = internetAccountId;
183
186
  _this2.name = 'RetryError';
184
187
  return _this2;
185
188
  }
186
189
 
187
- return RetryError;
190
+ return (0, _createClass2.default)(RetryError);
188
191
  }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
189
192
 
190
193
  exports.RetryError = RetryError;
package/util/types/mst.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.FileLocation = exports.UriLocation = exports.UriLocationRaw = exports.BlobLocation = exports.LocalPathLocation = exports.Region = exports.NoAssemblyRegion = exports.PropTypes = exports.ElementId = void 0;
8
+ exports.UriLocationRaw = exports.UriLocation = exports.Region = exports.PropTypes = exports.NoAssemblyRegion = exports.LocalPathLocation = exports.FileLocation = exports.ElementId = exports.BlobLocation = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -22,9 +22,9 @@ var _mobxReact = require("mobx-react");
22
22
  var _excluded = ["baseUri"],
23
23
  _excluded2 = ["locationType"];
24
24
 
25
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
25
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
26
26
 
27
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
27
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
28
28
 
29
29
  var ElementId = _mobxStateTree.types.optional(_mobxStateTree.types.identifier, _shortid.default.generate); // PropTypes that are useful when working with instances of these in react components
30
30
 
@@ -129,11 +129,11 @@ var FileLocation = _mobxStateTree.types.snapshotProcessor(_mobxStateTree.types.u
129
129
  blob = rest.blob;
130
130
  var _locationType = '';
131
131
 
132
- if (uri) {
132
+ if (uri !== undefined) {
133
133
  _locationType = 'UriLocation';
134
- } else if (localPath) {
134
+ } else if (localPath !== undefined) {
135
135
  _locationType = 'LocalPathLocation';
136
- } else if (blob) {
136
+ } else if (blob !== undefined) {
137
137
  _locationType = 'BlobLocation';
138
138
  }
139
139
 
@@ -1,7 +0,0 @@
1
- import { SnapshotIn } from 'mobx-state-tree';
2
- import PluginManager from '../PluginManager';
3
- declare const _default: (pluginManager: PluginManager) => {
4
- assemblyConfigSchemas: import("../configuration/configurationSchema").AnyConfigurationSchemaType[];
5
- dispatcher: (snapshot: import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined) => import("../configuration/configurationSchema").AnyConfigurationSchemaType;
6
- };
7
- export default _default;
package/value.d.ts DELETED
@@ -1 +0,0 @@
1
- export default function (): number;
package/value.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = _default;
7
-
8
- function _default() {
9
- return 43;
10
- }