react-native-bootsplash 7.0.2 → 7.1.0-beta.1

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 (69) hide show
  1. package/app.plugin.js +1 -1
  2. package/cli.js +1 -1
  3. package/dist/commonjs/extras/addon/index.js +97 -0
  4. package/dist/commonjs/extras/addon/index.js.map +1 -0
  5. package/dist/commonjs/{expo.js → extras/expo.js} +29 -32
  6. package/dist/commonjs/extras/expo.js.map +1 -0
  7. package/dist/commonjs/extras/generate.js +274 -0
  8. package/dist/commonjs/extras/generate.js.map +1 -0
  9. package/dist/commonjs/{generate.js → extras/utils.js} +126 -355
  10. package/dist/commonjs/extras/utils.js.map +1 -0
  11. package/dist/commonjs/package.json +1 -0
  12. package/dist/module/extras/addon/index.js +97 -0
  13. package/dist/module/extras/addon/index.js.map +1 -0
  14. package/dist/module/{expo.js → extras/expo.js} +7 -11
  15. package/dist/module/extras/expo.js.map +1 -0
  16. package/dist/module/extras/generate.js +267 -0
  17. package/dist/module/extras/generate.js.map +1 -0
  18. package/dist/module/{generate.js → extras/utils.js} +115 -343
  19. package/dist/module/extras/utils.js.map +1 -0
  20. package/dist/module/package.json +1 -0
  21. package/dist/typescript/{addon → commonjs/extras/addon}/index.d.ts +1 -1
  22. package/dist/typescript/commonjs/extras/addon/index.d.ts.map +1 -0
  23. package/dist/typescript/commonjs/extras/expo.d.ts +8 -0
  24. package/dist/typescript/commonjs/extras/expo.d.ts.map +1 -0
  25. package/dist/typescript/commonjs/extras/generate.d.ts +17 -0
  26. package/dist/typescript/commonjs/extras/generate.d.ts.map +1 -0
  27. package/dist/typescript/{generate.d.ts → commonjs/extras/utils.d.ts} +67 -37
  28. package/dist/typescript/commonjs/extras/utils.d.ts.map +1 -0
  29. package/dist/typescript/commonjs/index.d.ts.map +1 -0
  30. package/dist/typescript/commonjs/package.json +1 -0
  31. package/dist/typescript/commonjs/specs/NativeRNBootSplash.d.ts.map +1 -0
  32. package/dist/typescript/commonjs/specs/NativeRNBootSplash.web.d.ts.map +1 -0
  33. package/dist/typescript/module/extras/addon/index.d.ts +26 -0
  34. package/dist/typescript/module/extras/addon/index.d.ts.map +1 -0
  35. package/dist/typescript/module/extras/expo.d.ts +8 -0
  36. package/dist/typescript/module/extras/expo.d.ts.map +1 -0
  37. package/dist/typescript/module/extras/generate.d.ts +17 -0
  38. package/dist/typescript/module/extras/generate.d.ts.map +1 -0
  39. package/dist/typescript/module/extras/utils.d.ts +192 -0
  40. package/dist/typescript/module/extras/utils.d.ts.map +1 -0
  41. package/dist/typescript/module/index.d.ts +61 -0
  42. package/dist/typescript/module/index.d.ts.map +1 -0
  43. package/dist/typescript/module/package.json +1 -0
  44. package/dist/typescript/module/specs/NativeRNBootSplash.d.ts +14 -0
  45. package/dist/typescript/module/specs/NativeRNBootSplash.d.ts.map +1 -0
  46. package/dist/typescript/module/specs/NativeRNBootSplash.web.d.ts +9 -0
  47. package/dist/typescript/module/specs/NativeRNBootSplash.web.d.ts.map +1 -0
  48. package/package.json +49 -19
  49. package/src/{expo.ts → extras/expo.ts} +31 -40
  50. package/src/extras/generate.ts +410 -0
  51. package/src/{generate.ts → extras/utils.ts} +180 -494
  52. package/dist/commonjs/addon/index.js +0 -97
  53. package/dist/commonjs/addon/index.js.map +0 -1
  54. package/dist/commonjs/expo.js.map +0 -1
  55. package/dist/commonjs/generate.js.map +0 -1
  56. package/dist/module/addon/index.js +0 -97
  57. package/dist/module/addon/index.js.map +0 -1
  58. package/dist/module/expo.js.map +0 -1
  59. package/dist/module/generate.js.map +0 -1
  60. package/dist/typescript/addon/index.d.ts.map +0 -1
  61. package/dist/typescript/expo.d.ts +0 -6
  62. package/dist/typescript/expo.d.ts.map +0 -1
  63. package/dist/typescript/generate.d.ts.map +0 -1
  64. package/dist/typescript/index.d.ts.map +0 -1
  65. package/dist/typescript/specs/NativeRNBootSplash.d.ts.map +0 -1
  66. package/dist/typescript/specs/NativeRNBootSplash.web.d.ts.map +0 -1
  67. /package/dist/typescript/{index.d.ts → commonjs/index.d.ts} +0 -0
  68. /package/dist/typescript/{specs → commonjs/specs}/NativeRNBootSplash.d.ts +0 -0
  69. /package/dist/typescript/{specs → commonjs/specs}/NativeRNBootSplash.web.d.ts +0 -0
