@jbrowse/embedded-core 5.0.0-beta.7 → 5.0.0-beta.9

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.
@@ -4,7 +4,7 @@ export interface EmbeddedSessionParent {
4
4
  version: string;
5
5
  assemblyManager: AssemblyManager;
6
6
  config: {
7
- assemblyName: string;
7
+ assemblyNames: string[];
8
8
  };
9
9
  }
10
10
  /**
@@ -14,23 +14,23 @@ export interface EmbeddedSessionParent {
14
14
  * they compose and the three getters that read the root model. The twin of
15
15
  * {@link createEmbeddedRootModel} one level down.
16
16
  *
17
- * A mixin the product composes, deliberately, rather than a factory taking the
18
- * product's view type and tracks mixin as parameters. That factory is the
19
- * obvious shape and it does not work: `types.compose`'s overloads are declared
20
- * over `IModelType<P, O, FC, FS>`, so a model handed in as a naked type
21
- * parameter has nothing to infer those four from and the composed result
22
- * degrades — `session.view` becomes `any`, which typechecks at every embedder
23
- * call site and is caught by nothing. Keeping every argument to `compose`
24
- * concrete is what keeps the products' views typed.
17
+ * Each product composes this mixin. A factory taking the product's view type
18
+ * and tracks mixin as parameters does not typecheck usefully:
19
+ * `types.compose`'s overloads are declared over `IModelType<P, O, FC, FS>`, so
20
+ * a model passed as a naked type parameter gives nothing to infer those four
21
+ * from, and `session.view` becomes `any` at every embedder call site with no
22
+ * type error. Passing only concrete types to `compose` keeps the products'
23
+ * views typed.
25
24
  *
26
- * So each product still spells out its own tracks mixin, `view` prop, and the
27
- * `views`/`addView`/`removeView` members that read `self.view` — those are the
28
- * ones that need its concrete view type.
25
+ * Each product therefore declares its tracks mixin, `view` prop, and the
26
+ * `views`/`addView`/`removeView` members that read `self.view`, because those
27
+ * members need its concrete view type.
29
28
  */
