@jbrowse/core 2.17.0 → 2.18.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 (308) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +1 -2
  2. package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -8
  3. package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +1 -1
  4. package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +1 -2
  5. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +2 -3
  6. package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +1 -1
  7. package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +2 -3
  8. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +22 -25
  9. package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -2
  10. package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +6 -8
  11. package/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +1 -1
  12. package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +1 -1
  13. package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +1 -1
  14. package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +1 -1
  15. package/BaseFeatureWidget/BaseFeatureDetail/index.js +1 -7
  16. package/BaseFeatureWidget/BaseFeatureDetail/util.js +0 -5
  17. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +2 -2
  18. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +0 -7
  19. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +2 -2
  20. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -7
  21. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +3 -3
  22. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +24 -33
  23. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +1 -2
  24. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +2 -2
  25. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +3 -4
  26. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.d.ts +2 -2
  27. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +3 -6
  28. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -1
  29. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +1 -1
  30. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +2 -2
  31. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +2 -2
  32. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +1 -2
  33. package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +2 -56
  34. package/BaseFeatureWidget/SequenceFeatureDetails/model.js +1 -56
  35. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +3 -3
  36. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.d.ts +2 -2
  37. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.js +5 -6
  38. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.d.ts +2 -2
  39. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.js +0 -1
  40. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.d.ts +2 -2
  41. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.js +0 -2
  42. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.d.ts +1 -1
  43. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +1 -3
  44. package/BaseFeatureWidget/SequenceFeatureDetails/util.js +1 -5
  45. package/BaseFeatureWidget/stateModelFactory.d.ts +2 -93
  46. package/BaseFeatureWidget/stateModelFactory.js +3 -73
  47. package/BaseFeatureWidget/types.d.ts +3 -3
  48. package/BaseFeatureWidget/util.js +0 -4
  49. package/CorePlugin.d.ts +1 -1
  50. package/CorePlugin.js +2 -5
  51. package/Plugin.d.ts +2 -5
  52. package/Plugin.js +0 -3
  53. package/PluginLoader.d.ts +1 -1
  54. package/PluginLoader.js +2 -19
  55. package/PluginManager.d.ts +15 -31
  56. package/PluginManager.js +11 -39
  57. package/ReExports/DataGrid.js +0 -1
  58. package/ReExports/list.d.ts +0 -5
  59. package/ReExports/list.js +0 -5
  60. package/ReExports/modules.d.ts +22 -20
  61. package/ReExports/modules.js +16 -25
  62. package/TextSearch/BaseResults.d.ts +3 -3
  63. package/TextSearch/TextSearchManager.d.ts +4 -16
  64. package/TextSearch/TextSearchManager.js +1 -13
  65. package/assemblyManager/assembly.d.ts +5 -100
  66. package/assemblyManager/assembly.js +27 -143
  67. package/assemblyManager/assemblyConfigSchema.d.ts +1 -34
  68. package/assemblyManager/assemblyConfigSchema.js +12 -46
  69. package/assemblyManager/assemblyManager.d.ts +7 -57
  70. package/assemblyManager/assemblyManager.js +2 -57
  71. package/configuration/configurationSchema.d.ts +4 -4
  72. package/configuration/configurationSchema.js +2 -14
  73. package/configuration/configurationSlot.d.ts +1 -12
  74. package/configuration/configurationSlot.js +2 -32
  75. package/configuration/index.d.ts +2 -2
  76. package/configuration/index.js +2 -2
  77. package/configuration/types.d.ts +2 -3
  78. package/configuration/util.d.ts +1 -25
  79. package/configuration/util.js +19 -56
  80. package/data_adapters/BaseAdapter/BaseAdapter.d.ts +4 -14
  81. package/data_adapters/BaseAdapter/BaseAdapter.js +1 -10
  82. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +5 -114
  83. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +3 -79
  84. package/data_adapters/BaseAdapter/BaseOptions.d.ts +2 -2
  85. package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +2 -2
  86. package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +3 -6
  87. package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +3 -3
  88. package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +3 -3
  89. package/data_adapters/BaseAdapter/index.d.ts +4 -4
  90. package/data_adapters/BaseAdapter/types.d.ts +2 -2
  91. package/data_adapters/BaseAdapter/util.d.ts +6 -6
  92. package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +1 -1
  93. package/data_adapters/CytobandAdapter/CytobandAdapter.js +1 -2
  94. package/data_adapters/CytobandAdapter/configSchema.d.ts +0 -3
  95. package/data_adapters/CytobandAdapter/configSchema.js +1 -7
  96. package/data_adapters/CytobandAdapter/index.d.ts +1 -1
  97. package/data_adapters/CytobandAdapter/index.js +1 -1
  98. package/data_adapters/dataAdapterCache.d.ts +4 -21
  99. package/data_adapters/dataAdapterCache.js +0 -19
  100. package/package.json +3 -4
  101. package/pluggableElementTypes/AdapterType.d.ts +2 -2
  102. package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
  103. package/pluggableElementTypes/ConnectionType.d.ts +3 -3
  104. package/pluggableElementTypes/DisplayType.d.ts +3 -9
  105. package/pluggableElementTypes/InternetAccountType.d.ts +2 -2
  106. package/pluggableElementTypes/PluggableElementBase.d.ts +1 -1
  107. package/pluggableElementTypes/PluggableElementBase.js +2 -2
  108. package/pluggableElementTypes/RpcMethodType.d.ts +5 -11
  109. package/pluggableElementTypes/RpcMethodType.js +7 -19
  110. package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +9 -0
  111. package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.js +35 -0
  112. package/pluggableElementTypes/TextSearchAdapterType.d.ts +2 -2
  113. package/pluggableElementTypes/TrackType.d.ts +3 -3
  114. package/pluggableElementTypes/ViewType.d.ts +3 -3
  115. package/pluggableElementTypes/WidgetType.d.ts +4 -3
  116. package/pluggableElementTypes/index.d.ts +11 -11
  117. package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -29
  118. package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -28
  119. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -83
  120. package/pluggableElementTypes/models/BaseDisplayModel.js +2 -69
  121. package/pluggableElementTypes/models/BaseTrackModel.d.ts +4 -46
  122. package/pluggableElementTypes/models/BaseTrackModel.js +0 -58
  123. package/pluggableElementTypes/models/BaseViewModel.d.ts +2 -42
  124. package/pluggableElementTypes/models/BaseViewModel.js +2 -38
  125. package/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -119
  126. package/pluggableElementTypes/models/InternetAccountModel.js +3 -123
  127. package/pluggableElementTypes/models/baseConnectionConfig.d.ts +0 -6
  128. package/pluggableElementTypes/models/baseConnectionConfig.js +1 -13
  129. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +0 -15
  130. package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -23
  131. package/pluggableElementTypes/models/baseTrackConfig.d.ts +2 -53
  132. package/pluggableElementTypes/models/baseTrackConfig.js +1 -58
  133. package/pluggableElementTypes/renderers/BoxRendererType.d.ts +7 -15
  134. package/pluggableElementTypes/renderers/BoxRendererType.js +3 -14
  135. package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +3 -2
  136. package/pluggableElementTypes/renderers/CircularChordRendererType.js +1 -6
  137. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +6 -21
  138. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -25
  139. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -47
  140. package/pluggableElementTypes/renderers/FeatureRendererType.js +15 -68
  141. package/pluggableElementTypes/renderers/RendererType.d.ts +4 -8
  142. package/pluggableElementTypes/renderers/RendererType.js +1 -5
  143. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -2
  144. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +3 -12
  145. package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
  146. package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +6 -14
  147. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +9 -49
  148. package/pluggableElementTypes/renderers/ServerSideRendererType.js +7 -57
  149. package/pluggableElementTypes/renderers/index.d.ts +1 -1
  150. package/pluggableElementTypes/renderers/util/serializableFilterChain.js +1 -3
  151. package/rpc/BaseRpcDriver.d.ts +3 -4
  152. package/rpc/BaseRpcDriver.js +20 -80
  153. package/rpc/MainThreadRpcDriver.d.ts +3 -7
  154. package/rpc/MainThreadRpcDriver.js +0 -5
  155. package/rpc/RpcManager.d.ts +3 -3
  156. package/rpc/RpcManager.js +2 -4
  157. package/rpc/WebWorkerRpcDriver.d.ts +3 -2
  158. package/rpc/WebWorkerRpcDriver.js +2 -13
  159. package/rpc/baseRpcConfig.d.ts +0 -3
  160. package/rpc/baseRpcConfig.js +1 -7
  161. package/rpc/configSchema.d.ts +0 -6
  162. package/rpc/configSchema.js +2 -11
  163. package/rpc/mainThreadRpcConfig.js +1 -7
  164. package/rpc/methods/CoreFreeResources.d.ts +0 -6
  165. package/rpc/methods/CoreFreeResources.js +2 -9
  166. package/rpc/methods/CoreGetFeatureDensityStats.d.ts +4 -5
  167. package/rpc/methods/CoreGetFeatureDensityStats.js +1 -1
  168. package/rpc/methods/CoreGetFeatureDetails.d.ts +2 -7
  169. package/rpc/methods/CoreGetFeatureDetails.js +0 -5
  170. package/rpc/methods/CoreGetFeatures.d.ts +5 -5
  171. package/rpc/methods/CoreGetFeatures.js +4 -5
  172. package/rpc/methods/CoreGetFileInfo.d.ts +1 -2
  173. package/rpc/methods/CoreGetFileInfo.js +1 -1
  174. package/rpc/methods/CoreGetMetadata.d.ts +1 -2
  175. package/rpc/methods/CoreGetMetadata.js +1 -1
  176. package/rpc/methods/CoreGetRefNames.d.ts +1 -2
  177. package/rpc/methods/CoreGetRefNames.js +1 -1
  178. package/rpc/methods/CoreRender.d.ts +2 -6
  179. package/rpc/methods/CoreRender.js +5 -7
  180. package/rpc/methods/util.d.ts +3 -3
  181. package/rpc/methods/util.js +0 -1
  182. package/rpc/webWorkerRpcConfig.js +1 -7
  183. package/stories/JBrowseCore.stories.d.ts +1 -1
  184. package/stories/JBrowseCore.stories.js +3 -3
  185. package/stories/examples/WithSequencePanel.d.ts +1 -1
  186. package/stories/examples/WithSequencePanel.js +3 -3
  187. package/tsconfig.build.tsbuildinfo +1 -1
  188. package/ui/AppLogo.d.ts +1 -1
  189. package/ui/AppLogo.js +0 -2
  190. package/ui/AssemblySelector.d.ts +2 -2
  191. package/ui/AssemblySelector.js +0 -3
  192. package/ui/BaseTooltip.js +2 -6
  193. package/ui/CascadingMenu.d.ts +2 -2
  194. package/ui/CascadingMenu.js +3 -4
  195. package/ui/CascadingMenuButton.d.ts +1 -1
  196. package/ui/CascadingMenuButton.js +1 -1
  197. package/ui/ColorPicker.js +1 -7
  198. package/ui/Dialog.d.ts +1 -1
  199. package/ui/Dialog.js +2 -6
  200. package/ui/DropDownMenu.d.ts +1 -1
  201. package/ui/DropDownMenu.js +2 -2
  202. package/ui/EditableTypography.d.ts +1 -1
  203. package/ui/EditableTypography.js +1 -5
  204. package/ui/ErrorBoundary.d.ts +2 -1
  205. package/ui/ErrorMessage.js +2 -9
  206. package/ui/ErrorMessageStackTraceDialog.js +2 -10
  207. package/ui/FactoryResetDialog.js +1 -1
  208. package/ui/FatalErrorDialog.js +1 -1
  209. package/ui/FileSelector/FileSelector.d.ts +4 -3
  210. package/ui/FileSelector/FileSelector.js +40 -40
  211. package/ui/FileSelector/LocalFileChooser.d.ts +1 -1
  212. package/ui/FileSelector/LocalFileChooser.js +0 -1
  213. package/ui/FileSelector/UrlChooser.d.ts +4 -3
  214. package/ui/FileSelector/UrlChooser.js +5 -3
  215. package/ui/Icons.d.ts +1 -1
  216. package/ui/Icons.js +1 -7
  217. package/ui/LoadingEllipses.d.ts +1 -1
  218. package/ui/LoadingEllipses.js +3 -3
  219. package/ui/Menu.d.ts +1 -1
  220. package/ui/Menu.js +3 -10
  221. package/ui/MenuButton.d.ts +1 -1
  222. package/ui/ResizeHandle.js +2 -2
  223. package/ui/ReturnToImportFormDialog.js +1 -1
  224. package/ui/SanitizedHTML.js +1 -21
  225. package/ui/Snackbar.d.ts +2 -2
  226. package/ui/Snackbar.js +1 -2
  227. package/ui/SnackbarModel.d.ts +1 -26
  228. package/ui/SnackbarModel.js +2 -30
  229. package/ui/colors.d.ts +1 -1
  230. package/ui/colors.js +1 -1
  231. package/ui/react-colorful.js +0 -3
  232. package/ui/theme.d.ts +1 -1
  233. package/ui/theme.js +0 -40
  234. package/util/Base1DUtils.d.ts +1 -1
  235. package/util/Base1DUtils.js +0 -12
  236. package/util/Base1DViewModel.d.ts +4 -81
  237. package/util/Base1DViewModel.js +4 -108
  238. package/util/QuickLRU.js +0 -9
  239. package/util/TimeTraveller.js +0 -4
  240. package/util/aborting.d.ts +0 -20
  241. package/util/aborting.js +0 -31
  242. package/util/analytics.js +1 -12
  243. package/util/blockTypes.d.ts +0 -11
  244. package/util/blockTypes.js +0 -13
  245. package/util/calculateDynamicBlocks.d.ts +1 -20
  246. package/util/calculateDynamicBlocks.js +1 -22
  247. package/util/calculateStaticBlocks.d.ts +2 -2
  248. package/util/calculateStaticBlocks.js +0 -2
  249. package/util/color/cssColorsLevel4.js +0 -1
  250. package/util/color/index.d.ts +0 -19
  251. package/util/color/index.js +0 -30
  252. package/util/compositeMap.js +0 -2
  253. package/util/dedupe.js +0 -1
  254. package/util/formatFastaStrings.d.ts +0 -13
  255. package/util/formatFastaStrings.js +0 -13
  256. package/util/idMaker.d.ts +1 -1
  257. package/util/idMaker.js +16 -12
  258. package/util/index.d.ts +16 -164
  259. package/util/index.js +22 -282
  260. package/util/io/RemoteFileWithRangeCache.d.ts +3 -2
  261. package/util/io/RemoteFileWithRangeCache.js +6 -10
  262. package/util/io/index.d.ts +3 -4
  263. package/util/io/index.js +3 -17
  264. package/util/jexl.js +3 -13
  265. package/util/jexlStrings.d.ts +0 -6
  266. package/util/jexlStrings.js +0 -8
  267. package/util/layouts/BaseLayout.d.ts +1 -1
  268. package/util/layouts/GranularRectLayout.d.ts +1 -17
  269. package/util/layouts/GranularRectLayout.js +4 -81
  270. package/util/layouts/MultiLayout.d.ts +1 -6
  271. package/util/layouts/MultiLayout.js +0 -6
  272. package/util/layouts/PrecomputedLayout.d.ts +1 -4
  273. package/util/layouts/PrecomputedLayout.js +0 -5
  274. package/util/layouts/PrecomputedMultiLayout.js +0 -2
  275. package/util/layouts/SceneGraph.d.ts +0 -12
  276. package/util/layouts/SceneGraph.js +0 -13
  277. package/util/makeAbortableReaction.d.ts +2 -0
  278. package/util/makeAbortableReaction.js +50 -0
  279. package/util/map-obj.js +0 -4
  280. package/util/mst-reflection.d.ts +1 -14
  281. package/util/mst-reflection.js +1 -28
  282. package/util/nanoid.js +0 -31
  283. package/util/nextTick.d.ts +1 -0
  284. package/util/nextTick.js +6 -0
  285. package/util/offscreenCanvasPonyfill.d.ts +0 -1
  286. package/util/offscreenCanvasPonyfill.js +1 -9
  287. package/util/offscreenCanvasUtils.js +1 -8
  288. package/util/range.d.ts +0 -25
  289. package/util/range.js +0 -34
  290. package/util/rxjs.d.ts +3 -7
  291. package/util/rxjs.js +2 -9
  292. package/util/simpleFeature.d.ts +0 -50
  293. package/util/simpleFeature.js +0 -35
  294. package/util/stats.d.ts +3 -26
  295. package/util/stats.js +0 -25
  296. package/util/stopToken.d.ts +3 -0
  297. package/util/stopToken.js +29 -0
  298. package/util/tracks.d.ts +3 -25
  299. package/util/tracks.js +0 -30
  300. package/util/types/index.d.ts +14 -30
  301. package/util/types/index.js +5 -14
  302. package/util/types/mst.js +0 -9
  303. package/util/types/util.d.ts +2 -9
  304. package/util/useMeasure.js +0 -1
  305. package/util/when.d.ts +1 -15
  306. package/util/when.js +3 -70
  307. package/rpc/remoteAbortSignals.d.ts +0 -36
  308. package/rpc/remoteAbortSignals.js +0 -79
