@expo/prebuild-config 3.0.3 → 3.0.8

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.
Files changed (56) hide show
  1. package/build/getPrebuildConfig.d.ts +3 -10
  2. package/build/getPrebuildConfig.js +6 -1
  3. package/build/getPrebuildConfig.js.map +1 -1
  4. package/build/index.d.ts +1 -1
  5. package/build/index.js +3 -3
  6. package/build/index.js.map +1 -1
  7. package/build/plugins/icons/withAndroidIcons.js +5 -3
  8. package/build/plugins/icons/withAndroidIcons.js.map +1 -1
  9. package/build/plugins/icons/withIosIcons.js +2 -1
  10. package/build/plugins/icons/withIosIcons.js.map +1 -1
  11. package/build/plugins/unversioned/createLegacyPlugin.js +13 -2
  12. package/build/plugins/unversioned/createLegacyPlugin.js.map +1 -1
  13. package/build/plugins/unversioned/expo-facebook/withAndroidFacebook.js +3 -3
  14. package/build/plugins/unversioned/expo-facebook/withIosFacebook.js +8 -8
  15. package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.d.ts +2 -0
  16. package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.js +35 -0
  17. package/build/plugins/unversioned/expo-navigation-bar/expo-navigation-bar.js.map +1 -0
  18. package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.d.ts +8 -0
  19. package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.js +100 -0
  20. package/build/plugins/unversioned/expo-navigation-bar/withAndroidNavigationBar.js.map +1 -0
  21. package/build/plugins/unversioned/expo-notifications/expo-notifications.d.ts +1 -2
  22. package/build/plugins/unversioned/expo-notifications/expo-notifications.js +1 -19
  23. package/build/plugins/unversioned/expo-notifications/expo-notifications.js.map +1 -1
  24. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js +4 -3
  25. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js.map +1 -1
  26. package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js +11 -4
  27. package/build/plugins/unversioned/expo-splash-screen/InterfaceBuilder.js.map +1 -1
  28. package/build/plugins/unversioned/expo-splash-screen/getAndroidSplashConfig.js +1 -1
  29. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js +30 -17
  30. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js.map +1 -1
  31. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashStyles.js +2 -2
  32. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js +38 -11
  33. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js.map +1 -1
  34. package/build/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.js +3 -2
  35. package/build/plugins/unversioned/expo-splash-screen/withIosSplashInfoPlist.js.map +1 -1
  36. package/build/plugins/unversioned/expo-system-ui/expo-system-ui.d.ts +2 -0
  37. package/build/plugins/unversioned/expo-system-ui/expo-system-ui.js +64 -0
  38. package/build/plugins/unversioned/expo-system-ui/expo-system-ui.js.map +1 -0
  39. package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.d.ts +6 -0
  40. package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.js +70 -0
  41. package/build/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.js.map +1 -0
  42. package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.d.ts +2 -0
  43. package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.js +34 -0
  44. package/build/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.js.map +1 -0
  45. package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.d.ts +8 -0
  46. package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.js +109 -0
  47. package/build/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.js.map +1 -0
  48. package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.d.ts +5 -0
  49. package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js +65 -0
  50. package/build/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.js.map +1 -0
  51. package/build/plugins/unversioned/expo-updates.js +1 -1
  52. package/build/plugins/unversioned/react-native-maps.js +8 -5
  53. package/build/plugins/unversioned/react-native-maps.js.map +1 -1
  54. package/build/plugins/withDefaultPlugins.js +30 -8
  55. package/build/plugins/withDefaultPlugins.js.map +1 -1
  56. package/package.json +11 -9
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ function _createLegacyPlugin() {
9
+ const data = require("../createLegacyPlugin");
10
+
11
+ _createLegacyPlugin = function () {
12
+ return data;
13
+ };
14
+
15
+ return data;
16
+ }
17
+
18
+ function _withAndroidRootViewBackgroundColor() {
19
+ const data = require("./withAndroidRootViewBackgroundColor");
20
+
21
+ _withAndroidRootViewBackgroundColor = function () {
22
+ return data;
23
+ };
24
+
25
+ return data;
26
+ }
27
+
28
+ function _withAndroidUserInterfaceStyle() {
29
+ const data = require("./withAndroidUserInterfaceStyle");
30
+
31
+ _withAndroidUserInterfaceStyle = function () {
32
+ return data;
33
+ };
34
+
35
+ return data;
36
+ }
37
+
38
+ function _withIosRootViewBackgroundColor() {
39
+ const data = require("./withIosRootViewBackgroundColor");
40
+
41
+ _withIosRootViewBackgroundColor = function () {
42
+ return data;
43
+ };
44
+
45
+ return data;
46
+ }
47
+
48
+ function _withIosUserInterfaceStyle() {
49
+ const data = require("./withIosUserInterfaceStyle");
50
+
51
+ _withIosUserInterfaceStyle = function () {
52
+ return data;
53
+ };
54
+
55
+ return data;
56
+ }
57
+
58
+ var _default = (0, _createLegacyPlugin().createLegacyPlugin)({
59
+ packageName: 'expo-system-ui',
60
+ fallback: [_withAndroidRootViewBackgroundColor().withAndroidRootViewBackgroundColor, _withIosRootViewBackgroundColor().withIosRootViewBackgroundColor, _withAndroidUserInterfaceStyle().withAndroidUserInterfaceStyle, _withIosUserInterfaceStyle().withIosUserInterfaceStyle]
61
+ });
62
+
63
+ exports.default = _default;
64
+ //# sourceMappingURL=expo-system-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/plugins/unversioned/expo-system-ui/expo-system-ui.ts"],"names":["packageName","fallback","withAndroidRootViewBackgroundColor","withIosRootViewBackgroundColor","withAndroidUserInterfaceStyle","withIosUserInterfaceStyle"],"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;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;eAEe,8CAAmB;AAChCA,EAAAA,WAAW,EAAE,gBADmB;AAEhCC,EAAAA,QAAQ,EAAE,CACRC,wEADQ,EAERC,gEAFQ,EAGRC,8DAHQ,EAIRC,sDAJQ;AAFsB,CAAnB,C","sourcesContent":["import { createLegacyPlugin } from '../createLegacyPlugin';\nimport { withAndroidRootViewBackgroundColor } from './withAndroidRootViewBackgroundColor';\nimport { withAndroidUserInterfaceStyle } from './withAndroidUserInterfaceStyle';\nimport { withIosRootViewBackgroundColor } from './withIosRootViewBackgroundColor';\nimport { withIosUserInterfaceStyle } from './withIosUserInterfaceStyle';\n\nexport default createLegacyPlugin({\n packageName: 'expo-system-ui',\n fallback: [\n withAndroidRootViewBackgroundColor,\n withIosRootViewBackgroundColor,\n withAndroidUserInterfaceStyle,\n withIosUserInterfaceStyle,\n ],\n});\n"],"file":"expo-system-ui.js"}
@@ -0,0 +1,6 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ import { ExpoConfig } from '@expo/config-types';
3
+ export declare const withAndroidRootViewBackgroundColor: ConfigPlugin;
4
+ export declare const withRootViewBackgroundColorColors: ConfigPlugin;
5
+ export declare const withRootViewBackgroundColorStyles: ConfigPlugin;
6
+ export declare function getRootViewBackgroundColor(config: Pick<ExpoConfig, 'android' | 'backgroundColor'>): string | null;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getRootViewBackgroundColor = getRootViewBackgroundColor;
7
+ exports.withRootViewBackgroundColorStyles = exports.withRootViewBackgroundColorColors = exports.withAndroidRootViewBackgroundColor = void 0;
8
+
9
+ function _configPlugins() {
10
+ const data = require("@expo/config-plugins");
11
+
12
+ _configPlugins = function () {
13
+ return data;
14
+ };
15
+
16
+ return data;
17
+ }
18
+
19
+ const {
20
+ assignColorValue
21
+ } = _configPlugins().AndroidConfig.Colors;
22
+
23
+ const {
24
+ assignStylesValue,
25
+ getAppThemeLightNoActionBarGroup
26
+ } = _configPlugins().AndroidConfig.Styles;
27
+
28
+ const ANDROID_WINDOW_BACKGROUND = 'android:windowBackground';
29
+ const WINDOW_BACKGROUND_COLOR = 'activityBackground';
30
+
31
+ const withAndroidRootViewBackgroundColor = config => {
32
+ config = withRootViewBackgroundColorColors(config);
33
+ config = withRootViewBackgroundColorStyles(config);
34
+ return config;
35
+ };
36
+
37
+ exports.withAndroidRootViewBackgroundColor = withAndroidRootViewBackgroundColor;
38
+
39
+ const withRootViewBackgroundColorColors = config => {
40
+ return (0, _configPlugins().withAndroidColors)(config, async config => {
41
+ config.modResults = assignColorValue(config.modResults, {
42
+ value: getRootViewBackgroundColor(config),
43
+ name: WINDOW_BACKGROUND_COLOR
44
+ });
45
+ return config;
46
+ });
47
+ };
48
+
49
+ exports.withRootViewBackgroundColorColors = withRootViewBackgroundColorColors;
50
+
51
+ const withRootViewBackgroundColorStyles = config => {
52
+ return (0, _configPlugins().withAndroidStyles)(config, async config => {
53
+ config.modResults = assignStylesValue(config.modResults, {
54
+ add: !!getRootViewBackgroundColor(config),
55
+ parent: getAppThemeLightNoActionBarGroup(),
56
+ name: ANDROID_WINDOW_BACKGROUND,
57
+ value: `@color/${WINDOW_BACKGROUND_COLOR}`
58
+ });
59
+ return config;
60
+ });
61
+ };
62
+
63
+ exports.withRootViewBackgroundColorStyles = withRootViewBackgroundColorStyles;
64
+
65
+ function getRootViewBackgroundColor(config) {
66
+ var _config$android;
67
+
68
+ return ((_config$android = config.android) === null || _config$android === void 0 ? void 0 : _config$android.backgroundColor) || config.backgroundColor || null;
69
+ }
70
+ //# sourceMappingURL=withAndroidRootViewBackgroundColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/plugins/unversioned/expo-system-ui/withAndroidRootViewBackgroundColor.ts"],"names":["assignColorValue","AndroidConfig","Colors","assignStylesValue","getAppThemeLightNoActionBarGroup","Styles","ANDROID_WINDOW_BACKGROUND","WINDOW_BACKGROUND_COLOR","withAndroidRootViewBackgroundColor","config","withRootViewBackgroundColorColors","withRootViewBackgroundColorStyles","modResults","value","getRootViewBackgroundColor","name","add","parent","android","backgroundColor"],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAQA,MAAM;AAAEA,EAAAA;AAAF,IAAuBC,+BAAcC,MAA3C;;AACA,MAAM;AAAEC,EAAAA,iBAAF;AAAqBC,EAAAA;AAArB,IAA0DH,+BAAcI,MAA9E;;AAEA,MAAMC,yBAAyB,GAAG,0BAAlC;AACA,MAAMC,uBAAuB,GAAG,oBAAhC;;AAEO,MAAMC,kCAAgD,GAAGC,MAAM,IAAI;AACxEA,EAAAA,MAAM,GAAGC,iCAAiC,CAACD,MAAD,CAA1C;AACAA,EAAAA,MAAM,GAAGE,iCAAiC,CAACF,MAAD,CAA1C;AACA,SAAOA,MAAP;AACD,CAJM;;;;AAMA,MAAMC,iCAA+C,GAAGD,MAAM,IAAI;AACvE,SAAO,wCAAkBA,MAAlB,EAA0B,MAAMA,MAAN,IAAgB;AAC/CA,IAAAA,MAAM,CAACG,UAAP,GAAoBZ,gBAAgB,CAACS,MAAM,CAACG,UAAR,EAAoB;AACtDC,MAAAA,KAAK,EAAEC,0BAA0B,CAACL,MAAD,CADqB;AAEtDM,MAAAA,IAAI,EAAER;AAFgD,KAApB,CAApC;AAIA,WAAOE,MAAP;AACD,GANM,CAAP;AAOD,CARM;;;;AAUA,MAAME,iCAA+C,GAAGF,MAAM,IAAI;AACvE,SAAO,wCAAkBA,MAAlB,EAA0B,MAAMA,MAAN,IAAgB;AAC/CA,IAAAA,MAAM,CAACG,UAAP,GAAoBT,iBAAiB,CAACM,MAAM,CAACG,UAAR,EAAoB;AACvDI,MAAAA,GAAG,EAAE,CAAC,CAACF,0BAA0B,CAACL,MAAD,CADsB;AAEvDQ,MAAAA,MAAM,EAAEb,gCAAgC,EAFe;AAGvDW,MAAAA,IAAI,EAAET,yBAHiD;AAIvDO,MAAAA,KAAK,EAAG,UAASN,uBAAwB;AAJc,KAApB,CAArC;AAMA,WAAOE,MAAP;AACD,GARM,CAAP;AASD,CAVM;;;;AAYA,SAASK,0BAAT,CACLL,MADK,EAEL;AAAA;;AACA,SAAO,oBAAAA,MAAM,CAACS,OAAP,oEAAgBC,eAAhB,KAAmCV,MAAM,CAACU,eAA1C,IAA6D,IAApE;AACD","sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n withAndroidColors,\n withAndroidStyles,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nconst { assignColorValue } = AndroidConfig.Colors;\nconst { assignStylesValue, getAppThemeLightNoActionBarGroup } = AndroidConfig.Styles;\n\nconst ANDROID_WINDOW_BACKGROUND = 'android:windowBackground';\nconst WINDOW_BACKGROUND_COLOR = 'activityBackground';\n\nexport const withAndroidRootViewBackgroundColor: ConfigPlugin = config => {\n config = withRootViewBackgroundColorColors(config);\n config = withRootViewBackgroundColorStyles(config);\n return config;\n};\n\nexport const withRootViewBackgroundColorColors: ConfigPlugin = config => {\n return withAndroidColors(config, async config => {\n config.modResults = assignColorValue(config.modResults, {\n value: getRootViewBackgroundColor(config),\n name: WINDOW_BACKGROUND_COLOR,\n });\n return config;\n });\n};\n\nexport const withRootViewBackgroundColorStyles: ConfigPlugin = config => {\n return withAndroidStyles(config, async config => {\n config.modResults = assignStylesValue(config.modResults, {\n add: !!getRootViewBackgroundColor(config),\n parent: getAppThemeLightNoActionBarGroup(),\n name: ANDROID_WINDOW_BACKGROUND,\n value: `@color/${WINDOW_BACKGROUND_COLOR}`,\n });\n return config;\n });\n};\n\nexport function getRootViewBackgroundColor(\n config: Pick<ExpoConfig, 'android' | 'backgroundColor'>\n) {\n return config.android?.backgroundColor || config.backgroundColor || null;\n}\n"],"file":"withAndroidRootViewBackgroundColor.js"}
@@ -0,0 +1,2 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ export declare const withAndroidUserInterfaceStyle: ConfigPlugin<void>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.withAndroidUserInterfaceStyle = void 0;
7
+
8
+ function _configPlugins() {
9
+ const data = require("@expo/config-plugins");
10
+
11
+ _configPlugins = function () {
12
+ return data;
13
+ };
14
+
15
+ return data;
16
+ }
17
+
18
+ const withAndroidUserInterfaceStyle = config => {
19
+ return (0, _configPlugins().withStringsXml)(config, config => {
20
+ var _config$android$userI, _config$android;
21
+
22
+ const userInterfaceStyle = (_config$android$userI = (_config$android = config.android) === null || _config$android === void 0 ? void 0 : _config$android.userInterfaceStyle) !== null && _config$android$userI !== void 0 ? _config$android$userI : config.userInterfaceStyle;
23
+
24
+ if (userInterfaceStyle) {
25
+ _configPlugins().WarningAggregator.addWarningAndroid('userInterfaceStyle', // TODO: Maybe warn that they need a certain version of React Native as well?
26
+ 'Install expo-system-ui in your project to enable this feature.');
27
+ }
28
+
29
+ return config;
30
+ });
31
+ };
32
+
33
+ exports.withAndroidUserInterfaceStyle = withAndroidUserInterfaceStyle;
34
+ //# sourceMappingURL=withAndroidUserInterfaceStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/plugins/unversioned/expo-system-ui/withAndroidUserInterfaceStyle.ts"],"names":["withAndroidUserInterfaceStyle","config","userInterfaceStyle","android","WarningAggregator","addWarningAndroid"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,6BAAiD,GAAGC,MAAM,IAAI;AACzE,SAAO,qCAAeA,MAAf,EAAuBA,MAAM,IAAI;AAAA;;AACtC,UAAMC,kBAAkB,+CAAGD,MAAM,CAACE,OAAV,oDAAG,gBAAgBD,kBAAnB,yEAAyCD,MAAM,CAACC,kBAAxE;;AACA,QAAIA,kBAAJ,EAAwB;AACtBE,yCAAkBC,iBAAlB,CACE,oBADF,EAEE;AACA,sEAHF;AAKD;;AAED,WAAOJ,MAAP;AACD,GAXM,CAAP;AAYD,CAbM","sourcesContent":["import { ConfigPlugin, WarningAggregator, withStringsXml } from '@expo/config-plugins';\n\nexport const withAndroidUserInterfaceStyle: ConfigPlugin<void> = config => {\n return withStringsXml(config, config => {\n const userInterfaceStyle = config.android?.userInterfaceStyle ?? config.userInterfaceStyle;\n if (userInterfaceStyle) {\n WarningAggregator.addWarningAndroid(\n 'userInterfaceStyle',\n // TODO: Maybe warn that they need a certain version of React Native as well?\n 'Install expo-system-ui in your project to enable this feature.'\n );\n }\n\n return config;\n });\n};\n"],"file":"withAndroidUserInterfaceStyle.js"}
@@ -0,0 +1,8 @@
1
+ import { ConfigPlugin, InfoPlist } from '@expo/config-plugins';
2
+ import { ExpoConfig } from '@expo/config-types';
3
+ export declare const withIosRootViewBackgroundColor: ConfigPlugin;
4
+ /** The template was changed in SDK 43 to move the background color logic to the `expo-system-ui` module */
5
+ export declare function shouldUseLegacyBehavior(config: Pick<ExpoConfig, 'sdkVersion'>): boolean;
6
+ export declare function warnSystemUIMissing(config: Pick<ExpoConfig, 'sdkVersion' | 'backgroundColor' | 'ios'>): void;
7
+ export declare function setRootViewBackgroundColor(config: Pick<ExpoConfig, 'backgroundColor' | 'ios'>, infoPlist: InfoPlist): InfoPlist;
8
+ export declare function getRootViewBackgroundColor(config: Pick<ExpoConfig, 'ios' | 'backgroundColor'>): string | null;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getRootViewBackgroundColor = getRootViewBackgroundColor;
7
+ exports.setRootViewBackgroundColor = setRootViewBackgroundColor;
8
+ exports.shouldUseLegacyBehavior = shouldUseLegacyBehavior;
9
+ exports.warnSystemUIMissing = warnSystemUIMissing;
10
+ exports.withIosRootViewBackgroundColor = void 0;
11
+
12
+ function _configPlugins() {
13
+ const data = require("@expo/config-plugins");
14
+
15
+ _configPlugins = function () {
16
+ return data;
17
+ };
18
+
19
+ return data;
20
+ }
21
+
22
+ function _normalizeColor() {
23
+ const data = _interopRequireDefault(require("@react-native/normalize-color"));
24
+
25
+ _normalizeColor = function () {
26
+ return data;
27
+ };
28
+
29
+ return data;
30
+ }
31
+
32
+ function _semver() {
33
+ const data = _interopRequireDefault(require("semver"));
34
+
35
+ _semver = function () {
36
+ return data;
37
+ };
38
+
39
+ return data;
40
+ }
41
+
42
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
+
44
+ // @ts-ignore: uses flow
45
+ // Maps to the template AppDelegate.m
46
+ const BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';
47
+
48
+ const debug = require('debug')('expo:system-ui:plugin:ios');
49
+
50
+ const withIosRootViewBackgroundColor = config => {
51
+ config = (0, _configPlugins().withInfoPlist)(config, config => {
52
+ if (shouldUseLegacyBehavior(config)) {
53
+ config.modResults = setRootViewBackgroundColor(config, config.modResults);
54
+ } else {
55
+ warnSystemUIMissing(config);
56
+ }
57
+
58
+ return config;
59
+ });
60
+ return config;
61
+ };
62
+ /** The template was changed in SDK 43 to move the background color logic to the `expo-system-ui` module */
63
+
64
+
65
+ exports.withIosRootViewBackgroundColor = withIosRootViewBackgroundColor;
66
+
67
+ function shouldUseLegacyBehavior(config) {
68
+ try {
69
+ return !!(config.sdkVersion && _semver().default.lt(config.sdkVersion, '44.0.0'));
70
+ } catch {}
71
+
72
+ return false;
73
+ }
74
+
75
+ function warnSystemUIMissing(config) {
76
+ const backgroundColor = getRootViewBackgroundColor(config);
77
+
78
+ if (backgroundColor) {
79
+ // Background color needs to be set programmatically
80
+ _configPlugins().WarningAggregator.addWarningIOS('ios.backgroundColor', 'Install expo-system-ui to enable this feature', 'https://docs.expo.dev/build-reference/migrating/#expo-config--backgroundcolor--depends-on');
81
+ }
82
+ }
83
+
84
+ function setRootViewBackgroundColor(config, infoPlist) {
85
+ const backgroundColor = getRootViewBackgroundColor(config);
86
+
87
+ if (!backgroundColor) {
88
+ delete infoPlist[BACKGROUND_COLOR_KEY];
89
+ } else {
90
+ let color = (0, _normalizeColor().default)(backgroundColor);
91
+
92
+ if (!color) {
93
+ throw new Error('Invalid background color on iOS');
94
+ }
95
+
96
+ color = (color << 24 | color >>> 8) >>> 0;
97
+ infoPlist[BACKGROUND_COLOR_KEY] = color;
98
+ debug(`Convert color: ${backgroundColor} -> ${color}`);
99
+ }
100
+
101
+ return infoPlist;
102
+ }
103
+
104
+ function getRootViewBackgroundColor(config) {
105
+ var _config$ios;
106
+
107
+ return ((_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.backgroundColor) || config.backgroundColor || null;
108
+ }
109
+ //# sourceMappingURL=withIosRootViewBackgroundColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/plugins/unversioned/expo-system-ui/withIosRootViewBackgroundColor.ts"],"names":["BACKGROUND_COLOR_KEY","debug","require","withIosRootViewBackgroundColor","config","shouldUseLegacyBehavior","modResults","setRootViewBackgroundColor","warnSystemUIMissing","sdkVersion","semver","lt","backgroundColor","getRootViewBackgroundColor","WarningAggregator","addWarningIOS","infoPlist","color","Error","ios"],"mappings":";;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;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MAEO;AACL,QAAIiB,KAAK,GAAG,+BAAeL,eAAf,CAAZ;;AACA,QAAI,CAACK,KAAL,EAAY;AACV,YAAM,IAAIC,KAAJ,CAAU,iCAAV,CAAN;AACD;;AACDD,IAAAA,KAAK,GAAG,CAAEA,KAAK,IAAI,EAAV,GAAiBA,KAAK,KAAK,CAA5B,MAAoC,CAA5C;AACAD,IAAAA,SAAS,CAAChB,oBAAD,CAAT,GAAkCiB,KAAlC;AAEAhB,IAAAA,KAAK,CAAE,kBAAiBW,eAAgB,OAAMK,KAAM,EAA/C,CAAL;AACD;;AACD,SAAOD,SAAP;AACD;;AAEM,SAASH,0BAAT,CAAoCT,MAApC,EAAyF;AAAA;;AAC9F,SAAO,gBAAAA,MAAM,CAACe,GAAP,4DAAYP,eAAZ,KAA+BR,MAAM,CAACQ,eAAtC,IAAyD,IAAhE;AACD","sourcesContent":["import { ConfigPlugin, InfoPlist, WarningAggregator, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n// @ts-ignore: uses flow\nimport normalizeColor from '@react-native/normalize-color';\nimport semver from 'semver';\n\n// Maps to the template AppDelegate.m\nconst BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';\n\nconst debug = require('debug')('expo:system-ui:plugin:ios');\n\nexport const withIosRootViewBackgroundColor: ConfigPlugin = config => {\n config = withInfoPlist(config, config => {\n if (shouldUseLegacyBehavior(config)) {\n config.modResults = setRootViewBackgroundColor(config, config.modResults);\n } else {\n warnSystemUIMissing(config);\n }\n return config;\n });\n return config;\n};\n\n/** The template was changed in SDK 43 to move the background color logic to the `expo-system-ui` module */\nexport function shouldUseLegacyBehavior(config: Pick<ExpoConfig, 'sdkVersion'>): boolean {\n try {\n return !!(config.sdkVersion && semver.lt(config.sdkVersion, '44.0.0'));\n } catch {}\n return false;\n}\n\nexport function warnSystemUIMissing(\n config: Pick<ExpoConfig, 'sdkVersion' | 'backgroundColor' | 'ios'>\n) {\n const backgroundColor = getRootViewBackgroundColor(config);\n\n if (backgroundColor) {\n // Background color needs to be set programmatically\n WarningAggregator.addWarningIOS(\n 'ios.backgroundColor',\n 'Install expo-system-ui to enable this feature',\n 'https://docs.expo.dev/build-reference/migrating/#expo-config--backgroundcolor--depends-on'\n );\n }\n}\n\nexport function setRootViewBackgroundColor(\n config: Pick<ExpoConfig, 'backgroundColor' | 'ios'>,\n infoPlist: InfoPlist\n): InfoPlist {\n const backgroundColor = getRootViewBackgroundColor(config);\n if (!backgroundColor) {\n delete infoPlist[BACKGROUND_COLOR_KEY];\n } else {\n let color = normalizeColor(backgroundColor);\n if (!color) {\n throw new Error('Invalid background color on iOS');\n }\n color = ((color << 24) | (color >>> 8)) >>> 0;\n infoPlist[BACKGROUND_COLOR_KEY] = color;\n\n debug(`Convert color: ${backgroundColor} -> ${color}`);\n }\n return infoPlist;\n}\n\nexport function getRootViewBackgroundColor(config: Pick<ExpoConfig, 'ios' | 'backgroundColor'>) {\n return config.ios?.backgroundColor || config.backgroundColor || null;\n}\n"],"file":"withIosRootViewBackgroundColor.js"}
@@ -0,0 +1,5 @@
1
+ import { ConfigPlugin, InfoPlist } from '@expo/config-plugins';
2
+ import { ExpoConfig } from '@expo/config-types';
3
+ export declare const withIosUserInterfaceStyle: ConfigPlugin;
4
+ export declare function getUserInterfaceStyle(config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>): string;
5
+ export declare function setUserInterfaceStyle(config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>, { UIUserInterfaceStyle, ...infoPlist }: InfoPlist): InfoPlist;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getUserInterfaceStyle = getUserInterfaceStyle;
7
+ exports.setUserInterfaceStyle = setUserInterfaceStyle;
8
+ exports.withIosUserInterfaceStyle = 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
+ const withIosUserInterfaceStyle = config => {
21
+ return (0, _configPlugins().withInfoPlist)(config, config => {
22
+ config.modResults = setUserInterfaceStyle(config, config.modResults);
23
+ return config;
24
+ });
25
+ };
26
+
27
+ exports.withIosUserInterfaceStyle = withIosUserInterfaceStyle;
28
+
29
+ function getUserInterfaceStyle(config) {
30
+ var _ref, _config$ios$userInter, _config$ios;
31
+
32
+ return (_ref = (_config$ios$userInter = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.userInterfaceStyle) !== null && _config$ios$userInter !== void 0 ? _config$ios$userInter : config.userInterfaceStyle) !== null && _ref !== void 0 ? _ref : 'light';
33
+ }
34
+
35
+ function setUserInterfaceStyle(config, {
36
+ UIUserInterfaceStyle,
37
+ ...infoPlist
38
+ }) {
39
+ const userInterfaceStyle = getUserInterfaceStyle(config);
40
+ const style = mapUserInterfaceStyleForInfoPlist(userInterfaceStyle);
41
+
42
+ if (!style) {
43
+ return infoPlist;
44
+ }
45
+
46
+ return { ...infoPlist,
47
+ UIUserInterfaceStyle: style
48
+ };
49
+ }
50
+
51
+ function mapUserInterfaceStyleForInfoPlist(userInterfaceStyle) {
52
+ switch (userInterfaceStyle) {
53
+ case 'light':
54
+ return 'Light';
55
+
56
+ case 'dark':
57
+ return 'Dark';
58
+
59
+ case 'automatic':
60
+ return 'Automatic';
61
+ }
62
+
63
+ return null;
64
+ }
65
+ //# sourceMappingURL=withIosUserInterfaceStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/plugins/unversioned/expo-system-ui/withIosUserInterfaceStyle.ts"],"names":["withIosUserInterfaceStyle","config","modResults","setUserInterfaceStyle","getUserInterfaceStyle","ios","userInterfaceStyle","UIUserInterfaceStyle","infoPlist","style","mapUserInterfaceStyleForInfoPlist"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,yBAAuC,GAAGC,MAAM,IAAI;AAC/D,SAAO,oCAAcA,MAAd,EAAsBA,MAAM,IAAI;AACrCA,IAAAA,MAAM,CAACC,UAAP,GAAoBC,qBAAqB,CAACF,MAAD,EAASA,MAAM,CAACC,UAAhB,CAAzC;AACA,WAAOD,MAAP;AACD,GAHM,CAAP;AAID,CALM;;;;AAOA,SAASG,qBAAT,CACLH,MADK,EAEG;AAAA;;AACR,yDAAOA,MAAM,CAACI,GAAd,gDAAO,YAAYC,kBAAnB,yEAAyCL,MAAM,CAACK,kBAAhD,uCAAsE,OAAtE;AACD;;AAEM,SAASH,qBAAT,CACLF,MADK,EAEL;AAAEM,EAAAA,oBAAF;AAAwB,KAAGC;AAA3B,CAFK,EAGM;AACX,QAAMF,kBAAkB,GAAGF,qBAAqB,CAACH,MAAD,CAAhD;AACA,QAAMQ,KAAK,GAAGC,iCAAiC,CAACJ,kBAAD,CAA/C;;AAEA,MAAI,CAACG,KAAL,EAAY;AACV,WAAOD,SAAP;AACD;;AAED,SAAO,EACL,GAAGA,SADE;AAELD,IAAAA,oBAAoB,EAAEE;AAFjB,GAAP;AAID;;AAED,SAASC,iCAAT,CACEJ,kBADF,EAEyD;AACvD,UAAQA,kBAAR;AACE,SAAK,OAAL;AACE,aAAO,OAAP;;AACF,SAAK,MAAL;AACE,aAAO,MAAP;;AACF,SAAK,WAAL;AACE,aAAO,WAAP;AANJ;;AASA,SAAO,IAAP;AACD","sourcesContent":["import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nexport const withIosUserInterfaceStyle: ConfigPlugin = config => {\n return withInfoPlist(config, config => {\n config.modResults = setUserInterfaceStyle(config, config.modResults);\n return config;\n });\n};\n\nexport function getUserInterfaceStyle(\n config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>\n): string {\n return config.ios?.userInterfaceStyle ?? config.userInterfaceStyle ?? 'light';\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\n): NonNullable<InfoPlist['UIUserInterfaceStyle']> | 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"],"file":"withIosUserInterfaceStyle.js"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.withExpoUpdates = void 0;
6
+ exports.withExpoUpdates = exports.default = void 0;
7
7
 
8
8
  function _configPlugins() {
9
9
  const data = require("@expo/config-plugins");
@@ -43,11 +43,14 @@ const LOCATION_USAGE = 'Allow $(PRODUCT_NAME) to access your location'; // Copie
43
43
  const withDefaultLocationPermissions = config => {
44
44
  var _config$_internal;
45
45
 
46
- // Only add location permissions if react-native-maps is installed.
47
- if ((_config$_internal = config._internal) !== null && _config$_internal !== void 0 && _config$_internal.projectRoot && _resolveFrom().default.silent(config._internal.projectRoot, 'react-native-maps')) {
48
- if (!config.ios) config.ios = {};
49
- if (!config.ios.infoPlist) config.ios.infoPlist = {};
50
- config.ios.infoPlist.NSLocationWhenInUseUsageDescription = config.ios.infoPlist.NSLocationWhenInUseUsageDescription || LOCATION_USAGE;
46
+ // TODO: Autolinking
47
+ const isLinked = true; // Only add location permissions if react-native-maps is installed.
48
+
49
+ if ((_config$_internal = config._internal) !== null && _config$_internal !== void 0 && _config$_internal.projectRoot && _resolveFrom().default.silent(config._internal.projectRoot, 'react-native-maps') && isLinked) {
50
+ config = (0, _configPlugins().withInfoPlist)(config, config => {
51
+ config.modResults.NSLocationWhenInUseUsageDescription = config.modResults.NSLocationWhenInUseUsageDescription || LOCATION_USAGE;
52
+ return config;
53
+ });
51
54
  return _configPlugins().AndroidConfig.Permissions.withPermissions(config, ['android.permission.ACCESS_COARSE_LOCATION', 'android.permission.ACCESS_FINE_LOCATION']);
52
55
  }
53
56
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/unversioned/react-native-maps.ts"],"names":["LOCATION_USAGE","withDefaultLocationPermissions","config","_internal","projectRoot","resolveFrom","silent","ios","infoPlist","NSLocationWhenInUseUsageDescription","AndroidConfig","Permissions","withPermissions","packageName","fallback","GoogleMapsApiKey","withGoogleMapsApiKey","IOSConfig","Maps","withMaps"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEA,MAAMA,cAAc,GAAG,+CAAvB,C,CAEA;AACA;;AACA,MAAMC,8BAA4C,GAAGC,MAAM,IAAI;AAAA;;AAC7D;AACA,MACE,qBAAAA,MAAM,CAACC,SAAP,gEAAkBC,WAAlB,IACAC,uBAAYC,MAAZ,CAAmBJ,MAAM,CAACC,SAAP,CAAiBC,WAApC,EAAiD,mBAAjD,CAFF,EAGE;AACA,QAAI,CAACF,MAAM,CAACK,GAAZ,EAAiBL,MAAM,CAACK,GAAP,GAAa,EAAb;AACjB,QAAI,CAACL,MAAM,CAACK,GAAP,CAAWC,SAAhB,EAA2BN,MAAM,CAACK,GAAP,CAAWC,SAAX,GAAuB,EAAvB;AAC3BN,IAAAA,MAAM,CAACK,GAAP,CAAWC,SAAX,CAAqBC,mCAArB,GACEP,MAAM,CAACK,GAAP,CAAWC,SAAX,CAAqBC,mCAArB,IAA4DT,cAD9D;AAGA,WAAOU,+BAAcC,WAAd,CAA0BC,eAA1B,CAA0CV,MAA1C,EAAkD,CACvD,2CADuD,EAEvD,yCAFuD,CAAlD,CAAP;AAID;;AACD,SAAOA,MAAP;AACD,CAjBD;;eAmBe,8CAAmB;AAChCW,EAAAA,WAAW,EAAE,mBADmB;AAEhCC,EAAAA,QAAQ,EAAE,CACRJ,+BAAcK,gBAAd,CAA+BC,oBADvB,EAERC,2BAAUC,IAAV,CAAeC,QAFP,EAGRlB,8BAHQ;AAFsB,CAAnB,C","sourcesContent":["import { AndroidConfig, ConfigPlugin, IOSConfig } from '@expo/config-plugins';\nimport resolveFrom from 'resolve-from';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst LOCATION_USAGE = 'Allow $(PRODUCT_NAME) to access your location';\n\n// Copied from expo-location package, this gets used when the\n// user has react-native-maps installed but not expo-location.\nconst withDefaultLocationPermissions: ConfigPlugin = config => {\n // Only add location permissions if react-native-maps is installed.\n if (\n config._internal?.projectRoot &&\n resolveFrom.silent(config._internal.projectRoot, 'react-native-maps')\n ) {\n if (!config.ios) config.ios = {};\n if (!config.ios.infoPlist) config.ios.infoPlist = {};\n config.ios.infoPlist.NSLocationWhenInUseUsageDescription =\n config.ios.infoPlist.NSLocationWhenInUseUsageDescription || LOCATION_USAGE;\n\n return AndroidConfig.Permissions.withPermissions(config, [\n 'android.permission.ACCESS_COARSE_LOCATION',\n 'android.permission.ACCESS_FINE_LOCATION',\n ]);\n }\n return config;\n};\n\nexport default createLegacyPlugin({\n packageName: 'react-native-maps',\n fallback: [\n AndroidConfig.GoogleMapsApiKey.withGoogleMapsApiKey,\n IOSConfig.Maps.withMaps,\n withDefaultLocationPermissions,\n ],\n});\n"],"file":"react-native-maps.js"}
1
+ {"version":3,"sources":["../../../src/plugins/unversioned/react-native-maps.ts"],"names":["LOCATION_USAGE","withDefaultLocationPermissions","config","isLinked","_internal","projectRoot","resolveFrom","silent","modResults","NSLocationWhenInUseUsageDescription","AndroidConfig","Permissions","withPermissions","packageName","fallback","GoogleMapsApiKey","withGoogleMapsApiKey","IOSConfig","Maps","withMaps"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEA,MAAMA,cAAc,GAAG,+CAAvB,C,CAEA;AACA;;AACA,MAAMC,8BAA4C,GAAGC,MAAM,IAAI;AAAA;;AAC7D;AACA,QAAMC,QAAQ,GAAG,IAAjB,CAF6D,CAG7D;;AACA,MACE,qBAAAD,MAAM,CAACE,SAAP,gEAAkBC,WAAlB,IACAC,uBAAYC,MAAZ,CAAmBL,MAAM,CAACE,SAAP,CAAiBC,WAApC,EAAiD,mBAAjD,CADA,IAEAF,QAHF,EAIE;AACAD,IAAAA,MAAM,GAAG,oCAAcA,MAAd,EAAsBA,MAAM,IAAI;AACvCA,MAAAA,MAAM,CAACM,UAAP,CAAkBC,mCAAlB,GACEP,MAAM,CAACM,UAAP,CAAkBC,mCAAlB,IAAyDT,cAD3D;AAEA,aAAOE,MAAP;AACD,KAJQ,CAAT;AAMA,WAAOQ,+BAAcC,WAAd,CAA0BC,eAA1B,CAA0CV,MAA1C,EAAkD,CACvD,2CADuD,EAEvD,yCAFuD,CAAlD,CAAP;AAID;;AACD,SAAOA,MAAP;AACD,CArBD;;eAuBe,8CAAmB;AAChCW,EAAAA,WAAW,EAAE,mBADmB;AAEhCC,EAAAA,QAAQ,EAAE,CACRJ,+BAAcK,gBAAd,CAA+BC,oBADvB,EAERC,2BAAUC,IAAV,CAAeC,QAFP,EAGRlB,8BAHQ;AAFsB,CAAnB,C","sourcesContent":["import { AndroidConfig, ConfigPlugin, IOSConfig, withInfoPlist } from '@expo/config-plugins';\nimport resolveFrom from 'resolve-from';\n\nimport { createLegacyPlugin } from './createLegacyPlugin';\n\nconst LOCATION_USAGE = 'Allow $(PRODUCT_NAME) to access your location';\n\n// Copied from expo-location package, this gets used when the\n// user has react-native-maps installed but not expo-location.\nconst withDefaultLocationPermissions: ConfigPlugin = config => {\n // TODO: Autolinking\n const isLinked = true;\n // Only add location permissions if react-native-maps is installed.\n if (\n config._internal?.projectRoot &&\n resolveFrom.silent(config._internal.projectRoot, 'react-native-maps') &&\n isLinked\n ) {\n config = withInfoPlist(config, config => {\n config.modResults.NSLocationWhenInUseUsageDescription =\n config.modResults.NSLocationWhenInUseUsageDescription || LOCATION_USAGE;\n return config;\n });\n\n return AndroidConfig.Permissions.withPermissions(config, [\n 'android.permission.ACCESS_COARSE_LOCATION',\n 'android.permission.ACCESS_FINE_LOCATION',\n ]);\n }\n return config;\n};\n\nexport default createLegacyPlugin({\n packageName: 'react-native-maps',\n fallback: [\n AndroidConfig.GoogleMapsApiKey.withGoogleMapsApiKey,\n IOSConfig.Maps.withMaps,\n withDefaultLocationPermissions,\n ],\n});\n"],"file":"react-native-maps.js"}
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getAutoPlugins = getAutoPlugins;
7
7
  exports.getLegacyExpoPlugins = getLegacyExpoPlugins;
8
+ exports.withIosExpoPlugins = exports.withAndroidExpoPlugins = void 0;
8
9
  exports.withLegacyExpoPlugins = withLegacyExpoPlugins;
9
- exports.withVersionedExpoSDKPlugins = exports.withAndroidExpoPlugins = exports.withIosExpoPlugins = void 0;
10
+ exports.withVersionedExpoSDKPlugins = void 0;
10
11
 
11
12
  function _configPlugins() {
12
13
  const data = require("@expo/config-plugins");
@@ -98,6 +99,16 @@ function _expoFacebook() {
98
99
  return data;
99
100
  }
100
101
 
102
+ function _expoNavigationBar() {
103
+ const data = _interopRequireDefault(require("./unversioned/expo-navigation-bar/expo-navigation-bar"));
104
+
105
+ _expoNavigationBar = function () {
106
+ return data;
107
+ };
108
+
109
+ return data;
110
+ }
111
+
101
112
  function _expoNotifications() {
102
113
  const data = _interopRequireDefault(require("./unversioned/expo-notifications/expo-notifications"));
103
114
 
@@ -118,6 +129,16 @@ function _expoSplashScreen() {
118
129
  return data;
119
130
  }
120
131
 
132
+ function _expoSystemUi() {
133
+ const data = _interopRequireDefault(require("./unversioned/expo-system-ui/expo-system-ui"));
134
+
135
+ _expoSystemUi = function () {
136
+ return data;
137
+ };
138
+
139
+ return data;
140
+ }
141
+
121
142
  function _expoUpdates() {
122
143
  const data = _interopRequireDefault(require("./unversioned/expo-updates"));
123
144
 
@@ -156,9 +177,9 @@ const withIosExpoPlugins = (config, {
156
177
  config.ios.bundleIdentifier = bundleIdentifier;
157
178
  return (0, _configPlugins().withPlugins)(config, [[_configPlugins().IOSConfig.BundleIdentifier.withBundleIdentifier, {
158
179
  bundleIdentifier
159
- }], _configPlugins().IOSConfig.Swift.withSwiftBridgingHeader, _configPlugins().IOSConfig.Swift.withNoopSwiftFile, _configPlugins().IOSConfig.Google.withGoogle, _configPlugins().IOSConfig.Name.withDisplayName, _configPlugins().IOSConfig.Orientation.withOrientation, _configPlugins().IOSConfig.RequiresFullScreen.withRequiresFullScreen, _configPlugins().IOSConfig.RootViewBackgroundColor.withRootViewBackgroundColor, _configPlugins().IOSConfig.Scheme.withScheme, _configPlugins().IOSConfig.UserInterfaceStyle.withUserInterfaceStyle, _configPlugins().IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption, _configPlugins().IOSConfig.Version.withBuildNumber, _configPlugins().IOSConfig.Version.withVersion, _configPlugins().IOSConfig.Google.withGoogleServicesFile, _configPlugins().IOSConfig.JsEngine.withJsEnginePodfileProps, // Entitlements
180
+ }], _configPlugins().IOSConfig.Swift.withSwiftBridgingHeader, _configPlugins().IOSConfig.Swift.withNoopSwiftFile, _configPlugins().IOSConfig.Google.withGoogle, _configPlugins().IOSConfig.Name.withDisplayName, _configPlugins().IOSConfig.Orientation.withOrientation, _configPlugins().IOSConfig.RequiresFullScreen.withRequiresFullScreen, _configPlugins().IOSConfig.Scheme.withScheme, _configPlugins().IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption, _configPlugins().IOSConfig.Version.withBuildNumber, _configPlugins().IOSConfig.Version.withVersion, _configPlugins().IOSConfig.Google.withGoogleServicesFile, _configPlugins().IOSConfig.JsEngine.withJsEnginePodfileProps, // Entitlements
160
181
  _configPlugins().IOSConfig.Entitlements.withAssociatedDomains, // XcodeProject
161
- _configPlugins().IOSConfig.DeviceFamily.withDeviceFamily, _configPlugins().IOSConfig.Locales.withLocales, // Dangerous
182
+ _configPlugins().IOSConfig.DeviceFamily.withDeviceFamily, _configPlugins().IOSConfig.Bitcode.withBitcode, _configPlugins().IOSConfig.Locales.withLocales, // Dangerous
162
183
  _withIosIcons().withIosIcons]);
163
184
  };
164
185
  /**
@@ -180,25 +201,26 @@ const withAndroidExpoPlugins = (config, props) => {
180
201
  _configPlugins().AndroidConfig.GoogleServices.withApplyPlugin, _configPlugins().AndroidConfig.Package.withPackageGradle, _configPlugins().AndroidConfig.Version.withVersion, // AndroidManifest.xml
181
202
  _configPlugins().AndroidConfig.Package.withPackageManifest, _configPlugins().AndroidConfig.AllowBackup.withAllowBackup, _configPlugins().AndroidConfig.WindowSoftInputMode.withWindowSoftInputMode, // Note: The withAndroidIntentFilters plugin must appear before the withScheme
182
203
  // plugin or withScheme will override the output of withAndroidIntentFilters.
183
- _configPlugins().AndroidConfig.IntentFilters.withAndroidIntentFilters, _configPlugins().AndroidConfig.Scheme.withScheme, _configPlugins().AndroidConfig.Orientation.withOrientation, _configPlugins().AndroidConfig.Permissions.withPermissions, _configPlugins().AndroidConfig.UserInterfaceStyle.withUiModeManifest, // MainActivity.*
184
- _configPlugins().AndroidConfig.UserInterfaceStyle.withUiModeMainActivity, // strings.xml
204
+ _configPlugins().AndroidConfig.IntentFilters.withAndroidIntentFilters, _configPlugins().AndroidConfig.Scheme.withScheme, _configPlugins().AndroidConfig.Orientation.withOrientation, _configPlugins().AndroidConfig.Permissions.withPermissions, // strings.xml
185
205
  _configPlugins().AndroidConfig.Name.withName, // Dangerous -- these plugins run in reverse order.
186
206
  _configPlugins().AndroidConfig.GoogleServices.withGoogleServicesFile, // Modify colors.xml and styles.xml
187
- _configPlugins().AndroidConfig.RootViewBackgroundColor.withRootViewBackgroundColor, _configPlugins().AndroidConfig.NavigationBar.withNavigationBar, _configPlugins().AndroidConfig.StatusBar.withStatusBar, _configPlugins().AndroidConfig.PrimaryColor.withPrimaryColor, c => (0, _withAndroidIcons().withAndroidIcons)(c), // If we renamed the package, we should also move it around and rename it in source files
207
+ _configPlugins().AndroidConfig.StatusBar.withStatusBar, _configPlugins().AndroidConfig.PrimaryColor.withPrimaryColor, _withAndroidIcons().withAndroidIcons, // If we renamed the package, we should also move it around and rename it in source files
188
208
  // Added last to ensure this plugin runs first. Out of tree solutions will mistakenly resolve the package incorrectly otherwise.
189
209
  _configPlugins().AndroidConfig.Package.withPackageRefactor]);
190
210
  }; // Must keep in sync with `withVersionedExpoSDKPlugins`
191
211
 
192
212
 
193
213
  exports.withAndroidExpoPlugins = withAndroidExpoPlugins;
194
- const versionedExpoSDKPackages = ['react-native-maps', 'expo-ads-admob', 'expo-apple-authentication', 'expo-contacts', 'expo-notifications', 'expo-updates', 'expo-branch', 'expo-document-picker', 'expo-facebook', 'expo-splash-screen'];
214
+ const versionedExpoSDKPackages = ['react-native-maps', 'expo-ads-admob', 'expo-apple-authentication', 'expo-contacts', 'expo-notifications', 'expo-updates', 'expo-branch', 'expo-navigation-bar', 'expo-document-picker', 'expo-facebook', 'expo-splash-screen', 'expo-system-ui'];
195
215
 
196
216
  const withVersionedExpoSDKPlugins = (config, {
197
217
  expoUsername
198
218
  }) => {
199
219
  return (0, _configPlugins().withPlugins)(config, [_reactNativeMaps().default, _expoAdsAdmob().default, _expoAppleAuthentication().default, _expoContacts().default, _expoNotifications().default, [_expoUpdates().default, {
200
220
  expoUsername
201
- }], _expoBranch().default, _expoDocumentPicker().default, _expoFacebook().default, _expoSplashScreen().default]);
221
+ }], _expoBranch().default, _expoDocumentPicker().default, _expoFacebook().default, // System UI must come before splash screen as they overlap
222
+ // and splash screen will warn about conflicting rules.
223
+ _expoSystemUi().default, _expoSplashScreen().default, _expoNavigationBar().default]);
202
224
  };
203
225
 
204
226
  exports.withVersionedExpoSDKPlugins = withVersionedExpoSDKPlugins;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/plugins/withDefaultPlugins.ts"],"names":["withIosExpoPlugins","config","bundleIdentifier","ios","IOSConfig","BundleIdentifier","withBundleIdentifier","Swift","withSwiftBridgingHeader","withNoopSwiftFile","Google","withGoogle","Name","withDisplayName","Orientation","withOrientation","RequiresFullScreen","withRequiresFullScreen","RootViewBackgroundColor","withRootViewBackgroundColor","Scheme","withScheme","UserInterfaceStyle","withUserInterfaceStyle","UsesNonExemptEncryption","withUsesNonExemptEncryption","Version","withBuildNumber","withVersion","withGoogleServicesFile","JsEngine","withJsEnginePodfileProps","Entitlements","withAssociatedDomains","DeviceFamily","withDeviceFamily","Locales","withLocales","withIosIcons","withAndroidExpoPlugins","props","android","package","AndroidConfig","withJsEngineGradleProps","withNameSettingsGradle","GoogleServices","withClassPath","withApplyPlugin","Package","withPackageGradle","withPackageManifest","AllowBackup","withAllowBackup","WindowSoftInputMode","withWindowSoftInputMode","IntentFilters","withAndroidIntentFilters","Permissions","withPermissions","withUiModeManifest","withUiModeMainActivity","withName","NavigationBar","withNavigationBar","StatusBar","withStatusBar","PrimaryColor","withPrimaryColor","c","withPackageRefactor","versionedExpoSDKPackages","withVersionedExpoSDKPlugins","expoUsername","withMaps","withAdMob","withAppleAuthentication","withContacts","withNotifications","withUpdates","withBranch","withDocumentPicker","withFacebook","withSplashScreen","getAutoPlugins","concat","legacyExpoPlugins","expoManagedVersionedPlugins","getLegacyExpoPlugins","withOptionalLegacyPlugins","plugins","reduce","prev","plugin","_isLegacyPlugin","fallback","withLegacyExpoPlugins","Set"],"mappings":";;;;;;;;;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAUA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;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B,EAMxB,eANwB,EAOxB,aAPwB,EAQxB,eARwB,EASxB,eATwB,EAUxB,mBAVwB,EAWxB,iBAXwB,EAYxB,mBAZwB,EAaxB,kBAbwB,EAcxB,mBAdwB,EAexB,eAfwB,EAgBxB,oBAhBwB,EAiBxB,yBAjBwB,EAkBxB,cAlBwB,EAmBxB,mBAnBwB,EAoBxB,2BApBwB,CAA1B,C,CAuBA;AACA;;AACA,MAAMC,2BAA2B,GAAG,CAClC,yBADkC,EAElC,oBAFkC,EAGlC,qBAHkC,CAApC;;AAMA,MAAME,yBAAkE,GAAG,CAACxF,MAAD,EAASyF,OAAT,KAAqB;AAC9F,SAAOA,OAAO,CAACC,MAAR,CAAe,CAACC,IAAD,EAAOC,MAAP,KAAkB;AACtC,WAAO,uCAAiBD,IAAjB,EAAuB;AAC5B;AACAE,MAAAA,eAAe,EAAE,IAFW;AAG5BD,MAAAA,MAH4B;AAI5B;AACAE,MAAAA,QAAQ,EAAE9F,MAAM,IAAIA;AALQ,KAAvB,CAAP;AAOD,GARM,EAQJA,MARI,CAAP;AASD,CAVD;;AAYO,SAAS+F,qBAAT,CAA+B/F,MAA/B,EAAmD;AACxD,SAAOwF,yBAAyB,CAACxF,MAAD,EAAS,CACvC,GAAG,IAAIgG,GAAJ,CAAQV,2BAA2B,CAACF,MAA5B,CAAmCC,iBAAnC,CAAR,CADoC,CAAT,CAAhC;AAGD","sourcesContent":["/**\n * These are the versioned first-party plugins with some of the future third-party plugins mixed in for legacy support.\n */\nimport {\n AndroidConfig,\n ConfigPlugin,\n IOSConfig,\n StaticPlugin,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { withAndroidIcons } from './icons/withAndroidIcons';\nimport { withIosIcons } from './icons/withIosIcons';\nimport withAdMob from './unversioned/expo-ads-admob/expo-ads-admob';\nimport withAppleAuthentication from './unversioned/expo-apple-authentication';\nimport withBranch from './unversioned/expo-branch/expo-branch';\nimport withContacts from './unversioned/expo-contacts';\nimport withDocumentPicker from './unversioned/expo-document-picker';\nimport withFacebook from './unversioned/expo-facebook/expo-facebook';\nimport withNotifications from './unversioned/expo-notifications/expo-notifications';\nimport withSplashScreen from './unversioned/expo-splash-screen/expo-splash-screen';\nimport withUpdates from './unversioned/expo-updates';\nimport withMaps from './unversioned/react-native-maps';\n\n/**\n * Config plugin to apply all of the custom Expo iOS config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-facebook, expo-updates, etc...\n */\nexport const withIosExpoPlugins: ConfigPlugin<{\n bundleIdentifier: string;\n}> = (config, { bundleIdentifier }) => {\n // Set the bundle ID ahead of time.\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier = bundleIdentifier;\n\n return withPlugins(config, [\n [IOSConfig.BundleIdentifier.withBundleIdentifier, { bundleIdentifier }],\n IOSConfig.Swift.withSwiftBridgingHeader,\n IOSConfig.Swift.withNoopSwiftFile,\n IOSConfig.Google.withGoogle,\n IOSConfig.Name.withDisplayName,\n IOSConfig.Orientation.withOrientation,\n IOSConfig.RequiresFullScreen.withRequiresFullScreen,\n IOSConfig.RootViewBackgroundColor.withRootViewBackgroundColor,\n IOSConfig.Scheme.withScheme,\n IOSConfig.UserInterfaceStyle.withUserInterfaceStyle,\n IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption,\n IOSConfig.Version.withBuildNumber,\n IOSConfig.Version.withVersion,\n IOSConfig.Google.withGoogleServicesFile,\n IOSConfig.JsEngine.withJsEnginePodfileProps,\n // Entitlements\n IOSConfig.Entitlements.withAssociatedDomains,\n // XcodeProject\n IOSConfig.DeviceFamily.withDeviceFamily,\n IOSConfig.Locales.withLocales,\n // Dangerous\n withIosIcons,\n ]);\n};\n\n/**\n * Config plugin to apply all of the custom Expo Android config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-facebook, expo-updates, etc...\n */\nexport const withAndroidExpoPlugins: ConfigPlugin<{\n package: string;\n}> = (config, props) => {\n // Set the package name ahead of time.\n if (!config.android) config.android = {};\n config.android.package = props.package;\n\n return withPlugins(config, [\n // gradle.properties\n AndroidConfig.JsEngine.withJsEngineGradleProps,\n\n // settings.gradle\n AndroidConfig.Name.withNameSettingsGradle,\n\n // project build.gradle\n AndroidConfig.GoogleServices.withClassPath,\n\n // app/build.gradle\n AndroidConfig.GoogleServices.withApplyPlugin,\n AndroidConfig.Package.withPackageGradle,\n AndroidConfig.Version.withVersion,\n\n // AndroidManifest.xml\n AndroidConfig.Package.withPackageManifest,\n AndroidConfig.AllowBackup.withAllowBackup,\n AndroidConfig.WindowSoftInputMode.withWindowSoftInputMode,\n // Note: The withAndroidIntentFilters plugin must appear before the withScheme\n // plugin or withScheme will override the output of withAndroidIntentFilters.\n AndroidConfig.IntentFilters.withAndroidIntentFilters,\n AndroidConfig.Scheme.withScheme,\n AndroidConfig.Orientation.withOrientation,\n AndroidConfig.Permissions.withPermissions,\n AndroidConfig.UserInterfaceStyle.withUiModeManifest,\n\n // MainActivity.*\n AndroidConfig.UserInterfaceStyle.withUiModeMainActivity,\n\n // strings.xml\n AndroidConfig.Name.withName,\n\n // Dangerous -- these plugins run in reverse order.\n AndroidConfig.GoogleServices.withGoogleServicesFile,\n\n // Modify colors.xml and styles.xml\n AndroidConfig.RootViewBackgroundColor.withRootViewBackgroundColor,\n AndroidConfig.NavigationBar.withNavigationBar,\n AndroidConfig.StatusBar.withStatusBar,\n AndroidConfig.PrimaryColor.withPrimaryColor,\n\n c => withAndroidIcons(c),\n // If we renamed the package, we should also move it around and rename it in source files\n // Added last to ensure this plugin runs first. Out of tree solutions will mistakenly resolve the package incorrectly otherwise.\n AndroidConfig.Package.withPackageRefactor,\n ]);\n};\n\n// Must keep in sync with `withVersionedExpoSDKPlugins`\nconst versionedExpoSDKPackages: string[] = [\n 'react-native-maps',\n 'expo-ads-admob',\n 'expo-apple-authentication',\n 'expo-contacts',\n 'expo-notifications',\n 'expo-updates',\n 'expo-branch',\n 'expo-document-picker',\n 'expo-facebook',\n 'expo-splash-screen',\n];\n\nexport const withVersionedExpoSDKPlugins: ConfigPlugin<{ expoUsername: string | null }> = (\n config,\n { expoUsername }\n) => {\n return withPlugins(config, [\n withMaps,\n withAdMob,\n withAppleAuthentication,\n withContacts,\n withNotifications,\n [withUpdates, { expoUsername }],\n withBranch,\n withDocumentPicker,\n withFacebook,\n withSplashScreen,\n ]);\n};\n\nexport function getAutoPlugins() {\n return versionedExpoSDKPackages.concat(legacyExpoPlugins).concat(expoManagedVersionedPlugins);\n}\n\nexport function getLegacyExpoPlugins() {\n return legacyExpoPlugins;\n}\n\n// Expo managed packages that require extra update.\n// These get applied automatically to create parity with expo build in eas build.\nconst legacyExpoPlugins = [\n 'expo-app-auth',\n 'expo-av',\n 'expo-background-fetch',\n 'expo-barcode-scanner',\n 'expo-brightness',\n 'expo-calendar',\n 'expo-camera',\n 'expo-cellular',\n 'expo-dev-menu',\n 'expo-dev-launcher',\n 'expo-dev-client',\n 'expo-image-picker',\n 'expo-file-system',\n 'expo-ads-facebook',\n 'expo-location',\n 'expo-media-library',\n 'expo-screen-orientation',\n 'expo-sensors',\n 'expo-task-manager',\n 'expo-local-authentication',\n];\n\n// Plugins that need to be automatically applied, but also get applied by expo-cli if the versioned plugin isn't available.\n// These are split up because the user doesn't need to be prompted to setup these packages.\nconst expoManagedVersionedPlugins = [\n 'expo-firebase-analytics',\n 'expo-firebase-core',\n 'expo-google-sign-in',\n];\n\nconst withOptionalLegacyPlugins: ConfigPlugin<(StaticPlugin | string)[]> = (config, plugins) => {\n return plugins.reduce((prev, plugin) => {\n return withStaticPlugin(prev, {\n // hide errors\n _isLegacyPlugin: true,\n plugin,\n // If a plugin doesn't exist, do nothing.\n fallback: config => config,\n });\n }, config);\n};\n\nexport function withLegacyExpoPlugins(config: ExpoConfig) {\n return withOptionalLegacyPlugins(config, [\n ...new Set(expoManagedVersionedPlugins.concat(legacyExpoPlugins)),\n ]);\n}\n"],"file":"withDefaultPlugins.js"}
1
+ {"version":3,"sources":["../../src/plugins/withDefaultPlugins.ts"],"names":["withIosExpoPlugins","config","bundleIdentifier","ios","IOSConfig","BundleIdentifier","withBundleIdentifier","Swift","withSwiftBridgingHeader","withNoopSwiftFile","Google","withGoogle","Name","withDisplayName","Orientation","withOrientation","RequiresFullScreen","withRequiresFullScreen","Scheme","withScheme","UsesNonExemptEncryption","withUsesNonExemptEncryption","Version","withBuildNumber","withVersion","withGoogleServicesFile","JsEngine","withJsEnginePodfileProps","Entitlements","withAssociatedDomains","DeviceFamily","withDeviceFamily","Bitcode","withBitcode","Locales","withLocales","withIosIcons","withAndroidExpoPlugins","props","android","package","AndroidConfig","withJsEngineGradleProps","withNameSettingsGradle","GoogleServices","withClassPath","withApplyPlugin","Package","withPackageGradle","withPackageManifest","AllowBackup","withAllowBackup","WindowSoftInputMode","withWindowSoftInputMode","IntentFilters","withAndroidIntentFilters","Permissions","withPermissions","withName","StatusBar","withStatusBar","PrimaryColor","withPrimaryColor","withAndroidIcons","withPackageRefactor","versionedExpoSDKPackages","withVersionedExpoSDKPlugins","expoUsername","withMaps","withAdMob","withAppleAuthentication","withContacts","withNotifications","withUpdates","withBranch","withDocumentPicker","withFacebook","withSystemUI","withSplashScreen","withNavigationBar","getAutoPlugins","concat","legacyExpoPlugins","expoManagedVersionedPlugins","getLegacyExpoPlugins","withOptionalLegacyPlugins","plugins","reduce","prev","plugin","_isLegacyPlugin","fallback","withLegacyExpoPlugins","Set"],"mappings":";;;;;;;;;;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAUA;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;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AA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AACA,MAAMC,2BAA2B,GAAG,CAClC,yBADkC,EAElC,oBAFkC,EAGlC,qBAHkC,CAApC;;AAMA,MAAME,yBAAkE,GAAG,CAACpF,MAAD,EAASqF,OAAT,KAAqB;AAC9F,SAAOA,OAAO,CAACC,MAAR,CAAe,CAACC,IAAD,EAAOC,MAAP,KAAkB;AACtC,WAAO,uCAAiBD,IAAjB,EAAuB;AAC5B;AACAE,MAAAA,eAAe,EAAE,IAFW;AAG5BD,MAAAA,MAH4B;AAI5B;AACAE,MAAAA,QAAQ,EAAE1F,MAAM,IAAIA;AALQ,KAAvB,CAAP;AAOD,GARM,EAQJA,MARI,CAAP;AASD,CAVD;;AAYO,SAAS2F,qBAAT,CAA+B3F,MAA/B,EAAmD;AACxD,SAAOoF,yBAAyB,CAACpF,MAAD,EAAS,CACvC,GAAG,IAAI4F,GAAJ,CAAQV,2BAA2B,CAACF,MAA5B,CAAmCC,iBAAnC,CAAR,CADoC,CAAT,CAAhC;AAGD","sourcesContent":["/**\n * These are the versioned first-party plugins with some of the future third-party plugins mixed in for legacy support.\n */\nimport {\n AndroidConfig,\n ConfigPlugin,\n IOSConfig,\n StaticPlugin,\n withPlugins,\n withStaticPlugin,\n} from '@expo/config-plugins';\nimport { ExpoConfig } from '@expo/config-types';\n\nimport { withAndroidIcons } from './icons/withAndroidIcons';\nimport { withIosIcons } from './icons/withIosIcons';\nimport withAdMob from './unversioned/expo-ads-admob/expo-ads-admob';\nimport withAppleAuthentication from './unversioned/expo-apple-authentication';\nimport withBranch from './unversioned/expo-branch/expo-branch';\nimport withContacts from './unversioned/expo-contacts';\nimport withDocumentPicker from './unversioned/expo-document-picker';\nimport withFacebook from './unversioned/expo-facebook/expo-facebook';\nimport withNavigationBar from './unversioned/expo-navigation-bar/expo-navigation-bar';\nimport withNotifications from './unversioned/expo-notifications/expo-notifications';\nimport withSplashScreen from './unversioned/expo-splash-screen/expo-splash-screen';\nimport withSystemUI from './unversioned/expo-system-ui/expo-system-ui';\nimport withUpdates from './unversioned/expo-updates';\nimport withMaps from './unversioned/react-native-maps';\n\n/**\n * Config plugin to apply all of the custom Expo iOS config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-facebook, expo-updates, etc...\n */\nexport const withIosExpoPlugins: ConfigPlugin<{\n bundleIdentifier: string;\n}> = (config, { bundleIdentifier }) => {\n // Set the bundle ID ahead of time.\n if (!config.ios) config.ios = {};\n config.ios.bundleIdentifier = bundleIdentifier;\n\n return withPlugins(config, [\n [IOSConfig.BundleIdentifier.withBundleIdentifier, { bundleIdentifier }],\n IOSConfig.Swift.withSwiftBridgingHeader,\n IOSConfig.Swift.withNoopSwiftFile,\n IOSConfig.Google.withGoogle,\n IOSConfig.Name.withDisplayName,\n IOSConfig.Orientation.withOrientation,\n IOSConfig.RequiresFullScreen.withRequiresFullScreen,\n IOSConfig.Scheme.withScheme,\n IOSConfig.UsesNonExemptEncryption.withUsesNonExemptEncryption,\n IOSConfig.Version.withBuildNumber,\n IOSConfig.Version.withVersion,\n IOSConfig.Google.withGoogleServicesFile,\n IOSConfig.JsEngine.withJsEnginePodfileProps,\n // Entitlements\n IOSConfig.Entitlements.withAssociatedDomains,\n // XcodeProject\n IOSConfig.DeviceFamily.withDeviceFamily,\n IOSConfig.Bitcode.withBitcode,\n IOSConfig.Locales.withLocales,\n // Dangerous\n withIosIcons,\n ]);\n};\n\n/**\n * Config plugin to apply all of the custom Expo Android config plugins we support by default.\n * TODO: In the future most of this should go into versioned packages like expo-facebook, expo-updates, etc...\n */\nexport const withAndroidExpoPlugins: ConfigPlugin<{\n package: string;\n}> = (config, props) => {\n // Set the package name ahead of time.\n if (!config.android) config.android = {};\n config.android.package = props.package;\n\n return withPlugins(config, [\n // gradle.properties\n AndroidConfig.JsEngine.withJsEngineGradleProps,\n\n // settings.gradle\n AndroidConfig.Name.withNameSettingsGradle,\n\n // project build.gradle\n AndroidConfig.GoogleServices.withClassPath,\n\n // app/build.gradle\n AndroidConfig.GoogleServices.withApplyPlugin,\n AndroidConfig.Package.withPackageGradle,\n AndroidConfig.Version.withVersion,\n\n // AndroidManifest.xml\n AndroidConfig.Package.withPackageManifest,\n AndroidConfig.AllowBackup.withAllowBackup,\n AndroidConfig.WindowSoftInputMode.withWindowSoftInputMode,\n // Note: The withAndroidIntentFilters plugin must appear before the withScheme\n // plugin or withScheme will override the output of withAndroidIntentFilters.\n AndroidConfig.IntentFilters.withAndroidIntentFilters,\n AndroidConfig.Scheme.withScheme,\n AndroidConfig.Orientation.withOrientation,\n AndroidConfig.Permissions.withPermissions,\n\n // strings.xml\n AndroidConfig.Name.withName,\n\n // Dangerous -- these plugins run in reverse order.\n AndroidConfig.GoogleServices.withGoogleServicesFile,\n\n // Modify colors.xml and styles.xml\n AndroidConfig.StatusBar.withStatusBar,\n AndroidConfig.PrimaryColor.withPrimaryColor,\n\n withAndroidIcons,\n // If we renamed the package, we should also move it around and rename it in source files\n // Added last to ensure this plugin runs first. Out of tree solutions will mistakenly resolve the package incorrectly otherwise.\n AndroidConfig.Package.withPackageRefactor,\n ]);\n};\n\n// Must keep in sync with `withVersionedExpoSDKPlugins`\nconst versionedExpoSDKPackages: string[] = [\n 'react-native-maps',\n 'expo-ads-admob',\n 'expo-apple-authentication',\n 'expo-contacts',\n 'expo-notifications',\n 'expo-updates',\n 'expo-branch',\n 'expo-navigation-bar',\n 'expo-document-picker',\n 'expo-facebook',\n 'expo-splash-screen',\n 'expo-system-ui',\n];\n\nexport const withVersionedExpoSDKPlugins: ConfigPlugin<{ expoUsername: string | null }> = (\n config,\n { expoUsername }\n) => {\n return withPlugins(config, [\n withMaps,\n withAdMob,\n withAppleAuthentication,\n withContacts,\n withNotifications,\n [withUpdates, { expoUsername }],\n withBranch,\n withDocumentPicker,\n withFacebook,\n // System UI must come before splash screen as they overlap\n // and splash screen will warn about conflicting rules.\n withSystemUI,\n withSplashScreen,\n withNavigationBar,\n ]);\n};\n\nexport function getAutoPlugins() {\n return versionedExpoSDKPackages.concat(legacyExpoPlugins).concat(expoManagedVersionedPlugins);\n}\n\nexport function getLegacyExpoPlugins() {\n return legacyExpoPlugins;\n}\n\n// Expo managed packages that require extra update.\n// These get applied automatically to create parity with expo build in eas build.\nconst legacyExpoPlugins = [\n 'expo-app-auth',\n 'expo-av',\n 'expo-background-fetch',\n 'expo-barcode-scanner',\n 'expo-brightness',\n 'expo-calendar',\n 'expo-camera',\n 'expo-cellular',\n 'expo-dev-menu',\n 'expo-dev-launcher',\n 'expo-dev-client',\n 'expo-image-picker',\n 'expo-file-system',\n 'expo-ads-facebook',\n 'expo-location',\n 'expo-media-library',\n 'expo-screen-orientation',\n 'expo-sensors',\n 'expo-task-manager',\n 'expo-local-authentication',\n];\n\n// Plugins that need to be automatically applied, but also get applied by expo-cli if the versioned plugin isn't available.\n// These are split up because the user doesn't need to be prompted to setup these packages.\nconst expoManagedVersionedPlugins = [\n 'expo-firebase-analytics',\n 'expo-firebase-core',\n 'expo-google-sign-in',\n];\n\nconst withOptionalLegacyPlugins: ConfigPlugin<(StaticPlugin | string)[]> = (config, plugins) => {\n return plugins.reduce((prev, plugin) => {\n return withStaticPlugin(prev, {\n // hide errors\n _isLegacyPlugin: true,\n plugin,\n // If a plugin doesn't exist, do nothing.\n fallback: config => config,\n });\n }, config);\n};\n\nexport function withLegacyExpoPlugins(config: ExpoConfig) {\n return withOptionalLegacyPlugins(config, [\n ...new Set(expoManagedVersionedPlugins.concat(legacyExpoPlugins)),\n ]);\n}\n"],"file":"withDefaultPlugins.js"}