import tippy, { Props, Instance } from 'tippy.js'; import { InjectionToken, Type, ElementRef, Provider, EnvironmentProviders } from '@angular/core'; import { Observable } from 'rxjs'; import { ViewOptions, ResolveViewRef, Content } from '@ngneat/overview'; interface CreateOptions extends Partial, ViewOptions { variation: string; preserveView: boolean; className: string | string[]; data: any; } interface TippyInstance extends Instance { data?: any; } type TippyProps = Props; type VariationConfig = Partial & { isContextMenu?: boolean; }; interface ExtendedTippyProps extends TippyProps { variations: Record; defaultVariation: keyof ExtendedTippyProps['variations']; beforeRender?: (text: string) => string; zIndexGetter?(): number; } type TippyElement = ElementRef | Element; interface ExtendedTippyInstance extends TippyInstance { view: ResolveViewRef | null; $viewOptions: ViewOptions; context?: ViewOptions['context']; } type TippyConfig = Partial; type TippyContent = Content | (() => Promise>); type TippyLoader = () => typeof tippy | Promise<{ default: typeof tippy; }>; declare const TIPPY_LOADER: InjectionToken; declare const TIPPY_CONFIG: InjectionToken>; declare const TIPPY_LOADER_COMPONENT: InjectionToken>; type TippyLoaderTiming = Observable; declare const TIPPY_LOADER_TIMING: InjectionToken; type Variation = Partial; declare const tooltipVariation: Variation; declare const popperVariation: Variation; declare function withContextMenuVariation(baseVariation: Variation): VariationConfig; declare function provideTippyLoader(loader: TippyLoader, ...features: EnvironmentProviders[]): EnvironmentProviders; declare function provideTippyConfig(config: TippyConfig): Provider; declare function withTippyLoaderComponent(component: Type): EnvironmentProviders; declare function withTippyLoaderTiming(timing: () => TippyLoaderTiming): EnvironmentProviders; export { TIPPY_CONFIG, TIPPY_LOADER, TIPPY_LOADER_COMPONENT, TIPPY_LOADER_TIMING, popperVariation, provideTippyConfig, provideTippyLoader, tooltipVariation, withContextMenuVariation, withTippyLoaderComponent, withTippyLoaderTiming }; export type { CreateOptions, ExtendedTippyInstance, ExtendedTippyProps, TippyConfig, TippyContent, TippyElement, TippyInstance, TippyLoader, TippyLoaderTiming, TippyProps, VariationConfig };