repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 2.26 kB
JSON
{"ast":null,"code":"import * as React from 'react';\nexport default function useLayout() {\n const [layout, setLayout] = React.useState({\n height: 0,\n width: 0,\n measured: false\n });\n const onLayout = React.useCallback(e => {\n const {\n height,\n width\n } = e.nativeEvent.layout;\n if (height === layout.height && width === layout.width) {\n return;\n }\n setLayout({\n height,\n width,\n measured: true\n });\n }, [layout.height, layout.width]);\n return [layout, onLayout];\n}","map":{"version":3,"names":["React","useLayout","layout","setLayout","useState","height","width","measured","onLayout","useCallback","e","nativeEvent"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/utils/useLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\n\nexport default function useLayout() {\n const [layout, setLayout] = React.useState<{\n height: number;\n width: number;\n measured: boolean;\n }>({ height: 0, width: 0, measured: false });\n\n const onLayout = React.useCallback(\n (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n if (height === layout.height && width === layout.width) {\n return;\n }\n\n setLayout({\n height,\n width,\n measured: true,\n });\n },\n [layout.height, layout.width]\n );\n\n return [layout, onLayout] as const;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,eAAe,SAASC,SAASA,CAAA,EAAG;EAClC,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGH,KAAK,CAACI,QAAQ,CAIvC;IAAEC,MAAM,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAM,CAAC,CAAC;EAE5C,MAAMC,QAAQ,GAAGR,KAAK,CAACS,WAAW,CAC/BC,CAAoB,IAAK;IACxB,MAAM;MAAEL,MAAM;MAAEC;IAAM,CAAC,GAAGI,CAAC,CAACC,WAAW,CAACT,MAAM;IAE9C,IAAIG,MAAM,KAAKH,MAAM,CAACG,MAAM,IAAIC,KAAK,KAAKJ,MAAM,CAACI,KAAK,EAAE;MACtD;IACF;IAEAH,SAAS,CAAC;MACRE,MAAM;MACNC,KAAK;MACLC,QAAQ,EAAE;IACZ,CAAC,CAAC;EACJ,CAAC,EACD,CAACL,MAAM,CAACG,MAAM,EAAEH,MAAM,CAACI,KAAK,CAC9B,CAAC;EAED,OAAO,CAACJ,MAAM,EAAEM,QAAQ,CAAC;AAC3B","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}