@jbrowse/app-core 5.0.0-beta.7 → 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.
@@ -1,9 +1,7 @@
1
1
  import { getConf, readConfObject } from '@jbrowse/core/configuration';
2
- import { getFeatureAdapterOrThrow } from '@jbrowse/core/data_adapters/getFeatureAdapter';
3
- import { getRpcSessionId, parseLocString, renameRegionsIfNeeded } from '@jbrowse/core/util';
4
- import { createStopToken, stopStopToken } from '@jbrowse/core/util/stopToken';
5
2
  import * as mst from '@jbrowse/mobx-state-tree';
6
3
  import * as mobx from 'mobx';
4
+ import type { ViewSpec } from '../SessionSpec/index.ts';
7
5
  import type PluginManager from '@jbrowse/core/PluginManager';
8
6
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
9
7
  import type { AbstractSessionModel, AbstractViewModel } from '@jbrowse/core/util/types';
@@ -23,6 +21,7 @@ interface DisplaySelf {
23
21
  height?: number;
24
22
  error?: unknown;
25
23
  renderError?: unknown;
24
+ notices?: readonly string[];
26
25
  }
27
26
  interface TrackSelf extends IStateTreeNode {
28
27
  type: string;
@@ -79,6 +78,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
79
78
  trackId: string;
80
79
  } & Record<"error", unknown>) | ({
81
80
  trackId: string;
81
+ } & Record<"notices", unknown>) | ({
82
+ trackId: string;
82
83
  } & Record<"phase", unknown>))[] | undefined;
83
84
  offscreen?: {
84
85
  pageHeight: number;
@@ -131,6 +132,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
131
132
  trackId: string;
132
133
  } & Record<"error", unknown>) | ({
133
134
  trackId: string;
135
+ } & Record<"notices", unknown>) | ({
136
+ trackId: string;
134
137
  } & Record<"phase", unknown>))[] | undefined;
135
138
  offscreen?: {
136
139
  pageHeight: number;
@@ -181,6 +184,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
181
184
  trackId: string;
182
185
  } & Record<"error", unknown>) | ({
183
186
  trackId: string;
187
+ } & Record<"notices", unknown>) | ({
188
+ trackId: string;
184
189
  } & Record<"phase", unknown>))[] | undefined;
185
190
  offscreen?: {
186
191
  pageHeight: number;
@@ -229,6 +234,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
229
234
  trackId: string;
230
235
  } & Record<"error", unknown>) | ({
231
236
  trackId: string;
237
+ } & Record<"notices", unknown>) | ({
238
+ trackId: string;
232
239
  } & Record<"phase", unknown>))[] | undefined;
233
240
  offscreen?: {
234
241
  pageHeight: number;
@@ -284,6 +291,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
284
291
  trackId: string;
285
292
  } & Record<"error", unknown>) | ({
286
293
  trackId: string;
294
+ } & Record<"notices", unknown>) | ({
295
+ trackId: string;
287
296
  } & Record<"phase", unknown>))[] | undefined;
288
297
  offscreen?: {
289
298
  pageHeight: number;
@@ -337,6 +346,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
337
346
  trackId: string;
338
347
  } & Record<"error", unknown>) | ({
339
348
  trackId: string;
349
+ } & Record<"notices", unknown>) | ({
350
+ trackId: string;
340
351
  } & Record<"phase", unknown>))[] | undefined;
341
352
  offscreen?: {
342
353
  pageHeight: number;
@@ -388,6 +399,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
388
399
  trackId: string;
389
400
  } & Record<"error", unknown>) | ({
390
401
  trackId: string;
402
+ } & Record<"notices", unknown>) | ({
403
+ trackId: string;
391
404
  } & Record<"phase", unknown>))[] | undefined;
392
405
  offscreen?: {
393
406
  pageHeight: number;
@@ -437,6 +450,8 @@ export declare function waitReady(timeoutMs: number, session?: AbstractSessionMo
437
450
  trackId: string;
438
451
  } & Record<"error", unknown>) | ({
439
452
  trackId: string;
453
+ } & Record<"notices", unknown>) | ({
454
+ trackId: string;
440
455
  } & Record<"phase", unknown>))[] | undefined;
441
456
  offscreen?: {
442
457
  pageHeight: number;
@@ -456,10 +471,25 @@ interface JbRegion {
456
471
  end: number;
457
472
  assemblyName: string;
458
473
  }
474
+ /**
475
+ * One place, as `loc` takes it: a locstring, or the object shape every other
476
+ * region on this surface has — `jb.visibleRegions`' answer, a feature's own
477
+ * coordinates — which used to reach `parseLocString` and die there with
478
+ * "endsWith is not a function". Several places are `regions`.
479
+ */
480
+ export type JbLoc = string | {
481
+ refName: string;
482
+ start?: number;
483
+ end?: number;
484
+ assemblyName?: string;
485
+ };
459
486
  interface SlotDescription {
460
487
  type: string;
461
488
  description?: string;
462
- defaultValue: unknown;
489
+ defaultValue?: unknown;
490
+ /** a nested object's own slots, and the slot its string shorthand lifts into */
491
+ slots?: Record<string, SlotDescription>;
492
+ shorthand?: string;
463
493
  }
464
494
  declare function describeSlots(conf: AnyConfigurationModel): Record<string, SlotDescription>;
465
495
  export declare function ensureReExports(): Promise<void>;
@@ -492,12 +522,6 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
492
522
  readConfObject: typeof readConfObject;
493
523
  getConf: typeof getConf;
494
524
  describeSlots: typeof describeSlots;
495
- parseLocString: typeof parseLocString;
496
- getFeatureAdapterOrThrow: typeof getFeatureAdapterOrThrow;
497
- getRpcSessionId: typeof getRpcSessionId;
498
- renameRegionsIfNeeded: typeof renameRegionsIfNeeded;
499
- createStopToken: typeof createStopToken;
500
- stopStopToken: typeof stopStopToken;
501
525
  waitReady: (timeoutMs?: number) => Promise<{
502
526
  drawer: {
503
527
  widget: string | undefined;
@@ -540,6 +564,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
540
564
  trackId: string;
541
565
  } & Record<"error", unknown>) | ({
542
566
  trackId: string;
567
+ } & Record<"notices", unknown>) | ({
568
+ trackId: string;
543
569
  } & Record<"phase", unknown>))[] | undefined;
