@scalar/api-client
Version:
the open source API testing client
20 lines • 772 B
TypeScript
import type { Ref } from 'vue';
/**
* Manages the loading animation for the address bar.
*
* The animation has two phases:
* 1. While requesting: Animates asymptotically toward 85% to indicate ongoing work
* 2. After request completes: Animates linearly to 100% over 400ms for smooth completion
*
* This creates a natural feel where the bar does not instantly jump to 100%,
* making the loading experience more predictable and less jarring.
*
* @returns An object with methods to control the loading animation and the current percentage
*/
export declare const useLoadingAnimation: () => {
startLoading: () => void;
stopLoading: () => void;
percentage: Ref<number>;
isLoading: Ref<boolean>;
};
//# sourceMappingURL=use-loading-animation.d.ts.map