@modern-kit/utils
Version:
1 lines • 619 B
Source Map (JSON)
{"version":3,"file":"index.cjs","sources":["../../../src/common/getViewportSize/index.ts"],"sourcesContent":["import { isServer } from '../../device/isServer';\n\nexport function getViewportSize() {\n if (isServer()) {\n return { width: 0, height: 0 } as const;\n }\n\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n } as const;\n}\n"],"names":["isServer"],"mappings":";;;;AAEO,SAAS,eAAA,GAAkB;AAChC,EAAA,IAAIA,yBAAS,EAAG;AACd,IAAA,OAAO,EAAE,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,CAAA,EAAE;AAAA,EAC/B;AAEA,EAAA,OAAO;AAAA,IACL,OAAO,MAAA,CAAO,UAAA;AAAA,IACd,QAAQ,MAAA,CAAO;AAAA,GACjB;AACF;;;;"}