react-native-bootsplash 6.0.0-beta.0 → 6.0.0-beta.2
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/dist/commonjs/addon/index.js +31 -31
- package/dist/commonjs/generate.js +34 -7
- package/dist/commonjs/generate.js.map +1 -1
- package/dist/module/addon/index.js +31 -31
- package/dist/module/generate.js +34 -7
- package/dist/module/generate.js.map +1 -1
- package/dist/typescript/generate.d.ts +1 -0
- package/dist/typescript/generate.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generate.ts +34 -9
package/src/generate.ts
CHANGED
|
@@ -1064,6 +1064,7 @@ ${pc.blue("┗━━━━━━━━━━━━━━━━━━━━━━
|
|
|
1064
1064
|
export type ExpoProps = {
|
|
1065
1065
|
assetsDir?: string;
|
|
1066
1066
|
edgeToEdge?: boolean;
|
|
1067
|
+
darkContentBarsStyle?: boolean;
|
|
1067
1068
|
};
|
|
1068
1069
|
|
|
1069
1070
|
export type ExpoPlugin = Expo.ConfigPlugin<ExpoProps>;
|
|
@@ -1157,7 +1158,15 @@ const withMainActivity: ExpoPlugin = (config) =>
|
|
|
1157
1158
|
|
|
1158
1159
|
const withAndroidStyles: ExpoPlugin = (config, props) =>
|
|
1159
1160
|
Expo.withAndroidStyles(config, async (config) => {
|
|
1160
|
-
const {
|
|
1161
|
+
const {
|
|
1162
|
+
assetsDir = "assets/bootsplash",
|
|
1163
|
+
edgeToEdge = false,
|
|
1164
|
+
darkContentBarsStyle,
|
|
1165
|
+
} = props;
|
|
1166
|
+
|
|
1167
|
+
const { modResults } = config;
|
|
1168
|
+
const { resources } = modResults;
|
|
1169
|
+
const { style = [] } = resources;
|
|
1161
1170
|
|
|
1162
1171
|
const manifest = (await hfs.json(
|
|
1163
1172
|
path.resolve(workingPath, assetsDir, "manifest.json"),
|
|
@@ -1184,20 +1193,36 @@ const withAndroidStyles: ExpoPlugin = (config, props) =>
|
|
|
1184
1193
|
_: "@drawable/bootsplash_brand",
|
|
1185
1194
|
});
|
|
1186
1195
|
}
|
|
1196
|
+
if (darkContentBarsStyle != null) {
|
|
1197
|
+
item.push({
|
|
1198
|
+
$: { name: "darkContentBarsStyle" },
|
|
1199
|
+
_: String(darkContentBarsStyle),
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1187
1202
|
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
item,
|
|
1203
|
+
const withBootTheme = [
|
|
1204
|
+
...style.filter(({ $ }) => $.name !== "BootTheme"),
|
|
1205
|
+
{
|
|
1192
1206
|
$: {
|
|
1193
1207
|
name: "BootTheme",
|
|
1194
1208
|
parent: edgeToEdge
|
|
1195
|
-
? "Theme.BootSplash"
|
|
1196
|
-
: "Theme.BootSplash
|
|
1209
|
+
? "Theme.BootSplash.EdgeToEdge"
|
|
1210
|
+
: "Theme.BootSplash",
|
|
1197
1211
|
},
|
|
1198
|
-
|
|
1212
|
+
item,
|
|
1213
|
+
},
|
|
1214
|
+
];
|
|
1199
1215
|
|
|
1200
|
-
return
|
|
1216
|
+
return {
|
|
1217
|
+
...config,
|
|
1218
|
+
modResults: {
|
|
1219
|
+
...modResults,
|
|
1220
|
+
resources: {
|
|
1221
|
+
...resources,
|
|
1222
|
+
style: withBootTheme,
|
|
1223
|
+
},
|
|
1224
|
+
},
|
|
1225
|
+
};
|
|
1201
1226
|
});
|
|
1202
1227
|
|
|
1203
1228
|
const withAndroidColors: ExpoPlugin = (config, props) =>
|