@jbrowse/plugin-linear-genome-view 5.0.0-beta.2 → 5.0.0-beta.20

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 (177) hide show
  1. package/esm/LinearGenomeView/afterAttach.d.ts +22 -5
  2. package/esm/LinearGenomeView/afterAttach.js +129 -106
  3. package/esm/LinearGenomeView/axisConfigSchema.d.ts +18 -0
  4. package/esm/LinearGenomeView/axisConfigSchema.js +22 -0
  5. package/esm/LinearGenomeView/components/CenterLine.js +10 -5
  6. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +2 -3
  7. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +3 -5
  8. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +9 -4
  9. package/esm/LinearGenomeView/components/ExportSvgDialog.js +45 -8
  10. package/esm/LinearGenomeView/components/GetSequenceDialog.js +2 -2
  11. package/esm/LinearGenomeView/components/Header.js +11 -1
  12. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +2 -2
  13. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -3
  14. package/esm/LinearGenomeView/components/HeaderPanControls.js +6 -3
  15. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +4 -1
  16. package/esm/LinearGenomeView/components/HeaderZoomControls.js +6 -35
  17. package/esm/LinearGenomeView/components/Highlight.js +27 -11
  18. package/esm/LinearGenomeView/components/HighlightBand.d.ts +11 -2
  19. package/esm/LinearGenomeView/components/HighlightBand.js +32 -13
  20. package/esm/LinearGenomeView/components/HighlightChip.d.ts +3 -3
  21. package/esm/LinearGenomeView/components/HighlightChip.js +13 -8
  22. package/esm/LinearGenomeView/components/HighlightLabelDialog.d.ts +6 -0
  23. package/esm/LinearGenomeView/components/HighlightLabelDialog.js +18 -0
  24. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +3 -3
  25. package/esm/LinearGenomeView/components/ImportForm.js +7 -9
  26. package/esm/LinearGenomeView/components/LinearGenomeView.js +5 -12
  27. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +13 -14
  28. package/esm/LinearGenomeView/components/MiniControls.js +11 -5
  29. package/esm/LinearGenomeView/components/OverviewHighlight.js +3 -3
  30. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +3 -2
  31. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +6 -5
  32. package/esm/LinearGenomeView/components/OverviewRubberband.js +25 -48
  33. package/esm/LinearGenomeView/components/OverviewScalebar.js +4 -5
  34. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -3
  35. package/esm/LinearGenomeView/components/PaddingBlocks.js +3 -8
  36. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +5 -6
  37. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +3 -2
  38. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +4 -4
  39. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
  40. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +74 -0
  41. package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -2
  42. package/esm/LinearGenomeView/components/Rubberband.js +3 -2
  43. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -1
  44. package/esm/LinearGenomeView/components/SVGHighlightBand.js +16 -5
  45. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
  46. package/esm/LinearGenomeView/components/Scalebar.js +8 -5
  47. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +51 -36
  48. package/esm/LinearGenomeView/components/SearchBox.js +10 -16
  49. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +3 -2
  50. package/esm/LinearGenomeView/components/SearchPanelForm.js +4 -2
  51. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +4 -8
  52. package/esm/LinearGenomeView/components/SearchResultsDialog.js +7 -4
  53. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -7
  54. package/esm/LinearGenomeView/components/SearchResultsTable.js +25 -53
  55. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +2 -3
  56. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -4
  57. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +3 -2
  58. package/esm/LinearGenomeView/components/StrandCheckboxes.js +4 -2
  59. package/esm/LinearGenomeView/components/TrackContainer.d.ts +2 -3
  60. package/esm/LinearGenomeView/components/TrackContainer.js +63 -10
  61. package/esm/LinearGenomeView/components/TrackLabel.js +14 -4
  62. package/esm/LinearGenomeView/components/TrackLabelButtons.js +2 -2
  63. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +4 -5
  64. package/esm/LinearGenomeView/components/TrackLabelMenu.js +11 -14
  65. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +3 -4
  66. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +23 -10
  67. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +6 -4
  68. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +12 -24
  69. package/esm/LinearGenomeView/components/TracksContainer.js +11 -23
  70. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
  71. package/esm/LinearGenomeView/components/VerticalGuide.js +3 -16
  72. package/esm/LinearGenomeView/components/fetchSequence.d.ts +1 -2
  73. package/esm/LinearGenomeView/components/fetchSequence.js +15 -7
  74. package/esm/LinearGenomeView/components/recentLocationsMenu.js +10 -0
  75. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +0 -3
  76. package/esm/LinearGenomeView/components/useRangeSelect.js +26 -61
  77. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +3 -1
  78. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +4 -2
  79. package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -2
  80. package/esm/LinearGenomeView/components/useSideScroll.js +156 -102
  81. package/esm/LinearGenomeView/components/util.d.ts +4 -0
  82. package/esm/LinearGenomeView/components/util.js +4 -2
  83. package/esm/LinearGenomeView/consts.d.ts +2 -0
  84. package/esm/LinearGenomeView/consts.js +3 -1
  85. package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
  86. package/esm/LinearGenomeView/containingLgv.js +23 -0
  87. package/esm/LinearGenomeView/headerFit.d.ts +4 -2
  88. package/esm/LinearGenomeView/headerFit.js +20 -7
  89. package/esm/LinearGenomeView/index.d.ts +2 -7
  90. package/esm/LinearGenomeView/index.js +5 -7
  91. package/esm/LinearGenomeView/keyboardHandler.d.ts +8 -7
  92. package/esm/LinearGenomeView/keyboardHandler.js +61 -23
  93. package/esm/LinearGenomeView/launchKeys.d.ts +1 -1
  94. package/esm/LinearGenomeView/launchKeys.js +11 -6
  95. package/esm/LinearGenomeView/lazyDialogs.d.ts +16 -3
  96. package/esm/LinearGenomeView/lazyDialogs.js +1 -0
  97. package/esm/LinearGenomeView/linkedViewSync.d.ts +3 -11
  98. package/esm/LinearGenomeView/linkedViewSync.js +27 -49
  99. package/esm/LinearGenomeView/menuItems.d.ts +16 -18
  100. package/esm/LinearGenomeView/menuItems.js +264 -164
  101. package/esm/LinearGenomeView/model.d.ts +1192 -560
  102. package/esm/LinearGenomeView/model.js +805 -590
  103. package/esm/LinearGenomeView/rExport/exportLinearView.d.ts +17 -0
  104. package/esm/LinearGenomeView/rExport/exportLinearView.js +117 -0
  105. package/esm/LinearGenomeView/rExport/rScript.d.ts +110 -0
  106. package/esm/LinearGenomeView/rExport/rScript.js +524 -0
  107. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +1 -1
  108. package/esm/LinearGenomeView/sharedScaleContainer.js +2 -12
  109. package/esm/LinearGenomeView/showFiles.d.ts +2 -0
  110. package/esm/LinearGenomeView/showFiles.js +19 -0
  111. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +1 -1
  112. package/esm/LinearGenomeView/showRegionsWithUndo.js +13 -5
  113. package/esm/LinearGenomeView/stickyChrome.d.ts +5 -9
  114. package/esm/LinearGenomeView/stickyChrome.js +5 -9
  115. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +4 -4
  116. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +4 -1
  117. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +8 -21
  118. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +3 -1
  119. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +9 -9
  120. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +3 -1
  121. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +5 -5
  122. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +13 -18
  123. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -5
  124. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +5 -6
  125. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +9 -10
  126. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +3 -3
  127. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +26 -0
  128. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
  129. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +21 -13
  130. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +4 -5
  131. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +7 -6
  132. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +2 -3
  133. package/esm/LinearGenomeView/svgcomponents/SVGView.js +17 -3
  134. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +24 -20
  135. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +42 -29
  136. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +74 -77
  137. package/esm/LinearGenomeView/svgcomponents/util.d.ts +28 -12
  138. package/esm/LinearGenomeView/svgcomponents/util.js +41 -29
  139. package/esm/LinearGenomeView/types.d.ts +13 -10
  140. package/esm/LinearGenomeView/types.js +0 -1
  141. package/esm/LinearGenomeView/util.d.ts +103 -46
  142. package/esm/LinearGenomeView/util.js +222 -170
  143. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +9 -6
  144. package/esm/MultiLevelRubberband/index.d.ts +2 -0
  145. package/esm/MultiLevelRubberband/index.js +2 -0
  146. package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
  147. package/esm/MultiLevelRubberband/menuItems.js +52 -0
  148. package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
  149. package/esm/MultiLevelRubberband/rowLabel.js +27 -0
  150. package/esm/MultiLevelRubberband/types.d.ts +1 -0
  151. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +2 -1
  152. package/esm/MultiLevelRubberband/useRangeSelect.js +45 -59
  153. package/esm/TrackModifiers/index.d.ts +83 -0
  154. package/esm/TrackModifiers/index.js +231 -0
  155. package/esm/displayKitTests/perRegionTestEnv.d.ts +244 -68
  156. package/esm/displayKitTests/perRegionTestEnv.js +30 -26
  157. package/esm/index.d.ts +21 -99
  158. package/esm/index.js +17 -38
  159. package/esm/searchUtils.d.ts +26 -10
  160. package/esm/searchUtils.js +137 -137
  161. package/esm/shared/RubberbandSpan.d.ts +3 -2
  162. package/esm/shared/RubberbandSpan.js +6 -3
  163. package/esm/shared/coordLabels.d.ts +11 -4
  164. package/esm/shared/coordLabels.js +20 -5
  165. package/esm/shared/useWindowDrag.d.ts +18 -0
  166. package/esm/shared/useWindowDrag.js +47 -0
  167. package/package.json +12 -11
  168. package/esm/FeatureTrack/configSchema.d.ts +0 -124
  169. package/esm/FeatureTrack/configSchema.js +0 -54
  170. package/esm/FeatureTrack/index.d.ts +0 -2
  171. package/esm/FeatureTrack/index.js +0 -13
  172. package/esm/LinearGenomeView/initKeys.d.ts +0 -12
  173. package/esm/LinearGenomeView/initKeys.js +0 -68
  174. package/esm/MultiLevelRubberband/VerticalGuide.d.ts +0 -6
  175. package/esm/MultiLevelRubberband/VerticalGuide.js +0 -21
  176. package/esm/lazyPluginExports.d.ts +0 -23
  177. package/esm/lazyPluginExports.js +0 -36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-genome-view",
