@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.
- package/dist/_virtual/_rolldown/runtime.js +2 -5
- package/dist/axis/arrow.js +5 -5
- package/dist/axis/axes.js +30 -30
- package/dist/container/index.js +33 -33
- package/dist/coordinates-label.js +6 -6
- package/dist/graph-with-controls.js +20 -20
- package/dist/grid-setup.js +63 -63
- package/dist/grid.js +3 -3
- package/dist/labels.js +15 -15
- package/dist/mark-label.js +6 -6
- 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_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/tool-menu.js +22 -22
- package/dist/tools/line/component.js +8 -8
- package/dist/tools/polygon/polygon.js +5 -5
- package/dist/tools/shared/point/base-point.js +9 -9
- package/dist/tools/shared/point/index.js +5 -5
- package/dist/undo-redo.js +7 -7
- package/package.json +12 -12
- 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/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
package/dist/grid-setup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import e from "prop-types";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { styled as i } from "@mui/material/styles";
|
|
5
5
|
import * as a from "@pie-lib/render-ui";
|
|
6
6
|
import { InputContainer as o, color as s } from "@pie-lib/render-ui";
|
|
7
7
|
import c from "@pie-lib/editable-html-tip-tap";
|
|
@@ -15,46 +15,46 @@ function g(e) {
|
|
|
15
15
|
function _(e, t) {
|
|
16
16
|
return !e || g(e) ? e : g(e.default) ? e.default : t && g(e[t]) ? e[t] : t && g(e[t]?.default) ? e[t].default : e;
|
|
17
17
|
}
|
|
18
|
-
var v = _(o, "InputContainer") || _(x.InputContainer, "InputContainer"), y = a, b = y.default, x = b && typeof b == "object" ? b : y, S =
|
|
18
|
+
var v = _(o, "InputContainer") || _(x.InputContainer, "InputContainer"), y = a, b = y.default, x = b && typeof b == "object" ? b : y, S = i("div")(() => ({ width: "450px" })), C = i("div")(() => ({
|
|
19
19
|
display: "flex",
|
|
20
20
|
flexDirection: "column",
|
|
21
21
|
width: "100%"
|
|
22
|
-
})), w =
|
|
22
|
+
})), w = i("div")(() => ({
|
|
23
23
|
display: "flex",
|
|
24
24
|
flexDirection: "column",
|
|
25
25
|
alignItems: "center"
|
|
26
|
-
})), T =
|
|
26
|
+
})), T = i("div")(() => ({
|
|
27
27
|
display: "flex",
|
|
28
28
|
justifyContent: "space-around",
|
|
29
29
|
alignItems: "center"
|
|
30
|
-
})), E =
|
|
30
|
+
})), E = i("div")(({ theme: e }) => ({
|
|
31
31
|
width: "130px",
|
|
32
32
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
33
|
-
})), D =
|
|
33
|
+
})), D = i("div")(({ theme: e }) => ({
|
|
34
34
|
width: "160px",
|
|
35
35
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`,
|
|
36
36
|
"& .MuiFormControl-root": { width: "100%" }
|
|
37
|
-
})), O =
|
|
37
|
+
})), O = i("div")(({ theme: e }) => ({
|
|
38
38
|
width: "230px",
|
|
39
39
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`,
|
|
40
40
|
"& .MuiFormControl-root": { width: "100%" }
|
|
41
|
-
})), k =
|
|
41
|
+
})), k = i(f)(({ theme: e }) => ({
|
|
42
42
|
fontStyle: "italic",
|
|
43
43
|
margin: `${e.spacing(1)} 0`
|
|
44
|
-
})), A =
|
|
44
|
+
})), A = i("div")(() => ({
|
|
45
45
|
display: "flex",
|
|
46
46
|
justifyContent: "space-between",
|
|
47
47
|
alignItems: "center"
|
|
48
|
-
})), j =
|
|
49
|
-
let { disabled: t, displayedFields:
|
|
50
|
-
return /* @__PURE__ */
|
|
48
|
+
})), j = i(f)(() => ({ color: s.disabled() })), M = i("div")(({ theme: e }) => ({ paddingTop: e.spacing(2) })), N = (e) => {
|
|
49
|
+
let { disabled: t, displayedFields: i, labelValue: a, labelValues: o, gridValue: s, gridValues: c, onChange: l } = e, { labelStep: u = {}, step: d = {} } = i;
|
|
50
|
+
return /* @__PURE__ */ r(w, { children: [d && d.enabled && /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(m, {
|
|
51
51
|
label: d.label || "",
|
|
52
52
|
value: s,
|
|
53
53
|
customValues: c,
|
|
54
54
|
variant: "outlined",
|
|
55
55
|
disabled: t,
|
|
56
56
|
onChange: (e, t) => l("step", t)
|
|
57
|
-
}) }), u && u.enabled && /* @__PURE__ */
|
|
57
|
+
}) }), u && u.enabled && /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(m, {
|
|
58
58
|
label: u.label || "",
|
|
59
59
|
value: a,
|
|
60
60
|
customValues: o,
|
|
@@ -73,13 +73,13 @@ N.propTypes = {
|
|
|
73
73
|
onChange: e.func
|
|
74
74
|
};
|
|
75
75
|
var P = (e) => {
|
|
76
|
-
let { disabled: t, displayedFields:
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
a && /* @__PURE__ */
|
|
76
|
+
let { disabled: t, displayedFields: i, displayHeader: a, label: o, maxValue: s, minValue: l, onChange: u, type: d } = e, { axisLabel: p = {}, min: h = {}, max: g = {} } = i;
|
|
77
|
+
return /* @__PURE__ */ r(w, { children: [
|
|
78
|
+
a && /* @__PURE__ */ r(f, {
|
|
79
79
|
variant: "subtitle2",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ n("i", { children: d === "domain" ? "x" : "y" }), "-axis"]
|
|
81
81
|
}),
|
|
82
|
-
h && h.enabled && /* @__PURE__ */
|
|
82
|
+
h && h.enabled && /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(m, {
|
|
83
83
|
label: h.label || "",
|
|
84
84
|
value: l,
|
|
85
85
|
min: -1e4,
|
|
@@ -88,7 +88,7 @@ var P = (e) => {
|
|
|
88
88
|
disabled: t,
|
|
89
89
|
onChange: (e, t) => u("min", t)
|
|
90
90
|
}) }),
|
|
91
|
-
g && g.enabled && /* @__PURE__ */
|
|
91
|
+
g && g.enabled && /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(m, {
|
|
92
92
|
label: g.label || "",
|
|
93
93
|
value: s,
|
|
94
94
|
min: l + .05,
|
|
@@ -97,9 +97,9 @@ var P = (e) => {
|
|
|
97
97
|
disabled: t,
|
|
98
98
|
onChange: (e, t) => u("max", t)
|
|
99
99
|
}) }),
|
|
100
|
-
p && p.enabled && /* @__PURE__ */
|
|
100
|
+
p && p.enabled && /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(v, {
|
|
101
101
|
label: p.label || "",
|
|
102
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(c, {
|
|
103
103
|
onChange: (e) => u("axisLabel", e),
|
|
104
104
|
markup: o || "",
|
|
105
105
|
charactersLimit: 5,
|
|
@@ -125,7 +125,7 @@ P.propTypes = {
|
|
|
125
125
|
onChange: e.func
|
|
126
126
|
};
|
|
127
127
|
var F = (e) => {
|
|
128
|
-
let { domain:
|
|
128
|
+
let { domain: i, displayedFields: a = {}, gridValues: o = {}, includeAxes: s, labelValues: c = {}, onChange: g, onChangeView: _, range: v, size: y, sizeConstraints: b, standardGrid: x } = e, D = {
|
|
129
129
|
min: 2,
|
|
130
130
|
max: 41
|
|
131
131
|
}, { axisLabel: M = {}, dimensionsEnabled: F, includeAxesEnabled: I, labelStep: L = {}, min: R = {}, max: z = {}, standardGridEnabled: B, step: V = {} } = a || {}, H = R.enabled || z.enabled || M.enabled || V.enabled || L.enabled, U = {
|
|
@@ -136,31 +136,31 @@ var F = (e) => {
|
|
|
136
136
|
max: z,
|
|
137
137
|
axisLabel: M
|
|
138
138
|
}, G = (e) => {
|
|
139
|
-
let
|
|
140
|
-
let
|
|
139
|
+
let t = (e) => {
|
|
140
|
+
let t = e === "domain" ? i : v;
|
|
141
141
|
return {
|
|
142
142
|
min: 1,
|
|
143
|
-
max:
|
|
143
|
+
max: t.max < D.min || t.max > D.max ? 16 : t.max,
|
|
144
144
|
step: 1,
|
|
145
145
|
labelStep: 0
|
|
146
146
|
};
|
|
147
|
-
},
|
|
147
|
+
}, n = {
|
|
148
148
|
...v,
|
|
149
|
-
...e ? { labelStep: 1 } :
|
|
150
|
-
},
|
|
151
|
-
...
|
|
152
|
-
...e ? { labelStep: 1 } :
|
|
149
|
+
...e ? { labelStep: 1 } : t("range")
|
|
150
|
+
}, r = {
|
|
151
|
+
...i,
|
|
152
|
+
...e ? { labelStep: 1 } : t("domain")
|
|
153
153
|
};
|
|
154
154
|
g({
|
|
155
155
|
includeAxes: e,
|
|
156
|
-
range:
|
|
157
|
-
domain:
|
|
156
|
+
range: n,
|
|
157
|
+
domain: r
|
|
158
158
|
});
|
|
159
159
|
}, K = (e) => {
|
|
160
160
|
g({
|
|
161
161
|
standardGrid: e,
|
|
162
162
|
range: {
|
|
163
|
-
...
|
|
163
|
+
...i,
|
|
164
164
|
axisLabel: v.axisLabel
|
|
165
165
|
},
|
|
166
166
|
graph: {
|
|
@@ -174,24 +174,24 @@ var F = (e) => {
|
|
|
174
174
|
[e]: t
|
|
175
175
|
};
|
|
176
176
|
x && (n.height = t), g({ graph: n });
|
|
177
|
-
}, J = (e,
|
|
178
|
-
|
|
179
|
-
domain:
|
|
177
|
+
}, J = (e, t) => {
|
|
178
|
+
i[e] = t, x && e !== "axisLabel" && (v[e] = t), g({
|
|
179
|
+
domain: i,
|
|
180
180
|
range: v
|
|
181
181
|
});
|
|
182
182
|
}, Y = (e, t) => {
|
|
183
183
|
v[e] = t, g({ range: v });
|
|
184
|
-
}, X = /* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
184
|
+
}, X = /* @__PURE__ */ r(t, { children: [
|
|
185
|
+
/* @__PURE__ */ r(T, { children: [/* @__PURE__ */ n(P, {
|
|
186
186
|
displayedFields: W,
|
|
187
187
|
displayHeader: H,
|
|
188
188
|
type: "domain",
|
|
189
|
-
minValue:
|
|
190
|
-
maxValue:
|
|
191
|
-
label:
|
|
189
|
+
minValue: i.min,
|
|
190
|
+
maxValue: i.max,
|
|
191
|
+
label: i.axisLabel,
|
|
192
192
|
includeAxes: s,
|
|
193
193
|
onChange: J
|
|
194
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ n(P, {
|
|
195
195
|
displayedFields: W,
|
|
196
196
|
displayHeader: H,
|
|
197
197
|
type: "range",
|
|
@@ -202,15 +202,15 @@ var F = (e) => {
|
|
|
202
202
|
includeAxes: s,
|
|
203
203
|
onChange: Y
|
|
204
204
|
})] }),
|
|
205
|
-
(R.enabled || z.enabled) && /* @__PURE__ */
|
|
206
|
-
(V.enabled || L.enabled) && /* @__PURE__ */
|
|
205
|
+
(R.enabled || z.enabled) && /* @__PURE__ */ n(k, { children: "If you want the axis to be visible, use a zero or negative Min Value, and a positive Max Value" }),
|
|
206
|
+
(V.enabled || L.enabled) && /* @__PURE__ */ r(T, { children: [/* @__PURE__ */ n(N, {
|
|
207
207
|
displayedFields: U,
|
|
208
|
-
gridValue:
|
|
209
|
-
labelValue:
|
|
208
|
+
gridValue: i.step,
|
|
209
|
+
labelValue: i.labelStep,
|
|
210
210
|
gridValues: o.domain || [],
|
|
211
211
|
labelValues: c.domain || [],
|
|
212
212
|
onChange: J
|
|
213
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ n(N, {
|
|
214
214
|
disabled: x,
|
|
215
215
|
displayedFields: U,
|
|
216
216
|
gridValue: v.step,
|
|
@@ -219,15 +219,15 @@ var F = (e) => {
|
|
|
219
219
|
labelValues: c.range || [],
|
|
220
220
|
onChange: Y
|
|
221
221
|
})] }),
|
|
222
|
-
L.enabled && /* @__PURE__ */
|
|
223
|
-
] }), Z = z.enabled ? /* @__PURE__ */
|
|
222
|
+
L.enabled && /* @__PURE__ */ n(k, { children: "For unnumbered gridlines, enter a label interval of 0" })
|
|
223
|
+
] }), Z = z.enabled ? /* @__PURE__ */ r(w, { children: [/* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(m, {
|
|
224
224
|
label: "Number of Vertical Gridlines",
|
|
225
|
-
value:
|
|
225
|
+
value: i.max,
|
|
226
226
|
min: !s && D.min,
|
|
227
227
|
max: !s && D.max,
|
|
228
228
|
variant: "outlined",
|
|
229
229
|
onChange: (e, t) => J("max", t)
|
|
230
|
-
}) }), /* @__PURE__ */
|
|
230
|
+
}) }), /* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(m, {
|
|
231
231
|
label: "Number of Horizontal Gridlines",
|
|
232
232
|
value: v.max,
|
|
233
233
|
min: !s && D.min,
|
|
@@ -236,38 +236,38 @@ var F = (e) => {
|
|
|
236
236
|
disabled: x,
|
|
237
237
|
onChange: (e, t) => Y("max", t)
|
|
238
238
|
}) })] }) : null;
|
|
239
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ n(S, { children: /* @__PURE__ */ r(l, {
|
|
240
240
|
onChange: _,
|
|
241
241
|
TransitionProps: { timeout: {
|
|
242
242
|
enter: 225,
|
|
243
243
|
exit: 195
|
|
244
244
|
} },
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
-
expandIcon: /* @__PURE__ */
|
|
247
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ n(d, {
|
|
246
|
+
expandIcon: /* @__PURE__ */ n(p, {}),
|
|
247
|
+
children: /* @__PURE__ */ n(f, {
|
|
248
248
|
variant: "subtitle1",
|
|
249
249
|
children: "Customize Grid Setup"
|
|
250
250
|
})
|
|
251
|
-
}), /* @__PURE__ */
|
|
252
|
-
I && /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ n(u, { children: /* @__PURE__ */ r(C, { children: [
|
|
252
|
+
I && /* @__PURE__ */ n(h, {
|
|
253
253
|
label: "Include axes and labels?",
|
|
254
254
|
toggle: G,
|
|
255
255
|
checked: s
|
|
256
256
|
}),
|
|
257
|
-
B && /* @__PURE__ */
|
|
257
|
+
B && /* @__PURE__ */ n(h, {
|
|
258
258
|
label: "Constrain to standard coordinate grid?",
|
|
259
259
|
toggle: K,
|
|
260
260
|
checked: x
|
|
261
261
|
}),
|
|
262
262
|
s ? X : Z,
|
|
263
|
-
F && /* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
263
|
+
F && /* @__PURE__ */ r(A, { children: [
|
|
264
|
+
/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n(f, { children: "Dimensions(px)" }), /* @__PURE__ */ r(j, { children: [
|
|
265
265
|
"Min ",
|
|
266
266
|
b.min,
|
|
267
267
|
", Max ",
|
|
268
268
|
b.max
|
|
269
269
|
] })] }),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(m, {
|
|
271
271
|
label: "Width",
|
|
272
272
|
value: y.width,
|
|
273
273
|
min: b.min,
|
|
@@ -276,7 +276,7 @@ var F = (e) => {
|
|
|
276
276
|
variant: "outlined",
|
|
277
277
|
onChange: (e, t) => q("width", t)
|
|
278
278
|
}) }),
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(m, {
|
|
280
280
|
label: "Height",
|
|
281
281
|
value: y.height,
|
|
282
282
|
min: b.min,
|
package/dist/grid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getTickValues as e } from "./utils.js";
|
|
2
|
-
import t from "./node_modules/.bun/@visx_grid@
|
|
3
|
-
import n from "./node_modules/.bun/@visx_grid@
|
|
4
|
-
import r from "./node_modules/.bun/@visx_grid@
|
|
2
|
+
import t from "./node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js";
|
|
3
|
+
import n from "./node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js";
|
|
4
|
+
import r from "./node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js";
|
|
5
5
|
import i from "react";
|
|
6
6
|
import a from "prop-types";
|
|
7
7
|
import { types as o } from "@pie-lib/plot";
|
package/dist/labels.js
CHANGED
|
@@ -2,8 +2,8 @@ import { clsx as e } from "./node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist
|
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "prop-types";
|
|
4
4
|
import { types as r } from "@pie-lib/plot";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Fragment as i, jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import { styled as o } from "@mui/material/styles";
|
|
7
7
|
import * as s from "@pie-lib/render-ui";
|
|
8
8
|
import { Readable as c, color as l } from "@pie-lib/render-ui";
|
|
9
9
|
import u from "@pie-lib/editable-html-tip-tap";
|
|
@@ -37,7 +37,7 @@ var p = f(c, "Readable") || f(g.Readable, "Readable"), m = s, h = m.default, g =
|
|
|
37
37
|
axisLabel: `${b}-axisLabel`,
|
|
38
38
|
disabledAxisLabel: `${b}-disabledAxisLabel`,
|
|
39
39
|
bottomLabel: `${b}-bottomLabel`
|
|
40
|
-
}, S =
|
|
40
|
+
}, S = o("div")(({ theme: e }) => ({
|
|
41
41
|
[`& .${x.label}`]: { fill: l.defaults.SECONDARY },
|
|
42
42
|
[`& .${x.axisLabel}`]: {
|
|
43
43
|
fontSize: e.typography.fontSize - 2,
|
|
@@ -58,21 +58,21 @@ var p = f(c, "Readable") || f(g.Readable, "Readable"), m = s, h = m.default, g =
|
|
|
58
58
|
};
|
|
59
59
|
static defaultProps = { onChange: () => {} };
|
|
60
60
|
render() {
|
|
61
|
-
let { disabledLabel: t, placeholder: n, text: r, side: i, graphProps:
|
|
61
|
+
let { disabledLabel: t, placeholder: n, text: r, side: i, graphProps: o, onChange: s, mathMlOptions: c = {} } = this.props, { size: l, domain: d, range: f } = o, m = (l.height || 500) + (f.padding || 0) * 2, h = (l.width || 500) + (d.padding || 0) * 2, g = v(i, h, m), _ = i === "left" || i === "right" ? m : h, b = y(i, 36), C = i === "bottom" ? 58 : 54, w = [
|
|
62
62
|
"bold",
|
|
63
63
|
"italic",
|
|
64
64
|
"underline",
|
|
65
65
|
"strikethrough",
|
|
66
66
|
"math"
|
|
67
67
|
];
|
|
68
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a("foreignObject", {
|
|
69
69
|
x: -(_ / 2),
|
|
70
70
|
y: b,
|
|
71
71
|
width: _,
|
|
72
72
|
height: C,
|
|
73
73
|
transform: g,
|
|
74
74
|
textAnchor: "middle",
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ a(p, { children: /* @__PURE__ */ a(u, {
|
|
76
76
|
className: e({
|
|
77
77
|
[x.bottomLabel]: i === "bottom",
|
|
78
78
|
[x.disabledAxisLabel]: t
|
|
@@ -113,21 +113,21 @@ var p = f(c, "Readable") || f(g.Readable, "Readable"), m = s, h = m.default, g =
|
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
115
|
render() {
|
|
116
|
-
let { disabledLabels: e, placeholders: t = {}, value: n = {}, graphProps: r, mathMlOptions:
|
|
117
|
-
return /* @__PURE__ */
|
|
116
|
+
let { disabledLabels: e, placeholders: t = {}, value: n = {}, graphProps: r, mathMlOptions: o = {} } = this.props;
|
|
117
|
+
return /* @__PURE__ */ a(i, { children: [
|
|
118
118
|
"left",
|
|
119
119
|
"top",
|
|
120
120
|
"bottom",
|
|
121
121
|
"right"
|
|
122
|
-
].map((
|
|
123
|
-
side:
|
|
124
|
-
text: n[
|
|
122
|
+
].map((i) => /* @__PURE__ */ a(C, {
|
|
123
|
+
side: i,
|
|
124
|
+
text: n[i],
|
|
125
125
|
disabledLabel: e,
|
|
126
|
-
placeholder: t[
|
|
126
|
+
placeholder: t[i],
|
|
127
127
|
graphProps: r,
|
|
128
|
-
onChange: (e) => this.onChangeLabel(e,
|
|
129
|
-
mathMlOptions:
|
|
130
|
-
},
|
|
128
|
+
onChange: (e) => this.onChangeLabel(e, i),
|
|
129
|
+
mathMlOptions: o
|
|
130
|
+
}, i)) });
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
//#endregion
|
package/dist/mark-label.js
CHANGED
|
@@ -3,11 +3,11 @@ import { useDebounce as t } from "./use-debounce.js";
|
|
|
3
3
|
import { useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
4
|
import a from "prop-types";
|
|
5
5
|
import { types as o } from "@pie-lib/plot";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
7
|
+
import { styled as c } from "@mui/material/styles";
|
|
8
8
|
import { color as l } from "@pie-lib/render-ui";
|
|
9
9
|
//#region src/mark-label.tsx
|
|
10
|
-
var u =
|
|
10
|
+
var u = c(e, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(e) })(({ theme: e, disabled: t, markDisabled: n }) => ({ "& input": {
|
|
11
11
|
float: "right",
|
|
12
12
|
padding: e.spacing(.5),
|
|
13
13
|
fontFamily: e.typography.fontFamily,
|
|
@@ -47,7 +47,7 @@ var u = s(e, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
}, p = (e) => {
|
|
50
|
-
let [a, o] = i(null),
|
|
50
|
+
let [a, o] = i(null), c = n((e) => o(e)), { mark: l, graphProps: p, disabled: m, inputRef: h } = e, [g, _] = i(l.label), v = (e) => _(e.target.value), y = t(g, 200);
|
|
51
51
|
r(() => {
|
|
52
52
|
_(l.label);
|
|
53
53
|
}, [l.label]), r(() => {
|
|
@@ -61,9 +61,9 @@ var u = s(e, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(
|
|
|
61
61
|
pointerEvents: "auto",
|
|
62
62
|
...f(p, l, b, d(p, l, b))
|
|
63
63
|
};
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ s(u, {
|
|
65
65
|
inputRef: (e) => {
|
|
66
|
-
|
|
66
|
+
c(e), h(e);
|
|
67
67
|
},
|
|
68
68
|
disabled: m || l.disabled,
|
|
69
69
|
markDisabled: l.disabled,
|
|
@@ -0,0 +1,67 @@
|
|
|
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 "../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 { jsx as d } from "react/jsx-runtime";
|
|
13
|
+
//#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js
|
|
14
|
+
var f = /* @__PURE__ */ e(t());
|
|
15
|
+
function p(e) {
|
|
16
|
+
let { children: t = o, axisClassName: p, hideAxisLine: m = !1, hideTicks: h = !1, hideZero: g = !1, innerRef: _, left: v = 0, numTicks: y = 10, orientation: b = a.bottom, rangePadding: x = 0, scale: S, tickFormat: C, tickLength: w = 8, tickValues: T, top: E = 0, ...D } = e, O = C ?? c(S), k = b === a.left, A = b === a.top, j = A || b === a.bottom, M = s(S), N = k || A ? -1 : 1, P = S.range(), F = u(x), I = l({
|
|
17
|
+
x: Number(P[0]) + .5 - F.start,
|
|
18
|
+
y: 0
|
|
19
|
+
}, j), L = l({
|
|
20
|
+
x: Number(P[P.length - 1]) + .5 + F.end,
|
|
21
|
+
y: 0
|
|
22
|
+
}, j), R = (T ?? i(S, y)).filter((e) => !g || e !== 0 && e !== "0").map((e, t) => ({
|
|
23
|
+
value: e,
|
|
24
|
+
index: t
|
|
25
|
+
})), z = R.map((e) => {
|
|
26
|
+
let { value: t, index: n } = e, i = r(M(t));
|
|
27
|
+
return {
|
|
28
|
+
value: t,
|
|
29
|
+
index: n,
|
|
30
|
+
from: l({
|
|
31
|
+
x: i,
|
|
32
|
+
y: 0
|
|
33
|
+
}, j),
|
|
34
|
+
to: l({
|
|
35
|
+
x: i,
|
|
36
|
+
y: w * N
|
|
37
|
+
}, j),
|
|
38
|
+
formattedValue: O(t, n, R)
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
return /*#__PURE__*/ d(n, {
|
|
42
|
+
className: (0, f.default)("visx-axis", p),
|
|
43
|
+
innerRef: _,
|
|
44
|
+
top: E,
|
|
45
|
+
left: v,
|
|
46
|
+
children: t({
|
|
47
|
+
...D,
|
|
48
|
+
axisFromPoint: I,
|
|
49
|
+
axisToPoint: L,
|
|
50
|
+
hideAxisLine: m,
|
|
51
|
+
hideTicks: h,
|
|
52
|
+
hideZero: g,
|
|
53
|
+
horizontal: j,
|
|
54
|
+
numTicks: y,
|
|
55
|
+
orientation: b,
|
|
56
|
+
rangePadding: x,
|
|
57
|
+
scale: S,
|
|
58
|
+
tickFormat: O,
|
|
59
|
+
tickLength: w,
|
|
60
|
+
tickPosition: M,
|
|
61
|
+
tickSign: N,
|
|
62
|
+
ticks: z
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { p as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
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_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js";
|
|
4
|
+
import r from "../../../../../../@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js";
|
|
5
|
+
import i from "../constants/orientation.js";
|
|
6
|
+
import a from "../utils/getLabelTransform.js";
|
|
7
|
+
import o from "./Ticks.js";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js
|
|
10
|
+
var u = /* @__PURE__ */ e(t()), d = {
|
|
11
|
+
textAnchor: "middle",
|
|
12
|
+
fontFamily: "Arial",
|
|
13
|
+
fontSize: 10,
|
|
14
|
+
fill: "#222"
|
|
15
|
+
};
|
|
16
|
+
function f(e) {
|
|
17
|
+
let { axisFromPoint: t, axisLineClassName: f, axisToPoint: p, hideAxisLine: m, hideTicks: h, horizontal: g, label: _ = "", labelClassName: v, labelOffset: y = 14, labelProps: b, orientation: x = i.bottom, scale: S, stroke: C = "#222", strokeDasharray: w, strokeWidth: T = 1, tickClassName: E, tickComponent: D, tickLineProps: O, tickLabelProps: k, tickLength: A = 8, tickStroke: j = "#222", tickTransform: M, ticks: N, ticksComponent: P = o } = e, F = {
|
|
18
|
+
...d,
|
|
19
|
+
...b
|
|
20
|
+
}, I = {
|
|
21
|
+
...d,
|
|
22
|
+
...typeof k == "object" ? k : null
|
|
23
|
+
}, L = N.map((e) => {
|
|
24
|
+
let { value: t, index: n } = e;
|
|
25
|
+
return typeof k == "function" ? k(t, n, N) : I;
|
|
26
|
+
}), R = Math.max(10, ...L.map((e) => typeof e.fontSize == "number" ? e.fontSize : 0));
|
|
27
|
+
return /*#__PURE__*/ l(s, { children: [
|
|
28
|
+
P({
|
|
29
|
+
hideTicks: h,
|
|
30
|
+
horizontal: g,
|
|
31
|
+
orientation: x,
|
|
32
|
+
scale: S,
|
|
33
|
+
tickClassName: E,
|
|
34
|
+
tickComponent: D,
|
|
35
|
+
tickLabelProps: L,
|
|
36
|
+
tickStroke: j,
|
|
37
|
+
tickTransform: M,
|
|
38
|
+
ticks: N,
|
|
39
|
+
strokeWidth: T,
|
|
40
|
+
tickLineProps: O
|
|
41
|
+
}),
|
|
42
|
+
!m && /*#__PURE__*/ c(n, {
|
|
43
|
+
className: (0, u.default)("visx-axis-line", f),
|
|
44
|
+
from: t,
|
|
45
|
+
to: p,
|
|
46
|
+
stroke: C,
|
|
47
|
+
strokeWidth: T,
|
|
48
|
+
strokeDasharray: w
|
|
49
|
+
}),
|
|
50
|
+
_ && /*#__PURE__*/ c(r, {
|
|
51
|
+
className: (0, u.default)("visx-axis-label", v),
|
|
52
|
+
...a({
|
|
53
|
+
labelOffset: y,
|
|
54
|
+
labelProps: F,
|
|
55
|
+
orientation: x,
|
|
56
|
+
range: S.range(),
|
|
57
|
+
tickLabelFontSize: R,
|
|
58
|
+
tickLength: A
|
|
59
|
+
}),
|
|
60
|
+
...F,
|
|
61
|
+
children: _
|
|
62
|
+
})
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { f as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
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_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js";
|
|
5
|
+
import i from "../../../../../../@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js";
|
|
6
|
+
import a from "../constants/orientation.js";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
//#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js
|
|
9
|
+
var c = /* @__PURE__ */ e(t());
|
|
10
|
+
function l(e) {
|
|
11
|
+
let { hideTicks: t, horizontal: l, orientation: u, tickClassName: d, tickComponent: f, tickLabelProps: p, tickStroke: m = "#222", tickTransform: h, ticks: g, strokeWidth: _, tickLineProps: v } = e;
|
|
12
|
+
return g.map((e) => {
|
|
13
|
+
let { value: g, index: y, from: b, to: x, formattedValue: S } = e, C = p[y] ?? {}, w = Math.max(10, typeof C.fontSize == "number" && C.fontSize || 0), T = x.y + (l && u !== a.top ? w : 0);
|
|
14
|
+
return /*#__PURE__*/ s(n, {
|
|
15
|
+
className: (0, c.default)("visx-axis-tick", d),
|
|
16
|
+
transform: h,
|
|
17
|
+
children: [!t && /*#__PURE__*/ o(r, {
|
|
18
|
+
from: b,
|
|
19
|
+
to: x,
|
|
20
|
+
stroke: m,
|
|
21
|
+
strokeWidth: _,
|
|
22
|
+
strokeLinecap: "square",
|
|
23
|
+
...v
|
|
24
|
+
}), f ? f({
|
|
25
|
+
...C,
|
|
26
|
+
x: x.x,
|
|
27
|
+
y: T,
|
|
28
|
+
formattedValue: S
|
|
29
|
+
}) : /*#__PURE__*/ o(i, {
|
|
30
|
+
x: x.x,
|
|
31
|
+
y: T,
|
|
32
|
+
...C,
|
|
33
|
+
children: S
|
|
34
|
+
})]
|
|
35
|
+
}, `visx-tick-${g}-${y}`);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { l as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import e from "../../../../../../@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
let { x: r, y: i } = t;
|
|
5
|
+
return new e(n ? {
|
|
6
|
+
x: r,
|
|
7
|
+
y: i
|
|
8
|
+
} : {
|
|
9
|
+
x: i,
|
|
10
|
+
y: r
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "../constants/orientation.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@4.0.0+d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
let { labelOffset: n, labelProps: r, orientation: i, range: a, tickLabelFontSize: o, tickLength: s } = t, c = i === e.left || i === e.top ? -1 : 1, l, u, d;
|
|
5
|
+
if (i === e.top || i === e.bottom) {
|
|
6
|
+
let t = i === e.bottom && typeof r.fontSize == "number" ? r.fontSize : 0;
|
|
7
|
+
l = (Number(a[0]) + Number(a[a.length - 1])) / 2, u = c * (s + n + o + t);
|
|
8
|
+
} else l = c * ((Number(a[0]) + Number(a[a.length - 1])) / 2), u = -(s + n), d = `rotate(${c * 90})`;
|
|
9
|
+
return {
|
|
10
|
+
x: l,
|
|
11
|
+
y: u,
|
|
12
|
+
transform: d
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as default };
|