@sekyro/react 0.1.0-rc.1 → 0.1.0-rc.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +289 -0
  2. package/LICENSE +25 -16
  3. package/README.md +151 -14
  4. package/dist/chunk-2KED7D2Q.js +2 -0
  5. package/dist/chunk-5XYKAT3V.js +2 -0
  6. package/dist/chunk-63LPCEVJ.js +2 -0
  7. package/dist/chunk-746GPDBD.js +2 -0
  8. package/dist/chunk-D5WF4UNP.js +2 -0
  9. package/dist/chunk-ECWKDUB5.js +2 -0
  10. package/dist/chunk-EZ5TVL6P.js +2 -0
  11. package/dist/chunk-H2KIOYQU.js +2 -0
  12. package/dist/chunk-JNAKE3DW.js +2 -0
  13. package/dist/chunk-MXPLBQHW.js +2 -0
  14. package/dist/chunk-PCNVEJSW.js +2 -0
  15. package/dist/chunk-PYAJMHZH.js +2 -0
  16. package/dist/chunk-VRDPGOXM.js +2 -0
  17. package/dist/chunk-YY76AMUA.js +2 -0
  18. package/dist/chunk-ZCAZDOMD.js +2 -0
  19. package/dist/document-capture-view-E2USDGQJ.js +2 -0
  20. package/dist/eid-view-74CN2XAY.js +2 -0
  21. package/dist/email-otp-view-DE624TXY.js +2 -0
  22. package/dist/flow-views-CO5TQYTP.js +2 -0
  23. package/dist/fonts/Cairo-OFL.txt +93 -0
  24. package/dist/fonts/Geist-OFL.txt +93 -0
  25. package/dist/fonts/Inter-OFL.txt +93 -0
  26. package/dist/fonts/SekyroCairo-Bold.woff2 +0 -0
  27. package/dist/fonts/SekyroCairo-Regular.woff2 +0 -0
  28. package/dist/fonts/SekyroCairo-SemiBold.woff2 +0 -0
  29. package/dist/fonts/SekyroGeist-Bold.woff2 +0 -0
  30. package/dist/fonts/SekyroGeist-SemiBold.woff2 +0 -0
  31. package/dist/fonts/SekyroInter-Medium.woff2 +0 -0
  32. package/dist/fonts/SekyroInter-Regular.woff2 +0 -0
  33. package/dist/fonts/SekyroInter-SemiBold.woff2 +0 -0
  34. package/dist/index.cjs +2 -901
  35. package/dist/index.d.cts +7 -233
  36. package/dist/index.d.ts +7 -233
  37. package/dist/index.js +2 -880
  38. package/dist/overlay-de-UWA5CZLC.js +2 -0
  39. package/dist/overlay-es-VCSJQ4KN.js +2 -0
  40. package/dist/overlay-pt-NQMWHKF5.js +2 -0
  41. package/dist/portrait-capture-view-Y5W776HP.js +2 -0
  42. package/dist/styles.css +287 -12
  43. package/dist/theme-DqD8Nyoq.d.cts +496 -0
  44. package/dist/theme-DqD8Nyoq.d.ts +496 -0
  45. package/dist/verification/index.cjs +2 -0
  46. package/dist/verification/index.d.cts +573 -0
  47. package/dist/verification/index.d.ts +573 -0
  48. package/dist/verification/index.js +2 -0
  49. package/dist/verification.css +586 -0
  50. package/package.json +27 -13
  51. package/sbom.cdx.json +153 -0
  52. package/dist/index.cjs.map +0 -1
  53. package/dist/index.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,294 @@
1
1
  # @sekyro/react
2
2
 
