@pie-lib/graphing-solution-set 4.0.4-next.32 → 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 (105) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +2 -5
  2. package/dist/axis/arrow.js +5 -5
  3. package/dist/axis/axes.js +30 -30
  4. package/dist/container/index.js +33 -33
  5. package/dist/coordinates-label.js +6 -6
  6. package/dist/graph-with-controls.js +20 -20
  7. package/dist/grid-setup.js +63 -63
  8. package/dist/grid.js +3 -3
  9. package/dist/labels.js +15 -15
  10. package/dist/mark-label.js +6 -6
  11. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
  12. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
  13. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
  14. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  15. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  16. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
  17. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  18. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  19. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
  20. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js +43 -0
  21. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
  22. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
  23. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  24. package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
  25. package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
  26. 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
  27. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
  28. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  29. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
  30. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
  31. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
  32. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
  33. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
  34. package/dist/tool-menu.js +22 -22
  35. package/dist/tools/line/component.js +8 -8
  36. package/dist/tools/polygon/polygon.js +5 -5
  37. package/dist/tools/shared/point/base-point.js +9 -9
  38. package/dist/tools/shared/point/index.js +5 -5
  39. package/dist/undo-redo.js +7 -7
  40. package/package.json +12 -12
  41. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
  42. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
  43. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
  44. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
  45. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
  46. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
  47. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
  48. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
  49. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
  50. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +0 -79
  51. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
  52. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
  53. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
  54. package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -50
  55. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
  56. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
  57. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
  58. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -47
  59. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
  60. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
  61. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
  62. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
  63. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +0 -21
  64. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +0 -21
  65. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +0 -10
  66. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +0 -21
  67. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +0 -9
  68. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +0 -14
  69. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +0 -15
  70. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +0 -16
  71. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +0 -9
  72. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +0 -8
  73. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +0 -14
  74. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +0 -15
  75. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +0 -19
  76. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +0 -11
  77. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +0 -13
  78. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +0 -12
  79. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +0 -18
  80. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +0 -14
  81. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +0 -14
  82. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +0 -12
  83. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +0 -16
  84. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +0 -11
  85. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +0 -14
  86. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +0 -14
  87. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +0 -13
  88. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +0 -14
  89. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +0 -19
  90. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +0 -14
  91. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +0 -13
  92. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +0 -13
  93. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +0 -14
  94. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +0 -9
  95. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +0 -12
  96. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +0 -10
  97. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +0 -20
  98. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +0 -11
  99. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +0 -16
  100. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +0 -12
  101. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +0 -20
  102. package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
  103. 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
  104. 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
  105. package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
