@jbrowse/app-core 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.
@@ -163,6 +163,10 @@ export default function RootConfiguration({ pluginManager, extraConfigSlots, }:
163
163
  readonly type: "boolean";
164
164
  readonly defaultValue: false;
165
165
  };
166
+ readonly developerMode: {
167
+ readonly type: "boolean";
168
+ readonly defaultValue: false;
169
+ };
166
170
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
167
171
  /**
168
172
  * #slot configuration.theme
@@ -127,6 +127,10 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, ex
127
127
  readonly type: "boolean";
128
128
  readonly defaultValue: false;
129
129
  };
130
+ readonly developerMode: {
131
+ readonly type: "boolean";
132
+ readonly defaultValue: false;
133
+ };
130
134
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
131
135
  readonly theme: {
132
136
  readonly type: "frozen";
@@ -116,6 +116,10 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, ext
116
116
  readonly type: "boolean";
117
117
  readonly defaultValue: false;
118
118
  };
119
+ readonly developerMode: {
120
+ readonly type: "boolean";
121
+ readonly defaultValue: false;
122
+ };
119
123
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
120
124
  readonly theme: {
121
125
  readonly type: "frozen";
@@ -0,0 +1,2 @@
1
+ export { createJbApi, ensureReExports, safeJson, sessionOf, undeliveredNotifications, waitReady, } from './jbApi.ts';
2
+ export type { JbApi } from './jbApi.ts';
@@ -0,0 +1 @@
1
+ export { createJbApi, ensureReExports, safeJson, sessionOf, undeliveredNotifications, waitReady, } from './jbApi.js';
@@ -0,0 +1,322 @@
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
+ import * as mst from '@jbrowse/mobx-state-tree';
6
+ import * as mobx from 'mobx';
7
+ import type PluginManager from '@jbrowse/core/PluginManager';
8
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
9
+ import type { AbstractSessionModel, AbstractViewModel } from '@jbrowse/core/util/types';
10
+ import type { IStateTreeNode } from '@jbrowse/mobx-state-tree';
11
+ /**
12
+ * What jb.getFeatures may pull before it refuses. An explicit request wins so
13
+ * an agent can mean it; otherwise the adapter's own declared limit, so this
14
+ * does not disagree with the size the track's display already refuses to
15
+ * render; otherwise the default.
16
+ */
17
+ export declare function agentByteLimit(declaredFetchSizeLimit: unknown, requested?: number): number;
18
+ interface DisplaySelf {
19
+ type: string;
20
+ configuration: AnyConfigurationModel;
21
+ displayPhase?: string;
22
+ regionTooLargeReason?: string;
23
+ height?: number;
24
+ error?: unknown;
25
+ }
26
+ interface TrackSelf extends IStateTreeNode {
27
+ type: string;
28
+ configuration: AnyConfigurationModel & {
29
+ trackId: string;
30
+ };
31
+ activeDisplay?: Record<string, unknown> & DisplaySelf;
32
+ }
33
+ export declare function sessionOf(pluginManager: PluginManager | undefined): AbstractSessionModel | undefined;
34
+ export declare function safeJson(value: unknown): string;
35
+ export declare function undeliveredNotifications(session: AbstractSessionModel): {
36
+ level: string;
37
+ message: string;
38
+ }[];
39
+ export declare function waitReady(timeoutMs: number, session?: AbstractSessionModel, root?: ParentNode): Promise<{
40
+ settled: boolean;
41
+ notifications?: {
42
+ level: string;
43
+ message: string;
44
+ }[] | undefined;
45
+ notReady?: ({
46
+ error?: string | undefined;
47
+ phase?: string | undefined;
48
+ viewId: string;
49
+ type: string;
50
+ } | ({
51
+ trackId: string;
52
+ } & Record<"error", unknown>) | ({
53
+ trackId: string;
54
+ } & Record<"phase", unknown>))[] | undefined;
55
+ offscreen?: {
56
+ pageHeight: number;
57
+ windowHeight: number;
58
+ scrollY: number;
59
+ views: {
60
+ viewId: string;
61
+ top: number;
62
+ bottom: number;
63
+ }[];
64
+ note: string;
65
+ } | undefined;
66
+ } | {
67
+ settled: boolean;
68
+ note: string;
69
+ notifications?: {
70
+ level: string;
71
+ message: string;
72
+ }[] | undefined;
73
+ notReady?: ({
74
+ error?: string | undefined;
75
+ phase?: string | undefined;
76
+ viewId: string;
77
+ type: string;
78
+ } | ({
79
+ trackId: string;
80
+ } & Record<"error", unknown>) | ({
81
+ trackId: string;
82
+ } & Record<"phase", unknown>))[] | undefined;
83
+ offscreen?: {
84
+ pageHeight: number;
85
+ windowHeight: number;
86
+ scrollY: number;
87
+ views: {
88
+ viewId: string;
89
+ top: number;
90
+ bottom: number;
91
+ }[];
92
+ note: string;
93
+ } | undefined;
94
+ }>;
95
+ interface JbRegion {
96
+ refName: string;
97
+ start: number;
98
+ end: number;
99
+ assemblyName: string;
100
+ }
101
+ interface SlotDescription {
102
+ type: string;
103
+ description?: string;
104
+ defaultValue: unknown;
105
+ }
106
+ declare function describeSlots(conf: AnyConfigurationModel): Record<string, SlotDescription>;
107
+ export declare function ensureReExports(): Promise<void>;
108
+ export declare function createJbApi(pluginManager: PluginManager): {
109
+ help: string;
110
+ readonly session: AbstractSessionModel;
111
+ readonly rootModel: import("@jbrowse/core/util").AbstractRootModel | undefined;
112
+ require: (lib: string | ((...args: any) => any) | {
113
+ default: (...args: any) => any;
114
+ }) => any;
115
+ ensureRequire: typeof ensureReExports;
116
+ mst: typeof mst;
117
+ mobx: typeof mobx;
118
+ readConfObject: typeof readConfObject;
119
+ getConf: typeof getConf;
120
+ describeSlots: typeof describeSlots;
121
+ parseLocString: typeof parseLocString;
122
+ getFeatureAdapterOrThrow: typeof getFeatureAdapterOrThrow;
123
+ getRpcSessionId: typeof getRpcSessionId;
124
+ renameRegionsIfNeeded: typeof renameRegionsIfNeeded;
125
+ createStopToken: typeof createStopToken;
126
+ stopStopToken: typeof stopStopToken;
127
+ waitReady: (timeoutMs?: number) => Promise<{
128
+ settled: boolean;
129
+ notifications?: {
130
+ level: string;
131
+ message: string;
132
+ }[] | undefined;
133
+ notReady?: ({
134
+ error?: string | undefined;
135
+ phase?: string | undefined;
136
+ viewId: string;
137
+ type: string;
138
+ } | ({
139
+ trackId: string;
140
+ } & Record<"error", unknown>) | ({
141
+ trackId: string;
142
+ } & Record<"phase", unknown>))[] | undefined;
143
+ offscreen?: {
144
+ pageHeight: number;
145
+ windowHeight: number;
146
+ scrollY: number;
147
+ views: {
148
+ viewId: string;
149
+ top: number;
150
+ bottom: number;
151
+ }[];
152
+ note: string;
153
+ } | undefined;
154
+ } | {
155
+ settled: boolean;
156
+ note: string;
157
+ notifications?: {
158
+ level: string;
159
+ message: string;
160
+ }[] | undefined;
161
+ notReady?: ({
162
+ error?: string | undefined;
163
+ phase?: string | undefined;
164
+ viewId: string;
165
+ type: string;
166
+ } | ({
167
+ trackId: string;
168
+ } & Record<"error", unknown>) | ({
169
+ trackId: string;
170
+ } & Record<"phase", unknown>))[] | undefined;
171
+ offscreen?: {
172
+ pageHeight: number;
173
+ windowHeight: number;
174
+ scrollY: number;
175
+ views: {
176
+ viewId: string;
177
+ top: number;
178
+ bottom: number;
179
+ }[];
180
+ note: string;
181
+ } | undefined;
182
+ }>;
183
+ sessionSummary: () => {
184
+ name: string;
185
+ assemblyNames: string[];
186
+ views: Record<string, unknown>[];
187
+ };
188
+ inspect: (path?: string, maxInspectBytes?: number) => {
189
+ path: string;
190
+ modelType?: string | undefined;
191
+ bytes: number;
192
+ getters?: string[] | undefined;
193
+ actions?: string[] | undefined;
194
+ value: unknown;
195
+ } | {
196
+ path: string;
197
+ modelType?: string | undefined;
198
+ bytes: number;
199
+ getters?: string[] | undefined;
200
+ actions?: string[] | undefined;
201
+ note: string;
202
+ items: string[];
203
+ } | {
204
+ path: string;
205
+ modelType?: string | undefined;
206
+ bytes: number;
207
+ getters?: string[] | undefined;
208
+ actions?: string[] | undefined;
209
+ note: string;
210
+ keys: {
211
+ [k: string]: string;
212
+ };
213
+ };
214
+ listTracks: (search?: string, limit?: number) => {
215
+ total: number;
216
+ note?: string | undefined;
217
+ tracks: {
218
+ trackId: any;
219
+ name: string;
220
+ type: any;
221
+ adapterType?: any;
222
+ assemblyNames: string[];
223
+ }[];
224
+ };
225
+ view: (viewId?: string) => AbstractViewModel;
226
+ trackModel: (trackId: string, viewId?: string) => TrackSelf;
227
+ visibleRegions: (viewId?: string) => Promise<JbRegion[]>;
228
+ loadSessionSpec: (spec: Record<string, unknown>, settleMs?: number) => Promise<{
229
+ settled: boolean;
230
+ notifications?: {
231
+ level: string;
232
+ message: string;
233
+ }[] | undefined;
234
+ notReady?: ({
235
+ error?: string | undefined;
236
+ phase?: string | undefined;
237
+ viewId: string;
238
+ type: string;
239
+ } | ({
240
+ trackId: string;
241
+ } & Record<"error", unknown>) | ({
242
+ trackId: string;
243
+ } & Record<"phase", unknown>))[] | undefined;
244
+ offscreen?: {
245
+ pageHeight: number;
246
+ windowHeight: number;
247
+ scrollY: number;
248
+ views: {
249
+ viewId: string;
250
+ top: number;
251
+ bottom: number;
252
+ }[];
253
+ note: string;
254
+ } | undefined;
255
+ session?: {
256
+ name: string;
257
+ assemblyNames: string[];
258
+ views: Record<string, unknown>[];
259
+ } | undefined;
260
+ } | {
261
+ settled: boolean;
262
+ note: string;
263
+ notifications?: {
264
+ level: string;
265
+ message: string;
266
+ }[] | undefined;
267
+ notReady?: ({
268
+ error?: string | undefined;
269
+ phase?: string | undefined;
270
+ viewId: string;
271
+ type: string;
272
+ } | ({
273
+ trackId: string;
274
+ } & Record<"error", unknown>) | ({
275
+ trackId: string;
276
+ } & Record<"phase", unknown>))[] | undefined;
277
+ offscreen?: {
278
+ pageHeight: number;
279
+ windowHeight: number;
280
+ scrollY: number;
281
+ views: {
282
+ viewId: string;
283
+ top: number;
284
+ bottom: number;
285
+ }[];
286
+ note: string;
287
+ } | undefined;
288
+ session?: {
289
+ name: string;
290
+ assemblyNames: string[];
291
+ views: Record<string, unknown>[];
292
+ } | undefined;
293
+ }>;
294
+ addTrack: (opts: {
295
+ location: string | string[];
296
+ index?: string;
297
+ assembly?: string;
298
+ name?: string;
299
+ show?: boolean;
300
+ viewId?: string;
301
+ settleMs?: number;
302
+ }) => Promise<{
303
+ trackId: string;
304
+ trackType: string;
305
+ adapterType: string;
306
+ assembly: string;
307
+ }>;
308
+ getFeatures: (args: string | {
309
+ trackId: string;
310
+ loc?: string;
311
+ assembly?: string;
312
+ regions?: JbRegion[];
313
+ viewId?: string;
314
+ byteLimit?: number;
315
+ }, positionalLoc?: string, positionalOpts?: {
316
+ assembly?: string;
317
+ viewId?: string;
318
+ byteLimit?: number;
319
+ }) => Promise<import("@jbrowse/core/util").Feature[]>;
320
+ };
321
+ export type JbApi = ReturnType<typeof createJbApi>;
322
+ export {};