@jbrowse/app-core 5.0.0-beta.10 → 5.0.0-beta.11

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.
@@ -15,10 +15,13 @@ export declare function HistoryManagementMixin(): import("@jbrowse/mobx-state-tr
15
15
  }, {
16
16
  history: unknown[];
17
17
  notTrackingUndo: boolean;
18
+ hasPendingRecord: boolean;
18
19
  } & {
19
20
  readonly canUndo: boolean;
20
21
  readonly canRedo: boolean;
21
22
  } & {
23
+ setHasPendingRecord(value: boolean): void;
24
+ flushPendingRecord(): void;
22
25
  stopTrackingUndo(): void;
23
26
  resumeTrackingUndo(): void;
24
27
  addUndoState(snapshot: unknown): void;
@@ -1019,7 +1019,7 @@ const JB_HELP = `jb drives this JBrowse app programmatically (window.jb in a bro
1019
1019
 
1020
1020
  Orient first: jb.sessionSummary(). Introspect, never guess: jb.listTracks(search?, limit?) answers { total, tracks } with the trackIds; jb.describeSlots(jb.trackModel('someTrackId').activeDisplay.configuration) for the settings keys a display accepts — an unknown settings key is not an error, it lands in applyDisplaySettings' "unapplied" list as { key, reason }, so read the report; jb.inspect(node) — jb.view(), jb.trackModel('someTrackId'), session.views[0] — for its getters, actions and modelType.
1021
1021
 
1022
- The model is mobx-state-tree: mutate only through actions (raw assignment throws), and write display settings with track.applyDisplaySettings(settings). A feature or variant track groups and colors through two settings, track.applyDisplaySettings({ facet: 'strand' or { field, domain? }, color: a CSS color or { field: 'type', domain?, range? } }), where null resets any setting; it filters with activeDisplay.setFilter(['jexl:feature.score > 10']). An alignments track takes the same facet, its field a read dimension ('pairOrientation', 'mapq', ...) or a tag ('tags.HP'). LinearMarkDisplay plots a track's features as ggplot2 does, on a feature, alignments, variant or quantitative track, in five settings: marks, a list drawn in order of { mark: 'bar' | 'point' | 'rule' | 'line' | 'span' | 'text' | 'link', encoding: { y: 'score', x?, x2?, row?, color?, shape?, text?, size? }, each a feature field or a jexl: expression, a constant written { value: 'red' }, transform?: steps such as { type: 'coverage' } or a bin then an aggregate, which fill the y they write, minBpPerPx?, maxBpPerPx? }, beside transform, facet, rows and scales ({ y: { type, domainMin, domainMax, autoscaleGroup, title } }). await view.launchTrack(trackId, {}, { type: 'LinearMarkDisplay', marks: [...] }) draws a track with it, shown already or not (on a GWASTrack, type 'LinearManhattanDisplay'). Its markPlot is those five as JSON: edit structuredClone(activeDisplay.markPlot), check it with activeDisplay.plotProblems(plot), and apply it with applyDisplaySettings(plot), on this track or another track's mark display; activeDisplay.notices names a mark the config cannot draw, or one whose field no loaded feature holds. Build views declaratively with jb.loadSessionSpec({ views: [{ type: 'LinearGenomeView', assembly, loc, tracks: [...] }] }), which replaces the session; jb.addView(oneViewSpec) opens one more view beside what is open; jb.setSession(document) rewrites the session as a document — what jb.mst.getSnapshot(jb.session) answers, edited: a view keeps its id and is patched in place, loc on it navigates, a { trackId } entry in its tracks opens that track. Act on a view with await view.navToLocString('BRCA1' or 'chr1:1-1000'), which also SHOWS the track whose search index answered a gene name unless a 4th arg { showHitTrack: false } says not to; await view.launchTrack(trackId, {}, settings) shows a track with settings, view.hideTrack(trackId) hides it. Arrange open views into panels with session.layoutViews({ direction: 'horizontal', children: [{ views: [viewId] }, ...] }), a leaf naming view ids or session.views indexes; await jb.fitToWindow() shrinks what is open until the session fits the window; add data with jb.addTrack({ location }) (an absolute path or a URL), or show a track the catalog already holds with jb.addTrack({ trackId, settings? }); read data with await jb.getFeatures({ trackId, loc?, assembly?, viewId?, regions?, byteLimit? }), which renames refNames ("chr1" vs "1") so the file answers and reads on the worker the track's display uses. Anything lower level is jb.require('@jbrowse/core/util') and friends, the module registry plugins link against. After changing anything, await jb.waitReady(ms) and read its notifications and notReady lists before trusting the screen.
1022
+ The model is mobx-state-tree: mutate only through actions (raw assignment throws), and write display settings with track.applyDisplaySettings(settings). A display's grammar settings are its plot, activeDisplay.plot, by slot name: facet ('strand' or { field, domain? }), color (a CSS color or { field: 'type', domain?, range? }), rows, scales, filter (['jexl:feature.score > 10']), and on a mark display marks and transform. Edit structuredClone(activeDisplay.plot), check it with activeDisplay.plotProblems(draft), which throws what a config refuses, and write it with activeDisplay.applyPlot(draft): each setting replaced whole, null resetting one. An alignments track takes the same facet, its field a read dimension ('pairOrientation', 'mapq', ...) or a tag ('tags.HP'). LinearMarkDisplay plots a track's features as ggplot2 does, on a feature, alignments, variant or quantitative track, in seven settings: marks, a list drawn in order of { mark: 'bar' | 'point' | 'rule' | 'line' | 'span' | 'text' | 'link', encoding: { y: 'score', x?, x2?, row?, color?, shape?, text?, size? }, each a feature field or a jexl: expression, a constant written { value: 'red' }, transform?: steps such as { type: 'coverage' } or a bin then an aggregate, which fill the y they write, minBpPerPx?, maxBpPerPx? }, beside transform, facet, rows, rowColor, scales ({ y: { type, domainMin, domainMax, autoscaleGroup, title } }) and filter. await view.launchTrack(trackId, {}, { type: 'LinearMarkDisplay', marks: [...] }) draws a track with it, shown already or not (on a GWASTrack, type 'LinearManhattanDisplay'). activeDisplay.notices names a mark the config cannot draw, or one whose field no loaded feature holds. Build views declaratively with jb.loadSessionSpec({ views: [{ type: 'LinearGenomeView', assembly, loc, tracks: [...] }] }), which replaces the session; jb.addView(oneViewSpec) opens one more view beside what is open; jb.setSession(document) rewrites the session as a document — what jb.mst.getSnapshot(jb.session) answers, edited: a view keeps its id and is patched in place, loc on it navigates, a { trackId } entry in its tracks opens that track. Act on a view with await view.navToLocString('BRCA1' or 'chr1:1-1000'), which also SHOWS the track whose search index answered a gene name unless a 4th arg { showHitTrack: false } says not to; await view.launchTrack(trackId, {}, settings) shows a track with settings, view.hideTrack(trackId) hides it. Arrange open views into panels with session.layoutViews({ direction: 'horizontal', children: [{ views: [viewId] }, ...] }), a leaf naming view ids or session.views indexes; await jb.fitToWindow() shrinks what is open until the session fits the window; add data with jb.addTrack({ location }) (an absolute path or a URL), or show a track the catalog already holds with jb.addTrack({ trackId, settings? }); read data with await jb.getFeatures({ trackId, loc?, assembly?, viewId?, regions?, byteLimit? }), which renames refNames ("chr1" vs "1") so the file answers and reads on the worker the track's display uses. Anything lower level is jb.require('@jbrowse/core/util') and friends, the module registry plugins link against. After changing anything, await jb.waitReady(ms) and read its notifications and notReady lists before trusting the screen.
1023
1023
 
1024
1024
  Views nest and several can be open. jb.view(viewId?) is the open view, and jb.view(), jb.trackModel(trackId), jb.visibleRegions(), jb.addTrack and jb.getFeatures over a visible region throw naming the candidates rather than picking one when more than one view could answer — pass viewId (from jb.sessionSummary()) to say which. A synteny or breakpoint view's viewId also covers its rows: the named view answers when it can, and otherwise its rows do.
1025
1025
 
@@ -137,7 +137,7 @@ export declare function WorkspaceLayoutMixin(): import("@jbrowse/mobx-state-tree
137
137
  *
138
138
  * Mounts no views that were not mounted — it is the same cell showing
139
139
  * the same tab — and unmounts every other cell's, so the WebGL2
140
- * context ceiling (`agent-docs/reference/GPU_CONTEXT_BUDGET.md`) can
140
+ * context ceiling (`agent-docs/reference/GPU_PORTABILITY.md`) can
141
141
  * only go down. That is the reason it is this and not a `display:
142
142
  * none` over a still-mounted workspace.
143
143
  */
@@ -280,7 +280,7 @@ export function WorkspaceLayoutMixin() {
280
280
  *
281
281
  * Mounts no views that were not mounted — it is the same cell showing
282
282
  * the same tab — and unmounts every other cell's, so the WebGL2
283
- * context ceiling (`agent-docs/reference/GPU_CONTEXT_BUDGET.md`) can
283
+ * context ceiling (`agent-docs/reference/GPU_PORTABILITY.md`) can
284
284
  * only go down. That is the reason it is this and not a `display:
285
285
  * none` over a still-mounted workspace.
286
286
  */
@@ -22,7 +22,7 @@
22
22
  * the scroll port restores the band and measures as a wash on scroll cost while
23
23
  * roughly doubling live contexts — and the ceiling is 16 live contexts, so the
24
24
  * cap bites before the rebuild saving pays for itself.
25
- * agent-docs/reference/GPU_CONTEXT_BUDGET.md has the numbers and the three
25
+ * agent-docs/reference/GPU_PORTABILITY.md has the numbers and the three
26
26
  * other fixes that were measured and eliminated.
27
27
  *
28
28
  * Starts hidden so a cold load with N crammed views doesn't mount them all at
@@ -28,7 +28,7 @@ function intersectionObserverAvailable() {
28
28
  * the scroll port restores the band and measures as a wash on scroll cost while
29
29
  * roughly doubling live contexts — and the ceiling is 16 live contexts, so the
30
30
  * cap bites before the rebuild saving pays for itself.
31
- * agent-docs/reference/GPU_CONTEXT_BUDGET.md has the numbers and the three
31
+ * agent-docs/reference/GPU_PORTABILITY.md has the numbers and the three
32
32
  * other fixes that were measured and eliminated.
33
33
  *
34
34
  * Starts hidden so a cold load with N crammed views doesn't mount them all at
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/app-core",
3
- "version": "5.0.0-beta.10",
3
+ "version": "5.0.0-beta.11",
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.6.1",
27
+ "@jbrowse/mobx-state-tree": "^6.7.0",
28
28
  "@mui/icons-material": "^9.4.0",
29
29
  "@mui/material": "^9.4.0",
30
30
  "mobx": "^7.0.5",
31
31
  "mobx-react": "^10.0.2",
32
- "@jbrowse/product-core": "^5.0.0-beta.10",
33
- "@jbrowse/core": "^5.0.0-beta.10"
32
+ "@jbrowse/core": "^5.0.0-beta.11",
33
+ "@jbrowse/product-core": "^5.0.0-beta.11"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": ">=19.0.0",