@@ -0,0 +1,8 @@
1
+ import e from "../../../../../../@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js";
2
+ //#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js
3
+ function t(t) {
4
+ let n = t;
5
+ return "tickFormat" in n ? n.tickFormat() : e;
6
+ }
7
+ //#endregion
8
+ export { t as default };
@@ -0,0 +1,14 @@
1
+ //#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js
2
+ function e(e) {
3
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "center", n = e;
4
+ if (t !== "start" && "bandwidth" in n) {
5
+ let e = n.bandwidth();
6
+ return t === "center" && (e /= 2), n.round() && (e = Math.round(e)), (t) => {
7
+ let r = n(t);
8
+ return typeof r == "number" ? r + e : r;
9
+ };
10
+ }
11
+ return e;
12
+ }
13
+ //#endregion
14
+ export { e as default };
@@ -0,0 +1,43 @@
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@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
4
+ import r from "./GridRows.js";
5
+ import i from "./GridColumns.js";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ //#region ../../../node_modules/.bun/@visx+grid@4.0.0+d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js
8
+ var s = /* @__PURE__ */ e(t());
9
+ function c(e) {
10
+ let { top: t, left: c, xScale: l, yScale: u, width: d, height: f, className: p, stroke: m, strokeWidth: h, strokeDasharray: g, numTicksRows: _, numTicksColumns: v, rowLineStyle: y, columnLineStyle: b, xOffset: x, yOffset: S, rowTickValues: C, columnTickValues: w, ...T } = e;
11
+ return /*#__PURE__*/ o(n, {
12
+ className: (0, s.default)("visx-grid", p),
13
+ top: t,
14
+ left: c,
15
+ children: [/*#__PURE__*/ a(r, {
16
+ className: p,
17
+ scale: u,
18
+ width: d,
19
+ stroke: m,
20
+ strokeWidth: h,
21
+ strokeDasharray: g,
22
+ numTicks: _,
23
+ lineStyle: y,
24
+ offset: S,
25
+ tickValues: C,
26
+ ...T
27
+ }), /*#__PURE__*/ a(i, {
28
+ className: p,
29
+ scale: l,
30
+ height: f,
31
+ stroke: m,
32
+ strokeWidth: h,
33
+ strokeDasharray: g,
34
+ numTicks: v,
35
+ lineStyle: b,
36
+ offset: x,
37
+ tickValues: w,
38
+ ...T
39
+ })]
40
+ });
41
+ }
42
+ //#endregion
43
+ export { c as default };
@@ -0,0 +1,46 @@
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@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
4
+ import r from "../../../../../../@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
5
+ import i from "../../../../../../@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js";
6
+ import a from "../../../../../../@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js";
7
+ import o from "../../../../../../@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js";
8
+ import s from "../utils/getScaleBandwidth.js";
9
+ import { jsx as c } from "react/jsx-runtime";
10
+ //#region ../../../node_modules/.bun/@visx+grid@4.0.0+d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js
11
+ var l = /* @__PURE__ */ e(t());
12
+ function u(e) {
13
+ let { top: t = 0, left: u = 0, scale: d, height: f, stroke: p = "#eaf0f6", strokeWidth: m = 1, strokeDasharray: h, className: g, numTicks: _ = 10, lineStyle: v, offset: y, tickValues: b, children: x, ...S } = e, C = b ?? i(d, _), w = (y ?? 0) + s(d) / 2, T = C.map((e, t) => {
14
+ let n = (r(d(e)) ?? 0) + w;
15
+ return {
16
+ index: t,
17
+ from: new o({
18
+ x: n,
19
+ y: 0
20
+ }),
21
+ to: new o({
22
+ x: n,
23
+ y: f
24
+ })
25
+ };
26
+ });
27
+ return /*#__PURE__*/ c(n, {
28
+ className: (0, l.default)("visx-columns", g),
29
+ top: t,
30
+ left: u,
31
+ children: x ? x({ lines: T }) : T.map((e) => {
32
+ let { from: t, to: n, index: r } = e;
33
+ return /*#__PURE__*/ c(a, {
34
+ from: t,
35
+ to: n,
36
+ stroke: p,
37
+ strokeWidth: m,
38
+ strokeDasharray: h,
39
+ style: v,
40
+ ...S
41
+ }, `column-line-${r}`);
42
+ })
43
+ });
44
+ }
45
+ //#endregion
46
+ export { u as default };
@@ -0,0 +1,46 @@
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@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
4
+ import r from "../../../../../../@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
5
+ import i from "../../../../../../@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js";
6
+ import a from "../../../../../../@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js";
7
+ import o from "../../../../../../@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js";
8
+ import s from "../utils/getScaleBandwidth.js";
9
+ import { jsx as c } from "react/jsx-runtime";
10
+ //#region ../../../node_modules/.bun/@visx+grid@4.0.0+d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js
11
+ var l = /* @__PURE__ */ e(t());
12
+ function u(e) {
13
+ let { top: t = 0, left: u = 0, scale: d, width: f, stroke: p = "#eaf0f6", strokeWidth: m = 1, strokeDasharray: h, className: g, children: _, numTicks: v = 10, lineStyle: y, offset: b, tickValues: x, ...S } = e, C = x ?? i(d, v), w = (b ?? 0) + s(d) / 2, T = C.map((e, t) => {
14
+ let n = (r(d(e)) ?? 0) + w;
15
+ return {
16
+ index: t,
17
+ from: new o({
18
+ x: 0,
19
+ y: n
20
+ }),
21
+ to: new o({
22
+ x: f,
23
+ y: n
24
+ })
25
+ };
26
+ });
27
+ return /*#__PURE__*/ c(n, {
28
+ className: (0, l.default)("visx-rows", g),
29
+ top: t,
30
+ left: u,
31
+ children: _ ? _({ lines: T }) : T.map((e) => {
32
+ let { from: t, to: n, index: r } = e;
33
+ return /*#__PURE__*/ c(a, {
34
+ from: t,
35
+ to: n,
36
+ stroke: p,
37
+ strokeWidth: m,
38
+ strokeDasharray: h,
39
+ style: y,
40
+ ...S
41
+ }, `row-line-${r}`);
42
+ })
43
+ });
44
+ }
45
+ //#endregion
46
+ export { u as default };
@@ -0,0 +1,6 @@
1
+ //#region ../../../node_modules/.bun/@visx+grid@4.0.0+d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js
2
+ function e(e) {
3
+ return "bandwidth" in e ? e.bandwidth() : 0;
4
+ }
5
+ //#endregion
6
+ export { e as default };
@@ -0,0 +1,17 @@
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 { jsx as n } from "react/jsx-runtime";
4
+ //#region ../../../node_modules/.bun/@visx+group@4.0.0+d84c32d47042070f/node_modules/@visx/group/esm/Group.js
5
+ var r = /* @__PURE__ */ e(t());
6
+ function i(e) {
7
+ let { top: t = 0, left: i = 0, transform: a, className: o, children: s, innerRef: c, ...l } = e;
8
+ return /*#__PURE__*/ n("g", {
9
+ ref: c,
10
+ className: (0, r.default)("visx-group", o),
11
+ transform: a || `translate(${i}, ${t})`,
12
+ ...l,
13
+ children: s
14
+ });
15
+ }
16
+ //#endregion
17
+ export { i as default };
@@ -0,0 +1,20 @@
1
+ //#region ../../../node_modules/.bun/@visx+point@4.0.0/node_modules/@visx/point/esm/Point.js
2
+ var e = class {
3
+ x = 0;
4
+ y = 0;
5
+ constructor(e) {
6
+ let { x: t = 0, y: n = 0 } = e;
7
+ this.x = t, this.y = n;
8
+ }
9
+ value() {
10
+ return {
11
+ x: this.x,
12
+ y: this.y
13
+ };
14
+ }
15
+ toArray() {
16
+ return [this.x, this.y];
17
+ }
18
+ };
19
+ //#endregion
20
+ export { e as default };
@@ -1,7 +1,7 @@
1
- //#region ../../../node_modules/.bun/@visx+scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js
1
+ //#region ../../../node_modules/.bun/@visx+scale@4.0.0/node_modules/@visx/scale/esm/utils/coerceNumber.js
2
2
  function e(e) {
3
3
  if ((typeof e == "function" || typeof e == "object" && e) && "valueOf" in e) {
4
- var t = e.valueOf();
4
+ let t = e.valueOf();
5
5
  if (typeof t == "number") return t;
6
6
  }
7
7
  return e;
@@ -0,0 +1,7 @@
1
+ //#region ../../../node_modules/.bun/@visx+scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js
2
+ function e(e, t) {
3
+ let n = e;
4
+ return "ticks" in n ? n.ticks(t) : n.domain().filter((e, n, r) => t == null || r.length <= t || n % Math.round((r.length - 1) / t) === 0);
5
+ }
6
+ //#endregion
7
+ export { e as default };
@@ -0,0 +1,6 @@
1
+ //#region ../../../node_modules/.bun/@visx+scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js
2
+ function e(e) {
3
+ return e?.toString();
4
+ }
5
+ //#endregion
6
+ export { e as default };
@@ -0,0 +1,27 @@
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 { jsx as n } from "react/jsx-runtime";
4
+ //#region ../../../node_modules/.bun/@visx+shape@4.0.0+d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js
5
+ var r = /* @__PURE__ */ e(t());
6
+ function i(e) {
7
+ let { from: t = {
8
+ x: 0,
9
+ y: 0
10
+ }, to: i = {
11
+ x: 1,
12
+ y: 1
13
+ }, fill: a = "transparent", className: o, innerRef: s, ...c } = e, l = t.x === i.x || t.y === i.y;
14
+ return /*#__PURE__*/ n("line", {
15
+ ref: s,
16
+ className: (0, r.default)("visx-line", o),
17
+ x1: t.x,
18
+ y1: t.y,
19
+ x2: i.x,
20
+ y2: i.y,
21
+ fill: a,
22
+ shapeRendering: l ? "crispEdges" : "auto",
23
+ ...c
24
+ });
25
+ }
26
+ //#endregion
27
+ export { i as default };
@@ -0,0 +1,27 @@
1
+ import e from "./hooks/useText.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region ../../../node_modules/.bun/@visx+text@4.0.0+d84c32d47042070f/node_modules/@visx/text/esm/Text.js
4
+ var n = { overflow: "visible" };
5
+ function r(r) {
6
+ let { dx: i = 0, dy: a = 0, textAnchor: o = "start", innerRef: s, innerTextRef: c, verticalAnchor: l, angle: u, lineHeight: d = "1em", scaleToFit: f = !1, capHeight: p, width: m, ...h } = r, { x: g = 0, fontSize: _ } = h, { wordsByLines: v, startDy: y, transform: b } = e(r);
7
+ return /*#__PURE__*/ t("svg", {
8
+ ref: s,
9
+ x: i,
10
+ y: a,
11
+ fontSize: _,
12
+ style: n,
13
+ children: v.length > 0 ? /*#__PURE__*/ t("text", {
14
+ ref: c,
15
+ transform: b,
16
+ ...h,
17
+ textAnchor: o,
18
+ children: v.map((e, n) => /*#__PURE__*/ t("tspan", {
19
+ x: g,
20
+ dy: n === 0 ? y : d,
21
+ children: e.words.join(" ")
22
+ }, n))
23
+ }) : null
24
+ });
25
+ }
26
+ //#endregion
27
+ export { r as default };
@@ -0,0 +1,68 @@
1
+ import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_reduce_css_calc as t } from "../../../../../../reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js";
3
+ import n from "../util/getStringWidth.js";
4
+ import { useMemo as r } from "react";
5
+ //#region ../../../node_modules/.bun/@visx+text@4.0.0+d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js
6
+ var i = /* @__PURE__ */ e(t());
7
+ function a(e) {
8
+ return typeof e == "number";
9
+ }
10
+ function o(e) {
11
+ return typeof e == "number" && Number.isFinite(e) || typeof e == "string";
12
+ }
13
+ function s(e) {
14
+ let { verticalAnchor: t = "end", scaleToFit: s = !1, angle: c, width: l, lineHeight: u = "1em", capHeight: d = "0.71em", children: f, style: p, ...m } = e, { x: h = 0, y: g = 0 } = m, _ = !o(h) || !o(g), { wordsWithWidth: v, spaceWidth: y } = r(() => ({
15
+ wordsWithWidth: (f == null ? [] : f.toString().split(/(?:(?!\u00A0+)\s+)/)).map((e) => ({
16
+ word: e,
17
+ wordWidth: n(e, p) || 0
18
+ })),
19
+ spaceWidth: n("\xA0", p) || 0
20
+ }), [f, p]), b = r(() => _ ? [] : l || s ? v.reduce((e, t) => {
21
+ let { word: n, wordWidth: r } = t, i = e[e.length - 1];
22
+ if (i && (l == null || s || (i.width || 0) + r + y < l)) i.words.push(n), i.width = i.width || 0, i.width += r + y;
23
+ else {
24
+ let t = {
25
+ words: [n],
26
+ width: r
27
+ };
28
+ e.push(t);
29
+ }
30
+ return e;
31
+ }, []) : [{ words: f == null ? [] : f.toString().split(/(?:(?!\u00A0+)\s+)/) }], [
32
+ _,
33
+ l,
34
+ s,
35
+ f,
36
+ v,
37
+ y
38
+ ]);
39
+ return {
40
+ wordsByLines: b,
41
+ startDy: r(() => _ ? "" : t === "start" ? (0, i.default)(`calc(${d})`) : t === "middle" ? (0, i.default)(`calc(${(b.length - 1) / 2} * -${u} + (${d} / 2))`) : (0, i.default)(`calc(${b.length - 1} * -${u})`), [
42
+ _,
43
+ t,
44
+ d,
45
+ b.length,
46
+ u
47
+ ]),
48
+ transform: r(() => {
49
+ let e = [];
50
+ if (_) return "";
51
+ if (a(h) && a(g) && a(l) && s && b.length > 0) {
52
+ let t = b[0].width || 1, n = s === "shrink-only" ? Math.min(l / t, 1) : l / t, r = n, i = h - n * h, a = g - r * g;
53
+ e.push(`matrix(${n}, 0, 0, ${r}, ${i}, ${a})`);
54
+ }
55
+ return c && e.push(`rotate(${c}, ${h}, ${g})`), e.length > 0 ? e.join(" ") : "";
56
+ }, [
57
+ _,
58
+ h,
59
+ g,
60
+ l,
61
+ s,
62
+ b,
63
+ c
64
+ ])
65
+ };
66
+ }
67
+ //#endregion
68
+ export { s as default };
@@ -0,0 +1,19 @@
1
+ import e from "./memoize.js";
2
+ //#region ../../../node_modules/.bun/@visx+text@4.0.0+d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js
3
+ var t = "__react_svg_text_measurement_id";
4
+ function n(e, n) {
5
+ if (typeof document > "u") return null;
6
+ try {
7
+ let r = document.getElementById(t);
8
+ if (!r) {
9
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
10
+ e.setAttribute("aria-hidden", "true"), e.style.width = "0", e.style.height = "0", e.style.position = "absolute", e.style.top = "-100%", e.style.left = "-100%", r = document.createElementNS("http://www.w3.org/2000/svg", "text"), r.setAttribute("id", t), e.appendChild(r), document.body.appendChild(e);
11
+ }
12
+ return Object.assign(r.style, n), r.textContent = e, r.getComputedTextLength();
13
+ } catch {
14
+ return null;
15
+ }
16
+ }
17
+ var r = e(n, (e, t) => `${e}_${JSON.stringify(t)}`);
18
+ //#endregion
19
+ export { r as default };
@@ -0,0 +1,13 @@
1
+ //#region ../../../node_modules/.bun/@visx+text@4.0.0+d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js
2
+ function e(e, t) {
3
+ let n = /* @__PURE__ */ new Map();
4
+ return function() {
5
+ var r = [...arguments];
6
+ let i = t(...r);
7
+ if (n.has(i)) return n.get(i);
8
+ let a = e.apply(this, r);
9
+ return n.set(i, a), a;
10
+ };
11
+ }
12
+ //#endregion
13
+ export { e as default };
package/dist/tool-menu.js CHANGED
@@ -1,7 +1,7 @@
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, jsxs as i } from "react/jsx-runtime";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { styled as i } from "@mui/material/styles";
5
5
  import { Button as a, Radio as o, Typography as s } from "@mui/material";
