@milaboratories/graph-maker 1.1.138 → 1.1.140

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 (253) hide show
  1. package/dist/GraphMaker/components/Chart.vue.d.ts.map +1 -1
  2. package/dist/GraphMaker/components/Chart.vue.js +1 -0
  3. package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
  4. package/dist/GraphMaker/components/LassoControls/index.vue.js +15 -13
  5. package/dist/GraphMaker/components/LassoControls/index.vue.js.map +1 -1
  6. package/dist/GraphMaker/dataBindAes.d.ts +5 -5
  7. package/dist/GraphMaker/dataBindAes.d.ts.map +1 -1
  8. package/dist/GraphMaker/dataBindAes.js +52 -49
  9. package/dist/GraphMaker/dataBindAes.js.map +1 -1
  10. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js +14 -14
  11. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js.map +1 -1
  12. package/dist/GraphMaker/index.vue.d.ts.map +1 -1
  13. package/dist/GraphMaker/index.vue.js +125 -124
  14. package/dist/GraphMaker/index.vue.js.map +1 -1
  15. package/dist/GraphMaker/types.d.ts +1 -1
  16. package/dist/GraphMaker/types.d.ts.map +1 -1
  17. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +6 -0
  18. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -8
  20. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts.map +1 -1
  21. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
  22. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +15 -0
  23. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
  24. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +12 -3
  25. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  26. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +21 -0
  27. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  28. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +10 -6
  29. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +31 -13
  31. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  32. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +56 -62
  33. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
  34. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +29 -13
  35. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
  36. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +20 -19
  37. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
  38. package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
  39. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +57 -54
  40. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
  41. package/dist/lib.js +1 -1
  42. package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js +5 -5
  43. package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js.map +1 -1
  44. package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js +95 -72
  45. package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js.map +1 -1
  46. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +8 -5
  47. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +124 -122
  49. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
  50. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +72 -91
  51. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
  52. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js +43 -41
  53. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
  54. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +28 -0
  55. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -0
  56. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +94 -0
  57. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -0
  58. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +38 -34
  59. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
  60. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
  61. package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js +4 -22
  62. package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js.map +1 -1
  63. package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js.map +1 -1
  64. package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js +11 -11
  65. package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js.map +1 -1
  66. package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js +20 -0
  67. package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js.map +1 -0
  68. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +181 -181
  69. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js.map +1 -1
  70. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js +2 -2
  71. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js.map +1 -1
  72. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js +45 -45
  73. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js.map +1 -1
  74. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js +27 -27
  75. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Legend.js.map +1 -1
  77. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js +18 -18
  78. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js.map +1 -1
  79. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js +36 -36
  80. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js.map +1 -1
  81. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js +45 -41
  82. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js.map +1 -1
  83. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js +33 -33
  84. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js.map +1 -1
  85. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +90 -93
  86. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
  87. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +199 -198
  88. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
  89. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +17 -17
  90. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
  91. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/BoxElement.js.map +1 -1
  92. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +102 -99
  93. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
  94. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js +31 -36
  95. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js.map +1 -1
  96. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js +62 -74
  97. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js.map +1 -1
  98. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js +52 -53
  99. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js.map +1 -1
  100. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js +32 -32
  101. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js.map +1 -1
  102. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +7 -6
  103. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
  104. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js +23 -23
  105. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js.map +1 -1
  106. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js +63 -63
  107. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js.map +1 -1
  108. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js +60 -64
  109. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js.map +1 -1
  110. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +23 -23
  111. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
  112. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js +5 -5
  113. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js.map +1 -1
  114. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js +13 -13
  115. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +1 -1
  116. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +258 -256
  117. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  118. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +1 -1
  119. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
  120. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +81 -79
  121. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  122. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +140 -134
  123. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  124. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +17 -17
  125. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  126. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +99 -95
  127. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  128. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +32 -31
  129. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  130. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js +1 -1
  131. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js.map +1 -1
  132. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
  133. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +143 -142
  134. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js.map +1 -1
  135. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/HistogramSettingsImpl.js.map +1 -1
  136. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js +30 -30
  137. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js.map +1 -1
  138. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +7 -7
  139. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js +53 -54
  140. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js.map +1 -1
  141. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +62 -58
  142. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
  143. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/@d3fc/d3fc-axis/src/axisBase.js +7 -7
  144. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +6 -12
  145. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
  146. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-shape/src/line.js.map +1 -1
  147. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js +148 -0
  148. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js.map +1 -0
  149. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +172 -168
  150. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
  151. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +28 -28
  152. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
  153. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +11 -11
  154. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js +30 -29
  155. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js.map +1 -1
  156. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js +135 -153
  157. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
  158. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js +35 -32
  159. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
  160. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +27 -27
  161. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
  162. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +14 -14
  163. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/constants.js.map +1 -1
  164. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +24 -25
  165. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
  166. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +13 -13
  167. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
  168. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +69 -76
  169. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
  170. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js +85 -83
  171. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
  172. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js +20 -20
  173. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js.map +1 -1
  174. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +50 -38
  175. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
  176. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js +11 -0
  177. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js.map +1 -0
  178. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js +46 -56
  179. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js.map +1 -1
  180. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js +18 -0
  181. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js.map +1 -0
  182. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +223 -205
  183. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
  184. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +26 -26
  185. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
  186. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js +42 -0
  187. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js.map +1 -0
  188. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +84 -81
  189. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
  190. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js +11 -11
  191. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js +15 -14
  192. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js.map +1 -1
  193. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +97 -118
  194. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
  195. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +3 -1
  196. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
  197. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +1 -1
  198. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js.map +1 -1
  199. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +1 -1
  200. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
  201. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +1 -1
  202. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
  203. package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js +1 -1
  204. package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js.map +1 -1
  205. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +23 -17
  206. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
  207. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +25 -19
  208. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
  209. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js +39 -0
  210. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js.map +1 -0
  211. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js +101 -0
  212. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js.map +1 -0
  213. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js +4 -4
  214. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js.map +1 -1
  215. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js +7 -0
  216. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js.map +1 -0
  217. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js +3 -3
  218. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js.map +1 -1
  219. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +1111 -1097
  220. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
  221. package/package.json +3 -3
  222. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js +0 -91
  223. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js.map +0 -1
  224. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js +0 -30
  225. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js.map +0 -1
  226. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js +0 -29
  227. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js.map +0 -1
  228. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js +0 -12
  229. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js.map +0 -1
  230. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js +0 -7
  231. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js.map +0 -1
  232. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js +0 -26
  233. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js.map +0 -1
  234. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js +0 -7
  235. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js.map +0 -1
  236. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js +0 -51
  237. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js.map +0 -1
  238. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js +0 -21
  239. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js.map +0 -1
  240. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js +0 -7
  241. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js.map +0 -1
  242. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js +0 -12
  243. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js.map +0 -1
  244. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js +0 -14
  245. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js.map +0 -1
  246. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js +0 -19
  247. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js.map +0 -1
  248. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js +0 -11
  249. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js.map +0 -1
  250. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js +0 -11
  251. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js.map +0 -1
  252. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js +0 -24
  253. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js.map +0 -1
