@genome-spy/core 0.73.0 → 0.75.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 (392) hide show
  1. package/dist/bundle/AbortablePromiseCache-3gHJdF3E.js +96 -0
  2. package/dist/bundle/browser-BTgw5ieH.js +126 -0
  3. package/dist/bundle/chunk-DmhlhrBa.js +11 -0
  4. package/dist/bundle/esm-BDFRLEuD.js +1248 -0
  5. package/dist/bundle/esm-BygJiwh0.js +573 -0
  6. package/dist/bundle/esm-CGX-qz1d.js +155 -0
  7. package/dist/bundle/esm-CgfVIRJ-.js +121 -0
  8. package/dist/bundle/esm-CuMSzCHy.js +298 -0
  9. package/dist/bundle/esm-DMXpJXM4.js +369 -0
  10. package/dist/bundle/esm-DQiq2Zhd.js +1426 -0
  11. package/dist/bundle/esm-DtE8VqAv.js +1015 -0
  12. package/dist/bundle/esm-sIoQYZ21.js +461 -0
  13. package/dist/bundle/index.es.js +21266 -25938
  14. package/dist/bundle/index.js +367 -383
  15. package/dist/bundle/parquetRead-DG_-F5j5.js +1609 -0
  16. package/dist/schema.json +13421 -7210
  17. package/dist/src/config/axisConfig.d.ts +16 -0
  18. package/dist/src/config/axisConfig.d.ts.map +1 -0
  19. package/dist/src/config/axisConfig.js +84 -0
  20. package/dist/src/config/defaultConfig.d.ts +3 -0
  21. package/dist/src/config/defaultConfig.d.ts.map +1 -0
  22. package/dist/src/config/defaultConfig.js +38 -0
  23. package/dist/src/config/defaults/axisDefaults.d.ts +5 -0
  24. package/dist/src/config/defaults/axisDefaults.d.ts.map +1 -0
  25. package/dist/src/config/defaults/axisDefaults.js +72 -0
  26. package/dist/src/config/defaults/markDefaults.d.ts +15 -0
  27. package/dist/src/config/defaults/markDefaults.d.ts.map +1 -0
  28. package/dist/src/config/defaults/markDefaults.js +121 -0
  29. package/dist/src/config/defaults/scaleDefaults.d.ts +5 -0
  30. package/dist/src/config/defaults/scaleDefaults.d.ts.map +1 -0
  31. package/dist/src/config/defaults/scaleDefaults.js +18 -0
  32. package/dist/src/config/defaults/titleDefaults.d.ts +5 -0
  33. package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -0
  34. package/dist/src/config/defaults/titleDefaults.js +47 -0
  35. package/dist/src/config/defaults/viewDefaults.d.ts +3 -0
  36. package/dist/src/config/defaults/viewDefaults.d.ts.map +1 -0
  37. package/dist/src/config/defaults/viewDefaults.js +2 -0
  38. package/dist/src/config/markConfig.d.ts +8 -0
  39. package/dist/src/config/markConfig.d.ts.map +1 -0
  40. package/dist/src/config/markConfig.js +27 -0
  41. package/dist/src/config/mergeConfig.d.ts +8 -0
  42. package/dist/src/config/mergeConfig.d.ts.map +1 -0
  43. package/dist/src/config/mergeConfig.js +81 -0
  44. package/dist/src/config/resolveConfig.d.ts +22 -0
  45. package/dist/src/config/resolveConfig.d.ts.map +1 -0
  46. package/dist/src/config/resolveConfig.js +32 -0
  47. package/dist/src/config/scaleConfig.d.ts +40 -0
  48. package/dist/src/config/scaleConfig.d.ts.map +1 -0
  49. package/dist/src/config/scaleConfig.js +220 -0
  50. package/dist/src/config/styleUtils.d.ts +6 -0
  51. package/dist/src/config/styleUtils.d.ts.map +1 -0
  52. package/dist/src/config/styleUtils.js +10 -0
  53. package/dist/src/config/themes.d.ts +15 -0
  54. package/dist/src/config/themes.d.ts.map +1 -0
  55. package/dist/src/config/themes.js +293 -0
  56. package/dist/src/config/titleConfig.d.ts +12 -0
  57. package/dist/src/config/titleConfig.d.ts.map +1 -0
  58. package/dist/src/config/titleConfig.js +42 -0
  59. package/dist/src/config/viewConfig.d.ts +7 -0
  60. package/dist/src/config/viewConfig.d.ts.map +1 -0
  61. package/dist/src/config/viewConfig.js +29 -0
  62. package/dist/src/data/flowNode.d.ts +22 -1
  63. package/dist/src/data/flowNode.d.ts.map +1 -1
  64. package/dist/src/data/flowNode.js +37 -1
  65. package/dist/src/data/formats/bed.d.ts.map +1 -1
  66. package/dist/src/data/formats/bed.js +6 -1
  67. package/dist/src/data/formats/bedpe.d.ts.map +1 -1
  68. package/dist/src/data/formats/bedpe.js +4 -0
  69. package/dist/src/data/formats/fasta.d.ts.map +1 -1
  70. package/dist/src/data/formats/fasta.js +4 -0
  71. package/dist/src/data/formats/parquet.d.ts.map +1 -1
  72. package/dist/src/data/formats/parquet.js +4 -0
  73. package/dist/src/data/sources/dataSourceFactory.d.ts +2 -13
  74. package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
  75. package/dist/src/data/sources/dataSourceFactory.js +5 -141
  76. package/dist/src/data/sources/dataUtils.d.ts +25 -0
  77. package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
  78. package/dist/src/data/sources/dataUtils.js +23 -0
  79. package/dist/src/data/sources/inlineSource.js +2 -2
  80. package/dist/src/data/sources/lazy/axisGenomeSource.d.ts.map +1 -1
  81. package/dist/src/data/sources/lazy/axisGenomeSource.js +11 -0
  82. package/dist/src/data/sources/lazy/axisTickSource.d.ts +1 -1
  83. package/dist/src/data/sources/lazy/axisTickSource.d.ts.map +1 -1
  84. package/dist/src/data/sources/lazy/axisTickSource.js +19 -8
  85. package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
  86. package/dist/src/data/sources/lazy/bamSource.js +11 -0
  87. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  88. package/dist/src/data/sources/lazy/bigBedSource.js +12 -1
  89. package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
  90. package/dist/src/data/sources/lazy/bigWigSource.js +11 -0
  91. package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
  92. package/dist/src/data/sources/lazy/gff3Source.js +12 -1
  93. package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
  94. package/dist/src/data/sources/lazy/indexedFastaSource.js +11 -0
  95. package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts +27 -0
  96. package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts.map +1 -0
  97. package/dist/src/data/sources/lazy/lazyDataSourceRegistry.js +65 -0
  98. package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts +2 -0
  99. package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts.map +1 -0
  100. package/dist/src/data/sources/lazy/registerBuiltInLazySources.js +8 -0
  101. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
  102. package/dist/src/data/sources/lazy/singleAxisLazySource.js +11 -2
  103. package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
  104. package/dist/src/data/sources/lazy/vcfSource.js +11 -0
  105. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  106. package/dist/src/data/sources/urlSource.js +13 -5
  107. package/dist/src/data/transforms/aggregate.d.ts +1 -0
  108. package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
  109. package/dist/src/data/transforms/aggregate.js +30 -8
  110. package/dist/src/data/transforms/aggregateOps.d.ts.map +1 -1
  111. package/dist/src/data/transforms/aggregateOps.js +12 -1
  112. package/dist/src/data/transforms/coverage.js +2 -2
  113. package/dist/src/data/transforms/filter.js +1 -1
  114. package/dist/src/data/transforms/filterScoredLabels.d.ts +6 -0
  115. package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
  116. package/dist/src/data/transforms/filterScoredLabels.js +9 -0
  117. package/dist/src/data/transforms/measureText.d.ts +1 -0
  118. package/dist/src/data/transforms/measureText.d.ts.map +1 -1
  119. package/dist/src/data/transforms/measureText.js +14 -5
  120. package/dist/src/data/transforms/pileup.d.ts.map +1 -1
  121. package/dist/src/data/transforms/pileup.js +1 -2
  122. package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
  123. package/dist/src/data/transforms/regexFold.js +0 -1
  124. package/dist/src/embedFactory.d.ts +13 -0
  125. package/dist/src/embedFactory.d.ts.map +1 -0
  126. package/dist/src/embedFactory.js +127 -0
  127. package/dist/src/encoder/accessor.d.ts +3 -12
  128. package/dist/src/encoder/accessor.d.ts.map +1 -1
  129. package/dist/src/encoder/accessor.js +10 -65
  130. package/dist/src/encoder/encoder.d.ts +51 -8
  131. package/dist/src/encoder/encoder.d.ts.map +1 -1
  132. package/dist/src/encoder/encoder.js +179 -55
  133. package/dist/src/fonts/bmFontManager.js +1 -1
  134. package/dist/src/full.d.ts +2 -0
  135. package/dist/src/full.d.ts.map +1 -0
  136. package/dist/src/full.js +2 -0
  137. package/dist/src/genome/genome.d.ts +8 -0
  138. package/dist/src/genome/genome.d.ts.map +1 -1
  139. package/dist/src/genome/genome.js +16 -2
  140. package/dist/src/genome/genomeStore.js +1 -1
  141. package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -1
  142. package/dist/src/genome/rootGenomeConfig.js +6 -2
  143. package/dist/src/genome/scaleLocus.d.ts.map +1 -1
  144. package/dist/src/genome/scaleLocus.js +31 -7
  145. package/dist/src/genomeSpy/cursorManager.d.ts +69 -0
  146. package/dist/src/genomeSpy/cursorManager.d.ts.map +1 -0
  147. package/dist/src/genomeSpy/cursorManager.js +131 -0
  148. package/dist/src/genomeSpy/headlessBootstrap.d.ts +113 -0
  149. package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -0
  150. package/dist/src/genomeSpy/headlessBootstrap.js +246 -0
  151. package/dist/src/genomeSpy/interactionController.d.ts +5 -0
  152. package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
  153. package/dist/src/genomeSpy/interactionController.js +292 -59
  154. package/dist/src/genomeSpy/interactionDispatcher.d.ts +50 -0
  155. package/dist/src/genomeSpy/interactionDispatcher.d.ts.map +1 -0
  156. package/dist/src/genomeSpy/interactionDispatcher.js +203 -0
  157. package/dist/src/genomeSpy/viewContextFactory.d.ts +4 -2
  158. package/dist/src/genomeSpy/viewContextFactory.d.ts.map +1 -1
  159. package/dist/src/genomeSpy/viewContextFactory.js +12 -4
  160. package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
  161. package/dist/src/genomeSpy/viewDataInit.js +7 -3
  162. package/dist/src/genomeSpy.d.ts +1 -124
  163. package/dist/src/genomeSpy.d.ts.map +1 -1
  164. package/dist/src/genomeSpy.js +7 -688
  165. package/dist/src/genomeSpyBase.d.ts +133 -0
  166. package/dist/src/genomeSpyBase.d.ts.map +1 -0
  167. package/dist/src/genomeSpyBase.js +719 -0
  168. package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
  169. package/dist/src/gl/arrayBuilder.js +0 -3
  170. package/dist/src/gl/colorUtils.d.ts.map +1 -1
  171. package/dist/src/gl/colorUtils.js +3 -0
  172. package/dist/src/gl/dataToVertices.d.ts +12 -14
  173. package/dist/src/gl/dataToVertices.d.ts.map +1 -1
  174. package/dist/src/gl/dataToVertices.js +121 -95
  175. package/dist/src/gl/glslScaleGenerator.d.ts +5 -2
  176. package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
  177. package/dist/src/gl/glslScaleGenerator.js +15 -15
  178. package/dist/src/gl/vertexRangeIndex.d.ts +23 -0
  179. package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -0
  180. package/dist/src/gl/vertexRangeIndex.js +150 -0
  181. package/dist/src/index.d.ts +3 -9
  182. package/dist/src/index.d.ts.map +1 -1
  183. package/dist/src/index.js +5 -114
  184. package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +4462 -0
  185. package/dist/src/marks/link.d.ts.map +1 -1
  186. package/dist/src/marks/link.js +0 -23
  187. package/dist/src/marks/mark.d.ts +8 -1
  188. package/dist/src/marks/mark.d.ts.map +1 -1
  189. package/dist/src/marks/mark.js +61 -20
  190. package/dist/src/marks/markUtils.d.ts +18 -1
  191. package/dist/src/marks/markUtils.d.ts.map +1 -1
  192. package/dist/src/marks/markUtils.js +52 -4
  193. package/dist/src/marks/point.d.ts.map +1 -1
  194. package/dist/src/marks/point.js +6 -26
  195. package/dist/src/marks/rect.d.ts.map +1 -1
  196. package/dist/src/marks/rect.js +13 -21
  197. package/dist/src/marks/rule.d.ts +7 -2
  198. package/dist/src/marks/rule.d.ts.map +1 -1
  199. package/dist/src/marks/rule.js +125 -16
  200. package/dist/src/marks/text.d.ts.map +1 -1
  201. package/dist/src/marks/text.js +5 -47
  202. package/dist/src/minimal.d.ts +8 -0
  203. package/dist/src/minimal.d.ts.map +1 -0
  204. package/dist/src/minimal.js +21 -0
  205. package/dist/src/paramRuntime/expressionCompiler.d.ts +2 -1
  206. package/dist/src/paramRuntime/expressionCompiler.d.ts.map +1 -1
  207. package/dist/src/paramRuntime/expressionCompiler.js +3 -2
  208. package/dist/src/paramRuntime/expressionRef.d.ts +4 -1
  209. package/dist/src/paramRuntime/expressionRef.d.ts.map +1 -1
  210. package/dist/src/paramRuntime/expressionRef.js +10 -3
  211. package/dist/src/paramRuntime/graphRuntime.d.ts.map +1 -1
  212. package/dist/src/paramRuntime/graphRuntime.js +15 -6
  213. package/dist/src/paramRuntime/paramRuntime.d.ts +8 -2
  214. package/dist/src/paramRuntime/paramRuntime.d.ts.map +1 -1
  215. package/dist/src/paramRuntime/paramRuntime.js +10 -5
  216. package/dist/src/paramRuntime/types.d.ts +1 -0
  217. package/dist/src/paramRuntime/types.d.ts.map +1 -1
  218. package/dist/src/paramRuntime/types.js +1 -0
  219. package/dist/src/paramRuntime/viewParamRuntime.d.ts +24 -4
  220. package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
  221. package/dist/src/paramRuntime/viewParamRuntime.js +52 -6
  222. package/dist/src/scale/scale.d.ts.map +1 -1
  223. package/dist/src/scale/scale.js +14 -7
  224. package/dist/src/scales/axisResolution.d.ts.map +1 -1
  225. package/dist/src/scales/axisResolution.js +9 -5
  226. package/dist/src/scales/domainPlanner.d.ts +82 -16
  227. package/dist/src/scales/domainPlanner.d.ts.map +1 -1
  228. package/dist/src/scales/domainPlanner.js +364 -131
  229. package/dist/src/scales/indexLikeDomainUtils.d.ts +29 -0
  230. package/dist/src/scales/indexLikeDomainUtils.d.ts.map +1 -0
  231. package/dist/src/scales/indexLikeDomainUtils.js +67 -0
  232. package/dist/src/scales/resolutionMemberOrder.d.ts +15 -0
  233. package/dist/src/scales/resolutionMemberOrder.d.ts.map +1 -0
  234. package/dist/src/scales/resolutionMemberOrder.js +22 -0
  235. package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
  236. package/dist/src/scales/scaleInstanceManager.js +7 -2
  237. package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
  238. package/dist/src/scales/scaleInteractionController.js +43 -4
  239. package/dist/src/scales/scalePropsResolver.d.ts +5 -3
  240. package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
  241. package/dist/src/scales/scalePropsResolver.js +108 -8
  242. package/dist/src/scales/scaleResolution.d.ts +35 -1
  243. package/dist/src/scales/scaleResolution.d.ts.map +1 -1
  244. package/dist/src/scales/scaleResolution.js +381 -66
  245. package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -1
  246. package/dist/src/scales/scaleResolutionTestUtils.js +6 -2
  247. package/dist/src/scales/scaleRules.d.ts.map +1 -1
  248. package/dist/src/scales/scaleRules.js +16 -2
  249. package/dist/src/scales/selectionDomainUtils.d.ts +30 -0
  250. package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -1
  251. package/dist/src/scales/selectionDomainUtils.js +116 -1
  252. package/dist/src/screenshotExport.d.ts +23 -0
  253. package/dist/src/screenshotExport.d.ts.map +1 -0
  254. package/dist/src/screenshotExport.js +44 -0
  255. package/dist/src/screenshotHarness.d.ts.map +1 -1
  256. package/dist/src/screenshotHarness.js +26 -25
  257. package/dist/src/spec/axis.d.ts +43 -32
  258. package/dist/src/spec/channel.d.ts +19 -13
  259. package/dist/src/spec/config.d.ts +264 -0
  260. package/dist/src/spec/data.d.ts +19 -0
  261. package/dist/src/spec/decoration.d.ts +51 -0
  262. package/dist/src/spec/exampleFiles.d.ts +12 -0
  263. package/dist/src/spec/exampleFiles.d.ts.map +1 -0
  264. package/dist/src/spec/exampleFiles.js +52 -0
  265. package/dist/src/spec/font.d.ts +1 -1
  266. package/dist/src/spec/mark.d.ts +97 -13
  267. package/dist/src/spec/parameter.d.ts +30 -10
  268. package/dist/src/spec/root.d.ts +14 -0
  269. package/dist/src/spec/scale.d.ts +31 -14
  270. package/dist/src/spec/title.d.ts +13 -2
  271. package/dist/src/spec/tooltip.d.ts +1 -1
  272. package/dist/src/spec/transform.d.ts +39 -4
  273. package/dist/src/spec/view.d.ts +67 -19
  274. package/dist/src/styles/genome-spy.css +55 -55
  275. package/dist/src/styles/genome-spy.css.d.ts +1 -1
  276. package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
  277. package/dist/src/styles/genome-spy.css.js +23 -22
  278. package/dist/src/testSetup.d.ts +2 -0
  279. package/dist/src/testSetup.d.ts.map +1 -0
  280. package/dist/src/testSetup.js +5 -0
  281. package/dist/src/tooltip/dataTooltipHandler.js +8 -2
  282. package/dist/src/tooltip/tooltipContext.d.ts.map +1 -1
  283. package/dist/src/tooltip/tooltipContext.js +3 -2
  284. package/dist/src/types/embedApi.d.ts +7 -0
  285. package/dist/src/types/encoder.d.ts +17 -15
  286. package/dist/src/types/scaleResolutionApi.d.ts +20 -0
  287. package/dist/src/types/viewContext.d.ts +23 -1
  288. package/dist/src/utils/expression.d.ts +18 -10
  289. package/dist/src/utils/expression.d.ts.map +1 -1
  290. package/dist/src/utils/expression.js +354 -19
  291. package/dist/src/utils/field.d.ts.map +1 -1
  292. package/dist/src/utils/field.js +0 -1
  293. package/dist/src/utils/inertia.d.ts.map +1 -1
  294. package/dist/src/utils/inertia.js +0 -1
  295. package/dist/src/utils/inputBinding.d.ts +1 -1
  296. package/dist/src/utils/interaction.d.ts +109 -0
  297. package/dist/src/utils/interaction.d.ts.map +1 -0
  298. package/dist/src/utils/interaction.js +200 -0
  299. package/dist/src/utils/interactionEvent.d.ts +21 -42
  300. package/dist/src/utils/interactionEvent.d.ts.map +1 -1
  301. package/dist/src/utils/interactionEvent.js +43 -66
  302. package/dist/src/utils/kWayMerge.js +1 -1
  303. package/dist/src/utils/mergeObjects.d.ts.map +1 -1
  304. package/dist/src/utils/mergeObjects.js +0 -2
  305. package/dist/src/utils/radixSort.d.ts.map +1 -1
  306. package/dist/src/utils/radixSort.js +0 -2
  307. package/dist/src/utils/throttle.d.ts.map +1 -1
  308. package/dist/src/utils/throttle.js +0 -2
  309. package/dist/src/utils/ui/tooltip.d.ts +1 -0
  310. package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
  311. package/dist/src/utils/ui/tooltip.js +1 -0
  312. package/dist/src/utils/url.js +1 -1
  313. package/dist/src/view/axisGridView.d.ts +1 -1
  314. package/dist/src/view/axisGridView.d.ts.map +1 -1
  315. package/dist/src/view/axisGridView.js +2 -47
  316. package/dist/src/view/axisView.d.ts +2 -3
  317. package/dist/src/view/axisView.d.ts.map +1 -1
  318. package/dist/src/view/axisView.js +251 -106
  319. package/dist/src/view/concatView.d.ts +2 -1
  320. package/dist/src/view/concatView.d.ts.map +1 -1
  321. package/dist/src/view/concatView.js +4 -2
  322. package/dist/src/view/containerMutationHelper.d.ts +3 -0
  323. package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
  324. package/dist/src/view/containerMutationHelper.js +4 -1
  325. package/dist/src/view/facetView.d.ts +1 -1
  326. package/dist/src/view/facetView.js +3 -3
  327. package/dist/src/view/flowBuilder.d.ts +1 -1
  328. package/dist/src/view/flowBuilder.d.ts.map +1 -1
  329. package/dist/src/view/flowBuilder.js +13 -9
  330. package/dist/src/view/gridView/gridChild.d.ts +6 -0
  331. package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
  332. package/dist/src/view/gridView/gridChild.js +72 -43
  333. package/dist/src/view/gridView/gridView.d.ts.map +1 -1
  334. package/dist/src/view/gridView/gridView.js +255 -101
  335. package/dist/src/view/gridView/keyboardZoomController.d.ts +2 -2
  336. package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -1
  337. package/dist/src/view/gridView/keyboardZoomController.js +1 -1
  338. package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
  339. package/dist/src/view/gridView/scrollbar.js +4 -2
  340. package/dist/src/view/gridView/selectionRect.d.ts +4 -0
  341. package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
  342. package/dist/src/view/gridView/selectionRect.js +20 -1
  343. package/dist/src/view/gridView/separatorView.d.ts +1 -0
  344. package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
  345. package/dist/src/view/gridView/separatorView.js +9 -0
  346. package/dist/src/view/interactionRouting.d.ts +20 -0
  347. package/dist/src/view/interactionRouting.d.ts.map +1 -0
  348. package/dist/src/view/interactionRouting.js +53 -0
  349. package/dist/src/view/layerView.d.ts.map +1 -1
  350. package/dist/src/view/layerView.js +12 -9
  351. package/dist/src/view/layout/grid.js +1 -1
  352. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
  353. package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +0 -2
  354. package/dist/src/view/resolutionPlanner.d.ts +9 -0
  355. package/dist/src/view/resolutionPlanner.d.ts.map +1 -0
  356. package/dist/src/view/resolutionPlanner.js +302 -0
  357. package/dist/src/view/testUtils.d.ts +17 -3
  358. package/dist/src/view/testUtils.d.ts.map +1 -1
  359. package/dist/src/view/testUtils.js +62 -69
  360. package/dist/src/view/title.d.ts +8 -1
  361. package/dist/src/view/title.d.ts.map +1 -1
  362. package/dist/src/view/title.js +66 -76
  363. package/dist/src/view/unitView.d.ts +1 -1
  364. package/dist/src/view/unitView.d.ts.map +1 -1
  365. package/dist/src/view/unitView.js +72 -169
  366. package/dist/src/view/view.d.ts +76 -30
  367. package/dist/src/view/view.d.ts.map +1 -1
  368. package/dist/src/view/view.js +138 -48
  369. package/dist/src/view/viewFactory.d.ts +11 -3
  370. package/dist/src/view/viewFactory.d.ts.map +1 -1
  371. package/dist/src/view/viewFactory.js +37 -11
  372. package/dist/src/view/viewUtils.d.ts.map +1 -1
  373. package/dist/src/view/viewUtils.js +41 -5
  374. package/dist/src/view/zoom.d.ts +2 -2
  375. package/dist/src/view/zoom.d.ts.map +1 -1
  376. package/dist/src/view/zoom.js +21 -23
  377. package/package.json +18 -10
  378. package/dist/bundle/AbortablePromiseCache-Dj0vzLnp.js +0 -149
  379. package/dist/bundle/browser-0iNU5Wit.js +0 -138
  380. package/dist/bundle/index-BYsZN7b0.js +0 -1597
  381. package/dist/bundle/index-C3kClAEN.js +0 -1771
  382. package/dist/bundle/index-C7wOh6y1.js +0 -657
  383. package/dist/bundle/index-CRaQAuki.js +0 -326
  384. package/dist/bundle/index-D9v1PCj9.js +0 -507
  385. package/dist/bundle/index-GDOuv_D5.js +0 -266
  386. package/dist/bundle/index-Gt44EOIH.js +0 -628
  387. package/dist/bundle/inflate-GtwLkvSP.js +0 -1048
  388. package/dist/bundle/parquetRead-BnAGCa4_.js +0 -1663
  389. package/dist/bundle/unzip-Bac01w6X.js +0 -1492
  390. package/dist/src/config/scaleDefaults.d.ts +0 -8
  391. package/dist/src/config/scaleDefaults.d.ts.map +0 -1
  392. package/dist/src/config/scaleDefaults.js +0 -45
