@wandelbots/wandelbots-js-react-components 2.38.1-pr.feature-remove-timer-from-robot-card.381.54703fe → 2.38.1
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/dist/components/RobotCard.d.ts +30 -24
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1844 -1800
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CycleTimer/DefaultVariant.tsx +3 -3
- package/src/components/CycleTimer/useTimerLogic.ts +2 -2
- package/src/components/RobotCard.tsx +126 -49
|
@@ -42,8 +42,34 @@ export interface RobotCardProps {
|
|
|
42
42
|
transparentColor?: string;
|
|
43
43
|
getModel?: (modelFromController: string) => string;
|
|
44
44
|
}>;
|
|
45
|
-
/** Custom
|
|
46
|
-
|
|
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;
|
|
47
73
|
/** Additional CSS class name */
|
|
48
74
|
className?: string;
|
|
49
75
|
}
|
|
@@ -65,33 +91,13 @@ export interface RobotCardProps {
|
|
|
65
91
|
* - Robot name displayed in Typography h6 at top-left
|
|
66
92
|
* - Program state indicator below the name
|
|
67
93
|
* - Auto-fitting 3D robot model that scales with container size
|
|
68
|
-
* -
|
|
94
|
+
* - Compact cycle time component with small variant, error state, and count-up/count-down mode support
|
|
69
95
|
* - Transparent gray divider line
|
|
70
96
|
* - "Drive to Home" button with press-and-hold functionality
|
|
71
97
|
* - Localization support via react-i18next
|
|
72
98
|
* - 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
|
-
* ```
|
|
93
99
|
*/
|
|
94
|
-
export declare const RobotCard: (({ robotName, programState, safetyState, operationMode, driveToHomeEnabled, onDriveToHomePress, onDriveToHomeRelease, connectedMotionGroup, robotComponent: RobotComponent,
|
|
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) & {
|
|
95
101
|
displayName: string;
|
|
96
102
|
};
|
|
97
103
|
//# 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;
|
|
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,CAAA;IAChD,qDAAqD;IACrD,aAAa,EAAE,qCAAqC,CAAA;IACpD,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC;;;;OAIG;IACH,4BAA4B,CAAC,EAAE,CAAC,YAAY,EA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