@tamagui/react-native-media-driver 1.1.8 → 1.1.10
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.
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/matchMedia.ts"],
|
|
4
4
|
"sourcesContent": ["// web-only use platform:\n\nimport { MatchMedia } from '@tamagui/core'\n\nexport const matchMedia: MatchMedia = globalThis['matchMedia']\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,aAAyB,WAAW;",
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,aAAyB,WAAW,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/mediaQueryList.ts"],
|
|
4
4
|
"sourcesContent": ["import mediaQuery from 'css-mediaquery'\nimport { Dimensions } from 'react-native'\nimport { MediaQueryList } from '@tamagui/core'\n\ntype Orientation = 'landscape' | 'portrait'\n\ntype Listener = (orientation: Orientation) => void\n\nexport class NativeMediaQueryList implements MediaQueryList {\n private listeners: Listener[] = []\n\n private get orientation(): Orientation {\n const windowDimensions = Dimensions.get('window')\n return windowDimensions.height > windowDimensions.width\n ? 'portrait'\n : 'landscape'\n }\n\n constructor(private query: string) {\n this.notify()\n Dimensions.addEventListener('change', () => {\n this.notify()\n })\n }\n\n private notify() {\n this.listeners.forEach((listener) => {\n listener(this.orientation)\n })\n }\n\n addListener(listener: Listener) {\n this.listeners.push(listener)\n }\n\n removeListener(listener: Listener) {\n const index = this.listeners.indexOf(listener)\n if (index !== -1) this.listeners.splice(index, 1)\n }\n\n get matches(): boolean {\n const windowDimensions = Dimensions.get('window')\n const matches = mediaQuery.match(this.query, {\n type: 'screen',\n orientation: this.orientation,\n ...windowDimensions,\n 'device-width': windowDimensions.width,\n 'device-height': windowDimensions.height,\n })\n return matches\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAuB;AACvB,0BAA2B;AAOpB,MAAM,qBAA+C;AAAA,EAU1D,YAAoB,OAAe;AAAf;AATpB,SAAQ,YAAwB,CAAC;AAU/B,SAAK,OAAO;AACZ,mCAAW,iBAAiB,UAAU,MAAM;AAC1C,WAAK,OAAO;AAAA,IACd,CAAC;AAAA,EACH;AAAA,EAZA,IAAY,cAA2B;AACrC,UAAM,mBAAmB,+BAAW,IAAI,QAAQ;AAChD,WAAO,iBAAiB,SAAS,iBAAiB,QAC9C,aACA;AAAA,EACN;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,+BAAW,IAAI,QAAQ;AAChD,UAAM,UAAU,sBAAAA,QAAW,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;",
|
|
6
6
|
"names": ["mediaQuery"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/matchMedia.ts"],
|
|
4
4
|
"sourcesContent": ["// web-only use platform:\n\nimport { MatchMedia } from '@tamagui/core'\n\nexport const matchMedia: MatchMedia = globalThis['matchMedia']\n"],
|
|
5
|
-
"mappings": "AAIO,MAAM,aAAyB,WAAW;",
|
|
5
|
+
"mappings": "AAIO,MAAM,aAAyB,WAAW,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/react-native-media-driver",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
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/core": "^1.1.
|
|
16
|
+
"@tamagui/core": "^1.1.10",
|
|
17
17
|
"css-mediaquery": "^0.1.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@tamagui/build": "^1.1.
|
|
20
|
+
"@tamagui/build": "^1.1.10",
|
|
21
21
|
"react-native": "*"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|