Props for the LoadingView component.

interface LoadingViewProps {
pageVariants: Variants;
contentVariants: Variants;
matchingProcess: MatchingProcessType;
rateLimitState: RateLimitType["rateLimitState"];
navigate: (arg: { to: string }) => void;
matchResultsLength: number;
onRetry: () => void;
onDismissError: () => void;
}
interface LoadingViewProps {
    pageVariants: Variants;
    contentVariants: Variants;
    matchingProcess: {
        isLoading: boolean;
        progress: MatchingProgress;
        statusMessage: string;
        detailMessage: null | string;
        error: null | string;
        detailedError: null | ApiError;
        timeEstimate: TimeEstimate;
        bypassCache: boolean;
        isFreshSearch: boolean;
        isCancelling: boolean;
        isInitializing: boolean;
        isCacheClearing: boolean;
        cacheClearingCount: number;
        cancelMatchingRef: RefObject<boolean>;
        matchingInitialized: RefObject<boolean>;
        setError: Dispatch<SetStateAction<null | string>>;
        setDetailedError: Dispatch<SetStateAction<null | ApiError>>;
        setIsLoading: Dispatch<SetStateAction<boolean>>;
        setProgress: (
            value:
                | MatchingProgress
                | (previous: MatchingProgress) => MatchingProgress,
        ) => void;
        setStatusMessage: Dispatch<SetStateAction<string>>;
        setDetailMessage: Dispatch<SetStateAction<null | string>>;
        setBypassCache: Dispatch<SetStateAction<boolean>>;
        setIsFreshSearch: Dispatch<SetStateAction<boolean>>;
        setIsCancelling: Dispatch<SetStateAction<boolean>>;
        setIsInitializing: Dispatch<SetStateAction<boolean>>;
        setIsCacheClearing: Dispatch<SetStateAction<boolean>>;
        setCacheClearingCount: Dispatch<SetStateAction<number>>;
        startMatching: (
            mangaList: KenmeiManga[],
            forceSearch?: boolean,
            setMatchResults?: Dispatch<SetStateAction<MangaMatchResult[]>>,
        ) => Promise<void>;
        handleResumeMatching: (
            matchResults: MangaMatchResult[],
            setMatchResults: Dispatch<SetStateAction<MangaMatchResult[]>>,
        ) => Promise<void>;
        handleCancelResume: () => void;
        handleCancelProcess: () => void;
        handlePauseMatching: () => void;
        handleResumeMatchingRequests: () => void;
        completeInitialization: () => void;
        setManualMatchingPause: (paused: boolean) => void;
        isManuallyPaused: boolean;
        isPauseTransitioning: boolean;
        setIsManuallyPaused: Dispatch<SetStateAction<boolean>>;
        setIsPauseTransitioning: Dispatch<SetStateAction<boolean>>;
        isTimeEstimatePaused: boolean;
        pauseTimeTracking: () => void;
        resumeTimeTracking: () => void;
        isRateLimitPaused: boolean;
        setTimeEstimate: Dispatch<SetStateAction<TimeEstimate>>;
    };
    rateLimitState: RateLimitState;
    navigate: (arg: { to: string }) => void;
    matchResultsLength: number;
    onRetry: () => void;
    onDismissError: () => void;
}

Properties

pageVariants: Variants

Framer Motion variants for page animation.

contentVariants: Variants

Framer Motion variants for content animation.

