@expo/prebuild-config 8.1.3 → 8.2.0

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 (40) hide show
  1. package/build/getPrebuildConfig.js +1 -2
  2. package/build/getPrebuildConfig.js.map +1 -1
  3. package/build/plugins/icons/AssetContents.js +5 -7
  4. package/build/plugins/icons/AssetContents.js.map +1 -1
  5. package/build/plugins/icons/withAndroidIcons.js +14 -22
  6. package/build/plugins/icons/withAndroidIcons.js.map +1 -1
  7. package/build/plugins/icons/withIosIcons.js +7 -8
  8. package/build/plugins/icons/withIosIcons.js.map +1 -1
  9. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.d.ts +2 -2
  10. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js +6 -10
  11. package/build/plugins/unversioned/expo-notifications/withAndroidNotifications.js.map +1 -1
  12. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js +12 -19
  13. package/build/plugins/unversioned/expo-splash-screen/withAndroidSplashImages.js.map +1 -1
  14. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js +7 -8
  15. package/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js.map +1 -1
  16. package/build/plugins/unversioned/expo-splash-screen/withIosSplashColors.js +9 -12
  17. package/build/plugins/unversioned/expo-splash-screen/withIosSplashColors.js.map +1 -1
  18. package/build/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.d.ts +1 -0
  19. package/build/plugins/withDefaultPlugins.d.ts +0 -1
  20. package/build/plugins/withDefaultPlugins.js +3 -17
  21. package/build/plugins/withDefaultPlugins.js.map +1 -1
  22. package/package.json +10 -9
  23. package/build/plugins/sdk52/ReactNative78CompatPlugin.d.ts +0 -2
  24. package/build/plugins/sdk52/ReactNative78CompatPlugin.js +0 -88
  25. package/build/plugins/sdk52/ReactNative78CompatPlugin.js.map +0 -1
  26. package/build/plugins/unversioned/react-native-edge-to-edge/helpers.d.ts +0 -5
  27. package/build/plugins/unversioned/react-native-edge-to-edge/helpers.js +0 -47
  28. package/build/plugins/unversioned/react-native-edge-to-edge/helpers.js.map +0 -1
  29. package/build/plugins/unversioned/react-native-edge-to-edge/withConfigureEdgeToEdgeEnforcement.d.ts +0 -6
  30. package/build/plugins/unversioned/react-native-edge-to-edge/withConfigureEdgeToEdgeEnforcement.js +0 -53
  31. package/build/plugins/unversioned/react-native-edge-to-edge/withConfigureEdgeToEdgeEnforcement.js.map +0 -1
  32. package/build/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdge.d.ts +0 -15
  33. package/build/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdge.js +0 -110
  34. package/build/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdge.js.map +0 -1
  35. package/build/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdgeEnabledGradleProperties.d.ts +0 -6
  36. package/build/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdgeEnabledGradleProperties.js +0 -42
  37. package/build/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdgeEnabledGradleProperties.js.map +0 -1
  38. package/build/plugins/unversioned/react-native-edge-to-edge/withRestoreDefaultTheme.d.ts +0 -4
  39. package/build/plugins/unversioned/react-native-edge-to-edge/withRestoreDefaultTheme.js +0 -46
  40. package/build/plugins/unversioned/react-native-edge-to-edge/withRestoreDefaultTheme.js.map +0 -1
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.edgeToEdgePluginIndex = edgeToEdgePluginIndex;
7
- exports.hasEnabledEdgeToEdge = hasEnabledEdgeToEdge;
8
- exports.loadEdgeToEdgeConfigPlugin = loadEdgeToEdgeConfigPlugin;
9
- function _resolveFrom() {
10
- const data = _interopRequireDefault(require("resolve-from"));
11
- _resolveFrom = function () {
12
- return data;
13
- };
14
- return data;
15
- }
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- function edgeToEdgePluginIndex(config) {
18
- const isEdgeToEdgePluginArray = plugin => Array.isArray(plugin) && typeof plugin[0] === 'string' && plugin[0].includes('react-native-edge-to-edge');
19
- const isEdgeToEdgePluginString = plugin => typeof plugin === 'string' && plugin.includes('react-native-edge-to-edge');
20
- const pluginIndex = config.plugins?.findIndex(plugin => isEdgeToEdgePluginString(plugin) || isEdgeToEdgePluginArray(plugin)) ?? -1;
21
- if (pluginIndex === -1) {
22
- return null;
23
- }
24
- return pluginIndex;
25
- }
26
- function hasEnabledEdgeToEdge(config) {
27
- return config.android?.edgeToEdgeEnabled === true || edgeToEdgePluginIndex(config) != null;
28
- }
29
- function loadEdgeToEdgeConfigPlugin(projectRoot) {
30
- try {
31
- let edgeToEdgePath = _resolveFrom().default.silent(projectRoot, 'react-native-edge-to-edge/app.plugin');
32
- if (edgeToEdgePath == null) {
33
- const expoPackageRoot = _resolveFrom().default.silent(projectRoot, 'expo/package.json');
34
- edgeToEdgePath = _resolveFrom().default.silent(expoPackageRoot ?? projectRoot, 'react-native-edge-to-edge/app.plugin');
35
- }
36
- if (edgeToEdgePath) {
37
- const {
38
- default: plugin
39
- } = require(edgeToEdgePath);
40
- return plugin;
41
- }
42
- } catch {
43
- return null;
44
- }
45
- return null;
46
- }
47
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","names":["_resolveFrom","data","_interopRequireDefault","require","e","__esModule","default","edgeToEdgePluginIndex","config","isEdgeToEdgePluginArray","plugin","Array","isArray","includes","isEdgeToEdgePluginString","pluginIndex","plugins","findIndex","hasEnabledEdgeToEdge","android","edgeToEdgeEnabled","loadEdgeToEdgeConfigPlugin","projectRoot","edgeToEdgePath","resolveFrom","silent","expoPackageRoot"],"sources":["../../../../src/plugins/unversioned/react-native-edge-to-edge/helpers.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport resolveFrom from 'resolve-from';\n\nimport { EdgeToEdgePlugin } from './withEdgeToEdge';\n\nexport function edgeToEdgePluginIndex(config: ExpoConfig): number | null {\n const isEdgeToEdgePluginArray = (plugin: string | [] | [string] | [string, any]) =>\n Array.isArray(plugin) &&\n typeof plugin[0] === 'string' &&\n plugin[0].includes('react-native-edge-to-edge');\n const isEdgeToEdgePluginString = (plugin: string | [] | [string] | [string, any]) =>\n typeof plugin === 'string' && plugin.includes('react-native-edge-to-edge');\n\n const pluginIndex =\n config.plugins?.findIndex(\n (plugin) => isEdgeToEdgePluginString(plugin) || isEdgeToEdgePluginArray(plugin)\n ) ?? -1;\n\n if (pluginIndex === -1) {\n return null;\n }\n return pluginIndex;\n}\n\nexport function hasEnabledEdgeToEdge(config: ExpoConfig) {\n return config.android?.edgeToEdgeEnabled === true || edgeToEdgePluginIndex(config) != null;\n}\n\nexport function loadEdgeToEdgeConfigPlugin(projectRoot: string): EdgeToEdgePlugin | null {\n try {\n let edgeToEdgePath = resolveFrom.silent(projectRoot, 'react-native-edge-to-edge/app.plugin');\n if (edgeToEdgePath == null) {\n const expoPackageRoot = resolveFrom.silent(projectRoot, 'expo/package.json');\n edgeToEdgePath = resolveFrom.silent(\n expoPackageRoot ?? projectRoot,\n 'react-native-edge-to-edge/app.plugin'\n );\n }\n\n if (edgeToEdgePath) {\n const { default: plugin } = require(edgeToEdgePath);\n return plugin as EdgeToEdgePlugin;\n }\n } catch {\n return null;\n }\n return null;\n}\n"],"mappings":";;;;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuC,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAIhC,SAASG,qBAAqBA,CAACC,MAAkB,EAAiB;EACvE,MAAMC,uBAAuB,GAAIC,MAA8C,IAC7EC,KAAK,CAACC,OAAO,CAACF,MAAM,CAA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config-plugins';
2
- import { ResourceXMLConfig } from './withEdgeToEdge';
3
- export declare const withConfigureEdgeToEdgeEnforcement: ConfigPlugin<{
4
- disableEdgeToEdgeEnforcement: boolean;
5
- }>;
6
- export declare function configureEdgeToEdgeEnforcement(config: ResourceXMLConfig, disableEdgeToEdgeEnforcement: boolean): ResourceXMLConfig;
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.configureEdgeToEdgeEnforcement = configureEdgeToEdgeEnforcement;
7
- exports.withConfigureEdgeToEdgeEnforcement = void 0;
8
- function _configPlugins() {
9
- const data = require("@expo/config-plugins");
10
- _configPlugins = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- const OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE = 'android:windowOptOutEdgeToEdgeEnforcement';
16
- const withConfigureEdgeToEdgeEnforcement = (config, {
17
- disableEdgeToEdgeEnforcement
18
- }) => {
19
- return (0, _configPlugins().withAndroidStyles)(config, config => {
20
- return configureEdgeToEdgeEnforcement(config, disableEdgeToEdgeEnforcement);
21
- });
22
- };
23
- exports.withConfigureEdgeToEdgeEnforcement = withConfigureEdgeToEdgeEnforcement;
24
- function configureEdgeToEdgeEnforcement(config, disableEdgeToEdgeEnforcement) {
25
- const {
26
- style = []
27
- } = config.modResults.resources;
28
- const disableEdgeToEdgeEnforcementItem = {
29
- _: 'true',
30
- $: {
31
- name: OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE,
32
- 'tools:targetApi': '35'
33
- }
34
- };
35
- const mainThemeIndex = style.findIndex(({
36
- $
37
- }) => $.name === 'AppTheme');
38
- if (mainThemeIndex === -1) {
39
- return config;
40
- }
41
- const existingItem = style[mainThemeIndex].item.filter(({
42
- $
43
- }) => $.name !== OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE);
44
- if (disableEdgeToEdgeEnforcement) {
45
- existingItem.push(disableEdgeToEdgeEnforcementItem);
46
- }
47
- if (!config.modResults.resources.style) {
48
- return config;
49
- }
50
- config.modResults.resources.style[mainThemeIndex].item = existingItem;
51
- return config;
52
- }
53
- //# sourceMappingURL=withConfigureEdgeToEdgeEnforcement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withConfigureEdgeToEdgeEnforcement.js","names":["_configPlugins","data","require","OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE","withConfigureEdgeToEdgeEnforcement","config","disableEdgeToEdgeEnforcement","withAndroidStyles","configureEdgeToEdgeEnforcement","exports","style","modResults","resources","disableEdgeToEdgeEnforcementItem","_","$","name","mainThemeIndex","findIndex","existingItem","item","filter","push"],"sources":["../../../../src/plugins/unversioned/react-native-edge-to-edge/withConfigureEdgeToEdgeEnforcement.ts"],"sourcesContent":["import { ConfigPlugin, withAndroidStyles } from '@expo/config-plugins';\n\nimport { ResourceXMLConfig } from './withEdgeToEdge';\n\nconst OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE = 'android:windowOptOutEdgeToEdgeEnforcement';\n\nexport const withConfigureEdgeToEdgeEnforcement: ConfigPlugin<{\n disableEdgeToEdgeEnforcement: boolean;\n}> = (config, { disableEdgeToEdgeEnforcement }) => {\n return withAndroidStyles(config, (config) => {\n return configureEdgeToEdgeEnforcement(config, disableEdgeToEdgeEnforcement);\n });\n};\n\nexport function configureEdgeToEdgeEnforcement(\n config: ResourceXMLConfig,\n disableEdgeToEdgeEnforcement: boolean\n): ResourceXMLConfig {\n const { style = [] } = config.modResults.resources;\n\n const disableEdgeToEdgeEnforcementItem = {\n _: 'true',\n $: {\n name: OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE,\n 'tools:targetApi': '35',\n },\n };\n\n const mainThemeIndex = style.findIndex(({ $ }) => $.name === 'AppTheme');\n\n if (mainThemeIndex === -1) {\n return config;\n }\n\n const existingItem = style[mainThemeIndex].item.filter(\n ({ $ }) => $.name !== OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE\n );\n\n if (disableEdgeToEdgeEnforcement) {\n existingItem.push(disableEdgeToEdgeEnforcementItem);\n }\n if (!config.modResults.resources.style) {\n return config;\n }\n\n config.modResults.resources.style[mainThemeIndex].item = existingItem;\n return config;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,MAAME,8BAA8B,GAAG,2CAA2C;AAE3E,MAAMC,kCAEX,GAAGA,CAACC,MAAM,EAAE;EAAEC;AAA6B,CAAC,KAAK;EACjD,OAAO,IAAAC,kCAAiB,EAACF,MAAM,EAAGA,MAAM,IAAK;IAC3C,OAAOG,8BAA8B,CAACH,MAAM,EAAEC,4BAA4B,CAAC;EAC7E,CAAC,CAAC;AACJ,CAAC;AAACG,OAAA,CAAAL,kCAAA,GAAAA,kCAAA;AAEK,SAASI,8BAA8BA,CAC5CH,MAAyB,EACzBC,4BAAqC,EAClB;EACnB,MAAM;IAAEI,KAAK,GAAG;EAAG,CAAC,GAAGL,MAAM,CAACM,UAAU,CAACC,SAAS;EAElD,MAAMC,gCAAgC,GAAG;IACvCC,CAAC,EAAE,MAAM;IACTC,CAAC,EAAE;MACDC,IAAI,EAAEb,8BAA8B;MACpC,iBAAiB,EAAE;IACrB;EACF,CAAC;EAED,MAAMc,cAAc,GAAGP,KAAK,CAACQ,SAAS,CAAC,CAAC;IAAEH;EAAE,CAAC,KAAKA,CAAC,CAACC,IAAI,KAAK,UAAU,CAAC;EAExE,IAAIC,cAAc,KAAK,CAAC,CAAC,EAAE;IACzB,OAAOZ,MAAM;EACf;EAEA,MAAMc,YAAY,GAAGT,KAAK,CAACO,cAAc,CAAC,CAACG,IAAI,CAACC,MAAM,CACpD,CAAC;IAAEN;EAAE,CAAC,KAAKA,CAAC,CAACC,IAAI,KAAKb,8BACxB,CAAC;EAED,IAAIG,4BAA4B,EAAE;IAChCa,YAAY,CAACG,IAAI,CAACT,gCAAgC,CAAC;EACrD;EACA,IAAI,CAACR,MAAM,CAACM,UAAU,CAACC,SAAS,CAACF,KAAK,EAAE;IACtC,OAAOL,MAAM;EACf;EAEAA,MAAM,CAACM,UAAU,CAACC,SAAS,CAACF,KAAK,CAACO,cAAc,CAAC,CAACG,IAAI,GAAGD,YAAY;EACrE,OAAOd,MAAM;AACf","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- import { ConfigPlugin, ExportedConfigWithProps, AndroidConfig } from '@expo/config-plugins';
2
- import { type ExpoConfig } from '@expo/config-types';
3
- export type EdgeToEdgePlugin = ConfigPlugin<{
4
- android: {
5
- parentTheme?: string;
6
- enforceNavigationBarContrast?: boolean;
7
- };
8
- }>;
9
- export type ResourceXMLConfig = ExportedConfigWithProps<AndroidConfig.Resources.ResourceXML>;
10
- export type GradlePropertiesConfig = ExportedConfigWithProps<AndroidConfig.Properties.PropertiesItem[]>;
11
- export declare const withEdgeToEdge: ConfigPlugin<{
12
- projectRoot: string;
13
- }>;
14
- export declare function applyEdgeToEdge(config: ExpoConfig, projectRoot: string): ExpoConfig;
15
- export default withEdgeToEdge;
@@ -1,110 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.applyEdgeToEdge = applyEdgeToEdge;
7
- exports.withEdgeToEdge = exports.default = void 0;
8
- function _configPlugins() {
9
- const data = require("@expo/config-plugins");
10
- _configPlugins = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- function _helpers() {
16
- const data = require("./helpers");
17
- _helpers = function () {
18
- return data;
19
- };
20
- return data;
21
- }
22
- function _withConfigureEdgeToEdgeEnforcement() {
23
- const data = require("./withConfigureEdgeToEdgeEnforcement");
24
- _withConfigureEdgeToEdgeEnforcement = function () {
25
- return data;
26
- };
27
- return data;
28
- }
29
- function _withEdgeToEdgeEnabledGradleProperties() {
30
- const data = require("./withEdgeToEdgeEnabledGradleProperties");
31
- _withEdgeToEdgeEnabledGradleProperties = function () {
32
- return data;
33
- };
34
- return data;
35
- }
36
- function _withRestoreDefaultTheme() {
37
- const data = require("./withRestoreDefaultTheme");
38
- _withRestoreDefaultTheme = function () {
39
- return data;
40
- };
41
- return data;
42
- }
43
- const TAG = 'EDGE_TO_EDGE_PLUGIN';
44
- const withEdgeToEdge = (config, {
45
- projectRoot
46
- }) => {
47
- return applyEdgeToEdge(config, projectRoot);
48
- };
49
- exports.withEdgeToEdge = withEdgeToEdge;
50
- function applyEdgeToEdge(config, projectRoot) {
51
- // Check if someone has manually configured the config plugin
52
- const pluginIndex = (0, _helpers().edgeToEdgePluginIndex)(config);
53
- if (config.android?.edgeToEdgeEnabled === undefined && pluginIndex === null) {
54
- _configPlugins().WarningAggregator.addWarningAndroid(TAG, 'No configuration found for `edgeToEdgeEnabled` field in the project app config, falling back to false. In Android 16+ (targetSdkVersion 36) it will no longer be possible to disable edge-to-edge. Learn more:', 'https://expo.fyi/edge-to-edge-rollout');
55
- } else if (config.android?.edgeToEdgeEnabled === false && pluginIndex === null) {
56
- _configPlugins().WarningAggregator.addWarningAndroid(TAG, '`edgeToEdgeEnabled` field is explicitly set to false in the project app config. In Android 16+ (targetSdkVersion 36) it will no longer be possible to disable edge-to-edge. Learn more:', 'https://expo.fyi/edge-to-edge-rollout');
57
- }
58
- const edgeToEdgeConfigPlugin = (0, _helpers().loadEdgeToEdgeConfigPlugin)(projectRoot);
59
- if (edgeToEdgeConfigPlugin === null) {
60
- _configPlugins().WarningAggregator.addWarningAndroid(TAG, 'Failed to load the react-native-edge-to-edge config plugin, edge to edge functionality will be disabled. ' + 'To enable edge-to-edge make sure that `react-native-edge-to-edge` is installed in your project.');
61
-
62
- // Disable edge-to-edge enforcement if the plugin is not installed
63
- config = (0, _withConfigureEdgeToEdgeEnforcement().withConfigureEdgeToEdgeEnforcement)(config, {
64
- disableEdgeToEdgeEnforcement: true
65
- });
66
- config = (0, _withEdgeToEdgeEnabledGradleProperties().withEdgeToEdgeEnabledGradleProperties)(config, {
67
- edgeToEdgeEnabled: false
68
- });
69
- return (0, _withRestoreDefaultTheme().withRestoreDefaultTheme)(config);
70
- }
71
- const edgeToEdgeEnabled = (0, _helpers().hasEnabledEdgeToEdge)(config);
72
- config = (0, _withEdgeToEdgeEnabledGradleProperties().withEdgeToEdgeEnabledGradleProperties)(config, {
73
- edgeToEdgeEnabled
74
- });
75
-
76
- // Enable/disable edge-to-edge enforcement
77
- config = (0, _withConfigureEdgeToEdgeEnforcement().withConfigureEdgeToEdgeEnforcement)(config, {
78
- disableEdgeToEdgeEnforcement: !edgeToEdgeEnabled
79
- });
80
- if (pluginIndex !== null) {
81
- const warning = constructWarning(pluginIndex, config);
82
- if (warning) {
83
- _configPlugins().WarningAggregator.addWarningAndroid('EDGE_TO_EDGE_CONFLICT', warning);
84
- }
85
- return config;
86
- }
87
- if (config.android?.edgeToEdgeEnabled !== true) {
88
- return (0, _withRestoreDefaultTheme().withRestoreDefaultTheme)(config);
89
- }
90
-
91
- // Run `react-native-edge-to-edge` config plugin configuration if edge-to-edge is enabled and the user hasn't added their own
92
- // plugin configuration in `app.json` / `app.config.json`.
93
- return edgeToEdgeConfigPlugin(config, {
94
- android: {
95
- parentTheme: 'Default',
96
- enforceNavigationBarContrast: true
97
- }
98
- });
99
- }
100
- function constructWarning(pluginIndex, config) {
101
- if (pluginIndex === null) {
102
- return null;
103
- }
104
- if ((0, _helpers().hasEnabledEdgeToEdge)(config) && config?.android?.edgeToEdgeEnabled === false) {
105
- return `You have configured the \`react-native-edge-to-edge\` plugin in your config file, while also setting the \`android.edgeToEdgeEnabled\` ` + `field to \`false\`. The value of \`android.edgeToEdgeEnabled\` field will be ignored`;
106
- }
107
- return null;
108
- }
109
- var _default = exports.default = withEdgeToEdge;
110
- //# sourceMappingURL=withEdgeToEdge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withEdgeToEdge.js","names":["_configPlugins","data","require","_helpers","_withConfigureEdgeToEdgeEnforcement","_withEdgeToEdgeEnabledGradleProperties","_withRestoreDefaultTheme","TAG","withEdgeToEdge","config","projectRoot","applyEdgeToEdge","exports","pluginIndex","edgeToEdgePluginIndex","android","edgeToEdgeEnabled","undefined","WarningAggregator","addWarningAndroid","edgeToEdgeConfigPlugin","loadEdgeToEdgeConfigPlugin","withConfigureEdgeToEdgeEnforcement","disableEdgeToEdgeEnforcement","withEdgeToEdgeEnabledGradleProperties","withRestoreDefaultTheme","hasEnabledEdgeToEdge","warning","constructWarning","parentTheme","enforceNavigationBarContrast","_default","default"],"sources":["../../../../src/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdge.ts"],"sourcesContent":["import {\n ConfigPlugin,\n ExportedConfigWithProps,\n WarningAggregator,\n AndroidConfig,\n} from '@expo/config-plugins';\nimport { type ExpoConfig } from '@expo/config-types';\n\nimport { edgeToEdgePluginIndex, hasEnabledEdgeToEdge, loadEdgeToEdgeConfigPlugin } from './helpers';\nimport { withConfigureEdgeToEdgeEnforcement } from './withConfigureEdgeToEdgeEnforcement';\nimport { withEdgeToEdgeEnabledGradleProperties } from './withEdgeToEdgeEnabledGradleProperties';\nimport { withRestoreDefaultTheme } from './withRestoreDefaultTheme';\n\nconst TAG = 'EDGE_TO_EDGE_PLUGIN';\n\nexport type EdgeToEdgePlugin = ConfigPlugin<{\n android: {\n parentTheme?: string;\n enforceNavigationBarContrast?: boolean;\n };\n}>;\n\nexport type ResourceXMLConfig = ExportedConfigWithProps<AndroidConfig.Resources.ResourceXML>;\nexport type GradlePropertiesConfig = ExportedConfigWithProps<\n AndroidConfig.Properties.PropertiesItem[]\n>;\n\nexport const withEdgeToEdge: ConfigPlugin<{ projectRoot: string }> = (config, { projectRoot }) => {\n return applyEdgeToEdge(config, projectRoot);\n};\n\nexport function applyEdgeToEdge(config: ExpoConfig, projectRoot: string): ExpoConfig {\n // Check if someone has manually configured the config plugin\n const pluginIndex = edgeToEdgePluginIndex(config);\n if (config.android?.edgeToEdgeEnabled === undefined && pluginIndex === null) {\n WarningAggregator.addWarningAndroid(\n TAG,\n 'No configuration found for `edgeToEdgeEnabled` field in the project app config, falling back to false. In Android 16+ (targetSdkVersion 36) it will no longer be possible to disable edge-to-edge. Learn more:',\n 'https://expo.fyi/edge-to-edge-rollout'\n );\n } else if (config.android?.edgeToEdgeEnabled === false && pluginIndex === null) {\n WarningAggregator.addWarningAndroid(\n TAG,\n '`edgeToEdgeEnabled` field is explicitly set to false in the project app config. In Android 16+ (targetSdkVersion 36) it will no longer be possible to disable edge-to-edge. Learn more:',\n 'https://expo.fyi/edge-to-edge-rollout'\n );\n }\n\n const edgeToEdgeConfigPlugin = loadEdgeToEdgeConfigPlugin(projectRoot);\n\n if (edgeToEdgeConfigPlugin === null) {\n WarningAggregator.addWarningAndroid(\n TAG,\n 'Failed to load the react-native-edge-to-edge config plugin, edge to edge functionality will be disabled. ' +\n 'To enable edge-to-edge make sure that `react-native-edge-to-edge` is installed in your project.'\n );\n\n // Disable edge-to-edge enforcement if the plugin is not installed\n config = withConfigureEdgeToEdgeEnforcement(config, {\n disableEdgeToEdgeEnforcement: true,\n });\n\n config = withEdgeToEdgeEnabledGradleProperties(config, { edgeToEdgeEnabled: false });\n return withRestoreDefaultTheme(config);\n }\n const edgeToEdgeEnabled = hasEnabledEdgeToEdge(config);\n\n config = withEdgeToEdgeEnabledGradleProperties(config, { edgeToEdgeEnabled });\n\n // Enable/disable edge-to-edge enforcement\n config = withConfigureEdgeToEdgeEnforcement(config, {\n disableEdgeToEdgeEnforcement: !edgeToEdgeEnabled,\n });\n\n if (pluginIndex !== null) {\n const warning = constructWarning(pluginIndex, config);\n if (warning) {\n WarningAggregator.addWarningAndroid('EDGE_TO_EDGE_CONFLICT', warning);\n }\n return config;\n }\n\n if (config.android?.edgeToEdgeEnabled !== true) {\n return withRestoreDefaultTheme(config);\n }\n\n // Run `react-native-edge-to-edge` config plugin configuration if edge-to-edge is enabled and the user hasn't added their own\n // plugin configuration in `app.json` / `app.config.json`.\n return edgeToEdgeConfigPlugin(config, {\n android: {\n parentTheme: 'Default',\n enforceNavigationBarContrast: true,\n },\n });\n}\n\nfunction constructWarning(pluginIndex: number | null, config: ExpoConfig): string | null {\n if (pluginIndex === null) {\n return null;\n }\n\n if (hasEnabledEdgeToEdge(config) && config?.android?.edgeToEdgeEnabled === false) {\n return (\n `You have configured the \\`react-native-edge-to-edge\\` plugin in your config file, while also setting the \\`android.edgeToEdgeEnabled\\` ` +\n `field to \\`false\\`. The value of \\`android.edgeToEdgeEnabled\\` field will be ignored`\n );\n }\n return null;\n}\n\nexport default withEdgeToEdge;\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,oCAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,mCAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,uCAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,sCAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,yBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,wBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMM,GAAG,GAAG,qBAAqB;AAc1B,MAAMC,cAAqD,GAAGA,CAACC,MAAM,EAAE;EAAEC;AAAY,CAAC,KAAK;EAChG,OAAOC,eAAe,CAACF,MAAM,EAAEC,WAAW,CAAC;AAC7C,CAAC;AAACE,OAAA,CAAAJ,cAAA,GAAAA,cAAA;AAEK,SAASG,eAAeA,CAACF,M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OAAO,EAAE;MACXT,kCAAiB,CAACC,iBAAiB,CAAC,uBAAuB,EAAEQ,OAAO,CAAC;IACvE;IACA,OAAOlB,MAAM;EACf;EAEA,IAAIA,MAAM,CAACM,OAAO,EAAEC,iBAAiB,KAAK,IAAI,EAAE;IAC9C,OAAO,IAAAS,kDAAuB,EAAChB,MAAM,CAAC;EACxC;;EAEA;EACA;EACA,OAAOW,sBAAsB,CAACX,MAAM,EAAE;IACpCM,OAAO,EAAE;MACPc,WAAW,EAAE,SAAS;MACtBC,4BAA4B,EAAE;IAChC;EACF,CAAC,CAAC;AACJ;AAEA,SAASF,gBAAgBA,CAACf,WAA0B,EAAEJ,MAAkB,EAAiB;EACvF,IAAII,WAAW,KAAK,IAAI,EAAE;IACxB,OAAO,IAAI;EACb;EAEA,IAAI,IAAAa,+BAAoB,EAACjB,MAAM,CAAC,IAAIA,MAAM,EAAEM,OAAO,EAAEC,iBAAiB,KAAK,KAAK,EAAE;IAChF,OACE,yIAAyI,GACzI,sFAAsF;EAE1F;EACA,OAAO,IAAI;AACb;AAAC,IAAAe,QAAA,GAAAnB,OAAA,CAAAoB,OAAA,GAEcxB,cAAc","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- import type { ExpoConfig } from '@expo/config-types';
2
- import { GradlePropertiesConfig } from './withEdgeToEdge';
3
- export declare function withEdgeToEdgeEnabledGradleProperties(config: ExpoConfig, props: {
4
- edgeToEdgeEnabled: boolean;
5
- }): ExpoConfig;
6
- export declare function configureEdgeToEdgeEnabledGradleProperties(config: GradlePropertiesConfig, edgeToEdgeEnabled: boolean): GradlePropertiesConfig;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.configureEdgeToEdgeEnabledGradleProperties = configureEdgeToEdgeEnabledGradleProperties;
7
- exports.withEdgeToEdgeEnabledGradleProperties = withEdgeToEdgeEnabledGradleProperties;
8
- function _configPlugins() {
9
- const data = require("@expo/config-plugins");
10
- _configPlugins = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- const EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY = 'expo.edgeToEdgeEnabled';
16
- const EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT = 'Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin';
17
- function withEdgeToEdgeEnabledGradleProperties(config, props) {
18
- return (0, _configPlugins().withGradleProperties)(config, config => {
19
- return configureEdgeToEdgeEnabledGradleProperties(config, props.edgeToEdgeEnabled);
20
- });
21
- }
22
- function configureEdgeToEdgeEnabledGradleProperties(config, edgeToEdgeEnabled) {
23
- const propertyIndex = config.modResults.findIndex(item => item.type === 'property' && item.key === EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY);
24
- if (propertyIndex !== -1) {
25
- config.modResults.splice(propertyIndex, 1);
26
- }
27
- const commentIndex = config.modResults.findIndex(item => item.type === 'comment' && item.value === EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT);
28
- if (commentIndex !== -1) {
29
- config.modResults.splice(commentIndex, 1);
30
- }
31
- config.modResults.push({
32
- type: 'comment',
33
- value: EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT
34
- });
35
- config.modResults.push({
36
- type: 'property',
37
- key: EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY,
38
- value: edgeToEdgeEnabled ? 'true' : 'false'
39
- });
40
- return config;
41
- }
42
- //# sourceMappingURL=withEdgeToEdgeEnabledGradleProperties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withEdgeToEdgeEnabledGradleProperties.js","names":["_configPlugins","data","require","EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY","EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT","withEdgeToEdgeEnabledGradleProperties","config","props","withGradleProperties","configureEdgeToEdgeEnabledGradleProperties","edgeToEdgeEnabled","propertyIndex","modResults","findIndex","item","type","key","splice","commentIndex","value","push"],"sources":["../../../../src/plugins/unversioned/react-native-edge-to-edge/withEdgeToEdgeEnabledGradleProperties.ts"],"sourcesContent":["import { withGradleProperties } from '@expo/config-plugins';\nimport type { ExpoConfig } from '@expo/config-types';\n\nimport { GradlePropertiesConfig } from './withEdgeToEdge';\n\nconst EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY = 'expo.edgeToEdgeEnabled';\nconst EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT =\n 'Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin';\n\nexport function withEdgeToEdgeEnabledGradleProperties(\n config: ExpoConfig,\n props: {\n edgeToEdgeEnabled: boolean;\n }\n) {\n return withGradleProperties(config, (config) => {\n return configureEdgeToEdgeEnabledGradleProperties(config, props.edgeToEdgeEnabled);\n });\n}\n\nexport function configureEdgeToEdgeEnabledGradleProperties(\n config: GradlePropertiesConfig,\n edgeToEdgeEnabled: boolean\n): GradlePropertiesConfig {\n const propertyIndex = config.modResults.findIndex(\n (item) => item.type === 'property' && item.key === EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY\n );\n if (propertyIndex !== -1) {\n config.modResults.splice(propertyIndex, 1);\n }\n const commentIndex = config.modResults.findIndex(\n (item) => item.type === 'comment' && item.value === EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT\n );\n if (commentIndex !== -1) {\n config.modResults.splice(commentIndex, 1);\n }\n\n config.modResults.push({\n type: 'comment',\n value: EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT,\n });\n config.modResults.push({\n type: 'property',\n key: EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY,\n value: edgeToEdgeEnabled ? 'true' : 'false',\n });\n\n return config;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAA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ConfigPlugin } from '@expo/config-plugins';
2
- import { ResourceXMLConfig } from './withEdgeToEdge';
3
- export declare const withRestoreDefaultTheme: ConfigPlugin;
4
- export declare function restoreDefaultTheme(config: ResourceXMLConfig): ResourceXMLConfig;
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.restoreDefaultTheme = restoreDefaultTheme;
7
- exports.withRestoreDefaultTheme = void 0;
8
- function _configPlugins() {
9
- const data = require("@expo/config-plugins");
10
- _configPlugins = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- const withRestoreDefaultTheme = config => {
16
- // Default theme for SDK 53 and onwards projects
17
- return (0, _configPlugins().withAndroidStyles)(config, config => {
18
- return restoreDefaultTheme(config);
19
- });
20
- };
21
- exports.withRestoreDefaultTheme = withRestoreDefaultTheme;
22
- function restoreDefaultTheme(config) {
23
- const DEFAULT_THEME = 'Theme.AppCompat.DayNight.NoActionBar';
24
- const {
25
- style = []
26
- } = config.modResults.resources;
27
- const mainThemeIndex = style.findIndex(({
28
- $
29
- }) => $.name === 'AppTheme');
30
- if (mainThemeIndex === -1) {
31
- return config;
32
- }
33
- if (style[mainThemeIndex].$?.parent.includes('EdgeToEdge')) {
34
- config.modResults.resources.style = [{
35
- $: {
36
- name: 'AppTheme',
37
- parent: DEFAULT_THEME
38
- },
39
- item: style[mainThemeIndex].item
40
- }, ...style.filter(({
41
- $
42
- }) => $.name !== 'AppTheme')];
43
- }
44
- return config;
45
- }
46
- //# sourceMappingURL=withRestoreDefaultTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withRestoreDefaultTheme.js","names":["_configPlugins","data","require","withRestoreDefaultTheme","config","withAndroidStyles","restoreDefaultTheme","exports","DEFAULT_THEME","style","modResults","resources","mainThemeIndex","findIndex","$","name","parent","includes","item","filter"],"sources":["../../../../src/plugins/unversioned/react-native-edge-to-edge/withRestoreDefaultTheme.ts"],"sourcesContent":["import { ConfigPlugin, withAndroidStyles } from '@expo/config-plugins';\n\nimport { ResourceXMLConfig } from './withEdgeToEdge';\n\nexport const withRestoreDefaultTheme: ConfigPlugin = (config) => {\n // Default theme for SDK 53 and onwards projects\n return withAndroidStyles(config, (config) => {\n return restoreDefaultTheme(config);\n });\n};\n\nexport function restoreDefaultTheme(config: ResourceXMLConfig): ResourceXMLConfig {\n const DEFAULT_THEME = 'Theme.AppCompat.DayNight.NoActionBar';\n\n const { style = [] } = config.modResults.resources;\n const mainThemeIndex = style.findIndex(({ $ }) => $.name === 'AppTheme');\n if (mainThemeIndex === -1) {\n return config;\n }\n\n if (style[mainThemeIndex].$?.parent.includes('EdgeToEdge')) {\n config.modResults.resources.style = [\n {\n $: {\n name: 'AppTheme',\n parent: DEFAULT_THEME,\n },\n item: style[mainThemeIndex].item,\n },\n ...style.filter(({ $ }) => $.name !== 'AppTheme'),\n ];\n }\n return config;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIO,MAAME,uBAAqC,GAAIC,MAAM,IAAK;EAC/D;EACA,OAAO,IAAAC,kCAAiB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC3C,OAAOE,mBAAmB,CAACF,MAAM,CAAC;EACpC,CAAC,CAAC;AACJ,CAAC;AAACG,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEK,SAASG,mBAAmBA,CAACF,MAAyB,EAAqB;EAChF,MAAMI,aAAa,GAAG,sCAAsC;EAE5D,MAAM;IAAEC,KAAK,GAAG;EAAG,CAAC,GAAGL,MAAM,CAACM,UAAU,CAACC,SAAS;EAClD,MAAMC,cAAc,GAAGH,KAAK,CAACI,SAAS,CAAC,CAAC;IAAEC;EAAE,CAAC,KAAKA,CAAC,CAACC,IAAI,KAAK,UAAU,CAAC;EACxE,IAAIH,cAAc,KAAK,CAAC,CAAC,EAAE;IACzB,OAAOR,MAAM;EACf;EAEA,IAAIK,KAAK,CAACG,cAAc,CAAC,CAACE,CAAC,EAAEE,MAAM,CAACC,QAAQ,CAAC,YAAY,CAAC,EAAE;IAC1Db,MAAM,CAACM,UAAU,CAACC,SAAS,CAACF,KAAK,GAAG,CAClC;MACEK,CAAC,EAAE;QACDC,IAAI,EAAE,UAAU;QAChBC,MAAM,EAAER;MACV,CAAC;MACDU,IAAI,EAAET,KAAK,CAACG,cAAc,CAAC,CAACM;IAC9B,CAAC,EACD,GAAGT,KAAK,CAACU,MAAM,CAAC,CAAC;MAAEL;IAAE,CAAC,KAAKA,CAAC,CAACC,IAAI,KAAK,UAAU,CAAC,CAClD;EACH;EACA,OAAOX,MAAM;AACf","ignoreList":[]}