@wandelbots/wandelbots-js-react-components 1.6.0 → 1.7.1

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.
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "files": [
6
6
  "dist",
7
- "src"
7
+ "src",
8
+ "README.md"
8
9
  ],
9
10
  "type": "module",
10
11
  "module": "./dist/index.js",
@@ -83,7 +84,7 @@
83
84
  "@react-spring/three": ">=9",
84
85
  "@react-three/drei": ">=9",
85
86
  "@react-three/fiber": ">=8",
86
- "@wandelbots/wandelbots-js": ">=1",
87
+ "@wandelbots/wandelbots-js": "^1.6.0",
87
88
  "react": "^18.2.0",
88
89
  "react-dom": "^18.2.0",
89
90
  "three": ">=0.167",
@@ -103,6 +104,7 @@
103
104
  "lodash-es": "^4.17.21",
104
105
  "mobx": "^6.13.1",
105
106
  "mobx-react-lite": "^4.0.7",
107
+ "react-error-boundary": "^4.0.13",
106
108
  "react-i18next": "^15.0.0",
107
109
  "shiki": "^1.12.0"
108
110
  }
@@ -28,6 +28,7 @@ import type {
28
28
  import { DHRobot } from "./DHRobot"
29
29
 
30
30
  import * as THREE from "three"
31
+ import { ErrorBoundary } from "react-error-boundary"
31
32
 
32
33
  export type DHRobotProps = {
33
34
  rapidlyChangingMotionState: MotionGroupStateResponse
@@ -233,7 +234,7 @@ export function SupportedRobot({
233
234
  }
234
235
 
235
236
  return (
236
- <Suspense
237
+ <ErrorBoundary
237
238
  fallback={
238
239
  <DHRobot
239
240
  rapidlyChangingMotionState={rapidlyChangingMotionState}
@@ -242,14 +243,24 @@ export function SupportedRobot({
242
243
  />
243
244
  }
244
245
  >
245
- <group ref={setRobotRef}>
246
- <Robot
247
- rapidlyChangingMotionState={rapidlyChangingMotionState}
248
- modelURL={getModel(modelFromController)}
249
- dhParameters={dhParameters}
250
- {...props}
251
- />
252
- </group>
253
- </Suspense>
246
+ <Suspense
247
+ fallback={
248
+ <DHRobot
249
+ rapidlyChangingMotionState={rapidlyChangingMotionState}
250
+ dhParameters={dhParameters}
251
+ {...props}
252
+ />
253
+ }
254
+ >
255
+ <group ref={setRobotRef}>
256
+ <Robot
257
+ rapidlyChangingMotionState={rapidlyChangingMotionState}
258
+ modelURL={getModel(modelFromController)}
259
+ dhParameters={dhParameters}
260
+ {...props}
261
+ />
262
+ </group>
263
+ </Suspense>
264
+ </ErrorBoundary>
254
265
  )
255
266
  }
package/src/index.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./components/3d-viewport/SafetyZonesRenderer"
7
7
  export * from "./components/jogging/JoggingCartesianAxisControl"
8
8
  export * from "./components/jogging/JoggingJointRotationControl"
9
9
  export * from "./components/jogging/JoggingPanel"
10
+ export * from "./components/utils/hooks"