@sekyro/react-native 0.0.1-stage → 0.1.0-rc.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/CHANGELOG.md +19 -0
- package/LICENSE +29 -0
- package/README.md +76 -2
- package/SekyroReactNative.podspec +22 -0
- package/android/build.gradle +38 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/ai/sekyro/reactnative/ConfigMapper.kt +75 -0
- package/android/src/main/java/ai/sekyro/reactnative/SekyroReactNativeModule.kt +107 -0
- package/android/src/main/java/ai/sekyro/reactnative/SekyroReactNativePackage.kt +26 -0
- package/app.plugin.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +106 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +1 -0
- package/dist/package.json +1 -0
- package/ios/RCTSekyroReactNative.h +5 -0
- package/ios/RCTSekyroReactNative.mm +57 -0
- package/ios/SekyroRNBridge.swift +108 -0
- package/package.json +97 -6
- package/plugin/android.js +24 -0
- package/plugin/index.js +76 -0
- package/plugin/ios.js +61 -0
- package/sbom.cdx.json +153 -0
- package/scripts/sekyro_pods.rb +27 -0
- package/src/specs/NativeSekyroReactNative.ts +46 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Shipped as source on purpose: RN codegen reads it when the app builds. Types only, no logic.
|
|
2
|
+
import type { TurboModule } from 'react-native';
|
|
3
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
+
// Deep type import: the codegen of RN 0.76–0.84 resolves these names (CodegenTypes is re-exported
|
|
5
|
+
// from 'react-native' only from 0.80). For this package's own tsc, types/codegen-types.d.ts
|
|
6
|
+
// supplies the TypeScript declarations that newer RN releases no longer ship at this path.
|
|
7
|
+
import type { Double, EventEmitter, Int32, UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
|
|
9
|
+
export type NativeColors = {
|
|
10
|
+
brand?: string;
|
|
11
|
+
brandFg?: string;
|
|
12
|
+
bg?: string;
|
|
13
|
+
surface?: string;
|
|
14
|
+
fg?: string;
|
|
15
|
+
fgMuted?: string;
|
|
16
|
+
border?: string;
|
|
17
|
+
danger?: string;
|
|
18
|
+
success?: string;
|
|
19
|
+
warning?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type NativeConfig = {
|
|
23
|
+
clientToken: string;
|
|
24
|
+
apiOrigin?: string;
|
|
25
|
+
locale?: string;
|
|
26
|
+
colors?: NativeColors;
|
|
27
|
+
radius?: Double;
|
|
28
|
+
fontFamily?: string;
|
|
29
|
+
darkMode?: string;
|
|
30
|
+
/** Flat catalog-key → text map for the active locale. */
|
|
31
|
+
strings?: UnsafeObject;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type NativeResult = { status: string; sessionId?: string; displayStatus?: string; code?: string };
|
|
35
|
+
|
|
36
|
+
export type NativeEvent = { type: string; step?: string; retryReason?: string; seq: Int32 };
|
|
37
|
+
|
|
38
|
+
export interface Spec extends TurboModule {
|
|
39
|
+
start(config: NativeConfig): Promise<NativeResult>;
|
|
40
|
+
nativeVersion(): string;
|
|
41
|
+
readonly onEvent: EventEmitter<NativeEvent>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// `get`, not `getEnforcing`: importing the package must not throw in an app without the native
|
|
45
|
+
// module (Expo Go, web, a missing pod install); `startSekyro` then rejects `unsupported_platform`.
|
|
46
|
+
export default TurboModuleRegistry.get<Spec>('SekyroReactNative');
|