import type { ReactNode } from 'react'; import React from 'react'; import type { OfficeAnnotationSource } from '../../services/annotations/AnnotationSource'; import type { OfficeAnnotationTarget } from '../../services/annotations/types'; import type { OfficeAnnotationController, OfficeAnnotationNavigator } from './useOfficeAnnotationController'; /** 为审阅面板和各格式渲染器提供同一个批注控制器。 */ export declare function OfficeAnnotationProvider({ controller, children, }: { /** 当前查看器独占的批注控制器。 */ controller: OfficeAnnotationController; /** 工具栏、审阅面板与格式查看器。 */ children: ReactNode; }): React.JSX.Element; /** 仅在审阅能力启用时建立运行时,避免关闭能力后注册额外数据源。 */ export declare function OfficeAnnotationRuntimeBoundary({ enabled, controller, children, }: { /** 当前查看器是否启用审阅能力。 */ enabled: boolean; /** 当前查看器独占的批注控制器。 */ controller: OfficeAnnotationController; /** 当前查看器的完整渲染内容。 */ children: ReactNode; }): React.JSX.Element; /** 读取当前查看器的审阅运行时;未启用时返回空值。 */ export declare function useOfficeAnnotationRuntime(): Readonly<{ options: Readonly<{ showComments: boolean; showNotes: boolean; }>; state: Readonly<{ snapshot: Readonly<{ revision: number; count: number; revisionCount: number; noteCount: number; supportsRevisionModes: boolean; }>; activeIndex: number; activeAnnotation?: Readonly<{ id: string; author?: string | undefined; createdAt?: string | undefined; text: string; resolved?: boolean | undefined; parentId?: string | undefined; target: OfficeAnnotationTarget; }> | undefined; activeRevision?: import("../../services/word/review/types").WordRevisionRecord | undefined; loading: boolean; error?: string | undefined; cacheRevision: number; }>; actions: Readonly<{ registerSource(source: OfficeAnnotationSource): () => void; /** 读取当前查看器的审阅运行时;未启用时返回空值。 */ registerNavigator(kind: "word-range" | "spreadsheet-cell" | "presentation-element", navigator: OfficeAnnotationNavigator): () => void; loadRange(start: number, end: number): Promise; getCached(index: number): Readonly<{ id: string; author?: string | undefined; createdAt?: string | undefined; text: string; resolved?: boolean | undefined; parentId?: string | undefined; target: OfficeAnnotationTarget; }> | undefined; loadAnnotationsByIds(ids: readonly string[]): Promise[]>; selectIndex(index: number): Promise; selectId(id: string): Promise; previous(): Promise; next(): Promise; activateRevisionId(id: string): Promise; clearActiveRevision(): void; }>; }> | undefined; /** 在格式查看器挂载期间注册其批注数据源。 */ export declare function useOfficeAnnotationSourceRegistration(source: OfficeAnnotationSource | undefined): void; /** 在格式查看器挂载期间注册批注精确定位能力。 */ export declare function useOfficeAnnotationNavigatorRegistration(kind: OfficeAnnotationTarget['kind'], navigator: OfficeAnnotationNavigator | undefined): void;