@wandelbots/wandelbots-js-react-components 1.29.2 → 1.30.0

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 (65) hide show
  1. package/dist/index.cjs +29 -29
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +4845 -4736
  4. package/dist/index.js.map +1 -1
  5. package/dist/src/components/CopyableText.d.ts.map +1 -1
  6. package/dist/src/components/LoadingCover.d.ts.map +1 -1
  7. package/dist/src/components/VelocitySlider.d.ts +8 -1
  8. package/dist/src/components/VelocitySlider.d.ts.map +1 -1
  9. package/dist/src/components/experimental/utils/AdornedSelect.d.ts +8 -0
  10. package/dist/src/components/experimental/utils/AdornedSelect.d.ts.map +1 -0
  11. package/dist/src/components/jogging/JoggingCartesianAxisControl.d.ts +3 -2
  12. package/dist/src/components/jogging/JoggingCartesianAxisControl.d.ts.map +1 -1
  13. package/dist/src/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
  14. package/dist/src/components/jogging/JoggingJointLimitDetector.d.ts +1 -1
  15. package/dist/src/components/jogging/JoggingJointLimitDetector.d.ts.map +1 -1
  16. package/dist/src/components/jogging/JoggingJointRotationControl.d.ts.map +1 -1
  17. package/dist/src/components/jogging/JoggingJointTab.d.ts.map +1 -1
  18. package/dist/src/components/jogging/JoggingOptions.d.ts +1 -1
  19. package/dist/src/components/jogging/JoggingOptions.d.ts.map +1 -1
  20. package/dist/src/components/jogging/JoggingPanel.d.ts +3 -0
  21. package/dist/src/components/jogging/JoggingPanel.d.ts.map +1 -1
  22. package/dist/src/components/jogging/JoggingStore.d.ts +5 -3
  23. package/dist/src/components/jogging/JoggingStore.d.ts.map +1 -1
  24. package/dist/src/components/jogging/JoggingToggleButtonGroup.d.ts +2 -0
  25. package/dist/src/components/jogging/JoggingToggleButtonGroup.d.ts.map +1 -0
  26. package/dist/src/components/jogging/JoggingVelocitySlider.d.ts.map +1 -1
  27. package/dist/src/components/jogging/PoseCartesianValues.d.ts +7 -0
  28. package/dist/src/components/jogging/PoseCartesianValues.d.ts.map +1 -0
  29. package/dist/src/components/jogging/PoseJointValues.d.ts +7 -0
  30. package/dist/src/components/jogging/PoseJointValues.d.ts.map +1 -0
  31. package/dist/src/index.d.ts +2 -0
  32. package/dist/src/index.d.ts.map +1 -1
  33. package/dist/src/themes/createDarkTheme.d.ts.map +1 -1
  34. package/dist/src/themes/themeTypes.d.ts +6 -1
  35. package/dist/src/themes/themeTypes.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/components/CopyableText.tsx +69 -12
  38. package/src/components/LoadingCover.tsx +4 -2
  39. package/src/components/VelocitySlider.tsx +47 -18
  40. package/src/components/experimental/utils/AdornedSelect.tsx +42 -0
  41. package/src/components/jogging/JoggingCartesianAxisControl.tsx +84 -51
  42. package/src/components/jogging/JoggingCartesianTab.tsx +97 -107
  43. package/src/components/jogging/JoggingJointLimitDetector.tsx +4 -1
  44. package/src/components/jogging/JoggingJointRotationControl.tsx +41 -22
  45. package/src/components/jogging/JoggingJointTab.tsx +34 -43
  46. package/src/components/jogging/JoggingOptions.tsx +110 -136
  47. package/src/components/jogging/JoggingPanel.tsx +17 -9
  48. package/src/components/jogging/JoggingStore.ts +5 -2
  49. package/src/components/jogging/JoggingToggleButtonGroup.tsx +25 -0
  50. package/src/components/jogging/JoggingVelocitySlider.tsx +18 -20
  51. package/src/components/jogging/PoseCartesianValues.tsx +43 -0
  52. package/src/components/jogging/PoseJointValues.tsx +40 -0
  53. package/src/i18n/locales/de/translations.json +3 -1
  54. package/src/i18n/locales/en/translations.json +3 -1
  55. package/src/icons/jog-minus.svg +5 -0
  56. package/src/icons/jog-plus.svg +9 -0
  57. package/src/index.ts +2 -0
  58. package/src/themes/createDarkTheme.ts +19 -4
  59. package/src/themes/themeTypes.ts +6 -1
  60. package/dist/src/components/jogging/JoggingCartesianValues.d.ts +0 -7
  61. package/dist/src/components/jogging/JoggingCartesianValues.d.ts.map +0 -1
  62. package/dist/src/components/jogging/JoggingJointValues.d.ts +0 -7
  63. package/dist/src/components/jogging/JoggingJointValues.d.ts.map +0 -1
  64. package/src/components/jogging/JoggingCartesianValues.tsx +0 -50
  65. package/src/components/jogging/JoggingJointValues.tsx +0 -45
