EmbeddedSessionThemeMixin
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Built into JBrowse core. View source.
Theme getters shared by the single-view embedded sessions
(react-linear-genome-view, react-circular-genome-view). Embedded products
have no theme picker, so the palette is always default and the config
theme slot supplies it; light or dark is the host's to drive, through
setThemeMode.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
7 inherited properties from one model
From BaseSessionModel: id, name, focusedViewId, highlights, highlightsVisible, highlightLabelsVisible, heldForMissingPlugins
Volatiles
| Member | Description |
|---|---|
sessionThemeModePaletteMode | undefined |
6 inherited volatiles from 2 models
From BaseSessionModel: selection, hovered, queueOfDialogs, preferencesOverrides
Getters
| Member | Description |
|---|---|
themeOptionsSerializableThemeArgs | Serializable theme description (the canonical themeOptions contract shared with the app-core/web sessions). This is what crosses the RPC worker boundary — e.g. the canvas display reads getSession(self).themeOptions in its rpcProps so worker-baked colors (CDS frames, stroke fallback) honor the config theme slot. |
paletteJBrowsePalette | Every color JBrowse renders, resolved to plain strings and free of any UI toolkit. This is what rendering reads. See the canonical ThemeManagerSessionMixin getter of the same name. |
styleThemeJBrowseStyleTheme | The palette plus the sizing tokens makeStyles reads. See the canonical ThemeManagerSessionMixin getter of the same name. |
themeTheme | Resolved MUI theme, mirroring the product's ThemeProvider. Lets headless/RPC consumers derive theme-dependent state without a mounted component. Shares its colors with palette by construction. |
13 inherited getters from 2 models
From BaseSessionModel: root, jbrowse, rpcManager, configuration, adminMode, textSearchManager, assemblies, DialogComponent, DialogProps, animationMode, scrollZoom, numberGrouping
Methods
| Member | Description |
|---|---|
getActiveThemeOptions(_name?: string | undefined) => ThemeOptions | undefined | Raw ThemeOptions for the active theme, which every view's SVG export threads into each display's renderSvg as a configTheme and rebuilds outside React. The config slot is the whole answer here because it is the whole of an embedded product's theming: no picker, no allThemes, and it is what setThemeMode writes and palette resolves from. name is accepted and ignored — the app session's counterpart looks a named preset up in allThemes(). |
3 inherited methods from one model
From BaseSessionModel: getPreferenceDefault, getPreference, getPreferenceChanges
Actions
| Member | Description |
|---|---|
setThemeMode(mode: PaletteMode) => void | Switch the session to light or dark, leaving the host's configured colors alone. themeOptions carries the mode to the renderer, so labels drawn in the worker follow it, and palette is derived from the same args, so React-drawn elements follow it too. An embedder who sets only a React-side palette leaves the worker-drawn labels in the old mode.This used to write palette.mode into the config theme slot, which meant merging at two levels to avoid discarding the brand the host had passed to createViewState. Mode is its own axis now, so there is nothing to merge and nothing to discard. |
24 inherited actions from 2 models
From BaseSessionModel: setSelection, clearSelection, setHovered, setHighlightsVisible, setHighlightLabelsVisible, addHighlight, removeHighlight, updateHighlight, setHighlights, setPreferenceOverride, clearPreferenceOverrides, clearPreferenceOverride, setScrollZoom, setName, setFocusedViewId, removeActiveDialog, queueDialog, removeDialog
From SnackbarModel: notify, notifyError, setErrorDialog, pushSnackbarMessage, popSnackbarMessage, removeSnackbarMessage