import type { CSSProperties, ReactElement } from 'react';
import type { Node as RichContentNode } from '@wix/ricos/schema';
import type { AvailableExperiments, BasePlugin } from './index.js';
export interface ThemeUtils {
    isBright: (hexColor: string) => boolean;
    adaptForeground: (actionColor?: string, fallbackColor?: string) => string | undefined;
    toCssRgbA: (hexColor: string | undefined, opacity: number) => string | undefined;
}
/** @deprecated Internal resolved palette colors kept public for backwards compatibility.
 *
 * New theme input should use `RicosTheme.colorPalette` with `RicosPalette`.
 */
export interface PaletteColors {
    actionColor?: string;
    bgColor?: string;
    textColor?: string;
    textColorLow?: string;
    disabledColor?: string;
    /** Default is black.
     * When `ActionColor` is too bright, it is replaced with `FallbackColor` when used on bright backgrounds (e.g modals, toolbars).
     * Therefore this color should remain relatively dark. */
    fallbackColor?: string;
    /** For text color on buttons that have actionColor as their background. */
    textOnActionColor?: string;
}
/** @deprecated Use `RicosPalette` instead. RGB tuple palettes are now expressed using `format: 'rgbTuple'`.
 *
 * @example
 * ```ts
 * // Before (PaletteRgbColors):
 * const palette: PaletteRgbColors = { type: 'rgb', actionColor: '132, 84, 252' };
 *
 * // After (RicosPalette):
 * const palette: RicosPalette = { format: 'rgbTuple', accent1: '132, 84, 252' };
 * ```
 */
export interface PaletteRgbColors {
    type: 'rgb';
    actionColor?: string;
    bgColor?: string;
    textColor?: string;
    textColorLow?: string;
    disabledColor?: string;
    /** Used for actionColor as a fallback. Default is black. **/
    fallbackColor?: string;
    /** For text color on buttons that have actionColor as their background. */
    textOnActionColor?: string;
}
/** Colors scheme for `Ricos`.
 *
 * {@link https://wix.github.io/ricos/docs/ricos/ricos-api/#theme Read More}
 * @example
 * ```ts
 * const palette: RicosPalette = {
 *  format: 'color',
 *  textColor: '#111111',
 *  accent1: '#8454FC',
 *  bgColor: 'transparent',
 * };
 *
 * // RGB tuple mode — all values are treated as RGB tuples:
 * const rgbPalette: RicosPalette = {
 *  format: 'rgbTuple',
 *  textColor: '0, 0, 0',
 *  accent1: '132, 84, 252',
 *  bgColor: '255, 255, 255',
 * };
 * ```
 */
