@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.
package/dist/axis/axes.js CHANGED
@@ -4,10 +4,10 @@ import { amountToIncreaseWidth as n, countWords as r, findLongestWord as i, getT
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 { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { styled as d } from "@mui/material/styles";
9
- import * as f from "@pie-lib/render-ui";
10
- import { Readable as p, color as m } from "@pie-lib/render-ui";
7
+ import * as l from "@pie-lib/render-ui";
8
+ import { Readable as u, color as d } from "@pie-lib/render-ui";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
+ import { styled as m } from "@mui/material/styles";
11
11
  //#region src/axis/axes.tsx
12
12
  function h(e) {
13
13
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
@@ -15,7 +15,7 @@ function h(e) {
15
15
  function g(e, t) {
16
16
  return !e || h(e) ? e : h(e.default) ? e.default : t && h(e[t]) ? e[t] : t && h(e[t]?.default) ? e[t].default : e;
17
17
  }
18
- var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b = y && typeof y == "object" ? y : v, x = {
18
+ var _ = g(u, "Readable") || g(b.Readable, "Readable"), v = l, y = v.default, b = y && typeof y == "object" ? y : v, x = {
19
19
  includeArrows: s.object,
20
20
  graphProps: s.object
21
21
  }, S = { includeArrows: {
@@ -23,16 +23,16 @@ 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 = d("g")(() => ({
26
+ } }, C = m("g")(() => ({
27
27
  "& .visx-axis-line": {
28
28
  stroke: "#8a92c0",
29
29
  strokeWidth: 4
30
30
  },
31
31
  "& .visx-axis-tick": {
32
- fill: m.defaults.BLACK,
32
+ fill: d.defaults.BLACK,
33
33
  "& > line": { stroke: "#8a92c0" }
34
34
  }
35
- })), w = d("div")(({ theme: e, centered: t }) => ({
35
+ })), w = m("div")(({ theme: e, centered: t }) => ({
36
36
  padding: 0,
37
37
  margin: 0,
38
38
  "* > *": {
@@ -42,7 +42,7 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
42
42
  "& p": { margin: 0 },
43
43
  fontSize: e.typography.fontSize,
44
44
  ...t && { textAlign: "center" }
45
- })), T = d(t)({ fill: "#8a92c0" }), E = {
45
+ })), T = m(t)({ fill: "#8a92c0" }), E = {
46
46
  fontFamily: "Roboto",
47
47
  fontSize: "14px",
48
48
  cursor: "inherit"
@@ -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: d } = this.props, { scale: f, domain: p, size: m, range: h } = a || {}, g = (e) => {
60
- let t = s && s[0] === e ? c + 4 : d;
59
+ let { includeArrows: t, graphProps: a, columnTicksValues: o, skipValues: s, distanceFromOriginToFirstNegativeY: c, dy: l } = this.props, { scale: u, domain: d, size: m, range: h } = a || {}, g = (e) => {
60
+ let t = s && s[0] === e ? c + 4 : l;
61
61
  return {
62
62
  ...E,
63
63
  textAnchor: "middle",
@@ -65,39 +65,39 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
65
65
  dx: e === 0 ? -10 : 0,
66
66
  dy: e === 0 ? -7 : 0
67
67
  };
68
- }, v = r(p.axisLabel), y = n(i(p.axisLabel)) + 2;
69
- return /* @__PURE__ */ u(C, { children: [
70
- /* @__PURE__ */ l(e, {
71
- scale: f.x,
72
- top: f.y(0),
68
+ }, v = r(d.axisLabel), y = n(i(d.axisLabel)) + 2;
69
+ return /* @__PURE__ */ p(C, { children: [
70
+ /* @__PURE__ */ f(e, {
71
+ scale: u.x,
72
+ top: u.y(0),
73
73
  left: 0,
74
- label: p.label,
74
+ label: d.label,
75
75
  rangePadding: 8,
76
76
  tickFormat: (e) => e,
77
77
  tickLabelProps: g,
78
78
  tickValues: o,
79
- hideZero: !(p.labelStep || h.labelStep) && p.min <= 0
79
+ hideZero: !(d.labelStep || h.labelStep) && d.min <= 0
80
80
  }),
81
- t && t.left && /* @__PURE__ */ l(T, {
81
+ t && t.left && /* @__PURE__ */ f(T, {
82
82
  direction: "left",
83
- x: p.min,
83
+ x: d.min,
84
84
  y: 0,
85
- scale: f
85
+ scale: u
86
86
  }),
87
- t && t.right && /* @__PURE__ */ l(T, {
87
+ t && t.right && /* @__PURE__ */ f(T, {
88
88
  direction: "right",
89
- x: p.max,
89
+ x: d.max,
90
90
  y: 0,
91
- scale: f
91
+ scale: u
92
92
  }),
93
- p.axisLabel && /* @__PURE__ */ l("foreignObject", {
93
+ d.axisLabel && /* @__PURE__ */ f("foreignObject", {
94
94
  x: m.width + 17,
95
- y: f.y(0) - 9,
95
+ y: u.y(0) - 9,
96
96
  width: y,
97
97
  height: 20 * v,
98
- children: /* @__PURE__ */ l(_, {
98
+ children: /* @__PURE__ */ f(_, {
99
99
  false: !0,
100
- children: /* @__PURE__ */ l(w, { dangerouslySetInnerHTML: { __html: p.axisLabel } })
100
+ children: /* @__PURE__ */ f(w, { dangerouslySetInnerHTML: { __html: d.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 || {}, d = s.axisLabel ? n(s.axisLabel.length) : 0;
113
- return /* @__PURE__ */ u(C, { children: [
114
- /* @__PURE__ */ l(e, {
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__ */ p(C, { children: [
114
+ /* @__PURE__ */ f(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__ */ l(T, {
138
+ t && t.down && /* @__PURE__ */ f(T, {
139
139
  direction: "down",
140
140
  x: 0,
141
141
  y: s.min,
142
142
  scale: o
143
143
  }),
144
- t && t.up && /* @__PURE__ */ l(T, {
144
+ t && t.up && /* @__PURE__ */ f(T, {
145
145
  direction: "up",
146
146
  x: 0,
147
147
  y: s.max,
148
148
  scale: o
149
149
  }),
150
- s.axisLabel && /* @__PURE__ */ l("foreignObject", {
151
- x: o.x(0) - d / 2,
150
+ s.axisLabel && /* @__PURE__ */ f("foreignObject", {
151
+ x: o.x(0) - l / 2,
152
152
  y: -33,
153
- width: d,
153
+ width: l,
154
154
  height: "20",
155
- children: /* @__PURE__ */ l(_, {
155
+ children: /* @__PURE__ */ f(_, {
156
156
  false: !0,
157
- children: /* @__PURE__ */ l(w, {
157
+ children: /* @__PURE__ */ f(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(), d = D(i, s, a, c, 6, 25);
199
- return /* @__PURE__ */ u(C, { children: [n.min <= 0 ? /* @__PURE__ */ l(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(), l = D(i, s, a, c, 6, 25);
199
+ return /* @__PURE__ */ p(C, { children: [n.min <= 0 ? /* @__PURE__ */ f(A, {
200
200
  ...this.props,
201
- skipValues: d,
201
+ skipValues: l,
202
202
  columnTicksValues: r,
203
203
  distanceFromOriginToFirstNegativeY: c,
204
204
  dy: 25
205
- }) : null, t.min <= 0 ? /* @__PURE__ */ l(M, {
205
+ }) : null, t.min <= 0 ? /* @__PURE__ */ f(M, {
206
206
  ...this.props,
207
- skipValues: d,
207
+ skipValues: l,
208
208
  rowTickValues: o,
209
209
  distanceFromOriginToFirstNegativeX: a
210
210
  }) : null] });
@@ -2,17 +2,17 @@ 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 { jsx as r } from "react/jsx-runtime";
6
- import { styled as i } from "@mui/material/styles";
7
- import { color as a } from "@pie-lib/render-ui";
5
+ import { color as r } from "@pie-lib/render-ui";
6
+ import { jsx as i } from "react/jsx-runtime";
7
+ import { styled as a } from "@mui/material/styles";
8
8
  import o from "@mui/material/InputBase";
9
9
  //#region src/coordinates-label.tsx
10
- var s = i(o)(({ theme: e }) => ({
10
+ var s = a(o)(({ theme: e }) => ({
11
11
  fontFamily: e.typography.fontFamily,
12
12
  fontSize: e.typography.fontSize,
13
13
  borderRadius: "8px",
14
14
  background: e.palette.common.white,
15
- color: a.defaults.BLACK,
15
+ color: r.defaults.BLACK,
16
16
  "& .MuiInputBase-input": { padding: 0 }
17
17
  })), c = (e, t, n, r) => {
18
18
  let { scale: i, domain: a, range: o } = e, s = n === o.min ? 16 : n === o.max ? 0 : 8;
@@ -23,15 +23,15 @@ var s = i(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: i }) => {
26
+ }, l = ({ x: t, y: n, graphProps: r }) => {
27
27
  let a = `(${e(t)}, ${e(n)})`, o = (a.length || 0) * 6;
28
- return /* @__PURE__ */ r(s, {
28
+ return /* @__PURE__ */ i(s, {
29
29
  style: {
30
30
  position: "absolute",
31
31
  pointerEvents: "auto",
32
32
  width: o,
33
33
  padding: 0,
34
- ...c(i, t, n, o)
34
+ ...c(r, t, n, o)
35
35
  },
36
36
  value: a,
37
37
  inputProps: { ariaLabel: "naked" }
@@ -6,57 +6,57 @@ import { allTools as a, toolsArr as o } from "./tools/index.js";
6
6
  import s from "react";
7
7
  import c from "prop-types";
8
8
  import { isString as l, uniq as u } from "@pie-element/shared-lodash";
9
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
10
- import { styled as m } from "@mui/material/styles";
11
- import { color as h } from "@pie-lib/render-ui";
9
+ import { color as d } from "@pie-lib/render-ui";
10
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
11
+ import { styled as h } from "@mui/material/styles";
12
12
  import { Accordion as g, AccordionDetails as _, AccordionSummary as v, Typography as y } from "@mui/material";
13
13
  import b from "@mui/icons-material/ExpandMore";
14
14
  //#region src/graph-with-controls.tsx
15
15
  var x = (e) => o.map((t) => ({
16
16
  ...t,
17
17
  toolbar: !!e.find((e) => e === t.type)
18
- })) || [], S = (e, t) => t && e && (e.find((e) => e.type === t.type) || {}).toolbar, C = (e) => e.find((e) => e.toolbar), w = (e) => e.filter((e) => !!a.find((t) => t === e.type)), T = (e, t) => t.filter((t) => !!e.find((e) => e === t.type)), E = (e) => o.find((t) => t.type === e) || null, D = m("div")(() => ({
18
+ })) || [], S = (e, t) => t && e && (e.find((e) => e.type === t.type) || {}).toolbar, C = (e) => e.find((e) => e.toolbar), w = (e) => e.filter((e) => !!a.find((t) => t === e.type)), T = (e, t) => t.filter((t) => !!e.find((e) => e === t.type)), E = (e) => o.find((t) => t.type === e) || null, D = h("div")(() => ({
19
19
  display: "flex",
20
20
  flexDirection: "column",
21
21
  width: "min-content"
22
- })), O = m("div")(() => ({
22
+ })), O = h("div")(() => ({
23
23
  display: "flex",
24
24
  justifyContent: "space-between",
25
25
  padding: "calc(1.25rem - 12px) calc(1.25rem - 12px) 1.25rem",
26
- color: h.text(),
26
+ color: d.text(),
27
27
  backgroundColor: "#9FA8DA",
28
28
  "& button": {
29
29
  fontSize: "0.875rem",
30
30
  padding: "0.25rem .3rem",
31
31
  width: "5rem"
32
32
  }
33
- })), k = m(g)(() => ({
34
- backgroundColor: h.primaryLight(),
33
+ })), k = h(g)(() => ({
34
+ backgroundColor: d.primaryLight(),
35
35
  width: "100%",
36
36
  boxShadow: "none"
37
- })), A = m(v)(({ theme: e }) => ({
37
+ })), A = h(v)(({ theme: e }) => ({
38
38
  padding: `0 ${e.spacing(1)}`,
39
39
  minHeight: "32px !important",
40
40
  "& .MuiAccordionSummary-content": { margin: "4px 0 !important" }
41
- })), j = m(_)(({ theme: e }) => ({
41
+ })), j = h(_)(({ theme: e }) => ({
42
42
  padding: 0,
43
43
  marginTop: e.spacing(1),
44
44
  display: "flex",
45
45
  justifyContent: "space-between"
46
- })), M = m("div")(() => ({
46
+ })), M = h("div")(() => ({
47
47
  display: "flex",
48
48
  flexDirection: "column",
49
49
  marginTop: ".5rem"
50
- })), N = ({ children: e, title: t }) => /* @__PURE__ */ p(k, {
50
+ })), N = ({ children: e, title: t }) => /* @__PURE__ */ m(k, {
51
51
  square: !0,
52
52
  disableGutters: !0,
53
- children: [/* @__PURE__ */ f(A, {
54
- expandIcon: /* @__PURE__ */ f(b, {}),
55
- children: /* @__PURE__ */ f(y, {
53
+ children: [/* @__PURE__ */ p(A, {
54
+ expandIcon: /* @__PURE__ */ p(b, {}),
55
+ children: /* @__PURE__ */ p(y, {
56
56
  variant: "subtitle1",
57
57
  children: t
58
58
  })
59
- }), /* @__PURE__ */ f(j, { children: e })]
59
+ }), /* @__PURE__ */ p(j, { children: e })]
60
60
  });
61
61
  N.propTypes = {
62
62
  children: c.node,
@@ -96,31 +96,31 @@ var P = class extends s.Component {
96
96
  changeCurrentTool = (e, t) => this.setState({ currentTool: t.find((t) => t.type === e) });
97
97
  toggleLabelMode = () => this.setState((e) => ({ labelModeEnabled: !e.labelModeEnabled }));
98
98
  render() {
99
- let { currentTool: n, labelModeEnabled: a } = this.state, { axesSettings: o, className: s, coordinatesOnHover: c, collapsibleToolbar: m, collapsibleToolbarTitle: h, disabled: g, disabledLabels: _, disabledTitle: v, domain: y, labels: b, labelsPlaceholders: E, onChangeLabels: k, onChangeMarks: A, onChangeTitle: j, onUndo: P, onRedo: F, range: I, size: L, showLabels: R, showPixelGuides: z, showTitle: B, title: V, titlePlaceholder: H, language: U, disableToolbar: W = !1, gssLineData: G, onChangeGssLineData: K, onSolutionSetSelected: q, onCustomReset: J } = this.props, { backgroundMarks: Y, marks: X, toolbarTools: Z } = this.props;
99
+ let { currentTool: n, labelModeEnabled: a } = this.state, { axesSettings: o, className: s, coordinatesOnHover: c, collapsibleToolbar: d, collapsibleToolbarTitle: h, disabled: g, disabledLabels: _, disabledTitle: v, domain: y, labels: b, labelsPlaceholders: E, onChangeLabels: k, onChangeMarks: A, onChangeTitle: j, onUndo: P, onRedo: F, range: I, size: L, showLabels: R, showPixelGuides: z, showTitle: B, title: V, titlePlaceholder: H, language: U, disableToolbar: W = !1, gssLineData: G, onChangeGssLineData: K, onSolutionSetSelected: q, onCustomReset: J } = this.props, { backgroundMarks: Y, marks: X, toolbarTools: Z } = this.props;
100
100
  Z = u(Z || []).filter((e) => !!l(e)) || [], Y = w(Y || []), X = T(Z, X || []), G && G.lineA && X[0] && X[0].type === "line" && (X[0].fill = G.lineA.lineType), G && G.lineB && X[1] && X[1].type === "line" && (X[1].fill = G.lineB.lineType);
101
101
  let Q = x(Z);
102
102
  (!n || !S(Q, n)) && (n = C(Q));
103
- let $ = G && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(r, {
103
+ let $ = G && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(r, {
104
104
  numberOfLines: G.numberOfLines,
105
105
  gssLineData: G,
106
106
  onChange: K,
107
107
  disabled: !!g,
108
108
  language: U
109
- }), !g && /* @__PURE__ */ f(M, { children: /* @__PURE__ */ f(i, {
109
+ }), !g && /* @__PURE__ */ p(M, { children: /* @__PURE__ */ p(i, {
110
110
  onUndo: P,
111
111
  onRedo: F,
112
112
  onReset: J,
113
113
  language: U
114
114
  }) })] });
115
- return /* @__PURE__ */ p(D, {
115
+ return /* @__PURE__ */ m(D, {
116
116
  className: e(s),
117
117
  children: [
118
- !W && /* @__PURE__ */ f(O, { children: m ? /* @__PURE__ */ f(N, {
118
+ !W && /* @__PURE__ */ p(O, { children: d ? /* @__PURE__ */ p(N, {
119
119
  title: h,
120
120
  children: $
121
121
  }) : $ }),
122
- /* @__PURE__ */ f("div", { ref: (e) => this.labelNode = e }),
123
- /* @__PURE__ */ f(t, {
122
+ /* @__PURE__ */ p("div", { ref: (e) => this.labelNode = e }),
123
+ /* @__PURE__ */ p(t, {
124
124
  axesSettings: o,
125
125
  backgroundMarks: Y,
126
126
  coordinatesOnHover: c,
package/dist/graph.js CHANGED
@@ -7,11 +7,12 @@ import s from "react";
7
7
  import c from "prop-types";
8
8
  import { cloneDeep as l, isEqual as u } from "@pie-element/shared-lodash";
9
9
  import { Root as d, createGraphProps as f, types as p, utils as m } from "@pie-lib/plot";
10
- import h from "@pie-lib/translator";
11
- import g from "debug";
12
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
+ import { createUniqueId as h } from "@pie-lib/render-ui";
11
+ import g from "@pie-lib/translator";
12
+ import _ from "debug";
13
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
14
  //#region src/graph.tsx
14
- var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
15
+ var { translator: b } = g, x = _("pie-lib:graphing-solution-set:graph"), S = {
15
16
  axesSettings: c.shape(r),
16
17
  backgroundMarks: c.array,
17
18
  className: c.string,
@@ -38,42 +39,42 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
38
39
  title: c.string,
39
40
  tools: c.array,
40
41
  language: c.string
41
- }, S = (e) => ({
42
+ }, C = (e) => ({
42
43
  x: -23,
43
44
  y: -23,
44
45
  width: e.width + 46,
45
46
  height: e.height + 46
46
- }), C = (e) => e ? m.extractTextFromHTML(e).trim() : "", w = ({ title: e, domain: t, range: n, marks: r, language: i }) => {
47
+ }), w = (e) => e ? m.extractTextFromHTML(e).trim() : "", T = ({ title: e, domain: t, range: n, marks: r, language: i }) => {
47
48
  let a = {
48
49
  lng: i,
49
50
  interpolation: { escapeValue: !1 }
50
- }, o = ({ axisLabel: e, min: t, max: n }, r) => y.t("graphing.axisRange", {
51
+ }, o = ({ axisLabel: e, min: t, max: n }, r) => b.t("graphing.axisRange", {
51
52
  ...a,
52
- axis: C(e) || r,
53
+ axis: w(e) || r,
53
54
  min: t,
54
55
  max: n
55
- }), s = r.filter((e) => !e.building && (e.type !== "polygon" || e.isSolution)), c = y.t("graphing.plotted", {
56
+ }), s = r.filter((e) => !e.building && (e.type !== "polygon" || e.isSolution)), c = b.t("graphing.plotted", {
56
57
  ...a,
57
58
  count: s.length,
58
- marks: s.map((e) => y.t(e.type === "polygon" ? "graphing.shadedRegion" : `graphing.${e.type}`, a).trim()).join(", ")
59
+ marks: s.map((e) => b.t(e.type === "polygon" ? "graphing.shadedRegion" : `graphing.${e.type}`, a).trim()).join(", ")
59
60
  });
60
61
  return {
61
- ariaLabel: C(e) || y.t("graphing.graph", a),
62
+ ariaLabel: w(e) || b.t("graphing.graph", a),
62
63
  ariaDescription: `${o(t, "x")} ${o(n, "y")} ${c}`
63
64
  };
64
- }, T = ({ marks: e, currentTool: t }) => {
65
+ }, E = ({ marks: e, currentTool: t }) => {
65
66
  let n = e.filter((e) => e.building)[0], r = l(e);
66
67
  if (n && t && n.type !== t.type) {
67
68
  let e = r.findIndex((e) => u(e, n));
68
69
  e >= 0 && r.splice(e, 1);
69
70
  }
70
71
  return r;
71
- }, E = class extends s.Component {
72
+ }, D = class extends s.Component {
72
73
  constructor(e) {
73
74
  super(e), this.maskUid = this.generateMaskId();
74
75
  }
75
76
  static propTypes = {
76
- ...x,
77
+ ...S,
77
78
  currentTool: c.object
78
79
  };
79
80
  static defaultProps = {
@@ -83,7 +84,7 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
83
84
  };
84
85
  state = {};
85
86
  generateMaskId() {
86
- return "graph-" + (Math.random() * 1e4).toFixed();
87
+ return h("graph");
87
88
  }
88
89
  componentDidMount = () => this.setState({ labelNode: this.labelNode });
89
90
  changeMark = (e, n) => {
@@ -119,7 +120,7 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
119
120
  if (o.numberOfLines === 1 && o.selectedTool === "lineA" && a.length === 1 && !a[0].building || o.numberOfLines === 2 && o.selectedTool === "lineA" && a.length === 2 || o.numberOfLines === 2 && o.selectedTool === "lineA" && a.length === 1 && !a[0].building || o.numberOfLines === 2 && o.selectedTool === "lineB" && a.length === 2 && !a[1].building) return;
120
121
  }
121
122
  if (r || !i || [null, void 0].includes(t) || [null, void 0].includes(n)) return;
122
- b("[onBgClick] x,y: ", t, n);
123
+ x("[onBgClick] x,y: ", t, n);
123
124
  let c = a.filter((e) => e.building)[0], l;
124
125
  l = c && i && c.type === i.type ? i.addPoint({
125
126
  x: t,
@@ -130,13 +131,13 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
130
131
  }, void 0), this.updateMarks(c, l, !0);
131
132
  };
132
133
  render() {
133
- let { axesSettings: t, currentTool: r, coordinatesOnHover: a, size: s, disabledLabels: c, disabledTitle: l, domain: u, backgroundMarks: p, range: m, title: h, labels: g, labelModeEnabled: y, labelsPlaceholders: b, showLabels: x, showPixelGuides: C, showTitle: E, titlePlaceholder: D, onChangeLabels: O, onChangeTitle: k, mathMlOptions: A = {}, gssLineData: j, disabled: M, language: N } = this.props, { marks: P } = this.props, F = f(u, m, s, () => this.rootNode), I = S(s), L = {
134
+ let { axesSettings: t, currentTool: r, coordinatesOnHover: a, size: s, disabledLabels: c, disabledTitle: l, domain: u, backgroundMarks: p, range: m, title: h, labels: g, labelModeEnabled: _, labelsPlaceholders: b, showLabels: x, showPixelGuides: S, showTitle: w, titlePlaceholder: D, onChangeLabels: O, onChangeTitle: k, mathMlOptions: A = {}, gssLineData: j, disabled: M, language: N } = this.props, { marks: P } = this.props, F = f(u, m, s, () => this.rootNode), I = C(s), L = {
134
135
  graphProps: F,
135
- labelModeEnabled: y,
136
+ labelModeEnabled: _,
136
137
  gssLineData: j,
137
138
  language: N
138
139
  };
139
- P = T({
140
+ P = E({
140
141
  marks: P || [],
141
142
  currentTool: r
142
143
  });
@@ -155,22 +156,22 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
155
156
  });
156
157
  let z = [];
157
158
  z.push(...P.filter((e) => e.type === "polygon")), z.push(...P.filter((e) => e.type === "line"));
158
- let { ariaLabel: B, ariaDescription: V } = w({
159
+ let { ariaLabel: B, ariaDescription: V } = T({
159
160
  title: h,
160
161
  domain: u,
161
162
  range: m,
162
163
  marks: [...p || [], ...z],
163
164
  language: N
164
165
  });
165
- return /* @__PURE__ */ _(d, {
166
+ return /* @__PURE__ */ v(d, {
166
167
  rootRef: (e) => this.rootNode = e,
167
168
  disabledTitle: l,
168
169
  disabledLabels: c,
169
170
  labels: g,
170
171
  labelsPlaceholders: b || {},
171
- showPixelGuides: C,
172
+ showPixelGuides: S,
172
173
  showLabels: x,
173
- showTitle: E,
174
+ showTitle: w,
174
175
  title: h,
175
176
  titlePlaceholder: D,
176
177
  onChangeTitle: k,
@@ -179,33 +180,32 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
179
180
  ariaLabel: B,
180
181
  ariaDescription: V,
181
182
  ...L,
182
- children: /* @__PURE__ */ v("g", {
183
+ children: /* @__PURE__ */ y("g", {
183
184
  transform: u && u.padding && u.range ? `translate(${u.padding}, ${m.padding})` : void 0,
184
185
  children: [
185
- /* @__PURE__ */ _(i, { ...L }),
186
- /* @__PURE__ */ _(n, {
186
+ /* @__PURE__ */ v(i, { ...L }),
187
+ /* @__PURE__ */ v(n, {
187
188
  ...t,
188
189
  ...L
189
190
  }),
190
- /* @__PURE__ */ _(o, {
191
+ /* @__PURE__ */ v(o, {
191
192
  ...s,
192
193
  onClick: this.onBgClick,
193
194
  ...L
194
195
  }),
195
- /* @__PURE__ */ v("mask", {
196
+ /* @__PURE__ */ y("mask", {
196
197
  id: `${this.maskUid}`,
197
- children: [/* @__PURE__ */ _("rect", {
198
+ children: [/* @__PURE__ */ v("rect", {
198
199
  ...I,
199
200
  fill: "white"
200
201
  }), " "]
201
202
  }),
202
- /* @__PURE__ */ v("g", {
203
- id: "marks",
203
+ /* @__PURE__ */ y("g", {
204
204
  mask: `url('#${this.maskUid}')`,
205
205
  children: [
206
206
  (p || []).map((e, t) => {
207
207
  let n = this.getComponent(e), r = e.type;
208
- return /* @__PURE__ */ _(n, {
208
+ return /* @__PURE__ */ v(n, {
209
209
  mark: {
210
210
  ...e,
211
211
  disabled: !0,
@@ -218,7 +218,7 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
218
218
  }),
219
219
  z.map((e, t) => {
220
220
  let n = this.getComponent(e), i = e.type;
221
- return /* @__PURE__ */ _(n, {
221
+ return /* @__PURE__ */ v(n, {
222
222
  mark: e,
223
223
  coordinatesOnHover: a,
224
224
  onChange: this.changeMark,
@@ -231,7 +231,7 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
231
231
  ...L
232
232
  }, `${i}-${t}`);
233
233
  }),
234
- /* @__PURE__ */ _("foreignObject", {
234
+ /* @__PURE__ */ v("foreignObject", {
235
235
  ref: (e) => this.labelNode = e,
236
236
  x: "0",
237
237
  y: "0",
@@ -249,4 +249,4 @@ var { translator: y } = h, b = g("pie-lib:graphing-solution-set:graph"), x = {
249
249
  }
250
250
  };
251
251
  //#endregion
252
- export { E as Graph, E as default, x as graphPropTypes, T as removeBuildingToolIfCurrentToolDiffers };
252
+ export { D as Graph, D as default, S as graphPropTypes, E as removeBuildingToolIfCurrentToolDiffers };