@pie-lib/plot 5.0.1-next.20261004165705 → 5.0.1-next.20261004181842

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.
@@ -0,0 +1 @@
1
+ export {};
package/dist/label.js CHANGED
@@ -3,17 +3,17 @@ import { useState as n } from "react";
3
3
  import { styled as r } from "@mui/material/styles";
4
4
  import i from "prop-types";
5
5
  import * as a from "@pie-lib/render-ui";
6
- import { Readable as o } from "@pie-lib/render-ui";
7
- import { jsx as s } from "react/jsx-runtime";
8
- import c from "@pie-lib/editable-html-tip-tap";
6
+ import { Readable as o, color as s } from "@pie-lib/render-ui";
7
+ import { jsx as c } from "react/jsx-runtime";
8
+ import l from "@pie-lib/editable-html-tip-tap";
9
9
  //#region src/label.tsx
10
- function l(e) {
10
+ function u(e) {
11
11
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
12
12
  }
13
- function u(e, t) {
14
- return !e || l(e) ? e : l(e.default) ? e.default : t && l(e[t]) ? e[t] : t && l(e[t]?.default) ? e[t].default : e;
13
+ function d(e, t) {
14
+ return !e || u(e) ? e : u(e.default) ? e.default : t && u(e[t]) ? e[t] : t && u(e[t]?.default) ? e[t].default : e;
15
15
  }
16
- var d = u(o, "Readable") || u(m.Readable, "Readable"), f = a, p = f.default, m = p && typeof p == "object" ? p : f, h = {
16
+ var f = d(o, "Readable") || d(h.Readable, "Readable"), p = a, m = p.default, h = m && typeof m == "object" ? m : p, g = {
17
17
  axisLabel: {
18
18
  fontSize: 12,
19
19
  textAlign: "center",
@@ -32,7 +32,7 @@ var d = u(o, "Readable") || u(m.Readable, "Readable"), f = a, p = f.default, m =
32
32
  },
33
33
  editLabel: {
34
34
  position: "absolute",
35
- backgroundColor: "white",
35
+ backgroundColor: s.v("pie")("background", "white"),
36
36
  borderRadius: 4,
37
37
  boxShadow: "0px 5px 8px rgba(0,0,0,0.15)",
38
38
  zIndex: 10
@@ -55,20 +55,20 @@ var d = u(o, "Readable") || u(m.Readable, "Readable"), f = a, p = f.default, m =
55
55
  width: "100%",
56
56
  textAlign: "center"
57
57
  } }
58
- }, g = r("div")({ ...h.centerPlaceholder }), _ = r("div")({
59
- ...h.disabledLabel,
58
+ }, _ = r("div")({ ...g.centerPlaceholder }), v = r("div")({
59
+ ...g.disabledLabel,
60
60
  "& p": { margin: 0 }
61
- }), v = (r) => {
62
- let { disabledLabel: i, graphHeight: a, graphWidth: o, isChartBottomLabel: l, isDefineChartBottomLabel: u, isChartLeftLabel: f, isDefineChartLeftLabel: p, placeholder: m, text: v, side: y, onChange: b, mathMlOptions: x = {}, charactersLimit: S, titleHeight: C, preventNewLines: w } = r, [T, E] = n(!1), D = [
61
+ }), y = (r) => {
62
+ let { disabledLabel: i, graphHeight: a, graphWidth: o, isChartBottomLabel: s, isDefineChartBottomLabel: u, isChartLeftLabel: d, isDefineChartLeftLabel: p, placeholder: m, text: h, side: y, onChange: b, mathMlOptions: x = {}, charactersLimit: S, titleHeight: C, preventNewLines: w } = r, [T, E] = n(!1), D = [
63
63
  "bold",
64
64
  "italic",
65
65
  "underline",
66
66
  "strikethrough",
67
67
  "math"
68
- ], O = l || f || u || p, k = y === "left" && p && a - 220, A = {
68
+ ], O = s || d || u || p, k = y === "left" && p && a - 220, A = {
69
69
  width: k || (y === "left" || y === "right" ? a - 8 : o - 8),
70
- top: k || f && `${a - 70}px` || y === "left" && `${a - 8}px` || l && `${a - 60 + C}px` || y === "bottom" && `${a - 120 + C}px` || 0,
71
- left: y === "right" && `${o - 8}px` || (p || u) && "40px" || l && "-10px" || 0
70
+ top: k || d && `${a - 70}px` || y === "left" && `${a - 8}px` || s && `${a - 60 + C}px` || y === "bottom" && `${a - 120 + C}px` || 0,
71
+ left: y === "right" && `${o - 8}px` || (p || u) && "40px" || s && "-10px" || 0
72
72
  }, j = {
73
73
  width: o - 8,
74
74
  top: y === "right" ? `${a - 22}px` : 0,
@@ -80,21 +80,21 @@ var d = u(o, "Readable") || u(m.Readable, "Readable"), f = a, p = f.default, m =
80
80
  document.activeElement?.blur?.();
81
81
  });
82
82
  }, P = (e) => !!(w && e.key === "Enter");
83
- return /* @__PURE__ */ s(d, {
83
+ return /* @__PURE__ */ c(f, {
84
84
  false: !0,
85
- children: /* @__PURE__ */ s(g, {
85
+ children: /* @__PURE__ */ c(_, {
86
86
  onClick: M,
87
87
  style: {
88
88
  ...T ? j : A,
89
- ...O ? h.chartLabel : h.axisLabel,
90
- ...y === "left" && !T ? h.rotateLeftLabel : {},
91
- ...y === "right" && !T ? h.rotateRightLabel : {},
92
- ...T ? h.editLabel : {},
93
- ...l || u ? h.customBottom : {},
94
- ...i && !O && t(e(v)) && h.displayNone
89
+ ...O ? g.chartLabel : g.axisLabel,
90
+ ...y === "left" && !T ? g.rotateLeftLabel : {},
91
+ ...y === "right" && !T ? g.rotateRightLabel : {},
92
+ ...T ? g.editLabel : {},
93
+ ...s || u ? g.customBottom : {},
94
+ ...i && !O && t(e(h)) && g.displayNone
95
95
  },
96
- children: i ? /* @__PURE__ */ s(_, { dangerouslySetInnerHTML: { __html: v || "" } }) : /* @__PURE__ */ s(c, {
97
- markup: v || "",
96
+ children: i ? /* @__PURE__ */ c(v, { dangerouslySetInnerHTML: { __html: h || "" } }) : /* @__PURE__ */ c(l, {
97
+ markup: h || "",
98
98
  onChange: b,
99
99
  placeholder: !i && m,
100
100
  toolbarOpts: {
@@ -112,7 +112,7 @@ var d = u(o, "Readable") || u(m.Readable, "Readable"), f = a, p = f.default, m =
112
112
  })
113
113
  });
114
114
  };
115
- v.propTypes = {
115
+ y.propTypes = {
116
116
  disabledLabel: i.bool,
117
117
  graphHeight: i.number,
118
118
  graphWidth: i.number,
@@ -129,4 +129,4 @@ v.propTypes = {
129
129
  titleHeight: i.number
130
130
  };
131
131
  //#endregion
132
- export { v as default };
132
+ export { y as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/plot",
3
- "version": "5.0.1-next.20261004165705",
3
+ "version": "5.0.1-next.20261004181842",
4
4
  "description": "Some underlying components for building charts/graphs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "@mapbox/point-geometry": "^1.1.0",
14
14
  "@mui/icons-material": "^7.3.4",
15
15
  "@mui/material": "^7.3.4",
16
- "@pie-lib/editable-html-tip-tap": "3.0.1-next.20261004165705",
16
+ "@pie-lib/editable-html-tip-tap": "3.0.1-next.20261004181842",
17
17
  "@pie-lib/render-ui": "8.0.1-next.20261004165705",
18
18
  "assert": "^1.4.1",
19
19
  "d3-scale": "^4.0.2",