@wandelbots/wandelbots-js-react-components 4.2.0-pr.feat-JoggingPanelSupportForLinearAxis.514.4eb7fa6 → 4.2.0-pr.fix-RB-3142-yaskawa-turntable.515.cc983de

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.
@@ -4,13 +4,13 @@ import { Matrix4 as w, Vector3 as F, Quaternion as z } from "three";
4
4
  import { ConvexGeometry as te } from "three-stdlib";
5
5
  import { useThree as ne, useFrame as re, Canvas as N } from "@react-three/fiber";
6
6
  import { Environment as ve, Lightformer as G, Line as O, useGLTF as Me, Bounds as H } from "@react-three/drei";
7
- import { useTheme as _e, Card as Ae, Box as b, Typography as Y, Divider as q, Button as X } from "@mui/material";
8
- import { observer as Te } from "mobx-react-lite";
9
- import Fe, { useRef as R, useEffect as _, useCallback as M, useState as T, Suspense as oe, useMemo as Ge } from "react";
10
- import { useTranslation as Se } from "react-i18next";
7
+ import { useTheme as _e, Card as Te, Box as b, Typography as Y, Divider as q, Button as X } from "@mui/material";
8
+ import { observer as ke } from "mobx-react-lite";
9
+ import Fe, { useRef as R, useEffect as _, useCallback as M, useState as k, Suspense as oe, useMemo as Ge } from "react";
10
+ import { useTranslation as Le } from "react-i18next";
11
11
  import { N as se, V as ie, c as ae, b as Z, M as v } from "./interpolation-6ZZN4S_x.js";
12
12
  import { ErrorBoundary as le } from "react-error-boundary";
