@wandelbots/wandelbots-js-react-components 2.38.1 → 2.39.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.
@@ -42,34 +42,8 @@ export interface RobotCardProps {
42
42
  transparentColor?: string;
43
43
  getModel?: (modelFromController: string) => string;
44
44
  }>;
45
- /** Custom cycle timer component (optional, defaults to CycleTimer) */
46
- cycleTimerComponent?: React.ComponentType<{
47
- variant?: "default" | "small";
48
- compact?: boolean;
49
- onCycleComplete: (controls: {
50
- startNewCycle: (maxTimeSeconds?: number, elapsedSeconds?: number) => void;
51
- pause: () => void;
52
- resume: () => void;
53
- isPaused: () => boolean;
54
- }) => void;
55
- onCycleEnd?: () => void;
56
- autoStart?: boolean;
57
- hasError?: boolean;
58
- className?: string;
59
- }>;
60
- /** Callback to receive cycle timer controls for external timer management */
61
- onCycleTimerReady?: (controls: {
62
- startNewCycle: (maxTimeSeconds?: number, elapsedSeconds?: number) => void;
63
- pause: () => void;
64
- resume: () => void;
65
- isPaused: () => boolean;
66
- }) => void;
67
- /** Callback fired when a cycle completes (reaches zero) */
68
- onCycleEnd?: () => void;
69
- /** Whether the cycle timer should auto-start when a new cycle is set */
70
- cycleTimerAutoStart?: boolean;
71
- /** Whether the cycle timer is in an error state (pauses timer and shows error styling) */
72
- cycleTimerHasError?: boolean;
45
+ /** Custom component to render in the content area (optional) */
46
+ customContentComponent?: React.ComponentType<Record<string, unknown>>;
73
47
  /** Additional CSS class name */
74
48
  className?: string;
75
49
  }
@@ -91,13 +65,33 @@ export interface RobotCardProps {
91
65
  * - Robot name displayed in Typography h6 at top-left
92
66
  * - Program state indicator below the name
93
67
  * - Auto-fitting 3D robot model that scales with container size
94
- * - Compact cycle time component with small variant, error state, and count-up/count-down mode support
68
+ * - Customizable content area for displaying custom React components
95
69
  * - Transparent gray divider line
96
70
  * - "Drive to Home" button with press-and-hold functionality
97
71
  * - Localization support via react-i18next
98
72
  * - Material-UI theming integration
73
+ *
74
+ * Usage with custom content:
75
+ * ```tsx
76
+ * // Example custom timer component
77
+ * const CustomTimer = () => (
78
+ * <Box>
79
+ * <Typography variant="body1" sx={{ color: "text.secondary" }}>
80
+ * Runtime
81
+ * </Typography>
82
+ * <Typography variant="h6">05:23</Typography>
83
+ * </Box>
84
+ * )
85
+ *
86
+ * <RobotCard
87
+ * robotName="UR5e Robot"
88
+ * programState={ProgramState.RUNNING}
89
+ * customContentComponent={CustomTimer}
90
+ * // ... other props
91
+ * />
92
+ * ```
99
93
  */
100
- export declare const RobotCard: (({ robotName, programState, safetyState, operationMode, driveToHomeEnabled, onDriveToHomePress, onDriveToHomeRelease, connectedMotionGroup, robotComponent: RobotComponent, cycleTimerComponent: CycleTimerComponent, onCycleTimerReady, onCycleEnd, cycleTimerAutoStart, cycleTimerHasError, className, }: RobotCardProps) => import("react/jsx-runtime").JSX.Element) & {
94
+ export declare const RobotCard: (({ robotName, programState, safetyState, operationMode, driveToHomeEnabled, onDriveToHomePress, onDriveToHomeRelease, connectedMotionGroup, robotComponent: RobotComponent, customContentComponent: CustomContentComponent, className, }: RobotCardProps) => import("react/jsx-runtime").JSX.Element) & {
101
95
  displayName: string;
102
96
  };
103
97
  //# sourceMappingURL=RobotCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RobotCard.d.ts","sourceRoot":"","sources":["../../src/components/RobotCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,wBAAwB,CAAA;AAI/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAIpD,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAA;IACjB,4BAA4B;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,mDAAmD;IACnD,WAAW,EAAE,mCAAmC,CAA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