{"version":3,"sources":["../../../../src/sensors/useDeviceOrientation/index.ts"],"sourcesContent":["\"use client\";\nimport { useScope, toObs } from \"@usels/core\";\nimport { createDeviceOrientation } from \"./core\";\n\nexport { createDeviceOrientation } from \"./core\";\nexport type { UseDeviceOrientationOptions, UseDeviceOrientationReturn } from \"./core\";\n\n/**\n * Reactive wrapper around the\n * [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent).\n *\n * Tracks the physical orientation of the device and exposes alpha/beta/gamma\n * angles (and `isAbsolute$`) as observables, plus iOS permission flow integration.\n */\nexport type UseDeviceOrientation = typeof createDeviceOrientation;\nexport const useDeviceOrientation: UseDeviceOrientation = (options = {}) => {\n  return useScope(\n    (opts) => {\n      const opts$ = toObs(opts, { window: \"opaque\" });\n      return createDeviceOrientation(opts$);\n    },\n    options as Record<string, unknown>\n  );\n};\n"],"mappings":";AACA,SAAS,UAAU,aAAa;AAChC,SAAS,+BAA+B;AAExC,SAAS,2BAAAA,gCAA+B;AAWjC,MAAM,uBAA6C,CAAC,UAAU,CAAC,MAAM;AAC1E,SAAO;AAAA,IACL,CAAC,SAAS;AACR,YAAM,QAAQ,MAAM,MAAM,EAAE,QAAQ,SAAS,CAAC;AAC9C,aAAO,wBAAwB,KAAK;AAAA,IACtC;AAAA,IACA;AAAA,EACF;AACF;","names":["createDeviceOrientation"]}