@jbrowse/product-core 5.0.0-beta.11 → 5.0.0-beta.13

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 (44) hide show
  1. package/esm/RootModel/PreferencesConfig.d.ts +0 -5
  2. package/esm/RootModel/PreferencesConfig.js +0 -11
  3. package/esm/RootModel/createConfigModel.d.ts +0 -10
  4. package/esm/RootModel/index.d.ts +1 -1
  5. package/esm/RootModel/index.js +1 -1
  6. package/esm/RootModel/menuItems.d.ts +0 -2
  7. package/esm/RootModel/menuItems.js +0 -18
  8. package/esm/Session/BaseSession.d.ts +1 -4
  9. package/esm/Session/BaseSession.js +1 -4
  10. package/esm/Session/DrawerWidgets.js +23 -14
  11. package/esm/Session/MultipleViews.d.ts +5 -54
  12. package/esm/Session/MultipleViews.js +3 -61
  13. package/esm/Session/Preferences.js +4 -2
  14. package/esm/Session/SessionTracks.d.ts +14 -14
  15. package/esm/Session/SessionTracks.js +4 -10
  16. package/esm/Session/Themes.d.ts +13 -2
  17. package/esm/Session/Themes.js +23 -5
  18. package/esm/Session/TrackMenu.d.ts +4 -4
  19. package/esm/Session/TrackMenuSessionMixin.d.ts +2 -2
  20. package/esm/Session/Tracks.d.ts +11 -11
  21. package/esm/Session/Tracks.js +2 -2
  22. package/esm/Session/copyTrackSnapshot.d.ts +2 -2
  23. package/esm/Session/index.d.ts +1 -1
  24. package/esm/Session/index.js +1 -1
  25. package/esm/Session/pluginExtraTrackItems.d.ts +2 -2
  26. package/esm/Session/shareableSnapshot.d.ts +3 -19
  27. package/esm/Session/shareableSnapshot.js +4 -61
  28. package/esm/index.d.ts +2 -2
  29. package/esm/index.js +2 -2
  30. package/esm/sessionUrl.d.ts +0 -4
  31. package/esm/sessionUrl.js +0 -4
  32. package/esm/sessionUtils.js +1 -1
  33. package/esm/ui/AboutDialogContents.js +4 -4
  34. package/esm/ui/GeneralPreferencesTab.d.ts +1 -0
  35. package/esm/ui/GeneralPreferencesTab.js +3 -1
  36. package/esm/ui/ViewPreferencesTab.d.ts +0 -2
  37. package/esm/ui/ViewPreferencesTab.js +0 -2
  38. package/esm/ui/aboutTestUtils.d.ts +105 -0
  39. package/esm/ui/aboutTestUtils.js +15 -1
  40. package/esm/ui/preferencesReset.d.ts +0 -3
  41. package/esm/ui/preferencesReset.js +0 -13
  42. package/esm/ui/util.d.ts +5 -6
  43. package/esm/ui/util.js +8 -11
  44. package/package.json +4 -4
@@ -23,12 +23,47 @@ export declare const TestTrackConf: import("@jbrowse/core/configuration/configur
23
23
  } & {
24
24
  defaultValue: unknown;
25
25
  };
26
+ readonly baiLocation: {
27
+ type: "fileLocation";
28
+ } & {
29
+ defaultValue: unknown;
30
+ };
26
31
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
27
32
  readonly metadata: {
28
33
  type: "frozen";
29
34
  } & {
30
35
  defaultValue: unknown;
31
36
  };
