import * as _angular_core from '@angular/core'; import { OnDestroy, ElementRef, OnInit } from '@angular/core'; import * as i1 from '@angular/common'; import { Subject } from 'rxjs'; type ThyResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft'; interface ThyResizeEvent { width?: number; height?: number; col?: number; mouseEvent?: MouseEvent | TouchEvent; } declare class ThyResizeHandleMouseDownEvent { direction: ThyResizeDirection; mouseEvent: MouseEvent | TouchEvent; constructor(direction: ThyResizeDirection, mouseEvent: MouseEvent | TouchEvent); } /** * 调整尺寸 * @name thyResizable */ declare class ThyResizableDirective implements OnDestroy { private elementRef; private renderer; private platform; private ngZone; private thyResizableService; /** * 调整尺寸的边界 * @default parent * @type 'window' | 'parent' | ElementRef */ readonly thyBounds: _angular_core.InputSignal<"window" | ElementRef | "parent">; /** * 最大高度(超过边界部分忽略) */ readonly thyMaxHeight: _angular_core.InputSignalWithTransform; /** * 最大宽度(超过边界部分忽略) */ readonly thyMaxWidth: _angular_core.InputSignalWithTransform; /** * 最小高度 */ readonly thyMinHeight: _angular_core.InputSignalWithTransform; /** * 最小宽度 */ readonly thyMinWidth: _angular_core.InputSignalWithTransform; /** * 栅格列数(-1 为不栅格) */ readonly thyGridColumnCount: _angular_core.InputSignalWithTransform; /** * 栅格最大列数 */ readonly thyMaxColumn: _angular_core.InputSignalWithTransform; /** * 栅格最小列数 */ readonly thyMinColumn: _angular_core.InputSignalWithTransform; /** * 锁定宽高比 */ readonly thyLockAspectRatio: _angular_core.InputSignalWithTransform; /** * 是否预览模式 */ readonly thyPreview: _angular_core.InputSignalWithTransform; /** * 是否禁用调整大小 */ readonly thyDisabled: _angular_core.InputSignalWithTransform; /** * 调整尺寸时的事件 */ readonly thyResize: _angular_core.OutputEmitterRef; /** * 开始调整尺寸时的事件 */ readonly thyResizeStart: _angular_core.OutputEmitterRef; /** * 结束调整尺寸时的事件 */ readonly thyResizeEnd: _angular_core.OutputEmitterRef; resizing: _angular_core.WritableSignal; private get nativeElement(); private nativeElementRect; private sizeCache; private ghostElement; private currentHandleEvent; private readonly destroyRef; constructor(); private bindMouseEnterAndLeaveEvents; setCursor(): void; endResize(event: MouseEvent | TouchEvent): void; resize(event: MouseEvent | TouchEvent): void; calcSize(width: number, height: number, ratio: number): ThyResizeEvent; previewResize({ width, height }: ThyResizeEvent): void; createGhostElement(): void; removeGhostElement(): void; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * 定义调整手柄及方向 * @name thy-resize-handle */ declare class ThyResizeHandle implements OnInit { private ngZone; private thyResizableService; private host; /** * 调整方向 * @type top | right | bottom | left | topRight | bottomRight | bottomLeft | topLeft */ readonly thyDirection: _angular_core.InputSignal; /** * 是否展示拖拽线 * @type boolean */ readonly thyLine: _angular_core.InputSignalWithTransform; /** * MouseDown 回调事件 */ readonly thyMouseDown: _angular_core.OutputEmitterRef; private hostRenderer; private readonly destroyRef; protected entered: _angular_core.Signal; ngOnInit(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare const DEFAULT_RESIZE_DIRECTION: ThyResizeDirection[]; /** * 定义调整手柄的快捷组件 * @name thy-resize-handles */ declare class ThyResizeHandles { /** * 定义调整手柄的方向 * @type ThyResizeDirection[] */ readonly thyDirections: _angular_core.InputSignal; /** * 是否展示拖拽线 */ readonly thyLine: _angular_core.InputSignalWithTransform; readonly directions: _angular_core.Signal>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class ThyResizableModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } /** * @internal */ declare class ThyResizableService implements OnDestroy { private ngZone; private document; private listeners; /** * The `OutsideAngular` prefix means that the subject will emit events outside of the Angular zone, * so that becomes a bit more descriptive for those who'll maintain the code in the future: * ```ts * thyResizableService.handleMouseDownOutsideAngular$.subscribe(event => { * console.log(Zone.current); // * console.log(NgZone.isInAngularZone()); // false * }); * ``` */ handleMouseDownOutsideAngular$: Subject; documentMouseUpOutsideAngular$: Subject; documentMouseMoveOutsideAngular$: Subject; mouseEnteredOutsideAngular$: Subject; constructor(); startResizing(event: MouseEvent | TouchEvent): void; private clearListeners; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare function getEventWithPoint(event: MouseEvent | TouchEvent): MouseEvent | Touch; declare function ensureInBounds(value: number, boundValue: number): number; declare function setCompatibleStyle(element: HTMLElement, key: string, value: string): void; export { DEFAULT_RESIZE_DIRECTION, ThyResizableDirective, ThyResizableModule, ThyResizableService, ThyResizeHandle, ThyResizeHandleMouseDownEvent, ThyResizeHandles, ensureInBounds, getEventWithPoint, setCompatibleStyle }; export type { ThyResizeDirection, ThyResizeEvent };