@pie-lib/graphing 4.0.5-next.33 → 4.0.5-next.35

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 (125) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +2 -5
  2. package/dist/axis/arrow.js +5 -5
  3. package/dist/axis/axes.js +29 -29
  4. package/dist/container/index.js +32 -32
  5. package/dist/coordinates-label.js +6 -6
  6. package/dist/graph-with-controls.js +25 -23
  7. package/dist/grid-setup.js +63 -63
  8. package/dist/grid.js +3 -3
  9. package/dist/key-legend.js +38 -38
  10. package/dist/labels.js +19 -19
  11. package/dist/mark-label.js +19 -19
  12. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
  13. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
  14. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
  15. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  16. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  17. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
  18. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  19. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  20. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
  21. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js +43 -0
  22. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
  23. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
  24. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  25. package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
  26. package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
  27. package/dist/node_modules/.bun/{@visx_scale@3.12.0 → @visx_scale@4.0.0}/node_modules/@visx/scale/esm/utils/coerceNumber.js +2 -2
  28. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
  29. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  30. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
  31. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js +24 -0
  32. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
  33. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
  34. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
  35. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
  36. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
  37. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
  38. package/dist/toggle-bar.js +19 -19
  39. package/dist/tools/circle/bg-circle.js +4 -4
  40. package/dist/tools/circle/component.js +18 -18
  41. package/dist/tools/line/component.js +9 -9
  42. package/dist/tools/polygon/line.js +9 -9
  43. package/dist/tools/polygon/polygon.js +7 -7
  44. package/dist/tools/ray/component.js +9 -9
  45. package/dist/tools/segment/component.js +6 -6
  46. package/dist/tools/shared/arrow-head.js +17 -17
  47. package/dist/tools/shared/line/index.d.ts +1 -1
  48. package/dist/tools/shared/line/index.js +13 -13
  49. package/dist/tools/shared/line/line-path.js +9 -9
  50. package/dist/tools/shared/line/with-root-edge.js +5 -5
  51. package/dist/tools/shared/point/base-point.js +10 -10
  52. package/dist/tools/shared/point/index.js +10 -10
  53. package/dist/tools/shared/styles.d.ts +2 -2
  54. package/dist/tools/shared/styles.js +2 -2
  55. package/dist/tools/vector/component.js +7 -7
  56. package/dist/undo-redo.js +9 -9
  57. package/package.json +14 -14
  58. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
  59. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
  60. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
  61. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
  62. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
  63. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
  64. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
  65. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
  66. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
  67. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +0 -79
  68. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
  69. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
  70. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
  71. package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -50
  72. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
  73. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
  74. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
  75. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -47
  76. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +0 -50
  77. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +0 -9
  78. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +0 -6
  79. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
  80. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
  81. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
  82. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
  83. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +0 -21
  84. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +0 -21
  85. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +0 -10
  86. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +0 -21
  87. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +0 -9
  88. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +0 -14
  89. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +0 -15
  90. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +0 -16
  91. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +0 -9
  92. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +0 -8
  93. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +0 -14
  94. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +0 -15
  95. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +0 -19
  96. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +0 -11
  97. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +0 -13
  98. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +0 -12
  99. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +0 -18
  100. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +0 -14
  101. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +0 -14
  102. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +0 -12
  103. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +0 -16
  104. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +0 -11
  105. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +0 -14
  106. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +0 -14
  107. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +0 -13
  108. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +0 -14
  109. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +0 -19
  110. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +0 -14
  111. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +0 -13
  112. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +0 -13
  113. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +0 -14
  114. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +0 -9
  115. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +0 -12
  116. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +0 -10
  117. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +0 -20
  118. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +0 -11
  119. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +0 -16
  120. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +0 -12
  121. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +0 -20
  122. package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
  123. package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -53
  124. package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -51
  125. package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
@@ -15,9 +15,6 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
15
15
  }, l = (e, t, n) => (c(e, t, "default"), n && c(n, t, "default")), u = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
16
16
  value: n,
17
17
  enumerable: !0