37
+ readonly textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
38
+ readonly searchLabel: {
39
+ type: "string";
40
+ } & {
41
+ defaultValue: string;
42
+ };
43
+ readonly indexingAttributes: {
44
+ type: "stringArray";
45
+ } & {
46
+ defaultValue: unknown;
47
+ };
48
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
49
+ readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
50
+ readonly feature: {
51
+ type: "frozen";
52
+ } & {
53
+ defaultValue: unknown;
54
+ };
55
+ readonly subfeatures: {
56
+ type: "frozen";
57
+ } & {
58
+ defaultValue: unknown;
59
+ };
60
+ readonly depth: {
61
+ type: "maybeNumber";
62
+ };
63
+ readonly maxDepth: {
64
+ type: "maybeNumber";
65
+ };
66
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
32
67
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
33
68
  readonly config: {
34
69
  type: "frozen";
@@ -69,12 +104,47 @@ export declare function makeTrackConf(snapshot: SnapshotIn<typeof TestTrackConf>
69
104
  } & {
70
105
  defaultValue: unknown;
71
106
  };
107
+ readonly baiLocation: {
108
+ type: "fileLocation";
109
+ } & {
110
+ defaultValue: unknown;
111
+ };
72
112
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
73
113
  readonly metadata: {
74
114
  type: "frozen";
75
115
  } & {
76
116
  defaultValue: unknown;
77
117
  };
118
+ readonly textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
119
+ readonly searchLabel: {
120
+ type: "string";
121
+ } & {
122
+ defaultValue: string;
123
+ };
124
+ readonly indexingAttributes: {
125
+ type: "stringArray";
126
+ } & {
127
+ defaultValue: unknown;
128
+ };
129
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
130
+ readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
131
+ readonly feature: {
132
+ type: "frozen";
133
+ } & {
134
+ defaultValue: unknown;
135
+ };
136
+ readonly subfeatures: {
137
+ type: "frozen";
138
+ } & {
139
+ defaultValue: unknown;
140
+ };
141
+ readonly depth: {
142
+ type: "maybeNumber";
143
+ };
144
+ readonly maxDepth: {
145
+ type: "maybeNumber";
146
+ };
147
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
78
148
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
79
149
  readonly config: {
80
150
  type: "frozen";
@@ -114,12 +184,47 @@ export declare function makeTrackConf(snapshot: SnapshotIn<typeof TestTrackConf>
114
184
  } & {
115
185
  defaultValue: unknown;
116
186
  };
187
+ readonly baiLocation: {
188
+ type: "fileLocation";
189
+ } & {
190
+ defaultValue: unknown;
191
+ };
117
192
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
118
193
  readonly metadata: {
119
194
  type: "frozen";
120
195
  } & {
121
196
  defaultValue: unknown;
122
197
  };
198
+ readonly textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
199
+ readonly searchLabel: {
200
+ type: "string";
201
+ } & {
202
+ defaultValue: string;
203
+ };
204
+ readonly indexingAttributes: {
205
+ type: "stringArray";
206
+ } & {
207
+ defaultValue: unknown;
208
+ };
209
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
210
+ readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
211
+ readonly feature: {
212
+ type: "frozen";
213
+ } & {
214
+ defaultValue: unknown;
215
+ };
216
+ readonly subfeatures: {
217
+ type: "frozen";
218
+ } & {
219
+ defaultValue: unknown;
220
+ };
221
+ readonly depth: {
222
+ type: "maybeNumber";
223
+ };
224
+ readonly maxDepth: {
225
+ type: "maybeNumber";
226
+ };
227
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
123
228
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
124
229
  readonly config: {
125
230
  type: "frozen";
@@ -1,5 +1,5 @@
1
1
  import PluginManager from '@jbrowse/core/PluginManager';
2
- import { ConfigurationSchema, FormatAboutConfigSchemaFactory, } from '@jbrowse/core/configuration';
2
+ import { ConfigurationSchema, FormatAboutConfigSchemaFactory, FormatDetailsConfigSchemaFactory, } from '@jbrowse/core/configuration';
3
3
  // a real PluginManager provides the jexl instance a callback slot evaluates with
4
4
  export const aboutTestPluginManager = new PluginManager([]).createPluggableElements();
5
5
  aboutTestPluginManager.configure();
@@ -14,8 +14,22 @@ export const TestTrackConf = ConfigurationSchema('TestTrack', {
14
14
  type: 'fileLocation',
15
15
  defaultValue: { uri: '', locationType: 'UriLocation' },
16
16
  },
17
+ baiLocation: {
18
+ type: 'fileLocation',
19
+ defaultValue: { uri: '', locationType: 'UriLocation' },
20
+ advanced: true,
21
+ },
17
22
  }),
18
23
  metadata: { type: 'frozen', defaultValue: {} },
24
+ textSearching: ConfigurationSchema('TestTextSearching', {
25
+ searchLabel: { type: 'string', defaultValue: '' },
26
+ indexingAttributes: {
27
+ type: 'stringArray',
28
+ defaultValue: [],
29
+ advanced: true,
30
+ },
31
+ }),
32
+ formatDetails: FormatDetailsConfigSchemaFactory(),
19
33
  formatAbout: FormatAboutConfigSchemaFactory(),
20
34
  }, { explicitIdentifier: 'trackId' });
