@wandelbots/wandelbots-js-react-components 1.9.1 → 1.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wandelbots/wandelbots-js-react-components",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "files": [
6
6
  "dist",
@@ -0,0 +1,24 @@
1
+ "use client"
2
+ import { useEffect } from "react"
3
+
4
+ const defaultWarn = console.warn
5
+
6
+ export default function ConsoleFilter() {
7
+ useEffect(() => {
8
+ console.warn = (data) => {
9
+ // This message is caused by a bug from useSpring in combination with Canvas "demand" frameloop.
10
+ // For now we can only suppress this warning there are no sideeffects yet
11
+ // See https://github.com/pmndrs/react-spring/issues/1586#issuecomment-915051856
12
+ if (
13
+ data ===
14
+ "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
15
+ ) {
16
+ return
17
+ }
18
+
19
+ defaultWarn(data)
20
+ }
21
+ }, [])
22
+
23
+ return <></>
24
+ }
@@ -30,6 +30,7 @@ import { DHRobot } from "./DHRobot"
30
30
 
31
31
  import * as THREE from "three"
32
32
  import { ErrorBoundary } from "react-error-boundary"
33
+ import ConsoleFilter from "../ConsoleFilter"
33
34
 
34
35
  export type DHRobotProps = {
35
36
  rapidlyChangingMotionState: MotionGroupStateResponse
@@ -265,6 +266,7 @@ export function SupportedRobot({
265
266
  />
266
267
  </group>
267
268
  </Suspense>
269
+ <ConsoleFilter />
268
270
  </ErrorBoundary>
269
271
  )
270
272
  }