UNPKG

@antv/narrative-text-vis

Version:

React component of interactive narrative text

42 lines (41 loc) 1.7 kB
import { EntityType, NarrativeTextSpec, SectionSpec, ParagraphSpec, PhraseSpec, HeadlineSpec, BulletItemSpec } from '@antv/narrative-text-schema'; import { PluginManager } from './chore/plugin'; export declare type PhraseType = 'text' | EntityType | null; export declare type ThemeProps = { /** * @description size of text * @description.zh-CN 文本大小 */ size?: 'normal' | 'small'; }; export declare type ExtensionProps = { /** * @description extension plugin * @description.zh-CN 扩展插件 */ pluginManager?: PluginManager; }; export declare type PhraseEvents = Partial<{ onClickPhrase: (spec: PhraseSpec) => void; onMouseEnterPhrase: (spec: PhraseSpec) => void; onMouseLeavePhrase: (spec: PhraseSpec) => void; }>; declare type NormalParagraphSpec = HeadlineSpec | ParagraphSpec | BulletItemSpec; export declare type ParagraphEvents = PhraseEvents & Partial<{ onClickParagraph: (spec: NormalParagraphSpec) => void; onMouseEnterParagraph: (spec: NormalParagraphSpec) => void; onMouseLeaveParagraph: (spec: NormalParagraphSpec) => void; }>; export declare type SectionEvents = ParagraphEvents & Partial<{ onClickSection: (spec: SectionSpec) => void; onMouseEnterSection: (spec: SectionSpec) => void; onMouseLeaveSection: (spec: SectionSpec) => void; }>; export declare type NarrativeEvents = SectionEvents & Partial<{ onClickNarrative: (spec: NarrativeTextSpec) => void; onMouseEnterNarrative: (spec: NarrativeTextSpec) => void; onMouseLeaveNarrative: (spec: NarrativeTextSpec) => void; onCopySuccess: (e?: ClipboardEvent) => void; onCopyFailure: (e?: ClipboardEvent) => void; }>; export {};