21
35
  export function makeTrackConf(snapshot) {
@@ -6,9 +6,6 @@ export interface ResettablePreferencesSession {
6
6
  setThemeMode: (arg: 'light' | 'dark' | 'system') => void;
7
7
  stickyViewHeaders: boolean;
8
8
  setStickyViewHeaders: (sticky: boolean) => void;
9
- effectiveUseWorkspaces: boolean;
10
- defaultUseWorkspaces: boolean;
11
- resetUseWorkspaces: () => void;
12
9
  clearPreferenceOverrides: () => void;
13
10
  clearPreferenceOverride: (key: string) => void;
14
11
  getPreferenceChanges: () => TrackConfigChange[];
@@ -26,19 +26,6 @@ const NON_MAP_PREFERENCES = [
26
26
  s.setStickyViewHeaders(true);
27
27
  },
28
28
  },
29
- {
30
- head: 'useWorkspaces',
31
- change: s => s.effectiveUseWorkspaces === s.defaultUseWorkspaces
32
- ? undefined
33
- : {
34
- path: ['useWorkspaces'],
35
- from: s.defaultUseWorkspaces,
36
- to: s.effectiveUseWorkspaces,
37
- },
38
- reset: s => {
39
- s.resetUseWorkspaces();
40
- },
41
- },
42
29
  ];
43
30
  const NON_MAP_HEADS = new Set(NON_MAP_PREFERENCES.map(p => p.head));
44
31
  // Everything "Reset to defaults" reverts, as rows: the scalar overrides in the
package/esm/ui/util.d.ts CHANGED
@@ -12,19 +12,18 @@ declare module '@jbrowse/core/PluginManager' {
12
12
  'Core-replaceAbout': ComponentSlot<AboutPanelProps>;
13
13
  }
14
14
  }
15
- /**
16
- * What a track's About dialog shows: the config with the session's and the
17
- * track's `formatAbout` callbacks merged over it, plus the resolved `hideUris`.
18
- * The two slots fold differently on purpose: `config` is a merge the track can
19
- * win key-by-key, `hideUris` an OR a track cannot turn back off.
20
- */
15
+ /** About's two cards and `hideUris`, plus the raw `conf` Copy config copies. */
21
16
  export declare function getAboutDialogConfig({ config, session, }: {
22
17
  config: AnyConfigurationModel;
23
18
  session: AbstractSessionModel;
24
19
  }): {
20
+ conf: Record<string, unknown>;
25
21
  config: {
26
22
  [key: string]: unknown;
27
23
  metadata?: Record<string, unknown>;
28
24
  };
25
+ advanced: {
26
+ [k: string]: unknown;
27
+ };
29
28
  hideUris: boolean;
30
29
  };
package/esm/ui/util.js CHANGED
@@ -1,19 +1,16 @@
1
- import { getConf, mergeFormatCallbacks, readConfObject, } from '@jbrowse/core/configuration';
1
+ import { getConf, mergeFormatCallbacks, partitionAdvanced, readConfObject, } from '@jbrowse/core/configuration';
2
2
  // #endregion
3
- /**
4
- * What a track's About dialog shows: the config with the session's and the
5
- * track's `formatAbout` callbacks merged over it, plus the resolved `hideUris`.
6
- * The two slots fold differently on purpose: `config` is a merge the track can
7
- * win key-by-key, `hideUris` an OR a track cannot turn back off.
8
- */
3
+ /** About's two cards and `hideUris`, plus the raw `conf` Copy config copies. */
9
4
  export function getAboutDialogConfig({ config, session, }) {
10
5
  const conf = readConfObject(config);
11
- const shown = {
12
- ...conf,
13
- ...mergeFormatCallbacks(getConf(session, ['formatAbout', 'config'], { config: conf }), readConfObject(config, ['formatAbout', 'config'], { config: conf })),
14
- };
6
+ const edits = mergeFormatCallbacks(getConf(session, ['formatAbout', 'config'], { config: conf }), readConfObject(config, ['formatAbout', 'config'], { config: conf }));
7
+ const split = partitionAdvanced(config, conf);
8
+ const shown = { ...split.rest, ...edits };
9
+ const advanced = Object.fromEntries(Object.entries(split.advanced).filter(([key]) => !(key in edits)));
15
10
  return {
11
+ conf,
16
12
  config: shown,
13
+ advanced,
17
14
  hideUris: Boolean(getConf(session, ['formatAbout', 'hideUris']) ||
18
15
  readConfObject(config, ['formatAbout', 'hideUris'])),
19
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/product-core",
3
- "version": "5.0.0-beta.11",
3
+ "version": "5.0.0-beta.13",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "JBrowse 2 code shared between products but not used by plugins",
@@ -31,10 +31,10 @@
31
31
  "@jbrowse/mobx-state-tree": "^6.7.0",
32
32
  "@mui/icons-material": "^9.4.0",
33
33
  "@mui/material": "^9.4.0",
34
- "mobx": "^7.0.5",
34
+ "mobx": "^7.0.6",
35
35
  "mobx-react": "^10.0.2",
36
- "@jbrowse/render-core": "^5.0.0-beta.11",
37
- "@jbrowse/core": "^5.0.0-beta.11"
36
+ "@jbrowse/render-core": "^5.0.0-beta.13",
37
+ "@jbrowse/core": "^5.0.0-beta.13"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=19.0.0",