import { type ComputedRef, type Ref } from 'vue'; import type { Fetcher, PreviewFile, RequestHandler, RequestInitFactory, ShouldFetchAsBlob } from '@eternalheart/file-preview-core'; export interface RequestContextValue { fetcher: Fetcher; shouldFetchAsBlob?: ShouldFetchAsBlob; } export declare function provideRequestContext(options: { requestInit?: RequestInitFactory; requestHandler?: RequestHandler; shouldFetchAsBlob?: ShouldFetchAsBlob; } | (() => { requestInit?: RequestInitFactory; requestHandler?: RequestHandler; shouldFetchAsBlob?: ShouldFetchAsBlob; })): ComputedRef; export declare function useRequestContext(): ComputedRef; export declare function useFetcher(): ComputedRef; /** * 解析 file 的可消费 URL: * - 未配置 shouldFetchAsBlob 或返回 false:直接派生自 file.url(不入 ref,避免切换文件时残留旧值) * - 返回 true:用 fetcher 拉成 blob: URL,组件卸载或 file 变化时 revoke */ export declare function useResolvedUrl(file: Ref): ComputedRef;