react-msaview 8.3.0 → 8.4.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 (124) hide show
  1. package/bundle/index.js +77 -287
  2. package/bundle/index.js.map +4 -4
  3. package/dist/blockFasta.d.ts +6 -0
  4. package/dist/blockFasta.js +12 -0
  5. package/dist/blockFasta.js.map +1 -0
  6. package/dist/colorSchemes.d.ts +7 -0
  7. package/dist/colorSchemes.js +15 -0
  8. package/dist/colorSchemes.js.map +1 -1
  9. package/dist/components/MSAView.js +15 -9
  10. package/dist/components/MSAView.js.map +1 -1
  11. package/dist/components/MSAViewer.d.ts +28 -7
  12. package/dist/components/MSAViewer.js +61 -22
  13. package/dist/components/MSAViewer.js.map +1 -1
  14. package/dist/components/MetadataTable.d.ts +5 -0
  15. package/dist/components/MetadataTable.js +29 -0
  16. package/dist/components/MetadataTable.js.map +1 -0
  17. package/dist/components/Track.js +11 -2
  18. package/dist/components/Track.js.map +1 -1
  19. package/dist/components/dialogs/MetadataDialog.js +5 -6
  20. package/dist/components/dialogs/MetadataDialog.js.map +1 -1
  21. package/dist/components/header/ColorSchemeMenu.d.ts +6 -0
  22. package/dist/components/header/ColorSchemeMenu.js +23 -5
  23. package/dist/components/header/ColorSchemeMenu.js.map +1 -1
  24. package/dist/components/header/{RowSearch.d.ts → GoToBox.d.ts} +2 -2
  25. package/dist/components/header/GoToBox.js +21 -0
  26. package/dist/components/header/GoToBox.js.map +1 -0
  27. package/dist/components/header/Header.js +4 -2
  28. package/dist/components/header/Header.js.map +1 -1
  29. package/dist/components/header/SelectionMenu.d.ts +12 -0
  30. package/dist/components/header/SelectionMenu.js +72 -0
  31. package/dist/components/header/SelectionMenu.js.map +1 -0
  32. package/dist/components/header/goTo.d.ts +20 -0
  33. package/dist/components/header/goTo.js +69 -0
  34. package/dist/components/header/goTo.js.map +1 -0
  35. package/dist/components/msa/MSACanvas.js +13 -2
  36. package/dist/components/msa/MSACanvas.js.map +1 -1
  37. package/dist/components/msa/MSACanvasBlock.js +5 -1
  38. package/dist/components/msa/MSACanvasBlock.js.map +1 -1
  39. package/dist/components/msa/msaKeys.js +6 -0
  40. package/dist/components/msa/msaKeys.js.map +1 -1
  41. package/dist/components/msa/msaRaster.js +1 -0
  42. package/dist/components/msa/msaRaster.js.map +1 -1
  43. package/dist/components/msa/renderHighlights.d.ts +14 -3
  44. package/dist/components/msa/renderHighlights.js +29 -4
  45. package/dist/components/msa/renderHighlights.js.map +1 -1
  46. package/dist/components/msa/tileColor.js +9 -8
  47. package/dist/components/msa/tileColor.js.map +1 -1
  48. package/dist/components/msa/useMsaBlockMouse.d.ts +1 -1
  49. package/dist/components/msa/useMsaBlockMouse.js +18 -11
  50. package/dist/components/msa/useMsaBlockMouse.js.map +1 -1
  51. package/dist/components/overlayColors.d.ts +2 -0
  52. package/dist/components/overlayColors.js +3 -0
  53. package/dist/components/overlayColors.js.map +1 -1
  54. package/dist/components/selectionDrag.d.ts +17 -0
  55. package/dist/components/selectionDrag.js +30 -0
  56. package/dist/components/selectionDrag.js.map +1 -0
  57. package/dist/components/tracks/useTrackHover.d.ts +3 -1
  58. package/dist/components/tracks/useTrackHover.js +26 -6
  59. package/dist/components/tracks/useTrackHover.js.map +1 -1
  60. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js +9 -8
  61. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js.map +1 -1
  62. package/dist/constants.d.ts +1 -1
  63. package/dist/constants.js +6 -6
  64. package/dist/constants.js.map +1 -1
  65. package/dist/element.d.ts +7 -3
  66. package/dist/element.js +32 -4
  67. package/dist/element.js.map +1 -1
  68. package/dist/featuresLayer.d.ts +8 -0
  69. package/dist/featuresLayer.js +42 -0
  70. package/dist/featuresLayer.js.map +1 -0
  71. package/dist/index.d.ts +1 -1
  72. package/dist/model/DataModel.d.ts +1 -1
  73. package/dist/model/DataModel.js +3 -3
  74. package/dist/model/DataModel.js.map +1 -1
  75. package/dist/model/msaModel.d.ts +14 -1
  76. package/dist/model/msaModel.js +17 -1
  77. package/dist/model/msaModel.js.map +1 -1
  78. package/dist/model.d.ts +122 -11
  79. package/dist/model.js +260 -41
  80. package/dist/model.js.map +1 -1
  81. package/dist/svgTestUtil.d.ts +68 -8
  82. package/dist/types.d.ts +50 -0
  83. package/dist/version.d.ts +1 -1
  84. package/dist/version.js +1 -1
  85. package/package.json +3 -3
  86. package/src/blockFasta.ts +18 -0
  87. package/src/colorSchemes.ts +20 -0
  88. package/src/components/MSAView.tsx +16 -9
  89. package/src/components/MSAViewer.tsx +95 -26
  90. package/src/components/MetadataTable.tsx +55 -0
  91. package/src/components/Track.tsx +14 -1
  92. package/src/components/dialogs/MetadataDialog.tsx +9 -8
  93. package/src/components/header/ColorSchemeMenu.tsx +31 -12
  94. package/src/components/header/GoToBox.tsx +50 -0
  95. package/src/components/header/Header.tsx +6 -2
  96. package/src/components/header/SelectionMenu.tsx +117 -0
  97. package/src/components/header/goTo.ts +75 -0
  98. package/src/components/msa/MSACanvas.tsx +12 -2
  99. package/src/components/msa/MSACanvasBlock.tsx +5 -1
  100. package/src/components/msa/msaKeys.ts +6 -0
  101. package/src/components/msa/msaRaster.ts +1 -0
  102. package/src/components/msa/renderHighlights.ts +46 -4
  103. package/src/components/msa/tileColor.ts +9 -8
  104. package/src/components/msa/useMsaBlockMouse.ts +24 -27
  105. package/src/components/overlayColors.ts +4 -0
  106. package/src/components/selectionDrag.ts +42 -0
  107. package/src/components/tracks/useTrackHover.ts +28 -6
  108. package/src/components/tree/dialogs/TreeNodeInfoDialog.tsx +14 -16
  109. package/src/constants.ts +6 -6
  110. package/src/element.ts +45 -5
  111. package/src/featuresLayer.ts +48 -0
  112. package/src/index.ts +5 -0
  113. package/src/model/DataModel.ts +3 -3
  114. package/src/model/msaModel.ts +19 -1
  115. package/src/model.ts +309 -51
  116. package/src/types.ts +58 -0
  117. package/src/version.ts +1 -1
  118. package/dist/components/header/RowSearch.js +0 -15
  119. package/dist/components/header/RowSearch.js.map +0 -1
  120. package/dist/components/header/revealRow.d.ts +0 -3
  121. package/dist/components/header/revealRow.js +0 -15
  122. package/dist/components/header/revealRow.js.map +0 -1
  123. package/src/components/header/RowSearch.tsx +0 -34
  124. package/src/components/header/revealRow.ts +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"DataModel.js","sourceRoot":"","sources":["../../src/model/DataModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAExD;;;;;;GAMG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,KAAK;SACT,KAAK,CAAC;QACL;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QAC/B;;WAEG;QACH,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9B;;WAEG;QACH,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QACvC;;WAEG;QACH,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;KAC/B,CAAC;SACD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;WAEG;QACH,OAAO,CAAC,IAAa;YACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QACD;;WAEG;QACH,MAAM,CAAC,GAAY;YACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QAChB,CAAC;QACD;;WAEG;QACH,eAAe,CAAC,YAAqB;YACnC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAClC,CAAC;QACD;;WAEG;QACH,MAAM,CAAC,GAAY;YACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QAChB,CAAC;KACF,CAAC,CAAC;SACF,mBAAmB,CAAC,IAAI,CAAC,EAAE;IAC1B,kEAA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ACD;;WAEG;QACH,MAAM,CAAC,GAAY;YACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QAChB,CAAC;KACF,CAAC,CAAC;SACF,mBAAmB,CAAC,IAAI,CAAC,EAAE;IAC1B,0DAA0D;IAC1D,6CAA6C;IAC7C,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;QACxC,GAAG;QACH,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;KACxD,CAAC,CACH,CACF,CAAA;AACL,CAAC"}
