123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- import { DirectiveBinding } from 'vue';
- interface ClickOutsideBindingArgs {
- handler: (e: MouseEvent) => void;
- closeConditional?: (e: Event) => boolean;
- include?: () => HTMLElement[];
- }
- interface ClickOutsideDirectiveBinding extends DirectiveBinding {
- value: ((e: MouseEvent) => void) | ClickOutsideBindingArgs;
- }
- declare const ClickOutside: {
- mounted(el: HTMLElement, binding: ClickOutsideDirectiveBinding): void;
- unmounted(el: HTMLElement, binding: ClickOutsideDirectiveBinding): void;
- };
- type ObserveHandler = (isIntersecting: boolean, entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;
- interface ObserveDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
- value?: ObserveHandler | {
- handler: ObserveHandler;
- options?: IntersectionObserverInit;
- };
- modifiers: {
- once?: boolean;
- quiet?: boolean;
- };
- }
- declare function mounted$5(el: HTMLElement, binding: ObserveDirectiveBinding): void;
- declare function unmounted$5(el: HTMLElement, binding: ObserveDirectiveBinding): void;
- declare const Intersect: {
- mounted: typeof mounted$5;
- unmounted: typeof unmounted$5;
- };
- interface MutationOptions {
- attr?: boolean;
- char?: boolean;
- child?: boolean;
- sub?: boolean;
- once?: boolean;
- immediate?: boolean;
- }
- interface MutationDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
- value: MutationCallback | {
- handler: MutationCallback;
- options?: MutationObserverInit;
- };
- modifiers: MutationOptions;
- }
- declare function mounted$4(el: HTMLElement, binding: MutationDirectiveBinding): void;
- declare function unmounted$4(el: HTMLElement, binding: MutationDirectiveBinding): void;
- declare const Mutate: {
- mounted: typeof mounted$4;
- unmounted: typeof unmounted$4;
- };
- interface ResizeDirectiveBinding extends Omit<DirectiveBinding, 'modifiers'> {
- value: () => void;
- modifiers?: {
- active?: boolean;
- quiet?: boolean;
- };
- }
- declare function mounted$3(el: HTMLElement, binding: ResizeDirectiveBinding): void;
- declare function unmounted$3(el: HTMLElement, binding: ResizeDirectiveBinding): void;
- declare const Resize: {
- mounted: typeof mounted$3;
- unmounted: typeof unmounted$3;
- };
- interface RippleDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
- value?: boolean | {
- class: string;
- };
- modifiers: {
- center?: boolean;
- circle?: boolean;
- stop?: boolean;
- };
- }
- declare function mounted$2(el: HTMLElement, binding: RippleDirectiveBinding): void;
- declare function unmounted$2(el: HTMLElement): void;
- declare function updated$1(el: HTMLElement, binding: RippleDirectiveBinding): void;
- declare const Ripple: {
- mounted: typeof mounted$2;
- unmounted: typeof unmounted$2;
- updated: typeof updated$1;
- };
- interface ScrollDirectiveBinding extends Omit<DirectiveBinding, 'modifiers'> {
- value: EventListener | {
- handler: EventListener;
- options?: AddEventListenerOptions;
- } | EventListenerObject & {
- options?: AddEventListenerOptions;
- };
- modifiers?: {
- self?: boolean;
- };
- }
- declare function mounted$1(el: HTMLElement, binding: ScrollDirectiveBinding): void;
- declare function unmounted$1(el: HTMLElement, binding: ScrollDirectiveBinding): void;
- declare function updated(el: HTMLElement, binding: ScrollDirectiveBinding): void;
- declare const Scroll: {
- mounted: typeof mounted$1;
- unmounted: typeof unmounted$1;
- updated: typeof updated;
- };
- interface TouchHandlers {
- start?: (wrapperEvent: {
- originalEvent: TouchEvent;
- } & TouchData) => void;
- end?: (wrapperEvent: {
- originalEvent: TouchEvent;
- } & TouchData) => void;
- move?: (wrapperEvent: {
- originalEvent: TouchEvent;
- } & TouchData) => void;
- left?: (wrapper: TouchData) => void;
- right?: (wrapper: TouchData) => void;
- up?: (wrapper: TouchData) => void;
- down?: (wrapper: TouchData) => void;
- }
- interface TouchData {
- touchstartX: number;
- touchstartY: number;
- touchmoveX: number;
- touchmoveY: number;
- touchendX: number;
- touchendY: number;
- offsetX: number;
- offsetY: number;
- }
- interface TouchValue extends TouchHandlers {
- parent?: boolean;
- options?: AddEventListenerOptions;
- }
- interface TouchDirectiveBinding extends Omit<DirectiveBinding, 'value'> {
- value?: TouchValue;
- }
- declare function mounted(el: HTMLElement, binding: TouchDirectiveBinding): void;
- declare function unmounted(el: HTMLElement, binding: TouchDirectiveBinding): void;
- declare const Touch: {
- mounted: typeof mounted;
- unmounted: typeof unmounted;
- };
- export { ClickOutside, Intersect, Mutate, Resize, Ripple, Scroll, Touch };
|