/**
 * This Source Code is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) Infonomic Company Limited
 */
import type { StoredFileValue } from '@byline/core';
import type { Position } from '../../nodes/inline-image-node/types';
export interface PreferredSize {
    url: string;
    width?: number;
    height?: number;
}
/**
 * Choose a sensible image URL + dimensions for the editor preview given the
 * picked media's `image` field and the user's chosen position. Reads
 * directly from `image.variants` (persisted on the file value at upload
 * time). SVGs return the original `storageUrl`; missing/empty variants
 * fall back to the original.
 */
export declare function getPreferredSize(position: Position, image: StoredFileValue | null | undefined): PreferredSize | null;
/**
 * One denormalised image variant — the renderer-facing shape used by the
 * inline-image node and richtext after-read hook. Mirrors the persisted
 * `PersistedVariant` with `storageUrl` renamed to `url` for renderer
 * ergonomics.
 */
export interface DerivedImageSize {
    name: string;
    url: string;
    width?: number;
    height?: number;
    format: string;
}
/**
 * Map a `StoredFileValue.variants` array into the renderer shape. SVGs and
 * variant-less images return `[]` so renderers fall back to
 * `image.storageUrl`.
 */
export declare function deriveImageSizes(image: StoredFileValue | null | undefined): DerivedImageSize[];