544
570
  offscreen?: {
545
571
  pageHeight: number;
@@ -592,6 +618,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
592
618
  trackId: string;
593
619
  } & Record<"error", unknown>) | ({
594
620
  trackId: string;
621
+ } & Record<"notices", unknown>) | ({
622
+ trackId: string;
595
623
  } & Record<"phase", unknown>))[] | undefined;
596
624
  offscreen?: {
597
625
  pageHeight: number;
@@ -642,6 +670,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
642
670
  trackId: string;
643
671
  } & Record<"error", unknown>) | ({
644
672
  trackId: string;
673
+ } & Record<"notices", unknown>) | ({
674
+ trackId: string;
645
675
  } & Record<"phase", unknown>))[] | undefined;
646
676
  offscreen?: {
647
677
  pageHeight: number;
@@ -690,6 +720,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
690
720
  trackId: string;
691
721
  } & Record<"error", unknown>) | ({
692
722
  trackId: string;
723
+ } & Record<"notices", unknown>) | ({
724
+ trackId: string;
693
725
  } & Record<"phase", unknown>))[] | undefined;
694
726
  offscreen?: {
695
727
  pageHeight: number;
@@ -745,6 +777,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
745
777
  trackId: string;
746
778
  } & Record<"error", unknown>) | ({
747
779
  trackId: string;
780
+ } & Record<"notices", unknown>) | ({
781
+ trackId: string;
748
782
  } & Record<"phase", unknown>))[] | undefined;
749
783
  offscreen?: {
750
784
  pageHeight: number;
@@ -798,6 +832,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
798
832
  trackId: string;
799
833
  } & Record<"error", unknown>) | ({
800
834
  trackId: string;
835
+ } & Record<"notices", unknown>) | ({
836
+ trackId: string;
801
837
  } & Record<"phase", unknown>))[] | undefined;
802
838
  offscreen?: {
803
839
  pageHeight: number;
@@ -849,6 +885,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
849
885
  trackId: string;
850
886
  } & Record<"error", unknown>) | ({
851
887
  trackId: string;
888
+ } & Record<"notices", unknown>) | ({
889
+ trackId: string;
852
890
  } & Record<"phase", unknown>))[] | undefined;
853
891
  offscreen?: {
854
892
  pageHeight: number;
@@ -898,6 +936,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
898
936
  trackId: string;
899
937
  } & Record<"error", unknown>) | ({
900
938
  trackId: string;
939
+ } & Record<"notices", unknown>) | ({
940
+ trackId: string;
901
941
  } & Record<"phase", unknown>))[] | undefined;
902
942
  offscreen?: {
903
943
  pageHeight: number;
@@ -948,15 +988,13 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
948
988
  assemblyNames: string[];
949
989
  views: Record<string, unknown>[];
950
990
  };
951
- inspect: (path?: string, maxInspectBytes?: number) => {
952
- path: string;
991
+ inspect: (target?: unknown, maxInspectBytes?: number) => {
953
992
  modelType?: string | undefined;
954
993
  bytes: number;
955
994
  getters?: string[] | undefined;
956
995
  actions?: string[] | undefined;
957
996
  value: unknown;
958
997
  } | {
959
- path: string;
960
998
  modelType?: string | undefined;
961
999
  bytes: number;
962
1000
  getters?: string[] | undefined;
@@ -964,7 +1002,6 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
964
1002
  note: string;
965
1003
  items: string[];
966
1004
  } | {
967
- path: string;
968
1005
  modelType?: string | undefined;
969
1006
  bytes: number;
970
1007
  getters?: string[] | undefined;
@@ -978,10 +1015,9 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
978
1015
  total: number;
979
1016
  note?: string | undefined;
980
1017
  tracks: {
981
- trackId: any;
1018
+ trackId: string;
982
1019
  name: string;
983
- type: any;
984
- adapterType?: any;
1020
+ type: string;
985
1021
  assemblyNames: string[];
986
1022
  }[];
987
1023
  };
@@ -1030,6 +1066,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1030
1066
  trackId: string;
1031
1067
  } & Record<"error", unknown>) | ({
1032
1068
  trackId: string;
1069
+ } & Record<"notices", unknown>) | ({
1070
+ trackId: string;
1033
1071
  } & Record<"phase", unknown>))[] | undefined;
1034
1072
  offscreen?: {
1035
1073
  pageHeight: number;
@@ -1119,6 +1157,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1119
1157
  trackId: string;
1120
1158
  } & Record<"error", unknown>) | ({
1121
1159
  trackId: string;
1160
+ } & Record<"notices", unknown>) | ({
1161
+ trackId: string;
1122
1162
  } & Record<"phase", unknown>))[] | undefined;
1123
1163
  offscreen?: {
1124
1164
  pageHeight: number;
@@ -1206,6 +1246,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1206
1246
  trackId: string;
1207
1247
  } & Record<"error", unknown>) | ({
1208
1248
  trackId: string;
1249
+ } & Record<"notices", unknown>) | ({
1250
+ trackId: string;
1209
1251
  } & Record<"phase", unknown>))[] | undefined;