@@ -1,11 +1,69 @@
1
1
  import * as Expo from "@expo/config-plugins";
2
2
  import detectIndent, { type Indent } from "detect-indent";
3
- import { HTMLElement } from "node-html-parser";
4
3
  import type { Options as PrettierOptions } from "prettier";
5
4
  import { type Sharp } from "sharp";
6
5
  import { type XMLFormatterOptions } from "xml-formatter";
7
6
  export declare const PACKAGE_NAME = "react-native-bootsplash";
8
- export declare const setIsExpo: (value: boolean) => void;
7
+ export type BootSplashPluginConfig = {
8
+ /**
9
+ * Logo file path (PNG or SVG)
10
+ */
11
+ logo: string;
12
+ /**
13
+ * Background color (in hexadecimal format)
14
+ * @default #fff
15
+ */
16
+ background?: string;
17
+ /**
18
+ * Logo width at @1x (in dp - we recommend approximately ~100)
19
+ * @default 100
20
+ */
21
+ logoWidth?: number;
22
+ /**
23
+ * Assets output directory path
24
+ * @default assets/bootsplash
25
+ */
26
+ assetsOutput?: string;
27
+ /**
28
+ * License key to enable brand and dark mode assets generation
29
+ */
30
+ licenseKey?: string;
31
+ /**
32
+ * Brand file path (PNG or SVG)
33
+ */
34
+ brand?: string;
35
+ /**
36
+ * Brand width at @1x (in dp - we recommend approximately ~80)
37
+ * @default 80
38
+ */
39
+ brandWidth?: number;
40
+ /**
41
+ * [dark mode] Background color (in hexadecimal format)
42
+ */
43
+ darkBackground?: string;
44
+ /**
45
+ * [dark mode] Logo file path (PNG or SVG)
46
+ */
47
+ darkLogo?: string;
48
+ /**
49
+ * [dark mode] Brand file path (PNG or SVG)
50
+ */
51
+ darkBrand?: string;
52
+ android?: {
53
+ /**
54
+ * Enforce system bars style
55
+ * @default `undefined`
56
+ */
57
+ darkContentBarsStyle?: boolean;
58
+ };
59
+ };
60
+ type LoggerMode = {
61
+ type: "plugin";
62
+ } | {
63
+ type: "cli";
64
+ cwd: string;
65
+ };
66
+ export declare const setLoggerMode: (value: LoggerMode) => void;
9
67
  export declare const log: {
10
68
  error: (text: string) => void;
11
69
  title: (emoji: string, text: string) => void;
@@ -18,7 +76,6 @@ export declare const log: {
18
76
  export declare const hfs: {
19
77
  buffer: (path: string) => NonSharedBuffer;
20
78
  exists: (path: string) => boolean;
21
- isDir: (path: string) => boolean;
22
79
  json: (path: string) => unknown;
23
80
  readDir: (path: string) => string[];
24
81
  realPath: (path: string) => string;
@@ -41,7 +98,7 @@ type FormatOptions = {
41
98
  whiteSpaceAtEndOfSelfclosingTag?: XMLFormatterOptions["whiteSpaceAtEndOfSelfclosingTag"];
42
99
  });
43
100
  export declare const readXmlLike: (filePath: string) => {
44
- root: HTMLElement;
101
+ root: import("node-html-parser").HTMLElement;
45
102
  formatOptions: {
46
103
  indent: detectIndent.Indent;
47
104
  };
@@ -54,23 +111,12 @@ export type Asset = {
54
111
  height: number;
55
112
  width: number;
56
113
  };
57
- export type RawProps = {
58
- logo: string;
59
- background: string;
60
- logoWidth: number;
61
- assetsOutput: string;
62
- licenseKey?: string;
63
- brand?: string;
64
- brandWidth: number;
65
- darkBackground?: string;
66
- darkLogo?: string;
67
- darkBrand?: string;
68
- android?: {
69
- darkContentBarsStyle?: boolean;
70
- };
71
- };
72
- export declare const transformProps: (rootPath: string, { android, licenseKey, ...rawProps }: RawProps) => Promise<{
114
+ export declare const transformProps: (rootPath: string, { android, licenseKey, ...rawProps }: BootSplashPluginConfig) => Promise<{
73
115
  android: {
116
+ /**
117
+ * Enforce system bars style
118
+ * @default `undefined`
119
+ */
74
120
  darkContentBarsStyle?: boolean;
75
121
  };
76
122
  assetsOutputPath: string;
@@ -142,21 +188,5 @@ export declare const requireAddon: ({ executeAddon, licenseKey, }: Props) => {
142
188
  props: Props;
143
189
  }) => Promise<Expo.ExportedConfigWithProps>;
144
190
  } | undefined;
145
- export declare const generate: ({ platforms, html, flavor, plist, ...rawProps }: {
146
- platforms: Array<"android" | "ios" | "web">;
147
- html: string;
148
- flavor: string;
149
- plist?: string;
150
- logo: string;
151
- background: string;
152
- logoWidth: number;
153
- assetsOutput: string;
154
- licenseKey?: string;
155
- brand?: string;
156
- brandWidth: number;
157
- darkBackground?: string;
158
- darkLogo?: string;
159
- darkBrand?: string;
160
- }) => Promise<void>;
161
191
  export {};
162
- //# sourceMappingURL=generate.d.ts.map
192
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/extras/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAE7C,OAAO,YAAY,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAK1D,OAAO,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAK3D,OAAc,EAAE,KAAK,KAAK,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpE,eAAO,MAAM,YAAY,4BAA4B,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAE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,IAAI,CAAC,MAAM,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvD;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,oBA6L9D;;;;;;AAED,wBAIE"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNBootSplash.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeRNBootSplash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,IAAI;QACd,eAAe,EAAE,OAAO,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,SAAS,IAAI,OAAO,CAAC;CACtB;;AAED,wBAAsE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNBootSplash.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeRNBootSplash.web.ts"],"names":[],"mappings":";;;;;;;AAcA,wBAgCiB"}
@@ -0,0 +1,26 @@
1
+ import * as Expo from "@expo/config-plugins";
2
+ import { type AddonConfig, type Props } from "../utils";
3
+ declare const _default: {
4
+ execute: ({ props, androidOutputPath, iosOutputPath, htmlTemplatePath, }: AddonConfig) => Promise<void>;
5
+ writeAndroidAssets: ({ androidOutputPath, props, }: {
6
+ androidOutputPath: string;
7
+ props: Props;
8
+ }) => Promise<void>;
9
+ writeIOSAssets: ({ iosOutputPath, props, }: {
10
+ iosOutputPath: string;
11
+ props: Props;
12
+ }) => Promise<void>;
13
+ writeWebAssets: ({ htmlTemplatePath, props, }: {
14
+ htmlTemplatePath: string;
15
+ props: Props;
16
+ }) => Promise<void>;
17
+ writeGenericAssets: ({ props }: {
18
+ props: Props;
19
+ }) => Promise<void>;
20
+ withAndroidColorsNight: ({ config, props, }: {
21
+ config: Expo.ExportedConfigWithProps;
22
+ props: Props;
23
+ }) => Promise<Expo.ExportedConfigWithProps>;
24
+ };
25
+ export default _default;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extras/addon/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAS7C,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,KAAK,EAOX,MAAM,UAAU,CAAC;;8EA4wBf,WAAW;wDA7hBX;QACD,iBAAiB,EAAE,MAAM,CAAC;QAC1B,KAAK,EAAE,KAAK,CAAC;KACd;gDAkHE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,KAAK,EAAE,KAAK,CAAC;KACd;mDA4NE;QACD,gBAAgB,EAAE,MAAM,CAAC;QACzB,KAAK,EAAE,KAAK,CAAC;KACd;oCAmH4C;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE;iDA4D1D;QACD,MAAM,EAAE,IAAI,CAAC,uBAAuB,CAAC;QACrC,KAAK,EAAE,KAAK,CAAC;KACd,KAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC;;AA4EzC,wBAO4C"}
@@ -0,0 +1,8 @@
1
+ import * as Expo from "@expo/config-plugins";
2
+ import { type BootSplashPluginConfig, PACKAGE_NAME } from "./utils";
3
+ export declare const withBootSplash: Expo.ConfigPlugin<(Partial<BootSplashPluginConfig> & {
4
+ logo: string;
5
+ }) | undefined>;
6
+ declare const _default: (config: BootSplashPluginConfig) => [typeof PACKAGE_NAME, BootSplashPluginConfig];
7
+ export default _default;
8
+ //# sourceMappingURL=expo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../../../src/extras/expo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAS7C,OAAO,EACL,KAAK,sBAAsB,EAG3B,YAAY,EAQb,MAAM,SAAS,CAAC;AA4SjB,eAAO,MAAM,cAAc;UACkB,MAAM;eA8CnC,CAAC;yBAGf,QAAQ,sBAAsB,KAC7B,CAAC,OAAO,YAAY,EAAE,sBAAsB,CAAC;AAFhD,wBAE2E"}
@@ -0,0 +1,17 @@
1
+ export declare const generate: ({ platforms, html, flavor, plist, ...rawProps }: {
2
+ platforms: Array<"android" | "ios" | "web">;
3
+ html: string;
4
+ flavor: string;
5
+ plist?: string;
6
+ logo: string;
7
+ background: string;
8
+ logoWidth: number;
9
+ assetsOutput: string;
10
+ licenseKey?: string;
11
+ brand?: string;
12
+ brandWidth: number;
13
+ darkBackground?: string;
14
+ darkLogo?: string;
15
+ darkBrand?: string;
16
+ }) => Promise<void>;
17
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/extras/generate.ts"],"names":[],"mappings":"AAoKA,eAAO,MAAM,QAAQ,GAAU,iDAM5B;IACD,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,kBA+NA,CAAC"}
@@ -0,0 +1,192 @@
1
+ import * as Expo from "@expo/config-plugins";
2
+ import detectIndent, { type Indent } from "detect-indent";
3
+ import type { Options as PrettierOptions } from "prettier";
4
+ import { type Sharp } from "sharp";
5
+ import { type XMLFormatterOptions } from "xml-formatter";
6
+ export declare const PACKAGE_NAME = "react-native-bootsplash";
7
+ export type BootSplashPluginConfig = {
8
+ /**
9
+ * Logo file path (PNG or SVG)
10
+ */
11
+ logo: string;
12
+ /**
13
+ * Background color (in hexadecimal format)
14
+ * @default #fff
15
+ */
16
+ background?: string;
17
+ /**
18
+ * Logo width at @1x (in dp - we recommend approximately ~100)
19
+ * @default 100
20
+ */
21
+ logoWidth?: number;
22
+ /**
23
+ * Assets output directory path
24
+ * @default assets/bootsplash
25
+ */
26
+ assetsOutput?: string;
27
+ /**
28
+ * License key to enable brand and dark mode assets generation
29
+ */
30
+ licenseKey?: string;
31
+ /**
32
+ * Brand file path (PNG or SVG)
33
+ */
34
+ brand?: string;
35
+ /**
36
+ * Brand width at @1x (in dp - we recommend approximately ~80)
37
+ * @default 80
38
+ */
39
+ brandWidth?: number;
40
+ /**
41
+ * [dark mode] Background color (in hexadecimal format)
42
+ */
43
+ darkBackground?: string;
44
+ /**
45
+ * [dark mode] Logo file path (PNG or SVG)
46
+ */
47
+ darkLogo?: string;
48
+ /**
49
+ * [dark mode] Brand file path (PNG or SVG)
50
+ */
51
+ darkBrand?: string;
52
+ android?: {
53
+ /**
54
+ * Enforce system bars style
55
+ * @default `undefined`
56
+ */
57
+ darkContentBarsStyle?: boolean;
58
+ };
59
+ };
60
+ type LoggerMode = {
61
+ type: "plugin";
62
+ } | {
63
+ type: "cli";
64
+ cwd: string;
65
+ };
66
+ export declare const setLoggerMode: (value: LoggerMode) => void;
67
+ export declare const log: {
68
+ error: (text: string) => void;
69
+ title: (emoji: string, text: string) => void;
70
+ warn: (text: string) => void;
71
+ write: (filePath: string, dimensions?: {
72
+ width: number;
73
+ height: number;
74
+ }) => void;
75
+ };
76
+ export declare const hfs: {
77
+ buffer: (path: string) => NonSharedBuffer;
78
+ exists: (path: string) => boolean;
79
+ json: (path: string) => unknown;
80
+ readDir: (path: string) => string[];
81
+ realPath: (path: string) => string;
82
+ rm: (path: string) => void;
83
+ text: (path: string) => string;
84
+ ensureDir: (dir: string) => void;
85
+ write: (path: string, content: string) => void;
86
+ };
87
+ export declare const writeJson: (filePath: string, content: object) => void;
88
+ type FormatOptions = {
89
+ indent?: Indent;
90
+ } & ({
91
+ formatter: "prettier";
92
+ selfClosingTags?: boolean;
93
+ useCssPlugin?: boolean;
94
+ htmlWhitespaceSensitivity?: PrettierOptions["htmlWhitespaceSensitivity"];
95
+ singleAttributePerLine?: PrettierOptions["singleAttributePerLine"];
96
+ } | {
97
+ formatter: "xmlFormatter";
98
+ whiteSpaceAtEndOfSelfclosingTag?: XMLFormatterOptions["whiteSpaceAtEndOfSelfclosingTag"];
99
+ });
100
+ export declare const readXmlLike: (filePath: string) => {
101
+ root: import("node-html-parser").HTMLElement;
102
+ formatOptions: {
103
+ indent: detectIndent.Indent;
104
+ };
105
+ };
106
+ export declare const writeXmlLike: (filePath: string, content: string, { indent, ...formatOptions }: FormatOptions) => Promise<void>;
107
+ export type Asset = {
108
+ path: string;
109
+ image: Sharp;
110
+ hash: string;
111
+ height: number;
112
+ width: number;
113
+ };
114
+ export declare const transformProps: (rootPath: string, { android, licenseKey, ...rawProps }: BootSplashPluginConfig) => Promise<{
115
+ android: {
116
+ /**
117
+ * Enforce system bars style
118
+ * @default `undefined`
119
+ */
120
+ darkContentBarsStyle?: boolean;
121
+ };
122
+ assetsOutputPath: string;
123
+ licenseKey: string | undefined;
124
+ executeAddon: boolean;
125
+ background: {
126
+ hex: string;
127
+ rgb: {
128
+ R: string;
129
+ G: string;
130
+ B: string;
131
+ };
132
+ };
133
+ darkBackground: {
134
+ hex: string;
135
+ rgb: {
136
+ R: string;
137
+ G: string;
138
+ B: string;
139
+ };
140
+ } | undefined;
141
+ logo: Asset;
142
+ darkLogo: Asset | undefined;
143
+ brand: Asset | undefined;
144
+ darkBrand: Asset | undefined;
145
+ fileNameSuffix: string;
146
+ }>;
147
+ export type Props = Awaited<ReturnType<typeof transformProps>>;
148
+ export declare const writeAndroidAssets: ({ androidOutputPath, props, }: {
149
+ androidOutputPath: string;
150
+ props: Props;
151
+ }) => Promise<void>;
152
+ export declare const writeIOSAssets: ({ iosOutputPath, props, }: {
153
+ iosOutputPath: string;
154
+ props: Props;
155
+ }) => Promise<void>;
156
+ export declare const writeWebAssets: ({ htmlTemplatePath, props, }: {
157
+ htmlTemplatePath: string;
158
+ props: Props;
159
+ }) => Promise<void>;
160
+ export declare const writeGenericAssets: ({ props }: {
161
+ props: Props;
162
+ }) => Promise<void>;
163
+ export type AddonConfig = {
164
+ props: Props;
165
+ androidOutputPath: string | undefined;
166
+ iosOutputPath: string | undefined;
167
+ htmlTemplatePath: string | undefined;
168
+ };
169
+ export declare const requireAddon: ({ executeAddon, licenseKey, }: Props) => {
170
+ execute: (config: AddonConfig) => Promise<void>;
171
+ writeAndroidAssets: (_: {
172
+ androidOutputPath: string;
173
+ props: Props;
174
+ }) => Promise<void>;
175
+ writeIOSAssets: (_: {
176
+ iosOutputPath: string;
177
+ props: Props;
178
+ }) => Promise<void>;
179
+ writeWebAssets: (_: {
180
+ htmlTemplatePath: string;
181
+ props: Props;
182
+ }) => Promise<void>;
183
+ writeGenericAssets: (_: {
184
+ props: Props;
185
+ }) => Promise<void>;
186
+ withAndroidColorsNight: (_: {
187
+ config: Expo.ExportedConfigWithProps;
188
+ props: Props;
189
+ }) => Promise<Expo.ExportedConfigWithProps>;
190
+ } | undefined;
191
+ export {};
192
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/extras/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,sBAA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CAAC,IAAI,CAAC,CAAC;IAEpB,kBAAkB,EAAE,CAAC,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D,sBAAsB,EAAE,CAAC,CAAC,EAAE;QAC1B,MAAM,EAAE,IAAI,CAAC,uBAAuB,CAAC;QACrC,KAAK,EAAE,KAAK,CAAC;KACd,KAAK,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;CAC7C,GACD,SASH,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { type ImageRequireSource, type ImageResizeMode, type ImageSourcePropType, type ImageStyle, type ViewStyle } from "react-native";
2
+ export type Config = {
3
+ fade?: boolean;
4
+ };
5
+ export type Manifest = {
6
+ background: string;
7
+ darkBackground?: string;
8
+ logo: {
9
+ width: number;
10
+ height: number;
11
+ };
12
+ brand?: {
13
+ bottom: number;
14
+ width: number;
15
+ height: number;
16
+ };
17
+ };
18
+ export type UseHideAnimationConfig = {
19
+ manifest: Manifest;
20
+ ready?: boolean;
21
+ logo?: ImageRequireSource;
22
+ darkLogo?: ImageRequireSource;
23
+ brand?: ImageRequireSource;
24
+ darkBrand?: ImageRequireSource;
25
+ animate: () => void;
26
+ statusBarTranslucent?: boolean;
27
+ navigationBarTranslucent?: boolean;
28
+ };
29
+ export type ContainerProps = {
30
+ style: ViewStyle;
31
+ onLayout: () => void;
32
+ };
33
+ export type LogoProps = {
34
+ source: ImageSourcePropType;
35
+ fadeDuration?: number;
36
+ resizeMode?: ImageResizeMode;
37
+ style?: ImageStyle;
38
+ onLoadEnd?: () => void;
39
+ };
40
+ export type BrandProps = {
41
+ source: ImageSourcePropType;
42
+ fadeDuration?: number;
43
+ resizeMode?: ImageResizeMode;
44
+ style?: ImageStyle;
45
+ onLoadEnd?: () => void;
46
+ };
47
+ export type UseHideAnimation = {
48
+ container: ContainerProps;
49
+ logo: LogoProps;
50
+ brand: BrandProps;
51
+ };
52
+ export declare function hide(config?: Config): Promise<void>;
53
+ export declare function isVisible(): boolean;
54
+ export declare function useHideAnimation(config: UseHideAnimationConfig): UseHideAnimation;
55
+ declare const _default: {
56
+ hide: typeof hide;
57
+ isVisible: typeof isVisible;
58
+ useHideAnimation: typeof useHideAnimation;
59
+ };
60
+ export default _default;
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,SAAS,EAGf,MAAM,cAAc,CAAC;AAStB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,wBAAgB,IAAI,CAAC,MAAM,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvD;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,oBA6L9D;;;;;;AAED,wBAIE"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,14 @@
1
+ import type { TurboModule } from "react-native";
2
+ export interface Spec extends TurboModule {
3
+ getConstants(): {
4
+ darkModeEnabled: boolean;
5
+ logoSizeRatio?: number;
6
+ navigationBarHeight?: number;
7
+ statusBarHeight?: number;
8
+ };
9
+ hide(fade: boolean): Promise<void>;
10
+ isVisible(): boolean;
11
+ }
12
+ declare const _default: Spec;
13
+ export default _default;
14
+ //# sourceMappingURL=NativeRNBootSplash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNBootSplash.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeRNBootSplash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,IAAI;QACd,eAAe,EAAE,OAAO,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,SAAS,IAAI,OAAO,CAAC;CACtB;;AAED,wBAAsE"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ getConstants: () => {
3
+ darkModeEnabled: boolean;
4
+ };
5
+ hide: (fade: boolean) => Promise<void | undefined>;
6
+ isVisible: () => boolean;
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=NativeRNBootSplash.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNBootSplash.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeRNBootSplash.web.ts"],"names":[],"mappings":";;;;;;;AAcA,wBAgCiB"}
package/package.json CHANGED
@@ -1,13 +1,37 @@
1
1
  {
2
2
  "name": "react-native-bootsplash",
3
- "version": "7.0.2",
3
+ "version": "7.1.0-beta.1",
4
4
  "license": "MIT",
5
5
  "description": "Display a bootsplash on your app starts. Hide it when you want.",
6
6
  "author": "Mathieu Acthernoene <zoontek@gmail.com>",
7
7
  "homepage": "https://github.com/zoontek/react-native-bootsplash",
8
- "main": "dist/commonjs/index.js",
9
- "module": "dist/module/index.js",
10
- "types": "dist/typescript/index.d.ts",
8
+ "main": "./dist/commonjs/index.js",
9
+ "module": "./dist/module/index.js",
10
+ "types": "./dist/typescript/commonjs/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": {
14
+ "types": "./dist/typescript/module/index.d.ts",
15
+ "default": "./dist/module/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./dist/typescript/commonjs/index.d.ts",
19
+ "default": "./dist/commonjs/index.js"
20
+ }
21
+ },
22
+ "./expo": {
23
+ "import": {
24
+ "types": "./dist/typescript/module/extras/expo.d.ts",
25
+ "default": "./dist/module/extras/expo.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/typescript/commonjs/extras/expo.d.ts",
29
+ "default": "./dist/commonjs/extras/expo.js"
30
+ }
31
+ },
32
+ "./package.json": "./package.json",
33
+ "./app.plugin.js": "./app.plugin.js"
34
+ },
11
35
  "files": [
12
36
  "dist",
13
37
  "android",
@@ -17,11 +41,10 @@
17
41
  "!android/.cxx",
18
42
  "!android/.gradle",
19
43
  "!ios/build",
20
- "!src/addon",
44
+ "!src/extras/addon",
21
45
  "RNBootSplash.podspec",
22
- "app.plugin.js",
23
46
  "cli.js",
24
- "react-native.config.js"
47
+ "app.plugin.js"
25
48
  ],
