This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
reValuate/node_modules/@expo/config-plugins/build/ios/UserInterfaceStyle.js.map

1 line
2.1 KiB
Plaintext
Raw Normal View History

2021-04-02 02:24:13 +03:00
{"version":3,"file":"UserInterfaceStyle.js","sourceRoot":"","sources":["../../src/ios/UserInterfaceStyle.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,wDAA+D;AAGlD,QAAA,sBAAsB,GAAG,mCAAqB,CACzD,qBAAqB,EACrB,wBAAwB,CACzB,CAAC;AAEF,SAAgB,qBAAqB,CACnC,MAAsD;;IAEtD,yBAAO,MAAM,CAAC,GAAG,0CAAE,kBAAkB,mCAAI,MAAM,CAAC,kBAAkB,mCAAI,IAAI,CAAC;AAC7E,CAAC;AAJD,sDAIC;AAED,SAAgB,qBAAqB,CACnC,MAAsD,EACtD,EAAiD;QAAjD,EAAE,oBAAoB,OAA2B,EAAzB,gDAAY;IAEpC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,iCAAiC,CAAC,kBAAkB,CAAC,CAAC;IAEpE,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,SAAS,CAAC;KAClB;IAED,uCACK,SAAS,KACZ,oBAAoB,EAAE,KAAK,IAC3B;AACJ,CAAC;AAfD,sDAeC;AAED,SAAS,iCAAiC,CACxC,kBAAiC;IAEjC,QAAQ,kBAAkB,EAAE;QAC1B,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;KACtB;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { InfoPlist, InterfaceStyle } from './IosConfig.types';\n\nexport const withUserInterfaceStyle = createInfoPlistPlugin(\n setUserInterfaceStyle,\n 'withUserInterfaceStyle'\n);\n\nexport function getUserInterfaceStyle(\n config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>\n): string | null {\n return config.ios?.userInterfaceStyle ?? config.userInterfaceStyle ?? null;\n}\n\nexport function setUserInterfaceStyle(\n config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>,\n { UIUserInterfaceStyle, ...infoPlist }: InfoPlist\n): InfoPlist {\n const userInterfaceStyle = getUserInterfaceStyle(config);\n const style = mapUserInterfaceStyleForInfoPlist(userInterfaceStyle);\n\n if (!style) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n UIUserInterfaceStyle: style,\n };\n}\n\nfunction mapUserInterfaceStyleForInfoPlist(\n userInterfaceStyle: string | null\n): InterfaceStyle | null {\n switch (userInterfaceStyle) {\n case 'light':\n return 'Light';\n case 'dark':\n return 'Dark';\n case 'automatic':\n return 'Automatic';\n }\n\n return null;\n}\n"]}