@pie-lib/graphing-solution-set 5.0.1-next.20261003161149 → 5.0.1-next.20261004005223

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -145,7 +145,8 @@ var P = class extends s.Component {
145
145
  tools: Q,
146
146
  gssLineData: G,
147
147
  onSolutionSetSelected: q,
148
- disabled: !!g
148
+ disabled: !!g,
149
+ language: U
149
150
  })
150
151
  ]
151
152
  });
package/dist/graph.d.ts CHANGED
@@ -42,6 +42,7 @@ export declare const graphPropTypes: {
42
42
  showTitle: PropTypes.Requireable<boolean>;
43
43
  title: PropTypes.Requireable<string>;
44
44
  tools: PropTypes.Requireable<any[]>;
45
+ language: PropTypes.Requireable<string>;
45
46
  };
46
47
  export declare const removeBuildingToolIfCurrentToolDiffers: ({ marks, currentTool }: {
47
48
  marks: any;
@@ -92,6 +93,7 @@ export declare class Graph extends React.Component {
92
93
  showTitle: PropTypes.Requireable<boolean>;
93
94
  title: PropTypes.Requireable<string>;
94
95
  tools: PropTypes.Requireable<any[]>;
96
+ language: PropTypes.Requireable<string>;
95
97
  };
96
98
  static defaultProps: {
97
99
  onChangeMarks: () => void;
package/dist/graph.js CHANGED
@@ -35,7 +35,8 @@ var _ = m("pie-lib:graphing-solution-set:graph"), v = {
35
35
  showPixelGuides: c.bool,
36
36
  showTitle: c.bool,
37
37
  title: c.string,
38
- tools: c.array
38
+ tools: c.array,
39
+ language: c.string
39
40
  }, y = (e) => ({
40
41
  x: -23,
41
42
  y: -23,
@@ -110,18 +111,19 @@ var _ = m("pie-lib:graphing-solution-set:graph"), v = {
110
111
  }, void 0), this.updateMarks(c, l, !0);
111
112
  };
112
113
  render() {
113
- let { axesSettings: t, currentTool: r, coordinatesOnHover: a, size: s, disabledLabels: c, disabledTitle: l, domain: u, backgroundMarks: p, range: m, title: _, labels: v, labelModeEnabled: x, labelsPlaceholders: S, showLabels: C, showPixelGuides: w, showTitle: T, titlePlaceholder: E, onChangeLabels: D, onChangeTitle: O, mathMlOptions: k = {}, gssLineData: A, disabled: j } = this.props, { marks: M } = this.props, N = f(u, m, s, () => this.rootNode), P = y(s), F = {
114
- graphProps: N,
114
+ let { axesSettings: t, currentTool: r, coordinatesOnHover: a, size: s, disabledLabels: c, disabledTitle: l, domain: u, backgroundMarks: p, range: m, title: _, labels: v, labelModeEnabled: x, labelsPlaceholders: S, showLabels: C, showPixelGuides: w, showTitle: T, titlePlaceholder: E, onChangeLabels: D, onChangeTitle: O, mathMlOptions: k = {}, gssLineData: A, disabled: j, language: M } = this.props, { marks: N } = this.props, P = f(u, m, s, () => this.rootNode), F = y(s), I = {
115
+ graphProps: P,
115
116
  labelModeEnabled: x,
116
- gssLineData: A
117
+ gssLineData: A,
118
+ language: M
117
119
  };
118
- M = b({
119
- marks: M || [],
120
+ N = b({
121
+ marks: N || [],
120
122
  currentTool: r
121
123
  });
122
- let I = M.filter((e) => e.type === "polygon");
124
+ let L = N.filter((e) => e.type === "polygon");
123
125
  A && A.selectedTool === "solutionSet" && A.sections.forEach((t) => {
124
- if (I.length === 0 || !e(t, I[0].points)) {
126
+ if (L.length === 0 || !e(t, L[0].points)) {
125
127
  let e = {
126
128
  type: "polygon",
127
129
  building: !1,
@@ -129,11 +131,11 @@ var _ = m("pie-lib:graphing-solution-set:graph"), v = {
129
131
  points: t,
130
132
  isSolution: !1
131
133
  };
132
- j || M.push(e);
134
+ j || N.push(e);
133
135
  }
134
136
  });
135
- let L = [];
136
- return L.push(...M.filter((e) => e.type === "polygon")), L.push(...M.filter((e) => e.type === "line")), /* @__PURE__ */ h(d, {
137
+ let R = [];
138
+ return R.push(...N.filter((e) => e.type === "polygon")), R.push(...N.filter((e) => e.type === "line")), /* @__PURE__ */ h(d, {
137
139
  rootRef: (e) => this.rootNode = e,
138
140
  disabledTitle: l,
139
141
  disabledLabels: c,
@@ -147,24 +149,24 @@ var _ = m("pie-lib:graphing-solution-set:graph"), v = {
147
149
  onChangeTitle: O,
148
150
  onChangeLabels: D,
149
151
  mathMlOptions: k,
150
- ...F,
152
+ ...I,
151
153
  children: /* @__PURE__ */ g("g", {
152
154
  transform: u && u.padding && u.range ? `translate(${u.padding}, ${m.padding})` : void 0,
153
155
  children: [
154
- /* @__PURE__ */ h(i, { ...F }),
156
+ /* @__PURE__ */ h(i, { ...I }),
155
157
  /* @__PURE__ */ h(n, {
156
158
  ...t,
157
- ...F
159
+ ...I
158
160
  }),
159
161
  /* @__PURE__ */ h(o, {
160
162
  ...s,
161
163
  onClick: this.onBgClick,
162
- ...F
164
+ ...I
163
165
  }),
164
166
  /* @__PURE__ */ g("mask", {
165
167
  id: `${this.maskUid}`,
166
168
  children: [/* @__PURE__ */ h("rect", {
167
- ...P,
169
+ ...F,
168
170
  fill: "white"
169
171
  }), " "]
170
172
  }),
@@ -182,10 +184,10 @@ var _ = m("pie-lib:graphing-solution-set:graph"), v = {
182
184
  },
183
185
  labelNode: this.state.labelNode,
184
186
  onClick: this.onBgClick,
185
- ...F
187
+ ...I
186
188
  }, `${r}-${t}-bg`);
187
189
  }),
188
- L.map((e, t) => {
190
+ R.map((e, t) => {
189
191
  let n = this.getComponent(e), i = e.type;
190
192
  return /* @__PURE__ */ h(n, {
191
193
  mark: e,
@@ -197,7 +199,7 @@ var _ = m("pie-lib:graphing-solution-set:graph"), v = {
197
199
  onDragStop: this.stopDrag,
198
200
  labelNode: this.state.labelNode,
199
201
  isToolActive: r && i === r.type,
200
- ...F
202
+ ...I
201
203
  }, `${i}-${t}`);
202
204
  }),
203
205
  /* @__PURE__ */ h("foreignObject", {
@@ -35,6 +35,7 @@ export declare const MarkLabel: {
35
35
  }>>>;
36
36
  }>>;
37
37
  inputRef: PropTypes.Requireable<(...args: any[]) => any>;
38
+ language: PropTypes.Requireable<string>;
38
39
  mark: PropTypes.Requireable<object>;
39
40
  theme: PropTypes.Requireable<object>;
40
41
  };
@@ -1,29 +1,31 @@
1
- import { AutosizeInput as e } from "./autosize-input.js";
2
- import { useDebounce as t } from "./use-debounce.js";
3
- import { useCallback as n, useEffect as r, useState as i } from "react";
4
- import a from "prop-types";
5
- import { types as o } from "@pie-lib/plot";
6
- import { jsx as s } from "react/jsx-runtime";
7
- import { styled as c } from "@mui/material/styles";
8
- import { color as l } from "@pie-lib/render-ui";
1
+ import { roundNumber as e } from "./utils.js";
2
+ import { AutosizeInput as t } from "./autosize-input.js";
3
+ import { useDebounce as n } from "./use-debounce.js";
4
+ import { useCallback as r, useEffect as i, useState as a } from "react";
5
+ import o from "prop-types";
6
+ import { types as s } from "@pie-lib/plot";
7
+ import { jsx as c } from "react/jsx-runtime";
8
+ import { styled as l } from "@mui/material/styles";
9
+ import { color as u } from "@pie-lib/render-ui";
10
+ import d from "@pie-lib/translator";
9
11
  //#region src/mark-label.tsx
10
- var u = c(e, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(e) })(({ theme: e, disabled: t, markDisabled: n }) => ({ "& input": {
12
+ var { translator: f } = d, p = l(t, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(e) })(({ theme: e, disabled: t, markDisabled: n }) => ({ "& input": {
11
13
  float: "right",
12
14
  padding: e.spacing(.5),
13
15
  fontFamily: e.typography.fontFamily,
14
16
  fontSize: e.typography.fontSize,
15
- border: `solid 1px ${t ? l.defaults.PRIMARY_DARK : n ? l.disabled() : l.defaults.SECONDARY}`,
17
+ border: `solid 1px ${t ? u.defaults.PRIMARY_DARK : n ? u.disabled() : u.defaults.SECONDARY}`,
16
18
  borderRadius: "3px",
17
- color: n ? l.disabled() : l.defaults.PRIMARY_DARK,
19
+ color: n ? u.disabled() : u.defaults.PRIMARY_DARK,
18
20
  background: t || n ? e.palette.background.paper : "transparent"
19
- } })), d = (e, t, n) => {
21
+ } })), m = (e, t, n) => {
20
22
  n ||= {
21
23
  width: 0,
22
24
  height: 0
23
25
  };
24
26
  let { scale: r, domain: i, range: a } = e, o = r.x(t.x) + n.width + 10, s = r.y(t.y) + n.height + 10, c = o >= r.x(i.max) ? "left" : "right";
25
27
  return `${s >= r.y(a.min) ? "top" : "bottom"}-${c}`;
26
- }, f = (e, t, n, r) => {
28
+ }, h = (e, t, n, r) => {
27
29
  let { scale: i } = e;
28
30
  switch (n ||= {
29
31
  width: 0,
@@ -46,39 +48,45 @@ var u = c(e, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(
46
48
  top: i.y(t.y) - 10 - n.height
47
49
  };
48
50
  }
49
- }, p = (e) => {
50
- let [a, o] = i(null), c = n((e) => o(e)), { mark: l, graphProps: p, disabled: m, inputRef: h } = e, [g, _] = i(l.label), v = (e) => _(e.target.value), y = t(g, 200);
51
- r(() => {
52
- _(l.label);
53
- }, [l.label]), r(() => {
54
- typeof y == "string" && y !== l.label && e.onChange(y);
55
- }, [y]);
56
- let b = a ? a.getBoundingClientRect() : {
51
+ }, g = (t) => {
52
+ let [o, s] = a(null), l = r((e) => s(e)), { mark: u, graphProps: d, disabled: g, inputRef: _, language: v } = t, [y, b] = a(u.label), x = (e) => b(e.target.value), S = n(y, 200);
53
+ i(() => {
54
+ b(u.label);
55
+ }, [u.label]), i(() => {
56
+ typeof S == "string" && S !== u.label && t.onChange(S);
57
+ }, [S]);
58
+ let C = o ? o.getBoundingClientRect() : {
57
59
  width: 0,
58
60
  height: 0
59
- }, x = {
61
+ }, w = {
60
62
  position: "fixed",
61
63
  pointerEvents: "auto",
62
- ...f(p, l, b, d(p, l, b))
63
- };
64
- return /* @__PURE__ */ s(u, {
64
+ ...h(d, u, C, m(d, u, C))
65
+ }, T = g || u.disabled;
66
+ return /* @__PURE__ */ c(p, {
65
67
  inputRef: (e) => {
66
- c(e), h(e);
68
+ l(e), _(e);
67
69
  },
68
- disabled: m || l.disabled,
69
- markDisabled: l.disabled,
70
- value: g,
71
- style: x,
72
- onChange: v
70
+ "aria-label": Number.isFinite(u.x) && Number.isFinite(u.y) ? f.t("graphing.markLabel", {
71
+ lng: v,
72
+ x: e(u.x),
73
+ y: e(u.y)
74
+ }) : f.t("graphing.label", { lng: v }),
75
+ disabled: T,
76
+ markDisabled: u.disabled,
77
+ value: y,
78
+ style: w,
79
+ onChange: x
73
80
  });
74
81
  };
75
- p.propTypes = {
76
- disabled: a.bool,
77
- onChange: a.func,
78
- graphProps: o.GraphPropsType,
79
- inputRef: a.func,
80
- mark: a.object,
81
- theme: a.object
82
+ g.propTypes = {
83
+ disabled: o.bool,
84
+ onChange: o.func,
85
+ graphProps: s.GraphPropsType,
86
+ inputRef: o.func,
87
+ language: o.string,
88
+ mark: o.object,
89
+ theme: o.object
82
90
  };
83
91
  //#endregion
84
- export { p as MarkLabel, p as default, f as coordinates, d as position };
92
+ export { g as MarkLabel, g as default, h as coordinates, m as position };
@@ -6,6 +6,7 @@ export declare class ToolMenu extends React.Component {
6
6
  disabled: PropTypes.Requireable<boolean>;
7
7
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
8
8
  };
9
+ idPrefix: string;
9
10
  onChangeRadioValue: any;
10
11
  lineTypeChange: any;
11
12
  render(): React.JSX.Element;
package/dist/tool-menu.js CHANGED
@@ -1,15 +1,17 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { styled as i } from "@mui/material/styles";
5
- import { Button as a, Radio as o, Typography as s } from "@mui/material";
3
+ import { uniqueId as n } from "@pie-element/shared-lodash";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { styled as a } from "@mui/material/styles";
6
+ import { Button as o, Radio as s, Typography as c } from "@mui/material";
6
7
  //#region src/tool-menu.tsx
7
- var c = class extends e.Component {
8
+ var l = class extends e.Component {
8
9
  static propTypes = {
9
10
  gssLineData: t.object,
10
11
  disabled: t.bool,
11
12
  onChange: t.func
12
13
  };
14
+ idPrefix = n("gss-tool-menu-");
13
15
  onChangeRadioValue = (e) => {
14
16
  let { gssLineData: t, onChange: n } = this.props, r = t.selectedTool;
15
17
  t.selectedTool = e.target.value, n(t, r);
@@ -20,27 +22,29 @@ var c = class extends e.Component {
20
22
  };
21
23
  render() {
22
24
  let { gssLineData: e, disabled: t } = this.props;
23
- return /* @__PURE__ */ n(l, { children: /* @__PURE__ */ r("div", {
25
+ return /* @__PURE__ */ r(u, { children: /* @__PURE__ */ i("div", {
24
26
  className: "selectLineRadioGroup",
25
27
  children: [
26
- /* @__PURE__ */ r("div", {
28
+ /* @__PURE__ */ i("div", {
27
29
  className: "radioFieldOuter",
28
- children: [/* @__PURE__ */ r("div", {
30
+ children: [/* @__PURE__ */ i("div", {
29
31
  className: "radioFieldInner",
30
- children: [/* @__PURE__ */ n(o, {
32
+ children: [/* @__PURE__ */ r(s, {
31
33
  name: "select-line-radio-buttons",
32
34
  onChange: this.onChangeRadioValue,
33
35
  value: "lineA",
34
36
  disabled: !!t,
35
37
  checked: e.selectedTool === "lineA",
36
- className: "lineTypeRadio"
37
- }), /* @__PURE__ */ n(s, {
38
+ className: "lineTypeRadio",
39
+ inputProps: { "aria-labelledby": `${this.idPrefix}-lineA` }
40
+ }), /* @__PURE__ */ r(c, {
41
+ id: `${this.idPrefix}-lineA`,
38
42
  className: "lineNameFont",
39
43
  children: "Line A"
40
44
  })]
41
- }), /* @__PURE__ */ r("div", {
45
+ }), /* @__PURE__ */ i("div", {
42
46
  className: "radioFieldButtons",
43
- children: [/* @__PURE__ */ r(a, {
47
+ children: [/* @__PURE__ */ i(o, {
44
48
  size: "small",
45
49
  variant: "contained",
46
50
  color: e.lineA.lineType === "Solid" ? "primary" : "inherit",
@@ -48,7 +52,7 @@ var c = class extends e.Component {
48
52
  onClick: () => this.lineTypeChange("A", "Solid"),
49
53
  className: e.lineA.lineType === "Solid" ? t ? "lineTypeButtonLeftSelectedDisabled" : "lineTypeButtonLeftSelected" : t ? "lineTypeButtonLeftUnSelectedDisabled" : "lineTypeButtonLeftUnSelected",
50
54
  children: [e.lineA.lineType === "Solid" && "✔", " Solid"]
51
- }), /* @__PURE__ */ r(a, {
55
+ }), /* @__PURE__ */ i(o, {
52
56
  size: "small",
53
57
  variant: "contained",
54
58
  color: e.lineA.lineType === "Dashed" ? "primary" : "inherit",
@@ -59,24 +63,26 @@ var c = class extends e.Component {
59
63
  })]
60
64
  })]
61
65
  }),
62
- e.numberOfLines === 2 && /* @__PURE__ */ r("div", {
66
+ e.numberOfLines === 2 && /* @__PURE__ */ i("div", {
63
67
  className: "radioFieldOuter",
64
- children: [/* @__PURE__ */ r("div", {
68
+ children: [/* @__PURE__ */ i("div", {
65
69
  className: "radioFieldInner",
66
- children: [/* @__PURE__ */ n(o, {
70
+ children: [/* @__PURE__ */ r(s, {
67
71
  name: "select-line-radio-buttons",
68
72
  onChange: this.onChangeRadioValue,
69
73
  value: "lineB",
70
74
  disabled: !!t,
71
75
  checked: e.selectedTool === "lineB",
72
- className: "lineTypeRadio"
73
- }), /* @__PURE__ */ n(s, {
76
+ className: "lineTypeRadio",
77
+ inputProps: { "aria-labelledby": `${this.idPrefix}-lineB` }
78
+ }), /* @__PURE__ */ r(c, {
79
+ id: `${this.idPrefix}-lineB`,
74
80
  className: "lineNameFont",
75
81
  children: "Line B"
76
82
  })]
77
- }), /* @__PURE__ */ r("div", {
83
+ }), /* @__PURE__ */ i("div", {
78
84
  className: "radioFieldButtons",
79
- children: [/* @__PURE__ */ r(a, {
85
+ children: [/* @__PURE__ */ i(o, {
80
86
  size: "small",
81
87
  variant: "contained",
82
88
  color: e.lineB.lineType === "Solid" ? "primary" : "inherit",
@@ -84,7 +90,7 @@ var c = class extends e.Component {
84
90
  onClick: () => this.lineTypeChange("B", "Solid"),
85
91
  className: e.lineB.lineType === "Solid" ? t ? "lineTypeButtonLeftSelectedDisabled" : "lineTypeButtonLeftSelected" : t ? "lineTypeButtonLeftUnSelectedDisabled" : "lineTypeButtonLeftUnSelected",
86
92
  children: [e.lineB.lineType === "Solid" && "✔", " Solid"]
87
- }), /* @__PURE__ */ r(a, {
93
+ }), /* @__PURE__ */ i(o, {
88
94
  size: "small",
89
95
  variant: "contained",
90
96
  color: e.lineB.lineType === "Dashed" ? "primary" : "inherit",
@@ -95,18 +101,20 @@ var c = class extends e.Component {
95
101
  })]
96
102
  })]
97
103
  }),
98
- /* @__PURE__ */ n("div", {
104
+ /* @__PURE__ */ r("div", {
99
105
  className: "radioFieldOuter",
100
- children: /* @__PURE__ */ r("div", {
106
+ children: /* @__PURE__ */ i("div", {
101
107
  className: "radioFieldInner",
102
- children: [/* @__PURE__ */ n(o, {
108
+ children: [/* @__PURE__ */ r(s, {
103
109
  name: "select-line-radio-buttons",
104
110
  onChange: this.onChangeRadioValue,
105
111
  value: "solutionSet",
106
112
  disabled: !!t,
107
113
  checked: e.selectedTool === "solutionSet",
108
- className: "lineTypeRadio"
109
- }), /* @__PURE__ */ n(s, {
114
+ className: "lineTypeRadio",
115
+ inputProps: { "aria-labelledby": `${this.idPrefix}-solutionSet` }
116
+ }), /* @__PURE__ */ r(c, {
117
+ id: `${this.idPrefix}-solutionSet`,
110
118
  className: "lineNameFont",
111
119
  children: "Solution Set"
112
120
  })]
@@ -115,7 +123,7 @@ var c = class extends e.Component {
115
123
  ]
116
124
  }) });
117
125
  }
118
- }, l = i("div")(() => ({
126
+ }, u = a("div")(() => ({
119
127
  "& .selectLineRadioGroup": {
120
128
  display: "flex",
121
129
  flexWrap: "wrap",
@@ -185,4 +193,4 @@ var c = class extends e.Component {
185
193
  }
186
194
  }));
187
195
  //#endregion
188
- export { c as ToolMenu, c as default };
196
+ export { l as ToolMenu, l as default };
@@ -95,6 +95,7 @@ declare const Component: {
95
95
  height: PropTypes.Validator<number>;
96
96
  }>>>;
97
97
  }>>>;
98
+ language: PropTypes.Requireable<string>;
98
99
  mark: PropTypes.Requireable<object>;
99
100
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
100
101
  onDelete: PropTypes.Requireable<(...args: any[]) => any>;
@@ -58,6 +58,7 @@ export declare const lineToolComponent: (Component: any) => {
58
58
  height: PropTypes.Validator<number>;
59
59
  }>>>;
60
60
  }>>>;
61
+ language: PropTypes.Requireable<string>;
61
62
  mark: PropTypes.Requireable<object>;
62
63
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
63
64
  onDelete: PropTypes.Requireable<(...args: any[]) => any>;
@@ -181,6 +182,7 @@ export declare const lineBase: (Comp: any, opts: any) => {
181
182
  labelNode: PropTypes.Requireable<object>;
182
183
  labelModeEnabled: PropTypes.Requireable<boolean>;
183
184
  changeMarkProps: PropTypes.Requireable<(...args: any[]) => any>;
185
+ language: PropTypes.Requireable<string>;
184
186
  };
185
187
  contextType?: React.Context<any> | undefined;
186
188
  };
@@ -25,7 +25,8 @@ var S = (t, n) => () => ({
25
25
  }), C = (e) => class extends l.Component {
26
26
  static propTypes = {
27
27
  ...g.ToolPropTypeFields,
28
- graphProps: g.GraphPropsType.isRequired
28
+ graphProps: g.GraphPropsType.isRequired,
29
+ language: u.string
29
30
  };
30
31
  constructor(e) {
31
32
  super(e), this.state = {};
@@ -66,16 +67,16 @@ var S = (t, n) => () => ({
66
67
  }), p(i, a) || r(i, a);
67
68
  };
68
69
  render() {
69
- let { graphProps: t, onClick: n, labelNode: r, labelModeEnabled: i, coordinatesOnHover: a, gssLineData: o } = this.props, s = this.state.mark ? this.state.mark : this.props.mark, c = d(s.from), l = d(s.to), u = d(s.middle);
70
- return c && s.isBackground && (c.disabled = !0), l && s.isBackground && (l.disabled = !0), u && s.isBackground && (u.disabled = !0), /* @__PURE__ */ v(e, {
71
- disabled: s.disabled,
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, {
72
+ disabled: c.disabled,
72
73
  coordinatesOnHover: a,
73
- correctness: s.correctness,
74
- from: c,
75
- to: l,
76
- middle: u,
74
+ correctness: c.correctness,
75
+ from: l,
76
+ to: u,
77
+ middle: f,
77
78
  graphProps: t,
78
- fill: s && s.fill,
79
+ fill: c && c.fill,
79
80
  gssLineData: o,
80
81
  onChange: this.changeMark,
81
82
  changeMarkProps: this.changeMarkProps,
@@ -83,7 +84,8 @@ var S = (t, n) => () => ({
83
84
  onDragStart: this.startDrag,
84
85
  onDragStop: this.stopDrag,
85
86
  labelNode: r,
86
- labelModeEnabled: i
87
+ labelModeEnabled: i,
88
+ language: s
87
89
  });
88
90
  }
89
91
  }, w = () => ({
@@ -121,7 +123,8 @@ var S = (t, n) => () => ({
121
123
  disabled: u.bool,
122
124
  labelNode: u.object,
123
125
  labelModeEnabled: u.bool,
124
- changeMarkProps: u.func
126
+ changeMarkProps: u.func,
127
+ language: u.string
125
128
  };
126
129
  onChangePoint = (n) => {
127
130
  let { middle: r, onChange: i } = this.props, { from: a, to: o } = n;
@@ -180,7 +183,7 @@ var S = (t, n) => () => ({
180
183
  };
181
184
  input = {};
182
185
  render() {
183
- 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 } = this.props, S = {
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 = {
184
187
  graphProps: t,
185
188
  fill: n,
186
189
  onDragStart: c,
@@ -189,37 +192,40 @@ var S = (t, n) => () => ({
189
192
  correctness: m,
190
193
  onClick: g
191
194
  };
192
- r && r.selectedTool === "solutionSet" && (S = {
195
+ r && r.selectedTool === "solutionSet" && (C = {
193
196
  graphProps: t,
194
197
  fill: n,
195
198
  disabled: p,
196
199
  correctness: m,
197
200
  onClick: g
198
201
  });
199
- let C = d ? h.toDegrees(h.angle(u, d)) : 0, w = null, T = null, E = null;
200
- return _ && (u && Object.prototype.hasOwnProperty.call(u, "label") && (w = x.createPortal(/* @__PURE__ */ v(s, {
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, {
201
204
  inputRef: (e) => this.input.from = e,
202
205
  disabled: !b,
203
206
  mark: u,
204
207
  graphProps: t,
208
+ language: S,
205
209
  onChange: (e) => this.labelChange({
206
210
  ...u,
207
211
  label: e
208
212
  }, "from")
209
- }), _)), d && Object.prototype.hasOwnProperty.call(d, "label") && (T = x.createPortal(/* @__PURE__ */ v(s, {
213
+ }), _)), d && Object.prototype.hasOwnProperty.call(d, "label") && (E = x.createPortal(/* @__PURE__ */ v(s, {
210
214
  inputRef: (e) => this.input.to = e,
211
215
  disabled: !b,
212
216
  mark: d,
213
217
  graphProps: t,
218
+ language: S,
214
219
  onChange: (e) => this.labelChange({
215
220
  ...d,
216
221
  label: e
217
222
  }, "to")
218
- }), _)), f && Object.prototype.hasOwnProperty.call(f, "label") && (E = x.createPortal(/* @__PURE__ */ v(s, {
223
+ }), _)), f && Object.prototype.hasOwnProperty.call(f, "label") && (D = x.createPortal(/* @__PURE__ */ v(s, {
219
224
  inputRef: (e) => this.input.middle = e,
220
225
  disabled: !b,
221
226
  mark: f,
222
227
  graphProps: t,
228
+ language: S,
223
229
  onChange: (e) => this.labelChange({
224
230
  ...f,
225
231
  label: e
@@ -229,57 +235,57 @@ var S = (t, n) => () => ({
229
235
  from: u,
230
236
  to: d,
231
237
  middle: f,
232
- ...S
238
+ ...C
233
239
  }),
234
- E,
240
+ D,
235
241
  /* @__PURE__ */ v(a, {
236
242
  x: u.x,
237
243
  y: u.y,
238
244
  labelNode: _,
239
245
  coordinatesOnHover: e,
240
- ...S
246
+ ...C
241
247
  }),
242
- w,
248
+ T,
243
249
  d && /* @__PURE__ */ v(o, {
244
250
  x: d.x,
245
251
  y: d.y,
246
- angle: C,
252
+ angle: w,
247
253
  labelNode: _,
248
254
  coordinatesOnHover: e,
249
- ...S
255
+ ...C
250
256
  }),
251
- T
257
+ E
252
258
  ] }) : /* @__PURE__ */ y("g", { children: [
253
259
  d && /* @__PURE__ */ v(i, {
254
260
  from: u,
255
261
  to: d,
256
262
  middle: f,
257
263
  onDrag: this.dragComp,
258
- ...S,
264
+ ...C,
259
265
  onClick: (e) => this.clickPoint(f, "middle", e)
260
266
  }),
261
- E,
267
+ D,
262
268
  /* @__PURE__ */ v(a, {
263
269
  x: u.x,
264
270
  y: u.y,
265
271
  labelNode: _,
266
272
  coordinatesOnHover: e,
267
273
  onDrag: this.dragFrom,
268
- ...S,
274
+ ...C,
269
275
  onClick: (e) => this.clickPoint(u, "from", e)
270
276
  }),
271
- w,
277
+ T,
272
278
  d && /* @__PURE__ */ v(o, {
273
279
  x: d.x,
274
280
  y: d.y,
275
- angle: C,
281
+ angle: w,
276
282
  labelNode: _,
277
283
  coordinatesOnHover: e,
278
284
  onDrag: this.dragTo,
279
- ...S,
285
+ ...C,
280
286
  onClick: (e) => this.clickPoint(d, "to", e)
281
287
  }),
282
- T
288
+ E
283
289
  ] });
284
290
  }
285
291
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-solution-set",
3
- "version": "5.0.1-next.20261003161149",
3
+ "version": "5.0.1-next.20261004005223",
4
4
  "description": "Graphing components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,13 +14,13 @@
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.20261003161149",
18
- "@pie-lib/editable-html-tip-tap": "3.0.1-next.20261003161149",
17
+ "@pie-lib/drag": "5.0.1-next.20261004003105",
18
+ "@pie-lib/editable-html-tip-tap": "3.0.1-next.20261004003105",
19
19
  "@pie-lib/graphing-utils": "4.0.1-next.20261002233132",
20
- "@pie-lib/plot": "5.0.1-next.20261003161149",
20
+ "@pie-lib/plot": "5.0.1-next.20261004003105",
21
21
  "@pie-lib/render-ui": "8.0.1-next.20261003161149",
22
22
  "@pie-lib/tools": "3.0.1-next.20261002233132",
23
- "@pie-lib/translator": "5.0.1-next.20261002215153",
23
+ "@pie-lib/translator": "5.0.1-next.20261004005223",
24
24
  "@visx/axis": "^4.0.0",
25
25
  "@visx/clip-path": "^4.0.0",
26
26
  "@visx/curve": "^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.20261003161149",
43
+ "@pie-lib/config-ui": "14.0.1-next.20261004003105",
44
44
  "@dnd-kit/core": "^6.3.1",
45
45
  "@dnd-kit/utilities": "^3.2.2",
46
46
  "d3-shape": "^3.2.0"