react-native-orientation-director 1.0.0

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.
Files changed (103) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +87 -0
  3. package/android/build.gradle +120 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/AndroidManifestNew.xml +2 -0
  7. package/android/src/main/java/com/orientationdirector/OrientationDirectorModule.kt +50 -0
  8. package/android/src/main/java/com/orientationdirector/OrientationDirectorPackage.kt +35 -0
  9. package/android/src/main/java/com/orientationdirector/implementation/Orientation.kt +12 -0
  10. package/android/src/main/java/com/orientationdirector/implementation/OrientationDirectorImpl.kt +117 -0
  11. package/android/src/main/java/com/orientationdirector/implementation/OrientationDirectorUtilsImpl.kt +65 -0
  12. package/android/src/main/java/com/orientationdirector/implementation/OrientationEventManager.kt +42 -0
  13. package/android/src/main/java/com/orientationdirector/implementation/OrientationLifecycleListener.kt +33 -0
  14. package/android/src/main/java/com/orientationdirector/implementation/OrientationSensorListener.kt +26 -0
  15. package/android/src/newarch/OrientationDirectorSpec.kt +7 -0
  16. package/android/src/oldarch/OrientationDirectorSpec.kt +16 -0
  17. package/ios/OrientationDirector.h +22 -0
  18. package/ios/OrientationDirector.mm +121 -0
  19. package/ios/implementation/Orientation.swift +12 -0
  20. package/ios/implementation/OrientationDirectorImpl.swift +126 -0
  21. package/ios/implementation/OrientationDirectorUtils.swift +111 -0
  22. package/ios/implementation/OrientationEventManager.swift +56 -0
  23. package/ios/implementation/OrientationSensorListener.swift +37 -0
  24. package/ios/react-native-orientation-director-Bridging-Header.h +6 -0
  25. package/lib/commonjs/NativeOrientationDirector.js +9 -0
  26. package/lib/commonjs/NativeOrientationDirector.js.map +1 -0
  27. package/lib/commonjs/RNOrientationDirector.js +49 -0
  28. package/lib/commonjs/RNOrientationDirector.js.map +1 -0
  29. package/lib/commonjs/hooks/useDeviceOrientation.hook.js +39 -0
  30. package/lib/commonjs/hooks/useDeviceOrientation.hook.js.map +1 -0
  31. package/lib/commonjs/hooks/useInterfaceOrientation.hook.js +39 -0
  32. package/lib/commonjs/hooks/useInterfaceOrientation.hook.js.map +1 -0
  33. package/lib/commonjs/index.js +31 -0
  34. package/lib/commonjs/index.js.map +1 -0
  35. package/lib/commonjs/module.js +23 -0
  36. package/lib/commonjs/module.js.map +1 -0
  37. package/lib/commonjs/types/Event.enum.js +13 -0
  38. package/lib/commonjs/types/Event.enum.js.map +1 -0
  39. package/lib/commonjs/types/InterfaceOrientationToLocalizedStringProvider.type.js +6 -0
  40. package/lib/commonjs/types/InterfaceOrientationToLocalizedStringProvider.type.js.map +1 -0
  41. package/lib/commonjs/types/LockableOrientation.type.js +6 -0
  42. package/lib/commonjs/types/LockableOrientation.type.js.map +1 -0
  43. package/lib/commonjs/types/Orientation.enum.js +17 -0
  44. package/lib/commonjs/types/Orientation.enum.js.map +1 -0
  45. package/lib/commonjs/types/OrientationEvent.interface.js +6 -0
  46. package/lib/commonjs/types/OrientationEvent.interface.js.map +1 -0
  47. package/lib/module/NativeOrientationDirector.js +3 -0
  48. package/lib/module/NativeOrientationDirector.js.map +1 -0
  49. package/lib/module/RNOrientationDirector.js +40 -0
  50. package/lib/module/RNOrientationDirector.js.map +1 -0
  51. package/lib/module/hooks/useDeviceOrientation.hook.js +31 -0
  52. package/lib/module/hooks/useDeviceOrientation.hook.js.map +1 -0
  53. package/lib/module/hooks/useInterfaceOrientation.hook.js +31 -0
  54. package/lib/module/hooks/useInterfaceOrientation.hook.js.map +1 -0
  55. package/lib/module/index.js +8 -0
  56. package/lib/module/index.js.map +1 -0
  57. package/lib/module/module.js +17 -0
  58. package/lib/module/module.js.map +1 -0
  59. package/lib/module/types/Event.enum.js +7 -0
  60. package/lib/module/types/Event.enum.js.map +1 -0
  61. package/lib/module/types/InterfaceOrientationToLocalizedStringProvider.type.js +2 -0
  62. package/lib/module/types/InterfaceOrientationToLocalizedStringProvider.type.js.map +1 -0
  63. package/lib/module/types/LockableOrientation.type.js +2 -0
  64. package/lib/module/types/LockableOrientation.type.js.map +1 -0
  65. package/lib/module/types/Orientation.enum.js +11 -0
  66. package/lib/module/types/Orientation.enum.js.map +1 -0
  67. package/lib/module/types/OrientationEvent.interface.js +2 -0
  68. package/lib/module/types/OrientationEvent.interface.js.map +1 -0
  69. package/lib/typescript/src/NativeOrientationDirector.d.ts +12 -0
  70. package/lib/typescript/src/NativeOrientationDirector.d.ts.map +1 -0
  71. package/lib/typescript/src/RNOrientationDirector.d.ts +17 -0
  72. package/lib/typescript/src/RNOrientationDirector.d.ts.map +1 -0
  73. package/lib/typescript/src/hooks/useDeviceOrientation.hook.d.ts +8 -0
  74. package/lib/typescript/src/hooks/useDeviceOrientation.hook.d.ts.map +1 -0
  75. package/lib/typescript/src/hooks/useInterfaceOrientation.hook.d.ts +8 -0
  76. package/lib/typescript/src/hooks/useInterfaceOrientation.hook.d.ts.map +1 -0
  77. package/lib/typescript/src/index.d.ts +8 -0
  78. package/lib/typescript/src/index.d.ts.map +1 -0
  79. package/lib/typescript/src/module.d.ts +6 -0
  80. package/lib/typescript/src/module.d.ts.map +1 -0
  81. package/lib/typescript/src/types/Event.enum.d.ts +6 -0
  82. package/lib/typescript/src/types/Event.enum.d.ts.map +1 -0
  83. package/lib/typescript/src/types/InterfaceOrientationToLocalizedStringProvider.type.d.ts +3 -0
  84. package/lib/typescript/src/types/InterfaceOrientationToLocalizedStringProvider.type.d.ts.map +1 -0
  85. package/lib/typescript/src/types/LockableOrientation.type.d.ts +3 -0
  86. package/lib/typescript/src/types/LockableOrientation.type.d.ts.map +1 -0
  87. package/lib/typescript/src/types/Orientation.enum.d.ts +10 -0
  88. package/lib/typescript/src/types/Orientation.enum.d.ts.map +1 -0
  89. package/lib/typescript/src/types/OrientationEvent.interface.d.ts +5 -0
  90. package/lib/typescript/src/types/OrientationEvent.interface.d.ts.map +1 -0
  91. package/package.json +178 -0
  92. package/react-native-orientation-director.podspec +41 -0
  93. package/src/NativeOrientationDirector.ts +14 -0
  94. package/src/RNOrientationDirector.ts +64 -0
  95. package/src/hooks/useDeviceOrientation.hook.ts +40 -0
  96. package/src/hooks/useInterfaceOrientation.hook.ts +40 -0
  97. package/src/index.tsx +10 -0
  98. package/src/module.ts +30 -0
  99. package/src/types/Event.enum.ts +6 -0
  100. package/src/types/InterfaceOrientationToLocalizedStringProvider.type.ts +6 -0
  101. package/src/types/LockableOrientation.type.ts +7 -0
  102. package/src/types/Orientation.enum.ts +11 -0
  103. package/src/types/OrientationEvent.interface.ts +5 -0
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Orientation", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Orientation.Orientation;
10
+ }
11
+ });
12
+ exports.default = void 0;
13
+ Object.defineProperty(exports, "useDeviceOrientation", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _useDeviceOrientation.default;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "useInterfaceOrientation", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _useInterfaceOrientation.default;
23
+ }
24
+ });
25
+ var _Orientation = require("./types/Orientation.enum");
26
+ var _useDeviceOrientation = _interopRequireDefault(require("./hooks/useDeviceOrientation.hook"));
27
+ var _useInterfaceOrientation = _interopRequireDefault(require("./hooks/useInterfaceOrientation.hook"));
28
+ var _RNOrientationDirector = _interopRequireDefault(require("./RNOrientationDirector"));
29
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
+ var _default = exports.default = _RNOrientationDirector.default;
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Orientation","require","_useDeviceOrientation","_interopRequireDefault","_useInterfaceOrientation","_RNOrientationDirector","obj","__esModule","default","_default","exports","RNOrientationDirector"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,wBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAGA,IAAAI,sBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAC7CG,8BAAqB","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.EventEmitter = void 0;
7
+ var _reactNative = require("react-native");
8
+ const LINKING_ERROR = `The package 'react-native-orientation-director' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
9
+ ios: "- You have run 'pod install'\n",
10
+ default: ''
11
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
12
+
13
+ // @ts-expect-error
14
+ const isTurboModuleEnabled = global.__turboModuleProxy != null;
15
+ const Module = isTurboModuleEnabled ? require('./NativeOrientationDirector').default : _reactNative.NativeModules.OrientationDirector;
16
+ const OrientationDirectorModule = Module ? Module : new Proxy({}, {
17
+ get() {
18
+ throw new Error(LINKING_ERROR);
19
+ }
20
+ });
21
+ const EventEmitter = exports.EventEmitter = new _reactNative.NativeEventEmitter(Module);
22
+ var _default = exports.default = OrientationDirectorModule;
23
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","Module","NativeModules","OrientationDirector","OrientationDirectorModule","Proxy","get","Error","EventEmitter","exports","NativeEventEmitter","_default"],"sourceRoot":"../../src","sources":["module.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,MAAMC,aAAa,GAChB,4FAA2F,GAC5FC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,MAAM,GAAGH,oBAAoB,GAC/BN,OAAO,CAAC,6BAA6B,CAAC,CAACK,OAAO,GAC9CK,0BAAa,CAACC,mBAAmB;AAErC,MAAMC,yBAAyB,GAAGH,MAAM,GACpCA,MAAM,GACN,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACd,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEE,MAAMe,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAIE,+BAAkB,CAACT,MAAM,CAAC;AAAC,IAAAU,QAAA,GAAAF,OAAA,CAAAZ,OAAA,GAE5CO,yBAAyB","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var Event = /*#__PURE__*/function (Event) {
8
+ Event["DeviceOrientationDidChange"] = "DeviceOrientationDidChange";
9
+ Event["InterfaceOrientationDidChange"] = "InterfaceOrientationDidChange";
10
+ return Event;
11
+ }(Event || {});
12
+ var _default = exports.default = Event;
13
+ //# sourceMappingURL=Event.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Event","_default","exports","default"],"sourceRoot":"../../../src","sources":["types/Event.enum.ts"],"mappings":";;;;;;IAAKA,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA,EAALA,KAAK;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKKH,KAAK","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=InterfaceOrientationToLocalizedStringProvider.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/InterfaceOrientationToLocalizedStringProvider.type.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=LockableOrientation.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/LockableOrientation.type.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Orientation = void 0;
7
+ let Orientation = exports.Orientation = /*#__PURE__*/function (Orientation) {
8
+ Orientation[Orientation["unknown"] = 0] = "unknown";
9
+ Orientation[Orientation["portrait"] = 1] = "portrait";
10
+ Orientation[Orientation["landscapeRight"] = 2] = "landscapeRight";
11
+ Orientation[Orientation["portraitUpsideDown"] = 3] = "portraitUpsideDown";
12
+ Orientation[Orientation["landscapeLeft"] = 4] = "landscapeLeft";
13
+ Orientation[Orientation["faceUp"] = 5] = "faceUp";
14
+ Orientation[Orientation["faceDown"] = 6] = "faceDown";
15
+ return Orientation;
16
+ }({});
17
+ //# sourceMappingURL=Orientation.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Orientation","exports"],"sourceRoot":"../../../src","sources":["types/Orientation.enum.ts"],"mappings":";;;;;;IAAYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=OrientationEvent.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/OrientationEvent.interface.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import { TurboModuleRegistry } from 'react-native';
2
+ export default TurboModuleRegistry.getEnforcing('OrientationDirector');
3
+ //# sourceMappingURL=NativeOrientationDirector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeOrientationDirector.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;AAYlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,qBAAqB,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ import Module, { EventEmitter } from './module';
2
+ import Event from './types/Event.enum';
3
+ import { Orientation } from './types/Orientation.enum';
4
+ class RNOrientationDirector {
5
+ static _localizedStringProvider = {
6
+ [Orientation.unknown]: 'Unknown',
7
+ [Orientation.portrait]: 'Portrait',
8
+ [Orientation.portraitUpsideDown]: 'Portrait Upside Down',
9
+ [Orientation.landscapeLeft]: 'Landscape Left',
10
+ [Orientation.landscapeRight]: 'Landscape Right',
11
+ [Orientation.faceUp]: 'Face Up',
12
+ [Orientation.faceDown]: 'Face Down'
13
+ };
14
+ setLocalizedStringProvider(provider) {
15
+ RNOrientationDirector._localizedStringProvider = provider;
16
+ }
17
+ static getInterfaceOrientation() {
18
+ return Module.getInterfaceOrientation();
19
+ }
20
+ static getDeviceOrientation() {
21
+ return Module.getDeviceOrientation();
22
+ }
23
+ static lockTo(orientation) {
24
+ Module.lockTo(orientation);
25
+ }
26
+ static unlock() {
27
+ Module.unlock();
28
+ }
29
+ static listenForDeviceOrientationChanges(callback) {
30
+ return EventEmitter.addListener(Event.DeviceOrientationDidChange, callback);
31
+ }
32
+ static listenForInterfaceOrientationChanges(callback) {
33
+ return EventEmitter.addListener(Event.InterfaceOrientationDidChange, callback);
34
+ }
35
+ static convertOrientationToHumanReadableString(orientation) {
36
+ return RNOrientationDirector._localizedStringProvider[orientation];
37
+ }
38
+ }
39
+ export default RNOrientationDirector;
40
+ //# sourceMappingURL=RNOrientationDirector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Module","EventEmitter","Event","Orientation","RNOrientationDirector","_localizedStringProvider","unknown","portrait","portraitUpsideDown","landscapeLeft","landscapeRight","faceUp","faceDown","setLocalizedStringProvider","provider","getInterfaceOrientation","getDeviceOrientation","lockTo","orientation","unlock","listenForDeviceOrientationChanges","callback","addListener","DeviceOrientationDidChange","listenForInterfaceOrientationChanges","InterfaceOrientationDidChange","convertOrientationToHumanReadableString"],"sourceRoot":"../../src","sources":["RNOrientationDirector.ts"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,YAAY,QAAQ,UAAU;AAC/C,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,SAASC,WAAW,QAAQ,0BAA0B;AAItD,MAAMC,qBAAqB,CAAC;EAC1B,OAAeC,wBAAwB,GACrC;IACE,CAACF,WAAW,CAACG,OAAO,GAAG,SAAS;IAChC,CAACH,WAAW,CAACI,QAAQ,GAAG,UAAU;IAClC,CAACJ,WAAW,CAACK,kBAAkB,GAAG,sBAAsB;IACxD,CAACL,WAAW,CAACM,aAAa,GAAG,gBAAgB;IAC7C,CAACN,WAAW,CAACO,cAAc,GAAG,iBAAiB;IAC/C,CAACP,WAAW,CAACQ,MAAM,GAAG,SAAS;IAC/B,CAACR,WAAW,CAACS,QAAQ,GAAG;EAC1B,CAAC;EAEHC,0BAA0BA,CACxBC,QAAuD,EACvD;IACAV,qBAAqB,CAACC,wBAAwB,GAAGS,QAAQ;EAC3D;EAEA,OAAOC,uBAAuBA,CAAA,EAAyB;IACrD,OAAOf,MAAM,CAACe,uBAAuB,CAAC,CAAC;EACzC;EAEA,OAAOC,oBAAoBA,CAAA,EAAyB;IAClD,OAAOhB,MAAM,CAACgB,oBAAoB,CAAC,CAAC;EACtC;EAEA,OAAOC,MAAMA,CAACC,WAAgC,EAAE;IAC9ClB,MAAM,CAACiB,MAAM,CAACC,WAAW,CAAC;EAC5B;EAEA,OAAOC,MAAMA,CAAA,EAAG;IACdnB,MAAM,CAACmB,MAAM,CAAC,CAAC;EACjB;EAEA,OAAOC,iCAAiCA,CACtCC,QAAiD,EACjD;IACA,OAAOpB,YAAY,CAACqB,WAAW,CAACpB,KAAK,CAACqB,0BAA0B,EAAEF,QAAQ,CAAC;EAC7E;EAEA,OAAOG,oCAAoCA,CACzCH,QAAiD,EACjD;IACA,OAAOpB,YAAY,CAACqB,WAAW,CAC7BpB,KAAK,CAACuB,6BAA6B,EACnCJ,QACF,CAAC;EACH;EAEA,OAAOK,uCAAuCA,CAC5CR,WAAwB,EAChB;IACR,OAAOd,qBAAqB,CAACC,wBAAwB,CAACa,WAAW,CAAC;EACpE;AACF;AAEA,eAAed,qBAAqB","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ import React, { useRef } from 'react';
2
+ import RNOrientationDirector from '../RNOrientationDirector';
3
+ import { Orientation } from '../types/Orientation.enum';
4
+
5
+ /**
6
+ * Hook that returns the current device orientation.
7
+ * It listens for orientation changes and updates the state accordingly.
8
+ */
9
+ const useDeviceOrientation = () => {
10
+ const initialRender = useRef(false);
11
+ const [orientation, setOrientation] = React.useState(Orientation.unknown);
12
+ React.useEffect(() => {
13
+ if (initialRender.current) {
14
+ return;
15
+ }
16
+ initialRender.current = true;
17
+ RNOrientationDirector.getDeviceOrientation().then(setOrientation);
18
+ }, []);
19
+ React.useEffect(() => {
20
+ const onChange = event => {
21
+ setOrientation(event.orientation);
22
+ };
23
+ const subscription = RNOrientationDirector.listenForDeviceOrientationChanges(onChange);
24
+ return () => {
25
+ subscription.remove();
26
+ };
27
+ }, []);
28
+ return orientation;
29
+ };
30
+ export default useDeviceOrientation;
31
+ //# sourceMappingURL=useDeviceOrientation.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useRef","RNOrientationDirector","Orientation","useDeviceOrientation","initialRender","orientation","setOrientation","useState","unknown","useEffect","current","getDeviceOrientation","then","onChange","event","subscription","listenForDeviceOrientationChanges","remove"],"sourceRoot":"../../../src","sources":["hooks/useDeviceOrientation.hook.ts"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,OAAOC,qBAAqB,MAAM,0BAA0B;AAE5D,SAASC,WAAW,QAAQ,2BAA2B;;AAEvD;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACjC,MAAMC,aAAa,GAAGJ,MAAM,CAAC,KAAK,CAAC;EACnC,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,GAAGP,KAAK,CAACQ,QAAQ,CAClDL,WAAW,CAACM,OACd,CAAC;EAEDT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,IAAIL,aAAa,CAACM,OAAO,EAAE;MACzB;IACF;IAEAN,aAAa,CAACM,OAAO,GAAG,IAAI;IAC5BT,qBAAqB,CAACU,oBAAoB,CAAC,CAAC,CAACC,IAAI,CAACN,cAAc,CAAC;EACnE,CAAC,EAAE,EAAE,CAAC;EAENP,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,MAAMI,QAAQ,GAAIC,KAAuB,IAAK;MAC5CR,cAAc,CAACQ,KAAK,CAACT,WAAW,CAAC;IACnC,CAAC;IAED,MAAMU,YAAY,GAChBd,qBAAqB,CAACe,iCAAiC,CAACH,QAAQ,CAAC;IACnE,OAAO,MAAM;MACXE,YAAY,CAACE,MAAM,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOZ,WAAW;AACpB,CAAC;AAED,eAAeF,oBAAoB","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ import React, { useRef } from 'react';
2
+ import RNOrientationDirector from '../RNOrientationDirector';
3
+ import { Orientation } from '../types/Orientation.enum';
4
+
5
+ /**
6
+ * Hook that returns the current interface orientation.
7
+ * It listens for orientation changes and updates the state accordingly.
8
+ */
9
+ const useInterfaceOrientation = () => {
10
+ const initialRender = useRef(false);
11
+ const [orientation, setOrientation] = React.useState(Orientation.unknown);
12
+ React.useEffect(() => {
13
+ if (initialRender.current) {
14
+ return;
15
+ }
16
+ initialRender.current = true;
17
+ RNOrientationDirector.getInterfaceOrientation().then(setOrientation);
18
+ }, []);
19
+ React.useEffect(() => {
20
+ const onChange = event => {
21
+ setOrientation(event.orientation);
22
+ };
23
+ const subscription = RNOrientationDirector.listenForInterfaceOrientationChanges(onChange);
24
+ return () => {
25
+ subscription.remove();
26
+ };
27
+ }, []);
28
+ return orientation;
29
+ };
30
+ export default useInterfaceOrientation;
31
+ //# sourceMappingURL=useInterfaceOrientation.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useRef","RNOrientationDirector","Orientation","useInterfaceOrientation","initialRender","orientation","setOrientation","useState","unknown","useEffect","current","getInterfaceOrientation","then","onChange","event","subscription","listenForInterfaceOrientationChanges","remove"],"sourceRoot":"../../../src","sources":["hooks/useInterfaceOrientation.hook.ts"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,OAAOC,qBAAqB,MAAM,0BAA0B;AAE5D,SAASC,WAAW,QAAQ,2BAA2B;;AAEvD;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACpC,MAAMC,aAAa,GAAGJ,MAAM,CAAC,KAAK,CAAC;EACnC,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,GAAGP,KAAK,CAACQ,QAAQ,CAClDL,WAAW,CAACM,OACd,CAAC;EAEDT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,IAAIL,aAAa,CAACM,OAAO,EAAE;MACzB;IACF;IAEAN,aAAa,CAACM,OAAO,GAAG,IAAI;IAC5BT,qBAAqB,CAACU,uBAAuB,CAAC,CAAC,CAACC,IAAI,CAACN,cAAc,CAAC;EACtE,CAAC,EAAE,EAAE,CAAC;EAENP,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,MAAMI,QAAQ,GAAIC,KAAuB,IAAK;MAC5CR,cAAc,CAACQ,KAAK,CAACT,WAAW,CAAC;IACnC,CAAC;IAED,MAAMU,YAAY,GAChBd,qBAAqB,CAACe,oCAAoC,CAACH,QAAQ,CAAC;IACtE,OAAO,MAAM;MACXE,YAAY,CAACE,MAAM,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOZ,WAAW;AACpB,CAAC;AAED,eAAeF,uBAAuB","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ export { Orientation } from './types/Orientation.enum';
2
+ import useDeviceOrientation from './hooks/useDeviceOrientation.hook';
3
+ export { useDeviceOrientation };
4
+ import useInterfaceOrientation from './hooks/useInterfaceOrientation.hook';
5
+ export { useInterfaceOrientation };
6
+ import RNOrientationDirector from './RNOrientationDirector';
7
+ export default RNOrientationDirector;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Orientation","useDeviceOrientation","useInterfaceOrientation","RNOrientationDirector"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,0BAA0B;AAEtD,OAAOC,oBAAoB,MAAM,mCAAmC;AACpE,SAASA,oBAAoB;AAE7B,OAAOC,uBAAuB,MAAM,sCAAsC;AAC1E,SAASA,uBAAuB;AAEhC,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,eAAeA,qBAAqB","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
2
+ const LINKING_ERROR = `The package 'react-native-orientation-director' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
3
+ ios: "- You have run 'pod install'\n",
4
+ default: ''
5
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
6
+
7
+ // @ts-expect-error
8
+ const isTurboModuleEnabled = global.__turboModuleProxy != null;
9
+ const Module = isTurboModuleEnabled ? require('./NativeOrientationDirector').default : NativeModules.OrientationDirector;
10
+ const OrientationDirectorModule = Module ? Module : new Proxy({}, {
11
+ get() {
12
+ throw new Error(LINKING_ERROR);
13
+ }
14
+ });
15
+ export const EventEmitter = new NativeEventEmitter(Module);
16
+ export default OrientationDirectorModule;
17
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeEventEmitter","NativeModules","Platform","LINKING_ERROR","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","Module","require","OrientationDirector","OrientationDirectorModule","Proxy","get","Error","EventEmitter"],"sourceRoot":"../../src","sources":["module.ts"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAG1E,MAAMC,aAAa,GAChB,4FAA2F,GAC5FD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,MAAM,GAAGH,oBAAoB,GAC/BI,OAAO,CAAC,6BAA6B,CAAC,CAACL,OAAO,GAC9CL,aAAa,CAACW,mBAAmB;AAErC,MAAMC,yBAAyB,GAAGH,MAAM,GACpCA,MAAM,GACN,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACb,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,OAAO,MAAMc,YAAY,GAAG,IAAIjB,kBAAkB,CAACU,MAAM,CAAC;AAE1D,eAAeG,yBAAyB","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ var Event = /*#__PURE__*/function (Event) {
2
+ Event["DeviceOrientationDidChange"] = "DeviceOrientationDidChange";
3
+ Event["InterfaceOrientationDidChange"] = "InterfaceOrientationDidChange";
4
+ return Event;
5
+ }(Event || {});
6
+ export default Event;
7
+ //# sourceMappingURL=Event.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Event"],"sourceRoot":"../../../src","sources":["types/Event.enum.ts"],"mappings":"IAAKA,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA,EAALA,KAAK;AAKV,eAAeA,KAAK","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=InterfaceOrientationToLocalizedStringProvider.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/InterfaceOrientationToLocalizedStringProvider.type.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LockableOrientation.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/LockableOrientation.type.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ export let Orientation = /*#__PURE__*/function (Orientation) {
2
+ Orientation[Orientation["unknown"] = 0] = "unknown";
3
+ Orientation[Orientation["portrait"] = 1] = "portrait";
4
+ Orientation[Orientation["landscapeRight"] = 2] = "landscapeRight";
5
+ Orientation[Orientation["portraitUpsideDown"] = 3] = "portraitUpsideDown";
6
+ Orientation[Orientation["landscapeLeft"] = 4] = "landscapeLeft";
7
+ Orientation[Orientation["faceUp"] = 5] = "faceUp";
8
+ Orientation[Orientation["faceDown"] = 6] = "faceDown";
9
+ return Orientation;
10
+ }({});
11
+ //# sourceMappingURL=Orientation.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Orientation"],"sourceRoot":"../../../src","sources":["types/Orientation.enum.ts"],"mappings":"AAAA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=OrientationEvent.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/OrientationEvent.interface.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ getInterfaceOrientation(): Promise<number>;
4
+ getDeviceOrientation(): Promise<number>;
5
+ lockTo(orientation: number): void;
6
+ unlock(): void;
7
+ addListener: (eventType: string) => void;
8
+ removeListeners: (count: number) => void;
9
+ }
10
+ declare const _default: Spec;
11
+ export default _default;
12
+ //# sourceMappingURL=NativeOrientationDirector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeOrientationDirector.d.ts","sourceRoot":"","sources":["../../../src/NativeOrientationDirector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,IAAI,IAAI,CAAC;IAEf,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;;AAED,wBAA6E"}
@@ -0,0 +1,17 @@
1
+ import type { InterfaceOrientationToLocalizedStringProvider } from './types/InterfaceOrientationToLocalizedStringProvider.type';
2
+ import { Orientation } from './types/Orientation.enum';
3
+ import type { OrientationEvent } from './types/OrientationEvent.interface';
4
+ import type { LockableOrientation } from './types/LockableOrientation.type';
5
+ declare class RNOrientationDirector {
6
+ private static _localizedStringProvider;
7
+ setLocalizedStringProvider(provider: InterfaceOrientationToLocalizedStringProvider): void;
8
+ static getInterfaceOrientation(): Promise<Orientation>;
9
+ static getDeviceOrientation(): Promise<Orientation>;
10
+ static lockTo(orientation: LockableOrientation): void;
11
+ static unlock(): void;
12
+ static listenForDeviceOrientationChanges(callback: (orientation: OrientationEvent) => void): import("react-native").EmitterSubscription;
13
+ static listenForInterfaceOrientationChanges(callback: (orientation: OrientationEvent) => void): import("react-native").EmitterSubscription;
14
+ static convertOrientationToHumanReadableString(orientation: Orientation): string;
15
+ }
16
+ export default RNOrientationDirector;
17
+ //# sourceMappingURL=RNOrientationDirector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNOrientationDirector.d.ts","sourceRoot":"","sources":["../../../src/RNOrientationDirector.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6CAA6C,EAAE,MAAM,4DAA4D,CAAC;AAChI,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,cAAM,qBAAqB;IACzB,OAAO,CAAC,MAAM,CAAC,wBAAwB,CASnC;IAEJ,0BAA0B,CACxB,QAAQ,EAAE,6CAA6C;IAKzD,MAAM,CAAC,uBAAuB,IAAI,OAAO,CAAC,WAAW,CAAC;IAItD,MAAM,CAAC,oBAAoB,IAAI,OAAO,CAAC,WAAW,CAAC;IAInD,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB;IAI9C,MAAM,CAAC,MAAM;IAIb,MAAM,CAAC,iCAAiC,CACtC,QAAQ,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI;IAKnD,MAAM,CAAC,oCAAoC,CACzC,QAAQ,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI;IAQnD,MAAM,CAAC,uCAAuC,CAC5C,WAAW,EAAE,WAAW,GACvB,MAAM;CAGV;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Orientation } from '../types/Orientation.enum';
2
+ /**
3
+ * Hook that returns the current device orientation.
4
+ * It listens for orientation changes and updates the state accordingly.
5
+ */
6
+ declare const useDeviceOrientation: () => Orientation;
7
+ export default useDeviceOrientation;
8
+ //# sourceMappingURL=useDeviceOrientation.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeviceOrientation.hook.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDeviceOrientation.hook.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;GAGG;AACH,QAAA,MAAM,oBAAoB,mBA4BzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Orientation } from '../types/Orientation.enum';
2
+ /**
3
+ * Hook that returns the current interface orientation.
4
+ * It listens for orientation changes and updates the state accordingly.
5
+ */
6
+ declare const useInterfaceOrientation: () => Orientation;
7
+ export default useInterfaceOrientation;
8
+ //# sourceMappingURL=useInterfaceOrientation.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInterfaceOrientation.hook.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInterfaceOrientation.hook.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;GAGG;AACH,QAAA,MAAM,uBAAuB,mBA4B5B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { Orientation } from './types/Orientation.enum';
2
+ import useDeviceOrientation from './hooks/useDeviceOrientation.hook';
3
+ export { useDeviceOrientation };
4
+ import useInterfaceOrientation from './hooks/useInterfaceOrientation.hook';
5
+ export { useInterfaceOrientation };
6
+ import RNOrientationDirector from './RNOrientationDirector';
7
+ export default RNOrientationDirector;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,OAAO,uBAAuB,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAEnC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { NativeEventEmitter } from 'react-native';
2
+ import type { Spec } from './NativeOrientationDirector';
3
+ export declare const EventEmitter: NativeEventEmitter;
4
+ declare const _default: Spec;
5
+ export default _default;
6
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AA0BxD,eAAO,MAAM,YAAY,oBAAiC,CAAC;;AAE3D,wBAAiD"}
@@ -0,0 +1,6 @@
1
+ declare enum Event {
2
+ DeviceOrientationDidChange = "DeviceOrientationDidChange",
3
+ InterfaceOrientationDidChange = "InterfaceOrientationDidChange"
4
+ }
5
+ export default Event;
6
+ //# sourceMappingURL=Event.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Event.enum.d.ts","sourceRoot":"","sources":["../../../../src/types/Event.enum.ts"],"names":[],"mappings":"AAAA,aAAK,KAAK;IACR,0BAA0B,+BAA+B;IACzD,6BAA6B,kCAAkC;CAChE;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Orientation } from './Orientation.enum';
2
+ export type InterfaceOrientationToLocalizedStringProvider = Record<Orientation, string>;
3
+ //# sourceMappingURL=InterfaceOrientationToLocalizedStringProvider.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InterfaceOrientationToLocalizedStringProvider.type.d.ts","sourceRoot":"","sources":["../../../../src/types/InterfaceOrientationToLocalizedStringProvider.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,MAAM,6CAA6C,GAAG,MAAM,CAChE,WAAW,EACX,MAAM,CACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Orientation } from './Orientation.enum';
2
+ export type LockableOrientation = Orientation.portrait | Orientation.portraitUpsideDown | Orientation.landscapeLeft | Orientation.landscapeRight;
3
+ //# sourceMappingURL=LockableOrientation.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LockableOrientation.type.d.ts","sourceRoot":"","sources":["../../../../src/types/LockableOrientation.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAC3B,WAAW,CAAC,QAAQ,GACpB,WAAW,CAAC,kBAAkB,GAC9B,WAAW,CAAC,aAAa,GACzB,WAAW,CAAC,cAAc,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare enum Orientation {
2
+ unknown = 0,
3
+ portrait = 1,
4
+ landscapeRight = 2,
5
+ portraitUpsideDown = 3,
6
+ landscapeLeft = 4,
7
+ faceUp = 5,
8
+ faceDown = 6
9
+ }
10
+ //# sourceMappingURL=Orientation.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Orientation.enum.d.ts","sourceRoot":"","sources":["../../../../src/types/Orientation.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,cAAc,IAAI;IAClB,kBAAkB,IAAI;IACtB,aAAa,IAAI;IAGjB,MAAM,IAAI;IACV,QAAQ,IAAI;CACb"}
@@ -0,0 +1,5 @@
1
+ import type { Orientation } from './Orientation.enum';
2
+ export interface OrientationEvent {
3
+ orientation: Orientation;
4
+ }
5
+ //# sourceMappingURL=OrientationEvent.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrientationEvent.interface.d.ts","sourceRoot":"","sources":["../../../../src/types/OrientationEvent.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,WAAW,CAAC;CAC1B"}