A highly customizable React top-loading bar component with hook-based, ref-based, and state-based control patterns.
Agent Success
Agent success rate when using this tile
64%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
51%
Build a TypeScript utility module that manages loading bar configurations with proper type safety.
Create a module with three type-safe utilities for managing top-loading bar settings and controls:
Implement validateLoadingBarConfig that:
Implement mergeLoadingBarSettings that:
{ color: '#2196f3', height: 3, shadow: true, loaderSpeed: 500 }Implement LoadingBarTracker class that:
startLoading() method that calls the reference's continuousStart() methodfinishLoading() method that calls the reference's complete() methodupdateProgress(value: number) method that calls the reference's staticStart() with the valueProvides the top-loading bar component and TypeScript type definitions.
@generates
// Configuration validator
export function validateLoadingBarConfig(config: any): boolean;
// Settings merger
export function mergeLoadingBarSettings(userSettings?: any): any;
// Progress tracker class
export class LoadingBarTracker {
constructor(ref: any);
startLoading(): void;
finishLoading(): void;
updateProgress(value: number): void;
}tessl i tessl/npm-react-top-loading-bar@3.0.0evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10