@@ -4,42 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const mobx_state_tree_1 = require("mobx-state-tree");
7
- const index_1 = require("./index");
8
- const mst_1 = require("./types/mst");
7
+ const Base1DUtils_1 = require("./Base1DUtils");
9
8
  const calculateDynamicBlocks_1 = __importDefault(require("./calculateDynamicBlocks"));
10
9
  const calculateStaticBlocks_1 = __importDefault(require("./calculateStaticBlocks"));
11
- const Base1DUtils_1 = require("./Base1DUtils");
12
- /**
13
- * #stateModel Base1DView
14
- * used in non-lgv view representations of a 1d view e.g. the two axes of the
15
- * dotplot use this
16
- */
17
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
10
+ const index_1 = require("./index");
11
+ const mst_1 = require("./types/mst");
12
+ function x() { }
18
13
  const Base1DView = mobx_state_tree_1.types
19
14
  .model('Base1DView', {
20
- /**
21
- * #property
22
- */
23
15
  id: mst_1.ElementId,
24
- /**
25
- * #property
26
- */
27
16
  displayedRegions: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.frozen(), []),
28
- /**
29
- * #property
30
- */
31
17
  bpPerPx: 0,
32
- /**
33
- * #property
34
- */
35
18
  offsetPx: 0,
36
- /**
37
- * #property
38
- */
39
19
  interRegionPaddingWidth: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
40
- /**
41
- * #property
42
- */
43
20
  minimumBlockWidth: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
44
21
  })
