@wandelbots/wandelbots-js-react-components 1.3.0 → 1.3.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.
Files changed (168) hide show
  1. package/README.md +0 -29
  2. package/package.json +60 -43
  3. package/src/components/3d-viewport/CoordinateSystemTransform.tsx +44 -0
  4. package/src/components/3d-viewport/PresetEnvironment.tsx +78 -0
  5. package/src/components/3d-viewport/SafetyZonesRenderer.tsx +54 -0
  6. package/src/components/LoadingButton.stories.tsx +61 -0
  7. package/src/components/LoadingButton.tsx +19 -0
  8. package/src/components/LoadingCover.tsx +75 -0
  9. package/src/components/ThemeSelect.tsx +49 -0
  10. package/src/components/VelocitySlider.stories.tsx +32 -0
  11. package/src/components/VelocitySlider.tsx +52 -0
  12. package/src/components/jogging/JoggingCartesianAxisControl.stories.tsx +41 -0
  13. package/src/components/jogging/JoggingCartesianAxisControl.tsx +127 -0
  14. package/src/components/jogging/JoggingCartesianTab.tsx +265 -0
  15. package/src/components/jogging/JoggingCartesianValues.tsx +45 -0
  16. package/src/components/jogging/JoggingFreedriveTab.tsx +9 -0
  17. package/src/components/jogging/JoggingJointLimitDetector.tsx +51 -0
  18. package/src/components/jogging/JoggingJointRotationControl.stories.tsx +38 -0
  19. package/src/components/jogging/JoggingJointRotationControl.tsx +197 -0
  20. package/src/components/jogging/JoggingJointTab.tsx +93 -0
  21. package/src/components/jogging/JoggingJointValues.tsx +45 -0
  22. package/src/components/jogging/JoggingOptions.tsx +96 -0
  23. package/src/components/jogging/JoggingPanel.stories.tsx +26 -0
  24. package/src/components/jogging/JoggingPanel.tsx +148 -0
  25. package/src/components/jogging/JoggingStore.tsx +294 -0
  26. package/src/components/jogging/JoggingVelocitySlider.tsx +56 -0
  27. package/src/components/robots/ABB_1200_07_7.tsx +123 -0
  28. package/src/components/robots/AxisConfig.ts +3 -0
  29. package/src/components/robots/DHRobot.tsx +129 -0
  30. package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +187 -0
  31. package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +187 -0
  32. package/src/components/robots/FANUC_CRX10iA.tsx +167 -0
  33. package/src/components/robots/FANUC_CRX25iA.tsx +167 -0
  34. package/src/components/robots/FANUC_CRX25iAL.tsx +178 -0
  35. package/src/components/robots/KUKA_KR210_R2700.tsx +291 -0
  36. package/src/components/robots/KUKA_KR270_R2700.tsx +244 -0
  37. package/src/components/robots/RobotAnimator.tsx +83 -0
  38. package/src/components/robots/SupportedRobot.tsx +131 -0
  39. package/src/components/robots/UniversalRobots_UR10.tsx +112 -0
  40. package/src/components/robots/UniversalRobots_UR10e.tsx +275 -0
  41. package/src/components/robots/UniversalRobots_UR3.tsx +112 -0
  42. package/src/components/robots/UniversalRobots_UR3e.tsx +112 -0
  43. package/src/components/robots/UniversalRobots_UR5.tsx +111 -0
  44. package/src/components/robots/UniversalRobots_UR5e.tsx +280 -0
  45. package/src/components/robots/Yaskawa_AR1440.tsx +152 -0
  46. package/src/components/robots/Yaskawa_AR1730.tsx +165 -0
  47. package/src/components/robots/Yaskawa_AR2010.tsx +159 -0
  48. package/src/components/robots/Yaskawa_AR3120.tsx +160 -0
  49. package/src/components/robots/Yaskawa_AR900.tsx +121 -0
  50. package/src/components/utils/converters.ts +23 -0
  51. package/src/components/utils/errorHandling.ts +30 -0
  52. package/src/components/utils/hooks.tsx +54 -0
  53. package/src/components/utils/robotTreeQuery.ts +27 -0
  54. package/src/components/wandelscript-editor/WandelscriptEditor.stories.tsx +45 -0
  55. package/src/components/wandelscript-editor/WandelscriptEditor.tsx +114 -0
  56. package/src/components/wandelscript-editor/wandelscript.tmLanguage.ts +62 -0
  57. package/src/declarations.d.ts +10 -0
  58. package/src/i18n/config.ts +27 -0
  59. package/src/i18n/locales/de/translations.json +12 -0
  60. package/src/i18n/locales/en/translations.json +12 -0
  61. package/src/icons/arrowForwardFilled.tsx +7 -0
  62. package/src/icons/axis-x.svg +3 -0
  63. package/src/icons/axis-y.svg +3 -0
  64. package/src/icons/axis-z.svg +3 -0
  65. package/src/icons/expandFilled.tsx +11 -0
  66. package/src/icons/home.tsx +12 -0
  67. package/src/icons/infoOutlined.tsx +10 -0
  68. package/src/icons/jogging.svg +3 -0
  69. package/src/icons/robot.svg +3 -0
  70. package/src/icons/robot.tsx +14 -0
  71. package/src/icons/rotation.svg +4 -0
  72. package/src/icons/wbLogo.tsx +21 -0
  73. package/src/index.ts +7 -0
  74. package/src/themes/color.tsx +74 -0
  75. package/src/themes/theme.ts +150 -0
  76. package/src/themes/wbTheme.stories.tsx +64 -0
  77. package/src/themes/wbTheme.ts +186 -0
  78. package/dist/cjs/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
  79. package/dist/cjs/index.js +0 -5875
  80. package/dist/cjs/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
  81. package/dist/cjs/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
  82. package/dist/cjs/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
  83. package/dist/cjs/types/components/robots/ABB_1200_07_7.d.ts +0 -2
  84. package/dist/cjs/types/components/robots/AxisConfig.d.ts +0 -2
  85. package/dist/cjs/types/components/robots/DHRobot.d.ts +0 -2
  86. package/dist/cjs/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
  87. package/dist/cjs/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
  88. package/dist/cjs/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
  89. package/dist/cjs/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
  90. package/dist/cjs/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
  91. package/dist/cjs/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
  92. package/dist/cjs/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
  93. package/dist/cjs/types/components/robots/RobotAnimator.d.ts +0 -11
  94. package/dist/cjs/types/components/robots/SupportedRobot.d.ts +0 -14
  95. package/dist/cjs/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
  96. package/dist/cjs/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
  97. package/dist/cjs/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
  98. package/dist/cjs/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
  99. package/dist/cjs/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
  100. package/dist/cjs/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
  101. package/dist/cjs/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
  102. package/dist/cjs/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
  103. package/dist/cjs/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
  104. package/dist/cjs/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
  105. package/dist/cjs/types/components/robots/Yaskawa_AR900.d.ts +0 -2
  106. package/dist/cjs/types/components/utils/hooks.d.ts +0 -21
  107. package/dist/cjs/types/components/utils/robotTreeQuery.d.ts +0 -5
  108. package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
  109. package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
  110. package/dist/cjs/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
  111. package/dist/cjs/types/icons/arrowForwardFilled.d.ts +0 -1
  112. package/dist/cjs/types/icons/expandFilled.d.ts +0 -1
  113. package/dist/cjs/types/icons/home.d.ts +0 -1
  114. package/dist/cjs/types/icons/infoOutlined.d.ts +0 -1
  115. package/dist/cjs/types/icons/robot.d.ts +0 -1
  116. package/dist/cjs/types/icons/wbLogo.d.ts +0 -6
  117. package/dist/cjs/types/index.d.ts +0 -4
  118. package/dist/cjs/types/themes/color.d.ts +0 -9
  119. package/dist/cjs/types/themes/theme.d.ts +0 -143
  120. package/dist/cjs/types/themes/wbTheme.d.ts +0 -1
  121. package/dist/cjs/types/themes/wbTheme.stories.d.ts +0 -6
  122. package/dist/esm/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
  123. package/dist/esm/index.js +0 -5852
  124. package/dist/esm/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
  125. package/dist/esm/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
  126. package/dist/esm/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
  127. package/dist/esm/types/components/robots/ABB_1200_07_7.d.ts +0 -2
  128. package/dist/esm/types/components/robots/AxisConfig.d.ts +0 -2
  129. package/dist/esm/types/components/robots/DHRobot.d.ts +0 -2
  130. package/dist/esm/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
  131. package/dist/esm/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
  132. package/dist/esm/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
  133. package/dist/esm/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
  134. package/dist/esm/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
  135. package/dist/esm/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
  136. package/dist/esm/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
  137. package/dist/esm/types/components/robots/RobotAnimator.d.ts +0 -11
  138. package/dist/esm/types/components/robots/SupportedRobot.d.ts +0 -14
  139. package/dist/esm/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
  140. package/dist/esm/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
  141. package/dist/esm/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
  142. package/dist/esm/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
  143. package/dist/esm/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
  144. package/dist/esm/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
  145. package/dist/esm/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
  146. package/dist/esm/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
  147. package/dist/esm/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
  148. package/dist/esm/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
  149. package/dist/esm/types/components/robots/Yaskawa_AR900.d.ts +0 -2
  150. package/dist/esm/types/components/utils/hooks.d.ts +0 -21
  151. package/dist/esm/types/components/utils/robotTreeQuery.d.ts +0 -5
  152. package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
  153. package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
  154. package/dist/esm/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
  155. package/dist/esm/types/icons/arrowForwardFilled.d.ts +0 -1
  156. package/dist/esm/types/icons/expandFilled.d.ts +0 -1
  157. package/dist/esm/types/icons/home.d.ts +0 -1
  158. package/dist/esm/types/icons/index.d.ts +0 -6
  159. package/dist/esm/types/icons/infoOutlined.d.ts +0 -1
  160. package/dist/esm/types/icons/robot.d.ts +0 -1
  161. package/dist/esm/types/icons/wbLogo.d.ts +0 -6
  162. package/dist/esm/types/index.d.ts +0 -4
  163. package/dist/esm/types/themes/color.d.ts +0 -9
  164. package/dist/esm/types/themes/theme.d.ts +0 -143
  165. package/dist/esm/types/themes/wbTheme.d.ts +0 -1
  166. package/dist/esm/types/themes/wbTheme.stories.d.ts +0 -6
  167. package/dist/index.d.ts +0 -33
  168. /package/{dist/cjs/types/icons/index.d.ts → src/icons/index.ts} +0 -0
