From 59b4b1f8145d9a9c24cabd3011c81f8b03334d65 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 17 Apr 2025 10:58:15 +1000 Subject: [PATCH] refactor(position)!: fix spelling mistake It would seem like there was a typo in the function name `getViewportOffsetRectRelativeToArtbitraryNode` which appears like it should be `getViewportOffsetRectRelativeToArbitraryNode`. BREAKING CHANGE: The `getViewportOffsetRectRelativeToArtbitraryNode` function has been renamed to `getViewportOffsetRectRelativeToArbitraryNode`. Signed-off-by: JP-Ellis --- src/positioning/utils/getBoundaries.ts | 4 ++-- ...ode.ts => getViewportOffsetRectRelativeToArbitraryNode.ts} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/positioning/utils/{getViewportOffsetRectRelativeToArtbitraryNode.ts => getViewportOffsetRectRelativeToArbitraryNode.ts} (88%) diff --git a/src/positioning/utils/getBoundaries.ts b/src/positioning/utils/getBoundaries.ts index 117be435aa..d4148cb83d 100644 --- a/src/positioning/utils/getBoundaries.ts +++ b/src/positioning/utils/getBoundaries.ts @@ -7,7 +7,7 @@ import { getFixedPositionOffsetParent } from './getFixedPositionOffsetParent'; import { getOffsetRectRelativeToArbitraryNode } from './getOffsetRectRelativeToArbitraryNode'; import { getParentNode } from './getParentNode'; import { getScrollParent } from './getScrollParent'; -import { getViewportOffsetRectRelativeToArtbitraryNode } from './getViewportOffsetRectRelativeToArtbitraryNode'; +import { getViewportOffsetRectRelativeToArbitraryNode } from './getViewportOffsetRectRelativeToArbitraryNode'; import { getWindowSizes } from './getWindowSizes'; import { isFixed } from './isFixed'; import { isNumber } from './isNumeric'; @@ -26,7 +26,7 @@ export function getBoundaries( // Handle viewport case if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); + boundaries = getViewportOffsetRectRelativeToArbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries let boundariesNode; diff --git a/src/positioning/utils/getViewportOffsetRectRelativeToArtbitraryNode.ts b/src/positioning/utils/getViewportOffsetRectRelativeToArbitraryNode.ts similarity index 88% rename from src/positioning/utils/getViewportOffsetRectRelativeToArtbitraryNode.ts rename to src/positioning/utils/getViewportOffsetRectRelativeToArbitraryNode.ts index 78c0c4f5bc..1819ed37e6 100644 --- a/src/positioning/utils/getViewportOffsetRectRelativeToArtbitraryNode.ts +++ b/src/positioning/utils/getViewportOffsetRectRelativeToArbitraryNode.ts @@ -3,7 +3,7 @@ import { getOffsetRectRelativeToArbitraryNode } from './getOffsetRectRelativeToA import { getScroll } from './getScroll'; import { Offsets } from '../models'; -export function getViewportOffsetRectRelativeToArtbitraryNode(element: HTMLElement, excludeScroll = false): Offsets { +export function getViewportOffsetRectRelativeToArbitraryNode(element: HTMLElement, excludeScroll = false): Offsets { const html = element.ownerDocument.documentElement; const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); const width = Math.max(html.clientWidth, window.innerWidth || 0);