@jbrowse/plugin-linear-comparative-view 2.6.1

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 (276) hide show
  1. package/LICENSE +201 -0
  2. package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +52 -0
  3. package/dist/LGVSyntenyDisplay/configSchemaF.js +18 -0
  4. package/dist/LGVSyntenyDisplay/configSchemaF.js.map +1 -0
  5. package/dist/LGVSyntenyDisplay/index.d.ts +3 -0
  6. package/dist/LGVSyntenyDisplay/index.js +24 -0
  7. package/dist/LGVSyntenyDisplay/index.js.map +1 -0
  8. package/dist/LGVSyntenyDisplay/model.d.ts +380 -0
  9. package/dist/LGVSyntenyDisplay/model.js +154 -0
  10. package/dist/LGVSyntenyDisplay/model.js.map +1 -0
  11. package/dist/LaunchLinearSyntenyView.d.ts +2 -0
  12. package/dist/LaunchLinearSyntenyView.js +58 -0
  13. package/dist/LaunchLinearSyntenyView.js.map +1 -0
  14. package/dist/LinearComparativeDisplay/configSchemaF.d.ts +5 -0
  15. package/dist/LinearComparativeDisplay/configSchemaF.js +18 -0
  16. package/dist/LinearComparativeDisplay/configSchemaF.js.map +1 -0
  17. package/dist/LinearComparativeDisplay/index.d.ts +3 -0
  18. package/dist/LinearComparativeDisplay/index.js +24 -0
  19. package/dist/LinearComparativeDisplay/index.js.map +1 -0
  20. package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +275 -0
  21. package/dist/LinearComparativeDisplay/stateModelFactory.js +172 -0
  22. package/dist/LinearComparativeDisplay/stateModelFactory.js.map +1 -0
  23. package/dist/LinearComparativeView/components/Header.d.ts +7 -0
  24. package/dist/LinearComparativeView/components/Header.js +89 -0
  25. package/dist/LinearComparativeView/components/Header.js.map +1 -0
  26. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +8 -0
  27. package/dist/LinearComparativeView/components/LinearComparativeView.js +99 -0
  28. package/dist/LinearComparativeView/components/LinearComparativeView.js.map +1 -0
  29. package/dist/LinearComparativeView/components/Rubberband.d.ts +9 -0
  30. package/dist/LinearComparativeView/components/Rubberband.js +225 -0
  31. package/dist/LinearComparativeView/components/Rubberband.js.map +1 -0
  32. package/dist/LinearComparativeView/index.d.ts +3 -0
  33. package/dist/LinearComparativeView/index.js +42 -0
  34. package/dist/LinearComparativeView/index.js.map +1 -0
  35. package/dist/LinearComparativeView/model.d.ts +326 -0
  36. package/dist/LinearComparativeView/model.js +346 -0
  37. package/dist/LinearComparativeView/model.js.map +1 -0
  38. package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +7 -0
  39. package/dist/LinearReadVsRef/LinearReadVsRef.js +284 -0
  40. package/dist/LinearReadVsRef/LinearReadVsRef.js.map +1 -0
  41. package/dist/LinearReadVsRef/index.d.ts +2 -0
  42. package/dist/LinearReadVsRef/index.js +55 -0
  43. package/dist/LinearReadVsRef/index.js.map +1 -0
  44. package/dist/LinearSyntenyDisplay/afterAttach.d.ts +2 -0
  45. package/dist/LinearSyntenyDisplay/afterAttach.js +108 -0
  46. package/dist/LinearSyntenyDisplay/afterAttach.js.map +1 -0
  47. package/dist/LinearSyntenyDisplay/components/Component.d.ts +6 -0
  48. package/dist/LinearSyntenyDisplay/components/Component.js +87 -0
  49. package/dist/LinearSyntenyDisplay/components/Component.js.map +1 -0
  50. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +6 -0
  51. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +160 -0
  52. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js.map +1 -0
  53. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +7 -0
  54. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +83 -0
  55. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js.map +1 -0
  56. package/dist/LinearSyntenyDisplay/components/util.d.ts +27 -0
  57. package/dist/LinearSyntenyDisplay/components/util.js +84 -0
  58. package/dist/LinearSyntenyDisplay/components/util.js.map +1 -0
  59. package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +23 -0
  60. package/dist/LinearSyntenyDisplay/configSchemaF.js +36 -0
  61. package/dist/LinearSyntenyDisplay/configSchemaF.js.map +1 -0
  62. package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +5 -0
  63. package/dist/LinearSyntenyDisplay/drawSynteny.js +235 -0
  64. package/dist/LinearSyntenyDisplay/drawSynteny.js.map +1 -0
  65. package/dist/LinearSyntenyDisplay/index.d.ts +3 -0
  66. package/dist/LinearSyntenyDisplay/index.js +47 -0
  67. package/dist/LinearSyntenyDisplay/index.js.map +1 -0
  68. package/dist/LinearSyntenyDisplay/model.d.ts +333 -0
  69. package/dist/LinearSyntenyDisplay/model.js +179 -0
  70. package/dist/LinearSyntenyDisplay/model.js.map +1 -0
  71. package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +8 -0
  72. package/dist/LinearSyntenyView/components/ExportSvgDialog.js +86 -0
  73. package/dist/LinearSyntenyView/components/ExportSvgDialog.js.map +1 -0
  74. package/dist/LinearSyntenyView/components/Icons.d.ts +4 -0
  75. package/dist/LinearSyntenyView/components/Icons.js +19 -0
  76. package/dist/LinearSyntenyView/components/Icons.js.map +1 -0
  77. package/dist/LinearSyntenyView/components/ImportCustomTrack.d.ts +11 -0
  78. package/dist/LinearSyntenyView/components/ImportCustomTrack.js +180 -0
  79. package/dist/LinearSyntenyView/components/ImportCustomTrack.js.map +1 -0
  80. package/dist/LinearSyntenyView/components/ImportForm.d.ts +6 -0
  81. package/dist/LinearSyntenyView/components/ImportForm.js +127 -0
  82. package/dist/LinearSyntenyView/components/ImportForm.js.map +1 -0
  83. package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.d.ts +9 -0
  84. package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.js +63 -0
  85. package/dist/LinearSyntenyView/components/ImportSyntenyTrackSelector.js.map +1 -0
  86. package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +7 -0
  87. package/dist/LinearSyntenyView/components/LinearSyntenyView.js +38 -0
  88. package/dist/LinearSyntenyView/components/LinearSyntenyView.js.map +1 -0
  89. package/dist/LinearSyntenyView/index.d.ts +3 -0
  90. package/dist/LinearSyntenyView/index.js +42 -0
  91. package/dist/LinearSyntenyView/index.js.map +1 -0
  92. package/dist/LinearSyntenyView/model.d.ts +754 -0
  93. package/dist/LinearSyntenyView/model.js +170 -0
  94. package/dist/LinearSyntenyView/model.js.map +1 -0
  95. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +6 -0
  96. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +13 -0
  97. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js.map +1 -0
  98. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +4 -0
  99. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +85 -0
  100. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js.map +1 -0
  101. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -0
  102. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +66 -0
  103. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js.map +1 -0
  104. package/dist/SyntenyFeatureDetail/index.d.ts +3 -0
  105. package/dist/SyntenyFeatureDetail/index.js +58 -0
  106. package/dist/SyntenyFeatureDetail/index.js.map +1 -0
  107. package/dist/SyntenyTrack/configSchema.d.ts +75 -0
  108. package/dist/SyntenyTrack/configSchema.js +16 -0
  109. package/dist/SyntenyTrack/configSchema.js.map +1 -0
  110. package/dist/SyntenyTrack/index.d.ts +3 -0
  111. package/dist/SyntenyTrack/index.js +19 -0
  112. package/dist/SyntenyTrack/index.js.map +1 -0
  113. package/dist/index.d.ts +7 -0
  114. package/dist/index.js +47 -0
  115. package/dist/index.js.map +1 -0
  116. package/dist/util.d.ts +25 -0
  117. package/dist/util.js +77 -0
  118. package/dist/util.js.map +1 -0
  119. package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +52 -0
  120. package/esm/LGVSyntenyDisplay/configSchemaF.js +16 -0
  121. package/esm/LGVSyntenyDisplay/configSchemaF.js.map +1 -0
  122. package/esm/LGVSyntenyDisplay/index.d.ts +3 -0
  123. package/esm/LGVSyntenyDisplay/index.js +19 -0
  124. package/esm/LGVSyntenyDisplay/index.js.map +1 -0
  125. package/esm/LGVSyntenyDisplay/model.d.ts +380 -0
  126. package/esm/LGVSyntenyDisplay/model.js +152 -0
  127. package/esm/LGVSyntenyDisplay/model.js.map +1 -0
  128. package/esm/LaunchLinearSyntenyView.d.ts +2 -0
  129. package/esm/LaunchLinearSyntenyView.js +55 -0
  130. package/esm/LaunchLinearSyntenyView.js.map +1 -0
  131. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +5 -0
  132. package/esm/LinearComparativeDisplay/configSchemaF.js +16 -0
  133. package/esm/LinearComparativeDisplay/configSchemaF.js.map +1 -0
  134. package/esm/LinearComparativeDisplay/index.d.ts +3 -0
  135. package/esm/LinearComparativeDisplay/index.js +19 -0
  136. package/esm/LinearComparativeDisplay/index.js.map +1 -0
  137. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +275 -0
  138. package/esm/LinearComparativeDisplay/stateModelFactory.js +170 -0
  139. package/esm/LinearComparativeDisplay/stateModelFactory.js.map +1 -0
  140. package/esm/LinearComparativeView/components/Header.d.ts +7 -0
  141. package/esm/LinearComparativeView/components/Header.js +61 -0
  142. package/esm/LinearComparativeView/components/Header.js.map +1 -0
  143. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +8 -0
  144. package/esm/LinearComparativeView/components/LinearComparativeView.js +94 -0
  145. package/esm/LinearComparativeView/components/LinearComparativeView.js.map +1 -0
  146. package/esm/LinearComparativeView/components/Rubberband.d.ts +9 -0
  147. package/esm/LinearComparativeView/components/Rubberband.js +200 -0
  148. package/esm/LinearComparativeView/components/Rubberband.js.map +1 -0
  149. package/esm/LinearComparativeView/index.d.ts +3 -0
  150. package/esm/LinearComparativeView/index.js +14 -0
  151. package/esm/LinearComparativeView/index.js.map +1 -0
  152. package/esm/LinearComparativeView/model.d.ts +326 -0
  153. package/esm/LinearComparativeView/model.js +318 -0
  154. package/esm/LinearComparativeView/model.js.map +1 -0
  155. package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +7 -0
  156. package/esm/LinearReadVsRef/LinearReadVsRef.js +258 -0
  157. package/esm/LinearReadVsRef/LinearReadVsRef.js.map +1 -0
  158. package/esm/LinearReadVsRef/index.d.ts +2 -0
  159. package/esm/LinearReadVsRef/index.js +49 -0
  160. package/esm/LinearReadVsRef/index.js.map +1 -0
  161. package/esm/LinearSyntenyDisplay/afterAttach.d.ts +2 -0
  162. package/esm/LinearSyntenyDisplay/afterAttach.js +104 -0
  163. package/esm/LinearSyntenyDisplay/afterAttach.js.map +1 -0
  164. package/esm/LinearSyntenyDisplay/components/Component.d.ts +6 -0
  165. package/esm/LinearSyntenyDisplay/components/Component.js +59 -0
  166. package/esm/LinearSyntenyDisplay/components/Component.js.map +1 -0
  167. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +6 -0
  168. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +132 -0
  169. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js.map +1 -0
  170. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +7 -0
  171. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +58 -0
  172. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js.map +1 -0
  173. package/esm/LinearSyntenyDisplay/components/util.d.ts +27 -0
  174. package/esm/LinearSyntenyDisplay/components/util.js +77 -0
  175. package/esm/LinearSyntenyDisplay/components/util.js.map +1 -0
  176. package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +23 -0
  177. package/esm/LinearSyntenyDisplay/configSchemaF.js +31 -0
  178. package/esm/LinearSyntenyDisplay/configSchemaF.js.map +1 -0
  179. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +5 -0
  180. package/esm/LinearSyntenyDisplay/drawSynteny.js +229 -0
  181. package/esm/LinearSyntenyDisplay/drawSynteny.js.map +1 -0
  182. package/esm/LinearSyntenyDisplay/index.d.ts +3 -0
  183. package/esm/LinearSyntenyDisplay/index.js +19 -0
  184. package/esm/LinearSyntenyDisplay/index.js.map +1 -0
  185. package/esm/LinearSyntenyDisplay/model.d.ts +333 -0
  186. package/esm/LinearSyntenyDisplay/model.js +151 -0
  187. package/esm/LinearSyntenyDisplay/model.js.map +1 -0
  188. package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +8 -0
  189. package/esm/LinearSyntenyView/components/ExportSvgDialog.js +60 -0
  190. package/esm/LinearSyntenyView/components/ExportSvgDialog.js.map +1 -0
  191. package/esm/LinearSyntenyView/components/Icons.d.ts +4 -0
  192. package/esm/LinearSyntenyView/components/Icons.js +11 -0
  193. package/esm/LinearSyntenyView/components/Icons.js.map +1 -0
  194. package/esm/LinearSyntenyView/components/ImportCustomTrack.d.ts +11 -0
  195. package/esm/LinearSyntenyView/components/ImportCustomTrack.js +152 -0
  196. package/esm/LinearSyntenyView/components/ImportCustomTrack.js.map +1 -0
  197. package/esm/LinearSyntenyView/components/ImportForm.d.ts +6 -0
  198. package/esm/LinearSyntenyView/components/ImportForm.js +99 -0
  199. package/esm/LinearSyntenyView/components/ImportForm.js.map +1 -0
  200. package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.d.ts +9 -0
  201. package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.js +38 -0
  202. package/esm/LinearSyntenyView/components/ImportSyntenyTrackSelector.js.map +1 -0
  203. package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +7 -0
  204. package/esm/LinearSyntenyView/components/LinearSyntenyView.js +10 -0
  205. package/esm/LinearSyntenyView/components/LinearSyntenyView.js.map +1 -0
  206. package/esm/LinearSyntenyView/index.d.ts +3 -0
  207. package/esm/LinearSyntenyView/index.js +14 -0
  208. package/esm/LinearSyntenyView/index.js.map +1 -0
  209. package/esm/LinearSyntenyView/model.d.ts +754 -0
  210. package/esm/LinearSyntenyView/model.js +141 -0
  211. package/esm/LinearSyntenyView/model.js.map +1 -0
  212. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +6 -0
  213. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +7 -0
  214. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js.map +1 -0
  215. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +4 -0
  216. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +78 -0
  217. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js.map +1 -0
  218. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -0
  219. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +38 -0
  220. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js.map +1 -0
  221. package/esm/SyntenyFeatureDetail/index.d.ts +3 -0
  222. package/esm/SyntenyFeatureDetail/index.js +30 -0
  223. package/esm/SyntenyFeatureDetail/index.js.map +1 -0
  224. package/esm/SyntenyTrack/configSchema.d.ts +75 -0
  225. package/esm/SyntenyTrack/configSchema.js +14 -0
  226. package/esm/SyntenyTrack/configSchema.js.map +1 -0
  227. package/esm/SyntenyTrack/index.d.ts +3 -0
  228. package/esm/SyntenyTrack/index.js +14 -0
  229. package/esm/SyntenyTrack/index.js.map +1 -0
  230. package/esm/index.d.ts +7 -0
  231. package/esm/index.js +41 -0
  232. package/esm/index.js.map +1 -0
  233. package/esm/util.d.ts +25 -0
  234. package/esm/util.js +69 -0
  235. package/esm/util.js.map +1 -0
  236. package/package.json +67 -0
  237. package/src/LGVSyntenyDisplay/configSchemaF.ts +22 -0
  238. package/src/LGVSyntenyDisplay/index.ts +20 -0
  239. package/src/LGVSyntenyDisplay/model.ts +177 -0
  240. package/src/LaunchLinearSyntenyView.ts +86 -0
  241. package/src/LinearComparativeDisplay/configSchemaF.ts +22 -0
  242. package/src/LinearComparativeDisplay/index.ts +21 -0
  243. package/src/LinearComparativeDisplay/stateModelFactory.ts +212 -0
  244. package/src/LinearComparativeView/components/Header.tsx +103 -0
  245. package/src/LinearComparativeView/components/LinearComparativeView.tsx +152 -0
  246. package/src/LinearComparativeView/components/Rubberband.tsx +329 -0
  247. package/src/LinearComparativeView/index.ts +15 -0
  248. package/src/LinearComparativeView/model.ts +395 -0
  249. package/src/LinearReadVsRef/LinearReadVsRef.tsx +360 -0
  250. package/src/LinearReadVsRef/index.ts +58 -0
  251. package/src/LinearSyntenyDisplay/afterAttach.ts +149 -0
  252. package/src/LinearSyntenyDisplay/components/Component.tsx +75 -0
  253. package/src/LinearSyntenyDisplay/components/LinearSyntenyRendering.tsx +200 -0
  254. package/src/LinearSyntenyDisplay/components/SyntenyTooltip.tsx +82 -0
  255. package/src/LinearSyntenyDisplay/components/util.ts +142 -0
  256. package/src/LinearSyntenyDisplay/configSchemaF.ts +38 -0
  257. package/src/LinearSyntenyDisplay/drawSynteny.ts +266 -0
  258. package/src/LinearSyntenyDisplay/index.ts +21 -0
  259. package/src/LinearSyntenyDisplay/model.ts +187 -0
  260. package/src/LinearSyntenyView/components/ExportSvgDialog.tsx +148 -0
  261. package/src/LinearSyntenyView/components/Icons.tsx +24 -0
  262. package/src/LinearSyntenyView/components/ImportCustomTrack.tsx +262 -0
  263. package/src/LinearSyntenyView/components/ImportForm.tsx +221 -0
  264. package/src/LinearSyntenyView/components/ImportSyntenyTrackSelector.tsx +82 -0
  265. package/src/LinearSyntenyView/components/LinearSyntenyView.tsx +20 -0
  266. package/src/LinearSyntenyView/index.ts +15 -0
  267. package/src/LinearSyntenyView/model.test.ts +1605 -0
  268. package/src/LinearSyntenyView/model.ts +169 -0
  269. package/src/LinearSyntenyView/svgcomponents/SVGBackground.tsx +21 -0
  270. package/src/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.tsx +176 -0
  271. package/src/SyntenyFeatureDetail/SyntenyFeatureDetail.tsx +64 -0
  272. package/src/SyntenyFeatureDetail/index.ts +36 -0
  273. package/src/SyntenyTrack/configSchema.ts +23 -0
  274. package/src/SyntenyTrack/index.tsx +15 -0
  275. package/src/index.tsx +42 -0
  276. package/src/util.ts +124 -0
