frame.identify 0.4.0 → 0.4.2

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 +1 @@
1
- {"version":3,"file":"EnterValues.d.ts","sourceRoot":"","sources":["../src/EnterValues.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAK3C,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BAgGA"}
1
+ {"version":3,"file":"EnterValues.d.ts","sourceRoot":"","sources":["../src/EnterValues.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAK3C,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BA4HA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalImageCropped.d.ts","sourceRoot":"","sources":["../src/ModalImageCropped.tsx"],"names":[],"mappings":"AASA,OAAO,EAUL,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAG1B;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BA2tBA"}
1
+ {"version":3,"file":"ModalImageCropped.d.ts","sourceRoot":"","sources":["../src/ModalImageCropped.tsx"],"names":[],"mappings":"AASA,OAAO,EAUL,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAG1B;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BAqtBA"}
@@ -4494,9 +4494,16 @@ function es(e) {
4494
4494
  //#endregion
4495
4495
  //#region src/EnterValues.tsx
4496
4496
  function ts(e) {
4497
- let [t, n] = a(e.testMode ? "50" : ""), [r, i] = a(e.testMode ? "44" : ""), [l, u] = a(e.testMode ? "15" : ""), d = T(e.actor, (e) => e), f = (e, t) => {
4498
- let n = parseFloat(e);
4499
- t(n < 0 ? "Number must be\npositive" : n === 0 ? "Number must not be zero" : n > 40 ? "Number must not be\ngreater than 40" : "");
4497
+ let [t, n] = a(e.testMode ? "50" : ""), [r, i] = a(e.testMode ? "44" : ""), [l, u] = a(e.testMode ? "15" : ""), d = T(e.actor, (e) => e), f = (e, t, n, r) => {
4498
+ let i = parseFloat(t);
4499
+ n(i <= 0 ? v("main.identify.error.positive", { field: e }) : i > r ? v("main.identify.error.notGreaterThan", {
4500
+ field: e,
4501
+ max: r,
4502
+ defaultValue: v("main.identify.error.notGreaterThan", {
4503
+ field: e,
4504
+ max: r
4505
+ })
4506
+ }) : "");
4500
4507
  }, p = {
4501
4508
  textTransform: "none",
4502
4509
  width: "calc(100% - 100px)",
@@ -4505,13 +4512,13 @@ function ts(e) {
4505
4512
  };
4506
4513
  function h(t, n, r) {
4507
4514
  e.actor.send({
4508
- type: "ENTER_VALUES",
4515
+ type: Bo,
4509
4516
  SL: Number(t),
4510
4517
  SH: Number(n),
4511
4518
  AZG: Number(r)
4512
4519
  });
4513
4520
  }
4514
- let _ = d.value === "Values defined" || t === "0" || r === "0" || l === "0", { t: v } = m();
4521
+ let _ = d.value === "Image loaded" && Number(t) > 0 && Number(t) < 80 && Number(r) > 0 && Number(r) < 60 && Number(l) > 0 && Number(l) < 20, { t: v } = m();
4515
4522
  return /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s("form", {
4516
4523
  onSubmit: (e) => {
4517
4524
  e.preventDefault(), h(t, r, l);
@@ -4531,7 +4538,7 @@ function ts(e) {
4531
4538
  children: [
4532
4539
  /* @__PURE__ */ s(es, {
4533
4540
  value: t,
4534
- checkValue: f,
4541
+ checkValue: (e, t) => f("SL", e, t, 80),
4535
4542
  onChange: n,
4536
4543
  label: v("main.identify.label.scheibenlaenge", { defaultValue: "box length" }),
4537
4544
  dataTestid: "scheibenlaenge-input",
@@ -4539,14 +4546,14 @@ function ts(e) {
4539
4546
  }),
4540
4547
  /* @__PURE__ */ s(es, {
4541
4548
  value: r,
4542
- checkValue: f,
4549
+ checkValue: (e, t) => f("SH", e, t, 60),
4543
4550
  onChange: i,
4544
4551
  label: v("main.identify.label.scheibenhoehe", { defaultValue: "box height" }),
4545
4552
  dataTestid: "scheibenhoehe-input"
4546
4553
  }),
4547
4554
  /* @__PURE__ */ s(es, {
4548
4555
  value: l,
4549
- checkValue: f,
4556
+ checkValue: (e, t) => f("AzG", e, t, 20),
4550
4557
  onChange: u,
4551
4558
  label: v("main.identify.label.azg", { defaultValue: "distance between lenses" }),
4552
4559
  dataTestid: "azg-input"
@@ -4556,7 +4563,7 @@ function ts(e) {
4556
4563
  color: "secondary",
4557
4564
  variant: "contained",
4558
4565
  size: "small",
4559
- disabled: _,
4566
+ disabled: !_,
4560
4567
  sx: p,
4561
4568
  type: "submit",
4562
4569
  children: v("main.identify.button.confirmValues")
@@ -6393,8 +6400,8 @@ function Fc(e) {
6393
6400
  x: e.x * t,
6394
6401
  y: e.y * (n ?? t)
6395
6402
  })), []), ee = (e) => {
6396
- let t = e[0], n = e[1], r = -Math.atan2(t.y, t.x), i = -Math.atan2(n.y, n.x);
6397
- return console.log(`pt1: (${t.x}, ${t.y}), angle1: ${r}`), console.log(`pt2: (${n.x}, ${n.y}), angle2: ${i}`), r > i;
6403
+ let t = e[0], n = e[1];
6404
+ return -Math.atan2(t.y, t.x) > -Math.atan2(n.y, n.x);
6398
6405
  }, te = n((e, t, n, r = !1) => {
6399
6406
  let i = Mc(n, w ? "akima" : "catmull"), a = -Infinity, o = Infinity, s = -Infinity, c = Infinity, l = Array.from({ length: 128 }, (e, t) => {
6400
6407
  let n = i(t * 2 * Math.PI / 128);
@@ -6407,8 +6414,8 @@ function Fc(e) {
6407
6414
  })).map((e) => ({
6408
6415
  x: e.x,
6409
6416
  y: -e.y
6410
- })), u = I(i, r), d = ee(u);
6411
- return d || u.reverse(), d = ee(u), console.log(`isCounterClockwise after reverse: ${d}`), u;
6417
+ })), u = I(i, r);
6418
+ return ee(u) || u.reverse(), u;
6412
6419
  }
6413
6420
  return l;
6414
6421
  }, [w, I]);
@@ -6542,7 +6549,7 @@ function Fc(e) {
6542
6549
  return e.splice(n, 1), e;
6543
6550
  }
6544
6551
  return t;
6545
- }) : (console.log(` adding point at (${e.x}, ${e.y})`), p((t) => [...t, e]), oe(Yo));
6552
+ }) : (p((t) => [...t, e]), oe(Yo));
6546
6553
  }
6547
6554
  }
6548
6555
  function fe(e) {