import type { RichMediaLayout } from '@atlaskit/adf-schema'; import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; export interface calcMediaSinglePixelWidthProps { containerWidth: number; contentWidth?: number; gutterOffset: number; layout: RichMediaLayout; origWidth: number; width?: number; widthType?: 'percentage' | 'pixel'; } /** * Convert width attribute to pixel value for legacy (resized or not resisized) and new media single node for new experience * @param width node width attribute * @param widthType node widthType attribute * @param origWidth original media width * @param layout node layout attribute * @param contentWidth editor content width * @param containerWidth editor container width * @param gutterOffset gap between resizer handle and media * @returns pixel width of the node */ export declare const calcMediaSinglePixelWidth: ({ width, widthType, origWidth, layout, contentWidth, containerWidth, gutterOffset, }: calcMediaSinglePixelWidthProps) => number; /** * Get parent width for a nested media single node for new experience * We don't check for mediaSingle selection in this function. * @param view Editor view * @param pos node position * @param forInsertion for insertion */ export declare const getMaxWidthForNestedNodeNext: (view: EditorView, pos: number | undefined, forInsertion?: boolean) => number | null; /** * Get parent content width for nested media single node. * @param resolvedPos resolved Position of the node * @param view editor view * @returns parent content width for nested node */ export declare const getParentWidthForNestedMediaSingleNode: (resolvedPos: ResolvedPos, view: EditorView) => number | null; /** * Get parent width for nested media single nodes * @param resolvedPos resolved Position of the node * @param view editor view * @returns parent width used for media single initial width on insertion */ export declare const getParentWidthForNestedMediaSingleNodeForInsertion: (resolvedPos: ResolvedPos, view: EditorView) => number | null; export { getMediaSinglePixelWidth } from './getMediaSinglePixelWidth'; export { calcMediaSingleMaxWidth } from './calcMediaSingleMaxWidth'; export { getMediaSingleInitialWidth } from './getMediaSingleInitialWidth'; export { calculateOffsetLeft } from './calculateOffsetLeft'; export { roundToNearest } from './roundToNearest'; export { calcMinWidth } from './calcMinWidth'; export { getMaxWidthForNestedNode } from './getMaxWidthForNestedNode'; export { currentMediaNodeWithPos } from './currentMediaNodeWithPos';