import type { KeyboardEvent, MouseEvent, PointerEvent } from 'react'; import type { OfficeHyperlink, OfficeHyperlinkSource } from './types'; /** 格式渲染节点绑定共享链接交互时使用的参数。 */ export type UseOfficeHyperlinkOptions = { /** 当前节点关联的标准链接;省略时不增加交互。 */ hyperlink?: OfficeHyperlink; /** 当前节点的稳定来源身份。 */ source: OfficeHyperlinkSource; /** 缩略图等只读副本可以显式关闭交互。 */ interactive?: boolean; }; /** 可直接合并到普通 HTML 元素的链接交互属性。 */ export type OfficeHyperlinkInteractionProps = { role?: 'link'; tabIndex?: number; title?: string; 'data-office-hyperlink'?: 'true'; onClick?: (event: MouseEvent) => void; onContextMenu?: (event: MouseEvent) => void; onKeyDown?: (event: KeyboardEvent) => void; onPointerDown?: (event: PointerEvent) => void; }; /** 为任意格式渲染节点补充统一的链接激活规则。 */ export declare function useOfficeHyperlink({ hyperlink, source, interactive, }: UseOfficeHyperlinkOptions): OfficeHyperlinkInteractionProps;