@jbrowse/app-core 4.3.0 → 5.0.0-beta.2
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/AppRootModel.d.ts +30 -0
- package/esm/AppSession/AppRootModel.js +1 -0
- package/esm/AppSession/AppSessionMixin.d.ts +1598 -0
- package/esm/AppSession/AppSessionMixin.js +62 -0
- package/esm/AppSession/index.d.ts +2 -0
- package/esm/AppSession/index.js +1 -0
- package/esm/Assemblies/AssembliesMixin.d.ts +225 -0
- package/esm/Assemblies/AssembliesMixin.js +149 -0
- package/esm/Assemblies/index.d.ts +1 -2
- package/esm/Assemblies/index.js +1 -2
- package/esm/HistoryManagement/index.d.ts +19 -0
- package/esm/HistoryManagement/index.js +42 -5
- package/esm/JBrowseConfig/RootConfiguration.d.ts +171 -78
- package/esm/JBrowseConfig/RootConfiguration.js +85 -7
- package/esm/JBrowseConfig/index.d.ts +173 -84
- package/esm/JBrowseConfig/index.js +62 -2
- package/esm/JBrowseModel/index.d.ts +180 -95
- package/esm/JBrowseModel/index.js +122 -21
- package/esm/JbApi/index.d.ts +2 -0
- package/esm/JbApi/index.js +1 -0
- package/esm/JbApi/jbApi.d.ts +325 -0
- package/esm/JbApi/jbApi.js +748 -0
- package/esm/RootMenu/index.d.ts +69 -3
- package/esm/RootMenu/index.js +96 -61
- package/esm/SessionSpec/index.d.ts +6 -0
- package/esm/SessionSpec/index.js +3 -0
- package/esm/SessionSpec/lgvUrlInit.d.ts +79 -0
- package/esm/SessionSpec/lgvUrlInit.js +158 -0
- package/esm/SessionSpec/loadSessionSpec.d.ts +21 -0
- package/esm/SessionSpec/loadSessionSpec.js +392 -0
- package/esm/SessionSpec/parseSessionSpecUrl.d.ts +13 -0
- package/esm/SessionSpec/parseSessionSpecUrl.js +196 -0
- package/esm/SessionSpec/types.d.ts +31 -0
- package/esm/SessionSpec/types.js +1 -0
- package/esm/WorkspaceLayout/LayoutRenderer.d.ts +24 -0
- package/esm/WorkspaceLayout/LayoutRenderer.js +185 -0
- package/esm/WorkspaceLayout/PanelView.d.ts +13 -0
- package/esm/WorkspaceLayout/PanelView.js +99 -0
- package/esm/WorkspaceLayout/TabStrip.d.ts +14 -0
- package/esm/WorkspaceLayout/TabStrip.js +226 -0
- package/esm/WorkspaceLayout/WorkspaceContainer.d.ts +16 -0
- package/esm/WorkspaceLayout/WorkspaceContainer.js +105 -0
- package/esm/WorkspaceLayout/WorkspacePanelActions.d.ts +24 -0
- package/esm/WorkspaceLayout/WorkspacePanelActions.js +120 -0
- package/esm/WorkspaceLayout/WorkspaceTab.d.ts +27 -0
- package/esm/WorkspaceLayout/WorkspaceTab.js +109 -0
- package/esm/WorkspaceLayout/dockviewTheme.d.ts +69 -0
- package/esm/WorkspaceLayout/dockviewTheme.js +82 -0
- package/esm/WorkspaceLayout/dropZone.d.ts +105 -0
- package/esm/WorkspaceLayout/dropZone.js +113 -0
- package/esm/WorkspaceLayout/index.d.ts +8 -0
- package/esm/WorkspaceLayout/index.js +4 -0
- package/esm/WorkspaceLayout/model.d.ts +248 -0
- package/esm/WorkspaceLayout/model.js +562 -0
- package/esm/WorkspaceLayout/panelChrome.d.ts +19 -0
- package/esm/WorkspaceLayout/panelChrome.js +4 -0
- package/esm/WorkspaceLayout/spec.d.ts +88 -0
- package/esm/WorkspaceLayout/spec.js +226 -0
- package/esm/WorkspaceLayout/splitter.d.ts +25 -0
- package/esm/WorkspaceLayout/splitter.js +37 -0
- package/esm/WorkspaceLayout/tree.d.ts +158 -0
- package/esm/WorkspaceLayout/tree.js +379 -0
- package/esm/WorkspaceLayout/useLayoutDrag.d.ts +34 -0
- package/esm/WorkspaceLayout/useLayoutDrag.js +232 -0
- package/esm/index.d.ts +18 -9
- package/esm/index.js +16 -9
- package/esm/menus.d.ts +55 -68
- package/esm/menus.js +117 -86
- package/esm/queryParams.d.ts +9 -0
- package/esm/queryParams.js +92 -0
- package/esm/sessionModelFactory.d.ts +18 -0
- package/esm/sessionModelFactory.js +1 -0
- package/esm/ui/App/App.d.ts +3 -14
- package/esm/ui/App/App.js +30 -17
- package/esm/ui/App/AppFab.d.ts +12 -3
- package/esm/ui/App/AppFab.js +15 -8
- package/esm/ui/App/AppReadyMarker.d.ts +43 -0
- package/esm/ui/App/AppReadyMarker.js +56 -0
- package/esm/ui/App/AppToolbar.d.ts +2 -14
- package/esm/ui/App/AppToolbar.js +23 -24
- package/esm/ui/App/ClassicViewsContainer.d.ts +3 -9
- package/esm/ui/App/ClassicViewsContainer.js +9 -8
- package/esm/ui/App/DialogQueue.d.ts +17 -1
- package/esm/ui/App/DialogQueue.js +30 -1
- package/esm/ui/App/Drawer.d.ts +1 -1
- package/esm/ui/App/Drawer.js +10 -39
- package/esm/ui/App/DrawerControls.d.ts +1 -5
- package/esm/ui/App/DrawerControls.js +1 -25
- package/esm/ui/App/DrawerHeader.d.ts +2 -3
- package/esm/ui/App/DrawerHeader.js +24 -10
- package/esm/ui/App/DrawerHeaderHelpButton.d.ts +1 -1
- package/esm/ui/App/DrawerHeaderHelpButton.js +3 -3
- package/esm/ui/App/DrawerHeaderHelpDialog.d.ts +2 -2
- package/esm/ui/App/DrawerHeaderHelpDialog.js +3 -4
- package/esm/ui/App/DrawerWidget.d.ts +1 -1
- package/esm/ui/App/DrawerWidget.js +9 -21
- package/esm/ui/App/JBrowseTabMenu.d.ts +2 -3
- package/esm/ui/App/JBrowseTabMenu.js +24 -5
- package/esm/ui/App/ViewButtons.d.ts +2 -4
- package/esm/ui/App/ViewButtons.js +15 -3
- package/esm/ui/App/ViewContainer.d.ts +3 -2
- package/esm/ui/App/ViewContainer.js +144 -24
- package/esm/ui/App/ViewContainerTitle.d.ts +1 -1
- package/esm/ui/App/ViewContainerTitle.js +9 -2
- package/esm/ui/App/ViewErrorFallback.d.ts +18 -0
- package/esm/ui/App/ViewErrorFallback.js +42 -0
- package/esm/ui/App/ViewHeader.d.ts +3 -4
- package/esm/ui/App/ViewHeader.js +28 -17
- package/esm/ui/App/ViewLauncher.d.ts +2 -8
- package/esm/ui/App/ViewLauncher.js +7 -5
- package/esm/ui/App/ViewMenu.d.ts +3 -5
- package/esm/ui/App/ViewMenu.js +87 -92
- package/esm/ui/App/ViewStack.d.ts +7 -0
- package/esm/ui/App/ViewStack.js +42 -0
- package/esm/ui/App/ViewWrapper.d.ts +15 -1
- package/esm/ui/App/ViewWrapper.js +26 -10
- package/esm/ui/App/ViewsContainer.d.ts +3 -8
- package/esm/ui/App/ViewsContainer.js +9 -6
- package/esm/ui/App/copyView.js +1 -1
- package/esm/ui/App/index.d.ts +2 -1
- package/esm/ui/App/index.js +3 -2
- package/esm/ui/App/lazyChunk.d.ts +13 -0
- package/esm/ui/App/lazyChunk.js +91 -0
- package/esm/ui/App/types.d.ts +12 -3
- package/esm/ui/App/types.js +1 -1
- package/esm/ui/App/useViewVisibility.d.ts +34 -0
- package/esm/ui/App/useViewVisibility.js +87 -0
- package/esm/ui/App/viewTitle.d.ts +5 -0
- package/esm/ui/App/viewTitle.js +9 -0
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/package.json +12 -17
- package/esm/AppFocus/index.d.ts +0 -5
- package/esm/AppFocus/index.js +0 -12
- package/esm/Assemblies/SessionAssembliesMixin.d.ts +0 -92
- package/esm/Assemblies/SessionAssembliesMixin.js +0 -53
- package/esm/Assemblies/TemporaryAssembliesMixin.d.ts +0 -10
- package/esm/Assemblies/TemporaryAssembliesMixin.js +0 -37
- package/esm/DockviewLayout/index.d.ts +0 -35
- package/esm/DockviewLayout/index.js +0 -111
- package/esm/ui/App/DockviewContext.d.ts +0 -22
- package/esm/ui/App/DockviewContext.js +0 -29
- package/esm/ui/App/DockviewLeftHeaderActions.d.ts +0 -2
- package/esm/ui/App/DockviewLeftHeaderActions.js +0 -58
- package/esm/ui/App/DockviewRightHeaderActions.d.ts +0 -2
- package/esm/ui/App/DockviewRightHeaderActions.js +0 -100
- package/esm/ui/App/DrawerWidgetSelector.d.ts +0 -5
- package/esm/ui/App/DrawerWidgetSelector.js +0 -47
- package/esm/ui/App/JBrowseViewPanel.d.ts +0 -8
- package/esm/ui/App/JBrowseViewPanel.js +0 -40
- package/esm/ui/App/JBrowseViewTab.d.ts +0 -8
- package/esm/ui/App/JBrowseViewTab.js +0 -97
- package/esm/ui/App/ModalWidget.d.ts +0 -6
- package/esm/ui/App/ModalWidget.js +0 -48
- package/esm/ui/App/TiledViewsContainer.d.ts +0 -6
- package/esm/ui/App/TiledViewsContainer.js +0 -366
- package/esm/ui/App/dockviewUtils.d.ts +0 -46
- package/esm/ui/App/dockviewUtils.js +0 -55
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import type { LayoutSpecNode, PendingMove, TileMode } from './spec.ts';
|
|
2
|
+
import type { LayoutTree, PanelNode, TabHome, TabNode } from './tree.ts';
|
|
3
|
+
import type { IAnyStateTreeNode, Instance } from '@jbrowse/mobx-state-tree';
|
|
4
|
+
export declare function WorkspaceLayoutMixin(): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
5
|
+
layout: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ITypeUnion<import("@jbrowse/mobx-state-tree").ModelCreationType<{
|
|
6
|
+
id: string;
|
|
7
|
+
size: number | undefined;
|
|
8
|
+
tabs: readonly import("@jbrowse/mobx-state-tree").ModelCreationType<{
|
|
9
|
+
id: string;
|
|
10
|
+
viewIds: readonly string[] | undefined;
|
|
11
|
+
title: string | undefined;
|
|
12
|
+
}>[] | undefined;
|
|
13
|
+
activeTabId: string | undefined;
|
|
14
|
+
}> | import("@jbrowse/mobx-state-tree").ModelCreationType<{
|
|
15
|
+
id: string;
|
|
16
|
+
size: number | undefined;
|
|
17
|
+
direction: "column" | "row";
|
|
18
|
+
children: readonly import("@jbrowse/mobx-state-tree").ModelCreationType<{
|
|
19
|
+
id: string;
|
|
20
|
+
size: number | undefined;
|
|
21
|
+
tabs: readonly import("@jbrowse/mobx-state-tree").ModelCreationType<{
|
|
22
|
+
id: string;
|
|
23
|
+
viewIds: readonly string[] | undefined;
|
|
24
|
+
title: string | undefined;
|
|
25
|
+
}>[] | undefined;
|
|
26
|
+
activeTabId: string | undefined;
|
|
27
|
+
}>[] | undefined;
|
|
28
|
+
}>, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
29
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
30
|
+
size: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
31
|
+
tabs: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
32
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
33
|
+
viewIds: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
34
|
+
/** set only by an explicit rename; otherwise the name is derived from views */
|
|
35
|
+
title: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
36
|
+
}, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
37
|
+
activeTabId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
38
|
+
}> | import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
39
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
40
|
+
size: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
41
|
+
direction: import("@jbrowse/mobx-state-tree").ISimpleType<"column" | "row">;
|
|
42
|
+
children: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
43
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
44
|
+
size: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
45
|
+
tabs: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
46
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
47
|
+
viewIds: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
48
|
+
/** set only by an explicit rename; otherwise the name is derived from views */
|
|
49
|
+
title: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
50
|
+
}, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
51
|
+
activeTabId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
52
|
+
}, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
53
|
+
}>, import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
|
|
54
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
55
|
+
size: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
56
|
+
tabs: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
57
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
58
|
+
viewIds: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
59
|
+
/** set only by an explicit rename; otherwise the name is derived from views */
|
|
60
|
+
title: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
61
|
+
}, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
62
|
+
activeTabId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
63
|
+
}> | import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
|
|
64
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
65
|
+
size: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
66
|
+
direction: import("@jbrowse/mobx-state-tree").ISimpleType<"column" | "row">;
|
|
67
|
+
children: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
68
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
69
|
+
size: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
70
|
+
tabs: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
71
|
+
id: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
|
|
72
|
+
viewIds: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
73
|
+
/** set only by an explicit rename; otherwise the name is derived from views */
|
|
74
|
+
title: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
75
|
+
}, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
76
|
+
activeTabId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
77
|
+
}, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
78
|
+
}>>, [undefined]>;
|
|
79
|
+
activePanelId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
80
|
+
/**
|
|
81
|
+
* Show only this cell, at the size of the whole workspace.
|
|
82
|
+
*
|
|
83
|
+
* Deliberately HERE and not a `maximized` flag on `PanelNode`. On the
|
|
84
|
+
* node it would be inside `tree.ts`, the half that carries the risk and
|
|
85
|
+
* is proven by a randomised operation sequence asserting canonical form
|
|
86
|
+
* after every step — and every operation would then have to say what it
|
|
87
|
+
* does to the flag: a split of a maximized panel, a drag of its last tab
|
|
88
|
+
* out, a normalize that collapses it into its parent. Beside
|
|
89
|
+
* `activePanelId` it is the same class of thing as `activePanelId`,
|
|
90
|
+
* including its failure mode, which `livePanelIds` already repairs.
|
|
91
|
+
*/
|
|
92
|
+
maximizedPanelId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
93
|
+
}, {
|
|
94
|
+
/**
|
|
95
|
+
* The plain tree the pure functions take.
|
|
96
|
+
*
|
|
97
|
+
* `getSnapshot` is a `keepAlive` computed, so this is cached and
|
|
98
|
+
* referentially stable — which also lets MST's reconcile short-circuit on
|
|
99
|
+
* identity when `apply` writes an untouched subtree back.
|
|
100
|
+
*
|
|
101
|
+
* Uncast on purpose: the models below and the interfaces in `tree.ts` are
|
|
102
|
+
* two spellings of one shape, and this assignment is the only thing that
|
|
103
|
+
* checks they agree.
|
|
104
|
+
*/
|
|
105
|
+
readonly tree: LayoutTree;
|
|
106
|
+
} & {
|
|
107
|
+
readonly panels: PanelNode[];
|
|
108
|
+
readonly tabs: TabNode[];
|
|
109
|
+
hasPanel(panelId: string): boolean;
|
|
110
|
+
findTab(tabId: string): TabHome | undefined;
|
|
111
|
+
tabContainingView(viewId: string): TabHome | undefined;
|
|
112
|
+
panelContainingView(viewId: string): PanelNode | undefined;
|
|
113
|
+
/** The views a tab renders: its members, in `session.views` order. */
|
|
114
|
+
viewIdsForTab(tabId: string, order: string[]): string[];
|
|
115
|
+
/** The tab a panel is showing, or its first. */
|
|
116
|
+
activeTabOf(panelId: string): TabNode | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* What to render: the maximized cell alone, or the whole tree.
|
|
119
|
+
*
|
|
120
|
+
* Sized to 1 rather than handed over as it sits. A pane's `size` is its
|
|
121
|
+
* share of its siblings, and CSS distributes free space by grow factor
|
|
122
|
+
* only up to a total of 1 — so a cell that was a third of a row, alone
|
|
123
|
+
* in the workspace with `flexGrow: 0.33`, draws a third of the window
|
|
124
|
+
* and leaves the rest blank.
|
|
125
|
+
*/
|
|
126
|
+
readonly visibleTree: LayoutTree;
|
|
127
|
+
} & {
|
|
128
|
+
setActivePanelId(panelId: string | undefined): void;
|
|
129
|
+
/**
|
|
130
|
+
* Show one cell at the size of the workspace, or go back.
|
|
131
|
+
*
|
|
132
|
+
* A toggle rather than a pair, because the gesture is a toggle: the
|
|
133
|
+
* strip's double-click and the cell menu's one item both mean "this
|
|
134
|
+
* cell, or not any more". Maximizing a DIFFERENT cell while one is
|
|
135
|
+
* already maximized moves the mode rather than restoring, which is
|
|
136
|
+
* what the menu item on another cell's strip is asking for.
|
|
137
|
+
*
|
|
138
|
+
* Mounts no views that were not mounted — it is the same cell showing
|
|
139
|
+
* the same tab — and unmounts every other cell's, so the WebGL2
|
|
140
|
+
* context ceiling (`agent-docs/reference/GPU_CONTEXT_BUDGET.md`) can
|
|
141
|
+
* only go down. That is the reason it is this and not a `display:
|
|
142
|
+
* none` over a still-mounted workspace.
|
|
143
|
+
*/
|
|
144
|
+
toggleMaximizedPanel(panelId: string): void;
|
|
145
|
+
restorePanels(): void;
|
|
146
|
+
setActiveTab(panelId: string, tabId: string): void;
|
|
147
|
+
renameTab(tabId: string, title: string | undefined): void;
|
|
148
|
+
/** Split a grid cell; the new cell gets one empty tab. */
|
|
149
|
+
splitPanel(panelId: string, direction: 'row' | 'column', before?: any): PanelNode | undefined;
|
|
150
|
+
closePanel(panelId: string): void;
|
|
151
|
+
/** "New empty tab": a tab in an existing cell, showing the launcher. */
|
|
152
|
+
addTab(panelId: string, viewIds?: string[]): TabNode | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Close a tab, and the cell with it if that was its last.
|
|
155
|
+
*
|
|
156
|
+
* A cell whose tabs are all gone is the state `pruneEmptyPanel` was
|
|
157
|
+
* written for — "dragging the last tab out of a split and leaving a
|
|
158
|
+
* blank half is the one place an empty panel is clearly not what was
|
|
159
|
+
* meant" — and closing that tab arrives at the identical half by a
|
|
160
|
+
* different gesture. It rendered nothing at all, not even the launcher
|
|
161
|
+
* an empty TAB shows, so the only way back out of it was the `+`.
|
|
162
|
+
*
|
|
163
|
+
* `pruneEmptyPanel` carries both guards already: a cell with tabs left
|
|
164
|
+
* stays, and the last cell in the workspace stays whatever happens to
|
|
165
|
+
* it, since there is nowhere for the tree to collapse to.
|
|
166
|
+
*/
|
|
167
|
+
closeTab(tabId: string): void;
|
|
168
|
+
addViewToTab(tabId: string, viewId: string): void;
|
|
169
|
+
/**
|
|
170
|
+
* Drop a dragged tab into an existing panel, as a tab.
|
|
171
|
+
*
|
|
172
|
+
* One action, so the tree never exists in a state where the tab is in
|
|
173
|
+
* both panels or neither. The imperative bridge needed an explicit
|
|
174
|
+
* `runInAction` around the unassign+reassign pair for exactly this, and
|
|
175
|
+
* a comment explaining that without it the reconcile autorun would
|
|
176
|
+
* observe the gap and re-home the view.
|
|
177
|
+
*/
|
|
178
|
+
dropTabInPanel(tabId: string, targetPanelId: string, index?: number): void;
|
|
179
|
+
/** Drop a dragged tab on a panel edge: split, and land in the new half. */
|
|
180
|
+
dropTabInNewSplit(tabId: string, targetPanelId: string, direction: 'row' | 'column', before: boolean): string | undefined;
|
|
181
|
+
setSizes(branchId: string, sizes: number[]): void;
|
|
182
|
+
/**
|
|
183
|
+
* Arrange the workspace as a spec states.
|
|
184
|
+
*
|
|
185
|
+
* The spec is the same shape a session spec's `layout` takes: a leaf's
|
|
186
|
+
* `views` names views by index into `session.views` or by id, so
|
|
187
|
+
* `{ direction: 'horizontal', children: [{ views: [0] }, { views: [1] }] }`
|
|
188
|
+
* means here what it means in a link. A leaf spelled any other way, an
|
|
189
|
+
* index past the end or an id no view has throws rather than arranging
|
|
190
|
+
* nothing — an untyped caller used to collapse the workspace into one
|
|
191
|
+
* blank tab that way.
|
|
192
|
+
*
|
|
193
|
+
* There is no `init` property and no standing request: the spec is
|
|
194
|
+
* converted and *becomes* the layout, here and now. `init` existed only
|
|
195
|
+
* because dockview had to be told, could not be told before it mounted,
|
|
196
|
+
* and had to be told again afterwards — three problems that all came
|
|
197
|
+
* from the layout living somewhere this action could not reach.
|
|
198
|
+
*/
|
|
199
|
+
applyLayoutSpec(spec: LayoutSpecNode): string[];
|
|
200
|
+
/**
|
|
201
|
+
* ViewMenu's "move to new tab": the view leaves its tab for a new one.
|
|
202
|
+
*
|
|
203
|
+
* `allViewIds` is EVERY view in the session, defaulting to the host's
|
|
204
|
+
* own list — homing drops any view the list does not name, so the
|
|
205
|
+
* `[viewId]` default this used to carry unhomed all the others.
|
|
206
|
+
*/
|
|
207
|
+
moveViewToNewTab(viewId: string, allViewIds?: string[]): string | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* ViewMenu's "move to split view": the view leaves for a new cell.
|
|
210
|
+
* `allViewIds` is every view in the session — see `moveViewToNewTab`.
|
|
211
|
+
*/
|
|
212
|
+
moveViewToSplitRight(viewId: string, allViewIds?: string[]): string | undefined;
|
|
213
|
+
homeUnassignedViews(viewIds: string[]): void;
|
|
214
|
+
} & {
|
|
215
|
+
/**
|
|
216
|
+
* Move one view relative to the others. PUBLIC API: an external plugin
|
|
217
|
+
* calls this behind a `'setPendingMove' in session` guard
|
|
218
|
+
* (jbrowse-plugin-protein3d, putting a protein view beside its genome
|
|
219
|
+
* view). It survived the last storage change by being kept as sugar, and
|
|
220
|
+
* it survives this one the same way — a capability-detecting caller
|
|
221
|
+
* cannot tell you it lost a capability.
|
|
222
|
+
*
|
|
223
|
+
* **`allViewIds` is therefore OPTIONAL, and has to stay that way.** The
|
|
224
|
+
* plugin passes the move alone, because that was the whole signature when
|
|
225
|
+
* its call site was written; requiring the second argument threw
|
|
226
|
+
* `undefined.filter` out of a launch the plugin does not wrap, and the
|
|
227
|
+
* figure was again the only thing that noticed. Keeping the NAME is half
|
|
228
|
+
* of not breaking a runtime lookup — the call has to keep working as it
|
|
229
|
+
* is spelled.
|
|
230
|
+
*/
|
|
231
|
+
setPendingMove(move: PendingMove | undefined, allViewIds?: string[]): void;
|
|
232
|
+
/**
|
|
233
|
+
* The whole-workspace re-arrange: every view one cell, in one of four
|
|
234
|
+
* shapes. Restored from the dockview header's four "Global:" commands,
|
|
235
|
+
* which went with that component and were not reimplemented.
|
|
236
|
+
*
|
|
237
|
+
* `allViewIds` is passed in rather than read off the session for the same
|
|
238
|
+
* reason `moveViewToNewTab` takes it: this mixin owns the tree and has no
|
|
239
|
+
* view list of its own. Passing `session.views` order means the
|
|
240
|
+
* arrangement it states is already the order views render in, so unlike a
|
|
241
|
+
* session spec's layout there is nothing for `orderViews` to apply.
|
|
242
|
+
*/
|
|
243
|
+
tileViews(mode: TileMode, allViewIds: string[]): void;
|
|
244
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
245
|
+
export type WorkspaceLayoutMixinType = ReturnType<typeof WorkspaceLayoutMixin>;
|
|
246
|
+
export interface WorkspaceLayout extends Instance<WorkspaceLayoutMixinType> {
|
|
247
|
+
}
|
|
248
|
+
export declare function isSessionWithWorkspaceLayout(session: IAnyStateTreeNode): session is WorkspaceLayout;
|