@jbrowse/plugin-linear-genome-view 5.0.0-beta.1 → 5.0.0-beta.3

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.
Files changed (45) hide show
  1. package/esm/LaunchLinearGenomeView/index.js +2 -13
  2. package/esm/LinearGenomeView/afterAttach.js +16 -18
  3. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
  4. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +1 -1
  5. package/esm/LinearGenomeView/components/PaddingBlocks.js +11 -1
  6. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +37 -3
  7. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -1
  8. package/esm/LinearGenomeView/components/TrackContainer.js +46 -4
  9. package/esm/LinearGenomeView/components/TrackLabelButtons.js +2 -2
  10. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +2 -2
  11. package/esm/LinearGenomeView/components/TrackLabelMenu.js +3 -2
  12. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +2 -1
  13. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +5 -15
  14. package/esm/LinearGenomeView/components/ZoomButton.js +6 -1
  15. package/esm/LinearGenomeView/components/ZoomTransform.js +4 -0
  16. package/esm/LinearGenomeView/components/searchModes.d.ts +1 -1
  17. package/esm/LinearGenomeView/components/searchModes.js +1 -1
  18. package/esm/LinearGenomeView/consts.js +1 -1
  19. package/esm/LinearGenomeView/containingLgv.d.ts +15 -0
  20. package/esm/LinearGenomeView/containingLgv.js +16 -0
  21. package/esm/LinearGenomeView/index.d.ts +1 -0
  22. package/esm/LinearGenomeView/index.js +8 -1
  23. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  24. package/esm/LinearGenomeView/launchKeys.js +23 -0
  25. package/esm/LinearGenomeView/lazyDialogs.d.ts +1 -1
  26. package/esm/LinearGenomeView/linkedViewSync.d.ts +1 -1
  27. package/esm/LinearGenomeView/linkedViewSync.js +6 -0
  28. package/esm/LinearGenomeView/model.d.ts +1779 -41
  29. package/esm/LinearGenomeView/model.js +192 -96
  30. package/esm/LinearGenomeView/svgcomponents/figureContract.js +14 -14
  31. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +2 -2
  32. package/esm/LinearGenomeView/types.d.ts +1 -1
  33. package/esm/LinearGenomeView/util.d.ts +31 -0
  34. package/esm/LinearGenomeView/util.js +48 -0
  35. package/esm/displayKitTests/perRegionTestEnv.d.ts +145 -55
  36. package/esm/displayKitTests/perRegionTestEnv.js +26 -25
  37. package/esm/index.d.ts +2 -9
  38. package/esm/index.js +2 -3
  39. package/esm/searchUtils.d.ts +6 -3
  40. package/esm/searchUtils.js +37 -11
  41. package/package.json +8 -8
  42. package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +0 -5
  43. package/esm/LinearGenomeView/FloatingSvgOverlay.js +0 -25
  44. package/esm/LinearGenomeView/initKeys.d.ts +0 -13
  45. package/esm/LinearGenomeView/initKeys.js +0 -104
@@ -7,36 +7,42 @@ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
7
7
  import type { BlockSet, ContentBlock } from '@jbrowse/core/util/blockTypes';
8
8
  import type { Region } from '@jbrowse/core/util/types';
9
9
  import type { ViewStatus } from '@jbrowse/core/util/viewStatus';
10
+ import type { LaunchInput } from '@jbrowse/core/util/withLaunchInput';
10
11
  import type { Instance } from '@jbrowse/mobx-state-tree';
12
+ /** One span of the row that is not track data — see `paddingSpans`. */
13
+ export interface PaddingSpan {
14
+ key: string;
15
+ x: number;
16
+ width: number;
17
+ kind: 'seam' | 'elided' | 'boundary';
18
+ }
11
19
  /**
12
20
  * #stateModel LinearGenomeView
13
21
  * #category view
14
22
  *
15
23
  * #example
16
- * A `LinearGenomeView` is what you hand-author under `defaultSession.views`. The
17
- * `init` shorthand fills in `displayedRegions`/`bpPerPx`/`offsetPx` for you:
24
+ * A `LinearGenomeView` is what you hand-author under `defaultSession.views`, and
25
+ * every setting goes directly on the view object. `assembly`/`loc` fill in
26
+ * `displayedRegions`/`bpPerPx`/`offsetPx` for you:
18
27
  * ```js
19
28
  * defaultSession: {
20
29
  * name: 'My session',
21
30
  * views: [
22
31
  * {
23
32
  * type: 'LinearGenomeView',
24
- * // plain persisted props sit alongside init, not inside it
25
33
  * colorByCDS: true,
26
- * init: {
27
- * assembly: 'hg38',
28
- * loc: 'chr1:1,000,000-1,100,000',
29
- * tracks: ['genes', 'alignments'],
30
- * },
34
+ * assembly: 'hg38',
35
+ * loc: 'chr1:1,000,000-1,100,000',
36
+ * tracks: ['genes', 'alignments'],
31
37
  * },
32
38
  * ],
33
39
  * }
34
40
  * ```
35
- * `init` holds only keys that need on-attach resolution — also `tracklist`,
36
- * `nav`, `highlight` (see the `init` property below). Plain view props like
37
- * `colorByCDS`, `showAminoAcids`, `showCenterLine`, `trackLabels`,
38
- * `showHighlightChips` are set
39
- * directly on the view (MST restores them natively).
41
+ * `assembly`, `loc`, `tracks`, `tracklist`, `nav` and `highlight` need
42
+ * on-attach resolution and are captured into the `launch` property below;
43
+ * `colorByCDS`, `showAminoAcids`, `showCenterLine`, `trackLabels` and
44
+ * `showHighlightChips` are plain view props MST restores natively. Both are
45
+ * written the same way.
40
46
  * At runtime the same model is driven imperatively — every property and action
41
47
  * below is reachable on `viewState.session.views[0]`:
42
48
  * ```js
@@ -53,7 +59,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
53
59
  }, "highlight" | "showHighlightChips"> & {
54
60
  highlight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<HighlightType, HighlightType, HighlightType>>, [undefined]>;
55
61
  showHighlightChips: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
56
- }, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "init" | "labelsVisible" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
62
+ }, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "labelsVisible" | "launch" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
57
63
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
58
64
  type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
59
65
  windowStartBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
@@ -74,13 +80,15 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
74
80
  showAminoAcids: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
75
81
  showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
76
82
  scalebarOnly: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
77
- init: import("@jbrowse/mobx-state-tree").IType<InitState | undefined, InitState | undefined, InitState | undefined>;
83
+ launch: import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>;
78
84
  }, {
79
85
  width: number;
80
86
  bodyMounted: boolean;
81
87
  } & {
82
88
  readonly effectiveBodyMounted: boolean;
83
89
  menuItems(): MenuItem[];
90
+ readonly ownTracks: import("@jbrowse/core/util").AbstractTrackModel[];
91
+ readonly ownViews: import("@jbrowse/core/util").AbstractViewModel[];
84
92
  } & {
85
93
  setDisplayName(name: string): void;
86
94
  setWidth(newWidth: number): void;
@@ -95,6 +103,15 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
95
103
  } & {
96
104
  afterAttach(): void;
97
105
  } & {
106
+ /**
107
+ * #volatile
108
+ * Height of each track's in-flow label band, measured by
109
+ * TrackContainer as the rendering container's offset inside its Paper.
110
+ * Absent (0) while the label is hidden, overlapping, or not yet
111
+ * measured. Observable, so the offset and height getters re-derive
112
+ * when a band changes.
113
+ */
114
+ trackLabelBands: import("mobx").ObservableMap<string, number>;
98
115
  /**
99
116
  * #volatile
100
117
  */
@@ -115,10 +132,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
115
132
  * #volatile
116
133
  */
117
134
  volatileError: unknown;
118
- /**
119
- * #volatile
120
- */
121
- trackRefs: Record<string, HTMLDivElement>;
122
135
  /**
123
136
  * #volatile
124
137
  */
@@ -153,6 +166,16 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
153
166
  */
154
167
  volatileGuides: VolatileGuide[];
