import type { CSSProperties } from 'react'; import type { BoundingRect } from 'react-measure'; import type { Styles as ReactModalStyles } from 'react-modal'; import type { ComponentData, DraftContent, RicosEntity } from 'ricos-content'; import type { Helpers, LegacyViewerPluginConfig } from '.'; export { Link_Rel } from 'ricos-schema'; export type ModalStyles = ReactModalStyles; export type Styles = Record; export type ClassNameStrategy = (componentData: ComponentData, styles: Record, isMobile: boolean) => string; import type { TFunction as TFunctionReactI18Next } from 'react-i18next'; export type TFunction = TFunctionReactI18Next; export type { ResourceKey as LocaleResource } from 'i18next'; export type AnchorTarget = HTMLAnchorElement['target']; export type RelValue = HTMLAnchorElement['rel']; export type CustomAnchorScroll = (event: React.MouseEvent | Event, anchor: string) => void; export type GetEditorBounds = () => BoundingRect | undefined; export type TextDirection = 'rtl' | 'ltr' | 'auto'; export declare const isTextDirection: (dir: string) => dir is TextDirection; export type TextAlignment = 'left' | 'center' | 'right' | 'justify'; export type InlineStyle = 'bold' | 'underline' | 'italic' | 'spoiler' | 'not_bold' | 'not_italic' | 'not_underline'; export type onAtomicBlockFocus = (params: { blockKey?: string; type?: string; data?: RicosEntity['data']; }) => void; export interface SEOSettings { paywall?: { className?: string; index?: number; }; } interface CommonContextType { t: TFunction; locale: string; localeContent?: string; anchorTarget?: AnchorTarget; relValue?: RelValue; customAnchorScroll?: CustomAnchorScroll; helpers: Helpers; isMobile: boolean; iframeSandboxDomain?: string; } export interface ViewerContextType extends CommonContextType { config: LegacyViewerPluginConfig; disabled?: boolean; seoMode?: SEOSettings; disableRightClick?: boolean; contentState?: DraftContent; textAlignment?: TextAlignment; experiments?: AvailableExperiments; } export type Experiment = { enabled: boolean; value?: string; namespace?: string; }; export type AvailableExperiments = Record; export type LinkPreviewData = { title?: string; description?: string; thumbnail_url?: string; provider_url?: string; html?: string; }; export type LinkDataUrl = { url: string; target?: string; rel?: string; }; export type AddLinkData = LinkDataUrl & { anchor?: string; }; export type FocusPosition = 'start' | 'end' | 'all' | number; //# sourceMappingURL=commonTypes.d.ts.map