@wandelbots/wandelbots-js-react-components 2.33.0-pr.feature-robot-precondition-list.372.b6e19a9 → 2.33.0-pr.feature-robot-precondition-list.372.e4998c8

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": "2.33.0-pr.feature-robot-precondition-list.372.b6e19a9",
3
+ "version": "2.33.0-pr.feature-robot-precondition-list.372.e4998c8",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,6 +1,6 @@
1
- # AppTopBar Component
1
+ # AppHeader Component
2
2
 
3
- A navigation bar component that displays the current application's icon and name, with an optional dropdown menu for switching between different applications.
3
+ A navigation header component that displays the current application's icon and name, with an optional dropdown menu for switching between different applications.
4
4
 
5
5
  ## Features
6
6
 
@@ -14,7 +14,7 @@ A navigation bar component that displays the current application's icon and name
14
14
 
15
15
  ```tsx
16
16
  import {
17
- AppTopBar,
17
+ AppHeader,
18
18
  type AppItem,
19
19
  } from "@wandelbots/wandelbots-js-react-components"
20
20
  import { Home, Settings, Person } from "@mui/icons-material"
@@ -36,7 +36,7 @@ const apps: AppItem[] = [
36
36
 
37
37
  function MyApp() {
38
38
  return (
39
- <AppTopBar
39
+ <AppHeader
40
40
  appIcon={<Person />}
41
41
  appName="Robot Control Studio"
42
42
  apps={apps}
@@ -48,7 +48,7 @@ function MyApp() {
48
48
 
49
49
  ## Props
50
50
 
51
- ### AppTopBarProps
51
+ ### AppHeaderProps
52
52
 
53
53
  - **appIcon** (`ReactNode`): Icon component for the current application
54
54
  - **appName** (`string`): Display name of the current application
@@ -28,7 +28,7 @@ export type AppItem = {
28
28
  onClick?: () => void
29
29
  }
30
30
 
31
- export type AppTopBarProps = {
31
+ export type AppHeaderProps = {
32
32
  /** Current app icon */
33
33
  appIcon: ReactNode
34
34
  /** Current app name */
@@ -42,11 +42,11 @@ export type AppTopBarProps = {
42
42
  }
43
43
 
44
44
  /**
45
- * A top navigation bar component that displays the current app and provides
45
+ * A top navigation header component that displays the current app and provides
46
46
  * a dropdown menu to navigate to other apps.
47
47
  */
48
- export const AppTopBar = externalizeComponent(
49
- observer((props: AppTopBarProps) => {
48
+ export const AppHeader = externalizeComponent(
49
+ observer((props: AppHeaderProps) => {
50
50
  const { appIcon, appName, apps = [], onAppSelect, sx } = props
51
51
  const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
52
52
  const isMenuOpen = Boolean(anchorEl)
@@ -73,7 +73,18 @@ export const AppTopBar = externalizeComponent(
73
73
 
74
74
  return (
75
75
  <>
76
- <AppBar position="static" sx={sx}>
76
+ <AppBar
77
+ position="static"
78
+ sx={{
79
+ boxShadow: "none",
80
+ backgroundImage: "none",
81
+ "& .MuiAppBar-root": {
82
+ backgroundImage: "none",
83
+ backgroundColor: "transparent",
84
+ },
85
+ ...sx,
86
+ }}
87
+ >
77
88
  <Toolbar sx={{ minHeight: "64px !important" }}>
78
89
  {/* App Icon */}
79
90
  <Box sx={{ mr: 2, display: "flex", alignItems: "center" }}>
@@ -298,9 +298,7 @@ export const WandelbotsDataGrid = externalizeComponent(
298
298
  height: "100%",
299
299
  display: "flex",
300
300
  flexDirection: "column",
301
- backgroundColor:
302
- theme.palette.backgroundPaperElevation?.[5] || "#202233",
303
- ...sx, // Your custom styles will override the theme default
301
+ ...sx,
304
302
  }}
305
303
  >
306
304
  <DataGrid
@@ -347,35 +345,26 @@ export const WandelbotsDataGrid = externalizeComponent(
347
345
  }}
348
346
  sx={{
349
347
  border: "none",
350
- backgroundColor: "transparent",
348
+
351
349
  width: "100%",
352
350
  // Remove any MUI overlays and elevation effects
353
351
  "& .MuiPaper-root": {
354
- backgroundColor: "transparent !important",
355
352
  boxShadow: "none !important",
356
353
  },
357
- "& .MuiDataGrid-overlay": {
358
- backgroundColor: "transparent !important",
359
- },
354
+ "& .MuiDataGrid-overlay": {},
360
355
  "& .MuiDataGrid-main": {
361
356
  border: "none",
362
- backgroundColor: "transparent",
357
+
363
358
  // Remove any surface or paper overlays
364
- "& .MuiPaper-root": {
365
- backgroundColor: "transparent !important",
366
- },
367
- },
368
- "& .MuiDataGrid-container--top [role=row]": {
369
- backgroundColor: "transparent !important",
359
+ "& .MuiPaper-root": {},
370
360
  },
361
+ "& .MuiDataGrid-container--top [role=row]": {},
371
362
  "& .MuiDataGrid-topContainer": {
372
363
  borderBottom: "none !important",
373
364
  },
374
365
  "& .MuiDataGrid-columnHeaders": {
375
366
  border: "none",
376
367
  borderBottom: "none !important",
377
- backgroundColor:
378
- theme.palette.backgroundPaperElevation?.[5] || "#202233",
379
368
  },
380
369
  "& .MuiDataGrid-row": {
381
370
  cursor: onRowClick ? "pointer" : "default",
@@ -383,7 +372,6 @@ export const WandelbotsDataGrid = externalizeComponent(
383
372
  margin: "1px 0",
384
373
  position: "relative",
385
374
  "&:hover": {
386
- backgroundColor: "transparent !important",
387
375
  "&::before": {
388
376
  content: '""',
389
377
  position: "absolute",
@@ -398,10 +386,7 @@ export const WandelbotsDataGrid = externalizeComponent(
398
386
  },
399
387
  // Disable MUI's built-in selection styling completely
400
388
  "&.Mui-selected": {
401
- backgroundColor: "transparent !important",
402
- "&:hover": {
403
- backgroundColor: "transparent !important",
404
- },
389
+ "&:hover": {},
405
390
  },
406
391
  // Highlight selected row with a distinct color using data attribute
407
392
  ...(selectedRowId !== null && {
@@ -441,7 +426,7 @@ export const WandelbotsDataGrid = externalizeComponent(
441
426
  border: "none",
442
427
  paddingLeft: "40px",
443
428
  paddingRight: "40px",
444
- backgroundColor: "transparent !important",
429
+
445
430
  "& .MuiDataGrid-columnHeaderTitle": {
446
431
  color: "rgba(255, 255, 255, 0.6)",
447
432
  },
@@ -450,18 +435,11 @@ export const WandelbotsDataGrid = externalizeComponent(
450
435
  padding: "8px",
451
436
  border: "none !important",
452
437
  borderBottom: "none !important",
453
- backgroundColor: "transparent !important",
454
- "& .MuiBox-root": {
455
- backgroundColor: "transparent !important",
456
- },
457
- "& .MuiFormControl-root": {
458
- backgroundColor: "transparent !important",
459
- },
460
- "& .MuiInputBase-root": {
461
- backgroundColor: "transparent !important",
462
- },
438
+
439
+ "& .MuiBox-root": {},
440
+ "& .MuiFormControl-root": {},
441
+ "& .MuiInputBase-root": {},
463
442
  "& .MuiPaper-root": {
464
- backgroundColor: "transparent !important",
465
443
  boxShadow: "none !important",
466
444
  },
467
445
  "& *": {
@@ -489,16 +467,12 @@ export const WandelbotsDataGrid = externalizeComponent(
489
467
  borderBottom: "none !important",
490
468
  borderLeft: "none !important",
491
469
  borderRight: "none !important",
492
- backgroundColor: "transparent !important",
470
+
493
471
  "--rowBorderColor": "none !important",
494
472
  },
495
473
  // Remove any remaining MUI background overlays
496
- "& .MuiBackdrop-root": {
497
- backgroundColor: "transparent !important",
498
- },
499
- "& .MuiModal-backdrop": {
500
- backgroundColor: "transparent !important",
501
- },
474
+ "& .MuiBackdrop-root": {},
475
+ "& .MuiModal-backdrop": {},
502
476
  ...dataGridProps?.sx,
503
477
  }}
504
478
  />
@@ -37,4 +37,8 @@ export class LogStore {
37
37
  addError = (message: string) => {
38
38
  this.addMessage(message, "error")
39
39
  }
40
+
41
+ addDebug = (message: string) => {
42
+ this.addMessage(message, "debug")
43
+ }
40
44
  }
@@ -17,7 +17,7 @@ import { observer } from "mobx-react-lite"
17
17
  import { useEffect, useRef, useState } from "react"
18
18
  import { externalizeComponent } from "../externalizeComponent"
19
19
 
20
- export type LogLevel = "info" | "error" | "warning"
20
+ export type LogLevel = "info" | "error" | "warning" | "debug"
21
21
 
22
22
  export type LogMessage = {
23
23
  id: string
@@ -37,6 +37,46 @@ export type LogViewerProps = {
37
37
  sx?: SxProps
38
38
  }
39
39
 
40
+ /**
41
+ * Utility function to create a log message
42
+ */
43
+ export const createLogMessage = (
44
+ message: string,
45
+ level: LogLevel,
46
+ id?: string,
47
+ ): LogMessage => ({
48
+ id: id || `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
49
+ timestamp: new Date(),
50
+ message,
51
+ level,
52
+ })
53
+
54
+ /**
55
+ * Utility function to create a debug log message
56
+ */
57
+ export const createDebugMessage = (message: string, id?: string): LogMessage =>
58
+ createLogMessage(message, "debug", id)
59
+
60
+ /**
61
+ * Utility function to create an info log message
62
+ */
63
+ export const createInfoMessage = (message: string, id?: string): LogMessage =>
64
+ createLogMessage(message, "info", id)
65
+
66
+ /**
67
+ * Utility function to create a warning log message
68
+ */
69
+ export const createWarningMessage = (
70
+ message: string,
71
+ id?: string,
72
+ ): LogMessage => createLogMessage(message, "warning", id)
73
+
74
+ /**
75
+ * Utility function to create an error log message
76
+ */
77
+ export const createErrorMessage = (message: string, id?: string): LogMessage =>
78
+ createLogMessage(message, "error", id)
79
+
40
80
  /**
41
81
  * A log viewer component that displays timestamped log messages with different levels.
42
82
  * Features a header with document icon and clear button, and scrollable message area.
@@ -79,6 +119,9 @@ export const LogViewer = externalizeComponent(
79
119
  case "warning":
80
120
  return theme.palette.warning.main
81
121
  case "info":
122
+ return theme.palette.info.main
123
+ case "debug":
124
+ return theme.palette.text.disabled
82
125
  default:
83
126
  return theme.palette.text.secondary
84
127
  }
@@ -83,7 +83,7 @@ export const TabBar = externalizeComponent(
83
83
  display: "none", // Hide the default indicator
84
84
  },
85
85
  "& .MuiTabs-flexContainer": {
86
- gap: 4,
86
+ gap: 2,
87
87
  },
88
88
  }}
89
89
  >
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "./components/3d-viewport/PresetEnvironment"
2
2
  export * from "./components/3d-viewport/SafetyZonesRenderer"
3
3
  export * from "./components/3d-viewport/TrajectoryRenderer"
4
- export * from "./components/AppTopBar"
4
+ export * from "./components/AppHeader"
5
5
  export * from "./components/CycleTimer"
6
6
  export * from "./components/DataGrid"
7
7
  export * from "./components/jogging/JoggingCartesianAxisControl"