155
168
  } & {
169
+ /**
170
+ * #getter
171
+ * the launch state that still has something to apply — the gate every
172
+ * loading and error path below reads.
173
+ */
174
+ readonly pendingLaunch: LaunchInput<InitState & {
175
+ unknown?: Record<string, unknown>;
176
+ malformed?: Record<string, unknown>;
177
+ legacyInit?: boolean;
178
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>>> | undefined;
156
179
  /**
157
180
  * #getter
158
181
  * corresponds roughly to the zoom level, base-pairs per pixel.
@@ -219,6 +242,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
219
242
  */
220
243
  readonly stickyViewHeaders: boolean;
221
244
  } & {
245
+ /**
246
+ * #getter
247
+ * The census entry for this view: the tracks it holds itself. Declared
248
+ * rather than derived — see `BaseViewModel.ownTracks`.
249
+ */
250
+ readonly ownTracks: any[];
222
251
  /**
223
252
  * #getter
224
253
  * Assembly-name prefix for the scalebar refName labels, or undefined for
@@ -237,7 +266,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
237
266
  /**
238
267
  * #getter
239
268
  */
240
- readonly assemblyErrors: string;
269
+ readonly assemblyErrors: string | undefined;
241
270
  /**
242
271
  * #getter
243
272
  */
@@ -567,7 +596,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
567
596
  * would mount over empty regions and pxToBp/hover would throw.
568
597
  *
569
598
  * **Not dotplot's or synteny's `initPending`**, which is the bare
570
- * `!!self.init` — "an init blob has not been applied" — and which those
599
+ * `!!self.pendingLaunch` — "an init blob has not been applied" — and which those
571
600
  * views read from their `settled` gate rather than from `showLoading`.
572
601
  * This one is narrower on purpose: it closes only the window where there
573
602
  * is nothing on screen. Once navigation has produced regions the view is
@@ -637,14 +666,10 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
637
666
  * #getter
638
667
  * A track's full cost beyond its display height.
639
668
  *
640
- * The track *label* is not counted, and cannot be: an offset label is an
641
- * in-flow box whose height is whatever the theme renders a Paper of icon
642
- * buttons at — 31.140625px on the stock theme, and not a number this file
643
- * can derive. So these getters are exact while labels are hidden or
644
- * overlapping, and short by one label box per labelled track otherwise.
645
- * Anything needing the offset to the pixel with labels showing measures
646
- * the DOM; `BreakpointSplitViewOverlay` does, and falls back to this
647
- * arithmetic only for a track with no mounted div.
669
+ * The track *label* is not counted here: an offset label is an in-flow
670
+ * box whose height is whatever the theme renders a Paper of icon buttons
671
+ * at, so it is measured into `trackLabelBands` per track and added by
672
+ * `trackLabelBand` rather than derived.
648
673
  */
649
674
  readonly trackChromeHeight: number;
650
675
  /**
@@ -673,6 +698,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
673
698
  * can't diverge from what is on screen.
674
699
  */
675
700
  trackHeight(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): any;
701
+ /**
702
+ * #method
703
+ * the measured in-flow label band above a track's rendering container,
704
+ * 0 until TrackContainer has measured one or when no label is in flow
705
+ */
706
+ trackLabelBand(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): number;
676
707
  /**
677
708
  * #getter
678
709
  */
@@ -692,10 +723,10 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
692
723
  * first, then unpinned), from the same constants TrackContainer lays its
693
724
  * Paper out with. Returns `undefined` if the track is not present.
694
725
  *
695
- * Exact while track labels are hidden or overlapping. With an offset
696
- * label the answer is short by one label box per labelled track above
697
- * this one — see `trackChromeHeight` for why that box is not derivable
698
- * here.
726
+ * Includes each track's measured label band, this track's own included,
727
+ * since an in-flow label sits above the rendering container inside the
728
+ * same Paper. Exact once TrackContainer has measured; before that it is
729
+ * short by the unmeasured bands.
699
730
  */
700
731
  getTrackYOffset(trackId: string): number | undefined;
701
732
  /**
@@ -807,6 +838,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
807
838
  /**
808
839
  * #action
809
840
  */
841
+ setTrackLabelBand(trackId: string, band: number): void;
810
842
  setWidth(newWidth: number): void;
811
843
  /**
812
844
  * #action
@@ -888,6 +920,13 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
888
920
  * #action
889
921
  */
890
922
  hideTrack(trackId: string): boolean;
923
+ } & {
924
+ /**
925
+ * #action
926
+ * showTrack for a track whose display state model may be lazily
927
+ * loaded: loads it, then shows
928
+ */
929
+ launchTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): Promise<any>;
891
930
  } & {
892
931
  /**
893
932
  * #action
@@ -913,6 +952,11 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
913
952
  * #action
914
953
  */
915
954
  toggleTrack(trackId: string): boolean;
955
+ /**
956
+ * #action
957
+ * toggleTrack with launchTrack's loading behavior
958
+ */
959
+ launchToggleTrack(trackId: string): Promise<boolean>;
916
960
  /**
917
961
  * #action
918
962
  */
@@ -969,12 +1013,13 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
969
1013
  /**
970
1014
  * #action
971
1015
  */
972
- setInit(arg?: InitState): void;
1016
+ setLaunch(launch?: LaunchInput<InitState>): void;
973
1017
  /**
974
1018
  * #method
975
- * creates an svg export and save using FileSaver
1019
+ * renders the view to SVG markup, which it returns; saves it through
1020
+ * FileSaver unless `save: false`
976
1021
  */
977
- exportSvg(opts?: ExportSvgOptions): Promise<void>;
1022
+ exportSvg(opts?: ExportSvgOptions): Promise<string>;
978
1023
  } & {
979
1024
  slide: (viewWidths: number) => void;
980
1025
  zoom: (targetBpPerPx: number) => void;
@@ -1223,7 +1268,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
1223
1268
  * The seam is the one that must survive: regions lay out contiguously,
1224
1269
  * so it is all that separates two of them.
1225
1270
  */
1226
- readonly paddingSpans: {
1271
+ readonly paddingSpans: readonly {
1227
1272
  key: string;
1228
1273
  x: number;
1229
1274
  width: number;
@@ -1287,6 +1332,1695 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
1287
1332
  screenStartPx: number;
1288
1333
  screenEndPx: number;
1289
1334
  }[];
1335
+ /**
1336
+ * #getter
1337
+ * Right edge (px, viewport-relative) of the on-screen content, clamped
1338
+ * to the track — where a right-pinned overlay such as a wiggle's colour
1339
+ * or score legend belongs, rather than out in the empty gutter the
1340
+ * regions can leave at whole-genome zoom. `@jbrowse/display-kit`'s
1341
+ * `contentRightEdgePx` states the rule; an SVG export applies the same
1342
+ * one against the export's canvas width instead of this track's.
1343
+ *
1344
+ * Published as a SCALAR on purpose. `visibleRegions` rebuilds a fresh
1345
+ * array of fresh objects on every pan and zoom frame, so a component
1346
+ * that derived this number itself re-rendered on every frame of every
1347
+ * gesture — to produce, whenever content fills the track, the unchanged
1348
+ * `trackWidthPx`. Reading the scalar lets MobX's `===` stop the chain at
1349
+ * this computed instead. Measured over 20 zoom frames: the wiggle
1350
+ * family's three body instances fell from 66 renders to 7.
1351
+ */
1352
+ readonly contentRightEdgePx: number;
1353
+ /**
1354
+ * #getter
1355
+ * visibleRegions expanded by a half-screen buffer on each side,
1356
+ * clamped to displayedRegion bounds, with integer-rounded coordinates.
1357
+ * Use this when fetching data that should extend slightly beyond the
1358
+ * viewport for smooth scrolling.
1359
+ */
1360
+ readonly bufferedVisibleRegions: {
1361
+ region: {
1362
+ refName: string;
1363
+ start: number;
1364
+ end: number;
1365
+ assemblyName: string;
1366
+ reversed: boolean | undefined;
1367
+ };
1368
+ displayedRegionIndex: number;
1369
+ }[];
1370
+ /**
1371
+ * #getter
1372
+ * a single "combo-locstring" representing all the regions visible on
1373
+ * the screen
1374
+ */
1375
+ readonly visibleLocStrings: string;
1376
+ /**
1377
+ * #getter
1378
+ * **What a debounced consumer clips to**: the coarse blocks once the
1379
+ * view has settled at least once, the live ones before that.
1380
+ *
1381
+ * The coarse blocks exist so a per-bp scan does not recompute on every
1382
+ * animation frame during a pan or zoom — wiggle's autoscale domain, the
1383
+ * alignments coverage scale and MAF's coverage band are the three — and
1384
+ * while they are stale
1385
+ * the answer is merely a frame or two old, which is what the debounce
1386
+ * means. **Empty is different in kind.** A scan over no blocks yields no
1387
+ * entries, and no entries is not a stale domain, it is the fallback one:
1388
+ * `[0,1]`, which draws a line plot blank and a density plot saturated.
1389
+ * That window is the 500ms between a view initializing and the coarse
1390
+ * autorun's first run, and data can now land inside it — the per-region
1391
+ * fetch used to be trailing-edge at 600ms, so it never did.
1392
+ *
1393
+ * One recompute at that transition, against N per frame, which is the
1394
+ * trade the guard was making anyway.
1395
+ */
1396
+ readonly settledDynamicBlocks: ContentBlock[];
1397
+ /**
1398
+ * #getter
1399
+ * same as visibleLocStrings, but only updated every 500ms
1400
+ */
1401
+ readonly coarseVisibleLocStrings: string;
1402
+ /**
1403
+ * #getter
1404
+ */
1405
+ readonly coarseTotalBpDisplayStr: string;
1406
+ /**
1407
+ * #getter
1408
+ */
1409
+ readonly effectiveTotalBp: number;
1410
+ /**
1411
+ * #getter
1412
+ */
1413
+ readonly effectiveTotalBpDisplayStr: string;
1414
+ } & {
1415
+ /**
1416
+ * #action
1417
+ */
1418
+ setCoarseDynamicBlocks(blocks: BlockSet, bpPerPx: number): void;
1419
+ } & {
1420
+ /**
1421
+ * #action
1422
+ * Bring the coarse blocks to the viewport as it stands now, for a
1423
+ * placement that JUMPED rather than travelled.
1424
+ *
1425
+ * The coarse blocks are a 500ms throttle, and every consumer trades
1426
+ * freshness for not recomputing per animation frame — the location box,
1427
+ * canvas's on-screen feature set, and the two per-bp scans behind
1428
+ * `settledDynamicBlocks`. That trade is only sound while the answer is a
1429
+ * few frames old. **A jump makes it unrelated instead**, because there is
1430
+ * nothing to coalesce: the viewport left behind is not an approximation of
1431
+ * the new one, it is a different place. Unsettled, the location box reads
1432
+ * as a navigation that didn't happen, and wiggle's autoscale domain is
1433
+ * computed over the window the user just left — measured at `[0,200]`
1434
+ * against a correct `[0,300]` when a 40bp coarse window survived a jump to
1435
+ * 4040bp on screen. Only the per-region fetch moving to the leading edge
1436
+ * made that reachable: at 600ms the data never landed inside the hole.
1437
+ *
1438
+ * **The continuous paths deliberately do not come through here.** The
1439
+ * spring zoom writes through `zoomTo` per frame and a drag through
1440
+ * `scrollTo`, so this adds no per-frame work; the settle is idempotent
1441
+ * (`setCoarseDynamicBlocks` compares block keys), so the debounced
1442
+ * autorun's own follow-up run costs nothing.
1443
+ *
1444
+ * Every placer calls it, and `placersSettleCoarseBlocks.test.ts` is what
1445
+ * makes that true of the next one — it scans this file for the writes and
1446
+ * fails on a placer that reaches neither the settle nor its named list of
1447
+ * continuous paths. Two passes by hand missed four.
1448
+ */
1449
+ settleCoarseBlocks(): void;
1450
+ } & {
1451
+ /**
1452
+ * #action
1453
+ * offset is the base-pair-offset in the displayed region, index is the
1454
+ * index of the displayed region in the linear genome view
1455
+ *
1456
+ * @param start - object as `{start, end, offset, index}`
1457
+ * @param end - object as `{start, end, offset, index}`
1458
+ */
1459
+ moveTo(start?: BpOffset, end?: BpOffset): void;
1460
+ /**
1461
+ * #action
1462
+ * Place the viewport by the pair of PIXEL quantities it used to be stored
1463
+ * as. Prefer `setWindow`: pixels mean nothing without the width they were
1464
+ * measured at, so a round trip through here is only exact while the width
1465
+ * holds still. Kept for callers that genuinely have pixels — a wheel
1466
+ * gesture, a rubberband — and for reading old snapshots.
1467
+ */
1468
+ setNewView(bpPerPx: number, offsetPx: number): void;
1469
+ /**
1470
+ * #action
1471
+ * Place the viewport by the pair it is actually STORED as: the window's
1472
+ * width and left edge, both in bp. `setNewView`'s bp-space twin, and the
1473
+ * right one for anything that captures a viewport and puts it back later
1474
+ * (an Undo, a saved location) — those two moments can be a window resize
1475
+ * apart, and this pair survives one where a pixel pair does not.
1476
+ *
1477
+ * Still clamped, by the same zoom and scroll limits as every other mover:
1478
+ * the regions may have changed under it, and a window the new set can't
1479
+ * hold is not restorable however it was spelled.
1480
+ */
1481
+ setWindow(windowWidthBp: number, windowStartBp: number): void;
1482
+ /**
1483
+ * #action
1484
+ * `setWindow` without the settle, for a writer that runs per animation
1485
+ * frame. Flushing the coarse blocks sixty times a second is the one thing
1486
+ * such a writer must not do: they are a 500ms throttle that a synteny
1487
+ * follow pass and two autoscale domains hang off, and settling each frame
1488
+ * turns each of those into per-frame work — `positionViewOnSpans` states
1489
+ * the same rule for the same reason.
1490
+ */
1491
+ setWindowFrame(windowWidthBp: number, windowStartBp: number): void;
1492
+ /**
1493
+ * #action
1494
+ * The worst jump of them to leave unsettled: the coarse blocks are keyed
1495
+ * by `displayedRegionIndex`, so a set that outlives the region list has a
1496
+ * consumer reading one contig's data against another's blocks.
1497
+ */
1498
+ setDisplayedRegions(regions: Region[]): void;
1499
+ /**
1500
+ * #action
1501
+ * Re-assert `maxBpPerPx` over the current zoom, for a container whose
1502
+ * shared ceiling just fell — otherwise the view is stranded above it with
1503
+ * zoom-out disabled and the slider's min past its value. Goes through
1504
+ * `zoomTo` so the clamp keeps one definition, and settles because a
1505
+ * ceiling drop moves the window in one step.
1506
+ *
1507
+ * Requires an `initialized` view; the caller checks, since an MST action
1508
+ * reads untracked and a guard here would never re-run once the row
1509
+ * arrived.
1510
+ */
1511
+ clampZoomToCeiling(): void;
1512
+ /**
1513
+ * #action
1514
+ */
1515
+ showAllRegions(): void;
1516
+ /**
1517
+ * #action
1518
+ * Fit the displayed regions to the width exactly, edge to edge.
1519
+ *
1520
+ * Not the same as `showAllRegions`, which goes to `maxBpPerPx` — the
1521
+ * zoom-out LIMIT, where `SHOW_ALL_REGIONS_FILL` deliberately keeps a 10%
1522
+ * margin so the whole genome doesn't sit flush against both edges. That
1523
+ * margin is right for "show me everything" and wrong for a caller that
1524
+ * named the regions it wants: it draws them at 1/0.9 of fit-to-width,
1525
+ * centered, which is a silent 11% scale difference from the
1526
+ * single-region path (`moveTo`, span/width) reached through the same
1527
+ * location box.
1528
+ *
1529
+ * The scale comes from `fitAllRegionsWindow`, which is where the rule is
1530
+ * written — a snapshot builder that cannot call an action needs the same
1531
+ * answer, and the two agreeing matters more than either being local. Where
1532
+ * it clamps up to `minBpPerPx` the content is narrower than the view, and
1533
+ * the centering is what frames it.
1534
+ */
1535
+ fitAllRegions(): void;
1536
+ /**
1537
+ * #action
1538
+ */
1539
+ horizontallyFlip(): void;
1540
+ } & {
1541
+ /**
1542
+ * #action
1543
+ */
1544
+ showAllRegionsInAssembly(assemblyName?: string): void;
1545
+ /**
1546
+ * #action
1547
+ * this "clears the view" and makes the view return to the import form
1548
+ */
1549
+ clearView(): void;
1550
+ /**
1551
+ * #action
1552
+ * Navigate to a location based on its refName and optionally start, end,
1553
+ * and assemblyName. Will not try to change displayed regions, use
1554
+ * `navToLocations` instead. Only navigates to a location if it is
1555
+ * entirely within a displayedRegion. Navigates to the first matching
1556
+ * location encountered.
1557
+ *
1558
+ * Throws an error if navigation was unsuccessful
1559
+ *
1560
+ * @param query - a proposed location to navigate to
1561
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1562
+ * adds 20% padding on each side)
1563
+ */
1564
+ navTo(query: NavLocation, grow?: number): void;
1565
+ /**
1566
+ * #action
1567
+ * Navigate to a location based on its refName and optionally start, end,
1568
+ * and assemblyName. Will not try to change displayed regions, use
1569
+ * navToLocations instead. Only navigates to a location if it is entirely
1570
+ * within a displayedRegion. Navigates to the first matching location
1571
+ * encountered.
1572
+ *
1573
+ * Throws an error if navigation was unsuccessful
1574
+ *
1575
+ * @param locations - proposed location to navigate to
1576
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1577
+ * adds 20% padding on each side)
1578
+ */
1579
+ navToMultiple(locations: NavLocation[], grow?: number): void;
1580
+ } & {
1581
+ /**
1582
+ * #action
1583
+ * Replace the region list and place the viewport in one step. The pair is
1584
+ * the unit a coarse-block consumer can act on: called separately they
1585
+ * publish the viewport in between, and post-await in `navToLocations`
1586
+ * they are two transactions, so a per-bp scan runs over a window that was
1587
+ * never on screen.
1588
+ *
1589
+ * With no location named it fits the regions rather than going through
1590
+ * `showAllRegions`: the caller named the regions it wants, so it gets the
1591
+ * width, where showAllRegions goes to the zoom-out LIMIT and its 10%
1592
+ * margin is dead frame for a named subset.
1593
+ */
1594
+ showRegions(regions: Region[], location?: NavLocation): void;
1595
+ } & {
1596
+ /**
1597
+ * #action
1598
+ * Navigate to the given locstring, will change displayed regions if
1599
+ * needed, and wait for assemblies to be initialized
1600
+ *
1601
+ * @param input - e.g. "chr1:1-100", "chr1:1-100 chr2:1-100", "chr 1 100"
1602
+ * @param optAssemblyName - (optional) the assembly name to use when
1603
+ * navigating to the locstring
1604
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1605
+ * adds 20% padding on each side)
1606
+ * @param opts - `showHitTrack: false` keeps a text-search hit from also
1607
+ * showing the track its index was built from
1608
+ * @returns whether the view moved. A multi-hit search raises the picker
1609
+ * instead of navigating, and both resolve — see `handleSelectedRegion`.
1610
+ */
1611
+ navToLocString(input: string, optAssemblyName?: string, grow?: number, opts?: {
1612
+ showHitTrack?: boolean;
1613
+ }): Promise<boolean>;
1614
+ /**
1615
+ * #action
1616
+ * Similar to `navToLocString`, but accepts a list of parsed location
1617
+ * objects instead of a locstring. Will try to perform
1618
+ * `setDisplayedRegions` if changing regions
1619
+ *
1620
+ * @param regions - array of parsed location objects
1621
+ * @param assemblyName - optional assembly name
1622
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1623
+ * adds 20% padding on each side)
1624
+ */
1625
+ navToLocations(regions: ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
1626
+ } & {
1627
+ /**
1628
+ * #action
1629
+ * Similar to `navToLocString`, but accepts a parsed location object
1630
+ * instead of a locstring. Will try to perform `setDisplayedRegions` if
1631
+ * changing regions
1632
+ *
1633
+ * @param parsedLocString - a parsed location object with refName, start,
1634
+ * end, etc.
1635
+ * @param assemblyName - optional assembly name
1636
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1637
+ * adds 20% padding on each side)
1638
+ */
1639
+ navToLocation(parsedLocString: ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
1640
+ } & {
1641
+ /**
1642
+ * #method
1643
+ */
1644
+ rubberBandMenuItems(): MenuItem[];
1645
+ /**
1646
+ * #method
1647
+ */
1648
+ bpToPx({ refName, coord, displayedRegionIndex, }: {
1649
+ refName: string;
1650
+ coord: number;
1651
+ displayedRegionIndex?: number;
1652
+ }): {
1653
+ index: number;
1654
+ offsetPx: number;
1655
+ } | undefined;
1656
+ /**
1657
+ * #method
1658
+ * Map a highlight or bookmark region to its pixel position+width inside
1659
+ * the tracks container. Falls back to the raw refName if the region's
1660
+ * assemblyName is missing or unknown so highlights authored without an
1661
+ * assembly still render in single-assembly views.
1662
+ */
1663
+ getHighlightCoords(region: {
1664
+ assemblyName?: string;
1665
+ refName: string;
1666
+ start: number;
1667
+ end: number;
1668
+ }): {
1669
+ width: number;
1670
+ left: number;
1671
+ } | undefined;
1672
+ /**
1673
+ * #method
1674
+ * like getHighlightCoords but laid out against the overview scalebar and
1675
+ * shifted by the cytoband offset
1676
+ */
1677
+ getOverviewHighlightCoords(region: {
1678
+ assemblyName?: string;
1679
+ refName: string;
1680
+ start: number;
1681
+ end: number;
1682
+ }): {
1683
+ width: number;
1684
+ left: number;
1685
+ } | undefined;
1686
+ /**
1687
+ * #method
1688
+ * scrolls the view to center on the given bp. if that is not in any of
1689
+ * the displayed regions, does nothing
1690
+ *
1691
+ * @param coord - basepair at which you want to center the view
1692
+ * @param refName - refName of the displayedRegion you are centering at
1693
+ * @param displayedRegionIndex - index of the displayedRegion
1694
+ */
1695
+ centerAt(coord: number, refName: string, displayedRegionIndex?: number): void;
1696
+ /**
1697
+ * #method
1698
+ */
1699
+ pxToBp(px: number): import("@jbrowse/core/util/Base1DUtils").PxToBpResult;
1700
+ /**
1701
+ * #getter
1702
+ */
1703
+ readonly centerLineInfo: import("@jbrowse/core/util/Base1DUtils").PxToBpResult | undefined;
1704
+ } & {
1705
+ /**
1706
+ * #method
1707
+ */
1708
+ rubberbandClickMenuItems(clickOffset: BpOffset): MenuItem[];
1709
+ /**
1710
+ * #method
1711
+ * returns menu items for a highlight context menu. plugins can extend
1712
+ * this via Core-extendPluggableElement to add their own items
1713
+ */
1714
+ highlightMenuItems(_highlight: HighlightType): MenuItem[];
1715
+ } & {
1716
+ flyTo: (centerBp: number, windowWidthBp: number) => void;
1717
+ /**
1718
+ * #action
1719
+ * `centerAt`'s animated twin: the same destination, reached along the
1720
+ * arc instead of jumped to, at the zoom the view is already on.
1721
+ */
1722
+ flyToCenter(coord: number, refName: string, displayedRegionIndex?: number): void;
1723
+ } & {
1724
+ afterCreate(): void;
1725
+ afterAttach(): void;
1726
+ }, import("@jbrowse/core/util/withLaunchInput").LaunchSnapshotIn<import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<{
1727
+ id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
1728
+ displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
1729
+ minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1730
+ }, "highlight" | "showHighlightChips"> & {
1731
+ highlight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<HighlightType, HighlightType, HighlightType>>, [undefined]>;
1732
+ showHighlightChips: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1733
+ }, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "labelsVisible" | "launch" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
1734
+ id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
1735
+ type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
1736
+ windowStartBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
1737
+ windowWidthBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
1738
+ legacyBpPerPx: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
1739
+ displayedRegions: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<Region[], Region[], Region[]>, [undefined]>;
1740
+ tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
1741
+ hideHeader: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1742
+ hideHeaderOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1743
+ hideNoTracksActive: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1744
+ trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
1745
+ showCenterLine: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1746
+ showCytobands: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1747
+ trackLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
1748
+ showGridlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1749
+ labelsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1750
+ colorByCDS: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1751
+ showAminoAcids: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1752
+ showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1753
+ scalebarOnly: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1754
+ launch: import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>;
1755
+ }, {
1756
+ width: number;
1757
+ bodyMounted: boolean;
1758
+ } & {
1759
+ readonly effectiveBodyMounted: boolean;
1760
+ menuItems(): MenuItem[];
1761
+ readonly ownTracks: import("@jbrowse/core/util").AbstractTrackModel[];
1762
+ readonly ownViews: import("@jbrowse/core/util").AbstractViewModel[];
1763
+ } & {
1764
+ setDisplayName(name: string): void;
1765
+ setWidth(newWidth: number): void;
1766
+ setBodyMounted(flag: boolean): void;
1767
+ setMinimized(flag: boolean): void;
1768
+ } & {
1769
+ addToHighlights(highlight: HighlightType): void;
1770
+ setHighlight(highlight?: HighlightType[]): void;
1771
+ removeHighlight(highlight: HighlightType): void;
1772
+ updateHighlight(old: HighlightType, updates: Partial<HighlightType>): void;
1773
+ setShowHighlightChips(arg: boolean): void;
1774
+ } & {
1775
+ afterAttach(): void;
1776
+ } & {
1777
+ /**
1778
+ * #volatile
1779
+ * Height of each track's in-flow label band, measured by
1780
+ * TrackContainer as the rendering container's offset inside its Paper.
1781
+ * Absent (0) while the label is hidden, overlapping, or not yet
1782
+ * measured. Observable, so the offset and height getters re-derive
1783
+ * when a band changes.
1784
+ */
1785
+ trackLabelBands: import("mobx").ObservableMap<string, number>;
1786
+ /**
1787
+ * #volatile
1788
+ */
1789
+ volatileWidth: number | undefined;
1790
+ /**
1791
+ * #volatile
1792
+ */
1793
+ minimumBlockWidth: number;
1794
+ /**
1795
+ * #volatile
1796
+ */
1797
+ draggingTrackId: undefined | string;
1798
+ /**
1799
+ * #volatile
1800
+ */
1801
+ lastTrackDragY: undefined | number;
1802
+ /**
1803
+ * #volatile
1804
+ */
1805
+ volatileError: unknown;
1806
+ /**
1807
+ * #volatile
1808
+ */
1809
+ coarseDynamicBlocks: ContentBlock[];
1810
+ /**
1811
+ * #volatile
1812
+ */
1813
+ coarseTotalBp: number;
1814
+ /**
1815
+ * #volatile
1816
+ */
1817
+ coarseBpPerPx: number;
1818
+ /**
1819
+ * #volatile
1820
+ */
1821
+ leftOffset: undefined | BpOffset;
1822
+ /**
1823
+ * #volatile
1824
+ */
1825
+ rightOffset: undefined | BpOffset;
1826
+ /**
1827
+ * #volatile
1828
+ */
1829
+ isScalebarRefNameMenuOpen: boolean;
1830
+ /**
1831
+ * #volatile
1832
+ */
1833
+ scalebarRefNameClickPending: boolean;
1834
+ /**
1835
+ * #volatile
1836
+ * temporary vertical guides that can be set by displays (e.g., LD display hover)
1837
+ */
1838
+ volatileGuides: VolatileGuide[];
1839
+ } & {
1840
+ /**
1841
+ * #getter
1842
+ * the launch state that still has something to apply — the gate every
1843
+ * loading and error path below reads.
1844
+ */
1845
+ readonly pendingLaunch: LaunchInput<InitState & {
1846
+ unknown?: Record<string, unknown>;
1847
+ malformed?: Record<string, unknown>;
1848
+ legacyInit?: boolean;
1849
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>>> | undefined;
1850
+ /**
1851
+ * #getter
1852
+ * corresponds roughly to the zoom level, base-pairs per pixel.
1853
+ *
1854
+ * Zero before a width is measured, which is the same not-yet-measured
1855
+ * sentinel `Base1DView` uses and which `displayedRegionsTotalPx` and the
1856
+ * offset getters already guard for. Reads `volatileWidth` rather than the
1857
+ * `width` getter on purpose: that one throws when unmeasured, and these
1858
+ * are read from the first render.
1859
+ */
1860
+ readonly bpPerPx: number;
1861
+ /**
1862
+ * #getter
1863
+ * corresponds roughly to the horizontal scroll of the LGV
1864
+ */
1865
+ readonly offsetPx: number;
1866
+ /**
1867
+ * #getter
1868
+ * scroll-to-zoom is a global, personal preference resolved from the
1869
+ * session; toggling it in any view applies everywhere
1870
+ */
1871
+ readonly scrollZoom: boolean;
1872
+ /**
1873
+ * #getter
1874
+ */
1875
+ readonly pinnedTracks: any[];
1876
+ /**
1877
+ * #getter
1878
+ */
1879
+ readonly unpinnedTracks: any[];
1880
+ /**
1881
+ * #getter
1882
+ * the effective track labels setting, resolving the stored `trackLabels`
1883
+ * against the LinearGenomeViewPlugin config default
1884
+ */
1885
+ readonly effectiveTrackLabels: any;
1886
+ /**
1887
+ * #getter
1888
+ */
1889
+ readonly width: number;
1890
+ /**
1891
+ * #getter
1892
+ * width minus track outline borders (1px each side when shown)
1893
+ */
1894
+ readonly trackWidthPx: number;
1895
+ /**
1896
+ * #getter
1897
+ */
1898
+ readonly assemblyNames: string[];
1899
+ /**
1900
+ * #getter
1901
+ */
1902
+ readonly assemblyDisplayNames: string[];
1903
+ /**
1904
+ * #getter
1905
+ * checking if lgv is a 'top-level' view is used for toggling pin track
1906
+ * capability, sticky positioning
1907
+ */
1908
+ readonly isTopLevelView: boolean;
1909
+ /**
1910
+ * #getter
1911
+ * only uses sticky view headers when it is a 'top-level' view and
1912
+ * session allows it
1913
+ */
1914
+ readonly stickyViewHeaders: boolean;
1915
+ } & {
1916
+ /**
1917
+ * #getter
1918
+ * The census entry for this view: the tracks it holds itself. Declared
1919
+ * rather than derived — see `BaseViewModel.ownTracks`.
1920
+ */
1921
+ readonly ownTracks: any[];
1922
+ /**
1923
+ * #getter
1924
+ * Assembly-name prefix for the scalebar refName labels, or undefined for
1925
+ * none. A container view (e.g. LinearSyntenyView) opts its sub-views in by
1926
+ * exposing showAssemblyNameInSubviewScalebar; duck-typed rather than
1927
+ * matching a concrete view type so no upward plugin dependency is needed
1928
+ * and any container can opt in. A wrong nesting depth simply yields no
1929
+ * prefix — hence the hasParent guard, since getParent throws (rather than
1930
+ * returning undefined) when the view sits shallower than depth 2.
1931
+ */
1932
+ readonly scalebarDisplayPrefix: string | undefined;
1933
+ /**
1934
+ * #getter
1935
+ */
1936
+ readonly assembliesNotFound: string | undefined;
1937
+ /**
1938
+ * #getter
1939
+ */
1940
+ readonly assemblyErrors: string | undefined;
1941
+ /**
1942
+ * #getter
1943
+ */
1944
+ readonly assembliesInitialized: boolean;
1945
+ /**
1946
+ * #getter
1947
+ * the assembly named by a pending `init`, or undefined when no init is
1948
+ * set. `init`'s assembly isn't in `assemblyNames` yet (that derives from
1949
+ * displayedRegions, still empty pre-navigation), so init-phase readiness
1950
+ * and error checks resolve it directly through here.
1951
+ */
1952
+ readonly initAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
1953
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
1954
+ }> & {
1955
+ error: unknown;
1956
+ loadingP: Promise<void> | undefined;
1957
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
1958
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
1959
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
1960
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
1961
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
1962
+ loadedGeneticCodes: Record<string, number> | undefined;
1963
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
1964
+ statusMessage: string | undefined;
1965
+ statusProgress: number | undefined;
1966
+ statusSource: string | undefined;
1967
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
1968
+ } & {
1969
+ getConf(arg: string): any;
1970
+ } & {
1971
+ readonly name: string;
1972
+ readonly aliases: string[];
1973
+ readonly displayName: string;
1974
+ readonly refNameColors: string[];
1975
+ } & {
1976
+ readonly allAliases: string[];
1977
+ hasName(name: string): boolean;
1978
+ } & {
1979
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
1980
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
1981
+ } & {
1982
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
1983
+ regions: import("@jbrowse/core/util").Region[];
1984
+ cytobands: import("@jbrowse/core/util").Feature[];
1985
+ geneticCodes: Record<string, number>;
1986
+ }): void;
1987
+ setError(e: unknown): void;
1988
+ setLoadingP(p?: Promise<void>): void;
1989
+ loadPre(): Promise<void>;
1990
+ } & {
1991
+ load(): Promise<void>;
1992
+ } & {
1993
+ afterAttach(): void;
1994
+ } & {
1995
+ readonly initialized: boolean;
1996
+ readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
1997
+ readonly allRefNames: string[] | undefined;
1998
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
1999
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2000
+ } & {
2001
+ readonly refNames: string[] | undefined;
2002
+ } & {
2003
+ readonly refNameToIndex: Map<string, number> | undefined;
2004
+ } & {
2005
+ getCanonicalRefName(refName: string): string | undefined;
2006
+ getRefNameColor(refName: string): string | undefined;
2007
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2008
+ getGeneticCodeId(refName: string): number;
2009
+ getSeqAdapterRefName(canonicalRefName: string): string;
2010
+ } & {
2011
+ getCanonicalRefName2(refName: string): string;
2012
+ isValidRefName(refName: string): boolean;
2013
+ } & {
2014
+ getAliasesForRefName(refName: string): string[];
2015
+ getRefNameMapForAdapter(adapterConf: {
2016
+ [x: string]: unknown;
2017
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2018
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2019
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
2020
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
2021
+ }, {
2022
+ error: unknown;
2023
+ loadingP: Promise<void> | undefined;
2024
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2025
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2026
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2027
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2028
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2029
+ loadedGeneticCodes: Record<string, number> | undefined;
2030
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2031
+ statusMessage: string | undefined;
2032
+ statusProgress: number | undefined;
2033
+ statusSource: string | undefined;
2034
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2035
+ } & {
2036
+ getConf(arg: string): any;
2037
+ } & {
2038
+ readonly name: string;
2039
+ readonly aliases: string[];
2040
+ readonly displayName: string;
2041
+ readonly refNameColors: string[];
2042
+ } & {
2043
+ readonly allAliases: string[];
2044
+ hasName(name: string): boolean;
2045
+ } & {
2046
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2047
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2048
+ } & {
2049
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2050
+ regions: import("@jbrowse/core/util").Region[];
2051
+ cytobands: import("@jbrowse/core/util").Feature[];
2052
+ geneticCodes: Record<string, number>;
2053
+ }): void;
2054
+ setError(e: unknown): void;
2055
+ setLoadingP(p?: Promise<void>): void;
2056
+ loadPre(): Promise<void>;
2057
+ } & {
2058
+ load(): Promise<void>;
2059
+ } & {
2060
+ afterAttach(): void;
2061
+ } & {
2062
+ readonly initialized: boolean;
2063
+ readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2064
+ readonly allRefNames: string[] | undefined;
2065
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2066
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2067
+ } & {
2068
+ readonly refNames: string[] | undefined;
2069
+ } & {
2070
+ readonly refNameToIndex: Map<string, number> | undefined;
2071
+ } & {
2072
+ getCanonicalRefName(refName: string): string | undefined;
2073
+ getRefNameColor(refName: string): string | undefined;
2074
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2075
+ getGeneticCodeId(refName: string): number;
2076
+ getSeqAdapterRefName(canonicalRefName: string): string;
2077
+ } & {
2078
+ getCanonicalRefName2(refName: string): string;
2079
+ isValidRefName(refName: string): boolean;
2080
+ } & {
2081
+ getAliasesForRefName(refName: string): string[];
2082
+ getRefNameMapForAdapter(adapterConf: {
2083
+ [x: string]: unknown;
2084
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2085
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2086
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
2087
+ /**
2088
+ * #getter
2089
+ */
2090
+ readonly initialized: boolean;
2091
+ /**
2092
+ * #getter
2093
+ */
2094
+ readonly hasDisplayedRegions: boolean;
2095
+ /**
2096
+ * #getter
2097
+ * The assembly whose load the spinner is waiting on: the one `init` names
2098
+ * before navigation (it isn't in assemblyNames yet), else the first of the
2099
+ * displayed assemblies that hasn't finished loading.
2100
+ */
2101
+ readonly loadingAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
2102
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
2103
+ }> & {
2104
+ error: unknown;
2105
+ loadingP: Promise<void> | undefined;
2106
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2107
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2108
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2109
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2110
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2111
+ loadedGeneticCodes: Record<string, number> | undefined;
2112
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2113
+ statusMessage: string | undefined;
2114
+ statusProgress: number | undefined;
2115
+ statusSource: string | undefined;
2116
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2117
+ } & {
2118
+ getConf(arg: string): any;
2119
+ } & {
2120
+ readonly name: string;
2121
+ readonly aliases: string[];
2122
+ readonly displayName: string;
2123
+ readonly refNameColors: string[];
2124
+ } & {
2125
+ readonly allAliases: string[];
2126
+ hasName(name: string): boolean;
2127
+ } & {
2128
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2129
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2130
+ } & {
2131
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2132
+ regions: import("@jbrowse/core/util").Region[];
2133
+ cytobands: import("@jbrowse/core/util").Feature[];
2134
+ geneticCodes: Record<string, number>;
2135
+ }): void;
2136
+ setError(e: unknown): void;
2137
+ setLoadingP(p?: Promise<void>): void;
2138
+ loadPre(): Promise<void>;
2139
+ } & {
2140
+ load(): Promise<void>;
2141
+ } & {
2142
+ afterAttach(): void;
2143
+ } & {
2144
+ readonly initialized: boolean;
2145
+ readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2146
+ readonly allRefNames: string[] | undefined;
2147
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2148
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2149
+ } & {
2150
+ readonly refNames: string[] | undefined;
2151
+ } & {
2152
+ readonly refNameToIndex: Map<string, number> | undefined;
2153
+ } & {
2154
+ getCanonicalRefName(refName: string): string | undefined;
2155
+ getRefNameColor(refName: string): string | undefined;
2156
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2157
+ getGeneticCodeId(refName: string): number;
2158
+ getSeqAdapterRefName(canonicalRefName: string): string;
2159
+ } & {
2160
+ getCanonicalRefName2(refName: string): string;
2161
+ isValidRefName(refName: string): boolean;
2162
+ } & {
2163
+ getAliasesForRefName(refName: string): string[];
2164
+ getRefNameMapForAdapter(adapterConf: {
2165
+ [x: string]: unknown;
2166
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2167
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2168
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
2169
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
2170
+ }, {
2171
+ error: unknown;
2172
+ loadingP: Promise<void> | undefined;
2173
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2174
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2175
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2176
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2177
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2178
+ loadedGeneticCodes: Record<string, number> | undefined;
2179
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2180
+ statusMessage: string | undefined;
2181
+ statusProgress: number | undefined;
2182
+ statusSource: string | undefined;
2183
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2184
+ } & {
2185
+ getConf(arg: string): any;
2186
+ } & {
2187
+ readonly name: string;
2188
+ readonly aliases: string[];
2189
+ readonly displayName: string;
2190
+ readonly refNameColors: string[];
2191
+ } & {
2192
+ readonly allAliases: string[];
2193
+ hasName(name: string): boolean;
2194
+ } & {
2195
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2196
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2197
+ } & {
2198
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2199
+ regions: import("@jbrowse/core/util").Region[];
2200
+ cytobands: import("@jbrowse/core/util").Feature[];
2201
+ geneticCodes: Record<string, number>;
2202
+ }): void;
2203
+ setError(e: unknown): void;
2204
+ setLoadingP(p?: Promise<void>): void;
2205
+ loadPre(): Promise<void>;
2206
+ } & {
2207
+ load(): Promise<void>;
2208
+ } & {
2209
+ afterAttach(): void;
2210
+ } & {
2211
+ readonly initialized: boolean;
2212
+ readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2213
+ readonly allRefNames: string[] | undefined;
2214
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2215
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2216
+ } & {
2217
+ readonly refNames: string[] | undefined;
2218
+ } & {
2219
+ readonly refNameToIndex: Map<string, number> | undefined;
2220
+ } & {
2221
+ getCanonicalRefName(refName: string): string | undefined;
2222
+ getRefNameColor(refName: string): string | undefined;
2223
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2224
+ getGeneticCodeId(refName: string): number;
2225
+ getSeqAdapterRefName(canonicalRefName: string): string;
2226
+ } & {
2227
+ getCanonicalRefName2(refName: string): string;
2228
+ isValidRefName(refName: string): boolean;
2229
+ } & {
2230
+ getAliasesForRefName(refName: string): string[];
2231
+ getRefNameMapForAdapter(adapterConf: {
2232
+ [x: string]: unknown;
2233
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2234
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2235
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
2236
+ /**
2237
+ * #getter
2238
+ * What the spinner says. The assembly reports which of its files it is
2239
+ * downloading, so this is "Downloading chromosome aliases" rather than a bare
2240
+ * "Loading" for the part of startup that actually takes time. Falls back
2241
+ * once the assembly is loaded and the remaining wait is the init autorun's
2242
+ * own navigation, which is local.
2243
+ */
2244
+ readonly loadingMessage: string | undefined;
2245
+ /**
2246
+ * #getter
2247
+ * Determinate fraction for the spinner's bar, when the assembly load
2248
+ * reports one (a whole-file download with a Content-Length)
2249
+ */
2250
+ readonly loadingProgress: number | undefined;
2251
+ /**
2252
+ * #getter
2253
+ * The URL the assembly load is currently fetching, when the phase named
2254
+ * one. Only the stalled-load notice reads it — see
2255
+ * {@link ViewLoadingScreen}.
2256
+ */
2257
+ readonly loadingSource: string | undefined;
2258
+ /**
2259
+ * #getter
2260
+ */
2261
+ readonly hasSomethingToShow: boolean;
2262
+ /**
2263
+ * #getter
2264
+ * init is set but its async navigation (the afterAttach autorun) hasn't
2265
+ * populated displayedRegions yet. `initialized` can already be true here
2266
+ * (it only tracks assembly readiness), so without this the container
2267
+ * would mount over empty regions and pxToBp/hover would throw.
2268
+ *
2269
+ * **Not dotplot's or synteny's `initPending`**, which is the bare
2270
+ * `!!self.pendingLaunch` — "an init blob has not been applied" — and which those
2271
+ * views read from their `settled` gate rather than from `showLoading`.
2272
+ * This one is narrower on purpose: it closes only the window where there
2273
+ * is nothing on screen. Once navigation has produced regions the view is
2274
+ * usable and gets shown, even though `init` is still set while the tracks
2275
+ * and highlights land. Renamed away from the shared spelling because the
2276
+ * two predicates disagree exactly there, and the bare name reads as
2277
+ * theirs.
2278
+ */
2279
+ readonly awaitingInitNavigation: boolean;
2280
+ /**
2281
+ * #getter
2282
+ * Whether to show a loading indicator instead of the import form or view
2283
+ */
2284
+ readonly showLoading: boolean;
2285
+ /**
2286
+ * #getter
2287
+ * Whether to show the import form
2288
+ */
2289
+ readonly showImportForm: boolean;
2290
+ /**
2291
+ * #getter
2292
+ * Is there anything to draw yet? The gate anything reading block geometry
2293
+ * — a ruler, a scalebar, a display — has to pass first, because
2294
+ * `width`/`staticBlocks` throw by design before the view has been
2295
+ * measured and navigated.
2296
+ *
2297
+ * **Not `initialized`**, which is the trap this getter exists to close.
2298
+ * That one answers "have the assembly's regions loaded", which is only
2299
+ * the first of two async steps: navigating then populates
2300
+ * `displayedRegions`, and in the window between the two `initialized` is
2301
+ * already true while there is still nothing on screen. `showLoading`
2302
+ * folds in `awaitingInitNavigation`, the getter that exists for exactly
2303
+ * that gap.
2304
+ *
2305
+ * `error` is the third outcome and is why this is not a bare
2306
+ * `!showLoading`: a failed assembly load also ends the loading state, so
2307
+ * that alone would mount over the wreckage. Read `error` yourself if you
2308
+ * want to draw it.
2309
+ */
2310
+ readonly ready: boolean;
2311
+ /**
2312
+ * #getter
2313
+ * The same question as `ready` with the other three outcomes named, for a
2314
+ * host that draws its own chrome and has to render all four. See
2315
+ * `computeViewStatus`, whose precedence this defers to — and note its
2316
+ * `ready` is narrower than the getter above, which is true when nothing
2317
+ * has told the view where to look.
2318
+ */
2319
+ readonly status: ViewStatus;
2320
+ /**
2321
+ * #getter
2322
+ */
2323
+ readonly scalebarHeight: number;
2324
+ /**
2325
+ * #getter
2326
+ * What TrackContainer puts *above* a track's rendering container: the gap
2327
+ * over its Paper, and the Paper's own top border when outlines are on.
2328
+ */
2329
+ readonly trackLeadingChrome: number;
2330
+ /**
2331
+ * #getter
2332
+ * ...and what it puts below: the resize divider, plus the matching bottom
2333
+ * border.
2334
+ */
2335
+ readonly trackTrailingChrome: number;
2336
+ /**
2337
+ * #getter
2338
+ * A track's full cost beyond its display height.
2339
+ *
2340
+ * The track *label* is not counted here: an offset label is an in-flow
2341
+ * box whose height is whatever the theme renders a Paper of icon buttons
2342
+ * at, so it is measured into `trackLabelBands` per track and added by
2343
+ * `trackLabelBand` rather than derived.
2344
+ */
2345
+ readonly trackChromeHeight: number;
2346
+ /**
2347
+ * #getter
2348
+ */
2349
+ readonly headerHeight: number;
2350
+ /**
2351
+ * #getter
2352
+ * Where the scalebar pins when the view's chrome is sticky: everything
2353
+ * stacked above it, which is the view's own title bar plus this view's
2354
+ * header. Expressed from `headerHeight` rather than re-summing its
2355
+ * constants — the two are the same box, and a second spelling of the sum
2356
+ * is free to drift from the first while both typecheck.
2357
+ */
2358
+ readonly rubberbandTop: number;
2359
+ /**
2360
+ * #getter
2361
+ */
2362
+ readonly pinnedTracksTop: number;
2363
+ /**
2364
+ * #method
2365
+ * rendered height of a single track, collapsing to a fixed height when
2366
+ * minimized. Shared by trackHeights and getTrackYOffset so the two can't
2367
+ * disagree. Reads `activeDisplay` — the display TrackContainer actually
2368
+ * mounts — rather than re-picking `displays[0]`, so the view's height math
2369
+ * can't diverge from what is on screen.
2370
+ */
2371
+ trackHeight(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): any;
2372
+ /**
2373
+ * #method
2374
+ * the measured in-flow label band above a track's rendering container,
2375
+ * 0 until TrackContainer has measured one or when no label is in flow
2376
+ */
2377
+ trackLabelBand(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): number;
2378
+ /**
2379
+ * #getter
2380
+ */
2381
+ readonly trackHeights: number;
2382
+ /**
2383
+ * #getter
2384
+ */
2385
+ readonly trackHeightsWithChrome: number;
2386
+ /**
2387
+ * #getter
2388
+ */
2389
+ readonly height: number;
2390
+ /**
2391
+ * #method
2392
+ * Y offset (in pixels, from the top of the view) where a track's
2393
+ * rendering container starts. Walks tracks in DOM render order (pinned
2394
+ * first, then unpinned), from the same constants TrackContainer lays its
2395
+ * Paper out with. Returns `undefined` if the track is not present.
2396
+ *
2397
+ * Includes each track's measured label band, this track's own included,
2398
+ * since an in-flow label sits above the rendering container inside the
2399
+ * same Paper. Exact once TrackContainer has measured; before that it is
2400
+ * short by the unmeasured bands.
2401
+ */
2402
+ getTrackYOffset(trackId: string): number | undefined;
2403
+ /**
2404
+ * #method
2405
+ * the pinned or unpinned sibling list a track renders within; move
2406
+ * up/down/top/bottom reorder inside this section rather than the full
2407
+ * `tracks` array, since the two sections lay out independently
2408
+ */
2409
+ trackSection(id: string): any[];
2410
+ /**
2411
+ * #getter
2412
+ */
2413
+ readonly totalBp: number;
2414
+ /**
2415
+ * #getter
2416
+ */
2417
+ readonly fitBpPerPx: number;
2418
+ /**
2419
+ * #getter
2420
+ * The zoom-out limit. This view's own fit, except while a container holds
2421
+ * it on a shared scale coarser than that — a small genome next to a large
2422
+ * one, drawn short so the two compare by length.
2423
+ *
2424
+ * Raising the LIMIT is what makes such a scale survive: written past the
2425
+ * limit instead, it is undone by the first thing that clamps — a wheel
2426
+ * tick, a rubberband, a `setDisplayedRegions` — which is how the dotplot's
2427
+ * locked aspect ratio once turned "zoom out" into a zoom in
2428
+ * (`axisMaxBpPerPx`). Here every route to a zoom clamps against the same
2429
+ * ceiling, so full zoom-out LANDS on the shared scale.
2430
+ */
2431
+ readonly maxBpPerPx: number;
2432
+ /**
2433
+ * #getter
2434
+ * The zoom-out ceiling a containing comparative view holds this row to,
2435
+ * or 0 for a standalone view, a mode that is off, and a stack that cannot
2436
+ * answer yet.
2437
+ *
2438
+ * Pulled rather than pushed down into a volatile: the number is a
2439
+ * function of every row's fit, all of which move on a resize, and a
2440
+ * stored copy would be stale by the next layout.
2441
+ */
2442
+ readonly sharedFitBpPerPx: number;
2443
+ /**
2444
+ * #getter
2445
+ */
2446
+ readonly minBpPerPx: number;
2447
+ /**
2448
+ * #getter
2449
+ */
2450
+ readonly error: unknown;
2451
+ /**
2452
+ * #getter
2453
+ */
2454
+ readonly maxOffset: number;
2455
+ /**
2456
+ * #getter
2457
+ */
2458
+ readonly minOffset: number;
2459
+ /**
2460
+ * #getter
2461
+ * Whether the displayed regions read left-to-right, right-to-left, or
2462
+ * some of each. `horizontallyFlip` reverses the order and flips every
2463
+ * region at once, so a flipped row is uniformly `reversed` and `mixed`
2464
+ * takes going out of your way — the scalebar label menu's per-region
2465
+ * "Reverse region". Read off `displayedRegions` rather than off blocks
2466
+ * because blocks cover the window and this is a fact about the row.
2467
+ */
2468
+ readonly displayedRegionsOrientation: import("./util.ts").RegionsOrientation;
2469
+ /**
2470
+ * #getter
2471
+ */
2472
+ readonly displayedRegionsTotalPx: number;
2473
+ /**
2474
+ * #getter
2475
+ */
2476
+ readonly trackMap: Map<string, any>;
2477
+ /**
2478
+ * #method
2479
+ */
2480
+ getTrack(id: string): any;
2481
+ /**
2482
+ * #method
2483
+ * displayId of the active (shown) display for a track in this view, used
2484
+ * by the config editor to expand the relevant display and collapse the
2485
+ * track's other displays
2486
+ */
2487
+ getActiveDisplayId(trackId: string): string | undefined;
2488
+ } & {
2489
+ /**
2490
+ * #action
2491
+ */
2492
+ setShowTrackOutlines(arg: boolean): void;
2493
+ /**
2494
+ * #action
2495
+ */
2496
+ setScrollZoom(flag: boolean): void;
2497
+ /**
2498
+ * #action
2499
+ */
2500
+ setColorByCDS(flag: boolean): void;
2501
+ /**
2502
+ * #action
2503
+ */
2504
+ setShowAminoAcids(flag: boolean): void;
2505
+ /**
2506
+ * #action
2507
+ */
2508
+ setShowCytobands(flag: boolean): void;
2509
+ /**
2510
+ * #action
2511
+ */
2512
+ setTrackLabelBand(trackId: string, band: number): void;
2513
+ setWidth(newWidth: number): void;
2514
+ /**
2515
+ * #action
2516
+ */
2517
+ setError(error: unknown): void;
2518
+ /**
2519
+ * #action
2520
+ */
2521
+ setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
2522
+ /**
2523
+ * #action
2524
+ */
2525
+ setScalebarRefNameClickPending(pending: boolean): void;
2526
+ /**
2527
+ * #action
2528
+ */
2529
+ setHideHeader(b: boolean): void;
2530
+ /**
2531
+ * #action
2532
+ */
2533
+ setHideHeaderOverview(b: boolean): void;
2534
+ /**
2535
+ * #action
2536
+ */
2537
+ setScalebarOnly(b: boolean): void;
2538
+ /**
2539
+ * #action
2540
+ */
2541
+ setHideNoTracksActive(b: boolean): void;
2542
+ /**
2543
+ * #action
2544
+ */
2545
+ setShowGridlines(b: boolean): void;
2546
+ /**
2547
+ * #action
2548
+ */
2549
+ setLabelsVisible(arg: boolean): void;
2550
+ /**
2551
+ * #action
2552
+ * set temporary vertical guides (e.g., for LD display hover)
2553
+ */
2554
+ setVolatileGuides(guides: VolatileGuide[]): void;
2555
+ /**
2556
+ * #action
2557
+ */
2558
+ scrollTo(offsetPx: number): number;
2559
+ /**
2560
+ * #action
2561
+ * `scrollTo`'s bp-space twin: place the window's left edge at a
2562
+ * linearized bp coordinate, clamped to the same scroll limits.
2563
+ *
2564
+ * It exists so a caller that already knows where it wants to be in bp —
2565
+ * zoomTo, anchoring the base under the cursor — does not have to convert
2566
+ * to pixels and let this convert back. That round trip is lossy once per
2567
+ * frame, and a scroll-zoom burst is a few dozen frames, which is enough
2568
+ * to walk the base out from under the cursor.
2569
+ */
2570
+ scrollToBp(startBp: number): number;
2571
+ /**
2572
+ * #action
2573
+ */
2574
+ zoomTo(bpPerPx: number, offset?: any): number;
2575
+ /**
2576
+ * #action
2577
+ * sets offsets of rubberband, used in the get sequence dialog can call
2578
+ * view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute
2579
+ * the selected regions from the offsets
2580
+ */
2581
+ setOffsets(left?: BpOffset, right?: BpOffset): void;
2582
+ /**
2583
+ * #action
2584
+ */
2585
+ setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName: string): void;
2586
+ /**
2587
+ * #action
2588
+ */
2589
+ showTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): any;
2590
+ /**
2591
+ * #action
2592
+ */
2593
+ hideTrack(trackId: string): boolean;
2594
+ } & {
2595
+ /**
2596
+ * #action
2597
+ * showTrack for a track whose display state model may be lazily
2598
+ * loaded: loads it, then shows
2599
+ */
2600
+ launchTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): Promise<any>;
2601
+ } & {
2602
+ /**
2603
+ * #action
2604
+ */
2605
+ moveTrackDown(id: string): void;
2606
+ /**
2607
+ * #action
2608
+ */
2609
+ moveTrackUp(id: string): void;
2610
+ /**
2611
+ * #action
2612
+ */
2613
+ moveTrackToTop(id: string): void;
2614
+ /**
2615
+ * #action
2616
+ */
2617
+ moveTrackToBottom(id: string): void;
2618
+ /**
2619
+ * #action
2620
+ */
2621
+ moveTrack(movingId: string, targetId: string): void;
2622
+ /**
2623
+ * #action
2624
+ */
2625
+ toggleTrack(trackId: string): boolean;
2626
+ /**
2627
+ * #action
2628
+ * toggleTrack with launchTrack's loading behavior
2629
+ */
2630
+ launchToggleTrack(trackId: string): Promise<boolean>;
2631
+ /**
2632
+ * #action
2633
+ */
2634
+ setTrackLabels(setting: 'overlapping' | 'offset' | 'hidden'): void;
2635
+ /**
2636
+ * #action
2637
+ */
2638
+ setShowCenterLine(b: boolean): void;
2639
+ /**
2640
+ * #action
2641
+ */
2642
+ activateTrackSelector(): import("@jbrowse/core/util").Widget;
2643
+ /**
2644
+ * #action
2645
+ */
2646
+ toggleTrackSelector(): import("@jbrowse/core/util").Widget;
2647
+ /**
2648
+ * #method
2649
+ * Helper method for the fetchSequence.
2650
+ * Retrieves the corresponding regions that were selected by the
2651
+ * rubberband
2652
+ *
2653
+ * @param leftOffset - `object as {start, end, index, offset}`, offset = start
2654
+ * of user drag
2655
+ * @param rightOffset - `object as {start, end, index, offset}`,
2656
+ * offset = end of user drag
2657
+ * @returns array of Region[]
2658
+ */
2659
+ getSelectedRegions(leftOffset?: BpOffset, rightOffset?: BpOffset): {
2660
+ assemblyName: string;
2661
+ refName: string;
2662
+ start: number;
2663
+ end: number;
2664
+ }[];
2665
+ /**
2666
+ * #action
2667
+ */
2668
+ horizontalScroll(distance: number): number;
2669
+ /**
2670
+ * #action
2671
+ */
2672
+ setDraggingTrackId(idx?: string): void;
2673
+ /**
2674
+ * #action
2675
+ */
2676
+ setLastTrackDragY(y: number): void;
2677
+ /**
2678
+ * #action
2679
+ * called while dragging a track over the track at `targetId`; reorders
2680
+ * once the cursor has moved far enough (see shouldSwapTracks) to avoid
2681
+ * jitter when a short track is dragged over a tall one
2682
+ */
2683
+ onTrackDragOver(targetId: string, currentY: number): void;
2684
+ /**
2685
+ * #action
2686
+ */
2687
+ setLaunch(launch?: LaunchInput<InitState>): void;
2688
+ /**
2689
+ * #method
2690
+ * renders the view to SVG markup, which it returns; saves it through
2691
+ * FileSaver unless `save: false`
2692
+ */
2693
+ exportSvg(opts?: ExportSvgOptions): Promise<string>;
2694
+ } & {
2695
+ slide: (viewWidths: number) => void;
2696
+ zoom: (targetBpPerPx: number) => void;
2697
+ cancelZoomAnimation: () => void;
2698
+ } & {
2699
+ /**
2700
+ * #getter
2701
+ */
2702
+ readonly showsWholeChromosome: boolean;
2703
+ /**
2704
+ * #getter
2705
+ * an ideogram only reads correctly against an entire chromosome: on a
2706
+ * sub-region it is a meaningless slice of bands, and the centromere shows
2707
+ * up as a lone half-triangle
2708
+ */
2709
+ readonly canShowCytobands: boolean;
2710
+ /**
2711
+ * #getter
2712
+ * the `showCytobands` setting gated by whether cytobands can be shown at
2713
+ * all (whole chromosome + data present) — i.e. actually on screen
2714
+ */
2715
+ readonly effectiveShowCytobands: boolean;
2716
+ /**
2717
+ * #getter
2718
+ */
2719
+ readonly anyCytobandsExist: boolean;
2720
+ /**
2721
+ * #getter
2722
+ * the cytoband is displayed to the right of the chromosome name, and
2723
+ * that offset is calculated manually with this method
2724
+ */
2725
+ readonly cytobandOffset: number;
2726
+ /**
2727
+ * #getter
2728
+ */
2729
+ readonly isTrackSelectorOpen: boolean;
2730
+ } & {
2731
+ /**
2732
+ * #method
2733
+ * return the view menu items
2734
+ */
2735
+ menuItems(): MenuItem[];
2736
+ /**
2737
+ * #method
2738
+ * what a plugin can start from the selected region — a synteny view, a
2739
+ * consensus call. Extend this rather than `rubberBandMenuItems` so the
2740
+ * entries collect under the menu's "Launch" submenu; that grouping is
2741
+ * decided once here rather than by whichever contributor runs first, and
2742
+ * keeps the rubberband menu itself short as plugins pile on.
2743
+ */
2744
+ rubberBandLaunchMenuItems(): MenuItem[];
2745
+ /**
2746
+ * #getter
2747
+ * geometry of the overview scalebar — derived from displayedRegions,
2748
+ * width, and cytobandOffset so it stays cached by MobX
2749
+ */
2750
+ readonly overviewLayout: ViewLayout;
2751
+ } & {
2752
+ /**
2753
+ * #getter
2754
+ * static blocks are an important concept jbrowse uses to avoid
2755
+ * re-rendering when you scroll to the side. when you horizontally
2756
+ * scroll to the right, old blocks to the left may be removed, and new
2757
+ * blocks may be instantiated on the right. tracks may use the static
2758
+ * blocks to render their data for the region represented by the block
2759
+ */
2760
+ readonly staticBlocks: BlockSet;
2761
+ /**
2762
+ * #getter
2763
+ * dynamic blocks represent the exact coordinates of the currently
2764
+ * visible genome regions on the screen. they are similar to static
2765
+ * blocks, but static blocks can go offscreen while dynamic blocks
2766
+ * represent exactly what is on screen
2767
+ */
2768
+ readonly dynamicBlocks: BlockSet;
2769
+ /**
2770
+ * #getter
2771
+ * all overview scalebar blocks (content + elided), laid out on the
2772
+ * overviewLayout. memoized so the scalebar doesn't recompute it per
2773
+ * render
2774
+ */
2775
+ readonly overviewBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
2776
+ /**
2777
+ * #getter
2778
+ * leading/trailing pixel span of the visible regions projected onto the
2779
+ * overviewLayout — the geometry of the overview's "you are here"
2780
+ * rectangle, and of the top edge of the polygon drawn under it. Elided
2781
+ * regions count: at whole-genome zoom the tail of an assembly is all
2782
+ * coalesced tiny contigs, and stopping at the last *content* block left
2783
+ * the rectangle short of (or, scrolled onto that tail, absent from) the
2784
+ * polygon it sits on.
2785
+ */
2786
+ readonly overviewRegionPxSpan: import("@jbrowse/core/util/Base1DUtils").PxSpan | undefined;
2787
+ /**
2788
+ * #getter
2789
+ * The x shift that maps the **staticBlocks frame** onto the viewport:
2790
+ * `translateX(view.staticBlocksTranslateX)` on one container places
2791
+ * every `gridlineTicks`, `scalebarLabels` and `paddingSpans` entry at
2792
+ * once, and a pan then moves that single transform rather than each
2793
+ * child.
2794
+ *
2795
+ * The frame exists because those three are laid out across every
2796
+ * displayed region rather than across the viewport — it overhangs on
2797
+ * both sides — so their `x` values are stable under a scroll and only
2798
+ * this number moves. `scalebarRefNameLabels` is the exception and says
2799
+ * so: its `transform` is already a screen x, because a sticky label's
2800
+ * position is a function of the scroll rather than of block geometry.
2801
+ *
2802
+ * **The subtraction must happen here, in float64, and that is the
2803
+ * load-bearing part.** `offsetPx` is a whole-genome pixel coordinate —
2804
+ * hg38 chr1 at base resolution is already past 1e10 — and a length that
2805
+ * size does not survive the trip through CSS: the transform matrix is
2806
+ * float32 by the time it reaches the compositor, where consecutive
2807
+ * representable values at 1e10 are ~1024px apart, and layout saturates
2808
+ * sooner still (Blink's `LayoutUnit` is int32 at 1/64px, so ±33.5M px).
2809
+ * So the shape that looks obvious — lay an overlay out in absolute
2810
+ * genome pixels, write `translateX(-view.offsetPx)` — does not lose a
2811
+ * subpixel, it puts the row somewhere else entirely, and only on large
2812
+ * assemblies at high zoom, which is not where anyone tests. Both
2813
+ * operands here are large and their difference is bounded by the
2814
+ * overhang (a block or two), so what reaches CSS is small and exact.
2815
+ * Same rule as the GPU side, one layer up —
2816
+ * `agent-docs/reference/BP_PRECISION.md`.
2817
+ *
2818
+ * Published because it is the one piece of coordinate arithmetic a host
2819
+ * drawing its own chrome would otherwise have to know, and because
2820
+ * having it written out at each call site is how the two in-tree copies
2821
+ * came to disagree about rounding. Round it where the content is text
2822
+ * (a fractional offset blurs a label); leave it alone for paths and
2823
+ * boxes.
2824
+ */
2825
+ readonly staticBlocksTranslateX: number;
2826
+ /**
2827
+ * #getter
2828
+ * Gridline tick positions (x relative to the staticBlocks frame),
2829
+ * derived from staticBlocks + bpPerPx. Computed once and shared by every
2830
+ * Gridlines instance (scalebar, main view, each pinned track) rather
2831
+ * than recomputing the makeTicks loop per component.
2832
+ */
2833
+ readonly gridlineTicks: {
2834
+ x: number;
2835
+ major: boolean;
2836
+ }[];
2837
+ /**
2838
+ * #getter
2839
+ * Scalebar coordinate labels (x in the staticBlocks frame + display
2840
+ * text). Sibling of gridlineTicks sharing the same makeBlockTicks
2841
+ * formula, so labels line up exactly with their gridlines. staticBlocks
2842
+ * chop a region into ~800px chunks; groupContiguousBlocks merges them
2843
+ * back per region so a label on an internal chunk boundary isn't clipped
2844
+ * away by both neighbors — only genuine region edges clip a label.
2845
+ *
2846
+ * A run that can hold too few labels to make a ruler goes unnumbered
2847
+ * (`tickLabelsWorthDrawing`), the same rule the overview scalebar and
2848
+ * the dotplot axes apply: with a whole genome displayed each chromosome
2849
+ * catches one lone coordinate, which conveys no scale by itself and
2850
+ * reads as the same number repeated across the row.
2851
+ */
2852
+ readonly scalebarLabels: {
2853
+ x: number;
2854
+ label: string;
2855
+ key: string;
2856
+ }[];
2857
+ /**
2858
+ * #getter
2859
+ * The bold refName labels drawn along the scalebar, as plain data:
2860
+ * `{key, refName, displayedRegionIndex, lastDisplayedRegionIndex,
2861
+ * sticky, transform, maxWidth, paddingLeft, text}` each. One per run of
2862
+ * same-refName regions, plus a "sticky" one pinned to the viewport's
2863
+ * left edge naming the refName under it, so panning into a chromosome
2864
+ * does not scroll its own name off the screen.
2865
+ *
2866
+ * Three rules live in here that a host drawing region names will
2867
+ * otherwise rediscover the hard way, and two of them are invisible until
2868
+ * the data is awkward:
2869
+ *
2870
+ * - the sticky label rides the rightmost run that has scrolled off the
2871
+ * left, not the region's first block — that one is gone from
2872
+ * staticBlocks entirely once you zoom into a region's interior, taking
2873
+ * the chromosome name off screen at exactly the zoom where nothing
2874
+ * else names it.
2875
+ * - adjacent regions of the same refName (collapsed introns) get one
2876
+ * label between them, not one each. That label names the whole run and
2877
+ * is fitted to the whole run, and `displayedRegionIndex` /
2878
+ * `lastDisplayedRegionIndex` bracket what it stands for.
2879
+ * - a name is drawn whole or not at all, measured against the space its
2880
+ * run leaves. Clipped to its own width, `chr16` reads as `chr1` —
2881
+ * a different chromosome rather than a shortened name, which is why
2882
+ * this is a fit test rather than an ellipsis.
2883
+ *
2884
+ * **Viewport frame, unlike its siblings.** `transform` is a screen x,
2885
+ * already net of `offsetPx`, where gridlineTicks / scalebarLabels /
2886
+ * paddingSpans are all in the staticBlocks frame. The sticky label's
2887
+ * position is a function of `offsetPx` rather than of block geometry, so
2888
+ * it has no fixed position in that frame — and for the same reason this
2889
+ * getter recomputes on every scroll frame where those three do not.
2890
+ *
2891
+ * `caption` accompanies the labels: the chip at the row's left edge,
2892
+ * saying which assembly the row is (a container view — synteny — opts
2893
+ * into that through `scalebarDisplayPrefix`) and whether it is flipped.
2894
+ * A ` [rev]` there is a fact about the ROW; the same marker on a
2895
+ * chromosome name means that one region, which only happens under mixed
2896
+ * orientation. `captionSpanPx` is the width it takes, which the
2897
+ * coordinate numbers stay out from under. The SVG export deliberately
2898
+ * calls `getScalebarRefNameLabels` itself with no prefix rather than
2899
+ * reading this, since it draws its own assembly name above the ruler.
2900
+ */
2901
+ readonly scalebarRefNameLabels: {
2902
+ labels: import("./util.ts").ScalebarRefNameLabel[];
2903
+ caption: string | undefined;
2904
+ captionSpanPx: number;
2905
+ };
2906
+ /**
2907
+ * #getter
2908
+ * Every span along the row that is not track data, as plain geometry in
2909
+ * the staticBlocks frame — the same frame as gridlineTicks and
2910
+ * scalebarLabels, so one `translateX(staticBlocksTranslateX)` places all
2911
+ * three. Three kinds, and a host drawing its own chrome needs all of
2912
+ * them:
2913
+ *
2914
+ * - `seam`: the 3px bar at a region's right edge. Displayed regions are
2915
+ * laid out **contiguously** — calculateStaticBlocks emits boundary
2916
+ * padding only before the first region and after the last — so this
2917
+ * bar is the only thing separating two of them. Without it a
2918
+ * two-region view reads as a one-region view scrolled somewhere
2919
+ * strange. `isRightEndOfDisplayedRegion` is what marks it, and the
2920
+ * right edge of the blocks currently *loaded* — which is what block
2921
+ * geometry hands you — is not the same filter.
2922
+ * - `elided`: a region too narrow to draw at this zoom. Whole-genome on
2923
+ * a real assembly is mostly these — hg38 has 455 sequences and all
2924
+ * but the 24 chromosomes land sub-pixel — so a host that skips them
2925
+ * renders that tail as nothing at all.
2926
+ * - `boundary`: past the start of the first region or the end of the
2927
+ * last. Greying it is what makes the last region's seam read as the
2928
+ * edge of a filled area rather than a rule floating in the track.
2929
+ *
2930
+ * Elided blocks get no seam even though they carry the flag: at the
2931
+ * zoom where regions elide, one bar per region is a solid grey wall.
2932
+ *
2933
+ * PaddingBlocks is the in-tree consumer. The SVG export is deliberately
2934
+ * NOT one: `SVGRegionSeparators` walks dynamicBlocks itself and draws
2935
+ * only the seam, because `elided` and `boundary` are chrome for an
2936
+ * interactive row rather than information a figure carries — striped
2937
+ * grey saying "regions here are too narrow to draw" is noise in a
2938
+ * static image, and at whole-genome zoom it would be most of the row.
2939
+ * The seam is the one that must survive: regions lay out contiguously,
2940
+ * so it is all that separates two of them.
2941
+ */
2942
+ readonly paddingSpans: readonly {
2943
+ key: string;
2944
+ x: number;
2945
+ width: number;
2946
+ kind: 'seam' | 'elided' | 'boundary';
2947
+ }[];
2948
+ /**
2949
+ * #getter
2950
+ * Integer-rounded sum of all visible block widths. Slightly less than
2951
+ * view.width when the genome ends before the right edge; use view.width
2952
+ * for SVG clip rects (display boundary) and this for paint canvas sizing
2953
+ * (actual content width).
2954
+ */
2955
+ readonly totalWidthPx: number;
2956
+ /**
2957
+ * #getter
2958
+ * Like totalWidthPx but excluding inter-region boundary blocks. Used
2959
+ * when column layout divides the canvas width by feature count.
2960
+ */
2961
+ readonly totalWidthPxWithoutBorders: number;
2962
+ /**
2963
+ * #getter
2964
+ */
2965
+ readonly visibleBp: number;
2966
+ /**
2967
+ * #getter
2968
+ * Whether any part of a displayed region actually falls inside the
2969
+ * viewport. False both when the view holds no regions at all and when
2970
+ * it holds some but is scrolled entirely off them; either way there is
2971
+ * no visible span for the scalebar, ruler and refName labels to
2972
+ * describe, which is what the SVG export's header checks before drawing
2973
+ * one. Distinct from `hasDisplayedRegions`, which only asks whether the
2974
+ * view has been given regions, not whether any are on screen.
2975
+ */
2976
+ readonly hasVisibleContent: boolean;
2977
+ /**
2978
+ * #getter
2979
+ * What is on screen, as regions that address whole bases — what a
2980
+ * reader means by "the visible region" when they ask to fetch it,
2981
+ * bookmark it or read it back in a locString field. `visibleRegions`
2982
+ * below is the other half: pixels, and fractional by design.
2983
+ */
2984
+ readonly visibleWholeBaseRegions: {
2985
+ assemblyName: string;
2986
+ refName: string;
2987
+ start: number;
2988
+ end: number;
2989
+ }[];
2990
+ /**
2991
+ * #getter
2992
+ * Returns the currently visible content blocks with screen pixel
2993
+ * positions and displayedRegionIndex guaranteed.
2994
+ * Used by WebGL displays for per-region data fetching and rendering.
2995
+ */
2996
+ readonly visibleRegions: {
2997
+ refName: string;
2998
+ start: number;
2999
+ end: number;
3000
+ assemblyName: string;
3001
+ reversed: boolean | undefined;
3002
+ displayedRegionIndex: number;
3003
+ screenStartPx: number;
3004
+ screenEndPx: number;
3005
+ }[];
3006
+ /**
3007
+ * #getter
3008
+ * Right edge (px, viewport-relative) of the on-screen content, clamped
3009
+ * to the track — where a right-pinned overlay such as a wiggle's colour
3010
+ * or score legend belongs, rather than out in the empty gutter the
3011
+ * regions can leave at whole-genome zoom. `@jbrowse/display-kit`'s
3012
+ * `contentRightEdgePx` states the rule; an SVG export applies the same
3013
+ * one against the export's canvas width instead of this track's.
3014
+ *
3015
+ * Published as a SCALAR on purpose. `visibleRegions` rebuilds a fresh
3016
+ * array of fresh objects on every pan and zoom frame, so a component
3017
+ * that derived this number itself re-rendered on every frame of every
3018
+ * gesture — to produce, whenever content fills the track, the unchanged
3019
+ * `trackWidthPx`. Reading the scalar lets MobX's `===` stop the chain at
3020
+ * this computed instead. Measured over 20 zoom frames: the wiggle
3021
+ * family's three body instances fell from 66 renders to 7.
3022
+ */
3023
+ readonly contentRightEdgePx: number;
1290
3024
  /**
1291
3025
  * #getter
1292
3026
  * visibleRegions expanded by a half-screen buffer on each side,
@@ -1540,10 +3274,14 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
1540
3274
  * navigating to the locstring
1541
3275
  * @param grow - optional multiplier to expand the region by (e.g., 0.2
1542
3276
  * adds 20% padding on each side)
3277
+ * @param opts - `showHitTrack: false` keeps a text-search hit from also
3278
+ * showing the track its index was built from
1543
3279
  * @returns whether the view moved. A multi-hit search raises the picker
1544
3280
  * instead of navigating, and both resolve — see `handleSelectedRegion`.
1545
3281
  */
1546
- navToLocString(input: string, optAssemblyName?: string, grow?: number): Promise<boolean>;
3282
+ navToLocString(input: string, optAssemblyName?: string, grow?: number, opts?: {
3283
+ showHitTrack?: boolean;
3284
+ }): Promise<boolean>;
1547
3285
  /**
1548
3286
  * #action
1549
3287
  * Similar to `navToLocString`, but accepts a list of parsed location
@@ -1652,11 +3390,11 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
1652
3390
  * `centerAt`'s animated twin: the same destination, reached along the
1653
3391
  * arc instead of jumped to, at the zoom the view is already on.
1654
3392
  */
1655
- flyToCenter(coord: number, refName: string): void;
3393
+ flyToCenter(coord: number, refName: string, displayedRegionIndex?: number): void;
1656
3394
  } & {
1657
3395
  afterCreate(): void;
1658
3396
  afterAttach(): void;
1659
- }, import("@jbrowse/mobx-state-tree")._NotCustomized, {
3397
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>, InitState, "bpPerPx" | "offsetPx">, {
1660
3398
  displayName: string | undefined;
1661
3399
  minimized: boolean;
1662
3400
  highlight: HighlightType[];
@@ -1675,7 +3413,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
1675
3413
  showGridlines: boolean;
1676
3414
  labelsVisible: boolean;
1677
3415
  scalebarOnly: boolean;
1678
- init?: InitState | undefined;
3416
+ launch: LaunchInput<InitState> | undefined;
1679
3417
  showCytobands?: false | undefined;
1680
3418
  trackLabels?: string | undefined;
1681
3419
  colorByCDS?: true | undefined;