@milaboratories/miplots4 1.0.170 → 1.0.172

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 (131) hide show
  1. package/README.md +11 -6
  2. package/dist/_virtual/client.js +1 -1
  3. package/dist/_virtual/client2.js +2 -2
  4. package/dist/_virtual/index.js +1 -1
  5. package/dist/_virtual/index2.js +1 -1
  6. package/dist/_virtual/jsx-runtime.js +1 -1
  7. package/dist/_virtual/react-dom-client.development.js +5 -0
  8. package/dist/_virtual/react-dom-client.development.js.map +1 -0
  9. package/dist/_virtual/react-dom-client.production.js +5 -0
  10. package/dist/_virtual/react-dom-client.production.js.map +1 -0
  11. package/dist/_virtual/{react-dom-server-legacy.browser.production.min.js → react-dom-server-legacy.browser.production.js} +1 -1
  12. package/dist/_virtual/react-dom-server-legacy.browser.production.js.map +1 -0
  13. package/dist/_virtual/react-dom-server.browser.production.js +5 -0
  14. package/dist/_virtual/react-dom-server.browser.production.js.map +1 -0
  15. package/dist/_virtual/react-dom.production.js +5 -0
  16. package/dist/_virtual/react-dom.production.js.map +1 -0
  17. package/dist/_virtual/react-jsx-runtime.production.js +5 -0
  18. package/dist/_virtual/react-jsx-runtime.production.js.map +1 -0
  19. package/dist/_virtual/react.production.js +5 -0
  20. package/dist/_virtual/react.production.js.map +1 -0
  21. package/dist/_virtual/scheduler.production.js +5 -0
  22. package/dist/_virtual/scheduler.production.js.map +1 -0
  23. package/dist/_virtual/server.browser.js +1 -1
  24. package/dist/bubble/ChartRenderer.js +143 -146
  25. package/dist/bubble/ChartRenderer.js.map +1 -1
  26. package/dist/bubble/index.js.map +1 -1
  27. package/dist/common/ErrorBoundary.d.ts +1 -1
  28. package/dist/dendro/ChartRenderer.js +175 -174
  29. package/dist/dendro/ChartRenderer.js.map +1 -1
  30. package/dist/dendro/index.js.map +1 -1
  31. package/dist/discrete/index.js.map +1 -1
  32. package/dist/heatmap/index.js.map +1 -1
  33. package/dist/histogram/index.js.map +1 -1
  34. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +17062 -0
  35. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js.map +1 -0
  36. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +9790 -0
  37. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js.map +1 -0
  38. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +6245 -0
  39. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js.map +1 -0
  40. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +4106 -0
  41. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js.map +1 -0
  42. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.development.js +6763 -0
  43. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.development.js.map +1 -0
  44. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.production.js +4655 -0
  45. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-server.browser.production.js.map +1 -0
  46. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.development.js +228 -0
  47. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.development.js.map +1 -0
  48. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.production.js +148 -0
  49. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom.production.js.map +1 -0
  50. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +24 -0
  51. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js.map +1 -0
  52. package/dist/node_modules/.pnpm/{react-dom@18.3.1_react@18.3.1 → react-dom@19.2.4_react@19.2.4}/node_modules/react-dom/index.js +1 -1
  53. package/dist/node_modules/.pnpm/{react-dom@18.3.1_react@18.3.1 → react-dom@19.2.4_react@19.2.4}/node_modules/react-dom/index.js.map +1 -1
  54. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/server.browser.js +16 -0
  55. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/server.browser.js.map +1 -0
  56. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js +246 -0
  57. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
  58. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js +36 -0
  59. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js.map +1 -0
  60. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js +865 -0
  61. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js.map +1 -0
  62. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js +373 -0
  63. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js.map +1 -0
  64. package/dist/node_modules/.pnpm/{react@18.3.1 → react@19.2.4}/node_modules/react/index.js +1 -1
  65. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/index.js.map +1 -0
  66. package/dist/node_modules/.pnpm/{react@18.3.1 → react@19.2.4}/node_modules/react/jsx-runtime.js +3 -3
  67. package/dist/node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js.map +1 -0
  68. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +237 -0
  69. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js.map +1 -0
  70. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +234 -0
  71. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js.map +1 -0
  72. package/dist/node_modules/.pnpm/{scheduler@0.23.2 → scheduler@0.27.0}/node_modules/scheduler/index.js +1 -1
  73. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js.map +1 -0
  74. package/dist/scatterplot/ChartRenderer.js +149 -152
  75. package/dist/scatterplot/ChartRenderer.js.map +1 -1
  76. package/dist/scatterplot/index.js.map +1 -1
  77. package/dist/scatterplot-umap/ChartRenderer.js +152 -155
  78. package/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
  79. package/dist/utils/arrangeLegendParts.js +35 -35
  80. package/dist/utils/arrangeLegendParts.js.map +1 -1
  81. package/dist/utils/getContinuousLegendTicks.js +5 -8
  82. package/dist/utils/getContinuousLegendTicks.js.map +1 -1
  83. package/dist/utils/getSizeLegendItem.d.ts +3 -0
  84. package/dist/utils/getSizeLegendItem.js +15 -0
  85. package/dist/utils/getSizeLegendItem.js.map +1 -0
  86. package/dist/utils/numberFormat.d.ts +1 -0
  87. package/dist/utils/numberFormat.js +9 -4
  88. package/dist/utils/numberFormat.js.map +1 -1
  89. package/package.json +7 -5
  90. package/dist/_virtual/react-dom-server-legacy.browser.production.min.js.map +0 -1
  91. package/dist/_virtual/react-dom-server.browser.production.min.js +0 -5
  92. package/dist/_virtual/react-dom-server.browser.production.min.js.map +0 -1
  93. package/dist/_virtual/react-dom.production.min.js +0 -5
  94. package/dist/_virtual/react-dom.production.min.js.map +0 -1
  95. package/dist/_virtual/react-jsx-runtime.production.min.js +0 -5
  96. package/dist/_virtual/react-jsx-runtime.production.min.js.map +0 -1
  97. package/dist/_virtual/react.production.min.js +0 -5
  98. package/dist/_virtual/react.production.min.js.map +0 -1
  99. package/dist/_virtual/scheduler.production.min.js +0 -5
  100. package/dist/_virtual/scheduler.production.min.js.map +0 -1
  101. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -3622
  102. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js.map +0 -1
  103. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0 -1235
  104. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js.map +0 -1
  105. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -3601
  106. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.development.js.map +0 -1
  107. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +0 -1256
  108. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js.map +0 -1
  109. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js +0 -13457
  110. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js.map +0 -1
  111. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js +0 -5177
  112. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js.map +0 -1
  113. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js +0 -33
  114. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js.map +0 -1
  115. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/server.browser.js +0 -16
  116. package/dist/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/server.browser.js.map +0 -1
  117. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +0 -605
  118. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
  119. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -29
  120. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +0 -1
  121. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js +0 -1274
  122. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js.map +0 -1
  123. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js +0 -209
  124. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js.map +0 -1
  125. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/index.js.map +0 -1
  126. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js.map +0 -1
  127. package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.js +0 -278
  128. package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.js.map +0 -1
  129. package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js +0 -214
  130. package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js.map +0 -1
  131. package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.js.map +0 -1
