@jbrowse/app-core 5.0.0-beta.11 → 5.0.0-beta.13
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/JBrowseConfig/RootConfiguration.d.ts +1 -8
- package/esm/JBrowseConfig/RootConfiguration.js +2 -6
- package/esm/JBrowseConfig/index.d.ts +1 -8
- package/esm/JBrowseModel/index.d.ts +1 -8
- package/esm/JbApi/jbApi.d.ts +2 -2
- package/esm/JbApi/jbApi.js +12 -10
- package/esm/SessionSpec/loadSessionSpec.js +2 -12
- 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 -34
- package/esm/WorkspaceLayout/WorkspacePanelActions.d.ts +1 -16
- package/esm/WorkspaceLayout/WorkspacePanelActions.js +45 -50
- package/esm/WorkspaceLayout/WorkspaceTab.d.ts +1 -16
- package/esm/WorkspaceLayout/WorkspaceTab.js +11 -47
- package/esm/WorkspaceLayout/dropZone.d.ts +7 -37
- package/esm/WorkspaceLayout/dropZone.js +7 -44
- package/esm/WorkspaceLayout/model.d.ts +42 -112
- package/esm/WorkspaceLayout/model.js +139 -268
- 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 -76
- package/esm/WorkspaceLayout/tree.js +29 -122
- package/esm/WorkspaceLayout/useLayoutDrag.d.ts +4 -22
- package/esm/WorkspaceLayout/useLayoutDrag.js +46 -174
- 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/ui/App/App.js +3 -0
- package/esm/ui/App/JBrowseTabMenu.js +1 -1
- package/esm/ui/App/ThemeModeButton.js +5 -4
- package/esm/ui/App/ViewMenu.js +47 -29
- 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/package.json +4 -4
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workspace chrome: tab strips, splitters and drop indicators.
|
|
3
|
+
*
|
|
4
|
+
* Fixed and dark in every JBrowse theme, the way the app bar is, so the frame
|
|
5
|
+
* never reads as content. The cell body is not chrome and follows
|
|
6
|
+
* `theme.palette.background.default` in `PanelView`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const workspaceTheme: {
|
|
9
|
+
readonly stripBackground: '#252526';
|
|
10
|
+
readonly stripHeight: 35;
|
|
11
|
+
readonly stripFontSize: 13;
|
|
12
|
+
readonly tabDivider: '#1e1e1e';
|
|
13
|
+
readonly selectedTabBackground: '#1e1e1e';
|
|
14
|
+
readonly tabBackground: '#2d2d2d';
|
|
15
|
+
readonly iconHoverBackground: 'rgba(90, 93, 94, 0.31)';
|
|
16
|
+
readonly splitterLine: 'rgb(68, 68, 68)';
|
|
17
|
+
/** grab area; the line drawn inside it is 1px */
|
|
18
|
+
readonly splitterSize: 4;
|
|
19
|
+
readonly dropWash: 'rgba(83, 89, 93, 0.5)';
|
|
20
|
+
readonly accent: 'rgba(56, 139, 253, 0.9)';
|
|
21
|
+
};
|
|
22
|
+
export declare function tabColors(cellActive: boolean, selected: boolean): {
|
|
23
|
+
background: "#1e1e1e" | "#2d2d2d";
|
|
24
|
+
color: string;
|
|
25
|
+
};
|
|
26
|
+
/** the panel actions' icons, which sit on the strip beside unselected tabs */
|
|
27
|
+
export declare const stripIconColor: string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workspace chrome: tab strips, splitters and drop indicators.
|
|
3
|
+
*
|
|
4
|
+
* Fixed and dark in every JBrowse theme, the way the app bar is, so the frame
|
|
5
|
+
* never reads as content. The cell body is not chrome and follows
|
|
6
|
+
* `theme.palette.background.default` in `PanelView`.
|
|
7
|
+
*/
|
|
8
|
+
export const workspaceTheme = {
|
|
9
|
+
stripBackground: '#252526',
|
|
10
|
+
stripHeight: 35,
|
|
11
|
+
stripFontSize: 13,
|
|
12
|
+
tabDivider: '#1e1e1e',
|
|
13
|
+
selectedTabBackground: '#1e1e1e',
|
|
14
|
+
tabBackground: '#2d2d2d',
|
|
15
|
+
iconHoverBackground: 'rgba(90, 93, 94, 0.31)',
|
|
16
|
+
splitterLine: 'rgb(68, 68, 68)',
|
|
17
|
+
/** grab area; the line drawn inside it is 1px */
|
|
18
|
+
splitterSize: 4,
|
|
19
|
+
dropWash: 'rgba(83, 89, 93, 0.5)',
|
|
20
|
+
accent: 'rgba(56, 139, 253, 0.9)',
|
|
21
|
+
};
|
|
22
|
+
// the active cell's selected tab is the one fully white label on screen
|
|
23
|
+
const tabTextColors = {
|
|
24
|
+
activeCell: { selected: 'white', other: '#969696' },
|
|
25
|
+
otherCell: { selected: '#8f8f8f', other: '#626262' },
|
|
26
|
+
};
|
|
27
|
+
export function tabColors(cellActive, selected) {
|
|
28
|
+
const text = cellActive ? tabTextColors.activeCell : tabTextColors.otherCell;
|
|
29
|
+
return {
|
|
30
|
+
background: selected
|
|
31
|
+
? workspaceTheme.selectedTabBackground
|
|
32
|
+
: workspaceTheme.tabBackground,
|
|
33
|
+
color: selected ? text.selected : text.other,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** the panel actions' icons, which sit on the strip beside unselected tabs */
|
|
37
|
+
export const stripIconColor = tabTextColors.activeCell.other;
|
package/esm/ui/App/App.js
CHANGED
|
@@ -38,6 +38,9 @@ const useStyles = makeStyles()(theme => ({
|
|
|
38
38
|
appBar: {
|
|
39
39
|
flexGrow: 1,
|
|
40
40
|
gridRow: 'menubar',
|
|
41
|
+
// above the workspace, whose cells paint a background its shadow falls on
|
|
42
|
+
position: 'relative',
|
|
43
|
+
zIndex: 1,
|
|
41
44
|
},
|
|
42
45
|
}));
|
|
43
46
|
const App = observer(function App(props) {
|
|
@@ -54,5 +54,5 @@ export default function JBrowseTabMenu({ onRename, onClose, }) {
|
|
|
54
54
|
icon: CloseIcon,
|
|
55
55
|
onClick: onClose,
|
|
56
56
|
},
|
|
57
|
-
], size: "small", className: classes.tabIcon, setOpen: setOpen, stopPropagation: true, children: _jsx(MoreVertIcon, { className: classes.smallIcon }) }) }));
|
|
57
|
+
], tooltip: "Tab menu", size: "small", className: classes.tabIcon, setOpen: setOpen, stopPropagation: true, children: _jsx(MoreVertIcon, { className: classes.smallIcon }) }) }));
|
|
58
58
|
}
|
|
@@ -13,10 +13,11 @@ import { observer } from 'mobx-react';
|
|
|
13
13
|
const ThemeModeButton = observer(function ThemeModeButton({ session, }) {
|
|
14
14
|
const dark = session.themeIsDark;
|
|
15
15
|
const drawnMode = dark ? 'dark' : 'light';
|
|
16
|
-
// A palette pinned to its own mode draws dark whatever the
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// A palette pinned to its own mode, or Dark Reader, draws dark whatever the
|
|
17
|
+
// OS says, so a click here would change nothing.
|
|
18
|
+
const followsSystem = session.themeMode === 'system' &&
|
|
19
|
+
!session.darkReaderDark &&
|
|
20
|
+
drawnMode === session.effectiveThemeMode;
|
|
20
21
|
if (!followsSystem) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
package/esm/ui/App/ViewMenu.js
CHANGED
|
@@ -4,18 +4,19 @@ import { getSession } from '@jbrowse/core/util';
|
|
|
4
4
|
import { renameIds } from '@jbrowse/core/util/types/mst';
|
|
5
5
|
import { getSnapshot } from '@jbrowse/mobx-state-tree';
|
|
6
6
|
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
7
|
+
import HorizontalSplitIcon from '@mui/icons-material/HorizontalSplit';
|
|
7
8
|
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
8
9
|
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
9
10
|
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
|
|
10
11
|
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
|
|
11
12
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
12
13
|
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
|
14
|
+
import TabIcon from '@mui/icons-material/Tab';
|
|
13
15
|
import VerticalSplitIcon from '@mui/icons-material/VerticalSplit';
|
|
14
16
|
import { observer } from 'mobx-react';
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
// time anything re-rendered the header
|
|
17
|
+
import { tabDisplayName } from '../../WorkspaceLayout/tabName.js';
|
|
18
|
+
// takes a class string rather than an SvgIconProps object, which a caller
|
|
19
|
+
// builds inline and so defeats this observer's memo
|
|
19
20
|
const ViewMenu = observer(function ViewMenu({ model, className, }) {
|
|
20
21
|
const session = getSession(model);
|
|
21
22
|
const moves = {
|
|
@@ -24,35 +25,30 @@ const ViewMenu = observer(function ViewMenu({ model, className, }) {
|
|
|
24
25
|
down: session.moveViewDown,
|
|
25
26
|
bottom: session.moveViewToBottom,
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
-
// split to their right. One path, whether or not the workspace is already up
|
|
29
|
-
// — the layout is session state either way, so there is nothing to defer and
|
|
30
|
-
// no second implementation for "the panels do not exist yet". That fork is
|
|
31
|
-
// the reason `init` existed.
|
|
32
|
-
const moveViewOut = (direction) => {
|
|
28
|
+
const moveViewOut = (to) => {
|
|
33
29
|
const allViewIds = session.views.map(v => v.id);
|
|
34
|
-
if (
|
|
30
|
+
if (to === 'tab') {
|
|
35
31
|
session.moveViewToNewTab(model.id, allViewIds);
|
|
36
32
|
}
|
|
37
33
|
else {
|
|
38
|
-
session.
|
|
34
|
+
session.moveViewToSplit(model.id, to, allViewIds);
|
|
39
35
|
}
|
|
40
|
-
|
|
36
|
+
};
|
|
37
|
+
// views render in `session.views` order within a tab, so a view joining one
|
|
38
|
+
// goes to its bottom rather than wherever its old slot falls
|
|
39
|
+
const moveViewToTab = (tabId) => {
|
|
40
|
+
const members = session.findTab(tabId)?.tab.viewIds ?? [];
|
|
41
|
+
session.moveViewToTab(model.id, tabId, session.views.map(v => v.id));
|
|
42
|
+
session.moveViewToBottom(model.id, [...members, model.id]);
|
|
41
43
|
};
|
|
42
44
|
return (_jsx(CascadingMenuButton, { "data-testid": "view_menu_icon", tooltip: "View menu", menuItems: () => {
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// render would also subscribe this menu to them, so a view moving
|
|
51
|
-
// between panels anywhere re-rendered every view's menu. None of it is
|
|
52
|
-
// needed until the menu opens.
|
|
53
|
-
const scopeIds = session.effectiveUseWorkspaces
|
|
54
|
-
? session.tabContainingView(model.id)?.tab.viewIds.slice()
|
|
55
|
-
: undefined;
|
|
45
|
+
// A move's scope is this view's tab. Read on open rather than in
|
|
46
|
+
// render, so the menu does not observe every tab's membership.
|
|
47
|
+
const home = session.tabContainingView(model.id);
|
|
48
|
+
const scopeIds = home?.tab.viewIds.slice();
|
|
49
|
+
const otherTabs = home
|
|
50
|
+
? session.tabs.filter(t => t.id !== home.tab.id)
|
|
51
|
+
: [];
|
|
56
52
|
const viewCount = scopeIds?.length ?? session.views.length;
|
|
57
53
|
return [
|
|
58
54
|
{
|
|
@@ -70,14 +66,36 @@ const ViewMenu = observer(function ViewMenu({ model, className, }) {
|
|
|
70
66
|
label: 'Move to new tab',
|
|
71
67
|
icon: OpenInNewIcon,
|
|
72
68
|
onClick: () => {
|
|
73
|
-
moveViewOut('
|
|
69
|
+
moveViewOut('tab');
|
|
74
70
|
},
|
|
75
71
|
},
|
|
72
|
+
...(otherTabs.length > 0
|
|
73
|
+
? [
|
|
74
|
+
{
|
|
75
|
+
label: 'Move to tab',
|
|
76
|
+
icon: TabIcon,
|
|
77
|
+
type: 'subMenu',
|
|
78
|
+
subMenu: otherTabs.map(tab => ({
|
|
79
|
+
label: tabDisplayName(tab, session.views.filter(v => tab.viewIds.includes(v.id)), session),
|
|
80
|
+
onClick: () => {
|
|
81
|
+
moveViewToTab(tab.id);
|
|
82
|
+
},
|
|
83
|
+
})),
|
|
84
|
+
},
|
|
85
|
+
]
|
|
86
|
+
: []),
|
|
76
87
|
{
|
|
77
|
-
label: 'Move to split view (right
|
|
88
|
+
label: 'Move to split view (right)',
|
|
78
89
|
icon: VerticalSplitIcon,
|
|
79
90
|
onClick: () => {
|
|
80
|
-
moveViewOut('
|
|
91
|
+
moveViewOut('row');
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: 'Move to split view (below)',
|
|
96
|
+
icon: HorizontalSplitIcon,
|
|
97
|
+
onClick: () => {
|
|
98
|
+
moveViewOut('column');
|
|
81
99
|
},
|
|
82
100
|
},
|
|
83
101
|
// 'top'/'bottom' only mean something with a view above *and* below
|
|
@@ -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;
|
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.13",
|
|
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": [
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@jbrowse/mobx-state-tree": "^6.7.0",
|
|
28
28
|
"@mui/icons-material": "^9.4.0",
|
|
29
29
|
"@mui/material": "^9.4.0",
|
|
30
|
-
"mobx": "^7.0.
|
|
30
|
+
"mobx": "^7.0.6",
|
|
31
31
|
"mobx-react": "^10.0.2",
|
|
32
|
-
"@jbrowse/core": "^5.0.0-beta.
|
|
33
|
-
"@jbrowse/
|
|
32
|
+
"@jbrowse/product-core": "^5.0.0-beta.13",
|
|
33
|
+
"@jbrowse/core": "^5.0.0-beta.13"
|
|
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;
|