@pie-element/number-line 13.1.2-next.4 → 13.1.2-next.6

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 (34) hide show
  1. package/dist/author/arrows.js +1 -1
  2. package/dist/author/domain.js +1 -1
  3. package/dist/author/index.d.ts +1 -0
  4. package/dist/author/index.js +5 -2
  5. package/dist/author/main.js +145 -145
  6. package/dist/author/ticks.js +1 -1
  7. package/dist/browser/author/index.js +16367 -19542
  8. package/dist/browser/author/index.js.map +1 -1
  9. package/dist/browser/controller/index.js +4 -4
  10. package/dist/browser/controller/index.js.map +1 -1
  11. package/dist/browser/delivery/index.js +1 -1
  12. package/dist/browser/{delivery-bcOQIdko.js → delivery-CO2qrOqk.js} +4117 -4207
  13. package/dist/browser/delivery-CO2qrOqk.js.map +1 -0
  14. package/dist/browser/{dist-BnIaVPcz.js → dist-DkCincUw.js} +1417 -1417
  15. package/dist/browser/{dist-BnIaVPcz.js.map → dist-DkCincUw.js.map} +1 -1
  16. package/dist/browser/{impureFunctionsAny.generated-BwG6hrJc.js → impureFunctionsAny.generated-DlzbJQpQ.js} +1061 -1058
  17. package/dist/browser/{impureFunctionsAny.generated-BwG6hrJc.js.map → impureFunctionsAny.generated-DlzbJQpQ.js.map} +1 -1
  18. package/dist/controller/tickUtils.js +1 -1
  19. package/dist/delivery/data-converter.js +1 -1
  20. package/dist/delivery/index.js +3 -3
  21. package/dist/delivery/number-line/graph/arrow.js +1 -1
  22. package/dist/delivery/number-line/graph/elements/line.js +2 -2
  23. package/dist/delivery/number-line/graph/elements/point.js +5 -4
  24. package/dist/delivery/number-line/graph/elements/ray.js +3 -3
  25. package/dist/delivery/number-line/graph/index.js +6 -6
  26. package/dist/delivery/number-line/graph/line.js +1 -1
  27. package/dist/delivery/number-line/graph/stacks.js +1 -1
  28. package/dist/delivery/number-line/graph/tick-utils.js +2 -2
  29. package/dist/delivery/number-line/graph/ticks.js +1 -1
  30. package/dist/delivery/number-line/index.js +3 -3
  31. package/dist/delivery/number-line/point-chooser/index.js +1 -1
  32. package/dist/index.iife.js +57 -57
  33. package/package.json +13 -8
  34. package/dist/browser/delivery-bcOQIdko.js.map +0 -1
