@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.
- package/esm/LaunchLinearGenomeView/index.js +2 -13
- package/esm/LinearGenomeView/afterAttach.js +16 -18
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +1 -1
- package/esm/LinearGenomeView/components/PaddingBlocks.js +11 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +37 -3
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +46 -4
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +2 -2
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +2 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +3 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +2 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +5 -15
- package/esm/LinearGenomeView/components/ZoomButton.js +6 -1
- package/esm/LinearGenomeView/components/ZoomTransform.js +4 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +1 -1
- package/esm/LinearGenomeView/components/searchModes.js +1 -1
- package/esm/LinearGenomeView/consts.js +1 -1
- package/esm/LinearGenomeView/containingLgv.d.ts +15 -0
- package/esm/LinearGenomeView/containingLgv.js +16 -0
- package/esm/LinearGenomeView/index.d.ts +1 -0
- package/esm/LinearGenomeView/index.js +8 -1
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +23 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +1 -1
- package/esm/LinearGenomeView/linkedViewSync.d.ts +1 -1
- package/esm/LinearGenomeView/linkedViewSync.js +6 -0
- package/esm/LinearGenomeView/model.d.ts +1779 -41
- package/esm/LinearGenomeView/model.js +192 -96
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +14 -14
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +2 -2
- package/esm/LinearGenomeView/types.d.ts +1 -1
- package/esm/LinearGenomeView/util.d.ts +31 -0
- package/esm/LinearGenomeView/util.js +48 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +145 -55
- package/esm/displayKitTests/perRegionTestEnv.js +26 -25
- package/esm/index.d.ts +2 -9
- package/esm/index.js +2 -3
- package/esm/searchUtils.d.ts +6 -3
- package/esm/searchUtils.js +37 -11
- package/package.json +8 -8
- package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +0 -5
- package/esm/LinearGenomeView/FloatingSvgOverlay.js +0 -25
- package/esm/LinearGenomeView/initKeys.d.ts +0 -13
- package/esm/LinearGenomeView/initKeys.js +0 -104
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { AssemblyManager, ParsedLocString } from '@jbrowse/core/util';
|
|
2
|
+
import type { PxToBpResult } from '@jbrowse/core/util/Base1DUtils';
|
|
2
3
|
import type { BaseBlock, ContentBlock } from '@jbrowse/core/util/blockTypes';
|
|
3
4
|
import type { Region } from '@jbrowse/core/util/types';
|
|
5
|
+
interface CenterKeepingView {
|
|
6
|
+
width: number;
|
|
7
|
+
displayedRegions: Region[];
|
|
8
|
+
pxToBp: (px: number) => PxToBpResult;
|
|
9
|
+
setDisplayedRegions: (regions: Region[]) => void;
|
|
10
|
+
centerAt: (coord: number, refName: string, index?: number) => void;
|
|
11
|
+
}
|
|
4
12
|
/**
|
|
5
13
|
* The stored viewport of a view showing `totalBp` of displayed regions fitted to
|
|
6
14
|
* `width` — the regions filling it edge to edge, and centered in it only where
|
|
@@ -197,7 +205,29 @@ export declare function regionMoveActions(idx: number, numRegions: number): {
|
|
|
197
205
|
* the new region set).
|
|
198
206
|
*/
|
|
199
207
|
export declare function withRegionMoved(regions: Region[], from: number, to: number): Region[];
|
|
208
|
+
/**
|
|
209
|
+
* Replace the region list and keep looking at whatever was under the middle of
|
|
210
|
+
* the viewport, when that region is in the new list.
|
|
211
|
+
*
|
|
212
|
+
* `setDisplayedRegions` carries `offsetPx` across and clamps it, which is a
|
|
213
|
+
* linear position in a coordinate space the write just redefined: dropping the
|
|
214
|
+
* regions to the left of the one on screen strands the view at the end of what
|
|
215
|
+
* remains, on blank space. Where the centred region is gone the clamp is still
|
|
216
|
+
* the only answer, so this falls back to it.
|
|
217
|
+
*/
|
|
218
|
+
export declare function setDisplayedRegionsKeepingCenter(model: CenterKeepingView, regions: Region[]): void;
|
|
200
219
|
export declare function withRegionRemoved(regions: Region[], index: number): Region[];
|
|
220
|
+
/**
|
|
221
|
+
* The full run of same-orientation regions on one refName that a scalebar
|
|
222
|
+
* label's `firstRegionIndex`..`lastRegionIndex` sits inside. Those come off the
|
|
223
|
+
* static blocks, which are clipped to the viewport and broken by an elided
|
|
224
|
+
* block, so a zoomed-in collapsed-introns view brackets only the exons on
|
|
225
|
+
* screen — which is the wrong answer for anything acting on the whole run.
|
|
226
|
+
*/
|
|
227
|
+
export declare function regionRunBounds(regions: Region[], firstIndex: number, lastIndex: number): {
|
|
228
|
+
first: number;
|
|
229
|
+
last: number;
|
|
230
|
+
};
|
|
201
231
|
export declare function withRegionReversed(regions: Region[], index: number): Region[];
|
|
202
232
|
/**
|
|
203
233
|
* Whether a label occupying [leftPx, leftPx + labelWidth] fits within a block
|
|
@@ -348,3 +378,4 @@ export declare function generateLocations({ regions, assemblyManager, assemblyNa
|
|
|
348
378
|
*/
|
|
349
379
|
export declare function parseLocStrings(input: string, assemblyName: string, isValidRefName: (str: string, assemblyName: string) => boolean): ParsedLocString[];
|
|
350
380
|
export declare function calculateVisibleLocStrings(contentBlocks: ContentBlock[]): string;
|
|
381
|
+
export {};
|
|
@@ -415,9 +415,57 @@ export function withRegionMoved(regions, from, to) {
|
|
|
415
415
|
out.splice(to, 0, moved);
|
|
416
416
|
return out;
|
|
417
417
|
}
|
|
418
|
+
/**
|
|
419
|
+
* Replace the region list and keep looking at whatever was under the middle of
|
|
420
|
+
* the viewport, when that region is in the new list.
|
|
421
|
+
*
|
|
422
|
+
* `setDisplayedRegions` carries `offsetPx` across and clamps it, which is a
|
|
423
|
+
* linear position in a coordinate space the write just redefined: dropping the
|
|
424
|
+
* regions to the left of the one on screen strands the view at the end of what
|
|
425
|
+
* remains, on blank space. Where the centred region is gone the clamp is still
|
|
426
|
+
* the only answer, so this falls back to it.
|
|
427
|
+
*/
|
|
428
|
+
export function setDisplayedRegionsKeepingCenter(model, regions) {
|
|
429
|
+
const center = model.displayedRegions.length
|
|
430
|
+
? model.pxToBp(model.width / 2)
|
|
431
|
+
: undefined;
|
|
432
|
+
model.setDisplayedRegions(regions);
|
|
433
|
+
const index = center
|
|
434
|
+
? regions.findIndex(r => r.refName === center.refName &&
|
|
435
|
+
r.start === center.start &&
|
|
436
|
+
r.end === center.end)
|
|
437
|
+
: -1;
|
|
438
|
+
if (center && index !== -1) {
|
|
439
|
+
model.centerAt(center.coord0, center.refName, index);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
418
442
|
export function withRegionRemoved(regions, index) {
|
|
419
443
|
return regions.filter((_, i) => i !== index);
|
|
420
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* The full run of same-orientation regions on one refName that a scalebar
|
|
447
|
+
* label's `firstRegionIndex`..`lastRegionIndex` sits inside. Those come off the
|
|
448
|
+
* static blocks, which are clipped to the viewport and broken by an elided
|
|
449
|
+
* block, so a zoomed-in collapsed-introns view brackets only the exons on
|
|
450
|
+
* screen — which is the wrong answer for anything acting on the whole run.
|
|
451
|
+
*/
|
|
452
|
+
export function regionRunBounds(regions, firstIndex, lastIndex) {
|
|
453
|
+
const anchor = regions[firstIndex];
|
|
454
|
+
const inRun = (r) => r !== undefined &&
|
|
455
|
+
anchor !== undefined &&
|
|
456
|
+
r.refName === anchor.refName &&
|
|
457
|
+
r.assemblyName === anchor.assemblyName &&
|
|
458
|
+
!!r.reversed === !!anchor.reversed;
|
|
459
|
+
let first = firstIndex;
|
|
460
|
+
let last = lastIndex;
|
|
461
|
+
while (inRun(regions[first - 1])) {
|
|
462
|
+
first--;
|
|
463
|
+
}
|
|
464
|
+
while (inRun(regions[last + 1])) {
|
|
465
|
+
last++;
|
|
466
|
+
}
|
|
467
|
+
return { first, last };
|
|
468
|
+
}
|
|
421
469
|
export function withRegionReversed(regions, index) {
|
|
422
470
|
return regions.map((region, i) => i === index ? { ...region, reversed: !region.reversed } : region);
|
|
423
471
|
}
|
|
@@ -33,6 +33,11 @@ export interface PerRegionTestControl {
|
|
|
33
33
|
estimateCalls: number;
|
|
34
34
|
/** the display's own density verdict, canvas's second too-large axis */
|
|
35
35
|
densityTooLarge: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* What the next fetch stores, so a test can tell the payload a refetch
|
|
38
|
+
* replaced from the one that replaced it.
|
|
39
|
+
*/
|
|
40
|
+
payloadTag: string;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* The smallest possible display on `MultiRegionDisplayMixin`: it fetches, it
|
|
@@ -45,7 +50,6 @@ export interface PerRegionTestControl {
|
|
|
45
50
|
/** Which of the gate's opt-in hooks this display overrides. */
|
|
46
51
|
export interface GateOptIns {
|
|
47
52
|
gateEnabled?: boolean;
|
|
48
|
-
densityGateEnabled?: boolean;
|
|
49
53
|
}
|
|
50
54
|
declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns, configSchema: AnyConfigurationSchemaType): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{
|
|
51
55
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -246,6 +250,16 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
246
250
|
setError(error?: unknown): void;
|
|
247
251
|
clearHoveredFeature(): void;
|
|
248
252
|
reload(): void;
|
|
253
|
+
applyDisplaySettings(settings: Record<string, unknown>, options?: {
|
|
254
|
+
allowSetters?: boolean;
|
|
255
|
+
}): {
|
|
256
|
+
applied: string[];
|
|
257
|
+
unapplied: string[];
|
|
258
|
+
failed: {
|
|
259
|
+
key: string;
|
|
260
|
+
error: string;
|
|
261
|
+
}[];
|
|
262
|
+
};
|
|
249
263
|
} & {
|
|
250
264
|
scrollTop: number;
|
|
251
265
|
} & {
|
|
@@ -265,7 +279,6 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
265
279
|
gateMeasuredViewportKey: string | undefined;
|
|
266
280
|
} & {
|
|
267
281
|
readonly gateEnabled: boolean;
|
|
268
|
-
readonly densityGateEnabled: boolean;
|
|
269
282
|
readonly byteGateAdapterConfig: Record<string, unknown>;
|
|
270
283
|
readonly configuredFetchSizeLimit: number | undefined;
|
|
271
284
|
readonly densityTooLarge: boolean;
|
|
@@ -295,15 +308,10 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
295
308
|
} & {
|
|
296
309
|
readonly gateSkipsMeasuredViewport: boolean;
|
|
297
310
|
} & {
|
|
298
|
-
setByteEstimate(measurement: {
|
|
299
|
-
bytes: number;
|
|
300
|
-
viewport: import("@jbrowse/display-kit/regionTooLargeUtils").GateViewport;
|
|
301
|
-
}): void;
|
|
302
311
|
clearByteEstimate(): void;
|
|
303
312
|
setForceLoadTrack(flag: boolean): void;
|
|
304
|
-
reload(): void;
|
|
305
313
|
} & {
|
|
306
|
-
commitFetchBytes(perRegionBytes: (number | undefined)[], issued: import("@jbrowse/display-kit/regionTooLargeUtils").GateFetchState): void;
|
|
314
|
+
commitFetchBytes(perRegionBytes: (number | undefined)[], issued: import("@jbrowse/display-kit/regionTooLargeUtils").GateFetchState, partial?: boolean): void;
|
|
307
315
|
} & {
|
|
308
316
|
forceLoad(): void;
|
|
309
317
|
} & {
|
|
@@ -318,6 +326,7 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
318
326
|
readonly canRender: boolean;
|
|
319
327
|
readonly rendersCanvas: boolean;
|
|
320
328
|
readonly paintInert: boolean;
|
|
329
|
+
readonly paintSuperseded: boolean;
|
|
321
330
|
} & {
|
|
322
331
|
readonly painted: boolean;
|
|
323
332
|
} & {
|
|
@@ -349,7 +358,9 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
349
358
|
readonly isLoadingOrCanceled: boolean;
|
|
350
359
|
readonly fetchInert: boolean;
|
|
351
360
|
readonly awaitingPrerequisite: boolean;
|
|
361
|
+
readonly awaitingDependentData: boolean;
|
|
352
362
|
readonly rpcPropsCacheKey: string;
|
|
363
|
+
readonly adapterConfigKey: string;
|
|
353
364
|
} & {
|
|
354
365
|
setError(error?: unknown): void;
|
|
355
366
|
setStatusMessage(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
@@ -359,8 +370,10 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
359
370
|
} & {
|
|
360
371
|
cancelFetch(): void;
|
|
361
372
|
cancelFetchByUser(): void;
|
|
373
|
+
reload(): void;
|
|
362
374
|
beforeDestroy(): void;
|
|
363
|
-
|
|
375
|
+
beginFetch(stopToken: import("@jbrowse/core/util").StopToken): void;
|
|
376
|
+
endFetch(current: boolean): void;
|
|
364
377
|
} & {
|
|
365
378
|
runFetch: (work: (ctx: import("@jbrowse/display-kit/FetchMixin").FetchContext) => Promise<void>) => Promise<void>;
|
|
366
379
|
} & {
|
|
@@ -368,29 +381,45 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
368
381
|
} & {
|
|
369
382
|
readonly host: import("@jbrowse/display-kit/regionHost").RegionHost;
|
|
370
383
|
readonly canvasWidthPx: number;
|
|
384
|
+
readonly settledSubPixelBinBp: number;
|
|
371
385
|
readonly canRender: boolean;
|
|
386
|
+
readonly rendersCanvas: boolean;
|
|
372
387
|
readonly viewportWithinLoadedData: boolean;
|
|
373
388
|
readonly viewportEmpty: boolean;
|
|
389
|
+
readonly fetchSuspended: boolean;
|
|
374
390
|
readonly layoutReady: boolean;
|
|
375
|
-
readonly
|
|
376
|
-
regionHasData(
|
|
391
|
+
readonly zoomFetchKey: string;
|
|
392
|
+
regionHasData(displayedRegionIndex: number): boolean;
|
|
377
393
|
readonly dataSuperseded: boolean;
|
|
378
394
|
readonly renderBlocks: import("@jbrowse/render-core/renderBlock").RenderBlock[];
|
|
395
|
+
} & {
|
|
396
|
+
readonly fetchInputs: import("@jbrowse/display-kit/fetchInputs").FetchInputs;
|
|
397
|
+
readonly settingsFetchInputs: unknown;
|
|
398
|
+
} & {
|
|
399
|
+
readonly regionPayloads: ReadonlyMap<number, unknown>;
|
|
400
|
+
readonly hasRegionData: boolean;
|
|
379
401
|
} & {
|
|
380
402
|
isCacheValid(displayedRegionIndex: number): boolean;
|
|
381
403
|
} & {
|
|
404
|
+
readonly staleSettingsDrawn: boolean;
|
|
382
405
|
readonly dataCurrent: boolean;
|
|
383
406
|
readonly loadedAssembly: import("@jbrowse/core/assemblyManager/assembly").Assembly | undefined;
|
|
407
|
+
} & {
|
|
408
|
+
readonly phaseViewportCurrent: boolean;
|
|
384
409
|
} & {
|
|
385
410
|
readonly svgReady: boolean;
|
|
386
411
|
readonly paintInert: boolean;
|
|
412
|
+
readonly paintSuperseded: boolean;
|
|
387
413
|
readonly displayPhase: import("@jbrowse/render-core/displayPhase").DisplayPhase;
|
|
388
414
|
} & {
|
|
389
|
-
setLoadedRegion(displayedRegionIndex: number, region: import("@jbrowse/core/util").Region,
|
|
415
|
+
setLoadedRegion(displayedRegionIndex: number, region: import("@jbrowse/core/util").Region, payload: import("@jbrowse/display-kit/regionCommit").RegionPayload | undefined, fetchInputs?: import("@jbrowse/display-kit/fetchInputs").FetchInputs): void;
|
|
416
|
+
evictRegionStore(keep: ReadonlySet<number>): void;
|
|
390
417
|
dropLoadedRegion(displayedRegionIndex: number): void;
|
|
391
418
|
clearDisplaySpecificData(): void;
|
|
419
|
+
clearSettingsBakedData(): void;
|
|
392
420
|
} & {
|
|
393
421
|
clearAllRpcData(): void;
|
|
422
|
+
invalidateSettings(): void;
|
|
394
423
|
reload(): void;
|
|
395
424
|
} & {
|
|
396
425
|
fetchNeeded(_needed: IndexedRegion[]): void;
|
|
@@ -401,24 +430,23 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
|
|
|
401
430
|
} & {
|
|
402
431
|
/** every `fetchNeeded` call, as the region list it was handed */
|
|
403
432
|
fetchLog: IndexedRegion[][];
|
|
404
|
-
loadedData: Map<number, string>;
|
|
405
433
|
/**
|
|
406
|
-
* What `
|
|
434
|
+
* What `zoomFetchKey` answers. A volatile, not a `control` knob, and
|
|
407
435
|
* that is the point: a real display's key reads view state, so the
|
|
408
436
|
* autorun re-runs when it moves. A plain closure value would be memoized
|
|
409
437
|
* by the computed and never invalidate.
|
|
410
438
|
*/
|
|
411
439
|
fetchKey: string;
|
|
412
440
|
} & {
|
|
441
|
+
regionHasData(displayedRegionIndex: number): boolean;
|
|
442
|
+
} & {
|
|
443
|
+
/** the fetched payloads, off the foundation's store */
|
|
444
|
+
readonly loadedData: ReadonlyMap<number, string>;
|
|
413
445
|
readonly gateEnabled: boolean;
|
|
414
|
-
readonly densityGateEnabled: boolean;
|
|
415
446
|
readonly densityTooLarge: boolean;
|
|
416
|
-
readonly
|
|
417
|
-
regionHasData(_displayedRegionIndex: number): boolean;
|
|
447
|
+
readonly zoomFetchKey: string;
|
|
418
448
|
} & {
|
|
419
449
|
setFetchKey(key: string): void;
|
|
420
|
-
setLoaded(displayedRegionIndex: number, value: string): void;
|
|
421
|
-
clearDisplaySpecificData(): void;
|
|
422
450
|
} & {
|
|
423
451
|
fetchNeeded(needed: IndexedRegion[]): Promise<void>;
|
|
424
452
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
@@ -464,6 +492,8 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
464
492
|
level?: string;
|
|
465
493
|
actions: import("@jbrowse/core/util").SnackAction[];
|
|
466
494
|
}[];
|
|
495
|
+
widgets: Map<string, unknown>;
|
|
496
|
+
openedWidgets: Record<string, unknown>[];
|
|
467
497
|
} & {
|
|
468
498
|
getTrackById: (id: string) => unknown;
|
|
469
499
|
getDisplayTypeDefault(displayType: string, slot: string): unknown;
|
|
@@ -473,6 +503,11 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
473
503
|
notifyError(message: string): void;
|
|
474
504
|
queueDialog(cb: (handleClose: () => void) => import("@jbrowse/display-test-utils").QueuedDialog): void;
|
|
475
505
|
setSelection(thing: unknown): void;
|
|
506
|
+
addWidget(type: string, id: string, initialState?: Record<string, unknown>): {
|
|
507
|
+
type: string;
|
|
508
|
+
id: string;
|
|
509
|
+
};
|
|
510
|
+
showWidget(_widget: unknown): void;
|
|
476
511
|
setDisplayTypeDefault(displayType: string, slot: string, value: unknown): void;
|
|
477
512
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
478
513
|
name: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -491,6 +526,8 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
491
526
|
level?: string;
|
|
492
527
|
actions: import("@jbrowse/core/util").SnackAction[];
|
|
493
528
|
}[];
|
|
529
|
+
widgets: Map<string, unknown>;
|
|
530
|
+
openedWidgets: Record<string, unknown>[];
|
|
494
531
|
} & {
|
|
495
532
|
getTrackById: (id: string) => unknown;
|
|
496
533
|
getDisplayTypeDefault(displayType: string, slot: string): unknown;
|
|
@@ -500,6 +537,11 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
500
537
|
notifyError(message: string): void;
|
|
501
538
|
queueDialog(cb: (handleClose: () => void) => import("@jbrowse/display-test-utils").QueuedDialog): void;
|
|
502
539
|
setSelection(thing: unknown): void;
|
|
540
|
+
addWidget(type: string, id: string, initialState?: Record<string, unknown>): {
|
|
541
|
+
type: string;
|
|
542
|
+
id: string;
|
|
543
|
+
};
|
|
544
|
+
showWidget(_widget: unknown): void;
|
|
503
545
|
setDisplayTypeDefault(displayType: string, slot: string, value: unknown): void;
|
|
504
546
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
505
547
|
view: any;
|
|
@@ -703,6 +745,16 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
703
745
|
setError(error?: unknown): void;
|
|
704
746
|
clearHoveredFeature(): void;
|
|
705
747
|
reload(): void;
|
|
748
|
+
applyDisplaySettings(settings: Record<string, unknown>, options?: {
|
|
749
|
+
allowSetters?: boolean;
|
|
750
|
+
}): {
|
|
751
|
+
applied: string[];
|
|
752
|
+
unapplied: string[];
|
|
753
|
+
failed: {
|
|
754
|
+
key: string;
|
|
755
|
+
error: string;
|
|
756
|
+
}[];
|
|
757
|
+
};
|
|
706
758
|
} & {
|
|
707
759
|
scrollTop: number;
|
|
708
760
|
} & {
|
|
@@ -722,7 +774,6 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
722
774
|
gateMeasuredViewportKey: string | undefined;
|
|
723
775
|
} & {
|
|
724
776
|
readonly gateEnabled: boolean;
|
|
725
|
-
readonly densityGateEnabled: boolean;
|
|
726
777
|
readonly byteGateAdapterConfig: Record<string, unknown>;
|
|
727
778
|
readonly configuredFetchSizeLimit: number | undefined;
|
|
728
779
|
readonly densityTooLarge: boolean;
|
|
@@ -752,15 +803,10 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
752
803
|
} & {
|
|
753
804
|
readonly gateSkipsMeasuredViewport: boolean;
|
|
754
805
|
} & {
|
|
755
|
-
setByteEstimate(measurement: {
|
|
756
|
-
bytes: number;
|
|
757
|
-
viewport: import("@jbrowse/display-kit/regionTooLargeUtils").GateViewport;
|
|
758
|
-
}): void;
|
|
759
806
|
clearByteEstimate(): void;
|
|
760
807
|
setForceLoadTrack(flag: boolean): void;
|
|
761
|
-
reload(): void;
|
|
762
808
|
} & {
|
|
763
|
-
commitFetchBytes(perRegionBytes: (number | undefined)[], issued: import("@jbrowse/display-kit/regionTooLargeUtils").GateFetchState): void;
|
|
809
|
+
commitFetchBytes(perRegionBytes: (number | undefined)[], issued: import("@jbrowse/display-kit/regionTooLargeUtils").GateFetchState, partial?: boolean): void;
|
|
764
810
|
} & {
|
|
765
811
|
forceLoad(): void;
|
|
766
812
|
} & {
|
|
@@ -775,6 +821,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
775
821
|
readonly canRender: boolean;
|
|
776
822
|
readonly rendersCanvas: boolean;
|
|
777
823
|
readonly paintInert: boolean;
|
|
824
|
+
readonly paintSuperseded: boolean;
|
|
778
825
|
} & {
|
|
779
826
|
readonly painted: boolean;
|
|
780
827
|
} & {
|
|
@@ -806,7 +853,9 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
806
853
|
readonly isLoadingOrCanceled: boolean;
|
|
807
854
|
readonly fetchInert: boolean;
|
|
808
855
|
readonly awaitingPrerequisite: boolean;
|
|
856
|
+
readonly awaitingDependentData: boolean;
|
|
809
857
|
readonly rpcPropsCacheKey: string;
|
|
858
|
+
readonly adapterConfigKey: string;
|
|
810
859
|
} & {
|
|
811
860
|
setError(error?: unknown): void;
|
|
812
861
|
setStatusMessage(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
@@ -816,8 +865,10 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
816
865
|
} & {
|
|
817
866
|
cancelFetch(): void;
|
|
818
867
|
cancelFetchByUser(): void;
|
|
868
|
+
reload(): void;
|
|
819
869
|
beforeDestroy(): void;
|
|
820
|
-
|
|
870
|
+
beginFetch(stopToken: import("@jbrowse/core/util").StopToken): void;
|
|
871
|
+
endFetch(current: boolean): void;
|
|
821
872
|
} & {
|
|
822
873
|
runFetch: (work: (ctx: import("@jbrowse/display-kit/FetchMixin").FetchContext) => Promise<void>) => Promise<void>;
|
|
823
874
|
} & {
|
|
@@ -825,29 +876,45 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
825
876
|
} & {
|
|
826
877
|
readonly host: import("@jbrowse/display-kit/regionHost").RegionHost;
|
|
827
878
|
readonly canvasWidthPx: number;
|
|
879
|
+
readonly settledSubPixelBinBp: number;
|
|
828
880
|
readonly canRender: boolean;
|
|
881
|
+
readonly rendersCanvas: boolean;
|
|
829
882
|
readonly viewportWithinLoadedData: boolean;
|
|
830
883
|
readonly viewportEmpty: boolean;
|
|
884
|
+
readonly fetchSuspended: boolean;
|
|
831
885
|
readonly layoutReady: boolean;
|
|
832
|
-
readonly
|
|
833
|
-
regionHasData(
|
|
886
|
+
readonly zoomFetchKey: string;
|
|
887
|
+
regionHasData(displayedRegionIndex: number): boolean;
|
|
834
888
|
readonly dataSuperseded: boolean;
|
|
835
889
|
readonly renderBlocks: import("@jbrowse/render-core/renderBlock").RenderBlock[];
|
|
890
|
+
} & {
|
|
891
|
+
readonly fetchInputs: import("@jbrowse/display-kit/fetchInputs").FetchInputs;
|
|
892
|
+
readonly settingsFetchInputs: unknown;
|
|
893
|
+
} & {
|
|
894
|
+
readonly regionPayloads: ReadonlyMap<number, unknown>;
|
|
895
|
+
readonly hasRegionData: boolean;
|
|
836
896
|
} & {
|
|
837
897
|
isCacheValid(displayedRegionIndex: number): boolean;
|
|
838
898
|
} & {
|
|
899
|
+
readonly staleSettingsDrawn: boolean;
|
|
839
900
|
readonly dataCurrent: boolean;
|
|
840
901
|
readonly loadedAssembly: import("@jbrowse/core/assemblyManager/assembly").Assembly | undefined;
|
|
902
|
+
} & {
|
|
903
|
+
readonly phaseViewportCurrent: boolean;
|
|
841
904
|
} & {
|
|
842
905
|
readonly svgReady: boolean;
|
|
843
906
|
readonly paintInert: boolean;
|
|
907
|
+
readonly paintSuperseded: boolean;
|
|
844
908
|
readonly displayPhase: import("@jbrowse/render-core/displayPhase").DisplayPhase;
|
|
845
909
|
} & {
|
|
846
|
-
setLoadedRegion(displayedRegionIndex: number, region: import("@jbrowse/core/util").Region,
|
|
910
|
+
setLoadedRegion(displayedRegionIndex: number, region: import("@jbrowse/core/util").Region, payload: import("@jbrowse/display-kit/regionCommit").RegionPayload | undefined, fetchInputs?: import("@jbrowse/display-kit/fetchInputs").FetchInputs): void;
|
|
911
|
+
evictRegionStore(keep: ReadonlySet<number>): void;
|
|
847
912
|
dropLoadedRegion(displayedRegionIndex: number): void;
|
|
848
913
|
clearDisplaySpecificData(): void;
|
|
914
|
+
clearSettingsBakedData(): void;
|
|
849
915
|
} & {
|
|
850
916
|
clearAllRpcData(): void;
|
|
917
|
+
invalidateSettings(): void;
|
|
851
918
|
reload(): void;
|
|
852
919
|
} & {
|
|
853
920
|
fetchNeeded(_needed: IndexedRegion[]): void;
|
|
@@ -858,24 +925,23 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
858
925
|
} & {
|
|
859
926
|
/** every `fetchNeeded` call, as the region list it was handed */
|
|
860
927
|
fetchLog: IndexedRegion[][];
|
|
861
|
-
loadedData: Map<number, string>;
|
|
862
928
|
/**
|
|
863
|
-
* What `
|
|
929
|
+
* What `zoomFetchKey` answers. A volatile, not a `control` knob, and
|
|
864
930
|
* that is the point: a real display's key reads view state, so the
|
|
865
931
|
* autorun re-runs when it moves. A plain closure value would be memoized
|
|
866
932
|
* by the computed and never invalidate.
|
|
867
933
|
*/
|
|
868
934
|
fetchKey: string;
|
|
869
935
|
} & {
|
|
936
|
+
regionHasData(displayedRegionIndex: number): boolean;
|
|
937
|
+
} & {
|
|
938
|
+
/** the fetched payloads, off the foundation's store */
|
|
939
|
+
readonly loadedData: ReadonlyMap<number, string>;
|
|
870
940
|
readonly gateEnabled: boolean;
|
|
871
|
-
readonly densityGateEnabled: boolean;
|
|
872
941
|
readonly densityTooLarge: boolean;
|
|
873
|
-
readonly
|
|
874
|
-
regionHasData(_displayedRegionIndex: number): boolean;
|
|
942
|
+
readonly zoomFetchKey: string;
|
|
875
943
|
} & {
|
|
876
944
|
setFetchKey(key: string): void;
|
|
877
|
-
setLoaded(displayedRegionIndex: number, value: string): void;
|
|
878
|
-
clearDisplaySpecificData(): void;
|
|
879
945
|
} & {
|
|
880
946
|
fetchNeeded(needed: IndexedRegion[]): Promise<void>;
|
|
881
947
|
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{
|
|
@@ -1077,6 +1143,16 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1077
1143
|
setError(error?: unknown): void;
|
|
1078
1144
|
clearHoveredFeature(): void;
|
|
1079
1145
|
reload(): void;
|
|
1146
|
+
applyDisplaySettings(settings: Record<string, unknown>, options?: {
|
|
1147
|
+
allowSetters?: boolean;
|
|
1148
|
+
}): {
|
|
1149
|
+
applied: string[];
|
|
1150
|
+
unapplied: string[];
|
|
1151
|
+
failed: {
|
|
1152
|
+
key: string;
|
|
1153
|
+
error: string;
|
|
1154
|
+
}[];
|
|
1155
|
+
};
|
|
1080
1156
|
} & {
|
|
1081
1157
|
scrollTop: number;
|
|
1082
1158
|
} & {
|
|
@@ -1096,7 +1172,6 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1096
1172
|
gateMeasuredViewportKey: string | undefined;
|
|
1097
1173
|
} & {
|
|
1098
1174
|
readonly gateEnabled: boolean;
|
|
1099
|
-
readonly densityGateEnabled: boolean;
|
|
1100
1175
|
readonly byteGateAdapterConfig: Record<string, unknown>;
|
|
1101
1176
|
readonly configuredFetchSizeLimit: number | undefined;
|
|
1102
1177
|
readonly densityTooLarge: boolean;
|
|
@@ -1126,15 +1201,10 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1126
1201
|
} & {
|
|
1127
1202
|
readonly gateSkipsMeasuredViewport: boolean;
|
|
1128
1203
|
} & {
|
|
1129
|
-
setByteEstimate(measurement: {
|
|
1130
|
-
bytes: number;
|
|
1131
|
-
viewport: import("@jbrowse/display-kit/regionTooLargeUtils").GateViewport;
|
|
1132
|
-
}): void;
|
|
1133
1204
|
clearByteEstimate(): void;
|
|
1134
1205
|
setForceLoadTrack(flag: boolean): void;
|
|
1135
|
-
reload(): void;
|
|
1136
1206
|
} & {
|
|
1137
|
-
commitFetchBytes(perRegionBytes: (number | undefined)[], issued: import("@jbrowse/display-kit/regionTooLargeUtils").GateFetchState): void;
|
|
1207
|
+
commitFetchBytes(perRegionBytes: (number | undefined)[], issued: import("@jbrowse/display-kit/regionTooLargeUtils").GateFetchState, partial?: boolean): void;
|
|
1138
1208
|
} & {
|
|
1139
1209
|
forceLoad(): void;
|
|
1140
1210
|
} & {
|
|
@@ -1149,6 +1219,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1149
1219
|
readonly canRender: boolean;
|
|
1150
1220
|
readonly rendersCanvas: boolean;
|
|
1151
1221
|
readonly paintInert: boolean;
|
|
1222
|
+
readonly paintSuperseded: boolean;
|
|
1152
1223
|
} & {
|
|
1153
1224
|
readonly painted: boolean;
|
|
1154
1225
|
} & {
|
|
@@ -1180,7 +1251,9 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1180
1251
|
readonly isLoadingOrCanceled: boolean;
|
|
1181
1252
|
readonly fetchInert: boolean;
|
|
1182
1253
|
readonly awaitingPrerequisite: boolean;
|
|
1254
|
+
readonly awaitingDependentData: boolean;
|
|
1183
1255
|
readonly rpcPropsCacheKey: string;
|
|
1256
|
+
readonly adapterConfigKey: string;
|
|
1184
1257
|
} & {
|
|
1185
1258
|
setError(error?: unknown): void;
|
|
1186
1259
|
setStatusMessage(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
@@ -1190,8 +1263,10 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1190
1263
|
} & {
|
|
1191
1264
|
cancelFetch(): void;
|
|
1192
1265
|
cancelFetchByUser(): void;
|
|
1266
|
+
reload(): void;
|
|
1193
1267
|
beforeDestroy(): void;
|
|
1194
|
-
|
|
1268
|
+
beginFetch(stopToken: import("@jbrowse/core/util").StopToken): void;
|
|
1269
|
+
endFetch(current: boolean): void;
|
|
1195
1270
|
} & {
|
|
1196
1271
|
runFetch: (work: (ctx: import("@jbrowse/display-kit/FetchMixin").FetchContext) => Promise<void>) => Promise<void>;
|
|
1197
1272
|
} & {
|
|
@@ -1199,29 +1274,45 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1199
1274
|
} & {
|
|
1200
1275
|
readonly host: import("@jbrowse/display-kit/regionHost").RegionHost;
|
|
1201
1276
|
readonly canvasWidthPx: number;
|
|
1277
|
+
readonly settledSubPixelBinBp: number;
|
|
1202
1278
|
readonly canRender: boolean;
|
|
1279
|
+
readonly rendersCanvas: boolean;
|
|
1203
1280
|
readonly viewportWithinLoadedData: boolean;
|
|
1204
1281
|
readonly viewportEmpty: boolean;
|
|
1282
|
+
readonly fetchSuspended: boolean;
|
|
1205
1283
|
readonly layoutReady: boolean;
|
|
1206
|
-
readonly
|
|
1207
|
-
regionHasData(
|
|
1284
|
+
readonly zoomFetchKey: string;
|
|
1285
|
+
regionHasData(displayedRegionIndex: number): boolean;
|
|
1208
1286
|
readonly dataSuperseded: boolean;
|
|
1209
1287
|
readonly renderBlocks: import("@jbrowse/render-core/renderBlock").RenderBlock[];
|
|
1288
|
+
} & {
|
|
1289
|
+
readonly fetchInputs: import("@jbrowse/display-kit/fetchInputs").FetchInputs;
|
|
1290
|
+
readonly settingsFetchInputs: unknown;
|
|
1291
|
+
} & {
|
|
1292
|
+
readonly regionPayloads: ReadonlyMap<number, unknown>;
|
|
1293
|
+
readonly hasRegionData: boolean;
|
|
1210
1294
|
} & {
|
|
1211
1295
|
isCacheValid(displayedRegionIndex: number): boolean;
|
|
1212
1296
|
} & {
|
|
1297
|
+
readonly staleSettingsDrawn: boolean;
|
|
1213
1298
|
readonly dataCurrent: boolean;
|
|
1214
1299
|
readonly loadedAssembly: import("@jbrowse/core/assemblyManager/assembly").Assembly | undefined;
|
|
1300
|
+
} & {
|
|
1301
|
+
readonly phaseViewportCurrent: boolean;
|
|
1215
1302
|
} & {
|
|
1216
1303
|
readonly svgReady: boolean;
|
|
1217
1304
|
readonly paintInert: boolean;
|
|
1305
|
+
readonly paintSuperseded: boolean;
|
|
1218
1306
|
readonly displayPhase: import("@jbrowse/render-core/displayPhase").DisplayPhase;
|
|
1219
1307
|
} & {
|
|
1220
|
-
setLoadedRegion(displayedRegionIndex: number, region: import("@jbrowse/core/util").Region,
|
|
1308
|
+
setLoadedRegion(displayedRegionIndex: number, region: import("@jbrowse/core/util").Region, payload: import("@jbrowse/display-kit/regionCommit").RegionPayload | undefined, fetchInputs?: import("@jbrowse/display-kit/fetchInputs").FetchInputs): void;
|
|
1309
|
+
evictRegionStore(keep: ReadonlySet<number>): void;
|
|
1221
1310
|
dropLoadedRegion(displayedRegionIndex: number): void;
|
|
1222
1311
|
clearDisplaySpecificData(): void;
|
|
1312
|
+
clearSettingsBakedData(): void;
|
|
1223
1313
|
} & {
|
|
1224
1314
|
clearAllRpcData(): void;
|
|
1315
|
+
invalidateSettings(): void;
|
|
1225
1316
|
reload(): void;
|
|
1226
1317
|
} & {
|
|
1227
1318
|
fetchNeeded(_needed: IndexedRegion[]): void;
|
|
@@ -1232,24 +1323,23 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
|
|
|
1232
1323
|
} & {
|
|
1233
1324
|
/** every `fetchNeeded` call, as the region list it was handed */
|
|
1234
1325
|
fetchLog: IndexedRegion[][];
|
|
1235
|
-
loadedData: Map<number, string>;
|
|
1236
1326
|
/**
|
|
1237
|
-
* What `
|
|
1327
|
+
* What `zoomFetchKey` answers. A volatile, not a `control` knob, and
|
|
1238
1328
|
* that is the point: a real display's key reads view state, so the
|
|
1239
1329
|
* autorun re-runs when it moves. A plain closure value would be memoized
|
|
1240
1330
|
* by the computed and never invalidate.
|
|
1241
1331
|
*/
|
|
1242
1332
|
fetchKey: string;
|
|
1243
1333
|
} & {
|
|
1334
|
+
regionHasData(displayedRegionIndex: number): boolean;
|
|
1335
|
+
} & {
|
|
1336
|
+
/** the fetched payloads, off the foundation's store */
|
|
1337
|
+
readonly loadedData: ReadonlyMap<number, string>;
|
|
1244
1338
|
readonly gateEnabled: boolean;
|
|
1245
|
-
readonly densityGateEnabled: boolean;
|
|
1246
1339
|
readonly densityTooLarge: boolean;
|
|
1247
|
-
readonly
|
|
1248
|
-
regionHasData(_displayedRegionIndex: number): boolean;
|
|
1340
|
+
readonly zoomFetchKey: string;
|
|
1249
1341
|
} & {
|
|
1250
1342
|
setFetchKey(key: string): void;
|
|
1251
|
-
setLoaded(displayedRegionIndex: number, value: string): void;
|
|
1252
|
-
clearDisplaySpecificData(): void;
|
|
1253
1343
|
} & {
|
|
1254
1344
|
fetchNeeded(needed: IndexedRegion[]): Promise<void>;
|
|
1255
1345
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|