18
- }) : a, n)), d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
- if (typeof require < "u") return require.apply(this, arguments);
20
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
- });
18
+ }) : a, n));
22
19
  //#endregion
23
- export { o as __commonJSMin, s as __exportAll, l as __reExport, d as __require, u as __toESM };
20
+ export { o as __commonJSMin, s as __exportAll, l as __reExport, u as __toESM };
@@ -1,13 +1,13 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
3
  import { types as n } from "@pie-lib/plot";
4
- import { styled as r } from "@mui/material/styles";
5
- import { jsx as i } from "react/jsx-runtime";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import { styled as i } from "@mui/material/styles";
6
6
  //#region src/axis/arrow.tsx
7
- var a = r("path")(({ theme: e }) => ({ fill: `var(--arrow-color, ${e.palette.common.black})` })), o = class extends e.Component {
7
+ var a = i("path")(({ theme: e }) => ({ fill: `var(--arrow-color, ${e.palette.common.black})` })), o = class extends e.Component {
8
8
  render() {
9
- let { x: e, y: t, className: n, scale: r } = this.props, o = this.props.direction || "left", s = r.x(e), c = r.y(t), l = "", u = (e, t, n) => `translate(${e}, ${t}) rotate(${n})`;
10
- return o === "left" && (l = u(s - 15, c, 0)), o === "right" && (l = u(s + 15, c, 180)), o === "up" && (l = u(s, c - 15, 90)), o === "down" && (l = u(s, c + 15, 270)), /* @__PURE__ */ i(a, {
9
+ let { x: e, y: t, className: n, scale: i } = this.props, o = this.props.direction || "left", s = i.x(e), c = i.y(t), l = "", u = (e, t, n) => `translate(${e}, ${t}) rotate(${n})`;
10
+ return o === "left" && (l = u(s - 15, c, 0)), o === "right" && (l = u(s + 15, c, 180)), o === "up" && (l = u(s, c - 15, 90)), o === "down" && (l = u(s, c + 15, 270)), /* @__PURE__ */ r(a, {
11
11
  d: "m 0,0 8,-5 0,10 -8,-5",
12
12
  transform: l,
13
13
  className: n
package/dist/axis/axes.js CHANGED
@@ -1,11 +1,11 @@
1
- import e from "../node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js";
1
+ import e from "../node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js";
2
2
  import { Arrow as t } from "./arrow.js";
3
3
  import { amountToIncreaseWidth as n, countWords as r, findLongestWord as i, getTickValues as a } from "../utils.js";
4
4
  import o from "react";
5
5
  import s from "prop-types";
6
6
  import { types as c } from "@pie-lib/plot";
7
- import { styled as l } from "@mui/material/styles";
8
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ import { styled as d } from "@mui/material/styles";
9
9
  import * as f from "@pie-lib/render-ui";
10
10
  import { Readable as p, color as m } from "@pie-lib/render-ui";
11
11
  //#region src/axis/axes.tsx
@@ -23,7 +23,7 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
23
23
  right: !0,
24
24
  up: !0,
25
25
  down: !0
26
- } }, C = l(t)(() => ({ fill: m.defaults.PRIMARY })), w = l("div")(({ theme: e, centered: t }) => ({
26
+ } }, C = d(t)(() => ({ fill: m.defaults.PRIMARY })), w = d("div")(({ theme: e, centered: t }) => ({
27
27
  padding: 0,
28
28
  margin: 0,
29
29
  "* > *": {
@@ -33,7 +33,7 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
33
33
  "& p": { margin: 0 },
34
34
  fontSize: e.typography.fontSize,
35
35
  ...t && { textAlign: "center" }
36
- })), T = l("g")(() => ({
36
+ })), T = d("g")(() => ({
37
37
  "& .visx-axis-line": {
38
38
  stroke: m.defaults.PRIMARY,
39
39
  strokeWidth: 3
@@ -56,8 +56,8 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
56
56
  };
57
57
  static defaultProps = S;
58
58
  render() {
59
- let { includeArrows: t, graphProps: a, columnTicksValues: o, skipValues: s, distanceFromOriginToFirstNegativeY: c, dy: l } = this.props, { scale: f, domain: p, size: m, range: h } = a || {}, g = (e) => {
60
- let t = s && s[0] === e ? c + 4 : l;
59
+ let { includeArrows: t, graphProps: a, columnTicksValues: o, skipValues: s, distanceFromOriginToFirstNegativeY: c, dy: d } = this.props, { scale: f, domain: p, size: m, range: h } = a || {}, g = (e) => {
60
+ let t = s && s[0] === e ? c + 4 : d;
61
61
  return {
62
62
  ...E,
63
63
  textAnchor: "middle",
@@ -66,8 +66,8 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
66
66
  dy: e === 0 ? -7 : 0
67
67
  };
68
68
  }, v = r(p.axisLabel), y = n(i(p.axisLabel)) + 2;
69
- return /* @__PURE__ */ d(T, { children: [
70
- /* @__PURE__ */ u(e, {
69
+ return /* @__PURE__ */ u(T, { children: [
70
+ /* @__PURE__ */ l(e, {
71
71
  scale: f.x,
72
72
  top: f.y(0),
73
73
  left: 0,
@@ -78,26 +78,26 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
78
78
  tickValues: o,
79
79
  hideZero: !(p.labelStep || h.labelStep) && p.min <= 0
80
80
  }),
81
- t && t.left && /* @__PURE__ */ u(C, {
81
+ t && t.left && /* @__PURE__ */ l(C, {
82
82
  direction: "left",
83
83
  x: p.min,
84
84
  y: 0,
85
85
  scale: f
86
86
  }),
87
- t && t.right && /* @__PURE__ */ u(C, {
87
+ t && t.right && /* @__PURE__ */ l(C, {
88
88
  direction: "right",
89
89
  x: p.max,
90
90
  y: 0,
91
91
  scale: f
92
92
  }),
93
- p.axisLabel && /* @__PURE__ */ u("foreignObject", {
93
+ p.axisLabel && /* @__PURE__ */ l("foreignObject", {
94
94
  x: m.width + 17,
95
95
  y: f.y(0) - 9,
96
96
  width: y,
97
97
  height: 20 * v,
98
- children: /* @__PURE__ */ u(_, {
98
+ children: /* @__PURE__ */ l(_, {
99
99
  false: !0,
100
- children: /* @__PURE__ */ u(w, { dangerouslySetInnerHTML: { __html: p.axisLabel } })
100
+ children: /* @__PURE__ */ l(w, { dangerouslySetInnerHTML: { __html: p.axisLabel } })
101
101
  })
102
102
  })
103
103
  ] });
@@ -109,9 +109,9 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
109
109
  };
110
110
  static defaultProps = S;
111
111
  render() {
112
- let { includeArrows: t, graphProps: r, skipValues: i, rowTickValues: a } = this.props, { scale: o, range: s, size: c } = r || {}, l = s.axisLabel ? n(s.axisLabel.length) : 0;
113
- return /* @__PURE__ */ d(T, { children: [
114
- /* @__PURE__ */ u(e, {
112
+ let { includeArrows: t, graphProps: r, skipValues: i, rowTickValues: a } = this.props, { scale: o, range: s, size: c } = r || {}, d = s.axisLabel ? n(s.axisLabel.length) : 0;
113
+ return /* @__PURE__ */ u(T, { children: [
114
+ /* @__PURE__ */ l(e, {
115
115
  orientation: "left",
116
116
  scale: o.y,
117
117
  top: 0,
@@ -135,26 +135,26 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
135
135
  tickTextAnchor: "bottom",
136
136
  tickValues: a
137
137
  }),
138
- t && t.down && /* @__PURE__ */ u(C, {
138
+ t && t.down && /* @__PURE__ */ l(C, {
139
139
  direction: "down",
140
140
  x: 0,
141
141
  y: s.min,
142
142
  scale: o
143
143
  }),
144
- t && t.up && /* @__PURE__ */ u(C, {
144
+ t && t.up && /* @__PURE__ */ l(C, {
145
145
  direction: "up",
146
146
  x: 0,
147
147
  y: s.max,
148
148
  scale: o
149
149
  }),
150
- s.axisLabel && /* @__PURE__ */ u("foreignObject", {
151
- x: o.x(0) - l / 2,
150
+ s.axisLabel && /* @__PURE__ */ l("foreignObject", {
151
+ x: o.x(0) - d / 2,
152
152
  y: -33,
153
- width: l,
153
+ width: d,
154
154
  height: "20",
155
- children: /* @__PURE__ */ u(_, {
155
+ children: /* @__PURE__ */ l(_, {
156
156
  false: !0,
157
- children: /* @__PURE__ */ u(w, {
157
+ children: /* @__PURE__ */ l(w, {
158
158
  centered: !0,
159
159
  dangerouslySetInnerHTML: { __html: s.axisLabel }
160
160
  })
@@ -195,16 +195,16 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
195
195
  };
196
196
  };
197
197
  render() {
198
- let { graphProps: e } = this.props, { domain: t, range: n } = e || {}, { columnTicksValues: r, firstNegativeX: i, distanceFromOriginToFirstNegativeX: a } = this.xValues(), { rowTickValues: o, firstNegativeY: s, distanceFromOriginToFirstNegativeY: c } = this.yValues(), l = D(i, s, a, c, 6, 25);
199
- return /* @__PURE__ */ d(T, { children: [n.min <= 0 ? /* @__PURE__ */ u(A, {
198
+ let { graphProps: e } = this.props, { domain: t, range: n } = e || {}, { columnTicksValues: r, firstNegativeX: i, distanceFromOriginToFirstNegativeX: a } = this.xValues(), { rowTickValues: o, firstNegativeY: s, distanceFromOriginToFirstNegativeY: c } = this.yValues(), d = D(i, s, a, c, 6, 25);
199
+ return /* @__PURE__ */ u(T, { children: [n.min <= 0 ? /* @__PURE__ */ l(A, {
200
200
  ...this.props,
201
- skipValues: l,
201
+ skipValues: d,
202
202
  columnTicksValues: r,
203
203
  distanceFromOriginToFirstNegativeY: c,
204
204
  dy: 25
205
- }) : null, t.min <= 0 ? /* @__PURE__ */ u(M, {
205
+ }) : null, t.min <= 0 ? /* @__PURE__ */ l(M, {
206
206
  ...this.props,
207
- skipValues: l,
207
+ skipValues: d,
208
208
  rowTickValues: o,
209
209
  distanceFromOriginToFirstNegativeX: a
210
210
  }) : null] });
@@ -1,46 +1,46 @@
1
- import { Provider as e, connect as t } from "../node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js";
2
- import { applyMiddleware as n, createStore as r } from "../node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js";
3
- import { ActionCreators as i } from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
4
- import a from "./reducer.js";
5
- import { changeMarks as o } from "./actions.js";
6
- import { GraphWithControls as s } from "../graph-with-controls.js";
7
- import { lastActionMiddleware as c } from "./middleware.js";
8
- import l from "react";
9
- import u from "prop-types";
10
- import { isEqual as d } from "@pie-element/shared-lodash";
11
- import { jsx as f } from "react/jsx-runtime";
12
- var p = t((e) => ({ marks: e.marks.present }), (e) => ({
13
- onChangeMarks: (t) => e(o(t)),
14
- onUndo: () => e(i.undo()),
15
- onRedo: () => e(i.redo()),
16
- onReset: () => e(o([]))
17
- }))(s), m = class extends l.Component {
1
+ import { applyMiddleware as e, createStore as t } from "../node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js";
2
+ import { ActionCreators as n } from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
3
+ import r from "./reducer.js";
4
+ import { changeMarks as i } from "./actions.js";
5
+ import { GraphWithControls as a } from "../graph-with-controls.js";
6
+ import { lastActionMiddleware as o } from "./middleware.js";
7
+ import s from "react";
8
+ import c from "prop-types";
9
+ import { isEqual as l } from "@pie-element/shared-lodash";
10
+ import { jsx as u } from "react/jsx-runtime";
11
+ import { Provider as d, connect as f } from "react-redux";
12
+ var p = f((e) => ({ marks: e.marks.present }), (e) => ({
13
+ onChangeMarks: (t) => e(i(t)),
14
+ onUndo: () => e(n.undo()),
15
+ onRedo: () => e(n.redo()),
16
+ onReset: () => e(i([]))
17
+ }))(a), m = class extends s.Component {
18
18
  static propTypes = {
19
- onChangeMarks: u.func,
20
- marks: u.array
19
+ onChangeMarks: c.func,
20
+ marks: c.array
21
21
  };
22
- constructor(e) {
23
- super(e);
24
- let t = a();
25
- this.store = r(t, { marks: e.marks }, n(c)), this.store.subscribe(this.onStoreChange);
22
+ constructor(n) {
23
+ super(n);
24
+ let i = r();
25
+ this.store = t(i, { marks: n.marks }, e(o)), this.store.subscribe(this.onStoreChange);
26
26
  }
27
27
  componentDidUpdate(e) {
28
28
  let { marks: t } = this.props;
29
- d(this.store.getState().marks.present, t) || d(e.marks, t) || t && t.find((e) => e.correctness) || this.store.dispatch(o(t));
29
+ l(this.store.getState().marks.present, t) || l(e.marks, t) || t && t.find((e) => e.correctness) || this.store.dispatch(i(t));
30
30
  }
31
31
  onStoreChange = () => {
32
32
  let { marks: e, onChangeMarks: t } = this.props, n = this.store.getState();
33
- d(n.marks.present, e) || t(n.marks.present);
33
+ l(n.marks.present, e) || t(n.marks.present);
34
34
  };
35
35
  render() {
36
- let { onChangeMarks: t, marks: n, ...r } = this.props, i = n && n.find((e) => e.correctness);
37
- return i ? /* @__PURE__ */ f(s, {
38
- ...r,
39
- marks: n,
40
- disabled: i
41
- }) : /* @__PURE__ */ f(e, {
36
+ let { onChangeMarks: e, marks: t, ...n } = this.props, r = t && t.find((e) => e.correctness);
37
+ return r ? /* @__PURE__ */ u(a, {
38
+ ...n,
39
+ marks: t,
40
+ disabled: r
41
+ }) : /* @__PURE__ */ u(d, {
42
42
  store: this.store,
43
- children: /* @__PURE__ */ f(p, { ...r })
43
+ children: /* @__PURE__ */ u(p, { ...n })
44
44
  });
45
45
  }
46
46
  };
@@ -2,12 +2,12 @@ import { roundNumber as e } from "./utils.js";
2
2
  import "react";
3
3
  import t from "prop-types";
4
4
  import { types as n } from "@pie-lib/plot";
5
- import { styled as r } from "@mui/material/styles";
6
- import { jsx as i } from "react/jsx-runtime";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ import { styled as i } from "@mui/material/styles";
7
7
  import { color as a } from "@pie-lib/render-ui";
8
8
  import o from "@mui/material/InputBase";
9
9
  //#region src/coordinates-label.tsx
10
- var s = r(o)(({ theme: e }) => ({
10
+ var s = i(o)(({ theme: e }) => ({
11
11
  fontFamily: e.typography.fontFamily,
12
12
  fontSize: e.typography.fontSize,
13
13
  borderRadius: "8px",
@@ -23,15 +23,15 @@ var s = r(o)(({ theme: e }) => ({
23
23
  left: i.x(t) + 10,
24
24
  top: i.y(n) - s
25
25
  };
26
- }, l = ({ x: t, y: n, graphProps: r }) => {
26
+ }, l = ({ x: t, y: n, graphProps: i }) => {
27
27
  let a = `(${e(t)}, ${e(n)})`, o = (a.length || 0) * 6;
28
- return /* @__PURE__ */ i(s, {
28
+ return /* @__PURE__ */ r(s, {
29
29
  style: {
30
30
  position: "absolute",
31
31
  pointerEvents: "auto",
32
32
  width: o,
33
33
  padding: 0,
34
- ...c(r, t, n, o)
34
+ ...c(i, t, n, o)
35
35
  },
36
36
  value: a,
37
37
  inputProps: { ariaLabel: "naked" }
@@ -5,31 +5,33 @@ import { UndoRedo as a } from "./undo-redo.js";
5
5
  import o from "react";
6
6
  import s from "prop-types";
7
7
  import { isString as c, uniq as l } from "@pie-element/shared-lodash";
8
- import { styled as u } from "@mui/material/styles";
9
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ import { styled as f } from "@mui/material/styles";
10
10
  import { color as p } from "@pie-lib/render-ui";
11
11
  import { Accordion as m, AccordionDetails as h, AccordionSummary as g, Typography as _ } from "@mui/material";
12
12
  import v from "@mui/icons-material/ExpandMore";
13
13
  //#region src/graph-with-controls.tsx
14
- var y = u("div")({
14
+ var y = f("div")({
15
15
  display: "flex",
16
16
  flexDirection: "column",
17
17
  width: "min-content"
18
- }), b = u("div")(({ theme: e }) => ({
18
+ }), b = f("div")(({ theme: e }) => ({
19
19
  display: "flex",
20
20
  justifyContent: "space-between",
21
21
  padding: e.spacing(1),
22
22
  color: p.text(),
23
- backgroundColor: p.primaryLight(),
24
- "& button": { fontSize: e.typography.fontSize }
25
- })), x = u(m)({
26
- backgroundColor: p.primaryLight(),
23
+ backgroundColor: p.backgroundDark(),
24
+ "& button": { fontSize: e.typography.fontSize },
25
+ border: `1px solid ${p.primaryLight()}`,
26
+ borderBottom: "none"
27
+ })), x = f(m)({
28
+ backgroundColor: p.backgroundDark(),
27
29
  width: "100%"
28
- }), S = u(g)(({ theme: e }) => ({
30
+ }), S = f(g)(({ theme: e }) => ({
29
31
  padding: `0 ${e.spacing(1)}`,
30
32
  minHeight: "32px !important",
31
33
  "& .MuiAccordionSummary-content": { margin: "4px 0 !important" }
32
- })), C = u(h)(({ theme: e }) => ({
34
+ })), C = f(h)(({ theme: e }) => ({
33
35
  padding: 0,
34
36
  marginTop: e.spacing(1),
35
37
  display: "flex",
@@ -37,7 +39,7 @@ var y = u("div")({
37
39
  })), w = (e) => r.map((t) => ({
38
40
  ...t,
39
41
  toolbar: !!e.find((e) => e === t.type)
40
- })) || [], T = (e, t) => t && e && (e.find((e) => e.type === t.type) || {}).toolbar, E = (e) => e.find((e) => e.toolbar), D = (e) => e.filter((e) => !!n.find((t) => t === e.type)), O = (e, t) => t.filter((t) => !!e.find((e) => e === t.type)), k = (e) => r.find((t) => t.type === e) || null, A = ({ children: e, title: t }) => /* @__PURE__ */ f(x, {
42
+ })) || [], T = (e, t) => t && e && (e.find((e) => e.type === t.type) || {}).toolbar, E = (e) => e.find((e) => e.toolbar), D = (e) => e.filter((e) => !!n.find((t) => t === e.type)), O = (e, t) => t.filter((t) => !!e.find((e) => e === t.type)), k = (e) => r.find((t) => t.type === e) || null, A = ({ children: e, title: t }) => /* @__PURE__ */ d(x, {
41
43
  elevation: 0,
42
44
  disableGutters: !0,
43
45
  square: !0,
@@ -45,13 +47,13 @@ var y = u("div")({
45
47
  enter: 225,
46
48
  exit: 195
47
49
  } },
48
- children: [/* @__PURE__ */ d(S, {
49
- expandIcon: /* @__PURE__ */ d(v, {}),
50
- children: /* @__PURE__ */ d(_, {
50
+ children: [/* @__PURE__ */ u(S, {
51
+ expandIcon: /* @__PURE__ */ u(v, {}),
52
+ children: /* @__PURE__ */ u(_, {
51
53
  variant: "subheading",
52
54
  children: t
53
55
  })
54
- }), /* @__PURE__ */ d(C, { children: e })]
56
+ }), /* @__PURE__ */ u(C, { children: e })]
55
57
  });
56
58
  A.propTypes = {
57
59
  children: s.array,
@@ -93,11 +95,11 @@ var j = class extends o.Component {
93
95
  labelModeEnabled: e === "label"
94
96
  });
95
97
  render() {
96
- let { currentTool: t, labelModeEnabled: n } = this.state, { axesSettings: r, className: s, coordinatesOnHover: u, collapsibleToolbar: p, collapsibleToolbarTitle: m, disabled: h, disabledLabels: g, disabledTitle: _, domain: v, draggableTools: x, labels: S, labelsPlaceholders: C, onChangeLabels: k, onChangeMarks: j, onChangeTitle: M, onChangeTools: N, onUndo: P, onRedo: F, onReset: I, range: L, size: R, showLabels: z, showPixelGuides: B, showTitle: V, title: H, titlePlaceholder: U, language: W, removeIncompleteTool: G, limitLabeling: K } = this.props, { backgroundMarks: q, marks: J, toolbarTools: Y } = this.props;
98
+ let { currentTool: t, labelModeEnabled: n } = this.state, { axesSettings: r, className: s, coordinatesOnHover: f, collapsibleToolbar: p, collapsibleToolbarTitle: m, disabled: h, disabledLabels: g, disabledTitle: _, domain: v, draggableTools: x, labels: S, labelsPlaceholders: C, onChangeLabels: k, onChangeMarks: j, onChangeTitle: M, onChangeTools: N, onUndo: P, onRedo: F, onReset: I, range: L, size: R, showLabels: z, showPixelGuides: B, showTitle: V, title: H, titlePlaceholder: U, language: W, removeIncompleteTool: G, limitLabeling: K } = this.props, { backgroundMarks: q, marks: J, toolbarTools: Y } = this.props;
97
99
  Y = l(Y || []).filter((e) => !!c(e)) || [], q = D(q || []), J = O(Y, J || []);
98
100
  let X = w(Y);
99
101
  (!t || !T(X, t)) && (t = E(X));
100
- let Z = /* @__PURE__ */ f(o.Fragment, { children: [/* @__PURE__ */ d(i, {
102
+ let Z = /* @__PURE__ */ d(o.Fragment, { children: [/* @__PURE__ */ u(i, {
101
103
  currentToolType: t && t.type,
102
104
  disabled: !!h,
103
105
  draggableTools: x,
@@ -106,24 +108,24 @@ var j = class extends o.Component {
106
108
  toolbarTools: Y,
107
109
  onChangeTools: N,
108
110
  language: W
109
- }), !h && /* @__PURE__ */ d(a, {
111
+ }), !h && /* @__PURE__ */ u(a, {
110
112
  onUndo: P,
111
113
  onRedo: F,
112
114
  onReset: I,
113
115
  language: W
114
116
  })] });
115
- return /* @__PURE__ */ f(y, {
117
+ return /* @__PURE__ */ d(y, {
116
118
  className: s,
117
119
  children: [
118
- /* @__PURE__ */ d(b, { children: p ? /* @__PURE__ */ d(A, {
120
+ /* @__PURE__ */ u(b, { children: p ? /* @__PURE__ */ u(A, {
119
121
  title: m,
120
122
  children: Z
121
123
  }) : Z }),
122
- /* @__PURE__ */ d("div", { ref: (e) => this.labelNode = e }),
123
- /* @__PURE__ */ d(e, {
124
+ /* @__PURE__ */ u("div", { ref: (e) => this.labelNode = e }),
125
+ /* @__PURE__ */ u(e, {
124
126
  axesSettings: r,
125
127
  backgroundMarks: q,
126
- coordinatesOnHover: u,
128
+ coordinatesOnHover: f,
127
129
  currentTool: t,
128
130
  disabledLabels: g,
129
131
  disabledTitle: _,