45
22
  .volatile(() => ({
@@ -47,133 +24,72 @@ const Base1DView = mobx_state_tree_1.types
47
24
  volatileWidth: 0,
48
25
  }))
49
26
  .actions(self => ({
50
- /**
51
- * #action
52
- */
53
27
  setDisplayedRegions(regions) {
54
28
  self.displayedRegions = (0, mobx_state_tree_1.cast)(regions);
55
29
  },
56
- /**
57
- * #action
58
- */
59
30
  setBpPerPx(val) {
60
31
  self.bpPerPx = val;
61
32
  },
62
- /**
63
- * #action
64
- */
65
33
  setVolatileWidth(width) {
66
34
  self.volatileWidth = width;
67
35
  },
68
36
  }))
69
37
  .views(self => ({
70
- /**
71
- * #getter
72
- */
73
38
  get width() {
74
39
  return self.volatileWidth;
75
40
  },
76
- /**
77
- * #getter
78
- */
79
41
  get assemblyNames() {
80
42
  return [...new Set(self.displayedRegions.map(r => r.assemblyName))];
81
43
  },
82
- /**
83
- * #getter
84
- */
85
44
  get displayedRegionsTotalPx() {
86
45
  return this.totalBp / self.bpPerPx;
87
46
  },
88
- /**
89
- * #getter
90
- */
91
47
  get maxOffset() {
92
- // objectively determined to keep the linear genome on the main screen
93
48
  const leftPadding = 10;
94
49
  return this.displayedRegionsTotalPx - leftPadding;
95
50
  },
96
- /**
97
- * #getter
98
- */
99
51
  get minOffset() {
100
- // objectively determined to keep the linear genome on the main screen
101
52
  const rightPadding = 30;
102
53
  return -this.width + rightPadding;
103
54
  },
104
- /**
105
- * #getter
106
- */
107
55
  get totalBp() {
108
56
  return (0, index_1.sum)(self.displayedRegions.map(a => a.end - a.start));
109
57
  },
110
58
  }))