26
49
  "bin": "./cli.js",
27
50
  "repository": {
@@ -45,16 +68,26 @@
45
68
  "format": "prettier '**/*' -u -w",
46
69
  "lint": "oxlint",
47
70
  "typecheck": "tsc --noEmit",
48
- "build": "yarn clean && bob build && rm -rf dist/*/package.json",
71
+ "build": "yarn clean && bob build",
49
72
  "prepack": "prettier '**/*' -u -c && yarn lint && yarn typecheck && yarn build && node ../obfuscator"
50
73
  },
51
74
  "react-native-builder-bob": {
52
75
  "source": "src",
53
76
  "output": "dist",
54
77
  "targets": [
55
- "commonjs",
56
- "module",
57
- "typescript"
78
+ "typescript",
79
+ [
80
+ "module",
81
+ {
82
+ "esm": true
83
+ }
84
+ ],
85
+ [
86
+ "commonjs",
87
+ {
88
+ "esm": true
89
+ }
90
+ ]
58
91
  ]
59
92
  },
60
93
  "prettier": {
@@ -71,8 +104,6 @@
71
104
  "commander": "^14.0.3",
72
105
  "detect-indent": "^6.1.0",
73
106
  "fast-glob": "^3.3.3",
74
- "find-up": "^5.0.0",
75
- "fs-extra": "^11.3.3",
76
107
  "node-html-parser": "^7.0.2",
77
108
  "picocolors": "^1.1.1",
78
109
  "prettier": "^3.8.1",
@@ -84,16 +115,15 @@
84
115
  "devDependencies": {
85
116
  "@babel/core": "^7.25.2",
86
117
  "@babel/preset-env": "^7.25.3",
87
- "@types/fs-extra": "^11.0.4",
88
118
  "@types/node": "^20.19.31",
89
119
  "@types/react": "^19.2.0",
90
120
  "@types/semver": "^7.7.1",
91
- "oxlint": "^1.43.0",
121
+ "oxlint": "^1.49.0",
92
122
  "prettier-plugin-organize-imports": "^4.3.0",
93
- "react": "19.2.0",
94
- "react-native": "0.83.1",
95
- "react-native-builder-bob": "^0.40.17",
96
- "semver": "^7.7.3",
123
+ "react": "19.2.3",
124
+ "react-native": "0.84.0",
125
+ "react-native-builder-bob": "^0.40.18",
126
+ "semver": "^7.7.4",
97
127
  "typescript": "^5.9.3"
98
128
  },
99
129
  "codegenConfig": {