import { Ref } from "../node_modules/lit-html/development/directives/ref.js"; import { LitElement } from "lit"; //#region src/gui/EFFitScale.d.ts interface ScaleInput { containerWidth: number; containerHeight: number; contentWidth: number; contentHeight: number; } interface ScaleOutput { scale: number; translateX: number; translateY: number; } /** * Compute the scale factor and centering translation needed to fit * content of a given size into a container while preserving aspect ratio. * * Returns `null` when any dimension is zero or negative (cannot compute). */ declare function computeFitScale(input: ScaleInput): ScaleOutput | null; declare class EFFitScale extends LitElement { containerRef: Ref; contentRef: Ref; createRenderRoot(): this; uniqueId: string; paused: boolean; updated(changedProperties: Map): void; private containerResizeObserver?; private contentResizeObserver?; private childMutationObserver?; private observedContentChild; private hasWarnedZeroDimensions; get contentChild(): HTMLElement | null; get scaleInfo(): { scale: number; containerWidth: number; containerHeight: number; contentWidth: number; contentHeight: number; }; scaleLastSetOn: HTMLElement | null; private hydrationGateOpen; private updateScale; private observeContentChild; removeScale: () => void; connectedCallback(): void; disconnectedCallback(): void; } declare global { interface HTMLElementTagNameMap { "ef-fit-scale": EFFitScale; } } //#endregion export { EFFitScale, ScaleInput, ScaleOutput, computeFitScale }; //# sourceMappingURL=EFFitScale.d.ts.map