UNPKG

2.45 kBSource Map (JSON)View Raw
1{"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../src/SplashScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE;QAC1C,MAAM,IAAI,mBAAmB,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;KAC7E;IACD,OAAO,MAAM,gBAAgB,CAAC,oBAAoB,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC/B,MAAM,IAAI,mBAAmB,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;KAClE;IACD,OAAO,MAAM,gBAAgB,CAAC,SAAS,EAAE,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IACxF,SAAS,EAAE,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,IAAI,CACV,+FAA+F,CAChG,CAAC;IACF,oBAAoB,EAAE,CAAC;AACzB,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\n\nimport ExpoSplashScreen from './ExpoSplashScreen';\n\n/**\n * Makes the native splash screen stay visible until `SplashScreen.hideAsync()` is called.\n * It has to be called before any view is rendered.\n *\n * @example\n * ```typescript\n * // top level component\n *\n * SplashScreen.preventAutoHideAsync()\n * .then(result => console.log(`SplashScreen.preventAutoHideAsync() succeeded: ${result}`))\n * .catch(console.warn); // it's good to explicitly catch and inspect any error\n *\n * class App extends React.Component {\n * ...\n * // Hide SplashScreen once your app content is ready to be displayed.\n * await SplashScreen.hideAsync()\n * ...\n * }\n * ```\n */\nexport async function preventAutoHideAsync(): Promise<boolean> {\n if (!ExpoSplashScreen.preventAutoHideAsync) {\n throw new UnavailabilityError('expo-splash-screen', 'preventAutoHideAsync');\n }\n return await ExpoSplashScreen.preventAutoHideAsync();\n}\n\nexport async function hideAsync(): Promise<boolean> {\n if (!ExpoSplashScreen.hideAsync) {\n throw new UnavailabilityError('expo-splash-screen', 'hideAsync');\n }\n return await ExpoSplashScreen.hideAsync();\n}\n\n/**\n * @deprecated\n */\nexport function hide(): void {\n console.warn('SplashScreen.hide() is deprecated in favour of SplashScreen.hideAsync()');\n hideAsync();\n}\n\n/**\n * @deprecated\n */\nexport function preventAutoHide(): void {\n console.warn(\n 'SplashScreen.preventAutoHide() is deprecated in favour of SplashScreen.preventAutoHideAsync()'\n );\n preventAutoHideAsync();\n}\n"]}
\No newline at end of file