6
6
  //#region src/tool-menu.tsx
7
7
  var c = class extends e.Component {
@@ -20,27 +20,27 @@ var c = class extends e.Component {
20
20
  };
21
21
  render() {
22
22
  let { gssLineData: e, disabled: t } = this.props;
23
- return /* @__PURE__ */ r(l, { children: /* @__PURE__ */ i("div", {
23
+ return /* @__PURE__ */ n(l, { children: /* @__PURE__ */ r("div", {
24
24
  className: "selectLineRadioGroup",
25
25
  children: [
26
- /* @__PURE__ */ i("div", {
26
+ /* @__PURE__ */ r("div", {
27
27
  className: "radioFieldOuter",
28
- children: [/* @__PURE__ */ i("div", {
28
+ children: [/* @__PURE__ */ r("div", {
29
29
  className: "radioFieldInner",
30
- children: [/* @__PURE__ */ r(o, {
30
+ children: [/* @__PURE__ */ n(o, {
31
31
  name: "select-line-radio-buttons",
32
32
  onChange: this.onChangeRadioValue,
33
33
  value: "lineA",
34
34
  disabled: !!t,
35
35
  checked: e.selectedTool === "lineA",
36
36
  className: "lineTypeRadio"
37
- }), /* @__PURE__ */ r(s, {
37
+ }), /* @__PURE__ */ n(s, {
38
38
  className: "lineNameFont",
39
39
  children: "Line A"
40
40
  })]
41
- }), /* @__PURE__ */ i("div", {
41
+ }), /* @__PURE__ */ r("div", {
42
42
  className: "radioFieldButtons",
43
- children: [/* @__PURE__ */ i(a, {
43
+ children: [/* @__PURE__ */ r(a, {
44
44
  size: "small",
45
45
  variant: "contained",
46
46
  color: e.lineA.lineType === "Solid" ? "primary" : "inherit",
@@ -48,7 +48,7 @@ var c = class extends e.Component {
48
48
  onClick: () => this.lineTypeChange("A", "Solid"),
49
49
  className: e.lineA.lineType === "Solid" ? t ? "lineTypeButtonLeftSelectedDisabled" : "lineTypeButtonLeftSelected" : t ? "lineTypeButtonLeftUnSelectedDisabled" : "lineTypeButtonLeftUnSelected",
50
50
  children: [e.lineA.lineType === "Solid" && "✔", " Solid"]
51
- }), /* @__PURE__ */ i(a, {
51
+ }), /* @__PURE__ */ r(a, {
52
52
  size: "small",
53
53
  variant: "contained",
54
54
  color: e.lineA.lineType === "Dashed" ? "primary" : "inherit",
@@ -59,24 +59,24 @@ var c = class extends e.Component {
59
59
  })]
60
60
  })]
61
61
  }),
62
- e.numberOfLines === 2 && /* @__PURE__ */ i("div", {
62
+ e.numberOfLines === 2 && /* @__PURE__ */ r("div", {
63
63
  className: "radioFieldOuter",
64
- children: [/* @__PURE__ */ i("div", {
64
+ children: [/* @__PURE__ */ r("div", {
65
65
  className: "radioFieldInner",
66
- children: [/* @__PURE__ */ r(o, {
66
+ children: [/* @__PURE__ */ n(o, {
67
67
  name: "select-line-radio-buttons",
68
68
  onChange: this.onChangeRadioValue,
69
69
  value: "lineB",
70
70
  disabled: !!t,
71
71
  checked: e.selectedTool === "lineB",
72
72
  className: "lineTypeRadio"
73
- }), /* @__PURE__ */ r(s, {
73
+ }), /* @__PURE__ */ n(s, {
74
74
  className: "lineNameFont",
75
75
  children: "Line B"
76
76
  })]
77
- }), /* @__PURE__ */ i("div", {
77
+ }), /* @__PURE__ */ r("div", {
78
78
  className: "radioFieldButtons",
79
- children: [/* @__PURE__ */ i(a, {
79
+ children: [/* @__PURE__ */ r(a, {
80
80
  size: "small",
81
81
  variant: "contained",
82
82
  color: e.lineB.lineType === "Solid" ? "primary" : "inherit",
@@ -84,7 +84,7 @@ var c = class extends e.Component {
84
84
  onClick: () => this.lineTypeChange("B", "Solid"),
85
85
  className: e.lineB.lineType === "Solid" ? t ? "lineTypeButtonLeftSelectedDisabled" : "lineTypeButtonLeftSelected" : t ? "lineTypeButtonLeftUnSelectedDisabled" : "lineTypeButtonLeftUnSelected",
86
86
  children: [e.lineB.lineType === "Solid" && "✔", " Solid"]
87
- }), /* @__PURE__ */ i(a, {
87
+ }), /* @__PURE__ */ r(a, {
88
88
  size: "small",
89
89
  variant: "contained",
90
90
  color: e.lineB.lineType === "Dashed" ? "primary" : "inherit",
@@ -95,18 +95,18 @@ var c = class extends e.Component {
95
95
  })]
96
96
  })]
97
97
  }),
98
- /* @__PURE__ */ r("div", {
98
+ /* @__PURE__ */ n("div", {
99
99
  className: "radioFieldOuter",
100
- children: /* @__PURE__ */ i("div", {
100
+ children: /* @__PURE__ */ r("div", {
101
101
  className: "radioFieldInner",
102
- children: [/* @__PURE__ */ r(o, {
102
+ children: [/* @__PURE__ */ n(o, {
103
103
  name: "select-line-radio-buttons",
104
104
  onChange: this.onChangeRadioValue,
105
105
  value: "solutionSet",
106
106
  disabled: !!t,
107
107
  checked: e.selectedTool === "solutionSet",
108
108
  className: "lineTypeRadio"
109
- }), /* @__PURE__ */ r(s, {
109
+ }), /* @__PURE__ */ n(s, {
110
110
  className: "lineNameFont",
111
111
  children: "Solution Set"
112
112
  })]
@@ -115,7 +115,7 @@ var c = class extends e.Component {
115
115
  ]
116
116
  }) });
117
117
  }
118
- }, l = n("div")(() => ({
118
+ }, l = i("div")(() => ({
119
119
  "& .selectLineRadioGroup": {
120
120
  display: "flex",
121
121
  flexWrap: "wrap",
@@ -4,10 +4,10 @@ import { lineBase as i, lineToolComponent as a, styles as o } from "../shared/li
4
4
  import "react";
5
5
  import s from "prop-types";
6
6
  import { trig as c, types as l } from "@pie-lib/plot";
7
- import { styled as u } from "@mui/material/styles";
8
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { styled as f } from "@mui/material/styles";
9
9
  //#region src/tools/line/component.tsx
10
- var p = u("line", { shouldForwardProp: (e) => ![
10
+ var p = f("line", { shouldForwardProp: (e) => ![
11
11
  "fill",
12
12
  "disabled",
13
13
  "correctness"
@@ -17,24 +17,24 @@ var p = u("line", { shouldForwardProp: (e) => ![
17
17
  ...r === "correct" && o.correct(e, "stroke"),
18
18
  ...r === "incorrect" && o.incorrect(e, "stroke"),
19
19
  ...r === "missing" && o.missing(e, "stroke")
20
- })), m = u(n, { shouldForwardProp: (e) => !["suffix"].includes(e) })(({ theme: e, suffix: t }) => ({
20
+ })), m = f(n, { shouldForwardProp: (e) => !["suffix"].includes(e) })(({ theme: e, suffix: t }) => ({
21
21
  ...t === "enabled" && o.arrow(e),
22
22
  ...t === "disabled" && o.disabledArrow(e),
23
23
  ...t === "correct" && o.correct(e),
24
24
  ...t === "incorrect" && o.incorrect(e),
25
25
  ...t === "missing" && o.missing(e)
26
26
  })), h = (n) => {
27
- let i = r(), { className: a, correctness: o, disabled: s, graphProps: l, fill: u = "Solid", from: h, to: g, ..._ } = n, { scale: v } = l, { domain: y, range: b } = e(l), [x, S] = c.edges(y, b)(h, g), C = o || s && "disabled" || "enabled";
28
- return /* @__PURE__ */ f("g", { children: [/* @__PURE__ */ d("defs", { children: /* @__PURE__ */ d(m, {
27
+ let i = r(), { className: a, correctness: o, disabled: s, graphProps: l, fill: f = "Solid", from: h, to: g, ..._ } = n, { scale: v } = l, { domain: y, range: b } = e(l), [x, S] = c.edges(y, b)(h, g), C = o || s && "disabled" || "enabled";
28
+ return /* @__PURE__ */ d("g", { children: [/* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u(m, {
29
29
  size: t(l) ? 4 : 5,
30
30
  id: `${n.markerId || i}-${C}`,
31
31
  suffix: C
32
- }) }), /* @__PURE__ */ d(p, {
32
+ }) }), /* @__PURE__ */ u(p, {
33
33
  x1: v.x(x.x),
34
34
  y1: v.y(x.y),
35
35
  x2: v.x(S.x),
36
36
  y2: v.y(S.y),
37
- fill: u,
37
+ fill: f,
38
38
  disabled: s,
39
39
  correctness: o,
40
40
  className: a,
@@ -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,