👋
the library is actually exporting it from maxrects-packer.mjs but the types are wrong
the content of maxrects-packer.d.ts which package.json points to to resolve the types:
import { Rectangle, IRectangle } from "./geom/Rectangle";
import { Bin, IBin } from "./abstract-bin";
import { IOption } from "./types";
export { EDGE_MAX_VALUE, EDGE_MIN_VALUE, PACKING_LOGIC, IOption } from "./types";
export declare class MaxRectsPacker<T extends IRectangle = Rectangle> {
width: number;
height: number;
padding: number;
bins: Bin<T>[];
options: IOption;
constructor(width?: number, height?: number, padding?: number, options?: IOption);
add(width: number, height: number, data: any): T;
add(rect: T): T;
addArray(rects: T[]): void;
reset(): void;
repack(quick?: boolean): void;
next(): number;
load(bins: IBin[]): void;
save(): IBin[];
private sort;
private _currentBinIndex;
get currentBinIndex(): number;
get dirty(): boolean;
get rects(): T[];
}
there is "index.d.ts" file nearby. maybe package.json's "types" field should point to that one instead?
export { Rectangle, IRectangle } from "./geom/Rectangle";
export { MaxRectsPacker, PACKING_LOGIC, IOption } from "./maxrects-packer";
export { Bin, IBin } from "./abstract-bin";
export { MaxRectsBin } from "./maxrects-bin";
export { OversizedElementBin } from "./oversized-element-bin";
👋
the library is actually exporting it from maxrects-packer.mjs but the types are wrong
the content of maxrects-packer.d.ts which package.json points to to resolve the types:
there is "index.d.ts" file nearby. maybe package.json's "types" field should point to that one instead?