package/README.md CHANGED
@@ -4,14 +4,19 @@
4
4
 
5
5
  ### Install ###
6
6
 
7
- `npm i @milaboratories/miplots4 --save`
7
+ `pnpm install`
8
8
 
9
9
  ### Build and install locally ###
10
10
 
11
- `npm run build && npm pack`
11
+ `pnpm run build && pnpm do-pack`
12
12
 
13
- This command will generate a .tgz file at the directory's root like this ./milaboratories-miplots4-1.0.0.tgz
13
+ This command will generate a .tgz file at the directory's root: ./package.tgz
14
14
 
15
- In the directory of the project that you want to test the MiPlots package, just run an `npm install` with the path to this .tgz file:
16
-
17
- `npm i /abs/path/to/the/file/milaboratory-miplots4-1.0.0.tgz --save`
15
+ It can be installed in another project using 'overrides' in package.json:
16
+ ```
17
+ "pnpm": {
18
+ "overrides": {
19
+ "@milaboratories/miplots4": "/path/to/folder/visualizations/packages/miplots4/package.tgz"
20
+ }
21
+ }
22
+ ```
@@ -1,4 +1,4 @@
1
- import { __require as r } from "../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js";
1
+ import { __require as r } from "../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js";
2
2
  var i = r();
3
3
  export {
4
4
  i as c
@@ -1,5 +1,5 @@
1
- var e = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- e as __exports
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=client2.js.map
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as t } from "../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js";
2
+ import { __require as t } from "../node_modules/.pnpm/react@19.2.4/node_modules/react/index.js";
3
3
  var e = t();
