import type { OfficeFileViewerFontSource } from './types'; /** 单个宿主字体资源加载失败时保留的诊断信息。 */ export type OfficeFontSourceLoadFailure = { /** 加载失败的字体资源声明。 */ source: OfficeFileViewerFontSource; /** 浏览器或资源请求返回的原始错误。 */ error: unknown; }; /** 一组宿主字体资源的异步加载结果。 */ export type OfficeFontSourceLoadResult = { /** 已成功注册到文档字体集合的资源数量。 */ loaded: number; /** 未能注册的资源及其原因。 */ failures: readonly OfficeFontSourceLoadFailure[]; }; /** 与一个预览会话绑定的宿主字体资源生命周期。 */ export type OfficeFontSourceSession = { /** 所有资源完成尝试后兑现,单个失败不会令 Promise 拒绝。 */ ready: Promise; /** 移除本次注册的字体并释放临时 Blob URL。 */ dispose(): void; }; /** 生成稳定的字体资源签名,避免宿主每次渲染创建数组时重复加载字体。 */ export declare function getOfficeFontSourcesKey(sources: readonly OfficeFileViewerFontSource[] | undefined): string; /** 为当前预览会话加载宿主字体资源,并在销毁时撤销注册。 */ export declare function createOfficeFontSourceSession(sources: readonly OfficeFileViewerFontSource[] | undefined, ownerDocument: Document): OfficeFontSourceSession;