@wandelbots/wandelbots-js-react-components 2.29.0 → 2.30.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,80 @@
1
+ export interface CycleTimerProps {
2
+ /**
3
+ * Callback that receives the timer control functions:
4
+ * - `startNewCycle(maxTimeSeconds, elapsedSeconds?)` - Start a new timer cycle
5
+ * - `pause()` - Pause the countdown while preserving remaining time
6
+ * - `resume()` - Resume countdown from where it was paused
7
+ * - `isPaused()` - Check current pause state
8
+ */
9
+ onCycleComplete: (controls: {
10
+ startNewCycle: (maxTimeSeconds: number, elapsedSeconds?: number) => void;
11
+ pause: () => void;
12
+ resume: () => void;
13
+ isPaused: () => boolean;
14
+ }) => void;
15
+ /** Callback fired when a cycle actually completes (reaches zero) */
16
+ onCycleEnd?: () => void;
17
+ /** Whether the timer should start automatically when maxTime is set */
18
+ autoStart?: boolean;
19
+ /** Visual variant of the timer */
20
+ variant?: "default" | "small";
21
+ /** For small variant: whether to show remaining time details (compact hides them) */
22
+ compact?: boolean;
23
+ /** Additional CSS classes */
24
+ className?: string;
25
+ }
26
+ /**
27
+ * A circular gauge timer component that shows the remaining time of a cycle
28
+ *
29
+ * Features:
30
+ * - Circular gauge with 264px diameter and 40px thickness
31
+ * - Shows remaining time prominently in the center (60px font)
32
+ * - Displays "remaining time" label at top and total time at bottom
33
+ * - Automatically counts down and triggers callback when reaching zero
34
+ * - Full timer control: start, pause, resume functionality
35
+ * - Support for starting with elapsed time (resume mid-cycle)
36
+ * - Smooth spring-based progress animations for all state transitions
37
+ * - Fully localized with i18next
38
+ * - Material-UI theming integration
39
+ * - Small variant with animated progress icon (gauge border only) next to text
40
+ *
41
+ * @param onCycleComplete - Callback that receives timer control functions
42
+ * @param onCycleEnd - Optional callback fired when a cycle actually completes (reaches zero)
43
+ * @param autoStart - Whether to start timer automatically (default: true)
44
+ * @param variant - Visual variant: "default" (large gauge) or "small" (animated icon with text)
45
+ * @param compact - For small variant: whether to hide remaining time details
46
+ * @param className - Additional CSS classes
47
+ *
48
+ * Usage:
49
+ * ```tsx
50
+ * <CycleTimer
51
+ * onCycleComplete={(controls) => {
52
+ * // Start a 5-minute cycle
53
+ * controls.startNewCycle(300)
54
+ *
55
+ * // Or start a 5-minute cycle with 2 minutes already elapsed
56
+ * controls.startNewCycle(300, 120)
57
+ *
58
+ * // Pause the timer
59
+ * controls.pause()
60
+ *
61
+ * // Resume the timer
62
+ * controls.resume()
63
+ *
64
+ * // Check if paused
65
+ * const paused = controls.isPaused()
66
+ * }}
67
+ * onCycleEnd={() => console.log('Cycle completed!')}
68
+ * />
69
+ * ```
70
+ *
71
+ * Control Functions:
72
+ * - `startNewCycle(maxTimeSeconds, elapsedSeconds?)` - Start a new timer cycle
73
+ * - `pause()` - Pause the countdown while preserving remaining time
74
+ * - `resume()` - Resume countdown from where it was paused
75
+ * - `isPaused()` - Check current pause state
76
+ */
77
+ export declare const CycleTimer: (({ onCycleComplete, onCycleEnd, autoStart, variant, compact, className, }: CycleTimerProps) => import("react/jsx-runtime").JSX.Element) & {
78
+ displayName: string;
79
+ };
80
+ //# sourceMappingURL=CycleTimer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CycleTimer.d.ts","sourceRoot":"","sources":["../../src/components/CycleTimer.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,eAAe,EAAE,CAAC,QAAQ,EAAE;QAC1B,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;QACxE,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,QAAQ,EAAE,MAAM,OAAO,CAAA;KACxB,KAAK,IAAI,CAAA;IACV,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,UAAU,8EAShB,eAAe;;CA2YrB,CAAA"}
@@ -113,7 +113,7 @@ export declare class JoggingStore {
113
113
  saveToLocalStorage(): void;
114
114
  get isLocked(): boolean;
115
115
  get localStorageSave(): {
116
- selectedTabId: "cartesian" | "joint" | "debug";
116
+ selectedTabId: "debug" | "cartesian" | "joint";
117
117
  selectedCoordSystemId: string;
118
118
  selectedTcpId: string;
119
119
  selectedOrientation: string;