@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
|
@@ -78,29 +78,16 @@ export declare function WorkspaceLayoutMixin(): import("@jbrowse/mobx-state-tree
|
|
|
78
78
|
}>>, [undefined]>;
|
|
79
79
|
activePanelId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
80
80
|
/**
|
|
81
|
-
* Show only this cell, at the size of the whole workspace.
|
|
82
|
-
*
|
|
83
|
-
*
|
|
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.
|
|
81
|
+
* Show only this cell, at the size of the whole workspace. Kept here
|
|
82
|
+
* rather than as a flag on `PanelNode` so no `tree.ts` operation has to
|
|
83
|
+
* say what it does to it.
|
|
91
84
|
*/
|
|
92
85
|
maximizedPanelId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
93
86
|
}, {
|
|
94
87
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
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.
|
|
88
|
+
* Referentially stable, since `getSnapshot` is cached. Uncast on
|
|
89
|
+
* purpose: this assignment is what checks the models above agree with
|
|
90
|
+
* the interfaces in `tree.ts`.
|
|
104
91
|
*/
|
|
105
92
|
readonly tree: LayoutTree;
|
|
106
93
|
} & {
|
|
@@ -110,36 +97,19 @@ export declare function WorkspaceLayoutMixin(): import("@jbrowse/mobx-state-tree
|
|
|
110
97
|
findTab(tabId: string): TabHome | undefined;
|
|
111
98
|
tabContainingView(viewId: string): TabHome | undefined;
|
|
112
99
|
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
100
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
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.
|
|
101
|
+
* The maximized cell alone, or the whole tree. The cell is resized to 1
|
|
102
|
+
* because CSS hands out free space by grow factor only up to a total of
|
|
103
|
+
* 1, so a third-of-a-row cell would draw a third of the window.
|
|
125
104
|
*/
|
|
126
105
|
readonly visibleTree: LayoutTree;
|
|
127
106
|
} & {
|
|
128
107
|
setActivePanelId(panelId: string | undefined): void;
|
|
129
108
|
/**
|
|
130
|
-
* Show one cell at the size of the workspace, or go back
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
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_PORTABILITY.md`) can
|
|
141
|
-
* only go down. That is the reason it is this and not a `display:
|
|
142
|
-
* none` over a still-mounted workspace.
|
|
109
|
+
* Show one cell at the size of the workspace, or go back; naming a
|
|
110
|
+
* different cell moves the mode. Unmounts every other cell's views
|
|
111
|
+
* rather than hiding them, to stay under the WebGL2 context ceiling
|
|
112
|
+
* (`agent-docs/reference/GPU_PORTABILITY.md`).
|
|
143
113
|
*/
|
|
144
114
|
toggleMaximizedPanel(panelId: string): void;
|
|
145
115
|
restorePanels(): void;
|
|
@@ -151,108 +121,63 @@ export declare function WorkspaceLayoutMixin(): import("@jbrowse/mobx-state-tree
|
|
|
151
121
|
/** "New empty tab": a tab in an existing cell, showing the launcher. */
|
|
152
122
|
addTab(panelId: string, viewIds?: string[]): TabNode | undefined;
|
|
153
123
|
/**
|
|
154
|
-
* Close a tab, and
|
|
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.
|
|
124
|
+
* Close a tab, and its cell too if that was the last tab and not the
|
|
125
|
+
* workspace's last cell: a tabless cell renders nothing at all.
|
|
166
126
|
*/
|
|
167
127
|
closeTab(tabId: string): void;
|
|
168
128
|
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
|
-
*/
|
|
129
|
+
/** Drop a dragged tab into an existing panel, as a tab. */
|
|
178
130
|
dropTabInPanel(tabId: string, targetPanelId: string, index?: number): void;
|
|
179
131
|
/** Drop a dragged tab on a panel edge: split, and land in the new half. */
|
|
180
132
|
dropTabInNewSplit(tabId: string, targetPanelId: string, direction: 'row' | 'column', before: boolean): string | undefined;
|
|
181
133
|
setSizes(branchId: string, sizes: number[]): void;
|
|
182
134
|
/**
|
|
183
|
-
* Arrange the workspace as a spec states
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
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.
|
|
135
|
+
* Arrange the workspace as a spec states, in the shape a session
|
|
136
|
+
* spec's `layout` takes: a leaf's `views` names views by index into
|
|
137
|
+
* `session.views` or by id. A malformed leaf, an index past the end or
|
|
138
|
+
* an unknown id throws.
|
|
198
139
|
*/
|
|
199
140
|
applyLayoutSpec(spec: LayoutSpecNode): string[];
|
|
200
141
|
/**
|
|
201
142
|
* 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
143
|
*/
|
|
207
|
-
moveViewToNewTab(viewId: string
|
|
144
|
+
moveViewToNewTab(viewId: string): string | undefined;
|
|
208
145
|
/**
|
|
209
|
-
* ViewMenu's "move to split
|
|
210
|
-
* `
|
|
146
|
+
* ViewMenu's "move to split": the view leaves for a new cell to the
|
|
147
|
+
* right (`row`) or below (`column`) of its own.
|
|
211
148
|
*/
|
|
212
|
-
|
|
149
|
+
moveViewToSplit(viewId: string, direction: 'row' | 'column'): string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* ViewMenu's "move to tab": the view joins an existing tab, which
|
|
152
|
+
* becomes the one shown.
|
|
153
|
+
*/
|
|
154
|
+
moveViewToTab(viewId: string, tabId: string): void;
|
|
213
155
|
homeUnassignedViews(viewIds: string[]): void;
|
|
214
156
|
} & {
|
|
215
157
|
/**
|
|
216
|
-
* Move one view
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
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.
|
|
158
|
+
* Move one view to a new tab or a split beside its cell, keeping the
|
|
159
|
+
* rest of the arrangement. PUBLIC API: protein3d and msaview call it
|
|
160
|
+
* with the move alone. The second argument is an old plugin signature;
|
|
161
|
+
* the session's own views are read instead.
|
|
230
162
|
*/
|
|
231
|
-
setPendingMove(move: PendingMove | undefined,
|
|
163
|
+
setPendingMove(move: PendingMove | undefined, _allViewIds?: string[]): void;
|
|
232
164
|
/**
|
|
233
|
-
*
|
|
234
|
-
* shapes
|
|
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.
|
|
165
|
+
* Re-arrange the whole workspace, one view per cell, in one of four
|
|
166
|
+
* shapes, in `session.views` order.
|
|
242
167
|
*/
|
|
243
|
-
tileViews(mode: TileMode
|
|
168
|
+
tileViews(mode: TileMode): void;
|
|
244
169
|
/**
|
|
245
170
|
* #action
|
|
246
|
-
* Arrange the session's views into panels
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* layout that seats no view throws rather than leaving a blank tab. A
|
|
253
|
-
* session spec's `layout` and an agent's live re-layout both call it.
|
|
171
|
+
* Arrange the session's views into panels: `applyLayoutSpec`, then
|
|
172
|
+
* `session.views` ordered to the spec's top-to-bottom order, which tabs
|
|
173
|
+
* read their order from. Leaves take view ids or indexes into
|
|
174
|
+
* `session.views`; a layout that seats no view throws rather than
|
|
175
|
+
* leaving a blank tab. A session spec's `layout` and an agent's live
|
|
176
|
+
* re-layout both call it.
|
|
254
177
|
*/
|
|
255
178
|
layoutViews(spec: LayoutSpecNode): string[];
|
|
179
|
+
} & {
|
|
180
|
+
afterAttach(): void;
|
|
256
181
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
257
182
|
export type WorkspaceLayoutMixinType = ReturnType<typeof WorkspaceLayoutMixin>;
|
|
258
183
|
export interface WorkspaceLayout extends Instance<WorkspaceLayoutMixinType> {
|