@pie-lib/graphing-solution-set 4.0.4-next.31 → 4.0.4-next.33

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 (117) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +2 -5
  2. package/dist/axis/arrow.js +6 -6
  3. package/dist/axis/axes.js +34 -34
  4. package/dist/container/index.js +34 -34
  5. package/dist/container/reducer.js +1 -1
  6. package/dist/coordinates-label.js +7 -7
  7. package/dist/graph-with-controls.js +25 -25
  8. package/dist/graph.js +2 -2
  9. package/dist/grid-setup.js +64 -64
  10. package/dist/grid.js +4 -4
  11. package/dist/index.js +2 -2
  12. package/dist/labels.js +17 -17
  13. package/dist/mark-label.js +7 -7
  14. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
  15. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
  16. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
  17. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  18. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  19. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
  20. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  21. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  22. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
  23. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js +43 -0
  24. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
  25. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
  26. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  27. package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
  28. package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
  29. 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
  30. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
  31. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  32. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
  33. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
  34. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
  35. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
  36. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
  37. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +1 -1
  38. package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +1 -1
  39. package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +2 -2
  40. package/dist/tool-menu.js +23 -23
  41. package/dist/tools/index.js +1 -1
  42. package/dist/tools/line/component.js +9 -9
  43. package/dist/tools/polygon/component.js +4 -4
  44. package/dist/tools/polygon/index.js +1 -1
  45. package/dist/tools/polygon/polygon.js +8 -8
  46. package/dist/tools/shared/line/index.js +1 -1
  47. package/dist/tools/shared/point/arrow-point.js +1 -1
  48. package/dist/tools/shared/point/arrow.js +1 -1
  49. package/dist/tools/shared/point/base-point.js +10 -10
  50. package/dist/tools/shared/point/index.js +5 -5
  51. package/dist/undo-redo.js +8 -8
  52. package/package.json +23 -18
  53. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
  54. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
  55. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
  56. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
  57. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
  58. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
  59. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
  60. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
  61. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
  62. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +0 -79
  63. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
  64. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
  65. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
  66. package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -50
  67. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
  68. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
  69. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
  70. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -47
  71. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
  72. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
  73. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
  74. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
  75. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Hash.js +0 -21
  76. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_ListCache.js +0 -21
  77. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Map.js +0 -10
  78. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_MapCache.js +0 -21
  79. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Symbol.js +0 -9
  80. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +0 -14
  81. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +0 -15
  82. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +0 -16
  83. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_coreJsData.js +0 -9
  84. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +0 -8
  85. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getMapData.js +0 -14
  86. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getNative.js +0 -15
  87. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getRawTag.js +0 -19
  88. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getValue.js +0 -11
  89. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashClear.js +0 -13
  90. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashDelete.js +0 -12
  91. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashGet.js +0 -18
  92. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashHas.js +0 -14
  93. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashSet.js +0 -14
  94. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isKeyable.js +0 -12
  95. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isMasked.js +0 -16
  96. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +0 -11
  97. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +0 -14
  98. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +0 -14
  99. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +0 -13
  100. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +0 -14
  101. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +0 -19
  102. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +0 -14
  103. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +0 -13
  104. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +0 -13
  105. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +0 -14
  106. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +0 -9
  107. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_objectToString.js +0 -12
  108. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_root.js +0 -10
  109. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_toSource.js +0 -20
  110. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/eq.js +0 -11
  111. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isFunction.js +0 -16
  112. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isObject.js +0 -12
  113. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/memoize.js +0 -20
  114. package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
  115. 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
  116. 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
  117. package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
@@ -3,7 +3,7 @@ import { require_browser as t } from "../../node_modules/.bun/invariant@2.2.4/no
3
3
  import { equalPoints as n, getMiddleOfTwoPoints as r, getRightestPoints as i } from "../../utils.js";
4
4
  import { ToolPropTypeFields as a } from "../shared/types.js";
5
5
  import o from "./polygon.js";
6
- import s from "../../mark-label.js";
6
+ import { MarkLabel as s } from "../../mark-label.js";
7
7
  import c from "react";
