export declare namespace GasPositioning { /** Направления в которых может быть выровнен элемент */ enum Direction { Top = "top", TopRight = "topRight", TopLeft = "topLeft", Bottom = "bottom", BottomRight = "bottomRight", BottomLeft = "bottomLeft", Left = "left", Right = "right" } type DirectionType = Direction.Top | Direction.TopRight | Direction.TopLeft | Direction.Bottom | Direction.BottomRight | Direction.BottomLeft | Direction.Left | Direction.Right | string; /** Тип выравнивания, auto - выравнивает если не влезает элемент, fixed - всегда статично */ type AlignType = 'auto' | 'fixed'; /** Список необходимого для выравнивания */ interface PositionSetup { popup: HTMLElement; parent: HTMLElement; offset: number; arrowWidth?: number; alignType?: AlignType; preferablePositions: Direction[] | string[]; after: (direction: Direction | string) => void; } /** Набор методов для определения направления выравнивания */ const DIRECTION_ADJUSTMENT: { bottom(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; top(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; bottomRight(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; bottomLeft(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; topRight(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; topLeft(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; right(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; left(tooltipRect: ClientRect, parentRect: ClientRect, offset: number): boolean; }; /** Набор методов для выравнивания по соответствующему направлению */ const ALIGN_BY: { bottom(positionData: GasPositioning.PositionSetup): void; bottomRight(positionData: GasPositioning.PositionSetup): void; bottomLeft(positionData: GasPositioning.PositionSetup): void; top(positionData: GasPositioning.PositionSetup): void; topRight(positionData: GasPositioning.PositionSetup): void; topLeft(positionData: GasPositioning.PositionSetup): void; right(positionData: GasPositioning.PositionSetup): void; left(positionData: GasPositioning.PositionSetup): void; }; }