UNPKG

@wandelbots/wandelbots-js-react-components

Version:

React UI toolkit for building applications on top of the Wandelbots platform

22 lines 974 B
/** * Formats time in seconds to D:HH:MM:SS, H:MM:SS or MM:SS format * Used for the default (large) timer variant * Automatically includes days and hours as needed for clarity */ export declare const formatTime: (seconds: number) => string; /** * Formats time in seconds to a localized human-readable format * Used for the small timer variant * Examples: "2h 30m 15s", "45m 30s", "30s" * Falls back to English units if Intl.DurationFormat is not available */ export declare const formatTimeLocalized: (seconds: number, locale?: string) => string; /** * Calculates progress percentage for different timer states */ export declare const calculateProgress: (currentState: string, remainingTime: number, maxTime: number | null) => number; /** * Calculates exact progress position based on elapsed time */ export declare const calculateExactProgress: (currentState: string, totalElapsed: number, maxTime: number | null) => number; //# sourceMappingURL=utils.d.ts.map