@@ -13,6 +13,12 @@ export declare function MSAModelF(): import("@jbrowse/mobx-state-tree").IModelTy
13
13
  * default color scheme name
14
14
  */
15
15
  colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
16
+ /**
17
+ * #property
18
+ * a color per residue letter, which replaces the `colorSchemeName` table
19
+ * while set. A letter the map leaves out takes no color
20
+ */
21
+ customColorScheme: import("@jbrowse/mobx-state-tree").IType<Record<string, string> | undefined, Record<string, string> | undefined, Record<string, string> | undefined>;
16
22
  /**
17
23
  * #property
18
24
  * show a tooltip with the hovered column's value for a track while
@@ -29,9 +35,16 @@ export declare function MSAModelF(): import("@jbrowse/mobx-state-tree").IModelTy
29
35
  }, {
30
36
  /**
31
37
  * #action
32
- * set color scheme name
38
+ * pick a scheme from the built-in table, which clears
39
+ * `customColorScheme`
33
40
  */
34
41
  setColorSchemeName(name: string): void;
42
+ /**
43
+ * #action
44
+ * color residues from a map of letter to color, or pass undefined to
45
+ * return to `colorSchemeName`
46
+ */
47
+ setCustomColorScheme(map?: Record<string, string>): void;
35
48
  /**
36
49
  * #action
37
50
  */