@@ -0,0 +1,186 @@
1
+ "use client"
2
+
3
+ import { createTheme, useTheme, type ThemeOptions } from "@mui/material/styles"
4
+ import { defaultsDeep } from "lodash-es"
5
+
6
+ const baseColors = {
7
+ white: "#FFFFFF",
8
+ midnightblue: "#001337",
9
+ lightbuttonblue: "#47D3FF",
10
+ midnightgray: "#DDE0E4",
11
+ midnightgray500: "#828B9B",
12
+ skyblue500: "#06B8F1",
13
+ skyblue600: "#0094CE",
14
+ darkishblue: "#262F42",
15
+ darkestblue: "#101629",
16
+ grayishblue: "#505968",
17
+ darkgrayishblue: "#363c4b",
18
+ scaryred: "#FF0E65",
19
+ tealGreen: "#1AC0B2",
20
+ magenta: "#EA3785",
21
+ }
22
+
23
+ /** Colors for the dark theme */
24
+ export const darkColors = {
25
+ primary: baseColors.skyblue500,
26
+ textDefault: baseColors.white,
27
+ textInverse: baseColors.darkestblue,
28
+ textError: baseColors.scaryred,
29
+ textSubtle: baseColors.midnightgray500,
30
+ backgroundDefault: baseColors.darkishblue,
31
+ inputBackgroundDefault: baseColors.darkgrayishblue,
32
+ borderColorDefault: "#3A4150",
33
+
34
+ selectBackground: baseColors.grayishblue,
35
+ appBarBackground: baseColors.darkestblue,
36
+ virtualRobot: "#1AC0B2",
37
+ physicalRobot: "#956FFA",
38
+ robotViewportBackground: "#1F283A",
39
+ viewportButtonInactiveBackground: baseColors.darkestblue,
40
+ viewportButtonHover: baseColors.midnightgray500,
41
+ viewportButtonActiveBackground: baseColors.skyblue500,
42
+ tabsBarBackground: baseColors.darkestblue,
43
+ activeTabBackground: baseColors.darkishblue,
44
+ omniverseConfigurationSuccess: baseColors.tealGreen,
45
+ omniverseConfigurationFailure: baseColors.magenta,
46
+ }
47
+
48
+ /** Colors for the light theme */
49
+ export const lightColors = {
50
+ primary: baseColors.lightbuttonblue,
51
+ textDefault: "#18181B",
52
+ textInverse: baseColors.white,
53
+ textError: baseColors.scaryred,
54
+ textSubtle: baseColors.midnightgray500,
55
+ backgroundDefault: baseColors.white,
56
+ inputBackgroundDefault: baseColors.white,
57
+ borderColorDefault: baseColors.midnightgray500,
58
+
59
+ selectBackground: "#E4E4E7",
60
+ appBarBackground: baseColors.white,
61
+ virtualRobot: "green",
62
+ physicalRobot: "blue",
63
+ robotViewportBackground: "#E4E4E7",
64
+ viewportButtonInactiveBackground: baseColors.midnightgray,
65
+ viewportButtonHover: baseColors.midnightgray500,
66
+ viewportButtonActiveBackground: baseColors.lightbuttonblue,
67
+ tabsBarBackground: baseColors.white,
68
+ activeTabBackground: baseColors.white,
69
+ omniverseConfigurationSuccess: baseColors.tealGreen,
70
+ omniverseConfigurationFailure: baseColors.magenta,
71
+ }
72
+
73
+ /** Gets the colors for the current theme (light or dark) */
74
+ export function useThemeColors() {
75
+ return useTheme().palette.mode === "dark" ? darkColors : lightColors
76
+ }
77
+
78
+ function createRobotPadTheme(
79
+ mode: "light" | "dark",
80
+ options: ThemeOptions = {},
81
+ ) {
82
+ const colors = mode === "light" ? lightColors : darkColors
83
+ return createTheme(
84
+ defaultsDeep(options, {
85
+ palette: {
86
+ mode,
87
+ primary: {
88
+ main: colors.primary,
89
+ },
90
+ background: {
91
+ default: colors.backgroundDefault,
92
+ },
93
+ },
94
+ typography: {
95
+ allVariants: {
96
+ color: colors.textDefault,
97
+ },
98
+ },
99
+ components: {
100
+ MuiPaper: {
101
+ styleOverrides: {
102
+ root: {
103
+ backgroundColor: colors.backgroundDefault,
104
+ },
105
+ },
106
+ },
107
+ MuiTabs: {
108
+ styleOverrides: {
109
+ root: {
110
+ backgroundColor: colors.tabsBarBackground,
111
+ minHeight: "42px",
112
+ },
113
+ },
114
+ },
115
+ MuiTab: {
116
+ styleOverrides: {
117
+ root: {
118
+ minHeight: "42px",
119
+ textTransform: "none",
120
+ "&.Mui-selected": {
121
+ color: "inherit",
122
+ backgroundColor: colors.activeTabBackground,
123
+ },
124
+ },
125
+ },
126
+ },
127
+ MuiButton: {
128
+ defaultProps: {
129
+ disableElevation: true,
130
+ },
131
+ styleOverrides: {
132
+ root: {
133
+ textTransform: "none",
134
+ borderRadius: "10px",
135
+ fontSize: "14px",
136
+ fontWeight: 500,
137
+ },
138
+ },
139
+ variants: [
140
+ {
141
+ props: { variant: "outlined" },
142
+ style: {
143
+ border: "2px solid rgba(255, 255, 255, 0.6)",
144
+ color: "rgba(255, 255, 255, 0.6)",
145
+ backgroundColor: "rgba(255, 255, 255, 0.2)",
146
+ "&:hover": {
147
+ backgroundColor: "rgba(255, 255, 255, 0.4)",
148
+ border: "2px solid rgba(255, 255, 255, 0.8)",
149
+ },
150
+ },
151
+ },
152
+ ],
153
+ },
154
+ MuiFab: {
155
+ styleOverrides: {
156
+ root: {
157
+ width: "48px",
158
+ height: "48px",
159
+ backgroundColor: colors.viewportButtonInactiveBackground,
160
+ color: colors.textDefault,
161
+ "&:hover": {
162
+ backgroundColor: colors.viewportButtonHover,
163
+ },
164
+ },
165
+ },
166
+ variants: [
167
+ {
168
+ props: { variant: "active" },
169
+ style: {
170
+ backgroundColor: colors.viewportButtonActiveBackground,
171
+ color: colors.textInverse,
172
+ "&:hover": {
173
+ backgroundColor: colors.viewportButtonActiveBackground,
174
+ },
175
+ },
176
+ },
177
+ ],
178
+ },
179
+ },
180
+ }),
181
+ )
182
+ }
183
+
184
+ export const darkTheme = createRobotPadTheme("dark")
185
+ export const lightTheme = createRobotPadTheme("light")
186
+ export const wbTheme = darkTheme
@@ -1,2 +0,0 @@
1
- import { SafetySetupSafetyZone } from "@wandelbots/wandelbots-js";
2
- export declare function SafetyZonesRenderer(safetyZones?: SafetySetupSafetyZone[], ...props: any[]): import("react/jsx-runtime").JSX.Element;