@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
52 lines (51 loc) • 1.8 kB
TypeScript
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
import type { BreakoutMode } from '../types/breakout';
/**
* Variables required to construct a context for breakout ssr inline script.
*
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
*
*/
declare const breakoutConsts: any;
export declare const absoluteBreakoutWidth: (layout: 'full-width' | 'wide' | string, containerWidth: number) => any;
export { breakoutConsts };
export declare const calcWideWidth: any;
export declare const calcBreakoutWidth: any;
export declare function calculateBreakoutStyles({ mode, widthStateLineLength, widthStateWidth, }: {
mode: BreakoutMarkAttrs['mode'];
/**
* offsetWidth of the content the editor is attached to.
* Expected to be retrieved via `WidthState.lineLength`.
*/
widthStateWidth?: number;
/**
* clientWidth of the content area in the editor (ie. EditorPlugin contentComponents).
* Expected to be retrieved via `WidthState.width`.
*/
widthStateLineLength?: number;
}): {
type: "line-length-unknown";
width: any;
minWidth: number;
display: string;
justifyContent: string;
transform: string;
transition: string;
marginLeft?: undefined;
} | {
type: "line-length-known";
width: any;
minWidth: number;
transition: string;
transform: string;
marginLeft: string;
display?: undefined;
justifyContent?: undefined;
};
export declare function calcBreakoutWidthPx(mode: BreakoutMarkAttrs['mode'], widthStateWidth?: number): number;
export declare const getNextBreakoutMode: (currentMode?: BreakoutMode) => BreakoutMode;
export declare const getTitle: (layout?: BreakoutMode) => {
id: string;
defaultMessage: string;
description: string;
};