@pie-lib/graphing 4.0.5-next.33 → 4.0.5-next.35
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/_virtual/_rolldown/runtime.js +2 -5
- package/dist/axis/arrow.js +5 -5
- package/dist/axis/axes.js +29 -29
- package/dist/container/index.js +32 -32
- package/dist/coordinates-label.js +6 -6
- package/dist/graph-with-controls.js +25 -23
- package/dist/grid-setup.js +63 -63
- package/dist/grid.js +3 -3
- package/dist/key-legend.js +38 -38
- package/dist/labels.js +19 -19
- package/dist/mark-label.js +19 -19
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
- package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js +43 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
- package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
- package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
- package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
- 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
- package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
- package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js +24 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
- package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
- package/dist/toggle-bar.js +19 -19
- package/dist/tools/circle/bg-circle.js +4 -4
- package/dist/tools/circle/component.js +18 -18
- package/dist/tools/line/component.js +9 -9
- package/dist/tools/polygon/line.js +9 -9
- package/dist/tools/polygon/polygon.js +7 -7
- package/dist/tools/ray/component.js +9 -9
- package/dist/tools/segment/component.js +6 -6
- package/dist/tools/shared/arrow-head.js +17 -17
- package/dist/tools/shared/line/index.d.ts +1 -1
- package/dist/tools/shared/line/index.js +13 -13
- package/dist/tools/shared/line/line-path.js +9 -9
- package/dist/tools/shared/line/with-root-edge.js +5 -5
- package/dist/tools/shared/point/base-point.js +10 -10
- package/dist/tools/shared/point/index.js +10 -10
- package/dist/tools/shared/styles.d.ts +2 -2
- package/dist/tools/shared/styles.js +2 -2
- package/dist/tools/vector/component.js +7 -7
- package/dist/undo-redo.js +9 -9
- package/package.json +14 -14
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -50
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -47
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +0 -50
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +0 -9
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +0 -8
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +0 -18
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +0 -20
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +0 -20
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
- 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
- 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
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
|
@@ -2,10 +2,10 @@ import { lineBase as e, lineToolComponent as t, styles as n } from "../shared/li
|
|
|
2
2
|
import "react";
|
|
3
3
|
import r from "prop-types";
|
|
4
4
|
import { types as i } from "@pie-lib/plot";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { styled as s } from "@mui/material/styles";
|
|
7
7
|
//#region src/tools/segment/component.tsx
|
|
8
|
-
var c =
|
|
8
|
+
var c = s("line")(({ theme: e, disabled: t, correctness: r }) => ({
|
|
9
9
|
...n.line(e),
|
|
10
10
|
...t && {
|
|
11
11
|
...n.disabled(e),
|
|
@@ -15,8 +15,8 @@ var c = a("line")(({ theme: e, disabled: t, correctness: r }) => ({
|
|
|
15
15
|
...r === "incorrect" && n.incorrect(e, "stroke"),
|
|
16
16
|
...r === "missing" && n.missing(e, "stroke")
|
|
17
17
|
})), l = (e) => {
|
|
18
|
-
let { className: t, correctness: n, disabled: r, graphProps: i, from:
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
let { className: t, correctness: n, disabled: r, graphProps: i, from: s, to: l, ...u } = e, { scale: d } = i, f = d.x(s.x), p = d.y(s.y), m = d.x(l.x), h = d.y(l.y);
|
|
19
|
+
return /* @__PURE__ */ o("g", { children: [/* @__PURE__ */ a("line", {
|
|
20
20
|
className: "hit-area",
|
|
21
21
|
x1: f,
|
|
22
22
|
y1: p,
|
|
@@ -28,7 +28,7 @@ var c = a("line")(({ theme: e, disabled: t, correctness: r }) => ({
|
|
|
28
28
|
cursor: "pointer",
|
|
29
29
|
pointerEvents: "stroke"
|
|
30
30
|
}
|
|
31
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ a(c, {
|
|
32
32
|
x1: f,
|
|
33
33
|
y1: p,
|
|
34
34
|
x2: m,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import e from "prop-types";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { styled as n } from "@mui/material/styles";
|
|
5
5
|
import { color as r } from "@pie-lib/render-ui";
|
|
6
6
|
//#region src/tools/shared/arrow-head.tsx
|
|
7
|
-
var i =
|
|
7
|
+
var i = n("polygon")(({ disabled: e, correctness: t }) => ({
|
|
8
8
|
fill: r.defaults.BLACK,
|
|
9
|
-
...e && { fill: r.
|
|
9
|
+
...e && { fill: r.defaults.DISABLED_SECONDARY },
|
|
10
10
|
...t === "correct" && { fill: r.correctWithIcon() },
|
|
11
11
|
...t === "incorrect" && { fill: r.incorrectWithIcon() },
|
|
12
12
|
...t === "missing" && { fill: r.missingWithIcon() }
|
|
13
|
-
})), a =
|
|
13
|
+
})), a = n("marker")(({ disabled: e, correctness: t }) => ({ "& polygon": {
|
|
14
14
|
fill: r.defaults.BLACK,
|
|
15
|
-
...e && { fill: r.
|
|
15
|
+
...e && { fill: r.defaults.DISABLED_SECONDARY },
|
|
16
16
|
...t === "correct" && { fill: r.correctWithIcon() },
|
|
17
17
|
...t === "incorrect" && { fill: r.incorrectWithIcon() },
|
|
18
18
|
...t === "missing" && { fill: r.missingWithIcon() }
|
|
19
|
-
} })), o = ({ size: e, transform:
|
|
19
|
+
} })), o = ({ size: e, transform: n, points: r, disabled: a, correctness: o }) => /* @__PURE__ */ t(i, {
|
|
20
20
|
points: r || `0,0 ${e},${e / 2} 0,${e}`,
|
|
21
|
-
transform:
|
|
21
|
+
transform: n,
|
|
22
22
|
disabled: a,
|
|
23
23
|
correctness: o
|
|
24
24
|
});
|
|
@@ -33,20 +33,20 @@ o.propTypes = {
|
|
|
33
33
|
size: 10,
|
|
34
34
|
transform: ""
|
|
35
35
|
};
|
|
36
|
-
var s = () => `arrow-${(Math.random() * 1e3).toFixed(0)}`, c = ({ id: e, size:
|
|
36
|
+
var s = () => `arrow-${(Math.random() * 1e3).toFixed(0)}`, c = ({ id: e, size: n, className: r, disabled: i, correctness: s }) => {
|
|
37
37
|
let c = i || r?.includes("disabled"), l = s || (r?.includes("incorrect") ? "incorrect" : r?.includes("correct") ? "correct" : r?.includes("missing") ? "missing" : null);
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ t(a, {
|
|
39
39
|
id: e,
|
|
40
|
-
viewBox: `0 0 ${
|
|
41
|
-
refX:
|
|
42
|
-
refY:
|
|
43
|
-
markerWidth:
|
|
44
|
-
markerHeight:
|
|
40
|
+
viewBox: `0 0 ${n} ${n}`,
|
|
41
|
+
refX: n / 2,
|
|
42
|
+
refY: n / 2,
|
|
43
|
+
markerWidth: n,
|
|
44
|
+
markerHeight: n,
|
|
45
45
|
orient: "auto-start-reverse",
|
|
46
46
|
disabled: c,
|
|
47
47
|
correctness: l,
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
size:
|
|
48
|
+
children: /* @__PURE__ */ t(o, {
|
|
49
|
+
size: n,
|
|
50
50
|
disabled: c,
|
|
51
51
|
correctness: l
|
|
52
52
|
})
|
|
@@ -6,12 +6,12 @@ import d from "react";
|
|
|
6
6
|
import f from "prop-types";
|
|
7
7
|
import { cloneDeep as p, isEmpty as m, isEqual as h } from "@pie-element/shared-lodash";
|
|
8
8
|
import { gridDraggable as g, trig as _, types as v, utils as y } from "@pie-lib/plot";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
|
+
import { styled as S } from "@mui/material/styles";
|
|
11
11
|
import { color as C } from "@pie-lib/render-ui";
|
|
12
12
|
import w from "react-dom";
|
|
13
13
|
//#region src/tools/shared/line/index.tsx
|
|
14
|
-
var T =
|
|
14
|
+
var T = S("g")(({ disabled: e, correctness: t }) => ({
|
|
15
15
|
"& line:not(.hit-area)": {
|
|
16
16
|
fill: "transparent",
|
|
17
17
|
stroke: C.defaults.BLACK,
|
|
@@ -100,7 +100,7 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
100
100
|
};
|
|
101
101
|
render() {
|
|
102
102
|
let { graphProps: t, onClick: n, labelNode: r, labelModeEnabled: i, coordinatesOnHover: a, limitLabeling: o } = this.props, s = this.state.mark ? this.state.mark : this.props.mark, c = p(s.from), l = p(s.to), u = p(s.middle);
|
|
103
|
-
return c && s.isBackground && (c.disabled = !0), l && s.isBackground && (l.disabled = !0), u && s.isBackground && (u.disabled = !0), /* @__PURE__ */
|
|
103
|
+
return c && s.isBackground && (c.disabled = !0), l && s.isBackground && (l.disabled = !0), u && s.isBackground && (u.disabled = !0), /* @__PURE__ */ b(e, {
|
|
104
104
|
disabled: s.disabled,
|
|
105
105
|
coordinatesOnHover: a,
|
|
106
106
|
correctness: s.correctness,
|
|
@@ -226,8 +226,8 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
226
226
|
disabled: d,
|
|
227
227
|
correctness: f,
|
|
228
228
|
onClick: p
|
|
229
|
-
}, y = c ? _.toDegrees(_.angle(i, c)) : 0,
|
|
230
|
-
return m && (i && Object.prototype.hasOwnProperty.call(i, "label") && (
|
|
229
|
+
}, y = c ? _.toDegrees(_.angle(i, c)) : 0, S = null, C = null, E = null;
|
|
230
|
+
return m && (i && Object.prototype.hasOwnProperty.call(i, "label") && (S = w.createPortal(/* @__PURE__ */ b(u, {
|
|
231
231
|
inputRef: (e) => this.input.from = e,
|
|
232
232
|
autoFocus: g === "from",
|
|
233
233
|
disabled: !h,
|
|
@@ -238,7 +238,7 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
238
238
|
...i,
|
|
239
239
|
label: e
|
|
240
240
|
}, "from")
|
|
241
|
-
}), m)), c && Object.prototype.hasOwnProperty.call(c, "label") && (C = w.createPortal(/* @__PURE__ */
|
|
241
|
+
}), m)), c && Object.prototype.hasOwnProperty.call(c, "label") && (C = w.createPortal(/* @__PURE__ */ b(u, {
|
|
242
242
|
inputRef: (e) => this.input.to = e,
|
|
243
243
|
autoFocus: g === "to",
|
|
244
244
|
disabled: !h,
|
|
@@ -249,7 +249,7 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
249
249
|
...c,
|
|
250
250
|
label: e
|
|
251
251
|
}, "to")
|
|
252
|
-
}), m)), l && Object.prototype.hasOwnProperty.call(l, "label") && (E = w.createPortal(/* @__PURE__ */
|
|
252
|
+
}), m)), l && Object.prototype.hasOwnProperty.call(l, "label") && (E = w.createPortal(/* @__PURE__ */ b(u, {
|
|
253
253
|
inputRef: (e) => this.input.middle = e,
|
|
254
254
|
autoFocus: g === "middle",
|
|
255
255
|
disabled: !h,
|
|
@@ -260,11 +260,11 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
260
260
|
...l,
|
|
261
261
|
label: e
|
|
262
262
|
}, "middle")
|
|
263
|
-
}), m))), /* @__PURE__ */
|
|
263
|
+
}), m))), /* @__PURE__ */ x(T, {
|
|
264
264
|
disabled: d,
|
|
265
265
|
correctness: f,
|
|
266
266
|
children: [
|
|
267
|
-
c && /* @__PURE__ */
|
|
267
|
+
c && /* @__PURE__ */ b(a, {
|
|
268
268
|
from: i,
|
|
269
269
|
to: c,
|
|
270
270
|
middle: l,
|
|
@@ -273,7 +273,7 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
273
273
|
onClick: (e) => this.clickPoint(l, "middle", e)
|
|
274
274
|
}),
|
|
275
275
|
E,
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ b(o, {
|
|
277
277
|
x: i.x,
|
|
278
278
|
y: i.y,
|
|
279
279
|
labelNode: m,
|
|
@@ -282,8 +282,8 @@ var T = b("g")(({ disabled: e, correctness: t }) => ({
|
|
|
282
282
|
...v,
|
|
283
283
|
onClick: (e) => this.clickPoint(i, "from", e)
|
|
284
284
|
}),
|
|
285
|
-
|
|
286
|
-
c && /* @__PURE__ */
|
|
285
|
+
S,
|
|
286
|
+
c && /* @__PURE__ */ b(s, {
|
|
287
287
|
x: c.x,
|
|
288
288
|
y: c.y,
|
|
289
289
|
angle: y,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import e from "../../../node_modules/.bun/@visx_shape@
|
|
1
|
+
import e from "../../../node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js";
|
|
2
2
|
import { correct as t, disabledSecondary as n, incorrect as r, missing as i } from "../styles.js";
|
|
3
3
|
import a from "react";
|
|
4
4
|
import o from "prop-types";
|
|
5
5
|
import { types as s } from "@pie-lib/plot";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { styled as u } from "@mui/material/styles";
|
|
8
8
|
import { color as d } from "@pie-lib/render-ui";
|
|
9
9
|
//#region src/tools/shared/line/line-path.tsx
|
|
10
10
|
var f = () => ({
|
|
11
11
|
strokeWidth: 4,
|
|
12
12
|
stroke: d.defaults.BLACK
|
|
13
|
-
}), p =
|
|
13
|
+
}), p = u(e)(({ disabled: e, correctness: a }) => ({
|
|
14
14
|
fill: "none",
|
|
15
15
|
strokeWidth: 3,
|
|
16
16
|
stroke: d.black(),
|
|
@@ -25,7 +25,7 @@ var f = () => ({
|
|
|
25
25
|
strokeWidth: 1,
|
|
26
26
|
strokeDasharray: "4 3"
|
|
27
27
|
}
|
|
28
|
-
})), m =
|
|
28
|
+
})), m = u(e)(({ theme: e, disabled: t, correctness: n, isDragging: r }) => ({
|
|
29
29
|
strokeWidth: 7,
|
|
30
30
|
fill: "none",
|
|
31
31
|
transition: "stroke-width 200ms ease-in, stroke 200ms ease-in",
|
|
@@ -50,17 +50,17 @@ var f = () => ({
|
|
|
50
50
|
to: {}
|
|
51
51
|
};
|
|
52
52
|
render() {
|
|
53
|
-
let { data: e, className: t, disabled: n, correctness: r, from: i, to: o, graphProps: s, isDragging:
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
let { data: e, className: t, disabled: n, correctness: r, from: i, to: o, graphProps: s, isDragging: u, ...d } = this.props;
|
|
54
|
+
return /* @__PURE__ */ l(a.Fragment, { children: [/* @__PURE__ */ c(p, {
|
|
55
55
|
data: e,
|
|
56
56
|
className: t,
|
|
57
57
|
disabled: n,
|
|
58
58
|
correctness: r,
|
|
59
59
|
...d
|
|
60
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ c(m, {
|
|
61
61
|
data: e,
|
|
62
62
|
className: t,
|
|
63
|
-
isDragging:
|
|
63
|
+
isDragging: u,
|
|
64
64
|
disabled: n,
|
|
65
65
|
correctness: r,
|
|
66
66
|
...d
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d3_shape_exports as e } from "../../../node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js";
|
|
2
|
+
import { LinePath as t } from "./line-path.js";
|
|
3
3
|
import { lineBase as n, lineToolComponent as r } from "./index.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import i from "prop-types";
|
|
@@ -42,14 +42,14 @@ var s = (e) => {
|
|
|
42
42
|
disabled: f,
|
|
43
43
|
correctness: p
|
|
44
44
|
};
|
|
45
|
-
return g ? /* @__PURE__ */ o(
|
|
45
|
+
return g ? /* @__PURE__ */ o(t, {
|
|
46
46
|
data: _,
|
|
47
47
|
from: a,
|
|
48
48
|
to: s,
|
|
49
|
-
curve:
|
|
49
|
+
curve: e.curveMonotoneX,
|
|
50
50
|
...v,
|
|
51
51
|
...m
|
|
52
|
-
}) : /* @__PURE__ */ o(
|
|
52
|
+
}) : /* @__PURE__ */ o(t, {
|
|
53
53
|
data: _,
|
|
54
54
|
from: a,
|
|
55
55
|
to: s,
|
|
@@ -7,11 +7,11 @@ import { correct as a, disabled as o, incorrect as s, missing as c } from "../st
|
|
|
7
7
|
import l from "react";
|
|
8
8
|
import u from "prop-types";
|
|
9
9
|
import { types as d } from "@pie-lib/plot";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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 g from "react-dom";
|
|
13
13
|
//#region src/tools/shared/point/base-point.tsx
|
|
14
|
-
var _ =
|
|
14
|
+
var _ = h("g")(({ disabled: e, correctness: t }) => ({
|
|
15
15
|
cursor: "pointer",
|
|
16
16
|
"& circle": { fill: "currentColor" },
|
|
17
17
|
...e && {
|
|
@@ -46,7 +46,7 @@ var _ = f("g")(({ disabled: e, correctness: t }) => ({
|
|
|
46
46
|
};
|
|
47
47
|
state = { showCoordinates: !1 };
|
|
48
48
|
render() {
|
|
49
|
-
let { className: a, coordinatesOnHover: o, x: s, y: c, disabled: l, correctness: u, graphProps: d, labelNode:
|
|
49
|
+
let { className: a, coordinatesOnHover: o, x: s, y: c, disabled: l, correctness: u, graphProps: d, labelNode: h, onClick: v, onTouchStart: y, onTouchEnd: b } = this.props, { showCoordinates: x } = this.state, { scale: S } = d, C = e(d) ? 5 : 7, w;
|
|
50
50
|
switch (u) {
|
|
51
51
|
case "missing":
|
|
52
52
|
w = n;
|
|
@@ -59,7 +59,7 @@ var _ = f("g")(({ disabled: e, correctness: t }) => ({
|
|
|
59
59
|
break;
|
|
60
60
|
default: w = null;
|
|
61
61
|
}
|
|
62
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("circle", {
|
|
63
63
|
style: {
|
|
64
64
|
fill: "transparent",
|
|
65
65
|
cursor: "pointer",
|
|
@@ -73,28 +73,28 @@ var _ = f("g")(({ disabled: e, correctness: t }) => ({
|
|
|
73
73
|
onTouchStart: y,
|
|
74
74
|
onTouchEnd: b,
|
|
75
75
|
onClick: v
|
|
76
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ m(_, {
|
|
77
77
|
className: a,
|
|
78
78
|
disabled: l,
|
|
79
79
|
correctness: u,
|
|
80
80
|
onMouseEnter: () => this.setState({ showCoordinates: !0 }),
|
|
81
81
|
onMouseLeave: () => this.setState({ showCoordinates: !1 }),
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ p("circle", {
|
|
84
84
|
r: C,
|
|
85
85
|
cx: S.x(s),
|
|
86
86
|
cy: S.y(c)
|
|
87
87
|
}),
|
|
88
|
-
w && /* @__PURE__ */
|
|
88
|
+
w && /* @__PURE__ */ p(w, {
|
|
89
89
|
scale: S,
|
|
90
90
|
x: s,
|
|
91
91
|
y: c
|
|
92
92
|
}),
|
|
93
|
-
|
|
93
|
+
h && o && x && g.createPortal(/* @__PURE__ */ p(t, {
|
|
94
94
|
graphProps: d,
|
|
95
95
|
x: s,
|
|
96
96
|
y: c
|
|
97
|
-
}),
|
|
97
|
+
}), h)
|
|
98
98
|
]
|
|
99
99
|
})] });
|
|
100
100
|
}
|
|
@@ -4,8 +4,8 @@ import { RawArrow as r } from "./arrow-point.js";
|
|
|
4
4
|
import { BaseArrow as i } from "./arrow.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { gridDraggable as a } from "@pie-lib/plot";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
import { styled as s } from "@mui/material/styles";
|
|
9
9
|
import { color as c } from "@pie-lib/render-ui";
|
|
10
10
|
//#region src/tools/shared/point/index.tsx
|
|
11
11
|
var l = {
|
|
@@ -26,20 +26,20 @@ var l = {
|
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
28
|
fromDelta: (e, n) => t(e).add(t(n))
|
|
29
|
-
}, u =
|
|
29
|
+
}, u = s("g")(() => ({
|
|
30
30
|
"& circle, & polygon": { cursor: "pointer" },
|
|
31
|
-
"&[disabled]": { "& circle, & polygon": { fill: c.
|
|
32
|
-
})), d = a(l)((e) => /* @__PURE__ */
|
|
31
|
+
"&[disabled]": { "& circle, & polygon": { fill: c.defaults.DISABLED_SECONDARY } }
|
|
32
|
+
})), d = a(l)((e) => /* @__PURE__ */ o(u, {
|
|
33
33
|
...e,
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ o(n, { ...e })
|
|
35
35
|
}));
|
|
36
|
-
a(l)((e) => /* @__PURE__ */
|
|
36
|
+
a(l)((e) => /* @__PURE__ */ o(u, {
|
|
37
37
|
...e,
|
|
38
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ o(r, { ...e })
|
|
39
39
|
}));
|
|
40
|
-
var f = a(l)((e) => /* @__PURE__ */
|
|
40
|
+
var f = a(l)((e) => /* @__PURE__ */ o(u, {
|
|
41
41
|
...e,
|
|
42
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ o(i, { ...e })
|
|
43
43
|
}));
|
|
44
44
|
//#endregion
|
|
45
45
|
export { f as Arrow, d as BasePoint };
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const graphingShapeFill: () => string;
|
|
10
10
|
export declare const disabled: (key?: string) => {
|
|
11
|
-
[x: string]:
|
|
11
|
+
[x: string]: string;
|
|
12
12
|
pointerEvents: string;
|
|
13
13
|
};
|
|
14
14
|
export declare const disabledSecondary: (key?: string) => {
|
|
15
|
-
[x: string]:
|
|
15
|
+
[x: string]: string;
|
|
16
16
|
pointerEvents: string;
|
|
17
17
|
};
|
|
18
18
|
export declare const correct: (key?: string) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { color as e } from "@pie-lib/render-ui";
|
|
2
2
|
//#region src/tools/shared/styles.ts
|
|
3
3
|
var t = () => e.visualElementsColors.SHAPES_FILL_COLOR, n = (t = "fill") => ({
|
|
4
|
-
[t]: e.
|
|
4
|
+
[t]: e.defaults.DISABLED_SECONDARY,
|
|
5
5
|
pointerEvents: "none"
|
|
6
6
|
}), r = (t = "fill") => ({
|
|
7
|
-
[t]: e.
|
|
7
|
+
[t]: e.defaults.DISABLED_SECONDARY,
|
|
8
8
|
pointerEvents: "none"
|
|
9
9
|
}), i = (t = "fill") => ({
|
|
10
10
|
[t]: e.correctWithIcon(),
|
|
@@ -4,22 +4,22 @@ import { lineBase as n, lineToolComponent as r, styles as i } from "../shared/li
|
|
|
4
4
|
import "react";
|
|
5
5
|
import a from "prop-types";
|
|
6
6
|
import { types as o } from "@pie-lib/plot";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
|
+
import { styled as c } from "@mui/material/styles";
|
|
9
9
|
//#region src/tools/vector/component.tsx
|
|
10
|
-
var l =
|
|
10
|
+
var l = c("line")(({ theme: e, disabled: t, correctness: n }) => ({
|
|
11
11
|
...i.line(e),
|
|
12
12
|
...t && i.disabledSecondary(e),
|
|
13
13
|
...n && i[n] && i[n](e, "stroke")
|
|
14
14
|
})), u = (t) => {
|
|
15
|
-
let { className: n, disabled: r, correctness: i, graphProps: { scale: a }, from: o, to:
|
|
15
|
+
let { className: n, disabled: r, correctness: i, graphProps: { scale: a }, from: o, to: c, ...u } = t, d = {
|
|
16
16
|
x: a.x(o.x),
|
|
17
17
|
y: a.y(o.y)
|
|
18
18
|
}, f = {
|
|
19
|
-
x: a.x(
|
|
20
|
-
y: a.y(
|
|
19
|
+
x: a.x(c.x),
|
|
20
|
+
y: a.y(c.y)
|
|
21
21
|
}, p = e(d, f);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ s(l, {
|
|
23
23
|
className: n,
|
|
24
24
|
disabled: r,
|
|
25
25
|
correctness: i,
|
package/dist/undo-redo.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { clsx as e } from "./node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "prop-types";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { styled as a } from "@mui/material/styles";
|
|
6
6
|
import { color as o } from "@pie-lib/render-ui";
|
|
7
7
|
import s from "@mui/material/Button";
|
|
8
8
|
import c from "@pie-lib/translator";
|
|
9
9
|
//#region src/undo-redo.tsx
|
|
10
|
-
var { translator: l } = c, u =
|
|
10
|
+
var { translator: l } = c, u = a(s)(({ theme: e }) => ({
|
|
11
11
|
color: o.text(),
|
|
12
12
|
fontWeight: "bold",
|
|
13
13
|
marginBottom: e.spacing(.5),
|
|
@@ -23,19 +23,19 @@ var { translator: l } = c, u = r(s)(({ theme: e }) => ({
|
|
|
23
23
|
};
|
|
24
24
|
static defaultProps = {};
|
|
25
25
|
render() {
|
|
26
|
-
let { className: t, onUndo: n, onRedo:
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
let { className: t, onUndo: n, onRedo: a, onReset: o, language: s } = this.props;
|
|
27
|
+
return /* @__PURE__ */ i("div", {
|
|
28
28
|
className: e(t),
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ r(u, {
|
|
31
31
|
onClick: () => n(!0),
|
|
32
32
|
children: l.t("common:undo", { lng: s })
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
onClick: () =>
|
|
34
|
+
/* @__PURE__ */ r(u, {
|
|
35
|
+
onClick: () => a(!0),
|
|
36
36
|
children: l.t("graphing.redo", { lng: s })
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ r(u, {
|
|
39
39
|
onClick: () => o(),
|
|
40
40
|
children: l.t("graphing.reset", { lng: s })
|
|
41
41
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/graphing",
|
|
3
|
-
"version": "4.0.5-next.
|
|
3
|
+
"version": "4.0.5-next.35",
|
|
4
4
|
"description": "Graphing components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,31 +14,31 @@
|
|
|
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": "4.0
|
|
18
|
-
"@pie-lib/editable-html-tip-tap": "2.1.2-next.
|
|
17
|
+
"@pie-lib/drag": "4.1.0-next.40",
|
|
18
|
+
"@pie-lib/editable-html-tip-tap": "2.1.2-next.34",
|
|
19
19
|
"@pie-lib/graphing-utils": "3.0.3-next.2",
|
|
20
|
-
"@pie-lib/plot": "4.0.4-next.
|
|
21
|
-
"@pie-lib/render-ui": "6.
|
|
20
|
+
"@pie-lib/plot": "4.0.4-next.34",
|
|
21
|
+
"@pie-lib/render-ui": "6.2.0-next.40",
|
|
22
22
|
"@pie-lib/translator": "4.0.3-next.2",
|
|
23
|
-
"@visx/axis": "^
|
|
24
|
-
"@visx/clip-path": "^
|
|
23
|
+
"@visx/axis": "^4.0.0",
|
|
24
|
+
"@visx/clip-path": "^4.0.0",
|
|
25
25
|
"@visx/curve": "^4.0.0",
|
|
26
|
-
"@visx/event": "^
|
|
27
|
-
"@visx/grid": "^
|
|
28
|
-
"@visx/group": "^
|
|
29
|
-
"@visx/point": "^
|
|
30
|
-
"@visx/shape": "^
|
|
26
|
+
"@visx/event": "^4.0.0",
|
|
27
|
+
"@visx/grid": "^4.0.0",
|
|
28
|
+
"@visx/group": "^4.0.0",
|
|
29
|
+
"@visx/point": "^4.0.0",
|
|
30
|
+
"@visx/shape": "^4.0.0",
|
|
31
31
|
"d3-scale": "^4.0.2",
|
|
32
32
|
"d3-selection": "^3.0.0",
|
|
33
33
|
"debug": "^4.1.1",
|
|
34
34
|
"invariant": "^2.2.4",
|
|
35
35
|
"prop-types": "^15.7.2",
|
|
36
|
-
"react-draggable": "^4.
|
|
36
|
+
"react-draggable": "^4.7.1",
|
|
37
37
|
"react-redux": "^9.3.0",
|
|
38
38
|
"redux": "^5.0.1",
|
|
39
39
|
"redux-undo": "^1.1.0",
|
|
40
40
|
"@pie-element/shared-lodash": "0.1.1-next.1",
|
|
41
|
-
"@pie-lib/config-ui": "13.0.4-next.
|
|
41
|
+
"@pie-lib/config-ui": "13.0.4-next.34",
|
|
42
42
|
"@dnd-kit/core": "^6.3.1",
|
|
43
43
|
"@dnd-kit/utilities": "^3.2.2",
|
|
44
44
|
"clsx": "^2.1.1",
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
-
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
-
import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
|
|
5
|
-
import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
|
|
6
|
-
import a from "../constants/orientation.js";
|
|
7
|
-
import o from "./AxisRenderer.js";
|
|
8
|
-
import s from "../utils/getTickPosition.js";
|
|
9
|
-
import c from "../utils/getTickFormatter.js";
|
|
10
|
-
import l from "../utils/createPoint.js";
|
|
11
|
-
import u from "../utils/getAxisRangePaddingConfig.js";
|
|
12
|
-
import d from "react";
|
|
13
|
-
import "prop-types";
|
|
14
|
-
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js
|
|
15
|
-
var f = /* @__PURE__ */ e(t()), p = [
|
|
16
|
-
"children",
|
|
17
|
-
"axisClassName",
|
|
18
|
-
"hideAxisLine",
|
|
19
|
-
"hideTicks",
|
|
20
|
-
"hideZero",
|
|
21
|
-
"innerRef",
|
|
22
|
-
"left",
|
|
23
|
-
"numTicks",
|
|
24
|
-
"orientation",
|
|
25
|
-
"rangePadding",
|
|
26
|
-
"scale",
|
|
27
|
-
"tickFormat",
|
|
28
|
-
"tickLength",
|
|
29
|
-
"tickValues",
|
|
30
|
-
"top"
|
|
31
|
-
];
|
|
32
|
-
function m() {
|
|
33
|
-
return m = Object.assign ? Object.assign.bind() : function(e) {
|
|
34
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
35
|
-
var n = arguments[t];
|
|
36
|
-
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
37
|
-
}
|
|
38
|
-
return e;
|
|
39
|
-
}, m.apply(this, arguments);
|
|
40
|
-
}
|
|
41
|
-
function h(e, t) {
|
|
42
|
-
if (e == null) return {};
|
|
43
|
-
var n = {}, r = Object.keys(e), i, a;
|
|
44
|
-
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
45
|
-
return n;
|
|
46
|
-
}
|
|
47
|
-
function g(e) {
|
|
48
|
-
var t = e.children, g = t === void 0 ? o : t, _ = e.axisClassName, v = e.hideAxisLine, y = v !== void 0 && v, b = e.hideTicks, x = b !== void 0 && b, S = e.hideZero, C = S !== void 0 && S, w = e.innerRef, T = e.left, E = T === void 0 ? 0 : T, D = e.numTicks, O = D === void 0 ? 10 : D, k = e.orientation, A = k === void 0 ? a.bottom : k, j = e.rangePadding, M = j === void 0 ? 0 : j, N = e.scale, P = e.tickFormat, F = e.tickLength, I = F === void 0 ? 8 : F, L = e.tickValues, R = e.top, z = R === void 0 ? 0 : R, B = h(e, p), V = P ?? c(N), H = A === a.left, U = A === a.top, W = U || A === a.bottom, G = s(N), K = H || U ? -1 : 1, q = N.range(), J = u(M), Y = l({
|
|
49
|
-
x: Number(q[0]) + .5 - J.start,
|
|
50
|
-
y: 0
|
|
51
|
-
}, W), X = l({
|
|
52
|
-
x: Number(q[q.length - 1]) + .5 + J.end,
|
|
53
|
-
y: 0
|
|
54
|
-
}, W), Z = (L ?? i(N, O)).filter(function(e) {
|
|
55
|
-
return !C || e !== 0 && e !== "0";
|
|
56
|
-
}).map(function(e, t) {
|
|
57
|
-
return {
|
|
58
|
-
value: e,
|
|
59
|
-
index: t
|
|
60
|
-
};
|
|
61
|
-
}), Q = Z.map(function(e) {
|
|
62
|
-
var t = e.value, n = e.index, i = r(G(t));
|
|
63
|
-
return {
|
|
64
|
-
value: t,
|
|
65
|
-
index: n,
|
|
66
|
-
from: l({
|
|
67
|
-
x: i,
|
|
68
|
-
y: 0
|
|
69
|
-
}, W),
|
|
70
|
-
to: l({
|
|
71
|
-
x: i,
|
|
72
|
-
y: I * K
|
|
73
|
-
}, W),
|
|
74
|
-
formattedValue: V(t, n, Z)
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
return /*#__PURE__*/ d.createElement(n, {
|
|
78
|
-
className: (0, f.default)("visx-axis", _),
|
|
79
|
-
innerRef: w,
|
|
80
|
-
top: z,
|
|
81
|
-
left: E
|
|
82
|
-
}, g(m({}, B, {
|
|
83
|
-
axisFromPoint: Y,
|
|
84
|
-
axisToPoint: X,
|
|
85
|
-
hideAxisLine: y,
|
|
86
|
-
hideTicks: x,
|
|
87
|
-
hideZero: C,
|
|
88
|
-
horizontal: W,
|
|
89
|
-
numTicks: O,
|
|
90
|
-
orientation: A,
|
|
91
|
-
rangePadding: M,
|
|
92
|
-
scale: N,
|
|
93
|
-
tickFormat: V,
|
|
94
|
-
tickLength: I,
|
|
95
|
-
tickPosition: G,
|
|
96
|
-
tickSign: K,
|
|
97
|
-
ticks: Q
|
|
98
|
-
})));
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
export { g as default };
|