@wandelbots/wandelbots-js-react-components 2.28.0 → 2.29.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.
@@ -0,0 +1,43 @@
1
+ export type ProgramState = "idle" | "running" | "paused" | "stopping";
2
+ export interface ProgramControlProps {
3
+ /** The current state of the program control */
4
+ state: ProgramState;
5
+ /** Callback fired when the run/resume button is clicked */
6
+ onRun: () => void;
7
+ /** Callback fired when the pause button is clicked (only available in 'with_pause' variant) */
8
+ onPause?: () => void;
9
+ /** Callback fired when the stop button is clicked */
10
+ onStop: () => void;
11
+ /**
12
+ * Function to reset the component from 'stopping' state back to 'idle'.
13
+ * This must be called manually by the user when requiresManualReset is true.
14
+ */
15
+ onReset?: () => void;
16
+ /**
17
+ * When true, the component will stay in 'stopping' state until onReset is called manually.
18
+ * When false (default), auto-resets to 'idle' after 2 seconds.
19
+ */
20
+ requiresManualReset?: boolean;
21
+ /**
22
+ * Variant of the component:
23
+ * - 'with_pause': Shows run/pause/stop buttons (default)
24
+ * - 'without_pause': Shows only run/stop buttons
25
+ */
26
+ variant?: "with_pause" | "without_pause";
27
+ /** Additional CSS class name */
28
+ className?: string;
29
+ }
30
+ /**
31
+ * A control component for program execution with run, pause, and stop functionality.
32
+ *
33
+ * Features:
34
+ * - State machine with idle, running, paused, and stopping states
35
+ * - Two variants: with_pause (3 buttons) and without_pause (2 buttons)
36
+ * - Optional manual reset functionality
37
+ * - Responsive design with 110px circular buttons
38
+ * - Material-UI theming integration
39
+ */
40
+ export declare const ProgramControl: (({ state, onRun, onPause, onStop, onReset, requiresManualReset, variant, className, }: ProgramControlProps) => import("react/jsx-runtime").JSX.Element) & {
41
+ displayName: string;
42
+ };
43
+ //# sourceMappingURL=ProgramControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgramControl.d.ts","sourceRoot":"","sources":["../../src/components/ProgramControl.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAA;AAErE,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,KAAK,EAAE,YAAY,CAAA;IACnB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,qDAAqD;IACrD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,CAAA;IACxC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AASD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,0FAWpB,mBAAmB;;CAuJzB,CAAA"}