Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
562 B
Text
16 lines
562 B
Text
type Measurable = {
|
|
getBoundingClientRect(): ClientRect;
|
|
};
|
|
/**
|
|
* Observes an element's rectangle on screen (getBoundingClientRect)
|
|
* This is useful to track elements on the screen and attach other elements
|
|
* that might be in different layers, etc.
|
|
*/
|
|
declare function observeElementRect(
|
|
/** The element whose rect to observe */
|
|
elementToObserve: Measurable,
|
|
/** The callback which will be called when the rect changes */
|
|
callback: CallbackFn): () => void;
|
|
type CallbackFn = (rect: ClientRect) => void;
|
|
|
|
export { type Measurable, observeElementRect };
|