@pie-lib/charting 8.0.11-next.20261201094125 → 8.0.11-next.20261203074052
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 +6 -6
- package/dist/actions-button.js +42 -42
- package/dist/axes.js +166 -166
- package/dist/bars/bar.js +12 -12
- package/dist/bars/common/bars.js +59 -59
- package/dist/bars/histogram.js +12 -12
- package/dist/chart-setup.js +62 -62
- package/dist/chart-type.js +38 -38
- package/dist/chart.js +110 -110
- package/dist/common/correctness-indicators.js +22 -22
- package/dist/common/drag-handle.js +33 -33
- package/dist/common/drag-icon.js +11 -11
- package/dist/common/mark-slider.js +14 -14
- package/dist/grid.js +17 -17
- package/dist/i18n/index.js +4 -4
- package/dist/key-legend.js +28 -28
- package/dist/line/common/drag-handle.js +34 -34
- package/dist/line/common/line.js +56 -56
- package/dist/line/line-cross.js +61 -61
- package/dist/line/line-dot.js +48 -48
- package/dist/mark-label.js +45 -45
- package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +11 -11
- package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-interpolate.js +1 -1
- package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-scale.js +1 -1
- package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js +1 -1
- package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-time.js +1 -1
- package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +12 -11
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +1 -1
- package/dist/plot/common/plot.js +116 -116
- package/dist/plot/dot.js +33 -33
- package/dist/plot/line.js +44 -44
- package/package.json +8 -8
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// \0rolldown/runtime.js
|
|
2
2
|
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {
|
|
3
|
-
let r = {};
|
|
3
|
+
let r = Object.setPrototypeOf({}, null);
|
|
4
4
|
for (var i in e) t(r, i, {
|
|
5
5
|
get: e[i],
|
|
6
6
|
enumerable: !0
|
|
7
7
|
});
|
|
8
|
-
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
8
|
+
return n & 1 || t(r, Symbol.toStringTag, { value: "Module" }), n & 2 ? r : Object.preventExtensions(r);
|
|
9
9
|
}, c = (e, i, o, s) => {
|
|
10
|
-
if (i && typeof i == "object" || typeof i == "function") for (
|
|
11
|
-
get: (
|
|
12
|
-
enumerable: !
|
|
13
|
-
});
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (let c of r(i)) !a.call(e, c) && c !== o && (s = n(i, c), t(e, c, {
|
|
11
|
+
get: s && s.get && !s.configurable ? s.get : () => i[c],
|
|
12
|
+
enumerable: !s || s.enumerable
|
|
13
|
+
}));
|
|
14
14
|
return e;
|
|
15
15
|
}, l = (e, t, n) => (c(e, t, "default"), n && c(n, t, "default")), u = (n, r, o) => (o = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
16
16
|
value: n,
|
package/dist/actions-button.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import a from "
|
|
5
|
-
import
|
|
1
|
+
import e, { useEffect as t, useRef as n } from "react";
|
|
2
|
+
import r from "prop-types";
|
|
3
|
+
import { styled as i } from "@mui/material/styles";
|
|
4
|
+
import a from "@mui/material/Menu";
|
|
5
|
+
import o from "@mui/material/MenuItem";
|
|
6
6
|
import { color as s, createUniqueId as c } from "@pie-lib/render-ui";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import m from "
|
|
7
|
+
import { renderMath as l } from "@pie-element/shared-math-rendering-mathjax";
|
|
8
|
+
import { getLabelMathFormat as u } from "./mark-label.js";
|
|
9
|
+
import { catalogs as d } from "./i18n/index.js";
|
|
10
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
11
|
// src/actions-button.tsx
|
|
12
|
-
var h =
|
|
12
|
+
var h = i("div")(() => ({ alignSelf: "flex-end" })), g = i("button")(({ theme: e }) => ({
|
|
13
13
|
display: "block",
|
|
14
14
|
margin: 0,
|
|
15
15
|
border: 0,
|
|
@@ -23,19 +23,19 @@ var h = o("div")(() => ({ alignSelf: "flex-end" })), g = o("button")(({ theme: e
|
|
|
23
23
|
outline: `2px solid ${s.focusOutline()}`,
|
|
24
24
|
outlineOffset: "-2px"
|
|
25
25
|
}
|
|
26
|
-
})), _ = o
|
|
26
|
+
})), _ = i(o)(({ theme: e }) => ({
|
|
27
27
|
fontSize: e.typography.fontSize,
|
|
28
28
|
color: s.defaults.TEXT
|
|
29
29
|
})), v = ({ math: e }) => {
|
|
30
|
-
let
|
|
31
|
-
return
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
}, [e]), /* @__PURE__ */
|
|
35
|
-
ref:
|
|
30
|
+
let r = n(null);
|
|
31
|
+
return t(() => {
|
|
32
|
+
let t = r.current;
|
|
33
|
+
t && (t.textContent = e, l(t));
|
|
34
|
+
}, [e]), /* @__PURE__ */ p("span", {
|
|
35
|
+
ref: r,
|
|
36
36
|
style: { pointerEvents: "none" }
|
|
37
37
|
});
|
|
38
|
-
}, y = class extends
|
|
38
|
+
}, y = class extends e.Component {
|
|
39
39
|
relabel = () => this.forceUpdate();
|
|
40
40
|
constructor(e) {
|
|
41
41
|
super(e), this.state = { actionsAnchorEl: null };
|
|
@@ -44,10 +44,10 @@ var h = o("div")(() => ({ alignSelf: "flex-end" })), g = o("button")(({ theme: e
|
|
|
44
44
|
this.setState({ actionsAnchorEl: null });
|
|
45
45
|
}
|
|
46
46
|
static propTypes = {
|
|
47
|
-
addCategory:
|
|
48
|
-
deleteCategory:
|
|
49
|
-
language:
|
|
50
|
-
categories:
|
|
47
|
+
addCategory: r.func.isRequired,
|
|
48
|
+
deleteCategory: r.func.isRequired,
|
|
49
|
+
language: r.string,
|
|
50
|
+
categories: r.array
|
|
51
51
|
};
|
|
52
52
|
triggerId = c("chart-actions");
|
|
53
53
|
menuId = c("chart-actions-menu");
|
|
@@ -66,22 +66,22 @@ var h = o("div")(() => ({ alignSelf: "flex-end" })), g = o("button")(({ theme: e
|
|
|
66
66
|
t(e), this.handleActionsClose();
|
|
67
67
|
};
|
|
68
68
|
render() {
|
|
69
|
-
let { categories:
|
|
69
|
+
let { categories: e, language: t } = this.props, { actionsAnchorEl: n } = this.state, r = !!n, i = d.forLocale(t, this.relabel), o = (e || []).map((e, t) => ({
|
|
70
70
|
category: e,
|
|
71
71
|
index: t
|
|
72
72
|
})).filter(({ category: e }) => e.deletable && !e.correctness);
|
|
73
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(g, {
|
|
74
74
|
type: "button",
|
|
75
75
|
id: this.triggerId,
|
|
76
76
|
"aria-haspopup": "menu",
|
|
77
|
-
"aria-expanded":
|
|
78
|
-
"aria-controls":
|
|
77
|
+
"aria-expanded": r,
|
|
78
|
+
"aria-controls": r ? this.menuId : void 0,
|
|
79
79
|
onClick: this.handleActionsClick,
|
|
80
|
-
children:
|
|
81
|
-
}), /* @__PURE__ */
|
|
80
|
+
children: i.t("actions")
|
|
81
|
+
}), /* @__PURE__ */ m(a, {
|
|
82
82
|
id: this.menuId,
|
|
83
|
-
open:
|
|
84
|
-
anchorEl:
|
|
83
|
+
open: r,
|
|
84
|
+
anchorEl: n,
|
|
85
85
|
onClose: this.handleActionsClose,
|
|
86
86
|
variant: "menu",
|
|
87
87
|
anchorOrigin: {
|
|
@@ -93,20 +93,20 @@ var h = o("div")(() => ({ alignSelf: "flex-end" })), g = o("button")(({ theme: e
|
|
|
93
93
|
horizontal: "left"
|
|
94
94
|
},
|
|
95
95
|
slotProps: { list: { "aria-labelledby": this.triggerId } },
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ m(_, {
|
|
97
97
|
onClick: () => this.handleAddCategory(),
|
|
98
|
-
children: ["+ ",
|
|
99
|
-
}),
|
|
100
|
-
let
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
"aria-label":
|
|
103
|
-
onClick: () => this.handleDeleteCategory(
|
|
104
|
-
children:
|
|
105
|
-
`${
|
|
106
|
-
/* @__PURE__ */
|
|
98
|
+
children: ["+ ", i.t("add")]
|
|
99
|
+
}), o.map(({ category: e, index: t }) => {
|
|
100
|
+
let n = i.t("delete"), r = u(e.label), a = e.label || i.t("newLabel");
|
|
101
|
+
return /* @__PURE__ */ p(_, {
|
|
102
|
+
"aria-label": r ? `${n} <${e.label.trim()}>` : void 0,
|
|
103
|
+
onClick: () => this.handleDeleteCategory(t),
|
|
104
|
+
children: r ? /* @__PURE__ */ m(f, { children: [
|
|
105
|
+
`${n} <`,
|
|
106
|
+
/* @__PURE__ */ p(v, { math: r }),
|
|
107
107
|
">"
|
|
108
|
-
] }) : `${
|
|
109
|
-
},
|
|
108
|
+
] }) : `${n} <${a}>`
|
|
109
|
+
}, t);
|
|
110
110
|
})]
|
|
111
111
|
})] });
|
|
112
112
|
}
|