{"version":3,"sources":["../../../../src/browser/useScreenOrientation/index.ts"],"sourcesContent":["\"use client\";\nimport { useScope, toObs } from \"@usels/core\";\nimport { createScreenOrientation } from \"./core\";\n\nexport { createScreenOrientation } from \"./core\";\nexport type {\n  OrientationType,\n  OrientationLockType,\n  UseScreenOrientationOptions,\n  UseScreenOrientationReturn,\n} from \"./core\";\n\n/**\n * Reactive wrapper around the\n * [Screen Orientation API](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation).\n *\n * Tracks the current screen orientation type and angle, and provides methods\n * to lock and unlock orientation.\n */\nexport type UseScreenOrientation = typeof createScreenOrientation;\nexport const useScreenOrientation: UseScreenOrientation = (options = {}) => {\n  return useScope(\n    (opts) => {\n      const opts$ = toObs(opts, { window: \"opaque\" });\n      return createScreenOrientation(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;AAgBjC,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":["createScreenOrientation"]}