@expo/config-plugins 4.0.3 → 4.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.
- 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 -4
- package/build/android/index.js +1 -52
- package/build/android/index.js.map +1 -1
- package/build/index.js +54 -53
- package/build/index.js.map +1 -1
- package/build/ios/Bitcode.d.ts +33 -0
- package/build/ios/Bitcode.js +131 -0
- package/build/ios/Bitcode.js.map +1 -0
- 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.js +2 -1
- package/build/ios/JsEngine.js.map +1 -1
- package/build/ios/Locales.js +1 -1
- package/build/ios/Maps.js +32 -18
- 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 +2 -3
- package/build/ios/index.js +20 -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.js +2 -2
- 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.js +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 +4 -4
- package/build/android/NavigationBar.d.ts +0 -9
- package/build/android/NavigationBar.js +0 -141
- package/build/android/NavigationBar.js.map +0 -1
- 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
- package/build/utils/resolvePackageRootFolder.d.ts +0 -1
- package/build/utils/resolvePackageRootFolder.js +0 -57
- package/build/utils/resolvePackageRootFolder.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugins/withStaticPlugin.ts"],"names":["EXPO_DEBUG","EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS","isModuleMissingError","name","error","includes","code","message","isUnexpectedTokenError","SyntaxError","PluginError","match","withStaticPlugin","config","props","projectRoot","_internal","pluginResolve","pluginProps","plugin","_resolverError","withPlugin","
|
|
1
|
+
{"version":3,"sources":["../../src/plugins/withStaticPlugin.ts"],"names":["EXPO_DEBUG","EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS","EXPO_USE_UNVERSIONED_PLUGINS","isModuleMissingError","name","error","includes","code","message","isUnexpectedTokenError","SyntaxError","PluginError","match","withStaticPlugin","config","props","projectRoot","_internal","pluginResolve","pluginProps","plugin","_resolverError","withPlugin","_isLegacyPlugin","fallback","console","log","shouldMuteWarning"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAMA,MAAMA,UAAU,GAAG,uBAAQ,YAAR,EAAsB,KAAtB,CAAnB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ACA,UAAIX,KAAK,CAACS,QAAV,EAAoB;AAClB,YAAI,CAACL,WAAL,EAAkBA,WAAW,GAAG,EAAd,CADA,CAElB;;AACAA,QAAAA,WAAW,CAACE,cAAZ,GAA6BhB,KAA7B;AACAiB,QAAAA,UAAU,GAAGP,KAAK,CAACS,QAAnB;AACD,OALD,MAKO;AACL;AACA,cAAMnB,KAAN;AACD;AACF;AACF,GAtDM,MAsDA;AACL,UAAM,KAAIM,qBAAJ,EACH,iCAAgC,OAAOO,aAAc,EADlD,EAEJ,qBAFI,CAAN;AAID,GAhFqB,CAkFtB;;;AACAJ,EAAAA,MAAM,GAAGQ,UAAU,CAACR,MAAD,EAASK,WAAT,CAAnB;AACA,SAAOL,MAAP;AACD,CA1FM","sourcesContent":["import assert from 'assert';\nimport { boolish } from 'getenv';\n\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { PluginError } from '../utils/errors';\nimport {\n assertInternalProjectRoot,\n normalizeStaticPlugin,\n resolveConfigPluginFunction,\n} from '../utils/plugin-resolver';\n\nconst EXPO_DEBUG = boolish('EXPO_DEBUG', false);\n\n// Show all error info related to plugin resolution.\nconst EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS = boolish('EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS', false);\n// Force using the fallback unversioned plugin instead of a local versioned copy,\n// this should only be used for testing the CLI.\nconst EXPO_USE_UNVERSIONED_PLUGINS = boolish('EXPO_USE_UNVERSIONED_PLUGINS', false);\n\nfunction isModuleMissingError(name: string, error: Error): boolean {\n // @ts-ignore\n if (['MODULE_NOT_FOUND', 'PLUGIN_NOT_FOUND'].includes(error.code)) {\n return true;\n }\n return error.message.includes(`Cannot find module '${name}'`);\n}\n\nfunction isUnexpectedTokenError(error: Error): boolean {\n if (\n error instanceof SyntaxError ||\n (error instanceof PluginError && error.code === 'INVALID_PLUGIN_IMPORT')\n ) {\n return (\n // These are the most common errors that'll be thrown when a package isn't transpiled correctly.\n !!error.message.match(/Unexpected token/) ||\n !!error.message.match(/Cannot use import statement/)\n );\n }\n return false;\n}\n\n/**\n * Resolves static module plugin and potentially falls back on a provided plugin if the module cannot be resolved\n *\n * @param config\n * @param fallback Plugin with `_resolverError` explaining why the module couldn't be used\n * @param projectRoot optional project root, fallback to _internal.projectRoot. Used for testing.\n * @param _isLegacyPlugin Used to suppress errors thrown by plugins that are applied automatically\n */\nexport const withStaticPlugin: ConfigPlugin<{\n plugin: StaticPlugin | ConfigPlugin | string;\n fallback?: ConfigPlugin<{ _resolverError: Error } & any>;\n projectRoot?: string;\n _isLegacyPlugin?: boolean;\n}> = (config, props) => {\n let projectRoot = props.projectRoot;\n if (!projectRoot) {\n projectRoot = config._internal?.projectRoot;\n assertInternalProjectRoot(projectRoot);\n }\n\n let [pluginResolve, pluginProps] = normalizeStaticPlugin(props.plugin);\n // Ensure no one uses this property by accident.\n assert(\n !pluginProps?._resolverError,\n `Plugin property '_resolverError' is a reserved property of \\`withStaticPlugin\\``\n );\n\n let withPlugin: ConfigPlugin<unknown>;\n\n if (\n // Function was provided, no need to resolve: [withPlugin, {}]\n typeof pluginResolve === 'function'\n ) {\n withPlugin = pluginResolve;\n } else if (typeof pluginResolve === 'string') {\n try {\n // Resolve and evaluate plugins.\n withPlugin = resolveConfigPluginFunction(projectRoot, pluginResolve);\n\n // Only force if the project has the versioned plugin, otherwise use default behavior.\n // This helps see which plugins are being skipped.\n if (\n EXPO_USE_UNVERSIONED_PLUGINS &&\n !!withPlugin &&\n !!props._isLegacyPlugin &&\n !!props.fallback\n ) {\n console.log(`Force \"${pluginResolve}\" to unversioned plugin`);\n withPlugin = props.fallback;\n }\n } catch (error: any) {\n if (EXPO_DEBUG) {\n if (EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS) {\n // Log the error in debug mode for plugins with fallbacks (like the Expo managed plugins).\n console.log(`Error resolving plugin \"${pluginResolve}\"`);\n console.log(error);\n console.log();\n } else {\n const shouldMuteWarning =\n props._isLegacyPlugin &&\n (isModuleMissingError(pluginResolve, error) || isUnexpectedTokenError(error));\n if (!shouldMuteWarning) {\n if (isModuleMissingError(pluginResolve, error)) {\n // Prevent causing log spew for basic resolution errors.\n console.log(`Could not find plugin \"${pluginResolve}\"`);\n } else {\n // Log the error in debug mode for plugins with fallbacks (like the Expo managed plugins).\n console.log(`Error resolving plugin \"${pluginResolve}\"`);\n console.log(error);\n console.log();\n }\n }\n }\n }\n // TODO: Maybe allow for `PluginError`s to be thrown so external plugins can assert invalid options.\n\n // If the static module failed to resolve, attempt to use a fallback.\n // This enables support for built-in plugins with versioned variations living in other packages.\n if (props.fallback) {\n if (!pluginProps) pluginProps = {};\n // Pass this to the fallback plugin for potential warnings about needing to install a versioned package.\n pluginProps._resolverError = error;\n withPlugin = props.fallback;\n } else {\n // If no fallback, throw the resolution error.\n throw error;\n }\n }\n } else {\n throw new PluginError(\n `Plugin is an unexpected type: ${typeof pluginResolve}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n\n // Execute the plugin.\n config = withPlugin(config, pluginProps);\n return config;\n};\n"],"file":"withStaticPlugin.js"}
|
package/build/utils/Updates.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare function getNativeVersion(config: Pick<ExpoConfig, 'version'> & {
|
|
|
10
10
|
* @return an expoConfig with only string valued platform specific runtime versions.
|
|
11
11
|
*/
|
|
12
12
|
export declare const withRuntimeVersion: (config: ExpoConfig) => ExpoConfig;
|
|
13
|
+
export declare function getRuntimeVersionNullable(...[config, platform]: Parameters<typeof getRuntimeVersion>): string | null;
|
|
13
14
|
export declare function getRuntimeVersion(config: Pick<ExpoConfig, 'version' | 'runtimeVersion' | 'sdkVersion'> & {
|
|
14
15
|
android?: Pick<Android, 'versionCode' | 'runtimeVersion'>;
|
|
15
16
|
ios?: Pick<IOS, 'buildNumber' | 'runtimeVersion'>;
|
package/build/utils/Updates.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getUpdateUrl = getUpdateUrl;
|
|
7
6
|
exports.getNativeVersion = getNativeVersion;
|
|
8
7
|
exports.getRuntimeVersion = getRuntimeVersion;
|
|
8
|
+
exports.getRuntimeVersionNullable = getRuntimeVersionNullable;
|
|
9
|
+
exports.getUpdateUrl = getUpdateUrl;
|
|
9
10
|
exports.withRuntimeVersion = void 0;
|
|
10
11
|
|
|
11
12
|
function _sdkRuntimeVersions() {
|
|
@@ -18,6 +19,16 @@ function _sdkRuntimeVersions() {
|
|
|
18
19
|
return data;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
function _getenv() {
|
|
23
|
+
const data = require("getenv");
|
|
24
|
+
|
|
25
|
+
_getenv = function () {
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
|
|
21
32
|
function _() {
|
|
22
33
|
const data = require("..");
|
|
23
34
|
|
|
@@ -97,6 +108,18 @@ const withRuntimeVersion = config => {
|
|
|
97
108
|
|
|
98
109
|
exports.withRuntimeVersion = withRuntimeVersion;
|
|
99
110
|
|
|
111
|
+
function getRuntimeVersionNullable(...[config, platform]) {
|
|
112
|
+
try {
|
|
113
|
+
return getRuntimeVersion(config, platform);
|
|
114
|
+
} catch (e) {
|
|
115
|
+
if ((0, _getenv().boolish)('EXPO_DEBUG', false)) {
|
|
116
|
+
console.log(e);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
100
123
|
function getRuntimeVersion(config, platform) {
|
|
101
124
|
var _config$platform$runt, _config$platform;
|
|
102
125
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/Updates.ts"],"names":["getUpdateUrl","config","username","updates","url","user","owner","slug","getNativeVersion","platform","version","IOSConfig","Version","getVersion","buildNumber","getBuildNumber","versionCode","AndroidConfig","getVersionCode","Error","withRuntimeVersion","ios","runtimeVersion","getRuntimeVersion","android","policy","sdkVersion","JSON","stringify"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/utils/Updates.ts"],"names":["getUpdateUrl","config","username","updates","url","user","owner","slug","getNativeVersion","platform","version","IOSConfig","Version","getVersion","buildNumber","getBuildNumber","versionCode","AndroidConfig","getVersionCode","Error","withRuntimeVersion","ios","runtimeVersion","getRuntimeVersion","android","getRuntimeVersionNullable","e","console","log","policy","sdkVersion","JSON","stringify"],"mappings":";;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAOO,SAASA,YAAT,CACLC,MADK,EAELC,QAFK,EAGU;AAAA;;AACf,yBAAID,MAAM,CAACE,OAAX,4CAAI,gBAAgBC,GAApB,EAAyB;AAAA;;AACvB,+BAAOH,MAAM,CAACE,OAAd,qDAAO,iBAAgBC,GAAvB;AACD;;AAED,QAAMC,IAAI,GAAG,OAAOJ,MAAM,CAACK,KAAd,KAAwB,QAAxB,GAAmCL,MAAM,CAACK,KAA1C,GAAkDJ,QAA/D;;AACA,MAAI,CAACG,IAAL,EAAW;AACT,WAAO,IAAP;AACD;;AACD,SAAQ,qBAAoBA,IAAK,IAAGJ,MAAM,CAACM,IAAK,EAAhD;AACD;;AAEM,SAASC,gBAAT,CACLP,MADK,EAKLQ,QALK,EAMG;AACR,QAAMC,OAAO,GAAGC,cAAUC,OAAV,CAAkBC,UAAlB,CAA6BZ,MAA7B,CAAhB;;AACA,UAAQQ,QAAR;AACE,SAAK,KAAL;AAAY;AACV,cAAMK,WAAW,GAAGH,cAAUC,OAAV,CAAkBG,cAAlB,CAAiCd,MAAjC,CAApB;;AACA,eAAQ,GAAES,OAAQ,IAAGI,WAAY,GAAjC;AACD;;AACD,SAAK,SAAL;AAAgB;AACd,cAAME,WAAW,GAAGC,kB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,qDAAG,iBAAkBa,cAArB,yEAAuCrB,MAAM,CAACqB,cAAlE;;AACA,MAAI,CAACA,cAAL,EAAqB;AACnB,UAAM,IAAIH,KAAJ,CACH,wEAAuEV,QAAS,GAD7E,CAAN;AAGD;;AAED,MAAI,OAAOa,cAAP,KAA0B,QAA9B,EAAwC;AACtC,WAAOA,cAAP;AACD,GAFD,MAEO,IAAIA,cAAc,CAACO,MAAf,KAA0B,eAA9B,EAA+C;AACpD,WAAOrB,gBAAgB,CAACP,MAAD,EAASQ,QAAT,CAAvB;AACD,GAFM,MAEA,IAAIa,cAAc,CAACO,MAAf,KAA0B,YAA9B,EAA4C;AACjD,QAAI,CAAC5B,MAAM,CAAC6B,UAAZ,EAAwB;AACtB,YAAM,IAAIX,KAAJ,CAAU,4EAAV,CAAN;AACD;;AACD,WAAO,0DAA+BlB,MAAM,CAAC6B,UAAtC,CAAP;AACD;;AAED,QAAM,IAAIX,KAAJ,CACH,IACC,OAAOG,cAAP,KAA0B,QAA1B,GAAqCS,IAAI,CAACC,SAAL,CAAeV,cAAf,CAArC,GAAsEA,cACvE,sHAHG,CAAN;AAKD","sourcesContent":["import { Android, ExpoConfig, IOS } from '@expo/config-types';\nimport { getRuntimeVersionForSDKVersion } from '@expo/sdk-runtime-versions';\nimport { boolish } from 'getenv';\n\nimport { AndroidConfig, IOSConfig } from '..';\n\nexport type ExpoConfigUpdates = Pick<\n ExpoConfig,\n 'sdkVersion' | 'owner' | 'runtimeVersion' | 'updates' | 'slug'\n>;\n\nexport function getUpdateUrl(\n config: Pick<ExpoConfigUpdates, 'owner' | 'slug' | 'updates'>,\n username: string | null\n): string | null {\n if (config.updates?.url) {\n return config.updates?.url;\n }\n\n const user = typeof config.owner === 'string' ? config.owner : username;\n if (!user) {\n return null;\n }\n return `https://exp.host/@${user}/${config.slug}`;\n}\n\nexport function getNativeVersion(\n config: Pick<ExpoConfig, 'version'> & {\n android?: Pick<Android, 'versionCode'>;\n ios?: Pick<IOS, 'buildNumber'>;\n },\n platform: 'android' | 'ios'\n): string {\n const version = IOSConfig.Version.getVersion(config);\n switch (platform) {\n case 'ios': {\n const buildNumber = IOSConfig.Version.getBuildNumber(config);\n return `${version}(${buildNumber})`;\n }\n case 'android': {\n const versionCode = AndroidConfig.Version.getVersionCode(config);\n return `${version}(${versionCode})`;\n }\n default: {\n throw new Error(\n `\"${platform}\" is not a supported platform. Choose either \"ios\" or \"android\".`\n );\n }\n }\n}\n\n/**\n * Compute runtime version policies.\n * @return an expoConfig with only string valued platform specific runtime versions.\n */\nexport const withRuntimeVersion: (config: ExpoConfig) => ExpoConfig = config => {\n if (config.ios?.runtimeVersion || config.runtimeVersion) {\n config.ios = {\n ...config.ios,\n runtimeVersion: getRuntimeVersion(config, 'ios'),\n };\n }\n if (config.android?.runtimeVersion || config.runtimeVersion) {\n config.android = {\n ...config.android,\n runtimeVersion: getRuntimeVersion(config, 'android'),\n };\n }\n delete config.runtimeVersion;\n return config;\n};\n\nexport function getRuntimeVersionNullable(\n ...[config, platform]: Parameters<typeof getRuntimeVersion>\n): string | null {\n try {\n return getRuntimeVersion(config, platform);\n } catch (e) {\n if (boolish('EXPO_DEBUG', false)) {\n console.log(e);\n }\n return null;\n }\n}\n\nexport function getRuntimeVersion(\n config: Pick<ExpoConfig, 'version' | 'runtimeVersion' | 'sdkVersion'> & {\n android?: Pick<Android, 'versionCode' | 'runtimeVersion'>;\n ios?: Pick<IOS, 'buildNumber' | 'runtimeVersion'>;\n },\n platform: 'android' | 'ios'\n): string {\n const runtimeVersion = config[platform]?.runtimeVersion ?? config.runtimeVersion;\n if (!runtimeVersion) {\n throw new Error(\n `There is neither a value or a policy set for the runtime version on \"${platform}\"`\n );\n }\n\n if (typeof runtimeVersion === 'string') {\n return runtimeVersion;\n } else if (runtimeVersion.policy === 'nativeVersion') {\n return getNativeVersion(config, platform);\n } else if (runtimeVersion.policy === 'sdkVersion') {\n if (!config.sdkVersion) {\n throw new Error(\"An SDK version must be defined when using the 'sdkVersion' runtime policy.\");\n }\n return getRuntimeVersionForSDKVersion(config.sdkVersion);\n }\n\n throw new Error(\n `\"${\n typeof runtimeVersion === 'object' ? JSON.stringify(runtimeVersion) : runtimeVersion\n }\" is not a valid runtime version. getRuntimeVersion only supports a string, \"sdkVersion\", or \"nativeVersion\" policy.`\n );\n}\n"],"file":"Updates.js"}
|
package/build/utils/XML.d.ts
CHANGED
|
@@ -17,3 +17,9 @@ export declare function format(manifest: any, { indentLevel, newline }?: {
|
|
|
17
17
|
indentLevel?: number | undefined;
|
|
18
18
|
newline?: string | undefined;
|
|
19
19
|
}): string;
|
|
20
|
+
/**
|
|
21
|
+
* Escapes Android string literals, specifically characters `"`, `'`, `\`, `\n`, `\r`, `\t`
|
|
22
|
+
*
|
|
23
|
+
* @param value unescaped Android XML string literal.
|
|
24
|
+
*/
|
|
25
|
+
export declare function escapeAndroidString(value: string): string;
|
package/build/utils/XML.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.readXMLAsync = readXMLAsync;
|
|
8
|
-
exports.parseXMLAsync = parseXMLAsync;
|
|
6
|
+
exports.escapeAndroidString = escapeAndroidString;
|
|
9
7
|
exports.format = format;
|
|
8
|
+
exports.parseXMLAsync = parseXMLAsync;
|
|
9
|
+
exports.readXMLAsync = readXMLAsync;
|
|
10
|
+
exports.writeXMLAsync = writeXMLAsync;
|
|
10
11
|
|
|
11
12
|
function _fsExtra() {
|
|
12
13
|
const data = _interopRequireDefault(require("fs-extra"));
|
|
@@ -51,7 +52,7 @@ function _xml2js() {
|
|
|
51
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
52
53
|
|
|
53
54
|
async function writeXMLAsync(options) {
|
|
54
|
-
const xml =
|
|
55
|
+
const xml = format(options.xml);
|
|
55
56
|
await _fsExtra().default.ensureDir(_path().default.dirname(options.path));
|
|
56
57
|
await _fsExtra().default.writeFile(options.path, xml);
|
|
57
58
|
}
|
|
@@ -88,9 +89,24 @@ function format(manifest, {
|
|
|
88
89
|
if (typeof manifest === 'string') {
|
|
89
90
|
xmlInput = manifest;
|
|
90
91
|
} else if (manifest.toString) {
|
|
92
|
+
var _manifest$resources;
|
|
93
|
+
|
|
91
94
|
const builder = new (_xml2js().Builder)({
|
|
92
95
|
headless: true
|
|
93
|
-
});
|
|
96
|
+
}); // For strings.xml
|
|
97
|
+
|
|
98
|
+
if (Array.isArray(manifest === null || manifest === void 0 ? void 0 : (_manifest$resources = manifest.resources) === null || _manifest$resources === void 0 ? void 0 : _manifest$resources.string)) {
|
|
99
|
+
for (const string of manifest === null || manifest === void 0 ? void 0 : (_manifest$resources2 = manifest.resources) === null || _manifest$resources2 === void 0 ? void 0 : _manifest$resources2.string) {
|
|
100
|
+
var _manifest$resources2;
|
|
101
|
+
|
|
102
|
+
if (string.$.translatable === 'false' || string.$.translatable === false) {
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
string._ = escapeAndroidString(string._);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
94
110
|
xmlInput = builder.buildObject(manifest);
|
|
95
111
|
return xmlInput;
|
|
96
112
|
} else {
|
|
@@ -108,9 +124,6 @@ function format(manifest, {
|
|
|
108
124
|
if (line.match(/.+<\/\w[^>]*>$/)) {
|
|
109
125
|
indent = 0;
|
|
110
126
|
} else if (line.match(/^<\/\w/)) {
|
|
111
|
-
// Somehow istanbul doesn't see the else case as covered, although it is. Skip it.
|
|
112
|
-
|
|
113
|
-
/* istanbul ignore else */
|
|
114
127
|
if (pad !== 0) {
|
|
115
128
|
pad -= 1;
|
|
116
129
|
}
|
|
@@ -121,10 +134,44 @@ function format(manifest, {
|
|
|
121
134
|
}
|
|
122
135
|
|
|
123
136
|
const padding = stringTimesN(pad, indentString);
|
|
124
|
-
formatted += padding + line + newline;
|
|
125
|
-
|
|
137
|
+
formatted += padding + line + newline;
|
|
126
138
|
pad += indent;
|
|
127
139
|
});
|
|
128
140
|
return formatted.trim();
|
|
129
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Escapes Android string literals, specifically characters `"`, `'`, `\`, `\n`, `\r`, `\t`
|
|
144
|
+
*
|
|
145
|
+
* @param value unescaped Android XML string literal.
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
function escapeAndroidString(value) {
|
|
150
|
+
value = value.replace(/[\n\r\t'"@]/g, m => {
|
|
151
|
+
switch (m) {
|
|
152
|
+
case '"':
|
|
153
|
+
case "'":
|
|
154
|
+
case '@':
|
|
155
|
+
return '\\' + m;
|
|
156
|
+
|
|
157
|
+
case '\n':
|
|
158
|
+
return '\\n';
|
|
159
|
+
|
|
160
|
+
case '\r':
|
|
161
|
+
return '\\r';
|
|
162
|
+
|
|
163
|
+
case '\t':
|
|
164
|
+
return '\\t';
|
|
165
|
+
|
|
166
|
+
default:
|
|
167
|
+
throw new Error(`Cannot escape unhandled XML character: ${m}`);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
if (value.match(/(^\s|\s$)/)) {
|
|
172
|
+
value = '"' + value + '"';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return value;
|
|
176
|
+
}
|
|
130
177
|
//# sourceMappingURL=XML.js.map
|
package/build/utils/XML.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/XML.ts"],"names":["writeXMLAsync","options","xml","
|
|
1
|
+
{"version":3,"sources":["../../src/utils/XML.ts"],"names":["writeXMLAsync","options","xml","format","fs","ensureDir","path","dirname","writeFile","readXMLAsync","contents","readFile","encoding","flag","parser","Parser","manifest","parseStringPromise","fallback","parseXMLAsync","stringTimesN","n","char","Array","join","indentLevel","newline","EOL","xmlInput","toString","builder","Builder","headless","isArray","resources","string","$","translatable","_","escapeAndroidString","buildObject","Error","indentString","formatted","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E,eAAO,KAAP;;AACF;AACE,cAAM,IAAIf,KAAJ,CAAW,0CAAyCe,CAAE,EAAtD,CAAN;AAZJ;AAcD,GAfO,CAAR;;AAgBA,MAAID,KAAK,CAACF,KAAN,CAAY,WAAZ,CAAJ,EAA8B;AAC5BE,IAAAA,KAAK,GAAG,MAAMA,KAAN,GAAc,GAAtB;AACD;;AACD,SAAOA,KAAP;AACD","sourcesContent":["import fs from 'fs-extra';\nimport { EOL } from 'os';\nimport path from 'path';\nimport { Builder, Parser } from 'xml2js';\n\nexport type XMLValue = boolean | number | string | null | XMLArray | XMLObject;\n\nexport interface XMLArray extends Array<XMLValue> {}\n\nexport interface XMLObject {\n [key: string]: XMLValue | undefined;\n}\n\nexport async function writeXMLAsync(options: { path: string; xml: any }): Promise<void> {\n const xml = format(options.xml);\n await fs.ensureDir(path.dirname(options.path));\n await fs.writeFile(options.path, xml);\n}\n\nexport async function readXMLAsync(options: {\n path: string;\n fallback?: string | null;\n}): Promise<XMLObject> {\n let contents: string = '';\n try {\n contents = await fs.readFile(options.path, { encoding: 'utf8', flag: 'r' });\n } catch {\n // catch and use fallback\n }\n const parser = new Parser();\n const manifest = await parser.parseStringPromise(contents || options.fallback || '');\n return manifest;\n}\n\nexport async function parseXMLAsync(contents: string): Promise<XMLObject> {\n const xml = await new Parser().parseStringPromise(contents);\n return xml;\n}\n\nconst stringTimesN = (n: number, char: string) => Array(n + 1).join(char);\n\nexport function format(manifest: any, { indentLevel = 2, newline = EOL } = {}): string {\n let xmlInput: string;\n if (typeof manifest === 'string') {\n xmlInput = manifest;\n } else if (manifest.toString) {\n const builder = new Builder({\n headless: true,\n });\n\n // For strings.xml\n if (Array.isArray(manifest?.resources?.string)) {\n for (const string of manifest?.resources?.string) {\n if (string.$.translatable === 'false' || string.$.translatable === false) {\n continue;\n }\n string._ = escapeAndroidString(string._);\n }\n }\n\n xmlInput = builder.buildObject(manifest);\n\n return xmlInput;\n } else {\n throw new Error(`Invalid XML value passed in: ${manifest}`);\n }\n const indentString = stringTimesN(indentLevel, ' ');\n\n let formatted = '';\n const regex = /(>)(<)(\\/*)/g;\n const xml = xmlInput.replace(regex, `$1${newline}$2$3`);\n let pad = 0;\n xml\n .split(/\\r?\\n/)\n .map((line: string) => line.trim())\n .forEach((line: string) => {\n let indent = 0;\n if (line.match(/.+<\\/\\w[^>]*>$/)) {\n indent = 0;\n } else if (line.match(/^<\\/\\w/)) {\n if (pad !== 0) {\n pad -= 1;\n }\n } else if (line.match(/^<\\w([^>]*[^/])?>.*$/)) {\n indent = 1;\n } else {\n indent = 0;\n }\n\n const padding = stringTimesN(pad, indentString);\n formatted += padding + line + newline;\n pad += indent;\n });\n\n return formatted.trim();\n}\n\n/**\n * Escapes Android string literals, specifically characters `\"`, `'`, `\\`, `\\n`, `\\r`, `\\t`\n *\n * @param value unescaped Android XML string literal.\n */\nexport function escapeAndroidString(value: string): string {\n value = value.replace(/[\\n\\r\\t'\"@]/g, m => {\n switch (m) {\n case '\"':\n case \"'\":\n case '@':\n return '\\\\' + m;\n case '\\n':\n return '\\\\n';\n case '\\r':\n return '\\\\r';\n case '\\t':\n return '\\\\t';\n default:\n throw new Error(`Cannot escape unhandled XML character: ${m}`);\n }\n });\n if (value.match(/(^\\s|\\s$)/)) {\n value = '\"' + value + '\"';\n }\n return value;\n}\n"],"file":"XML.js"}
|
package/build/utils/errors.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.UnexpectedError = exports.PluginError = void 0;
|
|
7
7
|
|
|
8
8
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.createGeneratedHeaderComment = createGeneratedHeaderComment;
|
|
7
|
+
exports.createHash = createHash;
|
|
6
8
|
exports.mergeContents = mergeContents;
|
|
7
9
|
exports.removeContents = removeContents;
|
|
8
10
|
exports.removeGeneratedContents = removeGeneratedContents;
|
|
9
|
-
exports.createGeneratedHeaderComment = createGeneratedHeaderComment;
|
|
10
|
-
exports.createHash = createHash;
|
|
11
11
|
|
|
12
12
|
function _crypto() {
|
|
13
13
|
const data = _interopRequireDefault(require("crypto"));
|
package/build/utils/history.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getHistoryItem = getHistoryItem;
|
|
7
6
|
exports.addHistoryItem = addHistoryItem;
|
|
7
|
+
exports.getHistoryItem = getHistoryItem;
|
|
8
8
|
|
|
9
9
|
function getHistoryItem(config, name) {
|
|
10
10
|
var _config$_internal$plu, _config$_internal, _config$_internal$plu2;
|
package/build/utils/modules.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.fileExistsAsync = fileExistsAsync;
|
|
7
6
|
exports.directoryExistsAsync = directoryExistsAsync;
|
|
8
7
|
exports.fileExists = fileExists;
|
|
8
|
+
exports.fileExistsAsync = fileExistsAsync;
|
|
9
9
|
|
|
10
10
|
function _fs() {
|
|
11
11
|
const data = _interopRequireDefault(require("fs"));
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.assertInternalProjectRoot = assertInternalProjectRoot;
|
|
7
7
|
exports.moduleNameIsDirectFileReference = moduleNameIsDirectFileReference;
|
|
8
8
|
exports.normalizeStaticPlugin = normalizeStaticPlugin;
|
|
9
|
-
exports.
|
|
9
|
+
exports.pluginFileName = void 0;
|
|
10
|
+
exports.resolveConfigPluginExport = resolveConfigPluginExport;
|
|
10
11
|
exports.resolveConfigPluginFunction = resolveConfigPluginFunction;
|
|
11
12
|
exports.resolveConfigPluginFunctionWithInfo = resolveConfigPluginFunctionWithInfo;
|
|
12
|
-
exports.
|
|
13
|
-
exports.pluginFileName = void 0;
|
|
13
|
+
exports.resolvePluginForModule = resolvePluginForModule;
|
|
14
14
|
|
|
15
15
|
function _assert() {
|
|
16
16
|
const data = _interopRequireDefault(require("assert"));
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.reverseSortString = void 0;
|
|
7
7
|
exports.sortObjWithOrder = sortObjWithOrder;
|
|
8
|
+
exports.sortObject = sortObject;
|
|
8
9
|
exports.sortWithOrder = sortWithOrder;
|
|
9
|
-
exports.reverseSortString = void 0;
|
|
10
10
|
|
|
11
11
|
function sortObject(obj, compareFn) {
|
|
12
12
|
return Object.keys(obj).sort(compareFn).reduce((acc, key) => ({ ...acc,
|
package/build/utils/warnings.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.addWarningAndroid = addWarningAndroid;
|
|
7
|
-
exports.addWarningIOS = addWarningIOS;
|
|
8
7
|
exports.addWarningForPlatform = addWarningForPlatform;
|
|
8
|
+
exports.addWarningIOS = addWarningIOS;
|
|
9
9
|
|
|
10
10
|
function _chalk() {
|
|
11
11
|
const data = _interopRequireDefault(require("chalk"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config-plugins",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.8",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"paths"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@expo/config-types": "^43.0.
|
|
36
|
-
"@expo/json-file": "8.2.
|
|
37
|
-
"@expo/plist": "0.0.
|
|
35
|
+
"@expo/config-types": "^43.0.1",
|
|
36
|
+
"@expo/json-file": "8.2.34",
|
|
37
|
+
"@expo/plist": "0.0.16",
|
|
38
38
|
"@react-native/normalize-color": "^2.0.0",
|
|
39
39
|
"chalk": "^4.1.2",
|
|
40
40
|
"debug": "^4.3.1",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
2
|
-
import { ConfigPlugin } from '../Plugin.types';
|
|
3
|
-
import { ResourceXML } from './Resources';
|
|
4
|
-
export declare const withNavigationBar: ConfigPlugin;
|
|
5
|
-
export declare function setNavigationBarColors(config: Pick<ExpoConfig, 'androidNavigationBar'>, colors: ResourceXML): ResourceXML;
|
|
6
|
-
export declare function setNavigationBarStyles(config: Pick<ExpoConfig, 'androidNavigationBar'>, styles: ResourceXML): ResourceXML;
|
|
7
|
-
export declare function getNavigationBarImmersiveMode(config: Pick<ExpoConfig, 'androidNavigationBar'>): "leanback" | "immersive" | "sticky-immersive" | null;
|
|
8
|
-
export declare function getNavigationBarColor(config: Pick<ExpoConfig, 'androidNavigationBar'>): string | null;
|
|
9
|
-
export declare function getNavigationBarStyle(config: Pick<ExpoConfig, 'androidNavigationBar'>): "light-content" | "dark-content";
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setNavigationBarColors = setNavigationBarColors;
|
|
7
|
-
exports.setNavigationBarStyles = setNavigationBarStyles;
|
|
8
|
-
exports.getNavigationBarImmersiveMode = getNavigationBarImmersiveMode;
|
|
9
|
-
exports.getNavigationBarColor = getNavigationBarColor;
|
|
10
|
-
exports.getNavigationBarStyle = getNavigationBarStyle;
|
|
11
|
-
exports.withNavigationBar = void 0;
|
|
12
|
-
|
|
13
|
-
function _androidPlugins() {
|
|
14
|
-
const data = require("../plugins/android-plugins");
|
|
15
|
-
|
|
16
|
-
_androidPlugins = function () {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function _warnings() {
|
|
24
|
-
const data = require("../utils/warnings");
|
|
25
|
-
|
|
26
|
-
_warnings = function () {
|
|
27
|
-
return data;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _Colors() {
|
|
34
|
-
const data = require("./Colors");
|
|
35
|
-
|
|
36
|
-
_Colors = function () {
|
|
37
|
-
return data;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function _Resources() {
|
|
44
|
-
const data = require("./Resources");
|
|
45
|
-
|
|
46
|
-
_Resources = function () {
|
|
47
|
-
return data;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return data;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _Styles() {
|
|
54
|
-
const data = require("./Styles");
|
|
55
|
-
|
|
56
|
-
_Styles = function () {
|
|
57
|
-
return data;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return data;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const NAVIGATION_BAR_COLOR = 'navigationBarColor';
|
|
64
|
-
|
|
65
|
-
const withNavigationBar = config => {
|
|
66
|
-
const immersiveMode = getNavigationBarImmersiveMode(config);
|
|
67
|
-
|
|
68
|
-
if (immersiveMode) {
|
|
69
|
-
// Immersive mode needs to be set programmatically
|
|
70
|
-
// TODO: Resolve
|
|
71
|
-
(0, _warnings().addWarningAndroid)('androidNavigationBar.visible', 'Hiding the navigation bar must be done programmatically', 'https://developer.android.com/training/system-ui/immersive');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
config = withNavigationBarColors(config);
|
|
75
|
-
config = withNavigationBarStyles(config);
|
|
76
|
-
return config;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
exports.withNavigationBar = withNavigationBar;
|
|
80
|
-
|
|
81
|
-
const withNavigationBarColors = config => {
|
|
82
|
-
return (0, _androidPlugins().withAndroidColors)(config, config => {
|
|
83
|
-
config.modResults = setNavigationBarColors(config, config.modResults);
|
|
84
|
-
return config;
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const withNavigationBarStyles = config => {
|
|
89
|
-
return (0, _androidPlugins().withAndroidStyles)(config, config => {
|
|
90
|
-
config.modResults = setNavigationBarStyles(config, config.modResults);
|
|
91
|
-
return config;
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
function setNavigationBarColors(config, colors) {
|
|
96
|
-
const hexString = getNavigationBarColor(config);
|
|
97
|
-
|
|
98
|
-
if (hexString) {
|
|
99
|
-
colors = (0, _Colors().setColorItem)((0, _Resources().buildResourceItem)({
|
|
100
|
-
name: NAVIGATION_BAR_COLOR,
|
|
101
|
-
value: hexString
|
|
102
|
-
}), colors);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return colors;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function setNavigationBarStyles(config, styles) {
|
|
109
|
-
styles = (0, _Styles().assignStylesValue)(styles, {
|
|
110
|
-
add: !!getNavigationBarColor(config),
|
|
111
|
-
parent: (0, _Styles().getAppThemeLightNoActionBarGroup)(),
|
|
112
|
-
name: `android:${NAVIGATION_BAR_COLOR}`,
|
|
113
|
-
value: `@color/${NAVIGATION_BAR_COLOR}`
|
|
114
|
-
});
|
|
115
|
-
styles = (0, _Styles().assignStylesValue)(styles, {
|
|
116
|
-
add: getNavigationBarStyle(config) === 'dark-content',
|
|
117
|
-
parent: (0, _Styles().getAppThemeLightNoActionBarGroup)(),
|
|
118
|
-
name: 'android:windowLightNavigationBar',
|
|
119
|
-
value: 'true'
|
|
120
|
-
});
|
|
121
|
-
return styles;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function getNavigationBarImmersiveMode(config) {
|
|
125
|
-
var _config$androidNaviga;
|
|
126
|
-
|
|
127
|
-
return ((_config$androidNaviga = config.androidNavigationBar) === null || _config$androidNaviga === void 0 ? void 0 : _config$androidNaviga.visible) || null;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function getNavigationBarColor(config) {
|
|
131
|
-
var _config$androidNaviga2;
|
|
132
|
-
|
|
133
|
-
return ((_config$androidNaviga2 = config.androidNavigationBar) === null || _config$androidNaviga2 === void 0 ? void 0 : _config$androidNaviga2.backgroundColor) || null;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function getNavigationBarStyle(config) {
|
|
137
|
-
var _config$androidNaviga3;
|
|
138
|
-
|
|
139
|
-
return ((_config$androidNaviga3 = config.androidNavigationBar) === null || _config$androidNaviga3 === void 0 ? void 0 : _config$androidNaviga3.barStyle) || 'light-content';
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=NavigationBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/android/NavigationBar.ts"],"names":["NAVIGATION_BAR_COLOR","withNavigationBar","config","immersiveMode","getNavigationBarImmersiveMode","withNavigationBarColors","withNavigationBarStyles","modResults","setNavigationBarColors","setNavigationBarStyles","colors","hexString","getNavigationBarColor","name","value","styles","add","parent","getNavigationBarStyle","androidNavigationBar","visible","backgroundColor","barStyle"],"mappings":";;;;;;;;;;;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;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LP,MADK,EAELa,MAFK,EAGQ;AACbA,EAAAA,MAAM,GAAG,iCAAkBA,MAAlB,EAA0B;AACjCC,IAAAA,GAAG,EAAE,CAAC,CAACJ,qBAAqB,CAACV,MAAD,CADK;AAEjCe,IAAAA,MAAM,EAAE,iDAFyB;AAGjCJ,IAAAA,IAAI,EAAG,WAAUb,oBAAqB,EAHL;AAIjCc,IAAAA,KAAK,EAAG,UAASd,oBAAqB;AAJL,GAA1B,CAAT;AAOAe,EAAAA,MAAM,GAAG,iCAAkBA,MAAlB,EAA0B;AACjCC,IAAAA,GAAG,EAAEE,qBAAqB,CAAChB,MAAD,CAArB,KAAkC,cADN;AAEjCe,IAAAA,MAAM,EAAE,iDAFyB;AAGjCJ,IAAAA,IAAI,EAAE,kCAH2B;AAIjCC,IAAAA,KAAK,EAAE;AAJ0B,GAA1B,CAAT;AAOA,SAAOC,MAAP;AACD;;AAEM,SAASX,6BAAT,CAAuCF,MAAvC,EAAyF;AAAA;;AAC9F,SAAO,0BAAAA,MAAM,CAACiB,oBAAP,gFAA6BC,OAA7B,KAAwC,IAA/C;AACD;;AAEM,SAASR,qBAAT,CAA+BV,MAA/B,EAAiF;AAAA;;AACtF,SAAO,2BAAAA,MAAM,CAACiB,oBAAP,kFAA6BE,eAA7B,KAAgD,IAAvD;AACD;;AAEM,SAASH,qBAAT,CAA+BhB,MAA/B,EAAiF;AAAA;;AACtF,SAAO,2BAAAA,MAAM,CAACiB,oBAAP,kFAA6BG,QAA7B,KAAyC,eAAhD;AACD","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withAndroidColors, withAndroidStyles } from '../plugins/android-plugins';\nimport { addWarningAndroid } from '../utils/warnings';\nimport { setColorItem } from './Colors';\nimport { buildResourceItem, ResourceXML } from './Resources';\nimport { assignStylesValue, getAppThemeLightNoActionBarGroup } from './Styles';\n\nconst NAVIGATION_BAR_COLOR = 'navigationBarColor';\n\nexport const withNavigationBar: ConfigPlugin = config => {\n const immersiveMode = getNavigationBarImmersiveMode(config);\n if (immersiveMode) {\n // Immersive mode needs to be set programmatically\n // TODO: Resolve\n addWarningAndroid(\n 'androidNavigationBar.visible',\n 'Hiding the navigation bar must be done programmatically',\n 'https://developer.android.com/training/system-ui/immersive'\n );\n }\n\n config = withNavigationBarColors(config);\n config = withNavigationBarStyles(config);\n return config;\n};\n\nconst withNavigationBarColors: ConfigPlugin = config => {\n return withAndroidColors(config, config => {\n config.modResults = setNavigationBarColors(config, config.modResults);\n return config;\n });\n};\n\nconst withNavigationBarStyles: ConfigPlugin = config => {\n return withAndroidStyles(config, config => {\n config.modResults = setNavigationBarStyles(config, config.modResults);\n return config;\n });\n};\n\nexport function setNavigationBarColors(\n config: Pick<ExpoConfig, 'androidNavigationBar'>,\n colors: ResourceXML\n): ResourceXML {\n const hexString = getNavigationBarColor(config);\n if (hexString) {\n colors = setColorItem(\n buildResourceItem({\n name: NAVIGATION_BAR_COLOR,\n value: hexString,\n }),\n colors\n );\n }\n return colors;\n}\n\nexport function setNavigationBarStyles(\n config: Pick<ExpoConfig, 'androidNavigationBar'>,\n styles: ResourceXML\n): ResourceXML {\n styles = assignStylesValue(styles, {\n add: !!getNavigationBarColor(config),\n parent: getAppThemeLightNoActionBarGroup(),\n name: `android:${NAVIGATION_BAR_COLOR}`,\n value: `@color/${NAVIGATION_BAR_COLOR}`,\n });\n\n styles = assignStylesValue(styles, {\n add: getNavigationBarStyle(config) === 'dark-content',\n parent: getAppThemeLightNoActionBarGroup(),\n name: 'android:windowLightNavigationBar',\n value: 'true',\n });\n\n return styles;\n}\n\nexport function getNavigationBarImmersiveMode(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.visible || null;\n}\n\nexport function getNavigationBarColor(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.backgroundColor || null;\n}\n\nexport function getNavigationBarStyle(config: Pick<ExpoConfig, 'androidNavigationBar'>) {\n return config.androidNavigationBar?.barStyle || 'light-content';\n}\n"],"file":"NavigationBar.js"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
2
|
-
import { ConfigPlugin } from '../Plugin.types';
|
|
3
|
-
export declare const withRootViewBackgroundColor: 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;
|