8
8
  import l from "prop-types";
9
9
  import { chunk as u, isEmpty as d } from "@pie-element/shared-lodash";
@@ -116,7 +116,7 @@ var g = /* @__PURE__ */ e(t(), 1), _ = p("pie-lib:graphing-solution-set:polygon"
116
116
  onClick: this.clickPoint.bind(this, i, d)
117
117
  }) }) });
118
118
  }
119
- }, b = class extends c.Component {
119
+ }, b = y, x = class extends c.Component {
120
120
  static propTypes = {
121
121
  ...a,
122
122
  graphProps: f.GraphPropsType.isRequired
@@ -173,7 +173,7 @@ var g = /* @__PURE__ */ e(t(), 1), _ = p("pie-lib:graphing-solution-set:polygon"
173
173
  };
174
174
  render() {
175
175
  let { coordinatesOnHover: e, mark: t, graphProps: n, onClick: r, isToolActive: i, labelNode: a, labelModeEnabled: o } = this.props, { mark: s } = this.state;
176
- return /* @__PURE__ */ m(y, {
176
+ return /* @__PURE__ */ m(b, {
177
177
  ...s || t,
178
178
  coordinatesOnHover: e,
179
179
  onChange: this.change,
@@ -191,4 +191,4 @@ var g = /* @__PURE__ */ e(t(), 1), _ = p("pie-lib:graphing-solution-set:polygon"
191
191
  }
192
192
  };
193
193
  //#endregion
194
- export { b as default };
194
+ export { b as BaseComponent, y as RawBaseComponent, x as default, v as swap };
@@ -52,4 +52,4 @@ var n = (t, n) => {
52
52
  }
53
53
  });
54
54
  //#endregion
55
- export { r as tool };
55
+ export { n as addPointToArray, r as tool };
@@ -3,16 +3,16 @@ import { correct as r, incorrect as i } from "../shared/styles.js";
3
3
  import a from "react";
4
4
  import o from "prop-types";
5
5
  import { gridDraggable as s, types as c } from "@pie-lib/plot";
6
- import { styled as l } from "@mui/material/styles";
7
- import { jsx as u } from "react/jsx-runtime";
6
+ import { jsx as l } from "react/jsx-runtime";
7
+ import { styled as u } from "@mui/material/styles";
8
8
  //#region src/tools/polygon/polygon.tsx
9
- var d = l("polygon", { shouldForwardProp: (e) => !["isSolution", "correctness"].includes(e) })(({ isSolution: e, correctness: t }) => ({
9
+ var d = u("polygon", { shouldForwardProp: (e) => !["isSolution", "correctness"].includes(e) })(({ isSolution: e, correctness: t }) => ({
10
10
  fill: e ? "rgb(60, 73, 150, 0.6)" : "transparent",
11
11
  strokeWidth: 2,
12
12
  "&:hover": { fill: e ? "rgb(60, 73, 150, 0.6)" : "rgb(0, 0, 0, 0.25)" },
13
13
  ...t === "correct" && r("stroke"),
14
14
  ...t === "incorrect" && i("stroke")
15
- })), f = l("polyline", { shouldForwardProp: (e) => !["isSolution", "correctness"].includes(e) })(({ isSolution: e, correctness: t }) => ({
15
+ })), f = u("polyline", { shouldForwardProp: (e) => !["isSolution", "correctness"].includes(e) })(({ isSolution: e, correctness: t }) => ({
16
16
  fill: e ? "rgb(60, 73, 150, 0.6)" : "transparent",
17
17
  strokeWidth: 2,
18
18
  "&:hover": { fill: e ? "rgb(60, 73, 150, 0.6)" : "rgb(0, 0, 0, 0.25)" },
@@ -36,7 +36,7 @@ var d = l("polygon", { shouldForwardProp: (e) => !["isSolution", "correctness"].
36
36
  static defaultProps = { points: [] };
37
37
  render() {
38
38
  let { points: e, className: t, correctness: n, graphProps: r, closed: i, isSolution: a, ...o } = this.props, { scale: s } = r, c = p(e, s);
39
- return /* @__PURE__ */ u(i ? d : f, {
39
+ return /* @__PURE__ */ l(i ? d : f, {
40
40
  points: c,
41
41
  isSolution: a,
42
42
  correctness: n,
@@ -44,7 +44,7 @@ var d = l("polygon", { shouldForwardProp: (e) => !["isSolution", "correctness"].
44
44
  ...o
45
45
  });
46
46
  }
47
- }, h = s({
47
+ }, h = m, g = s({
48
48
  bounds: (t, { domain: r, range: i }) => {
49
49
  let { points: a } = t;
50
50
  return e(n(a), r, i);
@@ -57,6 +57,6 @@ var d = l("polygon", { shouldForwardProp: (e) => !["isSolution", "correctness"].
57
57
  let { points: r } = e;
58
58
  return r.map((e) => t(e).add(t(n)));
59
59
  }
60
- })(m);
60
+ })(h);
61
61
  //#endregion
62
- export { h as default };
62
+ export { h as Polygon, m as RawPolygon, g as default, p as getPointString };
@@ -1,6 +1,6 @@
1
1
  import { equalPoints as e, getMiddleOfTwoPoints as t, sameAxes as n } from "../../../utils.js";
2
2
  import { correct as r, disabled as i, incorrect as a, missing as o } from "../styles.js";
3
- import s from "../../../mark-label.js";
3
+ import { MarkLabel as s } from "../../../mark-label.js";
4
4
  import { BasePoint as c } from "../point/index.js";
5
5
  import l from "react";
6
6
  import u from "prop-types";
@@ -1,5 +1,5 @@
1
1
  import { arrowDimensions as e, getAngleDeg as t } from "../../../utils.js";
2
- import n from "../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
2
+ import { clsx as n } from "../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
3
3
  import r from "react";
4
4
  import i from "prop-types";
5
5
  import { isEqual as a } from "@pie-element/shared-lodash";
@@ -1,5 +1,5 @@
1
1
  import { thinnerShapesNeeded as e } from "../../../utils.js";
2
- import t from "../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
2
+ import { clsx as t } from "../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
3
3
  import { ArrowHead as n } from "../arrow-head.js";
4
4
  import r from "react";
5
5
  import i from "prop-types";
@@ -1,15 +1,15 @@
1
1
  import { thinnerShapesNeeded as e } from "../../../utils.js";
2
2
  import { correct as t, disabled as n, incorrect as r, missing as i } from "../styles.js";
3
- import a from "../../../coordinates-label.js";
3
+ import { CoordinatesLabel as a } from "../../../coordinates-label.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 { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { styled as f } from "@mui/material/styles";
9
9
  import { color as p } from "@pie-lib/render-ui";
10
10
  import m from "react-dom";
11
11
  //#region src/tools/shared/point/base-point.tsx
12
- var h = l("g")(({ disabled: e, correctness: a }) => ({
12
+ var h = f("g")(({ disabled: e, correctness: a }) => ({
13
13
  cursor: "pointer",
14
14
  "& circle": { fill: "currentColor" },
15
15
  ...e && {
@@ -46,8 +46,8 @@ var h = l("g")(({ disabled: e, correctness: a }) => ({
46
46
  super(e), this.state = { showCoordinates: !1 };
47
47
  }
48
48
  render() {
49
- let { className: t, coordinatesOnHover: n, x: r, y: i, disabled: o, correctness: s, graphProps: c, labelNode: l, style: g, onClick: _, onTouchStart: v, onTouchEnd: y, ...b } = this.props, { showCoordinates: x } = this.state, { scale: S } = c, C = e(c) ? 5 : 7;
50
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("circle", {
49
+ let { className: t, coordinatesOnHover: n, x: r, y: i, disabled: o, correctness: s, graphProps: c, labelNode: f, style: g, onClick: _, onTouchStart: v, onTouchEnd: y, ...b } = this.props, { showCoordinates: x } = this.state, { scale: S } = c, C = e(c) ? 5 : 7;
50
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("circle", {
51
51
  style: {
52
52
  fill: "transparent",
53
53
  cursor: "pointer",
@@ -61,13 +61,13 @@ var h = l("g")(({ disabled: e, correctness: a }) => ({
61
61
  onTouchStart: v,
62
62
  onTouchEnd: y,
63
63
  onClick: _
64
- }), /* @__PURE__ */ f(h, {
64
+ }), /* @__PURE__ */ d(h, {
65
65
  disabled: o,
66
66
  correctness: s,
67
67
  className: t,
68
68
  onMouseEnter: () => this.setState({ showCoordinates: !0 }),
69
69
  onMouseLeave: () => this.setState({ showCoordinates: !1 }),
70
- children: [/* @__PURE__ */ d("circle", {
70
+ children: [/* @__PURE__ */ u("circle", {
71
71
  ...b,
72
72
  style: {
73
73
  fill: p.defaults.BLACK,
@@ -76,11 +76,11 @@ var h = l("g")(({ disabled: e, correctness: a }) => ({
76
76
  r: C,
77
77
  cx: S.x(r),
78
78
  cy: S.y(i)
79
- }), l && n && x && m.createPortal(/* @__PURE__ */ d(a, {
79
+ }), f && n && x && m.createPortal(/* @__PURE__ */ u(a, {
80
80
  graphProps: c,
81
81
  x: r,
82
82
  y: i
83
- }), l)]
83
+ }), f)]
84
84
  })] });
85
85
  }
86
86
  };
@@ -6,8 +6,8 @@ import c from "./arrow.js";
6
6
  import "react";
7
7
  import l from "prop-types";
8
8
  import { gridDraggable as u } from "@pie-lib/plot";
9
- import { styled as d } from "@mui/material/styles";
10
- import { jsx as f } from "react/jsx-runtime";
9
+ import { jsx as d } from "react/jsx-runtime";
10
+ import { styled as f } from "@mui/material/styles";
11
11
  import { color as p } from "@pie-lib/render-ui";
12
12
  //#region src/tools/shared/point/index.tsx
13
13
  var m = {
@@ -28,7 +28,7 @@ var m = {
28
28
  };
29
29
  },
30
30
  fromDelta: (e, n) => t(e).add(t(n))
31
- }, h = d("g", { shouldForwardProp: (e) => !["disabled", "correctness"].includes(e) })(({ disabled: e, correctness: t }) => ({ "& circle, & polygon": {
31
+ }, h = f("g", { shouldForwardProp: (e) => !["disabled", "correctness"].includes(e) })(({ disabled: e, correctness: t }) => ({ "& circle, & polygon": {
32
32
  cursor: "pointer",
33
33
  fill: p.defaults.SECONDARY,
34
34
  ...e && r(),
@@ -36,10 +36,10 @@ var m = {
36
36
  ...t === "incorrect" && i(),
37
37
  ...t === "missing" && a()
38
38
  } })), g = (e) => {
39
- let t = (t) => /* @__PURE__ */ f(h, {
39
+ let t = (t) => /* @__PURE__ */ d(h, {
40
40
  disabled: t.disabled,
41
41
  correctness: t.correctness,
42
- children: /* @__PURE__ */ f(e, { ...t })
42
+ children: /* @__PURE__ */ d(e, { ...t })
43
43
  });
44
44
  return t.displayName = `withStyledWrapper(${e.displayName || e.name || "Component"})`, t.propTypes = {
45
45
  disabled: l.bool,
package/dist/undo-redo.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
- import { styled as n } from "@mui/material/styles";
4
- import { jsx as r } from "react/jsx-runtime";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { styled as r } from "@mui/material/styles";
5
5
  import { color as i } from "@pie-lib/render-ui";
6
6
  import a from "@mui/material/Button";
7
7
  import o from "@pie-lib/translator";
8
8
  //#region src/undo-redo.tsx
9
- var { translator: s } = o, c = n(a)(({ theme: e }) => ({
9
+ var { translator: s } = o, c = r(a)(({ theme: e }) => ({
10
10
  color: i.text(),
11
11
  fontWeight: "bold",
12
12
  marginBottom: e.spacing(.5),
@@ -19,15 +19,15 @@ var { translator: s } = o, c = n(a)(({ theme: e }) => ({
19
19
  };
20
20
  static defaultProps = {};
21
21
  render() {
22
- let { className: e, onReset: t = !1, language: n } = this.props;
23
- return /* @__PURE__ */ r("div", {
22
+ let { className: e, onReset: t = !1, language: r } = this.props;
23
+ return /* @__PURE__ */ n("div", {
24
24
  className: e,
25
- children: /* @__PURE__ */ r(c, {
25
+ children: /* @__PURE__ */ n(c, {
26
26
  onClick: () => t(),
27
- children: s.t("graphing.reset", { lng: n })
27
+ children: s.t("graphing.reset", { lng: r })
28
28
  })
29
29
  });
30
30
  }
31
31
  };
32
32
  //#endregion
33
- export { l as default };
33
+ export { l as UndoRedo, l as default };
package/package.json CHANGED
@@ -1,41 +1,46 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-solution-set",
3
- "version": "4.0.4-next.31",
3
+ "version": "4.0.4-next.33",
4
4
  "description": "Graphing components",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/pie-framework/pie-elements-ng.git",
8
+ "directory": "packages/lib-react/graphing-solution-set"
9
+ },
5
10
  "dependencies": {
6
11
  "@dnd-kit/sortable": "10.0.0",
7
12
  "@emotion/react": "^11.14.0",
8
- "@emotion/style": "^0.8.0",
13
+ "@emotion/styled": "^11.14.1",
9
14
  "@mapbox/point-geometry": "^1.1.0",
10
15
  "@mui/icons-material": "^7.3.4",
11
16
  "@mui/material": "^7.3.4",
12
- "@pie-lib/drag": "4.0.3-next.38",
13
- "@pie-lib/editable-html-tip-tap": "2.1.2-next.31",
14
- "@pie-lib/graphing-utils": "3.0.3-next.1",
15
- "@pie-lib/plot": "4.0.4-next.31",
16
- "@pie-lib/render-ui": "6.1.1-next.38",
17
+ "@pie-lib/drag": "4.0.3-next.39",
18
+ "@pie-lib/editable-html-tip-tap": "2.1.2-next.33",
19
+ "@pie-lib/graphing-utils": "3.0.3-next.2",
20
+ "@pie-lib/plot": "4.0.4-next.33",
21
+ "@pie-lib/render-ui": "6.1.1-next.39",
17
22
  "@pie-lib/tools": "2.0.3-next.1",
18
- "@pie-lib/translator": "4.0.3-next.1",
19
- "@visx/axis": "^3.0.0",
20
- "@visx/clip-path": "^3.0.0",
21
- "@visx/curve": "^3.0.0",
22
- "@visx/event": "^3.0.0",
23
- "@visx/grid": "^3.0.0",
24
- "@visx/group": "^3.0.0",
25
- "@visx/point": "^3.0.0",
26
- "@visx/shape": "^3.0.0",
23
+ "@pie-lib/translator": "4.0.3-next.2",
24
+ "@visx/axis": "^4.0.0",
25
+ "@visx/clip-path": "^4.0.0",
26
+ "@visx/curve": "^4.0.0",
27
+ "@visx/event": "^4.0.0",
28
+ "@visx/grid": "^4.0.0",
29
+ "@visx/group": "^4.0.0",
30
+ "@visx/point": "^4.0.0",
31
+ "@visx/shape": "^4.0.0",
27
32
  "d3-scale": "^4.0.2",
28
33
  "d3-selection": "^3.0.0",
29
34
  "debug": "^4.1.1",
30
35
  "invariant": "^2.2.4",
31
36
  "prop-types": "^15.7.2",
32
- "react-draggable": "^4.6.0",
37
+ "react-draggable": "^4.7.1",
33
38
  "react-redux": "^9.3.0",
34
39
  "redux": "^5.0.1",
35
40
  "redux-undo": "^1.1.0",
36
41
  "@pie-element/shared-lodash": "0.1.1-next.1",
37
42
  "clsx": "^2.1.1",
38
- "@pie-lib/config-ui": "13.0.4-next.31",
43
+ "@pie-lib/config-ui": "13.0.4-next.33",
39
44
  "@dnd-kit/core": "^6.3.1",
40
45
  "@dnd-kit/utilities": "^3.2.2",
41
46
  "d3-shape": "^3.2.0"
@@ -1,101 +0,0 @@
1
- import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
3
- import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
4
- import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
5
- import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
6
- import a from "../constants/orientation.js";
7
- import o from "./AxisRenderer.js";
8
- import s from "../utils/getTickPosition.js";
9
- import c from "../utils/getTickFormatter.js";
10
- import l from "../utils/createPoint.js";
11
- import u from "../utils/getAxisRangePaddingConfig.js";
12
- import d from "react";
13
- import "prop-types";
14
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js
15
- var f = /* @__PURE__ */ e(t()), p = [
16
- "children",
17
- "axisClassName",
18
- "hideAxisLine",
19
- "hideTicks",
20
- "hideZero",
21
- "innerRef",
22
- "left",
23
- "numTicks",
24
- "orientation",
25
- "rangePadding",
26
- "scale",
27
- "tickFormat",
28
- "tickLength",
29
- "tickValues",
30
- "top"
31
- ];
32
- function m() {
33
- return m = Object.assign ? Object.assign.bind() : function(e) {
34
- for (var t = 1; t < arguments.length; t++) {
35
- var n = arguments[t];
36
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
37
- }
38
- return e;
39
- }, m.apply(this, arguments);
40
- }
41
- function h(e, t) {
42
- if (e == null) return {};
43
- var n = {}, r = Object.keys(e), i, a;
44
- for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
45
- return n;
46
- }
47
- function g(e) {
48
- var t = e.children, g = t === void 0 ? o : t, _ = e.axisClassName, v = e.hideAxisLine, y = v === void 0 ? !1 : v, b = e.hideTicks, x = b === void 0 ? !1 : b, S = e.hideZero, C = S === void 0 ? !1 : S, w = e.innerRef, T = e.left, E = T === void 0 ? 0 : T, D = e.numTicks, O = D === void 0 ? 10 : D, k = e.orientation, A = k === void 0 ? a.bottom : k, j = e.rangePadding, M = j === void 0 ? 0 : j, N = e.scale, P = e.tickFormat, F = e.tickLength, I = F === void 0 ? 8 : F, L = e.tickValues, R = e.top, z = R === void 0 ? 0 : R, B = h(e, p), V = P ?? c(N), H = A === a.left, U = A === a.top, W = U || A === a.bottom, G = s(N), K = H || U ? -1 : 1, q = N.range(), J = u(M), Y = l({
49
- x: Number(q[0]) + .5 - J.start,
50
- y: 0
51
- }, W), X = l({
52
- x: Number(q[q.length - 1]) + .5 + J.end,
53
- y: 0
54
- }, W), Z = (L ?? i(N, O)).filter(function(e) {
55
- return !C || e !== 0 && e !== "0";
56
- }).map(function(e, t) {
57
- return {
58
- value: e,
59
- index: t
60
- };
61
- }), Q = Z.map(function(e) {
62
- var t = e.value, n = e.index, i = r(G(t));
63
- return {
64
- value: t,
65
- index: n,
66
- from: l({
67
- x: i,
68
- y: 0
69
- }, W),
70
- to: l({
71
- x: i,
72
- y: I * K
73
- }, W),
74
- formattedValue: V(t, n, Z)
75
- };
76
- });
77
- return /*#__PURE__*/ d.createElement(n, {
78
- className: (0, f.default)("visx-axis", _),
79
- innerRef: w,
80
- top: z,
81
- left: E
82
- }, g(m({}, B, {
83
- axisFromPoint: Y,
84
- axisToPoint: X,
85
- hideAxisLine: y,
86
- hideTicks: x,
87
- hideZero: C,
88
- horizontal: W,
89
- numTicks: O,
90
- orientation: A,
91
- rangePadding: M,
92
- scale: N,
93
- tickFormat: V,
94
- tickLength: I,
95
- tickPosition: G,
96
- tickSign: K,
97
- ticks: Q
98
- })));
99
- }
100
- //#endregion
101
- export { g as default };
@@ -1,63 +0,0 @@
1
- import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
3
- import n from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js";
4
- import r from "../../../../../../@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js";
5
- import i from "../constants/orientation.js";
6
- import a from "../utils/getLabelTransform.js";
7
- import o from "./Ticks.js";
8
- import s from "react";
9
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js
10
- var c = /* @__PURE__ */ e(t());
11
- function l() {
12
- return l = Object.assign ? Object.assign.bind() : function(e) {
13
- for (var t = 1; t < arguments.length; t++) {
14
- var n = arguments[t];
15
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
16
- }
17
- return e;
18
- }, l.apply(this, arguments);
19
- }
20
- var u = {
21
- textAnchor: "middle",
22
- fontFamily: "Arial",
23
- fontSize: 10,
24
- fill: "#222"
25
- };
26
- function d(e) {
27
- var t = e.axisFromPoint, d = e.axisLineClassName, f = e.axisToPoint, p = e.hideAxisLine, m = e.hideTicks, h = e.horizontal, g = e.label, _ = g === void 0 ? "" : g, v = e.labelClassName, y = e.labelOffset, b = y === void 0 ? 14 : y, x = e.labelProps, S = e.orientation, C = S === void 0 ? i.bottom : S, w = e.scale, T = e.stroke, E = T === void 0 ? "#222" : T, D = e.strokeDasharray, O = e.strokeWidth, k = O === void 0 ? 1 : O, A = e.tickClassName, j = e.tickComponent, M = e.tickLineProps, N = e.tickLabelProps, P = e.tickLength, F = P === void 0 ? 8 : P, I = e.tickStroke, L = I === void 0 ? "#222" : I, R = e.tickTransform, z = e.ticks, B = e.ticksComponent, V = B === void 0 ? o : B, H = l({}, u, x), U = l({}, u, typeof N == "object" ? N : null), W = z.map(function(e) {
28
- var t = e.value, n = e.index;
29
- return typeof N == "function" ? N(t, n, z) : U;
30
- }), G = Math.max.apply(Math, [10].concat(W.map(function(e) {
31
- return typeof e.fontSize == "number" ? e.fontSize : 0;
32
- })));
33
- return /*#__PURE__*/ s.createElement(s.Fragment, null, V({
34
- hideTicks: m,
35
- horizontal: h,
36
- orientation: C,
37
- scale: w,
38
- tickClassName: A,
39
- tickComponent: j,
40
- tickLabelProps: W,
41
- tickStroke: L,
42
- tickTransform: R,
43
- ticks: z,
44
- strokeWidth: k,
45
- tickLineProps: M
46
- }), !p && /*#__PURE__*/ s.createElement(n, {
47
- className: (0, c.default)("visx-axis-line", d),
48
- from: t,
49
- to: f,
50
- stroke: E,
51
- strokeWidth: k,
52
- strokeDasharray: D
53
- }), _ && /*#__PURE__*/ s.createElement(r, l({ className: (0, c.default)("visx-axis-label", v) }, a({
54
- labelOffset: b,
55
- labelProps: H,
56
- orientation: C,
57
- range: w.range(),
58
- tickLabelFontSize: G,
59
- tickLength: F
60
- }), H), _));
61
- }
62
- //#endregion
63
- export { d as default };
@@ -1,44 +0,0 @@
1
- import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
3
- import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
4
- import r from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js";
5
- import i from "../../../../../../@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js";
6
- import a from "../constants/orientation.js";
7
- import o from "react";
8
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js
9
- var s = /* @__PURE__ */ e(t());
10
- function c() {
11
- return c = Object.assign ? Object.assign.bind() : function(e) {
12
- for (var t = 1; t < arguments.length; t++) {
13
- var n = arguments[t];
14
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
15
- }
16
- return e;
17
- }, c.apply(this, arguments);
18
- }
19
- function l(e) {
20
- var t = e.hideTicks, l = e.horizontal, u = e.orientation, d = e.tickClassName, f = e.tickComponent, p = e.tickLabelProps, m = e.tickStroke, h = m === void 0 ? "#222" : m, g = e.tickTransform, _ = e.ticks, v = e.strokeWidth, y = e.tickLineProps;
21
- return _.map(function(e) {
22
- var m = e.value, _ = e.index, b = e.from, x = e.to, S = e.formattedValue, C = p[_] ?? {}, w = Math.max(10, typeof C.fontSize == "number" && C.fontSize || 0), T = x.y + (l && u !== a.top ? w : 0);
23
- return /*#__PURE__*/ o.createElement(n, {
24
- key: "visx-tick-" + m + "-" + _,
25
- className: (0, s.default)("visx-axis-tick", d),
26
- transform: g
27
- }, !t && /*#__PURE__*/ o.createElement(r, c({
28
- from: b,
29
- to: x,
30
- stroke: h,
31
- strokeWidth: v,
32
- strokeLinecap: "square"
33
- }, y)), f ? f(c({}, C, {
34
- x: x.x,
35
- y: T,
36
- formattedValue: S
37
- })) : /*#__PURE__*/ o.createElement(i, c({
38
- x: x.x,
39
- y: T
40
- }, C), S));
41
- });
42
- }
43
- //#endregion
44
- export { l as default };
@@ -1,9 +0,0 @@
1
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js
2
- var e = {
3
- top: "top",
4
- left: "left",
5
- right: "right",
6
- bottom: "bottom"
7
- };
8
- //#endregion
9
- export { e as default };
@@ -1,14 +0,0 @@
1
- import { Point as e } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
2
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js
3
- function t(t, n) {
4
- var r = t.x, i = t.y;
5
- return new e(n ? {
6
- x: r,
7
- y: i
8
- } : {
9
- x: i,
10
- y: r
11
- });
12
- }
13
- //#endregion
14
- export { t as default };
@@ -1,21 +0,0 @@
1
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js
2
- function e() {
3
- return e = Object.assign ? Object.assign.bind() : function(e) {
4
- for (var t = 1; t < arguments.length; t++) {
5
- var n = arguments[t];
6
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
7
- }
8
- return e;
9
- }, e.apply(this, arguments);
10
- }
11
- function t(t) {
12
- return t === void 0 && (t = 0), typeof t == "number" ? {
13
- start: t,
14
- end: t
15
- } : e({
16
- start: 0,
17
- end: 0
18
- }, t);
19
- }
20
- //#endregion
21
- export { t as default };
@@ -1,16 +0,0 @@
1
- import e from "../constants/orientation.js";
2
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js
3
- function t(t) {
4
- var n = t.labelOffset, r = t.labelProps, i = t.orientation, a = t.range, o = t.tickLabelFontSize, s = t.tickLength, c = i === e.left || i === e.top ? -1 : 1, l, u, d;
5
- if (i === e.top || i === e.bottom) {
6
- var f = i === e.bottom && typeof r.fontSize == "number" ? r.fontSize : 0;
7
- l = (Number(a[0]) + Number(a[a.length - 1])) / 2, u = c * (s + n + o + f);
8
- } else l = c * ((Number(a[0]) + Number(a[a.length - 1])) / 2), u = -(s + n), d = "rotate(" + c * 90 + ")";
9
- return {
10
- x: l,
11
- y: u,
12
- transform: d
13
- };
14
- }
15
- //#endregion
16
- export { t as default };
@@ -1,8 +0,0 @@
1
- import e from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js";
2
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js
3
- function t(t) {
4
- var n = t;
5
- return "tickFormat" in n ? n.tickFormat() : e;
6
- }
7
- //#endregion
8
- export { t as default };
@@ -1,15 +0,0 @@
1
- //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js
2
- function e(e, t) {
3
- t === void 0 && (t = "center");
4
- var n = e;
5
- if (t !== "start" && "bandwidth" in n) {
6
- var r = n.bandwidth();
7
- return t === "center" && (r /= 2), n.round() && (r = Math.round(r)), function(e) {
8
- var t = n(e);
9
- return typeof t == "number" ? t + r : t;
10
- };
11
- }
12
- return e;
13
- }
14
- //#endregion
15
- export { e as default };