3
+ ## 0.1.0-rc.11
4
+
5
+ ### Minor Changes
6
+
7
+ - ef0b9b2: Person data (spec 2026-10-31): `<IdNumberEntry>` replaces `<NniEntry>` (kept as a deprecated alias). The dictionaries gain the generic keys (`reasons.id_number_invalid`, `reasons.registry_record_not_found`, `reasons.document_id_number_mismatch`, `errors.id_number_unbound`, `population.reason_id_number_invalid`, `population.reason_registry_record_not_found`, `population.reason_registry_record_not_found_or_document`, `summary.id_number`, `otp.countryLabel`, `otp.phonePlaceholderGeneric`); either name of a renamed reason shows the generic copy, and an override written under a former key still applies. The phone step no longer assumes one country: it uses the flow's contact countries (a fixed prefix for one, a country select for several, a free international field for an empty list; a server that sends none keeps the former Mauritanian prefix), drops the country's trunk prefix, and the submitted number stays E.164. The document picker lists the session's named issuers first.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [ef0b9b2]
12
+ - @sekyro/web@0.1.0-rc.13
13
+
14
+ ## 0.1.0-rc.10
15
+
16
+ ### Patch Changes
17
+
18
+ - 22acfcf: Adds the Age check (selfie) processing step and renders any future server step as processing. Deploy this version before turning on the age check for your organization. While the age check runs, the processing screen says "Checking your age" in every supported language.
19
+ - Updated dependencies [22acfcf]
20
+ - @sekyro/web@0.1.0-rc.12
21
+
22
+ ## 0.1.0-rc.9
23
+
24
+ ### Minor Changes
25
+
26
+ - a3247a3: Screen ramp and capture provenance (liveness v7). When the session's capture tuning carries `capture.liveness.screenRamp` (a server-issued challenge: three pastel colours and their onsets), `@sekyro/web` paints them through the new `ramp` event of the liveness capture handle while the clip records, stamps each change on the clip's own timeline (the recorder's start, corrected by the video element's frame clock when the browser reports one) and sends what it rendered as `input.capture.screenRamp: {nonce, rendered: [{tMs, colour}]}`. `@sekyro/react` paints the layer in both stages (the face camera of `SekyroVerification` and the 0.1 stage) and hands it to a custom stage renderer as `ramp` on the stage view; a host on `@sekyro/web` alone subscribes to `ramp` and paints a fixed full-viewport element with `screenRampColourValue(colour)`, or leaves the event unbound (then no ramp is reported). Hosts that want ramp verification bind the `ramp` event: `provenance.rampPainter` tells the backend whether a painter was bound, so an unbound host is a client without the ramp rather than one missing it. No ramp in an assisted capture or without a challenge. Every liveness submit now also carries `input.capture.provenance` (the video track's settings with the device id hashed, whether `getCapabilities` exists, the camera label's class against a small list of virtual-camera products, `requestVideoFrameCallback` statistics over the recording, and whether the capture prototypes are still native code): signals only, no media, no raw identifiers. New types: `ScreenRampChallenge`, `ScreenRampColour`, `ScreenRampReport`, `CaptureProvenance`, `HostedLivenessCaptureTuning`. The native SDKs decode the challenge in this release and render it in the following one.
27
+
28
+ ### Patch Changes
29
+
30
+ - 032585b: Liveness retakes: `VerificationResult.retakeHint` and `StepAttempts.retakeHint` (`appearance | motion | lighting | framing`) carry the backend's retake hint; `@sekyro/react` shows the matching `hints.*` copy in place of the reason's generic text. A parked step whose attempts did not grow (a voided capture) is always a `retry`, and `capture_back_camera` / `capture_not_upright` are retryable.
31
+ - 4bdc14c: `DEFAULT_THEME` and the `styles.css` defaults now use the Sekyro AI brand: the same colours, font and 16px control radius as `<SekyroVerification>` and the native SDKs. Dashboard branding radius steps map to 0, 6, 10, 16 and 9999px, matching iOS and Android. Pass your own theme to keep the previous look.
32
+ - Updated dependencies [a3247a3]
33
+ - Updated dependencies [032585b]
34
+ - Updated dependencies [f13b832]
35
+ - Updated dependencies [90dde69]
36
+ - @sekyro/web@0.1.0-rc.11
37
+
38
+ ## 0.1.0-rc.8
39
+
40
+ ### Minor Changes
41
+
42
+ - 97fe8cf: Assisted capture follow-ups.
43
+
44
+ - `<LivenessCapture>` in an assisted session opens the back camera by default only on a device with a front/back choice, else the front one (`IntroContext.facing`). While the stage runs, the preview mirror follows the camera the live stream reports, not the one requested.
45
+ - Start stays a loader (`IntroContext.assets` is `"loading"`) and the auto-start waits until the camera to open is known: the session's capture mode and, in an assisted session, whether the device has a front/back choice.
46
+ - The ICAO portrait camera follows the session too: in an assisted session it shows the back camera unmirrored and a front/back switch (on a device with both, until the photo is taken); a self session keeps the mirrored front camera.
47
+ - b8af08c: Breaking (pre-1.0): the session's flow decides who films the face, and no prop can widen it. `allowCameraSwitch` (`<SekyroVerification>`) and `defaultFacing` (`<LivenessCapture>`, `livenessProps`) are removed.
48
+
49
+ - Self capture (the default, and every capture-only `<LivenessCapture>`): the front camera only, no front/back picker, no switch on the stage.
50
+ - Assisted capture (an agent films the person, set in the flow): the back camera by default with an unmirrored preview, the front/back picker on a device with both cameras, the switch until the clip records, and copy for the agent (`capture.assisted.title`, `capture.assisted.lead`, `capture.assisted.stage`). The voice guidance still speaks to the person filmed.
51
+ - `IntroContext` gains `captureMode`; `canChooseFacing` is `false` in a self capture.
52
+ - New copy in ar/fr/en: `fcv3.hold_upright` (the phone is held sideways; also a voice key) and the retake reasons `reasons.capture_back_camera` and `reasons.capture_not_upright`. `hintStringKey("upright")` maps to `fcv3.hold_upright`.
53
+
54
+ ### Patch Changes
55
+
56
+ - b092ac3: The back camera is no longer mirrored. On the front camera (the default) the face preview and the keyframe stay mirrored like a selfie, exactly as before. When a capture runs on the back camera (`start({ facing: "environment" })` or the in-capture switch), the engine's keyframe and `previewDataUrl` are drawn as the camera sees them, and `<LivenessCapture>` / `<SekyroVerification>` show the back camera's preview unmirrored (an inline `transform: none` on the `<video>`). The liveness clip is unchanged: it was never mirrored.
57
+ - eabd027: Consent and registry copy no longer says "NNI" to everyone: the consent screen names "your identity document number", checked against the issuing authority's records when available, and `reasons.registry_unavailable` says "your number". The Mauritanian registry steps (`population.label`, `method.national_number`, `summary.nni`) say "Mauritanian national ID number (NNI)". Keys are unchanged; only the en, fr and ar values of these strings changed.
58
+ - Updated dependencies [a3cd61c]
59
+ - Updated dependencies [7ce5ab1]
60
+ - Updated dependencies [b092ac3]
61
+ - Updated dependencies [857ec58]
62
+ - @sekyro/web@0.1.0-rc.10
63
+
64
+ ## 0.1.0-rc.7
65
+
66
+ ### Minor Changes
67
+
68
+ - 1639f8a: Sekyro flows: one choice screen for every choice of the flow plan (`plan.choice`).
69
+
70
+ - `ChoiceScreen` (DESIGN.md Choice Cards: line glyph, label, radio; one tap picks and moves on after 220 ms) replaces the method screen and the contact choice: `<MethodChoice>` (identity method, `method.*` copy), the contact choice (`contact.*`) and the new generic choice step (`choice.*`, ar/fr/en) all render it, options in the server's order, labelled by their service (`nfc` and unknown services are never shown on the web). The 0.1 `<LivenessCapture>` method step uses the same component with its 0.1 buttons look (styles.css unchanged).
71
+ - The section progress follows `plan.sections` (`done | current | upcoming`); `section.screening` copy added.
72
+ - The identity summary is the `summary_confirm` step (no API change).
73
+ - In-lane switch on every step screen while the session's choice is open (C4 rule §5 item 6): one other option → a direct quiet action labelled by it (phone ⇄ email, « Use my document instead », the eID camera action, or the target's method label); two or more → « Use another option » (`choice.switch`, ar/fr/en), which re-opens the ChoiceScreen with the current option marked.
74
+ - Flow-view chunk budget 10 240 → 10 752 B gzip (the generic choice copy, then the in-lane switch views).
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [8dbdcf3]
79
+ - @sekyro/web@0.1.0-rc.9
80
+
81
+ ## 0.1.0-rc.6
82
+
83
+ ### Minor Changes
84
+
85
+ - ff0dcc7: Flow model 2026-10-23 (web lane):
86
+
87
+ - `<SekyroVerification>`: one-line implicit consent ("By continuing, you agree to the terms." with a terms link — no photo/video wording), one progress segment per section, the phone-or-email choice (+ "Use another option" under the OTP), the identity summary (portrait from memory as a blob URL, revoked on unmount; masked values left to right inside RTL; confirm / retake), the eID "then a quick live photo" hint (method screen and eID screen), the ICAO tips variant and ICAO coaching for the one-capture live photo, the portrait-only retake notice, and a QR handoff for `mobile_required` when `handoffUrl` is set. The new views and their ar/fr/en copy load on demand (one lazy chunk).
88
+ - `<SekyroFlow>`: the page shell — in-app browser prompt (WhatsApp, Instagram, Facebook, TikTok, … → open in the browser / copy link / continue anyway) and the desktop-to-phone QR of `hostedUrl` (a built-in QR encoder, no new runtime dependency). `isInAppBrowser()` is exported.
89
+ - `<LivenessCapture>`: `tipsSummary` (the spoken summary of custom tips, device voice) and `coach` (host coaching that replaces the guidance line while the camera runs).
90
+ - Step copy: new optional keys (`consent.short`, `consent.termsLink`, `section.*`, `contact.*`, `summary.*`, `capture.tipsIcao.*`, `portrait.retakeOnly`, `portrait.keepCamera`, `handoff.*`, `inApp.*`, `eid.continueHint*`, `session.progressLabel`).
91
+ - e240081: National eID screens (SDK spec §3.2; Houwiyeti in Mauritania) in `@sekyro/react/verification`: the method screen now offers "Verify with Houwiyeti" (generic "Verify with your national eID" without provider details) when the session does, and `<SekyroVerification>` runs the new `<EidStep>` — NNI entry (never asked on an NNI-bound session, which starts by itself once), the 6-digit code from the provider's app with its expiry countdown, resend after the server's spacing and up to its limit, and every `eid_*` verdict with "Verify with my camera instead" where the session allows the camera path. The view and its ar/fr/en copy load lazily (like the email OTP view), so apps without a national eID never download them. `StepStrings` gains the `method.national_eid*` keys and optional `eid.*` / `reasons.eid_*` keys (host overrides win). The 0.1 `<LivenessCapture>` drop-in is unchanged (it never offers the eID).
92
+ - 46905f2: National eID sign-in (SDK spec §3.2; Houwiyeti in Mauritania) in the headless web runner: the `eid_auth` check type, the `national_eid` identity method with `methodChoice.nationalEid`, the `HostedStepView.eid` view and the `eid_*` reasons, and an `eid` plan-runner step whose handle offers `start(identifier?)`, `verify(code)`, `resend()` and `useCamera()`. `@sekyro/react` has no eID screen yet: its method screen leaves `national_eid` out and `<SekyroVerification>` shows the "unsupported" notice when the eID is the only path.
93
+
94
+ **Migration (TypeScript):** these exported unions gained members — `CheckType` (`eid_auth`), `IdentityMethod` (`national_eid`), `CheckReason` (the `eid_*` reasons), `VerificationStep` (a new `kind: "eid"` step). Code that switches over them exhaustively must add an `eid` branch. An invalid eID number rejects with the existing `InvalidInputError("nni", …)`. Nothing changes at runtime until a profile turns the national eID on.
95
+ - 7a3f935: Phone OTP channel choice and the email OTP step.
96
+
97
+ - `@sekyro/web`: the phone OTP step lists the channels the person can choose from (`PhoneOtpSnapshot.channels`, WhatsApp first; `[]` on a session created before channel choice). With more than one, `send({ channel })` needs the person's choice — it is never picked for them — and a channel the step doesn't offer is refused locally with the new `OtpInputError` (`channel`, `required` / `unavailable`). `resendAvailableAt` now follows the server's resend time when the session reports one. New `email_otp` step (`EmailOtpStepHandle`: `send({ email })`, `verify(code)`; a malformed address rejects with `OtpInputError("email", "format")`), shown before the identity-method choice like the phone step. New types: `HostedEmailOtpView`, `EmailOtpInput`, `EmailOtpReason`, the `email_otp` check type and the reasons `otp_channel_unavailable`, `otp_destination_not_allowed`, `otp_destination_unknown`, `otp_rate_limited`, `email_invalid`, `email_disposable`.
98
+ - `@sekyro/react`: `PhoneOtpStep` shows one "Send code by …" button per offered channel (WhatsApp first) and a "Resend by …" button per channel after the server's resend time; sessions without channels keep the single "Send code" button. New `EmailOtpStep` (rendered by `SekyroVerification` for the `email_otp` step); its view and ar/fr/en copy load on demand, so apps without an email check don't download them. New copy keys `otp.chooseChannel`, `otp.sendBy`, `otp.resendBy`, the new `otp.reason_*` keys and `emailOtp.*` (overridable through `strings`).
99
+ - `@sekyro/node`: profile `phone.channels` / `phone.destinations`, `email` (`ProfileEmail`: `emailSource`, `disposable`), `attempts.email`, the `input.email` session anchor and the `email_otp` check type.
100
+ - 0c59c9a: `@sekyro/react/verification`: `<DocumentCapture>` — pick the issuing country (searchable, only the countries your eKYC profile accepts), then the document type, then scan identity cards, residence permits or passports with the rear camera: the photo is taken by itself, a flip animation asks for the other face, and the progress line shows Front · Back. The camera view loads only when a document step is shown.
101
+ - ac69110: `@sekyro/react/verification`: `<PhoneOtpStep>`, `<MethodChoice>` and `<NniEntry>` — the phone OTP, "How do you want to verify?" and national-number steps of the hosted page, accessible in Arabic, French and English.
102
+ - 7a77b9d: `@sekyro/react/verification`: `<SekyroVerification verification={…} locale="fr" />` renders the whole eKYC profile — phone OTP, method choice, national number, document for any country, liveness and face match, and every result screen (policy stops, cooldown, "needs a phone app", no attempts left) — in your theme over the session's branding, with `slots` for header, footer and result and an `onLivenessCaptured` hook that fires before the upload. `<VerificationResultScreen>` is available on its own.
103
+ - d93f378: New entry `@sekyro/react/verification` (with `@sekyro/react/verification.css`) for the profile v2 steps: the ar/fr/en step copy (`enSteps`, `frSteps`, `arSteps`, `resolveSekyroStrings`) and `useVerificationStep(verification)`. The main `@sekyro/react` entry, its strings, theme and stylesheet are unchanged.
104
+ - c9edead: `<SekyroVerification>` matches the native SDKs on the remaining screens. Consent stays flow model v3's one line (no consent screen). The face capture (liveness and the ICAO live photo, whose tips the Sekyro face intro lists) is the Lumière face camera, edge to edge: the oval cut from the ink, a ring of ticks that turns green with the capture while the aqua light runs round it, the instruction above the oval. New optional `onClose(event)` prop: when given, the header ends with a close button (`{ reason: "cancelled" }`) and the result page with "Back to {org}" (`{ reason: "finished", result }`); `VerificationResultScreen` takes an optional `onClose` for the same action. The SDK's fonts (Inter, Inter Display for titles, Cairo for Arabic) ship as woff2 assets beside `verification.css` (`font-display: swap`, `unicode-range`). Also: resending a code is a quiet text action with its countdown; the document intro offers "Change document" when the country has other documents and "Change country" only with several countries; the ID card's landscape glyph; white turn cue; one 2 px read line; the lock and the capture checks in the camera's own green; the reference is one tabular caption line with a copy glyph. In `@sekyro/web`, a card's face is classified on the card itself (an MRZ band in its lower half), so the photo side is no longer filed as the verso. The 0.1 surface (`DEFAULT_THEME`, `styles.css`) is unchanged.
105
+ - c9edead: `<SekyroVerification>` takes the Sekyro identity the Android and iOS SDKs share: the partner's logo (or initials) and name
106
+ over "identity verification", the section progress (flow model v3) drawn as thin bars, the Sekyro brand as the default
107
+ theme (partner branding and the runtime theme still win), six-box one-time code fields, document cards with an icon
108
+ and a subtitle, the camera stages in the Sekyro navy, and a "Verified by Sekyro AI" footer (`slots.footer` replaces it,
109
+ `footer: null` hides it). New `colorScheme` prop: `light` (default), `dark` or `system`; in dark a partner's brand is
110
+ kept only while it stands out from the dark canvas.
111
+ The 0.1 surface (`DEFAULT_THEME`, `styles.css`, `<LivenessCapture>` and the other 0.1 components) is unchanged.
112
+
113
+ **Visible to existing `<SekyroVerification>` integrations.** Without a `theme` prop or session branding the flow now
114
+ draws in the Sekyro brand (it used `DEFAULT_THEME` before) and ends with a "Verified by Sekyro AI" line. To keep your
115
+ current look, pass your colours (`theme={{ colors: … }}`, or set them as the app's branding) and `slots={{ footer: null }}`.
116
+ `verification.css` now loads the SDK's fonts (`./fonts/*.woff2`): your bundler must emit them as assets (esbuild needs
117
+ `loader: { ".woff2": "file" }`; Vite, webpack 5 and Next.js do it by default) and your CSP `font-src` must allow them.
118
+ - fce1604: Web live MRZ (on-device, server-controlled, additive):
119
+
120
+ - `@sekyro/web`: `DocumentCaptureOptions.liveMrz` (`mode`, `assetBaseUrl`, `workerUrl`) and the text-free `mrz` event (`searching` / `reading` / `valid` / `mismatch` / `fallback`, with a format, a coaching hint or a reason — never MRZ text). On a face with an MRZ, the session's `capture.document.liveMrz` tuning lets the on-device reader (the OCR engine in a Web Worker, now with a 494 KB MRZ-only recognizer) take the photo once every hard check digit validates twice in a row; card fronts get a text-layout lock (`capture.document.frontLock`). Every failure is today's capture. `doc_ocr` submissions carry the optional, text-free `deviceRead` hint (`DocOcrInput.deviceRead`, `DocDeviceRead`) when the still confirmation is ready. New static file `core/ocr/worker.bundle.js` (a self-contained OCR worker for static hosting).
121
+ - `@sekyro/react`: `SekyroVerification`'s `documentLiveMrz` and `DocumentCapture`'s `liveMrz` pass the options through; the document view shows the reader's states (ar/fr/en), a band strip and the 2 s "this looks like a passport/card" line.
122
+
123
+ ### Patch Changes
124
+
125
+ - 626104f: Document capture resolution: the scanner asks the opened back camera for up to 4K, takes the full-sensor `ImageCapture` photo where the browser has one (else the native video frame), crops the still to the document (card + 15 % margins, or the passport page estimated from the MRZ band) and encodes the crop at a 2560 / 2240 / 1920 px long edge (1.6 MB / 1.2 MB / 700 KB budgets). A passport MRZ goes from ~630 px to ≥ 1300 px wide where the camera delivers the pixels. `@sekyro/react`'s document stage switches to a 4:3 layout when the phone is held sideways.
126
+
127
+ Focus: the scanner ranks the back cameras after permission and opens the main wide lens (lowest-index Android back camera with continuous AF; iOS "Back Camera"), remembered per browser, falling back to `facingMode`. It applies continuous autofocus where offered, refocuses (single-shot at the document) before the photo, zooms in (≤ 2×) when the camera reports a minimum focus distance beyond the document's fill distance (1.5× on a ≥ 4K track with no focus info), refuses an out-of-focus auto-captured still (`focus_far` coaching, `dcv2.focus_far`), and adds `DocumentCaptureHandle.focusAt(x, y)` for tap-to-focus (wired into `@sekyro/react`'s stage). All feature-detected; no-ops where unsupported.
128
+ - 83c7664: `<SekyroVerification>` sets its titles of 22 px and more (page titles, the result, the camera guidance, the phone and code fields) in Geist, the brand's display face on the website and dashboard, instead of Inter Display. `verification.css` loads `fonts/SekyroGeist-SemiBold.woff2` and `fonts/SekyroGeist-Bold.woff2` (OFL, `fonts/Geist-OFL.txt`); the two Inter Display files are gone, so the fonts beside `verification.css` shrink from about 249 KB to 215 KB. Body text stays Inter, Arabic stays Cairo, and a partner font from the dashboard still replaces the titles' face too. The native SDKs (and the React Native and Flutter wrappers, which render them) ship the same change.
129
+ - 9db49b8: Adds the `nationality_unreadable` document reason: the MRZ nationality (no check digit covers it) could not be read as a country code, nor recovered from a re-read or the printed nationality — retryable with a clearer photo, not billed, and never replaced by the issuing state. `@sekyro/web`: in `DocReason` and the retryable set (the same document side is re-read). `@sekyro/react`: `reasons.nationality_unreadable` copy in ar/fr/en.
130
+ - 9acafe1: NFC chip check (M-nfc). New check type `nfc_chip` (read by the native SDKs only), its reasons (`NfcChipReason`: retryable `chip_read_failed`, `chip_access_denied`, `chip_parse_failed`; final `chip_not_present`, `nfc_unavailable`, `chip_document_mismatch`, `chip_integrity_failed`, `registry_mismatch`, `document_nni_mismatch`, `platform_unsupported`), the error codes `method_not_offered` and `nfc_outcome_not_accepted` (`KNOWN_CODES`), the identity method `document_chip`, the session failure reason `platform_unsupported` and the optional `HostedStepView.nfc` hints (`NfcStepView`). Web behaviour is unchanged: the server skips the chip for web clients or stops the session with `platform_unsupported`; `@sekyro/react`'s method screen never renders the `document_chip` option.
131
+ - 4dd2b68: ICAO `id_document` portrait capture on the web (SDK spec §5.4, M1b): `createPortraitCapture` (strict ICAO gate on the MediaPipe Face Landmarker, lazy-loaded engine, server `capture.icao` tuning), a `portrait` plan-runner step that submits `portrait_icao` and then `face_match` with the portrait, the `portrait_required` hand-over reason, and `<PortraitCapture>` in `@sekyro/react/verification`.
132
+ - 8425e95: Face-match probe binding (SDK spec §4.10): the server matches the face_match probe against face crops of the scored liveness clip. New retryable, billed `face_match` reason `probe_not_from_liveness` (the face image isn't the person in the liveness clip). `@sekyro/web`: in `FaceMatchReason` and the retryable set (the runner re-captures). `@sekyro/react`: ar/fr/en retry copy "Keep your face in the frame the whole time, then try again"; bundle budget 24 → 25 KiB. `@sekyro/node`: `ProbeBindingReason`. No capture or upload change on any platform.
133
+ - e0da6e6: `<SekyroVerification>`: `slots.headerEnd` adds a node (a language menu) at the inline end of the partner header, before the close button; and `livenessProps.slots.stageOverlay` now draws over the full-screen face camera.
134
+ - b758c1e: `<SekyroVerification>`: a step the web cannot run because it reads the document's chip (`unsupported` / `platform_unsupported`) now says "This verification needs a phone app" and names the organisation's app ("{org} asks to read your document's chip. Open {org}'s app on a phone with NFC to continue."), instead of "Update required". New `StepStrings` keys: `needsApp.title`, `needsApp.description`, `needsApp.descriptionNoOrg`.
135
+ - c9edead: `<SekyroVerification>` takes the premium redesign of the native SDKs, so the flow looks and behaves the same on the web: the flow-* type scale; one heading per page with its actions pinned in the thumb zone; the old page leaves before the new one rises in; a thin section progress whose current section is partly filled; white fields with a hairline and a 2px focus ring; the phone number after a fixed 🇲🇷 +222 segment, sendable only once valid; full-width code boxes (digit pop, caret, a shake on a wrong code) that send the code on its last digit; one tap on a country or a document chooses it; the camera intros' line marks; the Lumière document camera edge to edge (brackets that follow the card, steadied like the native ScanPresenter; the lock trace; the aqua read line; a light blur with the photo sharp in the slot while it is read and "you can put it down"; the turn cue under the slot; the captured faces in the tray); the face intro; the outcome mark drawn in light with a tap-to-copy reference. The 0.1 surface (`DEFAULT_THEME`, `styles.css`) is unchanged.
136
+ - 58c18a4: The `@sekyro/web` peer range is now `^0.1.0-rc.8 || ^0.2.0-rc.0` (was `^0.1.0-rc.7 || ^0.2.0-rc.0`): `@sekyro/react/verification` needs the step runner, `DocumentCapture` (`warmDocumentCapture`), `isValidNni` and `acceptedIssuers`, first released in `@sekyro/web` 0.1.0-rc.8. Upgrade `@sekyro/web` to 0.1.0-rc.8 or later together with this release; the main `@sekyro/react` entry is otherwise unchanged.
137
+ - f316221: The `@sekyro/web` peer range is widened to `^0.1.0-rc.7 || ^0.2.0-rc.0`. The next `@sekyro/web` release candidate (0.1.0-rc.8, with the step runner and DocumentCapture) is already inside the old range; the wider range only keeps a later 0.2 line installable next to this package. Nothing in `@sekyro/react` changes.
138
+ - 8425e95: Returning-user sessions (profile v2 step 5): `HostedSessionView.returning` and the optional `Verification.returning()` tell the host the session only confirms a known person (liveness + face match against their stored photo); `<LivenessCapture>` opens with "Confirm it's you" (ar/fr/en) unless the host renders its own header.
139
+ - 45f639f: Licence: the SDKs are now under the Sekyro AI SDK License of Ibtikar Technologies, Inc. (https://sekyro.ai/en/legal/sdk-license, also in French and Arabic). `package.json#license` is `SEE LICENSE IN LICENSE`, and each package's `LICENSE` summarises the licence and links to it. `@sekyro/web` now also ships `THIRD-PARTY-NOTICES.txt` with the MIT notice of the bundled scanic document detector and the MIT/NCSA notice of the Emscripten glue in its OCR worker.
140
+ - bc29977: Selfie ICAO policy: on a session whose selfie is checked with the `selfie` ICAO profile, the one-capture live photo shows the ICAO tips without the background tip, under the standard tips title (it is not an ID photo), and speaks those tips. ID-document sessions are unchanged.
141
+ - Updated dependencies [b81288e]
142
+ - Updated dependencies [d0c4f27]
143
+ - Updated dependencies [3438e10]
144
+ - Updated dependencies [e82324a]
145
+ - Updated dependencies [c9edead]
146
+ - Updated dependencies [f0ba853]
147
+ - Updated dependencies [626104f]
148
+ - Updated dependencies [0f19e99]
149
+ - Updated dependencies [76174c8]
150
+ - Updated dependencies [67a6be3]
151
+ - Updated dependencies [c9edead]
152
+ - Updated dependencies [650d70d]
153
+ - Updated dependencies [6571361]
154
+ - Updated dependencies [ff0dcc7]
155
+ - Updated dependencies [68b5df5]
156
+ - Updated dependencies [4c1aa5b]
157
+ - Updated dependencies [273d2ce]
158
+ - Updated dependencies [46905f2]
159
+ - Updated dependencies [9db49b8]
160
+ - Updated dependencies [6420611]
161
+ - Updated dependencies [9acafe1]
162
+ - Updated dependencies [2055ae5]
163
+ - Updated dependencies [9e27401]
164
+ - Updated dependencies [7a3f935]
165
+ - Updated dependencies [723039c]
166
+ - Updated dependencies [4dd2b68]
167
+ - Updated dependencies [471d833]
168
+ - Updated dependencies [8425e95]
169
+ - Updated dependencies [c9edead]
170
+ - Updated dependencies [8425e95]
171
+ - Updated dependencies [a3689e4]
172
+ - Updated dependencies [45f639f]
173
+ - Updated dependencies [c9edead]
174
+ - Updated dependencies [bc29977]
175
+ - Updated dependencies [4e6bfb8]
176
+ - Updated dependencies [69638fa]
177
+ - Updated dependencies [5eec558]
178
+ - Updated dependencies [fce1604]
179
+ - Updated dependencies [bdcd56e]
180
+ - Updated dependencies [426e180]
181
+ - Updated dependencies [2f9e980]
182
+ - Updated dependencies [b4c8465]
183
+ - Updated dependencies [225aeea]
184
+ - @sekyro/web@0.1.0-rc.8
185
+
186
+ ## 0.1.0-rc.5
187
+
188
+ ### Minor Changes
189
+
190
+ - 06ea302: Org and app branding from the Sekyro AI dashboard.
191
+
192
+ - `@sekyro/web`: `HostedSessionView.branding` (`HostedBranding`: `logoUrl`, `colors`, `radius`, `fontFamily`, all optional) carries only the branding set in the dashboard, merged per field (app over org). Fields nobody set are absent (keep your defaults for them), and `branding` itself is absent when nothing is set or on older APIs.
193
+ - `@sekyro/react`: `brandingToTheme(view.branding)` maps it onto a `SekyroTheme`, and `mergeThemes(...)` combines themes left to right. Pass your own theme last so it still wins: `mergeThemes(brandingToTheme(view.branding), myTheme)`. Integrations that ignore it keep the default theme.
194
+
195
+ ### Patch Changes
196
+
197
+ - 4e7a4a3: Brand: the product is now **Sekyro AI** — package descriptions, READMEs, LICENSE text and the `@sekyro/node` configuration error messages say "Sekyro AI". No API change: package names, the `Sekyro` class, exports and header names are unchanged.
198
+ - 1b6bef2: Profile v2 policy reasons, round 2. New eligibility reason `age_unverifiable` (the app sets a minimum age but the birth date could not be read — `doc_ocr`: retryable with a clearer photo; `population_registry`: final). `failureReason` is widened to every policy reason a session can end on: the session-level reasons plus `nationality_not_allowed`, `underage`, `document_type_not_accepted`, `document_nni_mismatch` and `age_unverifiable`. `@sekyro/web`: `PolicyFailureReason` widened, `age_unverifiable` in `DocReason` / `PopulationReason` / `RETRYABLE_REASONS`. `@sekyro/react`: ar/fr/en copy for `age_unverifiable`. `@sekyro/node`: `EligibilityReason` gains `age_unverifiable`; new `PolicyFailureReason` type used by `Session.failureReason` and the `session.failed` webhook data.
199
+ - 1b6bef2: Profile v2 policy reasons. `@sekyro/web`: the eligibility check reasons `document_type_not_accepted` (retryable), `nationality_not_allowed` and `underage`; `SessionFailureReason` (`location_not_allowed`, `anonymizer_blocked`); `HostedSessionView.failureReason` and `acceptedDocumentTypes`. `@sekyro/react`: ar/fr/en copy for the five reasons. `@sekyro/node`: `SessionFailureReason`, `EligibilityReason`, and `failureReason` on `Session` and the `session.failed` webhook data.
200
+ - 13d512f: Profile v2 step 3: identity-method choice, document-NNI registry submit, matching reasons, `subject` input. `@sekyro/web`: `IdentityMethod`, `MethodChoiceView` and `HostedSessionView.methodChoice`; `HostedStepView.attemptsExhausted` / `nniFromDocument` (and `SessionStepView.attemptsExhausted`); `HostedClient.selectMethod()` (`POST /hosted/method`); error codes `method_required` / `method_locked` / `document_nni_mismatch` (409 when a typed NNI differs from the document's); matching reasons `name_mismatch`, `birth_date_mismatch`, `nationality_mismatch` (doc_ocr + population_registry) and `document_number_mismatch` (doc_ocr) as `MatchReason`. The headless runner stops on a pending choice (`unavailable` / `method_required`, `on('method')`), adds `verification.methodChoice()` / `selectMethod()`, and submits the registry with an empty input when the document gave the NNI. `@sekyro/react`: ar/fr/en copy for the four reasons and the method screen; `<LivenessCapture>` handles the method step while the session waits on the choice: it offers only the methods it can run (the national number — it has no document capture) and selects it without a screen when it is the only one left. `@sekyro/node`: `CreateSessionInput.subject` (`SessionSubjectInput`), `CreateSessionInput.identityMethod` and `sessions.selectMethod(id, method)` (`POST /sessions/:id/method`, `IdentityMethod`) so partners can choose the identity method of an optional-document session, `subjectId` / `externalRef` / `subjectConflict` on `Session` and session webhooks, `SessionStep.attemptsExhausted`, `MatchReason`, and the `subject.updated` webhook data (`{ subjectId, sessionId, status, outcome }`).
201
+ - acbf409: Profile v2 step 4: decision mode, desktop handoff, device stops, per-session profile overrides. `@sekyro/web`: decision-mode reasons `liveness_inconclusive`, `mobile_required`, `match_inconclusive`, `document_authenticity` (`DecisionReason`; the inconclusive three are retryable) and the registered `uncalibrated_capture_channel`; session failure reasons `capture_tampered`, `device_velocity_exceeded`, `device_cooldown`; `HostedStepView.requiresMobile` and `HostedSessionView.retryAfter`; the error code `inference_unavailable` (503, request-level, with `retryAfterSeconds` from `Retry-After` or the body). The headless runner retries `inference_unavailable` up to 3 times after `retryAfterSeconds` (default 10 s) under a fresh idempotency key and a fresh attestation, emitting `on('busy')` for each retry, then surfaces `unavailable / inference_unavailable`; it never captures a `requiresMobile` liveness step on desktop (`unavailable / mobile_required`, nothing uploaded) and adds `verification.mobileRequired()`; a `device_cooldown` result carries `retryAfter`. `@sekyro/react`: ar/fr/en coaching for the inconclusive reasons, "Continue on your phone" instead of the camera when liveness needs a phone, a "busy, trying again" notice, the device stop copy (the cooldown says when to try again — `retryAfterTime()`), no retry button for stops or `mobile_required`; bundle budget 23 → 24 KiB. `@sekyro/node`: `CreateSessionInput.profile` (`EkycProfileOverride`, a deep-partial of `EkycProfileSettings`; unknown keys are rejected server-side, widening answers `403 override_widens_profile` unless the app allows it), `Session.overriddenFields` / `riskSignals` / `retryAfter` (`overriddenFields` and `riskSignals` also on the session lifecycle webhooks), `DecisionReason`, the three device stops in `SessionFailureReason`, and the `subject.suspicious_activity` webhook data (`{ subjectId, sessionId, count }`).
202
+ - c3699fd: Add the `document_nni_mismatch` reason copy (en/fr/ar): the document belongs to a different person than the one the verification was created for.
203
+ - 58e220c: Published bundles are now minified and no longer include source maps. The public API and types are unchanged.
204
+ - Updated dependencies [4e7a4a3]
205
+ - Updated dependencies [fa95c41]
206
+ - Updated dependencies [d321707]
207
+ - Updated dependencies [c3699fd]
208
+ - Updated dependencies [c3699fd]
209
+ - Updated dependencies [1b6bef2]
210
+ - Updated dependencies [1b6bef2]
211
+ - Updated dependencies [13d512f]
212
+ - Updated dependencies [acbf409]
213
+ - Updated dependencies [b230694]
214
+ - Updated dependencies [06ea302]
215
+ - Updated dependencies [58e220c]
216
+ - @sekyro/web@0.1.0-rc.7
217
+
218
+ ## 0.1.0-rc.4
219
+
220
+ ### Minor Changes
221
+
222
+ - e3469ab: The pre-capture screen can now read its instructions aloud. A "Listen to the instructions" button under the tips plays a short spoken summary of them, and tapping it again stops it.
223
+
224
+ - **When it shows.** The button needs something that can speak the summary in the current locale: a clip, or a device voice that `speechFallback` allows. It shows with the built-in tips, in any order. It never shows with `voice={false}`. It stays visible when the voice-guidance switch is off, because the person asked for it by tapping.
225
+ - **Playback.** It never auto-plays. The clip comes from the same source as the guidance clips: your `voice.clips`, else the session's Sekyro set, else the device voice. Playback stops when the person taps Start, when the screen unmounts, or when voice guidance is switched off. It never overlaps the guidance during capture. The tap is a user gesture, so it also unlocks audio on iOS.
226
+ - **New voice key `capture.tips.summary`.** It is now in `VOICE_KEYS` and `VoiceKey`, so a `voice.clips` resolver or map can also be asked for it. If your resolver builds file names from the key, check that it handles this key.
227
+ - **Custom tips.** With your own `tips`, or `tips={false}`, the built-in summary would describe tips that are not on the screen, so the button stays hidden. To offer it, put a `capture.tips.summary` clip for the locale in `voice.clips`. Optionally override the `capture.tips.summary` string too, as the device voice reads it when the clip cannot play: `voice={{ clips: { fr: { "capture.tips.summary": "https://cdn.example.com/fr/summary.mp3" } } }}`.
228
+ - **New strings** (en/fr/ar): `capture.tips.summary` (the spoken text), `capture.tips.listen` (the button label) and `capture.tips.stop` (the label while it plays).
229
+ - 4b7bbfc: Voice guidance in verification mode now speaks the recorded Sekyro clip set that comes with the session. The package no longer ships any audio.
230
+
231
+ - **Sekyro clips by default.** With a `verification`, `<LivenessCapture>` speaks the session's ar/fr clips, read through `verification.voiceClips()` from `@sekyro/web`. They are served from `https://assets.sekyro.ai`, so a page with a Content-Security-Policy must add that origin to `media-src`. Until the set arrives, when the session has none, or when it cannot be fetched, the device voice speaks as before. A set that arrives after the Start tap is prefetched then. The guidance being spoken is never repeated.
232
+ - **Your clips still win.** `voice.clips` replaces the Sekyro clips entirely. With it set, or with `voice={false}`, the component does not fetch the Sekyro set.
233
+ - **Capture-only mode is unchanged.** Without a `verification` there are no default clips, only the device voice, which is how it already behaved: the bundled set was empty.
234
+ - **Peer dependency:** `@sekyro/web` `^0.1.0-rc.6` (for `verification.voiceClips()`).
235
+
236
+ **Breaking (rc):**
237
+
238
+ - `VoiceOptions.clipBaseUrl` is removed. There is no bundled set left to locate.
239
+ - `createManifestResolver` and the `VoiceClipManifest` type are removed.
240
+ - The `@sekyro/react/assets/*` export, including `assets/audio/v1/`, is removed, and the package no longer ships an `assets/` directory.
241
+
242
+ If you host your own clips in the `<base>/<locale>/<name>.mp3` layout, pass a resolver. `<name>` is the last segment of the key, for example `center_face`:
243
+
244
+ ```ts
245
+ const base = "https://cdn.example.com/voice/v1";
246
+ const clips: VoiceClipResolver = (key, locale) => `${base}/${locale}/${key.slice(key.lastIndexOf(".") + 1)}.mp3`;
247
+ <LivenessCapture verification={verification} locale="fr" voice={{ clips }} />;
248
+ ```
249
+
250
+ ### Patch Changes
251
+
252
+ - 26270c4: Shorter pre-capture spoken summary (`capture.tips.summary`) in fr, en and ar: well-lit place, uncover your face, phone at eye level, look at the camera and keep still.
253
+ - 819d2fa: Clarify the `fcv3.too_bright` capture hint (en/fr/ar). The old wording ("turn away from the light source" / "tournez-vous dos à la source de lumière") could lead users to backlight their face; it now reads "Too much light — move out of direct light" / "Trop de lumière — évitez la lumière directe sur le visage" / "الإضاءة قوية جدًا — تجنّب الضوء المباشر على وجهك".
254
+ - Updated dependencies [54b153c]
255
+ - @sekyro/web@0.1.0-rc.6
256
+
257
+ ## 0.1.0-rc.3
258
+
259
+ ### Minor Changes
260
+
261
+ - 1ab07df: `<LivenessCapture>` now ships a built-in "get ready" screen and speaks the capture guidance.
262
+
263
+ - **Pre-capture screen (default intro).** Tips, a camera-permission row, a front/back camera choice (on devices with both), a voice switch, the security note and one Start control that waits for the detector preload (`preloadLivenessAssets`, started on mount): busy while the models download, ready to start, or a Retry if the download failed.
264
+ - **New props:** `notice` (a node or `{ tone, text }` above the screen, pre-capture only), `startDisabled` / `startLabel` (e.g. a cooldown; gates only the built-in Start, not the error Retry / "record again" / retake), `tips` (`false`, or built-in ids / your own `IntroTip`s; `DEFAULT_TIPS`), `defaultFacing`, `voice` (`false` or `VoiceOptions`), `onGuidance(key)` (once per displayed `fcv3.*` key change).
265
+ - **`autoStart: "when-permitted"`** starts only when the camera permission is already granted (until the permission probe answers, the screen shows its loader). **Behaviour change:** `autoStart` (both forms) now waits for the detector preload to be ready before starting; meanwhile the screen shows its loader (or the retry on failure).
266
+ - **Voice guidance, on by default.** Bundled clips (`assets/audio/v1`, served at `${assetBaseUrl ?? "/models-v3"}/audio/v1`) with a device-voice (speechSynthesis) fallback; a stage chip and the intro switch toggle it; the choice persists in `localStorage`. `VoiceOptions.clips` takes a `VoiceClipSource`: a resolver `(key, locale) => url | null` or a `{ [locale]: { [voiceKey]: url } }` map (e.g. from your backend); `createManifestResolver(manifest, baseUrl)` resolves over a clip-set manifest. CSP: `media-src 'self' blob:` is enough. On iOS audio unlocks in the Start tap; with `autoStart` it unlocks on the first activating touch (`touchend`), click or key press (not Escape) inside the component. Clips are prefetched in that same gesture, and only while voice is on.
267
+ - **Slots:** `slots.intro(start, context)` gets an `IntroContext` (preload gate + retry, permission, facing + setter, voice), and `start` opens the chosen camera. `slots.voicePrompt(hint, text, key, voice)` replaces the built-in chip and gets the `VoiceControl` (`{ supported, enabled, setEnabled, toggle }`) as a 4th argument.
268
+ - **Migration — partners who speak from `voicePrompt`:** the component now speaks the guidance itself; pass `voice={false}` or the person hears it twice. A development build warns once (`console.warn`) when `slots.voicePrompt` is set and `voice` is left undefined; pass `voice={false}` (your slot speaks) or `voice={{}}` (keep the built-in voice) to silence it.
269
+ - **Migration — hosts with their own intro + `autoStart`:** if you render your own "get ready" screen outside the component and mount it with `autoStart`, the built-in pre-capture screen now appears (with its loader) while the detector preload loads, instead of the camera starting at once. Pass `slots.intro` to keep your own look during that wait (e.g. `(start, context) => context.assets === "failed" ? <YourRetry onClick={context.retryAssets} /> : <YourLoader />`), or move your intro into `slots.intro` and drop `autoStart`.
270
+ - New exports: `LivenessNotice`, `IntroContext`, `IntroTip`, `BuiltInTipId`, `DEFAULT_TIPS`, `VoiceOptions`, `VoiceControl`, `VoiceKey`, `VOICE_KEYS`, `VoiceClipSource`, `VoiceClipMap`, `VoiceClipResolver`, `VoiceClipManifest`, `createManifestResolver`.
271
+ - The bundle is now built with whitespace/syntax minification (identifiers, function names and sourcemaps kept). `process.env.NODE_ENV` stays a live expression in the published bundle, so the dev-only warnings follow your build mode.
272
+ - Peer dependency: `@sekyro/web` `^0.1.0-rc.5` (the pre-capture building blocks).
273
+
274
+ ### Patch Changes
275
+
276
+ - Updated dependencies [a14ac15]
277
+ - Updated dependencies [66522c3]
278
+ - @sekyro/web@0.1.0-rc.5
279
+
280
+ ## 0.1.0-rc.2
281
+
282
+ ### Patch Changes
283
+
284
+ - 9991ea5: Face-capture timing on `captured` and on the liveness submission (session insights).
285
+
286
+ - `CapturedArtifacts` gains `engine` (`'v3'`) and three optional whole-millisecond durations measured by the capture engine with `performance.now()`: `cameraReadyMs` (camera request → preview live), `faceAcquireMs` (camera ready → first accepted face) and `captureMs` (first accepted face → gate progress 100 %, i.e. capture complete, before the clip window and any upload; a face lost and re-acquired keeps the first start). The core `CaptureArtifacts` carries the same marks as `timing`.
287
+ - `createVerification` forwards them, together with the already-known `width` / `height` / `clipMs` and the engine id, as `input.capture` on the `liveness` submission (`LivenessInput.capture`, `LivenessCaptureInput`) so the Sekyro dashboard can show how long the face capture, the upload and the processing of each check took. Nothing else changes on the wire; `face_match` is untouched.
288
+ - `@sekyro/react`: `<LivenessCapture onCaptured>` receives the new fields unchanged (no code change — the dependency bump only).
289
+ - Updated dependencies [9991ea5]
290
+ - @sekyro/web@0.1.0-rc.4
291
+
3
292
  ## 0.1.0-rc.1
4
293
 
5
294
  ### Minor Changes
package/LICENSE CHANGED
@@ -1,20 +1,29 @@
1
- Sekyro SDK — Proprietary License
1
+ Sekyro AI SDK License (proprietary)
2
2
 
3
- Copyright (c) 2026 Ibtikar Technologies. All rights reserved.
3
+ Copyright (c) 2026 Ibtikar Technologies, Inc. All rights reserved.
4
4
 
5
- This software (the "SDK") is proprietary to Ibtikar Technologies. Use is
6
- permitted only under a Sekyro customer agreement with Ibtikar Technologies, and
7
- only to integrate the customer's own applications with the Sekyro
8
- identity-verification service. For that purpose you may install the SDK
9
- from the public npm registry and run it unmodified.
5
+ This SDK is proprietary software of Ibtikar Technologies, Inc., licensed
6
+ only under the Sekyro AI SDK License:
7
+ https://sekyro.ai/en/legal/sdk-license
8
+ (in French: https://sekyro.ai/fr/legal/sdk-license,
9
+ in Arabic: https://sekyro.ai/ar/legal/sdk-license).
10
10
 
11
- No other right or license, express or implied, is granted. You may not
12
- modify, reverse-engineer, redistribute, sublicense, resell or create
13
- derivative works of the SDK, nor remove or alter this notice. The source
14
- code is published for transparency (build provenance, security review); its
15
- publication grants no additional rights.
11
+ In short, and subject to the full license:
16
12
 
17
- THE SDK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED. TO THE EXTENT PERMITTED BY LAW, IBTIKAR TECHNOLOGIES SHALL NOT BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE USE OF THE
20
- SDK, EXCEPT AS PROVIDED IN THE APPLICABLE CUSTOMER AGREEMENT.
13
+ - You may use the SDK only with a Sekyro AI account, a customer agreement
14
+ with Ibtikar Technologies, Inc. and valid API keys, to integrate the
15
+ Sekyro AI services into your own applications. You may distribute it to
16
+ your end users only as embedded in those applications.
17
+ - You may not use it with another identity verification provider, modify it
18
+ beyond the configuration and theming it exposes, reverse engineer,
19
+ decompile or disassemble it (except where the law expressly allows it),
20
+ circumvent its security, attestation, license checks or usage metering,
21
+ or distribute or sublicense it on its own.
22
+ - Open-source components keep their own licenses. See the third-party
23
+ notices shipped with this SDK.
24
+ - The SDK is provided "as is", without warranty, except as your customer
25
+ agreement provides. The license is governed by the laws of the State of
26
+ Delaware, USA. If this license and your customer agreement conflict,
27
+ the customer agreement prevails.
28
+
29
+ Questions: contact@sekyro.ai
package/README.md CHANGED
@@ -1,22 +1,33 @@
1
1
  # @sekyro/react
2
2
 
3
- React component for [Sekyro](https://sekyro.ai) liveness capture: the hosted page's
4
- capture UI (`<LivenessCapture />`), extracted onto the public `@sekyro/web` API with
5
- no private design-system or framework dependency. Themeable through CSS variables,
6
- ar / fr / en built in, RTL-safe (logical CSS only), WCAG AAA defaults.
3
+ React components for [Sekyro AI](https://sekyro.ai) identity verification, built on the
4
+ public `@sekyro/web` API with no private design-system or framework dependency:
7
5
 
8
- > Status: `0.1.0-rc.0`, still `private` — the public npm release is wired in a later
9
- > task (Changesets + Trusted Publishing). Sekyro's own hosted page dogfoods it via a
10
- > `file:` link.
6
+ - `@sekyro/react`: `<LivenessCapture />`, the hosted page's liveness capture UI;
7
+ - `@sekyro/react/verification`: `<SekyroVerification />`, which renders every step of the
8
+ session's Sekyro flow (codes, choices, national number, document, identity summary,
9
+ liveness and face match, ICAO portrait, national eID, result), and the single step
10
+ components.
11
+
12
+ Themeable through CSS variables, ar / fr / en built in, RTL-safe (logical CSS only),
13
+ WCAG AAA defaults. Sekyro AI's own hosted page uses the same components.
11
14
 
12
15
  ## Install
13
16
 
14
17
  ```sh
15
- npm install @sekyro/react @sekyro/web react react-dom
18
+ npm install @sekyro/react@next @sekyro/web@next react react-dom
16
19
  ```
17
20
 
18
- Peer dependencies: `react >=18.2`, `react-dom >=18.2`, `@sekyro/web ^0.1.0-rc.0`.
19
- No other runtime dependencies.
21
+ Peer dependencies: `react >=18.2`, `react-dom >=18.2`, and `@sekyro/web` at the release this
22
+ package was built with or later, up to the next minor rc line (`npm view @sekyro/react@next peerDependencies`
23
+ shows the exact range).
24
+ No other runtime dependencies. Use of the SDK is governed by the
25
+ [Sekyro AI SDK License](https://sekyro.ai/legal/sdk-license) (summarised in `LICENSE`)
26
+ and your Sekyro AI customer agreement.
27
+
28
+ The full guide (sessions and flows, the whole flow with `<SekyroVerification>`, CSP,
29
+ model assets, reason codes) is the
30
+ [web SDK guide](https://docs.sekyro.ai/en/web/embedded-sdk).
20
31
 
21
32
  ## Usage
22
33
 
@@ -44,7 +55,7 @@ const verification = createVerification({ clientToken, locale: "ar" });
44
55
  retry coaching and the remaining attempts; with `createVerification({ rearm: 'manual' })`
45
56
  the component instead offers a focused "Start a new attempt" button.
46
57
  - The still freezes the stage the instant recording stops (the handle's `frozen`
47
- event) — before the clip finalizes; the "camera off" pill only appears once the
58
+ event), before the clip finalizes; the "camera off" pill only appears once the
48
59
  tracks are actually stopped (`captured`). A LOW device profile (`profile` event)
49
60
  drops the decorative animations.
50
61
  - **Capture-only mode** (no `verification`): `createLivenessCapture()`; the component
@@ -59,14 +70,105 @@ const verification = createVerification({ clientToken, locale: "ar" });
59
70
  | `locale` | `"ar" \| "fr" \| "en"` | Built-in dictionary. |
60
71
  | `dir?` | `"ltr" \| "rtl"` | Defaults to `rtl` for `ar`. |
61
72
  | `strings?` | `Partial<Strings>` | Per-key overrides on top of the built-ins. |
62
- | `slots?` | `{ header, footer, intro(start), stageOverlay(videoRef), voicePrompt(hint, text, key), errorPanel(err, retry) }` | `intro` replaces the built-in intro (permission rows, loaders, settings); `stageOverlay` renders inside the stage box above the ring (overlays, debug HUDs); `voicePrompt` renders in the stage's start corner (audio / TTS — `key` selects the clip); `errorPanel` replaces the camera-error notice. |
63
- | `autoStart?` | `boolean` | Start the camera instead of showing the intro — once, the first time it is `true` while idle (flip it when your own preconditions are met). |
73
+ | `slots?` | `{ header, footer, intro(start, context), stageOverlay(videoRef), voicePrompt(hint, text, key, voice), errorPanel(err, retry) }` | `intro` replaces the built-in pre-capture screen (see below); `stageOverlay` renders inside the stage box above the ring (overlays, debug HUDs); `voicePrompt` replaces the built-in voice chip in the stage's start corner; `errorPanel` replaces the camera-error notice. |
74
+ | `autoStart?` | `boolean \| "when-permitted"` | Skip the pre-capture screen and start once the detector preload is ready, at most once per mount. `true` arms it (flip it when your own preconditions are met); `"when-permitted"` arms it only when the camera permission is already `granted` (until the permission probe answers, the screen shows its loader). |
75
+ | `notice?` | `ReactNode \| { tone, text }` | Host message above the pre-capture screen (busy service, previous failure). Pre-capture only. |
76
+ | `startDisabled?` / `startLabel?` | `boolean` / `ReactNode` | Disable the built-in Start and relabel it (e.g. a cooldown: "Retry in 12 s"). It gates only the pre-capture Start, not the error Retry, "record again" or the retake button. |
77
+ | `tips?` | `false \| (BuiltInTipId \| IntroTip)[]` | Tips card; default `DEFAULT_TIPS`; `false` hides it. |
78
+ | `voice?` | `false \| VoiceOptions` | Voice guidance; on by default. `false` = no speech, no switch, no chip. |
79
+ | `onGuidance?` | `(key) => void` | Telemetry: once per change of the displayed `fcv3.*` guidance key. |
64
80
  | `onStateChange?` | `(state) => void` | Every capture-state transition, for host chrome (hide a description while the stage is live, telemetry). |
65
81
  | `onCaptured?` | `(artifacts) => void` | Fires before any upload. |
66
82
  | `onResult?` | `(result) => void` | Verification mode only. |
67
83
  | `onError?` | `(error) => void` | Camera / engine failure (`permission \| notfound \| inuse \| insecure \| unsupported \| generic`). |
68
84
  | `assetBaseUrl?` | `string` | Detector assets base (default `/models-v3`). |
69
85
 
86
+ ### Pre-capture screen
87
+
88
+ While the capture is idle the component renders a built-in "get ready" screen:
89
+ a tips card, the camera-permission row (`granted` / `prompt` / `denied` with the
90
+ fix / `unknown`), the voice switch, the security note and **one** Start control gated on the detector preload
91
+ (`preloadLivenessAssets` from `@sekyro/web`, kicked on mount): a busy Start while
92
+ the models download, Start when ready, a danger notice + Retry if the download
93
+ failed. Without a camera API (SSR, old browsers) the preload is skipped and Start
94
+ is ready at once.
95
+
96
+ `slots.intro(start, context)` replaces the whole screen. `context` is
97
+ `{ assets: "loading" | "ready" | "failed", retryAssets, permission, captureMode,
98
+ facing, setFacing, canChooseFacing, voice }`; call `start` from your click handler:
99
+ it opens `context.facing` and unlocks audio inside the gesture (iOS). The `notice`
100
+ still renders above your intro.
101
+
102
+ ### Who films the face (capture mode)
103
+
104
+ The session's flow decides it (`HostedSessionView.capture.mode`); no prop can
105
+ change it. A **self** capture (the default, and every capture-only mount) uses the
106
+ front camera only: no front/back choice, no switch on the stage. An **assisted**
107
+ capture (an agent films the person) opens the back camera with an unmirrored
108
+ preview (the front one on a device without a front/back choice), offers the front/back choice on a device with both cameras and the switch
109
+ until the clip records, and shows the agent's copy (`capture.assisted.*`); the voice
110
+ guidance still speaks to the person filmed. On a phone, a capture held sideways
111
+ waits with `fcv3.hold_upright` until the phone is upright.
112
+
113
+ ```tsx
114
+ <LivenessCapture
115
+ verification={verification}
116
+ locale="fr"
117
+ notice={busy ? { tone: "warning", text: t("serviceBusy") } : undefined}
118
+ startDisabled={cooldown > 0}
119
+ startLabel={cooldown > 0 ? t("retryIn", { s: cooldown }) : undefined}
120
+ tips={["light", "uncover", { id: "id-card", text: t("haveIdReady") }]}
121
+ />
122
+ ```
123
+
124
+ ### Voice guidance
125
+
126
+ During capture the component speaks the displayed (debounced) guidance (the
127
+ `fcv3.*` gate hints) through one `<audio>` element, falling back to the
128
+ device voice (`speechSynthesis`). A stage chip (`aria-pressed`) and the intro
129
+ switch toggle it; the viewer's choice persists in `localStorage`.
130
+
131
+ | `VoiceOptions` | Default | Notes |
132
+ |---|---|---|
133
+ | `defaultEnabled?` | `true` | Used when the viewer has no stored preference. |
134
+ | `clips?` | verification mode: Sekyro AI clips from the session (add `https://assets.sekyro.ai` to `media-src`); capture-only: none | `VoiceClipSource`: a resolver `(key, locale) => url \| null` **or** a map `{ [locale]: { [voiceKey]: url } }` (for example delivered by your backend; pass a new object to change it). Yours always wins over the Sekyro AI clips. A missing URL or a throwing resolver = no clip → device voice. |
135
+ | `speechFallback?` | `true` | `false`, or the locales where the device voice may speak. A device with no voice for the language stays silent rather than read Arabic in a French voice. |
136
+ | `storageKey?` | `"sekyro.voiceGuidance"` | `null` = do not persist. |
137
+
138
+ **Sekyro AI clips.** In verification mode the component speaks the recorded
139
+ ar/fr clip set that arrives with the session (`verification.voiceClips()`),
140
+ served from `https://assets.sekyro.ai`: a page with a Content-Security-Policy
141
+ must allow that origin in `media-src`. Until the set arrives, when the session
142
+ has none, or when it cannot be fetched, the device voice speaks. The package
143
+ ships no audio. `VOICE_KEYS` lists the nine `fcv3.*` guidance keys plus
144
+ `capture.tips.summary`.
145
+
146
+ **"Listen to the instructions".** The pre-capture screen has a button under
147
+ the tips that plays the spoken summary `capture.tips.summary`. It never
148
+ auto-plays, a second tap stops it, and Start stops it too. It shows only with
149
+ the built-in tips, unless your `voice.clips` has a `capture.tips.summary` clip
150
+ for the locale. It never shows with `voice={false}`, and the voice switch
151
+ does not hide it.
152
+
153
+ **iOS.** Audio unlocks inside a user gesture: the Start tap, or the voice
154
+ switch/chip turned on. With `autoStart` there is no Start tap, so audio stays
155
+ locked until the person's first activating touch, click or key press anywhere
156
+ inside the component (`touchend` / `click` / `keydown` other than Escape, or a
157
+ mouse/pen `pointerup`; a touch `pointerdown` is not a user activation on WebKit).
158
+ It unlocks once; an event without activation leaves the listener armed. The
159
+ clips are prefetched in that same gesture, and only while voice is on. Guidance
160
+ due before the unlock stays silent on iOS.
161
+
162
+ **`voicePrompt` slot.** It replaces the chip and receives the shared
163
+ `VoiceControl` (`{ supported, enabled, setEnabled, toggle }`) as its fourth
164
+ argument; the component keeps speaking. If your slot plays audio itself, pass
165
+ `voice={false}` or the person hears it twice. A development build warns once
166
+ when `slots.voicePrompt` is set and `voice` is undefined (pass `voice={{}}` to keep
167
+ the built-in voice and silence it).
168
+
169
+ **CSP.** Clips and the unlock use `media-src 'self' blob:` (the silent unlock WAV
170
+ is a `blob:` URL, no `data:` needed); add your clip host if `clips` points off-origin.
171
+
70
172
  ### Theme
71
173
 
72
174
  `SekyroThemeProvider` writes CSS variables on a `.sekyro-root` wrapper:
@@ -81,7 +183,7 @@ Contrast rules the component relies on (checked for the default theme in
81
183
  - `fg` on `surface` / `bg`, `brandFg` on `brand`: text → 7:1 (AAA);
82
184
  - `surface` on `fg`: the stage scrim is `fg` and the guidance line is `surface`, so the
83
185
  on-camera text inherits the same ratio;
84
- - `fgMuted` on `surface`: secondary text only (security note, checking hint) — AA
186
+ - `fgMuted` on `surface`: secondary text only (security note, checking hint): AA
85
187
  (4.5:1) is the floor, AAA recommended;
86
188
  - `brand`, `ring`, `danger`, `warning`, `success` on `surface`: non-text UI → 3:1.
87
189
 
@@ -102,6 +204,41 @@ Keys follow the hosted message catalog (`capture.*`, `fcv2.err.*`, `fcv3.*`,
102
204
  - Inline SVG icons only; no emoji; logical CSS properties only (`scripts/check-css.mjs`
103
205
  fails the build on any physical `left`/`right`).
104
206
 
207
+ ## Entries: `@sekyro/react` and `@sekyro/react/verification`
208
+
209
+ The main entry is the liveness component above. The flow steps
210
+ (`<SekyroVerification>`, `<SekyroFlow>`, `<PhoneOtpStep>`, `<EmailOtpStep>`,
211
+ `<MethodChoice>`, `<EidStep>`, `<IdNumberEntry>` (formerly `<NniEntry>`), `<DocumentCapture>`, `<PortraitCapture>`,
212
+ `<VerificationResultScreen>`) live on a second entry, `@sekyro/react/verification`, with
213
+ its own stylesheet (`import "@sekyro/react/verification.css"` next to `styles.css`). It
214
+ needs `@sekyro/web` 0.1.0-rc.8 or later (the step runner). The server decides the steps
215
+ from the session's flow; the component renders whichever step comes next.
216
+
217
+ `verification.css` loads the SDK's fonts (subset Inter, Geist and Cairo,
218
+ woff2, OFL) from `fonts/` beside it: your bundler emits them as assets (allow
219
+ them in your CSP `font-src`); they load only for the text that needs them and
220
+ never block it (`font-display: swap`). A partner font from the dashboard
221
+ branding or `theme.fontFamily` still wins.
222
+
223
+ Pass `onClose` to `<SekyroVerification>` to take the person back to your page:
224
+ the header then ends with a close button (`{ reason: "cancelled" }`) and the
225
+ result page with "Back to {org}" (`{ reason: "finished", result }`). Consent is
226
+ the one line over the first step; the runner records it on the person's first
227
+ action.
228
+
229
+ **Use the ESM build (`import`).** In ESM both entries import one shared copy of
230
+ the common code (theme, strings, `<LivenessCapture>`), and the document camera
231
+ view is a separate chunk loaded only when a document step shows. The CJS build
232
+ (`require`) has no code splitting: each entry is a self-contained bundle with
233
+ its **own copy** of the shared modules, so nothing module-level is shared
234
+ between `@sekyro/react` and `@sekyro/react/verification` (for example, a
235
+ `SekyroThemeProvider` or `<LivenessCapture>` imported from one entry is a
236
+ different component from the one the other entry renders), the camera view is
237
+ inlined, and the code is downloaded twice if you import both. The theme itself
238
+ is plain CSS variables on `.sekyro-root`, so a provider from either entry still
239
+ themes both, but every bundler partners use (Next, Vite, webpack 5, esbuild)
240
+ resolves the ESM build by default, so keep it that way.
241
+
105
242
  ## Scripts
106
243
 
107
244
  `npm test` (CSS lint + vitest: behaviour, jest-axe per state × ar/fr, contrast, RTL
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var c=Object.defineProperty;var d=(a,b)=>c(a,"name",{value:b,configurable:!0});export{d as a};