111
59
  .views(self => ({
112
- /**
113
- * #getter
114
- */
115
60
  get dynamicBlocks() {
116
61
  return (0, calculateDynamicBlocks_1.default)(self);
117
62
  },
118
- /**
119
- * #getter
120
- */
121
63
  get staticBlocks() {
122
64
  return (0, calculateStaticBlocks_1.default)(self);
123
65
  },
124
- /**
125
- * #getter
126
- */
127
66
  get currBp() {
128
67
  return (0, index_1.sum)(this.dynamicBlocks.map(a => a.end - a.start));
129
68
  },
130
69
  }))
131
70
  .views(self => ({
132
- /**
133
- * #method
134
- */
135
71
  pxToBp(px) {
136
72
  return (0, Base1DUtils_1.pxToBp)(self, px);
137
73
  },
138
- /**
139
- * #method
140
- */
141
74
  bpToPx({ refName, coord, regionNumber, }) {
142
75
  var _a;
143
76
  return (_a = (0, Base1DUtils_1.bpToPx)({ refName, coord, regionNumber, self })) === null || _a === void 0 ? void 0 : _a.offsetPx;
144
77
  },
145
78
  }))
146
79
  .actions(self => ({
147
- /**
148
- * #action
149
- */
150
80
  setFeatures(features) {
151
81
  self.features = features;
152
82
  },
153
- /**
154
- * #action
155
- * this makes a zoomed out view that shows all displayedRegions that makes
156
- * the overview bar square with the scale bar
157
- */
158
83
  showAllRegions() {
159
84
  self.bpPerPx = self.totalBp / self.width;
160
85
  self.offsetPx = 0;
161
86
  },
162
- /**
163
- * #action
164
- */
165
87
  zoomOut() {
166
88
  this.zoomTo(self.bpPerPx * 2);
167
89
  },
168
- /**
169
- * #action
170
- */
171
90
  zoomIn() {
172
91
  this.zoomTo(self.bpPerPx / 2);
173
92
  },
174
- /**
175
- * #action
176
- */
177
93
  zoomTo(bpPerPx, offset = self.width / 2) {
178
94
  const newBpPerPx = (0, index_1.clamp)(bpPerPx, 'minBpPerPx' in self ? self.minBpPerPx : 0, 'maxBpPerPx' in self
179
95
  ? self.maxBpPerPx
@@ -183,22 +99,14 @@ const Base1DView = mobx_state_tree_1.types
183
99
  return oldBpPerPx;
184
100
  }
185
101
  self.bpPerPx = newBpPerPx;
186
- // tweak the offset so that the center of the view remains at the same
187
- // coordinate
188
102
  self.offsetPx = (0, index_1.clamp)(Math.round(((self.offsetPx + offset) * oldBpPerPx) / newBpPerPx - offset), self.minOffset, self.maxOffset);
189
103
  return self.bpPerPx;
190
104
  },
191
- /**
192
- * #action
193
- */
194
105
  scrollTo(offsetPx) {
195
106
  const newOffsetPx = (0, index_1.clamp)(offsetPx, self.minOffset, self.maxOffset);
196
107
  self.offsetPx = newOffsetPx;
197
108
  return newOffsetPx;
198
109
  },
199
- /**
200
- * #action
201
- */
202
110
  centerAt(coord, refName, regionNumber) {
203
111
  if (!refName) {
204
112
  return;
@@ -212,10 +120,6 @@ const Base1DView = mobx_state_tree_1.types
212
120
  this.scrollTo(Math.round(centerPx - self.width / 2));
213
121
  }
214
122
  },
215
- /**
216
- * #action
217
- * note: the scroll is clamped to keep the view on the main screen
218
- */
219
123
  scroll(distance) {
220
124
  const oldOffsetPx = self.offsetPx;
221
125
  const newOffsetPx = (0, index_1.clamp)(self.offsetPx + distance, self.minOffset, self.maxOffset);
@@ -224,14 +128,6 @@ const Base1DView = mobx_state_tree_1.types
224
128
  },
225
129
  }))
