@expo/prebuild-config 4.0.3 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/getAutolinkedPackages.js +6 -5
- package/build/getAutolinkedPackages.js.map +1 -1
- package/build/getPrebuildConfig.js.map +1 -1
- package/build/importExpoModulesAutolinking.d.ts +16 -0
- package/build/importExpoModulesAutolinking.js +38 -0
- package/build/importExpoModulesAutolinking.js.map +1 -0
- package/build/index.js.map +1 -1
- package/build/plugins/icons/AssetContents.js.map +1 -1
- package/build/plugins/icons/withAndroidIcons.d.ts +2 -1
- package/build/plugins/icons/withAndroidIcons.js +144 -132
- package/build/plugins/icons/withAndroidIcons.js.map +1 -1
- package/build/plugins/icons/withAndroidManifestIcons.js.map +1 -1
- package/build/plugins/icons/withIosIcons.js.map +1 -1
- package/build/plugins/unversioned/createLegacyPlugin.js.map +1 -1
- package/build/plugins/unversioned/expo-ads-admob/expo-ads-admob.js.map +1 -1
- package/build/plugins/unversioned/expo-ads-admob/withAndroidAdMob.js.map +1 -1
- package/build/plugins/unversioned/expo-ads-admob/withIosAdMob.js.map +1 -1
- package/build/plugins/unversioned/expo-apple-authentication.js.map +1 -1
- package/build/plugins/unversioned/expo-branch/expo-branch.js.map +1 -1
- package/build/plugins/unversioned/expo-branch/withAndroidBranch.js.map +1 -1
- package/build/plugins/unversioned/expo-branch/withIosBranch.js.map +1 -1
- package/build/plugins/unversioned/expo-contacts.js.map +1 -1
- package/build/plugins/unversioned/expo-document-picker.js.map +1 -1
- package/build/plugins/unversioned/expo-facebook/expo-facebook.js.map +1 -1
- package/build/plugins/unversioned/expo-facebook/withAndroidFacebook.js.map +1 -1
- package/build/plugins/unversioned/expo-facebook/withIosFacebook.js.map +1 -1
- package/build/plugins/unversioned/expo-facebook/withSKAdNetworkIdentifiers.js.map +1 -1
- package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.js.map +1 -1
- package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.js.map +1 -1
- package/build/plugins/unversioned/expo-notifications/expo-notifications.js.map +1 -1
- package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.d.ts +94 -5
- package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js +89 -86
- package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/expo-splash-screen.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/getAndroidSplashConfig.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/getIosSplashConfig.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashDrawables.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStrings.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStyles.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js +25 -1
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.d.ts +14 -0
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.js +212 -0
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.js.map +1 -0
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.d.ts +5 -7
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.js +11 -87
- package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.js.map +1 -1
- package/build/plugins/unversioned/expo-splash-screen/wtihIosSplashScreenStoryboardImage.d.ts +5 -0
- package/build/plugins/unversioned/expo-splash-screen/wtihIosSplashScreenStoryboardImage.js +68 -0
- package/build/plugins/unversioned/expo-splash-screen/wtihIosSplashScreenStoryboardImage.js.map +1 -0
- package/build/plugins/unversioned/expo-system-ui/expo-system-ui.js.map +1 -1
- package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.js.map +1 -1
- package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.js.map +1 -1
- package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.js.map +1 -1
- package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.d.ts +2 -2
- package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js +8 -10
- package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js.map +1 -1
- package/build/plugins/unversioned/expo-updates.js.map +1 -1
- package/build/plugins/unversioned/react-native-maps.js.map +1 -1
- package/build/plugins/withDefaultPlugins.js.map +1 -1
- package/package.json +14 -11
package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withAndroidSplashLegacyMainActivity.js","names":["debug","Debug","SHOW_SPLASH_ID","withAndroidSplashLegacyMainActivity","config","withMainActivity","modResults","contents","setSplashScreenLegacyMainActivity","language","mainActivity","splashConfig","getAndroidSplashConfig","mod","removeContents","src","tag","didClear","statusBarTranslucent","androidStatusBar","translucent","resizeMode","isJava","LE","addImports","match","onCreateBlock","mergeContents","anchor","offset","comment","newSrc","join","split","filter","line","test","toUpperCase"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withAndroidSplashLegacyMainActivity.ts"],"sourcesContent":["import { ConfigPlugin, withMainActivity } from '@expo/config-plugins';\nimport { addImports } from '@expo/config-plugins/build/android/codeMod';\nimport { mergeContents, removeContents } from '@expo/config-plugins/build/utils/generateCode';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { getAndroidSplashConfig } from './getAndroidSplashConfig';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:android:mainActivity');\n\n// DO NOT CHANGE\nconst SHOW_SPLASH_ID = 'expo-splash-screen-mainActivity-onCreate-show-splash';\n\nexport const withAndroidSplashLegacyMainActivity: ConfigPlugin = (config) => {\n return withMainActivity(config, (config) => {\n config.modResults.contents = setSplashScreenLegacyMainActivity(\n config,\n config.modResults.contents,\n config.modResults.language\n );\n return config;\n });\n};\n\nexport function setSplashScreenLegacyMainActivity(\n config: Pick<ExpoConfig, 'android' | 'androidStatusBar' | 'userInterfaceStyle'>,\n mainActivity: string,\n language: 'java' | 'kt'\n): string {\n debug(`Modify with language: \"${language}\"`);\n const splashConfig = getAndroidSplashConfig(config);\n\n if (!splashConfig) {\n // Remove our generated code safely...\n const mod = removeContents({\n src: mainActivity,\n tag: SHOW_SPLASH_ID,\n });\n\n mainActivity = mod.contents;\n if (mod.didClear) {\n debug('Removed SplashScreen.show()');\n }\n return mainActivity;\n }\n // TODO: Translucent is weird\n const statusBarTranslucent = !!config.androidStatusBar?.translucent;\n\n const { resizeMode } = splashConfig;\n const isJava = language === 'java';\n const LE = isJava ? ';' : '';\n\n mainActivity = addImports(\n mainActivity,\n [\n 'expo.modules.splashscreen.SplashScreen',\n 'expo.modules.splashscreen.SplashScreenImageResizeMode',\n 'android.os.Bundle',\n ],\n isJava\n );\n\n if (!mainActivity.match(/(?<=^.*super\\.onCreate.*$)/m)) {\n const onCreateBlock = isJava\n ? [\n ' @Override',\n ' protected void onCreate(Bundle savedInstanceState) {',\n ' super.onCreate(savedInstanceState);',\n ' }',\n ]\n : [\n ' override fun onCreate(savedInstanceState: Bundle?) {',\n ' super.onCreate(savedInstanceState)',\n ' }',\n ];\n\n mainActivity = mergeContents({\n src: mainActivity,\n // insert just below super.onCreate\n anchor: isJava\n ? /(?<=public\\s+class\\s+.*\\s+extends\\s+.*\\s+{.*$)/m\n : /(?<=class\\s+.*\\s+:\\s+.*\\s+{.*$)/m,\n offset: 1,\n comment: '//',\n tag: 'expo-splash-screen-mainActivity-onCreate',\n newSrc: onCreateBlock.join('\\n'),\n }).contents;\n }\n\n // Remove our generated code safely...\n mainActivity = removeContents({\n src: mainActivity,\n tag: SHOW_SPLASH_ID,\n }).contents;\n\n // Remove code from `@expo/configure-splash-screen`\n mainActivity = mainActivity\n .split('\\n')\n .filter((line) => {\n return !/SplashScreen\\.show\\(this,\\s?SplashScreenImageResizeMode\\./.test(line);\n })\n .join('\\n');\n\n // Reapply generated code.\n mainActivity = mergeContents({\n src: mainActivity,\n // insert just below super.onCreate\n anchor: /(?<=^.*super\\.onCreate.*$)/m,\n offset: 1,\n comment: '//',\n tag: SHOW_SPLASH_ID,\n newSrc: ` SplashScreen.show(this, SplashScreenImageResizeMode.${resizeMode.toUpperCase()}, ReactRootView${\n isJava ? '.class' : '::class.java'\n }, ${statusBarTranslucent})${LE}`,\n }).contents;\n\n // TODO: Remove old `SplashScreen.show`\n\n return mainActivity;\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEA,MAAMA,KAAK,GAAG,IAAAC,gBAAA,EAAM,8DAAN,CAAd,C,CAEA;;AACA,MAAMC,cAAc,GAAG,sDAAvB;;AAEO,MAAMC,mCAAiD,GAAIC,MAAD,IAAY;EAC3E,OAAO,IAAAC,iCAAA,EAAiBD,MAAjB,EAA0BA,MAAD,IAAY;IAC1CA,MAAM,CAAC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HF,CAPJ;IAaAZ,YAAY,GAAG,IAAAiB,6BAAA,EAAc;MAC3BZ,GAAG,EAAEL,YADsB;MAE3B;MACAkB,MAAM,EAAEN,MAAM,GACV,iDADU,GAEV,kCALuB;MAM3BO,MAAM,EAAE,CANmB;MAO3BC,OAAO,EAAE,IAPkB;MAQ3Bd,GAAG,EAAE,0CARsB;MAS3Be,MAAM,EAAEL,aAAa,CAACM,IAAd,CAAmB,IAAnB;IATmB,CAAd,EAUZzB,QAVH;EAWD,CA3DO,CA6DR;;;EACAG,YAAY,GAAG,IAAAI,8BAAA,EAAe;IAC5BC,GAAG,EAAEL,YADuB;IAE5BM,GAAG,EAAEd;EAFuB,CAAf,EAGZK,QAHH,CA9DQ,CAmER;;EACAG,YAAY,GAAGA,YAAY,CACxBuB,KADY,CACN,IADM,EAEZC,MAFY,CAEJC,IAAD,IAAU;IAChB,OAAO,CAAC,4DAA4DC,IAA5D,CAAiED,IAAjE,CAAR;EACD,CAJY,EAKZH,IALY,CAKP,IALO,CAAf,CApEQ,CA2ER;;EACAtB,YAAY,GAAG,IAAAiB,6BAAA,EAAc;IAC3BZ,GAAG,EAAEL,YADsB;IAE3B;IACAkB,MAAM,EAAE,6BAHmB;IAI3BC,MAAM,EAAE,CAJmB;IAK3BC,OAAO,EAAE,IALkB;IAM3Bd,GAAG,EAAEd,cANsB;IAO3B6B,MAAM,EAAG,2DAA0DV,UAAU,CAACgB,WAAX,EAAyB,kBAC1Ff,MAAM,GAAG,QAAH,GAAc,cACrB,KAAIJ,oBAAqB,IAAGK,EAAG;EATL,CAAd,EAUZhB,QAVH,CA5EQ,CAwFR;;EAEA,OAAOG,YAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withAndroidSplashScreen.js","names":["withAndroidSplashScreen","config","splashConfig","getAndroidSplashConfig","backgroundColor","androidStatusBar","toLowerCase","WarningAggregator","addWarningAndroid","withPlugins","withAndroidSplashImages","withAndroidSplashDrawables","shouldUpdateLegacyMainActivity","withAndroidSplashLegacyMainActivity","withAndroidSplashStyles","withAndroidSplashStrings","projectRoot","_internal","packagePath","resolveFrom","version","JsonFile","read","toString","semver","lt","sdkVersion"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.ts"],"sourcesContent":["import { ConfigPlugin, WarningAggregator, withPlugins } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport JsonFile from '@expo/json-file';\nimport resolveFrom from 'resolve-from';\nimport semver from 'semver';\n\nimport { getAndroidSplashConfig } from './getAndroidSplashConfig';\nimport { withAndroidSplashDrawables } from './withAndroidSplashDrawables';\nimport { withAndroidSplashImages } from './withAndroidSplashImages';\nimport { withAndroidSplashLegacyMainActivity } from './withAndroidSplashLegacyMainActivity';\nimport { withAndroidSplashStrings } from './withAndroidSplashStrings';\nimport { withAndroidSplashStyles } from './withAndroidSplashStyles';\n\nexport const withAndroidSplashScreen: ConfigPlugin = (config) => {\n const splashConfig = getAndroidSplashConfig(config);\n\n // Update the android status bar to match the splash screen\n // androidStatusBar applies info to the app activity style.\n const backgroundColor = splashConfig?.backgroundColor || '#ffffff';\n if (config.androidStatusBar?.backgroundColor) {\n if (\n backgroundColor.toLowerCase() !== config.androidStatusBar?.backgroundColor?.toLowerCase?.()\n ) {\n WarningAggregator.addWarningAndroid(\n 'androidStatusBar.backgroundColor',\n 'Color conflicts with the splash.backgroundColor'\n );\n }\n } else {\n if (!config.androidStatusBar) config.androidStatusBar = {};\n config.androidStatusBar.backgroundColor = backgroundColor;\n }\n\n return withPlugins(config, [\n withAndroidSplashImages,\n [withAndroidSplashDrawables, splashConfig],\n ...(shouldUpdateLegacyMainActivity(config) ? [withAndroidSplashLegacyMainActivity] : []),\n withAndroidSplashStyles,\n withAndroidSplashStrings,\n ]);\n};\n\nfunction shouldUpdateLegacyMainActivity(config: ExpoConfig): boolean {\n try {\n const projectRoot = config._internal?.projectRoot;\n const packagePath = resolveFrom(projectRoot, 'expo-splash-screen/package.json');\n if (packagePath) {\n const version = JsonFile.read(packagePath).version?.toString() ?? '';\n return semver.lt(version, '0.12.0');\n }\n // If expo-splash-screen didn't be installed or included in template, we check the sdkVersion instead.\n return !!(config.sdkVersion && semver.lt(config.sdkVersion, '43.0.0'));\n } catch {}\n return false;\n}\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEO,MAAMA,uBAAqC,GAAIC,MAAD,IAAY;EAAA;;EAC/D,MAAMC,YAAY,GAAG,IAAAC,gDAAA,EAAuBF,MAAvB,CAArB,CAD+D,CAG/D;EACA;;EACA,MAAMG,eAAe,GAAG,CAAAF,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAEE,eAAd,KAAiC,SAAzD;;EACA,6BAAIH,MAAM,CAACI,gBAAX,kDAAI,sBAAyBD,eAA7B,EAA8C;IAAA;;IAC5C,IACEA,eAAe,CAACE,WAAhB,kCAAkCL,MAAM,CAACI,gBAAzC,qFAAkC,uBAAyBD,eAA3D,qFAAkC,uBAA0CE,WAA5E,2DAAkC,mDAAlC,CADF,EAEE;MACAC,kCAAA,CAAkBC,iBAAlB,CACE,kCADF,EAEE,iDAFF;IAID;EACF,CATD,MASO;IACL,IAAI,CAACP,MAAM,CAACI,gBAAZ,EAA8BJ,MAAM,CAACI,gBAAP,GAA0B,EAA1B;IAC9BJ,MAAM,CAACI,gBAAP,CAAwBD,eAAxB,GAA0CA,eAA1C;EACD;;EAED,OAAO,IAAAK,4BAAA,EAAYR,MAAZ,EAAoB,CACzBS,kDADyB,EAEzB,CAACC,wDAAD,EAA6BT,YAA7B,CAFyB,EAGzB,IAAIU,8BAA8B,CAACX,MAAD,CAA9B,GAAyC,CAACY,0EAAD,CAAzC,GAAiF,EAArF,CAHyB,EAIzBC,kDAJyB,EAKzBC,oDALyB,CAApB,CAAP;AAOD,CA3BM;;;;AA6BP,SAASH,8BAAT,CAAwCX,MAAxC,EAAqE;EACnE,IAAI;IAAA;;IACF,MAAMe,WAAW,wBAAGf,MAAM,CAACgB,SAAV,sDAAG,kBAAkBD,WAAtC;IACA,MAAME,WAAW,GAAG,IAAAC,sBAAA,EAAYH,WAAZ,EAAyB,iCAAzB,CAApB;;IACA,IAAIE,WAAJ,EAAiB;MAAA;;MACf,MAAME,OAAO,sDAAGC,mBAAA,CAASC,IAAT,CAAcJ,WAAd,EAA2BE,OAA9B,2DAAG,uBAAoCG,QAApC,EAAH,yEAAqD,EAAlE;MACA,OAAOC,iBAAA,CAAOC,EAAP,CAAUL,OAAV,EAAmB,QAAnB,CAAP;IACD,CANC,CAOF;;;IACA,OAAO,CAAC,EAAEnB,MAAM,CAACyB,UAAP,IAAqBF,iBAAA,CAAOC,EAAP,CAAUxB,MAAM,CAACyB,UAAjB,EAA6B,QAA7B,CAAvB,CAAR;EACD,CATD,CASE,MAAM,CAAE;;EACV,OAAO,KAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withAndroidSplashStrings.js","names":["RESIZE_MODE_KEY","STATUS_BAR_TRANSLUCENT_KEY","withAndroidSplashStrings","config","withStringsXml","splashConfig","getAndroidSplashConfig","resizeMode","statusBarTranslucent","androidStatusBar","translucent","modResults","setSplashStrings","strings","AndroidConfig","Strings","setStringItem","Resources","buildResourceItem","name","value","translatable","String"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withAndroidSplashStrings.ts"],"sourcesContent":["import { AndroidConfig, ConfigPlugin, withStringsXml } from '@expo/config-plugins';\n\nimport { getAndroidSplashConfig } from './getAndroidSplashConfig';\n\nconst RESIZE_MODE_KEY = 'expo_splash_screen_resize_mode';\nconst STATUS_BAR_TRANSLUCENT_KEY = 'expo_splash_screen_status_bar_translucent';\n\nexport const withAndroidSplashStrings: ConfigPlugin = (config) => {\n return withStringsXml(config, (config) => {\n const splashConfig = getAndroidSplashConfig(config);\n if (splashConfig) {\n const { resizeMode } = splashConfig;\n const statusBarTranslucent = !!config.androidStatusBar?.translucent;\n config.modResults = setSplashStrings(config.modResults, resizeMode, statusBarTranslucent);\n }\n return config;\n });\n};\n\nexport function setSplashStrings(\n strings: AndroidConfig.Resources.ResourceXML,\n resizeMode: string,\n statusBarTranslucent: boolean\n): AndroidConfig.Resources.ResourceXML {\n return AndroidConfig.Strings.setStringItem(\n [\n AndroidConfig.Resources.buildResourceItem({\n name: RESIZE_MODE_KEY,\n value: resizeMode,\n translatable: false,\n }),\n AndroidConfig.Resources.buildResourceItem({\n name: STATUS_BAR_TRANSLUCENT_KEY,\n value: String(statusBarTranslucent),\n translatable: false,\n }),\n ],\n strings\n );\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA,MAAMA,eAAe,GAAG,gCAAxB;AACA,MAAMC,0BAA0B,GAAG,2CAAnC;;AAEO,MAAMC,wBAAsC,GAAIC,MAAD,IAAY;EAChE,OAAO,IAAAC,+BAAA,EAAeD,MAAf,EAAwBA,MAAD,IAAY;IACxC,MAAME,YAAY,GAAG,IAAAC,gDAAA,EAAuBH,MAAvB,CAArB;;IACA,IAAIE,YAAJ,EAAkB;MAAA;;MAChB,MAAM;QAAEE;MAAF,IAAiBF,YAAvB;MACA,MAAMG,oBAAoB,GAAG,CAAC,2BAACL,MAAM,CAACM,gBAAR,kDAAC,sBAAyBC,WAA1B,CAA9B;MACAP,MAAM,CAACQ,UAAP,GAAoBC,gBAAgB,CAACT,MAAM,CAACQ,UAAR,EAAoBJ,UAApB,EAAgCC,oBAAhC,CAApC;IACD;;IACD,OAAOL,MAAP;EACD,CARM,CAAP;AASD,CAVM;;;;AAYA,SAASS,gBAAT,CACLC,OADK,EAELN,UAFK,EAGLC,oBAHK,EAIgC;EACrC,OAAOM,8BAAA,CAAcC,OAAd,CAAsBC,aAAtB,CACL,CACEF,8BAAA,CAAcG,SAAd,CAAwBC,iBAAxB,CAA0C;IACxCC,IAAI,EAAEnB,eADkC;IAExCoB,KAAK,EAAEb,UAFiC;IAGxCc,YAAY,EAAE;EAH0B,CAA1C,CADF,EAMEP,8BAAA,CAAcG,SAAd,CAAwBC,iBAAxB,CAA0C;IACxCC,IAAI,EAAElB,0BADkC;IAExCmB,KAAK,EAAEE,MAAM,CAACd,oBAAD,CAF2B;IAGxCa,YAAY,EAAE;EAH0B,CAA1C,CANF,CADK,EAaLR,OAbK,CAAP;AAeD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withAndroidSplashStyles.js","names":["styleResourceGroup","name","parent","SPLASH_COLOR_NAME","withAndroidSplashStyles","config","withAndroidColors","backgroundColor","getSplashBackgroundColor","modResults","setSplashColorsForTheme","withAndroidColorsNight","getSplashDarkBackgroundColor","withAndroidStyles","removeOldSplashStyleGroup","setSplashStylesForTheme","styles","group","resources","style","filter","$","head","matches","getAndroidSplashConfig","getAndroidDarkSplashConfig","AndroidConfig","Styles","assignStylesValue","add","value","colors","Colors","assignColorValue"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withAndroidSplashStyles.ts"],"sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n withAndroidColors,\n withAndroidColorsNight,\n withAndroidStyles,\n} from '@expo/config-plugins';\nimport { Colors } from '@expo/config-plugins/build/android';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { getAndroidDarkSplashConfig, getAndroidSplashConfig } from './getAndroidSplashConfig';\n\nconst styleResourceGroup = {\n name: 'Theme.App.SplashScreen',\n parent: 'AppTheme',\n};\n\nconst SPLASH_COLOR_NAME = 'splashscreen_background';\n\nexport const withAndroidSplashStyles: ConfigPlugin = (config) => {\n config = withAndroidColors(config, (config) => {\n const backgroundColor = getSplashBackgroundColor(config);\n config.modResults = setSplashColorsForTheme(config.modResults, backgroundColor);\n return config;\n });\n config = withAndroidColorsNight(config, (config) => {\n const backgroundColor = getSplashDarkBackgroundColor(config);\n config.modResults = setSplashColorsForTheme(config.modResults, backgroundColor);\n return config;\n });\n config = withAndroidStyles(config, (config) => {\n config.modResults = removeOldSplashStyleGroup(config.modResults);\n config.modResults = setSplashStylesForTheme(config.modResults);\n return config;\n });\n return config;\n};\n\n// Remove the old style group which didn't extend the base theme properly.\nexport function removeOldSplashStyleGroup(styles: AndroidConfig.Resources.ResourceXML) {\n const group = {\n name: 'Theme.App.SplashScreen',\n parent: 'Theme.AppCompat.Light.NoActionBar',\n };\n\n styles.resources.style = styles.resources.style?.filter?.(({ $: head }) => {\n let matches = head.name === group.name;\n if (group.parent != null && matches) {\n matches = head.parent === group.parent;\n }\n return !matches;\n });\n\n return styles;\n}\n\nexport function getSplashBackgroundColor(config: ExpoConfig): string | null {\n return getAndroidSplashConfig(config)?.backgroundColor ?? null;\n}\n\nexport function getSplashDarkBackgroundColor(config: ExpoConfig): string | null {\n return getAndroidDarkSplashConfig(config)?.backgroundColor ?? null;\n}\n\nexport function setSplashStylesForTheme(styles: AndroidConfig.Resources.ResourceXML) {\n // Add splash screen image\n return AndroidConfig.Styles.assignStylesValue(styles, {\n add: true,\n value: '@drawable/splashscreen',\n name: 'android:windowBackground',\n parent: styleResourceGroup,\n });\n}\n\nexport function setSplashColorsForTheme(\n colors: AndroidConfig.Resources.ResourceXML,\n backgroundColor: string | null\n): AndroidConfig.Resources.ResourceXML {\n return Colors.assignColorValue(colors, { value: backgroundColor, name: SPLASH_COLOR_NAME });\n}\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA,MAAMA,kBAAkB,GAAG;EACzBC,IAAI,EAAE,wBADmB;EAEzBC,MAAM,EAAE;AAFiB,CAA3B;AAKA,MAAMC,iBAAiB,GAAG,yBAA1B;;AAEO,MAAMC,uBAAqC,GAAIC,MAAD,IAAY;EAC/DA,MAAM,GAAG,IAAAC,kCAAA,EAAkBD,MAAlB,EAA2BA,MAAD,IAAY;IAC7C,MAAME,eAAe,GAAGC,wBAAwB,CAACH,MAAD,CAAhD;IACAA,MAAM,CAACI,UAAP,GAAoBC,uBAAuB,CAACL,MAAM,CAACI,UAAR,EAAoBF,eAApB,CAA3C;IACA,OAAOF,MAAP;EACD,CAJQ,CAAT;EAKAA,MAAM,GAAG,IAAAM,uCAAA,EAAuBN,MAAvB,EAAgCA,MAAD,IAAY;IAClD,MAAME,eAAe,GAAGK,4BAA4B,CAACP,MAAD,CAApD;IACAA,MAAM,CAACI,UAAP,GAAoBC,uBAAuB,CAACL,MAAM,CAACI,UAAR,EAAoBF,eAApB,CAA3C;IACA,OAAOF,MAAP;EACD,CAJQ,CAAT;EAKAA,MAAM,GAAG,IAAAQ,kCAAA,EAAkBR,MAAlB,EAA2BA,MAAD,IAAY;IAC7CA,MAAM,CAACI,UAAP,GAAoBK,yBAAyB,CAACT,MAAM,CAACI,UAAR,CAA7C;IACAJ,MAAM,CAACI,UAAP,GAAoBM,uBAAuB,CAACV,MAAM,CAACI,UAAR,CAA3C;IACA,OAAOJ,MAAP;EACD,CAJQ,CAAT;EAKA,OAAOA,MAAP;AACD,CAjBM,C,CAmBP;;;;;AAC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BF,MAAxB,EAAgC;IAAED,KAAK,EAAEvB,eAAT;IAA0BN,IAAI,EAAEE;EAAhC,CAAhC,CAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withIosSplashAssets.ts"],"names":["debug","IMAGE_CACHE_NAME","IMAGESET_PATH","BACKGROUND_IMAGESET_PATH","PNG_FILENAME","DARK_PNG_FILENAME","TABLET_PNG_FILENAME","DARK_TABLET_PNG_FILENAME","withIosSplashAssets","config","splash","iosNamedProjectRoot","IOSConfig","Paths","getSourceRoot","modRequest","projectRoot","createSplashScreenBackgroundImageAsync","configureImageAssets","image","darkImage","dark","tabletImage","darkTabletImage","imageSetPath","path","resolve","fs","remove","writeContentsJsonFileAsync","assetPath","copyImageFiles","createPngFileAsync","color","filePath","png","Jimp","writeAsync","createBackgroundImagesAsync","darkColor","tabletColor","darkTabletColor","generateImagesAssetsAsync","generateImageAsset","item","fileName","anyItem","darkItem","tabletItem","darkTabletItem","source","cacheType","src","writeFile","items","filter","Promise","all","map","backgroundColor","tabletBackgroundColor","imagesetPath","join","ensureDir","darkAppearances","appearance","value","buildContentsJsonImages","idiom","filename","scale","appearances","undefined","Boolean","images"],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;;;AAJA;AAYA,MAAMA,KAAK,GAAG,sBAAM,oDAAN,CAAd;AAEA,MAAMC,gBAAgB,GAAG,YAAzB;AACA,MAAMC,aAAa,GAAG,uCAAtB;AACA,M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ImageAsync } from '@expo/image-utils';\nimport Debug from 'debug';\nimport fs from 'fs-extra';\n// @ts-ignore\nimport Jimp from 'jimp-compact';\nimport * as path from 'path';\n\nimport {\n ContentsJsonImage,\n ContentsJsonImageAppearance,\n createContentsJsonItem,\n writeContentsJsonAsync,\n} from '../../icons/AssetContents';\nimport { IOSSplashConfig } from './getIosSplashConfig';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:ios:assets');\n\nconst IMAGE_CACHE_NAME = 'splash-ios';\nconst IMAGESET_PATH = 'Images.xcassets/SplashScreen.imageset';\nconst BACKGROUND_IMAGESET_PATH = 'Images.xcassets/SplashScreenBackground.imageset';\nconst PNG_FILENAME = 'image.png';\nconst DARK_PNG_FILENAME = 'dark_image.png';\nconst TABLET_PNG_FILENAME = 'tablet_image.png';\nconst DARK_TABLET_PNG_FILENAME = 'dark_tablet_image.png';\n\nexport const withIosSplashAssets: ConfigPlugin<IOSSplashConfig> = (config, splash) => {\n if (!splash) {\n return config;\n }\n return withDangerousMod(config, [\n 'ios',\n async config => {\n const iosNamedProjectRoot = IOSConfig.Paths.getSourceRoot(config.modRequest.projectRoot);\n\n await createSplashScreenBackgroundImageAsync({\n iosNamedProjectRoot,\n splash,\n });\n\n await configureImageAssets({\n projectRoot: config.modRequest.projectRoot,\n iosNamedProjectRoot,\n image: splash.image,\n darkImage: splash.dark?.image,\n tabletImage: splash.tabletImage,\n darkTabletImage: splash.dark?.tabletImage,\n });\n\n return config;\n },\n ]);\n};\n\n/**\n * Creates imageset containing image for Splash/Launch Screen.\n */\nasync function configureImageAssets({\n projectRoot,\n iosNamedProjectRoot,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n projectRoot: string;\n iosNamedProjectRoot: string;\n image?: string | null;\n darkImage?: string | null;\n tabletImage: string | null;\n darkTabletImage?: string | null;\n}) {\n const imageSetPath = path.resolve(iosNamedProjectRoot, IMAGESET_PATH);\n\n // ensure old SplashScreen imageSet is removed\n await fs.remove(imageSetPath);\n\n if (!image) {\n return;\n }\n\n await writeContentsJsonFileAsync({\n assetPath: imageSetPath,\n image: PNG_FILENAME,\n darkImage: darkImage ? DARK_PNG_FILENAME : null,\n tabletImage: tabletImage ? TABLET_PNG_FILENAME : null,\n darkTabletImage: darkTabletImage ? DARK_TABLET_PNG_FILENAME : null,\n });\n\n await copyImageFiles({\n projectRoot,\n iosNamedProjectRoot,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n });\n}\n\nasync function createPngFileAsync(color: string, filePath: string) {\n const png = new Jimp(1, 1, color);\n return png.writeAsync(filePath);\n}\n\nasync function createBackgroundImagesAsync({\n iosNamedProjectRoot,\n color,\n darkColor,\n tabletColor,\n darkTabletColor,\n}: {\n iosNamedProjectRoot: string;\n color: string;\n darkColor: string | null;\n tabletColor: string | null;\n darkTabletColor: string | null;\n}) {\n await generateImagesAssetsAsync({\n async generateImageAsset(item, fileName) {\n await createPngFileAsync(\n item,\n path.resolve(iosNamedProjectRoot, BACKGROUND_IMAGESET_PATH, fileName)\n );\n },\n anyItem: color,\n darkItem: darkColor,\n tabletItem: tabletColor,\n darkTabletItem: darkTabletColor,\n });\n}\n\nasync function copyImageFiles({\n projectRoot,\n iosNamedProjectRoot,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n projectRoot: string;\n iosNamedProjectRoot: string;\n image: string;\n darkImage?: string | null;\n tabletImage?: string | null;\n darkTabletImage?: string | null;\n}) {\n await generateImagesAssetsAsync({\n async generateImageAsset(item, fileName) {\n // Using this method will cache the images in `.expo` based on the properties used to generate them.\n // this method also supports remote URLs and using the global sharp instance.\n const { source } = await generateImageAsync({ projectRoot, cacheType: IMAGE_CACHE_NAME }, {\n src: item,\n } as any);\n // Write image buffer to the file system.\n // const assetPath = join(iosNamedProjectRoot, IMAGESET_PATH, filename);\n await fs.writeFile(path.resolve(iosNamedProjectRoot, IMAGESET_PATH, fileName), source);\n },\n anyItem: image,\n darkItem: darkImage,\n tabletItem: tabletImage,\n darkTabletItem: darkTabletImage,\n });\n}\n\nasync function generateImagesAssetsAsync({\n generateImageAsset,\n anyItem,\n darkItem,\n tabletItem,\n darkTabletItem,\n}: {\n generateImageAsset: (item: string, fileName: string) => Promise<void>;\n anyItem: string;\n darkItem?: string | null;\n tabletItem?: string | null;\n darkTabletItem?: string | null;\n}) {\n const items = ([\n [anyItem, PNG_FILENAME],\n [darkItem, DARK_PNG_FILENAME],\n [tabletItem, TABLET_PNG_FILENAME],\n [darkTabletItem, DARK_TABLET_PNG_FILENAME],\n ].filter(([item]) => !!item) as unknown) as [string, string];\n\n await Promise.all(items.map(([item, fileName]) => generateImageAsset(item, fileName)));\n}\n\nasync function createSplashScreenBackgroundImageAsync({\n iosNamedProjectRoot,\n splash,\n}: {\n // Something like projectRoot/ios/MyApp/\n iosNamedProjectRoot: string;\n splash: IOSSplashConfig;\n}) {\n const color = splash.backgroundColor;\n const darkColor = splash.dark?.backgroundColor;\n const tabletColor = splash.tabletBackgroundColor;\n const darkTabletColor = splash.dark?.tabletBackgroundColor;\n\n const imagesetPath = path.join(iosNamedProjectRoot, BACKGROUND_IMAGESET_PATH);\n // Ensure the Images.xcassets/... path exists\n await fs.remove(imagesetPath);\n await fs.ensureDir(imagesetPath);\n\n await createBackgroundImagesAsync({\n iosNamedProjectRoot,\n color,\n darkColor: darkColor ? darkColor : null,\n tabletColor: tabletColor ? tabletColor : null,\n darkTabletColor: darkTabletColor ? darkTabletColor : null,\n });\n\n await writeContentsJsonFileAsync({\n assetPath: path.resolve(iosNamedProjectRoot, BACKGROUND_IMAGESET_PATH),\n image: PNG_FILENAME,\n darkImage: darkColor ? DARK_PNG_FILENAME : null,\n tabletImage: tabletColor ? TABLET_PNG_FILENAME : null,\n darkTabletImage: darkTabletColor ? DARK_TABLET_PNG_FILENAME : null,\n });\n}\n\nconst darkAppearances: ContentsJsonImageAppearance[] = [\n {\n appearance: 'luminosity',\n value: 'dark',\n } as ContentsJsonImageAppearance,\n];\n\nexport function buildContentsJsonImages({\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n image: string;\n tabletImage: string | null;\n darkImage: string | null;\n darkTabletImage: string | null;\n}): ContentsJsonImage[] {\n return [\n // Phone light\n createContentsJsonItem({\n idiom: 'universal',\n filename: image,\n scale: '1x',\n }),\n createContentsJsonItem({\n idiom: 'universal',\n scale: '2x',\n }),\n createContentsJsonItem({\n idiom: 'universal',\n scale: '3x',\n }),\n // Phone dark\n darkImage &&\n createContentsJsonItem({\n idiom: 'universal',\n appearances: darkAppearances,\n filename: darkImage,\n scale: '1x',\n }),\n darkImage &&\n createContentsJsonItem({\n idiom: 'universal',\n appearances: darkAppearances,\n scale: '2x',\n }),\n darkImage &&\n createContentsJsonItem({\n idiom: 'universal',\n appearances: darkAppearances,\n scale: '3x',\n }),\n // Tablet light\n tabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n filename: tabletImage,\n scale: '1x',\n }),\n tabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n scale: '2x',\n }),\n // Phone dark\n darkTabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n appearances: darkAppearances,\n filename: darkTabletImage ?? undefined,\n scale: '1x',\n }),\n darkTabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n appearances: darkAppearances,\n scale: '2x',\n }),\n ].filter(Boolean) as ContentsJsonImage[];\n}\n\nasync function writeContentsJsonFileAsync({\n assetPath,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n assetPath: string;\n image: string;\n darkImage: string | null;\n tabletImage: string | null;\n darkTabletImage: string | null;\n}) {\n const images = buildContentsJsonImages({ image, darkImage, tabletImage, darkTabletImage });\n\n debug(`create contents.json:`, assetPath);\n debug(`use images:`, images);\n await writeContentsJsonAsync(assetPath, { images });\n}\n"],"file":"withIosSplashAssets.js"}
|
|
1
|
+
{"version":3,"file":"withIosSplashAssets.js","names":["debug","Debug","IMAGE_CACHE_NAME","IMAGESET_PATH","BACKGROUND_IMAGESET_PATH","PNG_FILENAME","DARK_PNG_FILENAME","TABLET_PNG_FILENAME","DARK_TABLET_PNG_FILENAME","withIosSplashAssets","config","splash","withDangerousMod","iosNamedProjectRoot","IOSConfig","Paths","getSourceRoot","modRequest","projectRoot","createSplashScreenBackgroundImageAsync","configureImageAssets","image","darkImage","dark","tabletImage","darkTabletImage","imageSetPath","path","resolve","fs","remove","writeContentsJsonFileAsync","assetPath","copyImageFiles","createPngFileAsync","color","filePath","png","Jimp","writeAsync","createBackgroundImagesAsync","darkColor","tabletColor","darkTabletColor","generateImagesAssetsAsync","generateImageAsset","item","fileName","anyItem","darkItem","tabletItem","darkTabletItem","source","generateImageAsync","cacheType","src","writeFile","items","filter","Promise","all","map","backgroundColor","tabletBackgroundColor","imagesetPath","join","ensureDir","darkAppearances","appearance","value","buildContentsJsonImages","createContentsJsonItem","idiom","filename","scale","appearances","undefined","Boolean","images","writeContentsJsonAsync"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withIosSplashAssets.ts"],"sourcesContent":["import { ConfigPlugin, IOSConfig, withDangerousMod } from '@expo/config-plugins';\nimport { generateImageAsync } from '@expo/image-utils';\nimport Debug from 'debug';\nimport fs from 'fs-extra';\n// @ts-ignore\nimport Jimp from 'jimp-compact';\nimport * as path from 'path';\n\nimport {\n ContentsJsonImage,\n ContentsJsonImageAppearance,\n createContentsJsonItem,\n writeContentsJsonAsync,\n} from '../../icons/AssetContents';\nimport { IOSSplashConfig } from './getIosSplashConfig';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:ios:assets');\n\nconst IMAGE_CACHE_NAME = 'splash-ios';\nconst IMAGESET_PATH = 'Images.xcassets/SplashScreen.imageset';\nconst BACKGROUND_IMAGESET_PATH = 'Images.xcassets/SplashScreenBackground.imageset';\nconst PNG_FILENAME = 'image.png';\nconst DARK_PNG_FILENAME = 'dark_image.png';\nconst TABLET_PNG_FILENAME = 'tablet_image.png';\nconst DARK_TABLET_PNG_FILENAME = 'dark_tablet_image.png';\n\nexport const withIosSplashAssets: ConfigPlugin<IOSSplashConfig> = (config, splash) => {\n if (!splash) {\n return config;\n }\n return withDangerousMod(config, [\n 'ios',\n async (config) => {\n const iosNamedProjectRoot = IOSConfig.Paths.getSourceRoot(config.modRequest.projectRoot);\n\n await createSplashScreenBackgroundImageAsync({\n iosNamedProjectRoot,\n splash,\n });\n\n await configureImageAssets({\n projectRoot: config.modRequest.projectRoot,\n iosNamedProjectRoot,\n image: splash.image,\n darkImage: splash.dark?.image,\n tabletImage: splash.tabletImage,\n darkTabletImage: splash.dark?.tabletImage,\n });\n\n return config;\n },\n ]);\n};\n\n/**\n * Creates imageset containing image for Splash/Launch Screen.\n */\nasync function configureImageAssets({\n projectRoot,\n iosNamedProjectRoot,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n projectRoot: string;\n iosNamedProjectRoot: string;\n image?: string | null;\n darkImage?: string | null;\n tabletImage: string | null;\n darkTabletImage?: string | null;\n}) {\n const imageSetPath = path.resolve(iosNamedProjectRoot, IMAGESET_PATH);\n\n // ensure old SplashScreen imageSet is removed\n await fs.remove(imageSetPath);\n\n if (!image) {\n return;\n }\n\n await writeContentsJsonFileAsync({\n assetPath: imageSetPath,\n image: PNG_FILENAME,\n darkImage: darkImage ? DARK_PNG_FILENAME : null,\n tabletImage: tabletImage ? TABLET_PNG_FILENAME : null,\n darkTabletImage: darkTabletImage ? DARK_TABLET_PNG_FILENAME : null,\n });\n\n await copyImageFiles({\n projectRoot,\n iosNamedProjectRoot,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n });\n}\n\nasync function createPngFileAsync(color: string, filePath: string) {\n const png = new Jimp(1, 1, color);\n return png.writeAsync(filePath);\n}\n\nasync function createBackgroundImagesAsync({\n iosNamedProjectRoot,\n color,\n darkColor,\n tabletColor,\n darkTabletColor,\n}: {\n iosNamedProjectRoot: string;\n color: string;\n darkColor: string | null;\n tabletColor: string | null;\n darkTabletColor: string | null;\n}) {\n await generateImagesAssetsAsync({\n async generateImageAsset(item, fileName) {\n await createPngFileAsync(\n item,\n path.resolve(iosNamedProjectRoot, BACKGROUND_IMAGESET_PATH, fileName)\n );\n },\n anyItem: color,\n darkItem: darkColor,\n tabletItem: tabletColor,\n darkTabletItem: darkTabletColor,\n });\n}\n\nasync function copyImageFiles({\n projectRoot,\n iosNamedProjectRoot,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n projectRoot: string;\n iosNamedProjectRoot: string;\n image: string;\n darkImage?: string | null;\n tabletImage?: string | null;\n darkTabletImage?: string | null;\n}) {\n await generateImagesAssetsAsync({\n async generateImageAsset(item, fileName) {\n // Using this method will cache the images in `.expo` based on the properties used to generate them.\n // this method also supports remote URLs and using the global sharp instance.\n const { source } = await generateImageAsync({ projectRoot, cacheType: IMAGE_CACHE_NAME }, {\n src: item,\n } as any);\n // Write image buffer to the file system.\n // const assetPath = join(iosNamedProjectRoot, IMAGESET_PATH, filename);\n await fs.writeFile(path.resolve(iosNamedProjectRoot, IMAGESET_PATH, fileName), source);\n },\n anyItem: image,\n darkItem: darkImage,\n tabletItem: tabletImage,\n darkTabletItem: darkTabletImage,\n });\n}\n\nasync function generateImagesAssetsAsync({\n generateImageAsset,\n anyItem,\n darkItem,\n tabletItem,\n darkTabletItem,\n}: {\n generateImageAsset: (item: string, fileName: string) => Promise<void>;\n anyItem: string;\n darkItem?: string | null;\n tabletItem?: string | null;\n darkTabletItem?: string | null;\n}) {\n const items = [\n [anyItem, PNG_FILENAME],\n [darkItem, DARK_PNG_FILENAME],\n [tabletItem, TABLET_PNG_FILENAME],\n [darkTabletItem, DARK_TABLET_PNG_FILENAME],\n ].filter(([item]) => !!item) as unknown as [string, string];\n\n await Promise.all(items.map(([item, fileName]) => generateImageAsset(item, fileName)));\n}\n\nasync function createSplashScreenBackgroundImageAsync({\n iosNamedProjectRoot,\n splash,\n}: {\n // Something like projectRoot/ios/MyApp/\n iosNamedProjectRoot: string;\n splash: IOSSplashConfig;\n}) {\n const color = splash.backgroundColor;\n const darkColor = splash.dark?.backgroundColor;\n const tabletColor = splash.tabletBackgroundColor;\n const darkTabletColor = splash.dark?.tabletBackgroundColor;\n\n const imagesetPath = path.join(iosNamedProjectRoot, BACKGROUND_IMAGESET_PATH);\n // Ensure the Images.xcassets/... path exists\n await fs.remove(imagesetPath);\n await fs.ensureDir(imagesetPath);\n\n await createBackgroundImagesAsync({\n iosNamedProjectRoot,\n color,\n darkColor: darkColor ? darkColor : null,\n tabletColor: tabletColor ? tabletColor : null,\n darkTabletColor: darkTabletColor ? darkTabletColor : null,\n });\n\n await writeContentsJsonFileAsync({\n assetPath: path.resolve(iosNamedProjectRoot, BACKGROUND_IMAGESET_PATH),\n image: PNG_FILENAME,\n darkImage: darkColor ? DARK_PNG_FILENAME : null,\n tabletImage: tabletColor ? TABLET_PNG_FILENAME : null,\n darkTabletImage: darkTabletColor ? DARK_TABLET_PNG_FILENAME : null,\n });\n}\n\nconst darkAppearances: ContentsJsonImageAppearance[] = [\n {\n appearance: 'luminosity',\n value: 'dark',\n } as ContentsJsonImageAppearance,\n];\n\nexport function buildContentsJsonImages({\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n image: string;\n tabletImage: string | null;\n darkImage: string | null;\n darkTabletImage: string | null;\n}): ContentsJsonImage[] {\n return [\n // Phone light\n createContentsJsonItem({\n idiom: 'universal',\n filename: image,\n scale: '1x',\n }),\n createContentsJsonItem({\n idiom: 'universal',\n scale: '2x',\n }),\n createContentsJsonItem({\n idiom: 'universal',\n scale: '3x',\n }),\n // Phone dark\n darkImage &&\n createContentsJsonItem({\n idiom: 'universal',\n appearances: darkAppearances,\n filename: darkImage,\n scale: '1x',\n }),\n darkImage &&\n createContentsJsonItem({\n idiom: 'universal',\n appearances: darkAppearances,\n scale: '2x',\n }),\n darkImage &&\n createContentsJsonItem({\n idiom: 'universal',\n appearances: darkAppearances,\n scale: '3x',\n }),\n // Tablet light\n tabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n filename: tabletImage,\n scale: '1x',\n }),\n tabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n scale: '2x',\n }),\n // Phone dark\n darkTabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n appearances: darkAppearances,\n filename: darkTabletImage ?? undefined,\n scale: '1x',\n }),\n darkTabletImage &&\n createContentsJsonItem({\n idiom: 'ipad',\n appearances: darkAppearances,\n scale: '2x',\n }),\n ].filter(Boolean) as ContentsJsonImage[];\n}\n\nasync function writeContentsJsonFileAsync({\n assetPath,\n image,\n darkImage,\n tabletImage,\n darkTabletImage,\n}: {\n assetPath: string;\n image: string;\n darkImage: string | null;\n tabletImage: string | null;\n darkTabletImage: string | null;\n}) {\n const images = buildContentsJsonImages({ image, darkImage, tabletImage, darkTabletImage });\n\n debug(`create contents.json:`, assetPath);\n debug(`use images:`, images);\n await writeContentsJsonAsync(assetPath, { images });\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;;;;;AAJA;AAYA,MAAMA,KAAK,GAAG,IAAAC,gBAAA,EAAM,oDAAN,CAAd;AAEA,MAAMC,gBAAgB,GAAG,YAAzB;AACA,MAAMC,aAAa,GAAG,uCAAtB;AACA,MAAMC,wBAAwB,GAAG,iDAAjC;AACA,MAAMC,YAAY,GAAG,WAArB;AACA,MAAMC,iBAAiB,GAAG,gBAA1B;AACA,MAAMC,mBAAmB,GAAG,kBAA5B;AACA,MAAMC,wBAAwB,GAAG,uBAAjC;;AAEO,MAAMC,mBAAkD,GAAG,CAACC,MAAD,EAASC,M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wC;EAIxCE,WAJwC;EAKxCC;AALwC,CAA1C,EAYG;EACD,MAAMqD,MAAM,GAAGR,uBAAuB,CAAC;IAAEjD,KAAF;IAASC,SAAT;IAAoBE,WAApB;IAAiCC;EAAjC,CAAD,CAAtC;EAEAzB,KAAK,CAAE,uBAAF,EAA0BgC,SAA1B,CAAL;EACAhC,KAAK,CAAE,aAAF,EAAgB8E,MAAhB,CAAL;EACA,MAAM,IAAAC,uCAAA,EAAuB/C,SAAvB,EAAkC;IAAE8C;EAAF,CAAlC,CAAN;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withIosSplashInfoPlist.js","names":["debug","Debug","withIosSplashInfoPlist","config","splash","withInfoPlist","modResults","setSplashInfoPlist","infoPlist","isDarkModeEnabled","dark","image","tabletImage","backgroundColor","tabletBackgroundColor","existing","ios","userInterfaceStyle","WarningAggregator","addWarningIOS","UIUserInterfaceStyle","UILaunchStoryboardName"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.ts"],"sourcesContent":["import { ConfigPlugin, InfoPlist, WarningAggregator, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\nimport Debug from 'debug';\n\nimport { IOSSplashConfig } from './getIosSplashConfig';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:ios:infoPlist');\n\nexport const withIosSplashInfoPlist: ConfigPlugin<IOSSplashConfig> = (config, splash) => {\n return withInfoPlist(config, (config) => {\n config.modResults = setSplashInfoPlist(config, config.modResults, splash);\n return config;\n });\n};\n\nexport function setSplashInfoPlist(\n config: ExpoConfig,\n infoPlist: InfoPlist,\n splash: IOSSplashConfig\n): InfoPlist {\n const isDarkModeEnabled = !!(\n splash?.dark?.image ||\n splash?.dark?.tabletImage ||\n splash?.dark?.backgroundColor ||\n splash?.dark?.tabletBackgroundColor\n );\n debug(`isDarkModeEnabled: `, isDarkModeEnabled);\n\n if (isDarkModeEnabled) {\n // IOSConfig.UserInterfaceStyle.getUserInterfaceStyle(config);\n // Determine if the user manually defined the userInterfaceStyle incorrectly\n const existing = config.ios?.userInterfaceStyle ?? config.userInterfaceStyle;\n // Add a warning to prevent the dark mode splash screen from not being shown -- this was learned the hard way.\n if (existing && existing !== 'automatic') {\n WarningAggregator.addWarningIOS(\n 'userInterfaceStyle',\n 'The existing `userInterfaceStyle` property is preventing splash screen from working properly. Please remove it or disable dark mode splash screens.'\n );\n }\n // assigning it to auto anyways, but this is fragile because the order of operations matter now\n infoPlist.UIUserInterfaceStyle = 'Automatic';\n } else {\n // NOTE(brentvatne): Commented out this line because it causes https://github.com/expo/expo-cli/issues/3935\n // We should revisit this approach.\n // delete infoPlist.UIUserInterfaceStyle;\n }\n\n if (splash) {\n // TODO: What to do here ??\n infoPlist.UILaunchStoryboardName = 'SplashScreen';\n } else {\n debug(`Disabling UILaunchStoryboardName`);\n delete infoPlist.UILaunchStoryboardName;\n }\n\n return infoPlist;\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAIA,MAAMA,KAAK,GAAG,IAAAC,gBAAA,EAAM,uDAAN,CAAd;;AAEO,MAAMC,sBAAqD,GAAG,CAACC,MAAD,EAASC,MAAT,KAAoB;EACvF,OAAO,IAAAC,8BAAA,EAAcF,MAAd,EAAuBA,MAAD,IAAY;IACvCA,MAAM,CAACG,UAAP,GAAoBC,kBAAkB,CAACJ,MAAD,EAASA,MAAM,CAACG,UAAhB,EAA4BF,MAA5B,CAAtC;IACA,OAAOD,MAAP;EACD,CAHM,CAAP;AAID,CALM;;;;AAOA,SAASI,kBAAT,CACLJ,MADK,EAELK,SAFK,EAGLJ,MAHK,EAIM;EAAA;;EACX,MAAMK,iBAAiB,GAAG,CAAC,EACzBL,MAAM,SAAN,IAAAA,MAAM,WAAN,oBAAAA,MAAM,CAAEM,IAAR,sDAAcC,KAAd,IACAP,MADA,aACAA,MADA,gCACAA,MAAM,CAAEM,IADR,0CACA,cAAcE,WADd,IAEAR,MAFA,aAEAA,MAFA,gCAEAA,MAAM,CAAEM,IAFR,0CAEA,cAAcG,eAFd,IAGAT,MAHA,aAGAA,MAHA,gCAGAA,MAAM,CAAEM,IAHR,0CAGA,cAAcI,qBAJW,CAA3B;EAMAd,KAAK,CAAE,qBAAF,EAAwBS,iBAAxB,CAAL;;EAEA,IAAIA,iBAAJ,EAAuB;IAAA;;IACrB;IACA;IACA,MAAMM,QAAQ,2CAAGZ,MAAM,CAACa,GAAV,gDAAG,YAAYC,kBAAf,yEAAqCd,MAAM,CAACc,kBAA1D,CAHqB,CAIrB;;IACA,IAAIF,QAAQ,IAAIA,QAAQ,KAAK,WAA7B,EAA0C;MACxCG,kCAAA,CAAkBC,aAAlB,CACE,oBADF,EAEE,qJAFF;IAID,CAVoB,CAWrB;;;IACAX,SAAS,CAACY,oBAAV,GAAiC,WAAjC;EACD,CAbD,MAaO,CACL;IACA;IACA;EACD;;EAED,IAAIhB,MAAJ,EAAY;IACV;IACAI,SAAS,CAACa,sBAAV,GAAmC,cAAnC;EACD,CAHD,MAGO;IACLrB,KAAK,CAAE,kCAAF,CAAL;IACA,OAAOQ,SAAS,CAACa,sBAAjB;EACD;;EAED,OAAOb,SAAP;AACD"}
|
|
@@ -55,6 +55,16 @@ function _withIosSplashInfoPlist() {
|
|
|
55
55
|
return data;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
function _withIosSplashScreenStoryboard() {
|
|
59
|
+
const data = require("./withIosSplashScreenStoryboard");
|
|
60
|
+
|
|
61
|
+
_withIosSplashScreenStoryboard = function () {
|
|
62
|
+
return data;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return data;
|
|
66
|
+
}
|
|
67
|
+
|
|
58
68
|
function _withIosSplashXcodeProject() {
|
|
59
69
|
const data = require("./withIosSplashXcodeProject");
|
|
60
70
|
|
|
@@ -65,6 +75,16 @@ function _withIosSplashXcodeProject() {
|
|
|
65
75
|
return data;
|
|
66
76
|
}
|
|
67
77
|
|
|
78
|
+
function _wtihIosSplashScreenStoryboardImage() {
|
|
79
|
+
const data = require("./wtihIosSplashScreenStoryboardImage");
|
|
80
|
+
|
|
81
|
+
_wtihIosSplashScreenStoryboardImage = function () {
|
|
82
|
+
return data;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return data;
|
|
86
|
+
}
|
|
87
|
+
|
|
68
88
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
69
89
|
|
|
70
90
|
const debug = (0, _debug().default)('expo:prebuild-config:expo-splash-screen:ios');
|
|
@@ -80,7 +100,11 @@ const withIosSplashScreen = (config, splash) => {
|
|
|
80
100
|
}
|
|
81
101
|
|
|
82
102
|
debug(`config:`, splash);
|
|
83
|
-
return (0, _configPlugins().withPlugins)(config, [[_withIosSplashInfoPlist().withIosSplashInfoPlist, splash], [_withIosSplashAssets().withIosSplashAssets, splash],
|
|
103
|
+
return (0, _configPlugins().withPlugins)(config, [[_withIosSplashInfoPlist().withIosSplashInfoPlist, splash], [_withIosSplashAssets().withIosSplashAssets, splash], // Add the image settings to the storyboard.
|
|
104
|
+
[_wtihIosSplashScreenStoryboardImage().withIosSplashScreenImage, splash], // Link storyboard to xcode project.
|
|
105
|
+
// TODO: Maybe fold this into the base mod.
|
|
106
|
+
_withIosSplashXcodeProject().withIosSplashXcodeProject, // Insert the base mod last, no other ios.splashScreenStoryboard mods can be added after this.
|
|
107
|
+
_withIosSplashScreenStoryboard().withIosSplashScreenStoryboardBaseMod]);
|
|
84
108
|
};
|
|
85
109
|
|
|
86
110
|
exports.withIosSplashScreen = withIosSplashScreen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withIosSplashScreen.js","names":["debug","Debug","withIosSplashScreen","config","splash","warnUnsupportedSplashProperties","getIosSplashConfig","withPlugins","withIosSplashInfoPlist","withIosSplashAssets","withIosSplashScreenImage","withIosSplashXcodeProject","withIosSplashScreenStoryboardBaseMod"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withIosSplashScreen.ts"],"sourcesContent":["import { ConfigPlugin, withPlugins } from '@expo/config-plugins';\nimport Debug from 'debug';\n\nimport {\n getIosSplashConfig,\n IOSSplashConfig,\n warnUnsupportedSplashProperties,\n} from './getIosSplashConfig';\nimport { withIosSplashAssets } from './withIosSplashAssets';\nimport { withIosSplashInfoPlist } from './withIosSplashInfoPlist';\nimport { withIosSplashScreenStoryboardBaseMod } from './withIosSplashScreenStoryboard';\nimport { withIosSplashXcodeProject } from './withIosSplashXcodeProject';\nimport { withIosSplashScreenImage } from './wtihIosSplashScreenStoryboardImage';\n\nconst debug = Debug('expo:prebuild-config:expo-splash-screen:ios');\n\nexport const withIosSplashScreen: ConfigPlugin<IOSSplashConfig | undefined | null | void> = (\n config,\n splash\n) => {\n // only warn once\n warnUnsupportedSplashProperties(config);\n\n // If the user didn't specify a splash object, infer the splash object from the Expo config.\n if (!splash) {\n splash = getIosSplashConfig(config);\n } else {\n debug(`custom splash config provided`);\n }\n\n debug(`config:`, splash);\n\n return withPlugins(config, [\n [withIosSplashInfoPlist, splash],\n [withIosSplashAssets, splash],\n // Add the image settings to the storyboard.\n [withIosSplashScreenImage, splash],\n // Link storyboard to xcode project.\n // TODO: Maybe fold this into the base mod.\n withIosSplashXcodeProject,\n // Insert the base mod last, no other ios.splashScreenStoryboard mods can be added after this.\n withIosSplashScreenStoryboardBaseMod,\n ]);\n};\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEA,MAAMA,KAAK,GAAG,IAAAC,gBAAA,EAAM,6CAAN,CAAd;;AAEO,MAAMC,mBAA4E,GAAG,CAC1FC,MAD0F,EAE1FC,MAF0F,KAGvF;EACH;EACA,IAAAC,qDAAA,EAAgCF,MAAhC,EAFG,CAIH;;EACA,IAAI,CAACC,MAAL,EAAa;IACXA,MAAM,GAAG,IAAAE,wCAAA,EAAmBH,MAAnB,CAAT;EACD,CAFD,MAEO;IACLH,KAAK,CAAE,+BAAF,CAAL;EACD;;EAEDA,KAAK,CAAE,SAAF,EAAYI,MAAZ,CAAL;EAEA,OAAO,IAAAG,4BAAA,EAAYJ,MAAZ,EAAoB,CACzB,CAACK,gDAAD,EAAyBJ,MAAzB,CADyB,EAEzB,CAACK,0CAAD,EAAsBL,MAAtB,CAFyB,EAGzB;EACA,CAACM,8DAAD,EAA2BN,MAA3B,CAJyB,EAKzB;EACA;EACAO,sDAPyB,EAQzB;EACAC,qEATyB,CAApB,CAAP;AAWD,CA3BM"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConfigPlugin, Mod } from '@expo/config-plugins';
|
|
2
|
+
import { IBSplashScreenDocument } from './InterfaceBuilder';
|
|
3
|
+
export declare const STORYBOARD_FILE_PATH = "./SplashScreen.storyboard";
|
|
4
|
+
/**
|
|
5
|
+
* Provides the SplashScreen `.storyboard` xml data for modification.
|
|
6
|
+
*
|
|
7
|
+
* @param config
|
|
8
|
+
* @param action
|
|
9
|
+
*/
|
|
10
|
+
export declare const withIosSplashScreenStoryboard: ConfigPlugin<Mod<IBSplashScreenDocument>>;
|
|
11
|
+
/** Append a custom rule to supply SplashScreen `.storyboard` xml data to mods on `mods.ios.splashScreenStoryboard` */
|
|
12
|
+
export declare const withIosSplashScreenStoryboardBaseMod: ConfigPlugin;
|
|
13
|
+
/** Get a template splash screen storyboard file. */
|
|
14
|
+
export declare function getTemplateAsync(): Promise<IBSplashScreenDocument>;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.STORYBOARD_FILE_PATH = void 0;
|
|
7
|
+
exports.getTemplateAsync = getTemplateAsync;
|
|
8
|
+
exports.withIosSplashScreenStoryboardBaseMod = exports.withIosSplashScreenStoryboard = void 0;
|
|
9
|
+
|
|
10
|
+
function _configPlugins() {
|
|
11
|
+
const data = require("@expo/config-plugins");
|
|
12
|
+
|
|
13
|
+
_configPlugins = function () {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function fs() {
|
|
21
|
+
const data = _interopRequireWildcard(require("fs"));
|
|
22
|
+
|
|
23
|
+
fs = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function path() {
|
|
31
|
+
const data = _interopRequireWildcard(require("path"));
|
|
32
|
+
|
|
33
|
+
path = function () {
|
|
34
|
+
return data;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function _xml2js() {
|
|
41
|
+
const data = require("xml2js");
|
|
42
|
+
|
|
43
|
+
_xml2js = function () {
|
|
44
|
+
return data;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _InterfaceBuilder() {
|
|
51
|
+
const data = require("./InterfaceBuilder");
|
|
52
|
+
|
|
53
|
+
_InterfaceBuilder = function () {
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
61
|
+
|
|
62
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
63
|
+
|
|
64
|
+
const STORYBOARD_FILE_PATH = './SplashScreen.storyboard';
|
|
65
|
+
exports.STORYBOARD_FILE_PATH = STORYBOARD_FILE_PATH;
|
|
66
|
+
const STORYBOARD_MOD_NAME = 'splashScreenStoryboard';
|
|
67
|
+
/**
|
|
68
|
+
* Provides the SplashScreen `.storyboard` xml data for modification.
|
|
69
|
+
*
|
|
70
|
+
* @param config
|
|
71
|
+
* @param action
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
const withIosSplashScreenStoryboard = (config, action) => {
|
|
75
|
+
return (0, _configPlugins().withMod)(config, {
|
|
76
|
+
platform: 'ios',
|
|
77
|
+
mod: STORYBOARD_MOD_NAME,
|
|
78
|
+
action
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
/** Append a custom rule to supply SplashScreen `.storyboard` xml data to mods on `mods.ios.splashScreenStoryboard` */
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
exports.withIosSplashScreenStoryboard = withIosSplashScreenStoryboard;
|
|
85
|
+
|
|
86
|
+
const withIosSplashScreenStoryboardBaseMod = config => {
|
|
87
|
+
return _configPlugins().BaseMods.withGeneratedBaseMods(config, {
|
|
88
|
+
platform: 'ios',
|
|
89
|
+
saveToInternal: true,
|
|
90
|
+
skipEmptyMod: false,
|
|
91
|
+
providers: {
|
|
92
|
+
// Append a custom rule to supply .storyboard xml data to mods on `mods.ios.splashScreenStoryboard`
|
|
93
|
+
[STORYBOARD_MOD_NAME]: _configPlugins().BaseMods.provider({
|
|
94
|
+
isIntrospective: true,
|
|
95
|
+
|
|
96
|
+
async getFilePath({
|
|
97
|
+
modRequest
|
|
98
|
+
}) {
|
|
99
|
+
//: [root]/myapp/ios/MyApp/SplashScreen.storyboard
|
|
100
|
+
return path().join( //: myapp/ios
|
|
101
|
+
modRequest.platformProjectRoot, // ./MyApp
|
|
102
|
+
modRequest.projectName, // ./SplashScreen.storyboard
|
|
103
|
+
STORYBOARD_FILE_PATH);
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
async read(filePath) {
|
|
107
|
+
try {
|
|
108
|
+
const contents = await fs().promises.readFile(filePath, 'utf8');
|
|
109
|
+
const xml = await new (_xml2js().Parser)().parseStringPromise(contents);
|
|
110
|
+
return xml;
|
|
111
|
+
} catch {
|
|
112
|
+
return getTemplateAsync();
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
async write(filePath, {
|
|
117
|
+
modResults,
|
|
118
|
+
modRequest: {
|
|
119
|
+
introspect
|
|
120
|
+
}
|
|
121
|
+
}) {
|
|
122
|
+
if (introspect) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
await fs().promises.writeFile(filePath, (0, _InterfaceBuilder().toString)(modResults));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
/** Get a template splash screen storyboard file. */
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
exports.withIosSplashScreenStoryboardBaseMod = withIosSplashScreenStoryboardBaseMod;
|
|
137
|
+
|
|
138
|
+
async function getTemplateAsync() {
|
|
139
|
+
const contents = `<?xml version="1.0" encoding="UTF-8"?>
|
|
140
|
+
<document
|
|
141
|
+
type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
|
|
142
|
+
version="3.0"
|
|
143
|
+
toolsVersion="16096"
|
|
144
|
+
targetRuntime="iOS.CocoaTouch"
|
|
145
|
+
propertyAccessControl="none"
|
|
146
|
+
useAutolayout="YES"
|
|
147
|
+
launchScreen="YES"
|
|
148
|
+
useTraitCollections="YES"
|
|
149
|
+
useSafeAreas="YES"
|
|
150
|
+
colorMatched="YES"
|
|
151
|
+
initialViewController="EXPO-VIEWCONTROLLER-1"
|
|
152
|
+
>
|
|
153
|
+
<dependencies>
|
|
154
|
+
<deployment identifier="iOS"/>
|
|
155
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
|
156
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
157
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
158
|
+
</dependencies>
|
|
159
|
+
<scenes>
|
|
160
|
+
<scene sceneID="EXPO-SCENE-1">
|
|
161
|
+
<objects>
|
|
162
|
+
<viewController
|
|
163
|
+
storyboardIdentifier="SplashScreenViewController"
|
|
164
|
+
id="EXPO-VIEWCONTROLLER-1"
|
|
165
|
+
sceneMemberID="viewController"
|
|
166
|
+
>
|
|
167
|
+
<view
|
|
168
|
+
key="view"
|
|
169
|
+
userInteractionEnabled="NO"
|
|
170
|
+
contentMode="scaleToFill"
|
|
171
|
+
insetsLayoutMarginsFromSafeArea="NO"
|
|
172
|
+
id="EXPO-ContainerView"
|
|
173
|
+
userLabel="ContainerView"
|
|
174
|
+
>
|
|
175
|
+
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
|
176
|
+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
177
|
+
<subviews>
|
|
178
|
+
<imageView
|
|
179
|
+
userInteractionEnabled="NO"
|
|
180
|
+
contentMode="scaleAspectFill"
|
|
181
|
+
horizontalHuggingPriority="251"
|
|
182
|
+
verticalHuggingPriority="251"
|
|
183
|
+
insetsLayoutMarginsFromSafeArea="NO"
|
|
184
|
+
image="SplashScreenBackground"
|
|
185
|
+
translatesAutoresizingMaskIntoConstraints="NO"
|
|
186
|
+
id="EXPO-SplashScreenBackground"
|
|
187
|
+
userLabel="SplashScreenBackground"
|
|
188
|
+
>
|
|
189
|
+
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
|
190
|
+
</imageView>
|
|
191
|
+
</subviews>
|
|
192
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
193
|
+
<constraints>
|
|
194
|
+
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="1gX-mQ-vu6"/>
|
|
195
|
+
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="6tX-OG-Sck"/>
|
|
196
|
+
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="ABX-8g-7v4"/>
|
|
197
|
+
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="jkI-2V-eW5"/>
|
|
198
|
+
</constraints>
|
|
199
|
+
<viewLayoutGuide key="safeArea" id="EXPO-SafeArea"/>
|
|
200
|
+
</view>
|
|
201
|
+
</viewController>
|
|
202
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="EXPO-PLACEHOLDER-1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
203
|
+
</objects>
|
|
204
|
+
</scene>
|
|
205
|
+
</scenes>
|
|
206
|
+
<resources>
|
|
207
|
+
<image name="SplashScreenBackground" width="1" height="1"/>
|
|
208
|
+
</resources>
|
|
209
|
+
</document>`;
|
|
210
|
+
return await new (_xml2js().Parser)().parseStringPromise(contents);
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=withIosSplashScreenStoryboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withIosSplashScreenStoryboard.js","names":["STORYBOARD_FILE_PATH","STORYBOARD_MOD_NAME","withIosSplashScreenStoryboard","config","action","withMod","platform","mod","withIosSplashScreenStoryboardBaseMod","BaseMods","withGeneratedBaseMods","saveToInternal","skipEmptyMod","providers","provider","isIntrospective","getFilePath","modRequest","path","join","platformProjectRoot","projectName","read","filePath","contents","fs","promises","readFile","xml","Parser","parseStringPromise","getTemplateAsync","write","modResults","introspect","writeFile","toString"],"sources":["../../../../src/plugins/unversioned/expo-splash-screen/withIosSplashScreenStoryboard.ts"],"sourcesContent":["import { BaseMods, ConfigPlugin, Mod, withMod } from '@expo/config-plugins';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { Parser } from 'xml2js';\n\nimport { IBSplashScreenDocument, toString } from './InterfaceBuilder';\n\nexport const STORYBOARD_FILE_PATH = './SplashScreen.storyboard';\n\nconst STORYBOARD_MOD_NAME = 'splashScreenStoryboard';\n\n/**\n * Provides the SplashScreen `.storyboard` xml data for modification.\n *\n * @param config\n * @param action\n */\nexport const withIosSplashScreenStoryboard: ConfigPlugin<Mod<IBSplashScreenDocument>> = (\n config,\n action\n) => {\n return withMod(config, {\n platform: 'ios',\n mod: STORYBOARD_MOD_NAME,\n action,\n });\n};\n\n/** Append a custom rule to supply SplashScreen `.storyboard` xml data to mods on `mods.ios.splashScreenStoryboard` */\nexport const withIosSplashScreenStoryboardBaseMod: ConfigPlugin = (config) => {\n return BaseMods.withGeneratedBaseMods(config, {\n platform: 'ios',\n saveToInternal: true,\n skipEmptyMod: false,\n providers: {\n // Append a custom rule to supply .storyboard xml data to mods on `mods.ios.splashScreenStoryboard`\n [STORYBOARD_MOD_NAME]: BaseMods.provider<IBSplashScreenDocument>({\n isIntrospective: true,\n async getFilePath({ modRequest }) {\n //: [root]/myapp/ios/MyApp/SplashScreen.storyboard\n return path.join(\n //: myapp/ios\n modRequest.platformProjectRoot,\n // ./MyApp\n modRequest.projectName!,\n // ./SplashScreen.storyboard\n STORYBOARD_FILE_PATH\n );\n },\n async read(filePath) {\n try {\n const contents = await fs.promises.readFile(filePath, 'utf8');\n const xml = await new Parser().parseStringPromise(contents);\n return xml;\n } catch {\n return getTemplateAsync();\n }\n },\n async write(filePath, { modResults, modRequest: { introspect } }) {\n if (introspect) {\n return;\n }\n await fs.promises.writeFile(filePath, toString(modResults));\n },\n }),\n },\n });\n};\n\n/** Get a template splash screen storyboard file. */\nexport async function getTemplateAsync(): Promise<IBSplashScreenDocument> {\n const contents = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <document\n type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\"\n version=\"3.0\"\n toolsVersion=\"16096\"\n targetRuntime=\"iOS.CocoaTouch\"\n propertyAccessControl=\"none\"\n useAutolayout=\"YES\"\n launchScreen=\"YES\"\n useTraitCollections=\"YES\"\n useSafeAreas=\"YES\"\n colorMatched=\"YES\"\n initialViewController=\"EXPO-VIEWCONTROLLER-1\"\n >\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"16087\"/>\n <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"EXPO-SCENE-1\">\n <objects>\n <viewController\n storyboardIdentifier=\"SplashScreenViewController\"\n id=\"EXPO-VIEWCONTROLLER-1\"\n sceneMemberID=\"viewController\"\n >\n <view\n key=\"view\"\n userInteractionEnabled=\"NO\"\n contentMode=\"scaleToFill\"\n insetsLayoutMarginsFromSafeArea=\"NO\"\n id=\"EXPO-ContainerView\"\n userLabel=\"ContainerView\"\n >\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n <subviews>\n <imageView\n userInteractionEnabled=\"NO\"\n contentMode=\"scaleAspectFill\"\n horizontalHuggingPriority=\"251\"\n verticalHuggingPriority=\"251\"\n insetsLayoutMarginsFromSafeArea=\"NO\"\n image=\"SplashScreenBackground\"\n translatesAutoresizingMaskIntoConstraints=\"NO\"\n id=\"EXPO-SplashScreenBackground\"\n userLabel=\"SplashScreenBackground\"\n >\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n </imageView>\n </subviews>\n <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n <constraints>\n <constraint firstItem=\"EXPO-SplashScreenBackground\" firstAttribute=\"top\" secondItem=\"EXPO-ContainerView\" secondAttribute=\"top\" id=\"1gX-mQ-vu6\"/>\n <constraint firstItem=\"EXPO-SplashScreenBackground\" firstAttribute=\"leading\" secondItem=\"EXPO-ContainerView\" secondAttribute=\"leading\" id=\"6tX-OG-Sck\"/>\n <constraint firstItem=\"EXPO-SplashScreenBackground\" firstAttribute=\"trailing\" secondItem=\"EXPO-ContainerView\" secondAttribute=\"trailing\" id=\"ABX-8g-7v4\"/>\n <constraint firstItem=\"EXPO-SplashScreenBackground\" firstAttribute=\"bottom\" secondItem=\"EXPO-ContainerView\" secondAttribute=\"bottom\" id=\"jkI-2V-eW5\"/>\n </constraints>\n <viewLayoutGuide key=\"safeArea\" id=\"EXPO-SafeArea\"/>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"EXPO-PLACEHOLDER-1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"SplashScreenBackground\" width=\"1\" height=\"1\"/>\n </resources>\n </document>`;\n return await new Parser().parseStringPromise(contents);\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;;;AAEO,MAAMA,oBAAoB,GAAG,2BAA7B;;AAEP,MAAMC,mBAAmB,GAAG,wBAA5B;AAEA;AACA;AACA;AACA;AACA;AACA;;AACO,MAAMC,6BAAwE,GAAG,CACtFC,MADsF,EAEtFC,MAFsF,KAGnF;EACH,OAAO,IAAAC,wBAAA,EAAQF,MAAR,EAAgB;IACrBG,QAAQ,EAAE,KADW;IAErBC,GAAG,EAAEN,mBAFgB;IAGrBG;EAHqB,CAAhB,CAAP;AAKD,CATM;AAWP;;;;;AACO,MAAMI,oCAAkD,GAAIL,MAAD,IAAY;EAC5E,OAAOM,yBAAA,CAASC,qBAAT,CAA+BP,MAA/B,EAAuC;IAC5CG,QAAQ,EAAE,KADkC;IAE5CK,cAAc,EAAE,IAF4B;IAG5CC,YAAY,EAAE,KAH8B;IAI5CC,SAAS,EAAE;MACT;MACA,CAACZ,mBAAD,GAAuBQ,yBAAA,CAASK,QAAT,CAA0C;QAC/DC,eAAe,EAAE,IAD8C;;QAE/D,MAAMC,WAAN,CAAkB;UAAEC;QAAF,CAAlB,EAAkC;UAChC;UACA,OAAOC,IAAI,GAACC,IAAL,EACL;UACAF,UAAU,CAACG,mBAFN,EAGL;UACAH,UAAU,CAACI,WAJN,EAKL;UACArB,oBANK,CAAP;QAQD,CAZ8D;;QAa/D,MAAMsB,IAAN,CAAWC,QAAX,EAAqB;UACnB,IAAI;YACF,MAAMC,QAAQ,GAAG,MAAMC,EAAE,GAACC,QAAH,CAAYC,QAAZ,CAAqBJ,QAArB,EAA+B,MAA/B,CAAvB;YACA,MAAMK,GAAG,GAAG,MAAM,KAAIC,gBAAJ,IAAaC,kBAAb,CAAgCN,QAAhC,CAAlB;YACA,OAAOI,GAAP;UACD,CAJD,CAIE,MAAM;YACN,OAAOG,gBAAgB,EAAvB;UACD;QACF,CArB8D;;QAsB/D,MAAMC,KAAN,CAAYT,QAAZ,EAAsB;UAAEU,UAAF;UAAchB,UAAU,EAAE;YAAEiB;UAAF;QAA1B,CAAtB,EAAkE;UAChE,IAAIA,UAAJ,EAAgB;YACd;UACD;;UACD,MAAMT,EAAE,GAACC,QAAH,CAAYS,SAAZ,CAAsBZ,QAAtB,EAAgC,IAAAa,4BAAA,EAASH,UAAT,CAAhC,CAAN;QACD;;MA3B8D,CAA1C;IAFd;EAJiC,CAAvC,CAAP;AAqCD,CAtCM;AAwCP;;;;;AACO,eAAeF,gBAAf,GAAmE;EACxE,MAAMP,QAAQ,GAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAtEE;EAuEA,OAAO,MAAM,KAAIK,gBAAJ,IAAaC,kBAAb,CAAgCN,QAAhC,CAAb;AACD"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
2
|
import { XcodeProject } from 'xcode';
|
|
3
|
-
|
|
4
|
-
export declare const withIosSplashXcodeProject: ConfigPlugin<IOSSplashConfig>;
|
|
3
|
+
export declare const withIosSplashXcodeProject: ConfigPlugin;
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* Modifies `.pbxproj` by:
|
|
6
|
+
* - adding reference for `.storyboard` file
|
|
7
7
|
*/
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function setSplashStoryboardAsync({ projectPath, projectName, project, }: {
|
|
10
|
-
projectPath: string;
|
|
8
|
+
export declare function setSplashStoryboardAsync({ projectName, project, }: {
|
|
11
9
|
projectName: string;
|
|
12
10
|
project: XcodeProject;
|
|
13
|
-
}
|
|
11
|
+
}): Promise<XcodeProject>;
|