@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.
- package/README.md +0 -29
- package/package.json +60 -43
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +44 -0
- package/src/components/3d-viewport/PresetEnvironment.tsx +78 -0
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +54 -0
- package/src/components/LoadingButton.stories.tsx +61 -0
- package/src/components/LoadingButton.tsx +19 -0
- package/src/components/LoadingCover.tsx +75 -0
- package/src/components/ThemeSelect.tsx +49 -0
- package/src/components/VelocitySlider.stories.tsx +32 -0
- package/src/components/VelocitySlider.tsx +52 -0
- package/src/components/jogging/JoggingCartesianAxisControl.stories.tsx +41 -0
- package/src/components/jogging/JoggingCartesianAxisControl.tsx +127 -0
- package/src/components/jogging/JoggingCartesianTab.tsx +265 -0
- package/src/components/jogging/JoggingCartesianValues.tsx +45 -0
- package/src/components/jogging/JoggingFreedriveTab.tsx +9 -0
- package/src/components/jogging/JoggingJointLimitDetector.tsx +51 -0
- package/src/components/jogging/JoggingJointRotationControl.stories.tsx +38 -0
- package/src/components/jogging/JoggingJointRotationControl.tsx +197 -0
- package/src/components/jogging/JoggingJointTab.tsx +93 -0
- package/src/components/jogging/JoggingJointValues.tsx +45 -0
- package/src/components/jogging/JoggingOptions.tsx +96 -0
- package/src/components/jogging/JoggingPanel.stories.tsx +26 -0
- package/src/components/jogging/JoggingPanel.tsx +148 -0
- package/src/components/jogging/JoggingStore.tsx +294 -0
- package/src/components/jogging/JoggingVelocitySlider.tsx +56 -0
- package/src/components/robots/ABB_1200_07_7.tsx +123 -0
- package/src/components/robots/AxisConfig.ts +3 -0
- package/src/components/robots/DHRobot.tsx +129 -0
- package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +187 -0
- package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +187 -0
- package/src/components/robots/FANUC_CRX10iA.tsx +167 -0
- package/src/components/robots/FANUC_CRX25iA.tsx +167 -0
- package/src/components/robots/FANUC_CRX25iAL.tsx +178 -0
- package/src/components/robots/KUKA_KR210_R2700.tsx +291 -0
- package/src/components/robots/KUKA_KR270_R2700.tsx +244 -0
- package/src/components/robots/RobotAnimator.tsx +83 -0
- package/src/components/robots/SupportedRobot.tsx +131 -0
- package/src/components/robots/UniversalRobots_UR10.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR10e.tsx +275 -0
- package/src/components/robots/UniversalRobots_UR3.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR3e.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR5.tsx +111 -0
- package/src/components/robots/UniversalRobots_UR5e.tsx +280 -0
- package/src/components/robots/Yaskawa_AR1440.tsx +152 -0
- package/src/components/robots/Yaskawa_AR1730.tsx +165 -0
- package/src/components/robots/Yaskawa_AR2010.tsx +159 -0
- package/src/components/robots/Yaskawa_AR3120.tsx +160 -0
- package/src/components/robots/Yaskawa_AR900.tsx +121 -0
- package/src/components/utils/converters.ts +23 -0
- package/src/components/utils/errorHandling.ts +30 -0
- package/src/components/utils/hooks.tsx +54 -0
- package/src/components/utils/robotTreeQuery.ts +27 -0
- package/src/components/wandelscript-editor/WandelscriptEditor.stories.tsx +45 -0
- package/src/components/wandelscript-editor/WandelscriptEditor.tsx +114 -0
- package/src/components/wandelscript-editor/wandelscript.tmLanguage.ts +62 -0
- package/src/declarations.d.ts +10 -0
- package/src/i18n/config.ts +27 -0
- package/src/i18n/locales/de/translations.json +12 -0
- package/src/i18n/locales/en/translations.json +12 -0
- package/src/icons/arrowForwardFilled.tsx +7 -0
- package/src/icons/axis-x.svg +3 -0
- package/src/icons/axis-y.svg +3 -0
- package/src/icons/axis-z.svg +3 -0
- package/src/icons/expandFilled.tsx +11 -0
- package/src/icons/home.tsx +12 -0
- package/src/icons/infoOutlined.tsx +10 -0
- package/src/icons/jogging.svg +3 -0
- package/src/icons/robot.svg +3 -0
- package/src/icons/robot.tsx +14 -0
- package/src/icons/rotation.svg +4 -0
- package/src/icons/wbLogo.tsx +21 -0
- package/src/index.ts +7 -0
- package/src/themes/color.tsx +74 -0
- package/src/themes/theme.ts +150 -0
- package/src/themes/wbTheme.stories.tsx +64 -0
- package/src/themes/wbTheme.ts +186 -0
- package/dist/cjs/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
- package/dist/cjs/index.js +0 -5875
- package/dist/cjs/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
- package/dist/cjs/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
- package/dist/cjs/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
- package/dist/cjs/types/components/robots/ABB_1200_07_7.d.ts +0 -2
- package/dist/cjs/types/components/robots/AxisConfig.d.ts +0 -2
- package/dist/cjs/types/components/robots/DHRobot.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
- package/dist/cjs/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
- package/dist/cjs/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
- package/dist/cjs/types/components/robots/RobotAnimator.d.ts +0 -11
- package/dist/cjs/types/components/robots/SupportedRobot.d.ts +0 -14
- package/dist/cjs/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR900.d.ts +0 -2
- package/dist/cjs/types/components/utils/hooks.d.ts +0 -21
- package/dist/cjs/types/components/utils/robotTreeQuery.d.ts +0 -5
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
- package/dist/cjs/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
- package/dist/cjs/types/icons/arrowForwardFilled.d.ts +0 -1
- package/dist/cjs/types/icons/expandFilled.d.ts +0 -1
- package/dist/cjs/types/icons/home.d.ts +0 -1
- package/dist/cjs/types/icons/infoOutlined.d.ts +0 -1
- package/dist/cjs/types/icons/robot.d.ts +0 -1
- package/dist/cjs/types/icons/wbLogo.d.ts +0 -6
- package/dist/cjs/types/index.d.ts +0 -4
- package/dist/cjs/types/themes/color.d.ts +0 -9
- package/dist/cjs/types/themes/theme.d.ts +0 -143
- package/dist/cjs/types/themes/wbTheme.d.ts +0 -1
- package/dist/cjs/types/themes/wbTheme.stories.d.ts +0 -6
- package/dist/esm/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
- package/dist/esm/index.js +0 -5852
- package/dist/esm/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
- package/dist/esm/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
- package/dist/esm/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
- package/dist/esm/types/components/robots/ABB_1200_07_7.d.ts +0 -2
- package/dist/esm/types/components/robots/AxisConfig.d.ts +0 -2
- package/dist/esm/types/components/robots/DHRobot.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
- package/dist/esm/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
- package/dist/esm/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
- package/dist/esm/types/components/robots/RobotAnimator.d.ts +0 -11
- package/dist/esm/types/components/robots/SupportedRobot.d.ts +0 -14
- package/dist/esm/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR900.d.ts +0 -2
- package/dist/esm/types/components/utils/hooks.d.ts +0 -21
- package/dist/esm/types/components/utils/robotTreeQuery.d.ts +0 -5
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
- package/dist/esm/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
- package/dist/esm/types/icons/arrowForwardFilled.d.ts +0 -1
- package/dist/esm/types/icons/expandFilled.d.ts +0 -1
- package/dist/esm/types/icons/home.d.ts +0 -1
- package/dist/esm/types/icons/index.d.ts +0 -6
- package/dist/esm/types/icons/infoOutlined.d.ts +0 -1
- package/dist/esm/types/icons/robot.d.ts +0 -1
- package/dist/esm/types/icons/wbLogo.d.ts +0 -6
- package/dist/esm/types/index.d.ts +0 -4
- package/dist/esm/types/themes/color.d.ts +0 -9
- package/dist/esm/types/themes/theme.d.ts +0 -143
- package/dist/esm/types/themes/wbTheme.d.ts +0 -1
- package/dist/esm/types/themes/wbTheme.stories.d.ts +0 -6
- package/dist/index.d.ts +0 -33
- /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
|