@jbrowse/app-core 5.0.0-beta.11 → 5.0.0-beta.14
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/AppSession/AppSessionMixin.d.ts +110 -92
- package/esm/Assemblies/AssembliesMixin.d.ts +30 -0
- package/esm/HistoryManagement/index.d.ts +2 -0
- package/esm/HistoryManagement/index.js +2 -0
- package/esm/JBrowseConfig/RootConfiguration.d.ts +4 -10
- package/esm/JBrowseConfig/RootConfiguration.js +5 -8
- package/esm/JBrowseConfig/index.d.ts +3 -11
- package/esm/JBrowseConfig/index.js +2 -3
- package/esm/JBrowseModel/index.d.ts +10 -9
- package/esm/JBrowseModel/index.js +8 -7
- package/esm/JbApi/jbApi.d.ts +2 -2
- package/esm/JbApi/jbApi.js +16 -11
- package/esm/RootMenu/index.d.ts +2 -0
- package/esm/RootMenu/index.js +2 -0
- package/esm/SessionSpec/index.d.ts +2 -2
- package/esm/SessionSpec/index.js +1 -1
- package/esm/SessionSpec/loadSessionSpec.js +2 -12
- package/esm/SessionSpec/parseSessionSpecUrl.d.ts +19 -0
- package/esm/SessionSpec/parseSessionSpecUrl.js +29 -0
- package/esm/WorkspaceLayout/LayoutRenderer.d.ts +0 -10
- package/esm/WorkspaceLayout/LayoutRenderer.js +34 -101
- package/esm/WorkspaceLayout/PanelView.js +19 -45
- package/esm/WorkspaceLayout/TabStrip.d.ts +2 -2
- package/esm/WorkspaceLayout/TabStrip.js +36 -104
- package/esm/WorkspaceLayout/WorkspaceContainer.d.ts +0 -9
- package/esm/WorkspaceLayout/WorkspaceContainer.js +9 -42
- package/esm/WorkspaceLayout/WorkspacePanelActions.d.ts +1 -16
- package/esm/WorkspaceLayout/WorkspacePanelActions.js +46 -51
- package/esm/WorkspaceLayout/WorkspaceTab.d.ts +3 -19
- package/esm/WorkspaceLayout/WorkspaceTab.js +12 -48
- package/esm/WorkspaceLayout/dropZone.d.ts +7 -37
- package/esm/WorkspaceLayout/dropZone.js +7 -44
- package/esm/WorkspaceLayout/model.d.ts +45 -120
- package/esm/WorkspaceLayout/model.js +145 -303
- package/esm/WorkspaceLayout/panelChrome.d.ts +4 -7
- package/esm/WorkspaceLayout/panelChrome.js +0 -2
- package/esm/WorkspaceLayout/spec.d.ts +10 -51
- package/esm/WorkspaceLayout/spec.js +12 -80
- package/esm/WorkspaceLayout/splitter.d.ts +3 -19
- package/esm/WorkspaceLayout/splitter.js +5 -21
- package/esm/WorkspaceLayout/tabName.d.ts +8 -0
- package/esm/WorkspaceLayout/tabName.js +14 -0
- package/esm/WorkspaceLayout/tree.d.ts +19 -79
- package/esm/WorkspaceLayout/tree.js +34 -131
- package/esm/WorkspaceLayout/useLayoutDrag.d.ts +4 -22
- package/esm/WorkspaceLayout/useLayoutDrag.js +55 -177
- package/esm/WorkspaceLayout/usePointerGesture.d.ts +24 -0
- package/esm/WorkspaceLayout/usePointerGesture.js +83 -0
- package/esm/WorkspaceLayout/workspaceTheme.d.ts +27 -0
- package/esm/WorkspaceLayout/workspaceTheme.js +37 -0
- package/esm/index.d.ts +5 -3
- package/esm/index.js +3 -2
- package/esm/queryParams.d.ts +2 -0
- package/esm/queryParams.js +16 -5
- package/esm/sessionSummary.d.ts +16 -0
- package/esm/sessionSummary.js +57 -0
- package/esm/ui/App/App.js +3 -0
- package/esm/ui/App/DrawerHeaderHelpDialog.d.ts +3 -2
- package/esm/ui/App/DrawerHeaderHelpDialog.js +4 -2
- package/esm/ui/App/JBrowseTabMenu.d.ts +3 -2
- package/esm/ui/App/JBrowseTabMenu.js +5 -3
- package/esm/ui/App/ThemeModeButton.d.ts +4 -5
- package/esm/ui/App/ThemeModeButton.js +22 -14
- package/esm/ui/App/ViewContainer.js +7 -1
- package/esm/ui/App/ViewMenu.js +69 -42
- package/esm/ui/App/ViewWrapper.js +2 -2
- package/esm/ui/App/ViewsContainer.js +3 -4
- package/esm/ui/App/lazyParts.d.ts +0 -5
- package/esm/ui/App/lazyParts.js +0 -1
- package/esm/ui/App/preloadAppShell.js +3 -6
- package/esm/ui/App/types.d.ts +3 -2
- package/esm/ui/App/viewTitle.d.ts +6 -1
- package/esm/ui/App/viewTitle.js +7 -2
- package/package.json +7 -7
- package/esm/WorkspaceLayout/dockviewTheme.d.ts +0 -69
- package/esm/WorkspaceLayout/dockviewTheme.js +0 -82
- package/esm/ui/App/ClassicViewsContainer.d.ts +0 -6
- package/esm/ui/App/ClassicViewsContainer.js +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense } from 'react';
|
|
3
|
+
import { ViewLoadingScreen } from '@jbrowse/core/ui';
|
|
3
4
|
import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
|
|
4
|
-
import LoadingEllipses from '@jbrowse/core/ui/LoadingEllipses';
|
|
5
5
|
import { getEnv } from '@jbrowse/core/util';
|
|
6
6
|
import { observer } from 'mobx-react';
|
|
7
7
|
import ViewErrorFallback from './ViewErrorFallback.js';
|
|
@@ -12,7 +12,7 @@ import ViewErrorFallback from './ViewErrorFallback.js';
|
|
|
12
12
|
const ViewComponent = observer(function ViewComponent({ view, session, }) {
|
|
13
13
|
const { pluginManager } = getEnv(session);
|
|
14
14
|
const { ReactComponent } = pluginManager.getViewType(view.type);
|
|
15
|
-
return (_jsx(Suspense, { fallback: _jsx(
|
|
15
|
+
return (_jsx(Suspense, { fallback: _jsx("div", { "data-view-component-pending": "true", children: _jsx(ViewLoadingScreen, {}) }), children: _jsx(ReactComponent, { model: view, session: session }) }));
|
|
16
16
|
});
|
|
17
17
|
/**
|
|
18
18
|
* A view's body, and the boundary that keeps a view that throws from being an
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Suspense } from 'react';
|
|
3
3
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
import {
|
|
6
|
-
import { ClassicViewsContainer, ViewLauncher, WorkspaceContainer, } from './lazyParts.js';
|
|
5
|
+
import { ViewLauncher, WorkspaceContainer } from './lazyParts.js';
|
|
7
6
|
const useStyles = makeStyles()({
|
|
8
7
|
viewsContainer: {
|
|
9
8
|
gridRow: 'components',
|
|
@@ -11,8 +10,8 @@ const useStyles = makeStyles()({
|
|
|
11
10
|
},
|
|
12
11
|
});
|
|
13
12
|
const ViewsContainer = observer(function ViewsContainer({ session, }) {
|
|
14
|
-
const { views
|
|
13
|
+
const { views } = session;
|
|
15
14
|
const { classes } = useStyles();
|
|
16
|
-
return (_jsx("div", { className: classes.viewsContainer, children: _jsx(Suspense, { fallback: null, children: views.length > 0 ? (
|
|
15
|
+
return (_jsx("div", { className: classes.viewsContainer, children: _jsx(Suspense, { fallback: null, children: views.length > 0 ? (_jsx(WorkspaceContainer, { session: session })) : (_jsx(ViewLauncher, { session: session })) }) }));
|
|
17
16
|
});
|
|
18
17
|
export default ViewsContainer;
|
|
@@ -7,11 +7,6 @@ export declare const DrawerWidget: import("react").LazyExoticComponent<({ sessio
|
|
|
7
7
|
}) => import("react").JSX.Element;
|
|
8
8
|
}>;
|
|
9
9
|
};
|
|
10
|
-
export declare const ClassicViewsContainer: import("react").LazyExoticComponent<({ session, }: import("./ClassicViewsContainer.tsx").ClassicViewsContainerProps) => import("react").JSX.Element> & {
|
|
11
|
-
preload: () => Promise<{
|
|
12
|
-
default: ({ session, }: import("./ClassicViewsContainer.tsx").ClassicViewsContainerProps) => import("react").JSX.Element;
|
|
13
|
-
}>;
|
|
14
|
-
};
|
|
15
10
|
export declare const WorkspaceContainer: import("react").LazyExoticComponent<({ session, }: {
|
|
16
11
|
session: import("@jbrowse/core/util").SessionWithFocusedViewAndDrawerWidgets & import("../../index.ts").WorkspaceLayout;
|
|
17
12
|
}) => import("react").JSX.Element> & {
|
package/esm/ui/App/lazyParts.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { lazyWithPreload } from '@jbrowse/core/util/lazyWithPreload';
|
|
2
2
|
import { lazyChunk } from './lazyChunk.js';
|
|
3
3
|
export const DrawerWidget = lazyWithPreload(lazyChunk('DrawerWidget', () => import('./DrawerWidget.js')));
|
|
4
|
-
export const ClassicViewsContainer = lazyWithPreload(lazyChunk('ClassicViewsContainer', () => import('./ClassicViewsContainer.js')));
|
|
5
4
|
export const WorkspaceContainer = lazyWithPreload(lazyChunk('WorkspaceContainer', () => import('../../WorkspaceLayout/WorkspaceContainer.js').then(m => ({
|
|
6
5
|
default: m.WorkspaceContainer,
|
|
7
6
|
}))));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { preloadComponent } from '@jbrowse/core/util/preloadComponent';
|
|
2
2
|
import { getEnv } from '@jbrowse/mobx-state-tree';
|
|
3
|
-
import {
|
|
4
|
-
import { ClassicViewsContainer, DrawerWidget, WorkspaceContainer, } from './lazyParts.js';
|
|
3
|
+
import { DrawerWidget, WorkspaceContainer } from './lazyParts.js';
|
|
5
4
|
/**
|
|
6
5
|
* Load the views container and the drawer while the session's own view code
|
|
7
6
|
* downloads, settling when both have. An app that renders after this renders
|
|
@@ -10,7 +9,7 @@ import { ClassicViewsContainer, DrawerWidget, WorkspaceContainer, } from './lazy
|
|
|
10
9
|
*/
|
|
11
10
|
export async function preloadAppFrame() {
|
|
12
11
|
await Promise.allSettled([
|
|
13
|
-
|
|
12
|
+
WorkspaceContainer.preload(),
|
|
14
13
|
DrawerWidget.preload(),
|
|
15
14
|
]);
|
|
16
15
|
}
|
|
@@ -21,9 +20,7 @@ export async function preloadAppFrame() {
|
|
|
21
20
|
*/
|
|
22
21
|
export function preloadAppShell(session) {
|
|
23
22
|
if (session.views.length > 0) {
|
|
24
|
-
preloadComponent(
|
|
25
|
-
? WorkspaceContainer
|
|
26
|
-
: ClassicViewsContainer);
|
|
23
|
+
preloadComponent(WorkspaceContainer);
|
|
27
24
|
}
|
|
28
25
|
const { drawerVisible, visibleWidget } = session;
|
|
29
26
|
if (drawerVisible) {
|
package/esm/ui/App/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceLayout } from '../../WorkspaceLayout/model.ts';
|
|
1
2
|
import type { Menu } from '../../menus.ts';
|
|
2
3
|
import type { ErrorDialogState, SnackbarMessage } from '@jbrowse/core/ui/SnackbarModel';
|
|
3
4
|
import type { SessionWithFocusedViewAndDrawerWidgets } from '@jbrowse/core/util';
|
|
@@ -6,15 +7,15 @@ export interface ThemeSwitchSession {
|
|
|
6
7
|
themeMode: 'light' | 'dark' | 'system';
|
|
7
8
|
effectiveThemeMode: 'light' | 'dark';
|
|
8
9
|
themeIsDark: boolean;
|
|
10
|
+
darkReaderDark: boolean;
|
|
9
11
|
systemThemeOverride?: 'light' | 'dark';
|
|
10
12
|
setSystemThemeOverride: (mode?: 'light' | 'dark') => void;
|
|
11
13
|
}
|
|
12
14
|
export type WorkspaceSessionType = SessionWithFocusedViewAndDrawerWidgets;
|
|
13
|
-
export type AppSession = WorkspaceSessionType & ThemeSwitchSession & {
|
|
15
|
+
export type AppSession = WorkspaceSessionType & WorkspaceLayout & ThemeSwitchSession & {
|
|
14
16
|
menus: () => Menu[];
|
|
15
17
|
errorDialog: ErrorDialogState | undefined;
|
|
16
18
|
setErrorDialog: (state: ErrorDialogState | undefined) => void;
|
|
17
|
-
effectiveUseWorkspaces: boolean;
|
|
18
19
|
renameCurrentSession: (arg: string) => void;
|
|
19
20
|
snackbarMessages: SnackbarMessage[];
|
|
20
21
|
popSnackbarMessage: () => unknown;
|
|
@@ -2,10 +2,15 @@ interface TitledView {
|
|
|
2
2
|
displayName?: string;
|
|
3
3
|
assemblyNames?: string[];
|
|
4
4
|
minimized?: boolean;
|
|
5
|
+
initialized?: boolean;
|
|
6
|
+
showImportForm?: boolean;
|
|
7
|
+
error?: unknown;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
7
10
|
* The view's own name, or its assemblies'. An emptied name counts as unset, so
|
|
8
|
-
* clearing the title in the header puts the derived one back.
|
|
11
|
+
* clearing the title in the header puts the derived one back. A view still
|
|
12
|
+
* resolving its assembly is not untitled, only unnamed so far, so it reads
|
|
13
|
+
* blank rather than "Untitled view" for the moment before its name arrives.
|
|
9
14
|
*/
|
|
10
15
|
export declare function viewName(view: TitledView, getDisplayName: (assemblyName: string) => string): string;
|
|
11
16
|
export declare function viewTitle(view: TitledView, getDisplayName: (assemblyName: string) => string): string;
|
package/esm/ui/App/viewTitle.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The view's own name, or its assemblies'. An emptied name counts as unset, so
|
|
3
|
-
* clearing the title in the header puts the derived one back.
|
|
3
|
+
* clearing the title in the header puts the derived one back. A view still
|
|
4
|
+
* resolving its assembly is not untitled, only unnamed so far, so it reads
|
|
5
|
+
* blank rather than "Untitled view" for the moment before its name arrives.
|
|
4
6
|
*/
|
|
5
7
|
export function viewName(view, getDisplayName) {
|
|
6
8
|
// assemblyNames is [] (not undefined) for a view with no displayed regions
|
|
7
9
|
// yet, so fall back on emptiness rather than nullishness
|
|
8
10
|
const assemblyNames = view.assemblyNames ?? [];
|
|
11
|
+
const launching = view.initialized === false && !view.showImportForm && !view.error;
|
|
9
12
|
return (view.displayName ||
|
|
10
13
|
(assemblyNames.length
|
|
11
14
|
? assemblyNames.map(r => getDisplayName(r)).join(', ')
|
|
12
|
-
:
|
|
15
|
+
: launching
|
|
16
|
+
? ''
|
|
17
|
+
: 'Untitled view'));
|
|
13
18
|
}
|
|
14
19
|
export function viewTitle(view, getDisplayName) {
|
|
15
20
|
const name = viewName(view, getDisplayName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/app-core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JBrowse 2 code shared between the 'full featured' apps e.g. jbrowse-web and jbrowse-desktop",
|
|
6
6
|
"keywords": [
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"esm"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jbrowse/mobx-state-tree": "^6.
|
|
28
|
-
"@mui/icons-material": "^9.
|
|
29
|
-
"@mui/material": "^9.
|
|
30
|
-
"mobx": "^7.0.
|
|
27
|
+
"@jbrowse/mobx-state-tree": "^6.9.0",
|
|
28
|
+
"@mui/icons-material": "^9.5.0",
|
|
29
|
+
"@mui/material": "^9.5.0",
|
|
30
|
+
"mobx": "^7.0.6",
|
|
31
31
|
"mobx-react": "^10.0.2",
|
|
32
|
-
"@jbrowse/core": "^5.0.0-beta.
|
|
33
|
-
"@jbrowse/product-core": "^5.0.0-beta.
|
|
32
|
+
"@jbrowse/core": "^5.0.0-beta.14",
|
|
33
|
+
"@jbrowse/product-core": "^5.0.0-beta.14"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": ">=19.0.0",
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* dockview's `dockview-theme-dark`, transcribed.
|
|
3
|
-
*
|
|
4
|
-
* We render the workspace ourselves now, but the look is deliberately not a new
|
|
5
|
-
* design — it is the theme we already shipped, so nothing about the chrome
|
|
6
|
-
* changed for users when the engine underneath it did. Every value below is
|
|
7
|
-
* copied from `dockview/dist/styles/dockview.css`'s `.dockview-theme-dark`
|
|
8
|
-
* block (v8.0.0); the names are its CSS custom properties with the `--dv-`
|
|
9
|
-
* prefix dropped.
|
|
10
|
-
*
|
|
11
|
-
* **Fixed, not theme-derived.** These apply in a light JBrowse theme too, the
|
|
12
|
-
* same way the app bar is dark in both — the chrome frames the content rather
|
|
13
|
-
* than matching it. Don't wire them to `theme.palette`: a light strip reads as
|
|
14
|
-
* content, which is exactly what it looked like before this file existed.
|
|
15
|
-
*
|
|
16
|
-
* **This is the chrome only, and the panel BODY is not chrome.** dockview also
|
|
17
|
-
* has a `--dv-group-view-background-color` (`#1e1e1e`) for the surface a tab's
|
|
18
|
-
* content sits on, and transcribing it is what made a light JBrowse theme come
|
|
19
|
-
* up dark below the views — the frame swallowing the thing it frames. The body
|
|
20
|
-
* follows `theme.palette.background.default` in `PanelView` instead, so the
|
|
21
|
-
* cell matches every other surface the app draws content on. It is deliberately
|
|
22
|
-
* absent here rather than present and unused, since an unused colour named
|
|
23
|
-
* after the panel reads as a value someone forgot to wire up.
|
|
24
|
-
*
|
|
25
|
-
* A consequence worth knowing before "fixing" it: dockview's selected tab is
|
|
26
|
-
* `#1e1e1e` **because** the body was, so the tab merged into its content. Ours
|
|
27
|
-
* cannot merge into a light body, and the four values below are kept anyway —
|
|
28
|
-
* darker-than-the-strip still reads as selected, and it is the one cue that
|
|
29
|
-
* survives being the only dark band on screen.
|
|
30
|
-
*
|
|
31
|
-
* Kept in one module because four components draw parts of the same chrome, and
|
|
32
|
-
* the four-way tab colouring below is a rule about the whole, not about any one
|
|
33
|
-
* of them.
|
|
34
|
-
*/
|
|
35
|
-
export declare const dv: {
|
|
36
|
-
/** the tab strip itself */
|
|
37
|
-
readonly tabsBackground: '#252526';
|
|
38
|
-
readonly activeGroupVisibleTabBackground: '#1e1e1e';
|
|
39
|
-
readonly activeGroupHiddenTabBackground: '#2d2d2d';
|
|
40
|
-
readonly inactiveGroupVisibleTabBackground: '#1e1e1e';
|
|
41
|
-
readonly inactiveGroupHiddenTabBackground: '#2d2d2d';
|
|
42
|
-
readonly activeGroupVisibleTabColor: 'white';
|
|
43
|
-
readonly activeGroupHiddenTabColor: '#969696';
|
|
44
|
-
readonly inactiveGroupVisibleTabColor: '#8f8f8f';
|
|
45
|
-
readonly inactiveGroupHiddenTabColor: '#626262';
|
|
46
|
-
readonly tabDividerColor: '#1e1e1e';
|
|
47
|
-
readonly separatorBorder: 'rgb(68, 68, 68)';
|
|
48
|
-
readonly iconHoverBackground: 'rgba(90, 93, 94, 0.31)';
|
|
49
|
-
readonly dragOverBackground: 'rgba(83, 89, 93, 0.5)';
|
|
50
|
-
readonly edgeDockIndicatorColor: 'rgba(56, 139, 253, 0.9)';
|
|
51
|
-
readonly tabsHeight: 35;
|
|
52
|
-
readonly tabsFontSize: 13;
|
|
53
|
-
/** the sash is 4px of grab area with a 1px line drawn inside it */
|
|
54
|
-
readonly sashSize: 4;
|
|
55
|
-
};
|
|
56
|
-
/** The background and text a tab takes, given where it sits. */
|
|
57
|
-
export declare function tabColors(groupActive: boolean, visible: boolean): {
|
|
58
|
-
background: "#1e1e1e";
|
|
59
|
-
color: "white";
|
|
60
|
-
} | {
|
|
61
|
-
background: "#2d2d2d";
|
|
62
|
-
color: "#969696";
|
|
63
|
-
} | {
|
|
64
|
-
background: "#1e1e1e";
|
|
65
|
-
color: "#8f8f8f";
|
|
66
|
-
} | {
|
|
67
|
-
background: "#2d2d2d";
|
|
68
|
-
color: "#626262";
|
|
69
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* dockview's `dockview-theme-dark`, transcribed.
|
|
3
|
-
*
|
|
4
|
-
* We render the workspace ourselves now, but the look is deliberately not a new
|
|
5
|
-
* design — it is the theme we already shipped, so nothing about the chrome
|
|
6
|
-
* changed for users when the engine underneath it did. Every value below is
|
|
7
|
-
* copied from `dockview/dist/styles/dockview.css`'s `.dockview-theme-dark`
|
|
8
|
-
* block (v8.0.0); the names are its CSS custom properties with the `--dv-`
|
|
9
|
-
* prefix dropped.
|
|
10
|
-
*
|
|
11
|
-
* **Fixed, not theme-derived.** These apply in a light JBrowse theme too, the
|
|
12
|
-
* same way the app bar is dark in both — the chrome frames the content rather
|
|
13
|
-
* than matching it. Don't wire them to `theme.palette`: a light strip reads as
|
|
14
|
-
* content, which is exactly what it looked like before this file existed.
|
|
15
|
-
*
|
|
16
|
-
* **This is the chrome only, and the panel BODY is not chrome.** dockview also
|
|
17
|
-
* has a `--dv-group-view-background-color` (`#1e1e1e`) for the surface a tab's
|
|
18
|
-
* content sits on, and transcribing it is what made a light JBrowse theme come
|
|
19
|
-
* up dark below the views — the frame swallowing the thing it frames. The body
|
|
20
|
-
* follows `theme.palette.background.default` in `PanelView` instead, so the
|
|
21
|
-
* cell matches every other surface the app draws content on. It is deliberately
|
|
22
|
-
* absent here rather than present and unused, since an unused colour named
|
|
23
|
-
* after the panel reads as a value someone forgot to wire up.
|
|
24
|
-
*
|
|
25
|
-
* A consequence worth knowing before "fixing" it: dockview's selected tab is
|
|
26
|
-
* `#1e1e1e` **because** the body was, so the tab merged into its content. Ours
|
|
27
|
-
* cannot merge into a light body, and the four values below are kept anyway —
|
|
28
|
-
* darker-than-the-strip still reads as selected, and it is the one cue that
|
|
29
|
-
* survives being the only dark band on screen.
|
|
30
|
-
*
|
|
31
|
-
* Kept in one module because four components draw parts of the same chrome, and
|
|
32
|
-
* the four-way tab colouring below is a rule about the whole, not about any one
|
|
33
|
-
* of them.
|
|
34
|
-
*/
|
|
35
|
-
export const dv = {
|
|
36
|
-
/** the tab strip itself */
|
|
37
|
-
tabsBackground: '#252526',
|
|
38
|
-
// A tab's colours depend on TWO things: whether its panel is the active one,
|
|
39
|
-
// and whether it is the tab that panel is showing. dockview enumerates all
|
|
40
|
-
// four rather than dimming one axis, so the focused panel's selected tab is
|
|
41
|
-
// the only fully-white label on screen.
|
|
42
|
-
activeGroupVisibleTabBackground: '#1e1e1e',
|
|
43
|
-
activeGroupHiddenTabBackground: '#2d2d2d',
|
|
44
|
-
inactiveGroupVisibleTabBackground: '#1e1e1e',
|
|
45
|
-
inactiveGroupHiddenTabBackground: '#2d2d2d',
|
|
46
|
-
activeGroupVisibleTabColor: 'white',
|
|
47
|
-
activeGroupHiddenTabColor: '#969696',
|
|
48
|
-
inactiveGroupVisibleTabColor: '#8f8f8f',
|
|
49
|
-
inactiveGroupHiddenTabColor: '#626262',
|
|
50
|
-
tabDividerColor: '#1e1e1e',
|
|
51
|
-
separatorBorder: 'rgb(68, 68, 68)',
|
|
52
|
-
iconHoverBackground: 'rgba(90, 93, 94, 0.31)',
|
|
53
|
-
dragOverBackground: 'rgba(83, 89, 93, 0.5)',
|
|
54
|
-
edgeDockIndicatorColor: 'rgba(56, 139, 253, 0.9)',
|
|
55
|
-
tabsHeight: 35,
|
|
56
|
-
tabsFontSize: 13,
|
|
57
|
-
/** the sash is 4px of grab area with a 1px line drawn inside it */
|
|
58
|
-
sashSize: 4,
|
|
59
|
-
};
|
|
60
|
-
/** The background and text a tab takes, given where it sits. */
|
|
61
|
-
export function tabColors(groupActive, visible) {
|
|
62
|
-
if (groupActive) {
|
|
63
|
-
return visible
|
|
64
|
-
? {
|
|
65
|
-
background: dv.activeGroupVisibleTabBackground,
|
|
66
|
-
color: dv.activeGroupVisibleTabColor,
|
|
67
|
-
}
|
|
68
|
-
: {
|
|
69
|
-
background: dv.activeGroupHiddenTabBackground,
|
|
70
|
-
color: dv.activeGroupHiddenTabColor,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
return visible
|
|
74
|
-
? {
|
|
75
|
-
background: dv.inactiveGroupVisibleTabBackground,
|
|
76
|
-
color: dv.inactiveGroupVisibleTabColor,
|
|
77
|
-
}
|
|
78
|
-
: {
|
|
79
|
-
background: dv.inactiveGroupHiddenTabBackground,
|
|
80
|
-
color: dv.inactiveGroupHiddenTabColor,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SessionWithFocusedViewAndDrawerWidgets } from '@jbrowse/core/util';
|
|
2
|
-
export interface ClassicViewsContainerProps {
|
|
3
|
-
session: SessionWithFocusedViewAndDrawerWidgets;
|
|
4
|
-
}
|
|
5
|
-
declare const ClassicViewsContainer: ({ session, }: ClassicViewsContainerProps) => import("react").JSX.Element;
|
|
6
|
-
export default ClassicViewsContainer;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { persistentScrollbarStyle } from '@jbrowse/core/ui/persistentScrollbarStyle';
|
|
3
|
-
import { useScrollPortHeightVar } from '@jbrowse/core/util/hooks';
|
|
4
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
|
-
import { observer } from 'mobx-react';
|
|
6
|
-
import ViewStack from './ViewStack.js';
|
|
7
|
-
const useStyles = makeStyles()(theme => ({
|
|
8
|
-
container: {
|
|
9
|
-
height: '100%',
|
|
10
|
-
width: '100%',
|
|
11
|
-
gridRow: 'components',
|
|
12
|
-
overflowY: 'auto',
|
|
13
|
-
...persistentScrollbarStyle(theme),
|
|
14
|
-
},
|
|
15
|
-
}));
|
|
16
|
-
const ClassicViewsContainer = observer(function ClassicViewsContainer({ session, }) {
|
|
17
|
-
const { classes } = useStyles();
|
|
18
|
-
const { views } = session;
|
|
19
|
-
const ref = useScrollPortHeightVar();
|
|
20
|
-
return (_jsx("div", { ref: ref, className: classes.container, children: _jsx(ViewStack, { views: views, session: session }) }));
|
|
21
|
-
});
|
|
22
|
-
export default ClassicViewsContainer;
|