@authme/identity-verification 2.8.55 → 2.8.59
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 +34 -0
- package/assets/locale/zh_Hant_TW.json +1 -1
- package/assets/styles/_base.scss +759 -0
- package/assets/styles/_liveness.scss +324 -0
- package/assets/styles/_ocr.scss +2422 -0
- package/assets/styles/_theme.scss +144 -0
- package/assets/styles/style.css +20 -1
- package/assets/styles/style.scss +11 -0
- package/index.cjs.js +192 -20
- package/index.esm.js +193 -22
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/support.d.ts +27 -0
- package/src/lib/v2/ui/modal.d.ts +1 -1
- package/src/lib/validate-config.d.ts +11 -0
package/README.md
CHANGED
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
This library was generated with [Nx](https://nx.dev).
|
|
4
4
|
|
|
5
|
+
## Public API highlights
|
|
6
|
+
|
|
7
|
+
### `isSupported()` — pre-flight environment check
|
|
8
|
+
|
|
9
|
+
Synchronous binary check that the current browser/device falls within the
|
|
10
|
+
SDK's supported range. Call it before initializing `AuthmeIdentityVerification`
|
|
11
|
+
so unsupported users hit a friendly "this device is not supported" page
|
|
12
|
+
instead of an opaque error mid-flow.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { isSupported } from '@authme/identity-verification';
|
|
16
|
+
|
|
17
|
+
const check = isSupported();
|
|
18
|
+
if (!check.supported) {
|
|
19
|
+
// Show "please use another browser/device". Log `reasons` to telemetry.
|
|
20
|
+
console.warn('eKYC unsupported:', check.reasons, check.info);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
// supported === true → continue with SDK initialization
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The returned object:
|
|
27
|
+
|
|
28
|
+
| Field | Meaning |
|
|
29
|
+
| ----------- | ------------------------------------------------------------------------- |
|
|
30
|
+
| `supported` | `true` iff `reasons` is empty. |
|
|
31
|
+
| `reasons` | Why the device is unsupported. One or more of: `NO_WEBASSEMBLY`, `NO_MEDIA_DEVICES`, `INSECURE_CONTEXT`, `OLD_IOS` (iOS < 16.4), `OLD_ANDROID` (Android < 9), `IN_APP_WEBVIEW` (LINE / FB / IG / Messenger / WeChat). Empty when `supported` is `true`. |
|
|
32
|
+
| `info` | Detected environment snapshot — device string, system string, WASM flags, mediaDevices, secureContext, in-app WebView, hardwareConcurrency, deviceMemory. Useful for telemetry regardless of `supported`. |
|
|
33
|
+
|
|
34
|
+
The check is purely UA + feature detection: it does **not** request the
|
|
35
|
+
camera, load the engine, or make network requests. Typical execution time
|
|
36
|
+
is sub-millisecond. See `docs/browser-support-matrix.md` for the
|
|
37
|
+
corresponding human-readable support matrix.
|
|
38
|
+
|
|
5
39
|
## Running unit tests
|
|
6
40
|
|
|
7
41
|
Run `nx test identity-verification-feature-identity-verification` to execute the unit tests via [Jest](https://jestjs.io).
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"sdk.home.selectDocument.hint.upcoming": "即將進行",
|
|
231
231
|
"sdk.home.selectDocument.title": "國家與證件",
|
|
232
232
|
"sdk.home.title": "證件辨識",
|
|
233
|
-
"sdk.liveness.detection.content": "
|
|
233
|
+
"sdk.liveness.detection.content": "將臉部置於圓框中,依照畫面指示進行操作",
|
|
234
234
|
"sdk.liveness.detection.header": "人臉辨識",
|
|
235
235
|
"sdk.liveness.detection.infopageHint.environment": "在環境光線充足的地方進行",
|
|
236
236
|
"sdk.liveness.detection.infopageHint.face": "請確保臉上沒有任何遮蔽物",
|