@getyoti/react-face-capture 2.8.1 → 2.9.1

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 CHANGED
@@ -1,5 +1,76 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2.9.1
4
+
5
+ ### New features
6
+
7
+ - Implemented theming capabilities for customizing the border radius of different elements.
8
+
9
+ - Buttons
10
+ - `--fcm-button-border-radius-bottom-left`
11
+ - `--fcm-button-border-radius-bottom-right`
12
+ - `--fcm-button-border-radius-top-right`
13
+ - `--fcm-button-border-radius-top-left`
14
+ - Help dialogue
15
+ - `--fcm-help-panel-border-radius-bottom-left`
16
+ - `--fcm-help-panel-border-radius-bottom-right`
17
+ - `--fcm-help-panel-border-radius-top-right`
18
+ - `--fcm-help-panel-border-radius-top-left`
19
+ - User feedback
20
+ - `--fcm-feedback-border-radius-bottom-left`
21
+ - `--fcm-feedback-border-radius-bottom-right`
22
+ - `--fcm-feedback-border-radius-top-right`
23
+ - `--fcm-feedback-border-radius-top-left`
24
+
25
+ - Add new localisation:
26
+ - `az-AZ`: Azerbaijani (Azerbaijan)
27
+ - `zh-TW`: Traditional Chinese (Taiwan)
28
+
29
+ - Added a new theming capability to control the vertical offset of the user feedback (prompt) from the top edge on portrait devices (default: 0; percentage recommended):
30
+ - `--fcm-prompt-portrait-top`
31
+
32
+ ## v2.9.0
33
+
34
+ ### New features
35
+
36
+ - Improved and updated security features.
37
+
38
+ - Enhanced UI.
39
+
40
+ - Added automatic state reports to improve debugging.
41
+
42
+ - The FCM will periodically call the `/state` endpoint, sending performance metrics and the state.
43
+
44
+ ### Fixes
45
+
46
+ - Corrected a layout issue on the loading and error screens in Safari.
47
+
48
+ - Fixed a minor misalignment of the loading page layout in Safari under specific circumstances.
49
+
50
+ - Improved CSS isolation of text in the FCM. Text will no longer inherit the text-align property.
51
+
52
+ - Improved accessibility
53
+
54
+ - Removed unnecessary element announced as “group” in some screen readers.
55
+
56
+ - Fixed a runtime console warning.
57
+
58
+ - Localisation has been revised. The following languages have been updated:
59
+ - `cs-CZ`
60
+ - `es-ES`
61
+ - `fr-FR`
62
+ - `hu-HU`
63
+ - `ms-MY` which is now alias of `ms-SG`
64
+ - `ms-SG`
65
+ - `sk-SK`
66
+ - `ta-TG`
67
+
68
+ #### Peer dependencies updates
69
+
70
+ - Updated `react` dependency version to be at least `16.14.0` and a maximum of `18.3.1`.
71
+
72
+ - Updated `react-dom` dependency version to be at least `16.14.0` and a maximum of `18.3.1`.
73
+
3
74
  ## v2.8.1
4
75
 
5
76
  ### New features
@@ -12,10 +83,11 @@
12
83
  - Update UI component library to enhance theming stability.
13
84
  - Improve usability for keyboard only users.
14
85
  - Improve screen readers compatibility.
86
+ - Fixed LICENCE.md text formatting
15
87
 
16
88
  ### Fixes
17
89
 
18
- - Fix visual bug when taking a picture in manual mode. The feedback prompt is now highlighted correctly.
90
+ - Fix visual bug when taking a picture in manual mode. The user feedback prompt is now highlighted correctly.
19
91
 
20
92
  ## v2.8.0
21
93
 
@@ -58,12 +130,12 @@ Multiframe is a new layer of protection added on top of the curren security feat
58
130
 
59
131
  - Adds a new prop `sessionDuration` which specifies the maximum duration of the session before it times out, regardless of number of retry attempts.
60
132
  - The value must be within 30s and 5m (in milliseconds), and invalid values will trigger an exception.
61
- - The icon for the multiple faces feedback was changed.
133
+ - The icon for the multiple faces user feedback was changed.
62
134
  - `a11yLiveRegionMode` is now deprecated and will be removed in the next major release. Accessibility features like `aria-live` are now handled internally.
63
135
 
64
136
  ### Fixes
65
137
 
66
- - The feedback message is centred so the possibility of overlap with the face layout has been reduced.
138
+ - The user feedback message is centred so the possibility of overlap with the face layout has been reduced.
67
139
  - Localisation has been revised. The following languages have been updated:
68
140
  - `bs-BA`: Bosnian
69
141
  - `sr-RS`: Serbian (Latin script)
@@ -294,7 +366,7 @@ Fixed an issue introduced in v2.3.0 causing the `numStableFrames` property to be
294
366
 
295
367
  - Improve security checks.
