@oddbird/css-anchor-positioning
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -17,2 +17,7 @@ import { type Rect } from '@floating-ui/dom'; | ||
export declare const getPixelValue: ({ targetEl, targetProperty, anchorRect, anchorSide, anchorSize, fallback, }: GetPixelValueOpts) => Promise<string>; | ||
export interface AnchorPositioningPolyfillOptions { | ||
useAnimationFrame?: boolean; | ||
elements?: HTMLElement[]; | ||
excludeInlineStyles?: boolean; | ||
} | ||
export declare function polyfill(useAnimationFrameOrOption?: boolean | AnchorPositioningPolyfillOptions): Promise<AnchorPositions>; |
{ | ||
"name": "@oddbird/css-anchor-positioning", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Polyfill for the proposed CSS anchor positioning spec", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -0,21 +1,6 @@ | ||
import { type AnchorPositioningPolyfillOptions } from '../polyfill.ts'; | ||
export {}; | ||
declare global { | ||
interface AnchorPositioningPolyfillOptions { | ||
// Whether to use `requestAnimationFrame()` when updating target elements’ | ||
// positions | ||
useAnimationFrame?: boolean; | ||
// An array of explicitly targeted elements to polyfill | ||
elements?: HTMLElement[]; | ||
// Whether to exclude elements with eligible inline styles. When not defined | ||
// or set to `false`, the polyfill will be applied to all elements that have | ||
// eligible inline styles, regardless of whether the `elements` option is | ||
// defined. When set to `true`, elements with eligible inline styles listed | ||
// in the `elements` option will still be polyfilled, but no other elements | ||
// in the document will be implicitly polyfilled. | ||
excludeInlineStyles?: boolean; | ||
} | ||
interface Window { | ||
@@ -22,0 +7,0 @@ UPDATE_ANCHOR_ON_ANIMATION_FRAME?: boolean; |
@@ -446,2 +446,19 @@ import { | ||
export interface AnchorPositioningPolyfillOptions { | ||
// Whether to use `requestAnimationFrame()` when updating target elements’ | ||
// positions | ||
useAnimationFrame?: boolean; | ||
// An array of explicitly targeted elements to polyfill | ||
elements?: HTMLElement[]; | ||
// Whether to exclude elements with eligible inline styles. When not defined | ||
// or set to `false`, the polyfill will be applied to all elements that have | ||
// eligible inline styles, regardless of whether the `elements` option is | ||
// defined. When set to `true`, elements with eligible inline styles listed | ||
// in the `elements` option will still be polyfilled, but no other elements | ||
// in the document will be implicitly polyfilled. | ||
excludeInlineStyles?: boolean; | ||
} | ||
function normalizePolyfillOptions( | ||
@@ -448,0 +465,0 @@ useAnimationFrameOrOption: boolean | AnchorPositioningPolyfillOptions = {}, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
4750960
23456