{"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import React from \"react\";\nimport { isWeb } from \"@tamagui/constants\";\nimport { getWindowSize, subscribe } from \"./helpers\";\nimport { initialValue } from \"./initialValue\";\nimport { configureInitialWindowDimensions } from \"./initialValue\";\nfunction useWindowDimensions({\n  serverValue = initialValue\n} = {}) {\n  return React.useSyncExternalStore(\n    subscribe,\n    getWindowSize,\n    () => isWeb ? serverValue : getWindowSize()\n  );\n}\nexport {\n  configureInitialWindowDimensions,\n  useWindowDimensions\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAKA,SAAS,oBAAoB,EAC3B,cAAc,iBACZ,CAAC,GAAG;CACN,OAAO,MAAM,qBACX,WACA,qBACM,QAAQ,cAAc,cAAc,CAC5C;AACF"}