{"version":3,"sources":["../../../../src/sensors/useElementByPoint/index.ts"],"sourcesContent":["\"use client\";\nimport { useScope, toObs } from \"@usels/core\";\nimport { createElementByPoint } from \"./core\";\n\nexport { createElementByPoint } from \"./core\";\nexport type { UseElementByPointOptions, UseElementByPointReturn } from \"./core\";\n\n/**\n * Reactive element-at-point tracker.\n *\n * Continuously polls `document.elementFromPoint()` on each animation frame and\n * updates `element$` whenever the element under the specified coordinates\n * changes. Supports single or multiple element detection modes.\n */\nexport type UseElementByPoint = typeof createElementByPoint;\nexport const useElementByPoint: UseElementByPoint = (options) => {\n  return useScope(\n    (opts) => {\n      const opts$ = toObs(opts, { window: \"opaque\" });\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      return createElementByPoint(opts$ as any);\n    },\n    options as Record<string, unknown>\n  );\n};\n"],"mappings":";AACA,SAAS,UAAU,aAAa;AAChC,SAAS,4BAA4B;AAErC,SAAS,wBAAAA,6BAA4B;AAW9B,MAAM,oBAAuC,CAAC,YAAY;AAC/D,SAAO;AAAA,IACL,CAAC,SAAS;AACR,YAAM,QAAQ,MAAM,MAAM,EAAE,QAAQ,SAAS,CAAC;AAE9C,aAAO,qBAAqB,KAAY;AAAA,IAC1C;AAAA,IACA;AAAA,EACF;AACF;","names":["createElementByPoint"]}