@@ -18,6 +18,12 @@ export function MSAModelF() {
18
18
  * default color scheme name
19
19
  */
20
20
  colorSchemeName: stripDefault(types.string, defaultColorSchemeName),
21
+ /**
22
+ * #property
23
+ * a color per residue letter, which replaces the `colorSchemeName` table
24
+ * while set. A letter the map leaves out takes no color
25
+ */
26
+ customColorScheme: types.frozen(),
21
27
  /**
22
28
  * #property
23
29
  * show a tooltip with the hovered column's value for a track while
@@ -35,10 +41,20 @@ export function MSAModelF() {
35
41
  .actions(self => ({
36
42
  /**
37
43
  * #action
38
- * set color scheme name
44
+ * pick a scheme from the built-in table, which clears
45
+ * `customColorScheme`
39
46
  */
40
47
  setColorSchemeName(name) {
41
48
  self.colorSchemeName = name;
49
+ self.customColorScheme = undefined;
50
+ },
51
+ /**
52
+ * #action
53
+ * color residues from a map of letter to color, or pass undefined to
54
+ * return to `colorSchemeName`
55
+ */
56
+ setCustomColorScheme(map) {
57
+ self.customColorScheme = map;
42
58
  },
43
59
  /**
44
60
  * #action
@@ -1 +1 @@
1
- {"version":3,"file":"msaModel.js","sourceRoot":"","sources":["../../src/model/msaModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,MAAM,UAAU,GAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;AAE/E;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,KAAK;SACT,KAAK,CAAC;QACL;;;WAGG;QACH,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC;QAEpD;;;WAGG;QACH,eAAe,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,sBAAsB,CAAC;QAEnE;;;;;WAKG;QACH,eAAe,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,sBA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QAErE;;;;;WAKG;QACH,eAAe,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,sBAAsB,CAAC;QAEpE;;;;WAIG;QACH,SAAS,EAAE,KAAK,CAAC,KAAK,CACpB,KAAK,CAAC,WAAW,CAAY,WAAW,EAAE,UAAU,CAAC,CACtD;KACF,CAAC;SACD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;;;WAIG;QACH,kBAAkB,CAAC,IAAY;YAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAA;YAC3B,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAA;QACpC,CAAC;QAED;;;;WAIG;QACH,oBAAoB,CAAC,GAA4B;YAC/C,IAAI,CAAC,iBAAiB,GAAG,GAAG,CAAA;QAC9B,CAAC;QAED;;WAEG;QACH,UAAU,CAAC,GAAY;YACrB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAA;QACpB,CAAC;QAED;;WAEG;QACH,kBAAkB,CAAC,GAAY;YAC7B,IAAI,CAAC,eAAe,GAAG,GAAG,CAAA;QAC5B,CAAC;QAED;;;WAGG;QACH,YAAY,CAAC,GAAe;YAC1B,IAAI,CAAC,SAAS,GAAG,GAAG,CAAA;QACtB,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC"}
package/dist/model.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { ColumnStats } from './columnStats.ts';
2
2
  import type { ScrollZoomAxis } from './constants.ts';
3
3
  import type { HierarchyNode } from './hierarchy.ts';
4
4
  import type { ExportSvgOptions } from './renderToSvg.tsx';
5
- import type { Annotation, Arc, BasicTrack, Cell, Clade, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Encoding, Highlight, Legend, NodeWithIds, Region, ResidueMapping, ResolvedClade, ResolvedEncoding, ResolvedFeaturePanel, ResolvedHighlight, TreeOrder, TreeRoot, ResolvedRowPanel, ResolvedStripPanel, RowPanelSpec, RowResidue, StructureResidue, TrackKind, UnshareableData, Viewport } from './types.ts';
5
+ import type { Annotation, Arc, BasicTrack, Cell, Clade, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Encoding, Feature, Highlight, Legend, MsaSelection, NodeWithIds, Region, ResidueMapping, ResolvedClade, ResolvedEncoding, ResolvedFeaturePanel, ResolvedHighlight, ResolvedSelection, TreeOrder, TreeRoot, ResolvedRowPanel, ResolvedStripPanel, RowDataInput, RowPanelSpec, RowResidue, StructureResidue, TrackKind, UnshareableData, Viewport } from './types.ts';
6
6
  import type { FileLocation as FileLocationType } from '@jbrowse/core/util/types';
7
7
  import type { Instance } from '@jbrowse/mobx-state-tree';
8
8
  import type { InterProScanResults } from 'msa-parsers';
@@ -41,8 +41,15 @@ export declare const preservedOnReset: Set<string>;
41
41
  * const root = RootModel.create({})
42
42
  * root.view.setData({ msa: '>seq1\nACGT\n>seq2\nACGT' })
43
43
  * ```
44
+ *
45
+ * `maxInlineSnapshotBytes` is the largest pasted or local document, and the
46
+ * largest data track, the snapshot keeps; a larger one stays in the live model
47
+ * and `unshareableData` names it. The standalone app, whose links carry the
48
+ * snapshot in the URL fragment, raises it.
44
49
  */
45
- declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
50
+ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
51
+ maxInlineSnapshotBytes?: number;
52
+ }): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
46
53
  drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