export interface RicosPalette {
    /** Declares how color values in this palette should be interpreted.
     * - `'color'`: values are standard CSS color strings (hex, rgb(), named colors, etc.)
     * - `'rgbTuple'`: values are bare RGB tuples (e.g., `'255, 0, 0'`)
     */
    format: 'color' | 'rgbTuple';
    bgColor?: string;
    textColor?: string;
    accent1?: string;
    accent2?: string;
    accent3?: string;
    accent4?: string;
    shade1?: string;
    shade2?: string;
    shade3?: string;
}
export interface ThemeData {
    colors?: PaletteColors;
    utils: ThemeUtils;
    customStyles?: RicosCustomStyles;
}
export interface CustomTextualStyle {
    fontSize?: CSSProperties['fontSize'];
    fontFamily?: CSSProperties['fontFamily'];
    fontWeight?: CSSProperties['fontWeight'];
    fontStyle?: CSSProperties['fontStyle'];
    textDecoration?: CSSProperties['textDecoration'];
    lineHeight?: CSSProperties['lineHeight'];
    minHeight?: CSSProperties['minHeight'];
    color?: CSSProperties['color'];
    backgroundColor?: CSSProperties['backgroundColor'];
    paddingTop?: CSSProperties['paddingTop'];
    paddingBottom?: CSSProperties['paddingBottom'];
    letterSpacing?: CSSProperties['letterSpacing'];
}
export interface CustomQuoteStyle extends CustomTextualStyle {
    borderColor?: CSSProperties['borderColor'];
    borderWidth?: CSSProperties['borderWidth'];
    paddingInlineStart?: CSSProperties['paddingInlineStart'];
    marginInlineStart?: CSSProperties['marginInlineStart'];
    marginInlineEnd?: CSSProperties['marginInlineEnd'];
}
export type CustomButtonStyle = {
    color?: CSSProperties['color'];
    backgroundColor?: CSSProperties['backgroundColor'];
    buttonSize?: 'small' | 'medium' | 'large';
    borderRadius?: CSSProperties['borderRadius'];
    borderWidth?: CSSProperties['borderWidth'];
    borderColor?: CSSProperties['borderColor'];
    colorHover?: CSSProperties['color'];
    backgroundColorHover?: CSSProperties['backgroundColor'];
    borderColorHover?: CSSProperties['borderColor'];
};
export type CustomSecondaryButtonStyle = {
    color?: CSSProperties['color'];
    backgroundColor?: CSSProperties['backgroundColor'];
    borderColor?: CSSProperties['borderColor'];
};
export type CustomDividerStyle = {
    color?: CSSProperties['color'];
};
export type CustomLayoutStyle = {
    backgroundColor?: CSSProperties['backgroundColor'];
    backdropColor?: CSSProperties['backgroundColor'];
};
export type CustomCardStyle = {
    backgroundColor?: CSSProperties['backgroundColor'];
    backgroundGradient?: CSSProperties['backgroundImage'];
    backgroundImage?: CSSProperties['backgroundImage'];
    backgroundSize?: CSSProperties['backgroundSize'];
    backgroundPosition?: CSSProperties['backgroundPosition'];
    backgroundImageOverlay?: CSSProperties['background'];
    paddingBlockStart?: CSSProperties['paddingBlockStart'];
    paddingBlockEnd?: CSSProperties['paddingBlockEnd'];
    selectionBorderColor?: CSSProperties['borderColor'];
    selectionBorderWidth?: CSSProperties['borderWidth'];
    selectionActiveColor?: CSSProperties['borderColor'];
};
export type CustomImageStyle = {
    borderColor?: CSSProperties['borderColor'];
    borderWidth?: CSSProperties['borderWidth'];
    borderRadius?: CSSProperties['borderRadius'];
};
export interface CustomCodeBlockStyle {
    margin?: CSSProperties['margin'];
    padding?: CSSProperties['padding'];
    fontSize?: CSSProperties['fontSize'];
    lineHeight?: CSSProperties['lineHeight'];
    color?: CSSProperties['color'];
    backgroundColor?: CSSProperties['backgroundColor'];
}
export interface CustomMentionStyle {
    color: CSSProperties['color'];
    backgroundColor: CSSProperties['backgroundColor'];
}
export interface CustomTableStyle {
    backgroundColor: CSSProperties['backgroundColor'];
    borderColor: CSSProperties['borderColor'];
    color?: CSSProperties['color'];
}
export interface CustomAudioStyle {
    titleColor: CSSProperties['color'];
    subtitleColor: CSSProperties['color'];
    backgroundColor: CSSProperties['backgroundColor'];
    borderColor: CSSProperties['borderColor'];
    componentBorderColor?: CSSProperties['borderColor'];
    actionColor: CSSProperties['color'];
    actionTextColor: CSSProperties['color'];
    sliderColor?: CSSProperties['color'];
}
export interface CustomFileStyle {
    color: CSSProperties['color'];
    secondaryColor?: CSSProperties['color'];
    secondaryColorOpacity?: number;
    backgroundColor: CSSProperties['backgroundColor'];
    borderColor: CSSProperties['borderColor'];
    borderOpacity?: number;
    borderColorHover?: CSSProperties['borderColor'];
    iconColor: CSSProperties['color'];
    iconStrokeColor: CSSProperties['color'];
}
export interface CustomLinkPreviewStyle {
    backgroundColor?: CSSProperties['backgroundColor'];
    borderColor?: CSSProperties['borderColor'];
    hoverBorderColor?: CSSProperties['borderColor'];
    titleColor?: CSSProperties['color'];
    subtitleColor?: CSSProperties['color'];
}
export interface CustomVerticalEmbedStyle {
    color: CSSProperties['color'];
    textColor?: CSSProperties['color'];
    iconColor?: CSSProperties['color'];
    backgroundColor: CSSProperties['backgroundColor'];
    borderColor: CSSProperties['borderColor'];
    ribbonFillColor?: CSSProperties['backgroundColor'];
    ribbonTextColor?: CSSProperties['color'];
    ribbonBorderColor?: CSSProperties['borderColor'];
}
export interface CustomTocStyle {
    color?: CSSProperties['color'];
    titleColor?: CSSProperties['color'];
    borderColor?: CSSProperties['borderColor'];
    fontSize?: CSSProperties['fontSize'];
    itemSpacing?: CSSProperties['gap'];
}
export interface CustomFooterToolbarStyle {
    marginTop?: CSSProperties['marginTop'];
    paddingInlineStart?: CSSProperties['paddingInlineStart'];
    paddingInlineEnd?: CSSProperties['paddingInlineEnd'];
    iconColor?: CSSProperties['color'];
}
export interface CustomStaticToolbarStyles {
    borderBottom?: CSSProperties['borderBottom'];
}
export interface CustomEditorStyle {
    minHeight?: CSSProperties['minHeight'];
    maxHeight?: CSSProperties['maxHeight'];
    placeholder?: Pick<CustomTextualStyle, 'color'>;
    addPluginButton?: {
        positionInlineStart?: CSSProperties['left'] | CSSProperties['right'];
        plusIconColor?: CSSProperties['color'];
    };
    layout?: {
        sideOffset?: CSSProperties['marginInlineStart'];
    };
}
export type CustomContainerStyles = {
    paddingBlockStart?: CSSProperties['paddingBlockStart'];
    paddingBlockEnd?: CSSProperties['paddingBlockEnd'];
};
export type CustomSmartBlockStyle = {
    accentColor?: CSSProperties['color'];
    backgroundColor?: CSSProperties['backgroundColor'];
    borderColor?: CSSProperties['borderColor'];
    trackColor?: CSSProperties['color'];
    labelColor?: CSSProperties['color'];
};
/**
 * Per-element style overrides. Unlike `colorPalette` (which paints colors broadly
 * across every plugin), `customStyles` lets you target a single element — a heading,
 * the quote block, the footer toolbar, the editor container — with arbitrary CSS.
 * When both apply, `customStyles` wins on conflict.
 */