296
368
  - UI improvements on help dialogue.
297
- - Change feedback message for `OVERCONSTRAINED` and `NO_CAMERA` errors from
369
+ - Change user feedback message for `OVERCONSTRAINED` and `NO_CAMERA` errors from
298
370
  `Please try again` to `Please try using a different device`.
299
371
 
300
372
  ### Fixes
@@ -322,7 +394,7 @@ See section [v2.0.0-beta.1](#v200-beta1) with previous changes for version
322
394
 
323
395
  - Improved the help dialogue UI.
324
396
 
325
- - Updated Tagalog localisation message for "Only one face allowed" feedback.
397
+ - Updated Tagalog localisation message for "Only one face allowed" user feedback.
326
398
 
327
399
  ### Fixes
328
400
 
@@ -487,7 +559,7 @@ See section [v2.0.0-beta.1](#v200-beta1) with previous changes for version
487
559
 
488
560
  ### Fixes
489
561
 
490
- - Fix Greek localisation for "Place your face in the frame" feedback.
562
+ - Fix Greek localisation for "Place your face in the frame" user feedback.
491
563
 
492
564
  ## v1.3.0
493
565
 
@@ -511,7 +583,7 @@ See section [v2.0.0-beta.1](#v200-beta1) with previous changes for version
511
583
 
512
584
  - Secure session initialisation request is no longer cached.
513
585
  - Added missing fields in the typing file.
514
- - Camera feedback messages are shown only after the camera permissions were
586
+ - Camera user feedback messages are shown only after the camera permissions were
515
587
  giving not before.
516
588
 
517
589
  ## v1.2.0
@@ -531,7 +603,7 @@ See section [v2.0.0-beta.1](#v200-beta1) with previous changes for version
531
603
 
532
604
  - Fix the error when the FCM component is unmounted if it uses the secure mode.
533
605
 
534
- - Use the new Yoti colors for the button and overlay feedback.
606
+ - Use the new Yoti colors for the button and overlay user feedback.
535
607
 
536
608
  ## v1.1.0
537
609
 
@@ -720,7 +792,7 @@ component.
720
792
 
721
793
  ### Fixes
722
794
 
723
- - Fix feedback message when the user is too close to the camera
795
+ - Fix user feedback message when the user is too close to the camera
724
796
 
725
797
  - Fix state warning after component mounting
726
798
 
package/README.md CHANGED
@@ -14,8 +14,8 @@ to review release changes, issues, fixes, and possible breaking changes on Major
14
14
  The package depends on the following peer dependencies
15
15
 
16
16
  ```
17
- "react": ">=16.14.0 <=18.2.0",
18
- "react-dom": ">=16.14.0 <=18.2.0"
17
+ "react": ">=16.14.0 <=18.3.1",
18
+ "react-dom": ">=16.14.0 <=18.3.1"
19
19
  ```
20
20
 
21
21
  ### Browser support
@@ -24,12 +24,12 @@ The package depends on the following peer dependencies
24
24
 
25
25
  | Browser | Versions |
26
26
  | ------- | ------------------- |
27
- | and_chr | 145 |
28
- | chrome | 145,144,143,142 |
29
- | edge | 145,144 |
30
- | firefox | 147,146,145,144 |
31
- | ios_saf | 26.3,26.2,26.1 |
32
- | safari | 26.3,26.2,26.1,26.0 |
27
+ | and_chr | 147 |
28
+ | chrome | 148,147,146,145 |
29
+ | edge | 147,146 |
30
+ | firefox | 150,149,148,147 |
31
+ | ios_saf | 26.4,26.3,26.2 |
32
+ | safari | 26.4,26.3,26.2,26.1 |
33
33
 
34
34
  </browserSupportTable>
35
35
 
@@ -94,7 +94,20 @@ It is possible to customize the style by changing the following CSS properties:
94
94
  - `--fcm-frame-color-neutral` Sets the color of the face frame.
95
95
  - `--fcm-frame-color-success` Sets the success color of the face frame.
96
96
  - `--fcm-frame-color-warning` Sets the warning color of the face frame.
97
- - `--fcm-frame-color-invalid-manual` Sets the color of the face frame for manual mode invalid image feedback.
97
+ - `--fcm-frame-color-invalid-manual` Sets the color of the face frame for manual mode invalid image user feedback.
98
+ - `--fcm-button-border-radius-bottom-left` Sets the border radius of the buttons.
99
+ - `--fcm-button-border-radius-bottom-right` Sets the border radius of the buttons.
100
+ - `--fcm-button-border-radius-top-right` Sets the border radius of the buttons.
101
+ - `--fcm-button-border-radius-top-left` Sets the border radius of the buttons.
102
+ - `--fcm-help-panel-border-radius-bottom-left` Sets the border radius of the help dialogue.
103
+ - `--fcm-help-panel-border-radius-bottom-right` Sets the border radius of the help dialogue.
104
+ - `--fcm-help-panel-border-radius-top-right` Sets the border radius of the help dialogue.
105
+ - `--fcm-help-panel-border-radius-top-left` Sets the border radius of the help dialogue.
106
+ - `--fcm-feedback-border-radius-bottom-left` Sets the border radius of the user feedback.
107
+ - `--fcm-feedback-border-radius-bottom-right` Sets the border radius of the user feedback.
108
+ - `--fcm-feedback-border-radius-top-right` Sets the border radius of the user feedback.
109
+ - `--fcm-feedback-border-radius-top-left` Sets the border radius of the user feedback.
110
+ - `--fcm-prompt-portrait-top` Sets the user feedback (prompt) vertical offset for portrait devices using `center` faceSelectionMethod (percentage recommended). The default value is 0.
98
111
 
99
112
  The approach for the customization changed on version 2.6.0. The following variables got deprecated and will be removed in future versions:
100
113
 
@@ -159,6 +172,7 @@ Current languages supported:
159
172
 
160
173
  - `en-GB`: English
161
174
  - `ar-XN`: Arabic
175
+ - `az-AZ`: Azerbaijani
162
176
  - `bg-BG`: Bulgarian
163
177
  - `bs-BA`: Bosnian
164
178
  - `cs-CZ`: Czech
@@ -183,7 +197,9 @@ Current languages supported:
183
197
  - `ko-KR`: Korean
184
198
  - `lt-LT`: Lithuanian
185
199
  - `lv-LV`: Latvian
186
- - `ms-MY`: Malay
200
+ - `ms`: Malay (Malaysia) \*\*\*
201
+ - `ms-MY`: Malay (Malaysia)
202
+ - `ms-SG:` Malay (Singapore)
187
203
  - `nb-NO`: Norwegian
188
204
  - `nl-NL`: Dutch
189
205
  - `pl-PL`: Polish
@@ -203,6 +219,7 @@ Current languages supported:
203
219
  - `ur-PK`: Urdu
204
220
  - `vi-VN`: Vietnamese
205
221
  - `zh-CN`: Chinese (Simplified)
222
+ - `zh-TW`: Traditional Chinese (Taiwan)
206
223
 
207
224
  **(\*\*\*)**
208
225
  Language codes marked with \*\*\* are listed for disambiguation purposes on the fallback. They are exactly the same as their respective regional variants.
@@ -401,3 +418,19 @@ Modifications over the original image captured by the camera, like virtual backg
401
418
  When using multiframe mode, the prediction request must include the query parameter `multiframe=true`. This is required for the service to process the request correctly. If there is a mismatch between the Face Capture's multiframe setting and the multiframe query parameter in the request, the response will always be `UNTRUSTED_SECURE_SESSION`.
402
419
 
403
420
  When enabling this mode, ensure both the Face Capture configuration and the prediction request are aligned to avoid this error.
421
+
422
+ ### Permission Policies
423
+
424
+ When running the FCM inside an iFrame, you might need to set [Permission Policies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Permissions_Policy) to ensure the system works as expected.
425
+
426
+ The FCM uses `camera` and `autoplay` policies, so you can set the `allow` iFrame attribute to something like.
427
+
428
+ ```html
429
+ <iframe allow="autoplay *; camera *;" />
430
+ ```
431
+
432
+ This enables only `camera` and `autoplay` regardless of the origin of the host document. Other attributes can be set to `none`.
433
+
434
+ Please remember that you need to reflect the changes in the `<head>` of your host HTML file by setting the `<meta>` tag with the same permissions policy string as shown above. For example:
435
+
436
+ `<meta http-equiv="Permissions-Policy" content="autoplay=*, camera=*">`
package/index.d.ts CHANGED
@@ -108,6 +108,8 @@ declare module '@getyoti/react-face-capture' {
108
108
  export enum LANGUAGE_CODE {
109
109
  AR = 'ar',
110
110
  AR_XN = 'ar-XN',
111
+ AZ = 'az',
112
+ AZ_AZ = 'az-AZ',
111
113
  BG = 'bg',
112
114
  BG_BG = 'bg-BG',
113
115
  BS = 'bs',
@@ -159,6 +161,7 @@ declare module '@getyoti/react-face-capture' {
159
161
  LV_LV = 'lv-LV',
160
162
  MS = 'ms',
161
163
  MS_MY = 'ms-MY',
164
+ MS_SG = 'ms-SG',
162
165
  NB = 'nb',
163
166
  NB_NO = 'nb-NO',
164
167
  NL = 'nl',
@@ -197,6 +200,7 @@ declare module '@getyoti/react-face-capture' {
197
200
  ZH = 'zh',
198
201
  ZH_CN = 'zh-CN',
199
202
  ZH_SG = 'zh-SG',
203
+ ZH_TW = 'zh-TW',
200
204
  }
201
205
 
202
206
  /**