routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { ParsedAnchor } from '../../../util/index.js';
import type { Box } from '../../../util/box.js';
type Point = {
x: number;
y: number;
};
declare class As<T extends string> {
private as;
}
type ElementPoint = Point & As<'element'>;
type ViewportPoint = Point & As<'viewport'>;
type Offset = Point & As<'offset'>;
/** Convert a point in local space to viewport space */
export declare function elementToViewport(point: ElementPoint, offset: Offset | Box): ViewportPoint;
/** Convert a point in viewport space to local space */
export declare function viewportToElement(point: ViewportPoint, offset: Offset | Box): ElementPoint;
/** Get the difference between two points */
export declare function getOffset<T extends Point>(a: T, b: T): Offset;
/** Convert an anchor object to a point in local space */
export declare function anchorToPoint(anchor: ParsedAnchor, box: Box): ViewportPoint;