@@ -6,7 +6,9 @@ import {
6
6
  isObject,
7
7
  isRegExp,
8
8
  isString,
9
+ ascending,
9
10
  lerp,
11
+ span,
10
12
  } from "vega-util";
11
13
  import { format as d3format } from "d3-format";
12
14
  import smoothstep from "./smoothstep.js";
@@ -15,12 +17,63 @@ import linearstep from "./linearstep.js";
15
17
 
16
18
  /**
17
19
  * Some bits are adapted from https://github.com/vega/vega/blob/main/packages/vega-functions/src/codegen.js
20
+ *
21
+ * @param {unknown} value
22
+ * @returns {any}
23
+ */
24
+ function array(value) {
25
+ return isArray(value) || ArrayBuffer.isView(value) ? value : null;
26
+ }
27
+
28
+ /**
29
+ * @param {unknown} value
30
+ * @returns {any}
18
31
  */
32
+ function sequence(value) {
33
+ return array(value) || (isString(value) ? value : null);
34
+ }
35
+
19
36
  const functionContext = {
20
37
  clamp,
21
38
  format(/** @type {number} */ value, /** @type {string} */ format) {
22
39
  return d3format(format)(value);
23
40
  },
41
+ /**
42
+ * Vega's expression docs list these as basic sequence helpers, but the
43
+ * bundled `vega-expression` version does not currently include them in the
44
+ * codegen whitelist. Implement them here so specs can rely on them.
45
+ */
46
+ join(/** @type {any} */ seq, /** @type {string} */ separator) {
47
+ return array(seq).join(separator);
48
+ },
49
+
50
+ indexof(
51
+ /** @type {any} */ seq,
52
+ /** @type {any} */ value,
53
+ /** @type {number | undefined} */ start
54
+ ) {
55
+ return sequence(seq).indexOf(value, start);
56
+ },
57
+
58
+ lastindexof(
59
+ /** @type {any} */ seq,
60
+ /** @type {any} */ value,
61
+ /** @type {number | undefined} */ start
62
+ ) {
63
+ return sequence(seq).lastIndexOf(value, start);
64
+ },
65
+
66
+ reverse(/** @type {any} */ seq) {
67
+ return array(seq).slice().reverse();
68
+ },
69
+
70
+ slice(
71
+ /** @type {any} */ seq,
72
+ /** @type {number} */ start,
73
+ /** @type {number | undefined} */ end
74
+ ) {
75
+ return sequence(seq).slice(start, end);
76
+ },
24
77
  mapHasKey(/** @type {Map<any, any>} */ map, /** @type {any} */ key) {
25
78
  return map.has(key);
26
79
  },
@@ -34,7 +87,6 @@ const functionContext = {
34
87
  isRegExp,
35
88
  isString,
36
89
  isValid(/** @type {any} */ _) {
37
- // eslint-disable-next-line no-self-compare
38
90
  return _ != null && _ === _;
39
91
  },
40
92
  lerp,
@@ -46,46 +98,320 @@ const functionContext = {
46
98
  ) {
47
99
  return String(str).replace(pattern, replace);
48
100
  },
101
+ sort(/** @type {Array<any>} */ seq) {
102
+ return array(seq).slice().sort(ascending);
103
+ },
104
+ /**
105
+ * Returns the midpoint of an ordered extent, such as [min, max].
106
+ * The helper uses the first and last elements and does not sort.
107
+ */
108
+ center(/** @type {Array<any>} */ seq) {
109
+ const values = array(seq);
110
+ return (values[0] + values[values.length - 1]) / 2;
111
+ },
112
+ span(/** @type {Array<any>} */ seq) {
113
+ return span(seq);
114
+ },
49
115
  smoothstep,
50
116
  };
51
117
 
52
118
  /**
53
119
  * @param {typeof codegenExpression} codegen
120
+ * @param {ScaleHelperCompileContext} context
54
121
  */
55
- function buildFunctions(codegen) {
56
- const fn = functions(codegen);
57
- // eslint-disable-next-line guard-for-in
122
+ function buildFunctions(codegen, context) {
123
+ const fn = /** @type {any} */ (functions(codegen));
58
124
  for (const name in functionContext) {
59
125
  fn[name] = `this.${name}`;
60
126
  }
127
+
128
+ // Replace the public helper names with custom codegen hooks so we can bind
129
+ // a scale resolution once during compilation instead of looking it up for
130
+ // every datum.
131
+ for (const kind of /** @type {const} */ ([
132
+ "scale",
133
+ "invert",
134
+ "domain",
135
+ "range",
136
+ ])) {
137
+ fn[kind] = (
138
+ /** @type {any[]} */
139
+ args
140
+ ) => buildScaleHelperCall(codegen, context, kind, args);
141
+ }
142
+
61
143
  return fn;
62
144
  }
63
145
 
64
- const cg = codegenExpression({
65
- forbidden: [],
66
- allowed: ["datum", "undefined"],
67
- globalvar: "globalObject",
68
- fieldvar: "datum",
69
- functions: buildFunctions,
70
- });
71
-
72
146
  /**
73
147
  * @typedef { object } ExpressionProps
74
148
  * @prop { string[] } fields
75
149
  * @prop { string[] } globals
76
150
  * @prop { string } code
151
+ * @prop { import("../paramRuntime/types.js").ParamRef<any>[] } [scaleDependencies]
77
152
  *
78
153
  * @typedef { ((datum?: import("../data/flowNode.js").Datum) => any) & ExpressionProps } ExpressionFunction
79
154
  *
155
+ * @typedef {object} ExpressionCompileContext
156
+ * @prop {(channel: string) => import("../scales/scaleResolution.js").default | undefined} [resolveScaleResolution]
157
+ *
158
+ * @typedef {ExpressionCompileContext & {
159
+ * globalvar: string,
160
+ * globalObject: Record<string, any>,
161
+ * getScaleHelper: (kind: "scale" | "invert" | "domain" | "range", channel: string, resolution: import("../scales/scaleResolution.js").default) => { codeName: string, dependency: import("../paramRuntime/types.js").ParamRef<any> }
162
+ * }} ScaleHelperCompileContext
163
+ */
164
+
165
+ /**
166
+ * @param {typeof codegenExpression} codegen
167
+ * @param {ScaleHelperCompileContext} context
168
+ * @param {"scale" | "invert" | "domain" | "range"} kind
169
+ * @param {any[]} args
170
+ * @returns {string}
171
+ */
172
+ function buildScaleHelperCall(codegen, context, kind, args) {
173
+ if (args.length === 0) {
174
+ throw new Error(
175
+ `Scale helper "${kind}" requires a literal channel name.`
176
+ );
177
+ }
178
+
179
+ if ((kind === "scale" || kind === "invert") && args.length < 2) {
180
+ throw new Error(
181
+ `Scale helper "${kind}" requires a channel name and a value.`
182
+ );
183
+ }
184
+
185
+ const channel = getLiteralString(args[0]);
186
+ if (!channel) {
187
+ throw new Error(
188
+ `Scale helper "${kind}" requires a literal channel name.`
189
+ );
190
+ }
191
+
192
+ const resolution = context.resolveScaleResolution?.(channel);
193
+ if (!resolution) {
194
+ throw new Error(
195
+ `Unknown scale channel "${channel}" in expression helper "${kind}".`
196
+ );
197
+ }
198
+
199
+ const helper = context.getScaleHelper(kind, channel, resolution);
200
+ const remainingArgs = args
201
+ .slice(1)
202
+ .map((arg) => codegen(arg))
203
+ .join(",");
204
+ return `${context.globalvar}["${helper.codeName}"](${remainingArgs})`;
205
+ }
206
+
207
+ /**
208
+ * @param {any} node
209
+ * @returns {string | undefined}
210
+ */
211
+ function getLiteralString(node) {
212
+ return node?.type === "Literal" && typeof node.value === "string"
213
+ ? node.value
214
+ : undefined;
215
+ }
216
+
217
+ /**
218
+ * @param {"scale" | "invert" | "domain" | "range"} kind
219
+ * @param {import("../scales/scaleResolution.js").default} resolution
220
+ * @returns {(...args: any[]) => any}
221
+ */
222
+ function createScaleHelperFunction(kind, resolution) {
223
+ /** @type {(fn: () => any) => any} */
224
+ const run = (fn) => runWithActiveScaleResolution(resolution, kind, fn);
225
+
226
+ if (kind === "domain") {
227
+ // `vega-scale` returns a fresh array here. That is fine for
228
+ // batch-invariant expressions, but callers should avoid using it in a
229
+ // per-datum hot path unless they really need the full extent array.
230
+ return () => run(() => resolution.getDomain());
231
+ }
232
+ if (kind === "range") {
233
+ // Same allocation caveat as `domain()`: the underlying scale getter
234
+ // returns a copied array, so repeated per-row calls will allocate.
235
+ return () => run(() => resolution.getScale().range());
236
+ }
237
+ if (kind === "scale") {
238
+ return (value) => run(() => resolution.getScale()(value));
239
+ }
240
+ if (kind === "invert") {
241
+ return (value) =>
242
+ run(() => /** @type {any} */ (resolution.getScale()).invert(value));
243
+ }
244
+ throw new Error("Unknown scale helper: " + kind);
245
+ }
246
+
247
+ /** @type {WeakSet<object>} */
248
+ const activeScaleHelperResolutions = new WeakSet();
249
+
250
+ /**
251
+ * @template T
252
+ * @param {import("../scales/scaleResolution.js").default} resolution
253
+ * @param {"scale" | "invert" | "domain" | "range"} kind
254
+ * @param {() => T} fn
255
+ * @returns {T}
256
+ */
257
+ function runWithActiveScaleResolution(resolution, kind, fn) {
258
+ if (activeScaleHelperResolutions.has(resolution)) {
259
+ throw new Error(
260
+ `Scale helper cycle detected while evaluating ${kind}("${resolution.channel}").`
261
+ );
262
+ }
263
+
264
+ activeScaleHelperResolutions.add(resolution);
265
+ try {
266
+ return fn();
267
+ } finally {
268
+ activeScaleHelperResolutions.delete(resolution);
269
+ }
270
+ }
271
+
272
+ /**
273
+ * @param {"scale" | "invert" | "domain" | "range"} kind
274
+ * @param {string} channel
275
+ * @param {import("../scales/scaleResolution.js").default} resolution
276
+ * @param {string} codeName
277
+ * @returns {import("../paramRuntime/types.js").ParamRef<any> & { rank: number }}
278
+ */
279
+ function createScaleDependency(kind, channel, resolution, codeName) {
280
+ /** @type {Set<() => void>} */
281
+ const listeners = new Set();
282
+
283
+ const notify = () => {
284
+ for (const listener of listeners) {
285
+ listener();
286
+ }
287
+ };
288
+
289
+ const attach = () => {
290
+ if (kind === "domain") {
291
+ resolution.addEventListener("domain", notify);
292
+ } else if (kind === "range") {
293
+ resolution.addEventListener("range", notify);
294
+ } else {
295
+ resolution.addEventListener("domain", notify);
296
+ resolution.addEventListener("range", notify);
297
+ }
298
+ };
299
+
300
+ const detach = () => {
301
+ if (kind === "domain") {
302
+ resolution.removeEventListener("domain", notify);
303
+ } else if (kind === "range") {
304
+ resolution.removeEventListener("range", notify);
305
+ } else {
306
+ resolution.removeEventListener("domain", notify);
307
+ resolution.removeEventListener("range", notify);
308
+ }
309
+ };
310
+
311
+ return {
312
+ // The dependency is a lightweight invalidation token. It does not need
313
+ // to expose a separate scale value; the bound helper closure already
314
+ // closes over the actual resolution. The ref exists so the expression
315
+ // graph can subscribe to scale changes like any other reactive input.
316
+ id: `scale:${channel}:${codeName}`,
317
+ name: `scale(${channel})`,
318
+ kind: "derived",
319
+ rank: 0,
320
+ get() {
321
+ return resolution.getScale();
322
+ },
323
+ subscribe(listener) {
324
+ const wasEmpty = listeners.size === 0;
325
+ listeners.add(listener);
326
+ if (wasEmpty) {
327
+ attach();
328
+ }
329
+ return () => {
330
+ const removed = listeners.delete(listener);
331
+ if (removed && listeners.size === 0) {
332
+ detach();
333
+ }
334
+ };
335
+ },
336
+ };
337
+ }
338
+
339
+ /**
80
340
  * @param {string} expr
341
+ * @param {Record<string, any>} globalObject
342
+ * @param {ExpressionCompileContext} context
343
+ *
81
344
  * @returns {ExpressionFunction}
82
345
  */
83
- export default function createFunction(expr, globalObject = {}) {
346
+ export default function createFunction(expr, globalObject = {}, context = {}) {
84
347
  try {
348
+ // Each scale helper call is rewritten once at compile time into a
349
+ // cached closure that targets a specific scale resolution.
350
+ /** @type {Map<string, import("../paramRuntime/types.js").ParamRef<any>>} */
351
+ const scaleDependenciesByChannel = new Map();
352
+ // A helper may appear multiple times in one expression. Cache both the
353
+ // generated closure and the synthetic dependency ref so repeated calls
354
+ // share the same reactive identity.
355
+ /** @type {Map<string, { codeName: string, dependency: import("../paramRuntime/types.js").ParamRef<any> }>} */
356
+ const helperEntries = new Map();
357
+ let nextScaleHelperId = 1;
358
+
359
+ /**
360
+ * @type {ExpressionCompileContext & {
361
+ * globalvar: string,
362
+ * globalObject: Record<string, any>,
363
+ * getScaleHelper: (kind: "scale" | "invert" | "domain" | "range", channel: string, resolution: import("../scales/scaleResolution.js").default) => { codeName: string, dependency: import("../paramRuntime/types.js").ParamRef<any> }
364
+ * }}
365
+ */
366
+ const helperContext = {
367
+ ...context,
368
+ globalvar: "globalObject",
369
+ globalObject,
370
+ getScaleHelper(kind, channel, resolution) {
371
+ // Helper instances are keyed by helper kind + channel so
372
+ // `domain("x")` and `scale("x", ...)` share the same
373
+ // resolution binding but keep separate generated closures.
374
+ const key = kind + ":" + channel;
375
+ const cached = helperEntries.get(key);
376
+ if (cached) {
377
+ return cached;
378
+ }
379
+
380
+ let dependency = scaleDependenciesByChannel.get(channel);
381
+ if (!dependency) {
382
+ dependency = createScaleDependency(
383
+ kind,
384
+ channel,
385
+ resolution,
386
+ "__scale_dependency_" + nextScaleHelperId++
387
+ );
388
+ scaleDependenciesByChannel.set(channel, dependency);
389
+ }
390
+
391
+ const codeName = "__scale_helper_" + nextScaleHelperId++;
392
+ const entry = { codeName, dependency };
393
+ helperEntries.set(key, entry);
394
+ // Store the concrete helper implementation on the global object
395
+ // used by the generated expression function.
396
+ globalObject[codeName] = createScaleHelperFunction(
397
+ kind,
398
+ resolution
399
+ );
400
+ return entry;
401
+ },
402
+ };
403
+
404
+ const cg = codegenExpression({
405
+ forbidden: [],
406
+ allowed: ["datum", "undefined"],
407
+ globalvar: "globalObject",
408
+ fieldvar: "datum",
409
+ functions: (visitor) => buildFunctions(visitor, helperContext),
410
+ });
411
+
85
412
  const parsed = parseExpression(expr);
86
413
  const generatedCode = cg(parsed);
87
414
 
88
- // eslint-disable-next-line no-new-func
89
415
  const fn = Function(
90
416
  "datum",
91
417
  "globalObject",
@@ -105,10 +431,18 @@ export default function createFunction(expr, globalObject = {}) {
105
431
  exprFunction.fields = generatedCode.fields;
106
432
  exprFunction.globals = generatedCode.globals;
107
433
  exprFunction.code = generatedCode.code;
434
+ // Reactive bookkeeping lives outside the generated expression body.
435
+ // The expression runtime subscribes to these refs and invalidates the
436
+ // compiled expression when the referenced scale changes.
437
+ exprFunction.scaleDependencies = Array.from(
438
+ scaleDependenciesByChannel.values()
439
+ );
108
440
 
109
441
  return exprFunction;
110
442
  } catch (e) {
111
- throw new Error(`Invalid expression: ${expr}, ${e.message}`);
443
+ throw new Error(`Invalid expression: ${expr}, ${e.message}`, {
444
+ cause: e,
445
+ });
112
446
  }
113
447
  }
114
448
 
@@ -120,14 +454,13 @@ const eventFilterCg = codegenExpression({
120
454
 
121
455
  /**
122
456
  * @param {string} expr
123
- * @returns {(event: UIEvent) => boolean}
457
+ * @returns {(event: UIEvent | import("./interactionEvent.js").WheelLikeEvent) => boolean}
124
458
  */
125
459
  export function createEventFilterFunction(expr) {
126
460
  try {
127
461
  const parsed = parseExpression(expr);
128
462
  const generatedCode = eventFilterCg(parsed);
129
463
 
130
- // eslint-disable-next-line no-new-func
131
464
  const fn = Function(
132
465
  "event",
133
466
  "globalObject",
@@ -141,10 +474,12 @@ export function createEventFilterFunction(expr) {
141
474
  }`
142
475
  );
143
476
 
144
- return /** @type {(event: UIEvent) => boolean} */ (
477
+ return /** @type {(event: UIEvent | import("./interactionEvent.js").WheelLikeEvent) => boolean} */ (
145
478
  /** @type {any} */ (fn)
146
479
  );
147
480
  } catch (e) {
148
- throw new Error(`Invalid expression: ${expr}, ${e.message}`);
481
+ throw new Error(`Invalid expression: ${expr}, ${e.message}`, {
482
+ cause: e,
483
+ });
149
484
  }
150
485
  }
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/utils/field.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,iCAHW,MAAM,SACN,MAAM,uCAgChB"}
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/utils/field.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,iCAHW,MAAM,SACN,MAAM,uCA+BhB"}
@@ -25,7 +25,6 @@ export function field(fieldExpr, name = fieldExpr) {
25
25
  }
26
26
  };
27
27
 
28
- // eslint-disable-next-line no-new-func
29
28
  const fn = /** @type {import("vega-util").AccessorFn} */ (
30
29
  new Function(
31
30
  "validator",
@@ -1 +1 @@
1
- {"version":3,"file":"inertia.d.ts","sourceRoot":"","sources":["../../../src/utils/inertia.js"],"names":[],"mappings":"AAwEA;;;GAGG;AACH,kCAFa,CAAC,SADH,CAAC,iCAoBX;AAzFD;;GAEG;AACH;IACI;;;OAGG;IACH,sBAHW,OAAO,eAAe,EAAE,OAAO,aAC/B,OAAO,EA0BjB;IAvBG,0CAAwB;IACxB,kBAA0B;IAG1B,oBAAsB;IAEtB,oCAAoC;IACpC,UADW,CAAS,IAAM,EAAN,MAAM,KAAE,IAAI,CACZ;IAEpB,oBAAoB;IACpB,kBAAkB;IAElB;;;;MAUC;IAGL,eAQC;IAED;;;;OAIG;IACH,mBAHW,MAAM,YACN,CAAS,IAAM,EAAN,MAAM,KAAE,IAAI,QAkB/B;CACJ"}
1
+ {"version":3,"file":"inertia.d.ts","sourceRoot":"","sources":["../../../src/utils/inertia.js"],"names":[],"mappings":"AAwEA;;;GAGG;AACH,kCAFa,CAAC,SADH,CAAC,iCAmBX;AAxFD;;GAEG;AACH;IACI;;;OAGG;IACH,sBAHW,OAAO,eAAe,EAAE,OAAO,aAC/B,OAAO,EA0BjB;IAvBG,0CAAwB;IACxB,kBAA0B;IAG1B,oBAAsB;IAEtB,oCAAoC;IACpC,UADW,CAAS,IAAM,EAAN,MAAM,KAAE,IAAI,CACZ;IAEpB,oBAAoB;IACpB,kBAAkB;IAElB;;;;MAUC;IAGL,eAQC;IAED;;;;OAIG;IACH,mBAHW,MAAM,YACN,CAAS,IAAM,EAAN,MAAM,KAAE,IAAI,QAkB/B;CACJ"}
@@ -80,7 +80,6 @@ export function makeEventTemplate(event) {
80
80
  const acceptedTypes = ["string", "number", "boolean"];
81
81
  const rejectedProps = ["wheelDelta", "wheelDeltaX", "wheelDeltaY"];
82
82
 
83
- // eslint-disable-next-line guard-for-in
84
83
  for (const key in event) {
85
84
  const k = /** @type {keyof T} */ (key);
86
85
  if (
@@ -9,5 +9,5 @@ export default function createBindingInputs(mediator: {
9
9
  paramConfigs: ReadonlyMap<string, import("../spec/parameter.js").Parameter>;
10
10
  setValue: (name: string, value: any) => void;
11
11
  getValue: (name: string) => any;
12
- }): import("lit-html").TemplateResult<2 | 1 | 3>[];
12
+ }): import("lit-html").TemplateResult<1 | 2 | 3>[];
13
13
  //# sourceMappingURL=inputBinding.d.ts.map
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Internal event object used by GenomeSpy's canvas interaction pipeline.
3
+ *
4
+ * Interaction is deliberately smaller than DOM Event. It models the pieces
5
+ * that GenomeSpy needs for hierarchical pointer handling:
6
+ * - `point` is always in canvas coordinates
7
+ * - `uiEvent` is the original native or synthesized low-level event
8
+ * - `target` is the resolved deepest view target after propagation
9
+ * - `currentTarget` and `relatedTarget` are used by synthesized
10
+ * `mouseenter` / `mouseleave` delivery
11
+ *
12
+ * Runtime flow:
13
+ * 1. `InteractionController` converts native canvas events into Interaction
14
+ * instances and asks `InteractionDispatcher` to route them.
15
+ * 2. Container views route the interaction through the view hierarchy and may
16
+ * add policy on top, such as wheel claiming, zoom handling, or scrollbar
17
+ * dispatch.
18
+ * 3. `InteractionDispatcher` compares successive hover paths and synthesizes
19
+ * subtree-level `mouseenter` / `mouseleave` transitions.
20
+ *
21
+ * Differences from the DOM model:
22
+ * - propagation is view-driven rather than browser-driven
23
+ * - only the event types used by GenomeSpy are represented
24
+ * - there is only `stopPropagation()`, not stop-immediate semantics
25
+ * - mark picking is not encoded into `target`; mark hover lives separately in
26
+ * `InteractionController`
27
+ *
28
+ * Mouse and wheel helpers:
29
+ * - `mouseEvent` exposes the underlying MouseEvent for imperative handlers
30
+ * - `proxiedMouseEvent` exposes only primitive properties for places that
31
+ * must not retain live DOM objects
32
+ * - `wheelEvent` exposes the underlying wheel-like event, optionally with
33
+ * temporary delta overrides applied by `setWheelDeltas()`
34
+ *
35
+ * Special event types:
36
+ * - `wheelclaimprobe` asks pointed views whether they would consume wheel,
37
+ * without running the actual wheel side effects yet
38
+ * - `touchgesture` is a synthesized high-level gesture event derived from
39
+ * touch input
40
+ */
41
+ export default class Interaction {
42
+ /**
43
+ * @param {import("../view/layout/point.js").default} point
44
+ * @param {import("./interactionEvent.js").InteractionUiEvent} uiEvent
45
+ * @param {string} [type]
46
+ */
47
+ constructor(point: import("../view/layout/point.js").default, uiEvent: import("./interactionEvent.js").InteractionUiEvent, type?: string);
48
+ point: import("../view/layout/point.js").default;
49
+ stopped: boolean;
50
+ wheelClaimed: boolean;
51
+ /**
52
+ * The target is known only after the interaction has been resolved
53
+ * against the view hierarchy.
54
+ *
55
+ * @type {import("../view/view.js").default | undefined}
56
+ */
57
+ target: import("../view/view.js").default | undefined;
58
+ /**
59
+ * Reserved for the new interaction dispatcher.
60
+ *
61
+ * @type {import("../view/view.js").default | undefined}
62
+ */
63
+ currentTarget: import("../view/view.js").default | undefined;
64
+ /**
65
+ * Reserved for enter/leave-style transition events.
66
+ *
67
+ * @type {import("../view/view.js").default | undefined}
68
+ */
69
+ relatedTarget: import("../view/view.js").default | undefined;
70
+ set uiEvent(value: import("./interactionEvent.js").InteractionUiEvent);
71
+ get uiEvent(): import("./interactionEvent.js").InteractionUiEvent;
72
+ stopPropagation(): void;
73
+ /**
74
+ * Marks the current wheel interaction as claimed by the pointed view
75
+ * hierarchy.
76
+ *
77
+ * This is used both for real wheel events and for the synthetic
78
+ * `wheelclaimprobe` preflight. Controllers use the claimed state to decide
79
+ * whether the native wheel event should call `preventDefault()`.
80
+ */
81
+ claimWheel(): void;
82
+ /**
83
+ * @param {number} deltaX
84
+ * @param {number} deltaY
85
+ */
86
+ setWheelDeltas(deltaX: number, deltaY: number): void;
87
+ set type(value: string);
88
+ get type(): string;
89
+ /**
90
+ * Returns a primitive-only proxy of the underlying MouseEvent.
91
+ *
92
+ * This is intended for places such as expression evaluation, where the
93
+ * caller needs scalar event fields but should not receive a live DOM event
94
+ * object with methods, nested objects, or browser-specific prototypes.
95
+ */
96
+ get proxiedMouseEvent(): MouseEvent;
97
+ get mouseEvent(): MouseEvent;
98
+ /**
99
+ * Returns a wheel-like event with any temporary delta overrides applied.
100
+ *
101
+ * The wrapped event keeps the original event identity for all properties
102
+ * except `deltaX` and `deltaY`, which allows intermediate handlers to
103
+ * consume part of the wheel interaction while keeping downstream wheel
104
+ * handling on the same event instance.
105
+ */
106
+ get wheelEvent(): Pick<WheelEvent, "type" | "deltaX" | "deltaY" | "deltaMode" | "preventDefault" | "ctrlKey">;
107
+ #private;
108
+ }
109
+ //# sourceMappingURL=interaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/utils/interaction.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IAOI;;;;OAIG;IACH,mBAJW,OAAO,yBAAyB,EAAE,OAAO,WACzC,OAAO,uBAAuB,EAAE,kBAAkB,SAClD,MAAM,EA8BhB;IA3BG,iDAAkB;IAElB,iBAAoB;IACpB,sBAAyB;IAGzB;;;;;OAKG;IACH,QAFU,OAAO,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAEhC;IAEvB;;;;OAIG;IACH,eAFU,OAAO,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAEzB;IAE9B;;;;OAIG;IACH,eAFU,OAAO,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAEzB;IAclC,uEAKC;IATD,kEAEC;IASD,wBAEC;IAED;;;;;;;OAOG;IACH,mBAMC;IAED;;;OAGG;IACH,uBAHW,MAAM,UACN,MAAM,QAShB;IAMD,wBAEC;IAND,mBAEC;IAMD;;;;;;OAMG;IACH,oCAQC;IAED,6BAMC;IAED;;;;;;;OAOG;IACH,8GAkBC;;CACJ"}