@pie-lib/graphing 4.0.5-next.31 → 4.0.5-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.
Files changed (93) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +3 -3
  2. package/dist/axis/arrow.js +1 -1
  3. package/dist/axis/axes.js +6 -6
  4. package/dist/container/index.js +4 -4
  5. package/dist/container/reducer.js +1 -1
  6. package/dist/coordinates-label.js +1 -1
  7. package/dist/graph-with-controls.js +4 -4
  8. package/dist/graph.js +2 -2
  9. package/dist/grid-setup.js +8 -8
  10. package/dist/grid.js +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/labels.js +1 -1
  13. package/dist/mark-label.d.ts +2 -0
  14. package/dist/mark-label.js +138 -87
  15. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +1 -1
  16. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +1 -1
  17. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +1 -1
  18. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +1 -1
  19. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +1 -1
  20. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +1 -1
  21. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +1 -1
  22. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js +8 -0
  23. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +1 -1
  24. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_Hash.js +1 -1
  25. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_ListCache.js +1 -1
  26. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_Map.js +1 -1
  27. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_MapCache.js +1 -1
  28. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_Symbol.js +1 -1
  29. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_assocIndexOf.js +1 -1
  30. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_baseGetTag.js +1 -1
  31. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_baseIsNative.js +1 -1
  32. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_coreJsData.js +1 -1
  33. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_freeGlobal.js +1 -1
  34. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_getMapData.js +1 -1
  35. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_getNative.js +1 -1
  36. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_getRawTag.js +1 -1
  37. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_getValue.js +1 -1
  38. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_hashClear.js +1 -1
  39. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_hashDelete.js +1 -1
  40. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_hashGet.js +1 -1
  41. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_hashHas.js +1 -1
  42. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_hashSet.js +1 -1
  43. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_isKeyable.js +1 -1
  44. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_isMasked.js +1 -1
  45. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_listCacheClear.js +1 -1
  46. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_listCacheDelete.js +1 -1
  47. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_listCacheGet.js +1 -1
  48. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_listCacheHas.js +1 -1
  49. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_listCacheSet.js +1 -1
  50. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_mapCacheClear.js +1 -1
  51. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_mapCacheDelete.js +1 -1
  52. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_mapCacheGet.js +1 -1
  53. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_mapCacheHas.js +1 -1
  54. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_mapCacheSet.js +1 -1
  55. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_nativeCreate.js +1 -1
  56. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_objectToString.js +1 -1
  57. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_root.js +1 -1
  58. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/_toSource.js +1 -1
  59. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/eq.js +1 -1
  60. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/isFunction.js +1 -1
  61. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/isObject.js +1 -1
  62. package/dist/node_modules/.bun/{lodash@4.17.21 → lodash@4.18.1}/node_modules/lodash/memoize.js +1 -1
  63. package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +7 -7
  64. package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +1 -1
  65. package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +2 -2
  66. package/dist/toggle-bar.js +1 -1
  67. package/dist/tool-menu.js +3 -3
  68. package/dist/tools/circle/bg-circle.js +2 -2
  69. package/dist/tools/circle/component.d.ts +5 -0
  70. package/dist/tools/circle/component.js +30 -17
  71. package/dist/tools/index.js +1 -1
  72. package/dist/tools/line/component.js +2 -2
  73. package/dist/tools/point/component.d.ts +2 -0
  74. package/dist/tools/point/component.js +16 -10
  75. package/dist/tools/point/index.js +1 -1
  76. package/dist/tools/polygon/component.d.ts +5 -0
  77. package/dist/tools/polygon/component.js +27 -18
  78. package/dist/tools/polygon/index.js +1 -1
  79. package/dist/tools/polygon/line.js +1 -1
  80. package/dist/tools/polygon/polygon.js +3 -3
  81. package/dist/tools/ray/component.js +2 -2
  82. package/dist/tools/segment/component.js +1 -1
  83. package/dist/tools/shared/line/index.d.ts +10 -4
  84. package/dist/tools/shared/line/index.js +27 -14
  85. package/dist/tools/shared/line/line-path.js +2 -2
  86. package/dist/tools/shared/line/with-root-edge.d.ts +10 -4
  87. package/dist/tools/shared/line/with-root-edge.js +3 -3
  88. package/dist/tools/shared/point/base-point.js +1 -1
  89. package/dist/tools/vector/component.js +1 -1
  90. package/dist/undo-redo.js +2 -2
  91. package/dist/utils.js +1 -1
  92. package/package.json +15 -10
  93. package/dist/node_modules/.bun/@visx_curve@3.12.0/node_modules/@visx/curve/esm/index.js +0 -2
