@expo/config-plugins 4.0.6 → 4.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/build/Plugin.types.js +6 -6
- package/build/android/AllowBackup.js +1 -1
- package/build/android/Colors.js +3 -3
- package/build/android/EasBuild.js +1 -1
- package/build/android/GoogleServices.js +3 -3
- package/build/android/IntentFilters.js +1 -1
- package/build/android/JsEngine.js +2 -1
- package/build/android/JsEngine.js.map +1 -1
- package/build/android/Manifest.js +10 -10
- package/build/android/Name.d.ts +2 -1
- package/build/android/Name.js +7 -4
- package/build/android/Name.js.map +1 -1
- package/build/android/Orientation.js +2 -1
- package/build/android/Orientation.js.map +1 -1
- package/build/android/Package.js +4 -4
- package/build/android/Package.js.map +1 -1
- package/build/android/Paths.js +9 -9
- package/build/android/Permissions.js +6 -6
- package/build/android/Resources.js +5 -5
- package/build/android/Scheme.js +3 -3
- package/build/android/StatusBar.js +3 -3
- package/build/android/Strings.js +1 -1
- package/build/android/Styles.js +5 -5
- package/build/android/Updates.d.ts +0 -5
- package/build/android/Updates.js +14 -23
- package/build/android/Updates.js.map +1 -1
- package/build/android/Version.js +2 -2
- package/build/android/WindowSoftInputMode.js +1 -1
- package/build/android/codeMod.js +2 -2
- package/build/android/index.d.ts +1 -3
- package/build/android/index.js +1 -35
- package/build/android/index.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +57 -49
- package/build/index.js.map +1 -1
- package/build/ios/Bitcode.js +1 -1
- package/build/ios/BuildScheme.js +2 -2
- package/build/ios/BundleIdentifier.js +3 -3
- package/build/ios/DeviceFamily.js +3 -3
- package/build/ios/Entitlements.js +2 -2
- package/build/ios/Entitlements.js.map +1 -1
- package/build/ios/Google.js +2 -2
- package/build/ios/JsEngine.d.ts +2 -1
- package/build/ios/JsEngine.js +2 -1
- package/build/ios/JsEngine.js.map +1 -1
- package/build/ios/Locales.js +1 -1
- package/build/ios/Maps.js +29 -8
- package/build/ios/Maps.js.map +1 -1
- package/build/ios/Orientation.js +2 -1
- package/build/ios/Orientation.js.map +1 -1
- package/build/ios/Paths.js +14 -14
- package/build/ios/Paths.js.map +1 -1
- package/build/ios/Permissions.js +1 -1
- package/build/ios/Permissions.js.map +1 -1
- package/build/ios/Scheme.js +4 -4
- package/build/ios/Swift.js +2 -2
- package/build/ios/Target.js +5 -5
- package/build/ios/Updates.d.ts +0 -5
- package/build/ios/Updates.js +14 -23
- package/build/ios/Updates.js.map +1 -1
- package/build/ios/Version.js +3 -3
- package/build/ios/codeMod.js +2 -2
- package/build/ios/index.d.ts +1 -3
- package/build/ios/index.js +3 -35
- package/build/ios/index.js.map +1 -1
- package/build/ios/utils/Xcodeproj.js +9 -9
- package/build/plugins/android-plugins.js +1 -1
- package/build/plugins/createBaseMod.js +2 -2
- package/build/plugins/createBaseMod.js.map +1 -1
- package/build/plugins/ios-plugins.d.ts +2 -2
- package/build/plugins/ios-plugins.js +2 -2
- package/build/plugins/ios-plugins.js.map +1 -1
- package/build/plugins/mod-compiler.js +3 -3
- package/build/plugins/mod-compiler.js.map +1 -1
- package/build/plugins/withAndroidBaseMods.js +1 -1
- package/build/plugins/withIosBaseMods.d.ts +3 -3
- package/build/plugins/withIosBaseMods.js +1 -1
- package/build/plugins/withIosBaseMods.js.map +1 -1
- package/build/plugins/withStaticPlugin.js +16 -5
- package/build/plugins/withStaticPlugin.js.map +1 -1
- package/build/utils/Updates.d.ts +1 -0
- package/build/utils/Updates.js +24 -1
- package/build/utils/Updates.js.map +1 -1
- package/build/utils/XML.d.ts +6 -0
- package/build/utils/XML.js +57 -10
- package/build/utils/XML.js.map +1 -1
- package/build/utils/errors.js +1 -1
- package/build/utils/generateCode.js +2 -2
- package/build/utils/history.js +1 -1
- package/build/utils/modules.js +1 -1
- package/build/utils/plugin-resolver.js +4 -4
- package/build/utils/sortObject.js +2 -2
- package/build/utils/warnings.js +1 -1
- package/package.json +3 -3
- package/build/android/RootViewBackgroundColor.d.ts +0 -6
- package/build/android/RootViewBackgroundColor.js +0 -81
- package/build/android/RootViewBackgroundColor.js.map +0 -1
- package/build/android/UserInterfaceStyle.d.ts +0 -10
- package/build/android/UserInterfaceStyle.js +0 -119
- package/build/android/UserInterfaceStyle.js.map +0 -1
- package/build/ios/RootViewBackgroundColor.d.ts +0 -6
- package/build/ios/RootViewBackgroundColor.js +0 -70
- package/build/ios/RootViewBackgroundColor.js.map +0 -1
- package/build/ios/UserInterfaceStyle.d.ts +0 -5
- package/build/ios/UserInterfaceStyle.js +0 -59
- package/build/ios/UserInterfaceStyle.js.map +0 -1
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setRootViewBackgroundColor = setRootViewBackgroundColor;
|
|
7
|
-
exports.getRootViewBackgroundColor = getRootViewBackgroundColor;
|
|
8
|
-
exports.withRootViewBackgroundColor = void 0;
|
|
9
|
-
|
|
10
|
-
function _normalizeColor() {
|
|
11
|
-
const data = _interopRequireDefault(require("@react-native/normalize-color"));
|
|
12
|
-
|
|
13
|
-
_normalizeColor = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _iosPlugins() {
|
|
21
|
-
const data = require("../plugins/ios-plugins");
|
|
22
|
-
|
|
23
|
-
_iosPlugins = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
|
-
// @ts-ignore: uses flow
|
|
33
|
-
// Maps to the template AppDelegate.m
|
|
34
|
-
const BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';
|
|
35
|
-
|
|
36
|
-
const withRootViewBackgroundColor = config => {
|
|
37
|
-
config = (0, _iosPlugins().withInfoPlist)(config, config => {
|
|
38
|
-
config.modResults = setRootViewBackgroundColor(config, config.modResults);
|
|
39
|
-
return config;
|
|
40
|
-
});
|
|
41
|
-
return config;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
exports.withRootViewBackgroundColor = withRootViewBackgroundColor;
|
|
45
|
-
|
|
46
|
-
function setRootViewBackgroundColor(config, infoPlist) {
|
|
47
|
-
const backgroundColor = getRootViewBackgroundColor(config);
|
|
48
|
-
|
|
49
|
-
if (!backgroundColor) {
|
|
50
|
-
delete infoPlist[BACKGROUND_COLOR_KEY];
|
|
51
|
-
} else {
|
|
52
|
-
let color = (0, _normalizeColor().default)(backgroundColor);
|
|
53
|
-
|
|
54
|
-
if (!color) {
|
|
55
|
-
throw new Error('Invalid background color on iOS');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
color = (color << 24 | color >>> 8) >>> 0;
|
|
59
|
-
infoPlist[BACKGROUND_COLOR_KEY] = color;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return infoPlist;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function getRootViewBackgroundColor(config) {
|
|
66
|
-
var _config$ios;
|
|
67
|
-
|
|
68
|
-
return ((_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.backgroundColor) || config.backgroundColor || null;
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=RootViewBackgroundColor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/RootViewBackgroundColor.ts"],"names":["BACKGROUND_COLOR_KEY","withRootViewBackgroundColor","config","modResults","setRootViewBackgroundColor","infoPlist","backgroundColor","getRootViewBackgroundColor","color","Error","ios"],"mappings":";;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAJA;AAOA;AACA,MAAMA,oBAAoB,GAAG,4BAA7B;;AAEO,MAAMC,2BAAyC,GAAGC,MAAM,IAAI;AACjEA,EAAAA,MAAM,GAAG,iCAAcA,MAAd,EAAsBA,MAAM,IAAI;AACvCA,IAAAA,MAAM,CAACC,UAAP,GAAoBC,0BAA0B,CAACF,MAAD,EAASA,MAAM,CAACC,UAAhB,CAA9C;AACA,WAAOD,MAAP;AACD,GAHQ,CAAT;AAIA,SAAOA,MAAP;AACD,CANM;;;;AAQA,SAASE,0BAAT,CACLF,MADK,EAELG,SAFK,EAGM;AACX,QAAMC,eAAe,GAAGC,0BAA0B,CAACL,MAAD,CAAlD;;AACA,MAAI,CAACI,eAAL,EAAsB;AACpB,WAAOD,SAAS,CAACL,oBAAD,CAAhB;AACD,GAFD,MAEO;AACL,QAAIQ,KAAK,GAAG,+BAAeF,eAAf,CAAZ;;AACA,QAAI,CAACE,KAAL,EAAY;AACV,YAAM,IAAIC,KAAJ,CAAU,iCAAV,CAAN;AACD;;AACDD,IAAAA,KAAK,GAAG,CAAEA,KAAK,IAAI,EAAV,GAAiBA,KAAK,KAAK,CAA5B,MAAoC,CAA5C;AACAH,IAAAA,SAAS,CAACL,oBAAD,CAAT,GAAkCQ,KAAlC;AACD;;AACD,SAAOH,SAAP;AACD;;AAEM,SAASE,0BAAT,CAAoCL,MAApC,EAAyF;AAAA;;AAC9F,SAAO,gBAAAA,MAAM,CAACQ,GAAP,4DAAYJ,eAAZ,KAA+BJ,MAAM,CAACI,eAAtC,IAAyD,IAAhE;AACD","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n// @ts-ignore: uses flow\nimport normalizeColor from '@react-native/normalize-color';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withInfoPlist } from '../plugins/ios-plugins';\nimport { InfoPlist } from './IosConfig.types';\n\n// Maps to the template AppDelegate.m\nconst BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';\n\nexport const withRootViewBackgroundColor: ConfigPlugin = config => {\n config = withInfoPlist(config, config => {\n config.modResults = setRootViewBackgroundColor(config, config.modResults);\n return config;\n });\n return config;\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 return infoPlist;\n}\n\nexport function getRootViewBackgroundColor(config: Pick<ExpoConfig, 'ios' | 'backgroundColor'>) {\n return config.ios?.backgroundColor || config.backgroundColor || null;\n}\n"],"file":"RootViewBackgroundColor.js"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
2
|
-
import { InfoPlist } from './IosConfig.types';
|
|
3
|
-
export declare const withUserInterfaceStyle: import("..").ConfigPlugin<void>;
|
|
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;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getUserInterfaceStyle = getUserInterfaceStyle;
|
|
7
|
-
exports.setUserInterfaceStyle = setUserInterfaceStyle;
|
|
8
|
-
exports.withUserInterfaceStyle = void 0;
|
|
9
|
-
|
|
10
|
-
function _iosPlugins() {
|
|
11
|
-
const data = require("../plugins/ios-plugins");
|
|
12
|
-
|
|
13
|
-
_iosPlugins = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const withUserInterfaceStyle = (0, _iosPlugins().createInfoPlistPlugin)(setUserInterfaceStyle, 'withUserInterfaceStyle');
|
|
21
|
-
exports.withUserInterfaceStyle = withUserInterfaceStyle;
|
|
22
|
-
|
|
23
|
-
function getUserInterfaceStyle(config) {
|
|
24
|
-
var _ref, _config$ios$userInter, _config$ios;
|
|
25
|
-
|
|
26
|
-
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';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function setUserInterfaceStyle(config, {
|
|
30
|
-
UIUserInterfaceStyle,
|
|
31
|
-
...infoPlist
|
|
32
|
-
}) {
|
|
33
|
-
const userInterfaceStyle = getUserInterfaceStyle(config);
|
|
34
|
-
const style = mapUserInterfaceStyleForInfoPlist(userInterfaceStyle);
|
|
35
|
-
|
|
36
|
-
if (!style) {
|
|
37
|
-
return infoPlist;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return { ...infoPlist,
|
|
41
|
-
UIUserInterfaceStyle: style
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function mapUserInterfaceStyleForInfoPlist(userInterfaceStyle) {
|
|
46
|
-
switch (userInterfaceStyle) {
|
|
47
|
-
case 'light':
|
|
48
|
-
return 'Light';
|
|
49
|
-
|
|
50
|
-
case 'dark':
|
|
51
|
-
return 'Dark';
|
|
52
|
-
|
|
53
|
-
case 'automatic':
|
|
54
|
-
return 'Automatic';
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=UserInterfaceStyle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/UserInterfaceStyle.ts"],"names":["withUserInterfaceStyle","setUserInterfaceStyle","getUserInterfaceStyle","config","ios","userInterfaceStyle","UIUserInterfaceStyle","infoPlist","style","mapUserInterfaceStyleForInfoPlist"],"mappings":";;;;;;;;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,sBAAsB,GAAG,yCACpCC,qBADoC,EAEpC,wBAFoC,CAA/B;;;AAKA,SAASC,qBAAT,CACLC,MADK,EAEG;AAAA;;AACR,yDAAOA,MAAM,CAACC,GAAd,gDAAO,YAAYC,kBAAnB,yEAAyCF,MAAM,CAACE,kBAAhD,uCAAsE,OAAtE;AACD;;AAEM,SAASJ,qBAAT,CACLE,MADK,EAEL;AAAEG,EAAAA,oBAAF;AAAwB,KAAGC;AAA3B,CAFK,EAGM;AACX,QAAMF,kBAAkB,GAAGH,qBAAqB,CAACC,MAAD,CAAhD;AACA,QAAMK,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,CAA2CJ,kBAA3C,EAA8F;AAC5F,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 { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { InfoPlist, InterfaceStyle } from './IosConfig.types';\n\nexport const withUserInterfaceStyle = createInfoPlistPlugin(\n setUserInterfaceStyle,\n 'withUserInterfaceStyle'\n);\n\nexport function getUserInterfaceStyle(\n config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>\n): string {\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(userInterfaceStyle: string): InterfaceStyle | null {\n switch (userInterfaceStyle) {\n case 'light':\n return 'Light';\n case 'dark':\n return 'Dark';\n case 'automatic':\n return 'Automatic';\n }\n\n return null;\n}\n"],"file":"UserInterfaceStyle.js"}
|