jbrowse-plugin-protein3d 0.4.13 → 0.5.0

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 (53) hide show
  1. package/dist/LaunchProteinView/components/FoldseekActionMenu.js +15 -14
  2. package/dist/LaunchProteinView/components/ProteinViewActions.js +27 -15
  3. package/dist/LaunchProteinView/components/UserProvidedStructure.js +1 -2
  4. package/dist/LaunchProteinView/hooks/useSafeLaunch.d.ts +9 -0
  5. package/dist/LaunchProteinView/hooks/useSafeLaunch.js +15 -0
  6. package/dist/LaunchProteinView/utils/launchViewUtils.d.ts +9 -11
  7. package/dist/LaunchProteinView/utils/launchViewUtils.js +6 -8
  8. package/dist/LaunchProteinView/utils/sideBySide.d.ts +5 -0
  9. package/dist/LaunchProteinView/utils/sideBySide.js +9 -0
  10. package/dist/LaunchProteinViewExtensionPoint/index.js +7 -4
  11. package/dist/ProteinView/applyLociInteractivity.d.ts +23 -17
  12. package/dist/ProteinView/applyLociInteractivity.js +33 -61
  13. package/dist/ProteinView/components/FeatureBar.d.ts +1 -1
  14. package/dist/ProteinView/components/FeatureBar.js +36 -34
  15. package/dist/ProteinView/components/FeatureTypeLabel.js +5 -9
  16. package/dist/ProteinView/components/ProteinFeatureTrack.js +7 -15
  17. package/dist/ProteinView/components/ProteinViewHeader.js +9 -1
  18. package/dist/ProteinView/components/ResidueValueTrack.js +26 -15
  19. package/dist/ProteinView/hooks/useProteinFeatureTrackData.d.ts +1 -0
  20. package/dist/ProteinView/hooks/useProteinFeatureTrackData.js +3 -2
  21. package/dist/ProteinView/model.d.ts +12 -0
  22. package/dist/ProteinView/structureModel.d.ts +14 -5
  23. package/dist/ProteinView/structureModel.js +69 -92
  24. package/dist/ProteinView/subscribeMolstarInteraction.d.ts +8 -0
  25. package/dist/ProteinView/subscribeMolstarInteraction.js +1 -1
  26. package/dist/ProteinView/util.d.ts +0 -5
  27. package/dist/ProteinView/util.js +0 -11
  28. package/dist/jbrowse-plugin-protein3d.umd.production.min.js +15 -15
  29. package/dist/jbrowse-plugin-protein3d.umd.production.min.js.map +4 -4
  30. package/dist/version.d.ts +1 -1
  31. package/dist/version.js +1 -1
  32. package/package.json +1 -1
  33. package/src/LaunchProteinView/components/FoldseekActionMenu.tsx +22 -17
  34. package/src/LaunchProteinView/components/ProteinViewActions.tsx +32 -17
  35. package/src/LaunchProteinView/components/UserProvidedStructure.tsx +1 -6
  36. package/src/LaunchProteinView/hooks/useSafeLaunch.ts +17 -0
  37. package/src/LaunchProteinView/utils/launchViewUtils.ts +30 -29
  38. package/src/LaunchProteinView/utils/sideBySide.ts +14 -0
  39. package/src/LaunchProteinViewExtensionPoint/index.ts +8 -9
  40. package/src/ProteinView/applyLociInteractivity.ts +62 -114
  41. package/src/ProteinView/components/FeatureBar.tsx +40 -44
  42. package/src/ProteinView/components/FeatureTypeLabel.tsx +6 -11
  43. package/src/ProteinView/components/ProteinFeatureTrack.tsx +5 -17
  44. package/src/ProteinView/components/ProteinViewHeader.tsx +15 -0
  45. package/src/ProteinView/components/ResidueValueTrack.tsx +40 -23
  46. package/src/ProteinView/hooks/useProteinFeatureTrackData.ts +6 -2
  47. package/src/ProteinView/structureModel.ts +90 -108
  48. package/src/ProteinView/subscribeMolstarInteraction.ts +9 -1
  49. package/src/ProteinView/util.ts +0 -25
  50. package/src/version.ts +1 -1
  51. package/dist/ProteinView/highlightResidueRange.d.ts +0 -14
  52. package/dist/ProteinView/highlightResidueRange.js +0 -19
  53. package/src/ProteinView/highlightResidueRange.ts +0 -44