47
54
  labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
48
55
  treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
@@ -55,12 +62,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
55
62
  showTreeOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
56
63
  overviewHeight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
57
64
  autoTreeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
58
- }, "bgColor" | "colorSchemeName" | "msaFormat" | "showColumnStats"> & {
65
+ }, "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats"> & {
59
66
  bgColor: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
60
67
  colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
68
+ customColorScheme: import("@jbrowse/mobx-state-tree").IType<Record<string, string> | undefined, Record<string, string> | undefined, Record<string, string> | undefined>;
61
69
  showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
62
70
  msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
63
- }, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
71
+ }, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
64
72
  /**
65
73
  * #property
66
74
  * id of view, randomly generated if not provided
@@ -633,6 +641,21 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
633
641
  * Persists in the snapshot and the URL.
634
642
  */
635
643
  highlights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Highlight, Highlight, Highlight>>, [undefined]>;
644
+ /**
645
+ * #property
646
+ * features on the rows as data, `{row, start, end, name, ...}` in
647
+ * residues of each row, drawn with the GFF's annotations. Persists in
648
+ * the snapshot and the URL.
649
+ */
650
+ features: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Feature, Feature, Feature>>, [undefined]>;
651
+ /**
652
+ * #property
653
+ * the block the reader selected: `{start, end}` columns of the file,
654
+ * 1-based inclusive like a column highlight, and `rows` by name, every
655
+ * row where absent. Undefined until something is selected, so a view
656
+ * without one adds nothing to the shared URL.
657
+ */
658
+ selection: import("@jbrowse/mobx-state-tree").IType<MsaSelection | undefined, MsaSelection | undefined, MsaSelection | undefined>;
636
659
  /**
637
660
  * #property
638
661
  * where the view opens, in `highlights` coordinates: `{row, start,
@@ -690,6 +713,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
690
713
  setDrawLabels(arg: boolean): void;
691
714
  } & {
692
715
  setColorSchemeName(name: string): void;
716
+ setCustomColorScheme(map?: Record<string, string>): void;
693
717
  setBgColor(arg: boolean): void;
694
718
  setShowColumnStats(arg: boolean): void;
695
719
  setMSAFormat(arg?: import("msa-parsers").MSAFormat): void;
@@ -903,6 +927,20 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
903
927
  * #action
904
928
  */