matchingProcess: {
    isLoading: boolean;
    progress: MatchingProgress;
    statusMessage: string;
    detailMessage: null | string;
    error: null | string;
    detailedError: null | ApiError;
    timeEstimate: TimeEstimate;
    bypassCache: boolean;
    isFreshSearch: boolean;
    isCancelling: boolean;
    isInitializing: boolean;
    isCacheClearing: boolean;
    cacheClearingCount: number;
    cancelMatchingRef: RefObject<boolean>;
    matchingInitialized: RefObject<boolean>;
    setError: Dispatch<SetStateAction<null | string>>;
    setDetailedError: Dispatch<SetStateAction<null | ApiError>>;
    setIsLoading: Dispatch<SetStateAction<boolean>>;
    setProgress: (
        value:
            | MatchingProgress
            | (previous: MatchingProgress) => MatchingProgress,
    ) => void;
    setStatusMessage: Dispatch<SetStateAction<string>>;
    setDetailMessage: Dispatch<SetStateAction<null | string>>;
    setBypassCache: Dispatch<SetStateAction<boolean>>;
    setIsFreshSearch: Dispatch<SetStateAction<boolean>>;
    setIsCancelling: Dispatch<SetStateAction<boolean>>;
    setIsInitializing: Dispatch<SetStateAction<boolean>>;
    setIsCacheClearing: Dispatch<SetStateAction<boolean>>;
    setCacheClearingCount: Dispatch<SetStateAction<number>>;
    startMatching: (
        mangaList: KenmeiManga[],
        forceSearch?: boolean,
        setMatchResults?: Dispatch<SetStateAction<MangaMatchResult[]>>,
    ) => Promise<void>;
    handleResumeMatching: (
        matchResults: MangaMatchResult[],
        setMatchResults: Dispatch<SetStateAction<MangaMatchResult[]>>,
    ) => Promise<void>;
    handleCancelResume: () => void;
    handleCancelProcess: () => void;
    handlePauseMatching: () => void;
    handleResumeMatchingRequests: () => void;
    completeInitialization: () => void;
    setManualMatchingPause: (paused: boolean) => void;
    isManuallyPaused: boolean;
    isPauseTransitioning: boolean;
    setIsManuallyPaused: Dispatch<SetStateAction<boolean>>;
    setIsPauseTransitioning: Dispatch<SetStateAction<boolean>>;
    isTimeEstimatePaused: boolean;
    pauseTimeTracking: () => void;
    resumeTimeTracking: () => void;
    isRateLimitPaused: boolean;
    setTimeEstimate: Dispatch<SetStateAction<TimeEstimate>>;
}

Current matching process state and methods.

Type declaration

  • isLoading: boolean
  • progress: MatchingProgress
  • statusMessage: string
  • detailMessage: null | string
  • error: null | string
  • detailedError: null | ApiError
  • timeEstimate: TimeEstimate
  • bypassCache: boolean
  • isFreshSearch: boolean
  • isCancelling: boolean
  • isInitializing: boolean
  • isCacheClearing: boolean
  • cacheClearingCount: number
  • cancelMatchingRef: RefObject<boolean>
  • matchingInitialized: RefObject<boolean>
  • setError: Dispatch<SetStateAction<null | string>>
  • setDetailedError: Dispatch<SetStateAction<null | ApiError>>
  • setIsLoading: Dispatch<SetStateAction<boolean>>
  • setProgress: (
        value:
            | MatchingProgress
            | (previous: MatchingProgress) => MatchingProgress,
    ) => void
  • setStatusMessage: Dispatch<SetStateAction<string>>
  • setDetailMessage: Dispatch<SetStateAction<null | string>>
  • setBypassCache: Dispatch<SetStateAction<boolean>>
  • setIsFreshSearch: Dispatch<SetStateAction<boolean>>
  • setIsCancelling: Dispatch<SetStateAction<boolean>>
  • setIsInitializing: Dispatch<SetStateAction<boolean>>
  • setIsCacheClearing: Dispatch<SetStateAction<boolean>>
  • setCacheClearingCount: Dispatch<SetStateAction<number>>
  • startMatching: (
        mangaList: KenmeiManga[],
        forceSearch?: boolean,
        setMatchResults?: Dispatch<SetStateAction<MangaMatchResult[]>>,
    ) => Promise<void>
  • handleResumeMatching: (
        matchResults: MangaMatchResult[],
        setMatchResults: Dispatch<SetStateAction<MangaMatchResult[]>>,
    ) => Promise<void>
  • handleCancelResume: () => void
  • handleCancelProcess: () => void
  • handlePauseMatching: () => void
  • handleResumeMatchingRequests: () => void
  • completeInitialization: () => void
  • setManualMatchingPause: (paused: boolean) => void
  • isManuallyPaused: boolean
  • isPauseTransitioning: boolean
  • setIsManuallyPaused: Dispatch<SetStateAction<boolean>>
  • setIsPauseTransitioning: Dispatch<SetStateAction<boolean>>
  • isTimeEstimatePaused: boolean
  • pauseTimeTracking: () => void
  • resumeTimeTracking: () => void
  • isRateLimitPaused: boolean
  • setTimeEstimate: Dispatch<SetStateAction<TimeEstimate>>
rateLimitState: RateLimitState

Current rate limit state from context.

navigate: (arg: { to: string }) => void

Function to navigate to a different route.

matchResultsLength: number

Total number of match results processed.

onRetry: () => void

Callback to retry the matching process.

onDismissError: () => void

Callback to dismiss error messages.