@unissey-web/web-components 3.8.0-beta.5

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.
@@ -0,0 +1,1132 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { LitElement, PropertyValues as PropertyValues$1 } from 'lit';
4
+ import { PropertyValues } from '@lit/reactive-element';
5
+ import { UnisseySession, SessionConfig as SessionConfig$1, AcquisitionPreset as AcquisitionPreset$1, LogLevel as LogLevel$1, StatusEvent } from '@unissey/sdk-web-js';
6
+
7
+ type ButtonVariant = "contained" | "outlined";
8
+ declare class Button extends LitElement {
9
+ variant: ButtonVariant;
10
+ disabled: boolean;
11
+ width: string;
12
+ static properties: {
13
+ variant: {
14
+ attribute: string;
15
+ type: StringConstructor;
16
+ };
17
+ width: {
18
+ attribute: string;
19
+ type: StringConstructor;
20
+ };
21
+ disabled: {
22
+ attribute: string;
23
+ type: BooleanConstructor;
24
+ };
25
+ };
26
+ static styles: lit.CSSResult;
27
+ render(): lit_html.TemplateResult<1>;
28
+ }
29
+
30
+ type HintMessages = {
31
+ left: string;
32
+ right: string;
33
+ up: string;
34
+ down: string;
35
+ perfect: string;
36
+ closer: string;
37
+ record: string;
38
+ nil: string;
39
+ };
40
+ type HintType = keyof HintMessages;
41
+ type FaceChecker = "enabled" | "disabled" | "disabled-on-retry";
42
+
43
+ declare class OverlayHints extends LitElement {
44
+ hint: HintType;
45
+ message: string;
46
+ strings: HintMessages;
47
+ static properties: {
48
+ hint: {
49
+ attribute: string;
50
+ type: StringConstructor;
51
+ };
52
+ message: {
53
+ state: boolean;
54
+ };
55
+ strings: {
56
+ attribute: string;
57
+ type: ObjectConstructor;
58
+ };
59
+ };
60
+ static styles: lit.CSSResult;
61
+ render(): lit_html.TemplateResult<1>;
62
+ }
63
+
64
+ declare class CameraVideoOutlinedIcon extends LitElement {
65
+ static styles: lit.CSSResult;
66
+ render(): lit_html.TemplateResult<1>;
67
+ }
68
+
69
+ declare const EN: {
70
+ videoRecorder: {
71
+ capture: string;
72
+ retry: string;
73
+ errors: {
74
+ noFace: string;
75
+ };
76
+ hints: {
77
+ up: string;
78
+ down: string;
79
+ perfect: string;
80
+ right: string;
81
+ left: string;
82
+ closer: string;
83
+ record: string;
84
+ nil: string;
85
+ };
86
+ forbiddenActionMessages: {
87
+ visibility: string;
88
+ focus: string;
89
+ keyboard: string;
90
+ default: string;
91
+ };
92
+ cameraErrorMessages: {
93
+ permissionDenied: string;
94
+ openFailed: string;
95
+ default: string;
96
+ };
97
+ rotationWhileCapturingErrorMessage: string;
98
+ activeChallengeMessages: {
99
+ rotateLeft: string;
100
+ rotateRight: string;
101
+ rotateUp: string;
102
+ rotateDown: string;
103
+ };
104
+ };
105
+ pictureRecorder: {
106
+ capture: string;
107
+ };
108
+ imageCaptureDirections: {
109
+ document: string;
110
+ face: string;
111
+ light: string;
112
+ };
113
+ videoRecordDirections: {
114
+ position: string;
115
+ face: string;
116
+ light: string;
117
+ camera: string;
118
+ };
119
+ pictureEditor: {
120
+ validate: string;
121
+ };
122
+ fileUpload: {
123
+ badType: string;
124
+ maxSize: string;
125
+ text: string;
126
+ };
127
+ retryResult: {
128
+ default: string;
129
+ retryMessage: string;
130
+ retriesLeft: {
131
+ _1: string;
132
+ _2: string;
133
+ _3: string;
134
+ };
135
+ retryBtn: string;
136
+ finishBtn: string;
137
+ covideMask: string;
138
+ brightness: string;
139
+ };
140
+ selfieCapture: {
141
+ back: string;
142
+ directionSubtitle: string;
143
+ recordBtnLabel: string;
144
+ title: string;
145
+ recordSubtitle: string;
146
+ acquisitionDuration: {
147
+ base: string;
148
+ singular: string;
149
+ plural: string;
150
+ };
151
+ directions: {
152
+ position: string;
153
+ face: string;
154
+ light: string;
155
+ camera: string;
156
+ };
157
+ recorder: {
158
+ capture: string;
159
+ retry: string;
160
+ errors: {
161
+ noFace: string;
162
+ };
163
+ hints: {
164
+ up: string;
165
+ down: string;
166
+ perfect: string;
167
+ right: string;
168
+ left: string;
169
+ closer: string;
170
+ record: string;
171
+ nil: string;
172
+ };
173
+ forbiddenActionMessages: {
174
+ visibility: string;
175
+ focus: string;
176
+ keyboard: string;
177
+ default: string;
178
+ };
179
+ cameraErrorMessages: {
180
+ permissionDenied: string;
181
+ openFailed: string;
182
+ default: string;
183
+ };
184
+ rotationWhileCapturingErrorMessage: string;
185
+ activeChallengeMessages: {
186
+ rotateLeft: string;
187
+ rotateRight: string;
188
+ rotateUp: string;
189
+ rotateDown: string;
190
+ };
191
+ };
192
+ };
193
+ referenceCapture: {
194
+ back: string;
195
+ title: string;
196
+ captureTitle: string;
197
+ editorTitle: string;
198
+ directionSubtitle: string;
199
+ pictureRecordSubtitle: string;
200
+ videoRecordSubtitle: string;
201
+ uploadBtn: string;
202
+ pictureBtn: string;
203
+ recordVidBtn: string;
204
+ retryPictureCaptureBtn: string;
205
+ retryVideoCaptureBtn: string;
206
+ replayValidation: string;
207
+ editor: {
208
+ validate: string;
209
+ };
210
+ directions: {
211
+ document: string;
212
+ face: string;
213
+ light: string;
214
+ };
215
+ videoRecorder: {
216
+ capture: string;
217
+ retry: string;
218
+ errors: {
219
+ noFace: string;
220
+ };
221
+ hints: {
222
+ up: string;
223
+ down: string;
224
+ perfect: string;
225
+ right: string;
226
+ left: string;
227
+ closer: string;
228
+ record: string;
229
+ nil: string;
230
+ };
231
+ forbiddenActionMessages: {
232
+ visibility: string;
233
+ focus: string;
234
+ keyboard: string;
235
+ default: string;
236
+ };
237
+ cameraErrorMessages: {
238
+ permissionDenied: string;
239
+ openFailed: string;
240
+ default: string;
241
+ };
242
+ rotationWhileCapturingErrorMessage: string;
243
+ activeChallengeMessages: {
244
+ rotateLeft: string;
245
+ rotateRight: string;
246
+ rotateUp: string;
247
+ rotateDown: string;
248
+ };
249
+ };
250
+ pictureRecorder: {
251
+ capture: string;
252
+ };
253
+ fileUpload: {
254
+ badType: string;
255
+ maxSize: string;
256
+ text: string;
257
+ };
258
+ };
259
+ };
260
+ type I18n = typeof EN;
261
+
262
+ type InstructionMessage = {
263
+ message: string;
264
+ duration: number;
265
+ };
266
+ declare class Recorder extends LitElement {
267
+ session: UnisseySession | null;
268
+ sessionPromise: Promise<void> | null;
269
+ config: SessionConfig$1;
270
+ preset: AcquisitionPreset$1;
271
+ resultEvent: {
272
+ name: string;
273
+ mediaPropertyName: string;
274
+ includeMetadata: boolean;
275
+ };
276
+ mediaType: string;
277
+ faceChecker: FaceChecker;
278
+ instructionMessages: InstructionMessage[];
279
+ instructionMessage: string;
280
+ instructionTimer: number;
281
+ instructions: string[];
282
+ instructionNumber: number;
283
+ defaultStrings: {
284
+ capture: string;
285
+ retry: string;
286
+ errors: {
287
+ noFace: string;
288
+ };
289
+ hints: {
290
+ up: string;
291
+ down: string;
292
+ perfect: string;
293
+ right: string;
294
+ left: string;
295
+ closer: string;
296
+ record: string;
297
+ nil: string;
298
+ };
299
+ forbiddenActionMessages: {
300
+ visibility: string;
301
+ focus: string;
302
+ keyboard: string;
303
+ default: string;
304
+ };
305
+ cameraErrorMessages: {
306
+ permissionDenied: string;
307
+ openFailed: string;
308
+ default: string;
309
+ };
310
+ rotationWhileCapturingErrorMessage: string;
311
+ activeChallengeMessages: {
312
+ rotateLeft: string;
313
+ rotateRight: string;
314
+ rotateUp: string;
315
+ rotateDown: string;
316
+ };
317
+ };
318
+ strings: Partial<typeof EN.videoRecorder>;
319
+ captureButtonPicto: lit_html.TemplateResult<1>;
320
+ logLevel: LogLevel$1;
321
+ displayFlipCameraBtn: boolean | undefined;
322
+ hideCaptureBtn: boolean;
323
+ disconnected: boolean;
324
+ initSessionInprogress: boolean;
325
+ hints: HintType;
326
+ error: string;
327
+ sdkJsStatus: StatusEvent;
328
+ willRetryCapture: boolean;
329
+ retryCount: number;
330
+ isCameraFlipped: boolean;
331
+ faceDetectionFails: boolean;
332
+ static properties: {
333
+ preset: {
334
+ attribute: string;
335
+ type: StringConstructor;
336
+ };
337
+ config: {
338
+ attribute: string;
339
+ type: ObjectConstructor;
340
+ };
341
+ strings: {
342
+ attribute: string;
343
+ type: ObjectConstructor;
344
+ };
345
+ displayFlipCameraBtn: {
346
+ attribute: string;
347
+ type: BooleanConstructor;
348
+ };
349
+ hideCaptureBtn: {
350
+ attribute: string;
351
+ type: BooleanConstructor;
352
+ };
353
+ faceChecker: {
354
+ attribute: string;
355
+ type: StringConstructor;
356
+ };
357
+ logLevel: {
358
+ attribute: string;
359
+ type: NumberConstructor;
360
+ };
361
+ instructionMessages: {
362
+ attribute: string;
363
+ type: ArrayConstructor;
364
+ };
365
+ hints: {
366
+ state: boolean;
367
+ };
368
+ error: {
369
+ state: boolean;
370
+ };
371
+ sdkJsStatus: {
372
+ state: boolean;
373
+ };
374
+ willRetryCapture: {
375
+ state: boolean;
376
+ };
377
+ instructions: {
378
+ state: boolean;
379
+ };
380
+ instructionMessage: {
381
+ state: boolean;
382
+ };
383
+ instructionTimer: {
384
+ state: boolean;
385
+ };
386
+ };
387
+ constructor();
388
+ retryCapture(): Promise<void>;
389
+ capture(): Promise<void>;
390
+ flipCamera(): Promise<void>;
391
+ protected firstUpdated(): void;
392
+ updated(_changedProperties: PropertyValues): void;
393
+ connectedCallback(): void;
394
+ disconnectedCallback(): void;
395
+ private isRunning;
396
+ private getString;
397
+ private initSdkJs;
398
+ private releaseSdkJs;
399
+ private sdkJsListener_status;
400
+ private sdkJsListener_faceInfo;
401
+ private sdkJsListener_issue;
402
+ private sdkJsListener_activeChallenge;
403
+ private buildSessionConfig;
404
+ private callInitSession;
405
+ private initSession;
406
+ private handleBadFacePos;
407
+ private resetHints;
408
+ private setDimensionsToElement;
409
+ private adjustContainerSize;
410
+ private displaySpinner;
411
+ private hideSpinner;
412
+ displayError(message?: string): Promise<void>;
413
+ private hideError;
414
+ static styles: lit.CSSResult[];
415
+ render(): lit_html.TemplateResult<1>;
416
+ }
417
+
418
+ declare class DirectionCard extends LitElement {
419
+ static styles: lit.CSSResult;
420
+ render(): lit_html.TemplateResult<1>;
421
+ }
422
+
423
+ type VideoRecordDirectionsStrings = {
424
+ position: string;
425
+ face: string;
426
+ light: string;
427
+ camera: string;
428
+ };
429
+ declare class VideoRecordDirections extends LitElement {
430
+ strings: VideoRecordDirectionsStrings;
431
+ static properties: {
432
+ strings: {
433
+ attribute: string;
434
+ type: ObjectConstructor;
435
+ };
436
+ };
437
+ static styles: lit.CSSResult[];
438
+ render(): lit_html.TemplateResult<1>;
439
+ }
440
+
441
+ declare class PictureRecorder extends Recorder {
442
+ constructor();
443
+ }
444
+
445
+ type PictureEditorStrings = {
446
+ validate: string;
447
+ };
448
+ declare class PictureEditor extends LitElement {
449
+ rotation: number;
450
+ image: string;
451
+ strings: PictureEditorStrings;
452
+ private rotatedImageBase64?;
453
+ private rotatedImage?;
454
+ constructor();
455
+ static properties: {
456
+ image: {
457
+ attribute: string;
458
+ type: StringConstructor;
459
+ };
460
+ rotation: {
461
+ attribute: string;
462
+ type: NumberConstructor;
463
+ };
464
+ strings: {
465
+ attribute: string;
466
+ type: ObjectConstructor;
467
+ };
468
+ };
469
+ static styles: lit.CSSResult;
470
+ rotateImage(degrees: number): Promise<void>;
471
+ rotateLeft(): Promise<void>;
472
+ rotateRight(): Promise<void>;
473
+ emitValidation(): void;
474
+ firstUpdated(changes: PropertyValues$1<this>): Promise<void>;
475
+ render(): lit_html.TemplateResult<1>;
476
+ private createImage;
477
+ private blobToBase64;
478
+ }
479
+
480
+ type FileUploadStrings = {
481
+ badType: string;
482
+ maxSize: string;
483
+ text: string;
484
+ };
485
+ declare class FileUpload extends LitElement {
486
+ maxSize: number;
487
+ supportedTypes: string[];
488
+ strings: FileUploadStrings;
489
+ error: string;
490
+ inited: boolean;
491
+ constructor();
492
+ static properties: {
493
+ supportedTypes: {
494
+ attribute: string;
495
+ type: ArrayConstructor;
496
+ };
497
+ maxSize: {
498
+ attribute: string;
499
+ type: NumberConstructor;
500
+ };
501
+ strings: {
502
+ attribute: string;
503
+ type: ObjectConstructor;
504
+ };
505
+ error: {
506
+ state: boolean;
507
+ };
508
+ init: {
509
+ state: boolean;
510
+ };
511
+ };
512
+ validateFile(type: string, size: number): {
513
+ valid: boolean;
514
+ error: string;
515
+ };
516
+ handleFileSelection(files: FileList): void;
517
+ handleClick(): void;
518
+ init(): void;
519
+ updated(): void;
520
+ static styles: lit.CSSResult;
521
+ render(): lit_html.TemplateResult<1>;
522
+ }
523
+
524
+ type ImageCaptureDirectionsStrings = {
525
+ document: string;
526
+ face: string;
527
+ light: string;
528
+ };
529
+ declare class ImageCaptureDirections extends LitElement {
530
+ strings: ImageCaptureDirectionsStrings;
531
+ static properties: {
532
+ strings: {
533
+ attribute: string;
534
+ type: ObjectConstructor;
535
+ };
536
+ };
537
+ static styles: lit.CSSResult[];
538
+ render(): lit_html.TemplateResult<1>;
539
+ }
540
+
541
+ declare class RecorderExt extends Recorder {
542
+ }
543
+
544
+ type Hint = "generic" | "mask" | "brightness" | "mask-brightness";
545
+ type RetryResultStrings = {
546
+ default: string;
547
+ retryMessage: string;
548
+ retriesLeft: {
549
+ _1: string;
550
+ _2: string;
551
+ _3: string;
552
+ };
553
+ retryBtn: string;
554
+ finishBtn: string;
555
+ covideMask: string;
556
+ brightness: string;
557
+ };
558
+ declare class RetryResult extends LitElement {
559
+ hintKind: Hint;
560
+ retriesLeft: number;
561
+ strings: RetryResultStrings;
562
+ static properties: {
563
+ hintKind: {
564
+ attribute: string;
565
+ type: StringConstructor;
566
+ };
567
+ retriesLeft: {
568
+ attribute: string;
569
+ type: NumberConstructor;
570
+ };
571
+ strings: {
572
+ attribute: string;
573
+ type: ObjectConstructor;
574
+ };
575
+ };
576
+ static styles: lit.CSSResult;
577
+ isMobile: boolean;
578
+ handleFinish(): void;
579
+ handleRetry(): void;
580
+ render(): lit_html.TemplateResult<1>;
581
+ }
582
+
583
+ type CaptureStep$2 = "directions" | "record";
584
+ declare const selfieCaptureStrings: {
585
+ back: string;
586
+ directionSubtitle: string;
587
+ recordBtnLabel: string;
588
+ title: string;
589
+ recordSubtitle: string;
590
+ acquisitionDuration: {
591
+ base: string;
592
+ singular: string;
593
+ plural: string;
594
+ };
595
+ directions: {
596
+ position: string;
597
+ face: string;
598
+ light: string;
599
+ camera: string;
600
+ };
601
+ recorder: {
602
+ capture: string;
603
+ retry: string;
604
+ errors: {
605
+ noFace: string;
606
+ };
607
+ hints: {
608
+ up: string;
609
+ down: string;
610
+ perfect: string;
611
+ right: string;
612
+ left: string;
613
+ closer: string;
614
+ record: string;
615
+ nil: string;
616
+ };
617
+ forbiddenActionMessages: {
618
+ visibility: string;
619
+ focus: string;
620
+ keyboard: string;
621
+ default: string;
622
+ };
623
+ cameraErrorMessages: {
624
+ permissionDenied: string;
625
+ openFailed: string;
626
+ default: string;
627
+ };
628
+ rotationWhileCapturingErrorMessage: string;
629
+ activeChallengeMessages: {
630
+ rotateLeft: string;
631
+ rotateRight: string;
632
+ rotateUp: string;
633
+ rotateDown: string;
634
+ };
635
+ };
636
+ };
637
+ type RecorderOptions$1 = Partial<{
638
+ preset: AcquisitionPreset$1;
639
+ logLevel: LogLevel$1;
640
+ config: Partial<SessionConfig$1>;
641
+ faceChecker: FaceChecker;
642
+ instructionMessages: InstructionMessage[];
643
+ }>;
644
+ declare class SelfieCapture extends LitElement {
645
+ captureStep: CaptureStep$2;
646
+ strings: Partial<typeof selfieCaptureStrings>;
647
+ recorderOptions: RecorderOptions$1;
648
+ hideCapturePrevBtn: boolean;
649
+ hideCaptureBtn: boolean;
650
+ acquisitionTime: number;
651
+ static properties: {
652
+ recorderOptions: {
653
+ attribute: string;
654
+ type: ObjectConstructor;
655
+ };
656
+ strings: {
657
+ attribute: string;
658
+ type: ObjectConstructor;
659
+ };
660
+ hideCapturePrevBtn: {
661
+ attribute: string;
662
+ type: BooleanConstructor;
663
+ };
664
+ hideCaptureBtn: {
665
+ attribute: string;
666
+ type: BooleanConstructor;
667
+ };
668
+ captureStep: {
669
+ state: boolean;
670
+ };
671
+ acquisitionTime: {
672
+ state: boolean;
673
+ };
674
+ };
675
+ static styles: lit.CSSResult;
676
+ constructor();
677
+ handleBack(): void;
678
+ handleRecordStart(): void;
679
+ handleRecord(e: CustomEvent<{
680
+ media: Blob;
681
+ metadata: unknown;
682
+ }>): void;
683
+ handleRecoderReady(e: CustomEvent<{
684
+ mediaType: string;
685
+ acquisitionTime: number;
686
+ }>): void;
687
+ handleRecordCompleted(e: CustomEvent<{
688
+ media: Blob;
689
+ metadata: unknown;
690
+ }>): void;
691
+ handleRecordStarting(e: CustomEvent): void;
692
+ handleRecordCapturing(e: CustomEvent): void;
693
+ handleRecordInterrupted(e: CustomEvent): void;
694
+ renderDirections(): lit_html.TemplateResult<1>;
695
+ renderRecorder(): lit_html.TemplateResult<1>;
696
+ render(): lit_html.TemplateResult<1>;
697
+ }
698
+
699
+ type CaptureStep$1 = "directions" | "file-upload" | "picture-record" | "video-record" | "picture-editor" | "video-replay";
700
+ type State = {
701
+ step: CaptureStep$1;
702
+ prevStep?: CaptureStep$1;
703
+ picture?: Blob;
704
+ video?: Blob;
705
+ };
706
+ type Actions = {
707
+ type: "display-directions";
708
+ } | {
709
+ type: "display-file-upload";
710
+ } | {
711
+ type: "display-picture-record";
712
+ } | {
713
+ type: "display-video-record";
714
+ } | {
715
+ type: "display-picture-editor";
716
+ } | {
717
+ type: "display-video-replay";
718
+ } | {
719
+ type: "set-video";
720
+ payload: {
721
+ video: Blob;
722
+ };
723
+ } | {
724
+ type: "set-picture";
725
+ payload: {
726
+ picture: Blob;
727
+ source: "file-upload" | "picture-record";
728
+ };
729
+ };
730
+ declare const referenceCaptureStrings: {
731
+ back: string;
732
+ title: string;
733
+ captureTitle: string;
734
+ editorTitle: string;
735
+ directionSubtitle: string;
736
+ pictureRecordSubtitle: string;
737
+ videoRecordSubtitle: string;
738
+ uploadBtn: string;
739
+ pictureBtn: string;
740
+ recordVidBtn: string;
741
+ retryPictureCaptureBtn: string;
742
+ retryVideoCaptureBtn: string;
743
+ replayValidation: string;
744
+ editor: {
745
+ validate: string;
746
+ };
747
+ directions: {
748
+ document: string;
749
+ face: string;
750
+ light: string;
751
+ };
752
+ videoRecorder: {
753
+ capture: string;
754
+ retry: string;
755
+ errors: {
756
+ noFace: string;
757
+ };
758
+ hints: {
759
+ up: string;
760
+ down: string;
761
+ perfect: string;
762
+ right: string;
763
+ left: string;
764
+ closer: string;
765
+ record: string;
766
+ nil: string;
767
+ };
768
+ forbiddenActionMessages: {
769
+ visibility: string;
770
+ focus: string;
771
+ keyboard: string;
772
+ default: string;
773
+ };
774
+ cameraErrorMessages: {
775
+ permissionDenied: string;
776
+ openFailed: string;
777
+ default: string;
778
+ };
779
+ rotationWhileCapturingErrorMessage: string;
780
+ activeChallengeMessages: {
781
+ rotateLeft: string;
782
+ rotateRight: string;
783
+ rotateUp: string;
784
+ rotateDown: string;
785
+ };
786
+ };
787
+ pictureRecorder: {
788
+ capture: string;
789
+ };
790
+ fileUpload: {
791
+ badType: string;
792
+ maxSize: string;
793
+ text: string;
794
+ };
795
+ };
796
+ type RecorderOptions = Partial<{
797
+ logLevel: LogLevel$1;
798
+ }>;
799
+ declare class ReferenceCapture extends LitElement {
800
+ constructor();
801
+ state: State;
802
+ strings: Partial<typeof referenceCaptureStrings>;
803
+ recorderOptions: RecorderOptions;
804
+ hideCaptureBtn: boolean;
805
+ static properties: {
806
+ recorderOptions: {
807
+ attribute: string;
808
+ type: ObjectConstructor;
809
+ };
810
+ strings: {
811
+ attribute: string;
812
+ type: ObjectConstructor;
813
+ };
814
+ hideCaptureBtn: {
815
+ attribute: string;
816
+ type: BooleanConstructor;
817
+ };
818
+ state: {
819
+ state: boolean;
820
+ };
821
+ };
822
+ static styles: lit.CSSResult;
823
+ handleFileSelection(e: CustomEvent<{
824
+ file: File;
825
+ }>): void;
826
+ handlePictureCapture(e: CustomEvent<{
827
+ picture: Blob;
828
+ }>): void;
829
+ dispatch(action: Actions): void;
830
+ displayUploadStep(): void;
831
+ displayPictureRecordStep(): void;
832
+ displayVideoRecordStep(): void;
833
+ displayDirectionsStep(): void;
834
+ retryCapture(): void;
835
+ handlePicture(e: CustomEvent<{
836
+ picture: Blob;
837
+ }>): void;
838
+ handleVideo(): void;
839
+ handleVideoRecord(e: CustomEvent<{
840
+ media: Blob;
841
+ meta: unknown;
842
+ }>): void;
843
+ handleVideoRecoderReady(e: CustomEvent<{
844
+ mediaType: string;
845
+ acquisitionTime: number;
846
+ }>): void;
847
+ handlePictureRecoderReady(e: CustomEvent<{
848
+ mediaType: string;
849
+ acquisitionTime: number;
850
+ }>): void;
851
+ handleRecordCompleted(e: CustomEvent<{
852
+ media: Blob;
853
+ metadata: unknown;
854
+ }>): void;
855
+ handleRecordStarting(e: CustomEvent): void;
856
+ handleRecordCapturing(e: CustomEvent): void;
857
+ handleRecordInterrupted(e: CustomEvent): void;
858
+ renderDirections(): lit_html.TemplateResult<1>;
859
+ renderFileUpload(): lit_html.TemplateResult<1>;
860
+ renderPictureEditor(): lit_html.TemplateResult<1>;
861
+ renderPictureRecord(): lit_html.TemplateResult<1>;
862
+ renderVideoRecord(): lit_html.TemplateResult<1>;
863
+ renderVideoReplay(): lit_html.TemplateResult<1>;
864
+ render(): lit_html.TemplateResult<1>;
865
+ }
866
+
867
+ type CaptureStep = "reference" | "selfie";
868
+ declare const fullCaptureStrings: {
869
+ reference: {
870
+ back: string;
871
+ title: string;
872
+ captureTitle: string;
873
+ editorTitle: string;
874
+ directionSubtitle: string;
875
+ pictureRecordSubtitle: string;
876
+ videoRecordSubtitle: string;
877
+ uploadBtn: string;
878
+ pictureBtn: string;
879
+ recordVidBtn: string;
880
+ retryPictureCaptureBtn: string;
881
+ retryVideoCaptureBtn: string;
882
+ replayValidation: string;
883
+ editor: {
884
+ validate: string;
885
+ };
886
+ directions: {
887
+ document: string;
888
+ face: string;
889
+ light: string;
890
+ };
891
+ videoRecorder: {
892
+ capture: string;
893
+ retry: string;
894
+ errors: {
895
+ noFace: string;
896
+ };
897
+ hints: {
898
+ up: string;
899
+ down: string;
900
+ perfect: string;
901
+ right: string;
902
+ left: string;
903
+ closer: string;
904
+ record: string;
905
+ nil: string;
906
+ };
907
+ forbiddenActionMessages: {
908
+ visibility: string;
909
+ focus: string;
910
+ keyboard: string;
911
+ default: string;
912
+ };
913
+ cameraErrorMessages: {
914
+ permissionDenied: string;
915
+ openFailed: string;
916
+ default: string;
917
+ };
918
+ rotationWhileCapturingErrorMessage: string;
919
+ activeChallengeMessages: {
920
+ rotateLeft: string;
921
+ rotateRight: string;
922
+ rotateUp: string;
923
+ rotateDown: string;
924
+ };
925
+ };
926
+ pictureRecorder: {
927
+ capture: string;
928
+ };
929
+ fileUpload: {
930
+ badType: string;
931
+ maxSize: string;
932
+ text: string;
933
+ };
934
+ };
935
+ selfie: {
936
+ back: string;
937
+ directionSubtitle: string;
938
+ recordBtnLabel: string;
939
+ title: string;
940
+ recordSubtitle: string;
941
+ acquisitionDuration: {
942
+ base: string;
943
+ singular: string;
944
+ plural: string;
945
+ };
946
+ directions: {
947
+ position: string;
948
+ face: string;
949
+ light: string;
950
+ camera: string;
951
+ };
952
+ recorder: {
953
+ capture: string;
954
+ retry: string;
955
+ errors: {
956
+ noFace: string;
957
+ };
958
+ hints: {
959
+ up: string;
960
+ down: string;
961
+ perfect: string;
962
+ right: string;
963
+ left: string;
964
+ closer: string;
965
+ record: string;
966
+ nil: string;
967
+ };
968
+ forbiddenActionMessages: {
969
+ visibility: string;
970
+ focus: string;
971
+ keyboard: string;
972
+ default: string;
973
+ };
974
+ cameraErrorMessages: {
975
+ permissionDenied: string;
976
+ openFailed: string;
977
+ default: string;
978
+ };
979
+ rotationWhileCapturingErrorMessage: string;
980
+ activeChallengeMessages: {
981
+ rotateLeft: string;
982
+ rotateRight: string;
983
+ rotateUp: string;
984
+ rotateDown: string;
985
+ };
986
+ };
987
+ };
988
+ };
989
+ declare class FullCapture extends LitElement {
990
+ constructor();
991
+ captureStep: CaptureStep;
992
+ reference: Blob;
993
+ strings: Partial<typeof fullCaptureStrings>;
994
+ recorderOptions: RecorderOptions$1;
995
+ hideSelfieCaptureBtn: boolean;
996
+ hideReferenceCaptureBtn: boolean;
997
+ static properties: {
998
+ recorderOptions: {
999
+ attribute: string;
1000
+ type: ObjectConstructor;
1001
+ };
1002
+ strings: {
1003
+ attribute: string;
1004
+ type: ObjectConstructor;
1005
+ };
1006
+ hideSelfieCaptureBtn: {
1007
+ attribute: string;
1008
+ type: BooleanConstructor;
1009
+ };
1010
+ hideReferenceCaptureBtn: {
1011
+ attribute: string;
1012
+ type: BooleanConstructor;
1013
+ };
1014
+ captureStep: {
1015
+ state: boolean;
1016
+ };
1017
+ };
1018
+ handleReference(e: CustomEvent<{
1019
+ media: Blob;
1020
+ }>): void;
1021
+ handleSelfie(e: CustomEvent<{
1022
+ media: Blob;
1023
+ metadata: unknown;
1024
+ }>): void;
1025
+ handleRecoderReady(e: CustomEvent<{
1026
+ recorderElmt: HTMLElement;
1027
+ mediaType: string;
1028
+ contentKind: string;
1029
+ acquisitionTime?: number;
1030
+ }>): void;
1031
+ handleBack(): void;
1032
+ renderReferenceStep(): lit_html.TemplateResult<1>;
1033
+ renderSelfieStep(): lit_html.TemplateResult<1>;
1034
+ render(): lit_html.TemplateResult<1>;
1035
+ }
1036
+
1037
+ declare const FR: I18n;
1038
+
1039
+ declare enum AcquisitionPreset {
1040
+ SELFIE_FAST = "selfie-fast",
1041
+ SELFIE_SUBSTANTIAL = "selfie-substantial",
1042
+ SELFIE_OPTIMIZED = "selfie-optimized",
1043
+ NO_RECORD = "no-record",
1044
+ DOC_VIDEO = "doc-video",
1045
+ DOC_IMAGE = "doc-image"
1046
+ }
1047
+ declare enum IadMode {
1048
+ DISABLED = "disabled",
1049
+ PASSIVE = "passive",
1050
+ PASSIVE_LT = "passive-lt",
1051
+ ACTIVE_FALLBACK = "active-fallback",
1052
+ ACTIVE = "active"
1053
+ }
1054
+ type IadConfig = {
1055
+ mode: IadMode;
1056
+ data?: string;
1057
+ retryCount?: number;
1058
+ activeChallengeConfig?: ActiveChallengeConfig;
1059
+ };
1060
+ type ActiveChallengeConfig = {
1061
+ numberOfActions?: number;
1062
+ maxSecondsBetweenActions?: number;
1063
+ };
1064
+ type VideoLength = {
1065
+ type: "duration";
1066
+ durationMs: number;
1067
+ } | {
1068
+ type: "frame-count";
1069
+ frameCount: number;
1070
+ };
1071
+ interface RecordingConfig {
1072
+ audio: boolean;
1073
+ bitRateKbps: number;
1074
+ length: VideoLength;
1075
+ }
1076
+ type ColorRGBA = [number, number, number, number];
1077
+ type OverlayColors = Record<"background" | "innerBorder" | "progressColor", ColorRGBA>;
1078
+ declare enum OverlayDisplayMode {
1079
+ OVAL = "oval",
1080
+ RECT_PORTRAIT = "rect-portrait",
1081
+ RECT_LANDSCAPE = "rect-landscape",
1082
+ DEBUG_FRAME = "debug-frame",
1083
+ ID_DOCUMENT = "id-document"
1084
+ }
1085
+ type OverlayConfig = {
1086
+ displayMode: OverlayDisplayMode;
1087
+ colors: OverlayColors;
1088
+ };
1089
+ declare enum VideoOrientation {
1090
+ LANDSCAPE = "landscape",
1091
+ PORTRAIT = "portrait"
1092
+ }
1093
+ declare enum LogLevel {
1094
+ QUIET = 0,
1095
+ WARNING = 1,
1096
+ INFO = 2,
1097
+ VERBOSE = 3,
1098
+ PERFORMANCE = 4
1099
+ }
1100
+ declare enum VideoResolutionPreset {
1101
+ NO_SPECIFIC_RESOLUTION = "no-specific-resolution",
1102
+ STD_480P = "720x480",
1103
+ STD_720P = "1280x720",
1104
+ STD_1080P = "1920x1080",
1105
+ STD_2160P = "3840x2160",
1106
+ STD_4320P = "7680x4320",
1107
+ STD_VGA = "640x480",
1108
+ STD_SVGA = "800x600",
1109
+ STD_XVGA = "1024x768",
1110
+ SQUARE_600P = "600x600"
1111
+ }
1112
+ declare enum FacingMode {
1113
+ FRONT = "user",
1114
+ BACK = "environment"
1115
+ }
1116
+ interface CameraConfig {
1117
+ preferredFps: number;
1118
+ preferredResolution: VideoResolutionPreset;
1119
+ preferredOrientation: VideoOrientation;
1120
+ facingMode: FacingMode;
1121
+ }
1122
+ interface SessionConfig {
1123
+ overlayConfig?: Partial<OverlayConfig>;
1124
+ cameraConfig?: Partial<CameraConfig>;
1125
+ recordingConfig?: Partial<RecordingConfig>;
1126
+ iadConfig?: IadConfig;
1127
+ versions?: {
1128
+ [name: string]: string;
1129
+ };
1130
+ }
1131
+
1132
+ export { AcquisitionPreset, ActiveChallengeConfig, Button, CameraConfig, CameraVideoOutlinedIcon, ColorRGBA, DirectionCard, EN, FR, FaceChecker, FacingMode, FileUpload, FullCapture, IadConfig, IadMode, ImageCaptureDirections, InstructionMessage, LogLevel, OverlayColors, OverlayConfig, OverlayDisplayMode, OverlayHints, PictureEditor, PictureRecorder, Recorder, RecorderExt, RecorderOptions$1 as RecorderOptions, RecordingConfig, ReferenceCapture, RetryResult, SelfieCapture, SessionConfig, VideoLength, VideoOrientation, VideoRecordDirections, VideoResolutionPreset };