@jbrowse/product-core 4.3.0 → 5.0.0-beta.2

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 (137) hide show
  1. package/esm/RootModel/BaseRootModel.d.ts +629 -304
  2. package/esm/RootModel/BaseRootModel.js +139 -14
  3. package/esm/RootModel/HierarchicalConfig.d.ts +57 -21
  4. package/esm/RootModel/HierarchicalConfig.js +36 -0
  5. package/esm/RootModel/InternetAccounts.d.ts +18 -1
  6. package/esm/RootModel/InternetAccounts.js +120 -22
  7. package/esm/RootModel/PreferencesConfig.d.ts +68 -0
  8. package/esm/RootModel/PreferencesConfig.js +76 -0
  9. package/esm/RootModel/createConfigModel.d.ts +240 -0
  10. package/esm/RootModel/createConfigModel.js +56 -0
  11. package/esm/RootModel/index.d.ts +10 -5
  12. package/esm/RootModel/index.js +10 -5
  13. package/esm/RootModel/menuItems.d.ts +24 -0
  14. package/esm/RootModel/menuItems.js +143 -0
  15. package/esm/Session/BaseSession.d.ts +312 -11
  16. package/esm/Session/BaseSession.js +458 -14
  17. package/esm/Session/Connections.d.ts +114 -8
  18. package/esm/Session/Connections.js +195 -74
  19. package/esm/Session/DrawerWidgets.d.ts +115 -12
  20. package/esm/Session/DrawerWidgets.js +161 -42
  21. package/esm/Session/MultipleViews.d.ts +1281 -1128
  22. package/esm/Session/MultipleViews.js +396 -64
  23. package/esm/Session/Preferences.d.ts +1667 -0
  24. package/esm/Session/Preferences.js +59 -0
  25. package/esm/Session/ReferenceManagement.d.ts +28 -3
  26. package/esm/Session/ReferenceManagement.js +56 -41
  27. package/esm/Session/SessionTracks.d.ts +1277 -1138
  28. package/esm/Session/SessionTracks.js +540 -35
  29. package/esm/Session/Themes.d.ts +87 -2
  30. package/esm/Session/Themes.js +156 -23
  31. package/esm/Session/TrackMenu.d.ts +112 -0
  32. package/esm/Session/TrackMenu.js +200 -0
  33. package/esm/Session/TrackMenuSessionMixin.d.ts +27 -0
  34. package/esm/Session/TrackMenuSessionMixin.js +41 -0
  35. package/esm/Session/Tracks.d.ts +1171 -1117
  36. package/esm/Session/Tracks.js +183 -20
  37. package/esm/Session/assertSessionModel.d.ts +21 -0
  38. package/esm/Session/assertSessionModel.js +1 -0
  39. package/esm/Session/developerMode.d.ts +7 -0
  40. package/esm/Session/developerMode.js +43 -0
  41. package/esm/Session/finalizeSession.d.ts +16 -0
  42. package/esm/Session/finalizeSession.js +29 -0
  43. package/esm/Session/index.d.ts +22 -10
  44. package/esm/Session/index.js +13 -10
  45. package/esm/Session/readdedTrackConf.d.ts +8 -0
  46. package/esm/Session/readdedTrackConf.js +25 -0
  47. package/esm/Session/shareableSnapshot.d.ts +77 -0
  48. package/esm/Session/shareableSnapshot.js +196 -0
  49. package/esm/Session/temporaryAssemblyTracks.d.ts +24 -0
  50. package/esm/Session/temporaryAssemblyTracks.js +37 -0
  51. package/esm/assertExtends.d.ts +55 -0
  52. package/esm/assertExtends.js +1 -0
  53. package/esm/controllerTracks.d.ts +56 -0
  54. package/esm/controllerTracks.js +90 -0
  55. package/esm/destroyViewState.d.ts +21 -0
  56. package/esm/destroyViewState.js +29 -0
  57. package/esm/index.d.ts +31 -4
  58. package/esm/index.js +31 -4
  59. package/esm/loadPlugins.d.ts +33 -0
  60. package/esm/loadPlugins.js +41 -0
  61. package/esm/localFiles.d.ts +74 -0
  62. package/esm/localFiles.js +156 -0
  63. package/esm/observeSession.d.ts +56 -0
  64. package/esm/observeSession.js +91 -0
  65. package/esm/pluginInput.d.ts +32 -0
  66. package/esm/pluginInput.js +19 -0
  67. package/esm/pruneUnbuildableNodes.d.ts +109 -0
  68. package/esm/pruneUnbuildableNodes.js +568 -0
  69. package/esm/resolveAssemblies.d.ts +44 -0
  70. package/esm/resolveAssemblies.js +55 -0
  71. package/esm/rpcWorker.d.ts +26 -0
  72. package/esm/rpcWorker.js +98 -16
  73. package/esm/scheduleDetachedDestroy.d.ts +18 -0
  74. package/esm/scheduleDetachedDestroy.js +24 -0
  75. package/esm/sessionMigrations/index.d.ts +53 -0
  76. package/esm/sessionMigrations/index.js +432 -0
  77. package/esm/sessionUrl.d.ts +41 -0
  78. package/esm/sessionUrl.js +53 -0
  79. package/esm/sessionUtils.d.ts +69 -0
  80. package/esm/sessionUtils.js +613 -0
  81. package/esm/siblingCast.d.ts +14 -0
  82. package/esm/siblingCast.js +16 -0
  83. package/esm/snapshotUtils.d.ts +8 -0
  84. package/esm/snapshotUtils.js +12 -0
  85. package/esm/ui/AboutDialog.d.ts +3 -6
  86. package/esm/ui/AboutDialog.js +4 -4
  87. package/esm/ui/AboutDialogContents.d.ts +2 -6
  88. package/esm/ui/AboutDialogContents.js +34 -13
  89. package/esm/ui/AssemblyInfoPanel.d.ts +5 -0
  90. package/esm/ui/AssemblyInfoPanel.js +69 -0
  91. package/esm/ui/DisplayDefaultsSection.d.ts +36 -0
  92. package/esm/ui/DisplayDefaultsSection.js +65 -0
  93. package/esm/ui/Drawer.d.ts +21 -0
  94. package/esm/ui/Drawer.js +60 -0
  95. package/esm/ui/DrawerControls.d.ts +5 -0
  96. package/esm/ui/DrawerControls.js +28 -0
  97. package/esm/ui/DrawerHeader.d.ts +6 -0
  98. package/esm/ui/DrawerHeader.js +36 -0
  99. package/esm/ui/DrawerWidget.d.ts +5 -0
  100. package/esm/ui/DrawerWidget.js +12 -0
  101. package/esm/ui/DrawerWidgetSelector.d.ts +5 -0
  102. package/esm/ui/DrawerWidgetSelector.js +40 -0
  103. package/esm/ui/FileInfoPanel.d.ts +3 -6
  104. package/esm/ui/FileInfoPanel.js +35 -26
  105. package/esm/ui/HeaderButtons.d.ts +7 -1
  106. package/esm/ui/HeaderButtons.js +23 -18
  107. package/esm/ui/ModalWidget.d.ts +12 -0
  108. package/esm/ui/ModalWidget.js +33 -0
  109. package/esm/ui/ModalWidgetAppBar.d.ts +8 -0
  110. package/esm/ui/ModalWidgetAppBar.js +9 -0
  111. package/esm/ui/PreferencesDialog.d.ts +56 -0
  112. package/esm/ui/PreferencesDialog.js +145 -0
  113. package/esm/ui/PreferencesResetDialog.d.ts +8 -0
  114. package/esm/ui/PreferencesResetDialog.js +19 -0
  115. package/esm/ui/RefNameAliasesDialog.d.ts +9 -0
  116. package/esm/ui/RefNameAliasesDialog.js +65 -0
  117. package/esm/ui/RefNameInfoDialog.d.ts +3 -6
  118. package/esm/ui/RefNameInfoDialog.js +57 -63
  119. package/esm/ui/WidgetBody.d.ts +18 -0
  120. package/esm/ui/WidgetBody.js +22 -0
  121. package/esm/ui/WidgetHeading.d.ts +7 -0
  122. package/esm/ui/WidgetHeading.js +7 -0
  123. package/esm/ui/drawerLayout.d.ts +18 -0
  124. package/esm/ui/drawerLayout.js +22 -0
  125. package/esm/ui/index.d.ts +13 -1
  126. package/esm/ui/index.js +12 -1
  127. package/esm/ui/util.d.ts +37 -4
  128. package/esm/ui/util.js +35 -38
  129. package/esm/useEngineLifecycle.d.ts +19 -0
  130. package/esm/useEngineLifecycle.js +44 -0
  131. package/package.json +12 -15
  132. package/esm/RootModel/FormatAbout.d.ts +0 -12
  133. package/esm/RootModel/FormatAbout.js +0 -15
  134. package/esm/RootModel/FormatDetails.d.ts +0 -24
  135. package/esm/RootModel/FormatDetails.js +0 -27
  136. package/esm/Session/DialogQueue.d.ts +0 -17
  137. package/esm/Session/DialogQueue.js +0 -31