export interface RicosCustomStyles {
    /** Style overrides applied to `<h1>` elements rendered by Ricos. */
    h1?: CustomTextualStyle;
    /** Style overrides applied to `<h2>` elements rendered by Ricos. */
    h2?: CustomTextualStyle;
    /** Style overrides applied to `<h3>` elements rendered by Ricos. */
    h3?: CustomTextualStyle;
    /** Style overrides applied to `<h4>` elements rendered by Ricos. */
    h4?: CustomTextualStyle;
    /** Style overrides applied to `<h5>` elements rendered by Ricos. */
    h5?: CustomTextualStyle;
    /** Style overrides applied to `<h6>` elements rendered by Ricos. */
    h6?: CustomTextualStyle;
    /** Style overrides applied to paragraph (`<p>`) elements. */
    p?: CustomTextualStyle;
    /** Style overrides for the blockquote element — includes the left-border indent. */
    quote?: CustomQuoteStyle;
    /** Style overrides for inline link decorations. */
    link?: CustomTextualStyle;
    /** Style overrides for hashtag decorations. */
    hashtag?: CustomTextualStyle;
    /** Style overrides for the Button plugin's primary button shape. */
    button?: CustomButtonStyle;
    /** Style overrides for the Button plugin's secondary variant. */
    secondaryButton?: CustomSecondaryButtonStyle;
    /** Style overrides for the Divider plugin. */
    divider?: CustomDividerStyle;
    /** Style overrides for the editor's overall layout container (background, backdrop). */
    layout?: CustomLayoutStyle;
    /** Style overrides for the per-plugin selection card chrome (selection border, background image). */
    card?: CustomCardStyle;
    /** Style overrides applied to the Image plugin's frame. */
    image?: CustomImageStyle;
    /** Style overrides for the Code Block plugin. */
    codeBlock?: CustomCodeBlockStyle;
    /** Style overrides for inline mention decorations. */
    mention?: CustomMentionStyle;
    /** Style overrides for the Table plugin (borders, cell background). */
    table?: CustomTableStyle;
    /** Style overrides for the Audio plugin's card. */
    audio?: CustomAudioStyle;
    /** Style overrides for the File Upload plugin's card. */
    file?: CustomFileStyle;
    /** Style overrides for the Vertical Embed plugin. */
    verticalEmbed?: CustomVerticalEmbedStyle;
    /** Style overrides for the Table of Contents plugin. */
    toc?: CustomTocStyle;
    /** Style overrides for the Link Preview plugin's card. */
    linkPreview?: CustomLinkPreviewStyle;
    /** Style overrides for the inline plus-button bar rendered at the bottom of the editor. */
    footerToolbar?: CustomFooterToolbarStyle;
    /** Style overrides for the editable container: `minHeight`/`maxHeight`, placeholder color, +button position. */
    editor?: CustomEditorStyle;
    /** Style overrides for the static (anchored) text toolbar — currently the bottom border only. */
    staticToolbar?: CustomStaticToolbarStyles;
    /** Style overrides for the outermost content container — top/bottom padding. */
    container?: CustomContainerStyles;
    /** Style overrides for the Smart Block plugin's accent, background, and track colors. */
    smartBlock?: CustomSmartBlockStyle;
}
/**
 * Style overrides for the editor's floating panels and settings modals.
 * Most fields are deprecated and produce no effect — only `modals` (z-index
 * layering for the toolbar / popups / drawers / dialogs / tooltips /
 * notifications) is supported going forward.
 */
