@pie-lib/plot 5.0.8-next.20261109125924 → 5.0.8-next.20261110063142

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.
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
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
3
  let r = {};
4
4
  for (var i in e) t(r, i, {
@@ -16,5 +16,4 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
16
16
  value: n,
17
17
  enumerable: !0
18
18
  }) : o, n));
19
- //#endregion
20
19
  export { o as __commonJSMin, s as __exportAll, l as __toESM };
package/dist/draggable.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { DraggableCore as e } from "./node_modules/.bun/react-draggable@4.7.2_6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/chunk-ACOTSM7X.js";
2
2
  import t from "./node_modules/.bun/react-draggable@4.7.2_6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/cjs.js";
3
- //#region src/draggable.tsx
3
+ // src/draggable.tsx
4
4
  var n = t;
5
- //#endregion
6
5
  export { e as DraggableCore, n as default };
@@ -2,7 +2,7 @@ import { __toESM as e } from "./_virtual/_rolldown/runtime.js";
2
2
  import { require_browser as t } from "./node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js";
3
3
  import { snapTo as n } from "./utils.js";
4
4
  import { scaleLinear as r } from "d3-scale";
5
- //#region src/graph-props.ts
5
+ // src/graph-props.ts
6
6
  var i = /* @__PURE__ */ e(t(), 1), a = ({ min: e, max: t, step: n }) => ({
7
7
  step: n,
8
8
  min: parseInt(e / n) * n,
@@ -25,5 +25,4 @@ var i = /* @__PURE__ */ e(t(), 1), a = ({ min: e, max: t, step: n }) => ({
25
25
  getRootNode: s
26
26
  };
27
27
  };
28
- //#endregion
29
28
  export { o as create };
@@ -1,23 +1,23 @@
1
1
  import { __toESM as e } from "./_virtual/_rolldown/runtime.js";
2
2
  import { GraphPropsType as t } from "./types.js";
3
- import { require_browser as n } from "./node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js";
3
+ import { DraggableCore as n } from "./node_modules/.bun/react-draggable@4.7.2_6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/chunk-ACOTSM7X.js";
4
4
  import { getDelta as r } from "./utils.js";
5
- import { DraggableCore as i } from "./node_modules/.bun/react-draggable@4.7.2_6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/chunk-ACOTSM7X.js";
5
+ import { require_browser as i } from "./node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js";
6
6
  import a from "react";
7
7
  import o from "prop-types";
8
8
  import { pointer as s } from "d3-selection";
9
9
  import { jsx as c } from "react/jsx-runtime";
10
10
  import { isFunction as l } from "@pie-element/shared-lodash";
11
11
  import u from "debug";
12
- //#region src/grid-draggable.tsx
13
- var d = /* @__PURE__ */ e(n(), 1), f = u("pie-lib:plot:grid-draggable"), p = (e, t, n) => (r) => {
12
+ // src/grid-draggable.tsx
13
+ var d = /* @__PURE__ */ e(i(), 1), f = u("pie-lib:plot:grid-draggable"), p = (e, t, n) => (r) => {
14
14
  let i = r + e(0);
15
15
  return t(n + e.invert(i)).toFixed(4) * 1e3 / 1e3;
16
- }, m = a.createContext(!1), h = (e) => (n) => {
16
+ }, m = a.createContext(!1), h = (e) => (i) => {
17
17
  (0, d.default)(!!e && l(e.fromDelta) && l(e.bounds) && l(e.anchorPoint), "You must supply an object with: { anchorPoint: Function, fromDelta: Function, bounds: Function }");
18
18
  let u = ({ dragNodeRef: e, ...t }) => /* @__PURE__ */ c("g", {
19
19
  ref: e,
20
- children: /* @__PURE__ */ c(n, { ...t })
20
+ children: /* @__PURE__ */ c(i, { ...t })
21
21
  });
22
22
  return class extends a.Component {
23
23
  static contextType = m;
@@ -129,8 +129,8 @@ var d = /* @__PURE__ */ e(n(), 1), f = u("pie-lib:plot:grid-draggable"), p = (e,
129
129
  } else this.setState({ dragging: !1 });
130
130
  };
131
131
  render() {
132
- let { disabled: t, onClick: n, ...r } = this.props, a = this.grid(), o = (e) => (e.nativeEvent || e).preventDefault(), s = !!this.state?.dragging;
133
- return /* @__PURE__ */ c(i, {
132
+ let { disabled: t, onClick: r, ...i } = this.props, a = this.grid(), o = (e) => (e.nativeEvent || e).preventDefault(), s = !!this.state?.dragging;
133
+ return /* @__PURE__ */ c(n, {
134
134
  nodeRef: this.nodeRef,
135
135
  onMouseDown: o,
136
136
  onStart: this.onStart,
@@ -140,14 +140,13 @@ var d = /* @__PURE__ */ e(n(), 1), f = u("pie-lib:plot:grid-draggable"), p = (e,
140
140
  grid: [a.x, a.y],
141
141
  children: /* @__PURE__ */ c(u, {
142
142
  dragNodeRef: this.nodeRef,
143
- ...r,
143
+ ...i,
144
144
  disabled: t,
145
145
  isDragging: s,
146
- onClick: s ? void 0 : n
146
+ onClick: s ? void 0 : r
147
147
  })
148
148
  });
149
149
  }
150
150
  };
151
151
  };
152
- //#endregion
153
152
  export { m as DragLockContext, p as deltaFn, h as gridDraggable };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { types_exports as e } from "./types.js";
2
- import { utils_exports as t } from "./utils.js";
3
- import { Root as n } from "./root.js";
4
- import r from "./draggable.js";
5
- import { DragLockContext as i, gridDraggable as a } from "./grid-draggable.js";
6
- import { trig_exports as o } from "./trig.js";
1
+ import { Root as e } from "./root.js";
2
+ import t from "./draggable.js";
3
+ import { DragLockContext as n, gridDraggable as r } from "./grid-draggable.js";
4
+ import { utils_exports as i } from "./utils.js";
5
+ import { trig_exports as a } from "./trig.js";
6
+ import { types_exports as o } from "./types.js";
7
7
  import { create as s } from "./graph-props.js";
8
8
  import { keyboard_exports as c } from "./keyboard.js";
9
- export { i as DragLockContext, r as Draggable, n as Root, s as createGraphProps, a as gridDraggable, c as keyboard, o as trig, e as types, t as utils };
9
+ export { n as DragLockContext, t as Draggable, e as Root, s as createGraphProps, r as gridDraggable, c as keyboard, a as trig, o as types, i as utils };
package/dist/keyboard.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __exportAll as e } from "./_virtual/_rolldown/runtime.js";
2
- //#region src/keyboard.ts
2
+ // src/keyboard.ts
3
3
  var t = /* @__PURE__ */ e({
4
4
  fitToRange: () => a,
5
5
  sliderKeyValue: () => c
@@ -28,5 +28,4 @@ var t = /* @__PURE__ */ e({
28
28
  default: return;
29
29
  }
30
30
  };
31
- //#endregion
32
31
  export { a as fitToRange, t as keyboard_exports, c as sliderKeyValue };
package/dist/label.js CHANGED
@@ -7,7 +7,7 @@ import { Readable as o, color as s } from "@pie-lib/render-ui";
7
7
  import { jsx as c } from "react/jsx-runtime";
8
8
  import l from "@pie-lib/editable-html-tip-tap";
9
9
  import { sanitizeModelHtml as u } from "@pie-element/shared-utils";
10
- //#region src/label.tsx
10
+ // src/label.tsx
11
11
  function d(e) {
12
12
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
13
13
  }
@@ -75,7 +75,7 @@ var p = a, m = p.default, h = m && typeof m == "object" ? m : p, g = f(o, "Reada
75
75
  top: b === "right" ? `${a - 22}px` : 0,
76
76
  left: 0
77
77
  }, N = () => {
78
- !i && (b === "left" || b === "right") && D(!0);
78
+ i || b !== "left" && b !== "right" || D(!0);
79
79
  }, P = () => {
80
80
  D(!1), requestAnimationFrame(() => {
81
81
  document.activeElement?.blur?.();
@@ -129,5 +129,4 @@ b.propTypes = {
129
129
  charactersLimit: i.number,
130
130
  titleHeight: i.number
131
131
  };
132
- //#endregion
133
132
  export { b as default };
@@ -1,4 +1,4 @@
1
- //#region ../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
1
+ // ../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
2
2
  function e(t) {
3
3
  var n, r, i = "";
4
4
  if (typeof t == "string" || typeof t == "number") i += t;
@@ -14,5 +14,4 @@ function t() {
14
14
  for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
15
15
  return i;
16
16
  }
17
- //#endregion
18
17
  export { t as clsx, t as default };
@@ -1,5 +1,5 @@
1
1
  import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../../node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js
2
+ // ../../../node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js
3
3
  var t = /* @__PURE__ */ e(((e, t) => {
4
4
  t.exports = function(e, t, n, r, i, a, o, s) {
5
5
  if (process.env.NODE_ENV !== "production" && t === void 0) throw Error("invariant requires an error message argument");
@@ -23,6 +23,5 @@ var t = /* @__PURE__ */ e(((e, t) => {
23
23
  }
24
24
  };
25
25
  }));
26
- //#endregion
27
26
  export default t();
28
27
  export { t as require_browser };
@@ -2,7 +2,7 @@ import { clsx as e } from "../../../../../clsx@2.1.1/node_modules/clsx/dist/clsx
2
2
  import * as t from "react";
3
3
  import n from "prop-types";
4
4
  import r from "react-dom";
5
- //#region ../../../node_modules/.bun/react-draggable@4.7.2+6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/chunk-ACOTSM7X.mjs
5
+ // ../../../node_modules/.bun/react-draggable@4.7.2+6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/chunk-ACOTSM7X.mjs
6
6
  function i(e, t) {
7
7
  for (let n = 0, r = e.length; n < r; n++) if (t.apply(t, [
8
8
  e[n],
@@ -502,5 +502,4 @@ J.displayName = "Draggable", J.propTypes = {
502
502
  },
503
503
  scale: 1
504
504
  };
505
- //#endregion
506
505
  export { J as Draggable, q as DraggableCore };
@@ -1,5 +1,4 @@
1
1
  import { Draggable as e, DraggableCore as t } from "./chunk-ACOTSM7X.js";
2
- //#region ../../../node_modules/.bun/react-draggable@4.7.2+6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/cjs.mjs
2
+ // ../../../node_modules/.bun/react-draggable@4.7.2+6dbf9a050bc9aadb/node_modules/react-draggable/build/cjs/cjs.mjs
3
3
  var n = e;
4
- //#endregion
5
4
  export { t as DraggableCore, n as default };
package/dist/root.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ChildrenType as e, GraphPropsType as t } from "./types.js";
2
- import { extractTextFromHTML as n, isEmptyObject as r, isEmptyString as i } from "./utils.js";
3
- import a from "./label.js";
2
+ import n from "./label.js";
3
+ import { extractTextFromHTML as r, isEmptyObject as i, isEmptyString as a } from "./utils.js";
4
4
  import o from "react";
5
5
  import { styled as s } from "@mui/material/styles";
6
6
  import c from "prop-types";
@@ -10,7 +10,7 @@ import { Readable as f, color as p } from "@pie-lib/render-ui";
10
10
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
11
11
  import g from "@pie-lib/editable-html-tip-tap";
12
12
  import { sanitizeModelHtml as _ } from "@pie-element/shared-utils";
13
- //#region src/root.tsx
13
+ // src/root.tsx
14
14
  function v(e) {
15
15
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
16
16
  }
@@ -167,7 +167,7 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
167
167
  this.resizeObserver &&= (this.resizeObserver.disconnect(), null);
168
168
  };
169
169
  render() {
170
- let { disabledTitle: e, disabledLabels: t, labels: o, labelsPlaceholders: s, titlePlaceholder: c, graphProps: l, children: u, defineChart: d, onChangeTitle: f, isChart: p, showLabels: v, showPixelGuides: y, showTitle: b, title: x, rootRef: S, mathMlOptions: w = {}, labelsCharactersLimit: I, ariaLabel: L, ariaDescription: R, leftAxisOverhang: z = 0 } = this.props, { size: { width: B = 500, height: V = 500 }, domain: H, range: U } = l, W = (i(n(o?.left)) && r(s) ? 48 : 70) + z, G = i(n(o?.right)) && r(s) ? 48 : 70, K = B + W + G + (H.padding || 0) * 2, q = V + 80 + (U.padding || 0) * 2, J = [
170
+ let { disabledTitle: e, disabledLabels: t, labels: o, labelsPlaceholders: s, titlePlaceholder: c, graphProps: l, children: u, defineChart: d, onChangeTitle: f, isChart: p, showLabels: v, showPixelGuides: y, showTitle: b, title: x, rootRef: S, mathMlOptions: w = {}, labelsCharactersLimit: I, ariaLabel: L, ariaDescription: R, leftAxisOverhang: z = 0 } = this.props, { size: { width: B = 500, height: V = 500 }, domain: H, range: U } = l, W = (a(r(o?.left)) && i(s) ? 48 : 70) + z, G = a(r(o?.right)) && i(s) ? 48 : 70, K = B + W + G + (H.padding || 0) * 2, q = V + 80 + (U.padding || 0) * 2, J = [
171
171
  "bold",
172
172
  "italic",
173
173
  "underline",
@@ -197,7 +197,7 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
197
197
  ref: (e) => this.titleRef = e,
198
198
  style: {
199
199
  ...p && { width: K },
200
- ...i(n(x)) && { display: "none" }
200
+ ...a(r(x)) && { display: "none" }
201
201
  },
202
202
  children: m(p ? j : A, {
203
203
  className: "disabledTitle",
@@ -222,7 +222,7 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
222
222
  })
223
223
  })
224
224
  })),
225
- v && !p && /* @__PURE__ */ m(a, {
225
+ v && !p && /* @__PURE__ */ m(n, {
226
226
  side: "top",
227
227
  text: o.top,
228
228
  disabledLabel: t,
@@ -235,7 +235,7 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
235
235
  charactersLimit: I
236
236
  }),
237
237
  /* @__PURE__ */ h(E, { children: [
238
- v && /* @__PURE__ */ m(a, {
238
+ v && /* @__PURE__ */ m(n, {
239
239
  side: "left",
240
240
  text: o.left,
241
241
  disabledLabel: t,
@@ -261,7 +261,7 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
261
261
  children: u
262
262
  })]
263
263
  }),
264
- v && !p && /* @__PURE__ */ m(a, {
264
+ v && !p && /* @__PURE__ */ m(n, {
265
265
  side: "right",
266
266
  text: o.right,
267
267
  disabledLabel: t,
@@ -288,7 +288,7 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
288
288
  }, `top-guide-${e}`))
289
289
  })
290
290
  ] }),
291
- v && /* @__PURE__ */ m(a, {
291
+ v && /* @__PURE__ */ m(n, {
292
292
  side: "bottom",
293
293
  text: o.bottom,
294
294
  disabledLabel: t,
@@ -306,5 +306,4 @@ var b = d, x = b.default, S = x && typeof x == "object" ? x : b, C = y(f, "Reada
306
306
  ] });
307
307
  }
308
308
  };
309
- //#endregion
310
309
  export { I as Root, I as default };
package/dist/trig.js CHANGED
@@ -2,7 +2,7 @@ import { __exportAll as e } from "./_virtual/_rolldown/runtime.js";
2
2
  import { xy as t } from "./utils.js";
3
3
  import n from "@mapbox/point-geometry";
4
4
  import r from "debug";
5
- //#region src/trig.ts
5
+ // src/trig.ts
6
6
  var i = /* @__PURE__ */ e({
7
7
  acuteXAngle: () => f,
8
8
  acuteYAngle: () => p,
@@ -46,5 +46,4 @@ var i = /* @__PURE__ */ e({
46
46
  let S = x.add(new n(t.x, t.y));
47
47
  return i("normalized:", S), S;
48
48
  };
49
- //#endregion
50
49
  export { f as acuteXAngle, p as acuteYAngle, c as angle, v as diffEdge, h as edges, g as getOpposingSide, m as hypotenuse, o as toDegrees, s as toRadians, i as trig_exports };
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "./_virtual/_rolldown/runtime.js";
2
2
  import t from "prop-types";
3
- //#region src/types.ts
3
+ // src/types.ts
4
4
  var n = /* @__PURE__ */ e({
5
5
  BaseDomainRangeType: () => r,
6
6
  ChildrenType: () => c,
@@ -42,5 +42,4 @@ var n = /* @__PURE__ */ e({
42
42
  onDelete: t.func,
43
43
  onClick: t.func
44
44
  }, p = t.shape(f);
45
- //#endregion
46
45
  export { r as BaseDomainRangeType, c as ChildrenType, i as DomainType, d as GraphPropsType, s as PointType, a as RangeType, l as ScaleType, o as SizeType, u as SnapType, p as ToolPropType, f as ToolPropTypeFields, n as types_exports };
package/dist/utils.js CHANGED
@@ -2,7 +2,7 @@ import { __exportAll as e, __toESM as t } from "./_virtual/_rolldown/runtime.js"
2
2
  import { require_browser as n } from "./node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js";
3
3
  import { head as r, isEqual as i, range as a, tail as o } from "@pie-element/shared-lodash";
4
4
  import s from "@mapbox/point-geometry";
5
- //#region src/utils.ts
5
+ // src/utils.ts
6
6
  var c = /* @__PURE__ */ e({
7
7
  amountToIncreaseWidth: () => T,
8
8
  bandKey: () => S,
@@ -78,5 +78,4 @@ var _ = (e) => {
78
78
  top: Math.abs(e.top - n.max),
79
79
  bottom: n.min - e.bottom
80
80
  }), b = (e) => new s(e.x, e.y), x = (e, t) => b(t).sub(b(e)), S = (e, t) => `${t}-${e.label || "-"}`, C = (e, t) => i(e.domain, t.domain) && i(e.range, t.range), w = (e) => (e || "").replace(/<[^>]+>/g, "").split(" ").sort((e, t) => t.length - e.length)[0].length, T = (e) => e ? e * 20 : 0, E = (e) => (new DOMParser()?.parseFromString(e, "text/html"))?.body?.textContent || "", D = (e) => e && Object.keys(e).length === 0 && e.constructor === Object, O = (e) => typeof e == "string" && e.trim() === "";
81
- //#endregion
82
81
  export { T as amountToIncreaseWidth, S as bandKey, y as bounds, d as buildSizeArray, g as buildTickModel, E as extractTextFromHTML, w as findLongestWord, x as getDelta, p as getInterval, C as isDomainRangeEqual, D as isEmptyObject, O as isEmptyString, v as lineToArea, b as point, _ as polygonToArea, h as snapTo, f as tickCount, c as utils_exports, u as xy };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/plot",
3
- "version": "5.0.8-next.20261109125924",
3
+ "version": "5.0.8-next.20261110063142",
4
4
  "description": "Some underlying components for building charts/graphs",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,9 +14,9 @@
14
14
  "@mapbox/point-geometry": "^1.1.0",
15
15
  "@mui/icons-material": "^7.3.4",
16
16
  "@mui/material": "^7.3.4",
17
- "@pie-element/shared-utils": "0.1.7-next.20261027193325",
18
- "@pie-lib/editable-html-tip-tap": "3.1.3-next.20261109125924",
19
- "@pie-lib/render-ui": "8.0.8-next.20261109125924",
17
+ "@pie-element/shared-utils": "0.1.7-next.20261110055344",
18
+ "@pie-lib/editable-html-tip-tap": "3.1.3-next.20261110063142",
19
+ "@pie-lib/render-ui": "8.0.8-next.20261110063142",
20
20
  "assert": "^2.1.0",
21
21
  "d3-scale": "^4.0.2",
22
22
  "d3-selection": "^3.0.0",
@@ -26,7 +26,7 @@
26
26
  "react-draggable": "^4.7.2",
27
27
  "react-redux": "^9.3.1",
28
28
  "redux": "^5.0.1",
29
- "@pie-element/shared-lodash": "0.1.4-next.20261026212738"
29
+ "@pie-element/shared-lodash": "0.1.4-next.20261110055344"
30
30
  },
31
31
  "type": "module",
32
32
  "main": "./dist/index.js",