@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
package/dist/labels.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import t from "prop-types";
|
|
3
3
|
import { types as n } from "@pie-lib/plot";
|
|
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 * as o from "@pie-lib/render-ui";
|
|
7
7
|
import { Readable as s } from "@pie-lib/render-ui";
|
|
8
8
|
import c from "@pie-lib/editable-html-tip-tap";
|
|
@@ -31,7 +31,7 @@ var d = u(s, "Readable") || u(m.Readable, "Readable"), f = o, p = f.default, m =
|
|
|
31
31
|
case "right": return -t - 10;
|
|
32
32
|
default: return -t + 10;
|
|
33
33
|
}
|
|
34
|
-
}, v =
|
|
34
|
+
}, v = a(c, { shouldForwardProp: (e) => !["side", "disabledLabel"].includes(e) })(({ theme: e, side: t, disabledLabel: n }) => ({
|
|
35
35
|
fontSize: e.typography.fontSize - 2,
|
|
36
36
|
textAlign: "center",
|
|
37
37
|
padding: "0 4px",
|
|
@@ -49,24 +49,24 @@ var d = u(s, "Readable") || u(m.Readable, "Readable"), f = o, p = f.default, m =
|
|
|
49
49
|
};
|
|
50
50
|
static defaultProps = { onChange: () => {} };
|
|
51
51
|
render() {
|
|
52
|
-
let { disabledLabel: e, placeholder: t, text: n, side:
|
|
53
|
-
return /* @__PURE__ */
|
|
52
|
+
let { disabledLabel: e, placeholder: t, text: n, side: i, graphProps: a, onChange: o, mathMlOptions: s = {} } = this.props, { size: c, domain: l, range: u } = a, f = (c.height || 500) + (u.padding || 0) * 2, p = (c.width || 500) + (l.padding || 0) * 2, m = g(i, p, f), h = i === "left" || i === "right" ? f : p, y = _(i, 36), b = i === "bottom" ? 58 : 54;
|
|
53
|
+
return /* @__PURE__ */ r("foreignObject", {
|
|
54
54
|
x: -(h / 2),
|
|
55
55
|
y,
|
|
56
56
|
width: h,
|
|
57
57
|
height: b,
|
|
58
58
|
transform: m,
|
|
59
59
|
textAnchor: "middle",
|
|
60
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ r(d, {
|
|
61
61
|
false: !0,
|
|
62
|
-
children: /* @__PURE__ */
|
|
63
|
-
side:
|
|
62
|
+
children: /* @__PURE__ */ r(v, {
|
|
63
|
+
side: i,
|
|
64
64
|
disabledLabel: e,
|
|
65
65
|
markup: n || "",
|
|
66
66
|
onChange: o,
|
|
67
67
|
placeholder: !e && t,
|
|
68
68
|
toolbarOpts: {
|
|
69
|
-
position:
|
|
69
|
+
position: i === "bottom" ? "top" : "bottom",
|
|
70
70
|
noPadding: !0,
|
|
71
71
|
noBorder: !0
|
|
72
72
|
},
|
|
@@ -107,38 +107,38 @@ var d = u(s, "Readable") || u(m.Readable, "Readable"), f = o, p = f.default, m =
|
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
109
|
render() {
|
|
110
|
-
let { disabledLabels: t, placeholders: n = {}, value:
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
110
|
+
let { disabledLabels: t, placeholders: n = {}, value: a = {}, graphProps: o, mathMlOptions: s = {} } = this.props;
|
|
111
|
+
return /* @__PURE__ */ i(e.Fragment, { children: [
|
|
112
|
+
/* @__PURE__ */ r(y, {
|
|
113
113
|
side: "left",
|
|
114
|
-
text:
|
|
114
|
+
text: a.left,
|
|
115
115
|
disabledLabel: t,
|
|
116
116
|
placeholder: n.left,
|
|
117
117
|
graphProps: o,
|
|
118
118
|
onChange: (e) => this.onChangeLabel(e, "left"),
|
|
119
119
|
mathMlOptions: s
|
|
120
120
|
}, "left"),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ r(y, {
|
|
122
122
|
side: "top",
|
|
123
|
-
text:
|
|
123
|
+
text: a.top,
|
|
124
124
|
disabledLabel: t,
|
|
125
125
|
placeholder: n.top,
|
|
126
126
|
graphProps: o,
|
|
127
127
|
onChange: (e) => this.onChangeLabel(e, "top"),
|
|
128
128
|
mathMlOptions: s
|
|
129
129
|
}, "top"),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ r(y, {
|
|
131
131
|
side: "bottom",
|
|
132
|
-
text:
|
|
132
|
+
text: a.bottom,
|
|
133
133
|
disabledLabel: t,
|
|
134
134
|
placeholder: n.bottom,
|
|
135
135
|
graphProps: o,
|
|
136
136
|
onChange: (e) => this.onChangeLabel(e, "bottom"),
|
|
137
137
|
mathMlOptions: s
|
|
138
138
|
}, "bottom"),
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ r(y, {
|
|
140
140
|
side: "right",
|
|
141
|
-
text:
|
|
141
|
+
text: a.right,
|
|
142
142
|
disabledLabel: t,
|
|
143
143
|
placeholder: n.right,
|
|
144
144
|
graphProps: o,
|
package/dist/mark-label.js
CHANGED
|
@@ -4,8 +4,8 @@ import n from "./label-svg-icon.js";
|
|
|
4
4
|
import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
5
5
|
import s from "prop-types";
|
|
6
6
|
import { types as c } from "@pie-lib/plot";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Fragment as ee, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { styled as d, useTheme as te } from "@mui/material/styles";
|
|
9
9
|
import { color as f } from "@pie-lib/render-ui";
|
|
10
10
|
//#region src/mark-label.tsx
|
|
11
11
|
var ne = 500, p = 500, m = [
|
|
@@ -16,7 +16,7 @@ var ne = 500, p = 500, m = [
|
|
|
16
16
|
400,
|
|
17
17
|
700,
|
|
18
18
|
1e3
|
|
19
|
-
], h = 3, g = 30, _ =
|
|
19
|
+
], h = 3, g = 30, _ = d("div")(({ theme: e }) => ({
|
|
20
20
|
float: "right",
|
|
21
21
|
padding: e.spacing(.5),
|
|
22
22
|
borderRadius: "4px",
|
|
@@ -24,7 +24,7 @@ var ne = 500, p = 500, m = [
|
|
|
24
24
|
backgroundColor: f.defaults.WHITE,
|
|
25
25
|
color: f.defaults.CORRECT_WITH_ICON,
|
|
26
26
|
border: `solid 1px ${f.defaults.CORRECT_WITH_ICON}`
|
|
27
|
-
})), v =
|
|
27
|
+
})), v = d("div")(({ theme: e }) => ({
|
|
28
28
|
float: "right",
|
|
29
29
|
padding: e.spacing(.5),
|
|
30
30
|
borderRadius: "4px",
|
|
@@ -32,7 +32,7 @@ var ne = 500, p = 500, m = [
|
|
|
32
32
|
backgroundColor: f.defaults.WHITE,
|
|
33
33
|
color: f.defaults.INCORRECT_WITH_ICON,
|
|
34
34
|
border: `solid 1px ${f.defaults.INCORRECT_WITH_ICON}`
|
|
35
|
-
})), y =
|
|
35
|
+
})), y = d("div")(({ theme: e }) => ({
|
|
36
36
|
float: "right",
|
|
37
37
|
padding: e.spacing(.5),
|
|
38
38
|
borderRadius: "4px",
|
|
@@ -41,7 +41,7 @@ var ne = 500, p = 500, m = [
|
|
|
41
41
|
color: f.defaults.MISSING_WITH_ICON,
|
|
42
42
|
border: `solid 1px ${f.defaults.MISSING_WITH_ICON}`,
|
|
43
43
|
fontWeight: "bold"
|
|
44
|
-
})), b =
|
|
44
|
+
})), b = d("div")(() => ({
|
|
45
45
|
float: "right",
|
|
46
46
|
padding: 0,
|
|
47
47
|
borderRadius: "4px",
|
|
@@ -101,7 +101,7 @@ var ne = 500, p = 500, m = [
|
|
|
101
101
|
if (!t || !t.rangeCount || !t.anchorNode) return !1;
|
|
102
102
|
let n = t.anchorNode;
|
|
103
103
|
return n === e || n === e.parentNode || e.contains(n);
|
|
104
|
-
}, T = ({ _ref: t, externalInputRef: n, label: r, disabled: i, inputStyle: a, minWidth: o, onChange: s, onBlur: c }) => /* @__PURE__ */
|
|
104
|
+
}, T = ({ _ref: t, externalInputRef: n, label: r, disabled: i, inputStyle: a, minWidth: o, onChange: s, onBlur: c }) => /* @__PURE__ */ l(e, {
|
|
105
105
|
inputRef: (e) => {
|
|
106
106
|
t(e), n(e);
|
|
107
107
|
},
|
|
@@ -123,9 +123,9 @@ T.propTypes = {
|
|
|
123
123
|
onBlur: s.func
|
|
124
124
|
};
|
|
125
125
|
var E = (e) => {
|
|
126
|
-
let s = a(null), [c,
|
|
127
|
-
s.current = e,
|
|
128
|
-
}, []), E =
|
|
126
|
+
let s = a(null), [c, d] = o(null), f = r((e) => {
|
|
127
|
+
s.current = e, d(e);
|
|
128
|
+
}, []), E = te(), { mark: D, graphProps: O, disabled: k, autoFocus: A, inputRef: j } = e, [M, N] = o(D.label), { correctness: P, correctnesslabel: F, correctlabel: I } = D, L = () => !!s.current && typeof document < "u" && document.activeElement === s.current, R = a(D.label === "" && !k && !D.disabled), z = a(0), B = a(D.label), V = () => Date.now() < z.current && !(s.current && s.current.value), H = a(!1), U = a(!1), W = a(0), ie = (e) => N(e.target.value), G = (t) => {
|
|
129
129
|
t !== B.current && (B.current = t, e.onChange(t));
|
|
130
130
|
}, ae = r(() => {
|
|
131
131
|
V() || H.current || U.current || (R.current = !1, M === "" ? e.onChange("") : M !== D.label && G(M), e.onBlur && e.onBlur());
|
|
@@ -176,7 +176,7 @@ var E = (e) => {
|
|
|
176
176
|
}, oe = {
|
|
177
177
|
...X,
|
|
178
178
|
top: Y.top + 25
|
|
179
|
-
}, Z = k || D.disabled, Q = (e, t) => /* @__PURE__ */
|
|
179
|
+
}, Z = k || D.disabled, Q = (e, t) => /* @__PURE__ */ l(T, {
|
|
180
180
|
_ref: f,
|
|
181
181
|
externalInputRef: j,
|
|
182
182
|
label: t,
|
|
@@ -186,25 +186,25 @@ var E = (e) => {
|
|
|
186
186
|
onChange: ie,
|
|
187
187
|
onBlur: ae
|
|
188
188
|
}), $ = re();
|
|
189
|
-
return P === "correct" && F === "correct" && I ? /* @__PURE__ */
|
|
189
|
+
return P === "correct" && F === "correct" && I ? /* @__PURE__ */ u(_, {
|
|
190
190
|
style: X,
|
|
191
|
-
children: [/* @__PURE__ */
|
|
192
|
-
}) : P === "correct" && F === "correct" && !I ? null : P === "correct" && F === "incorrect" ? /* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ l(n, { type: "correct" }), Q($, I)]
|
|
192
|
+
}) : P === "correct" && F === "correct" && !I ? null : P === "correct" && F === "incorrect" ? /* @__PURE__ */ u(ee, { children: [/* @__PURE__ */ u(v, {
|
|
193
193
|
style: X,
|
|
194
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ l(n, { type: "incorrect" }), M === "" ? /* @__PURE__ */ l(n, {
|
|
195
195
|
type: "empty",
|
|
196
196
|
style: { marginLeft: "3px" }
|
|
197
197
|
}) : Q($, M)]
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ l(y, {
|
|
199
199
|
style: oe,
|
|
200
200
|
children: Q($, I)
|
|
201
|
-
})] }) : P === "missing" ? /* @__PURE__ */
|
|
201
|
+
})] }) : P === "missing" ? /* @__PURE__ */ l(y, {
|
|
202
202
|
style: X,
|
|
203
203
|
children: Q($, M)
|
|
204
|
-
}) : P === "incorrect" ? /* @__PURE__ */
|
|
204
|
+
}) : P === "incorrect" ? /* @__PURE__ */ l(b, {
|
|
205
205
|
style: X,
|
|
206
206
|
children: Q($, M)
|
|
207
|
-
}) : Z && !M ? null : /* @__PURE__ */
|
|
207
|
+
}) : Z && !M ? null : /* @__PURE__ */ l("div", {
|
|
208
208
|
style: X,
|
|
209
209
|
children: Q(x(E, k, D.disabled), M)
|
|
210
210
|
});
|
|
@@ -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 };
|
|
@@ -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,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 };
|