@zag-js/popper
Advanced tools
Comparing version 0.74.2 to 0.75.0
@@ -10,6 +10,6 @@ import { Placement, Boundary, AutoUpdateOptions, ComputePositionReturn, VirtualElement } from '@floating-ui/dom'; | ||
interface AnchorRect { | ||
x?: number; | ||
y?: number; | ||
width?: number; | ||
height?: number; | ||
x?: number | undefined; | ||
y?: number | undefined; | ||
width?: number | undefined; | ||
height?: number | undefined; | ||
} | ||
@@ -20,11 +20,11 @@ interface PositioningOptions { | ||
*/ | ||
hideWhenDetached?: boolean; | ||
hideWhenDetached?: boolean | undefined; | ||
/** | ||
* The strategy to use for positioning | ||
*/ | ||
strategy?: "absolute" | "fixed"; | ||
strategy?: "absolute" | "fixed" | undefined; | ||
/** | ||
* The initial placement of the floating element | ||
*/ | ||
placement?: Placement; | ||
placement?: Placement | undefined; | ||
/** | ||
@@ -36,15 +36,15 @@ * The offset of the floating element | ||
crossAxis?: number; | ||
}; | ||
} | undefined; | ||
/** | ||
* The main axis offset or gap between the reference and floating elements | ||
*/ | ||
gutter?: number; | ||
gutter?: number | undefined; | ||
/** | ||
* The secondary axis offset or gap between the reference and floating elements | ||
*/ | ||
shift?: number; | ||
shift?: number | undefined; | ||
/** | ||
* The virtual padding around the viewport edges to check for overflow | ||
*/ | ||
overflowPadding?: number; | ||
overflowPadding?: number | undefined; | ||
/** | ||
@@ -54,11 +54,11 @@ * The minimum padding between the arrow and the floating element's corner. | ||
*/ | ||
arrowPadding?: number; | ||
arrowPadding?: number | undefined; | ||
/** | ||
* Whether to flip the placement | ||
*/ | ||
flip?: boolean | Placement[]; | ||
flip?: boolean | Placement[] | undefined; | ||
/** | ||
* Whether the popover should slide when it overflows. | ||
*/ | ||
slide?: boolean; | ||
slide?: boolean | undefined; | ||
/** | ||
@@ -68,33 +68,33 @@ * Whether the floating element can overlap the reference element | ||
*/ | ||
overlap?: boolean; | ||
overlap?: boolean | undefined; | ||
/** | ||
* Whether to make the floating element same width as the reference element | ||
*/ | ||
sameWidth?: boolean; | ||
sameWidth?: boolean | undefined; | ||
/** | ||
* Whether the popover should fit the viewport. | ||
*/ | ||
fitViewport?: boolean; | ||
fitViewport?: boolean | undefined; | ||
/** | ||
* The overflow boundary of the reference element | ||
*/ | ||
boundary?: () => Boundary; | ||
boundary?: (() => Boundary) | undefined; | ||
/** | ||
* Options to activate auto-update listeners | ||
*/ | ||
listeners?: boolean | AutoUpdateOptions; | ||
listeners?: boolean | AutoUpdateOptions | undefined; | ||
/** | ||
* Function called when the placement is computed | ||
*/ | ||
onComplete?(data: ComputePositionReturn): void; | ||
onComplete?: ((data: ComputePositionReturn) => void) | undefined; | ||
/** | ||
* Function called when the floating element is positioned or not | ||
*/ | ||
onPositioned?(data: { | ||
onPositioned?: ((data: { | ||
placed: boolean; | ||
}): void; | ||
}) => void) | undefined; | ||
/** | ||
* Function that returns the anchor rect | ||
*/ | ||
getAnchorRect?: (element: HTMLElement | VirtualElement | null) => AnchorRect | null; | ||
getAnchorRect?: ((element: HTMLElement | VirtualElement | null) => AnchorRect | null) | undefined; | ||
/** | ||
@@ -104,5 +104,5 @@ * A callback that will be called when the popover needs to calculate its | ||
*/ | ||
updatePosition?: (data: { | ||
updatePosition?: ((data: { | ||
updatePosition: () => Promise<void>; | ||
}) => void | Promise<void>; | ||
}) => void | Promise<void>) | undefined; | ||
} | ||
@@ -115,3 +115,3 @@ | ||
interface GetPlacementStylesOptions { | ||
placement?: Placement; | ||
placement?: Placement | undefined; | ||
} | ||
@@ -118,0 +118,0 @@ declare function getPlacementStyles(options?: Pick<PositioningOptions, "placement" | "sameWidth" | "fitViewport" | "strategy">): { |
{ | ||
"name": "@zag-js/popper", | ||
"version": "0.74.2", | ||
"version": "0.75.0", | ||
"description": "Dynamic positioning logic for ui machines", | ||
@@ -26,4 +26,4 @@ "keywords": [ | ||
"@floating-ui/dom": "1.6.11", | ||
"@zag-js/dom-query": "0.74.2", | ||
"@zag-js/utils": "0.74.2" | ||
"@zag-js/dom-query": "0.75.0", | ||
"@zag-js/utils": "0.75.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33161
+ Added@zag-js/dom-query@0.75.0(transitive)
+ Added@zag-js/utils@0.75.0(transitive)
- Removed@zag-js/dom-query@0.74.2(transitive)
- Removed@zag-js/utils@0.74.2(transitive)
Updated@zag-js/dom-query@0.75.0
Updated@zag-js/utils@0.75.0