13
- function ke(e) {
13
+ function Ve(e) {
14
14
  switch (e.shape_type) {
15
15
  case "convex_hull":
16
16
  return new te(
@@ -47,7 +47,7 @@ function ke(e) {
47
47
  return console.warn(`${e.shape_type} is not supported`), new x.BufferGeometry();
48
48
  }
49
49
  }
50
- function Le({
50
+ function Pe({
51
51
  name: e,
52
52
  collider: r,
53
53
  children: n
@@ -64,19 +64,19 @@ function Le({
64
64
  i[2]
65
65
  ).divideScalar(1e3),
66
66
  rotation: new x.Euler(o[0], o[1], o[2], "XYZ"),
67
- geometry: ke(r.shape),
67
+ geometry: Ve(r.shape),
68
68
  children: n
69
69
  }
70
70
  );
71
71
  }
72
- function Ve({
72
+ function Se({
73
73
  name: e,
74
74
  colliders: r,
75
75
  meshChildrenProvider: n,
76
76
  ...i
77
77
  }) {
78
78
  return /* @__PURE__ */ t.jsx("group", { name: e, ...i, children: Object.entries(r).map(([o, u]) => /* @__PURE__ */ t.jsx(
79
- Le,
79
+ Pe,
80
80
  {
81
81
  name: o,
82
82
  collider: u,
@@ -91,7 +91,7 @@ function rt({
91
91
  }) {
92
92
  const n = e.colliders;
93
93
  return /* @__PURE__ */ t.jsx("group", { children: n && /* @__PURE__ */ t.jsx(
94
- Ve,
94
+ Se,
95
95
  {
96
96
  meshChildrenProvider: r,
97
97
  colliders: n
@@ -99,9 +99,9 @@ function rt({
99
99
  ) });
100
100
  }
101
101
  function Q() {
102
- return /* @__PURE__ */ t.jsx(ve, { children: /* @__PURE__ */ t.jsx(Pe, {}) });
102
+ return /* @__PURE__ */ t.jsx(ve, { children: /* @__PURE__ */ t.jsx(Ae, {}) });
103
103
  }
104
- function Pe({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
104
+ function Ae({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
105
105
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
106
106
  /* @__PURE__ */ t.jsx(
107
107
  G,
@@ -500,7 +500,7 @@ function he({
500
500
  postModelRender: n,
501
501
  ...i
502
502
  }) {
503
- const [o, u] = T(null);
503
+ const [o, u] = k(null);
504
504
  return _(() => {
505
505
  (async () => {
506
506
  try {
@@ -569,7 +569,7 @@ const pe = (e, r) => {
569
569
  instanceUrl: f,
570
570
  ...l
571
571
  }) => {
572
- const [d, m] = T(null), s = M((h) => {
572
+ const [d, m] = k(null), s = M((h) => {
573
573
  m(h);
574
574
  }, []);
575
575
  _(() => {
@@ -643,7 +643,7 @@ function We({
643
643
  ) : null;
644
644
  }
645
645
  const it = I(
646
- Te(
646
+ ke(
647
647
  ({
648
648
  robotName: e,
649
649
  programState: r,
@@ -658,31 +658,31 @@ const it = I(
658
658
  className: m
659
659
  }) => {
660
660
  var W;
661
- const s = _e(), { t: c } = Se(), [h, g] = T(!1), p = R(null), j = R(null), [y, D] = T(!1), [S, be] = T({ width: 400, height: 600 }), [$e, Re] = T(0);
661
+ const s = _e(), { t: c } = Le(), [h, g] = k(!1), p = R(null), j = R(null), [y, D] = k(!1), [L, be] = k({ width: 400, height: 600 }), [Je, Re] = k(0);
662
662
  _(() => {
663
- const P = () => {
663
+ const A = () => {
664
664
  if (j.current) {
665
- const { offsetWidth: $, offsetHeight: J } = j.current;
666
- D($ > J), be({ width: $, height: J });
665
+ const { offsetWidth: J, offsetHeight: K } = j.current;
666
+ D(J > K), be({ width: J, height: K });
667
667
  }
668
668
  };
669
- P();
670
- const K = new ResizeObserver(P);
671
- return j.current && K.observe(j.current), () => {
672
- K.disconnect();
669
+ A();
670
+ const $ = new ResizeObserver(A);
671
+ return j.current && $.observe(j.current), () => {
672
+ $.disconnect();
673
673
  };
674
674
  }, []);
675
675
  const E = M(() => {
676
- Re((P) => P + 1);
677
- }, []), k = M(() => {
676
+ Re((A) => A + 1);
677
+ }, []), V = M(() => {
678
678
  !o || !u || (g(!0), u());
679
- }, [o, u]), L = M(() => {
679
+ }, [o, u]), P = M(() => {
680
680
  !o || !a || (g(!1), a());
681
681
  }, [o, a]), B = M(() => {
682
682
  h && a && (g(!1), a());
683
- }, [h, a]), A = y ? S.width < 350 : S.height < 200, V = y ? S.height < 310 : S.height < 450;
683
+ }, [h, a]), T = y ? L.width < 350 : L.height < 200, S = y ? L.height < 310 : L.height < 450;
684
684
  return /* @__PURE__ */ t.jsx(
685
- Ae,
685
+ Te,
686
686
  {
687
687
  ref: j,
688
688
  className: m,
@@ -718,9 +718,9 @@ const it = I(
718
718
  mr: { xs: 0.75, sm: 1, md: 1.5 },
719
719
  overflow: "hidden",
720
720
  // Prevent content from affecting container size
721
- display: A ? "none" : "block"
721
+ display: T ? "none" : "block"
722
722
  },
723
- children: !A && /* @__PURE__ */ t.jsxs(
723
+ children: !T && /* @__PURE__ */ t.jsxs(
724
724
  N,
725
725
  {
726
726
  orthographic: !0,
@@ -763,7 +763,7 @@ const it = I(
763
763
  display: "flex",
764
764
  flexDirection: "column",
765
765
  justifyContent: "flex-start",
766
- width: A ? "100%" : "50%"
766
+ width: T ? "100%" : "50%"
767
767
  },
768
768
  children: [
769
769
  /* @__PURE__ */ t.jsxs(
@@ -799,7 +799,7 @@ const it = I(
799
799
  justifyContent: "space-between"
800
800
  },
801
801
  children: [
802
- !V && d && /* @__PURE__ */ t.jsxs(b, { children: [
802
+ !S && d && /* @__PURE__ */ t.jsxs(b, { children: [
803
803
  /* @__PURE__ */ t.jsx(d, {}),
804
804
  /* @__PURE__ */ t.jsx(
805
805
  q,
@@ -817,7 +817,7 @@ const it = I(
817
817
  b,
818
818
  {
819
819
  sx: {
820
- mt: !V && d ? "auto" : 0
820
+ mt: !S && d ? "auto" : 0
821
821
  },
822
822
  children: /* @__PURE__ */ t.jsx(
823
823
  b,
@@ -836,11 +836,11 @@ const it = I(
836
836
  color: "secondary",
837
837
  size: "small",
838
838
  disabled: !o,
839
- onMouseDown: k,
840
- onMouseUp: L,
839
+ onMouseDown: V,
840
+ onMouseUp: P,
841
841
  onMouseLeave: B,
842
- onTouchStart: k,
843
- onTouchEnd: L,
842
+ onTouchStart: V,
843
+ onTouchEnd: P,
844
844
  sx: {
845
845
  textTransform: "none",
846
846
  px: 1.5,
@@ -884,15 +884,15 @@ const it = I(
884
884
  b,
885
885
  {
886
886
  sx: {
887
- flex: A ? 0 : 1,
887
+ flex: T ? 0 : 1,
888
888
  position: "relative",
889
- minHeight: A ? 0 : { xs: 120, sm: 150, md: 200 },
890
- height: A ? 0 : "auto",
889
+ minHeight: T ? 0 : { xs: 120, sm: 150, md: 200 },
890
+ height: T ? 0 : "auto",
891
891
  borderRadius: 1,
892
892
  overflow: "hidden",
893
- display: A ? "none" : "block"
893
+ display: T ? "none" : "block"
894
894
  },
895
- children: !A && /* @__PURE__ */ t.jsxs(
895
+ children: !T && /* @__PURE__ */ t.jsxs(
896
896
  N,
897
897
  {
898
898
  orthographic: !0,
@@ -926,7 +926,7 @@ const it = I(
926
926
  }
927
927
  ),
928
928
  /* @__PURE__ */ t.jsxs(b, { children: [
929
- !V && d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
929
+ !S && d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
930
930
  /* @__PURE__ */ t.jsx(d, {}),
931
931
  /* @__PURE__ */ t.jsx(
932
932
  q,
@@ -946,7 +946,7 @@ const it = I(
946
946
  sx: {
947
947
  display: "flex",
948
948
  justifyContent: "flex-start",
949
- mt: !V && d ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
949
+ mt: !S && d ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
950
950
  mb: { xs: 0.5, sm: 0.75, md: 1 }
951
951
  },
952
952
  children: /* @__PURE__ */ t.jsx(
@@ -957,11 +957,11 @@ const it = I(
957
957
  color: "secondary",
958
958
  size: "small",
959
959
  disabled: !o,
960
- onMouseDown: k,
961
- onMouseUp: L,
960
+ onMouseDown: V,
961
+ onMouseUp: P,
962
962
  onMouseLeave: B,
963
- onTouchStart: k,
964
- onTouchEnd: L,
963
+ onTouchStart: V,
964
+ onTouchEnd: P,
965
965
  sx: {
966
966
  textTransform: "none",
967
967
  px: 1.5,
@@ -1118,7 +1118,7 @@ const we = I(
1118
1118
  instanceUrl: f,
1119
1119
  ...l
1120
1120
  }) => {
1121
- const [d, m] = T(null), s = M((h) => {
1121
+ const [d, m] = k(null), s = M((h) => {
1122
1122
  m(h);
1123
1123
  }, []);
1124
1124
  _(() => {
@@ -1224,7 +1224,7 @@ const ee = {
1224
1224
  0
1225
1225
  ]
1226
1226
  };
1227
- function Ke(e) {
1227
+ function $e(e) {
1228
1228
  const [r] = e.split("_");
1229
1229
  switch (r) {
1230
1230
  case "ABB":
@@ -1242,7 +1242,7 @@ function Ke(e) {
1242
1242
  }
1243
1243
  }
1244
1244
  function ct(e, r) {
1245
- const n = Ke(e);
1245
+ const n = $e(e);
1246
1246
  return n && n in ee ? ee[n] : r || null;
1247
1247
  }
1248
1248
  const ut = I((e) => {
@@ -1251,9 +1251,9 @@ const ut = I((e) => {
1251
1251
  inverseSolver: n,
1252
1252
  modelFromController: i,
1253
1253
  ...o
1254
- } = e, [u, a] = T(
1254
+ } = e, [u, a] = k(
1255
1255
  n
1256
- ), [, f] = T(!1), l = M(async () => {
1256
+ ), [, f] = k(!1), l = M(async () => {
1257
1257
  const m = new se({ instanceUrl: r });
1258
1258
  try {
1259
1259
  const s = await m.api.motionGroupModels.getMotionGroupKinematicModel(
@@ -1274,9 +1274,9 @@ const ut = I((e) => {
1274
1274
  const d = Ge(() => [
1275
1275
  "KUKA_DKP250",
1276
1276
  "KUKA_DKP500_2",
1277
- "YASKAWA_TURN1",
1278
- "YASKAWA_TURN2",
1279
- "YASKAWA_TURN3"
1277
+ "Yaskawa_TURN1",
1278
+ "Yaskawa_TURN2",
1279
+ "Yaskawa_TURN3"
1280
1280
  ].includes(i), [i]);
1281
1281
  return u || d ? /* @__PURE__ */ t.jsx(
1282
1282
  ge,
@@ -1308,7 +1308,7 @@ export {
1308
1308
  ge as d,
1309
1309
  at as e,
1310
1310
  U as f,
1311
- Ke as g,
1311
+ $e as g,
1312
1312
  ct as h
1313
1313
  };
1314
- //# sourceMappingURL=MotionGroupVisualizer-Ck631qIj.js.map
1314
+ //# sourceMappingURL=MotionGroupVisualizer-Dfilv6Y_.js.map