@solid-primitives/media
Advanced tools
Comparing version 2.2.8 to 2.2.9
@@ -98,2 +98,2 @@ import { Accessor } from 'solid-js'; | ||
export { BreakpointOptions, Breakpoints, Matches, createBreakpoints, createMediaQuery, createPrefersDark, makeMediaQueryListener, sortBreakpoints, usePrefersDark }; | ||
export { type BreakpointOptions, type Breakpoints, type Matches, createBreakpoints, createMediaQuery, createPrefersDark, makeMediaQueryListener, sortBreakpoints, usePrefersDark }; |
{ | ||
"name": "@solid-primitives/media", | ||
"version": "2.2.8", | ||
"version": "2.2.9", | ||
"description": "Primitives for media query and device features", | ||
@@ -62,6 +62,6 @@ "author": "David Di Biase <dave.dibiase@gmail.com>", | ||
"dependencies": { | ||
"@solid-primitives/rootless": "^1.4.5", | ||
"@solid-primitives/event-listener": "^2.3.3", | ||
"@solid-primitives/rootless": "^1.4.5", | ||
"@solid-primitives/static-store": "^0.0.8", | ||
"@solid-primitives/utils": "^6.2.3" | ||
"@solid-primitives/utils": "^6.2.3", | ||
"@solid-primitives/static-store": "^0.0.8" | ||
}, | ||
@@ -68,0 +68,0 @@ "peerDependencies": { |
@@ -203,2 +203,17 @@ <p> | ||
## Notes | ||
### iOS 13 Support & Deprecated `addListener` | ||
Due to older versions of [mobile Safari on iOS 13 not supporting](https://github.com/mdn/sprints/issues/858) `addEventListener` on the MediaQueryList API, this primitive will need to be polyfilled. If your application needs to support much older versions of the browser you should [use a polyfill utility](https://www.npmjs.com/package/matchmedia-polyfill) or patch the missing function like so: | ||
```ts | ||
if (!'addEventListener' in MediaQueryList) { | ||
MediaQueryList.prototype.addEventListener = function(type, callback) { | ||
if (type === "change") this.addListener(callback) | ||
} | ||
MediaQueryList.prototype.removeEventListener = function(type, callback) { | ||
if (type === "change") this.removeListener(callback) | ||
} | ||
} | ||
``` | ||
## Changelog | ||
@@ -211,1 +226,2 @@ | ||
Thanks to Aditya Agarwal for contributing createBreakpoints. | ||
Sorry, the diff of this file is not supported yet
226
1
23561
33933
7
247