export interface RicosSettingsStyles {
    text?: {
        fontFamily?: CSSProperties['fontFamily'];
        color?: CSSProperties['color'];
    };
    whitebox?: {
        borderRadius?: CSSProperties['borderRadius'];
        boxShadow?: CSSProperties['boxShadow'];
    };
    buttons?: {
        borderRadius?: CSSProperties['borderRadius'];
        textColor?: CSSProperties['color'];
    };
    inputs?: {
        borderColor?: CSSProperties['borderColor'];
        borderRadius?: CSSProperties['borderRadius'];
        placeholderColor?: CSSProperties['color'];
    };
    icons?: {
        color?: CSSProperties['color'];
    };
    dividers?: {
        color?: CSSProperties['color'];
        height?: CSSProperties['height'];
    };
    colorPaletteSelectedButton?: {
        borderRadius?: CSSProperties['borderRadius'];
    };
    smallButtons?: {
        borderRadius?: CSSProperties['borderRadius'];
    };
    bgColor?: {
        backgroundColor?: CSSProperties['backgroundColor'];
    };
    disabled?: {
        backgroundColor?: CSSProperties['backgroundColor'];
    };
    hover?: {
        color?: CSSProperties['color'];
    };
    modals?: {
        toolbarZIndex?: CSSProperties['zIndex'];
        popupZIndex?: CSSProperties['zIndex'];
        drawerZIndex?: CSSProperties['zIndex'];
        dialogZIndex?: CSSProperties['zIndex'];
        tooltipZIndex?: CSSProperties['zIndex'];
        notificationZIndex?: CSSProperties['zIndex'];
        /**
         ** @deprecated
         **/
        baseZIndex?: CSSProperties['zIndex'];
    };
}
/**
 * React-Native-flavoured style overrides for native (mobile) Ricos builds.
 * Only consumed when `RicosTheme.useNativeStyles` is `true` — ignored by the
 * web renderer.
 */
export interface RicosNativeStyles {
    /** Default text family + color. */
    text?: {
        fontFamily?: CSSProperties['fontFamily'];
        color?: CSSProperties['color'];
    };
    /** Native background color of the editor surface. */
    bgColor?: {
        backgroundColor?: CSSProperties['backgroundColor'];
    };
    /** Weight applied to primary text (headings, emphasized labels). */
    primaryText?: {
        fontWeight?: CSSProperties['fontWeight'];
    };
    /** Background color for secondary surfaces (cards, panels). */
    secondary?: {
        backgroundColor?: CSSProperties['backgroundColor'];
    };
    /** Border radius of the floating settings sheet ("whitebox"). */
    whitebox?: {
        borderRadius?: CSSProperties['borderRadius'];
    };
    /** Size and framing of plugin cover images. */
    coverImage?: {
        width?: CSSProperties['width'];
        height?: CSSProperties['height'];
        border?: CSSProperties['border'];
        margin?: CSSProperties['margin'];
    };
}
export interface WixColor {
    name: string;
    reference: string;
    value: string;
}
/** @deprecated Use `RicosPalette` via `colorPalette` instead. */
export type WixPalette = WixColor[];
/** @deprecated PalettePreset string values are no longer supported. Use a RicosPalette object instead. */
export type PalettePreset = 'darkTheme';
/**
 * Typography tokens applied across the editor and viewer. The `fontFamily` value
 * cascades to every text node — paragraphs, headings, plugin labels — unless a
 * `customStyles.<element>.fontFamily` overrides it for that element.
 */
