@onekeyfe/react-native-splash-screen 1.1.21

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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/ReactNativeSplashScreen.podspec +30 -0
  4. package/android/CMakeLists.txt +24 -0
  5. package/android/build.gradle +130 -0
  6. package/android/gradle.properties +4 -0
  7. package/android/src/main/AndroidManifest.xml +1 -0
  8. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  9. package/android/src/main/java/com/margelo/nitro/reactnativesplashscreen/ReactNativeSplashScreen.kt +77 -0
  10. package/android/src/main/java/com/margelo/nitro/reactnativesplashscreen/ReactNativeSplashScreenPackage.kt +24 -0
  11. package/android/src/main/java/com/margelo/nitro/reactnativesplashscreen/SplashImageResizeMode.kt +23 -0
  12. package/android/src/main/java/com/margelo/nitro/reactnativesplashscreen/SplashScreenBridge.kt +108 -0
  13. package/android/src/main/java/com/margelo/nitro/reactnativesplashscreen/SplashScreenView.kt +34 -0
  14. package/android/src/main/java/com/margelo/nitro/reactnativesplashscreen/SplashViewController.kt +117 -0
  15. package/ios/ReactNativeSplashScreen.swift +15 -0
  16. package/lib/module/ReactNativeSplashScreen.nitro.js +4 -0
  17. package/lib/module/ReactNativeSplashScreen.nitro.js.map +1 -0
  18. package/lib/module/index.js +6 -0
  19. package/lib/module/index.js.map +1 -0
  20. package/lib/module/package.json +1 -0
  21. package/lib/typescript/package.json +1 -0
  22. package/lib/typescript/src/ReactNativeSplashScreen.nitro.d.ts +9 -0
  23. package/lib/typescript/src/ReactNativeSplashScreen.nitro.d.ts.map +1 -0
  24. package/lib/typescript/src/index.d.ts +4 -0
  25. package/lib/typescript/src/index.d.ts.map +1 -0
  26. package/nitro.json +17 -0
  27. package/nitrogen/generated/android/c++/JHybridReactNativeSplashScreenSpec.cpp +80 -0
  28. package/nitrogen/generated/android/c++/JHybridReactNativeSplashScreenSpec.hpp +66 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativesplashscreen/HybridReactNativeSplashScreenSpec.kt +62 -0
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativesplashscreen/reactnativesplashscreenOnLoad.kt +35 -0
  31. package/nitrogen/generated/android/reactnativesplashscreen+autolinking.cmake +81 -0
  32. package/nitrogen/generated/android/reactnativesplashscreen+autolinking.gradle +27 -0
  33. package/nitrogen/generated/android/reactnativesplashscreenOnLoad.cpp +44 -0
  34. package/nitrogen/generated/android/reactnativesplashscreenOnLoad.hpp +25 -0
  35. package/nitrogen/generated/ios/ReactNativeSplashScreen+autolinking.rb +60 -0
  36. package/nitrogen/generated/ios/ReactNativeSplashScreen-Swift-Cxx-Bridge.cpp +49 -0
  37. package/nitrogen/generated/ios/ReactNativeSplashScreen-Swift-Cxx-Bridge.hpp +110 -0
  38. package/nitrogen/generated/ios/ReactNativeSplashScreen-Swift-Cxx-Umbrella.hpp +44 -0
  39. package/nitrogen/generated/ios/ReactNativeSplashScreenAutolinking.mm +33 -0
  40. package/nitrogen/generated/ios/ReactNativeSplashScreenAutolinking.swift +25 -0
  41. package/nitrogen/generated/ios/c++/HybridReactNativeSplashScreenSpecSwift.cpp +11 -0
  42. package/nitrogen/generated/ios/c++/HybridReactNativeSplashScreenSpecSwift.hpp +84 -0
  43. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  44. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  45. package/nitrogen/generated/ios/swift/HybridReactNativeSplashScreenSpec.swift +57 -0
  46. package/nitrogen/generated/ios/swift/HybridReactNativeSplashScreenSpec_cxx.swift +157 -0
  47. package/nitrogen/generated/shared/c++/HybridReactNativeSplashScreenSpec.cpp +22 -0
  48. package/nitrogen/generated/shared/c++/HybridReactNativeSplashScreenSpec.hpp +63 -0
  49. package/package.json +169 -0
  50. package/src/ReactNativeSplashScreen.nitro.ts +7 -0
  51. package/src/index.tsx +8 -0
