@wandelbots/wandelbots-js-react-components 4.7.1 → 4.7.2-pr.ci-storybook-fixes.564.bf1f9c8

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 (41) hide show
  1. package/README.md +11 -11
  2. package/dist/3d.cjs.js +1 -1
  3. package/dist/3d.es.js +1 -1
  4. package/dist/{MotionGroupVisualizer-7Mw9PINy.js → MotionGroupVisualizer-BoO_BDsJ.js} +106 -65
  5. package/dist/MotionGroupVisualizer-BoO_BDsJ.js.map +1 -0
  6. package/dist/MotionGroupVisualizer-ylYruUuf.cjs +2 -0
  7. package/dist/MotionGroupVisualizer-ylYruUuf.cjs.map +1 -0
  8. package/dist/auth0-spa-js.production.esm-CVEdrQ4-.cjs +5 -0
  9. package/dist/auth0-spa-js.production.esm-CVEdrQ4-.cjs.map +1 -0
  10. package/dist/auth0-spa-js.production.esm-Cr9w0sUa.js +4217 -0
  11. package/dist/auth0-spa-js.production.esm-Cr9w0sUa.js.map +1 -0
  12. package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +1 -1
  13. package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
  14. package/dist/core.cjs.js +1 -1
  15. package/dist/core.es.js +2 -2
  16. package/dist/externalizeComponent-B98tgTPP.cjs.map +1 -1
  17. package/dist/externalizeComponent-BOqKMZMc.js.map +1 -1
  18. package/dist/index.cjs.js +1 -1
  19. package/dist/index.es.js +3 -3
  20. package/dist/{interpolation-B8AcxfdD.js → interpolation-CkcF45RM.js} +11 -11
  21. package/dist/interpolation-CkcF45RM.js.map +1 -0
  22. package/dist/{interpolation-SWzo5zr4.cjs → interpolation-Cz4R9uG8.cjs} +2 -2
  23. package/dist/interpolation-Cz4R9uG8.cjs.map +1 -0
  24. package/dist/lib/ConnectedMotionGroup.d.ts +2 -2
  25. package/dist/{theming-CatQaIl_.cjs → theming-BgfhMFqK.cjs} +35 -35
  26. package/dist/theming-BgfhMFqK.cjs.map +1 -0
  27. package/dist/{theming-BKpqgTRM.js → theming-BnMMTVZV.js} +1985 -1985
  28. package/dist/theming-BnMMTVZV.js.map +1 -0
  29. package/package.json +15 -8
  30. package/src/components/3d-viewport/SafetyZonesRenderer.tsx +122 -78
  31. package/dist/MotionGroupVisualizer-7Mw9PINy.js.map +0 -1
  32. package/dist/MotionGroupVisualizer-C0ll-LQF.cjs +0 -2
  33. package/dist/MotionGroupVisualizer-C0ll-LQF.cjs.map +0 -1
  34. package/dist/auth0-spa-js.production.esm-DNao6_S5.js +0 -4064
  35. package/dist/auth0-spa-js.production.esm-DNao6_S5.js.map +0 -1
  36. package/dist/auth0-spa-js.production.esm-DaBMfOV8.cjs +0 -5
  37. package/dist/auth0-spa-js.production.esm-DaBMfOV8.cjs.map +0 -1
  38. package/dist/interpolation-B8AcxfdD.js.map +0 -1
  39. package/dist/interpolation-SWzo5zr4.cjs.map +0 -1
  40. package/dist/theming-BKpqgTRM.js.map +0 -1
  41. package/dist/theming-CatQaIl_.cjs.map +0 -1