@@ -0,0 +1,19 @@
1
+ import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
2
+ // locals
3
+ import configSchemaF from './configSchemaF';
4
+ import stateModelFactory from './model';
5
+ import { lazy } from 'react';
6
+ export default (pluginManager) => {
7
+ pluginManager.addDisplayType(() => {
8
+ const configSchema = configSchemaF(pluginManager);
9
+ return new DisplayType({
10
+ name: 'LinearSyntenyDisplay',
11
+ configSchema,
12
+ stateModel: stateModelFactory(configSchema),
13
+ trackType: 'SyntenyTrack',
14
+ viewType: 'LinearSyntenyView',
15
+ ReactComponent: lazy(() => import('./components/Component')),
16
+ });
17
+ });
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/LinearSyntenyDisplay/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,iDAAiD,CAAA;AAGzE,SAAS;AACT,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,iBAAiB,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B,eAAe,CAAC,aAA4B,EAAE,EAAE;IAC9C,aAAa,CAAC,cAAc,CAAC,GAAG,EAAE;QAChC,MAAM,YAAY,GAAG,aAAa,CAAC,aAAa,CAAC,CAAA;QACjD,OAAO,IAAI,WAAW,CAAC;YACrB,IAAI,EAAE,sBAAsB;YAC5B,YAAY;YACZ,UAAU,EAAE,iBAAiB,CAAC,YAAY,CAAC;YAC3C,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,mBAAmB;YAC7B,cAAc,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;SAC7D,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,333 @@
1
+ /// <reference types="react" />
2
+ import { Instance } from 'mobx-state-tree';
3
+ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
4
+ import { Feature } from '@jbrowse/core/util';
5
+ interface Pos {
6
+ offsetPx: number;
7
+ }
8
+ interface FeatPos {
9
+ p11: Pos;
10
+ p12: Pos;
11
+ p21: Pos;
12
+ p22: Pos;
13
+ f: Feature;
14
+ cigar: string[];
15
+ }
16
+ /**
17
+ * #stateModel LinearSyntenyDisplay
18
+ * extends `LinearComparativeDisplay` model
19
+ */
20
+ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
21
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
22
+ type: import("mobx-state-tree").ISimpleType<string>;
23
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
24
+ } & {
25
+ type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
26
+ configuration: AnyConfigurationSchemaType;
27
+ height: import("mobx-state-tree").IType<number | undefined, number, number>;
28
+ } & {
29
+ /**
30
+ * #property
31
+ */
32
+ type: import("mobx-state-tree").ISimpleType<"LinearSyntenyDisplay">;
33
+ /**
34
+ * #property
35
+ */
36
+ configuration: AnyConfigurationSchemaType;
37
+ }, {
38
+ rendererTypeName: string;
39
+ error: unknown;
40
+ message: string | undefined;
41
+ } & {
42
+ readonly RenderingComponent: import("react").FC<{
43
+ model: {
44
+ id: string;
45
+ type: string;
46
+ rpcDriverName: string | undefined;
47
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
48
+ rendererTypeName: string;
49
+ error: unknown;
50
+ message: string | undefined;
51
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
52
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
53
+ type: import("mobx-state-tree").ISimpleType<string>;
54
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
55
+ }, {
56
+ rendererTypeName: string;
57
+ error: unknown;
58
+ message: string | undefined;
59
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
60
+ onHorizontalScroll?: Function | undefined;
61
+ blockState?: Record<string, any> | undefined;
62
+ }>;
63
+ readonly DisplayBlurb: import("react").FC<{
64
+ model: {
65
+ id: string;
66
+ type: string;
67
+ rpcDriverName: string | undefined;
68
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
69
+ rendererTypeName: string;
70
+ error: unknown;
71
+ message: string | undefined;
72
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
73
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
74
+ type: import("mobx-state-tree").ISimpleType<string>;
75
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
76
+ }, {
77
+ rendererTypeName: string;
78
+ error: unknown;
79
+ message: string | undefined;
80
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
81
+ * #action
82
+ */
83
+ }> | null;
84
+ readonly adapterConfig: any;
85
+ readonly parentTrack: any;
86
+ renderProps(): any;
87
+ readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
88
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
89
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
90
+ readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
91
+ regionCannotBeRendered(): null;
92
+ } & {
93
+ setMessage(arg?: string | undefined): void;
94
+ setError(error?: unknown): void;
95
+ setRpcDriverName(rpcDriverName: string): void;
96
+ reload(): void;
97
+ } & {
98
+ renderInProgress: AbortController | undefined;
99
+ features: Feature[] | undefined;
100
+ message: string | undefined;
101
+ } & {
102
+ renderProps(): {
103
+ rpcDriverName: string | undefined;
104
+ displayModel: {
105
+ id: string;
106
+ type: "LinearComparativeDisplay";
107
+ rpcDriverName: string | undefined;
108
+ configuration: {
109
+ [x: string]: any;
110
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
111
+ setSubschema(slotName: string, data: unknown): any;
112
+ } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
113
+ height: number;
114
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
115
+ rendererTypeName: string;
116
+ error: unknown;
117
+ message: string | undefined;
118
+ } & {
119
+ readonly RenderingComponent: import("react").FC<{
120
+ model: {
121
+ id: string;
122
+ type: string;
123
+ rpcDriverName: string | undefined;
124
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
125
+ rendererTypeName: string;
126
+ error: unknown;
127
+ message: string | undefined;
128
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
129
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
130
+ type: import("mobx-state-tree").ISimpleType<string>;
131
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
132
+ }, {
133
+ rendererTypeName: string;
134
+ error: unknown;
135
+ message: string | undefined;
136
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
137
+ onHorizontalScroll?: Function | undefined;
138
+ blockState?: Record<string, any> | undefined;
139
+ }>;
140
+ readonly DisplayBlurb: import("react").FC<{
141
+ model: {
142
+ id: string;
143
+ type: string;
144
+ rpcDriverName: string | undefined;
145
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
146
+ rendererTypeName: string;
147
+ error: unknown;
148
+ message: string | undefined;
149
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
150
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
151
+ type: import("mobx-state-tree").ISimpleType<string>;
152
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
153
+ }, {
154
+ rendererTypeName: string;
155
+ error: unknown;
156
+ message: string | undefined;
157
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
158
+ * #action
159
+ */
160
+ }> | null;
161
+ readonly adapterConfig: any;
162
+ readonly parentTrack: any;
163
+ renderProps(): any;
164
+ readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
165
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
166
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
167
+ readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
168
+ regionCannotBeRendered(): null;
169
+ } & {
170
+ setMessage(arg?: string | undefined): void;
171
+ setError(error?: unknown): void;
172
+ setRpcDriverName(rpcDriverName: string): void;
173
+ reload(): void;
174
+ } & {
175
+ renderInProgress: AbortController | undefined;
176
+ features: Feature[] | undefined;
177
+ message: string | undefined;
178
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
179
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
180
+ type: import("mobx-state-tree").ISimpleType<string>;
181
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
182
+ } & {
183
+ type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
184
+ configuration: AnyConfigurationSchemaType;
185
+ height: import("mobx-state-tree").IType<number | undefined, number, number>;
186
+ }, {
187
+ rendererTypeName: string;
188
+ error: unknown;
189
+ message: string | undefined;
190
+ } & {
191
+ readonly RenderingComponent: import("react").FC<{
192
+ model: {
193
+ id: string;
194
+ type: string;
195
+ rpcDriverName: string | undefined;
196
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
197
+ rendererTypeName: string;
198
+ error: unknown;
199
+ message: string | undefined;
200
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
201
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
202
+ type: import("mobx-state-tree").ISimpleType<string>;
203
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
204
+ }, {
205
+ rendererTypeName: string;
206
+ error: unknown;
207
+ message: string | undefined;
208
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
209
+ onHorizontalScroll?: Function | undefined;
210
+ blockState?: Record<string, any> | undefined;
211
+ }>;
212
+ readonly DisplayBlurb: import("react").FC<{
213
+ model: {
214
+ id: string;
215
+ type: string;
216
+ rpcDriverName: string | undefined;
217
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
218
+ rendererTypeName: string;
219
+ error: unknown;
220
+ message: string | undefined;
221
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
222
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
223
+ type: import("mobx-state-tree").ISimpleType<string>;
224
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
225
+ }, {
226
+ rendererTypeName: string;
227
+ error: unknown;
228
+ message: string | undefined;
229
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
230
+ * #action
231
+ */
232
+ }> | null;
233
+ readonly adapterConfig: any;
234
+ readonly parentTrack: any;
235
+ renderProps(): any;
236
+ readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
237
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
238
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
239
+ readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
240
+ regionCannotBeRendered(): null;
241
+ } & {
242
+ setMessage(arg?: string | undefined): void;
243
+ setError(error?: unknown): void;
244
+ setRpcDriverName(rpcDriverName: string): void;
245
+ reload(): void;
246
+ } & {
247
+ renderInProgress: AbortController | undefined;
248
+ features: Feature[] | undefined;
249
+ message: string | undefined;
250
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
251
+ highResolutionScaling: number;
252
+ };
253
+ } & {
254
+ setLoading(abortController: AbortController): void;
255
+ setMessage(messageText: string): void;
256
+ setRendered(args?: {
257
+ features: Feature[];
258
+ } | undefined): void;
259
+ setError(error: unknown): void;
260
+ } & {
261
+ afterAttach(): void;
262
+ } & {
263
+ mainCanvas: HTMLCanvasElement | null;
264
+ clickMapCanvas: HTMLCanvasElement | null;
265
+ cigarClickMapCanvas: HTMLCanvasElement | null;
266
+ mouseoverCanvas: HTMLCanvasElement | null;
267
+ featPositions: FeatPos[];
268
+ mouseoverId: string | undefined;
269
+ clickId: string | undefined;
270
+ cigarMouseoverId: number;
271
+ } & {
272
+ /**
273
+ * #action
274
+ */
275
+ setFeatPositions(arg: FeatPos[]): void;
276
+ /**
277
+ * #action
278
+ */
279
+ setMainCanvasRef(ref: HTMLCanvasElement | null): void;
280
+ /**
281
+ * #action
282
+ */
283
+ setClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
284
+ /**
285
+ * #action
286
+ */
287
+ setCigarClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
288
+ /**
289
+ * #action
290
+ */
291
+ setMouseoverCanvasRef(ref: HTMLCanvasElement | null): void;
292
+ /**
293
+ * #action
294
+ */
295
+ setMouseoverId(arg?: string): void;
296
+ /**
297
+ * #action
298
+ */
299
+ setCigarMouseoverId(arg: number): void;
300
+ /**
301
+ * #action
302
+ */
303
+ setClickId(arg?: string): void;
304
+ } & {
305
+ /**
306
+ * #getter
307
+ */
308
+ readonly adapterConfig: any;
309
+ /**
310
+ * #getter
311
+ */
312
+ readonly trackIds: string[];
313
+ /**
314
+ * #getter
315
+ */
316
+ readonly numFeats: number;
317
+ /**
318
+ * #getter
319
+ * used for synteny svg rendering
320
+ */
321
+ readonly ready: boolean;
322
+ /**
323
+ * #getter
324
+ */
325
+ readonly featMap: {
326
+ [k: string]: FeatPos;
327
+ };
328
+ } & {
329
+ afterAttach(): void;
330
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
331
+ export type LinearSyntenyDisplayStateModel = ReturnType<typeof stateModelFactory>;
332
+ export type LinearSyntenyDisplayModel = Instance<LinearSyntenyDisplayStateModel>;
333
+ export default stateModelFactory;
@@ -0,0 +1,151 @@
1
+ import { types } from 'mobx-state-tree';
2
+ import { getConf, ConfigurationReference, } from '@jbrowse/core/configuration';
3
+ // locals
4
+ import baseModelFactory from '../LinearComparativeDisplay/stateModelFactory';
5
+ /**
6
+ * #stateModel LinearSyntenyDisplay
7
+ * extends `LinearComparativeDisplay` model
8
+ */
9
+ function stateModelFactory(configSchema) {
10
+ return types
11
+ .compose('LinearSyntenyDisplay', baseModelFactory(configSchema), types.model({
12
+ /**
13
+ * #property
14
+ */
15
+ type: types.literal('LinearSyntenyDisplay'),
16
+ /**
17
+ * #property
18
+ */
19
+ configuration: ConfigurationReference(configSchema),
20
+ }))
21
+ .volatile(() => ({
22
+ // canvas used for drawing visible screen
23
+ mainCanvas: null,
24
+ // canvas used for drawing click map with feature ids
25
+ // this renders a unique color per alignment, so that it can be re-traced
26
+ // after a feature click with getImageData at that pixel
27
+ clickMapCanvas: null,
28
+ // canvas used for drawing click map with cigar data
29
+ // this can show if you are mousing over a insertion/deletion. it is similar
30
+ // in purpose to the clickMapRef but was not feasible to pack this into the
31
+ // clickMapRef
32
+ cigarClickMapCanvas: null,
33
+ // canvas for drawing mouseover shading
34
+ // this is separate from the other code for speed: don't have to redraw
35
+ // entire canvas to do a feature's mouseover shading
36
+ mouseoverCanvas: null,
37
+ // assigned by reaction
38
+ featPositions: [],
39
+ // currently mouse'd over feature
40
+ mouseoverId: undefined,
41
+ // currently click'd over feature
42
+ clickId: undefined,
43
+ // currently mouseover'd CIGAR subfeature
44
+ cigarMouseoverId: -1,
45
+ }))
46
+ .actions(self => ({
47
+ /**
48
+ * #action
49
+ */
50
+ setFeatPositions(arg) {
51
+ self.featPositions = arg;
52
+ },
53
+ /**
54
+ * #action
55
+ */
56
+ setMainCanvasRef(ref) {
57
+ self.mainCanvas = ref;
58
+ },
59
+ /**
60
+ * #action
61
+ */
62
+ setClickMapCanvasRef(ref) {
63
+ self.clickMapCanvas = ref;
64
+ },
65
+ /**
66
+ * #action
67
+ */
68
+ setCigarClickMapCanvasRef(ref) {
69
+ self.cigarClickMapCanvas = ref;
70
+ },
71
+ /**
72
+ * #action
73
+ */
74
+ setMouseoverCanvasRef(ref) {
75
+ self.mouseoverCanvas = ref;
76
+ },
77
+ /**
78
+ * #action
79
+ */
80
+ setMouseoverId(arg) {
81
+ self.mouseoverId = arg;
82
+ },
83
+ /**
84
+ * #action
85
+ */
86
+ setCigarMouseoverId(arg) {
87
+ self.cigarMouseoverId = arg;
88
+ },
89
+ /**
90
+ * #action
91
+ */
92
+ setClickId(arg) {
93
+ self.clickId = arg;
94
+ },
95
+ }))
96
+ .views(self => ({
97
+ /**
98
+ * #getter
99
+ */
100
+ get adapterConfig() {
101
+ return {
102
+ name: self.parentTrack.configuration.adapter.type,
103
+ assemblyNames: getConf(self, 'assemblyNames'),
104
+ ...getConf(self.parentTrack, 'adapter'),
105
+ };
106
+ },
107
+ /**
108
+ * #getter
109
+ */
110
+ get trackIds() {
111
+ return getConf(self, 'trackIds');
112
+ },
113
+ /**
114
+ * #getter
115
+ */
116
+ get numFeats() {
117
+ return self.featPositions.length;
118
+ },
119
+ /**
120
+ * #getter
121
+ * used for synteny svg rendering
122
+ */
123
+ get ready() {
124
+ return this.numFeats > 0;
125
+ },
126
+ /**
127
+ * #getter
128
+ */
129
+ get featMap() {
130
+ return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
131
+ },
132
+ }))
133
+ .actions(self => ({
134
+ afterAttach() {
135
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
136
+ ;
137
+ (async () => {
138
+ try {
139
+ const { doAfterAttach } = await import('./afterAttach');
140
+ doAfterAttach(self);
141
+ }
142
+ catch (e) {
143
+ console.error(e);
144
+ self.setError(e);
145
+ }
146
+ })();
147
+ },
148
+ }));
149
+ }
150
+ export default stateModelFactory;
151
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/LinearSyntenyDisplay/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAY,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,OAAO,EACP,sBAAsB,GAEvB,MAAM,6BAA6B,CAAA;AAGpC,SAAS;AACT,OAAO,gBAAgB,MAAM,+CAA+C,CAAA;AAe5E;;;GAGG;AACH,SAAS,iBAAiB,CAAC,YAAwC;IACjE,OAAO,KAAK;SACT,OAAO,CACN,sBAAsB,EACtB,gBAAgB,CAAC,YAAY,CAAC,EAC9B,KAAK,CAAC,KAAK,CAAC;QACV;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC;QAC3C;;WAEG;QACH,aAAa,EAAE,sBAAsB,CAAC,YAAY,CAAC;KACpD,CAAC,CACH;SACA,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QACf,yCAAyC;QACzC,UAAU,EAAE,IAAgC;QAE5C,qDAAqD;QACrD,yEAAyE;QACzE,wDAAwD;QACxD,cAAc,EAAE,IAAgC;QAEhD,oDAAoD;QACpD,4EAA4E;QAC5E,2EAA2E;QAC3E,cAAc;QACd,mBAAmB,EAAE,IAAgC;QAErD,uCAAuC;QACvC,uEAAuE;QACvE,oDAAoD;QACpD,eAAe,EAAE,IAAgC;QAEjD,uBAAuB;QACvB,aAAa,EAAE,EAAe;QAE9B,iCAAiC;QACjC,WAAW,EAAE,SAA+B;QAE5C,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QAAQ;YACV,OAAO,OAAO,CAAC,IAAI,EAAE,UAAU,CAAa,CAAA;QAC9C,CAAC;QACD;;WAEG;QACH,IAAI,QAAQ;YACV,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAA;QAClC,CAAC;QACD;;;WAGG;QACH,IAAI,KAAK;YACP,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;QAC1B,CAAC;QAED;;WAEG;QACH,IAAI,OAAO;YACT,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QACvE,CAAC;KACF,CAAC,CAAC;SACF,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,WAAW;YACT,mEAAmE;YACnE,CAAC;YAAA,CAAC,KAAK,IAAI,EAAE;gBACX,IAAI;oBACF,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAA;oBACvD,aAAa,CAAC,IAAI,CAAC,CAAA;iBACpB;gBAAC,OAAO,CAAC,EAAE;oBACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;oBAChB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;iBACjB;YACH,CAAC,CAAC,EAAE,CAAA;QACN,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC;AAOD,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ExportSvgOptions } from '../model';
3
+ export default function ExportSvgDlg({ model, handleClose, }: {
4
+ model: {
5
+ exportSvg(opts: ExportSvgOptions): Promise<void>;
6
+ };
7
+ handleClose: () => void;
8
+ }): React.JSX.Element;
@@ -0,0 +1,60 @@
1
+ import React, { useState } from 'react';
2
+ import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
3
+ import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
4
+ import { getSession, useLocalStorage } from '@jbrowse/core/util';
5
+ function LoadingMessage() {
6
+ return (React.createElement("div", null,
7
+ React.createElement(CircularProgress, { size: 20, style: { marginRight: 20 } }),
8
+ React.createElement(Typography, { display: "inline" }, "Creating SVG")));
9
+ }
10
+ function useSvgLocal(key, val) {
11
+ return useLocalStorage('svg-' + key, val);
12
+ }
13
+ export default function ExportSvgDlg({ model, handleClose, }) {
14
+ const session = getSession(model);
15
+ const offscreenCanvas = typeof OffscreenCanvas !== 'undefined';
16
+ const [rasterizeLayers, setRasterizeLayers] = useState(offscreenCanvas);
17
+ const [loading, setLoading] = useState(false);
18
+ const [filename, setFilename] = useSvgLocal('file', 'jbrowse.svg');
19
+ const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset');
20
+ const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
21
+ const [error, setError] = useState();
22
+ return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Export SVG" },
23
+ React.createElement(DialogContent, null,
24
+ error ? (React.createElement(ErrorMessage, { error: error })) : loading ? (React.createElement(LoadingMessage, null)) : null,
25
+ React.createElement(TextField, { helperText: "filename", value: filename, onChange: event => setFilename(event.target.value) }),
26
+ React.createElement("br", null),
27
+ React.createElement(TextField, { select: true, label: "Track label positioning", variant: "outlined", value: trackLabels, style: { width: 150 }, onChange: event => setTrackLabels(event.target.value) },
28
+ React.createElement(MenuItem, { value: "offset" }, "Offset"),
29
+ React.createElement(MenuItem, { value: "overlay" }, "Overlay"),
30
+ React.createElement(MenuItem, { value: "left" }, "Left"),
31
+ React.createElement(MenuItem, { value: "none" }, "None")),
32
+ React.createElement("br", null),
33
+ session.allThemes ? (React.createElement(TextField, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => setThemeName(event.target.value) }, Object.entries(session.allThemes()).map(([key, val]) => (React.createElement(MenuItem, { key: key, value: key },
34
+ // @ts-expect-error
35
+ val.name || '(Unknown name)'))))) : null,
36
+ offscreenCanvas ? (React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: rasterizeLayers, onChange: () => setRasterizeLayers(val => !val) }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (React.createElement(Typography, null, "Note: rasterizing layers not yet supported in this browser, so SVG size may be large"))),
37
+ React.createElement(DialogActions, null,
38
+ React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => handleClose() }, "Cancel"),
39
+ React.createElement(Button, { variant: "contained", color: "primary", type: "submit", onClick: async () => {
40
+ setLoading(true);
41
+ setError(undefined);
42
+ try {
43
+ await model.exportSvg({
44
+ rasterizeLayers,
45
+ filename,
46
+ themeName,
47
+ trackLabels,
48
+ });
49
+ handleClose();
50
+ }
51
+ catch (e) {
52
+ console.error(e);
53
+ setError(e);
54
+ }
55
+ finally {
56
+ setLoading(false);
57
+ }
58
+ } }, "Submit"))));
59
+ }
60
+ //# sourceMappingURL=ExportSvgDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportSvgDialog.js","sourceRoot":"","sources":["../../../src/LinearSyntenyView/components/ExportSvgDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEvD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhE,SAAS,cAAc;IACrB,OAAO,CACL;QACE,oBAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,GAAI;QAC1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C,QAAQ,IACP,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAC/C,EAEJ,KAAK,EAAC,8EAA8E,GACpF,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,UAAU,+FAGE,CACd,CACa;QAChB,oBAAC,aAAa;YACZ,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,aAGrB;YACT,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,UAAU,CAAC,IAAI,CAAC,CAAA;oBAChB,QAAQ,CAAC,SAAS,CAAC,CAAA;oBACnB,IAAI;wBACF,MAAM,KAAK,CAAC,SAAS,CAAC;4BACpB,eAAe;4BACf,QAAQ;4BACR,SAAS;4BACT,WAAW;yBACZ,CAAC,CAAA;wBACF,WAAW,EAAE,CAAA;qBACd;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;wBAChB,QAAQ,CAAC,CAAC,CAAC,CAAA;qBACZ;4BAAS;wBACR,UAAU,CAAC,KAAK,CAAC,CAAA;qBAClB;gBACH,CAAC,aAGM,CACK,CACT,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ export declare function Curves(props: SvgIconProps): React.JSX.Element;
4
+ export declare function StraightLines(props: SvgIconProps): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { SvgIcon } from '@mui/material';
3
+ export function Curves(props) {
4
+ return (React.createElement(SvgIcon, { ...props },
5
+ React.createElement("path", { fill: "currentColor", d: "M16.5,21C13.5,21 12.31,16.76 11.05,12.28C10.14,9.04 9,5 7.5,5C4.11,5 4,11.93 4,12H2C2,11.63 2.06,3 7.5,3C10.5,3 11.71,7.25 12.97,11.74C13.83,14.8 15,19 16.5,19C19.94,19 20.03,12.07 20.03,12H22.03C22.03,12.37 21.97,21 16.5,21Z" })));
6
+ }
7
+ export function StraightLines(props) {
8
+ return (React.createElement(SvgIcon, { ...props },
9
+ React.createElement("path", { fill: "currentColor", d: "M22 12L17 22L7.1 6.04L4.24 12H2L7 2L16.9 17.96L19.76 12H22Z" })));
10
+ }
11
+ //# sourceMappingURL=Icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../../src/LinearSyntenyView/components/Icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAgB,MAAM,eAAe,CAAA;AAErD,MAAM,UAAU,MAAM,CAAC,KAAmB;IACxC,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;QAChB,8BACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,mOAAmO,GACrO,CACM,CACX,CAAA;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAmB;IAC/C,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;QAChB,8BACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,6DAA6D,GAC/D,CACM,CACX,CAAA;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { SnapshotIn } from 'mobx-state-tree';
3
+ import { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
+ type Conf = SnapshotIn<AnyConfigurationModel>;
5
+ declare const OpenTrack: ({ sessionTrackData, assembly1, assembly2, setSessionTrackData, }: {
6
+ sessionTrackData: Conf;
7
+ assembly1: string;
8
+ assembly2: string;
9
+ setSessionTrackData: (arg: Conf) => void;
10
+ }) => React.JSX.Element;
11
+ export default OpenTrack;