@jbrowse/plugin-linear-genome-view 5.0.0-beta.8 → 5.0.0-beta.9

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 (76) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +140 -48
  2. package/esm/LinearGenomeView/afterAttach.d.ts +5 -5
  3. package/esm/LinearGenomeView/afterAttach.js +18 -24
  4. package/esm/LinearGenomeView/closeUps.d.ts +83 -0
  5. package/esm/LinearGenomeView/closeUps.js +211 -0
  6. package/esm/LinearGenomeView/components/AddCloseUpDialog.d.ts +19 -0
  7. package/esm/LinearGenomeView/components/AddCloseUpDialog.js +29 -0
  8. package/esm/LinearGenomeView/components/CloseUps.d.ts +5 -0
  9. package/esm/LinearGenomeView/components/CloseUps.js +75 -0
  10. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -1
  11. package/esm/LinearGenomeView/components/ExportSvgDialog.js +6 -2
  12. package/esm/LinearGenomeView/components/GetSequenceDialog.js +2 -2
  13. package/esm/LinearGenomeView/components/Header.js +6 -1
  14. package/esm/LinearGenomeView/components/HeaderZoomControls.js +4 -34
  15. package/esm/LinearGenomeView/components/Highlight.js +2 -4
  16. package/esm/LinearGenomeView/components/HighlightBand.js +2 -2
  17. package/esm/LinearGenomeView/components/HighlightChip.d.ts +1 -2
  18. package/esm/LinearGenomeView/components/HighlightChip.js +5 -7
  19. package/esm/LinearGenomeView/components/ImportForm.js +2 -2
  20. package/esm/LinearGenomeView/components/LinearGenomeView.js +3 -3
  21. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +3 -2
  22. package/esm/LinearGenomeView/components/OverviewHighlight.js +1 -1
  23. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +2 -3
  24. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +7 -1
  25. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +22 -7
  26. package/esm/LinearGenomeView/components/SVGHighlightBand.js +2 -3
  27. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +6 -21
  28. package/esm/LinearGenomeView/components/SearchBox.js +2 -2
  29. package/esm/LinearGenomeView/components/TrackContainer.js +12 -5
  30. package/esm/LinearGenomeView/components/TrackLabel.js +1 -1
  31. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +3 -1
  32. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +3 -7
  33. package/esm/LinearGenomeView/components/TracksContainer.js +7 -15
  34. package/esm/LinearGenomeView/components/fetchSequence.d.ts +1 -2
  35. package/esm/LinearGenomeView/components/useSideScroll.js +1 -1
  36. package/esm/LinearGenomeView/consts.d.ts +2 -0
  37. package/esm/LinearGenomeView/consts.js +5 -0
  38. package/esm/LinearGenomeView/headerFit.d.ts +2 -1
  39. package/esm/LinearGenomeView/headerFit.js +7 -2
  40. package/esm/LinearGenomeView/index.d.ts +1 -1
  41. package/esm/LinearGenomeView/keyboardHandler.d.ts +2 -0
  42. package/esm/LinearGenomeView/keyboardHandler.js +11 -0
  43. package/esm/LinearGenomeView/launchKeys.d.ts +1 -1
  44. package/esm/LinearGenomeView/launchKeys.js +15 -5
  45. package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -0
  46. package/esm/LinearGenomeView/lazyDialogs.js +2 -0
  47. package/esm/LinearGenomeView/menuItems.d.ts +28 -16
  48. package/esm/LinearGenomeView/menuItems.js +213 -85
  49. package/esm/LinearGenomeView/model.d.ts +367 -199
  50. package/esm/LinearGenomeView/model.js +302 -143
  51. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +1 -1
  52. package/esm/LinearGenomeView/showRegionsWithUndo.js +7 -1
  53. package/esm/LinearGenomeView/svgcomponents/SVGCloseUpFrame.d.ts +5 -0
  54. package/esm/LinearGenomeView/svgcomponents/SVGCloseUpFrame.js +8 -0
  55. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +3 -4
  56. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +3 -3
  57. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +95 -24
  58. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +4 -5
  59. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +13 -4
  60. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +4 -4
  61. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +1 -1
  62. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +52 -63
  63. package/esm/LinearGenomeView/svgcomponents/util.d.ts +8 -6
  64. package/esm/LinearGenomeView/svgcomponents/util.js +37 -16
  65. package/esm/LinearGenomeView/types.d.ts +5 -4
  66. package/esm/LinearGenomeView/util.d.ts +20 -37
  67. package/esm/LinearGenomeView/util.js +58 -141
  68. package/esm/displayKitTests/perRegionTestEnv.d.ts +64 -45
  69. package/esm/displayKitTests/perRegionTestEnv.js +6 -6
  70. package/esm/index.d.ts +9 -67
  71. package/esm/index.js +6 -22
  72. package/esm/searchUtils.d.ts +2 -3
  73. package/esm/searchUtils.js +2 -2
  74. package/package.json +7 -7
  75. package/esm/lazyPluginExports.d.ts +0 -23
  76. package/esm/lazyPluginExports.js +0 -36
