@milaboratories/graph-maker 1.1.137 → 1.1.139

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 (283) hide show
  1. package/README.md +120 -24
  2. package/dist/GraphMaker/components/LassoControls/index.vue.js +15 -13
  3. package/dist/GraphMaker/components/LassoControls/index.vue.js.map +1 -1
  4. package/dist/GraphMaker/components/SettingsTabs/icons/AxesIcon.vue.d.ts.map +1 -0
  5. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/AxesIcon.vue.js +1 -1
  6. package/dist/GraphMaker/components/SettingsTabs/icons/AxesIcon.vue.js.map +1 -0
  7. package/dist/GraphMaker/components/SettingsTabs/icons/DeleteChartIcon.vue.d.ts.map +1 -0
  8. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/DeleteChartIcon.vue.js +1 -1
  9. package/dist/GraphMaker/components/SettingsTabs/icons/DeleteChartIcon.vue.js.map +1 -0
  10. package/dist/GraphMaker/components/SettingsTabs/icons/ExportIcon.vue.d.ts.map +1 -0
  11. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/ExportIcon.vue.js +1 -1
  12. package/dist/GraphMaker/components/SettingsTabs/icons/ExportIcon.vue.js.map +1 -0
  13. package/dist/GraphMaker/components/SettingsTabs/icons/LayersIcon.vue.d.ts.map +1 -0
  14. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LayersIcon.vue.js +1 -1
  15. package/dist/GraphMaker/components/SettingsTabs/icons/LayersIcon.vue.js.map +1 -0
  16. package/dist/GraphMaker/components/SettingsTabs/icons/LinkIcon.vue.d.ts.map +1 -0
  17. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LinkIcon.vue.js +1 -1
  18. package/dist/GraphMaker/components/SettingsTabs/icons/LinkIcon.vue.js.map +1 -0
  19. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.d.ts +3 -0
  20. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.d.ts.map +1 -0
  21. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.js +12 -0
  22. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.js.map +1 -0
  23. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue2.js +5 -0
  24. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue2.js.map +1 -0
  25. package/dist/GraphMaker/components/SettingsTabs/icons/SettingsIcon.vue.d.ts.map +1 -0
  26. package/dist/GraphMaker/components/SettingsTabs/index.vue.d.ts +2 -0
  27. package/dist/GraphMaker/components/SettingsTabs/index.vue.d.ts.map +1 -1
  28. package/dist/GraphMaker/components/SettingsTabs/index.vue.js +17 -15
  29. package/dist/GraphMaker/components/SettingsTabs/index.vue.js.map +1 -1
  30. package/dist/GraphMaker/forms/LogForm.vue.d.ts +19 -0
  31. package/dist/GraphMaker/forms/LogForm.vue.d.ts.map +1 -0
  32. package/dist/GraphMaker/forms/LogForm.vue.js +22 -0
  33. package/dist/GraphMaker/forms/LogForm.vue.js.map +1 -0
  34. package/dist/GraphMaker/forms/index.d.ts +22 -0
  35. package/dist/GraphMaker/forms/index.d.ts.map +1 -1
  36. package/dist/GraphMaker/forms/index.js +35 -28
  37. package/dist/GraphMaker/forms/index.js.map +1 -1
  38. package/dist/GraphMaker/index.vue.d.ts +1 -0
  39. package/dist/GraphMaker/index.vue.d.ts.map +1 -1
  40. package/dist/GraphMaker/index.vue.js +146 -144
  41. package/dist/GraphMaker/index.vue.js.map +1 -1
  42. package/dist/GraphMaker/store.d.ts.map +1 -1
  43. package/dist/GraphMaker/store.js +71 -67
  44. package/dist/GraphMaker/store.js.map +1 -1
  45. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +9 -3
  46. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
  47. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +17 -2
  48. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
  49. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +13 -4
  50. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  51. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +28 -7
  52. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  53. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +6 -2
  54. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
  55. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +16 -2
  56. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  57. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +14 -2
  58. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
  59. package/dist/lib.js +1 -1
  60. package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js +95 -72
  61. package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js.map +1 -1
  62. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +1 -1
  63. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +124 -122
  64. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
  65. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +72 -91
  66. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
  67. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js +43 -41
  68. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
  69. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +28 -0
  70. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -0
  71. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +94 -0
  72. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -0
  73. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +42 -38
  74. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
  75. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js.map +1 -1
  77. package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js +11 -11
  78. package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js.map +1 -1
  79. package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js +20 -0
  80. package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js.map +1 -0
  81. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +181 -181
  82. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js.map +1 -1
  83. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js +2 -2
  84. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js.map +1 -1
  85. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js +45 -45
  86. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js.map +1 -1
  87. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js +27 -27
  88. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js.map +1 -1
  89. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Legend.js.map +1 -1
  90. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js +18 -18
  91. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js.map +1 -1
  92. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js +36 -36
  93. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js.map +1 -1
  94. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js +45 -41
  95. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js.map +1 -1
  96. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js +33 -33
  97. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js.map +1 -1
  98. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +90 -93
  99. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
  100. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +200 -199
  101. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
  102. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +17 -17
  103. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
  104. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/BoxElement.js.map +1 -1
  105. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +102 -99
  106. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
  107. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js +31 -36
  108. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js.map +1 -1
  109. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js +62 -74
  110. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js.map +1 -1
  111. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js +52 -53
  112. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js.map +1 -1
  113. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js +32 -32
  114. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js.map +1 -1
  115. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +7 -6
  116. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
  117. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js +23 -23
  118. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js.map +1 -1
  119. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js +63 -63
  120. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js.map +1 -1
  121. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js +60 -64
  122. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js.map +1 -1
  123. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +23 -23
  124. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
  125. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js +5 -5
  126. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js.map +1 -1
  127. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js +13 -13
  128. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +1 -1
  129. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +258 -256
  130. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  131. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +1 -1
  132. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
  133. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +45 -44
  134. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  135. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +107 -106
  136. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  137. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +18 -18
  138. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  139. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +99 -95
  140. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  141. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +30 -29
  142. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  143. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js +1 -1
  144. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js.map +1 -1
  145. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
  146. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +143 -142
  147. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js.map +1 -1
  148. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/HistogramSettingsImpl.js.map +1 -1
  149. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js +30 -30
  150. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js.map +1 -1
  151. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +7 -7
  152. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js +53 -54
  153. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js.map +1 -1
  154. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +59 -55
  155. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
  156. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/@d3fc/d3fc-axis/src/axisBase.js +7 -7
  157. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +6 -12
  158. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
  159. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-shape/src/line.js.map +1 -1
  160. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js +148 -0
  161. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js.map +1 -0
  162. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +172 -168
  163. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
  164. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +26 -26
  165. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
  166. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +11 -11
  167. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js +30 -29
  168. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js.map +1 -1
  169. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js +135 -153
  170. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
  171. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js +35 -32
  172. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
  173. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +27 -27
  174. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
  175. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +14 -14
  176. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/constants.js.map +1 -1
  177. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +24 -22
  178. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
  179. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +11 -14
  180. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
  181. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +57 -58
  182. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
  183. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js +85 -83
  184. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
  185. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js +20 -20
  186. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js.map +1 -1
  187. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +44 -37
  188. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
  189. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js +11 -0
  190. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js.map +1 -0
  191. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js +46 -56
  192. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js.map +1 -1
  193. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +223 -205
  194. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
  195. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +22 -22
  196. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
  197. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js +42 -0
  198. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js.map +1 -0
  199. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +84 -81
  200. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
  201. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js +11 -11
  202. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js +15 -14
  203. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js.map +1 -1
  204. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +89 -114
  205. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
  206. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +3 -1
  207. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
  208. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +1 -1
  209. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js.map +1 -1
  210. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +1 -1
  211. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
  212. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +1 -1
  213. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
  214. package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js +1 -1
  215. package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js.map +1 -1
  216. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +1 -1
  217. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
  218. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +4 -4
  219. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
  220. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js +39 -0
  221. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js.map +1 -0
  222. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js +101 -0
  223. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js.map +1 -0
  224. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js +4 -4
  225. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js.map +1 -1
  226. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js +3 -3
  227. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js.map +1 -1
  228. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +1031 -1023
  229. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
  230. package/package.json +3 -3
  231. package/dist/GraphMaker/icons/AxesIcon.vue.d.ts.map +0 -1
  232. package/dist/GraphMaker/icons/AxesIcon.vue.js.map +0 -1
  233. package/dist/GraphMaker/icons/DeleteChartIcon.vue.d.ts.map +0 -1
  234. package/dist/GraphMaker/icons/DeleteChartIcon.vue.js.map +0 -1
  235. package/dist/GraphMaker/icons/ExportIcon.vue.d.ts.map +0 -1
  236. package/dist/GraphMaker/icons/ExportIcon.vue.js.map +0 -1
  237. package/dist/GraphMaker/icons/LayersIcon.vue.d.ts.map +0 -1
  238. package/dist/GraphMaker/icons/LayersIcon.vue.js.map +0 -1
  239. package/dist/GraphMaker/icons/LinkIcon.vue.d.ts.map +0 -1
  240. package/dist/GraphMaker/icons/LinkIcon.vue.js.map +0 -1
  241. package/dist/GraphMaker/icons/SettingsIcon.vue.d.ts.map +0 -1
  242. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js +0 -91
  243. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js.map +0 -1
  244. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js +0 -30
  245. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js.map +0 -1
  246. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js +0 -29
  247. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js.map +0 -1
  248. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js +0 -12
  249. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js.map +0 -1
  250. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js +0 -7
  251. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js.map +0 -1
  252. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js +0 -26
  253. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js.map +0 -1
  254. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js +0 -7
  255. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js.map +0 -1
  256. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js +0 -51
  257. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js.map +0 -1
  258. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js +0 -21
  259. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js.map +0 -1
  260. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js +0 -7
  261. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js.map +0 -1
  262. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js +0 -12
  263. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js.map +0 -1
  264. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js +0 -14
  265. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js.map +0 -1
  266. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js +0 -19
  267. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js.map +0 -1
  268. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js +0 -11
  269. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js.map +0 -1
  270. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js +0 -11
  271. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js.map +0 -1
  272. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js +0 -24
  273. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js.map +0 -1
  274. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/AxesIcon.vue.d.ts +0 -0
  275. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/DeleteChartIcon.vue.d.ts +0 -0
  276. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/ExportIcon.vue.d.ts +0 -0
  277. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LayersIcon.vue.d.ts +0 -0
  278. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LinkIcon.vue.d.ts +0 -0
  279. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue.d.ts +0 -0
  280. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue.js +0 -0
  281. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue.js.map +0 -0
  282. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue2.js +0 -0
  283. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue2.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/common/Tooltip.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { BLACK } from '../constants';\nimport { exhaustive } from '../utils';\nimport { TextMeasurer } from '../utils/TextMeasurer';\n\ntype Direction = 'left'|'right'|'top'|'bottom';\ntype SideDistances = {\n left: number;\n right: number;\n top: number;\n bottom: number;\n};\n\nconst OFFSET_V = 8;\nconst OFFSET_H = 12;\nconst LINE_HEIGHT = 20;\nconst R = 6;\nconst TAIL_OFFSET = 5;\nconst POSITION_OFFSET = 8;\n\nconst ICON_W = 16;\nconst ICON_OFFSET = 8;\nconst ICONS_WIDTH = ICON_W * 2 + ICON_OFFSET + 16;\n\nconst GREY = '#CFD1DB';\nconst WHITE = '#fff';\n\nconst TOOLTIP_CLASS = 'miplots-tooltip';\n\nexport function getTooltipHeight(content: string[]) {\n return content.length * LINE_HEIGHT + 2 * OFFSET_V;\n}\nexport function getTooltipWidth(content: string[], hasIcons = false) {\n const textMeasurer = new TextMeasurer('600 14px Arial');\n return Math.max(...content.map((str, idx) => textMeasurer.getTextWidth(str) + (idx === 0 && hasIcons ? ICONS_WIDTH : 0))) + 2 * OFFSET_H;\n}\n\nfunction rightTooltipPath(width: number, height: number, shiftY: number) {\n const left = -TAIL_OFFSET - width;\n const right = -TAIL_OFFSET;\n const top = -height / 2 + shiftY;\n const bottom = height / 2 + shiftY;\n return `M 0,0 \n L ${right},${-TAIL_OFFSET} \n V ${top + R}\n Q ${right},${top} ${right - R},${top} \n H ${left + R} \n Q ${left},${top} ${left},${top + R}\n V ${bottom - R}\n Q ${left},${bottom} ${left + R},${bottom}\n H ${right - R}\n Q ${right},${bottom} ${right},${bottom - R}\n V ${TAIL_OFFSET} \n L 0,0 z`;\n}\nfunction leftTooltipPath(width: number, height: number, shiftY: number) {\n const left = TAIL_OFFSET;\n const right = TAIL_OFFSET + width;\n const top = -height / 2 + shiftY;\n const bottom = height / 2 + shiftY;\n return `M 0,0 \n L ${left},${-TAIL_OFFSET} \n V ${top + R}\n Q ${left},${top} ${left + R},${top} \n H ${right - R} \n Q ${right},${top} ${right},${top + R}\n V ${bottom - R}\n Q ${right},${bottom} ${right - R},${bottom}\n H ${left + R}\n Q ${left},${bottom} ${left},${bottom - R}\n V ${TAIL_OFFSET} \n L 0,0 z`;\n}\n\nfunction topTooltipPath(width: number, height: number, shiftX: number) {\n const left = -width / 2 + shiftX;\n const right = width / 2 + shiftX;\n const top = -TAIL_OFFSET - height;\n const bottom = -TAIL_OFFSET;\n return `M 0,0 \n L ${-TAIL_OFFSET},${bottom} \n H ${left + R}\n Q ${left},${bottom} ${left},${bottom - R} \n V ${top + R} \n Q ${left},${top} ${left + R},${top}\n H ${right - R}\n Q ${right},${top} ${right},${top + R}\n V ${bottom - R}\n Q ${right},${bottom} ${right - R},${bottom}\n H ${TAIL_OFFSET} \n L 0,0 z`;\n}\n\nfunction bottomTooltipPath(width: number, height: number, shiftX: number) {\n const left = -width / 2 + shiftX;\n const right = width / 2 + shiftX;\n const bottom = TAIL_OFFSET + height;\n const top = TAIL_OFFSET;\n return `M 0,0 \n L ${-TAIL_OFFSET},${top} \n H ${left + R}\n Q ${left},${top} ${left},${top + R} \n V ${bottom - R} \n Q ${left},${bottom} ${left + R},${bottom}\n H ${right - R}\n Q ${right},${bottom} ${right},${bottom - R}\n V ${top + R}\n Q ${right},${top} ${right - R},${top}\n H ${TAIL_OFFSET} \n L 0,0 z`;\n}\n\nfunction getPath(width: number, height: number, direction: Direction, shiftX: number, shiftY: number):string {\n switch (direction) {\n case 'left': return rightTooltipPath(width, height, shiftY);\n case 'right': return leftTooltipPath(width, height, shiftY);\n case 'top': return topTooltipPath(width, height, shiftX);\n case 'bottom': return bottomTooltipPath(width, height, shiftX);\n default: exhaustive(direction, 'Unknown tooltip direction');\n }\n}\n\nfunction getDirection(width: number, height: number, x: number, y: number, offset:number, sideDistances:SideDistances , horizontal: boolean):Direction {\n if (horizontal) {\n return sideDistances.right - x - offset - TAIL_OFFSET > width ? 'right' : 'left';\n }\n return sideDistances.top + y - offset - TAIL_OFFSET > height ? 'top' : 'bottom';\n}\n\nfunction getContentTransform (direction:Direction, width: number, height: number, offset:number, shiftX: number, shiftY: number) {\n if (direction === 'left' || direction === 'right') {\n return `translate(${(direction === 'left' ? -(offset + TAIL_OFFSET + width) : (offset + TAIL_OFFSET))},${-height / 2 + shiftY})`;\n }\n return `translate(${-width / 2 + shiftX},${direction === 'top' ? -(height + offset + TAIL_OFFSET) : offset + TAIL_OFFSET})`;\n\n}\nfunction getPathTransform (direction:Direction, offset:number) {\n if (direction === 'left' || direction === 'right') {\n return `translate(${direction === 'left' ? -offset : offset},0)`;\n }\n return `translate(0,${direction === 'top' ? -offset : offset})`;\n}\n\nfunction getShiftX (direction:Direction, sideDistances: SideDistances, x: number, width: number) {\n if (direction === 'left' || direction === 'right') {\n return 0;\n }\n const rightFreeSpace = sideDistances.right - x;\n const leftFreeSpace = sideDistances.left + x;\n if (rightFreeSpace < width / 2) {\n return rightFreeSpace - width / 2;\n }\n if (leftFreeSpace < width / 2) {\n return width / 2 - leftFreeSpace;\n }\n return 0;\n}\nfunction getShiftY (direction:Direction, sideDistances: SideDistances, y: number, height: number) {\n if (direction === 'top' || direction === 'bottom') {\n return 0;\n }\n const topFreeSpace = sideDistances.top + y;\n const bottomFreeSpace = sideDistances.bottom - y;\n if (topFreeSpace < height / 2) {\n return height / 2 - topFreeSpace;\n }\n if (bottomFreeSpace < height / 2) {\n return bottomFreeSpace - height / 2;\n }\n return 0;\n}\n\nexport type TooltipsData<T> = {\n active: boolean,\n fixed: boolean,\n selectedData: T | null,\n currentFacet: string,\n onMouseEnter: (elementData:T, facetKey?:string) => void,\n onMouseLeave: () => void,\n onClose: () => void\n}\n\nexport function useTooltip<T = unknown>(onTooltipHintSwitchOuterCallback: (v:boolean) => void = () => undefined): TooltipsData<T> {\n const [selectedData, setSelectedData] = useState<T | null>(null);\n const [fixed, setFixed] = useState(false);\n const openRef = useRef(false);\n const fixedRef = useRef(false);\n const currentFacet = useRef('null');\n const hintTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const close = () => {\n setSelectedData(null);\n openRef.current = false;\n if (hintTimer.current) {\n clearTimeout(hintTimer.current);\n hintTimer.current = null;\n }\n onTooltipHintSwitchOuterCallback(false);\n };\n const closeFixed = () => {\n fixedRef.current = false;\n setFixed(false);\n close();\n };\n const onMouseEnter = useCallback((newElementData:T, facetKey?: string) => {\n if (fixedRef.current) {\n return;\n }\n setSelectedData(newElementData);\n openRef.current = true;\n currentFacet.current = facetKey ?? 'null';\n if (hintTimer.current) {\n clearTimeout(hintTimer.current);\n }\n hintTimer.current = setTimeout(() => {\n onTooltipHintSwitchOuterCallback(true);\n }, 2000);\n }, []);\n const onMouseLeave = useCallback(() => {\n if (fixedRef.current) {\n return;\n }\n close();\n }, []);\n\n const onClose = useCallback(closeFixed, []);\n\n useEffect(() => {\n function handleEnter(e:KeyboardEvent) {\n if (openRef.current && e.key === 'Enter') {\n fixedRef.current = true;\n setFixed(true);\n if (hintTimer.current) {\n clearTimeout(hintTimer.current);\n hintTimer.current = null;\n }\n onTooltipHintSwitchOuterCallback(false);\n }\n }\n function handleClickOutside(e:MouseEvent) {\n if (!fixedRef.current) {\n return;\n }\n //const tooltipNodes = Array.from(document.getElementsByClassName(TOOLTIP_CLASS));\n const tooltipNode = document.querySelector(`.${TOOLTIP_CLASS}`);\n const clickedNode = e.target;\n if (tooltipNode && clickedNode && tooltipNode.contains(clickedNode as Node)) {\n return;\n }\n closeFixed();\n }\n document.addEventListener('keydown', handleEnter);\n document.addEventListener('click', handleClickOutside);\n return () => {\n document.removeEventListener('keydown', handleEnter);\n document.removeEventListener('click', handleClickOutside);\n };\n }, []);\n\n return {\n active: selectedData !== null,\n currentFacet: currentFacet.current,\n fixed,\n selectedData,\n onMouseEnter,\n onMouseLeave,\n onClose\n };\n}\n\nexport function Tooltip({\n content,\n x,\n y,\n active,\n fixed,\n container,\n sideDistances,\n onClose = () => undefined,\n offset = POSITION_OFFSET,\n horizontal = true,\n}: {\n content: string[];\n x: number;\n y: number;\n active: boolean;\n fixed: boolean;\n sideDistances: SideDistances;\n onClose?: () => void;\n offset?: number;\n horizontal?: boolean;\n container?: Element | null;\n}) {\n const width = getTooltipWidth(content, fixed);\n const height = getTooltipHeight(content);\n const direction = getDirection(width, height, x, y, offset, sideDistances, horizontal);\n // shifts for tooltip positioning not in center if it is close to chart edges\n const shiftX = getShiftX(direction, sideDistances, x, width);\n const shiftY = getShiftY(direction, sideDistances, y, height);\n\n const firstIconPosition = `translate(${width - ICON_W - OFFSET_H},${OFFSET_V})`;\n const secondIconPosition = `translate(${width - ICON_W * 2 - ICON_OFFSET - OFFSET_H},${OFFSET_V})`;\n\n const [copied, setCopied] = useState(false);\n const [hoveredClose, setHoveredClose] = useState(false);\n const [hoveredCopy, setHoveredCopy] = useState(false);\n\n function copyToClipboard () {\n window?.navigator?.clipboard.writeText(content.join('\\n'));\n setCopied(true);\n }\n \n if (!active || (!container && container !== null)) {\n return null;\n }\n\n const tooltip = (\n <g\n className={TOOLTIP_CLASS}\n transform={`translate(${sideDistances.left + x},${sideDistances.top + y})`}\n opacity={active ? 1 : 0}\n stroke=\"none\"\n fill=\"none\"\n style={{pointerEvents: fixed ? 'all' : 'none'}}\n >\n <path\n transform={getPathTransform(direction, offset)}\n d={getPath(width, height, direction, shiftX, shiftY)}\n fill={BLACK}\n />\n <g\n fontSize=\"14px\"\n fontFamily=\"Manrope\"\n fill=\"white\"\n transform={getContentTransform(direction, width, height, offset, shiftX, shiftY)}\n >\n {content.map((str, idx) => (\n <text\n key={idx}\n x={OFFSET_H}\n y={OFFSET_V + LINE_HEIGHT * idx + LINE_HEIGHT / 2}\n dominantBaseline=\"central\"\n >\n {str}\n </text>\n ))}\n {fixed && (\n <g transform={firstIconPosition}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4.0006 2.93945L8.0006 6.93945L12.0006 2.93945L13.0613 4.00011L9.06126 8.00011L13.0613 12.0001L12.0006 13.0608L8.0006 9.06077L4.0006 13.0608L2.93994 12.0001L6.93994 8.00011L2.93994 4.00011L4.0006 2.93945Z\"\n fill={hoveredClose ? GREY : WHITE}\n />\n <rect\n x=\"-8\"\n y=\"-8\"\n width=\"24\"\n height=\"24\"\n fill=\"transparent\"\n onClick={onClose}\n onMouseOver={() => setHoveredClose(true)}\n onMouseLeave={() => setHoveredClose(false)}\n style={{cursor: 'pointer'}}\n />\n </g>\n )}\n {fixed && (\n <g transform={secondIconPosition}>\n {copied\n ? (\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M14.0601 4.43439L6.33313 12.5477L1.93945 7.93439L3.02566 6.8999L6.33313 10.3727L12.9739 3.3999L14.0601 4.43439Z\" fill=\"#07AD3E\"/>\n )\n : (\n <g>\n <g clipPath=\"url(#clip0_16418_6183)\">\n <path d=\"M16.0005 13H14.5005V1.5H3.00049V0H14.5005C15.3289 2.86102e-06 16.0005 0.671575 16.0005 1.5V13ZM1.34717 15.9922C0.641178 15.9205 0.0799799 15.3593 0.00830078 14.6533L0.000488281 14.5V4.5C0.000488281 3.72334 0.590765 3.08461 1.34717 3.00781L1.50049 3H11.5005L11.6538 3.00781C12.4102 3.08461 13.0005 3.72334 13.0005 4.5V14.5L12.9927 14.6533C12.921 15.3593 12.3598 15.9205 11.6538 15.9922L11.5005 16H1.50049L1.34717 15.9922ZM11.5005 4.5H1.50049V14.5H11.5005V4.5Z\"\n fill={hoveredCopy ? GREY : WHITE}\n />\n </g>\n <defs>\n <clipPath id=\"clip0_16418_6183\">\n <rect width=\"16\" height=\"16\" transform=\"translate(0.000488281)\" fill=\"white\" />\n </clipPath>\n </defs>\n </g>\n )}\n <rect\n x=\"-8\"\n y=\"-8\"\n width=\"24\"\n height=\"24\"\n fill=\"transparent\"\n onClick={copyToClipboard}\n onMouseOver={() => setHoveredCopy(true)}\n onMouseLeave={() => setHoveredCopy(false)}\n style={{cursor: 'pointer'}}\n />\n </g>\n )}\n </g>\n </g>\n );\n\n return container === null ? tooltip : createPortal(\n tooltip,\n container\n );\n}\n"],"names":["OFFSET_V","OFFSET_H","LINE_HEIGHT","R","TAIL_OFFSET","POSITION_OFFSET","ICON_W","ICON_OFFSET","ICONS_WIDTH","GREY","WHITE","TOOLTIP_CLASS","getTooltipHeight","content","getTooltipWidth","hasIcons","textMeasurer","TextMeasurer","str","idx","rightTooltipPath","width","height","shiftY","left","right","top","bottom","leftTooltipPath","topTooltipPath","shiftX","bottomTooltipPath","getPath","direction","exhaustive","getDirection","x","y","offset","sideDistances","horizontal","getContentTransform","getPathTransform","getShiftX","rightFreeSpace","leftFreeSpace","getShiftY","topFreeSpace","bottomFreeSpace","useTooltip","onTooltipHintSwitchOuterCallback","selectedData","setSelectedData","useState","fixed","setFixed","openRef","useRef","fixedRef","currentFacet","hintTimer","close","closeFixed","onMouseEnter","useCallback","newElementData","facetKey","onMouseLeave","onClose","useEffect","handleEnter","e","handleClickOutside","tooltipNode","clickedNode","Tooltip","active","container","firstIconPosition","secondIconPosition","copied","setCopied","hoveredClose","setHoveredClose","hoveredCopy","setHoveredCopy","copyToClipboard","_a","tooltip","jsxs","jsx","BLACK","a","createPortal"],"mappings":";;;;;;AAcA,MAAMA,IAAW,GACXC,IAAW,IACXC,IAAc,IACdC,IAAI,GACJC,IAAc,GACdC,IAAkB,GAElBC,IAAS,IACTC,IAAc,GACdC,IAAcF,IAAS,IAAIC,IAAc,I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Ac,OAAOW,IAAUK,EAAAA;AAAAA,IAClCL;AAAAA,IACAX;AAAAA,EAAA;AAER;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/common/Tooltip.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { BLACK } from '../constants';\nimport { exhaustive } from '../utils';\nimport { TextMeasurer } from '../utils/TextMeasurer/TextMeasurer';\n\ntype Direction = 'left'|'right'|'top'|'bottom';\ntype SideDistances = {\n left: number;\n right: number;\n top: number;\n bottom: number;\n};\n\nconst OFFSET_V = 8;\nconst OFFSET_H = 12;\nconst LINE_HEIGHT = 20;\nconst R = 6;\nconst TAIL_OFFSET = 5;\nconst POSITION_OFFSET = 8;\n\nconst ICON_W = 16;\nconst ICON_OFFSET = 8;\nconst ICONS_WIDTH = ICON_W * 2 + ICON_OFFSET + 16;\n\nconst GREY = '#CFD1DB';\nconst WHITE = '#fff';\n\nconst TOOLTIP_CLASS = 'miplots-tooltip';\n\nexport function getTooltipHeight(content: string[]) {\n return content.length * LINE_HEIGHT + 2 * OFFSET_V;\n}\nexport function getTooltipWidth(content: string[], hasIcons = false) {\n const textMeasurer = new TextMeasurer('600 14px Arial');\n return Math.max(...content.map((str, idx) => textMeasurer.getTextWidth(str) + (idx === 0 && hasIcons ? ICONS_WIDTH : 0))) + 2 * OFFSET_H;\n}\n\nfunction rightTooltipPath(width: number, height: number, shiftY: number) {\n const left = -TAIL_OFFSET - width;\n const right = -TAIL_OFFSET;\n const top = -height / 2 + shiftY;\n const bottom = height / 2 + shiftY;\n return `M 0,0 \n L ${right},${-TAIL_OFFSET} \n V ${top + R}\n Q ${right},${top} ${right - R},${top} \n H ${left + R} \n Q ${left},${top} ${left},${top + R}\n V ${bottom - R}\n Q ${left},${bottom} ${left + R},${bottom}\n H ${right - R}\n Q ${right},${bottom} ${right},${bottom - R}\n V ${TAIL_OFFSET} \n L 0,0 z`;\n}\nfunction leftTooltipPath(width: number, height: number, shiftY: number) {\n const left = TAIL_OFFSET;\n const right = TAIL_OFFSET + width;\n const top = -height / 2 + shiftY;\n const bottom = height / 2 + shiftY;\n return `M 0,0 \n L ${left},${-TAIL_OFFSET} \n V ${top + R}\n Q ${left},${top} ${left + R},${top} \n H ${right - R} \n Q ${right},${top} ${right},${top + R}\n V ${bottom - R}\n Q ${right},${bottom} ${right - R},${bottom}\n H ${left + R}\n Q ${left},${bottom} ${left},${bottom - R}\n V ${TAIL_OFFSET} \n L 0,0 z`;\n}\n\nfunction topTooltipPath(width: number, height: number, shiftX: number) {\n const left = -width / 2 + shiftX;\n const right = width / 2 + shiftX;\n const top = -TAIL_OFFSET - height;\n const bottom = -TAIL_OFFSET;\n return `M 0,0 \n L ${-TAIL_OFFSET},${bottom} \n H ${left + R}\n Q ${left},${bottom} ${left},${bottom - R} \n V ${top + R} \n Q ${left},${top} ${left + R},${top}\n H ${right - R}\n Q ${right},${top} ${right},${top + R}\n V ${bottom - R}\n Q ${right},${bottom} ${right - R},${bottom}\n H ${TAIL_OFFSET} \n L 0,0 z`;\n}\n\nfunction bottomTooltipPath(width: number, height: number, shiftX: number) {\n const left = -width / 2 + shiftX;\n const right = width / 2 + shiftX;\n const bottom = TAIL_OFFSET + height;\n const top = TAIL_OFFSET;\n return `M 0,0 \n L ${-TAIL_OFFSET},${top} \n H ${left + R}\n Q ${left},${top} ${left},${top + R} \n V ${bottom - R} \n Q ${left},${bottom} ${left + R},${bottom}\n H ${right - R}\n Q ${right},${bottom} ${right},${bottom - R}\n V ${top + R}\n Q ${right},${top} ${right - R},${top}\n H ${TAIL_OFFSET} \n L 0,0 z`;\n}\n\nfunction getPath(width: number, height: number, direction: Direction, shiftX: number, shiftY: number):string {\n switch (direction) {\n case 'left': return rightTooltipPath(width, height, shiftY);\n case 'right': return leftTooltipPath(width, height, shiftY);\n case 'top': return topTooltipPath(width, height, shiftX);\n case 'bottom': return bottomTooltipPath(width, height, shiftX);\n default: exhaustive(direction, 'Unknown tooltip direction');\n }\n}\n\nfunction getDirection(width: number, height: number, x: number, y: number, offset:number, sideDistances:SideDistances , horizontal: boolean):Direction {\n if (horizontal) {\n return sideDistances.right - x - offset - TAIL_OFFSET > width ? 'right' : 'left';\n }\n return sideDistances.top + y - offset - TAIL_OFFSET > height ? 'top' : 'bottom';\n}\n\nfunction getContentTransform (direction:Direction, width: number, height: number, offset:number, shiftX: number, shiftY: number) {\n if (direction === 'left' || direction === 'right') {\n return `translate(${(direction === 'left' ? -(offset + TAIL_OFFSET + width) : (offset + TAIL_OFFSET))},${-height / 2 + shiftY})`;\n }\n return `translate(${-width / 2 + shiftX},${direction === 'top' ? -(height + offset + TAIL_OFFSET) : offset + TAIL_OFFSET})`;\n\n}\nfunction getPathTransform (direction:Direction, offset:number) {\n if (direction === 'left' || direction === 'right') {\n return `translate(${direction === 'left' ? -offset : offset},0)`;\n }\n return `translate(0,${direction === 'top' ? -offset : offset})`;\n}\n\nfunction getShiftX (direction:Direction, sideDistances: SideDistances, x: number, width: number) {\n if (direction === 'left' || direction === 'right') {\n return 0;\n }\n const rightFreeSpace = sideDistances.right - x;\n const leftFreeSpace = sideDistances.left + x;\n if (rightFreeSpace < width / 2) {\n return rightFreeSpace - width / 2;\n }\n if (leftFreeSpace < width / 2) {\n return width / 2 - leftFreeSpace;\n }\n return 0;\n}\nfunction getShiftY (direction:Direction, sideDistances: SideDistances, y: number, height: number) {\n if (direction === 'top' || direction === 'bottom') {\n return 0;\n }\n const topFreeSpace = sideDistances.top + y;\n const bottomFreeSpace = sideDistances.bottom - y;\n if (topFreeSpace < height / 2) {\n return height / 2 - topFreeSpace;\n }\n if (bottomFreeSpace < height / 2) {\n return bottomFreeSpace - height / 2;\n }\n return 0;\n}\n\nexport type TooltipsData<T> = {\n active: boolean,\n fixed: boolean,\n selectedData: T | null,\n currentFacet: string,\n onMouseEnter: (elementData:T, facetKey?:string) => void,\n onMouseLeave: () => void,\n onClose: () => void\n}\n\nexport function useTooltip<T = unknown>(onTooltipHintSwitchOuterCallback: (v:boolean) => void = () => undefined): TooltipsData<T> {\n const [selectedData, setSelectedData] = useState<T | null>(null);\n const [fixed, setFixed] = useState(false);\n const openRef = useRef(false);\n const fixedRef = useRef(false);\n const currentFacet = useRef('null');\n const hintTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const close = () => {\n setSelectedData(null);\n openRef.current = false;\n if (hintTimer.current) {\n clearTimeout(hintTimer.current);\n hintTimer.current = null;\n }\n onTooltipHintSwitchOuterCallback(false);\n };\n const closeFixed = () => {\n fixedRef.current = false;\n setFixed(false);\n close();\n };\n const onMouseEnter = useCallback((newElementData:T, facetKey?: string) => {\n if (fixedRef.current) {\n return;\n }\n setSelectedData(newElementData);\n openRef.current = true;\n currentFacet.current = facetKey ?? 'null';\n if (hintTimer.current) {\n clearTimeout(hintTimer.current);\n }\n hintTimer.current = setTimeout(() => {\n onTooltipHintSwitchOuterCallback(true);\n }, 2000);\n }, []);\n const onMouseLeave = useCallback(() => {\n if (fixedRef.current) {\n return;\n }\n close();\n }, []);\n\n const onClose = useCallback(closeFixed, []);\n\n useEffect(() => {\n function handleEnter(e:KeyboardEvent) {\n if (openRef.current && e.key === 'Enter') {\n fixedRef.current = true;\n setFixed(true);\n if (hintTimer.current) {\n clearTimeout(hintTimer.current);\n hintTimer.current = null;\n }\n onTooltipHintSwitchOuterCallback(false);\n }\n }\n function handleClickOutside(e:MouseEvent) {\n if (!fixedRef.current) {\n return;\n }\n //const tooltipNodes = Array.from(document.getElementsByClassName(TOOLTIP_CLASS));\n const tooltipNode = document.querySelector(`.${TOOLTIP_CLASS}`);\n const clickedNode = e.target;\n if (tooltipNode && clickedNode && tooltipNode.contains(clickedNode as Node)) {\n return;\n }\n closeFixed();\n }\n document.addEventListener('keydown', handleEnter);\n document.addEventListener('click', handleClickOutside);\n return () => {\n document.removeEventListener('keydown', handleEnter);\n document.removeEventListener('click', handleClickOutside);\n };\n }, []);\n\n return {\n active: selectedData !== null,\n currentFacet: currentFacet.current,\n fixed,\n selectedData,\n onMouseEnter,\n onMouseLeave,\n onClose\n };\n}\n\nexport function Tooltip({\n content,\n x,\n y,\n active,\n fixed,\n container,\n sideDistances,\n onClose = () => undefined,\n offset = POSITION_OFFSET,\n horizontal = true,\n}: {\n content: string[];\n x: number;\n y: number;\n active: boolean;\n fixed: boolean;\n sideDistances: SideDistances;\n onClose?: () => void;\n offset?: number;\n horizontal?: boolean;\n container?: Element | null;\n}) {\n const width = getTooltipWidth(content, fixed);\n const height = getTooltipHeight(content);\n const direction = getDirection(width, height, x, y, offset, sideDistances, horizontal);\n // shifts for tooltip positioning not in center if it is close to chart edges\n const shiftX = getShiftX(direction, sideDistances, x, width);\n const shiftY = getShiftY(direction, sideDistances, y, height);\n\n const firstIconPosition = `translate(${width - ICON_W - OFFSET_H},${OFFSET_V})`;\n const secondIconPosition = `translate(${width - ICON_W * 2 - ICON_OFFSET - OFFSET_H},${OFFSET_V})`;\n\n const [copied, setCopied] = useState(false);\n const [hoveredClose, setHoveredClose] = useState(false);\n const [hoveredCopy, setHoveredCopy] = useState(false);\n\n function copyToClipboard () {\n window?.navigator?.clipboard.writeText(content.join('\\n'));\n setCopied(true);\n }\n \n if (!active || (!container && container !== null)) {\n return null;\n }\n\n const tooltip = (\n <g\n className={TOOLTIP_CLASS}\n transform={`translate(${sideDistances.left + x},${sideDistances.top + y})`}\n opacity={active ? 1 : 0}\n stroke=\"none\"\n fill=\"none\"\n style={{pointerEvents: fixed ? 'all' : 'none'}}\n >\n <path\n transform={getPathTransform(direction, offset)}\n d={getPath(width, height, direction, shiftX, shiftY)}\n fill={BLACK}\n />\n <g\n fontSize=\"14px\"\n fontFamily=\"Manrope\"\n fill=\"white\"\n transform={getContentTransform(direction, width, height, offset, shiftX, shiftY)}\n >\n {content.map((str, idx) => (\n <text\n key={idx}\n x={OFFSET_H}\n y={OFFSET_V + LINE_HEIGHT * idx + LINE_HEIGHT / 2}\n dominantBaseline=\"central\"\n >\n {str}\n </text>\n ))}\n {fixed && (\n <g transform={firstIconPosition}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4.0006 2.93945L8.0006 6.93945L12.0006 2.93945L13.0613 4.00011L9.06126 8.00011L13.0613 12.0001L12.0006 13.0608L8.0006 9.06077L4.0006 13.0608L2.93994 12.0001L6.93994 8.00011L2.93994 4.00011L4.0006 2.93945Z\"\n fill={hoveredClose ? GREY : WHITE}\n />\n <rect\n x=\"-8\"\n y=\"-8\"\n width=\"24\"\n height=\"24\"\n fill=\"transparent\"\n onClick={onClose}\n onMouseOver={() => setHoveredClose(true)}\n onMouseLeave={() => setHoveredClose(false)}\n style={{cursor: 'pointer'}}\n />\n </g>\n )}\n {fixed && (\n <g transform={secondIconPosition}>\n {copied\n ? (\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M14.0601 4.43439L6.33313 12.5477L1.93945 7.93439L3.02566 6.8999L6.33313 10.3727L12.9739 3.3999L14.0601 4.43439Z\" fill=\"#07AD3E\"/>\n )\n : (\n <g>\n <g clipPath=\"url(#clip0_16418_6183)\">\n <path d=\"M16.0005 13H14.5005V1.5H3.00049V0H14.5005C15.3289 2.86102e-06 16.0005 0.671575 16.0005 1.5V13ZM1.34717 15.9922C0.641178 15.9205 0.0799799 15.3593 0.00830078 14.6533L0.000488281 14.5V4.5C0.000488281 3.72334 0.590765 3.08461 1.34717 3.00781L1.50049 3H11.5005L11.6538 3.00781C12.4102 3.08461 13.0005 3.72334 13.0005 4.5V14.5L12.9927 14.6533C12.921 15.3593 12.3598 15.9205 11.6538 15.9922L11.5005 16H1.50049L1.34717 15.9922ZM11.5005 4.5H1.50049V14.5H11.5005V4.5Z\"\n fill={hoveredCopy ? GREY : WHITE}\n />\n </g>\n <defs>\n <clipPath id=\"clip0_16418_6183\">\n <rect width=\"16\" height=\"16\" transform=\"translate(0.000488281)\" fill=\"white\" />\n </clipPath>\n </defs>\n </g>\n )}\n <rect\n x=\"-8\"\n y=\"-8\"\n width=\"24\"\n height=\"24\"\n fill=\"transparent\"\n onClick={copyToClipboard}\n onMouseOver={() => setHoveredCopy(true)}\n onMouseLeave={() => setHoveredCopy(false)}\n style={{cursor: 'pointer'}}\n />\n </g>\n )}\n </g>\n </g>\n );\n\n return container === null ? tooltip : createPortal(\n tooltip,\n container\n );\n}\n"],"names":["OFFSET_V","OFFSET_H","LINE_HEIGHT","R","TAIL_OFFSET","POSITION_OFFSET","ICON_W","ICON_OFFSET","ICONS_WIDTH","GREY","WHITE","TOOLTIP_CLASS","getTooltipHeight","content","getTooltipWidth","hasIcons","textMeasurer","TextMeasurer","str","idx","rightTooltipPath","width","height","shiftY","left","right","top","bottom","leftTooltipPath","topTooltipPath","shiftX","bottomTooltipPath","getPath","direction","exhaustive","getDirection","x","y","offset","sideDistances","horizontal","getContentTransform","getPathTransform","getShiftX","rightFreeSpace","leftFreeSpace","getShiftY","topFreeSpace","bottomFreeSpace","useTooltip","onTooltipHintSwitchOuterCallback","selectedData","setSelectedData","useState","fixed","setFixed","openRef","useRef","fixedRef","currentFacet","hintTimer","close","closeFixed","onMouseEnter","useCallback","newElementData","facetKey","onMouseLeave","onClose","useEffect","handleEnter","e","handleClickOutside","tooltipNode","clickedNode","Tooltip","active","container","firstIconPosition","secondIconPosition","copied","setCopied","hoveredClose","setHoveredClose","hoveredCopy","setHoveredCopy","copyToClipboard","_a","tooltip","jsxs","jsx","BLACK","a","createPortal"],"mappings":";;;;;;AAcA,MAAMA,IAAW,GACXC,IAAW,IACXC,IAAc,IACdC,IAAI,GACJC,IAAc,GACdC,IAAkB,GAElBC,IAAS,IACTC,IAAc,GACdC,IAAcF,IAAS,IAAIC,IAAc,IAEzCE,IAAO,WACPC,IAAQ,QAERC,IAAgB;AAEf,SAASC,EAAiBC,GAAmB;AAChD,SAAOA,EAAQ,SAASX,IAAc,IAAIF;AAC9C;AACO,SAASc,EAAgBD,GAAmBE,IAAW,IAAO;AACjE,QAAMC,IAAe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";
3
+ const a = e.createContext(null);
4
+ function s({
5
+ children: r,
6
+ dataFrame: t
7
+ }) {
8
+ return /* @__PURE__ */ o.jsx(a.Provider, { value: { dataFrame: t }, children: r });
9
+ }
10
+ function i() {
11
+ const r = e.useContext(a);
12
+ if (!r)
13
+ throw new Error("useDataFrame is empty");
14
+ return r.dataFrame;
15
+ }
16
+ export {
17
+ s as DataFrameProvider,
18
+ i as useDataFrame
19
+ };
20
+ //# sourceMappingURL=useDataFrame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDataFrame.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/common/useDataFrame.tsx"],"sourcesContent":["import { createContext, type PropsWithChildren, useContext } from 'react';\nimport type { DataFrame } from '../DataFrame';\n\nexport interface DataFrameContextValue {\n dataFrame: DataFrame;\n}\n\nconst DataFrameContext = createContext<DataFrameContextValue | null>(null);\n\nexport interface DataFrameProviderProps {\n dataFrame: DataFrame;\n}\n\nexport function DataFrameProvider({ \n children, \n dataFrame\n}: PropsWithChildren<DataFrameProviderProps>) {\n return (\n <DataFrameContext.Provider value={{ dataFrame }}>\n {children}\n </DataFrameContext.Provider>\n );\n}\n\nexport function useDataFrame(): DataFrame {\n const context = useContext(DataFrameContext);\n \n if (!context) {\n throw new Error('useDataFrame is empty');\n }\n \n return context.dataFrame;\n}\n"],"names":["DataFrameContext","createContext","DataFrameProvider","children","dataFrame","jsx","useDataFrame","context","useContext"],"mappings":";;AAOA,MAAMA,IAAmBC,EAAAA,cAA4C,IAAI;AAMlE,SAASC,EAAkB;AAAA,EAChC,UAAAC;AAAAA,EACA,WAAAC;AACF,GAA8C;AAC5C,SACEC,gBAAAA,EAAAA,IAACL,EAAiB,UAAjB,EAA0B,OAAO,EAAE,WAAAI,EAAAA,GACjC,UAAAD,EAAAA,CACH;AAEJ;AAEO,SAASG,IAA0B;AACxC,QAAMC,IAAUC,EAAAA,WAAWR,CAAgB;AAE3C,MAAI,CAACO;AACH,UAAM,IAAI,MAAM,uBAAuB;AAGzC,SAAOA,EAAQ;AACjB;","x_google_ignoreList":[0]}