@@ -0,0 +1,5 @@
1
+ <svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="JogMinus">
3
+ <path id="Minus" d="M0 13V8H21V13H0Z" fill="white"/>
4
+ </g>
5
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="JogPlus">
3
+ <g id="Plus">
4
+ <path d="M0 13V8H8V13H0Z" fill="white"/>
5
+ <path d="M8 0L13 2.18557e-07L13 21H8L8 0Z" fill="white"/>
6
+ <path d="M13 13V8H21V13H13Z" fill="white"/>
7
+ </g>
8
+ </g>
9
+ </svg>
package/src/index.ts CHANGED
@@ -4,6 +4,8 @@ export * from "./components/jogging/JoggingCartesianAxisControl"
4
4
  export * from "./components/jogging/JoggingJointRotationControl"
5
5
  export * from "./components/jogging/JoggingPanel"
6
6
  export type { JoggingStore } from "./components/jogging/JoggingStore"
7
+ export * from "./components/jogging/PoseCartesianValues"
8
+ export * from "./components/jogging/PoseJointValues"
7
9
  export * from "./components/LoadingCover"
8
10
  export * from "./components/modal/NoMotionGroupModal"
9
11
  export * from "./components/robots/AxisConfig"
@@ -124,7 +124,7 @@ export function createDarkTheme(): Theme {
124
124
  MuiDivider: {
125
125
  styleOverrides: {
126
126
  root: {
127
- border: "1px solid",
127
+ height: "1px",
128
128
  },
129
129
  },
130
130
  },
@@ -206,19 +206,34 @@ export function createDarkTheme(): Theme {
206
206
  X: {
207
207
  backgroundColor: "rgba(215, 66, 56, 1)",
208
208
  borderColor: "rgba(215, 66, 56, 1)",
209
- buttonBackgroundColor: "rgba(241, 77, 66, 1)",
209
+ buttonBackgroundColor: {
210
+ default: "rgba(241, 77, 66, 1)",
211
+ pressed: "rgba(138, 41, 35, 1)",
212
+ hovered: "rgba(241, 77, 66, 1)",
213
+ disabled: "rgba(241, 77, 66, 1)",
214
+ },
210
215
  color: "rgba(255, 255, 255, 1)",
211
216
  },
212
217
  Y: {
213
218
  backgroundColor: "rgba(20, 151, 108, 1)",
214
219
  borderColor: "rgba(20, 151, 108, 1)",
215
- buttonBackgroundColor: "rgba(28, 188, 135, 1)",
220
+ buttonBackgroundColor: {
221
+ default: "rgba(28, 188, 135, 1)",
222
+ pressed: "rgba(11, 89, 63, 1)",
223
+ disabled: "rgba(28, 188, 135, 1)",
224
+ hovered: "rgba(28, 188, 135, 1)",
225
+ },
216
226
  color: "rgba(255, 255, 255, 1)",
217
227
  },
218
228
  Z: {
219
229
  backgroundColor: "rgba(1, 87, 155, 1)",
220
230
  borderColor: "rgba(1, 87, 155, 1)",
221
- buttonBackgroundColor: "rgba(2, 136, 209, 1)",
231
+ buttonBackgroundColor: {
232
+ default: "rgba(2, 136, 209, 1)",
233
+ pressed: "rgba(2, 64, 114, 1)",
234
+ disabled: "rgba(2, 136, 209, 1)",
235
+ hovered: "rgba(2, 136, 209, 1)",
236
+ },
222
237
  color: "rgba(255, 255, 255, 1)",
223
238
  },
224
239
  },
@@ -17,7 +17,12 @@ export interface AxisControlComponentColors {
17
17
  color?: string
18
18
  borderColor?: string
19
19
  backgroundColor?: string
20
- buttonBackgroundColor?: string
20
+ buttonBackgroundColor?: {
21
+ default?: string
22
+ pressed?: string
23
+ disabled?: string
24
+ hovered?: string
25
+ }
21
26
  }
22
27
 
23
28
  interface NovaComponentsExtension {
@@ -1,7 +0,0 @@
1
- import type { JoggingStore } from "./JoggingStore";
2
- export declare const JoggingCartesianValues: (({ store }: {
3
- store: JoggingStore;
4
- }) => import("react/jsx-runtime").JSX.Element) & {
5
- displayName: string;
6
- };
7
- //# sourceMappingURL=JoggingCartesianValues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JoggingCartesianValues.d.ts","sourceRoot":"","sources":["../../../../src/components/jogging/JoggingCartesianValues.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGlD,eAAO,MAAM,sBAAsB,eACrB;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE;;CAwCpC,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { JoggingStore } from "./JoggingStore";
2
- export declare const JoggingJointValues: (({ store }: {
3
- store: JoggingStore;
4
- }) => import("react/jsx-runtime").JSX.Element) & {
5
- displayName: string;
6
- };
7
- //# sourceMappingURL=JoggingJointValues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JoggingJointValues.d.ts","sourceRoot":"","sources":["../../../../src/components/jogging/JoggingJointValues.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,eAAO,MAAM,kBAAkB,eACjB;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE;;CAoCpC,CAAA"}
@@ -1,50 +0,0 @@
1
- import { observer } from "mobx-react-lite"
2
- import { Stack } from "@mui/material"
3
- import { useRef } from "react"
4
- import { poseToWandelscriptString } from "@wandelbots/wandelbots-js"
5
- import { useAnimationFrame } from "../utils/hooks"
6
- import type { JoggingStore } from "./JoggingStore"
7
- import { CopyableText } from "../CopyableText"
8
-
9
- export const JoggingCartesianValues = observer(
10
- ({ store }: { store: JoggingStore }) => {
11
- const poseHolderRef = useRef<HTMLDivElement>(null)
12
-
13
- function getCurrentPoseString() {
14
- const tcpPose =
15
- store.jogger.motionStream.rapidlyChangingMotionState.tcp_pose
16
- if (!tcpPose) return ""
17
- return poseToWandelscriptString(tcpPose)
18
- }
19
-
20
- useAnimationFrame(() => {
21
- if (!poseHolderRef.current) {
22
- return
23
- }
24
-
25
- poseHolderRef.current.textContent = getCurrentPoseString()
26
- })
27
-
28
- return (
29
- <Stack
30
- alignItems="left"
31
- spacing={2}
32
- sx={{
33
- padding: "8px 16px",
34
- paddingTop: "16px",
35
- "& label": {
36
- opacity: 0.7,
37
- fontSize: "12px",
38
- marginBottom: "4px",
39
- },
40
- }}
41
- >
42
- <CopyableText
43
- label={"Pose"}
44
- value={getCurrentPoseString()}
45
- ref={poseHolderRef}
46
- />
47
- </Stack>
48
- )
49
- },
50
- )
@@ -1,45 +0,0 @@
1
- import { Stack } from "@mui/material"
2
- import { observer } from "mobx-react-lite"
3
- import { useRef } from "react"
4
- import { CopyableText } from "../CopyableText"
5
- import { useAnimationFrame } from "../utils/hooks"
6
- import type { JoggingStore } from "./JoggingStore"
7
-
8
- export const JoggingJointValues = observer(
9
- ({ store }: { store: JoggingStore }) => {
10
- const poseHolderRef = useRef<HTMLDivElement>(null)
11
-
12
- function getCurrentPoseString() {
13
- const { joints } =
14
- store.jogger.motionStream.rapidlyChangingMotionState.state
15
- .joint_position
16
- return `[${joints.map((j) => parseFloat(j.toFixed(4))).join(", ")}]`
17
- }
18
-
19
- useAnimationFrame(() => {
20
- if (!poseHolderRef.current) return
21
- poseHolderRef.current.textContent = getCurrentPoseString()
22
- })
23
-
24
- return (
25
- <Stack
26
- alignItems="left"
27
- spacing={2}
28
- sx={{
29
- padding: "16px",
30
- "& label": {
31
- opacity: 0.7,
32
- fontSize: "12px",
33
- marginBottom: "4px",
34
- },
35
- }}
36
- >
37
- <CopyableText
38
- // label={"Pose"}
39
- value={getCurrentPoseString()}
40
- ref={poseHolderRef}
41
- />
42
- </Stack>
43
- )
44
- },
45
- )