3
- "version": "5.0.0-beta.2",
3
+ "version": "5.0.0-beta.20",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 linear genome view",
6
6
  "keywords": [
@@ -21,15 +21,16 @@
21
21
  "esm"
22
22
  ],
23
23
  "dependencies": {
24
- "@jbrowse/mobx-state-tree": "^6.5.1",
25
- "@mui/icons-material": "^9.4.0",
26
- "@mui/material": "^9.4.0",
27
- "mobx": "^7.0.3",
28
- "mobx-react": "^10.0.2",
29
- "@jbrowse/core": "^5.0.0-beta.2",
30
- "@jbrowse/render-core": "^5.0.0-beta.2",
31
- "@jbrowse/display-ui": "^5.0.0-beta.2",
32
- "@jbrowse/display-kit": "^5.0.0-beta.2"
24
+ "@jbrowse/mobx-state-tree": "^6.10.0",
25
+ "@mui/icons-material": "^9.5.0",
26
+ "@mui/material": "^9.5.0",
27
+ "mobx": "^7.1.3",
28
+ "mobx-react": "^10.0.3",
29
+ "@jbrowse/core": "^5.0.0-beta.20",
30
+ "@jbrowse/display-ui": "^5.0.0-beta.20",
31
+ "@jbrowse/display-kit": "^5.0.0-beta.20",
32
+ "@jbrowse/render-core": "^5.0.0-beta.20",
33
+ "@jbrowse/launch-args": "^5.0.0-beta.20"
33
34
  },