4
4
  const s = /* @__PURE__ */ r(e);
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { __require as r } from "../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js";
1
+ import { __require as r } from "../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/index.js";
2
2
  var o = r();
3
3
  export {
4
4
  o as r
@@ -1,4 +1,4 @@
1
- import { __require as r } from "../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
1
+ import { __require as r } from "../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js";
2
2
  var i = r();
3
3
  export {
4
4
  i as j
@@ -0,0 +1,5 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
5
+ //# sourceMappingURL=react-dom-client.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-dom-client.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };
5
+ //# sourceMappingURL=react-dom-client.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-dom-client.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -2,4 +2,4 @@ var r = {};
2
2
  export {
3
3
  r as __exports
4
4
  };
5
- //# sourceMappingURL=react-dom-server-legacy.browser.production.min.js.map
5
+ //# sourceMappingURL=react-dom-server-legacy.browser.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-dom-server-legacy.browser.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
5
+ //# sourceMappingURL=react-dom-server.browser.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-dom-server.browser.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };
5
+ //# sourceMappingURL=react-dom.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-dom.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
5
+ //# sourceMappingURL=react-jsx-runtime.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-jsx-runtime.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
5
+ //# sourceMappingURL=react.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
5
+ //# sourceMappingURL=scheduler.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,4 +1,4 @@
1
- import { __require as r } from "../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/server.browser.js";
1
+ import { __require as r } from "../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/server.browser.js";
2
2
  var s = r();
3
3
  export {
4
4
  s
@@ -1,89 +1,90 @@
1
1
  var W = Object.defineProperty;
2
2
  var K = (c, t, e) => t in c ? W(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
3
- var p = (c, t, e) => K(c, typeof t != "symbol" ? t + "" : t, e);
3
+ var d = (c, t, e) => K(c, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { j as N } from "../_virtual/jsx-runtime.js";
5
5
  import { c as P } from "../_virtual/client.js";
6
6
  import { Error as v } from "../common/Error.js";
7
- import { DataFrameProvider as F } from "../common/useDataFrame.js";
8
- import { DEFAULT_HEIGHT as H, DEFAULT_WIDTH as b, TITLE_LINE_HEIGHT as j, TITLE_MARGIN as k, MIN_LEGEND_GRADIENT_HEIGHT as B, MAX_LEGEND_GRADIENT_HEIGHT as V } from "../constants.js";
7
+ import { DataFrameProvider as j } from "../common/useDataFrame.js";
8
+ import { DEFAULT_HEIGHT as H, DEFAULT_WIDTH as w, TITLE_LINE_HEIGHT as B, TITLE_MARGIN as F, MIN_LEGEND_GRADIENT_HEIGHT as k, MAX_LEGEND_GRADIENT_HEIGHT as V } from "../constants.js";
9
9
  import { arrangeLegendParts as X } from "../utils/arrangeLegendParts.js";
10
- import { getChartEdgeSides as U } from "../utils/getChartEdgeSides.js";
11
- import { getContinuousLegendTicks as Y } from "../utils/getContinuousLegendTicks.js";
12
- import { TextMeasurer as q } from "../utils/TextMeasurer/TextMeasurer.js";
13
- import { ChartsGroup as J } from "./components/ChartsGroup.js";
14
- import { MIN_MARGIN as L, TITLE_LINE as G, LEGEND_OFFSET as O, CHART_SIDE_ELEMENTS as Q, MIN_PADDING as Z } from "./constants.js";
15
- import { calculateChartSideElementSizes as $ } from "./utils/calculateChartSideElementSizes.js";
16
- import { calculateSideElementsBBoxes as tt } from "./utils/calculateSideElementsBBoxes.js";
17
- import { calculateCaptionTails as et } from "./utils/calculateCaptionTails.js";
10
+ import { getSizeLegendItem as U } from "../utils/getSizeLegendItem.js";
11
+ import { getChartEdgeSides as Y } from "../utils/getChartEdgeSides.js";
12
+ import { getContinuousLegendTicks as q } from "../utils/getContinuousLegendTicks.js";
13
+ import { TextMeasurer as J } from "../utils/TextMeasurer/TextMeasurer.js";
14
+ import { ChartsGroup as O } from "./components/ChartsGroup.js";
15
+ import { MIN_MARGIN as T, TITLE_LINE as G, LEGEND_OFFSET as Q, CHART_SIDE_ELEMENTS as Z, MIN_PADDING as $ } from "./constants.js";
16
+ import { calculateChartSideElementSizes as tt } from "./utils/calculateChartSideElementSizes.js";
17
+ import { calculateSideElementsBBoxes as et } from "./utils/calculateSideElementsBBoxes.js";
18
+ import { calculateCaptionTails as st } from "./utils/calculateCaptionTails.js";
18
19
  import M from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js";
19
- import w from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js";
20
- import { sqrt as I } from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/pow.js";
21
- const st = (c, t) => {
22
- const e = Math.min(...t), s = Math.max(...t);
23
- if (e === s) {
24
- const r = c % 2 === 0 ? [] : [e];
25
- for (let d = 1; d < c / 2 + 1; d++)
26
- r.push(e + d), r.unshift(e - d);
27
- return r;
20
+ import I from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js";
21
+ import { sqrt as b } from "../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/pow.js";
22
+ const it = (c, t) => {
23
+ const e = Math.min(...t), i = Math.max(...t);
24
+ if (e === i) {
25
+ const a = c % 2 === 0 ? [] : [e];
26
+ for (let p = 1; p < c / 2 + 1; p++)
27
+ a.push(e + p), a.unshift(e - p);
28
+ return a;
28
29
  }
29
30
  if (c < 2)
30
- return [e, s];
31
- const l = (s - e) / (c - 1), i = [];
32
- for (let r = 0; r < c - 1; r++)
33
- i.push(e + l * r);
34
- return i.push(s), i;
31
+ return [e, i];
32
+ const r = (i - e) / (c - 1), s = [];
33
+ for (let a = 0; a < c - 1; a++)
34
+ s.push(e + r * a);
35
+ return s.push(i), s;
35
36
  };
36
- function it(c, t, e) {
37
- let s = e;
38
- return c && (c.colorRange && (s = c.colorRange), c.method === "standardScaling" && (s = [-2, 2]), c.method === "meanNormalization" && (s = [-0.75, 0.75])), st(t, s);
37
+ function ot(c, t, e) {
38
+ let i = e;
39
+ return c && (c.colorRange && (i = c.colorRange), c.method === "standardScaling" && (i = [-2, 2]), c.method === "meanNormalization" && (i = [-0.75, 0.75])), it(t, i);
39
40
  }
40
- class At {
41
+ class Lt {
41
42
  constructor() {
42
- p(this, "reactRoot", null);
43
- p(this, "parentNode", null);
44
- p(this, "rootNode", null);
45
- p(this, "component", /* @__PURE__ */ N.jsx(N.Fragment, {}));
46
- p(this, "chartsDimensions", {});
47
- p(this, "chartSizes", {
48
- chartWidth: b,
43
+ d(this, "reactRoot", null);
44
+ d(this, "parentNode", null);
45
+ d(this, "rootNode", null);
46
+ d(this, "component", /* @__PURE__ */ N.jsx(N.Fragment, {}));
47
+ d(this, "chartsDimensions", {});
48
+ d(this, "chartSizes", {
49
+ chartWidth: w,
49
50
  // width of single chart
50
51
  chartHeight: H,
51
52
  // height of single chart
52
- chartsWidth: b,
53
+ chartsWidth: w,
53
54
  // width of all charts in charts row
54
55
  chartsHeight: H,
55
56
  // width of all charts in charts column, without axes
56
- totalWidth: b,
57
+ totalWidth: w,
57
58
  // width of all charts in charts row, plus left axis, plus legend
58
59
  totalHeight: H
59
60
  // width of all charts in charts height, plus bottom axis, plus top title
60
61
  });
61
- p(this, "margins", {
62
- top: L,
63
- bottom: L,
64
- left: L,
65
- right: L
62
+ d(this, "margins", {
63
+ top: T,
64
+ bottom: T,
65
+ left: T,
66
+ right: T
66
67
  });
67
- p(this, "captionsSizes", {
68
+ d(this, "captionsSizes", {
68
69
  xAxisCaptions: 100,
69
70
  yAxisCaptions: 100,
70
71
  xCaptionTail: 0,
71
72
  yCaptionTail: 0
72
73
  });
73
- p(this, "labelAngles", {
74
+ d(this, "labelAngles", {
74
75
  xAxisLabels: 0,
75
76
  yAxisLabels: 0
76
77
  });
77
- p(this, "columnsCount", 1);
78
- p(this, "rowsCount", 1);
79
- p(this, "scales", {
78
+ d(this, "columnsCount", 1);
79
+ d(this, "rowsCount", 1);
80
+ d(this, "scales", {
80
81
  x: M().domain(["null"]).range([1]),
81
82
  y: M().domain(["null"]).range([1])
82
83
  });
83
- p(this, "step", { x: 10, y: 10 });
84
- p(this, "colorScale", w().domain([0, 1]).range(["white", "black"]));
85
- p(this, "sizeScale", I().domain([0, 1]).range([3, 20]));
86
- p(this, "legend", {
84
+ d(this, "step", { x: 10, y: 10 });
85
+ d(this, "colorScale", I().domain([0, 1]).range(["white", "black"]));
86
+ d(this, "sizeScale", b().domain([0, 1]).range([3, 20]));
87
+ d(this, "legend", {
87
88
  width: 0,
88
89
  height: 0,
89
90
  items: []
@@ -101,170 +102,166 @@ class At {
101
102
  }
102
103
  updateMargins(t) {
103
104
  this.margins = {
104
- top: t.show ? j + k * 2 : L,
105
- bottom: L,
106
- left: L,
105
+ top: t.show ? B + F * 2 : T,
106
+ bottom: T,
107
+ left: T,
107
108
  right: this.legend.width
108
109
  }, this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartsWidth + this.margins.right, this.chartSizes.totalHeight = this.margins.top + Math.max(this.chartSizes.chartsHeight, this.legend.height) + this.margins.bottom;
109
110
  }
110
- updateLegendSize(t, e, s, l) {
111
+ updateLegendSize(t, e, i, r) {
111
112
  if (!t.show) {
112
113
  this.legend = { width: 0, height: 0, items: [] };
113
114
  return;
114
115
  }
115
- const i = [], r = Math.min(
116
- Math.max(this.chartSizes.chartHeight, B),
116
+ const s = [], a = Math.min(
117
+ Math.max(this.chartSizes.chartHeight, k),
117
118
  V
118
- ), d = Math.max(this.chartSizes.chartHeight, r), x = { width: 0, height: 0, left: 0, top: 0 }, h = this.colorScale.domain(), g = Y(this.colorScale, [
119
+ ), p = Math.max(this.chartSizes.chartHeight, a), S = { width: 0, height: 0, left: 0, top: 0 }, h = this.colorScale.domain(), u = q(this.colorScale, [
119
120
  h[0],
120
121
  h[h.length - 1]
121
- ]), C = e.label ?? e.value, S = w([g[0], g[g.length - 1]], [r, 0]);
122
- i.push({
122
+ ]), A = e.label ?? e.value, x = I([u[0], u[u.length - 1]], [a, 0]);
123
+ s.push({
123
124
  id: "colorValue",
124
125
  type: "continuous",
125
126
  scale: this.colorScale,
126
- tickPositionScale: S,
127
- values: g,
128
- title: C,
129
- ...x
127
+ tickPositionScale: x,
128
+ values: u,
129
+ title: A,
130
+ ...S
130
131
  });
131
- const u = s.label ?? s.value, A = this.sizeScale.ticks(3), f = this.sizeScale.tickFormat(3), m = A.reduce((n, a) => (n[String(a)] = f(a), n), {});
132
- if (i.push({
133
- id: "sizeValue",
134
- type: "size",
135
- title: u,
136
- scale: this.sizeScale,
137
- values: A,
138
- labels: m,
139
- ...x
140
- }), !i.length) {
132
+ const m = U({
133
+ columnName: i,
134
+ domain: this.sizeScale.domain(),
135
+ range: this.sizeScale.range()
136
+ });
137
+ if (s.push({ ...m, id: "sizeValue" }), !s.length) {
141
138
  this.legend = { width: 0, height: 0, items: [] };
142
139
  return;
143
140
  }
144
- const y = X(i, d, r), E = y.reduce((n, a) => Math.max(n, a.left + a.width), 0) + 2 * O, o = this.chartsDimensions[l[0]].padding;
141
+ const E = X(s, p, a), l = E.reduce((L, C) => Math.max(L, C.left + C.width), 0) + 2 * Q, y = this.chartsDimensions[r[0]].padding;
145
142
  this.legend = {
146
- width: E,
147
- height: d + o.top,
148
- items: y
143
+ width: l,
144
+ height: p + y.top,
145
+ items: E
149
146
  };
150
147
  }
151
- updateCaptionsSize(t, e, s) {
152
- const l = new q("bold 14px Arial"), { xKeys: i, yKeys: r, xLabels: d, yLabels: x } = t.meta;
148
+ updateCaptionsSize(t, e, i) {
149
+ const r = new J("bold 14px Arial"), { xKeys: s, yKeys: a, xLabels: p, yLabels: S } = t.meta;
153
150
  this.labelAngles = {
154
151
  xAxisLabels: e.axisLabelsAngle,
155
- yAxisLabels: s.axisLabelsAngle
152
+ yAxisLabels: i.axisLabelsAngle
156
153
  };
157
- let h = 0, g = 0;
158
- for (const f of i) {
159
- const m = l.getTextWidth(d[f]);
160
- m > h && (h = m);
154
+ let h = 0, u = 0;
155
+ for (const f of s) {
156
+ const l = r.getTextWidth(p[f]);
157
+ l > h && (h = l);
161
158
  }
162
- for (const f of r) {
163
- const m = l.getTextWidth(x[f]);
164
- m > g && (g = m);
159
+ for (const f of a) {
160
+ const l = r.getTextWidth(S[f]);
161
+ l > u && (u = l);
165
162
  }
166
- const { xCaptionTail: C, yCaptionTail: S } = et(
163
+ const { xCaptionTail: A, yCaptionTail: x } = st(
167
164
  this.labelAngles,
168
165
  this.step,
169
166
  t,
170
- l
171
- ), u = this.labelAngles.xAxisLabels / 180 * Math.PI, A = this.labelAngles.yAxisLabels / 180 * Math.PI;
167
+ r
168
+ ), m = this.labelAngles.xAxisLabels / 180 * Math.PI, E = this.labelAngles.yAxisLabels / 180 * Math.PI;
172
169
  this.captionsSizes = {
173
- xCaptionTail: C,
174
- yCaptionTail: S,
175
- xAxisCaptions: h * Math.sin(u) || G,
176
- yAxisCaptions: g * Math.sin(A) || G
170
+ xCaptionTail: A,
171
+ yCaptionTail: x,
172
+ xAxisCaptions: h * Math.sin(m) || G,
173
+ yAxisCaptions: u * Math.sin(E) || G
177
174
  };
178
175
  }
179
- updateChartDimensions(t, e, s, l) {
180
- const i = t.length, r = Math.min(e.nRows ?? i, i), d = Math.min(e.nCols ?? i, i);
181
- this.columnsCount = e.nRows ? Math.ceil(i / r) : d, this.rowsCount = Math.ceil(i / this.columnsCount), this.chartsDimensions = {};
182
- let x = 0, h = 0;
183
- t.forEach((S, u) => {
184
- const A = u % this.columnsCount + 1, f = U(u, t.length, this.columnsCount, this.rowsCount), m = this.chartSizes.chartWidth, y = this.chartSizes.chartHeight, T = $(
185
- s,
186
- l,
176
+ updateChartDimensions(t, e, i, r) {
177
+ const s = t.length, a = Math.min(e.nRows ?? s, s), p = Math.min(e.nCols ?? s, s);
178
+ this.columnsCount = e.nRows ? Math.ceil(s / a) : p, this.rowsCount = Math.ceil(s / this.columnsCount), this.chartsDimensions = {};
179
+ let S = 0, h = 0;
180
+ t.forEach((x, m) => {
181
+ const E = m % this.columnsCount + 1, f = Y(m, t.length, this.columnsCount, this.rowsCount), l = this.chartSizes.chartWidth, y = this.chartSizes.chartHeight, L = tt(
182
+ i,
183
+ r,
187
184
  this.captionsSizes,
188
185
  f,
189
186
  t,
190
187
  this.step.x,
191
188
  this.step.y
192
189
  );
193
- function E(R) {
190
+ function C(R) {
194
191
  return Math.max(
195
- Q[R].reduce((_, D) => _ + T[R][D], 0),
196
- Z
192
+ Z[R].reduce((_, D) => _ + L[R][D], 0),
193
+ $
197
194
  );
198
195
  }
199
196
  const o = {
200
- left: E("left"),
201
- right: E("right"),
202
- top: E("top"),
203
- bottom: E("bottom")
197
+ left: C("left"),
198
+ right: C("right"),
199
+ top: C("top"),
200
+ bottom: C("bottom")
204
201
  };
205
202
  o.left < this.captionsSizes.xCaptionTail && (o.left = this.captionsSizes.xCaptionTail), o.bottom < this.captionsSizes.yCaptionTail && (o.bottom = this.captionsSizes.yCaptionTail);
206
- const n = tt(T, m, y), a = m + o.left + o.right, z = y + o.top + o.bottom;
207
- this.chartsDimensions[S] = {
208
- left: x,
203
+ const n = et(L, l, y), g = l + o.left + o.right, z = y + o.top + o.bottom;
204
+ this.chartsDimensions[x] = {
205
+ left: S,
209
206
  top: h,
210
- inner: { width: m, height: y },
211
- outer: { width: a, height: z },
207
+ inner: { width: l, height: y },
208
+ outer: { width: g, height: z },
212
209
  padding: o,
213
210
  sideElementBBoxes: n,
214
211
  chartEdgeSides: f
215
- }, x += a, A === this.columnsCount && (x = 0, h += z);
212
+ }, S += g, E === this.columnsCount && (S = 0, h += z);
216
213
  });
217
- const g = t.slice(0, this.columnsCount).reduce((S, u) => S + this.chartsDimensions[u].outer.width, 0), C = t.filter((S, u) => u % this.columnsCount === 0).reduce((S, u) => S + this.chartsDimensions[u].outer.height, 0);
218
- this.chartSizes.chartsWidth = g, this.chartSizes.chartsHeight = C;
214
+ const u = t.slice(0, this.columnsCount).reduce((x, m) => x + this.chartsDimensions[m].outer.width, 0), A = t.filter((x, m) => m % this.columnsCount === 0).reduce((x, m) => x + this.chartsDimensions[m].outer.height, 0);
215
+ this.chartSizes.chartsWidth = u, this.chartSizes.chartsHeight = A;
219
216
  }
220
217
  updateChartsSizes(t, e) {
221
- const { width: s, height: l, cellSize: i } = e;
222
- i && (this.chartSizes.chartWidth = t.meta.xKeys.length * i, this.chartSizes.chartHeight = t.meta.yKeys.length * i), s && l && (this.chartSizes.chartWidth = s, this.chartSizes.chartHeight = l);
218
+ const { width: i, height: r, cellSize: s } = e;
219
+ s && (this.chartSizes.chartWidth = t.meta.xKeys.length * s, this.chartSizes.chartHeight = t.meta.yKeys.length * s), i && r && (this.chartSizes.chartWidth = i, this.chartSizes.chartHeight = r);
223
220
  }
224
221
  // update scales for cell positions, x and y for each facet
225
- updateScales(t, e, s, l, i) {
226
- const { width: r, height: d, cellSize: x } = e, { meta: h } = t, g = (o, n = {}) => [...o].sort(
227
- (a, z) => s.sorting === "asc" ? (n[a] ?? a).localeCompare(n[z] ?? z, "en", { numeric: !0 }) : (n[z] ?? z).localeCompare(n[a] ?? a, "en", { numeric: !0 })
228
- ), C = (o, n = {}) => [...o].sort(
229
- (a, z) => l.sorting === "asc" ? (n[a] ?? a).localeCompare(n[z] ?? z, "en", { numeric: !0 }) : (n[z] ?? z).localeCompare(n[a] ?? a, "en", { numeric: !0 })
230
- ), S = i.xGroup ? h.xGroupKeys : g(h.xGroupKeys), u = i.yGroup ? h.yGroupKeys : C(h.yGroupKeys), { xKeysByGroups: A, yKeysByGroups: f } = h, m = S.reduce((o, n) => (o = o.concat(g(A[n], h.xLabels)), o), []), y = u.reduce((o, n) => (o = o.concat(C(f[n], h.yLabels)), o), []);
231
- x ? (this.step.x = x, this.step.y = x) : r && d && (this.step.x = r / m.length, this.step.y = d / y.length);
232
- const T = new Array(m.length).fill(null).map((o, n) => n * this.step.x), E = new Array(y.length).fill(null).map((o, n) => n * this.step.y);
233
- this.scales.x = M().domain(m).range(T), this.scales.y = M().domain(y).range(E);
222
+ updateScales(t, e, i, r, s) {
223
+ const { width: a, height: p, cellSize: S } = e, { meta: h } = t, u = (o, n = {}) => [...o].sort(
224
+ (g, z) => i.sorting === "asc" ? (n[g] ?? g).localeCompare(n[z] ?? z, "en", { numeric: !0 }) : (n[z] ?? z).localeCompare(n[g] ?? g, "en", { numeric: !0 })
225
+ ), A = (o, n = {}) => [...o].sort(
226
+ (g, z) => r.sorting === "asc" ? (n[g] ?? g).localeCompare(n[z] ?? z, "en", { numeric: !0 }) : (n[z] ?? z).localeCompare(n[g] ?? g, "en", { numeric: !0 })
227
+ ), x = s.xGroup ? h.xGroupKeys : u(h.xGroupKeys), m = s.yGroup ? h.yGroupKeys : A(h.yGroupKeys), { xKeysByGroups: E, yKeysByGroups: f } = h, l = x.reduce((o, n) => (o = o.concat(u(E[n], h.xLabels)), o), []), y = m.reduce((o, n) => (o = o.concat(A(f[n], h.yLabels)), o), []);
228
+ S ? (this.step.x = S, this.step.y = S) : a && p && (this.step.x = a / l.length, this.step.y = p / y.length);
229
+ const L = new Array(l.length).fill(null).map((o, n) => n * this.step.x), C = new Array(y.length).fill(null).map((o, n) => n * this.step.y);
230
+ this.scales.x = M().domain(l).range(L), this.scales.y = M().domain(y).range(C);
234
231
  }
235
- updateAesScale(t, e, s, l) {
236
- this.colorScale = w().domain(it(l, t.colorsList.length, s)).range(t.colorsList), this.sizeScale = I(e, [t.minRadius, t.maxRadius]);
232
+ updateAesScale(t, e, i, r) {
233
+ this.colorScale = I().domain(ot(r, t.colorsList.length, i)).range(t.colorsList), this.sizeScale = b(e, [t.minRadius, t.maxRadius]);
237
234
  }
238
- render(t, e, s, l, i, r, d, x, h, g, C, S) {
239
- var a;
240
- const { meta: u, facets: A, meta: { facetKeys: f } } = i, { valueExtent: m } = u, { xAxis: y, yAxis: T, title: E, size: o } = s;
241
- this.updateChartsSizes(i, o), this.updateAesScale(h, m.sizeValue, m.colorValue, x), this.updateScales(i, o, s.xAxis, s.yAxis, S), this.updateCaptionsSize(i, y, T), this.updateChartDimensions(f, l, y, T), this.updateLegendSize(s.legend, r, d, f), this.updateMargins(E);
242
- const n = /* @__PURE__ */ N.jsx(F, { dataFrame: t, children: /* @__PURE__ */ N.jsx(
243
- J,
235
+ render(t, e, i, r, s, a, p, S, h, u, A, x) {
236
+ var g;
237
+ const { meta: m, facets: E, meta: { facetKeys: f } } = s, { valueExtent: l } = m, { xAxis: y, yAxis: L, title: C, size: o } = i;
238
+ this.updateChartsSizes(s, o), this.updateAesScale(h, l.sizeValue, l.colorValue, S), this.updateScales(s, o, i.xAxis, i.yAxis, x), this.updateCaptionsSize(s, y, L), this.updateChartDimensions(f, r, y, L), this.updateLegendSize(i.legend, a, p, f), this.updateMargins(C);
239
+ const n = /* @__PURE__ */ N.jsx(j, { dataFrame: t, children: /* @__PURE__ */ N.jsx(
240
+ O,
244
241
  {
245
242
  aes: h,
246
243
  captionsSizes: this.captionsSizes,
247
- cellsMeta: u,
244
+ cellsMeta: m,
248
245
  columnsCount: this.columnsCount,
249
246
  chartsDimensions: this.chartsDimensions,
250
- chartSettings: s,
247
+ chartSettings: i,
251
248
  chartSizes: this.chartSizes,
252
249
  sizeScale: this.sizeScale,
253
250
  colorScale: this.colorScale,
254
251
  facetKeys: f,
255
- facetSettings: l,
256
- groupedCells: A,
252
+ facetSettings: r,
253
+ groupedCells: E,
257
254
  labelAngles: this.labelAngles,
258
255
  legend: this.legend,
259
256
  margins: this.margins,
260
257
  scales: this.scales,
261
258
  settingsId: e,
262
259
  step: this.step,
263
- getCellTooltip: g,
264
- onTooltipHintSwitch: C
260
+ getCellTooltip: u,
261
+ onTooltipHintSwitch: A
265
262
  }
266
263
  ) });
267
- this.component = n, (a = this.reactRoot) == null || a.render(n);
264
+ this.component = n, (g = this.reactRoot) == null || g.render(n);
268
265
  }
269
266
  renderError(t) {
270
267
  var e;
@@ -272,6 +269,6 @@ class At {
272
269
  }
273
270
  }
274
271
  export {
275
- At as default
272
+ Lt as default
276
273
  };
277
274
  //# sourceMappingURL=ChartRenderer.js.map