@jbrowse/embedded-core 5.0.0-beta.1 → 5.0.0-beta.11
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/esm/EmbeddedSessionMixin.d.ts +250 -759
- package/esm/EmbeddedSessionMixin.js +19 -12
- package/esm/EmbeddedSessionThemeMixin.d.ts +70 -345
- package/esm/EmbeddedSessionThemeMixin.js +31 -22
- package/esm/createEmbeddedRootModel.d.ts +192 -454
- package/esm/createEmbeddedRootModel.js +29 -16
- package/esm/ui/EmbeddedViewContainer.js +8 -8
- package/package.json +7 -7
- package/esm/ui/VersionAboutDialog.d.ts +0 -5
- package/esm/ui/VersionAboutDialog.js +0 -13
- package/esm/ui/ViewTitle.d.ts +0 -5
- package/esm/ui/ViewTitle.js +0 -65
|
@@ -8,18 +8,17 @@ import { EmbeddedSessionThemeMixin } from './EmbeddedSessionThemeMixin.js';
|
|
|
8
8
|
* they compose and the three getters that read the root model. The twin of
|
|
9
9
|
* {@link createEmbeddedRootModel} one level down.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* concrete is what keeps the products' views typed.
|
|
11
|
+
* Each product composes this mixin. A factory taking the product's view type
|
|
12
|
+
* and tracks mixin as parameters does not typecheck usefully:
|
|
13
|
+
* `types.compose`'s overloads are declared over `IModelType<P, O, FC, FS>`, so
|
|
14
|
+
* a model passed as a naked type parameter gives nothing to infer those four
|
|
15
|
+
* from, and `session.view` becomes `any` at every embedder call site with no
|
|
16
|
+
* type error. Passing only concrete types to `compose` keeps the products'
|
|
17
|
+
* views typed.
|
|
19
18
|
*
|
|
20
|
-
*
|
|
21
|
-
* `views`/`addView`/`removeView` members that read `self.view
|
|
22
|
-
*
|
|
19
|
+
* Each product therefore declares its tracks mixin, `view` prop, and the
|
|
20
|
+
* `views`/`addView`/`removeView` members that read `self.view`, because those
|
|
21
|
+
* members need its concrete view type.
|
|
23
22
|
*/
|
|
24
23
|
export function EmbeddedSessionMixin(pluginManager) {
|
|
25
24
|
return types
|
|
@@ -28,6 +27,14 @@ export function EmbeddedSessionMixin(pluginManager) {
|
|
|
28
27
|
// members, so their order relative to each other is not load-bearing
|
|
29
28
|
ReferenceManagementSessionMixin(pluginManager), TrackMenuSessionMixin(pluginManager), EmbeddedSessionThemeMixin(pluginManager))
|
|
30
29
|
.views(self => ({
|
|
30
|
+
/**
|
|
31
|
+
* #getter
|
|
32
|
+
* An embedded view is drawn with no title bar above it, so its menu lives
|
|
33
|
+
* in the view's own controls.
|
|
34
|
+
*/
|
|
35
|
+
get viewTitleBars() {
|
|
36
|
+
return false;
|
|
37
|
+
},
|
|
31
38
|
/**
|
|
32
39
|
* #getter
|
|
33
40
|
*/
|
|
@@ -42,7 +49,7 @@ export function EmbeddedSessionMixin(pluginManager) {
|
|
|
42
49
|
// them through `self.jbrowse` (= root.config), so re-declaring here would
|
|
43
50
|
// just duplicate the base getters with looser types
|
|
44
51
|
get assemblyNames() {
|
|
45
|
-
return
|
|
52
|
+
return getParent(self).config.assemblyNames;
|
|
46
53
|
},
|
|
47
54
|
/**
|
|
48
55
|
* #getter
|