{"version":3,"sources":["../../../../src/sensors/useGeolocation/index.ts"],"sourcesContent":["\"use client\";\nimport { useScope, toObs } from \"@usels/core\";\nimport { createGeolocation } from \"./core\";\n\nexport { createGeolocation } from \"./core\";\nexport type { UseGeolocationOptions, UseGeolocationCoords, UseGeolocationReturn } from \"./core\";\n\n/**\n * Reactive wrapper around the\n * [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation).\n *\n * Tracks the user's geographic position via `watchPosition`, exposing\n * coordinates, last update timestamp, and error state as observables, with\n * `pause()` / `resume()` controls.\n */\nexport type UseGeolocation = typeof createGeolocation;\nexport const useGeolocation: UseGeolocation = (options = {}) => {\n  return useScope(\n    (opts) => {\n      const opts$ = toObs(opts);\n      return createGeolocation(opts$);\n    },\n    options as Record<string, unknown>\n  );\n};\n"],"mappings":";AACA,SAAS,UAAU,aAAa;AAChC,SAAS,yBAAyB;AAElC,SAAS,qBAAAA,0BAAyB;AAY3B,MAAM,iBAAiC,CAAC,UAAU,CAAC,MAAM;AAC9D,SAAO;AAAA,IACL,CAAC,SAAS;AACR,YAAM,QAAQ,MAAM,IAAI;AACxB,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,IACA;AAAA,EACF;AACF;","names":["createGeolocation"]}