1210
1252
  offscreen?: {
1211
1253
  pageHeight: number;
@@ -1291,6 +1333,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1291
1333
  trackId: string;
1292
1334
  } & Record<"error", unknown>) | ({
1293
1335
  trackId: string;
1336
+ } & Record<"notices", unknown>) | ({
1337
+ trackId: string;
1294
1338
  } & Record<"phase", unknown>))[] | undefined;
1295
1339
  offscreen?: {
1296
1340
  pageHeight: number;
@@ -1383,6 +1427,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1383
1427
  trackId: string;
1384
1428
  } & Record<"error", unknown>) | ({
1385
1429
  trackId: string;
1430
+ } & Record<"notices", unknown>) | ({
1431
+ trackId: string;
1386
1432
  } & Record<"phase", unknown>))[] | undefined;
1387
1433
  offscreen?: {
1388
1434
  pageHeight: number;
@@ -1473,6 +1519,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1473
1519
  trackId: string;
1474
1520
  } & Record<"error", unknown>) | ({
1475
1521
  trackId: string;
1522
+ } & Record<"notices", unknown>) | ({
1523
+ trackId: string;
1476
1524
  } & Record<"phase", unknown>))[] | undefined;
1477
1525
  offscreen?: {
1478
1526
  pageHeight: number;
@@ -1561,6 +1609,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1561
1609
  trackId: string;
1562
1610
  } & Record<"error", unknown>) | ({
1563
1611
  trackId: string;
1612
+ } & Record<"notices", unknown>) | ({
1613
+ trackId: string;
1564
1614
  } & Record<"phase", unknown>))[] | undefined;
1565
1615
  offscreen?: {
1566
1616
  pageHeight: number;
@@ -1647,6 +1697,8 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1647
1697
  trackId: string;
1648
1698
  } & Record<"error", unknown>) | ({
1649
1699
  trackId: string;
1700
+ } & Record<"notices", unknown>) | ({
1701
+ trackId: string;
1650
1702
  } & Record<"phase", unknown>))[] | undefined;
1651
1703
  offscreen?: {
1652
1704
  pageHeight: number;
@@ -1697,28 +1749,1012 @@ export declare function createJbApi(pluginManager: PluginManager, options?: JbAp
1697
1749
  views: Record<string, unknown>[];
1698
1750
  } | undefined;
1699
1751
  }>;
