@wandelbots/wandelbots-js-react-components 5.4.1 → 5.4.2-pr.ci-pr-preview.586.f684aae
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/dist/3d.cjs.js +1 -1
- package/dist/3d.d.ts +1 -1
- package/dist/3d.d.ts.map +1 -1
- package/dist/3d.es.js +1 -1
- package/dist/MotionGroupVisualizer-B-e22qXF.cjs +2 -0
- package/dist/MotionGroupVisualizer-B-e22qXF.cjs.map +1 -0
- package/dist/MotionGroupVisualizer-CIASsBC6.js +1433 -0
- package/dist/MotionGroupVisualizer-CIASsBC6.js.map +1 -0
- package/dist/Setup.d.ts +1 -1
- package/dist/Setup.d.ts.map +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/collider/ColliderCollection.d.ts.map +1 -1
- package/dist/components/AppHeader.d.ts +1 -1
- package/dist/components/AppHeader.d.ts.map +1 -1
- package/dist/components/ConsoleFilter.d.ts +1 -1
- package/dist/components/ConsoleFilter.d.ts.map +1 -1
- package/dist/components/CopyableText.d.ts.map +1 -1
- package/dist/components/CycleTimer/DefaultVariant.d.ts.map +1 -1
- package/dist/components/CycleTimer/SmallVariant.d.ts.map +1 -1
- package/dist/components/DataGrid.d.ts +1 -1
- package/dist/components/DataGrid.d.ts.map +1 -1
- package/dist/components/LoadingCover.d.ts.map +1 -1
- package/dist/components/LogPanel.d.ts +1 -1
- package/dist/components/LogPanel.d.ts.map +1 -1
- package/dist/components/LogViewer.d.ts +1 -1
- package/dist/components/LogViewer.d.ts.map +1 -1
- package/dist/components/ProgramControl.d.ts.map +1 -1
- package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/components/RobotListItem.d.ts.map +1 -1
- package/dist/components/RobotSetupReadinessIndicator.d.ts.map +1 -1
- package/dist/components/SelectableFab.d.ts +1 -1
- package/dist/components/SelectableFab.d.ts.map +1 -1
- package/dist/components/TabBar.d.ts +1 -1
- package/dist/components/TabBar.d.ts.map +1 -1
- package/dist/components/ThemeSelect.d.ts +1 -1
- package/dist/components/ThemeSelect.d.ts.map +1 -1
- package/dist/components/Timer/TimerDefaultVariant.d.ts.map +1 -1
- package/dist/components/Timer/TimerSmallVariant.d.ts.map +1 -1
- package/dist/components/TransparentOverlay.d.ts +2 -2
- package/dist/components/TransparentOverlay.d.ts.map +1 -1
- package/dist/components/VelocitySlider.d.ts +1 -1
- package/dist/components/VelocitySlider.d.ts.map +1 -1
- package/dist/components/experimental/utils/AdornedSelect.d.ts +1 -1
- package/dist/components/experimental/utils/AdornedSelect.d.ts.map +1 -1
- package/dist/components/jogging/JoggingBlocked.d.ts +1 -1
- package/dist/components/jogging/JoggingBlocked.d.ts.map +1 -1
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts.map +1 -1
- package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingFreedriveTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointLimitDetector.d.ts +1 -1
- package/dist/components/jogging/JoggingJointLimitDetector.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointTab.d.ts +2 -2
- package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointValueControl.d.ts.map +1 -1
- package/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
- package/dist/components/jogging/JoggingStore.d.ts +1 -1
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/components/jogging/JoggingToggleButtonGroup.d.ts +1 -1
- package/dist/components/jogging/JoggingToggleButtonGroup.d.ts.map +1 -1
- package/dist/components/jogging/JoggingVelocitySlider.d.ts +1 -1
- package/dist/components/jogging/JoggingVelocitySlider.d.ts.map +1 -1
- package/dist/components/jogging/PoseCartesianValues.d.ts.map +1 -1
- package/dist/components/jogging/PoseJointValues.d.ts.map +1 -1
- package/dist/components/modal/NoMotionGroupModal.d.ts.map +1 -1
- package/dist/components/robots/DHLinearAxis.d.ts.map +1 -1
- package/dist/components/robots/DHRobot.d.ts.map +1 -1
- package/dist/components/robots/GenericRobot.d.ts +1 -1
- package/dist/components/robots/GenericRobot.d.ts.map +1 -1
- package/dist/components/robots/LinearAxisAnimator.d.ts +1 -1
- package/dist/components/robots/LinearAxisAnimator.d.ts.map +1 -1
- package/dist/components/robots/MotionGroupVisualizer.d.ts +2 -2
- package/dist/components/robots/MotionGroupVisualizer.d.ts.map +1 -1
- package/dist/components/robots/RobotAnimator.d.ts +1 -1
- package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
- package/dist/components/robots/SupportedLinearAxis.d.ts.map +1 -1
- package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
- package/dist/components/robots/robotModelLogic.d.ts.map +1 -1
- package/dist/components/safetyBar/ControllerTypeIndicator.d.ts +1 -1
- package/dist/components/safetyBar/ControllerTypeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/IndicatorWithExplanation.d.ts +2 -1
- package/dist/components/safetyBar/IndicatorWithExplanation.d.ts.map +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyBar.d.ts +1 -1
- package/dist/components/safetyBar/SafetyBar.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
- package/dist/components/utils/converters.d.ts +2 -2
- package/dist/components/utils/converters.d.ts.map +1 -1
- package/dist/components/utils/hooks.d.ts.map +1 -1
- package/dist/components/utils/interpolation.d.ts.map +1 -1
- package/dist/core.cjs.js +1 -1
- package/dist/core.es.js +2 -2
- package/dist/externalizeComponent.d.ts.map +1 -1
- package/dist/icons/DropdownArrowIcon.d.ts +1 -1
- package/dist/icons/DropdownArrowIcon.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +3 -3
- package/dist/interpolation-BIB6FC35.cjs +198 -0
- package/dist/interpolation-BIB6FC35.cjs.map +1 -0
- package/dist/interpolation-lSTX6ZXZ.js +14559 -0
- package/dist/interpolation-lSTX6ZXZ.js.map +1 -0
- package/dist/lib/JoggerConnection.d.ts +1 -1
- package/dist/lib/JoggerConnection.d.ts.map +1 -1
- package/dist/themes/createDarkTheme.d.ts +1 -1
- package/dist/themes/createDarkTheme.d.ts.map +1 -1
- package/dist/themes/createLightTheme.d.ts +1 -1
- package/dist/themes/createLightTheme.d.ts.map +1 -1
- package/dist/theming-D_pShDEg.js +32236 -0
- package/dist/theming-D_pShDEg.js.map +1 -0
- package/dist/theming-L5E8VSae.cjs +84 -0
- package/dist/theming-L5E8VSae.cjs.map +1 -0
- package/package.json +4 -3
- package/src/3d.ts +2 -2
- package/src/Setup.tsx +2 -6
- package/src/components/3d-viewport/PresetEnvironment.tsx +1 -0
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +43 -23
- package/src/components/3d-viewport/TrajectoryRenderer.tsx +1 -1
- package/src/components/3d-viewport/collider/ColliderCollection.tsx +3 -2
- package/src/components/AppHeader.tsx +9 -12
- package/src/components/ConsoleFilter.tsx +1 -1
- package/src/components/CopyableText.tsx +4 -1
- package/src/components/CycleTimer/DefaultVariant.tsx +8 -5
- package/src/components/CycleTimer/SmallVariant.tsx +3 -1
- package/src/components/DataGrid.tsx +4 -1
- package/src/components/LoadingCover.tsx +4 -1
- package/src/components/LogPanel.tsx +1 -1
- package/src/components/LogViewer.tsx +13 -17
- package/src/components/ProgramControl.tsx +7 -2
- package/src/components/ProgramStateIndicator.tsx +3 -2
- package/src/components/RobotCard.tsx +6 -1
- package/src/components/RobotListItem.tsx +4 -1
- package/src/components/RobotSetupReadinessIndicator.tsx +4 -2
- package/src/components/SelectableFab.tsx +2 -2
- package/src/components/TabBar.tsx +7 -3
- package/src/components/ThemeSelect.tsx +2 -1
- package/src/components/Timer/TimerDefaultVariant.tsx +9 -6
- package/src/components/Timer/TimerSmallVariant.tsx +2 -1
- package/src/components/Timer/useTimerLogic.ts +9 -9
- package/src/components/TransparentOverlay.tsx +2 -2
- package/src/components/VelocitySlider.tsx +3 -1
- package/src/components/experimental/utils/AdornedSelect.tsx +4 -8
- package/src/components/jogging/JoggingBlocked.tsx +6 -2
- package/src/components/jogging/JoggingCartesianAxisControl.tsx +5 -7
- package/src/components/jogging/JoggingCartesianTab.tsx +6 -8
- package/src/components/jogging/JoggingFreedriveTab.tsx +1 -2
- package/src/components/jogging/JoggingJointLimitDetector.tsx +41 -43
- package/src/components/jogging/JoggingJointTab.tsx +12 -20
- package/src/components/jogging/JoggingJointValueControl.tsx +44 -30
- package/src/components/jogging/JoggingOptions.tsx +143 -139
- package/src/components/jogging/JoggingPanel.test.tsx +77 -85
- package/src/components/jogging/JoggingPanel.tsx +10 -13
- package/src/components/jogging/JoggingStore.ts +18 -13
- package/src/components/jogging/JoggingToggleButtonGroup.tsx +3 -3
- package/src/components/jogging/JoggingVelocitySlider.tsx +2 -10
- package/src/components/jogging/PoseCartesianValues.tsx +2 -1
- package/src/components/jogging/PoseJointValues.tsx +2 -1
- package/src/components/jogging/__fixtures__/motionStreamMockData.ts +0 -1
- package/src/components/modal/NoMotionGroupModal.tsx +7 -10
- package/src/components/robots/DHLinearAxis.tsx +62 -45
- package/src/components/robots/DHRobot.tsx +47 -45
- package/src/components/robots/GenericRobot.tsx +24 -24
- package/src/components/robots/LinearAxis.tsx +0 -1
- package/src/components/robots/LinearAxisAnimator.tsx +4 -1
- package/src/components/robots/MotionGroupVisualizer.tsx +53 -53
- package/src/components/robots/RobotAnimator.test.tsx +2 -2
- package/src/components/robots/RobotAnimator.tsx +4 -1
- package/src/components/robots/SupportedLinearAxis.tsx +10 -3
- package/src/components/robots/SupportedRobot.tsx +10 -3
- package/src/components/robots/robotModelLogic.ts +22 -11
- package/src/components/safetyBar/ControllerTypeIndicator.tsx +2 -1
- package/src/components/safetyBar/IndicatorWithExplanation.tsx +13 -11
- package/src/components/safetyBar/OperationModeIndicator.tsx +2 -1
- package/src/components/safetyBar/SafetyBar.tsx +3 -1
- package/src/components/safetyBar/SafetyStateIndicator.tsx +2 -1
- package/src/components/utils/converters.ts +10 -7
- package/src/components/utils/errorHandling.ts +1 -1
- package/src/components/utils/hooks.tsx +1 -0
- package/src/components/utils/interpolation.test.ts +53 -38
- package/src/components/utils/interpolation.ts +1 -0
- package/src/externalizeComponent.tsx +3 -1
- package/src/icons/DropdownArrowIcon.tsx +1 -2
- package/src/lib/JoggerConnection.ts +24 -24
- package/src/themes/createDarkTheme.ts +2 -3
- package/dist/MotionGroupVisualizer-1twp8wG6.js +0 -1328
- package/dist/MotionGroupVisualizer-1twp8wG6.js.map +0 -1
- package/dist/MotionGroupVisualizer-Dq_KWGsa.cjs +0 -2
- package/dist/MotionGroupVisualizer-Dq_KWGsa.cjs.map +0 -1
- package/dist/interpolation-B3pbgXYX.cjs +0 -42
- package/dist/interpolation-B3pbgXYX.cjs.map +0 -1
- package/dist/interpolation-D4ATdkEg.js +0 -7912
- package/dist/interpolation-D4ATdkEg.js.map +0 -1
- package/dist/theming-BJ6pB6jG.cjs +0 -115
- package/dist/theming-BJ6pB6jG.cjs.map +0 -1
- package/dist/theming-LwkvEF-K.js +0 -22417
- package/dist/theming-LwkvEF-K.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.2-pr.ci-pr-preview.586.f684aae",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
"ci:test:runner": "wait-on tcp:127.0.0.1:9009 && test-storybook --url http://127.0.0.1:9009 --index-json --browsers chromium",
|
|
52
52
|
"build": "rimraf dist && vite build && tsc --declaration --emitDeclarationOnly",
|
|
53
53
|
"build-storybook": "storybook build",
|
|
54
|
+
"lint": "biome check --error-on-warnings .",
|
|
55
|
+
"format": "biome format . --write",
|
|
54
56
|
"prepare": "husky || true",
|
|
55
57
|
"td": "tsx scripts/td-wrapper.ts"
|
|
56
58
|
},
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
"node": ">=18.14.0"
|
|
70
72
|
},
|
|
71
73
|
"devDependencies": {
|
|
74
|
+
"@biomejs/biome": "^2.4.13",
|
|
72
75
|
"@emotion/react": "^11.14.0",
|
|
73
76
|
"@emotion/styled": "^11.14.0",
|
|
74
77
|
"@mui/icons-material": "^7.3.7",
|
|
@@ -94,7 +97,6 @@
|
|
|
94
97
|
"@types/three": "^0.182.0",
|
|
95
98
|
"@vitejs/plugin-react": "^4.3.4",
|
|
96
99
|
"add": "^2.0.6",
|
|
97
|
-
"eslint-plugin-storybook": "^10.1.10",
|
|
98
100
|
"glob": "^13.0.0",
|
|
99
101
|
"http-server": "^14.1.1",
|
|
100
102
|
"husky": "^9.1.7",
|
|
@@ -106,7 +108,6 @@
|
|
|
106
108
|
"npm-run-all": "^4.1.5",
|
|
107
109
|
"playwright": "^1.59.1",
|
|
108
110
|
"postcss": "^8.5.3",
|
|
109
|
-
"prettier-eslint": "^16.3.0",
|
|
110
111
|
"prop-types": "^15.8.1",
|
|
111
112
|
"react": "^19.1.0",
|
|
112
113
|
"react-dom": "^19.1.0",
|
package/src/3d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export * from "./components/robots/AxisConfig"
|
|
|
8
8
|
export * from "./components/robots/LinearAxis"
|
|
9
9
|
export {
|
|
10
10
|
extractManufacturer,
|
|
11
|
-
getDefaultHomeConfig,
|
|
11
|
+
getDefaultHomeConfig,
|
|
12
|
+
MANUFACTURER_HOME_CONFIGS,
|
|
12
13
|
} from "./components/robots/manufacturerHomePositions"
|
|
13
14
|
export * from "./components/robots/Robot"
|
|
14
15
|
export { defaultGetModel } from "./components/robots/robotModelLogic"
|
|
15
16
|
export * from "./components/robots/SupportedLinearAxis"
|
|
16
17
|
export * from "./components/robots/SupportedRobot"
|
|
17
18
|
export * from "./components/robots/MotionGroupVisualizer"
|
|
18
|
-
|
package/src/Setup.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OrbitControls } from "@react-three/drei"
|
|
2
2
|
import { Canvas, type CanvasProps } from "@react-three/fiber"
|
|
3
|
-
import * as React from "react"
|
|
3
|
+
import type * as React from "react"
|
|
4
4
|
import { Vector3 } from "three"
|
|
5
5
|
import { PresetEnvironment } from "./components/3d-viewport/PresetEnvironment"
|
|
6
6
|
|
|
@@ -27,11 +27,7 @@ export const Setup = ({
|
|
|
27
27
|
{...restProps}
|
|
28
28
|
>
|
|
29
29
|
{children}
|
|
30
|
-
{lights &&
|
|
31
|
-
<>
|
|
32
|
-
<PresetEnvironment />
|
|
33
|
-
</>
|
|
34
|
-
)}
|
|
30
|
+
{lights && <PresetEnvironment />}
|
|
35
31
|
{controls && <OrbitControls makeDefault />}
|
|
36
32
|
</Canvas>
|
|
37
33
|
)
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
import type { ThreeElements } from "@react-three/fiber"
|
|
1
2
|
import { useMemo } from "react"
|
|
2
|
-
import { type ThreeElements } from "@react-three/fiber"
|
|
3
3
|
import * as THREE from "three"
|
|
4
4
|
import { ConvexGeometry, RoundedBoxGeometry } from "three-stdlib"
|
|
5
5
|
|
|
6
6
|
import type {
|
|
7
|
+
Capsule,
|
|
7
8
|
Collider,
|
|
8
9
|
ConvexHull,
|
|
9
10
|
DHParameter,
|
|
10
11
|
MotionGroupDescription,
|
|
11
|
-
Sphere,
|
|
12
|
-
Capsule,
|
|
13
12
|
RectangularCapsule,
|
|
13
|
+
Sphere,
|
|
14
14
|
} from "@wandelbots/nova-js/v2"
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
dhParametersToPlaneSize,
|
|
18
|
+
orientationToQuaternion,
|
|
19
|
+
verticesToCoplanarity,
|
|
20
|
+
} from "../utils/converters"
|
|
17
21
|
|
|
18
22
|
export type SafetyZonesRendererProps = {
|
|
19
23
|
safetyZones: MotionGroupDescription["safety_zones"]
|
|
@@ -21,10 +25,10 @@ export type SafetyZonesRendererProps = {
|
|
|
21
25
|
} & ThreeElements["group"]
|
|
22
26
|
|
|
23
27
|
export function SafetyZonesRenderer({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
safetyZones,
|
|
29
|
+
dhParameters,
|
|
30
|
+
...props
|
|
31
|
+
}: SafetyZonesRendererProps) {
|
|
28
32
|
/**
|
|
29
33
|
* Common material properties for safety zone meshes
|
|
30
34
|
*/
|
|
@@ -54,14 +58,23 @@ export function SafetyZonesRenderer({
|
|
|
54
58
|
return null
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
const position = new THREE.Vector3(
|
|
58
|
-
|
|
61
|
+
const position = new THREE.Vector3(
|
|
62
|
+
zone.pose.position[0] / 1000,
|
|
63
|
+
zone.pose.position[1] / 1000,
|
|
64
|
+
zone.pose.position[2] / 1000,
|
|
65
|
+
)
|
|
66
|
+
const orientation = new THREE.Vector3(
|
|
67
|
+
zone.pose.orientation[0],
|
|
68
|
+
zone.pose.orientation[1],
|
|
69
|
+
zone.pose.orientation[2],
|
|
70
|
+
)
|
|
59
71
|
|
|
60
72
|
let geometry: React.ReactElement | null
|
|
61
73
|
|
|
62
|
-
const materialProps =
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
const materialProps =
|
|
75
|
+
zone.shape.shape_type === "plane"
|
|
76
|
+
? { ...safetyZoneMaterialProps, side: THREE.DoubleSide }
|
|
77
|
+
: { ...safetyZoneMaterialProps, side: THREE.FrontSide }
|
|
65
78
|
|
|
66
79
|
switch (zone.shape.shape_type) {
|
|
67
80
|
/**
|
|
@@ -109,7 +122,12 @@ export function SafetyZonesRenderer({
|
|
|
109
122
|
vertices.push(newVertex)
|
|
110
123
|
}
|
|
111
124
|
try {
|
|
112
|
-
geometry =
|
|
125
|
+
geometry = (
|
|
126
|
+
<primitive
|
|
127
|
+
object={new ConvexGeometry(vertices)}
|
|
128
|
+
attach="geometry"
|
|
129
|
+
/>
|
|
130
|
+
)
|
|
113
131
|
} catch (error) {
|
|
114
132
|
console.log("Error creating ConvexGeometry:", error)
|
|
115
133
|
return null
|
|
@@ -141,7 +159,10 @@ export function SafetyZonesRenderer({
|
|
|
141
159
|
}
|
|
142
160
|
|
|
143
161
|
default: {
|
|
144
|
-
console.warn(
|
|
162
|
+
console.warn(
|
|
163
|
+
"Unsupported safety zone shape type:",
|
|
164
|
+
zone.shape.shape_type,
|
|
165
|
+
)
|
|
145
166
|
geometry = null
|
|
146
167
|
}
|
|
147
168
|
}
|
|
@@ -162,15 +183,14 @@ export function SafetyZonesRenderer({
|
|
|
162
183
|
/**
|
|
163
184
|
* Helper variable render safety zones
|
|
164
185
|
*/
|
|
186
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: pre-biome code
|
|
165
187
|
const renderedSafetyZones = useMemo(() => {
|
|
166
|
-
return Object.values(safetyZones ?? {}).map(
|
|
167
|
-
|
|
168
|
-
|
|
188
|
+
return Object.values(safetyZones ?? {}).map(
|
|
189
|
+
(zone: Collider, index: number) => {
|
|
190
|
+
return renderMesh(index, zone)
|
|
191
|
+
},
|
|
192
|
+
)
|
|
169
193
|
}, [safetyZones, planeSize])
|
|
170
194
|
|
|
171
|
-
return
|
|
172
|
-
<group {...props}>
|
|
173
|
-
{renderedSafetyZones}
|
|
174
|
-
</group>
|
|
175
|
-
)
|
|
195
|
+
return <group {...props}>{renderedSafetyZones}</group>
|
|
176
196
|
}
|
|
@@ -15,7 +15,7 @@ export function TrajectoryRenderer({
|
|
|
15
15
|
?.map((pose: Pose) => {
|
|
16
16
|
if (pose.position && pose.position.length >= 3) {
|
|
17
17
|
const [x, y, z] = pose.position
|
|
18
|
-
if (isFinite(x) && isFinite(y) && isFinite(z)) {
|
|
18
|
+
if (Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z)) {
|
|
19
19
|
return new THREE.Vector3(x / 1000, z / 1000, -y / 1000)
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -26,8 +26,9 @@ export default function ColliderCollection({
|
|
|
26
26
|
key={colliderKey}
|
|
27
27
|
name={colliderKey}
|
|
28
28
|
collider={collider}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
>
|
|
30
|
+
{meshChildrenProvider(colliderKey, collider)}
|
|
31
|
+
</ColliderElement>
|
|
31
32
|
))}
|
|
32
33
|
</group>
|
|
33
34
|
)
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Toolbar,
|
|
11
|
-
Typography,
|
|
12
|
-
} from "@mui/material"
|
|
1
|
+
import { alpha, type SxProps } from "@mui/material/styles"
|
|
2
|
+
import AppBar from "@mui/material/AppBar"
|
|
3
|
+
import Backdrop from "@mui/material/Backdrop"
|
|
4
|
+
import Box from "@mui/material/Box"
|
|
5
|
+
import IconButton from "@mui/material/IconButton"
|
|
6
|
+
import Menu from "@mui/material/Menu"
|
|
7
|
+
import MenuItem from "@mui/material/MenuItem"
|
|
8
|
+
import Toolbar from "@mui/material/Toolbar"
|
|
9
|
+
import Typography from "@mui/material/Typography"
|
|
13
10
|
import { observer } from "mobx-react-lite"
|
|
14
11
|
import { type MouseEvent, type ReactNode, useState } from "react"
|
|
15
12
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme } from "@mui/material/styles"
|
|
2
|
+
import Stack from "@mui/material/Stack"
|
|
3
|
+
import Tooltip from "@mui/material/Tooltip"
|
|
4
|
+
import Typography from "@mui/material/Typography"
|
|
2
5
|
import { useEffect, useState } from "react"
|
|
3
6
|
|
|
4
7
|
export const CopyableText = (props: {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme } from "@mui/material/styles"
|
|
2
|
+
import Box from "@mui/material/Box"
|
|
3
|
+
import Fade from "@mui/material/Fade"
|
|
4
|
+
import Typography from "@mui/material/Typography"
|
|
2
5
|
import { Gauge } from "@mui/x-charts/Gauge"
|
|
3
6
|
import { useTranslation } from "react-i18next"
|
|
4
7
|
import type { AnimationState, TimerState } from "./types"
|
|
@@ -57,23 +60,23 @@ export const DefaultVariant = ({
|
|
|
57
60
|
sx={{
|
|
58
61
|
opacity: showPauseAnimation || showErrorAnimation ? 0.6 : 1,
|
|
59
62
|
transition: "opacity 0.5s ease-out",
|
|
60
|
-
|
|
63
|
+
"& .MuiGauge-valueArc": {
|
|
61
64
|
fill: hasError
|
|
62
65
|
? theme.palette.error.light
|
|
63
66
|
: theme.palette.success.main,
|
|
64
67
|
transition: "fill 0.5s ease-out",
|
|
65
68
|
},
|
|
66
|
-
|
|
69
|
+
"& .MuiGauge-referenceArc": {
|
|
67
70
|
fill: currentState === "idle" ? "#171927" : "#171927",
|
|
68
71
|
stroke: "transparent",
|
|
69
72
|
strokeWidth: 0,
|
|
70
73
|
transition:
|
|
71
74
|
"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out",
|
|
72
75
|
},
|
|
73
|
-
|
|
76
|
+
"& .MuiGauge-valueText": {
|
|
74
77
|
display: "none",
|
|
75
78
|
},
|
|
76
|
-
|
|
79
|
+
"& .MuiGauge-text": {
|
|
77
80
|
display: "none",
|
|
78
81
|
},
|
|
79
82
|
}}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme } from "@mui/material/styles"
|
|
2
|
+
import Box from "@mui/material/Box"
|
|
3
|
+
import Typography from "@mui/material/Typography"
|
|
2
4
|
import { useTranslation } from "react-i18next"
|
|
3
5
|
import type { AnimationState, TimerState } from "./types"
|
|
4
6
|
import { formatTimeLocalized } from "./utils"
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import ClearIcon from "@mui/icons-material/Clear"
|
|
2
2
|
import FilterListIcon from "@mui/icons-material/FilterList"
|
|
3
3
|
import SearchIcon from "@mui/icons-material/Search"
|
|
4
|
-
import {
|
|
4
|
+
import { useTheme } from "@mui/material/styles"
|
|
5
|
+
import Box from "@mui/material/Box"
|
|
6
|
+
import Divider from "@mui/material/Divider"
|
|
7
|
+
import Typography from "@mui/material/Typography"
|
|
5
8
|
import {
|
|
6
9
|
DataGrid,
|
|
7
10
|
type DataGridProps,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CircularProgress from "@mui/material/CircularProgress"
|
|
2
|
+
import Stack from "@mui/material/Stack"
|
|
3
|
+
import { useTheme } from "@mui/material/styles"
|
|
4
|
+
import { capitalize } from "@mui/material/utils"
|
|
2
5
|
import { lowerFirst } from "lodash-es"
|
|
3
6
|
import { useEffect, useState } from "react"
|
|
4
7
|
import { makeErrorMessage } from "./utils/errorHandling"
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@mui/
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Paper,
|
|
13
|
-
Typography,
|
|
14
|
-
useTheme,
|
|
15
|
-
} from "@mui/material"
|
|
1
|
+
import ContentCopy from "@mui/icons-material/ContentCopy"
|
|
2
|
+
import DocumentIcon from "@mui/icons-material/DescriptionOutlined"
|
|
3
|
+
import ExpandLess from "@mui/icons-material/ExpandLess"
|
|
4
|
+
import ExpandMore from "@mui/icons-material/ExpandMore"
|
|
5
|
+
import type { SxProps } from "@mui/material/styles"
|
|
6
|
+
import { useTheme } from "@mui/material/styles"
|
|
7
|
+
import Box from "@mui/material/Box"
|
|
8
|
+
import Button from "@mui/material/Button"
|
|
9
|
+
import IconButton from "@mui/material/IconButton"
|
|
10
|
+
import Paper from "@mui/material/Paper"
|
|
11
|
+
import Typography from "@mui/material/Typography"
|
|
16
12
|
import { observer } from "mobx-react-lite"
|
|
17
13
|
import { useEffect, useRef, useState } from "react"
|
|
18
14
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -146,7 +142,7 @@ export const LogViewer = externalizeComponent(
|
|
|
146
142
|
|
|
147
143
|
const displayMessage =
|
|
148
144
|
isLongMessage && !isExpanded
|
|
149
|
-
? message.message.substring(0, 150)
|
|
145
|
+
? `${message.message.substring(0, 150)}...`
|
|
150
146
|
: message.message
|
|
151
147
|
|
|
152
148
|
return (
|
|
@@ -310,7 +306,7 @@ export const LogViewer = externalizeComponent(
|
|
|
310
306
|
minWidth: "auto",
|
|
311
307
|
padding: "4px 8px",
|
|
312
308
|
"&:hover": {
|
|
313
|
-
backgroundColor: theme.palette.primary.main
|
|
309
|
+
backgroundColor: `${theme.palette.primary.main}14`, // 8% opacity
|
|
314
310
|
},
|
|
315
311
|
}}
|
|
316
312
|
>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Pause from "@mui/icons-material/Pause"
|
|
2
|
+
import PlayArrow from "@mui/icons-material/PlayArrow"
|
|
3
|
+
import Stop from "@mui/icons-material/Stop"
|
|
4
|
+
import { useTheme } from "@mui/material/styles"
|
|
5
|
+
import Box from "@mui/material/Box"
|
|
6
|
+
import Button from "@mui/material/Button"
|
|
7
|
+
import Typography from "@mui/material/Typography"
|
|
3
8
|
import { observer } from "mobx-react-lite"
|
|
4
9
|
import { useTranslation } from "react-i18next"
|
|
5
10
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme } from "@mui/material/styles"
|
|
2
|
+
import Chip from "@mui/material/Chip"
|
|
3
|
+
import Typography from "@mui/material/Typography"
|
|
2
4
|
import type { OperationMode, SafetyStateType } from "@wandelbots/nova-js/v2"
|
|
3
5
|
import { observer } from "mobx-react-lite"
|
|
4
6
|
import { useTranslation } from "react-i18next"
|
|
@@ -124,7 +126,6 @@ export const ProgramStateIndicator = externalizeComponent(
|
|
|
124
126
|
label: t("ProgramStateIndicator.Error.lb"),
|
|
125
127
|
color: theme.palette.error.main,
|
|
126
128
|
}
|
|
127
|
-
case ProgramState.IDLE:
|
|
128
129
|
default:
|
|
129
130
|
return {
|
|
130
131
|
label: t("ProgramStateIndicator.Ready.lb"),
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme } from "@mui/material/styles"
|
|
2
|
+
import Box from "@mui/material/Box"
|
|
3
|
+
import Button from "@mui/material/Button"
|
|
4
|
+
import Card from "@mui/material/Card"
|
|
5
|
+
import Divider from "@mui/material/Divider"
|
|
6
|
+
import Typography from "@mui/material/Typography"
|
|
2
7
|
import { Bounds } from "@react-three/drei"
|
|
3
8
|
import { Canvas } from "@react-three/fiber"
|
|
4
9
|
import type { OperationMode, SafetyStateType } from "@wandelbots/nova-js/v2"
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import ErrorIcon from "@mui/icons-material/Error"
|
|
2
|
-
import {
|
|
2
|
+
import { useTheme } from "@mui/material/styles"
|
|
3
|
+
import Box from "@mui/material/Box"
|
|
4
|
+
import Divider from "@mui/material/Divider"
|
|
5
|
+
import Typography from "@mui/material/Typography"
|
|
3
6
|
import { observer } from "mobx-react-lite"
|
|
4
7
|
import type { ComponentType } from "react"
|
|
5
8
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme } from "@mui/material/styles"
|
|
2
|
+
import Box from "@mui/material/Box"
|
|
3
|
+
import Chip from "@mui/material/Chip"
|
|
4
|
+
import Typography from "@mui/material/Typography"
|
|
2
5
|
import { observer } from "mobx-react-lite"
|
|
3
6
|
import { useTranslation } from "react-i18next"
|
|
4
7
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -91,7 +94,6 @@ export const RobotSetupReadinessIndicator = externalizeComponent(
|
|
|
91
94
|
theme.palette.background.paper,
|
|
92
95
|
textColor: theme.palette.secondary.contrastText,
|
|
93
96
|
}
|
|
94
|
-
case RobotSetupReadinessState.PRECONDITION_NOT_FULFILLED:
|
|
95
97
|
default:
|
|
96
98
|
return {
|
|
97
99
|
label: t(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { styled } from "@mui/material/styles"
|
|
2
|
+
import Fab, { type FabProps } from "@mui/material/Fab"
|
|
3
3
|
const StyledSelectableFab = styled(Fab, {
|
|
4
4
|
shouldForwardProp: (prop) => prop !== "selected",
|
|
5
5
|
})<CodeFabProps>(({ theme }) => ({
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { SxProps } from "@mui/material"
|
|
2
|
-
import
|
|
1
|
+
import type { SxProps } from "@mui/material/styles"
|
|
2
|
+
import Badge from "@mui/material/Badge"
|
|
3
|
+
import Box from "@mui/material/Box"
|
|
4
|
+
import Tab from "@mui/material/Tab"
|
|
5
|
+
import Tabs from "@mui/material/Tabs"
|
|
3
6
|
import { observer } from "mobx-react-lite"
|
|
4
7
|
import { useEffect, useState } from "react"
|
|
5
8
|
import { externalizeComponent } from "../externalizeComponent"
|
|
@@ -76,7 +79,7 @@ function TabPanel(props: TabPanelProps) {
|
|
|
76
79
|
*/
|
|
77
80
|
interface TabWrapperProps {
|
|
78
81
|
children: React.ReactNode
|
|
79
|
-
//
|
|
82
|
+
// biome-ignore lint/suspicious/noExplicitAny: pre-biome code
|
|
80
83
|
[key: string]: any
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -117,6 +120,7 @@ export const TabBar = externalizeComponent(
|
|
|
117
120
|
const [uncontrolledActiveTab, setUncontrolledActiveTab] =
|
|
118
121
|
useState(defaultActiveTab)
|
|
119
122
|
|
|
123
|
+
// biome-ignore lint/style/noNonNullAssertion: pre-biome code
|
|
120
124
|
const currentValue = isControlled ? activeTab! : uncontrolledActiveTab
|
|
121
125
|
|
|
122
126
|
// Keep uncontrolled state in range when items change
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// TODO implement this as part of theme?
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useTheme, type SxProps } from "@mui/material/styles"
|
|
4
|
+
import Select from "@mui/material/Select"
|
|
4
5
|
import defaultsDeep from "lodash-es/defaultsDeep"
|
|
5
6
|
|
|
6
7
|
type ThemeSelectProps = {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Box from "@mui/material/Box"
|
|
2
|
+
import Fade from "@mui/material/Fade"
|
|
3
|
+
import Typography from "@mui/material/Typography"
|
|
2
4
|
import { Gauge } from "@mui/x-charts"
|
|
3
5
|
import { useTheme } from "@mui/material/styles"
|
|
4
6
|
import { useTranslation } from "react-i18next"
|
|
@@ -21,7 +23,8 @@ export const TimerDefaultVariant = ({
|
|
|
21
23
|
const { t } = useTranslation()
|
|
22
24
|
const theme = useTheme()
|
|
23
25
|
const { elapsedTime, currentProgress } = timerState
|
|
24
|
-
const { showErrorAnimation, showPauseAnimation, showMainText } =
|
|
26
|
+
const { showErrorAnimation, showPauseAnimation, showMainText } =
|
|
27
|
+
animationState
|
|
25
28
|
|
|
26
29
|
return (
|
|
27
30
|
<Box
|
|
@@ -49,23 +52,23 @@ export const TimerDefaultVariant = ({
|
|
|
49
52
|
sx={{
|
|
50
53
|
opacity: showPauseAnimation || showErrorAnimation ? 0.6 : 1,
|
|
51
54
|
transition: "opacity 0.5s ease-out",
|
|
52
|
-
|
|
55
|
+
"& .MuiGauge-valueArc": {
|
|
53
56
|
fill: hasError
|
|
54
57
|
? theme.palette.error.light
|
|
55
58
|
: theme.palette.success.main,
|
|
56
59
|
transition: "fill 0.5s ease-out",
|
|
57
60
|
},
|
|
58
|
-
|
|
61
|
+
"& .MuiGauge-referenceArc": {
|
|
59
62
|
fill: "#171927",
|
|
60
63
|
stroke: "transparent",
|
|
61
64
|
strokeWidth: 0,
|
|
62
65
|
transition:
|
|
63
66
|
"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out",
|
|
64
67
|
},
|
|
65
|
-
|
|
68
|
+
"& .MuiGauge-valueText": {
|
|
66
69
|
display: "none",
|
|
67
70
|
},
|
|
68
|
-
|
|
71
|
+
"& .MuiGauge-text": {
|
|
69
72
|
display: "none",
|
|
70
73
|
},
|
|
71
74
|
}}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Box from "@mui/material/Box"
|
|
2
|
+
import Typography from "@mui/material/Typography"
|
|
2
3
|
import { useTheme } from "@mui/material/styles"
|
|
3
4
|
import { useTranslation } from "react-i18next"
|
|
4
5
|
import type { TimerAnimationState, TimerState } from "./types"
|
|
@@ -67,10 +67,11 @@ export const useTimerLogic = ({
|
|
|
67
67
|
const pause = useCallback(() => {
|
|
68
68
|
if (startTimeRef.current && timerState.isRunning) {
|
|
69
69
|
const now = Date.now()
|
|
70
|
-
const totalElapsed =
|
|
70
|
+
const totalElapsed =
|
|
71
|
+
(now - startTimeRef.current) / 1000 + pausedTimeRef.current
|
|
71
72
|
const currentProgress = ((totalElapsed / 60) % 1) * 100
|
|
72
73
|
progressInterpolator.setTarget([currentProgress])
|
|
73
|
-
|
|
74
|
+
|
|
74
75
|
setTimerState((prev) => ({
|
|
75
76
|
...prev,
|
|
76
77
|
elapsedTime: Math.floor(totalElapsed),
|
|
@@ -83,11 +84,7 @@ export const useTimerLogic = ({
|
|
|
83
84
|
isPausedState: true,
|
|
84
85
|
}))
|
|
85
86
|
onPauseAnimation()
|
|
86
|
-
}, [
|
|
87
|
-
timerState.isRunning,
|
|
88
|
-
progressInterpolator,
|
|
89
|
-
onPauseAnimation,
|
|
90
|
-
])
|
|
87
|
+
}, [timerState.isRunning, progressInterpolator, onPauseAnimation])
|
|
91
88
|
|
|
92
89
|
const resume = useCallback(() => {
|
|
93
90
|
if (timerState.isPausedState) {
|
|
@@ -150,7 +147,8 @@ export const useTimerLogic = ({
|
|
|
150
147
|
const updateTimer = () => {
|
|
151
148
|
if (startTimeRef.current) {
|
|
152
149
|
const now = Date.now()
|
|
153
|
-
const totalElapsed =
|
|
150
|
+
const totalElapsed =
|
|
151
|
+
(now - startTimeRef.current) / 1000 + pausedTimeRef.current
|
|
154
152
|
const currentProgress = ((totalElapsed / 60) % 1) * 100
|
|
155
153
|
|
|
156
154
|
setTimerState((prev) => ({
|
|
@@ -159,7 +157,9 @@ export const useTimerLogic = ({
|
|
|
159
157
|
}))
|
|
160
158
|
|
|
161
159
|
// Only update progress interpolator if progress changed significantly
|
|
162
|
-
const progressDiff = Math.abs(
|
|
160
|
+
const progressDiff = Math.abs(
|
|
161
|
+
currentProgress - lastProgressRef.current,
|
|
162
|
+
)
|
|
163
163
|
if (progressDiff > 0.1) {
|
|
164
164
|
progressInterpolator.setTarget([currentProgress])
|
|
165
165
|
lastProgressRef.current = currentProgress
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTheme, type SxProps } from "@mui/material/styles"
|
|
2
|
+
import Stack from "@mui/material/Stack"
|
|
3
|
+
import Typography from "@mui/material/Typography"
|
|
2
4
|
import Slider from "@mui/material/Slider"
|
|
3
5
|
import isNumber from "lodash-es/isNumber"
|
|
4
6
|
import { observer } from "mobx-react-lite"
|