@pie-lib/graphing-solution-set 5.0.1-next.20261004041321 → 5.0.1-next.20261004165705

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.
@@ -1,11 +1,11 @@
1
1
  import "react";
2
2
  import e from "prop-types";
3
- import { jsx as t } from "react/jsx-runtime";
4
- import { color as n } from "@pie-lib/render-ui";
3
+ import { color as t } from "@pie-lib/render-ui";
4
+ import { jsx as n } from "react/jsx-runtime";
5
5
  //#region src/tools/shared/arrow-head.tsx
6
- var r = ({ size: e, transform: n, points: r }) => /* @__PURE__ */ t("polygon", {
6
+ var r = ({ size: e, transform: t, points: r }) => /* @__PURE__ */ n("polygon", {
7
7
  points: r || `0,0 ${e},${e / 2} 0,${e}`,
8
- transform: n
8
+ transform: t
9
9
  });
10
10
  r.propTypes = {
11
11
  points: e.string,
@@ -16,7 +16,7 @@ r.propTypes = {
16
16
  size: 10,
17
17
  transform: ""
18
18
  };
19
- var i = () => `arrow-${(Math.random() * 1e3).toFixed(0)}`, a = ({ id: e, size: i, className: a }) => /* @__PURE__ */ t("marker", {
19
+ var i = ({ id: e, size: i, className: a }) => /* @__PURE__ */ n("marker", {
20
20
  id: e,
21
21
  viewBox: `0 0 ${i} ${i}`,
22
22
  refX: i / 2,
@@ -25,13 +25,13 @@ var i = () => `arrow-${(Math.random() * 1e3).toFixed(0)}`, a = ({ id: e, size: i
25
25
  markerHeight: i,
26
26
  orient: "auto-start-reverse",
27
27
  className: a,
28
- style: { fill: n.defaults.BLACK },
29
- children: /* @__PURE__ */ t(r, { size: i })
28
+ style: { fill: t.defaults.BLACK },
29
+ children: /* @__PURE__ */ n(r, { size: i })
30
30
  });
31
- a.propTypes = {
31
+ i.propTypes = {
32
32
  id: e.string,
33
33
  size: e.number,
34
34
  className: e.string
35
- }, a.defaultProps = { size: 5 };
35
+ }, i.defaultProps = { size: 5 };
36
36
  //#endregion
37
- export { r as ArrowHead, a as ArrowMarker, i as genUid };
37
+ export { r as ArrowHead, i as ArrowMarker };
@@ -6,8 +6,8 @@ import l from "react";
6
6
  import u from "prop-types";
7
7
  import { cloneDeep as d, isEmpty as f, isEqual as p } from "@pie-element/shared-lodash";
8
8
  import { gridDraggable as m, trig as h, types as g, utils as _ } from "@pie-lib/plot";
9
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
10
- import { color as b } from "@pie-lib/render-ui";
9
+ import { color as v } from "@pie-lib/render-ui";
10
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
11
11
  import x from "react-dom";
12
12
  //#region src/tools/shared/line/index.tsx
13
13
  var S = (t, n) => () => ({
@@ -68,7 +68,7 @@ var S = (t, n) => () => ({
68
68
  };
69
69
  render() {
70
70
  let { graphProps: t, onClick: n, labelNode: r, labelModeEnabled: i, coordinatesOnHover: a, gssLineData: o, language: s } = this.props, c = this.state.mark ? this.state.mark : this.props.mark, l = d(c.from), u = d(c.to), f = d(c.middle);
71
- return l && c.isBackground && (l.disabled = !0), u && c.isBackground && (u.disabled = !0), f && c.isBackground && (f.disabled = !0), /* @__PURE__ */ v(e, {
71
+ return l && c.isBackground && (l.disabled = !0), u && c.isBackground && (u.disabled = !0), f && c.isBackground && (f.disabled = !0), /* @__PURE__ */ y(e, {
72
72
  disabled: c.disabled,
73
73
  coordinatesOnHover: a,
74
74
  correctness: c.correctness,
@@ -183,7 +183,7 @@ var S = (t, n) => () => ({
183
183
  };
184
184
  input = {};
185
185
  render() {
186
- let { coordinatesOnHover: e, graphProps: t, fill: n, gssLineData: r, onDragStart: c, onDragStop: l, from: u, to: d, middle: f, disabled: p, correctness: m, onClick: g, labelNode: _, labelModeEnabled: b, language: S } = this.props, C = {
186
+ let { coordinatesOnHover: e, graphProps: t, fill: n, gssLineData: r, onDragStart: c, onDragStop: l, from: u, to: d, middle: f, disabled: p, correctness: m, onClick: g, labelNode: _, labelModeEnabled: v, language: S } = this.props, C = {
187
187
  graphProps: t,
188
188
  fill: n,
189
189
  onDragStart: c,
@@ -200,9 +200,9 @@ var S = (t, n) => () => ({
200
200
  onClick: g
201
201
  });
202
202
  let w = d ? h.toDegrees(h.angle(u, d)) : 0, T = null, E = null, D = null;
203
- return _ && (u && Object.prototype.hasOwnProperty.call(u, "label") && (T = x.createPortal(/* @__PURE__ */ v(s, {
203
+ return _ && (u && Object.prototype.hasOwnProperty.call(u, "label") && (T = x.createPortal(/* @__PURE__ */ y(s, {
204
204
  inputRef: (e) => this.input.from = e,
205
- disabled: !b,
205
+ disabled: !v,
206
206
  mark: u,
207
207
  graphProps: t,
208
208
  language: S,
@@ -210,9 +210,9 @@ var S = (t, n) => () => ({
210
210
  ...u,
211
211
  label: e
212
212
  }, "from")
213
- }), _)), d && Object.prototype.hasOwnProperty.call(d, "label") && (E = x.createPortal(/* @__PURE__ */ v(s, {
213
+ }), _)), d && Object.prototype.hasOwnProperty.call(d, "label") && (E = x.createPortal(/* @__PURE__ */ y(s, {
214
214
  inputRef: (e) => this.input.to = e,
215
- disabled: !b,
215
+ disabled: !v,
216
216
  mark: d,
217
217
  graphProps: t,
218
218
  language: S,
@@ -220,9 +220,9 @@ var S = (t, n) => () => ({
220
220
  ...d,
221
221
  label: e
222
222
  }, "to")
223
- }), _)), f && Object.prototype.hasOwnProperty.call(f, "label") && (D = x.createPortal(/* @__PURE__ */ v(s, {
223
+ }), _)), f && Object.prototype.hasOwnProperty.call(f, "label") && (D = x.createPortal(/* @__PURE__ */ y(s, {
224
224
  inputRef: (e) => this.input.middle = e,
225
- disabled: !b,
225
+ disabled: !v,
226
226
  mark: f,
227
227
  graphProps: t,
228
228
  language: S,
@@ -230,15 +230,15 @@ var S = (t, n) => () => ({
230
230
  ...f,
231
231
  label: e
232
232
  }, "middle")
233
- }), _))), r && r.selectedTool === "solutionSet" ? /* @__PURE__ */ y("g", { children: [
234
- d && /* @__PURE__ */ v(i, {
233
+ }), _))), r && r.selectedTool === "solutionSet" ? /* @__PURE__ */ b("g", { children: [
234
+ d && /* @__PURE__ */ y(i, {
235
235
  from: u,
236
236
  to: d,
237
237
  middle: f,
238
238
  ...C
239
239
  }),
240
240
  D,
241
- /* @__PURE__ */ v(a, {
241
+ /* @__PURE__ */ y(a, {
242
242
  x: u.x,
243
243
  y: u.y,
244
244
  labelNode: _,
@@ -246,7 +246,7 @@ var S = (t, n) => () => ({
246
246
  ...C
247
247
  }),
248
248
  T,
249
- d && /* @__PURE__ */ v(o, {
249
+ d && /* @__PURE__ */ y(o, {
250
250
  x: d.x,
251
251
  y: d.y,
252
252
  angle: w,
@@ -255,8 +255,8 @@ var S = (t, n) => () => ({
255
255
  ...C
256
256
  }),
257
257
  E
258
- ] }) : /* @__PURE__ */ y("g", { children: [
259
- d && /* @__PURE__ */ v(i, {
258
+ ] }) : /* @__PURE__ */ b("g", { children: [
259
+ d && /* @__PURE__ */ y(i, {
260
260
  from: u,
261
261
  to: d,
262
262
  middle: f,
@@ -265,7 +265,7 @@ var S = (t, n) => () => ({
265
265
  onClick: (e) => this.clickPoint(f, "middle", e)
266
266
  }),
267
267
  D,
268
- /* @__PURE__ */ v(a, {
268
+ /* @__PURE__ */ y(a, {
269
269
  x: u.x,
270
270
  y: u.y,
271
271
  labelNode: _,
@@ -275,7 +275,7 @@ var S = (t, n) => () => ({
275
275
  onClick: (e) => this.clickPoint(u, "from", e)
276
276
  }),
277
277
  T,
278
- d && /* @__PURE__ */ v(o, {
278
+ d && /* @__PURE__ */ y(o, {
279
279
  x: d.x,
280
280
  y: d.y,
281
281
  angle: w,
@@ -293,26 +293,26 @@ var S = (t, n) => () => ({
293
293
  }, E = {
294
294
  line: () => ({
295
295
  fill: "transparent",
296
- stroke: b.defaults.BLACK,
296
+ stroke: v.defaults.BLACK,
297
297
  strokeWidth: 4,
298
298
  transition: "stroke 200ms ease-in, stroke-width 200ms ease-in",
299
299
  "&:hover": {
300
300
  strokeWidth: 6,
301
- stroke: b.defaults.BLACK
301
+ stroke: v.defaults.BLACK
302
302
  }
303
303
  }),
304
304
  dashedLine: () => ({
305
305
  fill: "transparent",
306
- stroke: b.defaults.BLACK,
306
+ stroke: v.defaults.BLACK,
307
307
  strokeWidth: 4,
308
308
  transition: "stroke 200ms ease-in, stroke-width 200ms ease-in",
309
309
  "&:hover": {
310
310
  strokeWidth: 6,
311
- stroke: b.defaults.BLACK
311
+ stroke: v.defaults.BLACK
312
312
  },
313
313
  strokeDasharray: "3,3"
314
314
  }),
315
- arrow: () => ({ fill: b.defaults.SECONDARY }),
315
+ arrow: () => ({ fill: v.defaults.SECONDARY }),
316
316
  disabledArrow: () => ({ ...i() }),
317
317
  disabled: () => ({
318
318
  ...i("stroke"),
@@ -4,12 +4,12 @@ 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 { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
8
- import { styled as f } from "@mui/material/styles";
9
- import { color as p } from "@pie-lib/render-ui";
7
+ import { color as l } from "@pie-lib/render-ui";
8
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { styled as p } from "@mui/material/styles";
10
10
  import m from "react-dom";
11
11
  //#region src/tools/shared/point/base-point.tsx
12
- var h = f("g")(({ disabled: e, correctness: a }) => ({
12
+ var h = p("g")(({ disabled: e, correctness: a }) => ({
13
13
  cursor: "pointer",
14
14
  "& circle": { fill: "currentColor" },
15
15
  ...e && {
@@ -46,8 +46,8 @@ var h = f("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: 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", {
49
+ let { className: t, coordinatesOnHover: n, x: r, y: i, disabled: o, correctness: s, graphProps: c, labelNode: p, 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", {
51
51
  style: {
52
52
  fill: "transparent",
53
53
  cursor: "pointer",
@@ -61,26 +61,26 @@ var h = f("g")(({ disabled: e, correctness: a }) => ({
61
61
  onTouchStart: v,
62
62
  onTouchEnd: y,
63
63
  onClick: _
64
- }), /* @__PURE__ */ d(h, {
64
+ }), /* @__PURE__ */ f(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__ */ u("circle", {
70
+ children: [/* @__PURE__ */ d("circle", {
71
71
  ...b,
72
72
  style: {
73
- fill: p.defaults.BLACK,
73
+ fill: l.defaults.BLACK,
74
74
  cursor: "pointer"
75
75
  },
76
76
  r: C,
77
77
  cx: S.x(r),
78
78
  cy: S.y(i)
79
- }), f && n && x && m.createPortal(/* @__PURE__ */ u(a, {
79
+ }), p && n && x && m.createPortal(/* @__PURE__ */ d(a, {
80
80
  graphProps: c,
81
81
  x: r,
82
82
  y: i
83
- }), f)]
83
+ }), p)]
84
84
  })] });
85
85
  }
86
86
  };
@@ -6,9 +6,9 @@ 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 { jsx as d } from "react/jsx-runtime";
10
- import { styled as f } from "@mui/material/styles";
11
- import { color as p } from "@pie-lib/render-ui";
9
+ import { color as d } from "@pie-lib/render-ui";
10
+ import { jsx as f } from "react/jsx-runtime";
11
+ import { styled as p } from "@mui/material/styles";
12
12
  //#region src/tools/shared/point/index.tsx
13
13
  var m = {
14
14
  bounds: (t, { domain: n, range: r }) => {
@@ -28,18 +28,18 @@ var m = {
28
28
  };
29
29
  },
30
30
  fromDelta: (e, n) => t(e).add(t(n))
31
- }, h = f("g", { shouldForwardProp: (e) => !["disabled", "correctness"].includes(e) })(({ disabled: e, correctness: t }) => ({ "& circle, & polygon": {
31
+ }, h = p("g", { shouldForwardProp: (e) => !["disabled", "correctness"].includes(e) })(({ disabled: e, correctness: t }) => ({ "& circle, & polygon": {
32
32
  cursor: "pointer",
33
- fill: p.defaults.SECONDARY,
33
+ fill: d.defaults.SECONDARY,
34
34
  ...e && r(),
35
35
  ...t === "correct" && n(),
36
36
  ...t === "incorrect" && i(),
37
37
  ...t === "missing" && a()
38
38
  } })), g = (e) => {
39
- let t = (t) => /* @__PURE__ */ d(h, {
39
+ let t = (t) => /* @__PURE__ */ f(h, {
40
40
  disabled: t.disabled,
41
41
  correctness: t.correctness,
42
- children: /* @__PURE__ */ d(e, { ...t })
42
+ children: /* @__PURE__ */ f(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,13 +1,13 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
- import n from "@pie-lib/translator";
4
- import { jsx as r } from "react/jsx-runtime";
5
- import { styled as i } from "@mui/material/styles";
6
- import { color as a } from "@pie-lib/render-ui";
3
+ import { color as n } from "@pie-lib/render-ui";
4
+ import r from "@pie-lib/translator";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ import { styled as a } from "@mui/material/styles";
7
7
  import o from "@mui/material/Button";
8
8
  //#region src/undo-redo.tsx
9
- var { translator: s } = n, c = i(o)(({ theme: e }) => ({
10
- color: a.text(),
9
+ var { translator: s } = r, c = a(o)(({ theme: e }) => ({
10
+ color: n.text(),
11
11
  fontWeight: "bold",
12
12
  marginBottom: e.spacing(.5),
13
13
  "&:not(:last-of-type)": { marginRight: e.spacing(.5) }
@@ -20,9 +20,9 @@ var { translator: s } = n, c = i(o)(({ theme: e }) => ({
20
20
  static defaultProps = {};
21
21
  render() {
22
22
  let { className: e, onReset: t = !1, language: n } = this.props;
23
- return /* @__PURE__ */ r("div", {
23
+ return /* @__PURE__ */ i("div", {
24
24
  className: e,
25
- children: /* @__PURE__ */ r(c, {
25
+ children: /* @__PURE__ */ i(c, {
26
26
  onClick: () => t(),
27
27
  children: s.t("graphing.reset", { lng: n })
28
28
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-solution-set",
3
- "version": "5.0.1-next.20261004041321",
3
+ "version": "5.0.1-next.20261004165705",
4
4
  "description": "Graphing components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,11 +14,11 @@
14
14
  "@mapbox/point-geometry": "^1.1.0",
15
15
  "@mui/icons-material": "^7.3.4",
16
16
  "@mui/material": "^7.3.4",
17
- "@pie-lib/drag": "5.0.1-next.20261004023419",
18
- "@pie-lib/editable-html-tip-tap": "3.0.1-next.20261004041321",
17
+ "@pie-lib/drag": "5.0.1-next.20261004165705",
18
+ "@pie-lib/editable-html-tip-tap": "3.0.1-next.20261004165705",
19
19
  "@pie-lib/graphing-utils": "4.0.1-next.20261002233132",
20
- "@pie-lib/plot": "5.0.1-next.20261004041321",
21
- "@pie-lib/render-ui": "8.0.1-next.20261004023419",
20
+ "@pie-lib/plot": "5.0.1-next.20261004165705",
21
+ "@pie-lib/render-ui": "8.0.1-next.20261004165705",
22
22
  "@pie-lib/tools": "3.0.1-next.20261002233132",
23
23
  "@pie-lib/translator": "5.0.1-next.20261004041321",
24
24
  "@visx/axis": "^4.0.0",
@@ -40,7 +40,7 @@
40
40
  "redux-undo": "^1.1.0",
41
41
  "@pie-element/shared-lodash": "0.1.2-next.20261002215153",
42
42
  "clsx": "^2.1.1",
43
- "@pie-lib/config-ui": "14.0.1-next.20261004041321",
43
+ "@pie-lib/config-ui": "14.0.1-next.20261004165705",
44
44
  "@dnd-kit/core": "^6.3.1",
45
45
  "@dnd-kit/utilities": "^3.2.2",
46
46
  "d3-shape": "^3.2.0"