@tamagui/react-native-media-driver 1.26.0 → 1.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/react-native-media-driver",
3
- "version": "1.26.0",
3
+ "version": "1.26.1",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -13,11 +13,11 @@
13
13
  ],
14
14
  "sideEffects": true,
15
15
  "dependencies": {
16
- "@tamagui/web": "1.26.0",
16
+ "@tamagui/web": "1.26.1",
17
17
  "css-mediaquery": "^0.1.2"
18
18
  },
19
19
  "devDependencies": {
20
- "@tamagui/build": "1.26.0",
20
+ "@tamagui/build": "1.26.1",
21
21
  "react-native": "^0.71.7"
22
22
  },
23
23
  "peerDependencies": {
@@ -1,10 +0,0 @@
1
- import { setupMatchMedia } from "@tamagui/web";
2
- import { matchMedia } from "./matchMedia";
3
- function createMedia(media) {
4
- setupMatchMedia(matchMedia);
5
- return media;
6
- }
7
- export {
8
- createMedia
9
- };
10
- //# sourceMappingURL=createMedia.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/createMedia.ts"],
4
- "mappings": "AAAA,SAA2B,uBAAuB;AAElD,SAAS,kBAAkB;AAEpB,SAAS,YAId,OAAa;AAGb,kBAAgB,UAAU;AAC1B,SAAO;AACT;",
5
- "names": []
6
- }
@@ -1,3 +0,0 @@
1
- export * from "./createMedia";
2
- export * from "./matchMedia";
3
- //# sourceMappingURL=index.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,cAAc;AACd,cAAc;",
5
- "names": []
6
- }
@@ -1,5 +0,0 @@
1
- const matchMedia = globalThis["matchMedia"];
2
- export {
3
- matchMedia
4
- };
5
- //# sourceMappingURL=matchMedia.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/matchMedia.ts"],
4
- "mappings": "AAIO,MAAM,aAAyB,WAAW,YAAY;",
5
- "names": []
6
- }
@@ -1,8 +0,0 @@
1
- import { NativeMediaQueryList } from "./mediaQueryList";
2
- const matchMedia = (query) => {
3
- return new NativeMediaQueryList(query);
4
- };
5
- export {
6
- matchMedia
7
- };
8
- //# sourceMappingURL=matchMedia.native.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/matchMedia.native.ts"],
4
- "mappings": "AAEA,SAAS,4BAA4B;AAE9B,MAAM,aAAyB,CAAC,UAAU;AAC/C,SAAO,IAAI,qBAAqB,KAAK;AACvC;",
5
- "names": []
6
- }
@@ -1,44 +0,0 @@
1
- import mediaQuery from "css-mediaquery";
2
- import { Dimensions } from "react-native";
3
- class NativeMediaQueryList {
4
- constructor(query) {
5
- this.query = query;
6
- this.listeners = [];
7
- this.notify();
8
- Dimensions.addEventListener("change", () => {
9
- this.notify();
10
- });
11
- }
12
- get orientation() {
13
- const windowDimensions = Dimensions.get("window");
14
- return windowDimensions.height > windowDimensions.width ? "portrait" : "landscape";
15
- }
16
- notify() {
17
- this.listeners.forEach((listener) => {
18
- listener(this.orientation);
19
- });
20
- }
21
- addListener(listener) {
22
- this.listeners.push(listener);
23
- }
24
- removeListener(listener) {
25
- const index = this.listeners.indexOf(listener);
26
- if (index !== -1)
27
- this.listeners.splice(index, 1);
28
- }
29
- get matches() {
30
- const windowDimensions = Dimensions.get("window");
31
- const matches = mediaQuery.match(this.query, {
32
- type: "screen",
33
- orientation: this.orientation,
34
- ...windowDimensions,
35
- "device-width": windowDimensions.width,
36
- "device-height": windowDimensions.height
37
- });
38
- return matches;
39
- }
40
- }
41
- export {
42
- NativeMediaQueryList
43
- };
44
- //# sourceMappingURL=mediaQueryList.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/mediaQueryList.ts"],
4
- "mappings": "AACA,OAAO,gBAAgB;AACvB,SAAS,kBAAkB;AAMpB,MAAM,qBAA+C;AAAA,EAQ1D,YAAoB,OAAe;AAAf;AAPpB,SAAQ,YAAwB,CAAC;AAQ/B,SAAK,OAAO;AACZ,eAAW,iBAAiB,UAAU,MAAM;AAC1C,WAAK,OAAO;AAAA,IACd,CAAC;AAAA,EACH;AAAA,EAVA,IAAY,cAA2B;AACrC,UAAM,mBAAmB,WAAW,IAAI,QAAQ;AAChD,WAAO,iBAAiB,SAAS,iBAAiB,QAAQ,aAAa;AAAA,EACzE;AAAA,EASQ,SAAS;AACf,SAAK,UAAU,QAAQ,CAAC,aAAa;AACnC,eAAS,KAAK,WAAW;AAAA,IAC3B,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,UAAoB;AAC9B,SAAK,UAAU,KAAK,QAAQ;AAAA,EAC9B;AAAA,EAEA,eAAe,UAAoB;AACjC,UAAM,QAAQ,KAAK,UAAU,QAAQ,QAAQ;AAC7C,QAAI,UAAU;AAAI,WAAK,UAAU,OAAO,OAAO,CAAC;AAAA,EAClD;AAAA,EAEA,IAAI,UAAmB;AACrB,UAAM,mBAAmB,WAAW,IAAI,QAAQ;AAChD,UAAM,UAAU,WAAW,MAAM,KAAK,OAAO;AAAA,MAC3C,MAAM;AAAA,MACN,aAAa,KAAK;AAAA,MAClB,GAAG;AAAA,MACH,gBAAgB,iBAAiB;AAAA,MACjC,iBAAiB,iBAAiB;AAAA,IACpC,CAAC;AACD,WAAO;AAAA,EACT;AACF;",
5
- "names": []
6
- }