@@ -254,7 +254,7 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
254
254
  allowSetters?: boolean;
255
255
  }): {
256
256
  applied: string[];
257
- unapplied: string[];
257
+ unapplied: import("@jbrowse/core/util/unknownSnapshotKeys").UnappliedSetting[];
258
258
  failed: {
259
259
  key: string;
260
260
  error: string;
@@ -265,6 +265,9 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
265
265
  } & {
266
266
  readonly height: number;
267
267
  readonly resizing: boolean;
268
+ readonly scrollContentHeight: number;
269
+ readonly scrollViewportHeight: number;
270
+ } & {
268
271
  readonly scrollableHeight: number;
269
272
  } & {
270
273
  setScrollTop(scrollTop: number): void;
@@ -276,18 +279,17 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
276
279
  } & {
277
280
  forceLoadTrack: boolean;
278
281
  byteEstimate: import("@jbrowse/display-kit/regionTooLargeUtils").ByteEstimate | undefined;
279
- gateMeasuredViewportKey: string | undefined;
282
+ gateMeasuredViewportKey: unknown;
280
283
  } & {
281
284
  readonly gateEnabled: boolean;
282
285
  readonly byteGateAdapterConfig: Record<string, unknown>;
283
286
  readonly configuredFetchSizeLimit: number | undefined;
284
287
  readonly densityTooLarge: boolean;
285
- readonly byteGateAdapterPath: string[];
288
+ readonly byteGateAdapterPath: import("@jbrowse/display-kit/RegionTooLargeMixin").ByteGateAdapterPath;
286
289
  readonly adapterFetchSizeLimit: number | undefined;
287
290
  readonly configForceLoad: boolean;
288
291
  readonly gateViewport: import("@jbrowse/display-kit/regionTooLargeUtils").GateViewport | undefined;
289
292
  } & {
290
- readonly byteGateAdapterKey: string;
291
293
  readonly aboveForceLoadFloor: boolean;
292
294
  readonly gateExempt: boolean;
293
295
  readonly estimatedFetchBytes: number | undefined;
@@ -339,7 +341,7 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
339
341
  } & {
340
342
  attachRenderingBackend<B>(backend: B, setup: () => import("@jbrowse/render-core/RenderLifecycleMixin").RenderingBackendCallbacks<B>): void;
341
343
  } & {
342
- activeStopToken: import("@jbrowse/core/util").StopToken | undefined;
344
+ activeSignal: AbortSignal | undefined;
343
345
  fetchGeneration: number;
344
346
  reloadCounter: number;
345
347
  statusWindow: import("@jbrowse/core/util").StatusWindow;
@@ -360,8 +362,8 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
360
362
  readonly fetchInert: boolean;
361
363
  readonly awaitingPrerequisite: boolean;
362
364
  readonly awaitingDependentData: boolean;
363
- readonly rpcPropsCacheKey: string;
364
- readonly adapterConfigKey: string;
365
+ } & {
366
+ readonly settingsFetchInputs: unknown;
365
367
  } & {
366
368
  setError(error?: unknown): void;
367
369
  setStatusMessage(status?: import("@jbrowse/core/util").RpcStatus): void;
@@ -373,7 +375,7 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
373
375
  cancelFetchByUser(): void;
374
376
  reload(): void;
375
377
  beforeDestroy(): void;
376
- beginFetch(stopToken: import("@jbrowse/core/util").StopToken): void;
378
+ beginFetch(signal: AbortSignal): void;
377
379
  endFetch(current: boolean): void;
378
380
  } & {
379
381
  runFetch: (work: (ctx: import("@jbrowse/display-kit/FetchMixin").FetchContext) => Promise<void>) => Promise<void>;
@@ -385,17 +387,16 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
385
387
  readonly settledSubPixelBinBp: number;
386
388
  readonly canRender: boolean;
387
389
  readonly rendersCanvas: boolean;
390
+ readonly trackVisibleRegions: import("@jbrowse/display-kit/regionHost").VisibleRegion[];
388
391
  readonly viewportWithinLoadedData: boolean;
389
392
  readonly viewportEmpty: boolean;
390
393
  readonly fetchSuspended: boolean;
391
394
  readonly layoutReady: boolean;
392
- readonly zoomFetchKey: string;
393
395
  regionHasData(displayedRegionIndex: number): boolean;
394
396
  readonly dataSuperseded: boolean;
395
397
  readonly renderBlocks: import("@jbrowse/render-core/renderBlock").RenderBlock[];
396
398
  } & {
397
399
  readonly fetchInputs: import("@jbrowse/display-kit/fetchInputs").FetchInputs;
398
- readonly settingsFetchInputs: unknown;
399
400
  } & {
400
401
  readonly regionPayloads: ReadonlyMap<number, unknown>;
401
402
  readonly hasRegionData: boolean;
@@ -432,10 +433,10 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
432
433
  /** every `fetchNeeded` call, as the region list it was handed */
433
434
  fetchLog: IndexedRegion[][];
434
435
  /**
435
- * What `zoomFetchKey` answers. A volatile, not a `control` knob, and
436
- * that is the point: a real display's key reads view state, so the
437
- * autorun re-runs when it moves. A plain closure value would be memoized
438
- * by the computed and never invalidate.
436
+ * What `zoomFetchArgs` answers. A volatile, not a `control` knob, and
437
+ * that is the point: a real display's args read view state, so the
438
+ * autorun re-runs when they move. A plain closure value would be
439
+ * memoized by the computed and never invalidate.
439
440
  */
440
441
  fetchKey: string;
441
442
  } & {
@@ -445,7 +446,9 @@ declare function makeStateModel(control: PerRegionTestControl, gate: GateOptIns,
445
446
  readonly loadedData: ReadonlyMap<number, string>;
446
447
  readonly gateEnabled: boolean;
447
448
  readonly densityTooLarge: boolean;
448
- readonly zoomFetchKey: string;
449
+ zoomFetchArgs(): {
450
+ key: string;
451
+ };
449
452
  } & {
450
453
  setFetchKey(key: string): void;
451
454
  } & {
@@ -508,6 +511,11 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
508
511
  id: string;
509
512
  };
510
513
  showWidget(_widget: unknown): void;
514
+ } & {
515
+ openWidget(type: string, id: string, initialState?: Record<string, unknown>): {
516
+ type: string;
517
+ id: string;
518
+ };
511
519
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
512
520
  name: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
513
521
  view: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IAnyModelType>;
@@ -540,6 +548,11 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
540
548
  id: string;
541
549
  };
542
550
  showWidget(_widget: unknown): void;
551
+ } & {
552
+ openWidget(type: string, id: string, initialState?: Record<string, unknown>): {
553
+ type: string;
554
+ id: string;
555
+ };
543
556
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
544
557
  view: any;
545
558
  track: any;
@@ -746,7 +759,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
746
759
  allowSetters?: boolean;
747
760
  }): {
748
761
  applied: string[];
749
- unapplied: string[];
762
+ unapplied: import("@jbrowse/core/util/unknownSnapshotKeys").UnappliedSetting[];
750
763
  failed: {
751
764
  key: string;
752
765
  error: string;
@@ -757,6 +770,9 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
757
770
  } & {
758
771
  readonly height: number;
759
772
  readonly resizing: boolean;
773
+ readonly scrollContentHeight: number;
774
+ readonly scrollViewportHeight: number;
775
+ } & {
760
776
  readonly scrollableHeight: number;
761
777
  } & {
762
778
  setScrollTop(scrollTop: number): void;
@@ -768,18 +784,17 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
768
784
  } & {
769
785
  forceLoadTrack: boolean;
770
786
  byteEstimate: import("@jbrowse/display-kit/regionTooLargeUtils").ByteEstimate | undefined;
771
- gateMeasuredViewportKey: string | undefined;
787
+ gateMeasuredViewportKey: unknown;
772
788
  } & {
773
789
  readonly gateEnabled: boolean;
774
790
  readonly byteGateAdapterConfig: Record<string, unknown>;
775
791
  readonly configuredFetchSizeLimit: number | undefined;
776
792
  readonly densityTooLarge: boolean;
777
- readonly byteGateAdapterPath: string[];
793
+ readonly byteGateAdapterPath: import("@jbrowse/display-kit/RegionTooLargeMixin").ByteGateAdapterPath;
778
794
  readonly adapterFetchSizeLimit: number | undefined;
779
795
  readonly configForceLoad: boolean;
780
796
  readonly gateViewport: import("@jbrowse/display-kit/regionTooLargeUtils").GateViewport | undefined;
781
797
  } & {
782
- readonly byteGateAdapterKey: string;
783
798
  readonly aboveForceLoadFloor: boolean;
784
799
  readonly gateExempt: boolean;
785
800
  readonly estimatedFetchBytes: number | undefined;
@@ -831,7 +846,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
831
846
  } & {
832
847
  attachRenderingBackend<B>(backend: B, setup: () => import("@jbrowse/render-core/RenderLifecycleMixin").RenderingBackendCallbacks<B>): void;
833
848
  } & {
834
- activeStopToken: import("@jbrowse/core/util").StopToken | undefined;
849
+ activeSignal: AbortSignal | undefined;
835
850
  fetchGeneration: number;
836
851
  reloadCounter: number;
837
852
  statusWindow: import("@jbrowse/core/util").StatusWindow;
@@ -852,8 +867,8 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
852
867
  readonly fetchInert: boolean;
853
868
  readonly awaitingPrerequisite: boolean;
854
869
  readonly awaitingDependentData: boolean;
855
- readonly rpcPropsCacheKey: string;
856
- readonly adapterConfigKey: string;
870
+ } & {
871
+ readonly settingsFetchInputs: unknown;
857
872
  } & {
858
873
  setError(error?: unknown): void;
859
874
  setStatusMessage(status?: import("@jbrowse/core/util").RpcStatus): void;
@@ -865,7 +880,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
865
880
  cancelFetchByUser(): void;
866
881
  reload(): void;
867
882
  beforeDestroy(): void;
868
- beginFetch(stopToken: import("@jbrowse/core/util").StopToken): void;
883
+ beginFetch(signal: AbortSignal): void;
869
884
  endFetch(current: boolean): void;
870
885
  } & {
871
886
  runFetch: (work: (ctx: import("@jbrowse/display-kit/FetchMixin").FetchContext) => Promise<void>) => Promise<void>;
@@ -877,17 +892,16 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
877
892
  readonly settledSubPixelBinBp: number;
878
893
  readonly canRender: boolean;
879
894
  readonly rendersCanvas: boolean;
895
+ readonly trackVisibleRegions: import("@jbrowse/display-kit/regionHost").VisibleRegion[];
880
896
  readonly viewportWithinLoadedData: boolean;
881
897
  readonly viewportEmpty: boolean;
882
898
  readonly fetchSuspended: boolean;
883
899
  readonly layoutReady: boolean;
884
- readonly zoomFetchKey: string;
885
900
  regionHasData(displayedRegionIndex: number): boolean;
886
901
  readonly dataSuperseded: boolean;
887
902
  readonly renderBlocks: import("@jbrowse/render-core/renderBlock").RenderBlock[];
888
903
  } & {
889
904
  readonly fetchInputs: import("@jbrowse/display-kit/fetchInputs").FetchInputs;
890
- readonly settingsFetchInputs: unknown;
891
905
  } & {
892
906
  readonly regionPayloads: ReadonlyMap<number, unknown>;
893
907
  readonly hasRegionData: boolean;
@@ -924,10 +938,10 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
924
938
  /** every `fetchNeeded` call, as the region list it was handed */
925
939
  fetchLog: IndexedRegion[][];
926
940
  /**
927
- * What `zoomFetchKey` answers. A volatile, not a `control` knob, and
928
- * that is the point: a real display's key reads view state, so the
929
- * autorun re-runs when it moves. A plain closure value would be memoized
930
- * by the computed and never invalidate.
941
+ * What `zoomFetchArgs` answers. A volatile, not a `control` knob, and
942
+ * that is the point: a real display's args read view state, so the
943
+ * autorun re-runs when they move. A plain closure value would be
944
+ * memoized by the computed and never invalidate.
931
945
  */
932
946
  fetchKey: string;
933
947
  } & {
@@ -937,7 +951,9 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
937
951
  readonly loadedData: ReadonlyMap<number, string>;
938
952
  readonly gateEnabled: boolean;
939
953
  readonly densityTooLarge: boolean;
940
- readonly zoomFetchKey: string;
954
+ zoomFetchArgs(): {
955
+ key: string;
956
+ };
941
957
  } & {
942
958
  setFetchKey(key: string): void;
943
959
  } & {
@@ -1145,7 +1161,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1145
1161
  allowSetters?: boolean;
1146
1162
  }): {
1147
1163
  applied: string[];
1148
- unapplied: string[];
1164
+ unapplied: import("@jbrowse/core/util/unknownSnapshotKeys").UnappliedSetting[];
1149
1165
  failed: {
1150
1166
  key: string;
1151
1167
  error: string;
@@ -1156,6 +1172,9 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1156
1172
  } & {
1157
1173
  readonly height: number;
1158
1174
  readonly resizing: boolean;
1175
+ readonly scrollContentHeight: number;
1176
+ readonly scrollViewportHeight: number;
1177
+ } & {
1159
1178
  readonly scrollableHeight: number;
1160
1179
  } & {
1161
1180
  setScrollTop(scrollTop: number): void;
@@ -1167,18 +1186,17 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1167
1186
  } & {
1168
1187
  forceLoadTrack: boolean;
1169
1188
  byteEstimate: import("@jbrowse/display-kit/regionTooLargeUtils").ByteEstimate | undefined;
1170
- gateMeasuredViewportKey: string | undefined;
1189
+ gateMeasuredViewportKey: unknown;
1171
1190
  } & {
1172
1191
  readonly gateEnabled: boolean;
1173
1192
  readonly byteGateAdapterConfig: Record<string, unknown>;
1174
1193
  readonly configuredFetchSizeLimit: number | undefined;
1175
1194
  readonly densityTooLarge: boolean;
1176
- readonly byteGateAdapterPath: string[];
1195
+ readonly byteGateAdapterPath: import("@jbrowse/display-kit/RegionTooLargeMixin").ByteGateAdapterPath;
1177
1196
  readonly adapterFetchSizeLimit: number | undefined;
1178
1197
  readonly configForceLoad: boolean;
1179
1198
  readonly gateViewport: import("@jbrowse/display-kit/regionTooLargeUtils").GateViewport | undefined;
1180
1199
  } & {
1181
- readonly byteGateAdapterKey: string;
1182
1200
  readonly aboveForceLoadFloor: boolean;
1183
1201
  readonly gateExempt: boolean;
1184
1202
  readonly estimatedFetchBytes: number | undefined;
@@ -1230,7 +1248,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1230
1248
  } & {
1231
1249
  attachRenderingBackend<B>(backend: B, setup: () => import("@jbrowse/render-core/RenderLifecycleMixin").RenderingBackendCallbacks<B>): void;
1232
1250
  } & {
1233
- activeStopToken: import("@jbrowse/core/util").StopToken | undefined;
1251
+ activeSignal: AbortSignal | undefined;
1234
1252
  fetchGeneration: number;
1235
1253
  reloadCounter: number;
1236
1254
  statusWindow: import("@jbrowse/core/util").StatusWindow;
@@ -1251,8 +1269,8 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1251
1269
  readonly fetchInert: boolean;
1252
1270
  readonly awaitingPrerequisite: boolean;
1253
1271
  readonly awaitingDependentData: boolean;
1254
- readonly rpcPropsCacheKey: string;
1255
- readonly adapterConfigKey: string;
1272
+ } & {
1273
+ readonly settingsFetchInputs: unknown;
1256
1274
  } & {
1257
1275
  setError(error?: unknown): void;
1258
1276
  setStatusMessage(status?: import("@jbrowse/core/util").RpcStatus): void;
@@ -1264,7 +1282,7 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1264
1282
  cancelFetchByUser(): void;
1265
1283
  reload(): void;
1266
1284
  beforeDestroy(): void;
1267
- beginFetch(stopToken: import("@jbrowse/core/util").StopToken): void;
1285
+ beginFetch(signal: AbortSignal): void;
1268
1286
  endFetch(current: boolean): void;
1269
1287
  } & {
1270
1288
  runFetch: (work: (ctx: import("@jbrowse/display-kit/FetchMixin").FetchContext) => Promise<void>) => Promise<void>;
@@ -1276,17 +1294,16 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1276
1294
  readonly settledSubPixelBinBp: number;
1277
1295
  readonly canRender: boolean;
1278
1296
  readonly rendersCanvas: boolean;
1297
+ readonly trackVisibleRegions: import("@jbrowse/display-kit/regionHost").VisibleRegion[];
1279
1298
  readonly viewportWithinLoadedData: boolean;
1280
1299
  readonly viewportEmpty: boolean;
1281
1300
  readonly fetchSuspended: boolean;
1282
1301
  readonly layoutReady: boolean;
1283
- readonly zoomFetchKey: string;
1284
1302
  regionHasData(displayedRegionIndex: number): boolean;
1285
1303
  readonly dataSuperseded: boolean;
1286
1304
  readonly renderBlocks: import("@jbrowse/render-core/renderBlock").RenderBlock[];
1287
1305
  } & {
1288
1306
  readonly fetchInputs: import("@jbrowse/display-kit/fetchInputs").FetchInputs;
1289
- readonly settingsFetchInputs: unknown;
1290
1307
  } & {
1291
1308
  readonly regionPayloads: ReadonlyMap<number, unknown>;
1292
1309
  readonly hasRegionData: boolean;
@@ -1323,10 +1340,10 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1323
1340
  /** every `fetchNeeded` call, as the region list it was handed */
1324
1341
  fetchLog: IndexedRegion[][];
1325
1342
  /**
1326
- * What `zoomFetchKey` answers. A volatile, not a `control` knob, and
1327
- * that is the point: a real display's key reads view state, so the
1328
- * autorun re-runs when it moves. A plain closure value would be memoized
1329
- * by the computed and never invalidate.
1343
+ * What `zoomFetchArgs` answers. A volatile, not a `control` knob, and
1344
+ * that is the point: a real display's args read view state, so the
1345
+ * autorun re-runs when they move. A plain closure value would be
1346
+ * memoized by the computed and never invalidate.
1330
1347
  */
1331
1348
  fetchKey: string;
1332
1349
  } & {
@@ -1336,7 +1353,9 @@ export declare function createPerRegionTestEnvironment({ measuresBytes, gate, es
1336
1353
  readonly loadedData: ReadonlyMap<number, string>;
1337
1354
  readonly gateEnabled: boolean;
1338
1355
  readonly densityTooLarge: boolean;
1339
- readonly zoomFetchKey: string;
1356
+ zoomFetchArgs(): {
1357
+ key: string;
1358
+ };
1340
1359
  } & {
1341
1360
  setFetchKey(key: string): void;
1342
1361
  } & {
@@ -29,10 +29,10 @@ function makeStateModel(control, gate, configSchema) {
29
29
  /** every `fetchNeeded` call, as the region list it was handed */
30
30
  fetchLog: [],
31
31
  /**
32
- * What `zoomFetchKey` answers. A volatile, not a `control` knob, and
33
- * that is the point: a real display's key reads view state, so the
34
- * autorun re-runs when it moves. A plain closure value would be memoized
35
- * by the computed and never invalidate.
32
+ * What `zoomFetchArgs` answers. A volatile, not a `control` knob, and
33
+ * that is the point: a real display's args read view state, so the
34
+ * autorun re-runs when they move. A plain closure value would be
35
+ * memoized by the computed and never invalidate.
36
36
  */
37
37
  fetchKey: '',
38
38
  }))
@@ -63,8 +63,8 @@ function makeStateModel(control, gate, configSchema) {
63
63
  get densityTooLarge() {
64
64
  return control.densityTooLarge;
65
65
  },
66
- get zoomFetchKey() {
67
- return self.fetchKey;
66
+ zoomFetchArgs() {
67
+ return { key: self.fetchKey };
68
68
  },
69
69
  }))
70
70
  .actions(self => ({
package/esm/index.d.ts CHANGED
@@ -2,78 +2,19 @@ import Plugin from '@jbrowse/core/Plugin';
2
2
  import type PluginManager from '@jbrowse/core/PluginManager';
3
3
  export default class LinearGenomeViewPlugin extends Plugin {
4
4
  name: string;
5
- exports: {
6
- baseLinearDisplayConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
7
- readonly fetchSizeLimit: {
8
- readonly type: 'number';
9
- readonly defaultValue: 1000000;
10
- readonly description: "maximum data to attempt to download for a given track, used if adapter doesn't specify one";
11
- readonly advanced: true;
12
- };
13
- readonly forceLoad: {
14
- readonly type: 'boolean';
15
- readonly defaultValue: false;
16
- readonly description: 'Declarative equivalent of the "Force load" button on the "too much data" banner: when true the display always renders, however large the region or dense the features. Off by default (the gate guards against huge downloads). Set it on a view no one can interact with — an embedded / notebook view, or a screenshot — where the region is known and you want it drawn without a click.';
17
- readonly advanced: true;
18
- };
19
- readonly height: {
20
- readonly type: "number";
21
- readonly defaultValue: 100;
22
- readonly description: "default height for the track";
23
- };
24
- readonly mouseover: {
25
- readonly type: "string";
26
- readonly description: "text to display when the cursor hovers over a feature";
27
- readonly defaultValue: "jexl:get(feature,'_mouseOver')||get(feature,'name')||get(feature,'function')||get(feature,'id')";
28
- readonly contextVariable: ["feature"];
29
- };
30
- readonly jexlFilters: {
31
- readonly type: "stringArray";
32
- readonly description: "default set of jexl filters to apply to a track. note: these do not use the jexl prefix because they have a deferred evaluation system";
33
- readonly defaultValue: readonly [];
34
- };
35
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
36
- SearchBox: {
37
- (props: {
38
- model: import("./index.ts").LinearGenomeViewModel;
39
- showHelp?: boolean;
40
- minWidth?: number;
41
- maxWidth?: number;
42
- style?: React.CSSProperties;
43
- }): import("react").JSX.Element;
44
- displayName: string;
45
- };
46
- ZoomControls: {
47
- (props: {
48
- model: import("./index.ts").LinearGenomeViewModel;
49
- }): import("react").JSX.Element;
50
- displayName: string;
51
- };
52
- LinearGenomeView: {
53
- (props: {
54
- model: import("./index.ts").LinearGenomeViewModel;
55
- }): import("react").JSX.Element;
56
- displayName: string;
57
- };
58
- };
59
5
  /**
60
6
  * #config LinearGenomeViewConfigSchema
61
7
  * #category root
62
8
  */
63
9
  configurationSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
64
- /**
65
- * #slot configuration.LinearGenomeViewPlugin.trackLabels
66
- * where a track's name is drawn: `offset` gives it its own line above the
67
- * data, `overlapping` floats it over the top of the data to save vertical
68
- * space, `hidden` omits it. The view menu's "Show..." submenu sets the same
69
- * thing per session, under its "Track labels" heading
70
- */
71
10
  readonly trackLabels: {
72
- readonly type: "string";
73
- readonly defaultValue: "offset";
74
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"hidden" | "offset" | "overlapping">;
11
+ type: "string";
12
+ } & {
13
+ model: import("@jbrowse/mobx-state-tree").ISimpleType<"hidden" | "offset" | "overlapping">;
14
+ } & {
15
+ defaultValue: string;
75
16
  };
76
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
17
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
77
18
  install(pluginManager: PluginManager): void;
78
19
  configure(pluginManager: PluginManager): void;
79
20
  }
@@ -90,9 +31,10 @@ export { applyInitHighlights } from './LinearGenomeView/afterAttach.ts';
90
31
  export { MultiLevelRubberband } from './MultiLevelRubberband/index.ts';
91
32
  export { fetchResults, SearchResultsNotFoundError } from './searchUtils.ts';
92
33
  export type { LaunchLinearGenomeViewArgs } from './LaunchLinearGenomeView/index.ts';
93
- export type { BpOffset, ExportSvgOptions, HighlightType, InitState, LinearGenomeViewLaunchProps, NavLocation, TrackLabelMode, VolatileGuide, } from './LinearGenomeView/types.ts';
34
+ export type { BpOffset, ExportSvgOptions, HighlightInput, HighlightType, InitState, LinearGenomeViewLaunchProps, NavLocation, TrackLabelMode, ViewTrackLabelMode, VolatileGuide, } from './LinearGenomeView/types.ts';
94
35
  export type { ScalebarRefNameLabel } from './LinearGenomeView/util.ts';
95
36
  export type { RegionsOrientation } from './LinearGenomeView/util.ts';
37
+ export type { CloseUp } from './LinearGenomeView/closeUps.ts';
96
38
  export { makeTicks } from './LinearGenomeView/util.ts';
97
39
  export type { Tick } from './LinearGenomeView/util.ts';
98
40
  export { containingLgv } from './LinearGenomeView/containingLgv.ts';
@@ -117,7 +59,7 @@ export { SvgChrome, SvgClipRect } from '@jbrowse/core/svg/SvgExport';
117
59
  export { svgSafeId } from '@jbrowse/core/svg/svgId';
118
60
  export { awaitSvgReady, awaitSvgRenders } from '@jbrowse/core/svg/svgReady';
119
61
  export type { SvgExportable } from '@jbrowse/core/svg/svgReady';
120
- export { defaultTextHeight, getRowHeaderLayout, labelBaselineFromTop, labelOffset, totalHeight, trackBoxHeight, trackBoxOffsets, trackLabelLeftOffset, } from './LinearGenomeView/svgcomponents/util.ts';
62
+ export { defaultTextHeight, getRowHeaderLayout, labelBaselineFromTop, labelOffset, totalHeight, trackBoxHeight, trackBoxOffsets, trackLabelMode, trackLabelLeftOffset, } from './LinearGenomeView/svgcomponents/util.ts';
121
63
  export { notifySkippedSvgTracks } from '@jbrowse/core/svg/trackNames';
122
64
  export { renderViewTracks } from './LinearGenomeView/svgcomponents/renderViewTracks.ts';
123
65
  export type { SvgExportTrack, ViewTracksSvg, } from './LinearGenomeView/svgcomponents/renderViewTracks.ts';
package/esm/index.js CHANGED
@@ -1,24 +1,15 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
2
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
3
3
  import { isAbstractMenuManager } from '@jbrowse/core/util';
4
- import baseLinearDisplayConfigSchema from '@jbrowse/display-kit/configSchema';
4
+ import { VIEW_TRACK_LABEL_MODES } from '@jbrowse/display-kit/types';
5
5
  import { types } from '@jbrowse/mobx-state-tree';
6
6
  import LineStyleIcon from '@mui/icons-material/LineStyle';
7
7
  import FeatureTrackF from './FeatureTrack/index.js';
8
8
  import LaunchLinearGenomeViewF from './LaunchLinearGenomeView/index.js';
9
9
  import SequenceFeatureHoverHighlightExtensionF from './LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js';
10
10
  import LinearGenomeViewF from './LinearGenomeView/index.js';
11
- import { LinearGenomeView, SearchBox, ZoomControls, } from './lazyPluginExports.js';
12
11
  export default class LinearGenomeViewPlugin extends Plugin {
13
12
  name = 'LinearGenomeViewPlugin';
14
- // the three components here are lazy, see lazyPluginExports.tsx — naming a
15
- // component in this object is enough to pin it into every host's first paint
16
- exports = {
17
- baseLinearDisplayConfigSchema,
18
- SearchBox,
19
- ZoomControls,
20
- LinearGenomeView,
21
- };
22
13
  /**
23
14
  * #config LinearGenomeViewConfigSchema
24
15
  * #category root
@@ -35,9 +26,7 @@ export default class LinearGenomeViewPlugin extends Plugin {
35
26
  type: 'string',
36
27
  defaultValue: 'offset',
37
28
  model: types.enumeration('trackLabelOptions', [
38
- 'offset',
39
- 'overlapping',
40
- 'hidden',
29
+ ...VIEW_TRACK_LABEL_MODES,
41
30
  ]),
42
31
  },
43
32
  });
@@ -66,14 +55,9 @@ export default class LinearGenomeViewPlugin extends Plugin {
66
55
  // here.
67
56
  export { DisplayChromeOverlayProvider, DisplayUIProvider, FloatingLegend, TrackControlProvider, plainChromeOverlays, plainTrackControl, useTrackControlMenu, } from '@jbrowse/display-ui';
68
57
  export { HighlightBand, HighlightChip, OverviewHighlightBand, SVGHighlightBand, installLinkedViewSync, stateModelFactory as linearGenomeViewStateModelFactory, } from './LinearGenomeView/index.js';
69
- // Deliberately the component itself, and deliberately not the same `SearchBox`
70
- // the `exports` object above hands runtime plugins — that one is lazy. An
71
- // in-tree consumer (comparative view, breakpoint split view) imports this
72
- // barrel and gets shaken out of every build that doesn't, which is all the
73
- // laziness it needs; a runtime plugin resolves `exports` at module scope, where
74
- // only `lazy()` keeps the component out of the host's first paint. Imported
75
- // straight from the component rather than through `LinearGenomeView/index.ts`
76
- // so the view registration module holds no React component at all.
58
+ // Imported straight from the component rather than through
59
+ // `LinearGenomeView/index.ts` so the view registration module holds no React
60
+ // component at all; a consumer that never renders it shakes it out.
77
61
  export { default as SearchBox } from './LinearGenomeView/components/SearchBox.js';
78
62
  // The same two consumers, one composition further on: a header stacking several
79
63
  // views draws one search box per row beside the span it is showing, and
@@ -131,7 +115,7 @@ export { SvgChrome, SvgClipRect } from '@jbrowse/core/svg/SvgExport';
131
115
  // inset or non-rect clip); ids built from a trackId/refName need it
132
116
  export { svgSafeId } from '@jbrowse/core/svg/svgId';
133
117
  export { awaitSvgReady, awaitSvgRenders } from '@jbrowse/core/svg/svgReady';
134
- export { defaultTextHeight, getRowHeaderLayout, labelBaselineFromTop, labelOffset, totalHeight, trackBoxHeight, trackBoxOffsets, trackLabelLeftOffset, } from './LinearGenomeView/svgcomponents/util.js';
118
+ export { defaultTextHeight, getRowHeaderLayout, labelBaselineFromTop, labelOffset, totalHeight, trackBoxHeight, trackBoxOffsets, trackLabelMode, trackLabelLeftOffset, } from './LinearGenomeView/svgcomponents/util.js';
135
119
  // Re-exported from core, where it moved so the circular view — which depends
136
120
  // on neither this plugin nor the LGV geometry around it — can send the same
137
121
  // notification. Kept on this plugin's surface because published plugins
@@ -4,7 +4,6 @@ import type TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
4
4
  import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
5
5
  import type { SearchType } from '@jbrowse/core/data_adapters/BaseAdapter';
6
6
  import type { AssemblyHost, NotificationSink, TrackCatalog } from '@jbrowse/core/util';
7
- import type { StopToken } from '@jbrowse/core/util/stopToken';
8
7
  declare module '@jbrowse/core/PluginManager' {
9
8
  interface ExtensionPointRegistry {
10
9
  'LinearGenomeView-searchResultSelected': {
@@ -59,12 +58,12 @@ export declare function handleSelectedRegion({ input, model, assemblyName, grow,
59
58
  showHitTrack?: boolean;
60
59
  }): Promise<boolean>;
61
60
  export declare function checkRef(str: string, isRef: (name: string) => boolean): boolean;
62
- export declare function fetchResults({ queryString, searchType, assemblyName, textSearchManager, assembly, stopToken, }: {
61
+ export declare function fetchResults({ queryString, searchType, assemblyName, textSearchManager, assembly, signal, }: {
63
62
  queryString: string;
64
63
  assemblyName: string;
65
64
  searchType?: SearchType;
66
65
  textSearchManager?: TextSearchManager;
67
66
  assembly?: Assembly;
68
- stopToken?: StopToken;
67
+ signal?: AbortSignal;
69
68
  }): Promise<BaseResult[]>;
70
69
  export declare function splitLast(str: string, split: string): [string, string];
@@ -327,11 +327,11 @@ export function checkRef(str, isRef) {
327
327
  const [ref, rest] = splitLast(str, ':');
328
328
  return isRef(str) || (isRef(ref) && /^\d/.test(rest));
329
329
  }
330
- export async function fetchResults({ queryString, searchType, assemblyName, textSearchManager, assembly, stopToken, }) {
330
+ export async function fetchResults({ queryString, searchType, assemblyName, textSearchManager, assembly, signal, }) {
331
331
  const textSearchResults = await textSearchManager?.search({
332
332
  queryString,
333
333
  searchType,
334
- stopToken,
334
+ signal,
335
335
  }, assemblyName);
336
336
  // ensure aliases are loaded: allRefNames is a pure getter, so reading it does
337
337
  // not itself kick off the lazy load. A load failure just leaves allRefNames
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-genome-view",
3
- "version": "5.0.0-beta.8",
3
+ "version": "5.0.0-beta.9",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 linear genome view",
6
6
  "keywords": [
@@ -21,15 +21,15 @@
21
21
  "esm"
22
22
  ],
23
23
  "dependencies": {
24
- "@jbrowse/mobx-state-tree": "^6.5.1",
24
+ "@jbrowse/mobx-state-tree": "^6.5.2",
25
25
  "@mui/icons-material": "^9.4.0",
26
26
  "@mui/material": "^9.4.0",
27
27
  "mobx": "^7.0.3",
28
28
  "mobx-react": "^10.0.2",
29
- "@jbrowse/core": "^5.0.0-beta.8",
30
- "@jbrowse/display-kit": "^5.0.0-beta.8",
31
- "@jbrowse/display-ui": "^5.0.0-beta.8",
32
- "@jbrowse/render-core": "^5.0.0-beta.8"
29
+ "@jbrowse/core": "^5.0.0-beta.9",
30
+ "@jbrowse/display-kit": "^5.0.0-beta.9",
31
+ "@jbrowse/display-ui": "^5.0.0-beta.9",
32
+ "@jbrowse/render-core": "^5.0.0-beta.9"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=19.0.0",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "sideEffects": false,
42
42
  "devDependencies": {
43
- "@jbrowse/display-test-utils": "^5.0.0-beta.8"
43
+ "@jbrowse/display-test-utils": "^5.0.0-beta.9"
44
44
  },
45
45
  "scripts": {
46
46
  "prebuild": "pnpm clean",