@@ -0,0 +1,18 @@
1
+ import type { DrawerPosition } from '@jbrowse/core/util/types';
2
+ /**
3
+ * CSS `grid-template-columns` for a main content area with an optional drawer
4
+ * widget on the left or right. Shared by the app shell (`App.tsx`) and the
5
+ * embedded views so the drawer positioning stays identical across products.
6
+ *
7
+ * The `[main]`/`[drawer]` line names are the whole interface: a host renders
8
+ * the main container and the drawer once each, in any order, and each takes
9
+ * its column by name. Placing them by DOM order instead means the host has to
10
+ * render the drawer twice — once on each side, under opposite conditions — and
11
+ * any other in-flow child auto-placed between them lands in a column meant for
12
+ * one of the two.
13
+ */
14
+ export declare function drawerGridTemplateColumns({ drawerVisible, drawerPosition, drawerWidth, }: {
15
+ drawerVisible: boolean;
16
+ drawerPosition: DrawerPosition;
17
+ drawerWidth: number;
18
+ }): string;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * CSS `grid-template-columns` for a main content area with an optional drawer
3
+ * widget on the left or right. Shared by the app shell (`App.tsx`) and the
4
+ * embedded views so the drawer positioning stays identical across products.
5
+ *
6
+ * The `[main]`/`[drawer]` line names are the whole interface: a host renders
7
+ * the main container and the drawer once each, in any order, and each takes
8
+ * its column by name. Placing them by DOM order instead means the host has to
9
+ * render the drawer twice — once on each side, under opposite conditions — and
10
+ * any other in-flow child auto-placed between them lands in a column meant for
11
+ * one of the two.
12
+ */
13
+ export function drawerGridTemplateColumns({ drawerVisible, drawerPosition, drawerWidth, }) {
14
+ const main = '[main] minmax(0, 1fr)';
15
+ if (drawerVisible) {
16
+ const drawer = `[drawer] ${drawerWidth}px`;
17
+ return drawerPosition === 'right'
18
+ ? `${main} ${drawer}`
19
+ : `${drawer} ${main}`;
20
+ }
21
+ return main;
22
+ }
package/esm/ui/index.d.ts CHANGED
@@ -1 +1,13 @@
1
- export * from './AboutDialog.tsx';
1
+ export { default as AboutDialog } from './AboutDialog.tsx';
2
+ export { default as Drawer } from './Drawer.tsx';
3
+ export { default as DrawerControls } from './DrawerControls.tsx';
4
+ export { default as DrawerHeader } from './DrawerHeader.tsx';
5
+ export { default as DrawerWidget } from './DrawerWidget.tsx';
6
+ export { default as DrawerWidgetSelector } from './DrawerWidgetSelector.tsx';
7
+ export { drawerGridTemplateColumns } from './drawerLayout.ts';
8
+ export { default as ModalWidget } from './ModalWidget.tsx';
9
+ export { default as ModalWidgetAppBar } from './ModalWidgetAppBar.tsx';
10
+ export { default as PreferencesDialog } from './PreferencesDialog.tsx';
11
+ export type { PreferencesDialogSession, PreferencesPanelDescriptor, } from './PreferencesDialog.tsx';
12
+ export { default as WidgetBody } from './WidgetBody.tsx';
13
+ export { default as WidgetHeading } from './WidgetHeading.tsx';
package/esm/ui/index.js CHANGED
@@ -1 +1,12 @@
1
- export * from "./AboutDialog.js";
1
+ export { default as AboutDialog } from './AboutDialog.js';
2
+ export { default as Drawer } from './Drawer.js';
3
+ export { default as DrawerControls } from './DrawerControls.js';
4
+ export { default as DrawerHeader } from './DrawerHeader.js';
5
+ export { default as DrawerWidget } from './DrawerWidget.js';
6
+ export { default as DrawerWidgetSelector } from './DrawerWidgetSelector.js';
7
+ export { drawerGridTemplateColumns } from './drawerLayout.js';
8
+ export { default as ModalWidget } from './ModalWidget.js';
9
+ export { default as ModalWidgetAppBar } from './ModalWidgetAppBar.js';
10
+ export { default as PreferencesDialog } from './PreferencesDialog.js';
11
+ export { default as WidgetBody } from './WidgetBody.js';
12
+ export { default as WidgetHeading } from './WidgetHeading.js';
package/esm/ui/util.d.ts CHANGED
@@ -1,10 +1,42 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  import type { AbstractSessionModel } from '@jbrowse/core/util';
4
- export declare function removeAttr(obj: Record<string, unknown>, attr: string): Record<string, unknown>;
5
- export declare function readConf(config: AnyConfigurationModel | Record<string, unknown>, slotPath?: string | string[]): any;
6
- export declare function generateDisplayableConfig({ config, session, pluginManager, }: {
7
- config: AnyConfigurationModel | Record<string, unknown>;
4
+ export type AboutConfig = AnyConfigurationModel | Record<string, unknown>;
5
+ export interface AboutPanelProps {
6
+ session: AbstractSessionModel;
7
+ config: AboutConfig;
8
+ }
9
+ declare module '@jbrowse/core/PluginManager' {
10
+ interface ExtensionPointRegistry {
11
+ 'Core-extraAboutPanel': ComponentList<AboutPanelProps>;
12
+ /** #extensionPoint Core-replaceAbout | sync | Replace or wrap a track's About dialog body */
13
+ 'Core-replaceAbout': ComponentSlot<AboutPanelProps>;
14
+ 'Core-customizeAbout': {
15
+ args: {
16
+ config: Record<string, unknown>;
17
+ };
18
+ result: {
19
+ config: {
20
+ metadata?: Record<string, unknown>;
21
+ [key: string]: unknown;
22
+ };
23
+ };
24
+ props: AboutPanelProps;
25
+ };
26
+ }
27
+ }
28
+ /**
29
+ * Build what a track's About dialog shows: the base config merged with session-
30
+ * and track-level `formatAbout` overrides and passed through the
31
+ * `Core-customizeAbout` extension point, plus the resolved `hideUris`.
32
+ *
33
+ * Both `formatAbout` slots are two-tier and resolve here together, so the
34
+ * dialog reads one thing rather than re-deriving half the rule at the call
35
+ * site. They fold differently on purpose: `config` is a merge the track can win
36
+ * key-by-key, `hideUris` is an OR a track cannot turn back off.
37
+ */
38
+ export declare function getAboutDialogConfig({ config, session, pluginManager, }: {
39
+ config: AboutConfig;
8
40
  session: AbstractSessionModel;
9
41
  pluginManager: PluginManager;
10
42
  }): {
@@ -12,4 +44,5 @@ export declare function generateDisplayableConfig({ config, session, pluginManag
12
44
  metadata?: Record<string, unknown>;
13
45
  [key: string]: unknown;
14
46
  };
47
+ hideUris: boolean;
15
48
  };
package/esm/ui/util.js CHANGED
@@ -1,42 +1,39 @@
1
- import { getConf, readConfObject } from '@jbrowse/core/configuration';
2
- import { getSnapshot, isStateTreeNode } from '@jbrowse/mobx-state-tree';
3
- export function removeAttr(obj, attr) {
4
- for (const prop in obj) {
5
- if (prop === attr) {
6
- delete obj[prop];
7
- }
8
- else if (typeof obj[prop] === 'object') {
9
- removeAttr(obj[prop], attr);
10
- }
11
- }
12
- return obj;
13
- }
14
- export function readConf(config, slotPath) {
15
- if (isStateTreeNode(config)) {
16
- return slotPath
17
- ? readConfObject(config, slotPath)
18
- : getSnapshot(config);
19
- }
20
- if (!slotPath) {
21
- return config;
22
- }
23
- if (typeof slotPath === 'string') {
24
- return config[slotPath];
25
- }
26
- let result = config;
27
- for (const key of slotPath) {
28
- result = result?.[key];
29
- }
30
- return result;
31
- }
32
- export function generateDisplayableConfig({ config, session, pluginManager, }) {
33
- const conf = isStateTreeNode(config) ? readConfObject(config) : config;
34
- const formatAboutConfig = readConf(config, ['formatAbout', 'config']) || {};
35
- return pluginManager.evaluateExtensionPoint('Core-customizeAbout', {
1
+ import { getConf, mergeFormatCallbacks, readConfObject, readConfSlot, } from '@jbrowse/core/configuration';
2
+ import { isStateTreeNode } from '@jbrowse/mobx-state-tree';
3
+ // #endregion
4
+ /**
5
+ * Build what a track's About dialog shows: the base config merged with session-
6
+ * and track-level `formatAbout` overrides and passed through the
7
+ * `Core-customizeAbout` extension point, plus the resolved `hideUris`.
8
+ *
9
+ * Both `formatAbout` slots are two-tier and resolve here together, so the
10
+ * dialog reads one thing rather than re-deriving half the rule at the call
11
+ * site. They fold differently on purpose: `config` is a merge the track can win
12
+ * key-by-key, `hideUris` is an OR a track cannot turn back off.
13
+ */
14
+ export function getAboutDialogConfig({ config, session, pluginManager, }) {
15
+ const conf = isStateTreeNode(config)
16
+ ? readConfObject(config)
17
+ : config;
18
+ const trackFormatAbout = readConfSlot(config, ['formatAbout', 'config'], { config: conf }, pluginManager.jexl);
19
+ const sessionFormatAbout = getConf(session, ['formatAbout', 'config'], {
20
+ config: conf,
21
+ });
22
+ // same two-tier merge the feature-details panel runs on `formatDetails`,
23
+ // session first so a track can override individual keys
24
+ const merged = {
36
25
  config: {
37
26
  ...conf,
38
- ...getConf(session, ['formatAbout', 'config'], { config: conf }),
39
- ...formatAboutConfig,
27
+ ...mergeFormatCallbacks(sessionFormatAbout, trackFormatAbout),
40
28
  },
41
- }, { session, config });
29
+ };
30
+ return {
31
+ ...pluginManager.evaluateExtensionPoint(
32
+ /** #extensionPoint Core-customizeAbout | sync | Transform the config shown in a track's About dialog */
33
+ 'Core-customizeAbout', merged, { session, config }),
34
+ // OR'd, not merged: a deployment that hides file locations session-wide
35
+ // can't have a track turn them back on. Documented on the slot
36
+ hideUris: Boolean(getConf(session, ['formatAbout', 'hideUris']) ||
37
+ readConfSlot(config, ['formatAbout', 'hideUris'])),
38
+ };
42
39
  }
@@ -0,0 +1,19 @@
1
+ import type { EmbeddedRoot } from './destroyViewState.ts';
2
+ export { useCreateOnce, useCreateOnceAsync } from '@jbrowse/core/util/hooks';
3
+ /**
4
+ * Async `useCreateOnce` + `useDestroyOnUnmount`: undefined until the engine is
5
+ * ready. An engine resolving after the final unmount is destroyed on arrival
6
+ * instead of orphaning its worker pool and autoruns.
7
+ */
8
+ export declare function useAsyncEngineLifecycle<T extends EmbeddedRoot>(create: () => Promise<T>): T | undefined;
9
+ /**
10
+ * Destroy an engine when its component really unmounts — terminating its RPC
11
+ * worker threads and stopping its autoruns.
12
+ *
13
+ * The lifecycle rule is {@link useFinalUnmount}'s, including why the obvious
14
+ * `useEffect(() => () => destroyViewState(state), [state])` is wrong under
15
+ * StrictMode; this only names what gets torn down. Pair it with
16
+ * `useCreateOnce`, since the engine has to be the same one for the component's
17
+ * whole life.
18
+ */
19
+ export declare function useDestroyOnUnmount(viewState: EmbeddedRoot): void;
@@ -0,0 +1,44 @@
1
+ import { useRef } from 'react';
2
+ import { useCreateOnceAsync, useFinalUnmount } from '@jbrowse/core/util/hooks';
3
+ import { destroyViewState } from './destroyViewState.js';
4
+ // `useCreateOnce` is core's, and is re-exported rather than wrapped: an engine
5
+ // is only the most expensive thing StrictMode's double-invoked state
6
+ // initializer can build twice, not the only one. The faceted track selector's
7
+ // MST model hit the same trap in a plugin, which cannot reach this package.
8
+ export { useCreateOnce, useCreateOnceAsync } from '@jbrowse/core/util/hooks';
9
+ /**
10
+ * Async `useCreateOnce` + `useDestroyOnUnmount`: undefined until the engine is
11
+ * ready. An engine resolving after the final unmount is destroyed on arrival
12
+ * instead of orphaning its worker pool and autoruns.
13
+ */
14
+ export function useAsyncEngineLifecycle(create) {
15
+ const unmounted = useRef(false);
16
+ const engine = useCreateOnceAsync(() => create().then(built => {
17
+ if (unmounted.current) {
18
+ destroyViewState(built);
19
+ }
20
+ return built;
21
+ }));
22
+ useFinalUnmount(() => {
23
+ unmounted.current = true;
24
+ if (engine) {
25
+ destroyViewState(engine);
26
+ }
27
+ });
28
+ return engine;
29
+ }
30
+ /**
31
+ * Destroy an engine when its component really unmounts — terminating its RPC
32
+ * worker threads and stopping its autoruns.
33
+ *
34
+ * The lifecycle rule is {@link useFinalUnmount}'s, including why the obvious
35
+ * `useEffect(() => () => destroyViewState(state), [state])` is wrong under
36
+ * StrictMode; this only names what gets torn down. Pair it with
37
+ * `useCreateOnce`, since the engine has to be the same one for the component's
38
+ * whole life.
39
+ */
40
+ export function useDestroyOnUnmount(viewState) {
41
+ useFinalUnmount(() => {
42
+ destroyViewState(viewState);
43
+ });
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/product-core",
3
- "version": "4.3.0",
3
+ "version": "5.0.0-beta.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "JBrowse 2 code shared between products but not used by plugins",
@@ -25,23 +25,23 @@
25
25
  "esm"
26
26
  ],
27
27
  "dependencies": {
28
- "@jbrowse/mobx-state-tree": "^5.6.0",
29
- "@mui/material": "^7.3.11",
30
- "copy-to-clipboard": "^3.3.3",
31
- "librpc-web-mod": "^2.1.1",
32
- "mobx": "^6.15.3",
33
- "mobx-react": "^9.2.1",
34
- "@jbrowse/core": "^4.3.0"
28
+ "@jbrowse/mobx-state-tree": "^6.5.1",
29
+ "@mui/icons-material": "^9.4.0",
30
+ "@mui/material": "^9.4.0",
31
+ "mobx": "^7.0.3",
32
+ "mobx-react": "^10.0.2",
33
+ "@jbrowse/core": "^5.0.0-beta.2",
34
+ "@jbrowse/render-core": "^5.0.0-beta.2"
35
35
  },
36
36
  "peerDependencies": {
37
- "react": ">=18.0.0",
38
- "react-dom": ">=18.0.0"
37
+ "react": ">=19.0.0",
38
+ "react-dom": ">=19.0.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
43
  "scripts": {
44
- "build:esm": "tsc -p tsconfig.build.esm.json",
44
+ "build:esm": "node ../../node_modules/typescript7/bin/tsc --build tsconfig.build.esm.json",
45
45
  "build": "pnpm build:esm",
46
46
  "test": "cd ../..; jest --passWithNoTests packages/product-core",
47
47
  "clean": "rimraf esm *.tsbuildinfo",
@@ -49,9 +49,6 @@
49
49
  },
50
50
  "types": "esm/index.d.ts",
51
51
  "exports": {
52
- ".": {
53
- "types": "./esm/index.d.ts",
54
- "import": "./esm/index.js"
55
- }
52
+ ".": "./esm/index.js"
56
53
  }
57
54
  }
@@ -1,12 +0,0 @@
1
- export declare function FormatAboutConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- config: {
3
- type: string;
4
- description: string;
5
- defaultValue: {};
6
- contextVariable: string[];
7
- };
8
- hideUris: {
9
- type: string;
10
- defaultValue: boolean;
11
- };
12
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
@@ -1,15 +0,0 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- export function FormatAboutConfigSchemaFactory() {
3
- return ConfigurationSchema('FormatAbout', {
4
- config: {
5
- type: 'frozen',
6
- description: 'formats configuration object in about dialog',
7
- defaultValue: {},
8
- contextVariable: ['config'],
9
- },
10
- hideUris: {
11
- type: 'boolean',
12
- defaultValue: false,
13
- },
14
- });
15
- }
@@ -1,24 +0,0 @@
1
- export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- feature: {
3
- type: string;
4
- description: string;
5
- defaultValue: {};
6
- contextVariable: string[];
7
- };
8
- subfeatures: {
9
- type: string;
10
- description: string;
11
- defaultValue: {};
12
- contextVariable: string[];
13
- };
14
- depth: {
15
- type: string;
16
- defaultValue: number;
17
- description: string;
18
- };
19
- maxDepth: {
20
- type: string;
21
- defaultValue: number;
22
- description: string;
23
- };
24
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
@@ -1,27 +0,0 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- export function FormatDetailsConfigSchemaFactory() {
3
- return ConfigurationSchema('FormatDetails', {
4
- feature: {
5
- type: 'frozen',
6
- description: 'adds extra fields to the feature details',
7
- defaultValue: {},
8
- contextVariable: ['feature'],
9
- },
10
- subfeatures: {
11
- type: 'frozen',
12
- description: 'adds extra fields to the subfeatures of a feature',
13
- defaultValue: {},
14
- contextVariable: ['feature'],
15
- },
16
- depth: {
17
- type: 'number',
18
- defaultValue: 2,
19
- description: 'depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)',
20
- },
21
- maxDepth: {
22
- type: 'number',
23
- defaultValue: 10000,
24
- description: 'hide subfeatures greater than a certain depth',
25
- },
26
- });
27
- }
@@ -1,17 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- import type { DialogComponentType } from '@jbrowse/core/util';
3
- import type { IAnyStateTreeNode, Instance } from '@jbrowse/mobx-state-tree';
4
- type DoneCallback = (doneCallback: () => void) => [DialogComponentType, Record<string, unknown>];
5
- export declare function DialogQueueSessionMixin(_pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{}, {
6
- queueOfDialogs: [DialogComponentType, Record<string, unknown>][];
7
- } & {
8
- readonly DialogComponent: DialogComponentType | undefined;
9
- readonly DialogProps: Record<string, unknown> | undefined;
10
- } & {
11
- removeActiveDialog(): void;
12
- queueDialog(doneCallback: DoneCallback): void;
13
- }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
14
- export type SessionWithDialogsType = ReturnType<typeof DialogQueueSessionMixin>;
15
- export type SessionWithDialogs = Instance<SessionWithDialogsType>;
16
- export declare function isSessionWithDialogs(session: IAnyStateTreeNode): session is SessionWithDialogs;
17
- export {};
@@ -1,31 +0,0 @@
1
- import { types } from '@jbrowse/mobx-state-tree';
2
- import { isBaseSession } from "./BaseSession.js";
3
- export function DialogQueueSessionMixin(_pluginManager) {
4
- return types
5
- .model('DialogQueueSessionMixin', {})
6
- .volatile(() => ({
7
- queueOfDialogs: [],
8
- }))
9
- .views(self => ({
10
- get DialogComponent() {
11
- return self.queueOfDialogs[0]?.[0];
12
- },
13
- get DialogProps() {
14
- return self.queueOfDialogs[0]?.[1];
15
- },
16
- }))
17
- .actions(self => ({
18
- removeActiveDialog() {
19
- self.queueOfDialogs = self.queueOfDialogs.slice(1);
20
- },
21
- queueDialog(doneCallback) {
22
- const [component, props] = doneCallback(() => {
23
- this.removeActiveDialog();
24
- });
25
- self.queueOfDialogs = [...self.queueOfDialogs, [component, props]];
26
- },
27
- }));
28
- }
29
- export function isSessionWithDialogs(session) {
30
- return isBaseSession(session) && 'queueOfDialogs' in session;
31
- }