```
* @summary Convert the coordinates of the touch to some other frame of reference.
* @detail (target?,snap?)
*/
αfit(): void;
αfit(start: Length, end: Length, snap?: number): void;
αfit(target: ModifierElementTarget): void;
αfit(target: ModifierElementTarget, snap?: number): void;
αfit(target: ModifierElementTarget, snap?: number): void;
αfit(target: ModifierElementTarget, start: Length, end: Length, snap?: number): void;
/**
* Just like @touch.fit but without clamping x,y to the bounds of the
* target.
* @detail (target?, ax?, ay?)
*/
αreframe(): void;
αreframe(start: Length, end: Length, snap?: number): void;
αreframe(context: Element | string, snap?: number): void;
αreframe(context: Element | string, start: Length, end: Length, snap?: number): void;
/**
* Allow pinning the touch to a certain point in an element, so that
* all future x,y values are relative to this pinned point.
* @detail (target?, ax?, ay?)
*/
αpin(): void;
αpin(target: ModifierElementTarget): void;
αpin(anchorX: number, anchorY?: number): void;
αpin(target: ModifierElementTarget, anchorX?: number, anchorY?: number): void;
/**
* Round the x,y coordinates with an optional accuracy
* @detail (to = 1)
*/
αround(nearest?: number): void;
/**
* Add an html class to target for at least 250ms
* If the callback returns a promise, the class
* will not be removed until said promise has resolved
* @param name the class to add
* @param target the element on which to add the class. Defaults to the element itself
* @detail (name,target?)
* */
αflag(name: string, target?: FlagTarget): void;
/**
* Add an html class to target for at least 250ms
* If the callback returns a promise, the class
* will not be removed until said promise has resolved
* @param target the element on which to add the class. Defaults to the element itself
* @deprecated
**/
αflagΞname(target?: FlagTarget): void;
/**
* Only trigger handler if event.target matches selector
* @detail (selector)
* */
αsel(selector: string): boolean;
/**
Tells the browser that the default action should not be taken. The event will still continue to propagate up the tree. See Event.preventDefault()
@see https://imba.io/events/event-modifiers#core-prevent
*/
αprevent(): void;
/**
Stops the event from propagating up the tree. Event listeners for the same event on nodes further up the tree will not be triggered. See Event.stopPropagation()
*/
αstop(): void;
/**
Prevents default action & stops event from bubbling.
*/
αtrap(): void;
/**
* The `self` event modifier is a handy way of reacting to events only when they are clicked on the actual element you are interacting with and not, for example, a child element. This can be useful for things like modal wrappers when you only want to react when clicking directly.
* @summary Only trigger handler if event.target is the element itself
*/
αself(): boolean;
/**
* @summary Don't trigger imba.commit from this event handler
*/
αsilent(): void;
/**
* @summary Suppress pointer events on all other elements
*/
αlock(): void;
}
type IntersectRoot = Element | Document;
type IntersectOptions = {
rootMargin?: string;
root?: IntersectRoot;
thresholds?: number[];
}
/**
[IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) is a [well-supported](https://caniuse.com/#feat=intersectionobserver) API in modern browsers. It provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. Imba adds a simplified abstraction on top of this via the custom `@intersect` event.
#### Syntax
```imba
# Will only trigger when intersection ratio increases
# Will only trigger when element is more than 50% visible
```
#### Parameters
The `@intersect` events accepts several arguments. You can pass in an object with the same [root](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root), [rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin), and [threshold](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/threshold) properties supported by [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver).
```imba
# default options
```
For convenience, imba will convert certain arguments into options. A single number between 0 and 1 will map to the [threshold](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/threshold) option:
```imba
# n 0-1 adds single threshold at n visibility
# {threshold: 0}
# {threshold: 0.5}
# {threshold: 1.0}
```
Any number above 1 will add n thresholds, spread evenly:
```imba
# {threshold: [0,1]}
# {threshold: [0,0.5,1]}
# {threshold: [0,0.25,0.5,0.75,1]}
# ... and so forth
```
An element will map to the [root](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root) option:
```imba
# {root: frame}
# {root: frame, threshold: [0,0.5,1]}
```
A string will map to the [rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin) option:
```imba
# {rootMargin: "20px 10px"}
```
* @custom
*/
declare class IntersectEvent extends Event {
/**
The `out` modifier stops the handler unless intersectionRatio has *increased*.
#### Syntax
```imba
# Will only trigger when intersection ratio increases
# Will only trigger when element is more than 50% visible
```
@summary Stop handling unless intersectionRatio has increased.
*/
αin(): boolean;
/**
*
The `out` modifier stops the handler unless intersectionRatio has *decreased*.
#### Syntax
```imba
# Will only trigger when element starts intersecting