UNPKG

1.63 kBSource Map (JSON)View Raw
1{"version":3,"file":"ScreenOrientation.js","sourceRoot":"","sources":["../src/ScreenOrientation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,EAAE,yBAAyB,EAAE,GAAG,aAAa,CAAC;AAEpD,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,0DAA2C,CAAA;IAC3C,oCAAqB,CAAA;IACrB,0CAA2B,CAAA;IAC3B,8CAA+B,CAAA;IAC/B,sCAAuB,CAAA;IACvB,gDAAiC,CAAA;IACjC,kDAAmC,CAAA;AACrC,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,UAAU,KAAK,CAAC,WAAwB;IAC5C,OAAO,CAAC,IAAI,CAAC,qFAAqF,CAAC,CAAC;IACpG,UAAU,CAAC,WAAW,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,WAAwB;IACjD,OAAO,yBAAyB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,WAAwB;IACvD,OAAO,yBAAyB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { NativeModules } from 'react-native';\n\nconst { ExponentScreenOrientation } = NativeModules;\n\nexport enum Orientation {\n ALL = 'ALL',\n ALL_BUT_UPSIDE_DOWN = 'ALL_BUT_UPSIDE_DOWN',\n PORTRAIT = 'PORTRAIT',\n PORTRAIT_UP = 'PORTRAIT_UP',\n PORTRAIT_DOWN = 'PORTRAIT_DOWN',\n LANDSCAPE = 'LANDSCAPE',\n LANDSCAPE_LEFT = 'LANDSCAPE_LEFT',\n LANDSCAPE_RIGHT = 'LANDSCAPE_RIGHT',\n}\n\nexport function allow(orientation: Orientation): void {\n console.warn(\"'ScreenOrientation.allow' is deprecated in favour of 'ScreenOrientation.allowAsync'\");\n allowAsync(orientation);\n}\n\nexport function allowAsync(orientation: Orientation): Promise<void> {\n return ExponentScreenOrientation.allowAsync(orientation);\n}\n\nexport function doesSupportAsync(orientation: Orientation): Promise<Boolean> {\n return ExponentScreenOrientation.doesSupportAsync(orientation);\n}\n"]}
\No newline at end of file