@@ -1,7 +1,3 @@
1
- import loadMolstar from './loadMolstar'
2
-
3
- import type { Structure } from 'molstar/lib/mol-model/structure'
4
-
5
1
  interface HoveredState {
6
2
  hoverPosition: {
7
3
  coord: number
@@ -21,27 +17,6 @@ export function checkHovered(hovered: unknown): hovered is HoveredState {
21
17
  )
22
18
  }
23
19
 
24
- export async function getMolstarStructureSelection({
25
- structure,
26
- selectedResidue,
27
- }: {
28
- structure: Structure
29
- selectedResidue: number
30
- }) {
31
- const { Script } = await loadMolstar()
32
- return Script.getStructureSelection(
33
- Q =>
34
- Q.struct.generator.atomGroups({
35
- 'residue-test': Q.core.rel.eq([
36
- Q.struct.atomProperty.macromolecular.label_seq_id(),
37
- selectedResidue,
38
- ]),
39
- 'group-by': Q.struct.atomProperty.macromolecular.residueKey(),
40
- }),
41
- structure,
42
- )
43
- }
44
-
45
20
  export function invertMap(arg: Record<number, number>): Record<number, number> {
46
21
  return Object.fromEntries(Object.entries(arg).map(([a, b]) => [b, +a]))
47
22
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.4.13'
1
+ export const version = '0.5.0'
@@ -1,14 +0,0 @@
1
- import type { Structure } from 'molstar/lib/mol-model/structure';
2
- import type { PluginContext } from 'molstar/lib/mol-plugin/context';
3
- export default function highlightResidueRange({ structure, startResidue, endResidue, plugin, }: {
4
- structure: Structure;
5
- startResidue: number;
6
- endResidue: number;
7
- plugin: PluginContext;
8
- }): Promise<void>;
9
- export declare function selectResidueRange({ structure, startResidue, endResidue, plugin, }: {
10
- structure: Structure;
11
- startResidue: number;
12
- endResidue: number;
13
- plugin: PluginContext;
14
- }): Promise<void>;
@@ -1,19 +0,0 @@
1
- import { applyLociInteractivity } from './applyLociInteractivity';
2
- export default async function highlightResidueRange({ structure, startResidue, endResidue, plugin, }) {
3
- await applyLociInteractivity({
4
- structure,
5
- startResidue,
6
- endResidue,
7
- plugin,
8
- mode: 'highlight',
9
- });
10
- }
11
- export async function selectResidueRange({ structure, startResidue, endResidue, plugin, }) {
12
- await applyLociInteractivity({
13
- structure,
14
- startResidue,
15
- endResidue,
16
- plugin,
17
- mode: 'select',
18
- });
19
- }
@@ -1,44 +0,0 @@
1
- import { applyLociInteractivity } from './applyLociInteractivity'
2
-
3
- import type { Structure } from 'molstar/lib/mol-model/structure'
4
- import type { PluginContext } from 'molstar/lib/mol-plugin/context'
5
-
6
- export default async function highlightResidueRange({
7
- structure,
8
- startResidue,
9
- endResidue,
10
- plugin,
11
- }: {
12
- structure: Structure
13
- startResidue: number
14
- endResidue: number
15
- plugin: PluginContext
16
- }) {
17
- await applyLociInteractivity({
18
- structure,
19
- startResidue,
20
- endResidue,
21
- plugin,
22
- mode: 'highlight',
23
- })
24
- }
25
-
26
- export async function selectResidueRange({
27
- structure,
28
- startResidue,
29
- endResidue,
30
- plugin,
31
- }: {
32
- structure: Structure
33
- startResidue: number
34
- endResidue: number
35
- plugin: PluginContext
36
- }) {
37
- await applyLociInteractivity({
38
- structure,
39
- startResidue,
40
- endResidue,
41
- plugin,
42
- mode: 'select',
43
- })
44
- }