@@ -12,12 +12,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
12
12
  enumerable: !(s = n(i, d)) || s.enumerable
13
13
  });
14
14
  return e;
15
- }, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
15
+ }, l = (e, t, n) => (c(e, t, "default"), n && c(n, t, "default")), u = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
16
16
  value: n,
17
17
  enumerable: !0
18
- }) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
18
+ }) : a, n)), d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
19
  if (typeof require < "u") return require.apply(this, arguments);
20
20
  throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
21
  });
22
22
  //#endregion
23
- export { o as __commonJSMin, s as __exportAll, u as __require, l as __toESM };
23
+ export { o as __commonJSMin, s as __exportAll, l as __reExport, d as __require, u as __toESM };
@@ -31,4 +31,4 @@ o.propTypes = {
31
31
  direction: "left"
32
32
  };
33
33
  //#endregion
34
- export { o as default };
34
+ export { o as Arrow, o as default };
package/dist/axis/axes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import e from "../node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js";
2
- import t from "./arrow.js";
2
+ import { Arrow as t } from "./arrow.js";
3
3
  import { amountToIncreaseWidth as n, countWords as r, findLongestWord as i, getTickValues as a } from "../utils.js";
4
4
  import o from "react";
5
5
  import s from "prop-types";
@@ -102,7 +102,7 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
102
102
  })
103
103
  ] });
104
104
  }
105
- }, A = class extends o.Component {
105
+ }, A = k, j = class extends o.Component {
106
106
  static propTypes = {
107
107
  ...x,
108
108
  graphProps: c.GraphPropsType.isRequired
@@ -162,7 +162,7 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
162
162
  })
163
163
  ] });
164
164
  }