226
130
  .actions(self => ({
227
- /**
228
- * #action
229
- * offset is the base-pair-offset in the displayed region, index is the
230
- * index of the displayed region in the linear genome view
231
- *
232
- * @param start - object as `{start, end, offset, index}`
233
- * @param end - object as `{start, end, offset, index}`
234
- */
235
131
  moveTo(start, end) {
236
132
  (0, Base1DUtils_1.moveTo)(self, start, end);
237
133
  },
package/util/QuickLRU.js CHANGED
@@ -1,12 +1,5 @@
1
1
  "use strict";
2
- // vendored from quick-lru@6.1.1, didn't like being compiled as a 'pure-esm' nodejs dependency
3
- // the license is reproduced below https://github.com/sindresorhus/quick-lru/blob/main/license
4
- // MIT License
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- // Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
7
- // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
- // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
3
  class QuickLRU extends Map {
11
4
  constructor(options = {}) {
12
5
  super();
@@ -16,7 +9,6 @@ class QuickLRU extends Map {
16
9
  if (typeof options.maxAge === 'number' && options.maxAge === 0) {
17
10
  throw new TypeError('`maxAge` must be a number greater than 0');
18
11
  }
19
- // TODO: Use private class fields when ESLint supports them.
20
12
  this.maxSize = options.maxSize;
21
13
  this.maxAge = options.maxAge || Number.POSITIVE_INFINITY;
22
14
  this.onEviction = options.onEviction;
@@ -24,7 +16,6 @@ class QuickLRU extends Map {
24
16
  this.oldCache = new Map();
25
17
  this._size = 0;
26
18
  }
27
- // TODO: Use private class methods when targeting Node.js 16.
28
19
  _emitEvictions(cache) {
29
20
  if (typeof this.onEviction !== 'function') {
30
21
  return;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // adapted from https://github.com/mobxjs/mobx-state-tree/blob/master/packages/mst-middlewares/src/time-traveller.ts
4
3
  const mobx_state_tree_1 = require("mobx-state-tree");
5
4
  const MAX_HISTORY_LENGTH = 20;
6
5
  function debounce(func, timeout = 300) {
@@ -34,11 +33,9 @@ const TimeTraveller = mobx_state_tree_1.types
34
33
  let snapshotDisposer;
35
34
  let skipNextUndoState = false;
36
35
  return {
37
- // allows user code to (temporarily) stop tracking undo states
38
36
  stopTrackingUndo() {
39
37
  self.notTrackingUndo = true;
40
38
  },
41
- // allows user code to resume tracking undo states
42
39
  resumeTrackingUndo() {
43
40
  self.notTrackingUndo = false;
44
41
  },
@@ -47,7 +44,6 @@ const TimeTraveller = mobx_state_tree_1.types
47
44
  return;
48
45
  }
49
46
  if (skipNextUndoState) {
50
- // skip recording if this state was caused by undo / redo
51
47
  skipNextUndoState = false;
52
48
  return;
53
49
  }
@@ -2,29 +2,9 @@ import { Observable } from 'rxjs';
2
2
  declare class AbortError extends Error {
3
3
  code: string | undefined;
4
4
  }
5
- /**
6
- * properly check if the given AbortSignal is aborted.
7
- * per the standard, if the signal reads as aborted,
8
- * this function throws either a DOMException AbortError, or a regular error
9
- * with a `code` attribute set to `ERR_ABORTED`.
10
- *
11
- * for convenience, passing `undefined` is a no-op
12
- *
13
- * @param signal -
14
- * @returns nothing
15
- */
16
5
  export declare function checkAbortSignal(signal?: AbortSignal): void;
17
- /**
18
- * Skips to the next tick, then runs `checkAbortSignal`.
19
- * Await this to inside an otherwise synchronous loop to
20
- * provide a place to break when an abort signal is received.
21
- */
22
6
  export declare function abortBreakPoint(signal?: AbortSignal): Promise<void>;
23
7
  export declare function makeAbortError(): AbortError | DOMException;
24
8
  export declare function observeAbortSignal(signal?: AbortSignal): Observable<Event>;
25
- /**
26
- * check if the given exception was caused by an operation being intentionally aborted
27
- * @param exception -
28
- */
29
9
  export declare function isAbortException(exception: unknown): boolean;
30
10
  export {};
package/util/aborting.js CHANGED
@@ -8,17 +8,6 @@ exports.isAbortException = isAbortException;
8
8
  const rxjs_1 = require("rxjs");
9
9
  class AbortError extends Error {
10
10
  }
11
- /**
12
- * properly check if the given AbortSignal is aborted.
13
- * per the standard, if the signal reads as aborted,
14
- * this function throws either a DOMException AbortError, or a regular error
15
- * with a `code` attribute set to `ERR_ABORTED`.
16
- *
17
- * for convenience, passing `undefined` is a no-op
18
- *
19
- * @param signal -
20
- * @returns nothing
21
- */
22
11
  function checkAbortSignal(signal) {
23
12
  if (!signal) {
24
13
  return;
@@ -33,16 +22,7 @@ function checkAbortSignal(signal) {
33
22
  function timeout(ms) {
34
23
  return new Promise(resolve => setTimeout(resolve, ms));
35
24
  }
36
- /**
37
- * Skips to the next tick, then runs `checkAbortSignal`.
38
- * Await this to inside an otherwise synchronous loop to
39
- * provide a place to break when an abort signal is received.
40
- */
41
25
  async function abortBreakPoint(signal) {
42
- // it was observed that an actual timeout is needed to get the aborting (wrap
43
- // hicrenderer in a try catch, console.error the error, and rethrow the error
44
- // to see). using await Promise.resolve() did not appear to allow aborting to
45
- // occur
46
26
  await timeout(1);
47
27
  checkAbortSignal(signal);
48
28
  }
@@ -60,20 +40,9 @@ function observeAbortSignal(signal) {
60
40
  }
61
41
  return (0, rxjs_1.fromEvent)(signal, 'abort');
62
42
  }
63
- /**
64
- * check if the given exception was caused by an operation being intentionally aborted
65
- * @param exception -
66
- */
67
43
  function isAbortException(exception) {
68
44
  return (exception instanceof Error &&
69
- // DOMException
70
45
  (exception.name === 'AbortError' ||
71
- // standard-ish non-DOM abort exception
72
46
  exception.code === 'ERR_ABORTED' ||
73
- // message contains aborted for bubbling through RPC
74
- // things we have seen that we want to catch here
75
- // Error: aborted
76
- // AbortError: aborted
77
- // AbortError: The user aborted a request.
78
47
  !!/\b(aborted|aborterror)\b/i.test(exception.message)));
79
48
  }
package/util/analytics.js CHANGED
@@ -12,7 +12,6 @@ async function writeAWSAnalytics(rootModel, initialTimeStamp, sessionQuery) {
12
12
  const savedSessionCount = Object.keys(localStorage).filter(name => name.includes('localSaved-')).length;
13
13
  const { jbrowse: config, session, version: ver } = rootModel;
14
14
  const { tracks, assemblies, plugins } = config;
15
- // stats to be recorded in db
16
15
  const stats = {
17
16
  ver,
18
17
  'plugins-count': (plugins === null || plugins === void 0 ? void 0 : plugins.length) || 0,
@@ -23,29 +22,23 @@ async function writeAWSAnalytics(rootModel, initialTimeStamp, sessionQuery) {
23
22
  'open-views': (session === null || session === void 0 ? void 0 : session.views.length) || 0,
24
23
  'synteny-tracks-count': multiAssemblyTracks,
25
24
  'saved-sessions-count': savedSessionCount,
26
- // field if existing session param in query before autogenerated param
27
25
  'existing-session-param-type': (sessionQuery === null || sessionQuery === void 0 ? void 0 : sessionQuery.split('-')[0]) || 'none',
28
- // screen geometry
29
26
  'scn-h': window.screen.height,
30
27
  'scn-w': window.screen.width,
31
- // window geometry
32
28
  'win-h': window.innerHeight,
33
29
  'win-w': window.innerWidth,
34
30
  electron: util_1.isElectron,
35
31
  loadTime: (Date.now() - initialTimeStamp) / 1000,
36
32
  jb2: true,
37
33
  };
38
- // stringifies the track type counts, gets processed in lambda
39
34
  tracks.forEach((track) => {
40
35
  const key = `track-types-${track.type}`;
41
36
  stats[key] = stats[key] + 1 || 1;
42
37
  });
43
- // stringifies the session track type counts, gets processed in lambda
44
38
  session === null || session === void 0 ? void 0 : session.sessionTracks.forEach((track) => {
45
39
  const key = `sessionTrack-types-${track.type}`;
46
40
  stats[key] = stats[key] + 1 || 1;
47
41
  });
48
- // put stats into a query string for get request
49
42
  const qs = Object.keys(stats)
50
43
  .map(key => `${key}=${stats[key]}`)
51
44
  .join('&');
@@ -59,13 +52,12 @@ async function writeGAAnalytics(rootModel, initialTimestamp) {
59
52
  var _a;
60
53
  const jbrowseUser = 'UA-7115575-5';
61
54
  const stats = {
62
- 'tracks-count': rootModel.jbrowse.tracks.length, // this is all possible tracks
55
+ 'tracks-count': rootModel.jbrowse.tracks.length,
63
56
  ver: rootModel.version,
64
57
  electron: util_1.isElectron,
65
58
  loadTime: Date.now() - initialTimestamp,
66
59
  pluginNames: ((_a = rootModel.jbrowse.plugins) === null || _a === void 0 ? void 0 : _a.map((plugin) => plugin.name)) || '',
67
60
  };
68
- // create script
69
61
  let analyticsScript = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){";
70
62
  analyticsScript +=
71
63
  '(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),';
@@ -88,10 +80,7 @@ async function writeGAAnalytics(rootModel, initialTimestamp) {
88
80
  function doAnalytics(rootModel, initialTimestamp, initialSessionQuery) {
89
81
  if (rootModel &&
90
82
  !(0, configuration_1.readConfObject)(rootModel.jbrowse.configuration, 'disableAnalytics')) {
91
- // ok if these are unhandled
92
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
93
83
  writeAWSAnalytics(rootModel, initialTimestamp, initialSessionQuery);
94
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
95
84
  writeGAAnalytics(rootModel, initialTimestamp);
96
85
  }
97
86
  }
@@ -33,9 +33,6 @@ export declare class BaseBlock {
33
33
  widthPx: number;
34
34
  variant?: string;
35
35
  isLeftEndOfDisplayedRegion?: boolean;
36
- /**
37
- * a block that should be shown as filled with data
38
- */
39
36
  constructor(data: Record<string, any>);
40
37
  toRegion(): {
41
38
  refName: string;
@@ -48,10 +45,6 @@ export declare class BaseBlock {
48
45
  export declare class ContentBlock extends BaseBlock {
49
46
  type: string;
50
47
  }
51
- /**
52
- * marker block representing one or more blocks that are
53
- * too small to be shown at the current zoom level
54
- */
55
48
  export declare class ElidedBlock extends BaseBlock {
56
49
  type: string;
57
50
  widthPx: number;
@@ -59,10 +52,6 @@ export declare class ElidedBlock extends BaseBlock {
59
52
  constructor(data: Record<string, any>);
60
53
  push(otherBlock: ElidedBlock): void;
61
54
  }
62
- /**
63
- * marker block that sits between two different displayed regions
64
- * and provides a thick border between them
65
- */
66
55
  export declare class InterRegionPaddingBlock extends BaseBlock {
67
56
  type: string;
68
57
  }
@@ -24,11 +24,9 @@ class BlockSet {
24
24
  return this.blocks.map(block => block.toRegion());
25
25
  }
26
26
  map(func, thisarg) {
27
- // eslint-disable-next-line unicorn/no-array-method-this-argument
28
27
  return this.blocks.map(func, thisarg);
29
28
  }
30
29
  forEach(func, thisarg) {
31
- // eslint-disable-next-line unicorn/no-array-method-this-argument
32
30
  this.blocks.forEach(func, thisarg);
33
31
  }
34
32
  get length() {
@@ -58,9 +56,6 @@ class BlockSet {
58
56
  }
59
57
  exports.BlockSet = BlockSet;
60
58
  class BaseBlock {
61
- /**
62
- * a block that should be shown as filled with data
63
- */
64
59
  constructor(data) {
65
60
  this.type = 'BaseBlock';
66
61
  this.widthPx = 0;
@@ -90,10 +85,6 @@ class ContentBlock extends BaseBlock {
90
85
  }
91
86
  }
92
87
  exports.ContentBlock = ContentBlock;
93
- /**
94
- * marker block representing one or more blocks that are
95
- * too small to be shown at the current zoom level
96
- */
97
88
  class ElidedBlock extends BaseBlock {
98
89
  constructor(data) {
99
90
  super(data);
@@ -110,10 +101,6 @@ class ElidedBlock extends BaseBlock {
110
101
  }
111
102
  }
112
103
  exports.ElidedBlock = ElidedBlock;
113
- /**
114
- * marker block that sits between two different displayed regions
115
- * and provides a thick border between them
116
- */
117
104
  class InterRegionPaddingBlock extends BaseBlock {
118
105
  constructor() {
119
106
  super(...arguments);
@@ -1,22 +1,3 @@
1
1
  import { BlockSet } from './blockTypes';
2
- import { Base1DViewModel } from './calculateStaticBlocks';
3
- /**
4
- * returns a BlockSet of which the `blocks` attribute is an array of 'dynamic
5
- * blocks', which are blocks representing only the regions that are visible in
6
- * the view right now. these are mostly used by tracks for which static blocks
7
- * are not feasible.
8
- *
9
- * each block is a plain JS object like:
10
- * `{ refName, start, end, offsetPx, reversed? }`
11
- *
12
- * start and end are in bp, and start is always less than end, but if reversed
13
- * is true, startBp will be on the right side of the visible region.
14
- *
15
- * offsetPx is the number of pixels from the left edge of the view to the left
16
- * edge of the region
17
- *
18
- * NOTE: start, end, and offsetPx may all be fractional!
19
- *
20
- * @returns BlockSet of `{ refName, startBp, end, offset, reversed? }`
21
- */
2
+ import type { Base1DViewModel } from './calculateStaticBlocks';
22
3
  export default function calculateDynamicBlocks(model: Base1DViewModel, padding?: boolean, elision?: boolean): BlockSet;
@@ -2,28 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = calculateDynamicBlocks;
4
4
  const mobx_state_tree_1 = require("mobx-state-tree");
5
- const range_1 = require("./range");
6
5
  const _1 = require(".");
7
6
  const blockTypes_1 = require("./blockTypes");
8
- /**
9
- * returns a BlockSet of which the `blocks` attribute is an array of 'dynamic
10
- * blocks', which are blocks representing only the regions that are visible in
11
- * the view right now. these are mostly used by tracks for which static blocks
12
- * are not feasible.
13
- *
14
- * each block is a plain JS object like:
15
- * `{ refName, start, end, offsetPx, reversed? }`
16
- *
17
- * start and end are in bp, and start is always less than end, but if reversed
18
- * is true, startBp will be on the right side of the visible region.
19
- *
20
- * offsetPx is the number of pixels from the left edge of the view to the left
21
- * edge of the region
22
- *
23
- * NOTE: start, end, and offsetPx may all be fractional!
24
- *
25
- * @returns BlockSet of `{ refName, startBp, end, offset, reversed? }`
26
- */
7
+ const range_1 = require("./range");
27
8
  function calculateDynamicBlocks(model, padding = true, elision = true) {
28
9
  const { offsetPx, displayedRegions, bpPerPx, width, minimumBlockWidth, interRegionPaddingWidth, } = model;
29
10
  if (!width) {
@@ -41,7 +22,6 @@ function calculateDynamicBlocks(model, padding = true, elision = true) {
41
22
  const parentRegion = (0, mobx_state_tree_1.isStateTreeNode)(region) ? (0, mobx_state_tree_1.getSnapshot)(region) : region;
42
23
  const [leftPx, rightPx] = (0, range_1.intersection2)(windowLeftPx, windowRightPx, displayedRegionLeftPx, displayedRegionRightPx);
43
24
  if (leftPx !== undefined && rightPx !== undefined) {
44
- // this displayed region overlaps the view, so make a record for it
45
25
  let start;
46
26
  let end;
47
27
  let isLeftEndOfDisplayedRegion;
@@ -92,7 +72,6 @@ function calculateDynamicBlocks(model, padding = true, elision = true) {
92
72
  blocks.push(new blockTypes_1.ContentBlock(blockData));
93
73
  }
94
74
  if (padding) {
95
- // insert a inter-region padding block if we are crossing a displayed region
96
75
  if (regionWidthPx >= minimumBlockWidth &&
97
76
  blockData.isRightEndOfDisplayedRegion &&
98
77
  regionNumber < displayedRegions.length - 1) {
@@ -1,7 +1,7 @@
1
- import { Instance } from 'mobx-state-tree';
2
1
  import { BlockSet } from './blockTypes';
3
- import { Region } from './types';
2
+ import type { Region } from './types';
4
3
  import type { Region as RegionModel } from './types/mst';
4
+ import type { Instance } from 'mobx-state-tree';
5
5
  export interface Base1DViewModel {
6
6
  offsetPx: number;
7
7
  width: number;
@@ -10,7 +10,6 @@ function calculateStaticBlocks(model, padding = true, elision = true, extra = 0,
10
10
  const windowRightBp = (offsetPx + modelWidth) * bpPerPx;
11
11
  const blockSizePx = width;
12
12
  const blockSizeBp = Math.ceil(blockSizePx * bpPerPx);
13
- // for each displayed region
14
13
  let regionBpOffset = 0;
15
14
  const blocks = new blockTypes_1.BlockSet();
16
15
  for (let regionNumber = 0; regionNumber < displayedRegions.length; regionNumber++) {
@@ -75,7 +74,6 @@ function calculateStaticBlocks(model, padding = true, elision = true, extra = 0,
75
74
  blocks.push(new blockTypes_1.ContentBlock(blockData));
76
75
  }
77
76
  if (padding) {
78
- // insert a inter-region padding block if we are crossing a displayed region
79
77
  if (regionWidthPx >= minimumBlockWidth &&
80
78
  blockData.isRightEndOfDisplayedRegion &&
81
79
  regionNumber < displayedRegions.length - 1) {
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- // from https://www.w3.org/TR/css-color-4/#named-colors
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.namedColorToHex = namedColorToHex;
5
4
  exports.isNamedColor = isNamedColor;
@@ -1,23 +1,4 @@
1
- /**
2
- * Algorithmically pick a contrasting text color that will
3
- * be visible on top of the given background color. Either
4
- * black or white.
5
- *
6
- * @param color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(),
7
- * hsl(), hsla(), or named color
8
- * @returns 'black' or 'white'
9
- */
10
1
  export declare function contrastingTextColor(color: string): string;
11
- /**
12
- * Darken or lighten a color, depending on its luminance.
13
- * Light colors are darkened, dark colors are lightened.
14
- * Uses MUI's `emphasize`, but adds support for named colors
15
- *
16
- * @param color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(),
17
- * hsl(), hsla(), or named color
18
- * @param coefficient - multiplier in the range 0 - 1, defaults to 0.15
19
- * @returns A CSS color string. Hex input values are returned as rgb
20
- */
21
2
  export declare function emphasize(color: string, coefficient?: number): string;
22
3
  export declare function makeContrasting(foreground: string, background?: string, minContrastRatio?: number): string;
23
4
  export { isNamedColor, namedColorToHex } from './cssColorsLevel4';