1700
- addTrack: (opts: {
1701
- location: string | string[];
1702
- index?: string;
1703
- assembly?: string;
1704
- name?: string;
1705
- show?: boolean;
1706
- viewId?: string;
1707
- settleMs?: number;
1708
- }) => Promise<{
1709
- trackId: string;
1710
- trackType: string;
1711
- adapterType: string;
1712
- assembly: string;
1752
+ addView: (spec: ViewSpec, settleMs?: number) => Promise<{
1753
+ viewId: string;
1754
+ created?: string[] | undefined;
1755
+ }>;
1756
+ setSession: (document: Record<string, unknown>, settleMs?: number) => Promise<{
1757
+ drawer: {
1758
+ widget: string | undefined;
1759
+ width?: number | undefined;
1760
+ note: string;
1761
+ };
1762
+ dialog: {
1763
+ note: string;
1764
+ };
1765
+ settled: boolean;
1766
+ notifications?: {
1767
+ level: string;
1768
+ message: string;
1769
+ }[] | undefined;
1770
+ notReady?: ({
1771
+ error: string;
1772
+ phase?: undefined;
1773
+ reason?: undefined;
1774
+ viewId: string;
1775
+ type: string;
1776
+ } | {
1777
+ error?: undefined;
1778
+ phase: string;
1779
+ reason?: undefined;
1780
+ viewId: string;
1781
+ type: string;
1782
+ } | {
1783
+ error?: undefined;
1784
+ phase?: undefined;
1785
+ reason?: undefined;
1786
+ viewId: string;
1787
+ type: string;
1788
+ } | {
1789
+ error?: undefined;
1790
+ phase: string;
1791
+ reason: string;
1792
+ viewId: string;
1793
+ type: string;
1794
+ } | ({
1795
+ trackId: string;
1796
+ } & Record<"error", unknown>) | ({
1797
+ trackId: string;
1798
+ } & Record<"notices", unknown>) | ({
1799
+ trackId: string;
1800
+ } & Record<"phase", unknown>))[] | undefined;
1801
+ offscreen?: {
1802
+ pageHeight: number;
1803
+ windowHeight: number;
1804
+ scrollY: number;
1805
+ views: {
1806
+ viewId: string;
1807
+ top: number;
1808
+ bottom: number;
1809
+ }[];
1810
+ note: string;
1811
+ } | undefined;
1812
+ session: {
1813
+ drawer: {
1814
+ widget: string | undefined;
1815
+ width?: number | undefined;
1816
+ note: string;
1817
+ };
1818
+ dialog: {
1819
+ note: string;
1820
+ };
1821
+ name: string;
1822
+ assemblyNames: string[];
1823
+ views: Record<string, unknown>[];
1824
+ } | {
1825
+ drawer: {
1826
+ widget: string | undefined;
1827
+ width?: number | undefined;
1828
+ note: string;
1829
+ };
1830
+ dialog?: undefined;
1831
+ name: string;
1832
+ assemblyNames: string[];
1833
+ views: Record<string, unknown>[];
1834
+ } | {
1835
+ drawer?: undefined;
1836
+ dialog: {
1837
+ note: string;
1838
+ };
1839
+ name: string;
1840
+ assemblyNames: string[];
1841
+ views: Record<string, unknown>[];
1842
+ } | {
1843
+ drawer?: undefined;
1844
+ dialog?: undefined;
1845
+ name: string;
1846
+ assemblyNames: string[];
1847
+ views: Record<string, unknown>[];
1848
+ };
1849
+ } | {
1850
+ drawer: {
1851
+ widget: string | undefined;
1852
+ width?: number | undefined;
1853
+ note: string;
1854
+ };
1855
+ dialog?: undefined;
1856
+ settled: boolean;
1857
+ notifications?: {
1858
+ level: string;
1859
+ message: string;
1860
+ }[] | undefined;
1861
+ notReady?: ({
1862
+ error: string;
1863
+ phase?: undefined;
1864
+ reason?: undefined;
1865
+ viewId: string;
1866
+ type: string;
1867
+ } | {
1868
+ error?: undefined;
1869
+ phase: string;
1870
+ reason?: undefined;
1871
+ viewId: string;
1872
+ type: string;
1873
+ } | {
1874
+ error?: undefined;
1875
+ phase?: undefined;
1876
+ reason?: undefined;
1877
+ viewId: string;
1878
+ type: string;
1879
+ } | {
1880
+ error?: undefined;
1881
+ phase: string;
1882
+ reason: string;
1883
+ viewId: string;
1884
+ type: string;
1885
+ } | ({
1886
+ trackId: string;
1887
+ } & Record<"error", unknown>) | ({
1888
+ trackId: string;
1889
+ } & Record<"notices", unknown>) | ({
1890
+ trackId: string;
1891
+ } & Record<"phase", unknown>))[] | undefined;
1892
+ offscreen?: {
1893
+ pageHeight: number;
1894
+ windowHeight: number;
1895
+ scrollY: number;
1896
+ views: {
1897
+ viewId: string;
1898
+ top: number;
1899
+ bottom: number;
1900
+ }[];
1901
+ note: string;
1902
+ } | undefined;
1903
+ session: {
1904
+ drawer: {
1905
+ widget: string | undefined;
1906
+ width?: number | undefined;
1907
+ note: string;
1908
+ };
1909
+ dialog: {
1910
+ note: string;
1911
+ };
1912
+ name: string;
1913
+ assemblyNames: string[];
1914
+ views: Record<string, unknown>[];
1915
+ } | {
1916
+ drawer: {
1917
+ widget: string | undefined;
1918
+ width?: number | undefined;
1919
+ note: string;
1920
+ };
1921
+ dialog?: undefined;
1922
+ name: string;
1923
+ assemblyNames: string[];
1924
+ views: Record<string, unknown>[];
1925
+ } | {
1926
+ drawer?: undefined;
1927
+ dialog: {
1928
+ note: string;
1929
+ };
1930
+ name: string;
1931
+ assemblyNames: string[];
1932
+ views: Record<string, unknown>[];
1933
+ } | {
1934
+ drawer?: undefined;
1935
+ dialog?: undefined;
1936
+ name: string;
1937
+ assemblyNames: string[];
1938
+ views: Record<string, unknown>[];
1939
+ };
1940
+ } | {
1941
+ drawer?: undefined;
1942
+ dialog: {
1943
+ note: string;
1944
+ };
1945
+ settled: boolean;
1946
+ notifications?: {
1947
+ level: string;
1948
+ message: string;
1949
+ }[] | undefined;
1950
+ notReady?: ({
1951
+ error: string;
1952
+ phase?: undefined;
1953
+ reason?: undefined;
1954
+ viewId: string;
1955
+ type: string;
1956
+ } | {
1957
+ error?: undefined;
1958
+ phase: string;
1959
+ reason?: undefined;
1960
+ viewId: string;
1961
+ type: string;
1962
+ } | {
1963
+ error?: undefined;
1964
+ phase?: undefined;
1965
+ reason?: undefined;
1966
+ viewId: string;
1967
+ type: string;
1968
+ } | {
1969
+ error?: undefined;
1970
+ phase: string;
1971
+ reason: string;
1972
+ viewId: string;
1973
+ type: string;
1974
+ } | ({
1975
+ trackId: string;
1976
+ } & Record<"error", unknown>) | ({
1977
+ trackId: string;
1978
+ } & Record<"notices", unknown>) | ({
1979
+ trackId: string;
1980
+ } & Record<"phase", unknown>))[] | undefined;
1981
+ offscreen?: {
1982
+ pageHeight: number;
1983
+ windowHeight: number;
1984
+ scrollY: number;
1985
+ views: {
1986
+ viewId: string;
1987
+ top: number;
1988
+ bottom: number;
1989
+ }[];
1990
+ note: string;
1991
+ } | undefined;
1992
+ session: {
1993
+ drawer: {
1994
+ widget: string | undefined;
1995
+ width?: number | undefined;
1996
+ note: string;
1997
+ };
1998
+ dialog: {
1999
+ note: string;
2000
+ };
2001
+ name: string;
2002
+ assemblyNames: string[];
2003
+ views: Record<string, unknown>[];
2004
+ } | {
2005
+ drawer: {
2006
+ widget: string | undefined;
2007
+ width?: number | undefined;
2008
+ note: string;
2009
+ };
2010
+ dialog?: undefined;
2011
+ name: string;
2012
+ assemblyNames: string[];
2013
+ views: Record<string, unknown>[];
2014
+ } | {
2015
+ drawer?: undefined;
2016
+ dialog: {
2017
+ note: string;
2018
+ };
2019
+ name: string;
2020
+ assemblyNames: string[];
2021
+ views: Record<string, unknown>[];
2022
+ } | {
2023
+ drawer?: undefined;
2024
+ dialog?: undefined;
2025
+ name: string;
2026
+ assemblyNames: string[];
2027
+ views: Record<string, unknown>[];
2028
+ };
2029
+ } | {
2030
+ drawer?: undefined;
2031
+ dialog?: undefined;
2032
+ settled: boolean;
2033
+ notifications?: {
2034
+ level: string;
2035
+ message: string;
2036
+ }[] | undefined;
2037
+ notReady?: ({
2038
+ error: string;
2039
+ phase?: undefined;
2040
+ reason?: undefined;
2041
+ viewId: string;
2042
+ type: string;
2043
+ } | {
2044
+ error?: undefined;
2045
+ phase: string;
2046
+ reason?: undefined;
2047
+ viewId: string;
2048
+ type: string;
2049
+ } | {
2050
+ error?: undefined;
2051
+ phase?: undefined;
2052
+ reason?: undefined;
2053
+ viewId: string;
2054
+ type: string;
2055
+ } | {
2056
+ error?: undefined;
2057
+ phase: string;
2058
+ reason: string;
2059
+ viewId: string;
2060
+ type: string;
2061
+ } | ({
2062
+ trackId: string;
2063
+ } & Record<"error", unknown>) | ({
2064
+ trackId: string;
2065
+ } & Record<"notices", unknown>) | ({
2066
+ trackId: string;
2067
+ } & Record<"phase", unknown>))[] | undefined;
2068
+ offscreen?: {
2069
+ pageHeight: number;
2070
+ windowHeight: number;
2071
+ scrollY: number;
2072
+ views: {
2073
+ viewId: string;
2074
+ top: number;
2075
+ bottom: number;
2076
+ }[];
2077
+ note: string;
2078
+ } | undefined;
2079
+ session: {
2080
+ drawer: {
2081
+ widget: string | undefined;
2082
+ width?: number | undefined;
2083
+ note: string;
2084
+ };
2085
+ dialog: {
2086
+ note: string;
2087
+ };
2088
+ name: string;
2089
+ assemblyNames: string[];
2090
+ views: Record<string, unknown>[];
2091
+ } | {
2092
+ drawer: {
2093
+ widget: string | undefined;
2094
+ width?: number | undefined;
2095
+ note: string;
2096
+ };
2097
+ dialog?: undefined;
2098
+ name: string;
2099
+ assemblyNames: string[];
2100
+ views: Record<string, unknown>[];
2101
+ } | {
2102
+ drawer?: undefined;
2103
+ dialog: {
2104
+ note: string;
2105
+ };
2106
+ name: string;
2107
+ assemblyNames: string[];
2108
+ views: Record<string, unknown>[];
2109
+ } | {
2110
+ drawer?: undefined;
2111
+ dialog?: undefined;
2112
+ name: string;
2113
+ assemblyNames: string[];
2114
+ views: Record<string, unknown>[];
2115
+ };
2116
+ } | {
2117
+ drawer: {
2118
+ widget: string | undefined;
2119
+ width?: number | undefined;
2120
+ note: string;
2121
+ };
2122
+ dialog: {
2123
+ note: string;
2124
+ };
2125
+ settled: boolean;
2126
+ note: string;
2127
+ notifications?: {
2128
+ level: string;
2129
+ message: string;
2130
+ }[] | undefined;
2131
+ notReady?: ({
2132
+ error: string;
2133
+ phase?: undefined;
2134
+ reason?: undefined;
2135
+ viewId: string;
2136
+ type: string;
2137
+ } | {
2138
+ error?: undefined;
2139
+ phase: string;
2140
+ reason?: undefined;
2141
+ viewId: string;
2142
+ type: string;
2143
+ } | {
2144
+ error?: undefined;
2145
+ phase?: undefined;
2146
+ reason?: undefined;
2147
+ viewId: string;
2148
+ type: string;
2149
+ } | {
2150
+ error?: undefined;
2151
+ phase: string;
2152
+ reason: string;
2153
+ viewId: string;
2154
+ type: string;
2155
+ } | ({
2156
+ trackId: string;
2157
+ } & Record<"error", unknown>) | ({
2158
+ trackId: string;
2159
+ } & Record<"notices", unknown>) | ({
2160
+ trackId: string;
2161
+ } & Record<"phase", unknown>))[] | undefined;
2162
+ offscreen?: {
2163
+ pageHeight: number;
2164
+ windowHeight: number;
2165
+ scrollY: number;
2166
+ views: {
2167
+ viewId: string;
2168
+ top: number;
2169
+ bottom: number;
2170
+ }[];
2171
+ note: string;
2172
+ } | undefined;
2173
+ session: {
2174
+ drawer: {
2175
+ widget: string | undefined;
2176
+ width?: number | undefined;
2177
+ note: string;
2178
+ };
2179
+ dialog: {
2180
+ note: string;
2181
+ };
2182
+ name: string;
2183
+ assemblyNames: string[];
2184
+ views: Record<string, unknown>[];
2185
+ } | {
2186
+ drawer: {
2187
+ widget: string | undefined;
2188
+ width?: number | undefined;
2189
+ note: string;
2190
+ };
2191
+ dialog?: undefined;
2192
+ name: string;
2193
+ assemblyNames: string[];
2194
+ views: Record<string, unknown>[];
2195
+ } | {
2196
+ drawer?: undefined;
2197
+ dialog: {
2198
+ note: string;
2199
+ };
2200
+ name: string;
2201
+ assemblyNames: string[];
2202
+ views: Record<string, unknown>[];
2203
+ } | {
2204
+ drawer?: undefined;
2205
+ dialog?: undefined;
2206
+ name: string;
2207
+ assemblyNames: string[];
2208
+ views: Record<string, unknown>[];
2209
+ };
2210
+ } | {
2211
+ drawer: {
2212
+ widget: string | undefined;
2213
+ width?: number | undefined;
2214
+ note: string;
2215
+ };
2216
+ dialog?: undefined;
2217
+ settled: boolean;
2218
+ note: string;
2219
+ notifications?: {
2220
+ level: string;
2221
+ message: string;
2222
+ }[] | undefined;
2223
+ notReady?: ({
2224
+ error: string;
2225
+ phase?: undefined;
2226
+ reason?: undefined;
2227
+ viewId: string;
2228
+ type: string;
2229
+ } | {
2230
+ error?: undefined;
2231
+ phase: string;
2232
+ reason?: undefined;
2233
+ viewId: string;
2234
+ type: string;
2235
+ } | {
2236
+ error?: undefined;
2237
+ phase?: undefined;
2238
+ reason?: undefined;
2239
+ viewId: string;
2240
+ type: string;
2241
+ } | {
2242
+ error?: undefined;
2243
+ phase: string;
2244
+ reason: string;
2245
+ viewId: string;
2246
+ type: string;
2247
+ } | ({
2248
+ trackId: string;
2249
+ } & Record<"error", unknown>) | ({
2250
+ trackId: string;
2251
+ } & Record<"notices", unknown>) | ({
2252
+ trackId: string;
2253
+ } & Record<"phase", unknown>))[] | undefined;
2254
+ offscreen?: {
2255
+ pageHeight: number;
2256
+ windowHeight: number;
2257
+ scrollY: number;
2258
+ views: {
2259
+ viewId: string;
2260
+ top: number;
2261
+ bottom: number;
2262
+ }[];
2263
+ note: string;
2264
+ } | undefined;
2265
+ session: {
2266
+ drawer: {
2267
+ widget: string | undefined;
2268
+ width?: number | undefined;
2269
+ note: string;
2270
+ };
2271
+ dialog: {
2272
+ note: string;
2273
+ };
2274
+ name: string;
2275
+ assemblyNames: string[];
2276
+ views: Record<string, unknown>[];
2277
+ } | {
2278
+ drawer: {
2279
+ widget: string | undefined;
2280
+ width?: number | undefined;
2281
+ note: string;
2282
+ };
2283
+ dialog?: undefined;
2284
+ name: string;
2285
+ assemblyNames: string[];
2286
+ views: Record<string, unknown>[];
2287
+ } | {
2288
+ drawer?: undefined;
2289
+ dialog: {
2290
+ note: string;
2291
+ };
2292
+ name: string;
2293
+ assemblyNames: string[];
2294
+ views: Record<string, unknown>[];
2295
+ } | {
2296
+ drawer?: undefined;
2297
+ dialog?: undefined;
2298
+ name: string;
2299
+ assemblyNames: string[];
2300
+ views: Record<string, unknown>[];
2301
+ };
2302
+ } | {
2303
+ drawer?: undefined;
2304
+ dialog: {
2305
+ note: string;
2306
+ };
2307
+ settled: boolean;
2308
+ note: string;
2309
+ notifications?: {
2310
+ level: string;
2311
+ message: string;
2312
+ }[] | undefined;
2313
+ notReady?: ({
2314
+ error: string;
2315
+ phase?: undefined;
2316
+ reason?: undefined;
2317
+ viewId: string;
2318
+ type: string;
2319
+ } | {
2320
+ error?: undefined;
2321
+ phase: string;
2322
+ reason?: undefined;
2323
+ viewId: string;
2324
+ type: string;
2325
+ } | {
2326
+ error?: undefined;
2327
+ phase?: undefined;
2328
+ reason?: undefined;
2329
+ viewId: string;
2330
+ type: string;
2331
+ } | {
2332
+ error?: undefined;
2333
+ phase: string;
2334
+ reason: string;
2335
+ viewId: string;
2336
+ type: string;
2337
+ } | ({
2338
+ trackId: string;
2339
+ } & Record<"error", unknown>) | ({
2340
+ trackId: string;
2341
+ } & Record<"notices", unknown>) | ({
2342
+ trackId: string;
2343
+ } & Record<"phase", unknown>))[] | undefined;
2344
+ offscreen?: {
2345
+ pageHeight: number;
2346
+ windowHeight: number;
2347
+ scrollY: number;
2348
+ views: {
2349
+ viewId: string;
2350
+ top: number;
2351
+ bottom: number;
2352
+ }[];
2353
+ note: string;
2354
+ } | undefined;
2355
+ session: {
2356
+ drawer: {
2357
+ widget: string | undefined;
2358
+ width?: number | undefined;
2359
+ note: string;
2360
+ };
2361
+ dialog: {
2362
+ note: string;
2363
+ };
2364
+ name: string;
2365
+ assemblyNames: string[];
2366
+ views: Record<string, unknown>[];
2367
+ } | {
2368
+ drawer: {
2369
+ widget: string | undefined;
2370
+ width?: number | undefined;
2371
+ note: string;
2372
+ };
2373
+ dialog?: undefined;
2374
+ name: string;
2375
+ assemblyNames: string[];
2376
+ views: Record<string, unknown>[];
2377
+ } | {
2378
+ drawer?: undefined;
2379
+ dialog: {
2380
+ note: string;
2381
+ };
2382
+ name: string;
2383
+ assemblyNames: string[];
2384
+ views: Record<string, unknown>[];
2385
+ } | {
2386
+ drawer?: undefined;
2387
+ dialog?: undefined;
2388
+ name: string;
2389
+ assemblyNames: string[];
2390
+ views: Record<string, unknown>[];
2391
+ };
2392
+ } | {
2393
+ drawer?: undefined;
2394
+ dialog?: undefined;
2395
+ settled: boolean;
2396
+ note: string;
2397
+ notifications?: {
2398
+ level: string;
2399
+ message: string;
2400
+ }[] | undefined;
2401
+ notReady?: ({
2402
+ error: string;
2403
+ phase?: undefined;
2404
+ reason?: undefined;
2405
+ viewId: string;
2406
+ type: string;
2407
+ } | {
2408
+ error?: undefined;
2409
+ phase: string;
2410
+ reason?: undefined;
2411
+ viewId: string;
2412
+ type: string;
2413
+ } | {
2414
+ error?: undefined;
2415
+ phase?: undefined;
2416
+ reason?: undefined;
2417
+ viewId: string;
2418
+ type: string;
2419
+ } | {
2420
+ error?: undefined;
2421
+ phase: string;
2422
+ reason: string;
2423
+ viewId: string;
2424
+ type: string;
2425
+ } | ({
2426
+ trackId: string;
2427
+ } & Record<"error", unknown>) | ({
2428
+ trackId: string;
2429
+ } & Record<"notices", unknown>) | ({
2430
+ trackId: string;
2431
+ } & Record<"phase", unknown>))[] | undefined;
2432
+ offscreen?: {
2433
+ pageHeight: number;
2434
+ windowHeight: number;
2435
+ scrollY: number;
2436
+ views: {
2437
+ viewId: string;
2438
+ top: number;
2439
+ bottom: number;
2440
+ }[];
2441
+ note: string;
2442
+ } | undefined;
2443
+ session: {
2444
+ drawer: {
2445
+ widget: string | undefined;
2446
+ width?: number | undefined;
2447
+ note: string;
2448
+ };
2449
+ dialog: {
2450
+ note: string;
2451
+ };
2452
+ name: string;
2453
+ assemblyNames: string[];
2454
+ views: Record<string, unknown>[];
2455
+ } | {
2456
+ drawer: {
2457
+ widget: string | undefined;
2458
+ width?: number | undefined;
2459
+ note: string;
2460
+ };
2461
+ dialog?: undefined;
2462
+ name: string;
2463
+ assemblyNames: string[];
2464
+ views: Record<string, unknown>[];
2465
+ } | {
2466
+ drawer?: undefined;
2467
+ dialog: {
2468
+ note: string;
2469
+ };
2470
+ name: string;
2471
+ assemblyNames: string[];
2472
+ views: Record<string, unknown>[];
2473
+ } | {
2474
+ drawer?: undefined;
2475
+ dialog?: undefined;
2476
+ name: string;
2477
+ assemblyNames: string[];
2478
+ views: Record<string, unknown>[];
2479
+ };
2480
+ }>;
2481
+ fitToWindow: (settleMs?: number) => Promise<{
2482
+ pageHeight: number;
2483
+ windowHeight: number;
2484
+ fits: boolean;
2485
+ } | {
2486
+ drawer: {
2487
+ widget: string | undefined;
2488
+ width?: number | undefined;
2489
+ note: string;
2490
+ };
2491
+ dialog: {
2492
+ note: string;
2493
+ };
2494
+ settled: boolean;
2495
+ notifications?: {
2496
+ level: string;
2497
+ message: string;
2498
+ }[] | undefined;
2499
+ notReady?: ({
2500
+ error: string;
2501
+ phase?: undefined;
2502
+ reason?: undefined;
2503
+ viewId: string;
2504
+ type: string;
2505
+ } | {
2506
+ error?: undefined;
2507
+ phase: string;
2508
+ reason?: undefined;
2509
+ viewId: string;
2510
+ type: string;
2511
+ } | {
2512
+ error?: undefined;
2513
+ phase?: undefined;
2514
+ reason?: undefined;
2515
+ viewId: string;
2516
+ type: string;
2517
+ } | {
2518
+ error?: undefined;
2519
+ phase: string;
2520
+ reason: string;
2521
+ viewId: string;
2522
+ type: string;
2523
+ } | ({
2524
+ trackId: string;
2525
+ } & Record<"error", unknown>) | ({
2526
+ trackId: string;
2527
+ } & Record<"notices", unknown>) | ({
2528
+ trackId: string;
2529
+ } & Record<"phase", unknown>))[] | undefined;
2530
+ offscreen?: {
2531
+ pageHeight: number;
2532
+ windowHeight: number;
2533
+ scrollY: number;
2534
+ views: {
2535
+ viewId: string;
2536
+ top: number;
2537
+ bottom: number;
2538
+ }[];
2539
+ note: string;
2540
+ } | undefined;
2541
+ fits: boolean;
2542
+ overflowBefore: number;
2543
+ overflowAfter: number;
2544
+ shrunk: {
2545
+ what: string;
2546
+ from: number;
2547
+ to: number;
2548
+ }[];
2549
+ note?: string | undefined;
2550
+ } | {
2551
+ drawer: {
2552
+ widget: string | undefined;
2553
+ width?: number | undefined;
2554
+ note: string;
2555
+ };
2556
+ dialog?: undefined;
2557
+ settled: boolean;
2558
+ notifications?: {
2559
+ level: string;
2560
+ message: string;
2561
+ }[] | undefined;
2562
+ notReady?: ({
2563
+ error: string;
2564
+ phase?: undefined;
2565
+ reason?: undefined;
2566
+ viewId: string;
2567
+ type: string;
2568
+ } | {
2569
+ error?: undefined;
2570
+ phase: string;
2571
+ reason?: undefined;
2572
+ viewId: string;
2573
+ type: string;
2574
+ } | {
2575
+ error?: undefined;
2576
+ phase?: undefined;
2577
+ reason?: undefined;
2578
+ viewId: string;
2579
+ type: string;
2580
+ } | {
2581
+ error?: undefined;
2582
+ phase: string;
2583
+ reason: string;
2584
+ viewId: string;
2585
+ type: string;
2586
+ } | ({
2587
+ trackId: string;
2588
+ } & Record<"error", unknown>) | ({
2589
+ trackId: string;
2590
+ } & Record<"notices", unknown>) | ({
2591
+ trackId: string;
2592
+ } & Record<"phase", unknown>))[] | undefined;
2593
+ offscreen?: {
2594
+ pageHeight: number;
2595
+ windowHeight: number;
2596
+ scrollY: number;
2597
+ views: {
2598
+ viewId: string;
2599
+ top: number;
2600
+ bottom: number;
2601
+ }[];
2602
+ note: string;
2603
+ } | undefined;
2604
+ fits: boolean;
2605
+ overflowBefore: number;
2606
+ overflowAfter: number;
2607
+ shrunk: {
2608
+ what: string;
2609
+ from: number;
2610
+ to: number;
2611
+ }[];
2612
+ note?: string | undefined;
2613
+ } | {
2614
+ drawer?: undefined;
2615
+ dialog: {
2616
+ note: string;
2617
+ };
2618
+ settled: boolean;
2619
+ notifications?: {
2620
+ level: string;
2621
+ message: string;
2622
+ }[] | undefined;
2623
+ notReady?: ({
2624
+ error: string;
2625
+ phase?: undefined;
2626
+ reason?: undefined;
2627
+ viewId: string;
2628
+ type: string;
2629
+ } | {
2630
+ error?: undefined;
2631
+ phase: string;
2632
+ reason?: undefined;
2633
+ viewId: string;
2634
+ type: string;
2635
+ } | {
2636
+ error?: undefined;
2637
+ phase?: undefined;
2638
+ reason?: undefined;
2639
+ viewId: string;
2640
+ type: string;
2641
+ } | {
2642
+ error?: undefined;
2643
+ phase: string;
2644
+ reason: string;
2645
+ viewId: string;
2646
+ type: string;
2647
+ } | ({
2648
+ trackId: string;
2649
+ } & Record<"error", unknown>) | ({
2650
+ trackId: string;
2651
+ } & Record<"notices", unknown>) | ({
2652
+ trackId: string;
2653
+ } & Record<"phase", unknown>))[] | undefined;
2654
+ offscreen?: {
2655
+ pageHeight: number;
2656
+ windowHeight: number;
2657
+ scrollY: number;
2658
+ views: {
2659
+ viewId: string;
2660
+ top: number;
2661
+ bottom: number;
2662
+ }[];
2663
+ note: string;
2664
+ } | undefined;
2665
+ fits: boolean;
2666
+ overflowBefore: number;
2667
+ overflowAfter: number;
2668
+ shrunk: {
2669
+ what: string;
2670
+ from: number;
2671
+ to: number;
2672
+ }[];
2673
+ note?: string | undefined;
2674
+ } | {
2675
+ drawer?: undefined;
2676
+ dialog?: undefined;
2677
+ settled: boolean;
2678
+ notifications?: {
2679
+ level: string;
2680
+ message: string;
2681
+ }[] | undefined;
2682
+ notReady?: ({
2683
+ error: string;
2684
+ phase?: undefined;
2685
+ reason?: undefined;
2686
+ viewId: string;
2687
+ type: string;
2688
+ } | {
2689
+ error?: undefined;
2690
+ phase: string;
2691
+ reason?: undefined;
2692
+ viewId: string;
2693
+ type: string;
2694
+ } | {
2695
+ error?: undefined;
2696
+ phase?: undefined;
2697
+ reason?: undefined;
2698
+ viewId: string;
2699
+ type: string;
2700
+ } | {
2701
+ error?: undefined;
2702
+ phase: string;
2703
+ reason: string;
2704
+ viewId: string;
2705
+ type: string;
2706
+ } | ({
2707
+ trackId: string;
2708
+ } & Record<"error", unknown>) | ({
2709
+ trackId: string;
2710
+ } & Record<"notices", unknown>) | ({
2711
+ trackId: string;
2712
+ } & Record<"phase", unknown>))[] | undefined;
2713
+ offscreen?: {
2714
+ pageHeight: number;
2715
+ windowHeight: number;
2716
+ scrollY: number;
2717
+ views: {
2718
+ viewId: string;
2719
+ top: number;
2720
+ bottom: number;
2721
+ }[];
2722
+ note: string;
2723
+ } | undefined;
2724
+ fits: boolean;
2725
+ overflowBefore: number;
2726
+ overflowAfter: number;
2727
+ shrunk: {
2728
+ what: string;
2729
+ from: number;
2730
+ to: number;
2731
+ }[];
2732
+ note?: string | undefined;
2733
+ }>;
2734
+ addTrack: (opts: {
2735
+ location?: string | string[];
2736
+ trackId?: string;
2737
+ index?: string;
2738
+ assembly?: string;
2739
+ name?: string;
2740
+ settings?: Record<string, unknown>;
2741
+ show?: boolean;
2742
+ viewId?: string;
2743
+ settleMs?: number;
2744
+ }) => Promise<{
2745
+ trackId: any;
2746
+ trackType: any;
2747
+ assembly: string | undefined;
2748
+ adapterType?: string | undefined;
1713
2749
  }>;
1714
2750
  getFeatures: (args: string | {
1715
2751
  trackId: string;
1716
- loc?: string;
2752
+ loc?: JbLoc;
1717
2753
  assembly?: string;
1718
- regions?: JbRegion[];
2754
+ regions?: Exclude<JbLoc, string>[];
1719
2755
  viewId?: string;
1720
2756
  byteLimit?: number;
1721
- }, positionalLoc?: string, positionalOpts?: {
2757
+ }, positionalLoc?: JbLoc, positionalOpts?: {
1722
2758
  assembly?: string;
1723
2759
  viewId?: string;
1724
2760
  byteLimit?: number;