@sanctum-key/react-native-sdk 1.0.25 → 1.0.27

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanctum-key/react-native-sdk",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Sanctum Key React Native SDK",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -69,7 +69,7 @@
69
69
  "expo-location": "*",
70
70
  "react": "*",
71
71
  "react-native": "*",
72
- "react-native-svg": "^15.15.5",
72
+ "react-native-svg": "*",
73
73
  "react-native-vision-camera": "^4.7.1"
74
74
  }
75
75
  }
@@ -1,6 +1,6 @@
1
- export * from './SanctumKeySdk.types';
2
- export * from './types/KYC.types';
3
- export * from './types/env.types';
1
+ export type * from './SanctumKeySdk.types';
2
+ export type * from './types/KYC.types';
3
+ export type * from './types/env.types';
4
4
  export { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';
5
5
  export { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';
6
6
  export { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';
@@ -10,5 +10,5 @@ export { useTemplateLoader } from './hooks/useTemplateLoader';
10
10
  export { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';
11
11
  export { EnhancedCameraView } from './components/EnhancedCameraView';
12
12
  export { UnifiedCameraModule } from './modules/camera';
13
- export { WebKYCEntry } from './web';
13
+ export { default as WebKYCEntry } from './web/WebKYCEntry';
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AAItC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,MAAM,iCAAiC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OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,8 +1,3 @@
1
- export * from './SanctumKeySdk.types';
2
- // Export KYC types
3
- export * from './types/KYC.types';
4
- // Export Environment types
5
- export * from './types/env.types';
6
1
  export { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';
7
2
  // Backward compatibility for existing integrations using the typo.
8
3
  export { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';
@@ -17,5 +12,5 @@ export { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';
17
12
  export { EnhancedCameraView } from './components/EnhancedCameraView';
18
13
  export { UnifiedCameraModule } from './modules/camera';
19
14
  // Export Web KYC Components
20
- export { WebKYCEntry } from './web';
15
+ export { default as WebKYCEntry } from './web/WebKYCEntry';
21
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AAGtC,mBAAmB;AACnB,cAAc,mBAAmB,CAAC;AAElC,2BAA2B;AAC3B,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,mEAAmE;AACnE,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,wCAAwC;AACxC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,6BAA6B;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export * from './SanctumKeySdk.types';\n\n\n// Export KYC types\nexport * from './types/KYC.types';\n\n// Export Environment types\nexport * from './types/env.types';\n\n\nexport { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';\n// Backward compatibility for existing integrations using the typo.\nexport { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';\n\n// Export Template Flow Components\nexport { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';\n\n// Export Template Service and Utilities\nexport { default as templateService } from './modules/api/TemplateService';\nexport { transformBackendTemplateToSDK, validateTransformedTemplate } from './utils/template-transformer';\nexport { useTemplateLoader } from './hooks/useTemplateLoader';\n\n// Export Template Components\nexport { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';\nexport { EnhancedCameraView } from './components/EnhancedCameraView';\nexport { UnifiedCameraModule } from './modules/camera';\n\n// Export Web KYC Components\nexport { WebKYCEntry } from './web';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,mEAAmE;AACnE,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,wCAAwC;AACxC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,6BAA6B;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,4BAA4B;AAC5B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["// Explicitly mark these as type-only exports to prevent Web Bundler crashes\nexport type * from './SanctumKeySdk.types';\n\n// Export KYC types\nexport type * from './types/KYC.types';\n\n// Export Environment types\nexport type * from './types/env.types';\n\n\nexport { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';\n// Backward compatibility for existing integrations using the typo.\nexport { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';\n\n// Export Template Flow Components\nexport { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';\n\n// Export Template Service and Utilities\nexport { default as templateService } from './modules/api/TemplateService';\nexport { transformBackendTemplateToSDK, validateTransformedTemplate } from './utils/template-transformer';\nexport { useTemplateLoader } from './hooks/useTemplateLoader';\n\n// Export Template Components\nexport { WelcomeTemplate } from './components/KYCElements/WelcomeTemplate';\nexport { EnhancedCameraView } from './components/EnhancedCameraView';\nexport { UnifiedCameraModule } from './modules/camera';\n\n// Export Web KYC Components\nexport { default as WebKYCEntry } from './web/WebKYCEntry';"]}
@@ -0,0 +1,30 @@
1
+ export interface CameraCaptureResult {
2
+ success: boolean;
3
+ path?: string;
4
+ error?: string;
5
+ }
6
+ export interface FilePickerResult {
7
+ success: boolean;
8
+ uri?: string;
9
+ path?: string;
10
+ error?: string;
11
+ }
12
+ export declare class NativeCameraModule {
13
+ constructor();
14
+ testModule(): Promise<string>;
15
+ requestCameraPermission(): Promise<boolean>;
16
+ openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult>;
17
+ openFilePicker(allowedTypes?: string[]): Promise<FilePickerResult>;
18
+ onCameraCapture(callback: (event: any) => void): {
19
+ remove: () => void;
20
+ };
21
+ onFileSelected(callback: (event: any) => void): {
22
+ remove: () => void;
23
+ };
24
+ onError(callback: (event: any) => void): {
25
+ remove: () => void;
26
+ };
27
+ }
28
+ declare const _default: NativeCameraModule;
29
+ export default _default;
30
+ //# sourceMappingURL=NativeCameraModule.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeCameraModule.web.d.ts","sourceRoot":"","sources":["../../../../src/modules/camera/NativeCameraModule.web.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,kBAAkB;;IAMvB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAM3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ9E,cAAc,CAAC,YAAY,GAAE,MAAM,EAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQjF,eAAe,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;;;IAI9C,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;;;IAI7C,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;;;CAGvC;;AAED,wBAAwC"}
@@ -0,0 +1,40 @@
1
+ import { Platform } from "react-native";
2
+ export class NativeCameraModule {
3
+ constructor() {
4
+ console.log('NativeCameraModule (WEB) constructor called');
5
+ console.log('Platform:', Platform.OS);
6
+ }
7
+ async testModule() {
8
+ return 'Web Module Mock Successful';
9
+ }
10
+ async requestCameraPermission() {
11
+ console.warn('Camera permission mock on Web');
12
+ // For a real web implementation, you would use navigator.mediaDevices.getUserMedia
13
+ return true;
14
+ }
15
+ async openCameraWithInstructions(instructions) {
16
+ console.warn('Native camera cannot be opened on the web.');
17
+ return {
18
+ success: false,
19
+ error: 'Camera capture is not supported in the web mock yet.'
20
+ };
21
+ }
22
+ async openFilePicker(allowedTypes = ['*/*']) {
23
+ console.warn('Native file picker cannot be opened on the web.');
24
+ return {
25
+ success: false,
26
+ error: 'File picking is not supported in the web mock yet.'
27
+ };
28
+ }
29
+ onCameraCapture(callback) {
30
+ return { remove: () => { } };
31
+ }
32
+ onFileSelected(callback) {
33
+ return { remove: () => { } };
34
+ }
35
+ onError(callback) {
36
+ return { remove: () => { } };
37
+ }
38
+ }
39
+ export default new NativeCameraModule();
40
+ //# sourceMappingURL=NativeCameraModule.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeCameraModule.web.js","sourceRoot":"","sources":["../../../../src/modules/camera/NativeCameraModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAexC,MAAM,OAAO,kBAAkB;IAC7B;QACE,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,4BAA4B,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,OAAO,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC9C,mFAAmF;QACnF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,0BAA0B,CAAC,YAAoB;QACnD,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QAC3D,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sDAAsD;SAC9D,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,eAAyB,CAAC,KAAK,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;QAChE,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,oDAAoD;SAC5D,CAAC;IACJ,CAAC;IAED,eAAe,CAAC,QAA8B;QAC5C,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;IAC9B,CAAC;IAED,cAAc,CAAC,QAA8B;QAC3C,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,CAAC,QAA8B;QACpC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;IAC9B,CAAC;CACF;AAED,eAAe,IAAI,kBAAkB,EAAE,CAAC","sourcesContent":["import { Platform } from \"react-native\";\n\nexport interface CameraCaptureResult {\n success: boolean;\n path?: string;\n error?: string;\n}\n\nexport interface FilePickerResult {\n success: boolean;\n uri?: string;\n path?: string;\n error?: string;\n}\n\nexport class NativeCameraModule {\n constructor() {\n console.log('NativeCameraModule (WEB) constructor called');\n console.log('Platform:', Platform.OS);\n }\n\n async testModule(): Promise<string> {\n return 'Web Module Mock Successful';\n }\n\n async requestCameraPermission(): Promise<boolean> {\n console.warn('Camera permission mock on Web');\n // For a real web implementation, you would use navigator.mediaDevices.getUserMedia\n return true; \n }\n\n async openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult> {\n console.warn('Native camera cannot be opened on the web.');\n return {\n success: false,\n error: 'Camera capture is not supported in the web mock yet.'\n };\n }\n\n async openFilePicker(allowedTypes: string[] = ['*/*']): Promise<FilePickerResult> {\n console.warn('Native file picker cannot be opened on the web.');\n return {\n success: false,\n error: 'File picking is not supported in the web mock yet.'\n };\n }\n\n onCameraCapture(callback: (event: any) => void) {\n return { remove: () => {} };\n }\n\n onFileSelected(callback: (event: any) => void) {\n return { remove: () => {} };\n }\n\n onError(callback: (event: any) => void) {\n return { remove: () => {} };\n }\n}\n\nexport default new NativeCameraModule();"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanctum-key/react-native-sdk",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Sanctum Key React Native SDK",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -69,7 +69,7 @@
69
69
  "expo-location": "*",
70
70
  "react": "*",
71
71
  "react-native": "*",
72
- "react-native-svg": "^15.15.5",
72
+ "react-native-svg": "*",
73
73
  "react-native-vision-camera": "^4.7.1"
74
74
  }
75
75
  }
package/src/index.ts CHANGED
@@ -1,11 +1,11 @@
1
- export * from './SanctumKeySdk.types';
2
-
1
+ // Explicitly mark these as type-only exports to prevent Web Bundler crashes
2
+ export type * from './SanctumKeySdk.types';
3
3
 
4
4
  // Export KYC types
5
- export * from './types/KYC.types';
5
+ export type * from './types/KYC.types';
6
6
 
7
7
  // Export Environment types
8
- export * from './types/env.types';
8
+ export type * from './types/env.types';
9
9
 
10
10
 
11
11
  export { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';
@@ -26,4 +26,4 @@ export { EnhancedCameraView } from './components/EnhancedCameraView';
26
26
  export { UnifiedCameraModule } from './modules/camera';
27
27
 
28
28
  // Export Web KYC Components
29
- export { WebKYCEntry } from './web';
29
+ export { default as WebKYCEntry } from './web/WebKYCEntry';
@@ -0,0 +1,61 @@
1
+ import { Platform } from "react-native";
2
+
3
+ export interface CameraCaptureResult {
4
+ success: boolean;
5
+ path?: string;
6
+ error?: string;
7
+ }
8
+
9
+ export interface FilePickerResult {
10
+ success: boolean;
11
+ uri?: string;
12
+ path?: string;
13
+ error?: string;
14
+ }
15
+
16
+ export class NativeCameraModule {
17
+ constructor() {
18
+ console.log('NativeCameraModule (WEB) constructor called');
19
+ console.log('Platform:', Platform.OS);
20
+ }
21
+
22
+ async testModule(): Promise<string> {
23
+ return 'Web Module Mock Successful';
24
+ }
25
+
26
+ async requestCameraPermission(): Promise<boolean> {
27
+ console.warn('Camera permission mock on Web');
28
+ // For a real web implementation, you would use navigator.mediaDevices.getUserMedia
29
+ return true;
30
+ }
31
+
32
+ async openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult> {
33
+ console.warn('Native camera cannot be opened on the web.');
34
+ return {
35
+ success: false,
36
+ error: 'Camera capture is not supported in the web mock yet.'
37
+ };
38
+ }
39
+
40
+ async openFilePicker(allowedTypes: string[] = ['*/*']): Promise<FilePickerResult> {
41
+ console.warn('Native file picker cannot be opened on the web.');
42
+ return {
43
+ success: false,
44
+ error: 'File picking is not supported in the web mock yet.'
45
+ };
46
+ }
47
+
48
+ onCameraCapture(callback: (event: any) => void) {
49
+ return { remove: () => {} };
50
+ }
51
+
52
+ onFileSelected(callback: (event: any) => void) {
53
+ return { remove: () => {} };
54
+ }
55
+
56
+ onError(callback: (event: any) => void) {
57
+ return { remove: () => {} };
58
+ }
59
+ }
60
+
61
+ export default new NativeCameraModule();