persona-community-5/.pnpm-store/v3/files/14/19a6eb624530700bfb5731b8713f4f62c0e91652f5f613245e011da2061f6cfae04458f8dfbf19cc6a1a58755cb0f1028be1087b4bac2c0233c827ceeb7cb6
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

8 lines
1.0 KiB
Plaintext

{
"version": 3,
"sources": ["../src/use-rect.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState<DOMRect>();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"],
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,0BAA0B;AAQnC,SAAS,QAAQ,YAA+B;AAC9C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAkB;AAChD,EAAM,gBAAU,MAAM;AACpB,QAAI,YAAY;AACd,YAAM,YAAY,mBAAmB,YAAY,OAAO;AACxD,aAAO,MAAM;AACX,gBAAQ,MAAS;AACjB,kBAAU;AAAA,MACZ;AAAA,IACF;AACA;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AACf,SAAO;AACT;",
"names": []
}