@@ -0,0 +1,63 @@
1
+ ///
2
+ /// HybridReactNativeSplashScreenSpec.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/HybridObject.hpp>)
11
+ #include <NitroModules/HybridObject.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+
16
+
17
+
18
+ #include <NitroModules/Promise.hpp>
19
+
20
+ namespace margelo::nitro::reactnativesplashscreen {
21
+
22
+ using namespace margelo::nitro;
23
+
24
+ /**
25
+ * An abstract base class for `ReactNativeSplashScreen`
26
+ * Inherit this class to create instances of `HybridReactNativeSplashScreenSpec` in C++.
27
+ * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
28
+ * @example
29
+ * ```cpp
30
+ * class HybridReactNativeSplashScreen: public HybridReactNativeSplashScreenSpec {
31
+ * public:
32
+ * HybridReactNativeSplashScreen(...): HybridObject(TAG) { ... }
33
+ * // ...
34
+ * };
35
+ * ```
36
+ */
37
+ class HybridReactNativeSplashScreenSpec: public virtual HybridObject {
38
+ public:
39
+ // Constructor
40
+ explicit HybridReactNativeSplashScreenSpec(): HybridObject(TAG) { }
41
+
42
+ // Destructor
43
+ ~HybridReactNativeSplashScreenSpec() override = default;
44
+
45
+ public:
46
+ // Properties
47
+
48
+
49
+ public:
50
+ // Methods
51
+ virtual std::shared_ptr<Promise<bool>> preventAutoHideAsync() = 0;
52
+ virtual std::shared_ptr<Promise<bool>> hideAsync() = 0;
53
+
54
+ protected:
55
+ // Hybrid Setup
56
+ void loadHybridMethods() override;
57
+
58
+ protected:
59
+ // Tag for logging
60
+ static constexpr auto TAG = "ReactNativeSplashScreen";
61
+ };
62
+
63
+ } // namespace margelo::nitro::reactnativesplashscreen
package/package.json ADDED
@@ -0,0 +1,169 @@
1
+ {
2
+ "name": "@onekeyfe/react-native-splash-screen",
3
+ "version": "1.1.21",
4
+ "description": "react-native-splash-screen",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "source": "./src/index.tsx",
10
+ "types": "./lib/typescript/src/index.d.ts",
11
+ "default": "./lib/module/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "src",
17
+ "lib",
18
+ "android",
19
+ "ios",
20
+ "cpp",
21
+ "nitrogen",
22
+ "nitro.json",
23
+ "*.podspec",
24
+ "react-native.config.js",
25
+ "!ios/build",
26
+ "!android/build",
27
+ "!android/gradle",
28
+ "!android/gradlew",
29
+ "!android/gradlew.bat",
30
+ "!android/local.properties",
31
+ "!**/__tests__",
32
+ "!**/__fixtures__",
33
+ "!**/__mocks__",
34
+ "!**/.*"
35
+ ],
36
+ "scripts": {
37
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
38
+ "prepare": "bob build",
39
+ "nitrogen": "nitrogen",
40
+ "typecheck": "tsc",
41
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
42
+ "test": "jest",
43
+ "release": "yarn prepare && npm whoami && npm publish --access public"
44
+ },
45
+ "keywords": [
46
+ "react-native",
47
+ "ios",
48
+ "android"
49
+ ],
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/OneKeyHQ/app-modules/react-native-splash-screen.git"
53
+ },
54
+ "author": "onekeyfe <huanming@onekey.so> (https://github.com/OneKeyHQ/app-modules)",
55
+ "license": "MIT",
56
+ "bugs": {
57
+ "url": "https://github.com/OneKeyHQ/app-modules/react-native-splash-screen/issues"
58
+ },
59
+ "homepage": "https://github.com/OneKeyHQ/app-modules/react-native-splash-screen#readme",
60
+ "publishConfig": {
61
+ "registry": "https://registry.npmjs.org/"
62
+ },
63
+ "devDependencies": {
64
+ "@commitlint/config-conventional": "^19.8.1",
65
+ "@eslint/compat": "^1.3.2",
66
+ "@eslint/eslintrc": "^3.3.1",
67
+ "@eslint/js": "^9.35.0",
68
+ "@react-native/babel-preset": "0.83.0",
69
+ "@react-native/eslint-config": "0.83.0",
70
+ "@release-it/conventional-changelog": "^10.0.1",
71
+ "@types/jest": "^29.5.14",
72
+ "@types/react": "^19.2.0",
73
+ "commitlint": "^19.8.1",
74
+ "del-cli": "^6.0.0",
75
+ "eslint": "^9.35.0",
76
+ "eslint-config-prettier": "^10.1.8",
77
+ "eslint-plugin-prettier": "^5.5.4",
78
+ "jest": "^29.7.0",
79
+ "lefthook": "^2.0.3",
80
+ "nitrogen": "0.31.10",
81
+ "prettier": "^2.8.8",
82
+ "react": "19.2.0",
83
+ "react-native": "0.83.0",
84
+ "react-native-builder-bob": "^0.40.13",
85
+ "react-native-nitro-modules": "0.33.2",
86
+ "release-it": "^19.0.4",
87
+ "turbo": "^2.5.6",
88
+ "typescript": "^5.9.2"
89
+ },
90
+ "peerDependencies": {
91
+ "react": "*",
92
+ "react-native": "*",
93
+ "react-native-nitro-modules": "0.33.2"
94
+ },
95
+ "react-native-builder-bob": {
96
+ "source": "src",
97
+ "output": "lib",
98
+ "targets": [
99
+ [
100
+ "custom",
101
+ {
102
+ "script": "nitrogen",
103
+ "clean": "nitrogen/"
104
+ }
105
+ ],
106
+ [
107
+ "module",
108
+ {
109
+ "esm": true
110
+ }
111
+ ],
112
+ [
113
+ "typescript",
114
+ {
115
+ "project": "tsconfig.build.json"
116
+ }
117
+ ]
118
+ ]
119
+ },
120
+ "prettier": {
121
+ "quoteProps": "consistent",
122
+ "singleQuote": true,
123
+ "tabWidth": 2,
124
+ "trailingComma": "es5",
125
+ "useTabs": false
126
+ },
127
+ "jest": {
128
+ "preset": "react-native",
129
+ "modulePathIgnorePatterns": [
130
+ "<rootDir>/example/node_modules",
131
+ "<rootDir>/lib/"
132
+ ]
133
+ },
134
+ "commitlint": {
135
+ "extends": [
136
+ "@commitlint/config-conventional"
137
+ ]
138
+ },
139
+ "release-it": {
140
+ "git": {
141
+ "commitMessage": "chore: release ${version}",
142
+ "tagName": "v${version}"
143
+ },
144
+ "npm": {
145
+ "publish": true
146
+ },
147
+ "github": {
148
+ "release": true
149
+ },
150
+ "plugins": {
151
+ "@release-it/conventional-changelog": {
152
+ "preset": {
153
+ "name": "angular"
154
+ }
155
+ }
156
+ }
157
+ },
158
+ "create-react-native-library": {
159
+ "type": "nitro-module",
160
+ "languages": "kotlin-swift",
161
+ "tools": [
162
+ "eslint",
163
+ "jest",
164
+ "lefthook",
165
+ "release-it"
166
+ ],
167
+ "version": "0.56.0"
168
+ }
169
+ }
@@ -0,0 +1,7 @@
1
+ import type { HybridObject } from 'react-native-nitro-modules';
2
+
3
+ export interface ReactNativeSplashScreen
4
+ extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
5
+ preventAutoHideAsync(): Promise<boolean>;
6
+ hideAsync(): Promise<boolean>;
7
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,8 @@
1
+ import { NitroModules } from 'react-native-nitro-modules';
2
+ import type { ReactNativeSplashScreen as ReactNativeSplashScreenType } from './ReactNativeSplashScreen.nitro';
3
+
4
+ const ReactNativeSplashScreenHybridObject =
5
+ NitroModules.createHybridObject<ReactNativeSplashScreenType>('ReactNativeSplashScreen');
6
+
7
+ export const ReactNativeSplashScreen = ReactNativeSplashScreenHybridObject;
8
+ export type * from './ReactNativeSplashScreen.nitro';