@hexar/biometric-identity-sdk-react-native 1.1.9 → 1.1.11

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 +1 @@
1
- {"version":3,"file":"ProfilePictureCapture.d.ts","sourceRoot":"","sources":["../../src/components/ProfilePictureCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AASxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAmC,cAAc,EAAsB,MAAM,oCAAoC,CAAC;AAGzJ,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAqNtE,CAAC;AAuBF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ProfilePictureCapture.d.ts","sourceRoot":"","sources":["../../src/components/ProfilePictureCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AASxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAmC,cAAc,EAAsB,MAAM,oCAAoC,CAAC;AAGzJ,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAmNtE,CAAC;AAuBF,eAAe,qBAAqB,CAAC"}
@@ -196,9 +196,8 @@ const ProfilePictureCapture = ({ onComplete, onError, onCancel, theme, language,
196
196
  react_1.default.createElement(react_native_1.Text, { style: [styles.loadingText, { color: theme?.textColor || '#1e1b4b' }] }, strings.liveness.processing || strings.validation.checkingLiveness || 'Processing...'),
197
197
  react_1.default.createElement(react_native_1.Text, { style: [styles.loadingSubtext, { color: theme?.secondaryTextColor || '#64748b' }] }, strings.validation.almostDone || strings.common.loading || 'This may take a few seconds'))));
198
198
  }
199
- return (react_1.default.createElement(VideoRecorder_1.VideoRecorder, { theme: theme, language: language, duration: 8000, smartMode: true, challenges: currentChallenges, sessionId: sdk.getSessionId() || undefined, onComplete: handleVideoComplete, onCancel: handleVideoCancel, onFetchChallenges: async () => {
199
+ return (react_1.default.createElement(VideoRecorder_1.VideoRecorder, { theme: theme, language: language, smartMode: true, challenges: currentChallenges, sessionId: sdk.getSessionId() || undefined, onComplete: handleVideoComplete, onCancel: handleVideoCancel, onFetchChallenges: async () => {
200
200
  const challenges = await fetchChallenges('active');
201
- setCurrentChallenges(challenges);
202
201
  return challenges;
203
202
  } }));
204
203
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VideoRecorder.d.ts","sourceRoot":"","sources":["../../src/components/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E,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiDD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAs2BtD,CAAC;AA4OF,eAAe,aAAa,CAAC"}
@@ -320,12 +320,16 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
320
320
  return;
321
321
  }
322
322
  biometric_identity_sdk_core_1.logger.info('Using frames for completion:', finalFrames.length, 'frames');
323
+ let finalCompletedChallenges = completedChallenges;
324
+ if (smartMode && finalCompletedChallenges.length === 0 && challenges.length > 0) {
325
+ finalCompletedChallenges = challenges.map(c => c.action);
326
+ }
323
327
  const result = {
324
328
  frames: finalFrames,
325
329
  duration: actualDuration,
326
- instructionsFollowed: completedChallenges.length === challenges.length,
330
+ instructionsFollowed: finalCompletedChallenges.length === challenges.length,
327
331
  qualityScore: finalFrames.length > 0 ? Math.min(100, (finalFrames.length / 30) * 100) : 85,
328
- challengesCompleted: completedChallenges,
332
+ challengesCompleted: finalCompletedChallenges,
329
333
  sessionId,
330
334
  };
331
335
  biometric_identity_sdk_core_1.logger.info('Video recording completed:', result.frames.length, 'frames,', (actualDuration / 1000).toFixed(1) + 's');
@@ -338,7 +342,7 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
338
342
  setOverallProgress(0);
339
343
  handleRecordingError(error);
340
344
  }
341
- }, [frames, completedChallenges, challenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase]);
345
+ }, [frames, completedChallenges, challenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase, smartMode]);
342
346
  const startFrameCapture = (0, react_1.useCallback)(() => {
343
347
  if (cameraRef.current && device) {
344
348
  biometric_identity_sdk_core_1.logger.info('Starting frame capture');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexar/biometric-identity-sdk-react-native",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "React Native wrapper for Biometric Identity SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -226,7 +226,6 @@ export const ProfilePictureCapture: React.FC<ProfilePictureCaptureProps> = ({
226
226
  <VideoRecorder
227
227
  theme={theme}
228
228
  language={language}
229
- duration={8000}
230
229
  smartMode={true}
231
230
  challenges={currentChallenges}
232
231
  sessionId={sdk.getSessionId() || undefined}
@@ -234,7 +233,6 @@ export const ProfilePictureCapture: React.FC<ProfilePictureCaptureProps> = ({
234
233
  onCancel={handleVideoCancel}
235
234
  onFetchChallenges={async () => {
236
235
  const challenges = await fetchChallenges('active');
237
- setCurrentChallenges(challenges);
238
236
  return challenges;
239
237
  }}
240
238
  />
@@ -385,12 +385,17 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
385
385
 
386
386
  logger.info('Using frames for completion:', finalFrames.length, 'frames');
387
387
 
388
+ let finalCompletedChallenges = completedChallenges;
389
+ if (smartMode && finalCompletedChallenges.length === 0 && challenges.length > 0) {
390
+ finalCompletedChallenges = challenges.map(c => c.action);
391
+ }
392
+
388
393
  const result: VideoRecordingResult = {
389
394
  frames: finalFrames,
390
395
  duration: actualDuration,
391
- instructionsFollowed: completedChallenges.length === challenges.length,
396
+ instructionsFollowed: finalCompletedChallenges.length === challenges.length,
392
397
  qualityScore: finalFrames.length > 0 ? Math.min(100, (finalFrames.length / 30) * 100) : 85,
393
- challengesCompleted: completedChallenges,
398
+ challengesCompleted: finalCompletedChallenges,
394
399
  sessionId,
395
400
  };
396
401
 
@@ -404,7 +409,7 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
404
409
  setOverallProgress(0);
405
410
  handleRecordingError(error);
406
411
  }
407
- }, [frames, completedChallenges, challenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase]);
412
+ }, [frames, completedChallenges, challenges, sessionId, onComplete, resetAndRetry, handleRecordingError, strings, minDurationMs, phase, smartMode]);
408
413
 
409
414
  const startFrameCapture = useCallback(() => {
410
415
  if (cameraRef.current && device) {