diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f582ec..22b4f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +2.2.2 +===== + +* (deprecation) Deprecate `matchMediaQuery()`, use `window.matchMedia()` directly. +* (deprecation) Deprecate `addConsecutiveClasses()`, use Framer Motion or a different animation library instead. + + 2.2.1 ===== diff --git a/UPGRADE.md b/UPGRADE.md index f38a104..ce3001a 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,6 +2,8 @@ ========== * The `createEvent` helper was removed, use `new CustomEvent()` directly. +* Removed `matchMediaQuery()`, use `window.matchMedia()` directly. +* Removed `addConsecutiveClasses()`, use Framer Motion or a different animation library instead. 1.x to 2.0 diff --git a/src/animation.ts b/src/animation.ts index f116562..1abb106 100644 --- a/src/animation.ts +++ b/src/animation.ts @@ -1,5 +1,7 @@ /** * Adds two classes in consecutive animation frames. + * + * @deprecated use Framer Motion or a different animation library instead */ export function addConsecutiveClasses ( element: HTMLElement, diff --git a/src/media-query.ts b/src/media-query.ts index 76e9374..81da858 100644 --- a/src/media-query.ts +++ b/src/media-query.ts @@ -11,6 +11,8 @@ export interface MediaQueryMatcher /** * Creates a new media query matcher + * + * @deprecated just use `matchMedia` directly. */ export function matchMediaQuery (query: string): MediaQueryMatcher { diff --git a/src/popup-interaction.ts b/src/popup-interaction.ts index 7cd0af3..c10a306 100644 --- a/src/popup-interaction.ts +++ b/src/popup-interaction.ts @@ -2,6 +2,9 @@ import {off, on} from './dom/events'; import {isChildOf} from './dom/traverse'; export interface DismissibleContainerDirector { + /** + * Close function + */ (): void; destroy(): void; } @@ -12,7 +15,10 @@ export interface DismissibleContainerDirector { * * Returns a callback to remove the listener. */ -export function registerBodyClickHandler (allowedClickTargets: HTMLElement[], onInvalidTargetClick: () => void) : () => void +export function registerBodyClickHandler ( + allowedClickTargets: HTMLElement[], + onInvalidTargetClick: () => void, +) : () => void { let handler = (event: Event) => { for (let i = 0; i < allowedClickTargets.length; i++)