165
- }, j = class extends o.Component {
165
+ }, M = j, N = class extends o.Component {
166
166
  static propTypes = {
167
167
  ...x,
168
168
  graphProps: c.GraphPropsType.isRequired
@@ -196,13 +196,13 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
196
196
  };
197
197
  render() {
198
198
  let { graphProps: e } = this.props, { domain: t, range: n } = e || {}, { columnTicksValues: r, firstNegativeX: i, distanceFromOriginToFirstNegativeX: a } = this.xValues(), { rowTickValues: o, firstNegativeY: s, distanceFromOriginToFirstNegativeY: c } = this.yValues(), l = D(i, s, a, c, 6, 25);
199
- return /* @__PURE__ */ d(T, { children: [n.min <= 0 ? /* @__PURE__ */ u(k, {
199
+ return /* @__PURE__ */ d(T, { children: [n.min <= 0 ? /* @__PURE__ */ u(A, {
200
200
  ...this.props,
201
201
  skipValues: l,
202
202
  columnTicksValues: r,
203
203
  distanceFromOriginToFirstNegativeY: c,
204
204
  dy: 25
205
- }) : null, t.min <= 0 ? /* @__PURE__ */ u(A, {
205
+ }) : null, t.min <= 0 ? /* @__PURE__ */ u(M, {
206
206
  ...this.props,
207
207
  skipValues: l,
208
208
  rowTickValues: o,
@@ -211,4 +211,4 @@ var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b =
211
211
  }
212
212
  };
213
213
  //#endregion
214
- export { x as AxisPropTypes, j as default };
214
+ export { x as AxisPropTypes, k as RawXAxis, j as RawYAxis, N as default, O as firstNegativeValue, D as sharedValues };
@@ -1,9 +1,9 @@
1
- import { Provider_default as e, connect as t } from "../node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js";
1
+ import { Provider as e, connect as t } from "../node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js";
2
2
  import { applyMiddleware as n, createStore as r } from "../node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js";
3
- import { M as i } from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
3
+ import { ActionCreators as i } from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
4
4
  import a from "./reducer.js";
5
5
  import { changeMarks as o } from "./actions.js";
6
- import s from "../graph-with-controls.js";
6
+ import { GraphWithControls as s } from "../graph-with-controls.js";
7
7
  import { lastActionMiddleware as c } from "./middleware.js";
8
8
  import l from "react";
9
9
  import u from "prop-types";
@@ -45,4 +45,4 @@ var p = t((e) => ({ marks: e.marks.present }), (e) => ({
45
45
  }
46
46
  };
47
47
  //#endregion
48
- export { m as default };
48
+ export { p as GraphContainer, m as default };
@@ -1,6 +1,6 @@
1
1
  import { combineReducers as e } from "../node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js";
2
2
  import t from "./marks.js";
3
- import { C as n } from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
3
+ import n from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
4
4
  //#region src/container/reducer.ts
5
5
  var r = () => e({ marks: n(t, { debug: !1 }) });
6
6
  //#endregion
@@ -43,4 +43,4 @@ l.propTypes = {
43
43
  y: t.number
44
44
  };
45
45
  //#endregion
46
- export { l as default };
46
+ export { l as CoordinatesLabel, l as default, c as getLabelPosition };
@@ -1,7 +1,7 @@
1
- import e, { graphPropTypes as t } from "./graph.js";
1
+ import { Graph as e, graphPropTypes as t } from "./graph.js";
2
2
  import { allTools as n, toolsArr as r } from "./tools/index.js";
3
- import i from "./tool-menu.js";
4
- import a from "./undo-redo.js";
3
+ import { ToolMenu as i } from "./tool-menu.js";
4
+ import { UndoRedo as a } from "./undo-redo.js";
5
5
  import o from "react";
6
6
  import s from "prop-types";
7
7
  import { isString as c, uniq as l } from "@pie-element/shared-lodash";
@@ -151,4 +151,4 @@ var j = class extends o.Component {
151
151
  }
152
152
  };
153
153
  //#endregion
154
- export { j as default };
154
+ export { j as GraphWithControls, j as default, D as filterByValidToolTypes, O as filterByVisibleToolTypes, E as getAvailableTool, w as setToolbarAvailability, T as toolIsAvailable };
package/dist/graph.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isDuplicatedMark as e } from "./utils.js";
2
2
  import t, { AxisPropTypes as n } from "./axis/axes.js";
3
- import r from "./grid.js";
3
+ import { Grid as r } from "./grid.js";
4
4
  import { LabelType as i } from "./labels.js";
5
5
  import a from "./bg.js";
6
6
  import o from "react";
@@ -206,4 +206,4 @@ var g = p("pie-lib:graphing:graph"), _ = {
206
206
  }
207
207
  };
208
208
  //#endregion
209
- export { b as default, _ as graphPropTypes };
209
+ export { b as Graph, b as default, _ as graphPropTypes, y as removeBuildingToolIfCurrentToolDiffers };
@@ -144,17 +144,17 @@ var F = (e) => {
144
144
  step: 1,
145
145
  labelStep: 0
146
146
  };
147
+ }, r = {
148
+ ...v,
149
+ ...e ? { labelStep: 1 } : n("range")
150
+ }, i = {
151
+ ...t,
152
+ ...e ? { labelStep: 1 } : n("domain")
147
153
  };
148
154
  g({
149
155
  includeAxes: e,
150
- range: {
151
- ...v,
152
- ...e ? { labelStep: 1 } : n("range")
153
- },
154
- domain: {
155
- ...t,
156
- ...e ? { labelStep: 1 } : n("domain")
157
- }
156
+ range: r,
157
+ domain: i
158
158
  });
159
159
  }, K = (e) => {
160
160
  g({
package/dist/grid.js CHANGED
@@ -56,4 +56,4 @@ var u = class extends i.Component {
56
56
  }
57
57
  };
58
58
  //#endregion
59
- export { u as default };
59
+ export { u as Grid, u as default };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import e from "./graph.js";
1
+ import { Graph as e } from "./graph.js";
2
2
  import { tools_exports as t } from "./tools/index.js";
3
- import n from "./tool-menu.js";
3
+ import { ToolMenu as n } from "./tool-menu.js";
4
4
  import r from "./container/index.js";
5
5
  import i from "./grid-setup.js";
6
6
  import a from "./key-legend.js";
package/dist/labels.js CHANGED
@@ -149,4 +149,4 @@ var d = u(s, "Readable") || u(m.Readable, "Readable"), f = o, p = f.default, m =
149
149
  }
150
150
  });
151
151
  //#endregion
152
- export { b as LabelType };
152
+ export { b as LabelType, g as getTransform };
@@ -25,7 +25,9 @@ export declare const coordinates: (graphProps: any, mark: any, rect: {
25
25
  export declare const MarkLabel: {
26
26
  (props: any): React.JSX.Element | null;
27
27
  propTypes: {
28
+ autoFocus: PropTypes.Requireable<boolean>;
28
29
  disabled: PropTypes.Requireable<boolean>;
30
+ onBlur: PropTypes.Requireable<(...args: any[]) => any>;
29
31
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
30
32
  graphProps: PropTypes.Requireable<PropTypes.InferProps<{
31
33
  scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
@@ -1,69 +1,77 @@
1
1
  import { AutosizeInput as e } from "./autosize-input.js";
2
2
  import { useDebounce as t } from "./use-debounce.js";
3
3
  import n from "./label-svg-icon.js";
4
- import { useCallback as r, useEffect as i, useState as a } from "react";
5
- import o from "prop-types";
6
- import { types as s } from "@pie-lib/plot";
7
- import { styled as c, useTheme as l } from "@mui/material/styles";
8
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
9
- import { color as p } from "@pie-lib/render-ui";
4
+ import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
+ import s from "prop-types";
6
+ import { types as c } from "@pie-lib/plot";
7
+ import { styled as l, useTheme as ee } from "@mui/material/styles";
8
+ import { Fragment as te, jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ import { color as f } from "@pie-lib/render-ui";
10
10
  //#region src/mark-label.tsx
11
- var m = c("div")(({ theme: e }) => ({
11
+ var ne = 500, p = 500, m = [
12
+ 0,
13
+ 50,
14
+ 120,
15
+ 250,
16
+ 400,
17
+ 700,
18
+ 1e3
19
+ ], h = 3, g = 30, _ = l("div")(({ theme: e }) => ({
12
20
  float: "right",
13
21
  padding: e.spacing(.5),
14
22
  borderRadius: "4px",
15
23
  fontSize: "10px",
16
- backgroundColor: p.defaults.WHITE,
17
- color: p.defaults.CORRECT_WITH_ICON,
18
- border: `solid 1px ${p.defaults.CORRECT_WITH_ICON}`
19
- })), h = c("div")(({ theme: e }) => ({
24
+ backgroundColor: f.defaults.WHITE,
25
+ color: f.defaults.CORRECT_WITH_ICON,
26
+ border: `solid 1px ${f.defaults.CORRECT_WITH_ICON}`
27
+ })), v = l("div")(({ theme: e }) => ({
20
28
  float: "right",
21
29
  padding: e.spacing(.5),
22
30
  borderRadius: "4px",
23
31
  fontSize: "10px",
24
- backgroundColor: p.defaults.WHITE,
25
- color: p.defaults.INCORRECT_WITH_ICON,
26
- border: `solid 1px ${p.defaults.INCORRECT_WITH_ICON}`
27
- })), g = c("div")(({ theme: e }) => ({
32
+ backgroundColor: f.defaults.WHITE,
33
+ color: f.defaults.INCORRECT_WITH_ICON,
34
+ border: `solid 1px ${f.defaults.INCORRECT_WITH_ICON}`
35
+ })), y = l("div")(({ theme: e }) => ({
28
36
  float: "right",
29
37
  padding: e.spacing(.5),
30
38
  borderRadius: "4px",
31
39
  fontSize: "10px",
32
- backgroundColor: p.defaults.WHITE,
33
- color: p.defaults.MISSING_WITH_ICON,
34
- border: `solid 1px ${p.defaults.MISSING_WITH_ICON}`,
40
+ backgroundColor: f.defaults.WHITE,
41
+ color: f.defaults.MISSING_WITH_ICON,
42
+ border: `solid 1px ${f.defaults.MISSING_WITH_ICON}`,
35
43
  fontWeight: "bold"
36
- })), _ = c("div")(() => ({
44
+ })), b = l("div")(() => ({
37
45
  float: "right",
38
46
  padding: 0,
39
47
  borderRadius: "4px",
40
48
  fontSize: "10px",
41
- backgroundColor: p.defaults.WHITE,
42
- color: p.defaults.INCORRECT_WITH_ICON,
49
+ backgroundColor: f.defaults.WHITE,
50
+ color: f.defaults.INCORRECT_WITH_ICON,
43
51
  fontWeight: "bold"
44
- })), v = (e, t, n) => ({
52
+ })), x = (e, t, n) => ({
45
53
  float: "right",
46
54
  padding: e.spacing(.5),
47
55
  fontFamily: e.typography.fontFamily,
48
56
  fontSize: "10px",
49
- border: t ? `solid 1px ${p.defaults.PRIMARY_DARK}` : n ? `solid 1px ${p.disabled()}` : `solid 1px ${p.defaults.SECONDARY}`,
57
+ border: t ? `solid 1px ${f.defaults.PRIMARY_DARK}` : n ? `solid 1px ${f.disabled()}` : `solid 1px ${f.defaults.SECONDARY}`,
50
58
  borderRadius: "3px",
51
- color: n ? p.disabled() : p.defaults.PRIMARY_DARK,
52
- backgroundColor: p.defaults.WHITE,
59
+ color: n ? f.disabled() : f.defaults.PRIMARY_DARK,
60
+ backgroundColor: f.defaults.WHITE,
53
61
  WebkitOpacity: t ? "1" : void 0,
54
- WebkitTextFillColor: n ? p.disabled() : void 0
55
- }), y = () => ({
62
+ WebkitTextFillColor: n ? f.disabled() : void 0
63
+ }), re = () => ({
56
64
  padding: "0",
57
65
  border: "none",
58
66
  color: "inherit",
59
67
  fontWeight: "bold"
60
- }), b = (e, t, n = {
68
+ }), S = (e, t, n = {
61
69
  width: 0,
62
70
  height: 0
63
71
  }) => {
64
72
  let { scale: r, domain: i, range: a } = e, o = r.x(t.x) + n.width + 5, s = r.y(t.y) + n.height + 5, c = o >= r.x(i.max) ? "left" : "right";
65
73
  return `${s >= r.y(a.min) ? "top" : "bottom"}-${c}`;
66
- }, x = (e, t, n = {
74
+ }, C = (e, t, n = {
67
75
  width: 0,
68
76
  height: 0
69
77
  }, r) => {
@@ -87,85 +95,128 @@ var m = c("div")(({ theme: e }) => ({
87
95
  };
88
96
  default: return {};
89
97
  }
90
- }, S = ({ _ref: t, externalInputRef: n, label: r, disabled: i, inputStyle: a, onChange: o, onBlur: s }) => /* @__PURE__ */ d(e, {
98
+ }, w = (e) => {
99
+ if (typeof document > "u" || !document.getSelection) return !0;
100
+ let t = document.getSelection();
101
+ if (!t || !t.rangeCount || !t.anchorNode) return !1;
102
+ let n = t.anchorNode;
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__ */ u(e, {
91
105
  inputRef: (e) => {
92
106
  t(e), n(e);
93
107
  },
94
108
  disabled: i,
95
109
  inputStyle: a,
110
+ minWidth: o,
96
111
  value: r,
97
- onChange: o,
98
- onBlur: s
112
+ onChange: s,
113
+ onBlur: c
99
114
  });
100
- S.propTypes = {
101
- _ref: o.func,
102
- externalInputRef: o.func,
103
- label: o.string,
104
- disabled: o.bool,
105
- inputStyle: o.object,
106
- onChange: o.func,
107
- onBlur: o.func
115
+ T.propTypes = {
116
+ _ref: s.func,
117
+ externalInputRef: s.func,
118
+ label: s.string,
119
+ disabled: s.bool,
120
+ inputStyle: s.object,
121
+ minWidth: s.number,
122
+ onChange: s.func,
123
+ onBlur: s.func
108
124
  };
109
- var C = (e) => {
110
- let [o, s] = a(null), c = r((e) => s(e)), p = l(), { mark: C, graphProps: w, disabled: T, inputRef: E } = e, [D, O] = a(C.label), { correctness: k, correctnesslabel: A, correctlabel: j } = C, M = (e) => O(e.target.value), N = r(() => {
111
- D === "" && e.onChange("");
112
- }, [D, e.onChange]), P = t(D, 200);
125
+ var E = (e) => {
126
+ let s = a(null), [c, l] = o(null), f = r((e) => {
127
+ s.current = e, l(e);
128
+ }, []), E = ee(), { 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
+ t !== B.current && (B.current = t, e.onChange(t));
130
+ }, ae = r(() => {
131
+ V() || H.current || U.current || (R.current = !1, M === "" ? e.onChange("") : M !== D.label && G(M), e.onBlur && e.onBlur());
132
+ }, [
133
+ M,
134
+ D.label,
135
+ e.onChange,
136
+ e.onBlur
137
+ ]), K = t(M, ne);
113
138
  i(() => {
114
- O(C.label);
115
- }, [C.label]), i(() => {
116
- typeof P == "string" && P !== C.label && e.onChange(P);
117
- }, [P]);
118
- let F = o ? o.getBoundingClientRect() : {
139
+ L() || N(D.label);
140
+ }, [D.label]), i(() => {
141
+ typeof K == "string" && K !== D.label && G(K);
142
+ }, [K]);
143
+ let q = () => {
144
+ let e = s.current;
145
+ if (!A && !R.current && !V() || !e || e.disabled) return;
146
+ let t = L();
147
+ if (t || (e.focus(), L() && (R.current = !1)), !e.setSelectionRange) return;
148
+ let n = t && e.value, r = n ? e.selectionStart : (e.value || "").length, i = n ? e.selectionEnd : r;
149
+ w(e) || e.setSelectionRange(r, i), !(w(e) || W.current >= h) && (W.current += 1, U.current = !0, e.blur(), e.focus(), e.setSelectionRange(r, i), U.current = !1);
150
+ };
151
+ i(() => q()), i(() => {
152
+ if (!A && !R.current) return;
153
+ z.current ||= Date.now() + p;
154
+ let e = m.map((e) => setTimeout(q, e));
155
+ return () => e.forEach((e) => clearTimeout(e));
156
+ }, [A]), i(() => {
157
+ let e = () => {
158
+ H.current = !0;
159
+ }, t = () => {
160
+ H.current && (H.current = !1, q());
161
+ };
162
+ return window.addEventListener("blur", e), window.addEventListener("focus", t), () => {
163
+ window.removeEventListener("blur", e), window.removeEventListener("focus", t);
164
+ };
165
+ }, [A]);
166
+ let J = c ? c.getBoundingClientRect() : {
119
167
  width: 0,
120
168
  height: 0
121
- }, I = x(w, C, F, b(w, C, F)), L = {
169
+ }, Y = C(O, D, J, S(O, D, J)), X = {
122
170
  position: "fixed",
123
171
  pointerEvents: "auto",
124
172
  display: "flex",
125
173
  alignItems: "center",
126
174
  gap: "3px",
127
- ...I
128
- }, R = {
129
- ...L,
130
- top: I.top + 25
131
- }, z = T || C.disabled, B = (e, t) => /* @__PURE__ */ d(S, {
132
- _ref: c,
133
- externalInputRef: E,
175
+ ...Y
176
+ }, oe = {
177
+ ...X,
178
+ top: Y.top + 25
179
+ }, Z = k || D.disabled, Q = (e, t) => /* @__PURE__ */ u(T, {
180
+ _ref: f,
181
+ externalInputRef: j,
134
182
  label: t,
135
- disabled: z,
183
+ disabled: Z,
136
184
  inputStyle: e,
137
- onChange: M,
138
- onBlur: N
139
- }), V = y();
140
- return k === "correct" && A === "correct" && j ? /* @__PURE__ */ f(m, {
141
- style: L,
142
- children: [/* @__PURE__ */ d(n, { type: "correct" }), B(V, j)]
143
- }) : k === "correct" && A === "correct" && !j ? null : k === "correct" && A === "incorrect" ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f(h, {
144
- style: L,
145
- children: [/* @__PURE__ */ d(n, { type: "incorrect" }), D === "" ? /* @__PURE__ */ d(n, {
185
+ minWidth: Z ? 1 : g,
186
+ onChange: ie,
187
+ onBlur: ae
188
+ }), $ = re();
189
+ return P === "correct" && F === "correct" && I ? /* @__PURE__ */ d(_, {
190
+ style: X,
191
+ children: [/* @__PURE__ */ u(n, { type: "correct" }), Q($, I)]
192
+ }) : P === "correct" && F === "correct" && !I ? null : P === "correct" && F === "incorrect" ? /* @__PURE__ */ d(te, { children: [/* @__PURE__ */ d(v, {
193
+ style: X,
194
+ children: [/* @__PURE__ */ u(n, { type: "incorrect" }), M === "" ? /* @__PURE__ */ u(n, {
146
195
  type: "empty",
147
196
  style: { marginLeft: "3px" }
148
- }) : B(V, D)]
149
- }), /* @__PURE__ */ d(g, {
150
- style: R,
151
- children: B(V, j)
152
- })] }) : k === "missing" ? /* @__PURE__ */ d(g, {
153
- style: L,
154
- children: B(V, D)
155
- }) : k === "incorrect" ? /* @__PURE__ */ d(_, {
156
- style: L,
157
- children: B(V, D)
158
- }) : /* @__PURE__ */ d("div", {
159
- style: L,
160
- children: B(v(p, T, C.disabled), D)
197
+ }) : Q($, M)]
198
+ }), /* @__PURE__ */ u(y, {
199
+ style: oe,
200
+ children: Q($, I)
201
+ })] }) : P === "missing" ? /* @__PURE__ */ u(y, {
202
+ style: X,
203
+ children: Q($, M)
204
+ }) : P === "incorrect" ? /* @__PURE__ */ u(b, {
205
+ style: X,
206
+ children: Q($, M)
207
+ }) : Z && !M ? null : /* @__PURE__ */ u("div", {
208
+ style: X,
209
+ children: Q(x(E, k, D.disabled), M)
161
210
  });
162
211
  };
163
- C.propTypes = {
164
- disabled: o.bool,
165
- onChange: o.func,
166
- graphProps: s.GraphPropsType,
167
- inputRef: o.func,
168
- mark: o.object
212
+ E.propTypes = {
213
+ autoFocus: s.bool,
214
+ disabled: s.bool,
215
+ onBlur: s.func,
216
+ onChange: s.func,
217
+ graphProps: c.GraphPropsType,
218
+ inputRef: s.func,
219
+ mark: s.object
169
220
  };
170
221
  //#endregion
171
- export { C as default };
222
+ export { E as MarkLabel, E as default, C as coordinates, S as position };
@@ -45,7 +45,7 @@ function h(e, t) {
45
45
  return n;
46
46
  }
47
47
  function g(e) {
48
- var t = e.children, g = t === void 0 ? o : t, _ = e.axisClassName, v = e.hideAxisLine, y = v === void 0 ? !1 : v, b = e.hideTicks, x = b === void 0 ? !1 : b, S = e.hideZero, C = S === void 0 ? !1 : S, w = e.innerRef, T = e.left, E = T === void 0 ? 0 : T, D = e.numTicks, O = D === void 0 ? 10 : D, k = e.orientation, A = k === void 0 ? a.bottom : k, j = e.rangePadding, M = j === void 0 ? 0 : j, N = e.scale, P = e.tickFormat, F = e.tickLength, I = F === void 0 ? 8 : F, L = e.tickValues, R = e.top, z = R === void 0 ? 0 : R, B = h(e, p), V = P ?? c(N), H = A === a.left, U = A === a.top, W = U || A === a.bottom, G = s(N), K = H || U ? -1 : 1, q = N.range(), J = u(M), Y = l({
48
+ var t = e.children, g = t === void 0 ? o : t, _ = e.axisClassName, v = e.hideAxisLine, y = v !== void 0 && v, b = e.hideTicks, x = b !== void 0 && b, S = e.hideZero, C = S !== void 0 && S, w = e.innerRef, T = e.left, E = T === void 0 ? 0 : T, D = e.numTicks, O = D === void 0 ? 10 : D, k = e.orientation, A = k === void 0 ? a.bottom : k, j = e.rangePadding, M = j === void 0 ? 0 : j, N = e.scale, P = e.tickFormat, F = e.tickLength, I = F === void 0 ? 8 : F, L = e.tickValues, R = e.top, z = R === void 0 ? 0 : R, B = h(e, p), V = P ?? c(N), H = A === a.left, U = A === a.top, W = U || A === a.bottom, G = s(N), K = H || U ? -1 : 1, q = N.range(), J = u(M), Y = l({
49
49
  x: Number(q[0]) + .5 - J.start,
50
50
  y: 0
51
51
  }, W), X = l({
@@ -1,4 +1,4 @@
1
- import { Point as e } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
1
+ import e from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
2
2
  //#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js
3
3
  function t(t, n) {
4
4
  var r = t.x, i = t.y;
@@ -3,7 +3,7 @@ import { require_classnames as t } from "../../../../../../classnames@2.5.1/node
3
3
  import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
4
4
  import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
5
5
  import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
6
- import { Point as a } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
6
+ import a from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
7
7
  import { require_Line as o } from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js";
8
8
  import s from "../utils/getScaleBandwidth.js";
9
9
  import c from "react";
@@ -3,7 +3,7 @@ import { require_classnames as t } from "../../../../../../classnames@2.5.1/node
3
3
  import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
4
4
  import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
5
5
  import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
6
- import { Point as a } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
6
+ import a from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
7
7
  import { require_Line as o } from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js";
8
8
  import s from "../utils/getScaleBandwidth.js";
9
9
  import c from "react";
@@ -15,4 +15,4 @@ var e = /*#__PURE__*/ function() {
15
15
  }, e;
16
16
  }();
17
17
  //#endregion
18
- export { e as Point };
18
+ export { e as default };
@@ -26,7 +26,7 @@ function c(e) {
26
26
  return typeof e == "number" && Number.isFinite(e) || typeof e == "string";
27
27
  }
28
28
  function l(e) {
29
- var t = e.verticalAnchor, l = t === void 0 ? "end" : t, u = e.scaleToFit, d = u === void 0 ? !1 : u, f = e.angle, p = e.width, m = e.lineHeight, h = m === void 0 ? "1em" : m, g = e.capHeight, _ = g === void 0 ? "0.71em" : g, v = e.children, y = e.style, b = o(e, a), x = b.x, S = x === void 0 ? 0 : x, C = b.y, w = C === void 0 ? 0 : C, T = !c(S) || !c(w), E = r(function() {
29
+ var t = e.verticalAnchor, l = t === void 0 ? "end" : t, u = e.scaleToFit, d = u !== void 0 && u, f = e.angle, p = e.width, m = e.lineHeight, h = m === void 0 ? "1em" : m, g = e.capHeight, _ = g === void 0 ? "0.71em" : g, v = e.children, y = e.style, b = o(e, a), x = b.x, S = x === void 0 ? 0 : x, C = b.y, w = C === void 0 ? 0 : C, T = !c(S) || !c(w), E = r(function() {
30
30
  return {
31
31
  wordsWithWidth: (v == null ? [] : v.toString().split(/(?:(?!\u00A0+)\s+)/)).map(function(e) {
32
32
  return {
@@ -1,5 +1,5 @@
1
1
  import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_memoize as t } from "../../../../../../lodash@4.17.21/node_modules/lodash/memoize.js";
2
+ import { require_memoize as t } from "../../../../../../lodash@4.18.1/node_modules/lodash/memoize.js";
3
3
  //#region ../../../node_modules/.bun/@visx+text@3.12.0+f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js
4
4
  var n = /* @__PURE__ */ e(t()), r = "__react_svg_text_measurement_id";
5
5
  function i(e, t) {
@@ -0,0 +1,8 @@
1
+ import { __exportAll as e, __reExport as t } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ export * from "d3-shape";
3
+ //#region ../../../node_modules/.bun/@visx+vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js
4
+ var n = /* @__PURE__ */ e({});
5
+ import * as r from "d3-shape";
6
+ t(n, r);
7
+ //#endregion
8
+ export { n as d3_shape_exports };
@@ -13,4 +13,4 @@ function t() {
13
13
  return i;
14
14
  }
15
15
  //#endregion
16
- export { t as default };
16
+ export { t as clsx, t as default };
@@ -4,7 +4,7 @@ import { require__hashDelete as n } from "./_hashDelete.js";
4
4
  import { require__hashGet as r } from "./_hashGet.js";
5
5
  import { require__hashHas as i } from "./_hashHas.js";
6
6
  import { require__hashSet as a } from "./_hashSet.js";
7
- //#region ../../../node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Hash.js
7
+ //#region ../../../node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js
8
8
  var o = /* @__PURE__ */ e(((e, o) => {
9
9
  var s = t(), c = n(), l = r(), u = i(), d = a();
10
10
  function f(e) {
@@ -4,7 +4,7 @@ import { require__listCacheDelete as n } from "./_listCacheDelete.js";
4
4
  import { require__listCacheGet as r } from "./_listCacheGet.js";
5
5
  import { require__listCacheHas as i } from "./_listCacheHas.js";
6
6
  import { require__listCacheSet as a } from "./_listCacheSet.js";
7
- //#region ../../../node_modules/.bun/lodash@4.17.21/node_modules/lodash/_ListCache.js
7
+ //#region ../../../node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js
8
8
  var o = /* @__PURE__ */ e(((e, o) => {
9
9
  var s = t(), c = n(), l = r(), u = i(), d = a();
10
10
  function f(e) {
@@ -1,7 +1,7 @@
1
1
  import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
2
2
  import { require__root as t } from "./_root.js";
3
3
  import { require__getNative as n } from "./_getNative.js";
4
- //#region ../../../node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Map.js
4
+ //#region ../../../node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js
5
5
  var r = /* @__PURE__ */ e(((e, r) => {
6
6
  r.exports = n()(t(), "Map");
7
7
  }));
@@ -4,7 +4,7 @@ import { require__mapCacheDelete as n } from "./_mapCacheDelete.js";
4
4
  import { require__mapCacheGet as r } from "./_mapCacheGet.js";
5
5
  import { require__mapCacheHas as i } from "./_mapCacheHas.js";
6
6
  import { require__mapCacheSet as a } from "./_mapCacheSet.js";
7
- //#region ../../../node_modules/.bun/lodash@4.17.21/node_modules/lodash/_MapCache.js
7
+ //#region ../../../node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js
8
8
  var o = /* @__PURE__ */ e(((e, o) => {
9
9
  var s = t(), c = n(), l = r(), u = i(), d = a();
10
10
  function f(e) {