@@ -195,7 +195,7 @@ var i = [
195
195
  if (n(r)) return e.fraction(r.n * r.s, r.d);
196
196
  if (t(r)) return e.fraction(r);
197
197
  }, v = (t, n, r, i) => {
198
- let a = i ? i.limit !== !1 : !0, o = h(t, n), s = a ? m(_(r.minor), o.min, o.max) : _(r.minor), c = a ? m(_(r.major), s, e.multiply(s, 20)) : _(r.major);
198
+ let a = !i || i.limit !== !1, o = h(t, n), s = a ? m(_(r.minor), o.min, o.max) : _(r.minor), c = a ? m(_(r.major), s, e.multiply(s, 20)) : _(r.major);
199
199
  if (!g(c, s)) {
200
200
  let t = e.divide(c, s), n = t <= 2 ? 2 : Math.round(t);
201
201
  return {
@@ -67,4 +67,4 @@ var t = /* @__PURE__ */ e({
67
67
  };
68
68
  };
69
69
  //#endregion
70
- export { t as data_converter_exports, n as lineIsSwitched, r as switchGraphLine, o as toGraphFormat, a as toSessionFormat };
70
+ export { t as data_converter_exports, n as lineIsSwitched, r as switchGraphLine, i as switchPosition, o as toGraphFormat, a as toSessionFormat };
@@ -1,8 +1,8 @@
1
1
  import { data_converter_exports as e, lineIsSwitched as t, switchGraphLine as n, toGraphFormat as r, toSessionFormat as i } from "./data-converter.js";
2
2
  import { point_chooser_exports as a } from "./number-line/point-chooser/index.js";
3
3
  import { tick_utils_exports as o } from "./number-line/graph/tick-utils.js";
4
- import s from "./number-line/graph/index.js";
5
- import c from "./number-line/index.js";
4
+ import { NumberLineGraph as s } from "./number-line/graph/index.js";
5
+ import { NumberLine as c } from "./number-line/index.js";
6
6
  import l from "react";
7
7
  import { cloneDeep as u } from "@pie-element/shared-lodash";
8
8
  import { createRoot as d } from "react-dom/client";
@@ -102,7 +102,7 @@ var p = class extends HTMLElement {
102
102
  }
103
103
  }
104
104
  disconnectedCallback() {
105
- this._disconnectMathObserver(), this._root && this._root.unmount();
105
+ this._disconnectMathObserver(), this._root &&= (this._root.unmount(), null);
106
106
  }
107
107
  };
108
108
  //#endregion
@@ -24,4 +24,4 @@ a.propTypes = {
24
24
  direction: "left"
25
25
  };
26
26
  //#endregion
27
- export { a as default };
27
+ export { a as Arrow, a as default };
@@ -1,5 +1,5 @@
1
1
  import { Draggable as e } from "../../../draggable/index.js";
2
- import t from "./point.js";
2
+ import { Point as t } from "./point.js";
3
3
  import { basePropTypes as n } from "./base.js";
4
4
  import r from "react";
5
5
  import { styled as i } from "@mui/material/styles";
@@ -185,4 +185,4 @@ var d = "150ms", f = i("g")(({ $disabled: e, $selected: t, $correct: n }) => ({
185
185
  }
186
186
  };
187
187
  //#endregion
188
- export { p as default };
188
+ export { p as Line, p as default };
@@ -66,8 +66,8 @@ var s = "150ms", c = n("circle")(({ $selected: e, $disabled: t, $correct: n, $em
66
66
  };
67
67
  render() {
68
68
  let { onDragStop: t, onDragStart: n, onDrag: r, onClick: s, onMove: l, interval: u, y: d, bounds: f, selected: p, position: m, disabled: h, correct: g, empty: _ } = this.props, { snapValue: v, xScale: y } = this.context, b = y(u) - y(0), x = (e) => {
69
- let t = e + y(0);
70
- return v(m + y.invert(t));
69
+ let t = e + y(0), n = y.invert(t);
70
+ return v(m + n);
71
71
  }, S = f ? {
72
72
  left: f.left / u * b,
73
73
  right: f.right / u * b
@@ -90,7 +90,8 @@ var s = "150ms", c = n("circle")(({ $selected: e, $disabled: t, $correct: n, $em
90
90
  s && s();
91
91
  return;
92
92
  }
93
- l(x(e));
93
+ let n = x(e);
94
+ l(n);
94
95
  },
95
96
  children: ({ setNodeRef: e, attributes: t, listeners: n, translateX: r, isDragging: s, onMouseDown: l }) => /* @__PURE__ */ a("g", {
96
97
  ref: e,
@@ -124,4 +125,4 @@ var s = "150ms", c = n("circle")(({ $selected: e, $disabled: t, $correct: n, $em
124
125
  }
125
126
  };
126
127
  //#endregion
127
- export { l as default };
128
+ export { l as Point, l as default };
@@ -1,7 +1,7 @@
1
- import e from "./point.js";
1
+ import { Point as e } from "./point.js";
2
2
  import { basePropTypes as t } from "./base.js";
3
3
  import { correct as n, incorrect as r, selected as i } from "../../colors.js";
4
- import a from "../arrow.js";
4
+ import { Arrow as a } from "../arrow.js";
5
5
  import o from "react";
6
6
  import { styled as s } from "@mui/material/styles";
7
7
  import c from "prop-types";
@@ -127,4 +127,4 @@ var p = s("g")(({ $selected: e, $correct: t }) => ({
127
127
  }
128
128
  };
129
129
  //#endregion
130
- export { h as default };
130
+ export { h as Ray, h as default };
@@ -1,10 +1,10 @@
1
1
  import { snapTo as e } from "./tick-utils.js";
2
- import t from "./elements/point.js";
3
- import n from "./elements/line.js";
4
- import r from "./arrow.js";
5
- import i from "./elements/ray.js";
2
+ import { Point as t } from "./elements/point.js";
3
+ import { Line as n } from "./elements/line.js";
4
+ import { Arrow as r } from "./arrow.js";
5
+ import { Ray as i } from "./elements/ray.js";
6
6
  import a from "./line.js";
7
- import o from "./ticks.js";
7
+ import { Ticks as o } from "./ticks.js";
8
8
  import s from "./stacks.js";
9
9
  import c from "../transitions/fade.js";
10
10
  import l, { createElement as u } from "react";
@@ -193,4 +193,4 @@ var b = (e, t, n, r) => {
193
193
  }
194
194
  };
195
195
  //#endregion
196
- export { x as default };
196
+ export { x as NumberLineGraph, x as default };
@@ -24,4 +24,4 @@ a.propTypes = {
24
24
  };
25
25
  var o = r(i)(a);
26
26
  //#endregion
27
- export { o as default };
27
+ export { a as Line, o as default };
@@ -37,4 +37,4 @@ function t(e) {
37
37
  };
38
38
  }
39
39
  //#endregion
40
- export { e as default };
40
+ export { t as Stack, e as default };
@@ -218,7 +218,7 @@ var a = /* @__PURE__ */ e({
218
218
  if (r(e)) return t.fraction(e.n * e.s, e.d);
219
219
  if (n(e)) return t.fraction(e);
220
220
  }, b = (e, n, r, i) => {
221
- let a = i ? i.limit !== !1 : !0, o = _(e, n), s = a ? g(y(r.minor), o.min, o.max) : y(r.minor), c = a ? g(y(r.major), s, t.multiply(s, 20)) : y(r.major);
221
+ let a = !i || i.limit !== !1, o = _(e, n), s = a ? g(y(r.minor), o.min, o.max) : y(r.minor), c = a ? g(y(r.major), s, t.multiply(s, 20)) : y(r.major);
222
222
  if (!v(c, s)) {
223
223
  let e = t.divide(c, s), n = e <= 2 ? 2 : Math.round(e);
224
224
  return {
@@ -292,4 +292,4 @@ var a = /* @__PURE__ */ e({
292
292
  return Number.isFinite(r) && (a.size = r), a;
293
293
  });
294
294
  //#endregion
295
- export { w as buildTickData, C as generateMajorValuesForMinor, S as generateMinorValues, _ as getMinorLimits, D as snapElements, E as snapTo, a as tick_utils_exports };
295
+ export { w as buildTickData, x as buildTickDataAsFractions, h as closeTo, o as decimalTickValues, y as fraction, l as fractionRange, T as fractionSnapTo, s as fractionTickValues, C as generateMajorValuesForMinor, S as generateMinorValues, _ as getMinorLimits, v as isMultiple, c as labelMultiplier, b as normalizeTicks, m as simpleRange, D as snapElements, E as snapTo, a as tick_utils_exports, u as zbrErrorMessage, d as zeroBasedRange };
@@ -112,4 +112,4 @@ var s = n("text")({
112
112
  }
113
113
  };
114
114
  //#endregion
115
- export { d as default };
115
+ export { u as Tick, l as TickValidator, d as Ticks, d as default };
@@ -1,5 +1,5 @@
1
- import e from "./point-chooser/index.js";
2
- import t from "./graph/index.js";
1
+ import { PointChooser as e } from "./point-chooser/index.js";
2
+ import { NumberLineGraph as t } from "./graph/index.js";
3
3
  import n from "./feedback.js";
4
4
  import { buildElementModel as r } from "./graph/elements/builder.js";
5
5
  import i from "react";
@@ -212,4 +212,4 @@ var w = C(_, "UiLayout") || C(k.UiLayout, "UiLayout"), T = C(g, "PreviewPrompt")
212
212
  }
213
213
  };
214
214
  //#endregion
215
- export { I as default };
215
+ export { t as Graph, I as NumberLine, I as default };
@@ -151,4 +151,4 @@ var x = i("div")({
151
151
  };
152
152
  w.DEFAULT_TYPE = "pf";
153
153
  //#endregion
154
- export { w as default, l as point_chooser_exports };
154
+ export { v as Point, w as PointChooser, w as default, l as point_chooser_exports };