@@ -0,0 +1,101 @@
1
+ const o = {
2
+ 0: 64,
3
+ 1: 64,
4
+ 2: 64,
5
+ 3: 64,
6
+ 4: 64,
7
+ 5: 64,
8
+ 6: 64,
9
+ 7: 64,
10
+ 8: 64,
11
+ 9: 64,
12
+ a: 61,
13
+ b: 63,
14
+ c: 55,
15
+ d: 63,
16
+ e: 62,
17
+ f: 38,
18
+ g: 63,
19
+ h: 63,
20
+ i: 28,
21
+ j: 30,
22
+ k: 58,
23
+ l: 28,
24
+ m: 97,
25
+ n: 63,
26
+ o: 61,
27
+ p: 63,
28
+ q: 63,
29
+ r: 42,
30
+ s: 52,
31
+ t: 39,
32
+ u: 63,
33
+ v: 59,
34
+ w: 82,
35
+ x: 59,
36
+ y: 59,
37
+ z: 52,
38
+ A: 68,
39
+ B: 69,
40
+ C: 70,
41
+ D: 77,
42
+ E: 63,
43
+ F: 58,
44
+ G: 77,
45
+ H: 75,
46
+ I: 30,
47
+ J: 36,
48
+ K: 68,
49
+ L: 56,
50
+ M: 86,
51
+ N: 75,
52
+ O: 79,
53
+ P: 60,
54
+ Q: 79,
55
+ R: 69,
56
+ S: 63,
57
+ T: 63,
58
+ U: 73,
59
+ V: 68,
60
+ W: 99,
61
+ X: 69,
62
+ Y: 63,
63
+ Z: 69,
64
+ "!": 40,
65
+ '"': 46,
66
+ "#": 84,
67
+ $: 64,
68
+ "%": 95,
69
+ "&": 78,
70
+ "'": 27,
71
+ "(": 39,
72
+ ")": 39,
73
+ "*": 50,
74
+ "+": 84,
75
+ ",": 32,
76
+ "-": 36,
77
+ ".": 32,
78
+ "/": 34,
79
+ ":": 34,
80
+ ";": 34,
81
+ "<": 84,
82
+ "=": 84,
83
+ ">": 84,
84
+ "?": 53,
85
+ "@": 100,
86
+ "[": 39,
87
+ "\\": 34,
88
+ "]": 39,
89
+ "^": 84,
90
+ _: 52,
91
+ "`": 50,
92
+ "{": 64,
93
+ "|": 34,
94
+ "}": 64,
95
+ "~": 84,
96
+ " ": 32
97
+ };
98
+ export {
99
+ o as default
100
+ };
101
+ //# sourceMappingURL=charToWidth.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charToWidth.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { TextMeasurer as F } from "./TextMeasurer.js";
1
+ import { TextMeasurer as F } from "./TextMeasurer/TextMeasurer.js";
2
2
  import { getContinuousLegendWidth as G } from "./getLegendWidth.js";