package/README.md CHANGED
@@ -13,7 +13,7 @@ See the [Storybook](https://wandelbotsgmbh.github.io/wandelbots-js-react-compone
13
13
  ## Install
14
14
 
15
15
  ```bash
16
- npm install @wandelbots/wandelbots-js-react-components react react-dom @mui/material @emotion/react @emotion/styled
16
+ pnpm add @wandelbots/wandelbots-js-react-components react react-dom @mui/material @emotion/react @emotion/styled
17
17
  ```
18
18
 
19
19
  Some modules require extra dependencies, like three.js. If you don't need 3D rendering in your application, always import from `/core`.
@@ -42,7 +42,7 @@ import { WandelscriptEditor } from "@wandelbots/wandelbots-js-react-components/w
42
42
  You can also import from the top-level package, but then you'll need to provide all optional dependencies:
43
43
 
44
44
  ```bash
45
- npm install @wandelbots/wandelbots-js-react-components \
45
+ pnpm add @wandelbots/wandelbots-js-react-components \
46
46
  react react-dom \
47
47
  @mui/material @mui/icons-material @emotion/react @emotion/styled \
48
48
  three @react-three/fiber @react-three/drei three-stdlib \
@@ -241,8 +241,8 @@ To set up the project for development:
241
241
  ```bash
242
242
  git clone https://github.com/wandelbotsgmbh/wandelbots-js-react-components.git
243
243
  cd wandelbots-js-react-components
244
- npm install
245
- npm run dev # Start Storybook development server
244
+ pnpm install
245
+ pnpm dev # Start Storybook development server
246
246
  ```
247
247
 
248
248
  ## Robot Model Testing
@@ -252,9 +252,9 @@ View Robot Models in web view:
252
252
  ```bash
253
253
  git clone https://github.com/wandelbotsgmbh/wandelbots-js-react-components.git
254
254
  cd wandelbots-js-react-components
255
- npm install
256
- npm run td <instanceProviderURL> # instanceProviderURL can be provided via an instanceProviderConfig.json file. The entire command can be substituted by writing a nova instance ip into a file named .env.local
257
- npm run dev # Start Storybook development server
255
+ pnpm install
256
+ pnpm td <instanceProviderURL> # instanceProviderURL can be provided via an instanceProviderConfig.json file. The entire command can be substituted by writing a nova instance ip into a file named .env.local
257
+ pnpm dev # Start Storybook development server
258
258
  ```
259
259
 
260
260
  instanceProviderConfig.json file:
@@ -275,12 +275,12 @@ CELL_ID=cell
275
275
  Build and test the package locally:
276
276
 
277
277
  ```bash
278
- npm run build
279
- npm pack
280
- npm install /path/to/wandelbots-wandelbots-js-react-components-x.x.x.tgz
278
+ pnpm build
279
+ pnpm pack
280
+ pnpm add /path/to/wandelbots-wandelbots-js-react-components-x.x.x.tgz
281
281
  ```
282
282
 
283
- > **Note:** Use `npm install` with the `.tgz` file instead of `npm link` due to peer dependency requirements with React Three Fiber components.
283
+ > **Note:** Use `pnpm add` with the `.tgz` file instead of `pnpm link` due to peer dependency requirements with React Three Fiber components.
284
284
 
285
285
  ## Contributing
286
286
 
package/dist/3d.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MotionGroupVisualizer-C0ll-LQF.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.LinearAxis=e.LinearAxis;exports.MANUFACTURER_HOME_CONFIGS=e.MANUFACTURER_HOME_CONFIGS;exports.MotionGroupVisualizer=e.MotionGroupVisualizer;exports.PresetEnvironment=e.PresetEnvironment;exports.Robot=e.Robot;exports.RobotCard=e.RobotCard;exports.SafetyZonesRenderer=e.SafetyZonesRenderer;exports.SupportedLinearAxis=e.SupportedLinearAxis;exports.SupportedRobot=e.SupportedRobot;exports.TrajectoryRenderer=e.TrajectoryRenderer;exports.defaultAxisConfig=e.defaultAxisConfig;exports.defaultGetModel=e.defaultGetModel;exports.extractManufacturer=e.extractManufacturer;exports.getDefaultHomeConfig=e.getDefaultHomeConfig;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MotionGroupVisualizer-ylYruUuf.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.LinearAxis=e.LinearAxis;exports.MANUFACTURER_HOME_CONFIGS=e.MANUFACTURER_HOME_CONFIGS;exports.MotionGroupVisualizer=e.MotionGroupVisualizer;exports.PresetEnvironment=e.PresetEnvironment;exports.Robot=e.Robot;exports.RobotCard=e.RobotCard;exports.SafetyZonesRenderer=e.SafetyZonesRenderer;exports.SupportedLinearAxis=e.SupportedLinearAxis;exports.SupportedRobot=e.SupportedRobot;exports.TrajectoryRenderer=e.TrajectoryRenderer;exports.defaultAxisConfig=e.defaultAxisConfig;exports.defaultGetModel=e.defaultGetModel;exports.extractManufacturer=e.extractManufacturer;exports.getDefaultHomeConfig=e.getDefaultHomeConfig;
2
2
  //# sourceMappingURL=3d.cjs.js.map
package/dist/3d.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as o, L as r, M as s, a as t, P as n, R as i, b as d, S as f, c as u, d as R, T as l, e as C, f as p, g as M, h as S } from "./MotionGroupVisualizer-7Mw9PINy.js";
1
+ import { C as o, L as r, M as s, h as t, P as n, b as i, R as d, S as f, c as u, f as R, T as l, a as C, d as p, e as M, g as S } from "./MotionGroupVisualizer-BoO_BDsJ.js";
2
2
  export {
3
3
  o as CollisionSceneRenderer,
4
4
  r as LinearAxis,
@@ -2,13 +2,13 @@ import { j as e, d as Te, v as Z, o as Se, e as U } from "./externalizeComponent
2
2
  import * as g from "three";
3
3
  import { Matrix4 as R, Vector3 as k, Quaternion as B } from "three";
4
4
  import { ConvexGeometry as W, RoundedBoxGeometry as Ge } from "three-stdlib";
5
- import ke, { useEffect as M, useMemo as C, useRef as _, useCallback as G, useState as A, Suspense as ae } from "react";
6
- import { useThree as le, useFrame as ce, Canvas as z } from "@react-three/fiber";
5
+ import { useThree as ae, useFrame as le, Canvas as z } from "@react-three/fiber";
6
+ import ke, { useEffect as M, useMemo as C, useRef as _, useCallback as G, useState as A, Suspense as ce } from "react";
7
7
  import { Environment as Ae, Lightformer as L, Line as $, useGLTF as Le, Bounds as ee } from "@react-three/drei";
8
8
  import { useTheme as Fe, Card as Pe, Box as v, Typography as te, Divider as re, Button as ne } from "@mui/material";
9
9
  import { observer as Ve } from "mobx-react-lite";
10
10
  import { useTranslation as Ie } from "react-i18next";
11
- import { N as De, V as ue, c as pe, b as se, M as T, J as O } from "./interpolation-B8AcxfdD.js";
11
+ import { N as De, V as ue, c as pe, b as se, M as T, J as O } from "./interpolation-CkcF45RM.js";
12
12
  import { ErrorBoundary as de } from "react-error-boundary";
13
13
  function Oe(t) {
14
14
  switch (t.shape_type) {
@@ -187,13 +187,23 @@ function lt({
187
187
  polygonOffset: !0
188
188
  }, s = Te(n ?? []);
189
189
  M(() => {
190
- Array.isArray(t) && console.warn("SafetyZonesRenderer: The support of V1 safety zones is deprecated. Please migrate to V2 safety zones.");
190
+ Array.isArray(t) && console.warn(
191
+ "SafetyZonesRenderer: The support of V1 safety zones is deprecated. Please migrate to V2 safety zones."
192
+ );
191
193
  }, [t]);
192
194
  const f = (p, i) => {
193
195
  var m, j;
194
196
  if (!((m = i == null ? void 0 : i.pose) != null && m.position) || !((j = i == null ? void 0 : i.pose) != null && j.orientation))
195
197
  return null;
196
- const o = new g.Vector3(i.pose.position[0] / 1e3, i.pose.position[1] / 1e3, i.pose.position[2] / 1e3), a = new g.Vector3(i.pose.orientation[0], i.pose.orientation[1], i.pose.orientation[2]);
198
+ const o = new g.Vector3(
199
+ i.pose.position[0] / 1e3,
200
+ i.pose.position[1] / 1e3,
201
+ i.pose.position[2] / 1e3
202
+ ), a = new g.Vector3(
203
+ i.pose.orientation[0],
204
+ i.pose.orientation[1],
205
+ i.pose.orientation[2]
206
+ );
197
207
  let c;
198
208
  const y = i.shape.shape_type === "plane" ? { ...l, side: g.DoubleSide } : { ...l, side: g.FrontSide };
199
209
  switch (i.shape.shape_type) {
@@ -235,7 +245,13 @@ function lt({
235
245
  x.push(F);
236
246
  }
237
247
  try {
238
- c = /* @__PURE__ */ e.jsx("primitive", { object: new W(x), attach: "geometry" });
248
+ c = /* @__PURE__ */ e.jsx(
249
+ "primitive",
250
+ {
251
+ object: new W(x),
252
+ attach: "geometry"
253
+ }
254
+ );
239
255
  } catch (b) {
240
256
  return console.log("Error creating ConvexGeometry:", b), null;
241
257
  }
@@ -250,11 +266,20 @@ function lt({
250
266
  */
251
267
  case "rectangular_capsule": {
252
268
  const x = i.shape, w = x.radius / 1e3, b = x.sphere_center_distance_x / 1e3, F = x.sphere_center_distance_y / 1e3, H = w * 2;
253
- c = /* @__PURE__ */ e.jsx("primitive", { object: new Ge(b, F, H, 2, w), attach: "geometry" });
269
+ c = /* @__PURE__ */ e.jsx(
270
+ "primitive",
271
+ {
272
+ object: new Ge(b, F, H, 2, w),
273
+ attach: "geometry"
274
+ }
275
+ );
254
276
  break;
255
277
  }
256
278
  default:
257
- console.warn("Unsupported safety zone shape type:", i.shape.shape_type), c = null;
279
+ console.warn(
280
+ "Unsupported safety zone shape type:",
281
+ i.shape.shape_type
282
+ ), c = null;
258
283
  }
259
284
  return /* @__PURE__ */ e.jsxs(
260
285
  "mesh",
@@ -264,53 +289,69 @@ function lt({
264
289
  quaternion: Se(a),
265
290
  children: [
266
291
  c,
267
- /* @__PURE__ */ e.jsx(
268
- "meshStandardMaterial",
269
- {
270
- ...y,
271
- polygonOffsetFactor: -p
272
- }
273
- )
292
+ /* @__PURE__ */ e.jsx("meshStandardMaterial", { ...y, polygonOffsetFactor: -p })
274
293
  ]
275
294
  },
276
295
  `safety-zone-${i.shape.shape_type}-${p}`
277
296
  );
278
- }, u = () => Object.values(t ?? {}).map((p, i) => f(i, p)), h = () => Array.isArray(t) ? t.map((p, i) => {
279
- let o = [];
280
- return p.geometry && (p.geometry.compound ? o = p.geometry.compound.child_geometries : p.geometry.convex_hull && (o = [p.geometry])), o.map((a, c) => {
281
- if (!a.convex_hull) return null;
282
- const y = a.convex_hull.vertices.map(
283
- (x) => new g.Vector3(x.x / 1e3, x.y / 1e3, x.z / 1e3)
284
- ), m = Z(y);
285
- if (m.isCoplanar && m.normal) {
286
- const w = new g.Vector3().addVectors(
287
- y[0],
288
- m.normal.multiplyScalar(1e-4)
297
+ }, u = () => Object.values(t ?? {}).map(
298
+ (p, i) => f(i, p)
299
+ ), h = () => Array.isArray(t) ? t.map(
300
+ (p, i) => {
301
+ let o = [];
302
+ return p.geometry && (p.geometry.compound ? o = p.geometry.compound.child_geometries : p.geometry.convex_hull && (o = [p.geometry])), o.map((a, c) => {
303
+ if (!a.convex_hull) return null;
304
+ const y = a.convex_hull.vertices.map(
305
+ (x) => new g.Vector3(x.x / 1e3, x.y / 1e3, x.z / 1e3)
306
+ ), m = Z(y);
307
+ if (m.isCoplanar && m.normal) {
308
+ const w = new g.Vector3().addVectors(
309
+ y[0],
310
+ m.normal.multiplyScalar(1e-4)
311
+ );
312
+ y.push(w);
313
+ }
314
+ let j;
315
+ try {
316
+ j = new W(y);
317
+ } catch (x) {
318
+ return console.log("Error creating ConvexGeometry:", x), null;
319
+ }
320
+ return /* @__PURE__ */ e.jsx(
321
+ "mesh",
322
+ {
323
+ position: new g.Vector3(
324
+ a.init_pose.position.x,
325
+ a.init_pose.position.y,
326
+ a.init_pose.position.z
327
+ ),
328
+ quaternion: new g.Quaternion(
329
+ a.init_pose.orientation.x,
330
+ a.init_pose.orientation.y,
331
+ a.init_pose.orientation.z,
332
+ a.init_pose.orientation.w
333
+ ),
334
+ geometry: j,
335
+ children: /* @__PURE__ */ e.jsx(
336
+ "meshStandardMaterial",
337
+ {
338
+ attach: "material",
339
+ color: "#009f4d",
340
+ opacity: 0.2,
341
+ depthTest: !1,
342
+ depthWrite: !1,
343
+ transparent: !0,
344
+ polygonOffset: !0,
345
+ polygonOffsetFactor: -c
346
+ },
347
+ i
348
+ )
349
+ },
350
+ `${i}-${c}`
289
351
  );
290
- y.push(w);
291
- }
292
- let j;
293
- try {
294
- j = new W(y);
295
- } catch (x) {
296
- return console.log("Error creating ConvexGeometry:", x), null;
297
- }
298
- return /* @__PURE__ */ e.jsx("mesh", { geometry: j, children: /* @__PURE__ */ e.jsx(
299
- "meshStandardMaterial",
300
- {
301
- attach: "material",
302
- color: "#009f4d",
303
- opacity: 0.2,
304
- depthTest: !1,
305
- depthWrite: !1,
306
- transparent: !0,
307
- polygonOffset: !0,
308
- polygonOffsetFactor: -c
309
- },
310
- i
311
- ) }, `${i}-${c}`);
312
- });
313
- }) : null, d = C(() => Array.isArray(t) ? h() : u(), [t, h, u]);
352
+ });
353
+ }
354
+ ) : null, d = C(() => Array.isArray(t) ? h() : u(), [t, h, u]);
314
355
  return /* @__PURE__ */ e.jsx("group", { ...r, children: d });
315
356
  }
316
357
  function ct({
@@ -390,7 +431,7 @@ function xe({
390
431
  onRotationChanged: r,
391
432
  children: l
392
433
  }) {
393
- const s = _([]), f = _([]), u = _(null), { invalidate: h } = le();
434
+ const s = _([]), f = _([]), u = _(null), { invalidate: h } = ae();
394
435
  M(() => {
395
436
  const o = t.joint_position.filter(
396
437
  (a) => a !== void 0
@@ -405,7 +446,7 @@ function xe({
405
446
  var a;
406
447
  (a = u.current) == null || a.destroy();
407
448
  };
408
- }, []), ce((o, a) => {
449
+ }, []), le((o, a) => {
409
450
  if (u.current) {
410
451
  const c = u.current.update(a);
411
452
  p(), c || h();
@@ -680,7 +721,7 @@ const je = (t, n) => {
680
721
  console.warn(c);
681
722
  },
682
723
  children: [
683
- /* @__PURE__ */ e.jsx(ae, { fallback: a, children: /* @__PURE__ */ e.jsx("group", { ref: o, children: /* @__PURE__ */ e.jsx(
724
+ /* @__PURE__ */ e.jsx(ce, { fallback: a, children: /* @__PURE__ */ e.jsx("group", { ref: o, children: /* @__PURE__ */ e.jsx(
684
725
  xe,
685
726
  {
686
727
  rapidlyChangingMotionState: t,
@@ -1076,7 +1117,7 @@ function Re({
1076
1117
  onTranslationChanged: r,
1077
1118
  children: l
1078
1119
  }) {
1079
- const s = _([]), f = _([]), u = _(null), { invalidate: h } = le();
1120
+ const s = _([]), f = _([]), u = _(null), { invalidate: h } = ae();
1080
1121
  M(() => {
1081
1122
  const o = t.joint_position.filter(
1082
1123
  (a) => a !== void 0
@@ -1091,7 +1132,7 @@ function Re({
1091
1132
  var a;
1092
1133
  (a = u.current) == null || a.destroy();
1093
1134
  };
1094
- }, []), ce((o, a) => {
1135
+ }, []), le((o, a) => {
1095
1136
  if (u.current) {
1096
1137
  const c = u.current.update(a);
1097
1138
  p(), c || h();
@@ -1229,7 +1270,7 @@ const _e = U(
1229
1270
  console.warn(c);
1230
1271
  },
1231
1272
  children: [
1232
- /* @__PURE__ */ e.jsx(ae, { fallback: a, children: /* @__PURE__ */ e.jsx("group", { ref: o, children: /* @__PURE__ */ e.jsx(
1273
+ /* @__PURE__ */ e.jsx(ce, { fallback: a, children: /* @__PURE__ */ e.jsx("group", { ref: o, children: /* @__PURE__ */ e.jsx(
1233
1274
  Re,
1234
1275
  {
1235
1276
  rapidlyChangingMotionState: t,
@@ -1351,16 +1392,16 @@ export {
1351
1392
  dt as L,
1352
1393
  ie as M,
1353
1394
  oe as P,
1354
- Ye as R,
1395
+ ut as R,
1355
1396
  lt as S,
1356
1397
  ct as T,
1357
- ht as a,
1358
- ut as b,
1398
+ pt as a,
1399
+ Ye as b,
1359
1400
  _e as c,
1360
- be as d,
1361
- pt as e,
1362
- E as f,
1363
- Xe as g,
1364
- ft as h
1401
+ E as d,
1402
+ Xe as e,
1403
+ be as f,
1404
+ ft as g,
1405
+ ht as h
1365
1406
  };
1366
- //# sourceMappingURL=MotionGroupVisualizer-7Mw9PINy.js.map
1407
+ //# sourceMappingURL=MotionGroupVisualizer-BoO_BDsJ.js.map