interview-widget 3.2.24-beta.0 → 3.2.26

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/README.md CHANGED
@@ -201,10 +201,13 @@ Pass this object to `InterviewWidgetProvider` via the `config` prop. Tables list
201
201
 
202
202
  ### UI
203
203
 
204
- | Prop | Type | Default | Description |
205
- | ------------ | -------------- | --------- | -------------------------------------- |
206
- | baseColor | `string (hex)` | "#3B82F6" | Primary brand color used by the widget |
207
- | borderRadius | `string (CSS)` | "8px" | Global corner radius for components |
204
+ | Prop | Type | Default | Description |
205
+ | --- | --- | --- | --- |
206
+ | baseColor | `string (hex)` | "#3B82F6" | Primary brand color used by the widget |
207
+ | borderRadius | `string (CSS)` | "8px" | Global corner radius for components |
208
+ | retryProgressSavedText | `string` | `"Your progress is saved — tap Retry or exit the interview..."` | Text to show in next-question retry modal |
209
+ | retryMaxAttempts | `number` | 3 | Maximum number of attempts allowed for retrying next question |
210
+ | retryNoAttemptsLeftText | `string` | `"No retry attempts left. Please refresh or come back later."` | Error message shown when max attempts are reached |
208
211
 
209
212
  ### Interview
210
213
 
@@ -22,6 +22,11 @@ interface InterviewContentProps {
22
22
  onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
23
23
  editingTime?: number | undefined;
24
24
  disableSubmitButton?: boolean;
25
+ fetchQuestionError?: any;
26
+ onRetryQuestion?: () => void;
27
+ retryClicksCount?: number;
28
+ isFetchingQuestion?: boolean;
29
+ onExitInterview?: () => void;
25
30
  }
26
31
  export declare const InterviewContent: React.FC<InterviewContentProps>;
27
32
  export {};
@@ -18,6 +18,7 @@ interface VideoFeedProps {
18
18
  cheatingWarningVisible?: boolean;
19
19
  isDeviceLoading?: boolean;
20
20
  videoAllowed?: boolean;
21
+ questionNumber?: number;
21
22
  }
22
23
  declare const VideoFeed: import('react').ForwardRefExoticComponent<VideoFeedProps & import('react').RefAttributes<VideoFeedHandle>>;
23
24
  export default VideoFeed;
@@ -0,0 +1,9 @@
1
+ interface RetryConfirmationModalProps {
2
+ isOpen: boolean;
3
+ onRetry: () => void;
4
+ onExit: () => void;
5
+ retryClicksCount: number;
6
+ isLoading: boolean;
7
+ }
8
+ export declare const RetryConfirmationModal: ({ isOpen, onRetry, onExit, retryClicksCount, isLoading, }: RetryConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -21,6 +21,9 @@ export declare function useAPIConfig(): {
21
21
  export declare function useUIConfig(): {
22
22
  baseColor?: string;
23
23
  borderRadius?: string;
24
+ retryProgressSavedText?: string;
25
+ retryMaxAttempts?: number;
26
+ retryNoAttemptsLeftText?: string;
24
27
  };
25
28
  export declare function useInterviewConfigSection(): NonNullable<InterviewWidgetConfig["interview"]>;
26
29
  export declare function useSTTConfig(): {
@@ -1,4 +1,4 @@
1
- export declare function useVideoRecordingStream(interviewId: string, record_video?: boolean): {
1
+ export declare function useVideoRecordingStream(interviewId: string, record_video?: boolean, questionNumber?: number): {
2
2
  startRecording: (stream: MediaStream) => void;
3
3
  stopRecording: () => void;
4
4
  isRecording: boolean;
@@ -44,6 +44,7 @@ declare class STTService {
44
44
  private pendingStopPromise;
45
45
  private isStarting;
46
46
  private recordingStartTime;
47
+ private lastRecordedBlob;
47
48
  static activeStream: MediaStream | null;
48
49
  constructor(config?: STTConfig);
49
50
  /**
package/dist/types.d.ts CHANGED
@@ -46,6 +46,9 @@ export interface InterviewWidgetConfig {
46
46
  ui?: {
47
47
  baseColor?: string;
48
48
  borderRadius?: string;
49
+ retryProgressSavedText?: string;
50
+ retryMaxAttempts?: number;
51
+ retryNoAttemptsLeftText?: string;
49
52
  };
50
53
  interview?: {
51
54
  allow_answer_editing?: boolean;
@@ -39,11 +39,11 @@ export declare function getSafariSafeAudioConstraints(base?: MediaTrackConstrain
39
39
  */
40
40
  export declare function getMediaRecorderStartArg(): number | undefined;
41
41
  /**
42
- * Stops a MediaRecorder, flushing the final chunk on Safari first.
43
- *
44
- * Safari sometimes fails to include the last audio segment in the blob
45
- * unless requestData() is explicitly called just before stop(). [SAFARI]
46
- * On other browsers requestData() is already called at the stop-promise
47
- * setup site, so we only call stop() here.
42
+ * [SAFARI] Do NOT call requestData() before stop().
43
+ * Without a timeslice, stop() guarantees one ondataavailable fires
44
+ * synchronously before onstop. Calling requestData() first queues a
45
+ * SECOND ondataavailable as a separate task on some Safari versions
46
+ * that second event arrives AFTER onstop, so audioChunks is empty
47
+ * when the blob is assembled. Just call stop().
48
48
  */
49
49
  export declare function safariSafeStop(recorder: MediaRecorder): void;