3
3
  const C = new F("600 14px Manrope"), N = 16, W = 48, O = 20, a = 24;
4
4
  function b(l, o) {
@@ -36,9 +36,9 @@ function k(l, o, d) {
36
36
  let u = o - e;
37
37
  u < i && (u = o, n += t + a, t = 0, e = 0);
38
38
  const p = P(g, u, o, i), M = b([], y), m = t === 0, x = n + M + a;
39
- p.forEach((E, w) => {
40
- const L = w === p.length - 1, $ = w > 0 ? "" : y, S = w > 0 ? `${v}_${w}` : v, T = b(E.map((B) => r[B]), m && !L ? "" : $), z = E.length * i, _ = n, A = e;
41
- T > t && (t = T), L ? e += z + W : e = o, e >= o && (n += t + a, m && L && n < x && (n = x), t = 0, e = 0), c.push({ ...s, id: S, title: $, width: T, height: z, left: _, top: A, values: E });
39
+ p.forEach((T, w) => {
40
+ const E = w === p.length - 1, $ = w > 0 ? "" : y, S = w > 0 ? `${v}_${w}` : v, L = b(T.map((B) => r[B]), m && !E ? "" : $), z = T.length * i, _ = n, A = e;
41
+ L > t && (t = L), E ? e += z + W : e = o, e >= o && (n += t + a, m && E && n < x && (n = x), t = 0, e = 0), c.push({ ...s, id: S, title: $, width: L, height: z, left: _, top: A, values: T });
42
42
  });
43
43
  }
44
44
  }), c;
@@ -1 +1 @@
1
- {"version":3,"file":"arrangeLegendParts.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/arrangeLegendParts.ts"],"sourcesContent":["import type { LegendItem } from '../common/types';\nimport { TextMeasurer } from './TextMeasurer';\nimport { getContinuousLegendWidth } from './getLegendWidth';\n\nconst textMeasurer = new TextMeasurer('600 14px Manrope');\nconst LINE_HEIGHT = 16;\nconst GROUP_OFFSET = 48;\nconst TEXT_LEFT_DISCRETE = 20;\nconst COLUMN_OFFSET = 24;\n\nfunction getLegendItemWidth(keys: string[], title: string) {\n return Math.max(\n ...keys.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}\n\nfunction splitLegendPart<T extends string | number>(values:T[], firstPartHeight:number, maxHeight:number, lineHeight: number):T[][] {\n const parts:T[][] = [[]];\n let currentPartHeight = 0;\n let currentAvailableHeight = firstPartHeight;\n let partIdx = 0;\n values.forEach(v => {\n if (currentPartHeight + lineHeight <= currentAvailableHeight) {\n parts[partIdx].push(v);\n currentPartHeight += lineHeight;\n } else {\n parts.push([v]);\n partIdx++;\n currentPartHeight = lineHeight;\n currentAvailableHeight = maxHeight;\n }\n });\n return parts;\n}\n\nexport function arrangeLegendParts(legendItems: LegendItem[], maxHeight:number, continuousHeight?:number):LegendItem[] {\n const continuousItemHeight = continuousHeight ?? maxHeight;\n let currentColumnWidth = 0;\n let currentColumnHeight = 0;\n let currentLeft = 0;\n // continuous bars on the left, then discrete lists, then sizes\n legendItems.sort((item1, item2) => {\n if (item1.type === 'continuous' && item2.type !== 'continuous') {\n return -1;\n }\n if (item2.type === 'continuous' && item1.type !== 'continuous') {\n return 1;\n }\n if (item1.type === 'dots' && item2.type !== 'dots') {\n return -1;\n }\n if (item2.type === 'dots' && item1.type !== 'dots') {\n return 1;\n }\n return 0;\n });\n\n const updatedLegendItems:LegendItem[] = [];\n legendItems.forEach((item) => {\n const {type, values, title, id, scale} = item;\n if (type === 'continuous') {\n const width = getContinuousLegendWidth(values, title);\n const height = continuousItemHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n \n updatedLegendItems.push({...item, width, height, left, top});\n } else if (type === 'size') {\n const {labels} = item;\n const lineHeight = (scale(Math.max(...values)) * 2 + 4);\n const width = getLegendItemWidth(values.map(v => labels[v]), title);\n const height = values.length * lineHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, width, height, left, top});\n } else {\n const {labels} = item;\n const lineHeight = LINE_HEIGHT;\n\n let verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < lineHeight) {\n verticalRest = maxHeight;\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n // split values under one title into several columns if too many values\n const groupedValues = splitLegendPart<typeof values[0]>(values, verticalRest, maxHeight, lineHeight);\n\n const titleWidth = getLegendItemWidth([], title);\n\n const startFromTheTop = currentColumnWidth === 0;\n const leftByTitle = currentLeft + titleWidth + COLUMN_OFFSET; // for very wide titles; we don't want include title width to first column width; but if the title is too wide we move it after all column parts;\n groupedValues.forEach((valuesPart, idx) => {\n const last = idx === groupedValues.length - 1;\n const partTitle = idx > 0 ? '' : title;\n const partId = idx > 0 ? `${id}_${idx}` : id;\n const width = getLegendItemWidth(valuesPart.map(v => labels[v]), startFromTheTop && !last ? '' : partTitle);\n const height = valuesPart.length * lineHeight;\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n if (last) {\n currentColumnHeight += height + GROUP_OFFSET;\n } else {\n currentColumnHeight = maxHeight;\n }\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n if (startFromTheTop && last && currentLeft < leftByTitle) {\n currentLeft = leftByTitle;\n }\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, id: partId, title: partTitle, width, height, left, top, values: valuesPart} as LegendItem);\n });\n }\n });\n return updatedLegendItems;\n}"],"names":["textMeasurer","TextMeasurer","LINE_HEIGHT","GROUP_OFFSET","TEXT_LEFT_DISCRETE","COLUMN_OFFSET","getLegendItemWidth","keys","title","text","splitLegendPart","values","firstPartHeight","maxHeight","lineHeight","parts","currentPartHeight","currentAvailableHeight","partIdx","v","arrangeLegendParts","legendItems","continuousHeight","continuousItemHeight","currentColumnWidth","currentColumnHeight","currentLeft","item1","item2","updatedLegendItems","item","type","id","scale","width","getContinuousLegendWidth","height","left","top","labels","g","verticalRest","groupedValues","titleWidth","startFromTheTop","leftByTitle","valuesPart","idx","last","partTitle","partId"],"mappings":";;AAIA,MAAMA,IAAe,IAAIC,EAAa,kBAAkB,GAClDC,IAAc,IACdC,IAAe,IACfC,IAAqB,IACrBC,IAAgB;AAEtB,SAASC,EAAmBC,GAAgBC,GAAe;AACvD,SAAO,KAAK;AAAA,IACR,GAAGD,EAAK,IAAI,CAAAE,MAAQT,EAAa,aAAa,OAAOS,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAChFJ,EAAa,aAAaQ,CAAK;AAAA,EAAA;AAEvC;AAEA,SAASE,EAA2CC,GAAYC,GAAwBC,GAAkBC,GAA0B;AAChI,QAAMC,IAAc,CAAC,EAAE;AACvB,MAAIC,IAAoB,GACpBC,IAAyBL,GACzBM,IAAU;AACd,SAAAP,EAAO,QAAQ,CAAAQ,MAAK;AACZH,QAAoBF,K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Bc,IACAvB,KAAuBW,IAASjC,IAEhCsB,IAAsBZ,GAEtBY,KAAuBZ,MACvBa,KAAeF,IAAqBnB,GAChCuC,KAAmBI,KAAQtB,IAAcmB,MACzCnB,IAAcmB,IAElBrB,IAAqB,GACrBC,IAAsB,IAE1BI,EAAmB,KAAK,EAAC,GAAGC,GAAM,IAAIoB,GAAQ,OAAOD,GAAW,OAAAf,GAAO,QAAAE,GAAQ,MAAAC,GAAM,KAAAC,GAAK,QAAQQ,GAAyB;AAAA,MAC/H,CAAC;AAAA,IACL;AAAA,EACJ,CAAC,GACMjB;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"arrangeLegendParts.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/arrangeLegendParts.ts"],"sourcesContent":["import type { LegendItem } from '../common/types';\nimport { TextMeasurer } from './TextMeasurer/TextMeasurer';\nimport { getContinuousLegendWidth } from './getLegendWidth';\n\nconst textMeasurer = new TextMeasurer('600 14px Manrope');\nconst LINE_HEIGHT = 16;\nconst GROUP_OFFSET = 48;\nconst TEXT_LEFT_DISCRETE = 20;\nconst COLUMN_OFFSET = 24;\n\nfunction getLegendItemWidth(keys: string[], title: string) {\n return Math.max(\n ...keys.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}\n\nfunction splitLegendPart<T extends string | number>(values: T[], firstPartHeight: number, maxHeight: number, lineHeight: number):T[][] {\n const parts:T[][] = [[]];\n let currentPartHeight = 0;\n let currentAvailableHeight = firstPartHeight;\n let partIdx = 0;\n values.forEach(v => {\n if (currentPartHeight + lineHeight <= currentAvailableHeight) {\n parts[partIdx].push(v);\n currentPartHeight += lineHeight;\n } else {\n parts.push([v]);\n partIdx++;\n currentPartHeight = lineHeight;\n currentAvailableHeight = maxHeight;\n }\n });\n return parts;\n}\n\nexport function arrangeLegendParts(legendItems: LegendItem[], maxHeight:number, continuousHeight?:number):LegendItem[] {\n const continuousItemHeight = continuousHeight ?? maxHeight;\n let currentColumnWidth = 0;\n let currentColumnHeight = 0;\n let currentLeft = 0;\n // continuous bars on the left, then discrete lists, then sizes\n legendItems.sort((item1, item2) => {\n if (item1.type === 'continuous' && item2.type !== 'continuous') {\n return -1;\n }\n if (item2.type === 'continuous' && item1.type !== 'continuous') {\n return 1;\n }\n if (item1.type === 'dots' && item2.type !== 'dots') {\n return -1;\n }\n if (item2.type === 'dots' && item1.type !== 'dots') {\n return 1;\n }\n return 0;\n });\n\n const updatedLegendItems:LegendItem[] = [];\n legendItems.forEach((item) => {\n const {type, values, title, id, scale} = item;\n if (type === 'continuous') {\n const width = getContinuousLegendWidth(values, title);\n const height = continuousItemHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n \n updatedLegendItems.push({...item, width, height, left, top});\n } else if (type === 'size') {\n const {labels} = item;\n const lineHeight = (scale(Math.max(...values)) * 2 + 4);\n const width = getLegendItemWidth(values.map(v => labels[v]), title);\n const height = values.length * lineHeight;\n\n const verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < height) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n currentColumnHeight += height + GROUP_OFFSET;\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, width, height, left, top});\n } else {\n const {labels} = item;\n const lineHeight = LINE_HEIGHT;\n\n let verticalRest = maxHeight - currentColumnHeight;\n if (verticalRest < lineHeight) {\n verticalRest = maxHeight;\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n // split values under one title into several columns if too many values\n const groupedValues = splitLegendPart<typeof values[number]>(values, verticalRest, maxHeight, lineHeight);\n\n const titleWidth = getLegendItemWidth([], title);\n\n const startFromTheTop = currentColumnWidth === 0;\n const leftByTitle = currentLeft + titleWidth + COLUMN_OFFSET; // for very wide titles; we don't want include title width to first column width; but if the title is too wide we move it after all column parts;\n groupedValues.forEach((valuesPart, idx) => {\n const last = idx === groupedValues.length - 1;\n const partTitle = idx > 0 ? '' : title;\n const partId = idx > 0 ? `${id}_${idx}` : id;\n const width = getLegendItemWidth(valuesPart.map(v => labels[v]), startFromTheTop && !last ? '' : partTitle);\n const height = valuesPart.length * lineHeight;\n const left = currentLeft;\n const top = currentColumnHeight;\n if (width > currentColumnWidth) {\n currentColumnWidth = width;\n }\n if (last) {\n currentColumnHeight += height + GROUP_OFFSET;\n } else {\n currentColumnHeight = maxHeight;\n }\n if (currentColumnHeight >= maxHeight) {\n currentLeft += currentColumnWidth + COLUMN_OFFSET;\n if (startFromTheTop && last && currentLeft < leftByTitle) {\n currentLeft = leftByTitle;\n }\n currentColumnWidth = 0;\n currentColumnHeight = 0;\n }\n updatedLegendItems.push({...item, id: partId, title: partTitle, width, height, left, top, values: valuesPart} as LegendItem);\n });\n }\n });\n return updatedLegendItems;\n}"],"names":["textMeasurer","TextMeasurer","LINE_HEIGHT","GROUP_OFFSET","TEXT_LEFT_DISCRETE","COLUMN_OFFSET","getLegendItemWidth","keys","title","text","splitLegendPart","values","firstPartHeight","maxHeight","lineHeight","parts","currentPartHeight","currentAvailableHeight","partIdx","v","arrangeLegendParts","legendItems","continuousHeight","continuousItemHeight","currentColumnWidth","currentColumnHeight","currentLeft","item1","item2","updatedLegendItems","item","type","id","scale","width","getContinuousLegendWidth","height","left","top","labels","g","verticalRest","groupedValues","titleWidth","startFromTheTop","leftByTitle","valuesPart","idx","last","partTitle","partId"],"mappings":";;AAIA,MAAMA,IAAe,IAAIC,EAAa,kBAAkB,GAClDC,IAAc,IACdC,IAAe,IACfC,IAAqB,IACrBC,IAAgB;AAEtB,SAASC,EAAmBC,GAAgBC,GAAe;AACvD,SAAO,KAAK;AAAA,IACR,GAAGD,EAAK,IAAI,CAAAE,MAAQT,EAAa,aAAa,OAAOS,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAChFJ,EAAa,aAAaQ,CAAK;AAAA,EAAA;AAEvC;AAEA,SAASE,EAA2CC,GAAaC,GAAyBC,GAAmBC,GAA0B;AACnI,QAAMC,IAAc,CAAC,EAAE;AACvB,MAAIC,IAAoB,GACpBC,IAAyBL,GACzBM,IAAU;AACd,SAAAP,EAAO,QAAQ,CAAAQ,MAAK;AACZH,QAAoBF,KAAcG,KAClCF,EAAMG,CAAO,EAAE,KAAKC,CAAC,GACrBH,KAAqBF,MAErBC,EAAM,KAAK,CAACI,CAAC,CAAC,GACdD,KACAF,IAAoBF,GACpBG,IAAyBJ;AAAAA,EAEjC,CAAC,GACME;AACX;AAEO,SAASK,EAAmBC,GAA2BR,GAAkBS,GAAuC;AACnH,QAAMC,IAAuBD,KAAoBT;AACjD,MAAIW,IAAqB,GACrBC,IAAsB,GACtBC,IAAc;AAElBL,EAAAA,EAAY,KAAK,CAACM,GAAOC,MACjBD,EAAM,SAAS,gBAAgBC,EAAM,SAAS,eACvC,KAEPA,EAAM,SAAS,gBAAgBD,EAAM,SAAS,eACvC,IAEPA,EAAM,SAAS,UAAUC,EAAM,SAAS,SACjC,KAEPA,EAAM,SAAS,UAAUD,EAAM,SAAS,SACjC,IAEJ,CACV;AAED,QAAME,IAAkC,CAAA;AACxC,SAAAR,EAAY,QAAQ,CAACS,MAAS;AAC1B,UAAM,EAAC,MAAAC,GAAM,QAAApB,GAA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AAqBnB,GACpCmB,IAAqB,GACrBC,IAAsB;AAG1B,YAAMiB,IAAgBhC,EAAuCC,GAAQ8B,GAAc5B,GAAWC,CAAU,GAElG6B,IAAarC,EAAmB,CAAA,GAAIE,CAAK,GAEzCoC,IAAkBpB,MAAuB,GACzCqB,IAAcnB,IAAciB,IAAatC;AAC/CqC,MAAAA,EAAc,QAAQ,CAACI,GAAYC,MAAQ;AACvC,cAAMC,IAAOD,MAAQL,EAAc,SAAS,GACtCO,IAAYF,IAAM,IAAI,KAAKvC,GAC3B0C,IAASH,IAAM,IAAI,GAAGf,CAAE,IAAIe,CAAG,KAAKf,GACpCE,IAAQ5B,EAAmBwC,EAAW,IAAI,CAAA3B,MAAKoB,EAAOpB,CAAC,CAAC,GAAGyB,KAAmB,CAACI,IAAO,KAAKC,CAAS,GACpGb,IAASU,EAAW,SAAShC,GAC7BuB,IAAOX,GACPY,IAAMb;AACRS,QAAAA,IAAQV,MACRA,IAAqBU,IAErBc,IACAvB,KAAuBW,IAASjC,IAEhCsB,IAAsBZ,GAEtBY,KAAuBZ,MACvBa,KAAeF,IAAqBnB,GAChCuC,KAAmBI,KAAQtB,IAAcmB,MACzCnB,IAAcmB,IAElBrB,IAAqB,GACrBC,IAAsB,IAE1BI,EAAmB,KAAK,EAAC,GAAGC,GAAM,IAAIoB,GAAQ,OAAOD,GAAW,OAAAf,GAAO,QAAAE,GAAQ,MAAAC,GAAM,KAAAC,GAAK,QAAQQ,GAAyB;AAAA,MAC/H,CAAC;AAAA,IACL;AAAA,EACJ,CAAC,GACMjB;AACX;","x_google_ignoreList":[0]}
@@ -0,0 +1,7 @@
1
+ function o(l, n) {
2
+ return !l && !n ? !1 : !l && n || !n && l || (l == null ? void 0 : l.length) !== (n == null ? void 0 : n.length) ? !0 : l == null ? void 0 : l.some((r, u) => r !== (n == null ? void 0 : n[u]));
3
+ }
4
+ export {
5
+ o as arraysAreDifferent
6
+ };
7
+ //# sourceMappingURL=arraysAreDifferent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arraysAreDifferent.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/arraysAreDifferent.ts"],"sourcesContent":["\nexport function arraysAreDifferent(arr1?:unknown[] | null, arr2?:unknown[] | null) {\n if (!arr1 && !arr2) {\n return false;\n }\n if (!arr1 && arr2 || !arr2 && arr1 || arr1?.length !== arr2?.length) {\n return true;\n }\n return arr1?.some((el, idx) => el !== arr2?.[idx]) as boolean;\n}"],"names":["arraysAreDifferent","arr1","arr2","el","idx"],"mappings":"AACO,SAASA,EAAmBC,GAAwBC,GAAwB;AAC/E,SAAI,CAACD,KAAQ,CAACC,IACH,KAEP,CAACD,KAAQC,KAAQ,CAACA,KAAQD,MAAQA,KAAA,gBAAAA,EAAM,aAAWC,KAAA,OAAA,SAAAA,EAAM,UAClD,KAEJD,KAAA,OAAA,SAAAA,EAAM,KAAK,CAACE,GAAIC,MAAQD,OAAOD,KAAA,gBAAAA,EAAOE,CAAAA,EAAAA;AACjD;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { TextMeasurer as r } from "./TextMeasurer.js";
1
+ import { TextMeasurer as r } from "./TextMeasurer/TextMeasurer.js";
2
2
  const t = new r("bold 14px Arial"), a = 20, d = 24;
3
3
  function o(e, i) {
4
4
  return Math.max(
@@ -6,7 +6,7 @@ function o(e, i) {
6
6
  t.getTextWidth(i)
7
7
  );
8
8
  }
9
- function h(e, i) {
9
+ function x(e, i) {
10
10
  return Math.max(
11
11
  ...e.domain().map((n) => t.getTextWidth(String(n)) + a),
12
12
  t.getTextWidth(i)
@@ -14,6 +14,6 @@ function h(e, i) {
14
14
  }
15
15
  export {
16
16
  o as getContinuousLegendWidth,
17
- h as getDiscreteLegendWidth
17
+ x as getDiscreteLegendWidth
18
18
  };
19
19
  //# sourceMappingURL=getLegendWidth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLegendWidth.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/getLegendWidth.ts"],"sourcesContent":["import {TextMeasurer} from './TextMeasurer';\nimport type {ScaleOrdinal} from 'd3-scale';\n\nconst textMeasurer = new TextMeasurer('bold 14px Arial');\nconst TEXT_LEFT_DISCRETE = 20;\nconst TEXT_LEFT_CONTINUOUS = 24;\nexport function getContinuousLegendWidth(scaleTicks: number[], title: string) {\n return Math.max(\n ...scaleTicks.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_CONTINUOUS),\n textMeasurer.getTextWidth(title)\n );\n}\nexport function getDiscreteLegendWidth(scale: ScaleOrdinal<string, string>, title: string) {\n return Math.max(\n ...scale.domain().map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}"],"names":["textMeasurer","TextMeasurer","TEXT_LEFT_DISCRETE","TEXT_LEFT_CONTINUOUS","getContinuousLegendWidth","scaleTicks","title","text","getDiscreteLegendWidth","scale"],"mappings":";AAGA,MAAMA,IAAe,IAAIC,EAAa,iBAAiB,GACjDC,IAAqB,IACrBC,IAAuB;AACtB,SAASC,EAAyBC,GAAsBC,GAAe;AAC1E,SAAO,KAAK;AAAA,IACR,GAAGD,EAAW,IAAI,CAAAE,MAAQP,EAAa,aAAa,OAAOO,CAAI,CAAC,IAAIJ,CAAoB;AAAA,IACxFH,EAAa,aAAaM,CAAK;AAAA,EAAA;AAEvC;AACO,SAASE,EAAuBC,GAAqCH,GAAe;AACvF,SAAO,KAAK;AAAA,IACR,GAAGG,EAAM,SAAS,IAAI,CAAAF,MAAQP,EAAa,aAAa,OAAOO,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAC1FF,EAAa,aAAaM,CAAK;AAAA,EAAA;AAEvC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"getLegendWidth.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/getLegendWidth.ts"],"sourcesContent":["import type { ScaleOrdinal } from 'd3-scale';\nimport { TextMeasurer } from './TextMeasurer/TextMeasurer';\n\nconst textMeasurer = new TextMeasurer('bold 14px Arial');\nconst TEXT_LEFT_DISCRETE = 20;\nconst TEXT_LEFT_CONTINUOUS = 24;\nexport function getContinuousLegendWidth(scaleTicks: number[], title: string) {\n return Math.max(\n ...scaleTicks.map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_CONTINUOUS),\n textMeasurer.getTextWidth(title)\n );\n}\nexport function getDiscreteLegendWidth(scale: ScaleOrdinal<string, string>, title: string) {\n return Math.max(\n ...scale.domain().map(text => textMeasurer.getTextWidth(String(text)) + TEXT_LEFT_DISCRETE),\n textMeasurer.getTextWidth(title)\n );\n}"],"names":["textMeasurer","TextMeasurer","TEXT_LEFT_DISCRETE","TEXT_LEFT_CONTINUOUS","getContinuousLegendWidth","scaleTicks","title","text","getDiscreteLegendWidth","scale"],"mappings":";AAGA,MAAMA,IAAe,IAAIC,EAAa,iBAAiB,GACjDC,IAAqB,IACrBC,IAAuB;AACtB,SAASC,EAAyBC,GAAsBC,GAAe;AAC1E,SAAO,KAAK;AAAA,IACR,GAAGD,EAAW,IAAI,CAAAE,MAAQP,EAAa,aAAa,OAAOO,CAAI,CAAC,IAAIJ,CAAoB;AAAA,IACxFH,EAAa,aAAaM,CAAK;AAAA,EAAA;AAEvC;AACO,SAASE,EAAuBC,GAAqCH,GAAe;AACvF,SAAO,KAAK;AAAA,IACR,GAAGG,EAAM,SAAS,IAAI,CAAAF,MAAQP,EAAa,aAAa,OAAOO,CAAI,CAAC,IAAIL,CAAkB;AAAA,IAC1FF,EAAa,aAAaM,CAAK;AAAA,EAAA;AAEvC;","x_google_ignoreList":[0]}