905
929
  setHighlights(highlights: Highlight[]): void;
930
+ /**
931
+ * #action
932
+ */
933
+ setFeatures(features: Feature[]): void;
934
+ /**
935
+ * #action
936
+ * select a block, in `selection` coordinates. `start` and `end` may come
937
+ * in either order.
938
+ */
939
+ setSelection(selection?: MsaSelection): void;
940
+ /**
941
+ * #action
942
+ */
943
+ clearSelection(): void;
906
944
  /**
907
945
  * #action
908
946
  * replace the clades the viewer marks (see docs/layers.md)
@@ -1026,9 +1064,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1026
1064
  * store the GFF text in the snapshot like the alignment and tree. The
1027
1065
  * parsed annotations are volatile and a blob filehandle is cleared once
1028
1066
  * read, so the text is the only persisted copy. An autorun parses it
1029
- * into annotations.
1067
+ * into annotations, and clears the ones it drew when the text goes.
1030
1068
  */
1031
- setGFF(result: string): void;
1069
+ setGFF(result?: string): void;
1032
1070
  } & {
1033
1071
  /**
1034
1072
  * #getter
@@ -1039,6 +1077,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1039
1077
  * #getter
1040
1078
  */
1041
1079
  readonly realAllowedGappyness: number;
1080
+ /**
1081
+ * #getter
1082
+ * the annotations the overlay, the legend and the encodings draw: the
1083
+ * GFF's, then the `features` layer's
1084
+ */
1085
+ readonly allAnnotations: Annotation[];
1042
1086
  /**
1043
1087
  * #getter
1044
1088
  */
@@ -1065,6 +1109,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1065
1109
  * #getter
1066
1110
  */
1067
1111
  readonly colorScheme: Record<string, string>;
1112
+ /**
1113
+ * #getter
1114
+ * the scheme coloring each cell from its column's statistics, or
1115
+ * undefined while the cells take a fixed color per letter, from the
1116
+ * built-in table or from `customColorScheme`
1117
+ */
1118
+ readonly dynamicColorSchemeName: string | undefined;
1068
1119
  /**
1069
1120
  * #getter
1070
1121
  */
@@ -1095,9 +1146,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1095
1146
  * from disk or pasted in becomes inline text, and DataModel drops an
1096
1147
  * inline document past `maxInlineSnapshotBytes`.
1097
1148
  *
1098
- * The header lists these, and the standalone app drops `?data=` from
1149
+ * The header lists these, and the standalone app drops `#data=` from
1099
1150
  * the address bar while the list is non-empty or the encoded link would
1100
- * pass 8,000 characters, so a copied link never opens an empty viewer
1151
+ * pass its `maxLinkLength`, so a copied link never opens an empty viewer
1101
1152
  * unannounced. A document fetched from a URL never appears here, since
1102
1153
  * the snapshot keeps its filehandle.
1103
1154
  *
@@ -1112,7 +1163,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1112
1163
  * `data.treeMetadata`, the name that travels in existing links, so the
1113
1164
  * inline size limit and `treeMetadataFilehandle` cover it. labelWidthMap
1114
1165
  * reads it on every layout, so a malformed user-supplied file returns {}
1115
- * instead of throwing out of rendering.
1166
+ * instead of throwing out of rendering, and every field is a string by
1167
+ * the time a scale sorts it.
1116
1168
  */
1117
1169
  readonly rowData: Record<string, Record<string, string> | undefined>;
1118
1170
  /**
@@ -1890,7 +1942,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1890
1942
  * replace the row table, which the model keeps as the JSON string
1891
1943
  * `data.treeMetadata` (see docs/layers.md)
1892
1944
  */
1893
- setRowData(rowData: Record<string, Record<string, string>>): void;
1945
+ setRowData(rowData: RowDataInput): void;
1894
1946
  /**
1895
1947
  * #action
1896
1948
  * replace what the viewer's marks read from the row table
@@ -2075,6 +2127,39 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2075
2127
  * is dropped. Row names that match no row are ignored.
2076
2128
  */
2077
2129
  readonly resolvedHighlights: ResolvedHighlight[];
2130
+ /**
2131
+ * #getter
2132
+ * `selection` projected onto what is on screen, the way
2133
+ * `resolvedHighlights` projects a column span and a row set. A
2134
+ * selection whose columns are all hidden, or whose rows are all
2135
+ * collapsed away or unknown, resolves to undefined.
2136
+ */
2137
+ readonly resolvedSelection: ResolvedSelection | undefined;
2138
+ /**
2139
+ * #getter
2140
+ * the columns and rows the selection covers, for the header's readout.
2141
+ * Columns count the file's columns from `start` to `end`, hidden ones
2142
+ * included, as `selectionFasta` copies them.
2143
+ */
2144
+ readonly selectionSize: {
2145
+ columns: number;
2146
+ rows: number;
2147
+ } | undefined;
2148
+ /**
2149
+ * #getter
2150
+ * `selection`'s columns clamped to the file's
2151
+ */
2152
+ readonly selectionFileSpan: {
2153
+ start: number;
2154
+ end: number;
2155
+ } | undefined;
2156
+ /**
2157
+ * #getter
2158
+ * the selected block as FASTA: the selected rows on screen, top to
2159
+ * bottom, each with its letters across the file's columns from `start`
2160
+ * to `end`, gaps included
2161
+ */
2162
+ readonly selectionFasta: string;
2078
2163
  /**
2079
2164
  * #method
2080
2165
  * per-column summary statistics: consensus residue and its identity
@@ -2097,7 +2182,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2097
2182
  /**
2098
2183
  * #getter
2099
2184
  * each encoding with its scale resolved against the values its field
2100
- * takes: a feature channel reads them across the features drawn, every
2185
+ * takes: a feature channel reads them across every feature loaded, every
2101
2186
  * other channel across the row table. Resolved once per change of that
2102
2187
  * table or the encodings, never per row per frame.
2103
2188
  */
@@ -2209,6 +2294,26 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2209
2294
  * its width, or for a span that resolves to no visible column.
2210
2295
  */
2211
2296
  zoomToRegion(region: Region): void;
2297
+ /**
2298
+ * #action
2299
+ * zoom and scroll so the selected columns fill the alignment's width,
2300
+ * and, where the selection names its rows, so those rows fill its height
2301
+ */
2302
+ zoomToSelection(): void;
2303
+ /**
2304
+ * #action
2305
+ * select the block between two cells given as visible column and row
2306
+ * indices, the coordinates a drag reports, clamped to the alignment. A
2307
+ * cell with no `row` selects the columns across every row, and so does a
2308
+ * block spanning every row on screen.
2309
+ */
2310
+ selectBlock(anchor: {
2311
+ col: number;
2312
+ row?: number;
2313
+ }, head: {
2314
+ col: number;
2315
+ row?: number;
2316
+ }): void;
2212
2317
  /**
2213
2318
  * #action
2214
2319
  */
@@ -2217,6 +2322,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2217
2322
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, {
2218
2323
  bgColor: boolean;
2219
2324
  colorSchemeName: string;
2325
+ customColorScheme: Record<string, string> | undefined;
2220
2326
  showColumnStats: boolean;
2221
2327
  msaFormat: import("msa-parsers").MSAFormat | undefined;
2222
2328
  drawLabels: boolean;
@@ -2339,6 +2445,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2339
2445
  relativeTo: string | undefined;
2340
2446
  highlightColumns: number[] | undefined;
2341
2447
  highlights: Highlight[];
2448
+ features: Feature[];
2449
+ selection: MsaSelection | undefined;
2342
2450
  region: Region | undefined;
2343
2451
  clades: Clade[];
2344
2452
  encodings: Encoding[];
@@ -2352,6 +2460,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2352
2460
  } | {
2353
2461
  bgColor: boolean;
2354
2462
  colorSchemeName: string;
2463
+ customColorScheme: Record<string, string> | undefined;
2355
2464
  showColumnStats: boolean;
2356
2465
  msaFormat: import("msa-parsers").MSAFormat | undefined;
2357
2466
  drawLabels: boolean;
@@ -2474,6 +2583,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2474
2583
  relativeTo: string | undefined;
2475
2584
  highlightColumns: number[] | undefined;
2476
2585
  highlights: Highlight[];
2586
+ features: Feature[];
2587
+ selection: MsaSelection | undefined;
2477
2588
  region: Region | undefined;
2478
2589
  clades: Clade[];
2479
2590
  encodings: Encoding[];