30
29
  export declare function EmbeddedSessionMixin(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<Omit<Omit<Omit<{
31
30
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
32
31
  name: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
33
32
  focusedViewId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
33
+ highlights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/core/util/highlights").HighlightType, import("@jbrowse/core/util/highlights").HighlightType, import("@jbrowse/core/util/highlights").HighlightType>>, [undefined]>;
34
34
  highlightsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
35
35
  heldForMissingPlugins: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/product-core").HeldNode[] | undefined, import("@jbrowse/product-core").HeldNode[] | undefined, import("@jbrowse/product-core").HeldNode[] | undefined>, [undefined]>;
36
36
  }, never>, "activeWidgets" | "drawerPosition" | "drawerWidth" | "minimized" | "widgets"> & {
@@ -42,10 +42,11 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
42
42
  }, "connectionInstances" | "connectionTrackConfigs"> & {
43
43
  connectionInstances: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>, [undefined]>;
44
44
  connectionTrackConfigs: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<Record<string, import("@jbrowse/product-core").ConnectionTrackConfigEntry>, Record<string, import("@jbrowse/product-core").ConnectionTrackConfigEntry>, Record<string, import("@jbrowse/product-core").ConnectionTrackConfigEntry>>, [undefined]>;
45
- }, never>, never>, "focusedViewId" | "heldForMissingPlugins" | "highlightsVisible" | "id" | "name"> & Omit<{
45
+ }, never>, never>, "focusedViewId" | "heldForMissingPlugins" | "highlights" | "highlightsVisible" | "id" | "name"> & Omit<{
46
46
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
47
47
  name: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
48
48
  focusedViewId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
49
+ highlights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/core/util/highlights").HighlightType, import("@jbrowse/core/util/highlights").HighlightType, import("@jbrowse/core/util/highlights").HighlightType>>, [undefined]>;
49
50
  highlightsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
50
51
  heldForMissingPlugins: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/product-core").HeldNode[] | undefined, import("@jbrowse/product-core").HeldNode[] | undefined, import("@jbrowse/product-core").HeldNode[] | undefined>, [undefined]>;
51
52
  }, never>, {
@@ -547,10 +548,7 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
547
548
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
548
549
  readonly assemblyNamesList: string[];
549
550
  readonly configuredAssemblyNames: Set<string>;
550
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
551
- setSubschema(slotName: string, data: Record<string, unknown>): any;
552
- setSlot(slotName: string, value: unknown): void;
553
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
551
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
554
552
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
555
553
  } & {
556
554
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -1339,10 +1337,7 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
1339
1337
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
1340
1338
  readonly assemblyNamesList: string[];
1341
1339
  readonly configuredAssemblyNames: Set<string>;
1342
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
1343
- setSubschema(slotName: string, data: Record<string, unknown>): any;
1344
- setSlot(slotName: string, value: unknown): void;
1345
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
1340
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
1346
1341
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1347
1342
  } & {
1348
1343
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -1642,10 +1637,7 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
1642
1637
  } & {
1643
1638
  readonly jbrowse: any;
1644
1639
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1645
- readonly configuration: import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
1646
- setSubschema(slotName: string, data: Record<string, unknown>): any;
1647
- setSlot(slotName: string, value: unknown): void;
1648
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
1640
+ readonly configuration: import("@jbrowse/core/configuration").ConfigNodeProps<any> & import("@jbrowse/core/configuration").ConfigNodeActions & import("@jbrowse/core/configuration").ConfigNodeBrand<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
1649
1641
  readonly adminMode: boolean;
1650
1642
  readonly textSearchManager: import("@jbrowse/core/TextSearch/TextSearchManager").default;
1651
1643
  } & {
@@ -1666,7 +1658,10 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
1666
1658
  clearSelection(): void;
1667
1659
  setHovered(thing: unknown): void;
1668
1660
  setHighlightsVisible(arg: boolean): void;
1669
- revealHighlights(): void;
1661
+ addHighlight(highlight: import("@jbrowse/core/util/highlights").HighlightType): void;
1662
+ removeHighlight(highlight: import("@jbrowse/core/util/highlights").HighlightType): void;
1663
+ updateHighlight(old: import("@jbrowse/core/util/highlights").HighlightType, updates: Partial<import("@jbrowse/core/util/highlights").HighlightType>): void;
1664
+ setHighlights(highlights: import("@jbrowse/core/util/highlights").HighlightType[]): void;
1670
1665
  setPreferenceOverride(key: string, value: unknown): void;
1671
1666
  clearPreferenceOverrides(): void;
1672
1667
  clearPreferenceOverride(key: string): void;
@@ -1707,12 +1702,15 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
1707
1702
  popoutWidget(): void;
1708
1703
  returnWidgetToDrawer(): void;
1709
1704
  hideAllWidgets(): void;
1705
+ afterAttach(): void;
1706
+ } & {
1707
+ openWidget(typeName: string, id: string, initialState?: any, conf?: unknown): any;
1708
+ } & {
1710
1709
  editConfiguration(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel | {
1711
1710
  trackId: string;
1712
1711
  }, opts?: {
1713
1712
  expandedDisplayId?: string;
1714
1713
  }): void;
1715
- afterAttach(): void;
1716
1714
  } & {
1717
1715
  readonly connections: import("@jbrowse/core/pluggableElementTypes/models/baseConnectionConfig").BaseConnectionConfigModel[];
1718
1716
  } & {
@@ -1750,6 +1748,12 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
1750
1748
  } & {
1751
1749
  setThemeMode(mode: 'light' | 'dark'): void;
1752
1750
  } & {
1751
+ /**
1752
+ * #getter
1753
+ * An embedded view is drawn with no title bar above it, so its menu lives
1754
+ * in the view's own controls.
1755
+ */
1756
+ readonly viewTitleBars: boolean;
1753
1757
  /**
1754
1758
  * #getter
1755
1759
  */
@@ -2250,10 +2254,7 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
2250
2254
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
2251
2255
  readonly assemblyNamesList: string[];
2252
2256
  readonly configuredAssemblyNames: Set<string>;
2253
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
2254
- setSubschema(slotName: string, data: Record<string, unknown>): any;
2255
- setSlot(slotName: string, value: unknown): void;
2256
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
2257
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
2257
2258
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2258
2259
  } & {
2259
2260
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -3025,10 +3026,7 @@ export declare function EmbeddedSessionMixin(pluginManager: PluginManager): impo
3025
3026
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
3026
3027
  readonly assemblyNamesList: string[];
3027
3028
  readonly configuredAssemblyNames: Set<string>;
3028
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
3029
- setSubschema(slotName: string, data: Record<string, unknown>): any;
3030
- setSlot(slotName: string, value: unknown): void;
3031
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
3029
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
3032
3030
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
3033
3031
  } & {
3034
3032
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -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
- * A mixin the product composes, deliberately, rather than a factory taking the
12
- * product's view type and tracks mixin as parameters. That factory is the
13
- * obvious shape and it does not work: `types.compose`'s overloads are declared
14
- * over `IModelType<P, O, FC, FS>`, so a model handed in as a naked type
15
- * parameter has nothing to infer those four from and the composed result
16
- * degrades — `session.view` becomes `any`, which typechecks at every embedder
17
- * call site and is caught by nothing. Keeping every argument to `compose`
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
- * So each product still spells out its own tracks mixin, `view` prop, and the
21
- * `views`/`addView`/`removeView` members that read `self.view` — those are the
22
- * ones that need its concrete view type.
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 [getParent(self).config.assemblyName];
52
+ return getParent(self).config.assemblyNames;
46
53
  },
47
54
  /**
48
55
  * #getter
@@ -11,6 +11,7 @@ export declare function EmbeddedSessionThemeMixin(pluginManager: PluginManager):
11
11
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
12
12
  name: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
13
13
  focusedViewId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
14
+ highlights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/core/util/highlights").HighlightType, import("@jbrowse/core/util/highlights").HighlightType, import("@jbrowse/core/util/highlights").HighlightType>>, [undefined]>;
14
15
  highlightsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
15
16
  heldForMissingPlugins: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<import("@jbrowse/product-core").HeldNode[] | undefined, import("@jbrowse/product-core").HeldNode[] | undefined, import("@jbrowse/product-core").HeldNode[] | undefined>, [undefined]>;
16
17
  }, never>, {
@@ -512,10 +513,7 @@ export declare function EmbeddedSessionThemeMixin(pluginManager: PluginManager):
512
513
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
513
514
  readonly assemblyNamesList: string[];
514
515
  readonly configuredAssemblyNames: Set<string>;
515
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
516
- setSubschema(slotName: string, data: Record<string, unknown>): any;
517
- setSlot(slotName: string, value: unknown): void;
518
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
516
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
519
517
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
520
518
  } & {
521
519
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -1304,10 +1302,7 @@ export declare function EmbeddedSessionThemeMixin(pluginManager: PluginManager):
1304
1302
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
1305
1303
  readonly assemblyNamesList: string[];
1306
1304
  readonly configuredAssemblyNames: Set<string>;
1307
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
1308
- setSubschema(slotName: string, data: Record<string, unknown>): any;
1309
- setSlot(slotName: string, value: unknown): void;
1310
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
1305
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
1311
1306
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1312
1307
  } & {
1313
1308
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -1607,10 +1602,7 @@ export declare function EmbeddedSessionThemeMixin(pluginManager: PluginManager):
1607
1602
  } & {
1608
1603
  readonly jbrowse: any;
1609
1604
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1610
- readonly configuration: import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
1611
- setSubschema(slotName: string, data: Record<string, unknown>): any;
1612
- setSlot(slotName: string, value: unknown): void;
1613
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
1605
+ readonly configuration: import("@jbrowse/core/configuration").ConfigNodeProps<any> & import("@jbrowse/core/configuration").ConfigNodeActions & import("@jbrowse/core/configuration").ConfigNodeBrand<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
1614
1606
  readonly adminMode: boolean;
1615
1607
  readonly textSearchManager: import("@jbrowse/core/TextSearch/TextSearchManager").default;
1616
1608
  } & {
@@ -1631,7 +1623,10 @@ export declare function EmbeddedSessionThemeMixin(pluginManager: PluginManager):
1631
1623
  clearSelection(): void;
1632
1624
  setHovered(thing: unknown): void;
1633
1625
  setHighlightsVisible(arg: boolean): void;
1634
- revealHighlights(): void;
1626
+ addHighlight(highlight: import("@jbrowse/core/util/highlights").HighlightType): void;
1627
+ removeHighlight(highlight: import("@jbrowse/core/util/highlights").HighlightType): void;
1628
+ updateHighlight(old: import("@jbrowse/core/util/highlights").HighlightType, updates: Partial<import("@jbrowse/core/util/highlights").HighlightType>): void;
1629
+ setHighlights(highlights: import("@jbrowse/core/util/highlights").HighlightType[]): void;
1635
1630
  setPreferenceOverride(key: string, value: unknown): void;
1636
1631
  clearPreferenceOverrides(): void;
1637
1632
  clearPreferenceOverride(key: string): void;
@@ -1698,20 +1693,19 @@ export declare function EmbeddedSessionThemeMixin(pluginManager: PluginManager):
1698
1693
  } & {
1699
1694
  /**
1700
1695
  * #action
1701
- * Point the session at light or dark. One write, not two: the `theme`
1702
- * slot is what `themeOptions` ships to the renderer, so the labels baked
1703
- * in the worker follow it, and `palette` is derived from the same slot,
1704
- * so what React draws follows it too. An embedder who sets only a
1705
- * React-side palette leaves the baked labels behind.
1696
+ * Switch the session to light or dark. `themeOptions` sends the `theme`
1697
+ * slot to the renderer, so labels drawn in the worker follow it, and
1698
+ * `palette` is derived from the same slot, so React-drawn elements
1699
+ * follow it too. An embedder who sets only a React-side palette leaves
1700
+ * the worker-drawn labels in the old mode.
1706
1701
  *
1707
- * Merges rather than replaces, at both levels. `theme` is a frozen slot,
1708
- * so a bare `setConf(session, 'theme', { palette: { mode } })` — the
1709
- * obvious form, and what the build-your-own examples each wrote — drops
1710
- * every other key in it. That silently discards whatever the host passed
1711
- * as `createViewState`'s `configuration.theme` (a brand `primary`, say)
1712
- * the first time their dark-mode toggle fires. `resolvePalette` spreads
1702
+ * Merges into the existing theme at both levels. `theme` is a frozen
1703
+ * slot, so `setConf(session, 'theme', { palette: { mode } })` replaces
1704
+ * every other key in it, discarding whatever the host passed as
1705
+ * `createViewState`'s `configuration.theme` (a brand `primary`, say) the
1706
+ * first time their dark-mode toggle fires. `resolvePalette` spreads
1713
1707
  * `configTheme.palette` over the preset shallowly, so `mode` and
1714
- * `primary` are siblings and both levels have to survive.
1708
+ * `primary` are siblings and both levels have to be kept.
1715
1709
  */
1716
1710
  setThemeMode(mode: 'light' | 'dark'): void;
1717
1711
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
@@ -78,20 +78,19 @@ export function EmbeddedSessionThemeMixin(pluginManager) {
78
78
  .actions(self => ({
79
79
  /**
80
80
  * #action
81
- * Point the session at light or dark. One write, not two: the `theme`
82
- * slot is what `themeOptions` ships to the renderer, so the labels baked
83
- * in the worker follow it, and `palette` is derived from the same slot,
84
- * so what React draws follows it too. An embedder who sets only a
85
- * React-side palette leaves the baked labels behind.
81
+ * Switch the session to light or dark. `themeOptions` sends the `theme`
82
+ * slot to the renderer, so labels drawn in the worker follow it, and
83
+ * `palette` is derived from the same slot, so React-drawn elements
84
+ * follow it too. An embedder who sets only a React-side palette leaves
85
+ * the worker-drawn labels in the old mode.
86
86
  *
87
- * Merges rather than replaces, at both levels. `theme` is a frozen slot,
88
- * so a bare `setConf(session, 'theme', { palette: { mode } })` — the
89
- * obvious form, and what the build-your-own examples each wrote — drops
90
- * every other key in it. That silently discards whatever the host passed
91
- * as `createViewState`'s `configuration.theme` (a brand `primary`, say)
92
- * the first time their dark-mode toggle fires. `resolvePalette` spreads
87
+ * Merges into the existing theme at both levels. `theme` is a frozen
88
+ * slot, so `setConf(session, 'theme', { palette: { mode } })` replaces
89
+ * every other key in it, discarding whatever the host passed as
90
+ * `createViewState`'s `configuration.theme` (a brand `primary`, say) the
91
+ * first time their dark-mode toggle fires. `resolvePalette` spreads
93
92
  * `configTheme.palette` over the preset shallowly, so `mode` and
94
- * `primary` are siblings and both levels have to survive.
93
+ * `primary` are siblings and both levels have to be kept.
95
94
  */
96
95
  setThemeMode(mode) {
97
96
  const theme = getConf(self, 'theme') ?? {};
@@ -32,120 +32,125 @@ export declare function createEmbeddedRootModel<SESSION extends IAnyModelType &
32
32
  configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
33
33
  readonly rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
34
34
  readonly defaultDriver: {
35
- readonly type: "string";
36
- readonly description: "the RPC driver to run data fetching on: MainThreadRpcDriver or WebWorkerRpcDriver. Leave empty to use the default for this application";
37
- readonly defaultValue: "";
38
- readonly advanced: true;
35
+ type: "string";
36
+ } & {
37
+ defaultValue: string;
39
38
  };
40
39
  readonly workerCount: {
41
- readonly type: "number";
42
- readonly description: "The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.";
43
- readonly defaultValue: 0;
44
- readonly advanced: true;
40
+ type: "number";
41
+ } & {
42
+ defaultValue: number;
45
43
  };
46
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
44
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
47
45
  readonly hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
48
46
  readonly sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
49
47
  readonly trackNames: {
50
- readonly type: "boolean";
51
- readonly defaultValue: false;
48
+ type: "boolean";
49
+ } & {
50
+ defaultValue: boolean;
52
51
  };
53
52
  readonly categories: {
54
- readonly type: "boolean";
55
- readonly defaultValue: false;
53
+ type: "boolean";
54
+ } & {
55
+ defaultValue: boolean;
56
56
  };
57
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
57
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
58
58
  readonly defaultFolderCategories: {
59
- readonly type: "stringArray";
60
- readonly description: "list of category names to display as folders by default";
61
- readonly defaultValue: readonly [];
59
+ type: "stringArray";
60
+ } & {
61
+ defaultValue: unknown;
62
62
  };
63
63
  readonly defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
64
64
  readonly categoryNames: {
65
- readonly type: "stringArray";
66
- readonly defaultValue: readonly [];
65
+ type: "stringArray";
66
+ } & {
67
+ defaultValue: unknown;
67
68
  };
68
69
  readonly topLevelCategories: {
69
- readonly type: "boolean";
70
- readonly defaultValue: false;
70
+ type: "boolean";
71
+ } & {
72
+ defaultValue: boolean;
71
73
  };
72
74
  readonly subCategories: {
73
- readonly type: "boolean";
74
- readonly defaultValue: false;
75
+ type: "boolean";
76
+ } & {
77
+ defaultValue: boolean;
75
78
  };
76
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
77
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
79
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
80
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
78
81
  readonly preferences: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
79
82
  readonly animationMode: {
80
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
81
- readonly type: "stringEnum";
82
- readonly defaultValue: "enabled";
83
+ type: "stringEnum";
84
+ } & {
85
+ model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
86
+ } & {
87
+ defaultValue: string;
83
88
  };
84
89
  readonly scrollZoom: {
85
- readonly type: "boolean";
86
- readonly defaultValue: false;
90
+ type: "boolean";
91
+ } & {
92
+ defaultValue: boolean;
87
93
  };
88
94
  readonly numberGrouping: {
89
- readonly type: "boolean";
90
- readonly defaultValue: true;
95
+ type: "boolean";
96
+ } & {
97
+ defaultValue: boolean;
91
98
  };
92
99
  readonly useWorkspaces: {
93
- readonly type: "boolean";
94
- readonly defaultValue: false;
100
+ type: "boolean";
101
+ } & {
102
+ defaultValue: boolean;
95
103
  };
96
104
  readonly developerMode: {
97
- readonly type: "boolean";
98
- readonly defaultValue: false;
105
+ type: "boolean";
106
+ } & {
107
+ defaultValue: boolean;
99
108
  };
100
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
109
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
101
110
  readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
102
111
  readonly feature: {
103
- readonly type: "frozen";
104
- readonly description: "adds extra fields to the feature details";
105
- readonly defaultValue: {};
106
- readonly contextVariable: ["feature"];
112
+ type: "frozen";
113
+ } & {
114
+ defaultValue: unknown;
107
115
  };
108
116
  readonly subfeatures: {
109
- readonly type: "frozen";
110
- readonly description: "adds extra fields to the subfeatures of a feature";
111
- readonly defaultValue: {};
112
- readonly contextVariable: ["feature"];
117
+ type: "frozen";
118
+ } & {
119
+ defaultValue: unknown;
113
120
  };
114
121
  readonly depth: {
115
- readonly type: "maybeNumber";
116
- readonly description: "levels of subfeature the formatDetails.subfeatures callback runs on, default 2";
122
+ type: "maybeNumber";
117
123
  };
118
124
  readonly maxDepth: {
119
- readonly type: "maybeNumber";
120
- readonly description: "hide subfeatures nested deeper than this, default no limit";
125
+ type: "maybeNumber";
121
126
  };
122
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
127
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
123
128
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
124
129
  readonly config: {
125
- readonly type: "frozen";
126
- readonly description: "formats configuration object in about dialog";
127
- readonly defaultValue: {};
128
- readonly contextVariable: ["config"];
130
+ type: "frozen";
131
+ } & {
132
+ defaultValue: unknown;
129
133
  };
130
134
  readonly hideUris: {
131
- readonly type: "boolean";
132
- readonly defaultValue: false;
135
+ type: "boolean";
136
+ } & {
137
+ defaultValue: boolean;
133
138
  };
134
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
139
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
135
140
  readonly theme: {
136
- readonly type: "frozen";
137
- readonly defaultValue: {};
141
+ type: "frozen";
142
+ } & {
143
+ defaultValue: unknown;
138
144
  };
139
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
140
- assembly: import("@jbrowse/mobx-state-tree").IAnyType;
141
- tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
145
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
146
+ assemblies: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
147
+ tracks: import("@jbrowse/mobx-state-tree").IType<Record<string, unknown>[] | null | undefined, Record<string, unknown>[], Record<string, unknown>[]>;
142
148
  internetAccounts: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
143
149
  connections: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
144
150
  aggregateTextSearchAdapters: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
145
151
  plugins: import("@jbrowse/mobx-state-tree").IType<any, any, any>;
146
152
  }, {
147
- readonly assemblies: any[];
148
- readonly assemblyName: string;
153
+ readonly assemblyNames: string[];
149
154
  readonly rpcManager: RpcManager;
150
155
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
151
156
  /**
@@ -644,10 +649,7 @@ export declare function createEmbeddedRootModel<SESSION extends IAnyModelType &
644
649
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
645
650
  readonly assemblyNamesList: string[];
646
651
  readonly configuredAssemblyNames: Set<string>;
647
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
648
- setSubschema(slotName: string, data: Record<string, unknown>): any;
649
- setSlot(slotName: string, value: unknown): void;
650
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
652
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
651
653
  readonly rpcManager: RpcManager;
652
654
  } & {
653
655
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -995,120 +997,125 @@ export declare function createEmbeddedRootModel<SESSION extends IAnyModelType &
995
997
  configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
996
998
  readonly rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
997
999
  readonly defaultDriver: {
998
- readonly type: "string";
999
- readonly description: "the RPC driver to run data fetching on: MainThreadRpcDriver or WebWorkerRpcDriver. Leave empty to use the default for this application";
1000
- readonly defaultValue: "";
1001
- readonly advanced: true;
1000
+ type: "string";
1001
+ } & {
1002
+ defaultValue: string;
1002
1003
  };
1003
1004
  readonly workerCount: {
1004
- readonly type: "number";
1005
- readonly description: "The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.";
1006
- readonly defaultValue: 0;
1007
- readonly advanced: true;
1005
+ type: "number";
1006
+ } & {
1007
+ defaultValue: number;
1008
1008
  };
1009
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1009
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1010
1010
  readonly hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1011
1011
  readonly sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1012
1012
  readonly trackNames: {
1013
- readonly type: "boolean";
1014
- readonly defaultValue: false;
1013
+ type: "boolean";
1014
+ } & {
1015
+ defaultValue: boolean;
1015
1016
  };
1016
1017
  readonly categories: {
1017
- readonly type: "boolean";
1018
- readonly defaultValue: false;
1018
+ type: "boolean";
1019
+ } & {
1020
+ defaultValue: boolean;
1019
1021
  };
1020
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1022
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1021
1023
  readonly defaultFolderCategories: {
1022
- readonly type: "stringArray";
1023
- readonly description: "list of category names to display as folders by default";
1024
- readonly defaultValue: readonly [];
1024
+ type: "stringArray";
1025
+ } & {
1026
+ defaultValue: unknown;
1025
1027
  };
1026
1028
  readonly defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1027
1029
  readonly categoryNames: {
1028
- readonly type: "stringArray";
1029
- readonly defaultValue: readonly [];
1030
+ type: "stringArray";
1031
+ } & {
1032
+ defaultValue: unknown;
1030
1033
  };
1031
1034
  readonly topLevelCategories: {
1032
- readonly type: "boolean";
1033
- readonly defaultValue: false;
1035
+ type: "boolean";
1036
+ } & {
1037
+ defaultValue: boolean;
1034
1038
  };
1035
1039
  readonly subCategories: {
1036
- readonly type: "boolean";
1037
- readonly defaultValue: false;
1040
+ type: "boolean";
1041
+ } & {
1042
+ defaultValue: boolean;
1038
1043
  };
1039
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1040
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1044
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1045
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1041
1046
  readonly preferences: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1042
1047
  readonly animationMode: {
1043
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
1044
- readonly type: "stringEnum";
1045
- readonly defaultValue: "enabled";
1048
+ type: "stringEnum";
1049
+ } & {
1050
+ model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
1051
+ } & {
1052
+ defaultValue: string;
1046
1053
  };
1047
1054
  readonly scrollZoom: {
1048
- readonly type: "boolean";
1049
- readonly defaultValue: false;
1055
+ type: "boolean";
1056
+ } & {
1057
+ defaultValue: boolean;
1050
1058
  };
1051
1059
  readonly numberGrouping: {
1052
- readonly type: "boolean";
1053
- readonly defaultValue: true;
1060
+ type: "boolean";
1061
+ } & {
1062
+ defaultValue: boolean;
1054
1063
  };
1055
1064
  readonly useWorkspaces: {
1056
- readonly type: "boolean";
1057
- readonly defaultValue: false;
1065
+ type: "boolean";
1066
+ } & {
1067
+ defaultValue: boolean;
1058
1068
  };
1059
1069
  readonly developerMode: {
1060
- readonly type: "boolean";
1061
- readonly defaultValue: false;
1070
+ type: "boolean";
1071
+ } & {
1072
+ defaultValue: boolean;
1062
1073
  };
1063
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1074
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1064
1075
  readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1065
1076
  readonly feature: {
1066
- readonly type: "frozen";
1067
- readonly description: "adds extra fields to the feature details";
1068
- readonly defaultValue: {};
1069
- readonly contextVariable: ["feature"];
1077
+ type: "frozen";
1078
+ } & {
1079
+ defaultValue: unknown;
1070
1080
  };
1071
1081
  readonly subfeatures: {
1072
- readonly type: "frozen";
1073
- readonly description: "adds extra fields to the subfeatures of a feature";
1074
- readonly defaultValue: {};
1075
- readonly contextVariable: ["feature"];
1082
+ type: "frozen";
1083
+ } & {
1084
+ defaultValue: unknown;
1076
1085
  };
1077
1086
  readonly depth: {
1078
- readonly type: "maybeNumber";
1079
- readonly description: "levels of subfeature the formatDetails.subfeatures callback runs on, default 2";
1087
+ type: "maybeNumber";
1080
1088
  };
1081
1089
  readonly maxDepth: {
1082
- readonly type: "maybeNumber";
1083
- readonly description: "hide subfeatures nested deeper than this, default no limit";
1090
+ type: "maybeNumber";
1084
1091
  };
1085
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1092
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1086
1093
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1087
1094
  readonly config: {
1088
- readonly type: "frozen";
1089
- readonly description: "formats configuration object in about dialog";
1090
- readonly defaultValue: {};
1091
- readonly contextVariable: ["config"];
1095
+ type: "frozen";
1096
+ } & {
1097
+ defaultValue: unknown;
1092
1098
  };
1093
1099
  readonly hideUris: {
1094
- readonly type: "boolean";
1095
- readonly defaultValue: false;
1100
+ type: "boolean";
1101
+ } & {
1102
+ defaultValue: boolean;
1096
1103
  };
1097
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1104
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1098
1105
  readonly theme: {
1099
- readonly type: "frozen";
1100
- readonly defaultValue: {};
1106
+ type: "frozen";
1107
+ } & {
1108
+ defaultValue: unknown;
1101
1109
  };
1102
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
1103
- assembly: import("@jbrowse/mobx-state-tree").IAnyType;
1104
- tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
1110
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
1111
+ assemblies: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
1112
+ tracks: import("@jbrowse/mobx-state-tree").IType<Record<string, unknown>[] | null | undefined, Record<string, unknown>[], Record<string, unknown>[]>;
1105
1113
  internetAccounts: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
1106
1114
  connections: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
1107
1115
  aggregateTextSearchAdapters: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
1108
1116
  plugins: import("@jbrowse/mobx-state-tree").IType<any, any, any>;
1109
1117
  }, {
1110
- readonly assemblies: any[];
1111
- readonly assemblyName: string;
1118
+ readonly assemblyNames: string[];
1112
1119
  readonly rpcManager: RpcManager;
1113
1120
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
1114
1121
  /**
@@ -1607,10 +1614,7 @@ export declare function createEmbeddedRootModel<SESSION extends IAnyModelType &
1607
1614
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
1608
1615
  readonly assemblyNamesList: string[];
1609
1616
  readonly configuredAssemblyNames: Set<string>;
1610
- readonly assemblyList: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
1611
- setSubschema(slotName: string, data: Record<string, unknown>): any;
1612
- setSlot(slotName: string, value: unknown): void;
1613
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
1617
+ readonly assemblyList: import("@jbrowse/core/configuration").AnyConfigurationModel[];
1614
1618
  readonly rpcManager: RpcManager;
1615
1619
  } & {
1616
1620
  settleAssemblyResolution(assemblyName: string): Promise<void>;
@@ -1,26 +1,26 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense } from 'react';
3
3
  import { getSession } from '@jbrowse/core/util';
4
- import { useWidthSetter } from '@jbrowse/core/util/hooks';
4
+ import { VIEW_HEADER_HEIGHT_VAR, useWidthSetter, } from '@jbrowse/core/util/hooks';
5
5
  import { makeStyles } from '@jbrowse/core/util/tss-react';
6
- import { Paper } from '@mui/material';
7
6
  import { observer } from 'mobx-react';
8
- import ViewTitle from './ViewTitle.js';
9
7
  const useStyles = makeStyles()(theme => ({
10
8
  viewContainer: {
11
9
  width: '100%',
12
10
  // clip (not hidden) so sticky descendant headers keep working
13
- // xref https://stackoverflow.com/questions/43909940/why-does-overflowhidden-prevent-positionsticky-from-working
14
11
  overflow: 'clip',
15
- background: theme.palette.secondary.main,
16
- margin: theme.spacing(0.5),
17
- padding: `0 ${theme.spacing(1)} ${theme.spacing(1)}`,
12
+ background: theme.palette.background.paper,
13
+ border: `1px solid ${theme.palette.divider}`,
14
+ borderRadius: theme.shape.borderRadius,
15
+ // no title bar above the view, so the sticky chrome that clears one pins
16
+ // at the top edge
17
+ [VIEW_HEADER_HEIGHT_VAR]: '0px',
18
18
  },
19
19
  }));
20
20
  const ViewContainer = observer(function ViewContainer({ view, children, }) {
21
21
  const { classes } = useStyles();
22
22
  const session = getSession(view);
23
23
  const ref = useWidthSetter(view);
24
- return (_jsxs(Paper, { elevation: 12, ref: ref, className: classes.viewContainer, children: [session.DialogComponent ? (_jsx(Suspense, { fallback: null, children: _jsx(session.DialogComponent, { ...session.DialogProps }) })) : null, _jsx(ViewTitle, { view: view }), _jsx(Paper, { children: children })] }));
24
+ return (_jsxs("div", { ref: ref, className: classes.viewContainer, children: [session.DialogComponent ? (_jsx(Suspense, { fallback: null, children: _jsx(session.DialogComponent, { ...session.DialogProps }) })) : null, children] }));
25
25
  });
26
26
  export default ViewContainer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/embedded-core",
3
- "version": "5.0.0-beta.7",
3
+ "version": "5.0.0-beta.9",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 code shared between embedded products",
6
6
  "keywords": [
@@ -24,13 +24,13 @@
24
24
  "esm"
25
25
  ],
26
26
  "dependencies": {
27
- "@jbrowse/mobx-state-tree": "^6.5.1",
27
+ "@jbrowse/mobx-state-tree": "^6.5.2",
28
28
  "@mui/icons-material": "^9.4.0",
29
29
  "@mui/material": "^9.4.0",
30
30
  "mobx": "^7.0.3",
31
31
  "mobx-react": "^10.0.2",
32
- "@jbrowse/core": "^5.0.0-beta.7",
33
- "@jbrowse/product-core": "^5.0.0-beta.7"
32
+ "@jbrowse/core": "^5.0.0-beta.9",
33
+ "@jbrowse/product-core": "^5.0.0-beta.9"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": ">=19.0.0",
@@ -1,5 +0,0 @@
1
- export default function AboutDialog({ open, version, onClose, }: {
2
- open: boolean;
3
- version: string;
4
- onClose: () => void;
5
- }): import("react").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExternalLink, InfoDialog } from '@jbrowse/core/ui';
3
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- import { Typography } from '@mui/material';
5
- const useStyles = makeStyles()({
6
- content: {
7
- minWidth: 800,
8
- },
9
- });
10
- export default function AboutDialog({ open, version, onClose, }) {
11
- const { classes } = useStyles();
12
- return (_jsx(InfoDialog, { open: open, onClose: onClose, maxWidth: "xl", title: `JBrowse v${version}`, children: _jsxs("div", { className: classes.content, children: [_jsx(Typography, { children: "JBrowse is a GMOD project \u00A9 2019-2026, The Evolutionary Software Foundation" }), _jsx(Typography, { children: "Here are some resources and documentation. Please report the version number above when asking questions. Thanks!" }), _jsxs("ul", { children: [_jsx("li", { children: _jsx(ExternalLink, { href: "https://github.com/GMOD/jbrowse-components/discussions", children: "Question & answer forum" }) }), _jsx("li", { children: _jsx(ExternalLink, { href: "https://github.com/GMOD/jbrowse-components/issues/new/choose", children: "Report a bug" }) }), _jsx("li", { children: _jsx(ExternalLink, { href: "https://jbrowse.org/jb2/docs/user_guide", children: "User guide" }) }), _jsx("li", { children: _jsx(ExternalLink, { href: "https://jbrowse.org/jb2/docs/", children: "Documentation" }) })] })] }) }));
13
- }
@@ -1,5 +0,0 @@
1
- import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
2
- declare const ViewTitle: ({ view, }: {
3
- view: IBaseViewModel;
4
- }) => import("react").JSX.Element;
5
- export default ViewTitle;
@@ -1,65 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Suspense, lazy, useRef, useState } from 'react';
3
- import { CascadingMenuButton, Logomark, VIEW_HEADER_HEIGHT, } from '@jbrowse/core/ui';
4
- import { getSession } from '@jbrowse/core/util';
5
- import { VIEW_HEADER_HEIGHT_VAR, useChromeHeightVar, } from '@jbrowse/core/util/hooks';
6
- import { makeStyles } from '@jbrowse/core/util/tss-react';
7
- import MenuIcon from '@mui/icons-material/Menu';
8
- import { IconButton, Typography, alpha } from '@mui/material';
9
- import { observer } from 'mobx-react';
10
- const VersionAboutDialog = lazy(() => import('./VersionAboutDialog.js'));
11
- const useStyles = makeStyles()(theme => ({
12
- icon: {
13
- color: theme.palette.secondary.contrastText,
14
- },
15
- displayName: {
16
- marginTop: 2,
17
- color: theme.palette.secondary.contrastText,
18
- },
19
- grow: {
20
- flexGrow: 1,
21
- },
22
- container: {
23
- display: 'flex',
24
- alignItems: 'center',
25
- // A fixed height, unlike the web app's view header, which is a floor. Both
26
- // publish what they measure through `useChromeHeightVar`, so what sticks
27
- // below follows either — this is a density choice and no longer a
28
- // load-bearing constant. It stays fixed because the content that would
29
- // widen the box is the logomark button, whose 22px icon and 5px padding
30
- // want 32: a floor here spends 4px of an embedder's box to stop that button
31
- // painting 2px outside a bar nothing clips.
32
- height: VIEW_HEADER_HEIGHT,
33
- top: 0,
34
- zIndex: 900,
35
- // a sticky element does not carry its parent's background, and what would
36
- // otherwise show through is the tracks scrolling underneath
37
- background: theme.palette.secondary.main,
38
- },
39
- iconRoot: {
40
- '&:hover': {
41
- backgroundColor: alpha(theme.palette.secondary.contrastText, theme.palette.action.hoverOpacity),
42
- '@media (hover: none)': {
43
- backgroundColor: 'transparent',
44
- },
45
- },
46
- },
47
- }));
48
- const ViewTitle = observer(function ViewTitle({ view, }) {
49
- const { classes } = useStyles();
50
- const { displayName } = view;
51
- const [dialogOpen, setDialogOpen] = useState(false);
52
- const session = getSession(view);
53
- // `=== true` because the member is optional on AbstractSessionModel: a
54
- // session with no such notion reads as "don't pin", which is what the LGV
55
- // model's own getter does with it too
56
- const stickyViewHeaders = session.stickyViewHeaders === true;
57
- const ref = useRef(null);
58
- useChromeHeightVar(ref, VIEW_HEADER_HEIGHT_VAR);
59
- return (_jsxs("div", { ref: ref, className: classes.container, style: { position: stickyViewHeaders ? 'sticky' : undefined }, children: [_jsx(CascadingMenuButton, { menuItems: () => view.menuItems(), "data-testid": "view_menu_icon", classes: { root: classes.iconRoot }, edge: "start", children: _jsx(MenuIcon, { className: classes.icon }) }), _jsx("div", { className: classes.grow }), displayName ? (_jsx(Typography, { variant: "body2", className: classes.displayName, children: displayName })) : null, _jsx("div", { className: classes.grow }), _jsx(IconButton, { onClick: () => {
60
- setDialogOpen(true);
61
- }, children: _jsx("div", { style: { width: 22, height: 22 }, children: _jsx(Logomark, { variant: "white" }) }) }), dialogOpen ? (_jsx(Suspense, { fallback: null, children: _jsx(VersionAboutDialog, { open: true, onClose: () => {
62
- setDialogOpen(false);
63
- }, version: session.version }) })) : null] }));
64
- });
65
- export default ViewTitle;