34
35
  "peerDependencies": {
35
36
  "react": ">=19.0.0",
@@ -40,7 +41,7 @@
40
41
  },
41
42
  "sideEffects": false,
42
43
  "devDependencies": {
43
- "@jbrowse/display-test-utils": "^5.0.0-beta.2"
44
+ "@jbrowse/display-test-utils": "^5.0.0-beta.20"
44
45
  },
45
46
  "scripts": {
46
47
  "prebuild": "pnpm clean",
@@ -1,124 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- /**
3
- * #config FeatureTrack
4
- * #category track
5
- * used for basic gene and feature tracks, generally used with LinearBasicDisplay
6
- *
7
- * #example
8
- * A minimal hand-authored entry in the top-level `tracks` array — `adapter`
9
- * points at the data file, and the track opens with a `LinearBasicDisplay`:
10
- * ```js
11
- * {
12
- * type: 'FeatureTrack',
13
- * trackId: 'genes',
14
- * name: 'Genes',
15
- * assemblyNames: ['hg38'],
16
- * adapter: {
17
- * type: 'Gff3TabixAdapter',
18
- * uri: 'https://example.com/genes.sorted.gff.gz',
19
- * },
20
- * }
21
- * ```
22
- *
23
- * #example
24
- * The same track, colored. Rather than writing out the full `displays` array,
25
- * you can put appearance settings in a `displayDefaults` object — JBrowse works
26
- * out which display they belong to and applies them for you (here, the track's
27
- * `LinearBasicDisplay`), so you don't have to know display names. A `jexl:`
28
- * value gives per-feature coloring:
29
- * ```js
30
- * {
31
- * type: 'FeatureTrack',
32
- * trackId: 'genes',
33
- * name: 'Genes',
34
- * assemblyNames: ['hg38'],
35
- * adapter: {
36
- * type: 'Gff3TabixAdapter',
37
- * uri: 'https://example.com/genes.sorted.gff.gz',
38
- * },
39
- * displayDefaults: { color: "jexl:feature.type=='CDS'?'red':'blue'" },
40
- * }
41
- * ```
42
- */
43
- declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
44
- readonly name: {
45
- readonly description: "descriptive name of the track, falls back to the trackId when unset";
46
- readonly type: "string";
47
- readonly defaultValue: "";
48
- };
49
- readonly assemblyNames: {
50
- readonly description: "name of the assembly (or assemblies) track belongs to";
51
- readonly type: "stringArray";
52
- readonly defaultValue: readonly ["assemblyName"];
53
- };
54
- readonly description: {
55
- readonly description: "a description of the track";
56
- readonly type: "string";
57
- readonly defaultValue: "";
58
- };
59
- readonly category: {
60
- readonly description: "the category and sub-categories of a track";
61
- readonly type: "stringArray";
62
- readonly defaultValue: readonly [];
63
- };
64
- readonly metadata: {
65
- readonly type: "frozen";
66
- readonly description: "anything to add about this track";
67
- readonly defaultValue: {};
68
- };
69
- readonly adapter: import("@jbrowse/mobx-state-tree").IAnyType;
70
- readonly textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
71
- readonly indexingAttributes: {
72
- readonly type: "stringArray";
73
- readonly description: "list of which feature attributes to index for text searching";
74
- readonly defaultValue: readonly ["Name", "ID", "symbol"];
75
- };
76
- readonly indexingFeatureTypesToExclude: {
77
- readonly type: "stringArray";
78
- readonly description: "list of feature types to exclude in text search index";
79
- readonly defaultValue: readonly ["CDS", "exon"];
80
- };
81
- readonly indexingFeatureTypesToInclude: {
82
- readonly type: "stringArray";
83
- readonly description: "the only feature types to index; empty means index every type not excluded";
84
- readonly defaultValue: readonly [];
85
- };
86
- readonly textSearchAdapter: import("@jbrowse/mobx-state-tree").IAnyType;
87
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
88
- readonly displays: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
89
- readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
90
- readonly feature: {
91
- readonly type: "frozen";
92
- readonly description: "adds extra fields to the feature details";
93
- readonly defaultValue: {};
94
- readonly contextVariable: ["feature"];
95
- };
96
- readonly subfeatures: {
97
- readonly type: "frozen";
98
- readonly description: "adds extra fields to the subfeatures of a feature";
99
- readonly defaultValue: {};
100
- readonly contextVariable: ["feature"];
101
- };
102
- readonly depth: {
103
- readonly type: "maybeNumber";
104
- readonly description: "levels of subfeature the formatDetails.subfeatures callback runs on, default 2";
105
- };
106
- readonly maxDepth: {
107
- readonly type: "maybeNumber";
108
- readonly description: "hide subfeatures nested deeper than this, default no limit";
109
- };
110
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
111
- readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
112
- readonly config: {
113
- readonly type: "frozen";
114
- readonly description: "formats configuration object in about dialog";
115
- readonly defaultValue: {};
116
- readonly contextVariable: ["config"];
117
- };
118
- readonly hideUris: {
119
- readonly type: "boolean";
120
- readonly defaultValue: false;
121
- };
122
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
123
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, "trackId">>;
124
- export default configSchema;
@@ -1,54 +0,0 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes';
3
- /**
4
- * #config FeatureTrack
5
- * #category track
6
- * used for basic gene and feature tracks, generally used with LinearBasicDisplay
7
- *
8
- * #example
9
- * A minimal hand-authored entry in the top-level `tracks` array — `adapter`
10
- * points at the data file, and the track opens with a `LinearBasicDisplay`:
11
- * ```js
12
- * {
13
- * type: 'FeatureTrack',
14
- * trackId: 'genes',
15
- * name: 'Genes',
16
- * assemblyNames: ['hg38'],
17
- * adapter: {
18
- * type: 'Gff3TabixAdapter',
19
- * uri: 'https://example.com/genes.sorted.gff.gz',
20
- * },
21
- * }
22
- * ```
23
- *
24
- * #example
25
- * The same track, colored. Rather than writing out the full `displays` array,
26
- * you can put appearance settings in a `displayDefaults` object — JBrowse works
27
- * out which display they belong to and applies them for you (here, the track's
28
- * `LinearBasicDisplay`), so you don't have to know display names. A `jexl:`
29
- * value gives per-feature coloring:
30
- * ```js
31
- * {
32
- * type: 'FeatureTrack',
33
- * trackId: 'genes',
34
- * name: 'Genes',
35
- * assemblyNames: ['hg38'],
36
- * adapter: {
37
- * type: 'Gff3TabixAdapter',
38
- * uri: 'https://example.com/genes.sorted.gff.gz',
39
- * },
40
- * displayDefaults: { color: "jexl:feature.type=='CDS'?'red':'blue'" },
41
- * }
42
- * ```
43
- */
44
- const configSchema = (pluginManager) => ConfigurationSchema('FeatureTrack', {}, {
45
- /**
46
- * #baseConfiguration
47
- */
48
- baseConfiguration: createBaseTrackConfig(pluginManager),
49
- /**
50
- * #identifier
51
- */
52
- explicitIdentifier: 'trackId',
53
- });
54
- export default configSchema;
@@ -1,2 +0,0 @@
1
- import type PluginManager from '@jbrowse/core/PluginManager';
2
- export default function FeatureTrackF(pm: PluginManager): void;
@@ -1,13 +0,0 @@
1
- import { TrackType, createBaseTrackModel, } from '@jbrowse/core/pluggableElementTypes';
2
- import configSchemaF from './configSchema.js';
3
- export default function FeatureTrackF(pm) {
4
- pm.addTrackType(() => {
5
- const configSchema = configSchemaF(pm);
6
- return new TrackType({
7
- name: 'FeatureTrack',
8
- displayName: 'Feature track',
9
- configSchema,
10
- stateModel: createBaseTrackModel(pm, 'FeatureTrack', configSchema),
11
- });
12
- });
13
- }
@@ -1,12 +0,0 @@
1
- export declare function partitionLaunchKeys(spec: object, viewPropKeys: ReadonlySet<string>): {
2
- init: Record<string, unknown>;
3
- viewProps: Record<string, unknown>;
4
- unknown: Record<string, unknown>;
5
- };
6
- export declare function linearGenomeViewPropKeys(pluginManager: {
7
- getViewType: (name: string) => {
8
- stateModel: {
9
- properties: object;
10
- };
11
- };
12
- }): ReadonlySet<string>;
@@ -1,68 +0,0 @@
1
- import { lgvLaunchKeys } from './launchKeys.js';
2
- // The remaining v4 partition, still used by the synteny view to build its LGV
3
- // rows. `lgvLaunchKeys` is the one declaration of what a launch key is, so the
4
- // two cannot disagree while both exist.
5
- const knownInitKeys = new Set(Object.keys(lgvLaunchKeys.keys));
6
- // Never settable from a spec, whatever the model declares: `type` picks the
7
- // view, `id` is passed top-level so MST's optional identifier honors it, and
8
- // `launch` is the blob the partition fills rather than something anyone writes.
9
- const RESERVED = new Set(['id', 'type', 'launch']);
10
- const LEGACY_VIEWPORT_PROPS = new Set(lgvLaunchKeys.passThrough);
11
- // Partition launch keys three ways, once, for every caller that needs to know
12
- // which is which:
13
- //
14
- // - `init`: resolution keys (loc, tracks, highlight, …) with no direct MST
15
- // representation, which afterAttach applies on attach and then discards
16
- // - `viewProps`: plain persisted props MST restores natively, so they belong on
17
- // the view snapshot rather than in the blob
18
- // - `unknown`: neither, i.e. a typo. MST silently drops unknown snapshot keys and
19
- // `init` is a frozen blob, so nothing else would notice
20
- //
21
- // The two callers differ only in what they do with each bucket: the launcher
22
- // spreads a flat spec across the new view's snapshot and warns about the typos,
23
- // while afterAttach — which only ever sees an already-built blob — warns about
24
- // both a typo and a view prop that ended up inside it.
25
- export function partitionLaunchKeys(spec,
26
- // The view's declared property names. Callers with a live node read it off
27
- // `getPropertyMembers(self).properties`; callers building a snapshot read it
28
- // off the registered view type's `stateModel.properties` — see
29
- // `linearGenomeViewPropKeys`.
30
- viewPropKeys) {
31
- const init = {};
32
- const viewProps = {};
33
- const unknown = {};
34
- for (const [key, value] of Object.entries(spec)) {
35
- const bucket = knownInitKeys.has(key)
36
- ? init
37
- : (viewPropKeys.has(key) || LEGACY_VIEWPORT_PROPS.has(key)) &&
38
- !RESERVED.has(key)
39
- ? viewProps
40
- : unknown;
41
- bucket[key] = value;
42
- }
43
- return { init, viewProps, unknown };
44
- }
45
- // The registered LinearGenomeView's declared property names, for a caller that
46
- // has a PluginManager but no view yet (a launcher, or a synteny row being built).
47
- // A caller holding a live node reads the same thing off
48
- // `getPropertyMembers(self).properties` instead.
49
- //
50
- // `getViewType` THROWS on an unregistered name, and that is left alone: this is
51
- // only ever called from code that is about to add a LinearGenomeView, so an
52
- // absent view type is a broken plugin manager rather than a case to degrade
53
- // through — and degrading would mean silently dropping every property the
54
- // caller asked for, which is the failure this whole mechanism exists to end.
55
- //
56
- // Cached: the set is fixed for the life of the manager, and a launch that opens
57
- // a stack of rows would otherwise rebuild it per row.
58
- const propKeyCache = new WeakMap();
59
- export function linearGenomeViewPropKeys(pluginManager) {
60
- const cached = propKeyCache.get(pluginManager);
61
- if (cached) {
62
- return cached;
63
- }
64
- const { stateModel } = pluginManager.getViewType('LinearGenomeView');
65
- const keys = new Set(Object.keys(stateModel.properties));
66
- propKeyCache.set(pluginManager, keys);
67
- return keys;
68
- }
@@ -1,6 +0,0 @@
1
- import type { MultiLevelRubberbandModel } from './types.ts';
2
- declare const VerticalGuide: ({ model, coordX, }: {
3
- model: MultiLevelRubberbandModel;
4
- coordX: number;
5
- }) => import("react").JSX.Element;
6
- export default VerticalGuide;
@@ -1,21 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { stringify } from '@jbrowse/core/util';
3
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- import { observer } from 'mobx-react';
5
- import { GuideLabel } from '../shared/coordLabels.js';
6
- const useStyles = makeStyles()({
7
- guide: {
8
- pointerEvents: 'none',
9
- height: '100%',
10
- width: 1,
11
- position: 'absolute',
12
- background: 'red',
13
- zIndex: 1001,
14
- },
15
- });
16
- const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
17
- const { classes } = useStyles();
18
- const { views } = model;
19
- return (_jsxs(_Fragment, { children: [_jsx(GuideLabel, { coordX: coordX, viewWidth: Math.min(...views.map(view => view.width)), stickyTop: undefined, children: views.map(view => (_jsx("div", { children: stringify(view.pxToBp(coordX), true) }, view.id))) }), _jsx("div", { className: classes.guide, style: { left: coordX } })] }));
20
- });
21
- export default VerticalGuide;
@@ -1,23 +0,0 @@
1
- import type { LinearGenomeViewModel } from './LinearGenomeView/index.ts';
2
- export declare const LinearGenomeView: {
3
- (props: {
4
- model: LinearGenomeViewModel;
5
- }): import("react").JSX.Element;
6
- displayName: string;
7
- };
8
- export declare const SearchBox: {
9
- (props: {
10
- model: LinearGenomeViewModel;
11
- showHelp?: boolean;
12
- minWidth?: number;
13
- maxWidth?: number;
14
- style?: React.CSSProperties;
15
- }): import("react").JSX.Element;
16
- displayName: string;
17
- };
18
- export declare const ZoomControls: {
19
- (props: {
20
- model: LinearGenomeViewModel;
21
- }): import("react").JSX.Element;
22
- displayName: string;
23
- };
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Suspense, lazy } from 'react';
3
- /**
4
- * The three React components `LinearGenomeViewPlugin.exports` publishes to
5
- * external plugins, each behind its own chunk.
6
- *
7
- * They used to be plain static imports in the plugin's `index.ts`, and that one
8
- * object was enough to undo the `lazy()` the view type is registered with:
9
- * `exports` is evaluated when the plugin class body is, so **every** host that
10
- * installs this plugin pulled in the whole stock LGV component tree — and
11
- * through it `@jbrowse/core/ui` and most of Material UI — before first paint,
12
- * including a host that renders none of JBrowse's own chrome. Measured on
13
- * `products/jbrowse-build-your-own`'s examples site, where no page renders a
14
- * single one of these: 63 chunks, 239 KB raw / 89 KB gzipped.
15
- *
16
- * That is the shape to watch for. A `lazy()` at the registration site only
17
- * holds if nothing else in an eagerly-evaluated module names the same component,
18
- * and a plugin's `exports` object is the easiest place to name one by accident.
19
- *
20
- * The `Suspense` wrapper is what keeps the change invisible to a consumer: a
21
- * bare `lazy()` component handed to a plugin that renders it outside a boundary
22
- * would throw where a static one worked, and external plugins are exactly the
23
- * consumers we cannot check (`reference/PLUGIN_ABI_STABILITY.md`). Same
24
- * treatment, and the same reason, as core's `ReExports/lazify.tsx` — which is
25
- * not reused here only because it is not on core's exports map.
26
- */
27
- function suspend(displayName, Component) {
28
- function Suspended(props) {
29
- return (_jsx(Suspense, { fallback: null, children: _jsx(Component, { ...props }) }));
30
- }
31
- Suspended.displayName = displayName;
32
- return Suspended;
33
- }
34
- export const LinearGenomeView = suspend('LinearGenomeView', lazy(() => import('./LinearGenomeView/components/LinearGenomeView.js')));
35
- export const SearchBox = suspend('SearchBox', lazy(() => import('./LinearGenomeView/components/SearchBox.js')));
36
- export const ZoomControls = suspend('ZoomControls', lazy(() => import('./LinearGenomeView/components/HeaderZoomControls.js')));