export interface RicosTypography {
    /**
     * WixTypography - work in progress.
     * This field is ineffective at the moment.
     */
    wixTypography?: WixTypography;
    /** Default font family inherited by every text element rendered by Ricos. */
    fontFamily?: CSSProperties['fontFamily'];
}
export interface WixTypography {
    Title: WixTypographyDefinition;
    Menu: WixTypographyDefinition;
    'Page-title': WixTypographyDefinition;
    'Heading-XL': WixTypographyDefinition;
    'Heading-L': WixTypographyDefinition;
    'Heading-M': WixTypographyDefinition;
    'Heading-S': WixTypographyDefinition;
    'Body-L': WixTypographyDefinition;
    'Body-M': WixTypographyDefinition;
    'Body-S': WixTypographyDefinition;
    'Body-XS': WixTypographyDefinition;
}
export interface WixTypographyDefinition {
    editorKey: string;
    lineHeight: string;
    style: string;
    weight: string;
    size: string;
    fontFamily: string;
    value: string;
}
export interface RicosTheme {
    colorPalette?: RicosPalette;
    typography?: RicosTypography;
    customStyles?: RicosCustomStyles;
    settingsStyles?: RicosSettingsStyles;
    nativeStyle?: RicosNativeStyles;
    useWixStyles?: boolean;
    useNativeStyles?: boolean;
    breakout?: {
        /** will be iterated with every root node and will set normalPadding for normal nodes and fullWidthPadding for fullWidth nodes */
        rule: ({ node }: {
            node: RichContentNode;
        }) => 'fullWidth' | 'normal';
        /** these should be bigger than fullWidth paddings for fullWith padding */
        normalPadding: {
            start: CSSProperties['paddingInlineStart'];
            end: CSSProperties['paddingInlineEnd'];
        };
        /** these will default to 0 if not provided, but sometimes they might be useful if you want to limit max-width of 'fullWidth' */
        fullWidthPadding?: {
            start: CSSProperties['paddingInlineStart'];
            end: CSSProperties['paddingInlineEnd'];
        };
    };
    parentClass?: string;
    /** @deprecated Use `colorPalette` instead. Accepts multiple legacy formats for backward compatibility. */
    palette?: PaletteColors | PaletteRgbColors | WixPalette;
    /** @deprecated Use `colorPalette` instead. Accepts multiple legacy formats for backward compatibility. */
    paletteConfig?: PaletteConfig;
}
/** @deprecated When using `colorPalette`, `accent1` replaces both `settingsActionColor` and
 * `focusActionColor`. These fields still work with the legacy `palette` API. */
export interface PaletteConfig {
    /**
     * When `true`, attribute `bgColor` provided in `palette` will be the
     * `background-color` of the inner content container of Ricos.
     *
     * Default: `false`
     */
    contentBgColor?: boolean;
    /** Override the `actionColor` of floating panels, toolbars & settings modals.
     *
     * @deprecated Use `colorPalette.accent1` instead.
     *
     * **Note:** `RicosEditor` only.
     * @default actionColor
     */
    settingsActionColor?: string;
    /** Override the `actionColor` of plugin when focused / clicked.
     *
     * @deprecated Use `colorPalette.accent1` instead.
     *
     * **Note:** `RicosEditor` only.
     * @default actionColor
     */
    focusActionColor?: string;
}
export interface ThemeStrategyArgs {
    experiments?: AvailableExperiments;
    plugins?: BasePlugin[];
    ricosTheme?: RicosTheme;
}
export interface ThemeStrategyResult {
    html: ReactElement;
    themeData: ThemeData;
}
export type CssVarsObject = Record<string, string | number | undefined>;
//# sourceMappingURL=theme-types.d.ts.map