{"version":3,"sources":["../../../../src/elements/useElementBounding/index.ts"],"sourcesContent":["\"use client\";\nimport { useScope, toObs } from \"@usels/core\";\nimport { createElementBounding } from \"./core\";\n\nexport { createElementBounding } from \"./core\";\nexport type { UseElementBoundingOptions, UseElementBoundingReturn } from \"./core\";\n\n/**\n * Tracks the bounding rect of a DOM element (x, y, top, right, bottom, left,\n * width, height). Observes ResizeObserver, MutationObserver (style/class\n * changes), window scroll, and resize.\n */\nexport type UseElementBounding = typeof createElementBounding;\nexport const useElementBounding: UseElementBounding = (target, options = {}) => {\n  return useScope(\n    (opts) => {\n      const opts$ = toObs(opts, { window: \"opaque\" });\n      return createElementBounding(target, opts$);\n    },\n    options as Record<string, unknown>\n  );\n};\n"],"mappings":";AACA,SAAS,UAAU,aAAa;AAChC,SAAS,6BAA6B;AAEtC,SAAS,yBAAAA,8BAA6B;AAS/B,MAAM,qBAAyC,CAAC,QAAQ,UAAU,CAAC,MAAM;AAC9E,SAAO;AAAA,IACL,CAAC,SAAS;AACR,YAAM,QAAQ,MAAM,MAAM,EAAE,QAAQ,SAAS,CAAC;AAC9C,aAAO,sBAAsB,QAAQ,KAAK;AAAA,IAC5C;AAAA,IACA;AAAA,EACF;AACF;","names":["createElementBounding"]}