@wandelbots/wandelbots-js-react-components 2.34.1-pr.feature-robot-precondition-list.372.90c151f → 2.34.1-pr.feature-robot-precondition-list.372.f06f958

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.34.1-pr.feature-robot-precondition-list.372.90c151f",
3
+ "version": "2.34.1-pr.feature-robot-precondition-list.372.f06f958",
4
4
  "description": "React UI toolkit for building applications on top of the Wandelbots platform",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -63,18 +63,19 @@ export interface RobotCardProps {
63
63
  variant?: "default" | "small"
64
64
  compact?: boolean
65
65
  onCycleComplete: (controls: {
66
- startNewCycle: (maxTimeSeconds: number, elapsedSeconds?: number) => void
66
+ startNewCycle: (maxTimeSeconds?: number, elapsedSeconds?: number) => void
67
67
  pause: () => void
68
68
  resume: () => void
69
69
  isPaused: () => boolean
70
70
  }) => void
71
71
  onCycleEnd?: () => void
72
72
  autoStart?: boolean
73
+ hasError?: boolean
73
74
  className?: string
74
75
  }>
75
76
  /** Callback to receive cycle timer controls for external timer management */
76
77
  onCycleTimerReady?: (controls: {
77
- startNewCycle: (maxTimeSeconds: number, elapsedSeconds?: number) => void
78
+ startNewCycle: (maxTimeSeconds?: number, elapsedSeconds?: number) => void
78
79
  pause: () => void
79
80
  resume: () => void
80
81
  isPaused: () => boolean
@@ -83,6 +84,8 @@ export interface RobotCardProps {
83
84
  onCycleEnd?: () => void
84
85
  /** Whether the cycle timer should auto-start when a new cycle is set */
85
86
  cycleTimerAutoStart?: boolean
87
+ /** Whether the cycle timer is in an error state (pauses timer and shows error styling) */
88
+ cycleTimerHasError?: boolean
86
89
  /** Additional CSS class name */
87
90
  className?: string
88
91
  }
@@ -105,7 +108,7 @@ export interface RobotCardProps {
105
108
  * - Robot name displayed in Typography h6 at top-left
106
109
  * - Program state indicator below the name
107
110
  * - Auto-fitting 3D robot model that scales with container size
108
- * - Compact cycle time component with small variant
111
+ * - Compact cycle time component with small variant, error state, and count-up/count-down mode support
109
112
  * - Transparent gray divider line
110
113
  * - "Drive to Home" button with press-and-hold functionality
111
114
  * - Localization support via react-i18next
@@ -127,6 +130,7 @@ export const RobotCard = externalizeComponent(
127
130
  onCycleTimerReady,
128
131
  onCycleEnd,
129
132
  cycleTimerAutoStart = true,
133
+ cycleTimerHasError = false,
130
134
  className,
131
135
  }: RobotCardProps) => {
132
136
  const theme = useTheme()
@@ -143,7 +147,10 @@ export const RobotCard = externalizeComponent(
143
147
 
144
148
  // Store cycle timer controls for external control
145
149
  const cycleControlsRef = useRef<{
146
- startNewCycle: (maxTimeSeconds: number, elapsedSeconds?: number) => void
150
+ startNewCycle: (
151
+ maxTimeSeconds?: number,
152
+ elapsedSeconds?: number,
153
+ ) => void
147
154
  pause: () => void
148
155
  resume: () => void
149
156
  isPaused: () => boolean
@@ -201,7 +208,7 @@ export const RobotCard = externalizeComponent(
201
208
  const handleCycleComplete = useCallback(
202
209
  (controls: {
203
210
  startNewCycle: (
204
- maxTimeSeconds: number,
211
+ maxTimeSeconds?: number,
205
212
  elapsedSeconds?: number,
206
213
  ) => void
207
214
  pause: () => void
@@ -364,6 +371,7 @@ export const RobotCard = externalizeComponent(
364
371
  onCycleComplete={handleCycleComplete}
365
372
  onCycleEnd={onCycleEnd}
366
373
  autoStart={cycleTimerAutoStart}
374
+ hasError={cycleTimerHasError}
367
375
  />
368
376
  </Box>
369
377
 
@@ -503,6 +511,7 @@ export const RobotCard = externalizeComponent(
503
511
  onCycleComplete={handleCycleComplete}
504
512
  onCycleEnd={onCycleEnd}
505
513
  autoStart={cycleTimerAutoStart}
514
+ hasError={cycleTimerHasError}
506
515
  />
507
516
 
508
517
  {/* Divider */}